@elementor/editor-editing-panel 1.30.0 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +846 -609
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +750 -506
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
- package/src/components/creatable-autocomplete/autocomplete-option-internal-properties.ts +21 -0
- package/src/components/creatable-autocomplete/creatable-autocomplete.tsx +175 -0
- package/src/components/creatable-autocomplete/index.ts +3 -0
- package/src/components/creatable-autocomplete/types.ts +38 -0
- package/src/components/creatable-autocomplete/use-autocomplete-change.ts +75 -0
- package/src/components/creatable-autocomplete/use-autocomplete-states.ts +42 -0
- package/src/components/creatable-autocomplete/use-create-option.ts +45 -0
- package/src/components/creatable-autocomplete/use-filter-options.ts +50 -0
- package/src/components/css-classes/css-class-item.tsx +2 -2
- package/src/components/css-classes/css-class-selector.tsx +44 -27
- package/src/components/editing-panel-tabs.tsx +19 -14
- package/src/components/style-sections/position-section/offset-field.tsx +22 -0
- package/src/components/style-sections/position-section/position-section.tsx +4 -0
- package/src/components/style-tab.tsx +26 -3
- package/src/contexts/scroll-context.tsx +60 -0
- package/src/index.ts +1 -0
- package/src/components/multi-combobox.tsx +0 -165
package/dist/index.mjs
CHANGED
|
@@ -12,13 +12,13 @@ import { classesPropTypeUtil } from "@elementor/editor-props";
|
|
|
12
12
|
import {
|
|
13
13
|
isElementsStylesProvider as isElementsStylesProvider2,
|
|
14
14
|
stylesRepository as stylesRepository4,
|
|
15
|
-
|
|
15
|
+
useGetStylesRepositoryCreateAction,
|
|
16
16
|
useProviders,
|
|
17
17
|
validateStyleLabel as validateStyleLabel2
|
|
18
18
|
} from "@elementor/editor-styles-repository";
|
|
19
19
|
import { MapPinIcon } from "@elementor/icons";
|
|
20
20
|
import { createLocation } from "@elementor/locations";
|
|
21
|
-
import { Chip as
|
|
21
|
+
import { Chip as Chip3, FormLabel, Stack as Stack3 } from "@elementor/ui";
|
|
22
22
|
import { __ as __3 } from "@wordpress/i18n";
|
|
23
23
|
|
|
24
24
|
// src/contexts/classes-prop-context.tsx
|
|
@@ -98,23 +98,200 @@ function getProviderByStyleId(styleId) {
|
|
|
98
98
|
return styleProvider ?? null;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
// src/components/
|
|
101
|
+
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
102
102
|
import * as React4 from "react";
|
|
103
|
+
import { useId, useMemo } from "react";
|
|
104
|
+
import {
|
|
105
|
+
Autocomplete,
|
|
106
|
+
Box,
|
|
107
|
+
Chip,
|
|
108
|
+
styled,
|
|
109
|
+
TextField,
|
|
110
|
+
Typography
|
|
111
|
+
} from "@elementor/ui";
|
|
112
|
+
|
|
113
|
+
// src/components/creatable-autocomplete/autocomplete-option-internal-properties.ts
|
|
114
|
+
function addGroupToOptions(options12, pluralEntityName) {
|
|
115
|
+
return options12.map((option) => {
|
|
116
|
+
return {
|
|
117
|
+
...option,
|
|
118
|
+
_group: `Existing ${pluralEntityName ?? "options"}`
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function removeOptionsInternalKeys(options12) {
|
|
123
|
+
return options12.map((option) => {
|
|
124
|
+
const { _group, _action, ...rest } = option;
|
|
125
|
+
return rest;
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// src/components/creatable-autocomplete/use-autocomplete-change.ts
|
|
130
|
+
function useAutocompleteChange(params) {
|
|
131
|
+
const { options: options12, onSelect, createOption, setInputValue, closeDropdown } = params;
|
|
132
|
+
const handleChange = async (_, selectedOrInputValue, reason) => {
|
|
133
|
+
const selectedOptions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
134
|
+
const newInputValue = selectedOrInputValue.reduce((acc, option) => {
|
|
135
|
+
if (typeof option === "string") {
|
|
136
|
+
return option;
|
|
137
|
+
} else if (option._action === "create") {
|
|
138
|
+
return option.value;
|
|
139
|
+
}
|
|
140
|
+
return acc;
|
|
141
|
+
}, null);
|
|
142
|
+
const inputValueMatchesExistingOption = newInputValue && options12.find((option) => option.label === newInputValue);
|
|
143
|
+
if (newInputValue && shouldCreateNewOption(reason, selectedOptions, newInputValue, Boolean(inputValueMatchesExistingOption))) {
|
|
144
|
+
return createOption(newInputValue);
|
|
145
|
+
}
|
|
146
|
+
if (reason === "createOption" && inputValueMatchesExistingOption) {
|
|
147
|
+
selectedOptions.push(inputValueMatchesExistingOption);
|
|
148
|
+
}
|
|
149
|
+
updateSelectedOptions(selectedOptions);
|
|
150
|
+
setInputValue("");
|
|
151
|
+
closeDropdown();
|
|
152
|
+
};
|
|
153
|
+
return handleChange;
|
|
154
|
+
function shouldCreateNewOption(reason, selectedOptions, newInputValue, inputValueMatchesExistingOption) {
|
|
155
|
+
const createOptionWasClicked = reason === "selectOption" && selectedOptions.some((option) => option._action === "create");
|
|
156
|
+
const enterWasPressed = reason === "createOption" && !options12.some((option) => option.label === newInputValue);
|
|
157
|
+
const createOptionWasDisplayed = !inputValueMatchesExistingOption;
|
|
158
|
+
return createOptionWasClicked || enterWasPressed && createOptionWasDisplayed;
|
|
159
|
+
}
|
|
160
|
+
function updateSelectedOptions(selectedOptions) {
|
|
161
|
+
const fixedOptions = options12.filter((option) => !!option.fixed);
|
|
162
|
+
const updatedOptions = [...fixedOptions, ...selectedOptions.filter((option) => !option.fixed)];
|
|
163
|
+
onSelect?.(removeOptionsInternalKeys(updatedOptions));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// src/components/creatable-autocomplete/use-autocomplete-states.ts
|
|
103
168
|
import { useState } from "react";
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
169
|
+
function useInputState(validate) {
|
|
170
|
+
const [inputValue, setInputValue] = useState("");
|
|
171
|
+
const [error, setError] = useState(null);
|
|
172
|
+
const handleInputChange = (event) => {
|
|
173
|
+
const { value } = event.target;
|
|
174
|
+
setInputValue(value);
|
|
175
|
+
if (!validate) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (!value) {
|
|
179
|
+
setError(null);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const { isValid, errorMessage } = validate(value, "inputChange");
|
|
183
|
+
if (isValid) {
|
|
184
|
+
setError(null);
|
|
185
|
+
} else {
|
|
186
|
+
setError(errorMessage);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
return { inputValue, setInputValue, error, setError, handleInputChange };
|
|
190
|
+
}
|
|
191
|
+
function useOpenState(initialOpen = false) {
|
|
192
|
+
const [open, setOpen] = useState(initialOpen);
|
|
193
|
+
const openDropdown = () => setOpen(true);
|
|
194
|
+
const closeDropdown = () => setOpen(false);
|
|
195
|
+
return { open, openDropdown, closeDropdown };
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// src/components/creatable-autocomplete/use-create-option.ts
|
|
199
|
+
import { useState as useState2 } from "react";
|
|
200
|
+
function useCreateOption(params) {
|
|
201
|
+
const { onCreate, validate, setInputValue, setError, closeDropdown } = params;
|
|
202
|
+
const [loading, setLoading] = useState2(false);
|
|
203
|
+
const createOption = async (value) => {
|
|
204
|
+
if (!onCreate) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
setLoading(true);
|
|
208
|
+
if (validate) {
|
|
209
|
+
const { isValid, errorMessage } = validate(value, "create");
|
|
210
|
+
if (!isValid) {
|
|
211
|
+
setError(errorMessage);
|
|
212
|
+
setLoading(false);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
try {
|
|
217
|
+
setInputValue("");
|
|
218
|
+
closeDropdown();
|
|
219
|
+
await onCreate(value);
|
|
220
|
+
} catch {
|
|
221
|
+
} finally {
|
|
222
|
+
setLoading(false);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
return { createOption, loading };
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// src/components/creatable-autocomplete/use-filter-options.ts
|
|
229
|
+
import { createFilterOptions } from "@elementor/ui";
|
|
230
|
+
function useFilterOptions(parameters) {
|
|
231
|
+
const { options: options12, selected, onCreate, entityName } = parameters;
|
|
232
|
+
const filter = createFilterOptions();
|
|
233
|
+
const filterOptions = (optionList, params) => {
|
|
234
|
+
const selectedValues = selected.map((option) => option.value);
|
|
235
|
+
const filteredOptions = filter(
|
|
236
|
+
optionList.filter((option) => !selectedValues.includes(option.value)),
|
|
237
|
+
params
|
|
238
|
+
);
|
|
239
|
+
const isExisting = options12.some((option) => params.inputValue === option.label);
|
|
240
|
+
const allowCreate = Boolean(onCreate) && params.inputValue !== "" && !selectedValues.includes(params.inputValue) && !isExisting;
|
|
241
|
+
if (allowCreate) {
|
|
242
|
+
filteredOptions.unshift({
|
|
243
|
+
label: `Create "${params.inputValue}"`,
|
|
244
|
+
value: params.inputValue,
|
|
245
|
+
_group: `Create a new ${entityName?.singular ?? "option"}`,
|
|
246
|
+
key: `create-${params.inputValue}`,
|
|
247
|
+
_action: "create"
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return filteredOptions;
|
|
251
|
+
};
|
|
252
|
+
return filterOptions;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
256
|
+
function CreatableAutocomplete({
|
|
107
257
|
selected,
|
|
108
258
|
options: options12,
|
|
259
|
+
entityName,
|
|
109
260
|
onSelect,
|
|
110
261
|
placeholder,
|
|
262
|
+
onCreate,
|
|
263
|
+
validate,
|
|
111
264
|
...props
|
|
112
265
|
}) {
|
|
113
|
-
const
|
|
114
|
-
const {
|
|
266
|
+
const { inputValue, setInputValue, error, setError, handleInputChange } = useInputState(validate);
|
|
267
|
+
const { open, openDropdown, closeDropdown } = useOpenState(props.open);
|
|
268
|
+
const { createOption, loading } = useCreateOption({ onCreate, validate, setInputValue, setError, closeDropdown });
|
|
269
|
+
const [internalOptions, internalSelected] = useMemo(
|
|
270
|
+
() => [options12, selected].map((optionsArr) => addGroupToOptions(optionsArr, entityName?.plural)),
|
|
271
|
+
[options12, selected, entityName?.plural]
|
|
272
|
+
);
|
|
273
|
+
const handleChange = useAutocompleteChange({
|
|
274
|
+
options: internalOptions,
|
|
275
|
+
onSelect,
|
|
276
|
+
createOption,
|
|
277
|
+
setInputValue,
|
|
278
|
+
closeDropdown
|
|
279
|
+
});
|
|
280
|
+
const filterOptions = useFilterOptions({ options: options12, selected, onCreate, entityName });
|
|
115
281
|
return /* @__PURE__ */ React4.createElement(
|
|
116
282
|
Autocomplete,
|
|
117
283
|
{
|
|
284
|
+
renderTags: (tagValue, getTagProps) => {
|
|
285
|
+
return tagValue.map((option, index) => /* @__PURE__ */ React4.createElement(
|
|
286
|
+
Chip,
|
|
287
|
+
{
|
|
288
|
+
size: "tiny",
|
|
289
|
+
...getTagProps({ index }),
|
|
290
|
+
key: option.key ?? option.value ?? option.label,
|
|
291
|
+
label: option.label
|
|
292
|
+
}
|
|
293
|
+
));
|
|
294
|
+
},
|
|
118
295
|
...props,
|
|
119
296
|
freeSolo: true,
|
|
120
297
|
multiple: true,
|
|
@@ -123,37 +300,33 @@ function MultiCombobox({
|
|
|
123
300
|
disableClearable: true,
|
|
124
301
|
handleHomeEndKeys: true,
|
|
125
302
|
disabled: loading,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
303
|
+
open,
|
|
304
|
+
onOpen: openDropdown,
|
|
305
|
+
onClose: closeDropdown,
|
|
306
|
+
disableCloseOnSelect: true,
|
|
307
|
+
value: internalSelected,
|
|
308
|
+
options: internalOptions,
|
|
309
|
+
ListboxComponent: error ? React4.forwardRef((_, ref) => /* @__PURE__ */ React4.createElement(ErrorText, { ref, error })) : void 0,
|
|
310
|
+
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
311
|
+
inputValue,
|
|
312
|
+
renderInput: (params) => {
|
|
313
|
+
return /* @__PURE__ */ React4.createElement(
|
|
314
|
+
TextField,
|
|
315
|
+
{
|
|
316
|
+
...params,
|
|
317
|
+
placeholder,
|
|
318
|
+
error: Boolean(error),
|
|
319
|
+
onChange: handleInputChange,
|
|
320
|
+
sx: (theme) => ({
|
|
321
|
+
".MuiAutocomplete-inputRoot.MuiInputBase-adornedStart": {
|
|
322
|
+
paddingLeft: theme.spacing(0.25),
|
|
323
|
+
paddingRight: theme.spacing(0.25)
|
|
324
|
+
}
|
|
325
|
+
})
|
|
148
326
|
}
|
|
149
|
-
|
|
150
|
-
const action = optionsAndActions.find((value) => isAction(value));
|
|
151
|
-
if (reason === "selectOption" && action?.value) {
|
|
152
|
-
return run(action.apply, action.value);
|
|
153
|
-
}
|
|
154
|
-
const fixedValues = options12.filter((option) => !!option.fixed);
|
|
155
|
-
onSelect?.([.../* @__PURE__ */ new Set([...optionsAndActions, ...fixedValues])]);
|
|
327
|
+
);
|
|
156
328
|
},
|
|
329
|
+
onChange: handleChange,
|
|
157
330
|
getOptionLabel: (option) => typeof option === "string" ? option : option.label,
|
|
158
331
|
getOptionKey: (option) => {
|
|
159
332
|
if (typeof option === "string") {
|
|
@@ -161,61 +334,66 @@ function MultiCombobox({
|
|
|
161
334
|
}
|
|
162
335
|
return option.key ?? option.value ?? option.label;
|
|
163
336
|
},
|
|
164
|
-
filterOptions
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
337
|
+
filterOptions,
|
|
338
|
+
groupBy: (option) => option._group ?? "",
|
|
339
|
+
renderOption: (optionProps, option) => {
|
|
340
|
+
const { _group, label } = option;
|
|
341
|
+
return /* @__PURE__ */ React4.createElement(
|
|
342
|
+
"li",
|
|
343
|
+
{
|
|
344
|
+
...optionProps,
|
|
345
|
+
style: { display: "block", textOverflow: "ellipsis" },
|
|
346
|
+
"data-group": _group
|
|
347
|
+
},
|
|
348
|
+
label
|
|
349
|
+
);
|
|
350
|
+
}
|
|
176
351
|
}
|
|
177
352
|
);
|
|
178
353
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
354
|
+
var Group = (params) => {
|
|
355
|
+
const id = `combobox-group-${useId().replace(/:/g, "_")}`;
|
|
356
|
+
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));
|
|
357
|
+
};
|
|
358
|
+
var ErrorText = React4.forwardRef(({ error = "error" }, ref) => {
|
|
359
|
+
return /* @__PURE__ */ React4.createElement(
|
|
360
|
+
Box,
|
|
361
|
+
{
|
|
362
|
+
ref,
|
|
363
|
+
sx: (theme) => ({
|
|
364
|
+
padding: theme.spacing(2)
|
|
365
|
+
})
|
|
366
|
+
},
|
|
367
|
+
/* @__PURE__ */ React4.createElement(Typography, { variant: "caption", sx: { color: "error.main" } }, error)
|
|
368
|
+
);
|
|
369
|
+
});
|
|
370
|
+
var StyledGroup = styled("li")`
|
|
371
|
+
&:not( :last-of-type ) {
|
|
372
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
|
|
373
|
+
}
|
|
374
|
+
`;
|
|
375
|
+
var StyledGroupHeader = styled(Box)(({ theme }) => ({
|
|
376
|
+
position: "sticky",
|
|
377
|
+
top: "-8px",
|
|
378
|
+
padding: theme.spacing(1, 2),
|
|
379
|
+
color: theme.palette.text.tertiary,
|
|
380
|
+
backgroundColor: theme.palette.primary.contrastText
|
|
381
|
+
}));
|
|
382
|
+
var StyledGroupItems = styled("ul")`
|
|
383
|
+
padding: 0;
|
|
384
|
+
`;
|
|
207
385
|
|
|
208
386
|
// src/components/css-classes/css-class-item.tsx
|
|
209
387
|
import * as React6 from "react";
|
|
210
|
-
import { useState as
|
|
388
|
+
import { useState as useState3 } from "react";
|
|
211
389
|
import { stylesRepository as stylesRepository3, validateStyleLabel } from "@elementor/editor-styles-repository";
|
|
212
390
|
import { EditableField, EllipsisWithTooltip, useEditable } from "@elementor/editor-ui";
|
|
213
391
|
import { DotsVerticalIcon } from "@elementor/icons";
|
|
214
392
|
import {
|
|
215
393
|
bindTrigger,
|
|
216
|
-
Chip,
|
|
394
|
+
Chip as Chip2,
|
|
217
395
|
Stack as Stack2,
|
|
218
|
-
Typography,
|
|
396
|
+
Typography as Typography2,
|
|
219
397
|
UnstableChipGroup,
|
|
220
398
|
usePopupState
|
|
221
399
|
} from "@elementor/ui";
|
|
@@ -251,8 +429,8 @@ var useUnapplyClass = (classId) => {
|
|
|
251
429
|
};
|
|
252
430
|
|
|
253
431
|
// src/components/style-indicator.tsx
|
|
254
|
-
import { styled } from "@elementor/ui";
|
|
255
|
-
var StyleIndicator =
|
|
432
|
+
import { styled as styled2 } from "@elementor/ui";
|
|
433
|
+
var StyleIndicator = styled2("div", {
|
|
256
434
|
shouldForwardProp: (prop) => prop !== "variant"
|
|
257
435
|
})`
|
|
258
436
|
width: 5px;
|
|
@@ -439,7 +617,7 @@ function CssClassItem({
|
|
|
439
617
|
}) {
|
|
440
618
|
const { meta, setMetaState } = useStyle();
|
|
441
619
|
const popupState = usePopupState({ variant: "popover" });
|
|
442
|
-
const [chipRef, setChipRef] =
|
|
620
|
+
const [chipRef, setChipRef] = useState3(null);
|
|
443
621
|
const { onDelete, ...chipGroupProps } = chipProps;
|
|
444
622
|
const {
|
|
445
623
|
ref,
|
|
@@ -468,7 +646,7 @@ function CssClassItem({
|
|
|
468
646
|
})
|
|
469
647
|
},
|
|
470
648
|
/* @__PURE__ */ React6.createElement(
|
|
471
|
-
|
|
649
|
+
Chip2,
|
|
472
650
|
{
|
|
473
651
|
size: CHIP_SIZE,
|
|
474
652
|
label: isEditing ? /* @__PURE__ */ React6.createElement(EditableField, { ref, error, ...getEditableProps() }) : /* @__PURE__ */ React6.createElement(EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
@@ -499,11 +677,11 @@ function CssClassItem({
|
|
|
499
677
|
}
|
|
500
678
|
),
|
|
501
679
|
!isEditing && /* @__PURE__ */ React6.createElement(
|
|
502
|
-
|
|
680
|
+
Chip2,
|
|
503
681
|
{
|
|
504
682
|
icon: isShowingState ? void 0 : /* @__PURE__ */ React6.createElement(DotsVerticalIcon, { fontSize: "tiny" }),
|
|
505
683
|
size: CHIP_SIZE,
|
|
506
|
-
label: isShowingState ? /* @__PURE__ */ React6.createElement(Stack2, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React6.createElement(
|
|
684
|
+
label: isShowingState ? /* @__PURE__ */ React6.createElement(Stack2, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React6.createElement(Typography2, { variant: "inherit" }, meta.state), /* @__PURE__ */ React6.createElement(DotsVerticalIcon, { fontSize: "tiny" })) : void 0,
|
|
507
685
|
variant: "filled",
|
|
508
686
|
shape: "rounded",
|
|
509
687
|
color,
|
|
@@ -529,11 +707,11 @@ function CssClassItem({
|
|
|
529
707
|
));
|
|
530
708
|
}
|
|
531
709
|
var validateLabel = (newLabel) => {
|
|
532
|
-
const result = validateStyleLabel(newLabel);
|
|
710
|
+
const result = validateStyleLabel(newLabel, "rename");
|
|
533
711
|
if (result.isValid) {
|
|
534
712
|
return null;
|
|
535
713
|
}
|
|
536
|
-
return result.
|
|
714
|
+
return result.errorMessage;
|
|
537
715
|
};
|
|
538
716
|
|
|
539
717
|
// src/components/css-classes/css-class-selector.tsx
|
|
@@ -552,23 +730,25 @@ function CssClassSelector() {
|
|
|
552
730
|
const options12 = useOptions();
|
|
553
731
|
const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
|
|
554
732
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
555
|
-
const actions = useCreateActions({ pushAppliedId, setActiveId });
|
|
556
733
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
734
|
+
const { create, validate, entityName } = useCreateAction({ pushAppliedId, setActiveId });
|
|
557
735
|
const applied = useAppliedOptions(options12, appliedIds);
|
|
558
736
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
559
737
|
const showPlaceholder = applied.every(({ fixed }) => fixed);
|
|
560
738
|
return /* @__PURE__ */ React7.createElement(Stack3, { p: 2 }, /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(FormLabel, { htmlFor: ID, size: "small" }, __3("Classes", "elementor")), /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
561
|
-
|
|
739
|
+
CreatableAutocomplete,
|
|
562
740
|
{
|
|
563
741
|
id: ID,
|
|
564
742
|
size: "tiny",
|
|
565
743
|
placeholder: showPlaceholder ? __3("Type class name", "elementor") : void 0,
|
|
566
744
|
options: options12,
|
|
567
745
|
selected: applied,
|
|
746
|
+
entityName,
|
|
568
747
|
onSelect: handleApply,
|
|
748
|
+
onCreate: create ?? void 0,
|
|
749
|
+
validate: validate ?? void 0,
|
|
569
750
|
limitTags: TAGS_LIMIT,
|
|
570
|
-
|
|
571
|
-
getLimitTagsText: (more) => /* @__PURE__ */ React7.createElement(Chip2, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
751
|
+
getLimitTagsText: (more) => /* @__PURE__ */ React7.createElement(Chip3, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
572
752
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
573
753
|
const chipProps = getTagProps({ index });
|
|
574
754
|
const isActive = value.value === active?.value;
|
|
@@ -623,34 +803,38 @@ function useOptions() {
|
|
|
623
803
|
fixed: isElements,
|
|
624
804
|
color: isElements ? "accent" : "global",
|
|
625
805
|
icon: isElements ? /* @__PURE__ */ React7.createElement(MapPinIcon, null) : null,
|
|
626
|
-
provider: provider.getKey()
|
|
627
|
-
// translators: %s is the plural label of the provider (e.g "Existing classes").
|
|
628
|
-
group: __3("Existing %s", "elementor").replace("%s", provider.labels?.plural ?? "")
|
|
806
|
+
provider: provider.getKey()
|
|
629
807
|
};
|
|
630
808
|
});
|
|
631
809
|
});
|
|
632
810
|
}
|
|
633
|
-
function
|
|
811
|
+
function useCreateAction({
|
|
634
812
|
pushAppliedId,
|
|
635
813
|
setActiveId
|
|
636
814
|
}) {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
815
|
+
const [provider, createAction] = useGetStylesRepositoryCreateAction() ?? [null, null];
|
|
816
|
+
if (!provider || !createAction) {
|
|
817
|
+
return {};
|
|
818
|
+
}
|
|
819
|
+
const create = (newClassLabel) => {
|
|
820
|
+
const createdId = createAction(newClassLabel);
|
|
821
|
+
pushAppliedId(createdId);
|
|
822
|
+
setActiveId(createdId);
|
|
823
|
+
};
|
|
824
|
+
const validate = (newClassLabel, event) => {
|
|
825
|
+
if (hasReachedLimit(provider)) {
|
|
826
|
+
return {
|
|
827
|
+
isValid: false,
|
|
828
|
+
errorMessage: __3(
|
|
829
|
+
"You\u2019ve reached the limit of 50 classes. Please remove an existing one to create a new class.",
|
|
830
|
+
"elementor"
|
|
831
|
+
)
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
return validateStyleLabel2(newClassLabel, event);
|
|
835
|
+
};
|
|
836
|
+
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
837
|
+
return { create, validate, entityName };
|
|
654
838
|
}
|
|
655
839
|
function hasReachedLimit(provider) {
|
|
656
840
|
return provider.actions.all().length >= provider.limit;
|
|
@@ -712,7 +896,7 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
712
896
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
713
897
|
|
|
714
898
|
// src/components/editing-panel.tsx
|
|
715
|
-
import * as
|
|
899
|
+
import * as React69 from "react";
|
|
716
900
|
import { ControlActionsProvider, ControlReplacementsProvider } from "@elementor/editor-controls";
|
|
717
901
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
718
902
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
@@ -720,16 +904,16 @@ import { ThemeProvider as ThemeProvider9 } from "@elementor/editor-ui";
|
|
|
720
904
|
import { AtomIcon } from "@elementor/icons";
|
|
721
905
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
722
906
|
import { ErrorBoundary } from "@elementor/ui";
|
|
723
|
-
import { __ as
|
|
907
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
724
908
|
|
|
725
909
|
// src/controls-actions.ts
|
|
726
910
|
import { createMenu } from "@elementor/menus";
|
|
727
911
|
|
|
728
912
|
// src/popover-action.tsx
|
|
729
913
|
import * as React8 from "react";
|
|
730
|
-
import { useId } from "react";
|
|
914
|
+
import { useId as useId2 } from "react";
|
|
731
915
|
import { XIcon } from "@elementor/icons";
|
|
732
|
-
import { bindPopover, bindToggle, IconButton, Popover, Stack as Stack4, Tooltip, Typography as
|
|
916
|
+
import { bindPopover, bindToggle, IconButton, Popover, Stack as Stack4, Tooltip, Typography as Typography3, usePopupState as usePopupState2 } from "@elementor/ui";
|
|
733
917
|
var SIZE = "tiny";
|
|
734
918
|
function PopoverAction({
|
|
735
919
|
title,
|
|
@@ -737,7 +921,7 @@ function PopoverAction({
|
|
|
737
921
|
icon: Icon,
|
|
738
922
|
popoverContent: PopoverContent2
|
|
739
923
|
}) {
|
|
740
|
-
const id =
|
|
924
|
+
const id = useId2();
|
|
741
925
|
const popupState = usePopupState2({
|
|
742
926
|
variant: "popover",
|
|
743
927
|
popupId: `elementor-popover-action-${id}`
|
|
@@ -756,7 +940,7 @@ function PopoverAction({
|
|
|
756
940
|
},
|
|
757
941
|
...bindPopover(popupState)
|
|
758
942
|
},
|
|
759
|
-
/* @__PURE__ */ React8.createElement(Stack4, { 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(
|
|
943
|
+
/* @__PURE__ */ React8.createElement(Stack4, { 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 }))),
|
|
760
944
|
/* @__PURE__ */ React8.createElement(PopoverContent2, { closePopover: popupState.close })
|
|
761
945
|
));
|
|
762
946
|
}
|
|
@@ -770,24 +954,63 @@ var controlActionsMenu = createMenu({
|
|
|
770
954
|
|
|
771
955
|
// src/components/editing-panel-error-fallback.tsx
|
|
772
956
|
import * as React9 from "react";
|
|
773
|
-
import { Alert, Box } from "@elementor/ui";
|
|
957
|
+
import { Alert, Box as Box2 } from "@elementor/ui";
|
|
774
958
|
function EditorPanelErrorFallback() {
|
|
775
|
-
return /* @__PURE__ */ React9.createElement(
|
|
959
|
+
return /* @__PURE__ */ React9.createElement(Box2, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React9.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React9.createElement("strong", null, "Something went wrong")));
|
|
776
960
|
}
|
|
777
961
|
|
|
778
962
|
// src/components/editing-panel-tabs.tsx
|
|
779
|
-
import * as
|
|
963
|
+
import * as React68 from "react";
|
|
780
964
|
import { Fragment as Fragment8 } from "react";
|
|
781
|
-
import { Divider as Divider5, Stack as
|
|
782
|
-
import { __ as
|
|
965
|
+
import { Divider as Divider5, Stack as Stack17, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
966
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
967
|
+
|
|
968
|
+
// src/contexts/scroll-context.tsx
|
|
969
|
+
import * as React10 from "react";
|
|
970
|
+
import { createContext as createContext4, useContext as useContext4, useEffect, useRef, useState as useState4 } from "react";
|
|
971
|
+
import { styled as styled3 } from "@elementor/ui";
|
|
972
|
+
var ScrollContext = createContext4(void 0);
|
|
973
|
+
var ScrollPanel = styled3("div")`
|
|
974
|
+
height: 100%;
|
|
975
|
+
overflow-y: auto;
|
|
976
|
+
`;
|
|
977
|
+
var DEFAULT_SCROLL_DIRECTION = "up";
|
|
978
|
+
function ScrollProvider({ children }) {
|
|
979
|
+
const [direction, setDirection] = useState4(DEFAULT_SCROLL_DIRECTION);
|
|
980
|
+
const ref = useRef(null);
|
|
981
|
+
const scrollPos = useRef(0);
|
|
982
|
+
useEffect(() => {
|
|
983
|
+
const scrollElement = ref.current;
|
|
984
|
+
if (!scrollElement) {
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
const handleScroll = () => {
|
|
988
|
+
const { scrollTop } = scrollElement;
|
|
989
|
+
if (scrollTop > scrollPos.current) {
|
|
990
|
+
setDirection("down");
|
|
991
|
+
} else if (scrollTop < scrollPos.current) {
|
|
992
|
+
setDirection("up");
|
|
993
|
+
}
|
|
994
|
+
scrollPos.current = scrollTop;
|
|
995
|
+
};
|
|
996
|
+
scrollElement.addEventListener("scroll", handleScroll);
|
|
997
|
+
return () => {
|
|
998
|
+
scrollElement.removeEventListener("scroll", handleScroll);
|
|
999
|
+
};
|
|
1000
|
+
});
|
|
1001
|
+
return /* @__PURE__ */ React10.createElement(ScrollContext.Provider, { value: { direction } }, /* @__PURE__ */ React10.createElement(ScrollPanel, { ref }, children));
|
|
1002
|
+
}
|
|
1003
|
+
function useScrollDirection() {
|
|
1004
|
+
return useContext4(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
|
|
1005
|
+
}
|
|
783
1006
|
|
|
784
1007
|
// src/components/settings-tab.tsx
|
|
785
|
-
import * as
|
|
1008
|
+
import * as React16 from "react";
|
|
786
1009
|
import { ControlFormLabel } from "@elementor/editor-controls";
|
|
787
1010
|
import { SessionStorageProvider } from "@elementor/session";
|
|
788
1011
|
|
|
789
1012
|
// src/controls-registry/control.tsx
|
|
790
|
-
import * as
|
|
1013
|
+
import * as React11 from "react";
|
|
791
1014
|
|
|
792
1015
|
// src/controls-registry/controls-registry.tsx
|
|
793
1016
|
import {
|
|
@@ -822,20 +1045,20 @@ var Control = ({ props, type }) => {
|
|
|
822
1045
|
context: { controlType: type }
|
|
823
1046
|
});
|
|
824
1047
|
}
|
|
825
|
-
return /* @__PURE__ */
|
|
1048
|
+
return /* @__PURE__ */ React11.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
826
1049
|
};
|
|
827
1050
|
|
|
828
1051
|
// src/controls-registry/control-type-container.tsx
|
|
829
|
-
import * as
|
|
830
|
-
import { Box as
|
|
1052
|
+
import * as React12 from "react";
|
|
1053
|
+
import { Box as Box3, styled as styled4 } from "@elementor/ui";
|
|
831
1054
|
var ControlTypeContainer = ({
|
|
832
1055
|
controlType,
|
|
833
1056
|
children
|
|
834
1057
|
}) => {
|
|
835
1058
|
const layout = getLayoutByType(controlType);
|
|
836
|
-
return /* @__PURE__ */
|
|
1059
|
+
return /* @__PURE__ */ React12.createElement(StyledContainer, { layout }, children);
|
|
837
1060
|
};
|
|
838
|
-
var StyledContainer =
|
|
1061
|
+
var StyledContainer = styled4(Box3, {
|
|
839
1062
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
840
1063
|
})(({ layout, theme }) => ({
|
|
841
1064
|
display: "grid",
|
|
@@ -851,7 +1074,7 @@ var getGridLayout = (layout) => ({
|
|
|
851
1074
|
});
|
|
852
1075
|
|
|
853
1076
|
// src/controls-registry/settings-field.tsx
|
|
854
|
-
import * as
|
|
1077
|
+
import * as React13 from "react";
|
|
855
1078
|
import { PropKeyProvider, PropProvider } from "@elementor/editor-controls";
|
|
856
1079
|
import { updateElementSettings as updateElementSettings3, useElementSetting as useElementSetting3 } from "@elementor/editor-elements";
|
|
857
1080
|
|
|
@@ -880,18 +1103,18 @@ var SettingsField = ({ bind, children }) => {
|
|
|
880
1103
|
props: { ...newValue }
|
|
881
1104
|
});
|
|
882
1105
|
};
|
|
883
|
-
return /* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ React13.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React13.createElement(PropKeyProvider, { bind }, children));
|
|
884
1107
|
};
|
|
885
1108
|
|
|
886
1109
|
// src/components/section.tsx
|
|
887
|
-
import * as
|
|
888
|
-
import { useId as
|
|
1110
|
+
import * as React14 from "react";
|
|
1111
|
+
import { useId as useId3, useState as useState5 } from "react";
|
|
889
1112
|
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack5 } from "@elementor/ui";
|
|
890
1113
|
|
|
891
1114
|
// src/components/collapse-icon.tsx
|
|
892
1115
|
import { ChevronDownIcon } from "@elementor/icons";
|
|
893
|
-
import { styled as
|
|
894
|
-
var CollapseIcon =
|
|
1116
|
+
import { styled as styled5 } from "@elementor/ui";
|
|
1117
|
+
var CollapseIcon = styled5(ChevronDownIcon, {
|
|
895
1118
|
shouldForwardProp: (prop) => prop !== "open"
|
|
896
1119
|
})(({ theme, open }) => ({
|
|
897
1120
|
transform: open ? "rotate(180deg)" : "rotate(0deg)",
|
|
@@ -902,11 +1125,11 @@ var CollapseIcon = styled3(ChevronDownIcon, {
|
|
|
902
1125
|
|
|
903
1126
|
// src/components/section.tsx
|
|
904
1127
|
function Section({ title, children, defaultExpanded = false }) {
|
|
905
|
-
const [isOpen, setIsOpen] =
|
|
906
|
-
const id =
|
|
1128
|
+
const [isOpen, setIsOpen] = useState5(!!defaultExpanded);
|
|
1129
|
+
const id = useId3();
|
|
907
1130
|
const labelId = `label-${id}`;
|
|
908
1131
|
const contentId = `content-${id}`;
|
|
909
|
-
return /* @__PURE__ */
|
|
1132
|
+
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
|
|
910
1133
|
ListItemButton,
|
|
911
1134
|
{
|
|
912
1135
|
id: labelId,
|
|
@@ -914,35 +1137,35 @@ function Section({ title, children, defaultExpanded = false }) {
|
|
|
914
1137
|
onClick: () => setIsOpen((prev) => !prev),
|
|
915
1138
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
916
1139
|
},
|
|
917
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ React14.createElement(
|
|
918
1141
|
ListItemText,
|
|
919
1142
|
{
|
|
920
1143
|
secondary: title,
|
|
921
1144
|
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" }
|
|
922
1145
|
}
|
|
923
1146
|
),
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
-
), /* @__PURE__ */
|
|
1147
|
+
/* @__PURE__ */ React14.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
1148
|
+
), /* @__PURE__ */ React14.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React14.createElement(Stack5, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React14.createElement(Divider2, null));
|
|
926
1149
|
}
|
|
927
1150
|
|
|
928
1151
|
// src/components/sections-list.tsx
|
|
929
|
-
import * as
|
|
1152
|
+
import * as React15 from "react";
|
|
930
1153
|
import { List } from "@elementor/ui";
|
|
931
1154
|
function SectionsList(props) {
|
|
932
|
-
return /* @__PURE__ */
|
|
1155
|
+
return /* @__PURE__ */ React15.createElement(List, { disablePadding: true, component: "div", ...props });
|
|
933
1156
|
}
|
|
934
1157
|
|
|
935
1158
|
// src/components/settings-tab.tsx
|
|
936
1159
|
var SettingsTab = () => {
|
|
937
1160
|
const { elementType, element } = useElement();
|
|
938
|
-
return /* @__PURE__ */
|
|
1161
|
+
return /* @__PURE__ */ React16.createElement(SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React16.createElement(SectionsList, null, elementType.controls.map(({ type, value }, index) => {
|
|
939
1162
|
if (type === "control") {
|
|
940
|
-
return /* @__PURE__ */
|
|
1163
|
+
return /* @__PURE__ */ React16.createElement(Control2, { key: value.bind, control: value });
|
|
941
1164
|
}
|
|
942
1165
|
if (type === "section") {
|
|
943
|
-
return /* @__PURE__ */
|
|
1166
|
+
return /* @__PURE__ */ React16.createElement(Section, { title: value.label, key: type + "." + index, defaultExpanded: true }, value.items?.map((item) => {
|
|
944
1167
|
if (item.type === "control") {
|
|
945
|
-
return /* @__PURE__ */
|
|
1168
|
+
return /* @__PURE__ */ React16.createElement(Control2, { key: item.value.bind, control: item.value });
|
|
946
1169
|
}
|
|
947
1170
|
return null;
|
|
948
1171
|
}));
|
|
@@ -954,32 +1177,32 @@ var Control2 = ({ control }) => {
|
|
|
954
1177
|
if (!getControlByType(control.type)) {
|
|
955
1178
|
return null;
|
|
956
1179
|
}
|
|
957
|
-
return /* @__PURE__ */
|
|
1180
|
+
return /* @__PURE__ */ React16.createElement(SettingsField, { bind: control.bind }, /* @__PURE__ */ React16.createElement(ControlTypeContainer, { controlType: control.type }, control.label ? /* @__PURE__ */ React16.createElement(ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React16.createElement(Control, { type: control.type, props: control.props })));
|
|
958
1181
|
};
|
|
959
1182
|
|
|
960
1183
|
// src/components/style-tab.tsx
|
|
961
|
-
import * as
|
|
962
|
-
import { useState as
|
|
1184
|
+
import * as React67 from "react";
|
|
1185
|
+
import { useState as useState10 } from "react";
|
|
963
1186
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
964
1187
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
965
1188
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
966
|
-
import { Divider as Divider4 } from "@elementor/ui";
|
|
967
|
-
import { __ as
|
|
1189
|
+
import { Divider as Divider4, Stack as Stack16 } from "@elementor/ui";
|
|
1190
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
968
1191
|
|
|
969
1192
|
// src/contexts/styles-inheritance-context.tsx
|
|
970
|
-
import * as
|
|
971
|
-
import { createContext as
|
|
1193
|
+
import * as React17 from "react";
|
|
1194
|
+
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
972
1195
|
import { getWidgetsCache, useElementSetting as useElementSetting4 } from "@elementor/editor-elements";
|
|
973
1196
|
import { classesPropTypeUtil as classesPropTypeUtil2 } from "@elementor/editor-props";
|
|
974
1197
|
import { getBreakpointsTree } from "@elementor/editor-responsive";
|
|
975
1198
|
import { stylesRepository as stylesRepository5 } from "@elementor/editor-styles-repository";
|
|
976
1199
|
|
|
977
1200
|
// src/hooks/use-styles-rerender.ts
|
|
978
|
-
import { useEffect, useReducer } from "react";
|
|
1201
|
+
import { useEffect as useEffect2, useReducer } from "react";
|
|
979
1202
|
var useStylesRerender = () => {
|
|
980
1203
|
const { provider } = useStyle();
|
|
981
1204
|
const [, reRender] = useReducer((p) => !p, false);
|
|
982
|
-
|
|
1205
|
+
useEffect2(() => provider?.subscribe(reRender), [provider]);
|
|
983
1206
|
};
|
|
984
1207
|
|
|
985
1208
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
@@ -1140,15 +1363,15 @@ function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
|
1140
1363
|
}
|
|
1141
1364
|
|
|
1142
1365
|
// src/contexts/styles-inheritance-context.tsx
|
|
1143
|
-
var Context4 =
|
|
1366
|
+
var Context4 = createContext5(null);
|
|
1144
1367
|
function StyleInheritanceProvider({ children }) {
|
|
1145
1368
|
const styleDefs = useAppliedStyles();
|
|
1146
1369
|
const breakpointsTree = getBreakpointsTree();
|
|
1147
1370
|
const getSnapshot = createStylesInheritance(styleDefs, breakpointsTree);
|
|
1148
|
-
return /* @__PURE__ */
|
|
1371
|
+
return /* @__PURE__ */ React17.createElement(Context4.Provider, { value: { getSnapshot } }, children);
|
|
1149
1372
|
}
|
|
1150
1373
|
function useStylesInheritanceFields(fields) {
|
|
1151
|
-
const context =
|
|
1374
|
+
const context = useContext5(Context4);
|
|
1152
1375
|
const { meta } = useStyle();
|
|
1153
1376
|
if (!context) {
|
|
1154
1377
|
throw new Error("useStylesInheritanceFields must be used within a StyleInheritanceProvider");
|
|
@@ -1182,10 +1405,10 @@ var useBaseStyles = () => {
|
|
|
1182
1405
|
};
|
|
1183
1406
|
|
|
1184
1407
|
// src/hooks/use-active-style-def-id.ts
|
|
1185
|
-
import { useState as
|
|
1408
|
+
import { useState as useState6 } from "react";
|
|
1186
1409
|
import { getElementStyles, useElementSetting as useElementSetting5 } from "@elementor/editor-elements";
|
|
1187
1410
|
function useActiveStyleDefId(classProp) {
|
|
1188
|
-
const [activeStyledDefId, setActiveStyledDefId] =
|
|
1411
|
+
const [activeStyledDefId, setActiveStyledDefId] = useState6(null);
|
|
1189
1412
|
const appliedClassesIds = useAppliedClassesIds2(classProp)?.value || [];
|
|
1190
1413
|
const fallback = useFirstAppliedClass(appliedClassesIds);
|
|
1191
1414
|
const activeAndAppliedClassId = useActiveAndAppliedClassId(activeStyledDefId, appliedClassesIds);
|
|
@@ -1206,16 +1429,16 @@ function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
|
1206
1429
|
}
|
|
1207
1430
|
|
|
1208
1431
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1209
|
-
import * as
|
|
1432
|
+
import * as React20 from "react";
|
|
1210
1433
|
import { BackgroundControl } from "@elementor/editor-controls";
|
|
1211
1434
|
|
|
1212
1435
|
// src/controls-registry/styles-field.tsx
|
|
1213
|
-
import * as
|
|
1436
|
+
import * as React19 from "react";
|
|
1214
1437
|
import { ControlAdornmentsProvider, PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2 } from "@elementor/editor-controls";
|
|
1215
1438
|
import { getStylesSchema } from "@elementor/editor-styles";
|
|
1216
1439
|
|
|
1217
1440
|
// src/hooks/use-styles-fields.ts
|
|
1218
|
-
import { useMemo } from "react";
|
|
1441
|
+
import { useMemo as useMemo2 } from "react";
|
|
1219
1442
|
import {
|
|
1220
1443
|
createElementStyle,
|
|
1221
1444
|
deleteElementStyle,
|
|
@@ -1273,7 +1496,7 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
1273
1496
|
);
|
|
1274
1497
|
}
|
|
1275
1498
|
function useUndoableCreateElementStyle() {
|
|
1276
|
-
return
|
|
1499
|
+
return useMemo2(() => {
|
|
1277
1500
|
return undoable(
|
|
1278
1501
|
{
|
|
1279
1502
|
do: (payload) => {
|
|
@@ -1301,7 +1524,7 @@ function useUndoableCreateElementStyle() {
|
|
|
1301
1524
|
}, []);
|
|
1302
1525
|
}
|
|
1303
1526
|
function useUndoableUpdateStyle() {
|
|
1304
|
-
return
|
|
1527
|
+
return useMemo2(() => {
|
|
1305
1528
|
return undoable(
|
|
1306
1529
|
{
|
|
1307
1530
|
do: ({ elementId, styleId, provider, meta, props }) => {
|
|
@@ -1355,7 +1578,7 @@ function useStylesField(propName) {
|
|
|
1355
1578
|
}
|
|
1356
1579
|
|
|
1357
1580
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1358
|
-
import * as
|
|
1581
|
+
import * as React18 from "react";
|
|
1359
1582
|
import { useBoundProp } from "@elementor/editor-controls";
|
|
1360
1583
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY, isElementsStylesProvider as isElementsStylesProvider3 } from "@elementor/editor-styles-repository";
|
|
1361
1584
|
import { __ as __5 } from "@wordpress/i18n";
|
|
@@ -1373,7 +1596,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1373
1596
|
}
|
|
1374
1597
|
const { breakpoint, state } = variant.meta;
|
|
1375
1598
|
if (style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state) {
|
|
1376
|
-
return /* @__PURE__ */
|
|
1599
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1377
1600
|
StyleIndicator,
|
|
1378
1601
|
{
|
|
1379
1602
|
"aria-label": __5("This is the final value", "elementor"),
|
|
@@ -1382,7 +1605,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1382
1605
|
);
|
|
1383
1606
|
}
|
|
1384
1607
|
if (value !== null && value !== void 0) {
|
|
1385
|
-
return /* @__PURE__ */
|
|
1608
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1386
1609
|
StyleIndicator,
|
|
1387
1610
|
{
|
|
1388
1611
|
"aria-label": __5("This value is overridden by another style", "elementor"),
|
|
@@ -1390,7 +1613,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1390
1613
|
}
|
|
1391
1614
|
);
|
|
1392
1615
|
}
|
|
1393
|
-
return /* @__PURE__ */
|
|
1616
|
+
return /* @__PURE__ */ React18.createElement(StyleIndicator, { "aria-label": __5("This has value from another style", "elementor") });
|
|
1394
1617
|
};
|
|
1395
1618
|
|
|
1396
1619
|
// src/controls-registry/styles-field.tsx
|
|
@@ -1403,7 +1626,7 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
1403
1626
|
const setValues = (newValue) => {
|
|
1404
1627
|
setValue(newValue[bind]);
|
|
1405
1628
|
};
|
|
1406
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ React19.createElement(
|
|
1407
1630
|
ControlAdornmentsProvider,
|
|
1408
1631
|
{
|
|
1409
1632
|
items: [
|
|
@@ -1413,7 +1636,7 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
1413
1636
|
}
|
|
1414
1637
|
]
|
|
1415
1638
|
},
|
|
1416
|
-
/* @__PURE__ */
|
|
1639
|
+
/* @__PURE__ */ React19.createElement(
|
|
1417
1640
|
PropProvider2,
|
|
1418
1641
|
{
|
|
1419
1642
|
propType,
|
|
@@ -1421,50 +1644,50 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
1421
1644
|
setValue: setValues,
|
|
1422
1645
|
placeholder: placeholderValues
|
|
1423
1646
|
},
|
|
1424
|
-
/* @__PURE__ */
|
|
1647
|
+
/* @__PURE__ */ React19.createElement(PropKeyProvider2, { bind }, children)
|
|
1425
1648
|
)
|
|
1426
1649
|
);
|
|
1427
1650
|
};
|
|
1428
1651
|
|
|
1429
1652
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1430
1653
|
var BackgroundSection = () => {
|
|
1431
|
-
return /* @__PURE__ */
|
|
1654
|
+
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React20.createElement(BackgroundControl, null));
|
|
1432
1655
|
};
|
|
1433
1656
|
|
|
1434
1657
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1435
|
-
import * as
|
|
1658
|
+
import * as React30 from "react";
|
|
1436
1659
|
|
|
1437
1660
|
// src/components/panel-divider.tsx
|
|
1438
|
-
import * as
|
|
1661
|
+
import * as React21 from "react";
|
|
1439
1662
|
import { Divider as Divider3 } from "@elementor/ui";
|
|
1440
|
-
var PanelDivider = () => /* @__PURE__ */
|
|
1663
|
+
var PanelDivider = () => /* @__PURE__ */ React21.createElement(Divider3, { sx: { my: 0.5 } });
|
|
1441
1664
|
|
|
1442
1665
|
// src/components/section-content.tsx
|
|
1443
|
-
import * as
|
|
1666
|
+
import * as React22 from "react";
|
|
1444
1667
|
import { Stack as Stack6 } from "@elementor/ui";
|
|
1445
|
-
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */
|
|
1668
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React22.createElement(Stack6, { gap, sx: { ...sx } }, children);
|
|
1446
1669
|
|
|
1447
1670
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1448
|
-
import * as
|
|
1671
|
+
import * as React28 from "react";
|
|
1449
1672
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1450
1673
|
|
|
1451
1674
|
// src/components/add-or-remove-content.tsx
|
|
1452
|
-
import * as
|
|
1675
|
+
import * as React24 from "react";
|
|
1453
1676
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
1454
1677
|
import { Collapse as Collapse2, IconButton as IconButton2, Stack as Stack8 } from "@elementor/ui";
|
|
1455
1678
|
|
|
1456
1679
|
// src/components/control-label.tsx
|
|
1457
|
-
import * as
|
|
1680
|
+
import * as React23 from "react";
|
|
1458
1681
|
import { ControlAdornments, ControlFormLabel as ControlFormLabel2 } from "@elementor/editor-controls";
|
|
1459
1682
|
import { Stack as Stack7 } from "@elementor/ui";
|
|
1460
1683
|
var ControlLabel = ({ children }) => {
|
|
1461
|
-
return /* @__PURE__ */
|
|
1684
|
+
return /* @__PURE__ */ React23.createElement(Stack7, { direction: "row", alignItems: "center", justifyItems: "start", gap: 1 }, /* @__PURE__ */ React23.createElement(ControlFormLabel2, null, children), /* @__PURE__ */ React23.createElement(ControlAdornments, null));
|
|
1462
1685
|
};
|
|
1463
1686
|
|
|
1464
1687
|
// src/components/add-or-remove-content.tsx
|
|
1465
1688
|
var SIZE2 = "tiny";
|
|
1466
1689
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
1467
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ React24.createElement(SectionContent, null, /* @__PURE__ */ React24.createElement(
|
|
1468
1691
|
Stack8,
|
|
1469
1692
|
{
|
|
1470
1693
|
direction: "row",
|
|
@@ -1474,22 +1697,22 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1474
1697
|
marginInlineEnd: -0.75
|
|
1475
1698
|
}
|
|
1476
1699
|
},
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
-
isAdded ? /* @__PURE__ */
|
|
1479
|
-
), /* @__PURE__ */
|
|
1700
|
+
/* @__PURE__ */ React24.createElement(ControlLabel, null, label),
|
|
1701
|
+
isAdded ? /* @__PURE__ */ React24.createElement(IconButton2, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React24.createElement(MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React24.createElement(IconButton2, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React24.createElement(PlusIcon, { fontSize: SIZE2 }))
|
|
1702
|
+
), /* @__PURE__ */ React24.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React24.createElement(SectionContent, null, children)));
|
|
1480
1703
|
};
|
|
1481
1704
|
|
|
1482
1705
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
1483
|
-
import * as
|
|
1706
|
+
import * as React25 from "react";
|
|
1484
1707
|
import { ColorControl } from "@elementor/editor-controls";
|
|
1485
1708
|
import { Grid } from "@elementor/ui";
|
|
1486
1709
|
import { __ as __6 } from "@wordpress/i18n";
|
|
1487
1710
|
var BorderColorField = () => {
|
|
1488
|
-
return /* @__PURE__ */
|
|
1711
|
+
return /* @__PURE__ */ React25.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React25.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React25.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React25.createElement(ControlLabel, null, __6("Border color", "elementor"))), /* @__PURE__ */ React25.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React25.createElement(ColorControl, null))));
|
|
1489
1712
|
};
|
|
1490
1713
|
|
|
1491
1714
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1492
|
-
import * as
|
|
1715
|
+
import * as React26 from "react";
|
|
1493
1716
|
import { SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
1494
1717
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
1495
1718
|
import { __ as __7 } from "@wordpress/i18n";
|
|
@@ -1505,11 +1728,11 @@ var borderStyles = [
|
|
|
1505
1728
|
{ value: "outset", label: __7("Outset", "elementor") }
|
|
1506
1729
|
];
|
|
1507
1730
|
var BorderStyleField = () => {
|
|
1508
|
-
return /* @__PURE__ */
|
|
1731
|
+
return /* @__PURE__ */ React26.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React26.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, __7("Border type", "elementor"))), /* @__PURE__ */ React26.createElement(Grid2, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React26.createElement(SelectControl2, { options: borderStyles }))));
|
|
1509
1732
|
};
|
|
1510
1733
|
|
|
1511
1734
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1512
|
-
import * as
|
|
1735
|
+
import * as React27 from "react";
|
|
1513
1736
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
1514
1737
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
1515
1738
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
@@ -1530,33 +1753,33 @@ var InlineEndIcon = withDirection(SideLeftIcon);
|
|
|
1530
1753
|
var getEdges = (isSiteRtl) => [
|
|
1531
1754
|
{
|
|
1532
1755
|
label: __8("Top", "elementor"),
|
|
1533
|
-
icon: /* @__PURE__ */
|
|
1756
|
+
icon: /* @__PURE__ */ React27.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1534
1757
|
bind: "block-start"
|
|
1535
1758
|
},
|
|
1536
1759
|
{
|
|
1537
1760
|
label: isSiteRtl ? __8("Left", "elementor") : __8("Right", "elementor"),
|
|
1538
|
-
icon: /* @__PURE__ */
|
|
1761
|
+
icon: /* @__PURE__ */ React27.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
1539
1762
|
bind: "inline-end"
|
|
1540
1763
|
},
|
|
1541
1764
|
{
|
|
1542
1765
|
label: __8("Bottom", "elementor"),
|
|
1543
|
-
icon: /* @__PURE__ */
|
|
1766
|
+
icon: /* @__PURE__ */ React27.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1544
1767
|
bind: "block-end"
|
|
1545
1768
|
},
|
|
1546
1769
|
{
|
|
1547
1770
|
label: isSiteRtl ? __8("Right", "elementor") : __8("Left", "elementor"),
|
|
1548
|
-
icon: /* @__PURE__ */
|
|
1771
|
+
icon: /* @__PURE__ */ React27.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
1549
1772
|
bind: "inline-start"
|
|
1550
1773
|
}
|
|
1551
1774
|
];
|
|
1552
1775
|
var BorderWidthField = () => {
|
|
1553
1776
|
const { isSiteRtl } = useDirection();
|
|
1554
|
-
return /* @__PURE__ */
|
|
1777
|
+
return /* @__PURE__ */ React27.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React27.createElement(
|
|
1555
1778
|
EqualUnequalSizesControl,
|
|
1556
1779
|
{
|
|
1557
1780
|
items: getEdges(isSiteRtl),
|
|
1558
1781
|
label: __8("Border width", "elementor"),
|
|
1559
|
-
icon: /* @__PURE__ */
|
|
1782
|
+
icon: /* @__PURE__ */ React27.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
1560
1783
|
tooltipLabel: __8("Adjust borders", "elementor"),
|
|
1561
1784
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
1562
1785
|
}
|
|
@@ -1582,7 +1805,7 @@ var BorderField = () => {
|
|
|
1582
1805
|
});
|
|
1583
1806
|
};
|
|
1584
1807
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
1585
|
-
return /* @__PURE__ */
|
|
1808
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1586
1809
|
AddOrRemoveContent,
|
|
1587
1810
|
{
|
|
1588
1811
|
label: __9("Border", "elementor"),
|
|
@@ -1590,14 +1813,14 @@ var BorderField = () => {
|
|
|
1590
1813
|
onAdd: addBorder,
|
|
1591
1814
|
onRemove: removeBorder
|
|
1592
1815
|
},
|
|
1593
|
-
/* @__PURE__ */
|
|
1594
|
-
/* @__PURE__ */
|
|
1595
|
-
/* @__PURE__ */
|
|
1816
|
+
/* @__PURE__ */ React28.createElement(BorderWidthField, null),
|
|
1817
|
+
/* @__PURE__ */ React28.createElement(BorderColorField, null),
|
|
1818
|
+
/* @__PURE__ */ React28.createElement(BorderStyleField, null)
|
|
1596
1819
|
);
|
|
1597
1820
|
};
|
|
1598
1821
|
|
|
1599
1822
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1600
|
-
import * as
|
|
1823
|
+
import * as React29 from "react";
|
|
1601
1824
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
1602
1825
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
1603
1826
|
import {
|
|
@@ -1620,33 +1843,33 @@ var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __10("Bottom left", "elementor")
|
|
|
1620
1843
|
var getCorners = (isSiteRtl) => [
|
|
1621
1844
|
{
|
|
1622
1845
|
label: getStartStartLabel(isSiteRtl),
|
|
1623
|
-
icon: /* @__PURE__ */
|
|
1846
|
+
icon: /* @__PURE__ */ React29.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
1624
1847
|
bind: "start-start"
|
|
1625
1848
|
},
|
|
1626
1849
|
{
|
|
1627
1850
|
label: getStartEndLabel(isSiteRtl),
|
|
1628
|
-
icon: /* @__PURE__ */
|
|
1851
|
+
icon: /* @__PURE__ */ React29.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
1629
1852
|
bind: "start-end"
|
|
1630
1853
|
},
|
|
1631
1854
|
{
|
|
1632
1855
|
label: getEndStartLabel(isSiteRtl),
|
|
1633
|
-
icon: /* @__PURE__ */
|
|
1856
|
+
icon: /* @__PURE__ */ React29.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
1634
1857
|
bind: "end-start"
|
|
1635
1858
|
},
|
|
1636
1859
|
{
|
|
1637
1860
|
label: getEndEndLabel(isSiteRtl),
|
|
1638
|
-
icon: /* @__PURE__ */
|
|
1861
|
+
icon: /* @__PURE__ */ React29.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
1639
1862
|
bind: "end-end"
|
|
1640
1863
|
}
|
|
1641
1864
|
];
|
|
1642
1865
|
var BorderRadiusField = () => {
|
|
1643
1866
|
const { isSiteRtl } = useDirection();
|
|
1644
|
-
return /* @__PURE__ */
|
|
1867
|
+
return /* @__PURE__ */ React29.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React29.createElement(
|
|
1645
1868
|
EqualUnequalSizesControl2,
|
|
1646
1869
|
{
|
|
1647
1870
|
items: getCorners(isSiteRtl),
|
|
1648
1871
|
label: __10("Border radius", "elementor"),
|
|
1649
|
-
icon: /* @__PURE__ */
|
|
1872
|
+
icon: /* @__PURE__ */ React29.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
1650
1873
|
tooltipLabel: __10("Adjust corners", "elementor"),
|
|
1651
1874
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
1652
1875
|
}
|
|
@@ -1654,17 +1877,17 @@ var BorderRadiusField = () => {
|
|
|
1654
1877
|
};
|
|
1655
1878
|
|
|
1656
1879
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1657
|
-
var BorderSection = () => /* @__PURE__ */
|
|
1880
|
+
var BorderSection = () => /* @__PURE__ */ React30.createElement(SectionContent, null, /* @__PURE__ */ React30.createElement(BorderRadiusField, null), /* @__PURE__ */ React30.createElement(PanelDivider, null), /* @__PURE__ */ React30.createElement(BorderField, null));
|
|
1658
1881
|
|
|
1659
1882
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
1660
|
-
import * as
|
|
1883
|
+
import * as React31 from "react";
|
|
1661
1884
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
1662
1885
|
var EffectsSection = () => {
|
|
1663
|
-
return /* @__PURE__ */
|
|
1886
|
+
return /* @__PURE__ */ React31.createElement(SectionContent, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React31.createElement(BoxShadowRepeaterControl, null)));
|
|
1664
1887
|
};
|
|
1665
1888
|
|
|
1666
1889
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1667
|
-
import * as
|
|
1890
|
+
import * as React43 from "react";
|
|
1668
1891
|
import { ControlFormLabel as ControlFormLabel3 } from "@elementor/editor-controls";
|
|
1669
1892
|
import { useParentElement } from "@elementor/editor-elements";
|
|
1670
1893
|
import { __ as __21 } from "@wordpress/i18n";
|
|
@@ -1695,7 +1918,7 @@ function useComputedStyle(elementId) {
|
|
|
1695
1918
|
}
|
|
1696
1919
|
|
|
1697
1920
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
1698
|
-
import * as
|
|
1921
|
+
import * as React33 from "react";
|
|
1699
1922
|
import { ToggleControl } from "@elementor/editor-controls";
|
|
1700
1923
|
import {
|
|
1701
1924
|
JustifyBottomIcon,
|
|
@@ -1709,8 +1932,8 @@ import { DirectionProvider, Stack as Stack9, ThemeProvider, withDirection as wit
|
|
|
1709
1932
|
import { __ as __11 } from "@wordpress/i18n";
|
|
1710
1933
|
|
|
1711
1934
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1712
|
-
import * as
|
|
1713
|
-
import { useRef } from "react";
|
|
1935
|
+
import * as React32 from "react";
|
|
1936
|
+
import { useRef as useRef2 } from "react";
|
|
1714
1937
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1715
1938
|
var CLOCKWISE_ANGLES = {
|
|
1716
1939
|
row: 0,
|
|
@@ -1731,9 +1954,9 @@ var RotatedIcon = ({
|
|
|
1731
1954
|
offset = 0,
|
|
1732
1955
|
disableRotationForReversed = false
|
|
1733
1956
|
}) => {
|
|
1734
|
-
const rotate =
|
|
1957
|
+
const rotate = useRef2(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
1735
1958
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
1736
|
-
return /* @__PURE__ */
|
|
1959
|
+
return /* @__PURE__ */ React32.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1737
1960
|
};
|
|
1738
1961
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
1739
1962
|
const [direction] = useStylesField("flex-direction");
|
|
@@ -1763,47 +1986,47 @@ var options = [
|
|
|
1763
1986
|
{
|
|
1764
1987
|
value: "start",
|
|
1765
1988
|
label: __11("Start", "elementor"),
|
|
1766
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1989
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1767
1990
|
showTooltip: true
|
|
1768
1991
|
},
|
|
1769
1992
|
{
|
|
1770
1993
|
value: "center",
|
|
1771
1994
|
label: __11("Center", "elementor"),
|
|
1772
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1995
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
1773
1996
|
showTooltip: true
|
|
1774
1997
|
},
|
|
1775
1998
|
{
|
|
1776
1999
|
value: "end",
|
|
1777
2000
|
label: __11("End", "elementor"),
|
|
1778
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2001
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1779
2002
|
showTooltip: true
|
|
1780
2003
|
},
|
|
1781
2004
|
{
|
|
1782
2005
|
value: "space-between",
|
|
1783
2006
|
label: __11("Space between", "elementor"),
|
|
1784
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2007
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps }),
|
|
1785
2008
|
showTooltip: true
|
|
1786
2009
|
},
|
|
1787
2010
|
{
|
|
1788
2011
|
value: "space-around",
|
|
1789
2012
|
label: __11("Space around", "elementor"),
|
|
1790
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2013
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps }),
|
|
1791
2014
|
showTooltip: true
|
|
1792
2015
|
},
|
|
1793
2016
|
{
|
|
1794
2017
|
value: "space-evenly",
|
|
1795
2018
|
label: __11("Space evenly", "elementor"),
|
|
1796
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2019
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps }),
|
|
1797
2020
|
showTooltip: true
|
|
1798
2021
|
}
|
|
1799
2022
|
];
|
|
1800
2023
|
var AlignContentField = () => {
|
|
1801
2024
|
const { isSiteRtl } = useDirection();
|
|
1802
|
-
return /* @__PURE__ */
|
|
2025
|
+
return /* @__PURE__ */ React33.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(ThemeProvider, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React33.createElement(Stack9, { gap: 1 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, __11("Align content", "elementor")), /* @__PURE__ */ React33.createElement(ToggleControl, { options, fullWidth: true })))));
|
|
1803
2026
|
};
|
|
1804
2027
|
|
|
1805
2028
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1806
|
-
import * as
|
|
2029
|
+
import * as React34 from "react";
|
|
1807
2030
|
import { ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
1808
2031
|
import {
|
|
1809
2032
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -1823,35 +2046,35 @@ var options2 = [
|
|
|
1823
2046
|
{
|
|
1824
2047
|
value: "start",
|
|
1825
2048
|
label: __12("Start", "elementor"),
|
|
1826
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2049
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1827
2050
|
showTooltip: true
|
|
1828
2051
|
},
|
|
1829
2052
|
{
|
|
1830
2053
|
value: "center",
|
|
1831
2054
|
label: __12("Center", "elementor"),
|
|
1832
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2055
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
1833
2056
|
showTooltip: true
|
|
1834
2057
|
},
|
|
1835
2058
|
{
|
|
1836
2059
|
value: "end",
|
|
1837
2060
|
label: __12("End", "elementor"),
|
|
1838
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2061
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1839
2062
|
showTooltip: true
|
|
1840
2063
|
},
|
|
1841
2064
|
{
|
|
1842
2065
|
value: "stretch",
|
|
1843
2066
|
label: __12("Stretch", "elementor"),
|
|
1844
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2067
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps2 }),
|
|
1845
2068
|
showTooltip: true
|
|
1846
2069
|
}
|
|
1847
2070
|
];
|
|
1848
2071
|
var AlignItemsField = () => {
|
|
1849
2072
|
const { isSiteRtl } = useDirection();
|
|
1850
|
-
return /* @__PURE__ */
|
|
2073
|
+
return /* @__PURE__ */ React34.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider2, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React34.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, __12("Align items", "elementor"))), /* @__PURE__ */ React34.createElement(Grid3, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(ToggleControl2, { options: options2 }))))));
|
|
1851
2074
|
};
|
|
1852
2075
|
|
|
1853
2076
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1854
|
-
import * as
|
|
2077
|
+
import * as React35 from "react";
|
|
1855
2078
|
import { ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
1856
2079
|
import {
|
|
1857
2080
|
LayoutAlignCenterIcon as CenterIcon3,
|
|
@@ -1876,7 +2099,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1876
2099
|
{
|
|
1877
2100
|
value: "start",
|
|
1878
2101
|
label: __13("Start", "elementor"),
|
|
1879
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2102
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1880
2103
|
RotatedIcon,
|
|
1881
2104
|
{
|
|
1882
2105
|
icon: StartIcon3,
|
|
@@ -1890,7 +2113,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1890
2113
|
{
|
|
1891
2114
|
value: "center",
|
|
1892
2115
|
label: __13("Center", "elementor"),
|
|
1893
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2116
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1894
2117
|
RotatedIcon,
|
|
1895
2118
|
{
|
|
1896
2119
|
icon: CenterIcon3,
|
|
@@ -1904,7 +2127,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1904
2127
|
{
|
|
1905
2128
|
value: "end",
|
|
1906
2129
|
label: __13("End", "elementor"),
|
|
1907
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2130
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1908
2131
|
RotatedIcon,
|
|
1909
2132
|
{
|
|
1910
2133
|
icon: EndIcon3,
|
|
@@ -1918,7 +2141,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1918
2141
|
{
|
|
1919
2142
|
value: "stretch",
|
|
1920
2143
|
label: __13("Stretch", "elementor"),
|
|
1921
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2144
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1922
2145
|
RotatedIcon,
|
|
1923
2146
|
{
|
|
1924
2147
|
icon: JustifyIcon2,
|
|
@@ -1932,11 +2155,11 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1932
2155
|
];
|
|
1933
2156
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
1934
2157
|
const { isSiteRtl } = useDirection();
|
|
1935
|
-
return /* @__PURE__ */
|
|
2158
|
+
return /* @__PURE__ */ React35.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(ThemeProvider3, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React35.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel, null, __13("Align self", "elementor"))), /* @__PURE__ */ React35.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React35.createElement(ToggleControl3, { options: getOptions(parentStyleDirection) }))))));
|
|
1936
2159
|
};
|
|
1937
2160
|
|
|
1938
2161
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1939
|
-
import * as
|
|
2162
|
+
import * as React36 from "react";
|
|
1940
2163
|
import { ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
1941
2164
|
import { Stack as Stack10 } from "@elementor/ui";
|
|
1942
2165
|
import { __ as __14 } from "@wordpress/i18n";
|
|
@@ -1968,12 +2191,12 @@ var displayFieldOptions = [
|
|
|
1968
2191
|
];
|
|
1969
2192
|
var DisplayField = () => {
|
|
1970
2193
|
const placeholder = useDisplayPlaceholderValue();
|
|
1971
|
-
return /* @__PURE__ */
|
|
2194
|
+
return /* @__PURE__ */ React36.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React36.createElement(Stack10, { gap: 0.75 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, __14("Display", "elementor")), /* @__PURE__ */ React36.createElement(ToggleControl4, { options: displayFieldOptions, fullWidth: true })));
|
|
1972
2195
|
};
|
|
1973
2196
|
var useDisplayPlaceholderValue = () => useStylesInheritanceField("display")[0]?.value ?? void 0;
|
|
1974
2197
|
|
|
1975
2198
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1976
|
-
import * as
|
|
2199
|
+
import * as React37 from "react";
|
|
1977
2200
|
import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
1978
2201
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
1979
2202
|
import { DirectionProvider as DirectionProvider4, Grid as Grid5, ThemeProvider as ThemeProvider4, withDirection as withDirection6 } from "@elementor/ui";
|
|
@@ -1984,14 +2207,14 @@ var options3 = [
|
|
|
1984
2207
|
label: __15("Row", "elementor"),
|
|
1985
2208
|
renderContent: ({ size }) => {
|
|
1986
2209
|
const StartIcon5 = withDirection6(ArrowRightIcon);
|
|
1987
|
-
return /* @__PURE__ */
|
|
2210
|
+
return /* @__PURE__ */ React37.createElement(StartIcon5, { fontSize: size });
|
|
1988
2211
|
},
|
|
1989
2212
|
showTooltip: true
|
|
1990
2213
|
},
|
|
1991
2214
|
{
|
|
1992
2215
|
value: "column",
|
|
1993
2216
|
label: __15("Column", "elementor"),
|
|
1994
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2217
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
1995
2218
|
showTooltip: true
|
|
1996
2219
|
},
|
|
1997
2220
|
{
|
|
@@ -1999,25 +2222,25 @@ var options3 = [
|
|
|
1999
2222
|
label: __15("Reversed row", "elementor"),
|
|
2000
2223
|
renderContent: ({ size }) => {
|
|
2001
2224
|
const EndIcon5 = withDirection6(ArrowLeftIcon);
|
|
2002
|
-
return /* @__PURE__ */
|
|
2225
|
+
return /* @__PURE__ */ React37.createElement(EndIcon5, { fontSize: size });
|
|
2003
2226
|
},
|
|
2004
2227
|
showTooltip: true
|
|
2005
2228
|
},
|
|
2006
2229
|
{
|
|
2007
2230
|
value: "column-reverse",
|
|
2008
2231
|
label: __15("Reversed column", "elementor"),
|
|
2009
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2232
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
2010
2233
|
showTooltip: true
|
|
2011
2234
|
}
|
|
2012
2235
|
];
|
|
2013
2236
|
var FlexDirectionField = () => {
|
|
2014
2237
|
const { isSiteRtl } = useDirection();
|
|
2015
|
-
return /* @__PURE__ */
|
|
2238
|
+
return /* @__PURE__ */ React37.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React37.createElement(ThemeProvider4, null, /* @__PURE__ */ React37.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React37.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, __15("Direction", "elementor"))), /* @__PURE__ */ React37.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React37.createElement(ToggleControl5, { options: options3 }))))));
|
|
2016
2239
|
};
|
|
2017
2240
|
|
|
2018
2241
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
2019
|
-
import * as
|
|
2020
|
-
import { useState as
|
|
2242
|
+
import * as React38 from "react";
|
|
2243
|
+
import { useState as useState7 } from "react";
|
|
2021
2244
|
import { ControlToggleButtonGroup, NumberControl } from "@elementor/editor-controls";
|
|
2022
2245
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
2023
2246
|
import { DirectionProvider as DirectionProvider5, Grid as Grid6, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
@@ -2035,25 +2258,25 @@ var items = [
|
|
|
2035
2258
|
{
|
|
2036
2259
|
value: FIRST,
|
|
2037
2260
|
label: __16("First", "elementor"),
|
|
2038
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2261
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
2039
2262
|
showTooltip: true
|
|
2040
2263
|
},
|
|
2041
2264
|
{
|
|
2042
2265
|
value: LAST,
|
|
2043
2266
|
label: __16("Last", "elementor"),
|
|
2044
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2267
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
2045
2268
|
showTooltip: true
|
|
2046
2269
|
},
|
|
2047
2270
|
{
|
|
2048
2271
|
value: CUSTOM,
|
|
2049
2272
|
label: __16("Custom", "elementor"),
|
|
2050
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2273
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(PencilIcon, { fontSize: size }),
|
|
2051
2274
|
showTooltip: true
|
|
2052
2275
|
}
|
|
2053
2276
|
];
|
|
2054
2277
|
var FlexOrderField = () => {
|
|
2055
2278
|
const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
|
|
2056
|
-
const [groupControlValue, setGroupControlValue] =
|
|
2279
|
+
const [groupControlValue, setGroupControlValue] = useState7(getGroupControlValue(order?.value || null));
|
|
2057
2280
|
const handleToggleButtonChange = (group) => {
|
|
2058
2281
|
setGroupControlValue(group);
|
|
2059
2282
|
if (!group || group === CUSTOM) {
|
|
@@ -2062,7 +2285,7 @@ var FlexOrderField = () => {
|
|
|
2062
2285
|
}
|
|
2063
2286
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
2064
2287
|
};
|
|
2065
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ React38.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(ThemeProvider5, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, __16("Order", "elementor"))), /* @__PURE__ */ React38.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(
|
|
2066
2289
|
ControlToggleButtonGroup,
|
|
2067
2290
|
{
|
|
2068
2291
|
items,
|
|
@@ -2070,7 +2293,7 @@ var FlexOrderField = () => {
|
|
|
2070
2293
|
onChange: handleToggleButtonChange,
|
|
2071
2294
|
exclusive: true
|
|
2072
2295
|
}
|
|
2073
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
2296
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React38.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, __16("Custom order", "elementor"))), /* @__PURE__ */ React38.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(
|
|
2074
2297
|
NumberControl,
|
|
2075
2298
|
{
|
|
2076
2299
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -2090,8 +2313,8 @@ var getGroupControlValue = (order) => {
|
|
|
2090
2313
|
};
|
|
2091
2314
|
|
|
2092
2315
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
2093
|
-
import * as
|
|
2094
|
-
import { useMemo as
|
|
2316
|
+
import * as React39 from "react";
|
|
2317
|
+
import { useMemo as useMemo3, useState as useState8 } from "react";
|
|
2095
2318
|
import {
|
|
2096
2319
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
2097
2320
|
NumberControl as NumberControl2,
|
|
@@ -2106,19 +2329,19 @@ var items2 = [
|
|
|
2106
2329
|
{
|
|
2107
2330
|
value: "flex-grow",
|
|
2108
2331
|
label: __17("Grow", "elementor"),
|
|
2109
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2332
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(ExpandIcon, { fontSize: size }),
|
|
2110
2333
|
showTooltip: true
|
|
2111
2334
|
},
|
|
2112
2335
|
{
|
|
2113
2336
|
value: "flex-shrink",
|
|
2114
2337
|
label: __17("Shrink", "elementor"),
|
|
2115
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2338
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(ShrinkIcon, { fontSize: size }),
|
|
2116
2339
|
showTooltip: true
|
|
2117
2340
|
},
|
|
2118
2341
|
{
|
|
2119
2342
|
value: "custom",
|
|
2120
2343
|
label: __17("Custom", "elementor"),
|
|
2121
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2344
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(PencilIcon2, { fontSize: size }),
|
|
2122
2345
|
showTooltip: true
|
|
2123
2346
|
}
|
|
2124
2347
|
];
|
|
@@ -2128,7 +2351,7 @@ var FlexSizeField = () => {
|
|
|
2128
2351
|
const grow = fields?.["flex-grow"]?.value || null;
|
|
2129
2352
|
const shrink = fields?.["flex-shrink"]?.value || null;
|
|
2130
2353
|
const basis = fields?.["flex-basis"]?.value || null;
|
|
2131
|
-
const currentGroup =
|
|
2354
|
+
const currentGroup = useMemo3(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = useState8(currentGroup);
|
|
2132
2355
|
const onChangeGroup = (group = null) => {
|
|
2133
2356
|
setActiveGroup(group);
|
|
2134
2357
|
if (!group || group === "custom") {
|
|
@@ -2153,7 +2376,7 @@ var FlexSizeField = () => {
|
|
|
2153
2376
|
"flex-shrink": numberPropTypeUtil.create(DEFAULT)
|
|
2154
2377
|
});
|
|
2155
2378
|
};
|
|
2156
|
-
return /* @__PURE__ */
|
|
2379
|
+
return /* @__PURE__ */ React39.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React39.createElement(ThemeProvider6, null, /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React39.createElement(ControlLabel, null, __17("Size", "elementor")))), /* @__PURE__ */ React39.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(
|
|
2157
2380
|
ControlToggleButtonGroup2,
|
|
2158
2381
|
{
|
|
2159
2382
|
value: activeGroup,
|
|
@@ -2161,9 +2384,9 @@ var FlexSizeField = () => {
|
|
|
2161
2384
|
items: items2,
|
|
2162
2385
|
exclusive: true
|
|
2163
2386
|
}
|
|
2164
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
2387
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React39.createElement(FlexCustomField, null))));
|
|
2165
2388
|
};
|
|
2166
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
2389
|
+
var FlexCustomField = () => /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React39.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, __17("Grow", "elementor"))), /* @__PURE__ */ React39.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React39.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React39.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, __17("Shrink", "elementor"))), /* @__PURE__ */ React39.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React39.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React39.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, __17("Basis", "elementor"))), /* @__PURE__ */ React39.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(SizeControl2, { extendedValues: ["auto"] })))));
|
|
2167
2390
|
var getActiveGroup = ({
|
|
2168
2391
|
grow,
|
|
2169
2392
|
shrink,
|
|
@@ -2185,16 +2408,16 @@ var getActiveGroup = ({
|
|
|
2185
2408
|
};
|
|
2186
2409
|
|
|
2187
2410
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
2188
|
-
import * as
|
|
2411
|
+
import * as React40 from "react";
|
|
2189
2412
|
import { GapControl } from "@elementor/editor-controls";
|
|
2190
2413
|
import { Stack as Stack11 } from "@elementor/ui";
|
|
2191
2414
|
import { __ as __18 } from "@wordpress/i18n";
|
|
2192
2415
|
var GapControlField = () => {
|
|
2193
|
-
return /* @__PURE__ */
|
|
2416
|
+
return /* @__PURE__ */ React40.createElement(Stack11, { gap: 1 }, /* @__PURE__ */ React40.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React40.createElement(GapControl, { label: __18("Gaps", "elementor") })));
|
|
2194
2417
|
};
|
|
2195
2418
|
|
|
2196
2419
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
2197
|
-
import * as
|
|
2420
|
+
import * as React41 from "react";
|
|
2198
2421
|
import { ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
2199
2422
|
import {
|
|
2200
2423
|
JustifyBottomIcon as JustifyBottomIcon2,
|
|
@@ -2216,47 +2439,47 @@ var options4 = [
|
|
|
2216
2439
|
{
|
|
2217
2440
|
value: "flex-start",
|
|
2218
2441
|
label: __19("Start", "elementor"),
|
|
2219
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2442
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
2220
2443
|
showTooltip: true
|
|
2221
2444
|
},
|
|
2222
2445
|
{
|
|
2223
2446
|
value: "center",
|
|
2224
2447
|
label: __19("Center", "elementor"),
|
|
2225
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2448
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: CenterIcon4, size, ...iconProps4 }),
|
|
2226
2449
|
showTooltip: true
|
|
2227
2450
|
},
|
|
2228
2451
|
{
|
|
2229
2452
|
value: "flex-end",
|
|
2230
2453
|
label: __19("End", "elementor"),
|
|
2231
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2454
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
2232
2455
|
showTooltip: true
|
|
2233
2456
|
},
|
|
2234
2457
|
{
|
|
2235
2458
|
value: "space-between",
|
|
2236
2459
|
label: __19("Space between", "elementor"),
|
|
2237
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2460
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
2238
2461
|
showTooltip: true
|
|
2239
2462
|
},
|
|
2240
2463
|
{
|
|
2241
2464
|
value: "space-around",
|
|
2242
2465
|
label: __19("Space around", "elementor"),
|
|
2243
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2466
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
2244
2467
|
showTooltip: true
|
|
2245
2468
|
},
|
|
2246
2469
|
{
|
|
2247
2470
|
value: "space-evenly",
|
|
2248
2471
|
label: __19("Space evenly", "elementor"),
|
|
2249
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2472
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
2250
2473
|
showTooltip: true
|
|
2251
2474
|
}
|
|
2252
2475
|
];
|
|
2253
2476
|
var JustifyContentField = () => {
|
|
2254
2477
|
const { isSiteRtl } = useDirection();
|
|
2255
|
-
return /* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ React41.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(ThemeProvider7, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React41.createElement(Stack12, { gap: 0.75 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, __19("Justify content", "elementor")), /* @__PURE__ */ React41.createElement(ToggleControl6, { options: options4, fullWidth: true })))));
|
|
2256
2479
|
};
|
|
2257
2480
|
|
|
2258
2481
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
2259
|
-
import * as
|
|
2482
|
+
import * as React42 from "react";
|
|
2260
2483
|
import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
2261
2484
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
2262
2485
|
import { DirectionProvider as DirectionProvider8, Grid as Grid8, ThemeProvider as ThemeProvider8 } from "@elementor/ui";
|
|
@@ -2265,25 +2488,25 @@ var options5 = [
|
|
|
2265
2488
|
{
|
|
2266
2489
|
value: "nowrap",
|
|
2267
2490
|
label: __20("No wrap", "elementor"),
|
|
2268
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2491
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
2269
2492
|
showTooltip: true
|
|
2270
2493
|
},
|
|
2271
2494
|
{
|
|
2272
2495
|
value: "wrap",
|
|
2273
2496
|
label: __20("Wrap", "elementor"),
|
|
2274
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2497
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(ArrowBackIcon, { fontSize: size }),
|
|
2275
2498
|
showTooltip: true
|
|
2276
2499
|
},
|
|
2277
2500
|
{
|
|
2278
2501
|
value: "wrap-reverse",
|
|
2279
2502
|
label: __20("Reversed wrap", "elementor"),
|
|
2280
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2503
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
2281
2504
|
showTooltip: true
|
|
2282
2505
|
}
|
|
2283
2506
|
];
|
|
2284
2507
|
var WrapField = () => {
|
|
2285
2508
|
const { isSiteRtl } = useDirection();
|
|
2286
|
-
return /* @__PURE__ */
|
|
2509
|
+
return /* @__PURE__ */ React42.createElement(DirectionProvider8, { rtl: isSiteRtl }, /* @__PURE__ */ React42.createElement(ThemeProvider8, null, /* @__PURE__ */ React42.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React42.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, __20("Wrap", "elementor"))), /* @__PURE__ */ React42.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React42.createElement(ToggleControl7, { options: options5 }))))));
|
|
2287
2510
|
};
|
|
2288
2511
|
|
|
2289
2512
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -2295,13 +2518,13 @@ var LayoutSection = () => {
|
|
|
2295
2518
|
const parent = useParentElement(element.id);
|
|
2296
2519
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
2297
2520
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
2298
|
-
return /* @__PURE__ */
|
|
2521
|
+
return /* @__PURE__ */ React43.createElement(SectionContent, null, /* @__PURE__ */ React43.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React43.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React43.createElement(FlexChildFields, { parentStyleDirection }));
|
|
2299
2522
|
};
|
|
2300
2523
|
var FlexFields = () => {
|
|
2301
2524
|
const [flexWrap] = useStylesField("flex-wrap");
|
|
2302
|
-
return /* @__PURE__ */
|
|
2525
|
+
return /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(FlexDirectionField, null), /* @__PURE__ */ React43.createElement(JustifyContentField, null), /* @__PURE__ */ React43.createElement(AlignItemsField, null), /* @__PURE__ */ React43.createElement(PanelDivider, null), /* @__PURE__ */ React43.createElement(GapControlField, null), /* @__PURE__ */ React43.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React43.createElement(AlignContentField, null));
|
|
2303
2526
|
};
|
|
2304
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
2527
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(PanelDivider, null), /* @__PURE__ */ React43.createElement(ControlFormLabel3, null, __21("Flex child", "elementor")), /* @__PURE__ */ React43.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React43.createElement(FlexOrderField, null), /* @__PURE__ */ React43.createElement(FlexSizeField, null));
|
|
2305
2528
|
var shouldDisplayFlexFields = (display, local) => {
|
|
2306
2529
|
const value = display?.value ?? local?.value;
|
|
2307
2530
|
if (!value) {
|
|
@@ -2311,11 +2534,11 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
2311
2534
|
};
|
|
2312
2535
|
|
|
2313
2536
|
// src/components/style-sections/position-section/position-section.tsx
|
|
2314
|
-
import * as
|
|
2537
|
+
import * as React48 from "react";
|
|
2315
2538
|
import { useSessionStorage } from "@elementor/session";
|
|
2316
2539
|
|
|
2317
2540
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
2318
|
-
import * as
|
|
2541
|
+
import * as React44 from "react";
|
|
2319
2542
|
import { SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
2320
2543
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
2321
2544
|
import { Grid as Grid9, Stack as Stack13, withDirection as withDirection8 } from "@elementor/ui";
|
|
@@ -2323,44 +2546,53 @@ import { __ as __22 } from "@wordpress/i18n";
|
|
|
2323
2546
|
var InlineStartIcon2 = withDirection8(SideLeftIcon2);
|
|
2324
2547
|
var InlineEndIcon2 = withDirection8(SideRightIcon2);
|
|
2325
2548
|
var sideIcons = {
|
|
2326
|
-
"inset-block-start": /* @__PURE__ */
|
|
2327
|
-
"inset-block-end": /* @__PURE__ */
|
|
2328
|
-
"inset-inline-start": /* @__PURE__ */
|
|
2329
|
-
"inset-inline-end": /* @__PURE__ */
|
|
2549
|
+
"inset-block-start": /* @__PURE__ */ React44.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
2550
|
+
"inset-block-end": /* @__PURE__ */ React44.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
2551
|
+
"inset-inline-start": /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
2552
|
+
"inset-inline-end": /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
2330
2553
|
};
|
|
2331
2554
|
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __22("Right", "elementor") : __22("Left", "elementor");
|
|
2332
2555
|
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __22("Left", "elementor") : __22("Right", "elementor");
|
|
2333
2556
|
var DimensionsField = () => {
|
|
2334
2557
|
const { isSiteRtl } = useDirection();
|
|
2335
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(Stack13, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(DimensionField, { side: "inset-block-start", label: __22("Top", "elementor") }), /* @__PURE__ */ React44.createElement(DimensionField, { side: "inset-inline-end", label: getInlineEndLabel(isSiteRtl) })), /* @__PURE__ */ React44.createElement(Stack13, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(DimensionField, { side: "inset-block-end", label: __22("Bottom", "elementor") }), /* @__PURE__ */ React44.createElement(DimensionField, { side: "inset-inline-start", label: getInlineStartLabel(isSiteRtl) })));
|
|
2336
2559
|
};
|
|
2337
2560
|
var DimensionField = ({ side, label }) => {
|
|
2338
|
-
return /* @__PURE__ */
|
|
2561
|
+
return /* @__PURE__ */ React44.createElement(Grid9, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React44.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(ControlLabel, null, label)), /* @__PURE__ */ React44.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(StylesField, { bind: side }, /* @__PURE__ */ React44.createElement(SizeControl3, { startIcon: sideIcons[side], extendedValues: ["auto"] }))));
|
|
2339
2562
|
};
|
|
2340
2563
|
|
|
2341
|
-
// src/components/style-sections/position-section/
|
|
2342
|
-
import * as
|
|
2343
|
-
import {
|
|
2564
|
+
// src/components/style-sections/position-section/offset-field.tsx
|
|
2565
|
+
import * as React45 from "react";
|
|
2566
|
+
import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
2344
2567
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
2345
2568
|
import { __ as __23 } from "@wordpress/i18n";
|
|
2569
|
+
var OffsetField = () => {
|
|
2570
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__PURE__ */ React45.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, __23("Anchor offset", "elementor"))), /* @__PURE__ */ React45.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(SizeControl4, { units: ["px", "em", "rem", "vw", "vh"] }))));
|
|
2571
|
+
};
|
|
2572
|
+
|
|
2573
|
+
// src/components/style-sections/position-section/position-field.tsx
|
|
2574
|
+
import * as React46 from "react";
|
|
2575
|
+
import { SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
2576
|
+
import { Grid as Grid11 } from "@elementor/ui";
|
|
2577
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
2346
2578
|
var positionOptions = [
|
|
2347
|
-
{ label:
|
|
2348
|
-
{ label:
|
|
2349
|
-
{ label:
|
|
2350
|
-
{ label:
|
|
2351
|
-
{ label:
|
|
2579
|
+
{ label: __24("Static", "elementor"), value: "static" },
|
|
2580
|
+
{ label: __24("Relative", "elementor"), value: "relative" },
|
|
2581
|
+
{ label: __24("Absolute", "elementor"), value: "absolute" },
|
|
2582
|
+
{ label: __24("Fixed", "elementor"), value: "fixed" },
|
|
2583
|
+
{ label: __24("Sticky", "elementor"), value: "sticky" }
|
|
2352
2584
|
];
|
|
2353
2585
|
var PositionField = ({ onChange }) => {
|
|
2354
|
-
return /* @__PURE__ */
|
|
2586
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React46.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, __24("Position", "elementor"))), /* @__PURE__ */ React46.createElement(Grid11, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React46.createElement(SelectControl3, { options: positionOptions, onChange }))));
|
|
2355
2587
|
};
|
|
2356
2588
|
|
|
2357
2589
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
2358
|
-
import * as
|
|
2590
|
+
import * as React47 from "react";
|
|
2359
2591
|
import { NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
2360
|
-
import { Grid as
|
|
2361
|
-
import { __ as
|
|
2592
|
+
import { Grid as Grid12 } from "@elementor/ui";
|
|
2593
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
2362
2594
|
var ZIndexField = () => {
|
|
2363
|
-
return /* @__PURE__ */
|
|
2595
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React47.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, __25("Z-index", "elementor"))), /* @__PURE__ */ React47.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(NumberControl3, null))));
|
|
2364
2596
|
};
|
|
2365
2597
|
|
|
2366
2598
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -2392,7 +2624,7 @@ var PositionSection = () => {
|
|
|
2392
2624
|
}
|
|
2393
2625
|
};
|
|
2394
2626
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
2395
|
-
return /* @__PURE__ */
|
|
2627
|
+
return /* @__PURE__ */ React48.createElement(SectionContent, null, /* @__PURE__ */ React48.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(DimensionsField, null), /* @__PURE__ */ React48.createElement(ZIndexField, null)) : null, /* @__PURE__ */ React48.createElement(PanelDivider, null), /* @__PURE__ */ React48.createElement(OffsetField, null));
|
|
2396
2628
|
};
|
|
2397
2629
|
var usePersistDimensions = () => {
|
|
2398
2630
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -2402,93 +2634,93 @@ var usePersistDimensions = () => {
|
|
|
2402
2634
|
};
|
|
2403
2635
|
|
|
2404
2636
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2405
|
-
import * as
|
|
2406
|
-
import { SizeControl as
|
|
2407
|
-
import { Grid as
|
|
2408
|
-
import { __ as
|
|
2637
|
+
import * as React50 from "react";
|
|
2638
|
+
import { SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
2639
|
+
import { Grid as Grid14, Stack as Stack14 } from "@elementor/ui";
|
|
2640
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
2409
2641
|
|
|
2410
2642
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
2411
|
-
import * as
|
|
2643
|
+
import * as React49 from "react";
|
|
2412
2644
|
import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
2413
2645
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
2414
|
-
import { Grid as
|
|
2415
|
-
import { __ as
|
|
2646
|
+
import { Grid as Grid13 } from "@elementor/ui";
|
|
2647
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
2416
2648
|
var options6 = [
|
|
2417
2649
|
{
|
|
2418
2650
|
value: "visible",
|
|
2419
|
-
label:
|
|
2420
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2651
|
+
label: __26("Visible", "elementor"),
|
|
2652
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(EyeIcon, { fontSize: size }),
|
|
2421
2653
|
showTooltip: true
|
|
2422
2654
|
},
|
|
2423
2655
|
{
|
|
2424
2656
|
value: "hidden",
|
|
2425
|
-
label:
|
|
2426
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2657
|
+
label: __26("Hidden", "elementor"),
|
|
2658
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(EyeOffIcon, { fontSize: size }),
|
|
2427
2659
|
showTooltip: true
|
|
2428
2660
|
},
|
|
2429
2661
|
{
|
|
2430
2662
|
value: "auto",
|
|
2431
|
-
label:
|
|
2432
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2663
|
+
label: __26("Auto", "elementor"),
|
|
2664
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(LetterAIcon, { fontSize: size }),
|
|
2433
2665
|
showTooltip: true
|
|
2434
2666
|
}
|
|
2435
2667
|
];
|
|
2436
2668
|
var OverflowField = () => {
|
|
2437
|
-
return /* @__PURE__ */
|
|
2669
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React49.createElement(Grid13, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, __26("Overflow", "elementor"))), /* @__PURE__ */ React49.createElement(Grid13, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React49.createElement(ToggleControl8, { options: options6 }))));
|
|
2438
2670
|
};
|
|
2439
2671
|
|
|
2440
2672
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2441
2673
|
var SizeSection = () => {
|
|
2442
|
-
return /* @__PURE__ */
|
|
2674
|
+
return /* @__PURE__ */ React50.createElement(SectionContent, null, /* @__PURE__ */ React50.createElement(Grid14, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeField, { bind: "width", label: __27("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeField, { bind: "height", label: __27("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React50.createElement(Grid14, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(
|
|
2443
2675
|
SizeField,
|
|
2444
2676
|
{
|
|
2445
2677
|
bind: "min-width",
|
|
2446
|
-
label:
|
|
2678
|
+
label: __27("Min width", "elementor"),
|
|
2447
2679
|
extendedValues: ["auto"]
|
|
2448
2680
|
}
|
|
2449
|
-
)), /* @__PURE__ */
|
|
2681
|
+
)), /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(
|
|
2450
2682
|
SizeField,
|
|
2451
2683
|
{
|
|
2452
2684
|
bind: "min-height",
|
|
2453
|
-
label:
|
|
2685
|
+
label: __27("Min height", "elementor"),
|
|
2454
2686
|
extendedValues: ["auto"]
|
|
2455
2687
|
}
|
|
2456
|
-
))), /* @__PURE__ */
|
|
2688
|
+
))), /* @__PURE__ */ React50.createElement(Grid14, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeField, { bind: "max-width", label: __27("Max width", "elementor") })), /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeField, { bind: "max-height", label: __27("Max height", "elementor") }))), /* @__PURE__ */ React50.createElement(PanelDivider, null), /* @__PURE__ */ React50.createElement(Stack14, null, /* @__PURE__ */ React50.createElement(OverflowField, null)));
|
|
2457
2689
|
};
|
|
2458
2690
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
2459
|
-
return /* @__PURE__ */
|
|
2691
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind }, /* @__PURE__ */ React50.createElement(Grid14, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React50.createElement(ControlLabel, null, label)), /* @__PURE__ */ React50.createElement(Grid14, { item: true, xs: 12 }, /* @__PURE__ */ React50.createElement(SizeControl5, { extendedValues }))));
|
|
2460
2692
|
};
|
|
2461
2693
|
|
|
2462
2694
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
2463
|
-
import * as
|
|
2695
|
+
import * as React51 from "react";
|
|
2464
2696
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
2465
|
-
import { __ as
|
|
2697
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
2466
2698
|
var SpacingSection = () => {
|
|
2467
2699
|
const { isSiteRtl } = useDirection();
|
|
2468
|
-
return /* @__PURE__ */
|
|
2700
|
+
return /* @__PURE__ */ React51.createElement(SectionContent, null, /* @__PURE__ */ React51.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React51.createElement(
|
|
2469
2701
|
LinkedDimensionsControl,
|
|
2470
2702
|
{
|
|
2471
|
-
label:
|
|
2703
|
+
label: __28("Margin", "elementor"),
|
|
2472
2704
|
isSiteRtl,
|
|
2473
2705
|
extendedValues: ["auto"]
|
|
2474
2706
|
}
|
|
2475
|
-
)), /* @__PURE__ */
|
|
2707
|
+
)), /* @__PURE__ */ React51.createElement(PanelDivider, null), /* @__PURE__ */ React51.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React51.createElement(LinkedDimensionsControl, { label: __28("Padding", "elementor"), isSiteRtl })));
|
|
2476
2708
|
};
|
|
2477
2709
|
|
|
2478
2710
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2479
|
-
import * as
|
|
2711
|
+
import * as React66 from "react";
|
|
2480
2712
|
|
|
2481
2713
|
// src/components/collapsible-content.tsx
|
|
2482
|
-
import * as
|
|
2483
|
-
import { useState as
|
|
2714
|
+
import * as React52 from "react";
|
|
2715
|
+
import { useState as useState9 } from "react";
|
|
2484
2716
|
import { Button, Collapse as Collapse3, Stack as Stack15 } from "@elementor/ui";
|
|
2485
|
-
import { __ as
|
|
2717
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
2486
2718
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
2487
|
-
const [open, setOpen] =
|
|
2719
|
+
const [open, setOpen] = useState9(defaultOpen);
|
|
2488
2720
|
const handleToggle = () => {
|
|
2489
2721
|
setOpen((prevOpen) => !prevOpen);
|
|
2490
2722
|
};
|
|
2491
|
-
return /* @__PURE__ */
|
|
2723
|
+
return /* @__PURE__ */ React52.createElement(Stack15, null, /* @__PURE__ */ React52.createElement(
|
|
2492
2724
|
Button,
|
|
2493
2725
|
{
|
|
2494
2726
|
fullWidth: true,
|
|
@@ -2496,22 +2728,22 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
2496
2728
|
color: "secondary",
|
|
2497
2729
|
variant: "outlined",
|
|
2498
2730
|
onClick: handleToggle,
|
|
2499
|
-
endIcon: /* @__PURE__ */
|
|
2731
|
+
endIcon: /* @__PURE__ */ React52.createElement(CollapseIcon, { open }),
|
|
2500
2732
|
sx: { my: 0.5 }
|
|
2501
2733
|
},
|
|
2502
|
-
open ?
|
|
2503
|
-
), /* @__PURE__ */
|
|
2734
|
+
open ? __29("Show less", "elementor") : __29("Show more", "elementor")
|
|
2735
|
+
), /* @__PURE__ */ React52.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
2504
2736
|
};
|
|
2505
2737
|
|
|
2506
2738
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
2507
|
-
import * as
|
|
2739
|
+
import * as React53 from "react";
|
|
2508
2740
|
import { FontFamilyControl } from "@elementor/editor-controls";
|
|
2509
|
-
import { Grid as
|
|
2510
|
-
import { __ as
|
|
2741
|
+
import { Grid as Grid15 } from "@elementor/ui";
|
|
2742
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
2511
2743
|
|
|
2512
2744
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2513
|
-
import { useMemo as
|
|
2514
|
-
import { __ as
|
|
2745
|
+
import { useMemo as useMemo4 } from "react";
|
|
2746
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
2515
2747
|
|
|
2516
2748
|
// src/sync/get-elementor-config.ts
|
|
2517
2749
|
var getElementorConfig = () => {
|
|
@@ -2521,9 +2753,9 @@ var getElementorConfig = () => {
|
|
|
2521
2753
|
|
|
2522
2754
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2523
2755
|
var supportedCategories = {
|
|
2524
|
-
system:
|
|
2525
|
-
custom:
|
|
2526
|
-
googlefonts:
|
|
2756
|
+
system: __30("System", "elementor"),
|
|
2757
|
+
custom: __30("Custom Fonts", "elementor"),
|
|
2758
|
+
googlefonts: __30("Google Fonts", "elementor")
|
|
2527
2759
|
};
|
|
2528
2760
|
var getFontFamilies = () => {
|
|
2529
2761
|
const { controls } = getElementorConfig();
|
|
@@ -2535,7 +2767,7 @@ var getFontFamilies = () => {
|
|
|
2535
2767
|
};
|
|
2536
2768
|
var useFontFamilies = () => {
|
|
2537
2769
|
const fontFamilies = getFontFamilies();
|
|
2538
|
-
return
|
|
2770
|
+
return useMemo4(() => {
|
|
2539
2771
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
2540
2772
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
2541
2773
|
if (!supportedCategories[category]) {
|
|
@@ -2560,188 +2792,188 @@ var FontFamilyField = () => {
|
|
|
2560
2792
|
if (fontFamilies.length === 0) {
|
|
2561
2793
|
return null;
|
|
2562
2794
|
}
|
|
2563
|
-
return /* @__PURE__ */
|
|
2795
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React53.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, __31("Font family", "elementor"))), /* @__PURE__ */ React53.createElement(Grid15, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React53.createElement(FontFamilyControl, { fontFamilies }))));
|
|
2564
2796
|
};
|
|
2565
2797
|
|
|
2566
2798
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
2567
|
-
import * as
|
|
2568
|
-
import { SizeControl as
|
|
2569
|
-
import { Grid as
|
|
2570
|
-
import { __ as
|
|
2799
|
+
import * as React54 from "react";
|
|
2800
|
+
import { SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
2801
|
+
import { Grid as Grid16 } from "@elementor/ui";
|
|
2802
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
2571
2803
|
var FontSizeField = () => {
|
|
2572
|
-
return /* @__PURE__ */
|
|
2804
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React54.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, __32("Font size", "elementor"))), /* @__PURE__ */ React54.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(SizeControl6, null))));
|
|
2573
2805
|
};
|
|
2574
2806
|
|
|
2575
2807
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
2576
|
-
import * as
|
|
2808
|
+
import * as React55 from "react";
|
|
2577
2809
|
import { ControlFormLabel as ControlFormLabel4, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
2578
2810
|
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
2579
|
-
import { Grid as
|
|
2580
|
-
import { __ as
|
|
2811
|
+
import { Grid as Grid17 } from "@elementor/ui";
|
|
2812
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
2581
2813
|
var options7 = [
|
|
2582
2814
|
{
|
|
2583
2815
|
value: "normal",
|
|
2584
|
-
label:
|
|
2585
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2816
|
+
label: __33("Normal", "elementor"),
|
|
2817
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(MinusIcon2, { fontSize: size }),
|
|
2586
2818
|
showTooltip: true
|
|
2587
2819
|
},
|
|
2588
2820
|
{
|
|
2589
2821
|
value: "italic",
|
|
2590
|
-
label:
|
|
2591
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2822
|
+
label: __33("Italic", "elementor"),
|
|
2823
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(ItalicIcon, { fontSize: size }),
|
|
2592
2824
|
showTooltip: true
|
|
2593
2825
|
}
|
|
2594
2826
|
];
|
|
2595
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
2827
|
+
var FontStyleField = () => /* @__PURE__ */ React55.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React55.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlFormLabel4, null, __33("Font style", "elementor"))), /* @__PURE__ */ React55.createElement(Grid17, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(ToggleControl9, { options: options7 }))));
|
|
2596
2828
|
|
|
2597
2829
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
2598
|
-
import * as
|
|
2830
|
+
import * as React56 from "react";
|
|
2599
2831
|
import { SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
2600
|
-
import { Grid as
|
|
2601
|
-
import { __ as
|
|
2832
|
+
import { Grid as Grid18 } from "@elementor/ui";
|
|
2833
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
2602
2834
|
var fontWeightOptions = [
|
|
2603
|
-
{ value: "100", label:
|
|
2604
|
-
{ value: "200", label:
|
|
2605
|
-
{ value: "300", label:
|
|
2606
|
-
{ value: "400", label:
|
|
2607
|
-
{ value: "500", label:
|
|
2608
|
-
{ value: "600", label:
|
|
2609
|
-
{ value: "700", label:
|
|
2610
|
-
{ value: "800", label:
|
|
2611
|
-
{ value: "900", label:
|
|
2835
|
+
{ value: "100", label: __34("100 - Thin", "elementor") },
|
|
2836
|
+
{ value: "200", label: __34("200 - Extra light", "elementor") },
|
|
2837
|
+
{ value: "300", label: __34("300 - Light", "elementor") },
|
|
2838
|
+
{ value: "400", label: __34("400 - Normal", "elementor") },
|
|
2839
|
+
{ value: "500", label: __34("500 - Medium", "elementor") },
|
|
2840
|
+
{ value: "600", label: __34("600 - Semi bold", "elementor") },
|
|
2841
|
+
{ value: "700", label: __34("700 - Bold", "elementor") },
|
|
2842
|
+
{ value: "800", label: __34("800 - Extra bold", "elementor") },
|
|
2843
|
+
{ value: "900", label: __34("900 - Black", "elementor") }
|
|
2612
2844
|
];
|
|
2613
2845
|
var FontWeightField = () => {
|
|
2614
|
-
return /* @__PURE__ */
|
|
2846
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React56.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, __34("Font weight", "elementor"))), /* @__PURE__ */ React56.createElement(Grid18, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React56.createElement(SelectControl4, { options: fontWeightOptions }))));
|
|
2615
2847
|
};
|
|
2616
2848
|
|
|
2617
2849
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
2618
|
-
import * as
|
|
2619
|
-
import { SizeControl as
|
|
2620
|
-
import { Grid as
|
|
2621
|
-
import { __ as
|
|
2850
|
+
import * as React57 from "react";
|
|
2851
|
+
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
2852
|
+
import { Grid as Grid19 } from "@elementor/ui";
|
|
2853
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
2622
2854
|
var LetterSpacingField = () => {
|
|
2623
|
-
return /* @__PURE__ */
|
|
2855
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React57.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, __35("Letter spacing", "elementor"))), /* @__PURE__ */ React57.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(SizeControl7, null))));
|
|
2624
2856
|
};
|
|
2625
2857
|
|
|
2626
2858
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
2627
|
-
import * as
|
|
2628
|
-
import { SizeControl as
|
|
2629
|
-
import { Grid as
|
|
2630
|
-
import { __ as
|
|
2859
|
+
import * as React58 from "react";
|
|
2860
|
+
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
2861
|
+
import { Grid as Grid20 } from "@elementor/ui";
|
|
2862
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
2631
2863
|
var LineHeightField = () => {
|
|
2632
|
-
return /* @__PURE__ */
|
|
2864
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React58.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel, null, __36("Line height", "elementor"))), /* @__PURE__ */ React58.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(SizeControl8, null))));
|
|
2633
2865
|
};
|
|
2634
2866
|
|
|
2635
2867
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
2636
|
-
import * as
|
|
2868
|
+
import * as React59 from "react";
|
|
2637
2869
|
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
2638
2870
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
2639
|
-
import { Grid as
|
|
2640
|
-
import { __ as
|
|
2871
|
+
import { Grid as Grid21, withDirection as withDirection9 } from "@elementor/ui";
|
|
2872
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
2641
2873
|
var AlignStartIcon = withDirection9(AlignLeftIcon);
|
|
2642
2874
|
var AlignEndIcon = withDirection9(AlignRightIcon);
|
|
2643
2875
|
var options8 = [
|
|
2644
2876
|
{
|
|
2645
2877
|
value: "start",
|
|
2646
|
-
label:
|
|
2647
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2878
|
+
label: __37("Start", "elementor"),
|
|
2879
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(AlignStartIcon, { fontSize: size }),
|
|
2648
2880
|
showTooltip: true
|
|
2649
2881
|
},
|
|
2650
2882
|
{
|
|
2651
2883
|
value: "center",
|
|
2652
|
-
label:
|
|
2653
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2884
|
+
label: __37("Center", "elementor"),
|
|
2885
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(AlignCenterIcon, { fontSize: size }),
|
|
2654
2886
|
showTooltip: true
|
|
2655
2887
|
},
|
|
2656
2888
|
{
|
|
2657
2889
|
value: "end",
|
|
2658
|
-
label:
|
|
2659
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2890
|
+
label: __37("End", "elementor"),
|
|
2891
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(AlignEndIcon, { fontSize: size }),
|
|
2660
2892
|
showTooltip: true
|
|
2661
2893
|
},
|
|
2662
2894
|
{
|
|
2663
2895
|
value: "justify",
|
|
2664
|
-
label:
|
|
2665
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2896
|
+
label: __37("Justify", "elementor"),
|
|
2897
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
2666
2898
|
showTooltip: true
|
|
2667
2899
|
}
|
|
2668
2900
|
];
|
|
2669
2901
|
var TextAlignmentField = () => {
|
|
2670
|
-
return /* @__PURE__ */
|
|
2902
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React59.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, __37("Text align", "elementor"))), /* @__PURE__ */ React59.createElement(Grid21, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React59.createElement(ToggleControl10, { options: options8 }))));
|
|
2671
2903
|
};
|
|
2672
2904
|
|
|
2673
2905
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2674
|
-
import * as
|
|
2906
|
+
import * as React60 from "react";
|
|
2675
2907
|
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
2676
|
-
import { Grid as
|
|
2677
|
-
import { __ as
|
|
2908
|
+
import { Grid as Grid22 } from "@elementor/ui";
|
|
2909
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
2678
2910
|
var TextColorField = () => {
|
|
2679
|
-
return /* @__PURE__ */
|
|
2911
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React60.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, __38("Text color", "elementor"))), /* @__PURE__ */ React60.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ColorControl2, null))));
|
|
2680
2912
|
};
|
|
2681
2913
|
|
|
2682
2914
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2683
|
-
import * as
|
|
2915
|
+
import * as React61 from "react";
|
|
2684
2916
|
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
2685
2917
|
import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
2686
|
-
import { Grid as
|
|
2687
|
-
import { __ as
|
|
2918
|
+
import { Grid as Grid23 } from "@elementor/ui";
|
|
2919
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
2688
2920
|
var options9 = [
|
|
2689
2921
|
{
|
|
2690
2922
|
value: "none",
|
|
2691
|
-
label:
|
|
2692
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2923
|
+
label: __39("None", "elementor"),
|
|
2924
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(MinusIcon3, { fontSize: size }),
|
|
2693
2925
|
showTooltip: true,
|
|
2694
2926
|
exclusive: true
|
|
2695
2927
|
},
|
|
2696
2928
|
{
|
|
2697
2929
|
value: "underline",
|
|
2698
|
-
label:
|
|
2699
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2930
|
+
label: __39("Underline", "elementor"),
|
|
2931
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(UnderlineIcon, { fontSize: size }),
|
|
2700
2932
|
showTooltip: true
|
|
2701
2933
|
},
|
|
2702
2934
|
{
|
|
2703
2935
|
value: "line-through",
|
|
2704
|
-
label:
|
|
2705
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2936
|
+
label: __39("Line-through", "elementor"),
|
|
2937
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(StrikethroughIcon, { fontSize: size }),
|
|
2706
2938
|
showTooltip: true
|
|
2707
2939
|
},
|
|
2708
2940
|
{
|
|
2709
2941
|
value: "overline",
|
|
2710
|
-
label:
|
|
2711
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2942
|
+
label: __39("Overline", "elementor"),
|
|
2943
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(OverlineIcon, { fontSize: size }),
|
|
2712
2944
|
showTooltip: true
|
|
2713
2945
|
}
|
|
2714
2946
|
];
|
|
2715
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
2947
|
+
var TextDecorationField = () => /* @__PURE__ */ React61.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React61.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, __39("Line decoration", "elementor"))), /* @__PURE__ */ React61.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React61.createElement(ToggleControl11, { options: options9, exclusive: false }))));
|
|
2716
2948
|
|
|
2717
2949
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2718
|
-
import * as
|
|
2950
|
+
import * as React62 from "react";
|
|
2719
2951
|
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
2720
2952
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
2721
|
-
import { Grid as
|
|
2722
|
-
import { __ as
|
|
2953
|
+
import { Grid as Grid24 } from "@elementor/ui";
|
|
2954
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
2723
2955
|
var options10 = [
|
|
2724
2956
|
{
|
|
2725
2957
|
value: "ltr",
|
|
2726
|
-
label:
|
|
2727
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2958
|
+
label: __40("Left to right", "elementor"),
|
|
2959
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
2728
2960
|
showTooltip: true
|
|
2729
2961
|
},
|
|
2730
2962
|
{
|
|
2731
2963
|
value: "rtl",
|
|
2732
|
-
label:
|
|
2733
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2964
|
+
label: __40("Right to left", "elementor"),
|
|
2965
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
2734
2966
|
showTooltip: true
|
|
2735
2967
|
}
|
|
2736
2968
|
];
|
|
2737
2969
|
var TextDirectionField = () => {
|
|
2738
|
-
return /* @__PURE__ */
|
|
2970
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React62.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, __40("Direction", "elementor"))), /* @__PURE__ */ React62.createElement(Grid24, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React62.createElement(ToggleControl12, { options: options10 }))));
|
|
2739
2971
|
};
|
|
2740
2972
|
|
|
2741
2973
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2742
|
-
import * as
|
|
2974
|
+
import * as React63 from "react";
|
|
2743
2975
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
2744
|
-
import { __ as
|
|
2976
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
2745
2977
|
var initTextStroke = {
|
|
2746
2978
|
$$type: "stroke",
|
|
2747
2979
|
value: {
|
|
@@ -2767,73 +2999,81 @@ var TextStrokeField = () => {
|
|
|
2767
2999
|
setTextStroke(null);
|
|
2768
3000
|
};
|
|
2769
3001
|
const hasTextStroke = Boolean(textStroke);
|
|
2770
|
-
return /* @__PURE__ */
|
|
3002
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React63.createElement(
|
|
2771
3003
|
AddOrRemoveContent,
|
|
2772
3004
|
{
|
|
2773
|
-
label:
|
|
3005
|
+
label: __41("Text stroke", "elementor"),
|
|
2774
3006
|
isAdded: hasTextStroke,
|
|
2775
3007
|
onAdd: addTextStroke,
|
|
2776
3008
|
onRemove: removeTextStroke
|
|
2777
3009
|
},
|
|
2778
|
-
/* @__PURE__ */
|
|
3010
|
+
/* @__PURE__ */ React63.createElement(StrokeControl, null)
|
|
2779
3011
|
));
|
|
2780
3012
|
};
|
|
2781
3013
|
|
|
2782
3014
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2783
|
-
import * as
|
|
3015
|
+
import * as React64 from "react";
|
|
2784
3016
|
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
2785
3017
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
2786
|
-
import { Grid as
|
|
2787
|
-
import { __ as
|
|
3018
|
+
import { Grid as Grid25 } from "@elementor/ui";
|
|
3019
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
2788
3020
|
var options11 = [
|
|
2789
3021
|
{
|
|
2790
3022
|
value: "none",
|
|
2791
|
-
label:
|
|
2792
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3023
|
+
label: __42("None", "elementor"),
|
|
3024
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(MinusIcon4, { fontSize: size }),
|
|
2793
3025
|
showTooltip: true
|
|
2794
3026
|
},
|
|
2795
3027
|
{
|
|
2796
3028
|
value: "capitalize",
|
|
2797
|
-
label:
|
|
2798
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3029
|
+
label: __42("Capitalize", "elementor"),
|
|
3030
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(LetterCaseIcon, { fontSize: size }),
|
|
2799
3031
|
showTooltip: true
|
|
2800
3032
|
},
|
|
2801
3033
|
{
|
|
2802
3034
|
value: "uppercase",
|
|
2803
|
-
label:
|
|
2804
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3035
|
+
label: __42("Uppercase", "elementor"),
|
|
3036
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
2805
3037
|
showTooltip: true
|
|
2806
3038
|
},
|
|
2807
3039
|
{
|
|
2808
3040
|
value: "lowercase",
|
|
2809
|
-
label:
|
|
2810
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3041
|
+
label: __42("Lowercase", "elementor"),
|
|
3042
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
2811
3043
|
showTooltip: true
|
|
2812
3044
|
}
|
|
2813
3045
|
];
|
|
2814
|
-
var TransformField = () => /* @__PURE__ */
|
|
3046
|
+
var TransformField = () => /* @__PURE__ */ React64.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React64.createElement(Grid25, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React64.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React64.createElement(ControlLabel, null, __42("Text transform", "elementor"))), /* @__PURE__ */ React64.createElement(Grid25, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React64.createElement(ToggleControl13, { options: options11 }))));
|
|
2815
3047
|
|
|
2816
3048
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2817
|
-
import * as
|
|
2818
|
-
import { SizeControl as
|
|
2819
|
-
import { Grid as
|
|
2820
|
-
import { __ as
|
|
3049
|
+
import * as React65 from "react";
|
|
3050
|
+
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
3051
|
+
import { Grid as Grid26 } from "@elementor/ui";
|
|
3052
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
2821
3053
|
var WordSpacingField = () => {
|
|
2822
|
-
return /* @__PURE__ */
|
|
3054
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React65.createElement(Grid26, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React65.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, __43("Word spacing", "elementor"))), /* @__PURE__ */ React65.createElement(Grid26, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(SizeControl9, null))));
|
|
2823
3055
|
};
|
|
2824
3056
|
|
|
2825
3057
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2826
3058
|
var TypographySection = () => {
|
|
2827
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ React66.createElement(SectionContent, null, /* @__PURE__ */ React66.createElement(FontFamilyField, null), /* @__PURE__ */ React66.createElement(FontWeightField, null), /* @__PURE__ */ React66.createElement(FontSizeField, null), /* @__PURE__ */ React66.createElement(PanelDivider, null), /* @__PURE__ */ React66.createElement(TextAlignmentField, null), /* @__PURE__ */ React66.createElement(TextColorField, null), /* @__PURE__ */ React66.createElement(CollapsibleContent, null, /* @__PURE__ */ React66.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React66.createElement(LineHeightField, null), /* @__PURE__ */ React66.createElement(LetterSpacingField, null), /* @__PURE__ */ React66.createElement(WordSpacingField, null), /* @__PURE__ */ React66.createElement(PanelDivider, null), /* @__PURE__ */ React66.createElement(TextDecorationField, null), /* @__PURE__ */ React66.createElement(TransformField, null), /* @__PURE__ */ React66.createElement(TextDirectionField, null), /* @__PURE__ */ React66.createElement(FontStyleField, null), /* @__PURE__ */ React66.createElement(TextStrokeField, null))));
|
|
2828
3060
|
};
|
|
2829
3061
|
|
|
2830
3062
|
// src/components/style-tab.tsx
|
|
3063
|
+
var TABS_HEADER_HEIGHT = "37px";
|
|
3064
|
+
var stickyHeaderStyles = {
|
|
3065
|
+
position: "sticky",
|
|
3066
|
+
zIndex: 1,
|
|
3067
|
+
opacity: 1,
|
|
3068
|
+
backgroundColor: "background.default",
|
|
3069
|
+
transition: "top 300ms ease"
|
|
3070
|
+
};
|
|
2831
3071
|
var StyleTab = () => {
|
|
2832
3072
|
const currentClassesProp = useCurrentClassesProp();
|
|
2833
3073
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2834
|
-
const [activeStyleState, setActiveStyleState] =
|
|
3074
|
+
const [activeStyleState, setActiveStyleState] = useState10(null);
|
|
2835
3075
|
const breakpoint = useActiveBreakpoint();
|
|
2836
|
-
return /* @__PURE__ */
|
|
3076
|
+
return /* @__PURE__ */ React67.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React67.createElement(
|
|
2837
3077
|
StyleProvider,
|
|
2838
3078
|
{
|
|
2839
3079
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -2844,9 +3084,13 @@ var StyleTab = () => {
|
|
|
2844
3084
|
},
|
|
2845
3085
|
setMetaState: setActiveStyleState
|
|
2846
3086
|
},
|
|
2847
|
-
/* @__PURE__ */
|
|
3087
|
+
/* @__PURE__ */ React67.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React67.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React67.createElement(ClassesHeader, null, /* @__PURE__ */ React67.createElement(CssClassSelector, null), /* @__PURE__ */ React67.createElement(Divider4, null)), /* @__PURE__ */ React67.createElement(SectionsList, null, /* @__PURE__ */ React67.createElement(Section, { title: __44("Layout", "elementor") }, /* @__PURE__ */ React67.createElement(LayoutSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: __44("Spacing", "elementor") }, /* @__PURE__ */ React67.createElement(SpacingSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: __44("Size", "elementor") }, /* @__PURE__ */ React67.createElement(SizeSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: __44("Position", "elementor") }, /* @__PURE__ */ React67.createElement(PositionSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: __44("Typography", "elementor") }, /* @__PURE__ */ React67.createElement(TypographySection, null)), /* @__PURE__ */ React67.createElement(Section, { title: __44("Background", "elementor") }, /* @__PURE__ */ React67.createElement(BackgroundSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: __44("Border", "elementor") }, /* @__PURE__ */ React67.createElement(BorderSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: __44("Effects", "elementor") }, /* @__PURE__ */ React67.createElement(EffectsSection, null)))))
|
|
2848
3088
|
));
|
|
2849
3089
|
};
|
|
3090
|
+
function ClassesHeader({ children }) {
|
|
3091
|
+
const scrollDirection = useScrollDirection();
|
|
3092
|
+
return /* @__PURE__ */ React67.createElement(Stack16, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
3093
|
+
}
|
|
2850
3094
|
function useCurrentClassesProp() {
|
|
2851
3095
|
const { elementType } = useElement();
|
|
2852
3096
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
@@ -2865,7 +3109,7 @@ var EditingPanelTabs = () => {
|
|
|
2865
3109
|
return (
|
|
2866
3110
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2867
3111
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2868
|
-
/* @__PURE__ */
|
|
3112
|
+
/* @__PURE__ */ React68.createElement(Fragment8, { key: element.id }, /* @__PURE__ */ React68.createElement(ScrollProvider, null, /* @__PURE__ */ React68.createElement(Stack17, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React68.createElement(Stack17, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React68.createElement(Tabs, { variant: "fullWidth", size: "small", sx: { mt: 0.5 }, ...getTabsProps() }, /* @__PURE__ */ React68.createElement(Tab, { label: __45("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React68.createElement(Tab, { label: __45("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React68.createElement(Divider5, null)), /* @__PURE__ */ React68.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React68.createElement(SettingsTab, null)), /* @__PURE__ */ React68.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React68.createElement(StyleTab, null)))))
|
|
2869
3113
|
);
|
|
2870
3114
|
};
|
|
2871
3115
|
|
|
@@ -2878,8 +3122,8 @@ var EditingPanel = () => {
|
|
|
2878
3122
|
if (!element || !elementType) {
|
|
2879
3123
|
return null;
|
|
2880
3124
|
}
|
|
2881
|
-
const panelTitle =
|
|
2882
|
-
return /* @__PURE__ */
|
|
3125
|
+
const panelTitle = __46("Edit %s", "elementor").replace("%s", elementType.title);
|
|
3126
|
+
return /* @__PURE__ */ React69.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React69.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React69.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React69.createElement(ThemeProvider9, null, /* @__PURE__ */ React69.createElement(Panel, null, /* @__PURE__ */ React69.createElement(PanelHeader, null, /* @__PURE__ */ React69.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React69.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React69.createElement(PanelBody, null, /* @__PURE__ */ React69.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React69.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React69.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React69.createElement(EditingPanelTabs, null)))))))));
|
|
2883
3127
|
};
|
|
2884
3128
|
|
|
2885
3129
|
// src/panel.ts
|
|
@@ -2895,7 +3139,7 @@ import { __registerPanel as registerPanel } from "@elementor/editor-panels";
|
|
|
2895
3139
|
import { blockCommand } from "@elementor/editor-v1-adapters";
|
|
2896
3140
|
|
|
2897
3141
|
// src/hooks/use-open-editor-panel.ts
|
|
2898
|
-
import { useEffect as
|
|
3142
|
+
import { useEffect as useEffect3 } from "react";
|
|
2899
3143
|
import { __privateListenTo as listenTo, commandStartEvent } from "@elementor/editor-v1-adapters";
|
|
2900
3144
|
|
|
2901
3145
|
// src/sync/is-atomic-widget-selected.ts
|
|
@@ -2912,7 +3156,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
2912
3156
|
// src/hooks/use-open-editor-panel.ts
|
|
2913
3157
|
var useOpenEditorPanel = () => {
|
|
2914
3158
|
const { open } = usePanelActions();
|
|
2915
|
-
|
|
3159
|
+
useEffect3(() => {
|
|
2916
3160
|
return listenTo(commandStartEvent("panel/editor/open"), () => {
|
|
2917
3161
|
if (isAtomicWidgetSelected()) {
|
|
2918
3162
|
open();
|
|
@@ -2931,33 +3175,33 @@ var EditingPanelHooks = () => {
|
|
|
2931
3175
|
import { settingsTransformersRegistry, styleTransformersRegistry } from "@elementor/editor-canvas";
|
|
2932
3176
|
|
|
2933
3177
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2934
|
-
import * as
|
|
3178
|
+
import * as React73 from "react";
|
|
2935
3179
|
import { ControlFormLabel as ControlFormLabel5, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
2936
3180
|
import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
2937
3181
|
import {
|
|
2938
3182
|
bindPopover as bindPopover2,
|
|
2939
3183
|
bindTrigger as bindTrigger2,
|
|
2940
|
-
Box as
|
|
3184
|
+
Box as Box5,
|
|
2941
3185
|
Divider as Divider7,
|
|
2942
|
-
Grid as
|
|
3186
|
+
Grid as Grid27,
|
|
2943
3187
|
IconButton as IconButton3,
|
|
2944
3188
|
Paper,
|
|
2945
3189
|
Popover as Popover2,
|
|
2946
|
-
Stack as
|
|
3190
|
+
Stack as Stack20,
|
|
2947
3191
|
Tab as Tab2,
|
|
2948
3192
|
TabPanel as TabPanel2,
|
|
2949
3193
|
Tabs as Tabs2,
|
|
2950
|
-
Typography as
|
|
3194
|
+
Typography as Typography5,
|
|
2951
3195
|
UnstableTag as Tag,
|
|
2952
3196
|
usePopupState as usePopupState3,
|
|
2953
3197
|
useTabs as useTabs2
|
|
2954
3198
|
} from "@elementor/ui";
|
|
2955
|
-
import { __ as
|
|
3199
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
2956
3200
|
|
|
2957
3201
|
// src/components/popover-content.tsx
|
|
2958
|
-
import * as
|
|
2959
|
-
import { Stack as
|
|
2960
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
3202
|
+
import * as React70 from "react";
|
|
3203
|
+
import { Stack as Stack18 } from "@elementor/ui";
|
|
3204
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React70.createElement(Stack18, { alignItems, gap, p }, children);
|
|
2961
3205
|
|
|
2962
3206
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2963
3207
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -2968,14 +3212,14 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
2968
3212
|
};
|
|
2969
3213
|
|
|
2970
3214
|
// src/dynamics/dynamic-control.tsx
|
|
2971
|
-
import * as
|
|
3215
|
+
import * as React71 from "react";
|
|
2972
3216
|
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
2973
3217
|
|
|
2974
3218
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2975
|
-
import { useMemo as
|
|
3219
|
+
import { useMemo as useMemo6 } from "react";
|
|
2976
3220
|
|
|
2977
3221
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2978
|
-
import { useMemo as
|
|
3222
|
+
import { useMemo as useMemo5 } from "react";
|
|
2979
3223
|
import { useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
2980
3224
|
|
|
2981
3225
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -3030,7 +3274,7 @@ var usePropDynamicTags = () => {
|
|
|
3030
3274
|
const propDynamicType = getDynamicPropType(propType);
|
|
3031
3275
|
categories = propDynamicType?.settings.categories || [];
|
|
3032
3276
|
}
|
|
3033
|
-
return
|
|
3277
|
+
return useMemo5(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
3034
3278
|
};
|
|
3035
3279
|
var getDynamicTagsByCategories = (categories) => {
|
|
3036
3280
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -3046,7 +3290,7 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
3046
3290
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
3047
3291
|
var useDynamicTag = (tagName) => {
|
|
3048
3292
|
const dynamicTags = usePropDynamicTags();
|
|
3049
|
-
return
|
|
3293
|
+
return useMemo6(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
3050
3294
|
};
|
|
3051
3295
|
|
|
3052
3296
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -3070,30 +3314,30 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
3070
3314
|
});
|
|
3071
3315
|
};
|
|
3072
3316
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
3073
|
-
return /* @__PURE__ */
|
|
3317
|
+
return /* @__PURE__ */ React71.createElement(PropProvider3, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React71.createElement(PropKeyProvider3, { bind }, children));
|
|
3074
3318
|
};
|
|
3075
3319
|
|
|
3076
3320
|
// src/dynamics/components/dynamic-selection.tsx
|
|
3077
|
-
import * as
|
|
3078
|
-
import { Fragment as Fragment9, useState as
|
|
3321
|
+
import * as React72 from "react";
|
|
3322
|
+
import { Fragment as Fragment9, useState as useState11 } from "react";
|
|
3079
3323
|
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
3080
3324
|
import { DatabaseIcon, SearchIcon } from "@elementor/icons";
|
|
3081
3325
|
import {
|
|
3082
|
-
Box as
|
|
3326
|
+
Box as Box4,
|
|
3083
3327
|
Divider as Divider6,
|
|
3084
3328
|
InputAdornment,
|
|
3085
3329
|
Link,
|
|
3086
3330
|
MenuItem,
|
|
3087
3331
|
MenuList,
|
|
3088
3332
|
MenuSubheader as MenuSubheader2,
|
|
3089
|
-
Stack as
|
|
3333
|
+
Stack as Stack19,
|
|
3090
3334
|
TextField as TextField2,
|
|
3091
|
-
Typography as
|
|
3335
|
+
Typography as Typography4
|
|
3092
3336
|
} from "@elementor/ui";
|
|
3093
|
-
import { __ as
|
|
3337
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
3094
3338
|
var SIZE3 = "tiny";
|
|
3095
3339
|
var DynamicSelection = ({ onSelect }) => {
|
|
3096
|
-
const [searchValue, setSearchValue] =
|
|
3340
|
+
const [searchValue, setSearchValue] = useState11("");
|
|
3097
3341
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
3098
3342
|
const { value: anyValue } = useBoundProp4();
|
|
3099
3343
|
const { bind, value: dynamicValue, setValue } = useBoundProp4(dynamicPropTypeUtil);
|
|
@@ -3111,19 +3355,19 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3111
3355
|
setValue({ name: value, settings: { label } });
|
|
3112
3356
|
onSelect?.();
|
|
3113
3357
|
};
|
|
3114
|
-
return /* @__PURE__ */
|
|
3358
|
+
return /* @__PURE__ */ React72.createElement(Stack19, null, hasNoDynamicTags ? /* @__PURE__ */ React72.createElement(NoDynamicTags, null) : /* @__PURE__ */ React72.createElement(Fragment9, null, /* @__PURE__ */ React72.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React72.createElement(
|
|
3115
3359
|
TextField2,
|
|
3116
3360
|
{
|
|
3117
3361
|
fullWidth: true,
|
|
3118
3362
|
size: SIZE3,
|
|
3119
3363
|
value: searchValue,
|
|
3120
3364
|
onChange: handleSearch,
|
|
3121
|
-
placeholder:
|
|
3365
|
+
placeholder: __47("Search dynamic tags\u2026", "elementor"),
|
|
3122
3366
|
InputProps: {
|
|
3123
|
-
startAdornment: /* @__PURE__ */
|
|
3367
|
+
startAdornment: /* @__PURE__ */ React72.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React72.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
3124
3368
|
}
|
|
3125
3369
|
}
|
|
3126
|
-
)), /* @__PURE__ */
|
|
3370
|
+
)), /* @__PURE__ */ React72.createElement(Divider6, null), /* @__PURE__ */ React72.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React72.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React72.createElement(Fragment9, { key: index }, /* @__PURE__ */ React72.createElement(
|
|
3127
3371
|
MenuSubheader2,
|
|
3128
3372
|
{
|
|
3129
3373
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
@@ -3131,7 +3375,7 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3131
3375
|
dynamicGroups?.[category]?.title || category
|
|
3132
3376
|
), items3.map(({ value, label: tagLabel }) => {
|
|
3133
3377
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
3134
|
-
return /* @__PURE__ */
|
|
3378
|
+
return /* @__PURE__ */ React72.createElement(
|
|
3135
3379
|
MenuItem,
|
|
3136
3380
|
{
|
|
3137
3381
|
key: value,
|
|
@@ -3142,10 +3386,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3142
3386
|
},
|
|
3143
3387
|
tagLabel
|
|
3144
3388
|
);
|
|
3145
|
-
})))) : /* @__PURE__ */
|
|
3389
|
+
})))) : /* @__PURE__ */ React72.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
3146
3390
|
};
|
|
3147
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
3148
|
-
|
|
3391
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React72.createElement(
|
|
3392
|
+
Stack19,
|
|
3149
3393
|
{
|
|
3150
3394
|
gap: 1,
|
|
3151
3395
|
alignItems: "center",
|
|
@@ -3155,12 +3399,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React70.createElem
|
|
|
3155
3399
|
color: "text.secondary",
|
|
3156
3400
|
sx: { pb: 3.5 }
|
|
3157
3401
|
},
|
|
3158
|
-
/* @__PURE__ */
|
|
3159
|
-
/* @__PURE__ */
|
|
3160
|
-
/* @__PURE__ */
|
|
3402
|
+
/* @__PURE__ */ React72.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
3403
|
+
/* @__PURE__ */ React72.createElement(Typography4, { align: "center", variant: "subtitle2" }, __47("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React72.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
3404
|
+
/* @__PURE__ */ React72.createElement(Typography4, { align: "center", variant: "caption" }, __47("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React72.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __47("Clear & try again", "elementor")))
|
|
3161
3405
|
);
|
|
3162
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
3163
|
-
|
|
3406
|
+
var NoDynamicTags = () => /* @__PURE__ */ React72.createElement(Box4, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React72.createElement(Divider6, null), /* @__PURE__ */ React72.createElement(
|
|
3407
|
+
Stack19,
|
|
3164
3408
|
{
|
|
3165
3409
|
gap: 1,
|
|
3166
3410
|
alignItems: "center",
|
|
@@ -3170,9 +3414,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React70.createElement(Box3, { sx: { ov
|
|
|
3170
3414
|
color: "text.secondary",
|
|
3171
3415
|
sx: { pb: 3.5 }
|
|
3172
3416
|
},
|
|
3173
|
-
/* @__PURE__ */
|
|
3174
|
-
/* @__PURE__ */
|
|
3175
|
-
/* @__PURE__ */
|
|
3417
|
+
/* @__PURE__ */ React72.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
3418
|
+
/* @__PURE__ */ React72.createElement(Typography4, { align: "center", variant: "subtitle2" }, __47("Streamline your workflow with dynamic tags", "elementor")),
|
|
3419
|
+
/* @__PURE__ */ React72.createElement(Typography4, { align: "center", variant: "caption" }, __47("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
3176
3420
|
));
|
|
3177
3421
|
var useFilteredOptions = (searchValue) => {
|
|
3178
3422
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -3205,25 +3449,25 @@ var DynamicSelectionControl = () => {
|
|
|
3205
3449
|
if (!dynamicTag) {
|
|
3206
3450
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
3207
3451
|
}
|
|
3208
|
-
return /* @__PURE__ */
|
|
3452
|
+
return /* @__PURE__ */ React73.createElement(Box5, null, /* @__PURE__ */ React73.createElement(
|
|
3209
3453
|
Tag,
|
|
3210
3454
|
{
|
|
3211
3455
|
fullWidth: true,
|
|
3212
3456
|
showActionsOnHover: true,
|
|
3213
3457
|
label: dynamicTag.label,
|
|
3214
|
-
startIcon: /* @__PURE__ */
|
|
3458
|
+
startIcon: /* @__PURE__ */ React73.createElement(DatabaseIcon2, { fontSize: SIZE4 }),
|
|
3215
3459
|
...bindTrigger2(selectionPopoverState),
|
|
3216
|
-
actions: /* @__PURE__ */
|
|
3460
|
+
actions: /* @__PURE__ */ React73.createElement(React73.Fragment, null, /* @__PURE__ */ React73.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React73.createElement(
|
|
3217
3461
|
IconButton3,
|
|
3218
3462
|
{
|
|
3219
3463
|
size: SIZE4,
|
|
3220
3464
|
onClick: removeDynamicTag,
|
|
3221
|
-
"aria-label":
|
|
3465
|
+
"aria-label": __48("Remove dynamic value", "elementor")
|
|
3222
3466
|
},
|
|
3223
|
-
/* @__PURE__ */
|
|
3467
|
+
/* @__PURE__ */ React73.createElement(XIcon2, { fontSize: SIZE4 })
|
|
3224
3468
|
))
|
|
3225
3469
|
}
|
|
3226
|
-
), /* @__PURE__ */
|
|
3470
|
+
), /* @__PURE__ */ React73.createElement(
|
|
3227
3471
|
Popover2,
|
|
3228
3472
|
{
|
|
3229
3473
|
disablePortal: true,
|
|
@@ -3231,7 +3475,7 @@ var DynamicSelectionControl = () => {
|
|
|
3231
3475
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
3232
3476
|
...bindPopover2(selectionPopoverState)
|
|
3233
3477
|
},
|
|
3234
|
-
/* @__PURE__ */
|
|
3478
|
+
/* @__PURE__ */ React73.createElement(Stack20, null, /* @__PURE__ */ React73.createElement(Stack20, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React73.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React73.createElement(Typography5, { variant: "subtitle2" }, __48("Dynamic tags", "elementor")), /* @__PURE__ */ React73.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React73.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React73.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
3235
3479
|
));
|
|
3236
3480
|
};
|
|
3237
3481
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -3240,7 +3484,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
3240
3484
|
if (!hasDynamicSettings) {
|
|
3241
3485
|
return null;
|
|
3242
3486
|
}
|
|
3243
|
-
return /* @__PURE__ */
|
|
3487
|
+
return /* @__PURE__ */ React73.createElement(React73.Fragment, null, /* @__PURE__ */ React73.createElement(IconButton3, { size: SIZE4, ...bindTrigger2(popupState), "aria-label": __48("Settings", "elementor") }, /* @__PURE__ */ React73.createElement(SettingsIcon, { fontSize: SIZE4 })), /* @__PURE__ */ React73.createElement(
|
|
3244
3488
|
Popover2,
|
|
3245
3489
|
{
|
|
3246
3490
|
disablePortal: true,
|
|
@@ -3248,7 +3492,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
3248
3492
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3249
3493
|
...bindPopover2(popupState)
|
|
3250
3494
|
},
|
|
3251
|
-
/* @__PURE__ */
|
|
3495
|
+
/* @__PURE__ */ React73.createElement(Paper, { component: Stack20, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React73.createElement(Stack20, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React73.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React73.createElement(Typography5, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React73.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: popupState.close }, /* @__PURE__ */ React73.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React73.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
3252
3496
|
));
|
|
3253
3497
|
};
|
|
3254
3498
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -3257,10 +3501,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
3257
3501
|
if (!tabs.length) {
|
|
3258
3502
|
return null;
|
|
3259
3503
|
}
|
|
3260
|
-
return /* @__PURE__ */
|
|
3261
|
-
return /* @__PURE__ */
|
|
3504
|
+
return /* @__PURE__ */ React73.createElement(React73.Fragment, null, /* @__PURE__ */ React73.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React73.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React73.createElement(Divider7, null), tabs.map(({ value }, index) => {
|
|
3505
|
+
return /* @__PURE__ */ React73.createElement(TabPanel2, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React73.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
3262
3506
|
if (item.type === "control") {
|
|
3263
|
-
return /* @__PURE__ */
|
|
3507
|
+
return /* @__PURE__ */ React73.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
3264
3508
|
}
|
|
3265
3509
|
return null;
|
|
3266
3510
|
})));
|
|
@@ -3270,7 +3514,7 @@ var Control3 = ({ control }) => {
|
|
|
3270
3514
|
if (!getControlByType(control.type)) {
|
|
3271
3515
|
return null;
|
|
3272
3516
|
}
|
|
3273
|
-
return /* @__PURE__ */
|
|
3517
|
+
return /* @__PURE__ */ React73.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React73.createElement(Grid27, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React73.createElement(Grid27, { item: true, xs: 12 }, /* @__PURE__ */ React73.createElement(ControlFormLabel5, null, control.label)) : null, /* @__PURE__ */ React73.createElement(Grid27, { item: true, xs: 12 }, /* @__PURE__ */ React73.createElement(Control, { type: control.type, props: control.props }))));
|
|
3274
3518
|
};
|
|
3275
3519
|
|
|
3276
3520
|
// src/dynamics/dynamic-transformer.ts
|
|
@@ -3323,18 +3567,18 @@ function getDynamicValue(name, settings) {
|
|
|
3323
3567
|
}
|
|
3324
3568
|
|
|
3325
3569
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
3326
|
-
import * as
|
|
3570
|
+
import * as React74 from "react";
|
|
3327
3571
|
import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
3328
3572
|
import { DatabaseIcon as DatabaseIcon3 } from "@elementor/icons";
|
|
3329
|
-
import { __ as
|
|
3573
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
3330
3574
|
var usePropDynamicAction = () => {
|
|
3331
3575
|
const { propType } = useBoundProp6();
|
|
3332
3576
|
const visible = !!propType && supportsDynamic(propType);
|
|
3333
3577
|
return {
|
|
3334
3578
|
visible,
|
|
3335
3579
|
icon: DatabaseIcon3,
|
|
3336
|
-
title:
|
|
3337
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
3580
|
+
title: __49("Dynamic tags", "elementor"),
|
|
3581
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React74.createElement(DynamicSelection, { onSelect: closePopover })
|
|
3338
3582
|
};
|
|
3339
3583
|
};
|
|
3340
3584
|
|