@elementor/editor-editing-panel 1.10.0 → 1.11.1
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 +89 -0
- package/dist/index.js +809 -804
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +712 -711
- 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/border-section/border-radius-field.tsx +33 -14
- 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/text-stroke-field.tsx +2 -2
- 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.mjs
CHANGED
|
@@ -5,29 +5,19 @@ import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
|
5
5
|
import { createControlReplacement } from "@elementor/editor-controls";
|
|
6
6
|
var { replaceControl, getControlReplacement } = createControlReplacement();
|
|
7
7
|
|
|
8
|
-
// src/components/css-class-selector.tsx
|
|
8
|
+
// src/components/css-classes/css-class-selector.tsx
|
|
9
9
|
import * as React7 from "react";
|
|
10
|
-
import { useId as useId2, useRef as useRef2 } from "react";
|
|
11
10
|
import { getElementSetting, updateElementSettings as updateElementSettings2, useElementSetting as useElementSetting2 } from "@elementor/editor-elements";
|
|
12
11
|
import { classesPropTypeUtil } from "@elementor/editor-props";
|
|
13
12
|
import {
|
|
14
13
|
ELEMENTS_STYLES_PROVIDER_KEY,
|
|
15
|
-
stylesRepository as
|
|
14
|
+
stylesRepository as stylesRepository4,
|
|
16
15
|
useCreateActionsByProvider,
|
|
17
16
|
useProviders
|
|
18
17
|
} from "@elementor/editor-styles-repository";
|
|
19
|
-
import { EllipsisWithTooltip } from "@elementor/editor-ui";
|
|
20
|
-
import { DotsVerticalIcon } from "@elementor/icons";
|
|
21
18
|
import { createLocation } from "@elementor/locations";
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
Chip,
|
|
25
|
-
Stack,
|
|
26
|
-
Typography,
|
|
27
|
-
UnstableChipGroup,
|
|
28
|
-
usePopupState
|
|
29
|
-
} from "@elementor/ui";
|
|
30
|
-
import { __ as __2 } from "@wordpress/i18n";
|
|
19
|
+
import { Chip as Chip2, Stack as Stack2, Typography as Typography2 } from "@elementor/ui";
|
|
20
|
+
import { __ as __3 } from "@wordpress/i18n";
|
|
31
21
|
|
|
32
22
|
// src/contexts/classes-prop-context.tsx
|
|
33
23
|
import * as React from "react";
|
|
@@ -106,227 +96,14 @@ function getProviderByStyleId(styleId) {
|
|
|
106
96
|
return styleProvider ?? null;
|
|
107
97
|
}
|
|
108
98
|
|
|
109
|
-
// src/components/css-class-menu.tsx
|
|
110
|
-
import * as React4 from "react";
|
|
111
|
-
import { CheckIcon } from "@elementor/icons";
|
|
112
|
-
import {
|
|
113
|
-
bindMenu,
|
|
114
|
-
Divider,
|
|
115
|
-
ListItemIcon,
|
|
116
|
-
ListItemText,
|
|
117
|
-
ListSubheader,
|
|
118
|
-
Menu,
|
|
119
|
-
MenuItem,
|
|
120
|
-
styled
|
|
121
|
-
} from "@elementor/ui";
|
|
122
|
-
import { __ } from "@wordpress/i18n";
|
|
123
|
-
|
|
124
|
-
// src/hooks/use-unapply-class.ts
|
|
125
|
-
import { updateElementSettings, useElementSetting } from "@elementor/editor-elements";
|
|
126
|
-
var useUnapplyClass = (classId) => {
|
|
127
|
-
const { element } = useElement();
|
|
128
|
-
const { setId: setStyleId } = useStyle();
|
|
129
|
-
const classesProp = useClassesProp();
|
|
130
|
-
const classes = useElementSetting(element.id, classesProp);
|
|
131
|
-
const filteredClasses = classes?.value.filter((className) => className !== classId) ?? [];
|
|
132
|
-
return () => {
|
|
133
|
-
updateElementSettings({
|
|
134
|
-
id: element.id,
|
|
135
|
-
props: {
|
|
136
|
-
[classesProp]: {
|
|
137
|
-
$$type: "classes",
|
|
138
|
-
value: filteredClasses
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
setStyleId(null);
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
// src/components/css-class-menu.tsx
|
|
147
|
-
var STATES = ["hover", "focus", "active"];
|
|
148
|
-
function CssClassMenu({ styleId, isFixed = false, popupState }) {
|
|
149
|
-
const handleKeyDown = (e) => {
|
|
150
|
-
e.stopPropagation();
|
|
151
|
-
};
|
|
152
|
-
return /* @__PURE__ */ React4.createElement(
|
|
153
|
-
Menu,
|
|
154
|
-
{
|
|
155
|
-
MenuListProps: { dense: true },
|
|
156
|
-
...bindMenu(popupState),
|
|
157
|
-
anchorOrigin: {
|
|
158
|
-
vertical: "top",
|
|
159
|
-
horizontal: "right"
|
|
160
|
-
},
|
|
161
|
-
onKeyDown: handleKeyDown
|
|
162
|
-
},
|
|
163
|
-
!isFixed && [
|
|
164
|
-
/* @__PURE__ */ React4.createElement(UnapplyClassMenuItem, { key: "unapply-class", styleId }),
|
|
165
|
-
/* @__PURE__ */ React4.createElement(Divider, { key: "global-class-items-divider" })
|
|
166
|
-
],
|
|
167
|
-
/* @__PURE__ */ React4.createElement(ListSubheader, null, __("Add a pseudo selector", "elementor")),
|
|
168
|
-
/* @__PURE__ */ React4.createElement(StateMenuItem, { key: "normal", state: null, styleId }),
|
|
169
|
-
STATES.map((state) => {
|
|
170
|
-
return /* @__PURE__ */ React4.createElement(StateMenuItem, { key: state, state, styleId });
|
|
171
|
-
})
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
function StateMenuItem({ state, styleId, ...props }) {
|
|
175
|
-
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
176
|
-
const { state: activeState } = meta;
|
|
177
|
-
const isActive = styleId === activeId;
|
|
178
|
-
const isSelected = state === activeState && isActive;
|
|
179
|
-
return /* @__PURE__ */ React4.createElement(
|
|
180
|
-
StyledMenuItem,
|
|
181
|
-
{
|
|
182
|
-
...props,
|
|
183
|
-
selected: isSelected,
|
|
184
|
-
onClick: () => {
|
|
185
|
-
if (!isActive) {
|
|
186
|
-
setActiveId(styleId);
|
|
187
|
-
}
|
|
188
|
-
setActiveMetaState(state);
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
isSelected && /* @__PURE__ */ React4.createElement(ListItemIcon, null, /* @__PURE__ */ React4.createElement(CheckIcon, null)),
|
|
192
|
-
/* @__PURE__ */ React4.createElement(ListItemText, { primary: state ? `:${state}` : "Normal" })
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
function UnapplyClassMenuItem({ styleId, ...props }) {
|
|
196
|
-
const unapplyClass = useUnapplyClass(styleId);
|
|
197
|
-
return /* @__PURE__ */ React4.createElement(StyledMenuItem, { ...props, onClick: unapplyClass }, /* @__PURE__ */ React4.createElement(ListItemText, { primary: "Remove" }));
|
|
198
|
-
}
|
|
199
|
-
var StyledMenuItem = styled(MenuItem)({
|
|
200
|
-
"&:hover": {
|
|
201
|
-
color: "text.primary"
|
|
202
|
-
// Overriding global CSS from the editor.
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
// src/components/editable-field.tsx
|
|
207
|
-
import * as React5 from "react";
|
|
208
|
-
import { createContext as createContext4, useContext as useContext4, useEffect, useRef, useState } from "react";
|
|
209
|
-
import { Tooltip } from "@elementor/ui";
|
|
210
|
-
var Context4 = createContext4(null);
|
|
211
|
-
var EditableFieldProvider = ({
|
|
212
|
-
children,
|
|
213
|
-
value,
|
|
214
|
-
onSubmit,
|
|
215
|
-
validation,
|
|
216
|
-
editable
|
|
217
|
-
}) => {
|
|
218
|
-
const [isEditing, setIsEditing] = useState(false);
|
|
219
|
-
const [submitting, setSubmitting] = useState(false);
|
|
220
|
-
const [error, setError] = useState(null);
|
|
221
|
-
const openEditMode = () => {
|
|
222
|
-
setIsEditing(true);
|
|
223
|
-
};
|
|
224
|
-
const closeEditMode = () => {
|
|
225
|
-
setError(null);
|
|
226
|
-
setIsEditing(false);
|
|
227
|
-
};
|
|
228
|
-
const submit = async (newValue) => {
|
|
229
|
-
if (!error) {
|
|
230
|
-
setSubmitting(true);
|
|
231
|
-
try {
|
|
232
|
-
await onSubmit(newValue);
|
|
233
|
-
} finally {
|
|
234
|
-
setSubmitting(false);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
closeEditMode();
|
|
238
|
-
};
|
|
239
|
-
const onChange = (event) => {
|
|
240
|
-
const { innerText: newValue } = event.target;
|
|
241
|
-
if (validation) {
|
|
242
|
-
setError(validation(newValue));
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
return /* @__PURE__ */ React5.createElement(
|
|
246
|
-
Context4.Provider,
|
|
247
|
-
{
|
|
248
|
-
value: {
|
|
249
|
-
isEditing,
|
|
250
|
-
openEditMode,
|
|
251
|
-
closeEditMode,
|
|
252
|
-
onChange,
|
|
253
|
-
value,
|
|
254
|
-
error,
|
|
255
|
-
submit,
|
|
256
|
-
editable,
|
|
257
|
-
submitting
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
children
|
|
261
|
-
);
|
|
262
|
-
};
|
|
263
|
-
var EditableField = ({ children, onClick, ...props }) => {
|
|
264
|
-
const ref = useRef(null);
|
|
265
|
-
const { isEditing, closeEditMode, value, onChange, error, submit, editable } = useEditableField();
|
|
266
|
-
useEffect(() => {
|
|
267
|
-
if (isEditing) {
|
|
268
|
-
ref.current?.focus();
|
|
269
|
-
selectAll();
|
|
270
|
-
}
|
|
271
|
-
}, [isEditing]);
|
|
272
|
-
const handleKeyDown = (event) => {
|
|
273
|
-
event.stopPropagation();
|
|
274
|
-
if (["Escape"].includes(event.key)) {
|
|
275
|
-
return closeEditMode();
|
|
276
|
-
}
|
|
277
|
-
if (["Enter"].includes(event.key)) {
|
|
278
|
-
event.preventDefault();
|
|
279
|
-
return submit(event.target.innerText);
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
const handleClick = (event) => {
|
|
283
|
-
if (isEditing) {
|
|
284
|
-
event.stopPropagation();
|
|
285
|
-
}
|
|
286
|
-
onClick?.(event);
|
|
287
|
-
};
|
|
288
|
-
const selectAll = () => {
|
|
289
|
-
const selection = getSelection();
|
|
290
|
-
if (!selection || !ref.current) {
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
const range = document.createRange();
|
|
294
|
-
range.selectNodeContents(ref.current);
|
|
295
|
-
selection.removeAllRanges();
|
|
296
|
-
selection.addRange(range);
|
|
297
|
-
};
|
|
298
|
-
if (!editable) {
|
|
299
|
-
return children;
|
|
300
|
-
}
|
|
301
|
-
return /* @__PURE__ */ React5.createElement(Tooltip, { open: !!error, title: error, placement: "top" }, /* @__PURE__ */ React5.createElement("div", { onKeyDown: handleKeyDown, onClick: handleClick, ...props }, /* @__PURE__ */ React5.createElement(
|
|
302
|
-
"span",
|
|
303
|
-
{
|
|
304
|
-
ref,
|
|
305
|
-
role: "textbox",
|
|
306
|
-
onInput: onChange,
|
|
307
|
-
contentEditable: isEditing,
|
|
308
|
-
suppressContentEditableWarning: true,
|
|
309
|
-
onBlur: closeEditMode
|
|
310
|
-
},
|
|
311
|
-
isEditing ? value : children
|
|
312
|
-
)));
|
|
313
|
-
};
|
|
314
|
-
var useEditableField = () => {
|
|
315
|
-
const contextValue = useContext4(Context4);
|
|
316
|
-
if (!contextValue) {
|
|
317
|
-
throw new Error("useEditableField must be used within a EditableFieldProvider");
|
|
318
|
-
}
|
|
319
|
-
return contextValue;
|
|
320
|
-
};
|
|
321
|
-
|
|
322
99
|
// src/components/multi-combobox.tsx
|
|
323
|
-
import * as
|
|
324
|
-
import { useId, useState
|
|
100
|
+
import * as React4 from "react";
|
|
101
|
+
import { useId, useState } from "react";
|
|
325
102
|
import {
|
|
326
103
|
Autocomplete,
|
|
327
104
|
Box,
|
|
328
105
|
createFilterOptions,
|
|
329
|
-
styled
|
|
106
|
+
styled,
|
|
330
107
|
TextField
|
|
331
108
|
} from "@elementor/ui";
|
|
332
109
|
function MultiCombobox({
|
|
@@ -338,7 +115,7 @@ function MultiCombobox({
|
|
|
338
115
|
}) {
|
|
339
116
|
const filter = useFilterOptions();
|
|
340
117
|
const { run, loading } = useActionRunner();
|
|
341
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ React4.createElement(
|
|
342
119
|
Autocomplete,
|
|
343
120
|
{
|
|
344
121
|
...props,
|
|
@@ -351,8 +128,8 @@ function MultiCombobox({
|
|
|
351
128
|
disabled: loading,
|
|
352
129
|
value: selected,
|
|
353
130
|
options: options10,
|
|
354
|
-
renderGroup: (params) => /* @__PURE__ */
|
|
355
|
-
renderInput: (params) => /* @__PURE__ */
|
|
131
|
+
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
132
|
+
renderInput: (params) => /* @__PURE__ */ React4.createElement(TextField, { ...params }),
|
|
356
133
|
onChange: (_, selectedOrInputValue, reason) => {
|
|
357
134
|
const inputValue = selectedOrInputValue.find((option) => typeof option === "string");
|
|
358
135
|
const optionsAndActions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
@@ -392,27 +169,27 @@ function MultiCombobox({
|
|
|
392
169
|
}
|
|
393
170
|
var Group = (params) => {
|
|
394
171
|
const id = `combobox-group-${useId().replace(/:/g, "_")}`;
|
|
395
|
-
return /* @__PURE__ */
|
|
172
|
+
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));
|
|
396
173
|
};
|
|
397
|
-
var StyledGroup =
|
|
174
|
+
var StyledGroup = styled("li")`
|
|
398
175
|
&:not( :last-of-type ) {
|
|
399
176
|
border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
|
|
400
177
|
}
|
|
401
178
|
`;
|
|
402
|
-
var StyledGroupHeader =
|
|
179
|
+
var StyledGroupHeader = styled(Box)(({ theme }) => ({
|
|
403
180
|
position: "sticky",
|
|
404
181
|
top: "-8px",
|
|
405
182
|
padding: theme.spacing(1, 2),
|
|
406
183
|
color: theme.palette.text.tertiary
|
|
407
184
|
}));
|
|
408
|
-
var StyledGroupItems =
|
|
185
|
+
var StyledGroupItems = styled("ul")`
|
|
409
186
|
padding: 0;
|
|
410
187
|
`;
|
|
411
188
|
function useFilterOptions() {
|
|
412
|
-
return
|
|
189
|
+
return useState(() => createFilterOptions())[0];
|
|
413
190
|
}
|
|
414
191
|
function useActionRunner() {
|
|
415
|
-
const [loading, setLoading] =
|
|
192
|
+
const [loading, setLoading] = useState(false);
|
|
416
193
|
const run = async (apply, value) => {
|
|
417
194
|
setLoading(true);
|
|
418
195
|
try {
|
|
@@ -437,11 +214,236 @@ function isAction(option) {
|
|
|
437
214
|
return "apply" in option && "condition" in option;
|
|
438
215
|
}
|
|
439
216
|
|
|
440
|
-
// src/components/css-class-
|
|
217
|
+
// src/components/css-classes/css-class-item.tsx
|
|
218
|
+
import * as React6 from "react";
|
|
219
|
+
import { useState as useState2 } from "react";
|
|
220
|
+
import { stylesRepository as stylesRepository3 } from "@elementor/editor-styles-repository";
|
|
221
|
+
import { EditableField, EllipsisWithTooltip, useEditable } from "@elementor/editor-ui";
|
|
222
|
+
import { DotsVerticalIcon } from "@elementor/icons";
|
|
223
|
+
import {
|
|
224
|
+
bindTrigger,
|
|
225
|
+
Chip,
|
|
226
|
+
Stack,
|
|
227
|
+
Typography,
|
|
228
|
+
UnstableChipGroup,
|
|
229
|
+
usePopupState
|
|
230
|
+
} from "@elementor/ui";
|
|
231
|
+
import { __ as __2 } from "@wordpress/i18n";
|
|
232
|
+
|
|
233
|
+
// src/components/css-classes/css-class-menu.tsx
|
|
234
|
+
import * as React5 from "react";
|
|
235
|
+
import { stylesRepository as stylesRepository2 } from "@elementor/editor-styles-repository";
|
|
236
|
+
import { bindMenu, Divider, ListSubheader, Menu, MenuItem } from "@elementor/ui";
|
|
237
|
+
import { __ } from "@wordpress/i18n";
|
|
238
|
+
|
|
239
|
+
// src/hooks/use-unapply-class.ts
|
|
240
|
+
import { updateElementSettings, useElementSetting } from "@elementor/editor-elements";
|
|
241
|
+
var useUnapplyClass = (classId) => {
|
|
242
|
+
const { element } = useElement();
|
|
243
|
+
const { setId: setStyleId } = useStyle();
|
|
244
|
+
const classesProp = useClassesProp();
|
|
245
|
+
const classes = useElementSetting(element.id, classesProp);
|
|
246
|
+
const filteredClasses = classes?.value.filter((className) => className !== classId) ?? [];
|
|
247
|
+
return () => {
|
|
248
|
+
updateElementSettings({
|
|
249
|
+
id: element.id,
|
|
250
|
+
props: {
|
|
251
|
+
[classesProp]: {
|
|
252
|
+
$$type: "classes",
|
|
253
|
+
value: filteredClasses
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
setStyleId(null);
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// src/components/css-classes/css-class-menu.tsx
|
|
262
|
+
var STATES = ["hover", "focus", "active"];
|
|
263
|
+
function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl }) {
|
|
264
|
+
const handleKeyDown = (e) => {
|
|
265
|
+
e.stopPropagation();
|
|
266
|
+
};
|
|
267
|
+
return /* @__PURE__ */ React5.createElement(
|
|
268
|
+
Menu,
|
|
269
|
+
{
|
|
270
|
+
MenuListProps: { dense: true },
|
|
271
|
+
...bindMenu(popupState),
|
|
272
|
+
anchorEl,
|
|
273
|
+
anchorOrigin: {
|
|
274
|
+
vertical: "bottom",
|
|
275
|
+
horizontal: "left"
|
|
276
|
+
},
|
|
277
|
+
transformOrigin: {
|
|
278
|
+
horizontal: "left",
|
|
279
|
+
vertical: -4
|
|
280
|
+
},
|
|
281
|
+
onKeyDown: handleKeyDown
|
|
282
|
+
},
|
|
283
|
+
getMenuItemsByProvider({ provider, styleId, handleRename, closeMenu: popupState.close }),
|
|
284
|
+
/* @__PURE__ */ React5.createElement(ListSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __("Pseudo selector", "elementor")),
|
|
285
|
+
STATES.map((state) => {
|
|
286
|
+
return /* @__PURE__ */ React5.createElement(StateMenuItem, { key: state, state, styleId });
|
|
287
|
+
})
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
function getMenuItemsByProvider({
|
|
291
|
+
provider,
|
|
292
|
+
styleId,
|
|
293
|
+
handleRename,
|
|
294
|
+
closeMenu
|
|
295
|
+
}) {
|
|
296
|
+
const providerInstance = stylesRepository2.getProviderByKey(provider);
|
|
297
|
+
const providerActions = providerInstance?.actions;
|
|
298
|
+
const [canUpdate, canDelete] = [providerActions?.update, providerActions?.delete];
|
|
299
|
+
const actions = [
|
|
300
|
+
canUpdate && /* @__PURE__ */ React5.createElement(RenameClassMenuItem, { key: "rename-class", handleRename, closeMenu }),
|
|
301
|
+
canDelete && /* @__PURE__ */ React5.createElement(UnapplyClassMenuItem, { key: "unapply-class", styleId })
|
|
302
|
+
].filter(Boolean);
|
|
303
|
+
if (actions.length) {
|
|
304
|
+
actions.unshift(
|
|
305
|
+
/* @__PURE__ */ React5.createElement(
|
|
306
|
+
ListSubheader,
|
|
307
|
+
{
|
|
308
|
+
key: "provider-label",
|
|
309
|
+
sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 }
|
|
310
|
+
},
|
|
311
|
+
providerInstance?.labels?.singular
|
|
312
|
+
)
|
|
313
|
+
);
|
|
314
|
+
actions.push(/* @__PURE__ */ React5.createElement(Divider, { key: "provider-actions-divider" }));
|
|
315
|
+
}
|
|
316
|
+
return actions;
|
|
317
|
+
}
|
|
318
|
+
function StateMenuItem({ state, styleId, ...props }) {
|
|
319
|
+
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
320
|
+
const { state: activeState } = meta;
|
|
321
|
+
const isActive = styleId === activeId;
|
|
322
|
+
const isSelected = state === activeState && isActive;
|
|
323
|
+
return /* @__PURE__ */ React5.createElement(
|
|
324
|
+
StyledMenuItem,
|
|
325
|
+
{
|
|
326
|
+
...props,
|
|
327
|
+
selected: isSelected,
|
|
328
|
+
sx: { textTransform: "capitalize" },
|
|
329
|
+
onClick: () => {
|
|
330
|
+
if (!isActive) {
|
|
331
|
+
setActiveId(styleId);
|
|
332
|
+
}
|
|
333
|
+
setActiveMetaState(state);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
state
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
function UnapplyClassMenuItem({ styleId, ...props }) {
|
|
340
|
+
const unapplyClass = useUnapplyClass(styleId);
|
|
341
|
+
return /* @__PURE__ */ React5.createElement(StyledMenuItem, { ...props, onClick: unapplyClass }, __("Remove", "elementor"));
|
|
342
|
+
}
|
|
343
|
+
function RenameClassMenuItem({
|
|
344
|
+
handleRename,
|
|
345
|
+
closeMenu,
|
|
346
|
+
...props
|
|
347
|
+
}) {
|
|
348
|
+
return /* @__PURE__ */ React5.createElement(
|
|
349
|
+
StyledMenuItem,
|
|
350
|
+
{
|
|
351
|
+
...props,
|
|
352
|
+
onClick: () => {
|
|
353
|
+
closeMenu();
|
|
354
|
+
handleRename();
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
__("Rename", "elementor")
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
var StyledMenuItem = ({ ...props }) => /* @__PURE__ */ React5.createElement(MenuItem, { ...props, sx: { ...props.sx ?? {}, typography: "caption", color: "text.primary" } });
|
|
361
|
+
|
|
362
|
+
// src/components/css-classes/css-class-item.tsx
|
|
363
|
+
var CHIP_SIZE = "tiny";
|
|
364
|
+
function CssClassItem({
|
|
365
|
+
id,
|
|
366
|
+
label,
|
|
367
|
+
provider,
|
|
368
|
+
isActive,
|
|
369
|
+
color: colorProp,
|
|
370
|
+
chipProps,
|
|
371
|
+
onClickActive,
|
|
372
|
+
renameLabel
|
|
373
|
+
}) {
|
|
374
|
+
const { meta } = useStyle();
|
|
375
|
+
const popupState = usePopupState({ variant: "popover" });
|
|
376
|
+
const [chipRef, setChipRef] = useState2(null);
|
|
377
|
+
const { onDelete, ...chipGroupProps } = chipProps;
|
|
378
|
+
const {
|
|
379
|
+
ref,
|
|
380
|
+
isEditing,
|
|
381
|
+
openEditMode,
|
|
382
|
+
error,
|
|
383
|
+
getProps: getEditableProps
|
|
384
|
+
} = useEditable({
|
|
385
|
+
value: label,
|
|
386
|
+
onSubmit: renameLabel,
|
|
387
|
+
validation: validateLabel
|
|
388
|
+
});
|
|
389
|
+
const color = error ? "error" : colorProp;
|
|
390
|
+
const providerActions = stylesRepository3.getProviderByKey(provider)?.actions;
|
|
391
|
+
const allowRename = Boolean(providerActions?.update);
|
|
392
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(UnstableChipGroup, { ref: setChipRef, ...chipGroupProps, "aria-label": `Edit ${label}`, role: "group" }, /* @__PURE__ */ React6.createElement(
|
|
393
|
+
Chip,
|
|
394
|
+
{
|
|
395
|
+
size: CHIP_SIZE,
|
|
396
|
+
label: isEditing ? /* @__PURE__ */ React6.createElement(EditableField, { ref, error, ...getEditableProps() }) : /* @__PURE__ */ React6.createElement(EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
397
|
+
variant: isActive && !meta.state ? "filled" : "standard",
|
|
398
|
+
color,
|
|
399
|
+
onClick: () => {
|
|
400
|
+
if (isActive && allowRename) {
|
|
401
|
+
openEditMode();
|
|
402
|
+
}
|
|
403
|
+
onClickActive(id);
|
|
404
|
+
},
|
|
405
|
+
"aria-pressed": isActive,
|
|
406
|
+
sx: {
|
|
407
|
+
"&.Mui-focusVisible": {
|
|
408
|
+
boxShadow: "none !important"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
), !isEditing && /* @__PURE__ */ React6.createElement(
|
|
413
|
+
Chip,
|
|
414
|
+
{
|
|
415
|
+
size: CHIP_SIZE,
|
|
416
|
+
label: /* @__PURE__ */ React6.createElement(Stack, { direction: "row", gap: 0.5, alignItems: "center" }, isActive && meta.state && /* @__PURE__ */ React6.createElement(Typography, { variant: "inherit" }, meta.state), /* @__PURE__ */ React6.createElement(DotsVerticalIcon, { fontSize: "inherit" })),
|
|
417
|
+
variant: "filled",
|
|
418
|
+
color,
|
|
419
|
+
...bindTrigger(popupState),
|
|
420
|
+
"aria-label": __2("Open CSS Class Menu", "elementor")
|
|
421
|
+
}
|
|
422
|
+
)), /* @__PURE__ */ React6.createElement(
|
|
423
|
+
CssClassMenu,
|
|
424
|
+
{
|
|
425
|
+
styleId: id,
|
|
426
|
+
popupState,
|
|
427
|
+
provider,
|
|
428
|
+
handleRename: openEditMode,
|
|
429
|
+
anchorEl: chipRef
|
|
430
|
+
}
|
|
431
|
+
));
|
|
432
|
+
}
|
|
433
|
+
var validateLabel = (newLabel) => {
|
|
434
|
+
if (!stylesRepository3.isLabelValid(newLabel)) {
|
|
435
|
+
return __2("Format is not valid", "elementor");
|
|
436
|
+
}
|
|
437
|
+
if (stylesRepository3.isLabelExist(newLabel)) {
|
|
438
|
+
return __2("Existing name", "elementor");
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
// src/components/css-classes/css-class-selector.tsx
|
|
441
443
|
var ID = "elementor-css-class-selector";
|
|
442
444
|
var TAGS_LIMIT = 8;
|
|
443
445
|
var EMPTY_OPTION = {
|
|
444
|
-
label:
|
|
446
|
+
label: __3("local", "elementor"),
|
|
445
447
|
value: "",
|
|
446
448
|
fixed: true,
|
|
447
449
|
color: "primary",
|
|
@@ -456,7 +458,7 @@ function CssClassSelector() {
|
|
|
456
458
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
457
459
|
const applied = useAppliedOptions(options10, appliedIds);
|
|
458
460
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
459
|
-
return /* @__PURE__ */ React7.createElement(
|
|
461
|
+
return /* @__PURE__ */ React7.createElement(Stack2, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(Typography2, { component: "label", variant: "caption", htmlFor: ID }, __3("CSS Classes", "elementor")), /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
460
462
|
MultiCombobox,
|
|
461
463
|
{
|
|
462
464
|
id: ID,
|
|
@@ -466,7 +468,7 @@ function CssClassSelector() {
|
|
|
466
468
|
onSelect: handleApply,
|
|
467
469
|
limitTags: TAGS_LIMIT,
|
|
468
470
|
actions,
|
|
469
|
-
getLimitTagsText: (more) => /* @__PURE__ */ React7.createElement(
|
|
471
|
+
getLimitTagsText: (more) => /* @__PURE__ */ React7.createElement(Chip2, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
470
472
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
471
473
|
const chipProps = getTagProps({ index });
|
|
472
474
|
const isActive = value.value === active?.value;
|
|
@@ -475,118 +477,30 @@ function CssClassSelector() {
|
|
|
475
477
|
return updateClassByProvider(value.provider, { label: newLabel, id: value.value });
|
|
476
478
|
};
|
|
477
479
|
return /* @__PURE__ */ React7.createElement(
|
|
478
|
-
|
|
480
|
+
CssClassItem,
|
|
479
481
|
{
|
|
480
482
|
key: chipProps.key,
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
)
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
label: value.label,
|
|
493
|
-
id: value.value,
|
|
494
|
-
isActive,
|
|
495
|
-
isFixed: value.fixed,
|
|
496
|
-
color: isActive && value.color ? value.color : "default",
|
|
497
|
-
chipProps,
|
|
498
|
-
onClickActive: () => setActiveId(isElementsProvider ? null : value.value)
|
|
499
|
-
}
|
|
500
|
-
)
|
|
501
|
-
);
|
|
502
|
-
})
|
|
503
|
-
}
|
|
504
|
-
));
|
|
505
|
-
}
|
|
506
|
-
var CHIP_SIZE = "tiny";
|
|
507
|
-
function CssClassItem({
|
|
508
|
-
id,
|
|
509
|
-
label,
|
|
510
|
-
isActive,
|
|
511
|
-
isFixed = false,
|
|
512
|
-
color: colorProp,
|
|
513
|
-
chipProps,
|
|
514
|
-
onClickActive
|
|
515
|
-
}) {
|
|
516
|
-
const { meta } = useStyle();
|
|
517
|
-
const popupId = useId2().replace(/:/g, "_");
|
|
518
|
-
const popupState = usePopupState({ variant: "popover", popupId });
|
|
519
|
-
const chipRef = useRef2(null);
|
|
520
|
-
const { onDelete, ...chipGroupProps } = chipProps;
|
|
521
|
-
const { isEditing, openEditMode, error, submitting } = useEditableField();
|
|
522
|
-
const color = error ? "error" : colorProp;
|
|
523
|
-
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(UnstableChipGroup, { ref: chipRef, ...chipGroupProps, "aria-label": `Edit ${label}`, role: "group" }, /* @__PURE__ */ React7.createElement(
|
|
524
|
-
Chip,
|
|
525
|
-
{
|
|
526
|
-
disabled: submitting,
|
|
527
|
-
size: CHIP_SIZE,
|
|
528
|
-
label: /* @__PURE__ */ React7.createElement(
|
|
529
|
-
EditableField,
|
|
530
|
-
{
|
|
531
|
-
onDoubleClick: () => {
|
|
532
|
-
if (!isActive) {
|
|
533
|
-
openEditMode();
|
|
534
|
-
}
|
|
535
|
-
},
|
|
536
|
-
onClick: () => {
|
|
537
|
-
if (isActive) {
|
|
538
|
-
openEditMode();
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
},
|
|
542
|
-
/* @__PURE__ */ React7.createElement(EllipsisWithTooltip, { maxWidth: "10ch", title: label })
|
|
543
|
-
),
|
|
544
|
-
variant: isActive && !meta.state ? "filled" : "standard",
|
|
545
|
-
color,
|
|
546
|
-
onClick: () => onClickActive(id),
|
|
547
|
-
"aria-pressed": isActive,
|
|
548
|
-
sx: {
|
|
549
|
-
"&.Mui-focusVisible": {
|
|
550
|
-
boxShadow: "none !important"
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
), !isEditing && /* @__PURE__ */ React7.createElement(
|
|
555
|
-
Chip,
|
|
556
|
-
{
|
|
557
|
-
disabled: submitting,
|
|
558
|
-
size: CHIP_SIZE,
|
|
559
|
-
label: /* @__PURE__ */ React7.createElement(Stack, { direction: "row", gap: 0.5, alignItems: "center" }, isActive && meta.state && /* @__PURE__ */ React7.createElement(Typography, { variant: "inherit" }, meta.state), /* @__PURE__ */ React7.createElement(DotsVerticalIcon, { fontSize: "inherit" })),
|
|
560
|
-
variant: "filled",
|
|
561
|
-
color,
|
|
562
|
-
...bindTrigger(popupState),
|
|
563
|
-
"aria-label": __2("Open CSS Class Menu", "elementor")
|
|
483
|
+
label: value.label,
|
|
484
|
+
provider: value.provider,
|
|
485
|
+
id: value.value,
|
|
486
|
+
isActive,
|
|
487
|
+
color: isActive && value.color ? value.color : "default",
|
|
488
|
+
chipProps,
|
|
489
|
+
onClickActive: () => setActiveId(isElementsProvider ? null : value.value),
|
|
490
|
+
renameLabel
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
})
|
|
564
494
|
}
|
|
565
|
-
))
|
|
495
|
+
));
|
|
566
496
|
}
|
|
567
497
|
var updateClassByProvider = (provider, data) => {
|
|
568
|
-
const providerInstance =
|
|
498
|
+
const providerInstance = stylesRepository4.getProviderByKey(provider);
|
|
569
499
|
if (!providerInstance) {
|
|
570
500
|
return;
|
|
571
501
|
}
|
|
572
502
|
return providerInstance.actions.update?.(data);
|
|
573
503
|
};
|
|
574
|
-
var VALID_SELECTOR_REGEX = /^[a-zA-Z0-9_-]+$/;
|
|
575
|
-
var renameValidation = (newLabel, options10) => {
|
|
576
|
-
if (isNameExist(newLabel, options10)) {
|
|
577
|
-
return __2("Existing name", "elementor");
|
|
578
|
-
}
|
|
579
|
-
if (isCharactersNotSupported(newLabel)) {
|
|
580
|
-
return __2("Format is not valid", "elementor");
|
|
581
|
-
}
|
|
582
|
-
};
|
|
583
|
-
var isNameExist = (newLabel, options10) => {
|
|
584
|
-
if (!options10?.length) {
|
|
585
|
-
return false;
|
|
586
|
-
}
|
|
587
|
-
return options10.some((option) => option.label.toLowerCase() === newLabel.toLowerCase());
|
|
588
|
-
};
|
|
589
|
-
var isCharactersNotSupported = (newLabel) => !VALID_SELECTOR_REGEX.test(newLabel);
|
|
590
504
|
function useOptions() {
|
|
591
505
|
const { element } = useElement();
|
|
592
506
|
const isProviderEditable = (provider) => !!provider.actions.updateProps;
|
|
@@ -615,14 +529,14 @@ function useCreateActions({
|
|
|
615
529
|
return useCreateActionsByProvider().map(([provider, create]) => {
|
|
616
530
|
return {
|
|
617
531
|
// translators: %s is the label of the new class.
|
|
618
|
-
label: (value) =>
|
|
619
|
-
apply:
|
|
620
|
-
const
|
|
621
|
-
if (!
|
|
532
|
+
label: (value) => __3('Create new "%s"', "elementor").replace("%s", value),
|
|
533
|
+
apply: (label) => {
|
|
534
|
+
const createdId = create(label);
|
|
535
|
+
if (!createdId) {
|
|
622
536
|
return;
|
|
623
537
|
}
|
|
624
|
-
pushAppliedId(
|
|
625
|
-
setActiveId(
|
|
538
|
+
pushAppliedId(createdId);
|
|
539
|
+
setActiveId(createdId);
|
|
626
540
|
},
|
|
627
541
|
condition: (options10, inputValue) => {
|
|
628
542
|
const isUniqueLabel = !options10.some(
|
|
@@ -631,7 +545,7 @@ function useCreateActions({
|
|
|
631
545
|
return !!inputValue && isUniqueLabel;
|
|
632
546
|
},
|
|
633
547
|
// translators: %s is the singular label of css class provider (e.g "Global CSS Class").
|
|
634
|
-
group:
|
|
548
|
+
group: __3("Create New %s", "elementor").replace("%s", provider.labels?.singular ?? "")
|
|
635
549
|
};
|
|
636
550
|
});
|
|
637
551
|
}
|
|
@@ -698,16 +612,16 @@ import { useSelectedElement } from "@elementor/editor-elements";
|
|
|
698
612
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
699
613
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
700
614
|
import { ErrorBoundary } from "@elementor/ui";
|
|
701
|
-
import { __ as
|
|
615
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
702
616
|
|
|
703
617
|
// src/controls-actions.ts
|
|
704
618
|
import { createMenu } from "@elementor/menus";
|
|
705
619
|
|
|
706
620
|
// src/popover-action.tsx
|
|
707
621
|
import * as React8 from "react";
|
|
708
|
-
import { useId as
|
|
622
|
+
import { useId as useId2 } from "react";
|
|
709
623
|
import { XIcon } from "@elementor/icons";
|
|
710
|
-
import { bindPopover, bindToggle, IconButton, Popover, Stack as
|
|
624
|
+
import { bindPopover, bindToggle, IconButton, Popover, Stack as Stack3, Tooltip, Typography as Typography3, usePopupState as usePopupState2 } from "@elementor/ui";
|
|
711
625
|
var SIZE = "tiny";
|
|
712
626
|
function PopoverAction({
|
|
713
627
|
title,
|
|
@@ -715,7 +629,7 @@ function PopoverAction({
|
|
|
715
629
|
icon: Icon,
|
|
716
630
|
popoverContent: PopoverContent
|
|
717
631
|
}) {
|
|
718
|
-
const id =
|
|
632
|
+
const id = useId2();
|
|
719
633
|
const popupState = usePopupState2({
|
|
720
634
|
variant: "popover",
|
|
721
635
|
popupId: `elementor-popover-action-${id}`
|
|
@@ -723,7 +637,7 @@ function PopoverAction({
|
|
|
723
637
|
if (!visible) {
|
|
724
638
|
return null;
|
|
725
639
|
}
|
|
726
|
-
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
|
640
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Tooltip, { placement: "top", title }, /* @__PURE__ */ React8.createElement(IconButton, { "aria-label": title, key: id, size: SIZE, ...bindToggle(popupState) }, /* @__PURE__ */ React8.createElement(Icon, { fontSize: SIZE }))), /* @__PURE__ */ React8.createElement(
|
|
727
641
|
Popover,
|
|
728
642
|
{
|
|
729
643
|
disablePortal: true,
|
|
@@ -734,7 +648,7 @@ function PopoverAction({
|
|
|
734
648
|
},
|
|
735
649
|
...bindPopover(popupState)
|
|
736
650
|
},
|
|
737
|
-
/* @__PURE__ */ React8.createElement(
|
|
651
|
+
/* @__PURE__ */ React8.createElement(Stack3, { 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(Typography3, { variant: "subtitle2" }, title), /* @__PURE__ */ React8.createElement(IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React8.createElement(XIcon, { fontSize: SIZE }))),
|
|
738
652
|
/* @__PURE__ */ React8.createElement(PopoverContent, { closePopover: popupState.close })
|
|
739
653
|
));
|
|
740
654
|
}
|
|
@@ -756,8 +670,8 @@ function EditorPanelErrorFallback() {
|
|
|
756
670
|
// src/components/editing-panel-tabs.tsx
|
|
757
671
|
import * as React59 from "react";
|
|
758
672
|
import { Fragment as Fragment8 } from "react";
|
|
759
|
-
import { Divider as Divider9, Stack as
|
|
760
|
-
import { __ as
|
|
673
|
+
import { Divider as Divider9, Stack as Stack20, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
674
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
761
675
|
|
|
762
676
|
// src/components/settings-tab.tsx
|
|
763
677
|
import * as React15 from "react";
|
|
@@ -773,13 +687,15 @@ import {
|
|
|
773
687
|
LinkControl,
|
|
774
688
|
SelectControl,
|
|
775
689
|
SizeControl,
|
|
690
|
+
SvgMediaControl,
|
|
776
691
|
TextAreaControl,
|
|
777
692
|
TextControl,
|
|
778
693
|
UrlControl
|
|
779
694
|
} from "@elementor/editor-controls";
|
|
780
695
|
var controlTypes = {
|
|
781
696
|
image: { component: ImageControl, layout: "full" },
|
|
782
|
-
|
|
697
|
+
"svg-media": { component: SvgMediaControl, layout: "full" },
|
|
698
|
+
text: { component: TextControl, layout: "full" },
|
|
783
699
|
textarea: { component: TextAreaControl, layout: "full" },
|
|
784
700
|
size: { component: SizeControl, layout: "two-columns" },
|
|
785
701
|
select: { component: SelectControl, layout: "two-columns" },
|
|
@@ -802,7 +718,7 @@ var Control = ({ props, type }) => {
|
|
|
802
718
|
|
|
803
719
|
// src/controls-registry/control-type-container.tsx
|
|
804
720
|
import * as React11 from "react";
|
|
805
|
-
import { Box as Box3, styled as
|
|
721
|
+
import { Box as Box3, styled as styled2 } from "@elementor/ui";
|
|
806
722
|
var ControlTypeContainer = ({
|
|
807
723
|
controlType,
|
|
808
724
|
children
|
|
@@ -810,7 +726,7 @@ var ControlTypeContainer = ({
|
|
|
810
726
|
const layout = getLayoutByType(controlType);
|
|
811
727
|
return /* @__PURE__ */ React11.createElement(StyledContainer, { layout }, children);
|
|
812
728
|
};
|
|
813
|
-
var StyledContainer =
|
|
729
|
+
var StyledContainer = styled2(Box3, {
|
|
814
730
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
815
731
|
})(({ layout, theme }) => ({
|
|
816
732
|
display: "grid",
|
|
@@ -847,8 +763,12 @@ var createTopLevelOjectType = ({ schema }) => {
|
|
|
847
763
|
var SettingsField = ({ bind, children }) => {
|
|
848
764
|
const { element, elementType } = useElement();
|
|
849
765
|
const settingsValue = useElementSetting3(element.id, bind);
|
|
766
|
+
const linkValue = useElementSetting3(element.id, "link");
|
|
850
767
|
const value = { [bind]: settingsValue };
|
|
851
768
|
const propType = createTopLevelOjectType({ schema: elementType.propsSchema });
|
|
769
|
+
if (bind === "tag" && linkValue?.value && "div-block" === elementType.key) {
|
|
770
|
+
return null;
|
|
771
|
+
}
|
|
852
772
|
const setValue = (newValue) => {
|
|
853
773
|
updateElementSettings3({
|
|
854
774
|
id: element.id,
|
|
@@ -860,13 +780,13 @@ var SettingsField = ({ bind, children }) => {
|
|
|
860
780
|
|
|
861
781
|
// src/components/section.tsx
|
|
862
782
|
import * as React13 from "react";
|
|
863
|
-
import { useId as
|
|
864
|
-
import { Collapse, Divider as Divider2, ListItemButton, ListItemText
|
|
783
|
+
import { useId as useId3, useState as useState3 } from "react";
|
|
784
|
+
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack4 } from "@elementor/ui";
|
|
865
785
|
|
|
866
786
|
// src/components/collapse-icon.tsx
|
|
867
787
|
import { ChevronDownIcon } from "@elementor/icons";
|
|
868
|
-
import { styled as
|
|
869
|
-
var CollapseIcon =
|
|
788
|
+
import { styled as styled3 } from "@elementor/ui";
|
|
789
|
+
var CollapseIcon = styled3(ChevronDownIcon, {
|
|
870
790
|
shouldForwardProp: (prop) => prop !== "open"
|
|
871
791
|
})(({ theme, open }) => ({
|
|
872
792
|
transform: open ? "rotate(180deg)" : "rotate(0deg)",
|
|
@@ -878,7 +798,7 @@ var CollapseIcon = styled4(ChevronDownIcon, {
|
|
|
878
798
|
// src/components/section.tsx
|
|
879
799
|
function Section({ title, children, defaultExpanded = false }) {
|
|
880
800
|
const [isOpen, setIsOpen] = useState3(!!defaultExpanded);
|
|
881
|
-
const id =
|
|
801
|
+
const id = useId3();
|
|
882
802
|
const labelId = `label-${id}`;
|
|
883
803
|
const contentId = `content-${id}`;
|
|
884
804
|
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
|
|
@@ -888,9 +808,9 @@ function Section({ title, children, defaultExpanded = false }) {
|
|
|
888
808
|
"aria-controls": contentId,
|
|
889
809
|
onClick: () => setIsOpen((prev) => !prev)
|
|
890
810
|
},
|
|
891
|
-
/* @__PURE__ */ React13.createElement(
|
|
811
|
+
/* @__PURE__ */ React13.createElement(ListItemText, { secondary: title }),
|
|
892
812
|
/* @__PURE__ */ React13.createElement(CollapseIcon, { open: isOpen, color: "secondary" })
|
|
893
|
-
), /* @__PURE__ */ React13.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React13.createElement(
|
|
813
|
+
), /* @__PURE__ */ React13.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React13.createElement(Stack4, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React13.createElement(Divider2, null));
|
|
894
814
|
}
|
|
895
815
|
|
|
896
816
|
// src/components/sections-list.tsx
|
|
@@ -927,12 +847,12 @@ var Control2 = ({ control }) => {
|
|
|
927
847
|
|
|
928
848
|
// src/components/style-tab.tsx
|
|
929
849
|
import * as React58 from "react";
|
|
930
|
-
import { useState as
|
|
850
|
+
import { useState as useState7 } from "react";
|
|
931
851
|
import { useElementSetting as useElementSetting4, useElementStyles } from "@elementor/editor-elements";
|
|
932
852
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
933
853
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
934
854
|
import { Divider as Divider8 } from "@elementor/ui";
|
|
935
|
-
import { __ as
|
|
855
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
936
856
|
|
|
937
857
|
// src/components/style-sections/background-section/background-section.tsx
|
|
938
858
|
import * as React17 from "react";
|
|
@@ -944,16 +864,24 @@ import { PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2 } fr
|
|
|
944
864
|
import { getStylesSchema } from "@elementor/editor-styles";
|
|
945
865
|
|
|
946
866
|
// src/hooks/use-styles-fields.ts
|
|
947
|
-
import { useEffect
|
|
948
|
-
import {
|
|
867
|
+
import { useEffect, useMemo, useReducer } from "react";
|
|
868
|
+
import {
|
|
869
|
+
createElementStyle,
|
|
870
|
+
deleteElementStyle,
|
|
871
|
+
getElementLabel
|
|
872
|
+
} from "@elementor/editor-elements";
|
|
949
873
|
import { getVariantByMeta } from "@elementor/editor-styles";
|
|
950
|
-
import {
|
|
874
|
+
import { LOCAL_STYLES_RESERVED_LABEL } from "@elementor/editor-styles-repository";
|
|
875
|
+
import { undoable } from "@elementor/editor-v1-adapters";
|
|
876
|
+
import { __ as __4 } from "@wordpress/i18n";
|
|
951
877
|
function useStylesFields(propNames) {
|
|
952
878
|
const { element } = useElement();
|
|
953
879
|
const { id, meta, provider } = useStyle();
|
|
954
880
|
const classesProp = useClassesProp();
|
|
881
|
+
const undoableUpdateStyle = useUndoableUpdateStyle();
|
|
882
|
+
const undoableCreateElementStyle = useUndoableCreateElementStyle();
|
|
955
883
|
const [, reRender] = useReducer((p) => !p, false);
|
|
956
|
-
|
|
884
|
+
useEffect(() => provider?.subscribe(reRender), [provider]);
|
|
957
885
|
const value = getProps({
|
|
958
886
|
elementId: element.id,
|
|
959
887
|
styleId: id,
|
|
@@ -963,19 +891,21 @@ function useStylesFields(propNames) {
|
|
|
963
891
|
});
|
|
964
892
|
const setValue = (props) => {
|
|
965
893
|
if (id === null) {
|
|
966
|
-
|
|
894
|
+
undoableCreateElementStyle({
|
|
967
895
|
elementId: element.id,
|
|
968
896
|
classesProp,
|
|
969
897
|
meta,
|
|
970
|
-
props
|
|
971
|
-
label: __3("local", "elementor")
|
|
898
|
+
props
|
|
972
899
|
});
|
|
973
900
|
return;
|
|
974
901
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
902
|
+
undoableUpdateStyle({
|
|
903
|
+
elementId: element.id,
|
|
904
|
+
styleId: id,
|
|
905
|
+
provider,
|
|
906
|
+
meta,
|
|
907
|
+
props
|
|
908
|
+
});
|
|
979
909
|
};
|
|
980
910
|
return [value, setValue];
|
|
981
911
|
}
|
|
@@ -992,6 +922,75 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
992
922
|
propNames.map((key) => [key, variant?.props[key] ?? null])
|
|
993
923
|
);
|
|
994
924
|
}
|
|
925
|
+
function useUndoableCreateElementStyle() {
|
|
926
|
+
return useMemo(() => {
|
|
927
|
+
return undoable(
|
|
928
|
+
{
|
|
929
|
+
do: (payload) => {
|
|
930
|
+
return createElementStyle({
|
|
931
|
+
...payload,
|
|
932
|
+
label: LOCAL_STYLES_RESERVED_LABEL
|
|
933
|
+
});
|
|
934
|
+
},
|
|
935
|
+
undo: ({ elementId }, styleId) => {
|
|
936
|
+
deleteElementStyle(elementId, styleId);
|
|
937
|
+
},
|
|
938
|
+
redo: (payload, styleId) => {
|
|
939
|
+
return createElementStyle({
|
|
940
|
+
...payload,
|
|
941
|
+
styleId,
|
|
942
|
+
label: LOCAL_STYLES_RESERVED_LABEL
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
title: ({ elementId }) => getElementLabel(elementId),
|
|
948
|
+
subtitle: __4("Style edited", "elementor")
|
|
949
|
+
}
|
|
950
|
+
);
|
|
951
|
+
}, []);
|
|
952
|
+
}
|
|
953
|
+
function useUndoableUpdateStyle() {
|
|
954
|
+
return useMemo(() => {
|
|
955
|
+
return undoable(
|
|
956
|
+
{
|
|
957
|
+
do: ({ elementId, styleId, provider, meta, props }) => {
|
|
958
|
+
if (!provider.actions.updateProps) {
|
|
959
|
+
throw new StylesProviderCannotUpdatePropsError({
|
|
960
|
+
context: { providerKey: provider.key }
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
const style = provider.actions.getById(styleId, { elementId });
|
|
964
|
+
const prevProps = getCurrentProps(style, meta);
|
|
965
|
+
provider.actions.updateProps(
|
|
966
|
+
{
|
|
967
|
+
id: styleId,
|
|
968
|
+
meta,
|
|
969
|
+
props
|
|
970
|
+
},
|
|
971
|
+
{ elementId }
|
|
972
|
+
);
|
|
973
|
+
return prevProps;
|
|
974
|
+
},
|
|
975
|
+
undo: ({ elementId, styleId, meta, provider }, prevProps) => {
|
|
976
|
+
provider.actions.updateProps?.({ id: styleId, meta, props: prevProps }, { elementId });
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
title: ({ elementId }) => getElementLabel(elementId),
|
|
981
|
+
subtitle: __4("Style edited", "elementor")
|
|
982
|
+
}
|
|
983
|
+
);
|
|
984
|
+
}, []);
|
|
985
|
+
}
|
|
986
|
+
function getCurrentProps(style, meta) {
|
|
987
|
+
if (!style) {
|
|
988
|
+
return {};
|
|
989
|
+
}
|
|
990
|
+
const variant = getVariantByMeta(style, meta);
|
|
991
|
+
const props = variant?.props ?? {};
|
|
992
|
+
return structuredClone(props);
|
|
993
|
+
}
|
|
995
994
|
|
|
996
995
|
// src/hooks/use-styles-field.ts
|
|
997
996
|
function useStylesField(propName) {
|
|
@@ -1023,22 +1022,22 @@ var BackgroundSection = () => {
|
|
|
1023
1022
|
};
|
|
1024
1023
|
|
|
1025
1024
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1026
|
-
import * as
|
|
1027
|
-
import { Divider as Divider3, Stack as
|
|
1025
|
+
import * as React25 from "react";
|
|
1026
|
+
import { Divider as Divider3, Stack as Stack6 } from "@elementor/ui";
|
|
1028
1027
|
|
|
1029
1028
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1030
1029
|
import * as React22 from "react";
|
|
1031
|
-
import { __ as
|
|
1030
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
1032
1031
|
|
|
1033
1032
|
// src/components/add-or-remove-content.tsx
|
|
1034
1033
|
import * as React18 from "react";
|
|
1035
1034
|
import { ControlLabel as ControlLabel2 } from "@elementor/editor-controls";
|
|
1036
1035
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
1037
|
-
import { Collapse as Collapse2, IconButton as IconButton2, Stack as
|
|
1036
|
+
import { Collapse as Collapse2, IconButton as IconButton2, Stack as Stack5 } from "@elementor/ui";
|
|
1038
1037
|
var SIZE2 = "tiny";
|
|
1039
1038
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
1040
|
-
return /* @__PURE__ */ React18.createElement(
|
|
1041
|
-
|
|
1039
|
+
return /* @__PURE__ */ React18.createElement(Stack5, { gap: 1.5 }, /* @__PURE__ */ React18.createElement(
|
|
1040
|
+
Stack5,
|
|
1042
1041
|
{
|
|
1043
1042
|
direction: "row",
|
|
1044
1043
|
sx: {
|
|
@@ -1048,36 +1047,36 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1048
1047
|
},
|
|
1049
1048
|
/* @__PURE__ */ React18.createElement(ControlLabel2, null, label),
|
|
1050
1049
|
isAdded ? /* @__PURE__ */ React18.createElement(IconButton2, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React18.createElement(MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React18.createElement(IconButton2, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React18.createElement(PlusIcon, { fontSize: SIZE2 }))
|
|
1051
|
-
), /* @__PURE__ */ React18.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React18.createElement(
|
|
1050
|
+
), /* @__PURE__ */ React18.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React18.createElement(Stack5, { gap: 1.5 }, children)));
|
|
1052
1051
|
};
|
|
1053
1052
|
|
|
1054
1053
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
1055
1054
|
import * as React19 from "react";
|
|
1056
1055
|
import { ColorControl, ControlLabel as ControlLabel3 } from "@elementor/editor-controls";
|
|
1057
1056
|
import { Grid } from "@elementor/ui";
|
|
1058
|
-
import { __ as
|
|
1057
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
1059
1058
|
var BorderColorField = () => {
|
|
1060
|
-
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React19.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ControlLabel3, null,
|
|
1059
|
+
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React19.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ControlLabel3, null, __5("Border Color", "elementor"))), /* @__PURE__ */ React19.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React19.createElement(ColorControl, null))));
|
|
1061
1060
|
};
|
|
1062
1061
|
|
|
1063
1062
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1064
1063
|
import * as React20 from "react";
|
|
1065
1064
|
import { ControlLabel as ControlLabel4, SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
1066
1065
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
1067
|
-
import { __ as
|
|
1066
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
1068
1067
|
var borderStyles = [
|
|
1069
|
-
{ value: "none", label:
|
|
1070
|
-
{ value: "solid", label:
|
|
1071
|
-
{ value: "dashed", label:
|
|
1072
|
-
{ value: "dotted", label:
|
|
1073
|
-
{ value: "double", label:
|
|
1074
|
-
{ value: "groove", label:
|
|
1075
|
-
{ value: "ridge", label:
|
|
1076
|
-
{ value: "inset", label:
|
|
1077
|
-
{ value: "outset", label:
|
|
1068
|
+
{ value: "none", label: __6("None", "elementor") },
|
|
1069
|
+
{ value: "solid", label: __6("Solid", "elementor") },
|
|
1070
|
+
{ value: "dashed", label: __6("Dashed", "elementor") },
|
|
1071
|
+
{ value: "dotted", label: __6("Dotted", "elementor") },
|
|
1072
|
+
{ value: "double", label: __6("Double", "elementor") },
|
|
1073
|
+
{ value: "groove", label: __6("Groove", "elementor") },
|
|
1074
|
+
{ value: "ridge", label: __6("Ridge", "elementor") },
|
|
1075
|
+
{ value: "inset", label: __6("Inset", "elementor") },
|
|
1076
|
+
{ value: "outset", label: __6("Outset", "elementor") }
|
|
1078
1077
|
];
|
|
1079
1078
|
var BorderStyleField = () => {
|
|
1080
|
-
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React20.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(ControlLabel4, null,
|
|
1079
|
+
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React20.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(ControlLabel4, null, __6("Border Type", "elementor"))), /* @__PURE__ */ React20.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React20.createElement(SelectControl2, { options: borderStyles }))));
|
|
1081
1080
|
};
|
|
1082
1081
|
|
|
1083
1082
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
@@ -1085,25 +1084,25 @@ import * as React21 from "react";
|
|
|
1085
1084
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
1086
1085
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
1087
1086
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
1088
|
-
import { __ as
|
|
1087
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
1089
1088
|
var edges = [
|
|
1090
1089
|
{
|
|
1091
|
-
label:
|
|
1090
|
+
label: __7("Top", "elementor"),
|
|
1092
1091
|
icon: /* @__PURE__ */ React21.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1093
1092
|
bind: "top"
|
|
1094
1093
|
},
|
|
1095
1094
|
{
|
|
1096
|
-
label:
|
|
1095
|
+
label: __7("Right", "elementor"),
|
|
1097
1096
|
icon: /* @__PURE__ */ React21.createElement(SideRightIcon, { fontSize: "tiny" }),
|
|
1098
1097
|
bind: "right"
|
|
1099
1098
|
},
|
|
1100
1099
|
{
|
|
1101
|
-
label:
|
|
1100
|
+
label: __7("Bottom", "elementor"),
|
|
1102
1101
|
icon: /* @__PURE__ */ React21.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1103
1102
|
bind: "bottom"
|
|
1104
1103
|
},
|
|
1105
1104
|
{
|
|
1106
|
-
label:
|
|
1105
|
+
label: __7("Left", "elementor"),
|
|
1107
1106
|
icon: /* @__PURE__ */ React21.createElement(SideLeftIcon, { fontSize: "tiny" }),
|
|
1108
1107
|
bind: "left"
|
|
1109
1108
|
}
|
|
@@ -1113,7 +1112,7 @@ var BorderWidthField = () => {
|
|
|
1113
1112
|
EqualUnequalSizesControl,
|
|
1114
1113
|
{
|
|
1115
1114
|
items: edges,
|
|
1116
|
-
label:
|
|
1115
|
+
label: __7("Border Width", "elementor"),
|
|
1117
1116
|
icon: /* @__PURE__ */ React21.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
1118
1117
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
1119
1118
|
}
|
|
@@ -1142,7 +1141,7 @@ var BorderField = () => {
|
|
|
1142
1141
|
return /* @__PURE__ */ React22.createElement(
|
|
1143
1142
|
AddOrRemoveContent,
|
|
1144
1143
|
{
|
|
1145
|
-
label:
|
|
1144
|
+
label: __8("Border", "elementor"),
|
|
1146
1145
|
isAdded: hasBorder,
|
|
1147
1146
|
onAdd: addBorder,
|
|
1148
1147
|
onRemove: removeBorder
|
|
@@ -1154,7 +1153,7 @@ var BorderField = () => {
|
|
|
1154
1153
|
};
|
|
1155
1154
|
|
|
1156
1155
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1157
|
-
import * as
|
|
1156
|
+
import * as React24 from "react";
|
|
1158
1157
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
1159
1158
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
1160
1159
|
import {
|
|
@@ -1164,58 +1163,111 @@ import {
|
|
|
1164
1163
|
RadiusTopLeftIcon,
|
|
1165
1164
|
RadiusTopRightIcon
|
|
1166
1165
|
} from "@elementor/icons";
|
|
1167
|
-
import {
|
|
1168
|
-
|
|
1166
|
+
import { withDirection } from "@elementor/ui";
|
|
1167
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
1168
|
+
|
|
1169
|
+
// src/hooks/use-direction.ts
|
|
1170
|
+
import { useTheme } from "@elementor/ui";
|
|
1171
|
+
function useDirection() {
|
|
1172
|
+
const theme = useTheme(), extendedWindow = window;
|
|
1173
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1174
|
+
return { isSiteRtl, isUiRtl };
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1178
|
+
import * as React23 from "react";
|
|
1179
|
+
import { useRef } from "react";
|
|
1180
|
+
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1181
|
+
var CLOCKWISE_ANGLES = {
|
|
1182
|
+
row: 0,
|
|
1183
|
+
column: 90,
|
|
1184
|
+
"row-reverse": 180,
|
|
1185
|
+
"column-reverse": 270
|
|
1186
|
+
};
|
|
1187
|
+
var COUNTER_CLOCKWISE_ANGLES = {
|
|
1188
|
+
row: 0,
|
|
1189
|
+
column: -90,
|
|
1190
|
+
"row-reverse": -180,
|
|
1191
|
+
"column-reverse": -270
|
|
1192
|
+
};
|
|
1193
|
+
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1194
|
+
const rotate = useRef(useGetTargetAngle(isClockwise, offset));
|
|
1195
|
+
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1196
|
+
return /* @__PURE__ */ React23.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1197
|
+
};
|
|
1198
|
+
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1199
|
+
const [direction] = useStylesField("flex-direction");
|
|
1200
|
+
const isRtl = "rtl" === useTheme2().direction;
|
|
1201
|
+
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1202
|
+
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1203
|
+
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
1204
|
+
const targetAngle = angleMap[direction?.value || "row"] + offset;
|
|
1205
|
+
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
1206
|
+
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
1207
|
+
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1211
|
+
var StartStartIcon = withDirection(RadiusTopLeftIcon);
|
|
1212
|
+
var StartEndIcon = withDirection(RadiusTopRightIcon);
|
|
1213
|
+
var EndStartIcon = withDirection(RadiusBottomLeftIcon);
|
|
1214
|
+
var EndEndIcon = withDirection(RadiusBottomRightIcon);
|
|
1215
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? __9("Top Right", "elementor") : __9("Top Left", "elementor");
|
|
1216
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? __9("Top Left", "elementor") : __9("Top Right", "elementor");
|
|
1217
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? __9("Bottom Right", "elementor") : __9("Bottom Left", "elementor");
|
|
1218
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __9("Bottom Left", "elementor") : __9("Bottom Right", "elementor");
|
|
1219
|
+
var getCorners = (isSiteRtl) => [
|
|
1169
1220
|
{
|
|
1170
|
-
label:
|
|
1171
|
-
icon: /* @__PURE__ */
|
|
1172
|
-
bind: "
|
|
1221
|
+
label: getStartStartLabel(isSiteRtl),
|
|
1222
|
+
icon: /* @__PURE__ */ React24.createElement(RotatedIcon, { icon: StartStartIcon, size: "tiny" }),
|
|
1223
|
+
bind: "start-start"
|
|
1173
1224
|
},
|
|
1174
1225
|
{
|
|
1175
|
-
label:
|
|
1176
|
-
icon: /* @__PURE__ */
|
|
1177
|
-
bind: "
|
|
1226
|
+
label: getStartEndLabel(isSiteRtl),
|
|
1227
|
+
icon: /* @__PURE__ */ React24.createElement(RotatedIcon, { icon: StartEndIcon, size: "tiny" }),
|
|
1228
|
+
bind: "start-end"
|
|
1178
1229
|
},
|
|
1179
1230
|
{
|
|
1180
|
-
label:
|
|
1181
|
-
icon: /* @__PURE__ */
|
|
1182
|
-
bind: "
|
|
1231
|
+
label: getEndEndLabel(isSiteRtl),
|
|
1232
|
+
icon: /* @__PURE__ */ React24.createElement(RotatedIcon, { icon: EndEndIcon, size: "tiny" }),
|
|
1233
|
+
bind: "end-end"
|
|
1183
1234
|
},
|
|
1184
1235
|
{
|
|
1185
|
-
label:
|
|
1186
|
-
icon: /* @__PURE__ */
|
|
1187
|
-
bind: "
|
|
1236
|
+
label: getEndStartLabel(isSiteRtl),
|
|
1237
|
+
icon: /* @__PURE__ */ React24.createElement(RotatedIcon, { icon: EndStartIcon, size: "tiny" }),
|
|
1238
|
+
bind: "end-start"
|
|
1188
1239
|
}
|
|
1189
1240
|
];
|
|
1190
1241
|
var BorderRadiusField = () => {
|
|
1191
|
-
|
|
1242
|
+
const { isSiteRtl } = useDirection();
|
|
1243
|
+
return /* @__PURE__ */ React24.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React24.createElement(
|
|
1192
1244
|
EqualUnequalSizesControl2,
|
|
1193
1245
|
{
|
|
1194
|
-
items:
|
|
1195
|
-
label:
|
|
1196
|
-
icon: /* @__PURE__ */
|
|
1246
|
+
items: getCorners(isSiteRtl),
|
|
1247
|
+
label: __9("Border Radius", "elementor"),
|
|
1248
|
+
icon: /* @__PURE__ */ React24.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
1197
1249
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
1198
1250
|
}
|
|
1199
1251
|
));
|
|
1200
1252
|
};
|
|
1201
1253
|
|
|
1202
1254
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1203
|
-
var BorderSection = () => /* @__PURE__ */
|
|
1255
|
+
var BorderSection = () => /* @__PURE__ */ React25.createElement(Stack6, { gap: 1.5 }, /* @__PURE__ */ React25.createElement(BorderRadiusField, null), /* @__PURE__ */ React25.createElement(Divider3, null), /* @__PURE__ */ React25.createElement(BorderField, null));
|
|
1204
1256
|
|
|
1205
1257
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
1206
|
-
import * as
|
|
1258
|
+
import * as React26 from "react";
|
|
1207
1259
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
1208
|
-
import { Stack as
|
|
1260
|
+
import { Stack as Stack7 } from "@elementor/ui";
|
|
1209
1261
|
var EffectsSection = () => {
|
|
1210
|
-
return /* @__PURE__ */
|
|
1262
|
+
return /* @__PURE__ */ React26.createElement(Stack7, { gap: 1.5 }, /* @__PURE__ */ React26.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React26.createElement(BoxShadowRepeaterControl, null)));
|
|
1211
1263
|
};
|
|
1212
1264
|
|
|
1213
1265
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1214
1266
|
import * as React36 from "react";
|
|
1215
1267
|
import { ControlLabel as ControlLabel13 } from "@elementor/editor-controls";
|
|
1216
1268
|
import { useParentElement } from "@elementor/editor-elements";
|
|
1217
|
-
import { Divider as Divider4, Stack as
|
|
1218
|
-
import { __ as
|
|
1269
|
+
import { Divider as Divider4, Stack as Stack13 } from "@elementor/ui";
|
|
1270
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1219
1271
|
|
|
1220
1272
|
// src/hooks/use-computed-style.ts
|
|
1221
1273
|
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
@@ -1251,53 +1303,10 @@ import {
|
|
|
1251
1303
|
LayoutAlignRightIcon,
|
|
1252
1304
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
1253
1305
|
} from "@elementor/icons";
|
|
1254
|
-
import { DirectionProvider, Grid as Grid3, ThemeProvider, withDirection } from "@elementor/ui";
|
|
1255
|
-
import { __ as
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
import { useTheme } from "@elementor/ui";
|
|
1259
|
-
function useDirection() {
|
|
1260
|
-
const theme = useTheme(), extendedWindow = window;
|
|
1261
|
-
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1262
|
-
return { isSiteRtl, isUiRtl };
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1266
|
-
import * as React26 from "react";
|
|
1267
|
-
import { useRef as useRef3 } from "react";
|
|
1268
|
-
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1269
|
-
var CLOCKWISE_ANGLES = {
|
|
1270
|
-
row: 0,
|
|
1271
|
-
column: 90,
|
|
1272
|
-
"row-reverse": 180,
|
|
1273
|
-
"column-reverse": 270
|
|
1274
|
-
};
|
|
1275
|
-
var COUNTER_CLOCKWISE_ANGLES = {
|
|
1276
|
-
row: 0,
|
|
1277
|
-
column: -90,
|
|
1278
|
-
"row-reverse": -180,
|
|
1279
|
-
"column-reverse": -270
|
|
1280
|
-
};
|
|
1281
|
-
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1282
|
-
const rotate = useRef3(useGetTargetAngle(isClockwise, offset));
|
|
1283
|
-
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1284
|
-
return /* @__PURE__ */ React26.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1285
|
-
};
|
|
1286
|
-
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1287
|
-
const [direction] = useStylesField("flex-direction");
|
|
1288
|
-
const isRtl = "rtl" === useTheme2().direction;
|
|
1289
|
-
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1290
|
-
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1291
|
-
const currentAngle = existingRef ? existingRef.current * rotationMultiplier : angleMap[direction?.value || "row"] + offset;
|
|
1292
|
-
const targetAngle = angleMap[direction?.value || "row"] + offset;
|
|
1293
|
-
const diffToTargetAngle = (targetAngle - currentAngle + 360) % 360;
|
|
1294
|
-
const formattedDiff = (diffToTargetAngle + 180) % 360 - 180;
|
|
1295
|
-
return (currentAngle + formattedDiff) * rotationMultiplier;
|
|
1296
|
-
};
|
|
1297
|
-
|
|
1298
|
-
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1299
|
-
var StartIcon = withDirection(LayoutAlignLeftIcon);
|
|
1300
|
-
var EndIcon = withDirection(LayoutAlignRightIcon);
|
|
1306
|
+
import { DirectionProvider, Grid as Grid3, ThemeProvider, withDirection as withDirection2 } from "@elementor/ui";
|
|
1307
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
1308
|
+
var StartIcon = withDirection2(LayoutAlignLeftIcon);
|
|
1309
|
+
var EndIcon = withDirection2(LayoutAlignRightIcon);
|
|
1301
1310
|
var iconProps = {
|
|
1302
1311
|
isClockwise: false,
|
|
1303
1312
|
offset: 90
|
|
@@ -1305,32 +1314,32 @@ var iconProps = {
|
|
|
1305
1314
|
var options = [
|
|
1306
1315
|
{
|
|
1307
1316
|
value: "start",
|
|
1308
|
-
label:
|
|
1317
|
+
label: __10("Start", "elementor"),
|
|
1309
1318
|
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1310
1319
|
showTooltip: true
|
|
1311
1320
|
},
|
|
1312
1321
|
{
|
|
1313
1322
|
value: "center",
|
|
1314
|
-
label:
|
|
1323
|
+
label: __10("Center", "elementor"),
|
|
1315
1324
|
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
1316
1325
|
showTooltip: true
|
|
1317
1326
|
},
|
|
1318
1327
|
{
|
|
1319
1328
|
value: "end",
|
|
1320
|
-
label:
|
|
1329
|
+
label: __10("End", "elementor"),
|
|
1321
1330
|
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1322
1331
|
showTooltip: true
|
|
1323
1332
|
},
|
|
1324
1333
|
{
|
|
1325
1334
|
value: "stretch",
|
|
1326
|
-
label:
|
|
1335
|
+
label: __10("Stretch", "elementor"),
|
|
1327
1336
|
renderContent: ({ size }) => /* @__PURE__ */ React27.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps }),
|
|
1328
1337
|
showTooltip: true
|
|
1329
1338
|
}
|
|
1330
1339
|
];
|
|
1331
1340
|
var AlignItemsField = () => {
|
|
1332
1341
|
const { isSiteRtl } = useDirection();
|
|
1333
|
-
return /* @__PURE__ */ React27.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(ThemeProvider, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React27.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(ControlLabel5, null,
|
|
1342
|
+
return /* @__PURE__ */ React27.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React27.createElement(ThemeProvider, null, /* @__PURE__ */ React27.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React27.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React27.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React27.createElement(ControlLabel5, null, __10("Align items", "elementor"))), /* @__PURE__ */ React27.createElement(Grid3, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React27.createElement(ToggleControl, { options }))))));
|
|
1334
1343
|
};
|
|
1335
1344
|
|
|
1336
1345
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
@@ -1342,10 +1351,10 @@ import {
|
|
|
1342
1351
|
LayoutAlignRightIcon as LayoutAlignRightIcon2,
|
|
1343
1352
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
1344
1353
|
} from "@elementor/icons";
|
|
1345
|
-
import { DirectionProvider as DirectionProvider2, Grid as Grid4, ThemeProvider as ThemeProvider2, withDirection as
|
|
1346
|
-
import { __ as
|
|
1347
|
-
var StartIcon2 =
|
|
1348
|
-
var EndIcon2 =
|
|
1354
|
+
import { DirectionProvider as DirectionProvider2, Grid as Grid4, ThemeProvider as ThemeProvider2, withDirection as withDirection3 } from "@elementor/ui";
|
|
1355
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
1356
|
+
var StartIcon2 = withDirection3(LayoutAlignLeftIcon2);
|
|
1357
|
+
var EndIcon2 = withDirection3(LayoutAlignRightIcon2);
|
|
1349
1358
|
var iconProps2 = {
|
|
1350
1359
|
isClockwise: false,
|
|
1351
1360
|
offset: 90
|
|
@@ -1353,96 +1362,104 @@ var iconProps2 = {
|
|
|
1353
1362
|
var options2 = [
|
|
1354
1363
|
{
|
|
1355
1364
|
value: "start",
|
|
1356
|
-
label:
|
|
1365
|
+
label: __11("Start", "elementor"),
|
|
1357
1366
|
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1358
1367
|
showTooltip: true
|
|
1359
1368
|
},
|
|
1360
1369
|
{
|
|
1361
1370
|
value: "center",
|
|
1362
|
-
label:
|
|
1371
|
+
label: __11("Center", "elementor"),
|
|
1363
1372
|
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
1364
1373
|
showTooltip: true
|
|
1365
1374
|
},
|
|
1366
1375
|
{
|
|
1367
1376
|
value: "end",
|
|
1368
|
-
label:
|
|
1377
|
+
label: __11("End", "elementor"),
|
|
1369
1378
|
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1370
1379
|
showTooltip: true
|
|
1371
1380
|
},
|
|
1372
1381
|
{
|
|
1373
1382
|
value: "stretch",
|
|
1374
|
-
label:
|
|
1383
|
+
label: __11("Stretch", "elementor"),
|
|
1375
1384
|
renderContent: ({ size }) => /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: JustifyIcon2, size, ...iconProps2 }),
|
|
1376
1385
|
showTooltip: true
|
|
1377
1386
|
}
|
|
1378
1387
|
];
|
|
1379
1388
|
var AlignSelfChild = () => {
|
|
1380
1389
|
const { isSiteRtl } = useDirection();
|
|
1381
|
-
return /* @__PURE__ */ React28.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React28.createElement(ThemeProvider2, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React28.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel6, null,
|
|
1390
|
+
return /* @__PURE__ */ React28.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React28.createElement(ThemeProvider2, null, /* @__PURE__ */ React28.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React28.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel6, null, __11("Align self", "elementor"))), /* @__PURE__ */ React28.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React28.createElement(ToggleControl2, { options: options2 }))))));
|
|
1382
1391
|
};
|
|
1383
1392
|
|
|
1384
1393
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1385
1394
|
import * as React29 from "react";
|
|
1386
1395
|
import { ControlLabel as ControlLabel7, ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
1387
|
-
import { Stack as
|
|
1388
|
-
import { __ as
|
|
1396
|
+
import { Stack as Stack8 } from "@elementor/ui";
|
|
1397
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
1389
1398
|
var DisplayField = () => {
|
|
1390
1399
|
const options10 = [
|
|
1391
1400
|
{
|
|
1392
1401
|
value: "block",
|
|
1393
|
-
renderContent: () =>
|
|
1394
|
-
label:
|
|
1402
|
+
renderContent: () => __12("Block", "elementor"),
|
|
1403
|
+
label: __12("Block", "elementor"),
|
|
1404
|
+
showTooltip: true
|
|
1395
1405
|
},
|
|
1396
1406
|
{
|
|
1397
1407
|
value: "flex",
|
|
1398
|
-
renderContent: () =>
|
|
1399
|
-
label:
|
|
1408
|
+
renderContent: () => __12("Flex", "elementor"),
|
|
1409
|
+
label: __12("Flex", "elementor"),
|
|
1410
|
+
showTooltip: true
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
value: "inline-block",
|
|
1414
|
+
renderContent: () => __12("In-blk", "elementor"),
|
|
1415
|
+
label: __12("Inline-block", "elementor"),
|
|
1416
|
+
showTooltip: true
|
|
1400
1417
|
}
|
|
1401
1418
|
];
|
|
1402
|
-
return /* @__PURE__ */ React29.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React29.createElement(
|
|
1419
|
+
return /* @__PURE__ */ React29.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React29.createElement(Stack8, { gap: 1 }, /* @__PURE__ */ React29.createElement(ControlLabel7, null, __12("Display", "elementor")), /* @__PURE__ */ React29.createElement(ToggleControl3, { options: options10, fullWidth: true })));
|
|
1403
1420
|
};
|
|
1404
1421
|
|
|
1405
1422
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1406
1423
|
import * as React30 from "react";
|
|
1407
1424
|
import { ControlLabel as ControlLabel8, ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
1408
1425
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
1409
|
-
import { DirectionProvider as DirectionProvider3, Grid as Grid5, ThemeProvider as ThemeProvider3, withDirection as
|
|
1410
|
-
import { __ as
|
|
1426
|
+
import { DirectionProvider as DirectionProvider3, Grid as Grid5, ThemeProvider as ThemeProvider3, withDirection as withDirection4 } from "@elementor/ui";
|
|
1427
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
1411
1428
|
var options3 = [
|
|
1412
1429
|
{
|
|
1413
1430
|
value: "row",
|
|
1414
|
-
label:
|
|
1431
|
+
label: __13("Row", "elementor"),
|
|
1415
1432
|
renderContent: ({ size }) => {
|
|
1416
|
-
const
|
|
1417
|
-
return /* @__PURE__ */ React30.createElement(
|
|
1433
|
+
const StartIcon5 = withDirection4(ArrowRightIcon);
|
|
1434
|
+
return /* @__PURE__ */ React30.createElement(StartIcon5, { fontSize: size });
|
|
1418
1435
|
},
|
|
1419
1436
|
showTooltip: true
|
|
1420
1437
|
},
|
|
1421
1438
|
{
|
|
1422
1439
|
value: "column",
|
|
1423
|
-
label:
|
|
1440
|
+
label: __13("Column", "elementor"),
|
|
1424
1441
|
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
1425
1442
|
showTooltip: true
|
|
1426
1443
|
},
|
|
1427
1444
|
{
|
|
1428
1445
|
value: "row-reverse",
|
|
1429
|
-
label:
|
|
1446
|
+
label: __13("Reversed row", "elementor"),
|
|
1430
1447
|
renderContent: ({ size }) => {
|
|
1431
|
-
const
|
|
1432
|
-
return /* @__PURE__ */ React30.createElement(
|
|
1448
|
+
const EndIcon5 = withDirection4(ArrowLeftIcon);
|
|
1449
|
+
return /* @__PURE__ */ React30.createElement(EndIcon5, { fontSize: size });
|
|
1433
1450
|
},
|
|
1434
1451
|
showTooltip: true
|
|
1435
1452
|
},
|
|
1436
1453
|
{
|
|
1437
1454
|
value: "column-reverse",
|
|
1438
|
-
label:
|
|
1455
|
+
label: __13("Reversed column", "elementor"),
|
|
1439
1456
|
renderContent: ({ size }) => /* @__PURE__ */ React30.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
1440
1457
|
showTooltip: true
|
|
1441
1458
|
}
|
|
1442
1459
|
];
|
|
1443
1460
|
var FlexDirectionField = () => {
|
|
1444
1461
|
const { isSiteRtl } = useDirection();
|
|
1445
|
-
return /* @__PURE__ */ React30.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(ThemeProvider3, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React30.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(ControlLabel8, null,
|
|
1462
|
+
return /* @__PURE__ */ React30.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React30.createElement(ThemeProvider3, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React30.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React30.createElement(ControlLabel8, null, __13("Direction", "elementor"))), /* @__PURE__ */ React30.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React30.createElement(ToggleControl4, { options: options3 }))))));
|
|
1446
1463
|
};
|
|
1447
1464
|
|
|
1448
1465
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
@@ -1454,8 +1471,8 @@ import {
|
|
|
1454
1471
|
NumberControl
|
|
1455
1472
|
} from "@elementor/editor-controls";
|
|
1456
1473
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
1457
|
-
import { DirectionProvider as DirectionProvider4, Grid as Grid6, Stack as
|
|
1458
|
-
import { __ as
|
|
1474
|
+
import { DirectionProvider as DirectionProvider4, Grid as Grid6, Stack as Stack9, ThemeProvider as ThemeProvider4 } from "@elementor/ui";
|
|
1475
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
1459
1476
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
1460
1477
|
var LAST_DEFAULT_VALUE = 99999;
|
|
1461
1478
|
var FIRST = "first";
|
|
@@ -1468,19 +1485,19 @@ var orderValueMap = {
|
|
|
1468
1485
|
var items = [
|
|
1469
1486
|
{
|
|
1470
1487
|
value: FIRST,
|
|
1471
|
-
label:
|
|
1488
|
+
label: __14("First", "elementor"),
|
|
1472
1489
|
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
1473
1490
|
showTooltip: true
|
|
1474
1491
|
},
|
|
1475
1492
|
{
|
|
1476
1493
|
value: LAST,
|
|
1477
|
-
label:
|
|
1494
|
+
label: __14("Last", "elementor"),
|
|
1478
1495
|
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
1479
1496
|
showTooltip: true
|
|
1480
1497
|
},
|
|
1481
1498
|
{
|
|
1482
1499
|
value: CUSTOM,
|
|
1483
|
-
label:
|
|
1500
|
+
label: __14("Custom", "elementor"),
|
|
1484
1501
|
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(PencilIcon, { fontSize: size }),
|
|
1485
1502
|
showTooltip: true
|
|
1486
1503
|
}
|
|
@@ -1496,7 +1513,7 @@ var FlexOrderField = () => {
|
|
|
1496
1513
|
}
|
|
1497
1514
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1498
1515
|
};
|
|
1499
|
-
return /* @__PURE__ */ React31.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(ThemeProvider4, null, /* @__PURE__ */ React31.createElement(
|
|
1516
|
+
return /* @__PURE__ */ React31.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(ThemeProvider4, null, /* @__PURE__ */ React31.createElement(Stack9, { gap: 2 }, /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel9, null, __14("Order", "elementor"))), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
1500
1517
|
ControlToggleButtonGroup,
|
|
1501
1518
|
{
|
|
1502
1519
|
items,
|
|
@@ -1504,7 +1521,7 @@ var FlexOrderField = () => {
|
|
|
1504
1521
|
onChange: handleToggleButtonChange,
|
|
1505
1522
|
exclusive: true
|
|
1506
1523
|
}
|
|
1507
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */ React31.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel9, null,
|
|
1524
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React31.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React31.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel9, null, __14("Custom order", "elementor"))), /* @__PURE__ */ React31.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(
|
|
1508
1525
|
NumberControl,
|
|
1509
1526
|
{
|
|
1510
1527
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1525,7 +1542,7 @@ var getGroupControlValue = (order) => {
|
|
|
1525
1542
|
|
|
1526
1543
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1527
1544
|
import * as React32 from "react";
|
|
1528
|
-
import { useMemo, useState as useState5 } from "react";
|
|
1545
|
+
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
1529
1546
|
import {
|
|
1530
1547
|
ControlLabel as ControlLabel10,
|
|
1531
1548
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
@@ -1533,25 +1550,25 @@ import {
|
|
|
1533
1550
|
SizeControl as SizeControl2
|
|
1534
1551
|
} from "@elementor/editor-controls";
|
|
1535
1552
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
1536
|
-
import { DirectionProvider as DirectionProvider5, Grid as Grid7, Stack as
|
|
1537
|
-
import { __ as
|
|
1553
|
+
import { DirectionProvider as DirectionProvider5, Grid as Grid7, Stack as Stack10, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
1554
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1538
1555
|
var DEFAULT = 1;
|
|
1539
1556
|
var items2 = [
|
|
1540
1557
|
{
|
|
1541
1558
|
value: "flex-grow",
|
|
1542
|
-
label:
|
|
1559
|
+
label: __15("Grow", "elementor"),
|
|
1543
1560
|
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(ExpandIcon, { fontSize: size }),
|
|
1544
1561
|
showTooltip: true
|
|
1545
1562
|
},
|
|
1546
1563
|
{
|
|
1547
1564
|
value: "flex-shrink",
|
|
1548
|
-
label:
|
|
1565
|
+
label: __15("Shrink", "elementor"),
|
|
1549
1566
|
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(ShrinkIcon, { fontSize: size }),
|
|
1550
1567
|
showTooltip: true
|
|
1551
1568
|
},
|
|
1552
1569
|
{
|
|
1553
1570
|
value: "custom",
|
|
1554
|
-
label:
|
|
1571
|
+
label: __15("Custom", "elementor"),
|
|
1555
1572
|
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(PencilIcon2, { fontSize: size }),
|
|
1556
1573
|
showTooltip: true
|
|
1557
1574
|
}
|
|
@@ -1559,7 +1576,7 @@ var items2 = [
|
|
|
1559
1576
|
var FlexSizeField = () => {
|
|
1560
1577
|
const { isSiteRtl } = useDirection(), [growField, setGrowField] = useStylesField("flex-grow"), [shrinkField, setShrinkField] = useStylesField("flex-shrink"), [basisField, setBasisField] = useStylesField("flex-basis");
|
|
1561
1578
|
const grow = growField?.value || null, shrink = shrinkField?.value || null, basis = basisField?.value || null;
|
|
1562
|
-
const currentGroup =
|
|
1579
|
+
const currentGroup = useMemo2(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = useState5(currentGroup);
|
|
1563
1580
|
const onChangeGroup = (group = null) => {
|
|
1564
1581
|
setActiveGroup(group);
|
|
1565
1582
|
setBasisField(null);
|
|
@@ -1576,7 +1593,7 @@ var FlexSizeField = () => {
|
|
|
1576
1593
|
setGrowField(null);
|
|
1577
1594
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1578
1595
|
};
|
|
1579
|
-
return /* @__PURE__ */ React32.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(ThemeProvider5, null, /* @__PURE__ */ React32.createElement(
|
|
1596
|
+
return /* @__PURE__ */ React32.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(ThemeProvider5, null, /* @__PURE__ */ React32.createElement(Stack10, { gap: 2 }, /* @__PURE__ */ React32.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel10, null, __15("Size", "elementor"))), /* @__PURE__ */ React32.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(
|
|
1580
1597
|
ControlToggleButtonGroup2,
|
|
1581
1598
|
{
|
|
1582
1599
|
value: activeGroup,
|
|
@@ -1586,7 +1603,7 @@ var FlexSizeField = () => {
|
|
|
1586
1603
|
}
|
|
1587
1604
|
))), "custom" === activeGroup && /* @__PURE__ */ React32.createElement(FlexCustomField, null))));
|
|
1588
1605
|
};
|
|
1589
|
-
var FlexCustomField = () => /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React32.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel10, null,
|
|
1606
|
+
var FlexCustomField = () => /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React32.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel10, null, __15("Grow", "elementor"))), /* @__PURE__ */ React32.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React32.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel10, null, __15("Shrink", "elementor"))), /* @__PURE__ */ React32.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React32.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React32.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel10, null, __15("Basis", "elementor"))), /* @__PURE__ */ React32.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React32.createElement(SizeControl2, null)))));
|
|
1590
1607
|
var getActiveGroup = ({
|
|
1591
1608
|
grow,
|
|
1592
1609
|
shrink,
|
|
@@ -1610,10 +1627,10 @@ var getActiveGroup = ({
|
|
|
1610
1627
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1611
1628
|
import * as React33 from "react";
|
|
1612
1629
|
import { GapControl } from "@elementor/editor-controls";
|
|
1613
|
-
import { Stack as
|
|
1614
|
-
import { __ as
|
|
1630
|
+
import { Stack as Stack11 } from "@elementor/ui";
|
|
1631
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1615
1632
|
var GapControlField = () => {
|
|
1616
|
-
return /* @__PURE__ */ React33.createElement(
|
|
1633
|
+
return /* @__PURE__ */ React33.createElement(Stack11, { gap: 1 }, /* @__PURE__ */ React33.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React33.createElement(GapControl, { label: __16("Gaps", "elementor") })));
|
|
1617
1634
|
};
|
|
1618
1635
|
|
|
1619
1636
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
@@ -1627,10 +1644,10 @@ import {
|
|
|
1627
1644
|
JustifySpaceBetweenVerticalIcon as BetweenIcon,
|
|
1628
1645
|
JustifyTopIcon
|
|
1629
1646
|
} from "@elementor/icons";
|
|
1630
|
-
import { DirectionProvider as DirectionProvider6, Stack as
|
|
1631
|
-
import { __ as
|
|
1632
|
-
var StartIcon3 =
|
|
1633
|
-
var EndIcon3 =
|
|
1647
|
+
import { DirectionProvider as DirectionProvider6, Stack as Stack12, ThemeProvider as ThemeProvider6, withDirection as withDirection5 } from "@elementor/ui";
|
|
1648
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1649
|
+
var StartIcon3 = withDirection5(JustifyTopIcon);
|
|
1650
|
+
var EndIcon3 = withDirection5(JustifyBottomIcon);
|
|
1634
1651
|
var iconProps3 = {
|
|
1635
1652
|
isClockwise: true,
|
|
1636
1653
|
offset: -90
|
|
@@ -1638,44 +1655,44 @@ var iconProps3 = {
|
|
|
1638
1655
|
var options4 = [
|
|
1639
1656
|
{
|
|
1640
1657
|
value: "start",
|
|
1641
|
-
label:
|
|
1658
|
+
label: __17("Start", "elementor"),
|
|
1642
1659
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1643
1660
|
showTooltip: true
|
|
1644
1661
|
},
|
|
1645
1662
|
{
|
|
1646
1663
|
value: "center",
|
|
1647
|
-
label:
|
|
1664
|
+
label: __17("Center", "elementor"),
|
|
1648
1665
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: CenterIcon3, size, ...iconProps3 }),
|
|
1649
1666
|
showTooltip: true
|
|
1650
1667
|
},
|
|
1651
1668
|
{
|
|
1652
1669
|
value: "end",
|
|
1653
|
-
label:
|
|
1670
|
+
label: __17("End", "elementor"),
|
|
1654
1671
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1655
1672
|
showTooltip: true
|
|
1656
1673
|
},
|
|
1657
1674
|
{
|
|
1658
1675
|
value: "space-between",
|
|
1659
|
-
label:
|
|
1676
|
+
label: __17("Space between", "elementor"),
|
|
1660
1677
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps3 }),
|
|
1661
1678
|
showTooltip: true
|
|
1662
1679
|
},
|
|
1663
1680
|
{
|
|
1664
1681
|
value: "space-around",
|
|
1665
|
-
label:
|
|
1682
|
+
label: __17("Space around", "elementor"),
|
|
1666
1683
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps3 }),
|
|
1667
1684
|
showTooltip: true
|
|
1668
1685
|
},
|
|
1669
1686
|
{
|
|
1670
1687
|
value: "space-evenly",
|
|
1671
|
-
label:
|
|
1688
|
+
label: __17("Space evenly", "elementor"),
|
|
1672
1689
|
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps3 }),
|
|
1673
1690
|
showTooltip: true
|
|
1674
1691
|
}
|
|
1675
1692
|
];
|
|
1676
1693
|
var JustifyContentField = () => {
|
|
1677
1694
|
const { isSiteRtl } = useDirection();
|
|
1678
|
-
return /* @__PURE__ */ React34.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider6, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React34.createElement(
|
|
1695
|
+
return /* @__PURE__ */ React34.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider6, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React34.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React34.createElement(ControlLabel11, null, __17("Justify content", "elementor")), /* @__PURE__ */ React34.createElement(ToggleControl5, { options: options4, fullWidth: true })))));
|
|
1679
1696
|
};
|
|
1680
1697
|
|
|
1681
1698
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
@@ -1683,30 +1700,30 @@ import * as React35 from "react";
|
|
|
1683
1700
|
import { ControlLabel as ControlLabel12, ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
1684
1701
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
1685
1702
|
import { DirectionProvider as DirectionProvider7, Grid as Grid8, ThemeProvider as ThemeProvider7 } from "@elementor/ui";
|
|
1686
|
-
import { __ as
|
|
1703
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1687
1704
|
var options5 = [
|
|
1688
1705
|
{
|
|
1689
1706
|
value: "nowrap",
|
|
1690
|
-
label:
|
|
1707
|
+
label: __18("No wrap", "elementor"),
|
|
1691
1708
|
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
1692
1709
|
showTooltip: true
|
|
1693
1710
|
},
|
|
1694
1711
|
{
|
|
1695
1712
|
value: "wrap",
|
|
1696
|
-
label:
|
|
1713
|
+
label: __18("Wrap", "elementor"),
|
|
1697
1714
|
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowBackIcon, { fontSize: size }),
|
|
1698
1715
|
showTooltip: true
|
|
1699
1716
|
},
|
|
1700
1717
|
{
|
|
1701
1718
|
value: "wrap-reverse",
|
|
1702
|
-
label:
|
|
1719
|
+
label: __18("Reversed wrap", "elementor"),
|
|
1703
1720
|
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
1704
1721
|
showTooltip: true
|
|
1705
1722
|
}
|
|
1706
1723
|
];
|
|
1707
1724
|
var WrapField = () => {
|
|
1708
1725
|
const { isSiteRtl } = useDirection();
|
|
1709
|
-
return /* @__PURE__ */ React35.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(ThemeProvider7, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React35.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel12, null,
|
|
1726
|
+
return /* @__PURE__ */ React35.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(ThemeProvider7, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React35.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel12, null, __18("Wrap", "elementor"))), /* @__PURE__ */ React35.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React35.createElement(ToggleControl6, { options: options5 }))))));
|
|
1710
1727
|
};
|
|
1711
1728
|
|
|
1712
1729
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -1715,58 +1732,22 @@ var LayoutSection = () => {
|
|
|
1715
1732
|
const { element } = useElement();
|
|
1716
1733
|
const parent = useParentElement(element.id);
|
|
1717
1734
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
1718
|
-
return /* @__PURE__ */ React36.createElement(
|
|
1735
|
+
return /* @__PURE__ */ React36.createElement(Stack13, { gap: 2 }, /* @__PURE__ */ React36.createElement(DisplayField, null), "flex" === display?.value && /* @__PURE__ */ React36.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React36.createElement(FlexChildFields, null));
|
|
1719
1736
|
};
|
|
1720
1737
|
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(Divider4, null), /* @__PURE__ */ React36.createElement(GapControlField, null), /* @__PURE__ */ React36.createElement(WrapField, null));
|
|
1721
|
-
var FlexChildFields = () => /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(Divider4, null), /* @__PURE__ */ React36.createElement(ControlLabel13, null,
|
|
1738
|
+
var FlexChildFields = () => /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(Divider4, null), /* @__PURE__ */ React36.createElement(ControlLabel13, null, __19("Flex child", "elementor")), /* @__PURE__ */ React36.createElement(AlignSelfChild, null), /* @__PURE__ */ React36.createElement(FlexOrderField, null), /* @__PURE__ */ React36.createElement(FlexSizeField, null));
|
|
1722
1739
|
|
|
1723
1740
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1724
1741
|
import * as React40 from "react";
|
|
1725
|
-
import {
|
|
1726
|
-
|
|
1727
|
-
// src/hooks/use-session-storage.ts
|
|
1728
|
-
import { useEffect as useEffect3, useState as useState6 } from "react";
|
|
1729
|
-
import { getSessionStorageItem, removeSessionStorageItem, setSessionStorageItem } from "@elementor/utils";
|
|
1730
|
-
var useSessionStorage = (key) => {
|
|
1731
|
-
const prefixedKey = `elementor/${key}`;
|
|
1732
|
-
const [value, setValue] = useState6();
|
|
1733
|
-
useEffect3(() => {
|
|
1734
|
-
return subscribeToSessionStorage(prefixedKey, (newValue) => {
|
|
1735
|
-
setValue(newValue ?? null);
|
|
1736
|
-
});
|
|
1737
|
-
}, [prefixedKey]);
|
|
1738
|
-
const saveValue = (newValue) => {
|
|
1739
|
-
setSessionStorageItem(prefixedKey, newValue);
|
|
1740
|
-
};
|
|
1741
|
-
const removeValue = () => {
|
|
1742
|
-
removeSessionStorageItem(prefixedKey);
|
|
1743
|
-
};
|
|
1744
|
-
return [value, saveValue, removeValue];
|
|
1745
|
-
};
|
|
1746
|
-
var subscribeToSessionStorage = (key, subscriber) => {
|
|
1747
|
-
subscriber(getSessionStorageItem(key));
|
|
1748
|
-
const abortController = new AbortController();
|
|
1749
|
-
window.addEventListener(
|
|
1750
|
-
"storage",
|
|
1751
|
-
(e) => {
|
|
1752
|
-
if (e.key !== key || e.storageArea !== sessionStorage) {
|
|
1753
|
-
return;
|
|
1754
|
-
}
|
|
1755
|
-
subscriber(getSessionStorageItem(key));
|
|
1756
|
-
},
|
|
1757
|
-
{ signal: abortController.signal }
|
|
1758
|
-
);
|
|
1759
|
-
return () => {
|
|
1760
|
-
abortController.abort();
|
|
1761
|
-
};
|
|
1762
|
-
};
|
|
1742
|
+
import { useSessionStorage } from "@elementor/session";
|
|
1743
|
+
import { Stack as Stack15 } from "@elementor/ui";
|
|
1763
1744
|
|
|
1764
1745
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1765
1746
|
import * as React37 from "react";
|
|
1766
1747
|
import { ControlLabel as ControlLabel14, SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
1767
1748
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
1768
|
-
import { Grid as Grid9, Stack as
|
|
1769
|
-
import { __ as
|
|
1749
|
+
import { Grid as Grid9, Stack as Stack14 } from "@elementor/ui";
|
|
1750
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1770
1751
|
var sideIcons = {
|
|
1771
1752
|
left: /* @__PURE__ */ React37.createElement(SideLeftIcon2, { fontSize: "tiny" }),
|
|
1772
1753
|
right: /* @__PURE__ */ React37.createElement(SideRightIcon2, { fontSize: "tiny" }),
|
|
@@ -1774,7 +1755,7 @@ var sideIcons = {
|
|
|
1774
1755
|
bottom: /* @__PURE__ */ React37.createElement(SideBottomIcon2, { fontSize: "tiny" })
|
|
1775
1756
|
};
|
|
1776
1757
|
var DimensionsField = () => {
|
|
1777
|
-
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(
|
|
1758
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(DimensionField, { side: "top", label: __20("Top", "elementor") }), /* @__PURE__ */ React37.createElement(DimensionField, { side: "right", label: __20("Right", "elementor") })), /* @__PURE__ */ React37.createElement(Stack14, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(DimensionField, { side: "bottom", label: __20("Bottom", "elementor") }), /* @__PURE__ */ React37.createElement(DimensionField, { side: "left", label: __20("Left", "elementor") })));
|
|
1778
1759
|
};
|
|
1779
1760
|
var DimensionField = ({ side, label }) => {
|
|
1780
1761
|
return /* @__PURE__ */ React37.createElement(Grid9, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React37.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(ControlLabel14, null, label)), /* @__PURE__ */ React37.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React37.createElement(StylesField, { bind: side }, /* @__PURE__ */ React37.createElement(SizeControl3, { startIcon: sideIcons[side] }))));
|
|
@@ -1784,25 +1765,25 @@ var DimensionField = ({ side, label }) => {
|
|
|
1784
1765
|
import * as React38 from "react";
|
|
1785
1766
|
import { ControlLabel as ControlLabel15, SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
1786
1767
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
1787
|
-
import { __ as
|
|
1768
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1788
1769
|
var positionOptions = [
|
|
1789
|
-
{ label:
|
|
1790
|
-
{ label:
|
|
1791
|
-
{ label:
|
|
1792
|
-
{ label:
|
|
1793
|
-
{ label:
|
|
1770
|
+
{ label: __21("Static", "elementor"), value: "static" },
|
|
1771
|
+
{ label: __21("Relative", "elementor"), value: "relative" },
|
|
1772
|
+
{ label: __21("Absolute", "elementor"), value: "absolute" },
|
|
1773
|
+
{ label: __21("Fixed", "elementor"), value: "fixed" },
|
|
1774
|
+
{ label: __21("Sticky", "elementor"), value: "sticky" }
|
|
1794
1775
|
];
|
|
1795
1776
|
var PositionField = ({ onChange }) => {
|
|
1796
|
-
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React38.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel15, null,
|
|
1777
|
+
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React38.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel15, null, __21("Position", "elementor"))), /* @__PURE__ */ React38.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(SelectControl3, { options: positionOptions, onChange }))));
|
|
1797
1778
|
};
|
|
1798
1779
|
|
|
1799
1780
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1800
1781
|
import * as React39 from "react";
|
|
1801
1782
|
import { ControlLabel as ControlLabel16, NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
1802
1783
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
1803
|
-
import { __ as
|
|
1784
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1804
1785
|
var ZIndexField = () => {
|
|
1805
|
-
return /* @__PURE__ */ React39.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React39.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel16, null,
|
|
1786
|
+
return /* @__PURE__ */ React39.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React39.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel16, null, __22("Z-Index", "elementor"))), /* @__PURE__ */ React39.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(NumberControl3, null))));
|
|
1806
1787
|
};
|
|
1807
1788
|
|
|
1808
1789
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1834,7 +1815,7 @@ var PositionSection = () => {
|
|
|
1834
1815
|
}
|
|
1835
1816
|
};
|
|
1836
1817
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
1837
|
-
return /* @__PURE__ */ React40.createElement(
|
|
1818
|
+
return /* @__PURE__ */ React40.createElement(Stack15, { gap: 1.5 }, /* @__PURE__ */ React40.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(DimensionsField, null), /* @__PURE__ */ React40.createElement(ZIndexField, null)) : null);
|
|
1838
1819
|
};
|
|
1839
1820
|
var usePersistDimensions = () => {
|
|
1840
1821
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -1846,42 +1827,42 @@ var usePersistDimensions = () => {
|
|
|
1846
1827
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1847
1828
|
import * as React42 from "react";
|
|
1848
1829
|
import { ControlLabel as ControlLabel18, SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
1849
|
-
import { Divider as Divider5, Grid as Grid13, Stack as
|
|
1850
|
-
import { __ as
|
|
1830
|
+
import { Divider as Divider5, Grid as Grid13, Stack as Stack16 } from "@elementor/ui";
|
|
1831
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1851
1832
|
|
|
1852
1833
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1853
1834
|
import * as React41 from "react";
|
|
1854
1835
|
import { ControlLabel as ControlLabel17, ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
1855
1836
|
import { ExpandBottomIcon, EyeIcon, EyeOffIcon } from "@elementor/icons";
|
|
1856
1837
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
1857
|
-
import { __ as
|
|
1838
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1858
1839
|
var options6 = [
|
|
1859
1840
|
{
|
|
1860
1841
|
value: "visible",
|
|
1861
|
-
label:
|
|
1842
|
+
label: __23("Visible", "elementor"),
|
|
1862
1843
|
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(EyeIcon, { fontSize: size }),
|
|
1863
1844
|
showTooltip: true
|
|
1864
1845
|
},
|
|
1865
1846
|
{
|
|
1866
1847
|
value: "hidden",
|
|
1867
|
-
label:
|
|
1848
|
+
label: __23("Hidden", "elementor"),
|
|
1868
1849
|
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(EyeOffIcon, { fontSize: size }),
|
|
1869
1850
|
showTooltip: true
|
|
1870
1851
|
},
|
|
1871
1852
|
{
|
|
1872
1853
|
value: "auto",
|
|
1873
|
-
label:
|
|
1854
|
+
label: __23("Auto", "elementor"),
|
|
1874
1855
|
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(ExpandBottomIcon, { fontSize: size }),
|
|
1875
1856
|
showTooltip: true
|
|
1876
1857
|
}
|
|
1877
1858
|
];
|
|
1878
1859
|
var OverflowField = () => {
|
|
1879
|
-
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React41.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel17, null,
|
|
1860
|
+
return /* @__PURE__ */ React41.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React41.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel17, null, __23("Overflow", "elementor"))), /* @__PURE__ */ React41.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(ToggleControl7, { options: options6 }))));
|
|
1880
1861
|
};
|
|
1881
1862
|
|
|
1882
1863
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1883
1864
|
var SizeSection = () => {
|
|
1884
|
-
return /* @__PURE__ */ React42.createElement(
|
|
1865
|
+
return /* @__PURE__ */ React42.createElement(Stack16, { gap: 1.5 }, /* @__PURE__ */ React42.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "width", label: __24("Width", "elementor") })), /* @__PURE__ */ React42.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "height", label: __24("Height", "elementor") }))), /* @__PURE__ */ React42.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "min-width", label: __24("Min. Width", "elementor") })), /* @__PURE__ */ React42.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "min-height", label: __24("Min. Height", "elementor") }))), /* @__PURE__ */ React42.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "max-width", label: __24("Max. Width", "elementor") })), /* @__PURE__ */ React42.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(SizeField, { bind: "max-height", label: __24("Max. Height", "elementor") }))), /* @__PURE__ */ React42.createElement(Divider5, null), /* @__PURE__ */ React42.createElement(Stack16, null, /* @__PURE__ */ React42.createElement(OverflowField, null)));
|
|
1885
1866
|
};
|
|
1886
1867
|
var SizeField = ({ label, bind }) => {
|
|
1887
1868
|
return /* @__PURE__ */ React42.createElement(StylesField, { bind }, /* @__PURE__ */ React42.createElement(Grid13, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React42.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(ControlLabel18, null, label)), /* @__PURE__ */ React42.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(SizeControl4, null))));
|
|
@@ -1890,27 +1871,27 @@ var SizeField = ({ label, bind }) => {
|
|
|
1890
1871
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1891
1872
|
import * as React43 from "react";
|
|
1892
1873
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
1893
|
-
import { Divider as Divider6, Stack as
|
|
1894
|
-
import { __ as
|
|
1874
|
+
import { Divider as Divider6, Stack as Stack17 } from "@elementor/ui";
|
|
1875
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1895
1876
|
var SpacingSection = () => {
|
|
1896
|
-
return /* @__PURE__ */ React43.createElement(
|
|
1877
|
+
return /* @__PURE__ */ React43.createElement(Stack17, { gap: 1.5 }, /* @__PURE__ */ React43.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React43.createElement(LinkedDimensionsControl, { label: __25("Padding", "elementor") })), /* @__PURE__ */ React43.createElement(Divider6, null), /* @__PURE__ */ React43.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React43.createElement(LinkedDimensionsControl, { label: __25("Margin", "elementor") })));
|
|
1897
1878
|
};
|
|
1898
1879
|
|
|
1899
1880
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1900
1881
|
import * as React57 from "react";
|
|
1901
|
-
import { Divider as Divider7, Stack as
|
|
1882
|
+
import { Divider as Divider7, Stack as Stack19 } from "@elementor/ui";
|
|
1902
1883
|
|
|
1903
1884
|
// src/components/collapsible-content.tsx
|
|
1904
1885
|
import * as React44 from "react";
|
|
1905
|
-
import { useState as
|
|
1906
|
-
import { Button, Collapse as Collapse3, Stack as
|
|
1907
|
-
import { __ as
|
|
1886
|
+
import { useState as useState6 } from "react";
|
|
1887
|
+
import { Button, Collapse as Collapse3, Stack as Stack18 } from "@elementor/ui";
|
|
1888
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1908
1889
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
1909
|
-
const [open, setOpen] =
|
|
1890
|
+
const [open, setOpen] = useState6(defaultOpen);
|
|
1910
1891
|
const handleToggle = () => {
|
|
1911
1892
|
setOpen((prevOpen) => !prevOpen);
|
|
1912
1893
|
};
|
|
1913
|
-
return /* @__PURE__ */ React44.createElement(
|
|
1894
|
+
return /* @__PURE__ */ React44.createElement(Stack18, { sx: { py: 0.5 } }, /* @__PURE__ */ React44.createElement(
|
|
1914
1895
|
Button,
|
|
1915
1896
|
{
|
|
1916
1897
|
fullWidth: true,
|
|
@@ -1920,7 +1901,7 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1920
1901
|
onClick: handleToggle,
|
|
1921
1902
|
endIcon: /* @__PURE__ */ React44.createElement(CollapseIcon, { open })
|
|
1922
1903
|
},
|
|
1923
|
-
open ?
|
|
1904
|
+
open ? __26("Show less", "elementor") : __26("Show more", "elementor")
|
|
1924
1905
|
), /* @__PURE__ */ React44.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1925
1906
|
};
|
|
1926
1907
|
|
|
@@ -1928,7 +1909,7 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1928
1909
|
import * as React45 from "react";
|
|
1929
1910
|
import { ControlLabel as ControlLabel19, FontFamilyControl } from "@elementor/editor-controls";
|
|
1930
1911
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
1931
|
-
import { __ as
|
|
1912
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1932
1913
|
|
|
1933
1914
|
// src/sync/get-elementor-config.ts
|
|
1934
1915
|
var getElementorConfig = () => {
|
|
@@ -1942,7 +1923,7 @@ var FontFamilyField = () => {
|
|
|
1942
1923
|
if (!fontFamilies) {
|
|
1943
1924
|
return null;
|
|
1944
1925
|
}
|
|
1945
|
-
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React45.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel19, null,
|
|
1926
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React45.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel19, null, __27("Font Family", "elementor"))), /* @__PURE__ */ React45.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(FontFamilyControl, { fontFamilies }))));
|
|
1946
1927
|
};
|
|
1947
1928
|
var getFontFamilies = () => {
|
|
1948
1929
|
const { controls } = getElementorConfig();
|
|
@@ -1957,84 +1938,94 @@ var getFontFamilies = () => {
|
|
|
1957
1938
|
import * as React46 from "react";
|
|
1958
1939
|
import { ControlLabel as ControlLabel20, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
1959
1940
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
1960
|
-
import { __ as
|
|
1941
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1961
1942
|
var FontSizeField = () => {
|
|
1962
|
-
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React46.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel20, null,
|
|
1943
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React46.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel20, null, __28("Font Size", "elementor"))), /* @__PURE__ */ React46.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeControl5, null))));
|
|
1963
1944
|
};
|
|
1964
1945
|
|
|
1965
1946
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
1966
1947
|
import * as React47 from "react";
|
|
1967
1948
|
import { ControlLabel as ControlLabel21, SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
1968
1949
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
1969
|
-
import { __ as
|
|
1950
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
1970
1951
|
var fontWeightOptions = [
|
|
1971
|
-
{ label:
|
|
1972
|
-
{ label:
|
|
1973
|
-
{ label:
|
|
1974
|
-
{ label:
|
|
1975
|
-
{ label:
|
|
1952
|
+
{ value: "100", label: __29("100 - Thin", "elementor") },
|
|
1953
|
+
{ value: "200", label: __29("200 - Extra Light", "elementor") },
|
|
1954
|
+
{ value: "300", label: __29("300 - Light", "elementor") },
|
|
1955
|
+
{ value: "400", label: __29("400 - Normal", "elementor") },
|
|
1956
|
+
{ value: "500", label: __29("500 - Medium", "elementor") },
|
|
1957
|
+
{ value: "600", label: __29("600 - Semi Bold", "elementor") },
|
|
1958
|
+
{ value: "700", label: __29("700 - Bold", "elementor") },
|
|
1959
|
+
{ value: "800", label: __29("800 - Extra Bold", "elementor") },
|
|
1960
|
+
{ value: "900", label: __29("900 - Black", "elementor") }
|
|
1976
1961
|
];
|
|
1977
1962
|
var FontWeightField = () => {
|
|
1978
|
-
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React47.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel21, null,
|
|
1963
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React47.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel21, null, __29("Font Weight", "elementor"))), /* @__PURE__ */ React47.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(SelectControl4, { options: fontWeightOptions }))));
|
|
1979
1964
|
};
|
|
1980
1965
|
|
|
1981
1966
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
1982
1967
|
import * as React48 from "react";
|
|
1983
1968
|
import { ControlLabel as ControlLabel22, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
1984
1969
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
1985
|
-
import { __ as
|
|
1970
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
1986
1971
|
var LetterSpacingField = () => {
|
|
1987
|
-
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React48.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel22, null,
|
|
1972
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React48.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React48.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(ControlLabel22, null, __30("Letter Spacing", "elementor"))), /* @__PURE__ */ React48.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React48.createElement(SizeControl6, null))));
|
|
1988
1973
|
};
|
|
1989
1974
|
|
|
1990
1975
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
1991
1976
|
import * as React49 from "react";
|
|
1992
1977
|
import { ControlLabel as ControlLabel23, SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
1993
1978
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
1994
|
-
import { __ as
|
|
1979
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
1995
1980
|
var LineHeightField = () => {
|
|
1996
|
-
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React49.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel23, null,
|
|
1981
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React49.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel23, null, __31("Line Height", "elementor"))), /* @__PURE__ */ React49.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(SizeControl7, null))));
|
|
1997
1982
|
};
|
|
1998
1983
|
|
|
1999
1984
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
2000
1985
|
import * as React50 from "react";
|
|
2001
1986
|
import { ControlLabel as ControlLabel24, ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
2002
1987
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
2003
|
-
import { Grid as Grid19 } from "@elementor/ui";
|
|
2004
|
-
import { __ as
|
|
1988
|
+
import { Grid as Grid19, withDirection as withDirection6 } from "@elementor/ui";
|
|
1989
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
1990
|
+
var StartIcon4 = withDirection6(AlignLeftIcon);
|
|
1991
|
+
var EndIcon4 = withDirection6(AlignRightIcon);
|
|
2005
1992
|
var options7 = [
|
|
2006
1993
|
{
|
|
2007
|
-
value: "
|
|
2008
|
-
label:
|
|
2009
|
-
renderContent: (
|
|
1994
|
+
value: "start",
|
|
1995
|
+
label: __32("Start", "elementor"),
|
|
1996
|
+
renderContent: () => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: StartIcon4, size: "tiny" }),
|
|
1997
|
+
showTooltip: true
|
|
2010
1998
|
},
|
|
2011
1999
|
{
|
|
2012
2000
|
value: "center",
|
|
2013
|
-
label:
|
|
2014
|
-
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(AlignCenterIcon, { fontSize: size })
|
|
2001
|
+
label: __32("Center", "elementor"),
|
|
2002
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(AlignCenterIcon, { fontSize: size }),
|
|
2003
|
+
showTooltip: true
|
|
2015
2004
|
},
|
|
2016
2005
|
{
|
|
2017
|
-
value: "
|
|
2018
|
-
label:
|
|
2019
|
-
renderContent: (
|
|
2006
|
+
value: "end",
|
|
2007
|
+
label: __32("End", "elementor"),
|
|
2008
|
+
renderContent: () => /* @__PURE__ */ React50.createElement(RotatedIcon, { icon: EndIcon4, size: "tiny" }),
|
|
2009
|
+
showTooltip: true
|
|
2020
2010
|
},
|
|
2021
2011
|
{
|
|
2022
2012
|
value: "justify",
|
|
2023
|
-
label:
|
|
2024
|
-
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(AlignJustifiedIcon, { fontSize: size })
|
|
2013
|
+
label: __32("Justify", "elementor"),
|
|
2014
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
2015
|
+
showTooltip: true
|
|
2025
2016
|
}
|
|
2026
2017
|
];
|
|
2027
2018
|
var TextAlignmentField = () => {
|
|
2028
|
-
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React50.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel24, null,
|
|
2019
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React50.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel24, null, __32("Alignment", "elementor"))), /* @__PURE__ */ React50.createElement(Grid19, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React50.createElement(ToggleControl8, { options: options7 }))));
|
|
2029
2020
|
};
|
|
2030
2021
|
|
|
2031
2022
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2032
2023
|
import * as React51 from "react";
|
|
2033
2024
|
import { ColorControl as ColorControl2, ControlLabel as ControlLabel25 } from "@elementor/editor-controls";
|
|
2034
2025
|
import { Grid as Grid20 } from "@elementor/ui";
|
|
2035
|
-
import { __ as
|
|
2026
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
2036
2027
|
var TextColorField = () => {
|
|
2037
|
-
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React51.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel25, null,
|
|
2028
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React51.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel25, null, __33("Text Color", "elementor"))), /* @__PURE__ */ React51.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ColorControl2, null))));
|
|
2038
2029
|
};
|
|
2039
2030
|
|
|
2040
2031
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
@@ -2042,27 +2033,27 @@ import * as React52 from "react";
|
|
|
2042
2033
|
import { ControlLabel as ControlLabel26, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
2043
2034
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
2044
2035
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
2045
|
-
import { __ as
|
|
2036
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
2046
2037
|
var options8 = [
|
|
2047
2038
|
{
|
|
2048
2039
|
value: "ltr",
|
|
2049
|
-
label:
|
|
2040
|
+
label: __34("Left to Right", "elementor"),
|
|
2050
2041
|
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(TextDirectionLtrIcon, { fontSize: size })
|
|
2051
2042
|
},
|
|
2052
2043
|
{
|
|
2053
2044
|
value: "rtl",
|
|
2054
|
-
label:
|
|
2045
|
+
label: __34("Right to Left", "elementor"),
|
|
2055
2046
|
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(TextDirectionRtlIcon, { fontSize: size })
|
|
2056
2047
|
}
|
|
2057
2048
|
];
|
|
2058
2049
|
var TextDirectionField = () => {
|
|
2059
|
-
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React52.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel26, null,
|
|
2050
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React52.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel26, null, __34("Direction", "elementor"))), /* @__PURE__ */ React52.createElement(Grid21, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React52.createElement(ToggleControl9, { options: options8 }))));
|
|
2060
2051
|
};
|
|
2061
2052
|
|
|
2062
2053
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2063
2054
|
import * as React53 from "react";
|
|
2064
2055
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
2065
|
-
import { __ as
|
|
2056
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
2066
2057
|
var initTextStroke = {
|
|
2067
2058
|
$$type: "stroke",
|
|
2068
2059
|
value: {
|
|
@@ -2080,7 +2071,7 @@ var initTextStroke = {
|
|
|
2080
2071
|
}
|
|
2081
2072
|
};
|
|
2082
2073
|
var TextStrokeField = () => {
|
|
2083
|
-
const [textStroke, setTextStroke] = useStylesField("
|
|
2074
|
+
const [textStroke, setTextStroke] = useStylesField("stroke");
|
|
2084
2075
|
const addTextStroke = () => {
|
|
2085
2076
|
setTextStroke(initTextStroke);
|
|
2086
2077
|
};
|
|
@@ -2091,12 +2082,12 @@ var TextStrokeField = () => {
|
|
|
2091
2082
|
return /* @__PURE__ */ React53.createElement(
|
|
2092
2083
|
AddOrRemoveContent,
|
|
2093
2084
|
{
|
|
2094
|
-
label:
|
|
2085
|
+
label: __35("Text Stroke", "elementor"),
|
|
2095
2086
|
isAdded: hasTextStroke,
|
|
2096
2087
|
onAdd: addTextStroke,
|
|
2097
2088
|
onRemove: removeTextStroke
|
|
2098
2089
|
},
|
|
2099
|
-
/* @__PURE__ */ React53.createElement(StylesField, { bind: "
|
|
2090
|
+
/* @__PURE__ */ React53.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React53.createElement(StrokeControl, null))
|
|
2100
2091
|
);
|
|
2101
2092
|
};
|
|
2102
2093
|
|
|
@@ -2105,7 +2096,7 @@ import * as React54 from "react";
|
|
|
2105
2096
|
import { ControlLabel as ControlLabel27 } from "@elementor/editor-controls";
|
|
2106
2097
|
import { ItalicIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
2107
2098
|
import { Grid as Grid22, ToggleButton as ToggleButtonBase, ToggleButtonGroup } from "@elementor/ui";
|
|
2108
|
-
import { __ as
|
|
2099
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
2109
2100
|
var buttonSize = "tiny";
|
|
2110
2101
|
var TextStyleField = () => {
|
|
2111
2102
|
const [fontStyle, setFontStyle] = useStylesField("font-style");
|
|
@@ -2129,7 +2120,7 @@ var TextStyleField = () => {
|
|
|
2129
2120
|
value: newValue
|
|
2130
2121
|
});
|
|
2131
2122
|
};
|
|
2132
|
-
return /* @__PURE__ */ React54.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel27, null,
|
|
2123
|
+
return /* @__PURE__ */ React54.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel27, null, __36("Style", "elementor"))), /* @__PURE__ */ React54.createElement(Grid22, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React54.createElement(ToggleButtonGroup, { value: formats }, /* @__PURE__ */ React54.createElement(
|
|
2133
2124
|
ToggleButton,
|
|
2134
2125
|
{
|
|
2135
2126
|
value: "italic",
|
|
@@ -2186,40 +2177,49 @@ var ToggleButton = ({ onChange, ...props }) => {
|
|
|
2186
2177
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2187
2178
|
import * as React55 from "react";
|
|
2188
2179
|
import { ControlLabel as ControlLabel28, ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
2189
|
-
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon } from "@elementor/icons";
|
|
2180
|
+
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
2190
2181
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
2191
|
-
import { __ as
|
|
2182
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
2192
2183
|
var options9 = [
|
|
2184
|
+
{
|
|
2185
|
+
value: "none",
|
|
2186
|
+
label: __37("None", "elementor"),
|
|
2187
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(MinusIcon2, { fontSize: size }),
|
|
2188
|
+
showTooltip: true
|
|
2189
|
+
},
|
|
2193
2190
|
{
|
|
2194
2191
|
value: "capitalize",
|
|
2195
|
-
label:
|
|
2196
|
-
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(LetterCaseIcon, { fontSize: size })
|
|
2192
|
+
label: __37("Capitalize", "elementor"),
|
|
2193
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(LetterCaseIcon, { fontSize: size }),
|
|
2194
|
+
showTooltip: true
|
|
2197
2195
|
},
|
|
2198
2196
|
{
|
|
2199
2197
|
value: "uppercase",
|
|
2200
|
-
label:
|
|
2201
|
-
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(LetterCaseUpperIcon, { fontSize: size })
|
|
2198
|
+
label: __37("Uppercase", "elementor"),
|
|
2199
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
2200
|
+
showTooltip: true
|
|
2202
2201
|
},
|
|
2203
2202
|
{
|
|
2204
2203
|
value: "lowercase",
|
|
2205
|
-
label:
|
|
2206
|
-
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(LetterCaseLowerIcon, { fontSize: size })
|
|
2204
|
+
label: __37("Lowercase", "elementor"),
|
|
2205
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
2206
|
+
showTooltip: true
|
|
2207
2207
|
}
|
|
2208
2208
|
];
|
|
2209
|
-
var TransformField = () => /* @__PURE__ */ React55.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React55.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel28, null,
|
|
2209
|
+
var TransformField = () => /* @__PURE__ */ React55.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React55.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel28, null, __37("Text Transform", "elementor"))), /* @__PURE__ */ React55.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(ToggleControl10, { options: options9 }))));
|
|
2210
2210
|
|
|
2211
2211
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2212
2212
|
import * as React56 from "react";
|
|
2213
2213
|
import { ControlLabel as ControlLabel29, SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
2214
2214
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
2215
|
-
import { __ as
|
|
2215
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
2216
2216
|
var WordSpacingField = () => {
|
|
2217
|
-
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React56.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel29, null,
|
|
2217
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React56.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel29, null, __38("Word Spacing", "elementor"))), /* @__PURE__ */ React56.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(SizeControl8, null))));
|
|
2218
2218
|
};
|
|
2219
2219
|
|
|
2220
2220
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2221
2221
|
var TypographySection = () => {
|
|
2222
|
-
return /* @__PURE__ */ React57.createElement(
|
|
2222
|
+
return /* @__PURE__ */ React57.createElement(Stack19, { gap: 1.5 }, /* @__PURE__ */ React57.createElement(FontFamilyField, null), /* @__PURE__ */ React57.createElement(FontWeightField, null), /* @__PURE__ */ React57.createElement(FontSizeField, null), /* @__PURE__ */ React57.createElement(Divider7, null), /* @__PURE__ */ React57.createElement(TextAlignmentField, null), /* @__PURE__ */ React57.createElement(TextColorField, null), /* @__PURE__ */ React57.createElement(CollapsibleContent, null, /* @__PURE__ */ React57.createElement(Stack19, { gap: 1.5, sx: { pt: 1.5 } }, /* @__PURE__ */ React57.createElement(LineHeightField, null), /* @__PURE__ */ React57.createElement(LetterSpacingField, null), /* @__PURE__ */ React57.createElement(WordSpacingField, null), /* @__PURE__ */ React57.createElement(Divider7, null), /* @__PURE__ */ React57.createElement(TextStyleField, null), /* @__PURE__ */ React57.createElement(TransformField, null), /* @__PURE__ */ React57.createElement(TextDirectionField, null), /* @__PURE__ */ React57.createElement(TextStrokeField, null))));
|
|
2223
2223
|
};
|
|
2224
2224
|
|
|
2225
2225
|
// src/components/style-tab.tsx
|
|
@@ -2227,7 +2227,7 @@ var CLASSES_PROP_KEY = "classes";
|
|
|
2227
2227
|
var StyleTab = () => {
|
|
2228
2228
|
const currentClassesProp = useCurrentClassesProp();
|
|
2229
2229
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2230
|
-
const [activeStyleState, setActiveStyleState] =
|
|
2230
|
+
const [activeStyleState, setActiveStyleState] = useState7(null);
|
|
2231
2231
|
const breakpoint = useActiveBreakpoint();
|
|
2232
2232
|
return /* @__PURE__ */ React58.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React58.createElement(
|
|
2233
2233
|
StyleProvider,
|
|
@@ -2240,11 +2240,11 @@ var StyleTab = () => {
|
|
|
2240
2240
|
},
|
|
2241
2241
|
setMetaState: setActiveStyleState
|
|
2242
2242
|
},
|
|
2243
|
-
/* @__PURE__ */ React58.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React58.createElement(CssClassSelector, null), /* @__PURE__ */ React58.createElement(Divider8, null), /* @__PURE__ */ React58.createElement(SectionsList, null, /* @__PURE__ */ React58.createElement(Section, { title:
|
|
2243
|
+
/* @__PURE__ */ React58.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React58.createElement(CssClassSelector, null), /* @__PURE__ */ React58.createElement(Divider8, null), /* @__PURE__ */ React58.createElement(SectionsList, null, /* @__PURE__ */ React58.createElement(Section, { title: __39("Layout", "elementor") }, /* @__PURE__ */ React58.createElement(LayoutSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __39("Spacing", "elementor") }, /* @__PURE__ */ React58.createElement(SpacingSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __39("Size", "elementor") }, /* @__PURE__ */ React58.createElement(SizeSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __39("Position", "elementor") }, /* @__PURE__ */ React58.createElement(PositionSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __39("Typography", "elementor") }, /* @__PURE__ */ React58.createElement(TypographySection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __39("Background", "elementor") }, /* @__PURE__ */ React58.createElement(BackgroundSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __39("Border", "elementor") }, /* @__PURE__ */ React58.createElement(BorderSection, null)), /* @__PURE__ */ React58.createElement(Section, { title: __39("Effects", "elementor") }, /* @__PURE__ */ React58.createElement(EffectsSection, null))))
|
|
2244
2244
|
));
|
|
2245
2245
|
};
|
|
2246
2246
|
function useActiveStyleDefId(currentClassesProp) {
|
|
2247
|
-
const [activeStyledDefId, setActiveStyledDefId] =
|
|
2247
|
+
const [activeStyledDefId, setActiveStyledDefId] = useState7(null);
|
|
2248
2248
|
const fallback = useFirstElementStyleDef(currentClassesProp);
|
|
2249
2249
|
return [activeStyledDefId || fallback?.id || null, setActiveStyledDefId];
|
|
2250
2250
|
}
|
|
@@ -2272,7 +2272,7 @@ var EditingPanelTabs = () => {
|
|
|
2272
2272
|
return (
|
|
2273
2273
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2274
2274
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2275
|
-
/* @__PURE__ */ React59.createElement(Fragment8, { key: element.id }, /* @__PURE__ */ React59.createElement(
|
|
2275
|
+
/* @__PURE__ */ React59.createElement(Fragment8, { key: element.id }, /* @__PURE__ */ React59.createElement(Stack20, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React59.createElement(Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React59.createElement(Tab, { label: __40("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React59.createElement(Tab, { label: __40("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React59.createElement(Divider9, null), /* @__PURE__ */ React59.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React59.createElement(SettingsTab, null)), /* @__PURE__ */ React59.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React59.createElement(StyleTab, null))))
|
|
2276
2276
|
);
|
|
2277
2277
|
};
|
|
2278
2278
|
|
|
@@ -2285,7 +2285,7 @@ var EditingPanel = () => {
|
|
|
2285
2285
|
if (!element || !elementType) {
|
|
2286
2286
|
return null;
|
|
2287
2287
|
}
|
|
2288
|
-
const panelTitle =
|
|
2288
|
+
const panelTitle = __41("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2289
2289
|
return /* @__PURE__ */ React60.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React60.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React60.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React60.createElement(Panel, null, /* @__PURE__ */ React60.createElement(PanelHeader, null, /* @__PURE__ */ React60.createElement(PanelHeaderTitle, null, panelTitle)), /* @__PURE__ */ React60.createElement(PanelBody, null, /* @__PURE__ */ React60.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React60.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React60.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React60.createElement(EditingPanelTabs, null))))))));
|
|
2290
2290
|
};
|
|
2291
2291
|
|
|
@@ -2298,10 +2298,10 @@ var { panel, usePanelActions, usePanelStatus } = createPanel({
|
|
|
2298
2298
|
// src/init.ts
|
|
2299
2299
|
import { injectIntoLogic } from "@elementor/editor";
|
|
2300
2300
|
import { __registerPanel as registerPanel } from "@elementor/editor-panels";
|
|
2301
|
-
import {
|
|
2301
|
+
import { blockCommand } from "@elementor/editor-v1-adapters";
|
|
2302
2302
|
|
|
2303
2303
|
// src/hooks/use-close-editor-panel.ts
|
|
2304
|
-
import { useEffect as
|
|
2304
|
+
import { useEffect as useEffect2 } from "react";
|
|
2305
2305
|
import { getSelectedElements as getSelectedElements2, isElementInContainer } from "@elementor/editor-elements";
|
|
2306
2306
|
import { __privateListenTo as listenTo, commandStartEvent } from "@elementor/editor-v1-adapters";
|
|
2307
2307
|
|
|
@@ -2319,7 +2319,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
2319
2319
|
// src/hooks/use-close-editor-panel.ts
|
|
2320
2320
|
var useCloseEditorPanel = () => {
|
|
2321
2321
|
const { close } = usePanelActions();
|
|
2322
|
-
return
|
|
2322
|
+
return useEffect2(() => {
|
|
2323
2323
|
return listenTo(commandStartEvent("document/elements/delete"), (e) => {
|
|
2324
2324
|
const selectedElement = getSelectedElements2()[0];
|
|
2325
2325
|
const { container: deletedContainer } = e?.args;
|
|
@@ -2332,11 +2332,11 @@ var useCloseEditorPanel = () => {
|
|
|
2332
2332
|
};
|
|
2333
2333
|
|
|
2334
2334
|
// src/hooks/use-open-editor-panel.ts
|
|
2335
|
-
import { useEffect as
|
|
2335
|
+
import { useEffect as useEffect3 } from "react";
|
|
2336
2336
|
import { __privateListenTo as listenTo2, commandStartEvent as commandStartEvent2 } from "@elementor/editor-v1-adapters";
|
|
2337
2337
|
var useOpenEditorPanel = () => {
|
|
2338
2338
|
const { open } = usePanelActions();
|
|
2339
|
-
|
|
2339
|
+
useEffect3(() => {
|
|
2340
2340
|
return listenTo2(commandStartEvent2("panel/editor/open"), () => {
|
|
2341
2341
|
if (isAtomicWidgetSelected()) {
|
|
2342
2342
|
open();
|
|
@@ -2354,7 +2354,7 @@ var EditingPanelHooks = () => {
|
|
|
2354
2354
|
|
|
2355
2355
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2356
2356
|
import * as React63 from "react";
|
|
2357
|
-
import { useId as
|
|
2357
|
+
import { useId as useId4 } from "react";
|
|
2358
2358
|
import { ControlLabel as ControlLabel30, useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
2359
2359
|
import { DatabaseIcon, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
2360
2360
|
import {
|
|
@@ -2365,22 +2365,23 @@ import {
|
|
|
2365
2365
|
IconButton as IconButton3,
|
|
2366
2366
|
Paper,
|
|
2367
2367
|
Popover as Popover2,
|
|
2368
|
-
Stack as
|
|
2368
|
+
Stack as Stack22,
|
|
2369
2369
|
Tab as Tab2,
|
|
2370
2370
|
TabPanel as TabPanel2,
|
|
2371
2371
|
Tabs as Tabs2,
|
|
2372
|
-
Typography as
|
|
2372
|
+
Typography as Typography5,
|
|
2373
2373
|
UnstableTag as Tag,
|
|
2374
2374
|
usePopupState as usePopupState3,
|
|
2375
2375
|
useTabs as useTabs2
|
|
2376
2376
|
} from "@elementor/ui";
|
|
2377
|
-
import { __ as
|
|
2377
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
2378
2378
|
|
|
2379
2379
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2380
|
+
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
2380
2381
|
var usePersistDynamicValue = (propKey) => {
|
|
2381
2382
|
const { element } = useElement();
|
|
2382
2383
|
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
2383
|
-
return
|
|
2384
|
+
return useSessionStorage2(prefixedKey);
|
|
2384
2385
|
};
|
|
2385
2386
|
|
|
2386
2387
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -2388,10 +2389,10 @@ import * as React61 from "react";
|
|
|
2388
2389
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
2389
2390
|
|
|
2390
2391
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2391
|
-
import { useMemo as
|
|
2392
|
+
import { useMemo as useMemo4 } from "react";
|
|
2392
2393
|
|
|
2393
2394
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2394
|
-
import { useMemo as
|
|
2395
|
+
import { useMemo as useMemo3 } from "react";
|
|
2395
2396
|
import { useBoundProp } from "@elementor/editor-controls";
|
|
2396
2397
|
|
|
2397
2398
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -2446,7 +2447,7 @@ var usePropDynamicTags = () => {
|
|
|
2446
2447
|
const propDynamicType = getDynamicPropType(propType);
|
|
2447
2448
|
categories = propDynamicType?.settings.categories || [];
|
|
2448
2449
|
}
|
|
2449
|
-
return
|
|
2450
|
+
return useMemo3(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
2450
2451
|
};
|
|
2451
2452
|
var getDynamicTagsByCategories = (categories) => {
|
|
2452
2453
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -2462,7 +2463,7 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
2462
2463
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2463
2464
|
var useDynamicTag = (tagName) => {
|
|
2464
2465
|
const dynamicTags = usePropDynamicTags();
|
|
2465
|
-
return
|
|
2466
|
+
return useMemo4(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
2466
2467
|
};
|
|
2467
2468
|
|
|
2468
2469
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -2491,7 +2492,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2491
2492
|
|
|
2492
2493
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2493
2494
|
import * as React62 from "react";
|
|
2494
|
-
import { Fragment as Fragment9, useState as
|
|
2495
|
+
import { Fragment as Fragment9, useState as useState8 } from "react";
|
|
2495
2496
|
import { useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
2496
2497
|
import { PhotoIcon, SearchIcon } from "@elementor/icons";
|
|
2497
2498
|
import {
|
|
@@ -2502,14 +2503,14 @@ import {
|
|
|
2502
2503
|
ListSubheader as ListSubheader2,
|
|
2503
2504
|
MenuItem as MenuItem2,
|
|
2504
2505
|
MenuList,
|
|
2505
|
-
Stack as
|
|
2506
|
+
Stack as Stack21,
|
|
2506
2507
|
TextField as TextField2,
|
|
2507
|
-
Typography as
|
|
2508
|
+
Typography as Typography4
|
|
2508
2509
|
} from "@elementor/ui";
|
|
2509
|
-
import { __ as
|
|
2510
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
2510
2511
|
var SIZE3 = "tiny";
|
|
2511
2512
|
var DynamicSelection = ({ onSelect }) => {
|
|
2512
|
-
const [searchValue, setSearchValue] =
|
|
2513
|
+
const [searchValue, setSearchValue] = useState8("");
|
|
2513
2514
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
2514
2515
|
const { value: anyValue } = useBoundProp3();
|
|
2515
2516
|
const { bind, value: dynamicValue, setValue } = useBoundProp3(dynamicPropTypeUtil);
|
|
@@ -2526,14 +2527,14 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2526
2527
|
setValue({ name: value, settings: {} });
|
|
2527
2528
|
onSelect?.();
|
|
2528
2529
|
};
|
|
2529
|
-
return /* @__PURE__ */ React62.createElement(
|
|
2530
|
+
return /* @__PURE__ */ React62.createElement(Stack21, null, /* @__PURE__ */ React62.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React62.createElement(
|
|
2530
2531
|
TextField2,
|
|
2531
2532
|
{
|
|
2532
2533
|
fullWidth: true,
|
|
2533
2534
|
size: SIZE3,
|
|
2534
2535
|
value: searchValue,
|
|
2535
2536
|
onChange: handleSearch,
|
|
2536
|
-
placeholder:
|
|
2537
|
+
placeholder: __42("Search dynamic tag", "elementor"),
|
|
2537
2538
|
InputProps: {
|
|
2538
2539
|
startAdornment: /* @__PURE__ */ React62.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React62.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
2539
2540
|
}
|
|
@@ -2551,7 +2552,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2551
2552
|
},
|
|
2552
2553
|
tagLabel
|
|
2553
2554
|
);
|
|
2554
|
-
})))) : /* @__PURE__ */ React62.createElement(
|
|
2555
|
+
})))) : /* @__PURE__ */ React62.createElement(Stack21, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React62.createElement(PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React62.createElement(Typography4, { align: "center", variant: "caption", color: "text.secondary" }, __42("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React62.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React62.createElement(Typography4, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React62.createElement(
|
|
2555
2556
|
Link,
|
|
2556
2557
|
{
|
|
2557
2558
|
color: "secondary",
|
|
@@ -2559,8 +2560,8 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2559
2560
|
component: "button",
|
|
2560
2561
|
onClick: () => setSearchValue("")
|
|
2561
2562
|
},
|
|
2562
|
-
|
|
2563
|
-
), "\xA0",
|
|
2563
|
+
__42("Clear the filters", "elementor")
|
|
2564
|
+
), "\xA0", __42("and try again.", "elementor")))));
|
|
2564
2565
|
};
|
|
2565
2566
|
var useFilteredOptions = (searchValue) => {
|
|
2566
2567
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -2585,7 +2586,7 @@ var DynamicSelectionControl = () => {
|
|
|
2585
2586
|
const { bind, value } = useBoundProp4(dynamicPropTypeUtil);
|
|
2586
2587
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
2587
2588
|
const { name: tagName = "" } = value;
|
|
2588
|
-
const selectionPopoverId =
|
|
2589
|
+
const selectionPopoverId = useId4();
|
|
2589
2590
|
const selectionPopoverState = usePopupState3({ variant: "popover", popupId: selectionPopoverId });
|
|
2590
2591
|
const dynamicTag = useDynamicTag(tagName);
|
|
2591
2592
|
const removeDynamicTag = () => {
|
|
@@ -2607,7 +2608,7 @@ var DynamicSelectionControl = () => {
|
|
|
2607
2608
|
{
|
|
2608
2609
|
size: SIZE4,
|
|
2609
2610
|
onClick: removeDynamicTag,
|
|
2610
|
-
"aria-label":
|
|
2611
|
+
"aria-label": __43("Remove dynamic value", "elementor")
|
|
2611
2612
|
},
|
|
2612
2613
|
/* @__PURE__ */ React63.createElement(XIcon2, { fontSize: SIZE4 })
|
|
2613
2614
|
))
|
|
@@ -2620,11 +2621,11 @@ var DynamicSelectionControl = () => {
|
|
|
2620
2621
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2621
2622
|
...bindPopover2(selectionPopoverState)
|
|
2622
2623
|
},
|
|
2623
|
-
/* @__PURE__ */ React63.createElement(
|
|
2624
|
+
/* @__PURE__ */ React63.createElement(Stack22, null, /* @__PURE__ */ React63.createElement(Stack22, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React63.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React63.createElement(Typography5, { variant: "subtitle2" }, __43("Dynamic Tags", "elementor")), /* @__PURE__ */ React63.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React63.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React63.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2624
2625
|
));
|
|
2625
2626
|
};
|
|
2626
2627
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
2627
|
-
const popupId =
|
|
2628
|
+
const popupId = useId4();
|
|
2628
2629
|
const settingsPopupState = usePopupState3({ variant: "popover", popupId });
|
|
2629
2630
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
2630
2631
|
if (!hasDynamicSettings) {
|
|
@@ -2635,7 +2636,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2635
2636
|
{
|
|
2636
2637
|
size: SIZE4,
|
|
2637
2638
|
...bindTrigger2(settingsPopupState),
|
|
2638
|
-
"aria-label":
|
|
2639
|
+
"aria-label": __43("Settings", "elementor")
|
|
2639
2640
|
},
|
|
2640
2641
|
/* @__PURE__ */ React63.createElement(SettingsIcon, { fontSize: SIZE4 })
|
|
2641
2642
|
), /* @__PURE__ */ React63.createElement(
|
|
@@ -2645,7 +2646,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2645
2646
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2646
2647
|
...bindPopover2(settingsPopupState)
|
|
2647
2648
|
},
|
|
2648
|
-
/* @__PURE__ */ React63.createElement(Paper, { component:
|
|
2649
|
+
/* @__PURE__ */ React63.createElement(Paper, { component: Stack22, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React63.createElement(Stack22, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React63.createElement(DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React63.createElement(Typography5, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React63.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React63.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React63.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2649
2650
|
));
|
|
2650
2651
|
};
|
|
2651
2652
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -2655,7 +2656,7 @@ var DynamicSettings = ({ controls }) => {
|
|
|
2655
2656
|
return null;
|
|
2656
2657
|
}
|
|
2657
2658
|
return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(Tabs2, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React63.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React63.createElement(Divider11, null), tabs.map(({ value }, index) => {
|
|
2658
|
-
return /* @__PURE__ */ React63.createElement(TabPanel2, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React63.createElement(
|
|
2659
|
+
return /* @__PURE__ */ React63.createElement(TabPanel2, { key: index, sx: { flexGrow: 1 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React63.createElement(Stack22, { gap: 1, px: 2 }, value.items.map((item) => {
|
|
2659
2660
|
if (item.type === "control") {
|
|
2660
2661
|
return /* @__PURE__ */ React63.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2661
2662
|
}
|
|
@@ -2674,14 +2675,14 @@ var Control3 = ({ control }) => {
|
|
|
2674
2675
|
import * as React64 from "react";
|
|
2675
2676
|
import { useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
2676
2677
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
2677
|
-
import { __ as
|
|
2678
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
2678
2679
|
var usePropDynamicAction = () => {
|
|
2679
2680
|
const { propType } = useBoundProp5();
|
|
2680
2681
|
const visible = !!propType && supportsDynamic(propType);
|
|
2681
2682
|
return {
|
|
2682
2683
|
visible,
|
|
2683
2684
|
icon: DatabaseIcon2,
|
|
2684
|
-
title:
|
|
2685
|
+
title: __44("Dynamic Tags", "elementor"),
|
|
2685
2686
|
popoverContent: ({ closePopover }) => /* @__PURE__ */ React64.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2686
2687
|
};
|
|
2687
2688
|
};
|
|
@@ -2710,7 +2711,7 @@ function init2() {
|
|
|
2710
2711
|
init();
|
|
2711
2712
|
}
|
|
2712
2713
|
var blockV1Panel = () => {
|
|
2713
|
-
|
|
2714
|
+
blockCommand({
|
|
2714
2715
|
command: "panel/editor/open",
|
|
2715
2716
|
condition: isAtomicWidgetSelected
|
|
2716
2717
|
});
|