@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.js
CHANGED
|
@@ -34,12 +34,12 @@ __export(index_exports, {
|
|
|
34
34
|
init: () => init2,
|
|
35
35
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
36
36
|
registerControlReplacement: () => registerControlReplacement,
|
|
37
|
-
useBoundProp: () =>
|
|
37
|
+
useBoundProp: () => import_editor_controls51.useBoundProp,
|
|
38
38
|
usePanelActions: () => usePanelActions,
|
|
39
39
|
usePanelStatus: () => usePanelStatus
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(index_exports);
|
|
42
|
-
var
|
|
42
|
+
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
43
43
|
|
|
44
44
|
// src/control-replacement.tsx
|
|
45
45
|
var import_editor_controls = require("@elementor/editor-controls");
|
|
@@ -52,7 +52,7 @@ var import_editor_props = require("@elementor/editor-props");
|
|
|
52
52
|
var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
|
|
53
53
|
var import_icons2 = require("@elementor/icons");
|
|
54
54
|
var import_locations = require("@elementor/locations");
|
|
55
|
-
var
|
|
55
|
+
var import_ui6 = require("@elementor/ui");
|
|
56
56
|
var import_i18n3 = require("@wordpress/i18n");
|
|
57
57
|
|
|
58
58
|
// src/contexts/classes-prop-context.tsx
|
|
@@ -132,23 +132,193 @@ function getProviderByStyleId(styleId) {
|
|
|
132
132
|
return styleProvider ?? null;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
// src/components/
|
|
135
|
+
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
136
136
|
var React4 = __toESM(require("react"));
|
|
137
|
+
var import_react6 = require("react");
|
|
138
|
+
var import_ui2 = require("@elementor/ui");
|
|
139
|
+
|
|
140
|
+
// src/components/creatable-autocomplete/autocomplete-option-internal-properties.ts
|
|
141
|
+
function addGroupToOptions(options12, pluralEntityName) {
|
|
142
|
+
return options12.map((option) => {
|
|
143
|
+
return {
|
|
144
|
+
...option,
|
|
145
|
+
_group: `Existing ${pluralEntityName ?? "options"}`
|
|
146
|
+
};
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function removeOptionsInternalKeys(options12) {
|
|
150
|
+
return options12.map((option) => {
|
|
151
|
+
const { _group, _action, ...rest } = option;
|
|
152
|
+
return rest;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// src/components/creatable-autocomplete/use-autocomplete-change.ts
|
|
157
|
+
function useAutocompleteChange(params) {
|
|
158
|
+
const { options: options12, onSelect, createOption, setInputValue, closeDropdown } = params;
|
|
159
|
+
const handleChange = async (_, selectedOrInputValue, reason) => {
|
|
160
|
+
const selectedOptions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
161
|
+
const newInputValue = selectedOrInputValue.reduce((acc, option) => {
|
|
162
|
+
if (typeof option === "string") {
|
|
163
|
+
return option;
|
|
164
|
+
} else if (option._action === "create") {
|
|
165
|
+
return option.value;
|
|
166
|
+
}
|
|
167
|
+
return acc;
|
|
168
|
+
}, null);
|
|
169
|
+
const inputValueMatchesExistingOption = newInputValue && options12.find((option) => option.label === newInputValue);
|
|
170
|
+
if (newInputValue && shouldCreateNewOption(reason, selectedOptions, newInputValue, Boolean(inputValueMatchesExistingOption))) {
|
|
171
|
+
return createOption(newInputValue);
|
|
172
|
+
}
|
|
173
|
+
if (reason === "createOption" && inputValueMatchesExistingOption) {
|
|
174
|
+
selectedOptions.push(inputValueMatchesExistingOption);
|
|
175
|
+
}
|
|
176
|
+
updateSelectedOptions(selectedOptions);
|
|
177
|
+
setInputValue("");
|
|
178
|
+
closeDropdown();
|
|
179
|
+
};
|
|
180
|
+
return handleChange;
|
|
181
|
+
function shouldCreateNewOption(reason, selectedOptions, newInputValue, inputValueMatchesExistingOption) {
|
|
182
|
+
const createOptionWasClicked = reason === "selectOption" && selectedOptions.some((option) => option._action === "create");
|
|
183
|
+
const enterWasPressed = reason === "createOption" && !options12.some((option) => option.label === newInputValue);
|
|
184
|
+
const createOptionWasDisplayed = !inputValueMatchesExistingOption;
|
|
185
|
+
return createOptionWasClicked || enterWasPressed && createOptionWasDisplayed;
|
|
186
|
+
}
|
|
187
|
+
function updateSelectedOptions(selectedOptions) {
|
|
188
|
+
const fixedOptions = options12.filter((option) => !!option.fixed);
|
|
189
|
+
const updatedOptions = [...fixedOptions, ...selectedOptions.filter((option) => !option.fixed)];
|
|
190
|
+
onSelect?.(removeOptionsInternalKeys(updatedOptions));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// src/components/creatable-autocomplete/use-autocomplete-states.ts
|
|
137
195
|
var import_react4 = require("react");
|
|
196
|
+
function useInputState(validate) {
|
|
197
|
+
const [inputValue, setInputValue] = (0, import_react4.useState)("");
|
|
198
|
+
const [error, setError] = (0, import_react4.useState)(null);
|
|
199
|
+
const handleInputChange = (event) => {
|
|
200
|
+
const { value } = event.target;
|
|
201
|
+
setInputValue(value);
|
|
202
|
+
if (!validate) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
if (!value) {
|
|
206
|
+
setError(null);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const { isValid, errorMessage } = validate(value, "inputChange");
|
|
210
|
+
if (isValid) {
|
|
211
|
+
setError(null);
|
|
212
|
+
} else {
|
|
213
|
+
setError(errorMessage);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
return { inputValue, setInputValue, error, setError, handleInputChange };
|
|
217
|
+
}
|
|
218
|
+
function useOpenState(initialOpen = false) {
|
|
219
|
+
const [open, setOpen] = (0, import_react4.useState)(initialOpen);
|
|
220
|
+
const openDropdown = () => setOpen(true);
|
|
221
|
+
const closeDropdown = () => setOpen(false);
|
|
222
|
+
return { open, openDropdown, closeDropdown };
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// src/components/creatable-autocomplete/use-create-option.ts
|
|
226
|
+
var import_react5 = require("react");
|
|
227
|
+
function useCreateOption(params) {
|
|
228
|
+
const { onCreate, validate, setInputValue, setError, closeDropdown } = params;
|
|
229
|
+
const [loading, setLoading] = (0, import_react5.useState)(false);
|
|
230
|
+
const createOption = async (value) => {
|
|
231
|
+
if (!onCreate) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
setLoading(true);
|
|
235
|
+
if (validate) {
|
|
236
|
+
const { isValid, errorMessage } = validate(value, "create");
|
|
237
|
+
if (!isValid) {
|
|
238
|
+
setError(errorMessage);
|
|
239
|
+
setLoading(false);
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
try {
|
|
244
|
+
setInputValue("");
|
|
245
|
+
closeDropdown();
|
|
246
|
+
await onCreate(value);
|
|
247
|
+
} catch {
|
|
248
|
+
} finally {
|
|
249
|
+
setLoading(false);
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
return { createOption, loading };
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// src/components/creatable-autocomplete/use-filter-options.ts
|
|
138
256
|
var import_ui = require("@elementor/ui");
|
|
139
|
-
function
|
|
140
|
-
|
|
257
|
+
function useFilterOptions(parameters) {
|
|
258
|
+
const { options: options12, selected, onCreate, entityName } = parameters;
|
|
259
|
+
const filter = (0, import_ui.createFilterOptions)();
|
|
260
|
+
const filterOptions = (optionList, params) => {
|
|
261
|
+
const selectedValues = selected.map((option) => option.value);
|
|
262
|
+
const filteredOptions = filter(
|
|
263
|
+
optionList.filter((option) => !selectedValues.includes(option.value)),
|
|
264
|
+
params
|
|
265
|
+
);
|
|
266
|
+
const isExisting = options12.some((option) => params.inputValue === option.label);
|
|
267
|
+
const allowCreate = Boolean(onCreate) && params.inputValue !== "" && !selectedValues.includes(params.inputValue) && !isExisting;
|
|
268
|
+
if (allowCreate) {
|
|
269
|
+
filteredOptions.unshift({
|
|
270
|
+
label: `Create "${params.inputValue}"`,
|
|
271
|
+
value: params.inputValue,
|
|
272
|
+
_group: `Create a new ${entityName?.singular ?? "option"}`,
|
|
273
|
+
key: `create-${params.inputValue}`,
|
|
274
|
+
_action: "create"
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
return filteredOptions;
|
|
278
|
+
};
|
|
279
|
+
return filterOptions;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// src/components/creatable-autocomplete/creatable-autocomplete.tsx
|
|
283
|
+
function CreatableAutocomplete({
|
|
141
284
|
selected,
|
|
142
285
|
options: options12,
|
|
286
|
+
entityName,
|
|
143
287
|
onSelect,
|
|
144
288
|
placeholder,
|
|
289
|
+
onCreate,
|
|
290
|
+
validate,
|
|
145
291
|
...props
|
|
146
292
|
}) {
|
|
147
|
-
const
|
|
148
|
-
const {
|
|
293
|
+
const { inputValue, setInputValue, error, setError, handleInputChange } = useInputState(validate);
|
|
294
|
+
const { open, openDropdown, closeDropdown } = useOpenState(props.open);
|
|
295
|
+
const { createOption, loading } = useCreateOption({ onCreate, validate, setInputValue, setError, closeDropdown });
|
|
296
|
+
const [internalOptions, internalSelected] = (0, import_react6.useMemo)(
|
|
297
|
+
() => [options12, selected].map((optionsArr) => addGroupToOptions(optionsArr, entityName?.plural)),
|
|
298
|
+
[options12, selected, entityName?.plural]
|
|
299
|
+
);
|
|
300
|
+
const handleChange = useAutocompleteChange({
|
|
301
|
+
options: internalOptions,
|
|
302
|
+
onSelect,
|
|
303
|
+
createOption,
|
|
304
|
+
setInputValue,
|
|
305
|
+
closeDropdown
|
|
306
|
+
});
|
|
307
|
+
const filterOptions = useFilterOptions({ options: options12, selected, onCreate, entityName });
|
|
149
308
|
return /* @__PURE__ */ React4.createElement(
|
|
150
|
-
|
|
309
|
+
import_ui2.Autocomplete,
|
|
151
310
|
{
|
|
311
|
+
renderTags: (tagValue, getTagProps) => {
|
|
312
|
+
return tagValue.map((option, index) => /* @__PURE__ */ React4.createElement(
|
|
313
|
+
import_ui2.Chip,
|
|
314
|
+
{
|
|
315
|
+
size: "tiny",
|
|
316
|
+
...getTagProps({ index }),
|
|
317
|
+
key: option.key ?? option.value ?? option.label,
|
|
318
|
+
label: option.label
|
|
319
|
+
}
|
|
320
|
+
));
|
|
321
|
+
},
|
|
152
322
|
...props,
|
|
153
323
|
freeSolo: true,
|
|
154
324
|
multiple: true,
|
|
@@ -157,37 +327,33 @@ function MultiCombobox({
|
|
|
157
327
|
disableClearable: true,
|
|
158
328
|
handleHomeEndKeys: true,
|
|
159
329
|
disabled: loading,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
330
|
+
open,
|
|
331
|
+
onOpen: openDropdown,
|
|
332
|
+
onClose: closeDropdown,
|
|
333
|
+
disableCloseOnSelect: true,
|
|
334
|
+
value: internalSelected,
|
|
335
|
+
options: internalOptions,
|
|
336
|
+
ListboxComponent: error ? React4.forwardRef((_, ref) => /* @__PURE__ */ React4.createElement(ErrorText, { ref, error })) : void 0,
|
|
337
|
+
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
338
|
+
inputValue,
|
|
339
|
+
renderInput: (params) => {
|
|
340
|
+
return /* @__PURE__ */ React4.createElement(
|
|
341
|
+
import_ui2.TextField,
|
|
342
|
+
{
|
|
343
|
+
...params,
|
|
344
|
+
placeholder,
|
|
345
|
+
error: Boolean(error),
|
|
346
|
+
onChange: handleInputChange,
|
|
347
|
+
sx: (theme) => ({
|
|
348
|
+
".MuiAutocomplete-inputRoot.MuiInputBase-adornedStart": {
|
|
349
|
+
paddingLeft: theme.spacing(0.25),
|
|
350
|
+
paddingRight: theme.spacing(0.25)
|
|
351
|
+
}
|
|
352
|
+
})
|
|
182
353
|
}
|
|
183
|
-
|
|
184
|
-
const action = optionsAndActions.find((value) => isAction(value));
|
|
185
|
-
if (reason === "selectOption" && action?.value) {
|
|
186
|
-
return run(action.apply, action.value);
|
|
187
|
-
}
|
|
188
|
-
const fixedValues = options12.filter((option) => !!option.fixed);
|
|
189
|
-
onSelect?.([.../* @__PURE__ */ new Set([...optionsAndActions, ...fixedValues])]);
|
|
354
|
+
);
|
|
190
355
|
},
|
|
356
|
+
onChange: handleChange,
|
|
191
357
|
getOptionLabel: (option) => typeof option === "string" ? option : option.label,
|
|
192
358
|
getOptionKey: (option) => {
|
|
193
359
|
if (typeof option === "string") {
|
|
@@ -195,64 +361,69 @@ function MultiCombobox({
|
|
|
195
361
|
}
|
|
196
362
|
return option.key ?? option.value ?? option.label;
|
|
197
363
|
},
|
|
198
|
-
filterOptions
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
364
|
+
filterOptions,
|
|
365
|
+
groupBy: (option) => option._group ?? "",
|
|
366
|
+
renderOption: (optionProps, option) => {
|
|
367
|
+
const { _group, label } = option;
|
|
368
|
+
return /* @__PURE__ */ React4.createElement(
|
|
369
|
+
"li",
|
|
370
|
+
{
|
|
371
|
+
...optionProps,
|
|
372
|
+
style: { display: "block", textOverflow: "ellipsis" },
|
|
373
|
+
"data-group": _group
|
|
374
|
+
},
|
|
375
|
+
label
|
|
376
|
+
);
|
|
377
|
+
}
|
|
210
378
|
}
|
|
211
379
|
);
|
|
212
380
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
381
|
+
var Group = (params) => {
|
|
382
|
+
const id = `combobox-group-${(0, import_react6.useId)().replace(/:/g, "_")}`;
|
|
383
|
+
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));
|
|
384
|
+
};
|
|
385
|
+
var ErrorText = React4.forwardRef(({ error = "error" }, ref) => {
|
|
386
|
+
return /* @__PURE__ */ React4.createElement(
|
|
387
|
+
import_ui2.Box,
|
|
388
|
+
{
|
|
389
|
+
ref,
|
|
390
|
+
sx: (theme) => ({
|
|
391
|
+
padding: theme.spacing(2)
|
|
392
|
+
})
|
|
393
|
+
},
|
|
394
|
+
/* @__PURE__ */ React4.createElement(import_ui2.Typography, { variant: "caption", sx: { color: "error.main" } }, error)
|
|
395
|
+
);
|
|
396
|
+
});
|
|
397
|
+
var StyledGroup = (0, import_ui2.styled)("li")`
|
|
398
|
+
&:not( :last-of-type ) {
|
|
399
|
+
border-bottom: 1px solid ${({ theme }) => theme.palette.divider};
|
|
400
|
+
}
|
|
401
|
+
`;
|
|
402
|
+
var StyledGroupHeader = (0, import_ui2.styled)(import_ui2.Box)(({ theme }) => ({
|
|
403
|
+
position: "sticky",
|
|
404
|
+
top: "-8px",
|
|
405
|
+
padding: theme.spacing(1, 2),
|
|
406
|
+
color: theme.palette.text.tertiary,
|
|
407
|
+
backgroundColor: theme.palette.primary.contrastText
|
|
408
|
+
}));
|
|
409
|
+
var StyledGroupItems = (0, import_ui2.styled)("ul")`
|
|
410
|
+
padding: 0;
|
|
411
|
+
`;
|
|
241
412
|
|
|
242
413
|
// src/components/css-classes/css-class-item.tsx
|
|
243
414
|
var React6 = __toESM(require("react"));
|
|
244
|
-
var
|
|
415
|
+
var import_react7 = require("react");
|
|
245
416
|
var import_editor_styles_repository3 = require("@elementor/editor-styles-repository");
|
|
246
417
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
247
418
|
var import_icons = require("@elementor/icons");
|
|
248
|
-
var
|
|
419
|
+
var import_ui5 = require("@elementor/ui");
|
|
249
420
|
var import_i18n2 = require("@wordpress/i18n");
|
|
250
421
|
|
|
251
422
|
// src/components/css-classes/css-class-menu.tsx
|
|
252
423
|
var React5 = __toESM(require("react"));
|
|
253
424
|
var import_editor_styles_repository2 = require("@elementor/editor-styles-repository");
|
|
254
425
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
255
|
-
var
|
|
426
|
+
var import_ui4 = require("@elementor/ui");
|
|
256
427
|
var import_i18n = require("@wordpress/i18n");
|
|
257
428
|
|
|
258
429
|
// src/hooks/use-unapply-class.ts
|
|
@@ -278,8 +449,8 @@ var useUnapplyClass = (classId) => {
|
|
|
278
449
|
};
|
|
279
450
|
|
|
280
451
|
// src/components/style-indicator.tsx
|
|
281
|
-
var
|
|
282
|
-
var StyleIndicator = (0,
|
|
452
|
+
var import_ui3 = require("@elementor/ui");
|
|
453
|
+
var StyleIndicator = (0, import_ui3.styled)("div", {
|
|
283
454
|
shouldForwardProp: (prop) => prop !== "variant"
|
|
284
455
|
})`
|
|
285
456
|
width: 5px;
|
|
@@ -308,10 +479,10 @@ function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl })
|
|
|
308
479
|
e.stopPropagation();
|
|
309
480
|
};
|
|
310
481
|
return /* @__PURE__ */ React5.createElement(
|
|
311
|
-
|
|
482
|
+
import_ui4.Menu,
|
|
312
483
|
{
|
|
313
484
|
MenuListProps: { dense: true, sx: { minWidth: "160px" } },
|
|
314
|
-
...(0,
|
|
485
|
+
...(0, import_ui4.bindMenu)(popupState),
|
|
315
486
|
anchorEl,
|
|
316
487
|
anchorOrigin: {
|
|
317
488
|
vertical: "bottom",
|
|
@@ -325,7 +496,7 @@ function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl })
|
|
|
325
496
|
disableAutoFocusItem: true
|
|
326
497
|
},
|
|
327
498
|
getMenuItemsByProvider({ provider, styleId, handleRename, closeMenu: popupState.close }),
|
|
328
|
-
/* @__PURE__ */ React5.createElement(
|
|
499
|
+
/* @__PURE__ */ React5.createElement(import_ui4.MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, (0, import_i18n.__)("States", "elementor")),
|
|
329
500
|
/* @__PURE__ */ React5.createElement(
|
|
330
501
|
StateMenuItem,
|
|
331
502
|
{
|
|
@@ -378,7 +549,7 @@ function getMenuItemsByProvider({
|
|
|
378
549
|
if (actions.length) {
|
|
379
550
|
actions.unshift(
|
|
380
551
|
/* @__PURE__ */ React5.createElement(
|
|
381
|
-
|
|
552
|
+
import_ui4.MenuSubheader,
|
|
382
553
|
{
|
|
383
554
|
key: "provider-label",
|
|
384
555
|
sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1, textTransform: "capitalize" }
|
|
@@ -386,7 +557,7 @@ function getMenuItemsByProvider({
|
|
|
386
557
|
providerInstance?.labels?.singular
|
|
387
558
|
)
|
|
388
559
|
);
|
|
389
|
-
actions.push(/* @__PURE__ */ React5.createElement(
|
|
560
|
+
actions.push(/* @__PURE__ */ React5.createElement(import_ui4.Divider, { key: "provider-actions-divider" }));
|
|
390
561
|
}
|
|
391
562
|
return actions;
|
|
392
563
|
}
|
|
@@ -416,7 +587,7 @@ function StateMenuItem({
|
|
|
416
587
|
closeMenu();
|
|
417
588
|
}
|
|
418
589
|
},
|
|
419
|
-
/* @__PURE__ */ React5.createElement(
|
|
590
|
+
/* @__PURE__ */ React5.createElement(import_ui4.Stack, { gap: 0.75, direction: "row", alignItems: "center" }, isStyled && /* @__PURE__ */ React5.createElement(StyleIndicator, { "aria-label": (0, import_i18n.__)("Has style", "elementor"), variant: indicatorVariant }), state ?? "normal")
|
|
420
591
|
);
|
|
421
592
|
}
|
|
422
593
|
function UnapplyClassMenuItem({ styleId, closeMenu, ...props }) {
|
|
@@ -465,8 +636,8 @@ function CssClassItem({
|
|
|
465
636
|
renameLabel
|
|
466
637
|
}) {
|
|
467
638
|
const { meta, setMetaState } = useStyle();
|
|
468
|
-
const popupState = (0,
|
|
469
|
-
const [chipRef, setChipRef] = (0,
|
|
639
|
+
const popupState = (0, import_ui5.usePopupState)({ variant: "popover" });
|
|
640
|
+
const [chipRef, setChipRef] = (0, import_react7.useState)(null);
|
|
470
641
|
const { onDelete, ...chipGroupProps } = chipProps;
|
|
471
642
|
const {
|
|
472
643
|
ref,
|
|
@@ -484,7 +655,7 @@ function CssClassItem({
|
|
|
484
655
|
const allowRename = Boolean(providerActions?.update);
|
|
485
656
|
const isShowingState = isActive && meta.state;
|
|
486
657
|
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
|
487
|
-
|
|
658
|
+
import_ui5.UnstableChipGroup,
|
|
488
659
|
{
|
|
489
660
|
ref: setChipRef,
|
|
490
661
|
...chipGroupProps,
|
|
@@ -495,7 +666,7 @@ function CssClassItem({
|
|
|
495
666
|
})
|
|
496
667
|
},
|
|
497
668
|
/* @__PURE__ */ React6.createElement(
|
|
498
|
-
|
|
669
|
+
import_ui5.Chip,
|
|
499
670
|
{
|
|
500
671
|
size: CHIP_SIZE,
|
|
501
672
|
label: isEditing ? /* @__PURE__ */ React6.createElement(import_editor_ui2.EditableField, { ref, error, ...getEditableProps() }) : /* @__PURE__ */ React6.createElement(import_editor_ui2.EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
@@ -526,15 +697,15 @@ function CssClassItem({
|
|
|
526
697
|
}
|
|
527
698
|
),
|
|
528
699
|
!isEditing && /* @__PURE__ */ React6.createElement(
|
|
529
|
-
|
|
700
|
+
import_ui5.Chip,
|
|
530
701
|
{
|
|
531
702
|
icon: isShowingState ? void 0 : /* @__PURE__ */ React6.createElement(import_icons.DotsVerticalIcon, { fontSize: "tiny" }),
|
|
532
703
|
size: CHIP_SIZE,
|
|
533
|
-
label: isShowingState ? /* @__PURE__ */ React6.createElement(
|
|
704
|
+
label: isShowingState ? /* @__PURE__ */ React6.createElement(import_ui5.Stack, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React6.createElement(import_ui5.Typography, { variant: "inherit" }, meta.state), /* @__PURE__ */ React6.createElement(import_icons.DotsVerticalIcon, { fontSize: "tiny" })) : void 0,
|
|
534
705
|
variant: "filled",
|
|
535
706
|
shape: "rounded",
|
|
536
707
|
color,
|
|
537
|
-
...(0,
|
|
708
|
+
...(0, import_ui5.bindTrigger)(popupState),
|
|
538
709
|
"aria-label": (0, import_i18n2.__)("Open CSS Class Menu", "elementor"),
|
|
539
710
|
sx: (theme) => ({
|
|
540
711
|
borderRadius: `${theme.shape.borderRadius * 0.75}px`,
|
|
@@ -556,11 +727,11 @@ function CssClassItem({
|
|
|
556
727
|
));
|
|
557
728
|
}
|
|
558
729
|
var validateLabel = (newLabel) => {
|
|
559
|
-
const result = (0, import_editor_styles_repository3.validateStyleLabel)(newLabel);
|
|
730
|
+
const result = (0, import_editor_styles_repository3.validateStyleLabel)(newLabel, "rename");
|
|
560
731
|
if (result.isValid) {
|
|
561
732
|
return null;
|
|
562
733
|
}
|
|
563
|
-
return result.
|
|
734
|
+
return result.errorMessage;
|
|
564
735
|
};
|
|
565
736
|
|
|
566
737
|
// src/components/css-classes/css-class-selector.tsx
|
|
@@ -579,23 +750,25 @@ function CssClassSelector() {
|
|
|
579
750
|
const options12 = useOptions();
|
|
580
751
|
const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
|
|
581
752
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
582
|
-
const actions = useCreateActions({ pushAppliedId, setActiveId });
|
|
583
753
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
754
|
+
const { create, validate, entityName } = useCreateAction({ pushAppliedId, setActiveId });
|
|
584
755
|
const applied = useAppliedOptions(options12, appliedIds);
|
|
585
756
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
586
757
|
const showPlaceholder = applied.every(({ fixed }) => fixed);
|
|
587
|
-
return /* @__PURE__ */ React7.createElement(
|
|
588
|
-
|
|
758
|
+
return /* @__PURE__ */ React7.createElement(import_ui6.Stack, { p: 2 }, /* @__PURE__ */ React7.createElement(import_ui6.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(import_ui6.FormLabel, { htmlFor: ID, size: "small" }, (0, import_i18n3.__)("Classes", "elementor")), /* @__PURE__ */ React7.createElement(import_ui6.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
759
|
+
CreatableAutocomplete,
|
|
589
760
|
{
|
|
590
761
|
id: ID,
|
|
591
762
|
size: "tiny",
|
|
592
763
|
placeholder: showPlaceholder ? (0, import_i18n3.__)("Type class name", "elementor") : void 0,
|
|
593
764
|
options: options12,
|
|
594
765
|
selected: applied,
|
|
766
|
+
entityName,
|
|
595
767
|
onSelect: handleApply,
|
|
768
|
+
onCreate: create ?? void 0,
|
|
769
|
+
validate: validate ?? void 0,
|
|
596
770
|
limitTags: TAGS_LIMIT,
|
|
597
|
-
|
|
598
|
-
getLimitTagsText: (more) => /* @__PURE__ */ React7.createElement(import_ui5.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
771
|
+
getLimitTagsText: (more) => /* @__PURE__ */ React7.createElement(import_ui6.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
599
772
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
600
773
|
const chipProps = getTagProps({ index });
|
|
601
774
|
const isActive = value.value === active?.value;
|
|
@@ -650,34 +823,38 @@ function useOptions() {
|
|
|
650
823
|
fixed: isElements,
|
|
651
824
|
color: isElements ? "accent" : "global",
|
|
652
825
|
icon: isElements ? /* @__PURE__ */ React7.createElement(import_icons2.MapPinIcon, null) : null,
|
|
653
|
-
provider: provider.getKey()
|
|
654
|
-
// translators: %s is the plural label of the provider (e.g "Existing classes").
|
|
655
|
-
group: (0, import_i18n3.__)("Existing %s", "elementor").replace("%s", provider.labels?.plural ?? "")
|
|
826
|
+
provider: provider.getKey()
|
|
656
827
|
};
|
|
657
828
|
});
|
|
658
829
|
});
|
|
659
830
|
}
|
|
660
|
-
function
|
|
831
|
+
function useCreateAction({
|
|
661
832
|
pushAppliedId,
|
|
662
833
|
setActiveId
|
|
663
834
|
}) {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
835
|
+
const [provider, createAction] = (0, import_editor_styles_repository4.useGetStylesRepositoryCreateAction)() ?? [null, null];
|
|
836
|
+
if (!provider || !createAction) {
|
|
837
|
+
return {};
|
|
838
|
+
}
|
|
839
|
+
const create = (newClassLabel) => {
|
|
840
|
+
const createdId = createAction(newClassLabel);
|
|
841
|
+
pushAppliedId(createdId);
|
|
842
|
+
setActiveId(createdId);
|
|
843
|
+
};
|
|
844
|
+
const validate = (newClassLabel, event) => {
|
|
845
|
+
if (hasReachedLimit(provider)) {
|
|
846
|
+
return {
|
|
847
|
+
isValid: false,
|
|
848
|
+
errorMessage: (0, import_i18n3.__)(
|
|
849
|
+
"You\u2019ve reached the limit of 50 classes. Please remove an existing one to create a new class.",
|
|
850
|
+
"elementor"
|
|
851
|
+
)
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
return (0, import_editor_styles_repository4.validateStyleLabel)(newClassLabel, event);
|
|
855
|
+
};
|
|
856
|
+
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
857
|
+
return { create, validate, entityName };
|
|
681
858
|
}
|
|
682
859
|
function hasReachedLimit(provider) {
|
|
683
860
|
return provider.actions.all().length >= provider.limit;
|
|
@@ -739,24 +916,24 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
739
916
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
740
917
|
|
|
741
918
|
// src/components/editing-panel.tsx
|
|
742
|
-
var
|
|
743
|
-
var
|
|
919
|
+
var React69 = __toESM(require("react"));
|
|
920
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
744
921
|
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
745
922
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
746
923
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
747
924
|
var import_icons23 = require("@elementor/icons");
|
|
748
925
|
var import_session4 = require("@elementor/session");
|
|
749
|
-
var
|
|
750
|
-
var
|
|
926
|
+
var import_ui55 = require("@elementor/ui");
|
|
927
|
+
var import_i18n46 = require("@wordpress/i18n");
|
|
751
928
|
|
|
752
929
|
// src/controls-actions.ts
|
|
753
930
|
var import_menus = require("@elementor/menus");
|
|
754
931
|
|
|
755
932
|
// src/popover-action.tsx
|
|
756
933
|
var React8 = __toESM(require("react"));
|
|
757
|
-
var
|
|
934
|
+
var import_react8 = require("react");
|
|
758
935
|
var import_icons3 = require("@elementor/icons");
|
|
759
|
-
var
|
|
936
|
+
var import_ui7 = require("@elementor/ui");
|
|
760
937
|
var SIZE = "tiny";
|
|
761
938
|
function PopoverAction({
|
|
762
939
|
title,
|
|
@@ -764,16 +941,16 @@ function PopoverAction({
|
|
|
764
941
|
icon: Icon,
|
|
765
942
|
popoverContent: PopoverContent2
|
|
766
943
|
}) {
|
|
767
|
-
const id = (0,
|
|
768
|
-
const popupState = (0,
|
|
944
|
+
const id = (0, import_react8.useId)();
|
|
945
|
+
const popupState = (0, import_ui7.usePopupState)({
|
|
769
946
|
variant: "popover",
|
|
770
947
|
popupId: `elementor-popover-action-${id}`
|
|
771
948
|
});
|
|
772
949
|
if (!visible) {
|
|
773
950
|
return null;
|
|
774
951
|
}
|
|
775
|
-
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
|
776
|
-
|
|
952
|
+
return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui7.Tooltip, { placement: "top", title }, /* @__PURE__ */ React8.createElement(import_ui7.IconButton, { "aria-label": title, key: id, size: SIZE, ...(0, import_ui7.bindToggle)(popupState) }, /* @__PURE__ */ React8.createElement(Icon, { fontSize: SIZE }))), /* @__PURE__ */ React8.createElement(
|
|
953
|
+
import_ui7.Popover,
|
|
777
954
|
{
|
|
778
955
|
disablePortal: true,
|
|
779
956
|
disableScrollLock: true,
|
|
@@ -781,9 +958,9 @@ function PopoverAction({
|
|
|
781
958
|
vertical: "bottom",
|
|
782
959
|
horizontal: "center"
|
|
783
960
|
},
|
|
784
|
-
...(0,
|
|
961
|
+
...(0, import_ui7.bindPopover)(popupState)
|
|
785
962
|
},
|
|
786
|
-
/* @__PURE__ */ React8.createElement(
|
|
963
|
+
/* @__PURE__ */ React8.createElement(import_ui7.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React8.createElement(Icon, { fontSize: SIZE, sx: { mr: 0.5 } }), /* @__PURE__ */ React8.createElement(import_ui7.Typography, { variant: "subtitle2" }, title), /* @__PURE__ */ React8.createElement(import_ui7.IconButton, { sx: { ml: "auto" }, size: SIZE, onClick: popupState.close }, /* @__PURE__ */ React8.createElement(import_icons3.XIcon, { fontSize: SIZE }))),
|
|
787
964
|
/* @__PURE__ */ React8.createElement(PopoverContent2, { closePopover: popupState.close })
|
|
788
965
|
));
|
|
789
966
|
}
|
|
@@ -797,24 +974,63 @@ var controlActionsMenu = (0, import_menus.createMenu)({
|
|
|
797
974
|
|
|
798
975
|
// src/components/editing-panel-error-fallback.tsx
|
|
799
976
|
var React9 = __toESM(require("react"));
|
|
800
|
-
var
|
|
977
|
+
var import_ui8 = require("@elementor/ui");
|
|
801
978
|
function EditorPanelErrorFallback() {
|
|
802
|
-
return /* @__PURE__ */ React9.createElement(
|
|
979
|
+
return /* @__PURE__ */ React9.createElement(import_ui8.Box, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React9.createElement(import_ui8.Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React9.createElement("strong", null, "Something went wrong")));
|
|
803
980
|
}
|
|
804
981
|
|
|
805
982
|
// src/components/editing-panel-tabs.tsx
|
|
806
|
-
var
|
|
807
|
-
var
|
|
808
|
-
var
|
|
809
|
-
var
|
|
983
|
+
var React68 = __toESM(require("react"));
|
|
984
|
+
var import_react21 = require("react");
|
|
985
|
+
var import_ui54 = require("@elementor/ui");
|
|
986
|
+
var import_i18n45 = require("@wordpress/i18n");
|
|
987
|
+
|
|
988
|
+
// src/contexts/scroll-context.tsx
|
|
989
|
+
var React10 = __toESM(require("react"));
|
|
990
|
+
var import_react9 = require("react");
|
|
991
|
+
var import_ui9 = require("@elementor/ui");
|
|
992
|
+
var ScrollContext = (0, import_react9.createContext)(void 0);
|
|
993
|
+
var ScrollPanel = (0, import_ui9.styled)("div")`
|
|
994
|
+
height: 100%;
|
|
995
|
+
overflow-y: auto;
|
|
996
|
+
`;
|
|
997
|
+
var DEFAULT_SCROLL_DIRECTION = "up";
|
|
998
|
+
function ScrollProvider({ children }) {
|
|
999
|
+
const [direction, setDirection] = (0, import_react9.useState)(DEFAULT_SCROLL_DIRECTION);
|
|
1000
|
+
const ref = (0, import_react9.useRef)(null);
|
|
1001
|
+
const scrollPos = (0, import_react9.useRef)(0);
|
|
1002
|
+
(0, import_react9.useEffect)(() => {
|
|
1003
|
+
const scrollElement = ref.current;
|
|
1004
|
+
if (!scrollElement) {
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
const handleScroll = () => {
|
|
1008
|
+
const { scrollTop } = scrollElement;
|
|
1009
|
+
if (scrollTop > scrollPos.current) {
|
|
1010
|
+
setDirection("down");
|
|
1011
|
+
} else if (scrollTop < scrollPos.current) {
|
|
1012
|
+
setDirection("up");
|
|
1013
|
+
}
|
|
1014
|
+
scrollPos.current = scrollTop;
|
|
1015
|
+
};
|
|
1016
|
+
scrollElement.addEventListener("scroll", handleScroll);
|
|
1017
|
+
return () => {
|
|
1018
|
+
scrollElement.removeEventListener("scroll", handleScroll);
|
|
1019
|
+
};
|
|
1020
|
+
});
|
|
1021
|
+
return /* @__PURE__ */ React10.createElement(ScrollContext.Provider, { value: { direction } }, /* @__PURE__ */ React10.createElement(ScrollPanel, { ref }, children));
|
|
1022
|
+
}
|
|
1023
|
+
function useScrollDirection() {
|
|
1024
|
+
return (0, import_react9.useContext)(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
|
|
1025
|
+
}
|
|
810
1026
|
|
|
811
1027
|
// src/components/settings-tab.tsx
|
|
812
|
-
var
|
|
1028
|
+
var React16 = __toESM(require("react"));
|
|
813
1029
|
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
814
1030
|
var import_session = require("@elementor/session");
|
|
815
1031
|
|
|
816
1032
|
// src/controls-registry/control.tsx
|
|
817
|
-
var
|
|
1033
|
+
var React11 = __toESM(require("react"));
|
|
818
1034
|
|
|
819
1035
|
// src/controls-registry/controls-registry.tsx
|
|
820
1036
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
@@ -840,20 +1056,20 @@ var Control = ({ props, type }) => {
|
|
|
840
1056
|
context: { controlType: type }
|
|
841
1057
|
});
|
|
842
1058
|
}
|
|
843
|
-
return /* @__PURE__ */
|
|
1059
|
+
return /* @__PURE__ */ React11.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
844
1060
|
};
|
|
845
1061
|
|
|
846
1062
|
// src/controls-registry/control-type-container.tsx
|
|
847
|
-
var
|
|
848
|
-
var
|
|
1063
|
+
var React12 = __toESM(require("react"));
|
|
1064
|
+
var import_ui10 = require("@elementor/ui");
|
|
849
1065
|
var ControlTypeContainer = ({
|
|
850
1066
|
controlType,
|
|
851
1067
|
children
|
|
852
1068
|
}) => {
|
|
853
1069
|
const layout = getLayoutByType(controlType);
|
|
854
|
-
return /* @__PURE__ */
|
|
1070
|
+
return /* @__PURE__ */ React12.createElement(StyledContainer, { layout }, children);
|
|
855
1071
|
};
|
|
856
|
-
var StyledContainer = (0,
|
|
1072
|
+
var StyledContainer = (0, import_ui10.styled)(import_ui10.Box, {
|
|
857
1073
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
858
1074
|
})(({ layout, theme }) => ({
|
|
859
1075
|
display: "grid",
|
|
@@ -869,7 +1085,7 @@ var getGridLayout = (layout) => ({
|
|
|
869
1085
|
});
|
|
870
1086
|
|
|
871
1087
|
// src/controls-registry/settings-field.tsx
|
|
872
|
-
var
|
|
1088
|
+
var React13 = __toESM(require("react"));
|
|
873
1089
|
var import_editor_controls3 = require("@elementor/editor-controls");
|
|
874
1090
|
var import_editor_elements3 = require("@elementor/editor-elements");
|
|
875
1091
|
|
|
@@ -898,18 +1114,18 @@ var SettingsField = ({ bind, children }) => {
|
|
|
898
1114
|
props: { ...newValue }
|
|
899
1115
|
});
|
|
900
1116
|
};
|
|
901
|
-
return /* @__PURE__ */
|
|
1117
|
+
return /* @__PURE__ */ React13.createElement(import_editor_controls3.PropProvider, { propType, value, setValue }, /* @__PURE__ */ React13.createElement(import_editor_controls3.PropKeyProvider, { bind }, children));
|
|
902
1118
|
};
|
|
903
1119
|
|
|
904
1120
|
// src/components/section.tsx
|
|
905
|
-
var
|
|
906
|
-
var
|
|
907
|
-
var
|
|
1121
|
+
var React14 = __toESM(require("react"));
|
|
1122
|
+
var import_react10 = require("react");
|
|
1123
|
+
var import_ui12 = require("@elementor/ui");
|
|
908
1124
|
|
|
909
1125
|
// src/components/collapse-icon.tsx
|
|
910
1126
|
var import_icons4 = require("@elementor/icons");
|
|
911
|
-
var
|
|
912
|
-
var CollapseIcon = (0,
|
|
1127
|
+
var import_ui11 = require("@elementor/ui");
|
|
1128
|
+
var CollapseIcon = (0, import_ui11.styled)(import_icons4.ChevronDownIcon, {
|
|
913
1129
|
shouldForwardProp: (prop) => prop !== "open"
|
|
914
1130
|
})(({ theme, open }) => ({
|
|
915
1131
|
transform: open ? "rotate(180deg)" : "rotate(0deg)",
|
|
@@ -920,47 +1136,47 @@ var CollapseIcon = (0, import_ui9.styled)(import_icons4.ChevronDownIcon, {
|
|
|
920
1136
|
|
|
921
1137
|
// src/components/section.tsx
|
|
922
1138
|
function Section({ title, children, defaultExpanded = false }) {
|
|
923
|
-
const [isOpen, setIsOpen] = (0,
|
|
924
|
-
const id = (0,
|
|
1139
|
+
const [isOpen, setIsOpen] = (0, import_react10.useState)(!!defaultExpanded);
|
|
1140
|
+
const id = (0, import_react10.useId)();
|
|
925
1141
|
const labelId = `label-${id}`;
|
|
926
1142
|
const contentId = `content-${id}`;
|
|
927
|
-
return /* @__PURE__ */
|
|
928
|
-
|
|
1143
|
+
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(
|
|
1144
|
+
import_ui12.ListItemButton,
|
|
929
1145
|
{
|
|
930
1146
|
id: labelId,
|
|
931
1147
|
"aria-controls": contentId,
|
|
932
1148
|
onClick: () => setIsOpen((prev) => !prev),
|
|
933
1149
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
934
1150
|
},
|
|
935
|
-
/* @__PURE__ */
|
|
936
|
-
|
|
1151
|
+
/* @__PURE__ */ React14.createElement(
|
|
1152
|
+
import_ui12.ListItemText,
|
|
937
1153
|
{
|
|
938
1154
|
secondary: title,
|
|
939
1155
|
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" }
|
|
940
1156
|
}
|
|
941
1157
|
),
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
), /* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ React14.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
1159
|
+
), /* @__PURE__ */ React14.createElement(import_ui12.Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React14.createElement(import_ui12.Stack, { gap: 2.5, p: 2 }, children)), /* @__PURE__ */ React14.createElement(import_ui12.Divider, null));
|
|
944
1160
|
}
|
|
945
1161
|
|
|
946
1162
|
// src/components/sections-list.tsx
|
|
947
|
-
var
|
|
948
|
-
var
|
|
1163
|
+
var React15 = __toESM(require("react"));
|
|
1164
|
+
var import_ui13 = require("@elementor/ui");
|
|
949
1165
|
function SectionsList(props) {
|
|
950
|
-
return /* @__PURE__ */
|
|
1166
|
+
return /* @__PURE__ */ React15.createElement(import_ui13.List, { disablePadding: true, component: "div", ...props });
|
|
951
1167
|
}
|
|
952
1168
|
|
|
953
1169
|
// src/components/settings-tab.tsx
|
|
954
1170
|
var SettingsTab = () => {
|
|
955
1171
|
const { elementType, element } = useElement();
|
|
956
|
-
return /* @__PURE__ */
|
|
1172
|
+
return /* @__PURE__ */ React16.createElement(import_session.SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React16.createElement(SectionsList, null, elementType.controls.map(({ type, value }, index) => {
|
|
957
1173
|
if (type === "control") {
|
|
958
|
-
return /* @__PURE__ */
|
|
1174
|
+
return /* @__PURE__ */ React16.createElement(Control2, { key: value.bind, control: value });
|
|
959
1175
|
}
|
|
960
1176
|
if (type === "section") {
|
|
961
|
-
return /* @__PURE__ */
|
|
1177
|
+
return /* @__PURE__ */ React16.createElement(Section, { title: value.label, key: type + "." + index, defaultExpanded: true }, value.items?.map((item) => {
|
|
962
1178
|
if (item.type === "control") {
|
|
963
|
-
return /* @__PURE__ */
|
|
1179
|
+
return /* @__PURE__ */ React16.createElement(Control2, { key: item.value.bind, control: item.value });
|
|
964
1180
|
}
|
|
965
1181
|
return null;
|
|
966
1182
|
}));
|
|
@@ -972,32 +1188,32 @@ var Control2 = ({ control }) => {
|
|
|
972
1188
|
if (!getControlByType(control.type)) {
|
|
973
1189
|
return null;
|
|
974
1190
|
}
|
|
975
|
-
return /* @__PURE__ */
|
|
1191
|
+
return /* @__PURE__ */ React16.createElement(SettingsField, { bind: control.bind }, /* @__PURE__ */ React16.createElement(ControlTypeContainer, { controlType: control.type }, control.label ? /* @__PURE__ */ React16.createElement(import_editor_controls4.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React16.createElement(Control, { type: control.type, props: control.props })));
|
|
976
1192
|
};
|
|
977
1193
|
|
|
978
1194
|
// src/components/style-tab.tsx
|
|
979
|
-
var
|
|
980
|
-
var
|
|
1195
|
+
var React67 = __toESM(require("react"));
|
|
1196
|
+
var import_react20 = require("react");
|
|
981
1197
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
982
1198
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
983
1199
|
var import_session3 = require("@elementor/session");
|
|
984
|
-
var
|
|
985
|
-
var
|
|
1200
|
+
var import_ui53 = require("@elementor/ui");
|
|
1201
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
986
1202
|
|
|
987
1203
|
// src/contexts/styles-inheritance-context.tsx
|
|
988
|
-
var
|
|
989
|
-
var
|
|
1204
|
+
var React17 = __toESM(require("react"));
|
|
1205
|
+
var import_react12 = require("react");
|
|
990
1206
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
991
1207
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
992
1208
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
993
1209
|
var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
|
|
994
1210
|
|
|
995
1211
|
// src/hooks/use-styles-rerender.ts
|
|
996
|
-
var
|
|
1212
|
+
var import_react11 = require("react");
|
|
997
1213
|
var useStylesRerender = () => {
|
|
998
1214
|
const { provider } = useStyle();
|
|
999
|
-
const [, reRender] = (0,
|
|
1000
|
-
(0,
|
|
1215
|
+
const [, reRender] = (0, import_react11.useReducer)((p) => !p, false);
|
|
1216
|
+
(0, import_react11.useEffect)(() => provider?.subscribe(reRender), [provider]);
|
|
1001
1217
|
};
|
|
1002
1218
|
|
|
1003
1219
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
@@ -1158,15 +1374,15 @@ function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
|
1158
1374
|
}
|
|
1159
1375
|
|
|
1160
1376
|
// src/contexts/styles-inheritance-context.tsx
|
|
1161
|
-
var Context4 = (0,
|
|
1377
|
+
var Context4 = (0, import_react12.createContext)(null);
|
|
1162
1378
|
function StyleInheritanceProvider({ children }) {
|
|
1163
1379
|
const styleDefs = useAppliedStyles();
|
|
1164
1380
|
const breakpointsTree = (0, import_editor_responsive.getBreakpointsTree)();
|
|
1165
1381
|
const getSnapshot = createStylesInheritance(styleDefs, breakpointsTree);
|
|
1166
|
-
return /* @__PURE__ */
|
|
1382
|
+
return /* @__PURE__ */ React17.createElement(Context4.Provider, { value: { getSnapshot } }, children);
|
|
1167
1383
|
}
|
|
1168
1384
|
function useStylesInheritanceFields(fields) {
|
|
1169
|
-
const context = (0,
|
|
1385
|
+
const context = (0, import_react12.useContext)(Context4);
|
|
1170
1386
|
const { meta } = useStyle();
|
|
1171
1387
|
if (!context) {
|
|
1172
1388
|
throw new Error("useStylesInheritanceFields must be used within a StyleInheritanceProvider");
|
|
@@ -1200,10 +1416,10 @@ var useBaseStyles = () => {
|
|
|
1200
1416
|
};
|
|
1201
1417
|
|
|
1202
1418
|
// src/hooks/use-active-style-def-id.ts
|
|
1203
|
-
var
|
|
1419
|
+
var import_react13 = require("react");
|
|
1204
1420
|
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
1205
1421
|
function useActiveStyleDefId(classProp) {
|
|
1206
|
-
const [activeStyledDefId, setActiveStyledDefId] = (0,
|
|
1422
|
+
const [activeStyledDefId, setActiveStyledDefId] = (0, import_react13.useState)(null);
|
|
1207
1423
|
const appliedClassesIds = useAppliedClassesIds2(classProp)?.value || [];
|
|
1208
1424
|
const fallback = useFirstAppliedClass(appliedClassesIds);
|
|
1209
1425
|
const activeAndAppliedClassId = useActiveAndAppliedClassId(activeStyledDefId, appliedClassesIds);
|
|
@@ -1224,16 +1440,16 @@ function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
|
1224
1440
|
}
|
|
1225
1441
|
|
|
1226
1442
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1227
|
-
var
|
|
1443
|
+
var React20 = __toESM(require("react"));
|
|
1228
1444
|
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
1229
1445
|
|
|
1230
1446
|
// src/controls-registry/styles-field.tsx
|
|
1231
|
-
var
|
|
1447
|
+
var React19 = __toESM(require("react"));
|
|
1232
1448
|
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
1233
1449
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1234
1450
|
|
|
1235
1451
|
// src/hooks/use-styles-fields.ts
|
|
1236
|
-
var
|
|
1452
|
+
var import_react14 = require("react");
|
|
1237
1453
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
1238
1454
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
1239
1455
|
var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
|
|
@@ -1287,7 +1503,7 @@ function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
|
1287
1503
|
);
|
|
1288
1504
|
}
|
|
1289
1505
|
function useUndoableCreateElementStyle() {
|
|
1290
|
-
return (0,
|
|
1506
|
+
return (0, import_react14.useMemo)(() => {
|
|
1291
1507
|
return (0, import_editor_v1_adapters.undoable)(
|
|
1292
1508
|
{
|
|
1293
1509
|
do: (payload) => {
|
|
@@ -1315,7 +1531,7 @@ function useUndoableCreateElementStyle() {
|
|
|
1315
1531
|
}, []);
|
|
1316
1532
|
}
|
|
1317
1533
|
function useUndoableUpdateStyle() {
|
|
1318
|
-
return (0,
|
|
1534
|
+
return (0, import_react14.useMemo)(() => {
|
|
1319
1535
|
return (0, import_editor_v1_adapters.undoable)(
|
|
1320
1536
|
{
|
|
1321
1537
|
do: ({ elementId, styleId, provider, meta, props }) => {
|
|
@@ -1369,7 +1585,7 @@ function useStylesField(propName) {
|
|
|
1369
1585
|
}
|
|
1370
1586
|
|
|
1371
1587
|
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1372
|
-
var
|
|
1588
|
+
var React18 = __toESM(require("react"));
|
|
1373
1589
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
1374
1590
|
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
1375
1591
|
var import_i18n5 = require("@wordpress/i18n");
|
|
@@ -1387,7 +1603,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1387
1603
|
}
|
|
1388
1604
|
const { breakpoint, state } = variant.meta;
|
|
1389
1605
|
if (style.id === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state) {
|
|
1390
|
-
return /* @__PURE__ */
|
|
1606
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1391
1607
|
StyleIndicator,
|
|
1392
1608
|
{
|
|
1393
1609
|
"aria-label": (0, import_i18n5.__)("This is the final value", "elementor"),
|
|
@@ -1396,7 +1612,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1396
1612
|
);
|
|
1397
1613
|
}
|
|
1398
1614
|
if (value !== null && value !== void 0) {
|
|
1399
|
-
return /* @__PURE__ */
|
|
1615
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1400
1616
|
StyleIndicator,
|
|
1401
1617
|
{
|
|
1402
1618
|
"aria-label": (0, import_i18n5.__)("This value is overridden by another style", "elementor"),
|
|
@@ -1404,7 +1620,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1404
1620
|
}
|
|
1405
1621
|
);
|
|
1406
1622
|
}
|
|
1407
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ React18.createElement(StyleIndicator, { "aria-label": (0, import_i18n5.__)("This has value from another style", "elementor") });
|
|
1408
1624
|
};
|
|
1409
1625
|
|
|
1410
1626
|
// src/controls-registry/styles-field.tsx
|
|
@@ -1417,7 +1633,7 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
1417
1633
|
const setValues = (newValue) => {
|
|
1418
1634
|
setValue(newValue[bind]);
|
|
1419
1635
|
};
|
|
1420
|
-
return /* @__PURE__ */
|
|
1636
|
+
return /* @__PURE__ */ React19.createElement(
|
|
1421
1637
|
import_editor_controls6.ControlAdornmentsProvider,
|
|
1422
1638
|
{
|
|
1423
1639
|
items: [
|
|
@@ -1427,7 +1643,7 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
1427
1643
|
}
|
|
1428
1644
|
]
|
|
1429
1645
|
},
|
|
1430
|
-
/* @__PURE__ */
|
|
1646
|
+
/* @__PURE__ */ React19.createElement(
|
|
1431
1647
|
import_editor_controls6.PropProvider,
|
|
1432
1648
|
{
|
|
1433
1649
|
propType,
|
|
@@ -1435,51 +1651,51 @@ var StylesField = ({ bind, placeholder, children }) => {
|
|
|
1435
1651
|
setValue: setValues,
|
|
1436
1652
|
placeholder: placeholderValues
|
|
1437
1653
|
},
|
|
1438
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ React19.createElement(import_editor_controls6.PropKeyProvider, { bind }, children)
|
|
1439
1655
|
)
|
|
1440
1656
|
);
|
|
1441
1657
|
};
|
|
1442
1658
|
|
|
1443
1659
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1444
1660
|
var BackgroundSection = () => {
|
|
1445
|
-
return /* @__PURE__ */
|
|
1661
|
+
return /* @__PURE__ */ React20.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React20.createElement(import_editor_controls7.BackgroundControl, null));
|
|
1446
1662
|
};
|
|
1447
1663
|
|
|
1448
1664
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1449
|
-
var
|
|
1665
|
+
var React30 = __toESM(require("react"));
|
|
1450
1666
|
|
|
1451
1667
|
// src/components/panel-divider.tsx
|
|
1452
|
-
var
|
|
1453
|
-
var
|
|
1454
|
-
var PanelDivider = () => /* @__PURE__ */
|
|
1668
|
+
var React21 = __toESM(require("react"));
|
|
1669
|
+
var import_ui14 = require("@elementor/ui");
|
|
1670
|
+
var PanelDivider = () => /* @__PURE__ */ React21.createElement(import_ui14.Divider, { sx: { my: 0.5 } });
|
|
1455
1671
|
|
|
1456
1672
|
// src/components/section-content.tsx
|
|
1457
|
-
var
|
|
1458
|
-
var
|
|
1459
|
-
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */
|
|
1673
|
+
var React22 = __toESM(require("react"));
|
|
1674
|
+
var import_ui15 = require("@elementor/ui");
|
|
1675
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React22.createElement(import_ui15.Stack, { gap, sx: { ...sx } }, children);
|
|
1460
1676
|
|
|
1461
1677
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1462
|
-
var
|
|
1678
|
+
var React28 = __toESM(require("react"));
|
|
1463
1679
|
var import_i18n9 = require("@wordpress/i18n");
|
|
1464
1680
|
|
|
1465
1681
|
// src/components/add-or-remove-content.tsx
|
|
1466
|
-
var
|
|
1682
|
+
var React24 = __toESM(require("react"));
|
|
1467
1683
|
var import_icons5 = require("@elementor/icons");
|
|
1468
|
-
var
|
|
1684
|
+
var import_ui17 = require("@elementor/ui");
|
|
1469
1685
|
|
|
1470
1686
|
// src/components/control-label.tsx
|
|
1471
|
-
var
|
|
1687
|
+
var React23 = __toESM(require("react"));
|
|
1472
1688
|
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
1473
|
-
var
|
|
1689
|
+
var import_ui16 = require("@elementor/ui");
|
|
1474
1690
|
var ControlLabel = ({ children }) => {
|
|
1475
|
-
return /* @__PURE__ */
|
|
1691
|
+
return /* @__PURE__ */ React23.createElement(import_ui16.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 1 }, /* @__PURE__ */ React23.createElement(import_editor_controls8.ControlFormLabel, null, children), /* @__PURE__ */ React23.createElement(import_editor_controls8.ControlAdornments, null));
|
|
1476
1692
|
};
|
|
1477
1693
|
|
|
1478
1694
|
// src/components/add-or-remove-content.tsx
|
|
1479
1695
|
var SIZE2 = "tiny";
|
|
1480
1696
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
1481
|
-
return /* @__PURE__ */
|
|
1482
|
-
|
|
1697
|
+
return /* @__PURE__ */ React24.createElement(SectionContent, null, /* @__PURE__ */ React24.createElement(
|
|
1698
|
+
import_ui17.Stack,
|
|
1483
1699
|
{
|
|
1484
1700
|
direction: "row",
|
|
1485
1701
|
sx: {
|
|
@@ -1488,24 +1704,24 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1488
1704
|
marginInlineEnd: -0.75
|
|
1489
1705
|
}
|
|
1490
1706
|
},
|
|
1491
|
-
/* @__PURE__ */
|
|
1492
|
-
isAdded ? /* @__PURE__ */
|
|
1493
|
-
), /* @__PURE__ */
|
|
1707
|
+
/* @__PURE__ */ React24.createElement(ControlLabel, null, label),
|
|
1708
|
+
isAdded ? /* @__PURE__ */ React24.createElement(import_ui17.IconButton, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React24.createElement(import_icons5.MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React24.createElement(import_ui17.IconButton, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React24.createElement(import_icons5.PlusIcon, { fontSize: SIZE2 }))
|
|
1709
|
+
), /* @__PURE__ */ React24.createElement(import_ui17.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React24.createElement(SectionContent, null, children)));
|
|
1494
1710
|
};
|
|
1495
1711
|
|
|
1496
1712
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
1497
|
-
var
|
|
1713
|
+
var React25 = __toESM(require("react"));
|
|
1498
1714
|
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
1499
|
-
var
|
|
1715
|
+
var import_ui18 = require("@elementor/ui");
|
|
1500
1716
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1501
1717
|
var BorderColorField = () => {
|
|
1502
|
-
return /* @__PURE__ */
|
|
1718
|
+
return /* @__PURE__ */ React25.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React25.createElement(import_ui18.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React25.createElement(import_ui18.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React25.createElement(ControlLabel, null, (0, import_i18n6.__)("Border color", "elementor"))), /* @__PURE__ */ React25.createElement(import_ui18.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React25.createElement(import_editor_controls9.ColorControl, null))));
|
|
1503
1719
|
};
|
|
1504
1720
|
|
|
1505
1721
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1506
|
-
var
|
|
1722
|
+
var React26 = __toESM(require("react"));
|
|
1507
1723
|
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
1508
|
-
var
|
|
1724
|
+
var import_ui19 = require("@elementor/ui");
|
|
1509
1725
|
var import_i18n7 = require("@wordpress/i18n");
|
|
1510
1726
|
var borderStyles = [
|
|
1511
1727
|
{ value: "none", label: (0, import_i18n7.__)("None", "elementor") },
|
|
@@ -1519,58 +1735,58 @@ var borderStyles = [
|
|
|
1519
1735
|
{ value: "outset", label: (0, import_i18n7.__)("Outset", "elementor") }
|
|
1520
1736
|
];
|
|
1521
1737
|
var BorderStyleField = () => {
|
|
1522
|
-
return /* @__PURE__ */
|
|
1738
|
+
return /* @__PURE__ */ React26.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React26.createElement(import_ui19.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(import_ui19.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, (0, import_i18n7.__)("Border type", "elementor"))), /* @__PURE__ */ React26.createElement(import_ui19.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React26.createElement(import_editor_controls10.SelectControl, { options: borderStyles }))));
|
|
1523
1739
|
};
|
|
1524
1740
|
|
|
1525
1741
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1526
|
-
var
|
|
1742
|
+
var React27 = __toESM(require("react"));
|
|
1527
1743
|
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
1528
1744
|
var import_editor_props4 = require("@elementor/editor-props");
|
|
1529
1745
|
var import_icons6 = require("@elementor/icons");
|
|
1530
|
-
var
|
|
1746
|
+
var import_ui21 = require("@elementor/ui");
|
|
1531
1747
|
var import_i18n8 = require("@wordpress/i18n");
|
|
1532
1748
|
|
|
1533
1749
|
// src/hooks/use-direction.ts
|
|
1534
|
-
var
|
|
1750
|
+
var import_ui20 = require("@elementor/ui");
|
|
1535
1751
|
function useDirection() {
|
|
1536
|
-
const theme = (0,
|
|
1752
|
+
const theme = (0, import_ui20.useTheme)(), extendedWindow = window;
|
|
1537
1753
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
|
|
1538
1754
|
return { isSiteRtl, isUiRtl };
|
|
1539
1755
|
}
|
|
1540
1756
|
|
|
1541
1757
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1542
|
-
var InlineStartIcon = (0,
|
|
1543
|
-
var InlineEndIcon = (0,
|
|
1758
|
+
var InlineStartIcon = (0, import_ui21.withDirection)(import_icons6.SideRightIcon);
|
|
1759
|
+
var InlineEndIcon = (0, import_ui21.withDirection)(import_icons6.SideLeftIcon);
|
|
1544
1760
|
var getEdges = (isSiteRtl) => [
|
|
1545
1761
|
{
|
|
1546
1762
|
label: (0, import_i18n8.__)("Top", "elementor"),
|
|
1547
|
-
icon: /* @__PURE__ */
|
|
1763
|
+
icon: /* @__PURE__ */ React27.createElement(import_icons6.SideTopIcon, { fontSize: "tiny" }),
|
|
1548
1764
|
bind: "block-start"
|
|
1549
1765
|
},
|
|
1550
1766
|
{
|
|
1551
1767
|
label: isSiteRtl ? (0, import_i18n8.__)("Left", "elementor") : (0, import_i18n8.__)("Right", "elementor"),
|
|
1552
|
-
icon: /* @__PURE__ */
|
|
1768
|
+
icon: /* @__PURE__ */ React27.createElement(InlineStartIcon, { fontSize: "tiny" }),
|
|
1553
1769
|
bind: "inline-end"
|
|
1554
1770
|
},
|
|
1555
1771
|
{
|
|
1556
1772
|
label: (0, import_i18n8.__)("Bottom", "elementor"),
|
|
1557
|
-
icon: /* @__PURE__ */
|
|
1773
|
+
icon: /* @__PURE__ */ React27.createElement(import_icons6.SideBottomIcon, { fontSize: "tiny" }),
|
|
1558
1774
|
bind: "block-end"
|
|
1559
1775
|
},
|
|
1560
1776
|
{
|
|
1561
1777
|
label: isSiteRtl ? (0, import_i18n8.__)("Right", "elementor") : (0, import_i18n8.__)("Left", "elementor"),
|
|
1562
|
-
icon: /* @__PURE__ */
|
|
1778
|
+
icon: /* @__PURE__ */ React27.createElement(InlineEndIcon, { fontSize: "tiny" }),
|
|
1563
1779
|
bind: "inline-start"
|
|
1564
1780
|
}
|
|
1565
1781
|
];
|
|
1566
1782
|
var BorderWidthField = () => {
|
|
1567
1783
|
const { isSiteRtl } = useDirection();
|
|
1568
|
-
return /* @__PURE__ */
|
|
1784
|
+
return /* @__PURE__ */ React27.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React27.createElement(
|
|
1569
1785
|
import_editor_controls11.EqualUnequalSizesControl,
|
|
1570
1786
|
{
|
|
1571
1787
|
items: getEdges(isSiteRtl),
|
|
1572
1788
|
label: (0, import_i18n8.__)("Border width", "elementor"),
|
|
1573
|
-
icon: /* @__PURE__ */
|
|
1789
|
+
icon: /* @__PURE__ */ React27.createElement(import_icons6.SideAllIcon, { fontSize: "tiny" }),
|
|
1574
1790
|
tooltipLabel: (0, import_i18n8.__)("Adjust borders", "elementor"),
|
|
1575
1791
|
multiSizePropTypeUtil: import_editor_props4.borderWidthPropTypeUtil
|
|
1576
1792
|
}
|
|
@@ -1596,7 +1812,7 @@ var BorderField = () => {
|
|
|
1596
1812
|
});
|
|
1597
1813
|
};
|
|
1598
1814
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
1599
|
-
return /* @__PURE__ */
|
|
1815
|
+
return /* @__PURE__ */ React28.createElement(
|
|
1600
1816
|
AddOrRemoveContent,
|
|
1601
1817
|
{
|
|
1602
1818
|
label: (0, import_i18n9.__)("Border", "elementor"),
|
|
@@ -1604,23 +1820,23 @@ var BorderField = () => {
|
|
|
1604
1820
|
onAdd: addBorder,
|
|
1605
1821
|
onRemove: removeBorder
|
|
1606
1822
|
},
|
|
1607
|
-
/* @__PURE__ */
|
|
1608
|
-
/* @__PURE__ */
|
|
1609
|
-
/* @__PURE__ */
|
|
1823
|
+
/* @__PURE__ */ React28.createElement(BorderWidthField, null),
|
|
1824
|
+
/* @__PURE__ */ React28.createElement(BorderColorField, null),
|
|
1825
|
+
/* @__PURE__ */ React28.createElement(BorderStyleField, null)
|
|
1610
1826
|
);
|
|
1611
1827
|
};
|
|
1612
1828
|
|
|
1613
1829
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1614
|
-
var
|
|
1830
|
+
var React29 = __toESM(require("react"));
|
|
1615
1831
|
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
1616
1832
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
1617
1833
|
var import_icons7 = require("@elementor/icons");
|
|
1618
|
-
var
|
|
1834
|
+
var import_ui22 = require("@elementor/ui");
|
|
1619
1835
|
var import_i18n10 = require("@wordpress/i18n");
|
|
1620
|
-
var StartStartIcon = (0,
|
|
1621
|
-
var StartEndIcon = (0,
|
|
1622
|
-
var EndStartIcon = (0,
|
|
1623
|
-
var EndEndIcon = (0,
|
|
1836
|
+
var StartStartIcon = (0, import_ui22.withDirection)(import_icons7.RadiusTopLeftIcon);
|
|
1837
|
+
var StartEndIcon = (0, import_ui22.withDirection)(import_icons7.RadiusTopRightIcon);
|
|
1838
|
+
var EndStartIcon = (0, import_ui22.withDirection)(import_icons7.RadiusBottomLeftIcon);
|
|
1839
|
+
var EndEndIcon = (0, import_ui22.withDirection)(import_icons7.RadiusBottomRightIcon);
|
|
1624
1840
|
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top right", "elementor") : (0, import_i18n10.__)("Top left", "elementor");
|
|
1625
1841
|
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Top left", "elementor") : (0, import_i18n10.__)("Top right", "elementor");
|
|
1626
1842
|
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom right", "elementor") : (0, import_i18n10.__)("Bottom left", "elementor");
|
|
@@ -1628,33 +1844,33 @@ var getEndEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n10.__)("Bottom le
|
|
|
1628
1844
|
var getCorners = (isSiteRtl) => [
|
|
1629
1845
|
{
|
|
1630
1846
|
label: getStartStartLabel(isSiteRtl),
|
|
1631
|
-
icon: /* @__PURE__ */
|
|
1847
|
+
icon: /* @__PURE__ */ React29.createElement(StartStartIcon, { fontSize: "tiny" }),
|
|
1632
1848
|
bind: "start-start"
|
|
1633
1849
|
},
|
|
1634
1850
|
{
|
|
1635
1851
|
label: getStartEndLabel(isSiteRtl),
|
|
1636
|
-
icon: /* @__PURE__ */
|
|
1852
|
+
icon: /* @__PURE__ */ React29.createElement(StartEndIcon, { fontSize: "tiny" }),
|
|
1637
1853
|
bind: "start-end"
|
|
1638
1854
|
},
|
|
1639
1855
|
{
|
|
1640
1856
|
label: getEndStartLabel(isSiteRtl),
|
|
1641
|
-
icon: /* @__PURE__ */
|
|
1857
|
+
icon: /* @__PURE__ */ React29.createElement(EndStartIcon, { fontSize: "tiny" }),
|
|
1642
1858
|
bind: "end-start"
|
|
1643
1859
|
},
|
|
1644
1860
|
{
|
|
1645
1861
|
label: getEndEndLabel(isSiteRtl),
|
|
1646
|
-
icon: /* @__PURE__ */
|
|
1862
|
+
icon: /* @__PURE__ */ React29.createElement(EndEndIcon, { fontSize: "tiny" }),
|
|
1647
1863
|
bind: "end-end"
|
|
1648
1864
|
}
|
|
1649
1865
|
];
|
|
1650
1866
|
var BorderRadiusField = () => {
|
|
1651
1867
|
const { isSiteRtl } = useDirection();
|
|
1652
|
-
return /* @__PURE__ */
|
|
1868
|
+
return /* @__PURE__ */ React29.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React29.createElement(
|
|
1653
1869
|
import_editor_controls12.EqualUnequalSizesControl,
|
|
1654
1870
|
{
|
|
1655
1871
|
items: getCorners(isSiteRtl),
|
|
1656
1872
|
label: (0, import_i18n10.__)("Border radius", "elementor"),
|
|
1657
|
-
icon: /* @__PURE__ */
|
|
1873
|
+
icon: /* @__PURE__ */ React29.createElement(import_icons7.BorderCornersIcon, { fontSize: "tiny" }),
|
|
1658
1874
|
tooltipLabel: (0, import_i18n10.__)("Adjust corners", "elementor"),
|
|
1659
1875
|
multiSizePropTypeUtil: import_editor_props5.borderRadiusPropTypeUtil
|
|
1660
1876
|
}
|
|
@@ -1662,17 +1878,17 @@ var BorderRadiusField = () => {
|
|
|
1662
1878
|
};
|
|
1663
1879
|
|
|
1664
1880
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1665
|
-
var BorderSection = () => /* @__PURE__ */
|
|
1881
|
+
var BorderSection = () => /* @__PURE__ */ React30.createElement(SectionContent, null, /* @__PURE__ */ React30.createElement(BorderRadiusField, null), /* @__PURE__ */ React30.createElement(PanelDivider, null), /* @__PURE__ */ React30.createElement(BorderField, null));
|
|
1666
1882
|
|
|
1667
1883
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
1668
|
-
var
|
|
1884
|
+
var React31 = __toESM(require("react"));
|
|
1669
1885
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
1670
1886
|
var EffectsSection = () => {
|
|
1671
|
-
return /* @__PURE__ */
|
|
1887
|
+
return /* @__PURE__ */ React31.createElement(SectionContent, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React31.createElement(import_editor_controls13.BoxShadowRepeaterControl, null)));
|
|
1672
1888
|
};
|
|
1673
1889
|
|
|
1674
1890
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1675
|
-
var
|
|
1891
|
+
var React43 = __toESM(require("react"));
|
|
1676
1892
|
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
1677
1893
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
1678
1894
|
var import_i18n21 = require("@wordpress/i18n");
|
|
@@ -1703,16 +1919,16 @@ function useComputedStyle(elementId) {
|
|
|
1703
1919
|
}
|
|
1704
1920
|
|
|
1705
1921
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
1706
|
-
var
|
|
1922
|
+
var React33 = __toESM(require("react"));
|
|
1707
1923
|
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
1708
1924
|
var import_icons8 = require("@elementor/icons");
|
|
1709
|
-
var
|
|
1925
|
+
var import_ui24 = require("@elementor/ui");
|
|
1710
1926
|
var import_i18n11 = require("@wordpress/i18n");
|
|
1711
1927
|
|
|
1712
1928
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1713
|
-
var
|
|
1714
|
-
var
|
|
1715
|
-
var
|
|
1929
|
+
var React32 = __toESM(require("react"));
|
|
1930
|
+
var import_react15 = require("react");
|
|
1931
|
+
var import_ui23 = require("@elementor/ui");
|
|
1716
1932
|
var CLOCKWISE_ANGLES = {
|
|
1717
1933
|
row: 0,
|
|
1718
1934
|
column: 90,
|
|
@@ -1732,13 +1948,13 @@ var RotatedIcon = ({
|
|
|
1732
1948
|
offset = 0,
|
|
1733
1949
|
disableRotationForReversed = false
|
|
1734
1950
|
}) => {
|
|
1735
|
-
const rotate = (0,
|
|
1951
|
+
const rotate = (0, import_react15.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
1736
1952
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
1737
|
-
return /* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ React32.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1738
1954
|
};
|
|
1739
1955
|
var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existingRef) => {
|
|
1740
1956
|
const [direction] = useStylesField("flex-direction");
|
|
1741
|
-
const isRtl = "rtl" === (0,
|
|
1957
|
+
const isRtl = "rtl" === (0, import_ui23.useTheme)().direction;
|
|
1742
1958
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
1743
1959
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
1744
1960
|
const currentDirection = direction?.value || "row";
|
|
@@ -1753,8 +1969,8 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
1753
1969
|
};
|
|
1754
1970
|
|
|
1755
1971
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
1756
|
-
var StartIcon = (0,
|
|
1757
|
-
var EndIcon = (0,
|
|
1972
|
+
var StartIcon = (0, import_ui24.withDirection)(import_icons8.JustifyTopIcon);
|
|
1973
|
+
var EndIcon = (0, import_ui24.withDirection)(import_icons8.JustifyBottomIcon);
|
|
1758
1974
|
var iconProps = {
|
|
1759
1975
|
isClockwise: false,
|
|
1760
1976
|
offset: 0,
|
|
@@ -1764,53 +1980,53 @@ var options = [
|
|
|
1764
1980
|
{
|
|
1765
1981
|
value: "start",
|
|
1766
1982
|
label: (0, import_i18n11.__)("Start", "elementor"),
|
|
1767
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1983
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1768
1984
|
showTooltip: true
|
|
1769
1985
|
},
|
|
1770
1986
|
{
|
|
1771
1987
|
value: "center",
|
|
1772
1988
|
label: (0, import_i18n11.__)("Center", "elementor"),
|
|
1773
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1989
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons8.JustifyCenterIcon, size, ...iconProps }),
|
|
1774
1990
|
showTooltip: true
|
|
1775
1991
|
},
|
|
1776
1992
|
{
|
|
1777
1993
|
value: "end",
|
|
1778
1994
|
label: (0, import_i18n11.__)("End", "elementor"),
|
|
1779
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1995
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1780
1996
|
showTooltip: true
|
|
1781
1997
|
},
|
|
1782
1998
|
{
|
|
1783
1999
|
value: "space-between",
|
|
1784
2000
|
label: (0, import_i18n11.__)("Space between", "elementor"),
|
|
1785
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2001
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons8.JustifySpaceBetweenVerticalIcon, size, ...iconProps }),
|
|
1786
2002
|
showTooltip: true
|
|
1787
2003
|
},
|
|
1788
2004
|
{
|
|
1789
2005
|
value: "space-around",
|
|
1790
2006
|
label: (0, import_i18n11.__)("Space around", "elementor"),
|
|
1791
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2007
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons8.JustifySpaceAroundVerticalIcon, size, ...iconProps }),
|
|
1792
2008
|
showTooltip: true
|
|
1793
2009
|
},
|
|
1794
2010
|
{
|
|
1795
2011
|
value: "space-evenly",
|
|
1796
2012
|
label: (0, import_i18n11.__)("Space evenly", "elementor"),
|
|
1797
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2013
|
+
renderContent: ({ size }) => /* @__PURE__ */ React33.createElement(RotatedIcon, { icon: import_icons8.JustifyDistributeVerticalIcon, size, ...iconProps }),
|
|
1798
2014
|
showTooltip: true
|
|
1799
2015
|
}
|
|
1800
2016
|
];
|
|
1801
2017
|
var AlignContentField = () => {
|
|
1802
2018
|
const { isSiteRtl } = useDirection();
|
|
1803
|
-
return /* @__PURE__ */
|
|
2019
|
+
return /* @__PURE__ */ React33.createElement(import_ui24.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(import_ui24.ThemeProvider, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "align-content" }, /* @__PURE__ */ React33.createElement(import_ui24.Stack, { gap: 1 }, /* @__PURE__ */ React33.createElement(ControlLabel, null, (0, import_i18n11.__)("Align content", "elementor")), /* @__PURE__ */ React33.createElement(import_editor_controls14.ToggleControl, { options, fullWidth: true })))));
|
|
1804
2020
|
};
|
|
1805
2021
|
|
|
1806
2022
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1807
|
-
var
|
|
2023
|
+
var React34 = __toESM(require("react"));
|
|
1808
2024
|
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
1809
2025
|
var import_icons9 = require("@elementor/icons");
|
|
1810
|
-
var
|
|
2026
|
+
var import_ui25 = require("@elementor/ui");
|
|
1811
2027
|
var import_i18n12 = require("@wordpress/i18n");
|
|
1812
|
-
var StartIcon2 = (0,
|
|
1813
|
-
var EndIcon2 = (0,
|
|
2028
|
+
var StartIcon2 = (0, import_ui25.withDirection)(import_icons9.LayoutAlignLeftIcon);
|
|
2029
|
+
var EndIcon2 = (0, import_ui25.withDirection)(import_icons9.LayoutAlignRightIcon);
|
|
1814
2030
|
var iconProps2 = {
|
|
1815
2031
|
isClockwise: false,
|
|
1816
2032
|
offset: 90
|
|
@@ -1819,38 +2035,38 @@ var options2 = [
|
|
|
1819
2035
|
{
|
|
1820
2036
|
value: "start",
|
|
1821
2037
|
label: (0, import_i18n12.__)("Start", "elementor"),
|
|
1822
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2038
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1823
2039
|
showTooltip: true
|
|
1824
2040
|
},
|
|
1825
2041
|
{
|
|
1826
2042
|
value: "center",
|
|
1827
2043
|
label: (0, import_i18n12.__)("Center", "elementor"),
|
|
1828
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2044
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons9.LayoutAlignCenterIcon, size, ...iconProps2 }),
|
|
1829
2045
|
showTooltip: true
|
|
1830
2046
|
},
|
|
1831
2047
|
{
|
|
1832
2048
|
value: "end",
|
|
1833
2049
|
label: (0, import_i18n12.__)("End", "elementor"),
|
|
1834
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2050
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1835
2051
|
showTooltip: true
|
|
1836
2052
|
},
|
|
1837
2053
|
{
|
|
1838
2054
|
value: "stretch",
|
|
1839
2055
|
label: (0, import_i18n12.__)("Stretch", "elementor"),
|
|
1840
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2056
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(RotatedIcon, { icon: import_icons9.LayoutDistributeVerticalIcon, size, ...iconProps2 }),
|
|
1841
2057
|
showTooltip: true
|
|
1842
2058
|
}
|
|
1843
2059
|
];
|
|
1844
2060
|
var AlignItemsField = () => {
|
|
1845
2061
|
const { isSiteRtl } = useDirection();
|
|
1846
|
-
return /* @__PURE__ */
|
|
2062
|
+
return /* @__PURE__ */ React34.createElement(import_ui25.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(import_ui25.ThemeProvider, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React34.createElement(import_ui25.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(import_ui25.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel, null, (0, import_i18n12.__)("Align items", "elementor"))), /* @__PURE__ */ React34.createElement(import_ui25.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(import_editor_controls15.ToggleControl, { options: options2 }))))));
|
|
1847
2063
|
};
|
|
1848
2064
|
|
|
1849
2065
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1850
|
-
var
|
|
2066
|
+
var React35 = __toESM(require("react"));
|
|
1851
2067
|
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
1852
2068
|
var import_icons10 = require("@elementor/icons");
|
|
1853
|
-
var
|
|
2069
|
+
var import_ui26 = require("@elementor/ui");
|
|
1854
2070
|
var import_i18n13 = require("@wordpress/i18n");
|
|
1855
2071
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
1856
2072
|
row: 90,
|
|
@@ -1858,8 +2074,8 @@ var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
|
1858
2074
|
column: 0,
|
|
1859
2075
|
"column-reverse": 0
|
|
1860
2076
|
};
|
|
1861
|
-
var StartIcon3 = (0,
|
|
1862
|
-
var EndIcon3 = (0,
|
|
2077
|
+
var StartIcon3 = (0, import_ui26.withDirection)(import_icons10.LayoutAlignLeftIcon);
|
|
2078
|
+
var EndIcon3 = (0, import_ui26.withDirection)(import_icons10.LayoutAlignRightIcon);
|
|
1863
2079
|
var iconProps3 = {
|
|
1864
2080
|
isClockwise: false
|
|
1865
2081
|
};
|
|
@@ -1867,7 +2083,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1867
2083
|
{
|
|
1868
2084
|
value: "start",
|
|
1869
2085
|
label: (0, import_i18n13.__)("Start", "elementor"),
|
|
1870
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2086
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1871
2087
|
RotatedIcon,
|
|
1872
2088
|
{
|
|
1873
2089
|
icon: StartIcon3,
|
|
@@ -1881,7 +2097,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1881
2097
|
{
|
|
1882
2098
|
value: "center",
|
|
1883
2099
|
label: (0, import_i18n13.__)("Center", "elementor"),
|
|
1884
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2100
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1885
2101
|
RotatedIcon,
|
|
1886
2102
|
{
|
|
1887
2103
|
icon: import_icons10.LayoutAlignCenterIcon,
|
|
@@ -1895,7 +2111,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1895
2111
|
{
|
|
1896
2112
|
value: "end",
|
|
1897
2113
|
label: (0, import_i18n13.__)("End", "elementor"),
|
|
1898
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2114
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1899
2115
|
RotatedIcon,
|
|
1900
2116
|
{
|
|
1901
2117
|
icon: EndIcon3,
|
|
@@ -1909,7 +2125,7 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1909
2125
|
{
|
|
1910
2126
|
value: "stretch",
|
|
1911
2127
|
label: (0, import_i18n13.__)("Stretch", "elementor"),
|
|
1912
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2128
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(
|
|
1913
2129
|
RotatedIcon,
|
|
1914
2130
|
{
|
|
1915
2131
|
icon: import_icons10.LayoutDistributeVerticalIcon,
|
|
@@ -1923,13 +2139,13 @@ var getOptions = (parentStyleDirection) => [
|
|
|
1923
2139
|
];
|
|
1924
2140
|
var AlignSelfChild = ({ parentStyleDirection }) => {
|
|
1925
2141
|
const { isSiteRtl } = useDirection();
|
|
1926
|
-
return /* @__PURE__ */
|
|
2142
|
+
return /* @__PURE__ */ React35.createElement(import_ui26.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(import_ui26.ThemeProvider, null, /* @__PURE__ */ React35.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React35.createElement(import_ui26.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(import_ui26.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel, null, (0, import_i18n13.__)("Align self", "elementor"))), /* @__PURE__ */ React35.createElement(import_ui26.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React35.createElement(import_editor_controls16.ToggleControl, { options: getOptions(parentStyleDirection) }))))));
|
|
1927
2143
|
};
|
|
1928
2144
|
|
|
1929
2145
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1930
|
-
var
|
|
2146
|
+
var React36 = __toESM(require("react"));
|
|
1931
2147
|
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
1932
|
-
var
|
|
2148
|
+
var import_ui27 = require("@elementor/ui");
|
|
1933
2149
|
var import_i18n14 = require("@wordpress/i18n");
|
|
1934
2150
|
var displayFieldOptions = [
|
|
1935
2151
|
{
|
|
@@ -1959,59 +2175,59 @@ var displayFieldOptions = [
|
|
|
1959
2175
|
];
|
|
1960
2176
|
var DisplayField = () => {
|
|
1961
2177
|
const placeholder = useDisplayPlaceholderValue();
|
|
1962
|
-
return /* @__PURE__ */
|
|
2178
|
+
return /* @__PURE__ */ React36.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React36.createElement(import_ui27.Stack, { gap: 0.75 }, /* @__PURE__ */ React36.createElement(ControlLabel, null, (0, import_i18n14.__)("Display", "elementor")), /* @__PURE__ */ React36.createElement(import_editor_controls17.ToggleControl, { options: displayFieldOptions, fullWidth: true })));
|
|
1963
2179
|
};
|
|
1964
2180
|
var useDisplayPlaceholderValue = () => useStylesInheritanceField("display")[0]?.value ?? void 0;
|
|
1965
2181
|
|
|
1966
2182
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1967
|
-
var
|
|
2183
|
+
var React37 = __toESM(require("react"));
|
|
1968
2184
|
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
1969
2185
|
var import_icons11 = require("@elementor/icons");
|
|
1970
|
-
var
|
|
2186
|
+
var import_ui28 = require("@elementor/ui");
|
|
1971
2187
|
var import_i18n15 = require("@wordpress/i18n");
|
|
1972
2188
|
var options3 = [
|
|
1973
2189
|
{
|
|
1974
2190
|
value: "row",
|
|
1975
2191
|
label: (0, import_i18n15.__)("Row", "elementor"),
|
|
1976
2192
|
renderContent: ({ size }) => {
|
|
1977
|
-
const StartIcon5 = (0,
|
|
1978
|
-
return /* @__PURE__ */
|
|
2193
|
+
const StartIcon5 = (0, import_ui28.withDirection)(import_icons11.ArrowRightIcon);
|
|
2194
|
+
return /* @__PURE__ */ React37.createElement(StartIcon5, { fontSize: size });
|
|
1979
2195
|
},
|
|
1980
2196
|
showTooltip: true
|
|
1981
2197
|
},
|
|
1982
2198
|
{
|
|
1983
2199
|
value: "column",
|
|
1984
2200
|
label: (0, import_i18n15.__)("Column", "elementor"),
|
|
1985
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2201
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons11.ArrowDownSmallIcon, { fontSize: size }),
|
|
1986
2202
|
showTooltip: true
|
|
1987
2203
|
},
|
|
1988
2204
|
{
|
|
1989
2205
|
value: "row-reverse",
|
|
1990
2206
|
label: (0, import_i18n15.__)("Reversed row", "elementor"),
|
|
1991
2207
|
renderContent: ({ size }) => {
|
|
1992
|
-
const EndIcon5 = (0,
|
|
1993
|
-
return /* @__PURE__ */
|
|
2208
|
+
const EndIcon5 = (0, import_ui28.withDirection)(import_icons11.ArrowLeftIcon);
|
|
2209
|
+
return /* @__PURE__ */ React37.createElement(EndIcon5, { fontSize: size });
|
|
1994
2210
|
},
|
|
1995
2211
|
showTooltip: true
|
|
1996
2212
|
},
|
|
1997
2213
|
{
|
|
1998
2214
|
value: "column-reverse",
|
|
1999
2215
|
label: (0, import_i18n15.__)("Reversed column", "elementor"),
|
|
2000
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2216
|
+
renderContent: ({ size }) => /* @__PURE__ */ React37.createElement(import_icons11.ArrowUpSmallIcon, { fontSize: size }),
|
|
2001
2217
|
showTooltip: true
|
|
2002
2218
|
}
|
|
2003
2219
|
];
|
|
2004
2220
|
var FlexDirectionField = () => {
|
|
2005
2221
|
const { isSiteRtl } = useDirection();
|
|
2006
|
-
return /* @__PURE__ */
|
|
2222
|
+
return /* @__PURE__ */ React37.createElement(import_ui28.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React37.createElement(import_ui28.ThemeProvider, null, /* @__PURE__ */ React37.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React37.createElement(import_ui28.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React37.createElement(import_ui28.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, (0, import_i18n15.__)("Direction", "elementor"))), /* @__PURE__ */ React37.createElement(import_ui28.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React37.createElement(import_editor_controls18.ToggleControl, { options: options3 }))))));
|
|
2007
2223
|
};
|
|
2008
2224
|
|
|
2009
2225
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
2010
|
-
var
|
|
2011
|
-
var
|
|
2226
|
+
var React38 = __toESM(require("react"));
|
|
2227
|
+
var import_react16 = require("react");
|
|
2012
2228
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
2013
2229
|
var import_icons12 = require("@elementor/icons");
|
|
2014
|
-
var
|
|
2230
|
+
var import_ui29 = require("@elementor/ui");
|
|
2015
2231
|
var import_i18n16 = require("@wordpress/i18n");
|
|
2016
2232
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
2017
2233
|
var LAST_DEFAULT_VALUE = 99999;
|
|
@@ -2026,25 +2242,25 @@ var items = [
|
|
|
2026
2242
|
{
|
|
2027
2243
|
value: FIRST,
|
|
2028
2244
|
label: (0, import_i18n16.__)("First", "elementor"),
|
|
2029
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2245
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons12.ArrowUpSmallIcon, { fontSize: size }),
|
|
2030
2246
|
showTooltip: true
|
|
2031
2247
|
},
|
|
2032
2248
|
{
|
|
2033
2249
|
value: LAST,
|
|
2034
2250
|
label: (0, import_i18n16.__)("Last", "elementor"),
|
|
2035
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2251
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons12.ArrowDownSmallIcon, { fontSize: size }),
|
|
2036
2252
|
showTooltip: true
|
|
2037
2253
|
},
|
|
2038
2254
|
{
|
|
2039
2255
|
value: CUSTOM,
|
|
2040
2256
|
label: (0, import_i18n16.__)("Custom", "elementor"),
|
|
2041
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2257
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(import_icons12.PencilIcon, { fontSize: size }),
|
|
2042
2258
|
showTooltip: true
|
|
2043
2259
|
}
|
|
2044
2260
|
];
|
|
2045
2261
|
var FlexOrderField = () => {
|
|
2046
2262
|
const { isSiteRtl } = useDirection(), [order, setOrder] = useStylesField("order");
|
|
2047
|
-
const [groupControlValue, setGroupControlValue] = (0,
|
|
2263
|
+
const [groupControlValue, setGroupControlValue] = (0, import_react16.useState)(getGroupControlValue(order?.value || null));
|
|
2048
2264
|
const handleToggleButtonChange = (group) => {
|
|
2049
2265
|
setGroupControlValue(group);
|
|
2050
2266
|
if (!group || group === CUSTOM) {
|
|
@@ -2053,7 +2269,7 @@ var FlexOrderField = () => {
|
|
|
2053
2269
|
}
|
|
2054
2270
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
2055
2271
|
};
|
|
2056
|
-
return /* @__PURE__ */
|
|
2272
|
+
return /* @__PURE__ */ React38.createElement(import_ui29.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(import_ui29.ThemeProvider, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React38.createElement(SectionContent, null, /* @__PURE__ */ React38.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n16.__)("Order", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui29.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(
|
|
2057
2273
|
import_editor_controls19.ControlToggleButtonGroup,
|
|
2058
2274
|
{
|
|
2059
2275
|
items,
|
|
@@ -2061,7 +2277,7 @@ var FlexOrderField = () => {
|
|
|
2061
2277
|
onChange: handleToggleButtonChange,
|
|
2062
2278
|
exclusive: true
|
|
2063
2279
|
}
|
|
2064
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
2280
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React38.createElement(import_ui29.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React38.createElement(import_ui29.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React38.createElement(ControlLabel, null, (0, import_i18n16.__)("Custom order", "elementor"))), /* @__PURE__ */ React38.createElement(import_ui29.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React38.createElement(
|
|
2065
2281
|
import_editor_controls19.NumberControl,
|
|
2066
2282
|
{
|
|
2067
2283
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -2081,31 +2297,31 @@ var getGroupControlValue = (order) => {
|
|
|
2081
2297
|
};
|
|
2082
2298
|
|
|
2083
2299
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
2084
|
-
var
|
|
2085
|
-
var
|
|
2300
|
+
var React39 = __toESM(require("react"));
|
|
2301
|
+
var import_react17 = require("react");
|
|
2086
2302
|
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
2087
2303
|
var import_editor_props6 = require("@elementor/editor-props");
|
|
2088
2304
|
var import_icons13 = require("@elementor/icons");
|
|
2089
|
-
var
|
|
2305
|
+
var import_ui30 = require("@elementor/ui");
|
|
2090
2306
|
var import_i18n17 = require("@wordpress/i18n");
|
|
2091
2307
|
var DEFAULT = 1;
|
|
2092
2308
|
var items2 = [
|
|
2093
2309
|
{
|
|
2094
2310
|
value: "flex-grow",
|
|
2095
2311
|
label: (0, import_i18n17.__)("Grow", "elementor"),
|
|
2096
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2312
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons13.ExpandIcon, { fontSize: size }),
|
|
2097
2313
|
showTooltip: true
|
|
2098
2314
|
},
|
|
2099
2315
|
{
|
|
2100
2316
|
value: "flex-shrink",
|
|
2101
2317
|
label: (0, import_i18n17.__)("Shrink", "elementor"),
|
|
2102
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2318
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons13.ShrinkIcon, { fontSize: size }),
|
|
2103
2319
|
showTooltip: true
|
|
2104
2320
|
},
|
|
2105
2321
|
{
|
|
2106
2322
|
value: "custom",
|
|
2107
2323
|
label: (0, import_i18n17.__)("Custom", "elementor"),
|
|
2108
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2324
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(import_icons13.PencilIcon, { fontSize: size }),
|
|
2109
2325
|
showTooltip: true
|
|
2110
2326
|
}
|
|
2111
2327
|
];
|
|
@@ -2115,7 +2331,7 @@ var FlexSizeField = () => {
|
|
|
2115
2331
|
const grow = fields?.["flex-grow"]?.value || null;
|
|
2116
2332
|
const shrink = fields?.["flex-shrink"]?.value || null;
|
|
2117
2333
|
const basis = fields?.["flex-basis"]?.value || null;
|
|
2118
|
-
const currentGroup = (0,
|
|
2334
|
+
const currentGroup = (0, import_react17.useMemo)(() => getActiveGroup({ grow, shrink, basis }), [grow, shrink, basis]), [activeGroup, setActiveGroup] = (0, import_react17.useState)(currentGroup);
|
|
2119
2335
|
const onChangeGroup = (group = null) => {
|
|
2120
2336
|
setActiveGroup(group);
|
|
2121
2337
|
if (!group || group === "custom") {
|
|
@@ -2140,7 +2356,7 @@ var FlexSizeField = () => {
|
|
|
2140
2356
|
"flex-shrink": import_editor_props6.numberPropTypeUtil.create(DEFAULT)
|
|
2141
2357
|
});
|
|
2142
2358
|
};
|
|
2143
|
-
return /* @__PURE__ */
|
|
2359
|
+
return /* @__PURE__ */ React39.createElement(import_ui30.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React39.createElement(import_ui30.ThemeProvider, null, /* @__PURE__ */ React39.createElement(SectionContent, null, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(StylesField, { bind: activeGroup ?? "" }, /* @__PURE__ */ React39.createElement(ControlLabel, null, (0, import_i18n17.__)("Size", "elementor")))), /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(
|
|
2144
2360
|
import_editor_controls20.ControlToggleButtonGroup,
|
|
2145
2361
|
{
|
|
2146
2362
|
value: activeGroup,
|
|
@@ -2148,9 +2364,9 @@ var FlexSizeField = () => {
|
|
|
2148
2364
|
items: items2,
|
|
2149
2365
|
exclusive: true
|
|
2150
2366
|
}
|
|
2151
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
2367
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React39.createElement(FlexCustomField, null))));
|
|
2152
2368
|
};
|
|
2153
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
2369
|
+
var FlexCustomField = () => /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, (0, import_i18n17.__)("Grow", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(import_editor_controls20.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React39.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, (0, import_i18n17.__)("Shrink", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(import_editor_controls20.NumberControl, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React39.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel, null, (0, import_i18n17.__)("Basis", "elementor"))), /* @__PURE__ */ React39.createElement(import_ui30.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React39.createElement(import_editor_controls20.SizeControl, { extendedValues: ["auto"] })))));
|
|
2154
2370
|
var getActiveGroup = ({
|
|
2155
2371
|
grow,
|
|
2156
2372
|
shrink,
|
|
@@ -2172,22 +2388,22 @@ var getActiveGroup = ({
|
|
|
2172
2388
|
};
|
|
2173
2389
|
|
|
2174
2390
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
2175
|
-
var
|
|
2391
|
+
var React40 = __toESM(require("react"));
|
|
2176
2392
|
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
2177
|
-
var
|
|
2393
|
+
var import_ui31 = require("@elementor/ui");
|
|
2178
2394
|
var import_i18n18 = require("@wordpress/i18n");
|
|
2179
2395
|
var GapControlField = () => {
|
|
2180
|
-
return /* @__PURE__ */
|
|
2396
|
+
return /* @__PURE__ */ React40.createElement(import_ui31.Stack, { gap: 1 }, /* @__PURE__ */ React40.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React40.createElement(import_editor_controls21.GapControl, { label: (0, import_i18n18.__)("Gaps", "elementor") })));
|
|
2181
2397
|
};
|
|
2182
2398
|
|
|
2183
2399
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
2184
|
-
var
|
|
2400
|
+
var React41 = __toESM(require("react"));
|
|
2185
2401
|
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
2186
2402
|
var import_icons14 = require("@elementor/icons");
|
|
2187
|
-
var
|
|
2403
|
+
var import_ui32 = require("@elementor/ui");
|
|
2188
2404
|
var import_i18n19 = require("@wordpress/i18n");
|
|
2189
|
-
var StartIcon4 = (0,
|
|
2190
|
-
var EndIcon4 = (0,
|
|
2405
|
+
var StartIcon4 = (0, import_ui32.withDirection)(import_icons14.JustifyTopIcon);
|
|
2406
|
+
var EndIcon4 = (0, import_ui32.withDirection)(import_icons14.JustifyBottomIcon);
|
|
2191
2407
|
var iconProps4 = {
|
|
2192
2408
|
isClockwise: true,
|
|
2193
2409
|
offset: -90
|
|
@@ -2196,74 +2412,74 @@ var options4 = [
|
|
|
2196
2412
|
{
|
|
2197
2413
|
value: "flex-start",
|
|
2198
2414
|
label: (0, import_i18n19.__)("Start", "elementor"),
|
|
2199
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2415
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: StartIcon4, size, ...iconProps4 }),
|
|
2200
2416
|
showTooltip: true
|
|
2201
2417
|
},
|
|
2202
2418
|
{
|
|
2203
2419
|
value: "center",
|
|
2204
2420
|
label: (0, import_i18n19.__)("Center", "elementor"),
|
|
2205
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2421
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: import_icons14.JustifyCenterIcon, size, ...iconProps4 }),
|
|
2206
2422
|
showTooltip: true
|
|
2207
2423
|
},
|
|
2208
2424
|
{
|
|
2209
2425
|
value: "flex-end",
|
|
2210
2426
|
label: (0, import_i18n19.__)("End", "elementor"),
|
|
2211
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2427
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: EndIcon4, size, ...iconProps4 }),
|
|
2212
2428
|
showTooltip: true
|
|
2213
2429
|
},
|
|
2214
2430
|
{
|
|
2215
2431
|
value: "space-between",
|
|
2216
2432
|
label: (0, import_i18n19.__)("Space between", "elementor"),
|
|
2217
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2433
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: import_icons14.JustifySpaceBetweenVerticalIcon, size, ...iconProps4 }),
|
|
2218
2434
|
showTooltip: true
|
|
2219
2435
|
},
|
|
2220
2436
|
{
|
|
2221
2437
|
value: "space-around",
|
|
2222
2438
|
label: (0, import_i18n19.__)("Space around", "elementor"),
|
|
2223
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2439
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: import_icons14.JustifySpaceAroundVerticalIcon, size, ...iconProps4 }),
|
|
2224
2440
|
showTooltip: true
|
|
2225
2441
|
},
|
|
2226
2442
|
{
|
|
2227
2443
|
value: "space-evenly",
|
|
2228
2444
|
label: (0, import_i18n19.__)("Space evenly", "elementor"),
|
|
2229
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2445
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: import_icons14.JustifyDistributeVerticalIcon, size, ...iconProps4 }),
|
|
2230
2446
|
showTooltip: true
|
|
2231
2447
|
}
|
|
2232
2448
|
];
|
|
2233
2449
|
var JustifyContentField = () => {
|
|
2234
2450
|
const { isSiteRtl } = useDirection();
|
|
2235
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ React41.createElement(import_ui32.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React41.createElement(import_ui32.ThemeProvider, null, /* @__PURE__ */ React41.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React41.createElement(import_ui32.Stack, { gap: 0.75 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, (0, import_i18n19.__)("Justify content", "elementor")), /* @__PURE__ */ React41.createElement(import_editor_controls22.ToggleControl, { options: options4, fullWidth: true })))));
|
|
2236
2452
|
};
|
|
2237
2453
|
|
|
2238
2454
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
2239
|
-
var
|
|
2455
|
+
var React42 = __toESM(require("react"));
|
|
2240
2456
|
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
2241
2457
|
var import_icons15 = require("@elementor/icons");
|
|
2242
|
-
var
|
|
2458
|
+
var import_ui33 = require("@elementor/ui");
|
|
2243
2459
|
var import_i18n20 = require("@wordpress/i18n");
|
|
2244
2460
|
var options5 = [
|
|
2245
2461
|
{
|
|
2246
2462
|
value: "nowrap",
|
|
2247
2463
|
label: (0, import_i18n20.__)("No wrap", "elementor"),
|
|
2248
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2464
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(import_icons15.ArrowRightIcon, { fontSize: size }),
|
|
2249
2465
|
showTooltip: true
|
|
2250
2466
|
},
|
|
2251
2467
|
{
|
|
2252
2468
|
value: "wrap",
|
|
2253
2469
|
label: (0, import_i18n20.__)("Wrap", "elementor"),
|
|
2254
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2470
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(import_icons15.ArrowBackIcon, { fontSize: size }),
|
|
2255
2471
|
showTooltip: true
|
|
2256
2472
|
},
|
|
2257
2473
|
{
|
|
2258
2474
|
value: "wrap-reverse",
|
|
2259
2475
|
label: (0, import_i18n20.__)("Reversed wrap", "elementor"),
|
|
2260
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2476
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(import_icons15.ArrowForwardIcon, { fontSize: size }),
|
|
2261
2477
|
showTooltip: true
|
|
2262
2478
|
}
|
|
2263
2479
|
];
|
|
2264
2480
|
var WrapField = () => {
|
|
2265
2481
|
const { isSiteRtl } = useDirection();
|
|
2266
|
-
return /* @__PURE__ */
|
|
2482
|
+
return /* @__PURE__ */ React42.createElement(import_ui33.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React42.createElement(import_ui33.ThemeProvider, null, /* @__PURE__ */ React42.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel, null, (0, import_i18n20.__)("Wrap", "elementor"))), /* @__PURE__ */ React42.createElement(import_ui33.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React42.createElement(import_editor_controls23.ToggleControl, { options: options5 }))))));
|
|
2267
2483
|
};
|
|
2268
2484
|
|
|
2269
2485
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -2275,13 +2491,13 @@ var LayoutSection = () => {
|
|
|
2275
2491
|
const parent = (0, import_editor_elements7.useParentElement)(element.id);
|
|
2276
2492
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
2277
2493
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
2278
|
-
return /* @__PURE__ */
|
|
2494
|
+
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 }));
|
|
2279
2495
|
};
|
|
2280
2496
|
var FlexFields = () => {
|
|
2281
2497
|
const [flexWrap] = useStylesField("flex-wrap");
|
|
2282
|
-
return /* @__PURE__ */
|
|
2498
|
+
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));
|
|
2283
2499
|
};
|
|
2284
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */
|
|
2500
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(PanelDivider, null), /* @__PURE__ */ React43.createElement(import_editor_controls24.ControlFormLabel, null, (0, import_i18n21.__)("Flex child", "elementor")), /* @__PURE__ */ React43.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React43.createElement(FlexOrderField, null), /* @__PURE__ */ React43.createElement(FlexSizeField, null));
|
|
2285
2501
|
var shouldDisplayFlexFields = (display, local) => {
|
|
2286
2502
|
const value = display?.value ?? local?.value;
|
|
2287
2503
|
if (!value) {
|
|
@@ -2291,56 +2507,65 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
2291
2507
|
};
|
|
2292
2508
|
|
|
2293
2509
|
// src/components/style-sections/position-section/position-section.tsx
|
|
2294
|
-
var
|
|
2510
|
+
var React48 = __toESM(require("react"));
|
|
2295
2511
|
var import_session2 = require("@elementor/session");
|
|
2296
2512
|
|
|
2297
2513
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
2298
|
-
var
|
|
2514
|
+
var React44 = __toESM(require("react"));
|
|
2299
2515
|
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
2300
2516
|
var import_icons16 = require("@elementor/icons");
|
|
2301
|
-
var
|
|
2517
|
+
var import_ui34 = require("@elementor/ui");
|
|
2302
2518
|
var import_i18n22 = require("@wordpress/i18n");
|
|
2303
|
-
var InlineStartIcon2 = (0,
|
|
2304
|
-
var InlineEndIcon2 = (0,
|
|
2519
|
+
var InlineStartIcon2 = (0, import_ui34.withDirection)(import_icons16.SideLeftIcon);
|
|
2520
|
+
var InlineEndIcon2 = (0, import_ui34.withDirection)(import_icons16.SideRightIcon);
|
|
2305
2521
|
var sideIcons = {
|
|
2306
|
-
"inset-block-start": /* @__PURE__ */
|
|
2307
|
-
"inset-block-end": /* @__PURE__ */
|
|
2308
|
-
"inset-inline-start": /* @__PURE__ */
|
|
2309
|
-
"inset-inline-end": /* @__PURE__ */
|
|
2522
|
+
"inset-block-start": /* @__PURE__ */ React44.createElement(import_icons16.SideTopIcon, { fontSize: "tiny" }),
|
|
2523
|
+
"inset-block-end": /* @__PURE__ */ React44.createElement(import_icons16.SideBottomIcon, { fontSize: "tiny" }),
|
|
2524
|
+
"inset-inline-start": /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
2525
|
+
"inset-inline-end": /* @__PURE__ */ React44.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
2310
2526
|
};
|
|
2311
2527
|
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n22.__)("Right", "elementor") : (0, import_i18n22.__)("Left", "elementor");
|
|
2312
2528
|
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n22.__)("Left", "elementor") : (0, import_i18n22.__)("Right", "elementor");
|
|
2313
2529
|
var DimensionsField = () => {
|
|
2314
2530
|
const { isSiteRtl } = useDirection();
|
|
2315
|
-
return /* @__PURE__ */
|
|
2531
|
+
return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(import_ui34.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n22.__)("Top", "elementor") }), /* @__PURE__ */ React44.createElement(DimensionField, { side: "inset-inline-end", label: getInlineEndLabel(isSiteRtl) })), /* @__PURE__ */ React44.createElement(import_ui34.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n22.__)("Bottom", "elementor") }), /* @__PURE__ */ React44.createElement(DimensionField, { side: "inset-inline-start", label: getInlineStartLabel(isSiteRtl) })));
|
|
2316
2532
|
};
|
|
2317
2533
|
var DimensionField = ({ side, label }) => {
|
|
2318
|
-
return /* @__PURE__ */
|
|
2534
|
+
return /* @__PURE__ */ React44.createElement(import_ui34.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React44.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(ControlLabel, null, label)), /* @__PURE__ */ React44.createElement(import_ui34.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React44.createElement(StylesField, { bind: side }, /* @__PURE__ */ React44.createElement(import_editor_controls25.SizeControl, { startIcon: sideIcons[side], extendedValues: ["auto"] }))));
|
|
2319
2535
|
};
|
|
2320
2536
|
|
|
2321
|
-
// src/components/style-sections/position-section/
|
|
2322
|
-
var
|
|
2537
|
+
// src/components/style-sections/position-section/offset-field.tsx
|
|
2538
|
+
var React45 = __toESM(require("react"));
|
|
2323
2539
|
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
2324
|
-
var
|
|
2540
|
+
var import_ui35 = require("@elementor/ui");
|
|
2325
2541
|
var import_i18n23 = require("@wordpress/i18n");
|
|
2542
|
+
var OffsetField = () => {
|
|
2543
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "scroll-margin-top" }, /* @__PURE__ */ React45.createElement(import_ui35.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel, null, (0, import_i18n23.__)("Anchor offset", "elementor"))), /* @__PURE__ */ React45.createElement(import_ui35.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(import_editor_controls26.SizeControl, { units: ["px", "em", "rem", "vw", "vh"] }))));
|
|
2544
|
+
};
|
|
2545
|
+
|
|
2546
|
+
// src/components/style-sections/position-section/position-field.tsx
|
|
2547
|
+
var React46 = __toESM(require("react"));
|
|
2548
|
+
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
2549
|
+
var import_ui36 = require("@elementor/ui");
|
|
2550
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
2326
2551
|
var positionOptions = [
|
|
2327
|
-
{ label: (0,
|
|
2328
|
-
{ label: (0,
|
|
2329
|
-
{ label: (0,
|
|
2330
|
-
{ label: (0,
|
|
2331
|
-
{ label: (0,
|
|
2552
|
+
{ label: (0, import_i18n24.__)("Static", "elementor"), value: "static" },
|
|
2553
|
+
{ label: (0, import_i18n24.__)("Relative", "elementor"), value: "relative" },
|
|
2554
|
+
{ label: (0, import_i18n24.__)("Absolute", "elementor"), value: "absolute" },
|
|
2555
|
+
{ label: (0, import_i18n24.__)("Fixed", "elementor"), value: "fixed" },
|
|
2556
|
+
{ label: (0, import_i18n24.__)("Sticky", "elementor"), value: "sticky" }
|
|
2332
2557
|
];
|
|
2333
2558
|
var PositionField = ({ onChange }) => {
|
|
2334
|
-
return /* @__PURE__ */
|
|
2559
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React46.createElement(import_ui36.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui36.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, (0, import_i18n24.__)("Position", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui36.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React46.createElement(import_editor_controls27.SelectControl, { options: positionOptions, onChange }))));
|
|
2335
2560
|
};
|
|
2336
2561
|
|
|
2337
2562
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
2338
|
-
var
|
|
2339
|
-
var
|
|
2340
|
-
var
|
|
2341
|
-
var
|
|
2563
|
+
var React47 = __toESM(require("react"));
|
|
2564
|
+
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
2565
|
+
var import_ui37 = require("@elementor/ui");
|
|
2566
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
2342
2567
|
var ZIndexField = () => {
|
|
2343
|
-
return /* @__PURE__ */
|
|
2568
|
+
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React47.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel, null, (0, import_i18n25.__)("Z-index", "elementor"))), /* @__PURE__ */ React47.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(import_editor_controls28.NumberControl, null))));
|
|
2344
2569
|
};
|
|
2345
2570
|
|
|
2346
2571
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -2372,7 +2597,7 @@ var PositionSection = () => {
|
|
|
2372
2597
|
}
|
|
2373
2598
|
};
|
|
2374
2599
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
2375
|
-
return /* @__PURE__ */
|
|
2600
|
+
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));
|
|
2376
2601
|
};
|
|
2377
2602
|
var usePersistDimensions = () => {
|
|
2378
2603
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -2382,116 +2607,116 @@ var usePersistDimensions = () => {
|
|
|
2382
2607
|
};
|
|
2383
2608
|
|
|
2384
2609
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2385
|
-
var
|
|
2386
|
-
var
|
|
2387
|
-
var
|
|
2388
|
-
var
|
|
2610
|
+
var React50 = __toESM(require("react"));
|
|
2611
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
2612
|
+
var import_ui39 = require("@elementor/ui");
|
|
2613
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
2389
2614
|
|
|
2390
2615
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
2391
|
-
var
|
|
2392
|
-
var
|
|
2616
|
+
var React49 = __toESM(require("react"));
|
|
2617
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
2393
2618
|
var import_icons17 = require("@elementor/icons");
|
|
2394
|
-
var
|
|
2395
|
-
var
|
|
2619
|
+
var import_ui38 = require("@elementor/ui");
|
|
2620
|
+
var import_i18n26 = require("@wordpress/i18n");
|
|
2396
2621
|
var options6 = [
|
|
2397
2622
|
{
|
|
2398
2623
|
value: "visible",
|
|
2399
|
-
label: (0,
|
|
2400
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2624
|
+
label: (0, import_i18n26.__)("Visible", "elementor"),
|
|
2625
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons17.EyeIcon, { fontSize: size }),
|
|
2401
2626
|
showTooltip: true
|
|
2402
2627
|
},
|
|
2403
2628
|
{
|
|
2404
2629
|
value: "hidden",
|
|
2405
|
-
label: (0,
|
|
2406
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2630
|
+
label: (0, import_i18n26.__)("Hidden", "elementor"),
|
|
2631
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons17.EyeOffIcon, { fontSize: size }),
|
|
2407
2632
|
showTooltip: true
|
|
2408
2633
|
},
|
|
2409
2634
|
{
|
|
2410
2635
|
value: "auto",
|
|
2411
|
-
label: (0,
|
|
2412
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2636
|
+
label: (0, import_i18n26.__)("Auto", "elementor"),
|
|
2637
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons17.LetterAIcon, { fontSize: size }),
|
|
2413
2638
|
showTooltip: true
|
|
2414
2639
|
}
|
|
2415
2640
|
];
|
|
2416
2641
|
var OverflowField = () => {
|
|
2417
|
-
return /* @__PURE__ */
|
|
2642
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React49.createElement(import_ui38.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(import_ui38.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel, null, (0, import_i18n26.__)("Overflow", "elementor"))), /* @__PURE__ */ React49.createElement(import_ui38.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React49.createElement(import_editor_controls29.ToggleControl, { options: options6 }))));
|
|
2418
2643
|
};
|
|
2419
2644
|
|
|
2420
2645
|
// src/components/style-sections/size-section/size-section.tsx
|
|
2421
2646
|
var SizeSection = () => {
|
|
2422
|
-
return /* @__PURE__ */
|
|
2647
|
+
return /* @__PURE__ */ React50.createElement(SectionContent, null, /* @__PURE__ */ React50.createElement(import_ui39.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeField, { bind: "width", label: (0, import_i18n27.__)("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React50.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeField, { bind: "height", label: (0, import_i18n27.__)("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React50.createElement(import_ui39.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(
|
|
2423
2648
|
SizeField,
|
|
2424
2649
|
{
|
|
2425
2650
|
bind: "min-width",
|
|
2426
|
-
label: (0,
|
|
2651
|
+
label: (0, import_i18n27.__)("Min width", "elementor"),
|
|
2427
2652
|
extendedValues: ["auto"]
|
|
2428
2653
|
}
|
|
2429
|
-
)), /* @__PURE__ */
|
|
2654
|
+
)), /* @__PURE__ */ React50.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(
|
|
2430
2655
|
SizeField,
|
|
2431
2656
|
{
|
|
2432
2657
|
bind: "min-height",
|
|
2433
|
-
label: (0,
|
|
2658
|
+
label: (0, import_i18n27.__)("Min height", "elementor"),
|
|
2434
2659
|
extendedValues: ["auto"]
|
|
2435
2660
|
}
|
|
2436
|
-
))), /* @__PURE__ */
|
|
2661
|
+
))), /* @__PURE__ */ React50.createElement(import_ui39.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeField, { bind: "max-width", label: (0, import_i18n27.__)("Max width", "elementor") })), /* @__PURE__ */ React50.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeField, { bind: "max-height", label: (0, import_i18n27.__)("Max height", "elementor") }))), /* @__PURE__ */ React50.createElement(PanelDivider, null), /* @__PURE__ */ React50.createElement(import_ui39.Stack, null, /* @__PURE__ */ React50.createElement(OverflowField, null)));
|
|
2437
2662
|
};
|
|
2438
2663
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
2439
|
-
return /* @__PURE__ */
|
|
2664
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind }, /* @__PURE__ */ React50.createElement(import_ui39.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React50.createElement(import_ui39.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React50.createElement(ControlLabel, null, label)), /* @__PURE__ */ React50.createElement(import_ui39.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React50.createElement(import_editor_controls30.SizeControl, { extendedValues }))));
|
|
2440
2665
|
};
|
|
2441
2666
|
|
|
2442
2667
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
2443
|
-
var
|
|
2444
|
-
var
|
|
2445
|
-
var
|
|
2668
|
+
var React51 = __toESM(require("react"));
|
|
2669
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
2670
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
2446
2671
|
var SpacingSection = () => {
|
|
2447
2672
|
const { isSiteRtl } = useDirection();
|
|
2448
|
-
return /* @__PURE__ */
|
|
2449
|
-
|
|
2673
|
+
return /* @__PURE__ */ React51.createElement(SectionContent, null, /* @__PURE__ */ React51.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React51.createElement(
|
|
2674
|
+
import_editor_controls31.LinkedDimensionsControl,
|
|
2450
2675
|
{
|
|
2451
|
-
label: (0,
|
|
2676
|
+
label: (0, import_i18n28.__)("Margin", "elementor"),
|
|
2452
2677
|
isSiteRtl,
|
|
2453
2678
|
extendedValues: ["auto"]
|
|
2454
2679
|
}
|
|
2455
|
-
)), /* @__PURE__ */
|
|
2680
|
+
)), /* @__PURE__ */ React51.createElement(PanelDivider, null), /* @__PURE__ */ React51.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React51.createElement(import_editor_controls31.LinkedDimensionsControl, { label: (0, import_i18n28.__)("Padding", "elementor"), isSiteRtl })));
|
|
2456
2681
|
};
|
|
2457
2682
|
|
|
2458
2683
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2459
|
-
var
|
|
2684
|
+
var React66 = __toESM(require("react"));
|
|
2460
2685
|
|
|
2461
2686
|
// src/components/collapsible-content.tsx
|
|
2462
|
-
var
|
|
2463
|
-
var
|
|
2464
|
-
var
|
|
2465
|
-
var
|
|
2687
|
+
var React52 = __toESM(require("react"));
|
|
2688
|
+
var import_react18 = require("react");
|
|
2689
|
+
var import_ui40 = require("@elementor/ui");
|
|
2690
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
2466
2691
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
2467
|
-
const [open, setOpen] = (0,
|
|
2692
|
+
const [open, setOpen] = (0, import_react18.useState)(defaultOpen);
|
|
2468
2693
|
const handleToggle = () => {
|
|
2469
2694
|
setOpen((prevOpen) => !prevOpen);
|
|
2470
2695
|
};
|
|
2471
|
-
return /* @__PURE__ */
|
|
2472
|
-
|
|
2696
|
+
return /* @__PURE__ */ React52.createElement(import_ui40.Stack, null, /* @__PURE__ */ React52.createElement(
|
|
2697
|
+
import_ui40.Button,
|
|
2473
2698
|
{
|
|
2474
2699
|
fullWidth: true,
|
|
2475
2700
|
size: "small",
|
|
2476
2701
|
color: "secondary",
|
|
2477
2702
|
variant: "outlined",
|
|
2478
2703
|
onClick: handleToggle,
|
|
2479
|
-
endIcon: /* @__PURE__ */
|
|
2704
|
+
endIcon: /* @__PURE__ */ React52.createElement(CollapseIcon, { open }),
|
|
2480
2705
|
sx: { my: 0.5 }
|
|
2481
2706
|
},
|
|
2482
|
-
open ? (0,
|
|
2483
|
-
), /* @__PURE__ */
|
|
2707
|
+
open ? (0, import_i18n29.__)("Show less", "elementor") : (0, import_i18n29.__)("Show more", "elementor")
|
|
2708
|
+
), /* @__PURE__ */ React52.createElement(import_ui40.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
2484
2709
|
};
|
|
2485
2710
|
|
|
2486
2711
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
2487
|
-
var
|
|
2488
|
-
var
|
|
2489
|
-
var
|
|
2490
|
-
var
|
|
2712
|
+
var React53 = __toESM(require("react"));
|
|
2713
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
2714
|
+
var import_ui41 = require("@elementor/ui");
|
|
2715
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
2491
2716
|
|
|
2492
2717
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2493
|
-
var
|
|
2494
|
-
var
|
|
2718
|
+
var import_react19 = require("react");
|
|
2719
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
2495
2720
|
|
|
2496
2721
|
// src/sync/get-elementor-config.ts
|
|
2497
2722
|
var getElementorConfig = () => {
|
|
@@ -2501,9 +2726,9 @@ var getElementorConfig = () => {
|
|
|
2501
2726
|
|
|
2502
2727
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2503
2728
|
var supportedCategories = {
|
|
2504
|
-
system: (0,
|
|
2505
|
-
custom: (0,
|
|
2506
|
-
googlefonts: (0,
|
|
2729
|
+
system: (0, import_i18n30.__)("System", "elementor"),
|
|
2730
|
+
custom: (0, import_i18n30.__)("Custom Fonts", "elementor"),
|
|
2731
|
+
googlefonts: (0, import_i18n30.__)("Google Fonts", "elementor")
|
|
2507
2732
|
};
|
|
2508
2733
|
var getFontFamilies = () => {
|
|
2509
2734
|
const { controls } = getElementorConfig();
|
|
@@ -2515,7 +2740,7 @@ var getFontFamilies = () => {
|
|
|
2515
2740
|
};
|
|
2516
2741
|
var useFontFamilies = () => {
|
|
2517
2742
|
const fontFamilies = getFontFamilies();
|
|
2518
|
-
return (0,
|
|
2743
|
+
return (0, import_react19.useMemo)(() => {
|
|
2519
2744
|
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
2520
2745
|
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
2521
2746
|
if (!supportedCategories[category]) {
|
|
@@ -2540,188 +2765,188 @@ var FontFamilyField = () => {
|
|
|
2540
2765
|
if (fontFamilies.length === 0) {
|
|
2541
2766
|
return null;
|
|
2542
2767
|
}
|
|
2543
|
-
return /* @__PURE__ */
|
|
2768
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React53.createElement(import_ui41.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, (0, import_i18n31.__)("Font family", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui41.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React53.createElement(import_editor_controls32.FontFamilyControl, { fontFamilies }))));
|
|
2544
2769
|
};
|
|
2545
2770
|
|
|
2546
2771
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
2547
|
-
var
|
|
2548
|
-
var
|
|
2549
|
-
var
|
|
2550
|
-
var
|
|
2772
|
+
var React54 = __toESM(require("react"));
|
|
2773
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
2774
|
+
var import_ui42 = require("@elementor/ui");
|
|
2775
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
2551
2776
|
var FontSizeField = () => {
|
|
2552
|
-
return /* @__PURE__ */
|
|
2777
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React54.createElement(import_ui42.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, (0, import_i18n32.__)("Font size", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui42.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(import_editor_controls33.SizeControl, null))));
|
|
2553
2778
|
};
|
|
2554
2779
|
|
|
2555
2780
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
2556
|
-
var
|
|
2557
|
-
var
|
|
2781
|
+
var React55 = __toESM(require("react"));
|
|
2782
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
2558
2783
|
var import_icons18 = require("@elementor/icons");
|
|
2559
|
-
var
|
|
2560
|
-
var
|
|
2784
|
+
var import_ui43 = require("@elementor/ui");
|
|
2785
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
2561
2786
|
var options7 = [
|
|
2562
2787
|
{
|
|
2563
2788
|
value: "normal",
|
|
2564
|
-
label: (0,
|
|
2565
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2789
|
+
label: (0, import_i18n33.__)("Normal", "elementor"),
|
|
2790
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons18.MinusIcon, { fontSize: size }),
|
|
2566
2791
|
showTooltip: true
|
|
2567
2792
|
},
|
|
2568
2793
|
{
|
|
2569
2794
|
value: "italic",
|
|
2570
|
-
label: (0,
|
|
2571
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2795
|
+
label: (0, import_i18n33.__)("Italic", "elementor"),
|
|
2796
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(import_icons18.ItalicIcon, { fontSize: size }),
|
|
2572
2797
|
showTooltip: true
|
|
2573
2798
|
}
|
|
2574
2799
|
];
|
|
2575
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
2800
|
+
var FontStyleField = () => /* @__PURE__ */ React55.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React55.createElement(import_ui43.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(import_ui43.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(import_editor_controls34.ControlFormLabel, null, (0, import_i18n33.__)("Font style", "elementor"))), /* @__PURE__ */ React55.createElement(import_ui43.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(import_editor_controls34.ToggleControl, { options: options7 }))));
|
|
2576
2801
|
|
|
2577
2802
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
2578
|
-
var
|
|
2579
|
-
var
|
|
2580
|
-
var
|
|
2581
|
-
var
|
|
2803
|
+
var React56 = __toESM(require("react"));
|
|
2804
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
2805
|
+
var import_ui44 = require("@elementor/ui");
|
|
2806
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
2582
2807
|
var fontWeightOptions = [
|
|
2583
|
-
{ value: "100", label: (0,
|
|
2584
|
-
{ value: "200", label: (0,
|
|
2585
|
-
{ value: "300", label: (0,
|
|
2586
|
-
{ value: "400", label: (0,
|
|
2587
|
-
{ value: "500", label: (0,
|
|
2588
|
-
{ value: "600", label: (0,
|
|
2589
|
-
{ value: "700", label: (0,
|
|
2590
|
-
{ value: "800", label: (0,
|
|
2591
|
-
{ value: "900", label: (0,
|
|
2808
|
+
{ value: "100", label: (0, import_i18n34.__)("100 - Thin", "elementor") },
|
|
2809
|
+
{ value: "200", label: (0, import_i18n34.__)("200 - Extra light", "elementor") },
|
|
2810
|
+
{ value: "300", label: (0, import_i18n34.__)("300 - Light", "elementor") },
|
|
2811
|
+
{ value: "400", label: (0, import_i18n34.__)("400 - Normal", "elementor") },
|
|
2812
|
+
{ value: "500", label: (0, import_i18n34.__)("500 - Medium", "elementor") },
|
|
2813
|
+
{ value: "600", label: (0, import_i18n34.__)("600 - Semi bold", "elementor") },
|
|
2814
|
+
{ value: "700", label: (0, import_i18n34.__)("700 - Bold", "elementor") },
|
|
2815
|
+
{ value: "800", label: (0, import_i18n34.__)("800 - Extra bold", "elementor") },
|
|
2816
|
+
{ value: "900", label: (0, import_i18n34.__)("900 - Black", "elementor") }
|
|
2592
2817
|
];
|
|
2593
2818
|
var FontWeightField = () => {
|
|
2594
|
-
return /* @__PURE__ */
|
|
2819
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React56.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, (0, import_i18n34.__)("Font weight", "elementor"))), /* @__PURE__ */ React56.createElement(import_ui44.Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React56.createElement(import_editor_controls35.SelectControl, { options: fontWeightOptions }))));
|
|
2595
2820
|
};
|
|
2596
2821
|
|
|
2597
2822
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
2598
|
-
var
|
|
2599
|
-
var
|
|
2600
|
-
var
|
|
2601
|
-
var
|
|
2823
|
+
var React57 = __toESM(require("react"));
|
|
2824
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
2825
|
+
var import_ui45 = require("@elementor/ui");
|
|
2826
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
2602
2827
|
var LetterSpacingField = () => {
|
|
2603
|
-
return /* @__PURE__ */
|
|
2828
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React57.createElement(import_ui45.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel, null, (0, import_i18n35.__)("Letter spacing", "elementor"))), /* @__PURE__ */ React57.createElement(import_ui45.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(import_editor_controls36.SizeControl, null))));
|
|
2604
2829
|
};
|
|
2605
2830
|
|
|
2606
2831
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
2607
|
-
var
|
|
2608
|
-
var
|
|
2609
|
-
var
|
|
2610
|
-
var
|
|
2832
|
+
var React58 = __toESM(require("react"));
|
|
2833
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
2834
|
+
var import_ui46 = require("@elementor/ui");
|
|
2835
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
2611
2836
|
var LineHeightField = () => {
|
|
2612
|
-
return /* @__PURE__ */
|
|
2837
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React58.createElement(import_ui46.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel, null, (0, import_i18n36.__)("Line height", "elementor"))), /* @__PURE__ */ React58.createElement(import_ui46.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(import_editor_controls37.SizeControl, null))));
|
|
2613
2838
|
};
|
|
2614
2839
|
|
|
2615
2840
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
2616
|
-
var
|
|
2617
|
-
var
|
|
2841
|
+
var React59 = __toESM(require("react"));
|
|
2842
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
2618
2843
|
var import_icons19 = require("@elementor/icons");
|
|
2619
|
-
var
|
|
2620
|
-
var
|
|
2621
|
-
var AlignStartIcon = (0,
|
|
2622
|
-
var AlignEndIcon = (0,
|
|
2844
|
+
var import_ui47 = require("@elementor/ui");
|
|
2845
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
2846
|
+
var AlignStartIcon = (0, import_ui47.withDirection)(import_icons19.AlignLeftIcon);
|
|
2847
|
+
var AlignEndIcon = (0, import_ui47.withDirection)(import_icons19.AlignRightIcon);
|
|
2623
2848
|
var options8 = [
|
|
2624
2849
|
{
|
|
2625
2850
|
value: "start",
|
|
2626
|
-
label: (0,
|
|
2627
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2851
|
+
label: (0, import_i18n37.__)("Start", "elementor"),
|
|
2852
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(AlignStartIcon, { fontSize: size }),
|
|
2628
2853
|
showTooltip: true
|
|
2629
2854
|
},
|
|
2630
2855
|
{
|
|
2631
2856
|
value: "center",
|
|
2632
|
-
label: (0,
|
|
2633
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2857
|
+
label: (0, import_i18n37.__)("Center", "elementor"),
|
|
2858
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(import_icons19.AlignCenterIcon, { fontSize: size }),
|
|
2634
2859
|
showTooltip: true
|
|
2635
2860
|
},
|
|
2636
2861
|
{
|
|
2637
2862
|
value: "end",
|
|
2638
|
-
label: (0,
|
|
2639
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2863
|
+
label: (0, import_i18n37.__)("End", "elementor"),
|
|
2864
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(AlignEndIcon, { fontSize: size }),
|
|
2640
2865
|
showTooltip: true
|
|
2641
2866
|
},
|
|
2642
2867
|
{
|
|
2643
2868
|
value: "justify",
|
|
2644
|
-
label: (0,
|
|
2645
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2869
|
+
label: (0, import_i18n37.__)("Justify", "elementor"),
|
|
2870
|
+
renderContent: ({ size }) => /* @__PURE__ */ React59.createElement(import_icons19.AlignJustifiedIcon, { fontSize: size }),
|
|
2646
2871
|
showTooltip: true
|
|
2647
2872
|
}
|
|
2648
2873
|
];
|
|
2649
2874
|
var TextAlignmentField = () => {
|
|
2650
|
-
return /* @__PURE__ */
|
|
2875
|
+
return /* @__PURE__ */ React59.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React59.createElement(import_ui47.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React59.createElement(import_ui47.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, (0, import_i18n37.__)("Text align", "elementor"))), /* @__PURE__ */ React59.createElement(import_ui47.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React59.createElement(import_editor_controls38.ToggleControl, { options: options8 }))));
|
|
2651
2876
|
};
|
|
2652
2877
|
|
|
2653
2878
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2654
|
-
var
|
|
2655
|
-
var
|
|
2656
|
-
var
|
|
2657
|
-
var
|
|
2879
|
+
var React60 = __toESM(require("react"));
|
|
2880
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
2881
|
+
var import_ui48 = require("@elementor/ui");
|
|
2882
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
2658
2883
|
var TextColorField = () => {
|
|
2659
|
-
return /* @__PURE__ */
|
|
2884
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React60.createElement(import_ui48.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel, null, (0, import_i18n38.__)("Text color", "elementor"))), /* @__PURE__ */ React60.createElement(import_ui48.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(import_editor_controls39.ColorControl, null))));
|
|
2660
2885
|
};
|
|
2661
2886
|
|
|
2662
2887
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2663
|
-
var
|
|
2664
|
-
var
|
|
2888
|
+
var React61 = __toESM(require("react"));
|
|
2889
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
2665
2890
|
var import_icons20 = require("@elementor/icons");
|
|
2666
|
-
var
|
|
2667
|
-
var
|
|
2891
|
+
var import_ui49 = require("@elementor/ui");
|
|
2892
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
2668
2893
|
var options9 = [
|
|
2669
2894
|
{
|
|
2670
2895
|
value: "none",
|
|
2671
|
-
label: (0,
|
|
2672
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2896
|
+
label: (0, import_i18n39.__)("None", "elementor"),
|
|
2897
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(import_icons20.MinusIcon, { fontSize: size }),
|
|
2673
2898
|
showTooltip: true,
|
|
2674
2899
|
exclusive: true
|
|
2675
2900
|
},
|
|
2676
2901
|
{
|
|
2677
2902
|
value: "underline",
|
|
2678
|
-
label: (0,
|
|
2679
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2903
|
+
label: (0, import_i18n39.__)("Underline", "elementor"),
|
|
2904
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(import_icons20.UnderlineIcon, { fontSize: size }),
|
|
2680
2905
|
showTooltip: true
|
|
2681
2906
|
},
|
|
2682
2907
|
{
|
|
2683
2908
|
value: "line-through",
|
|
2684
|
-
label: (0,
|
|
2685
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2909
|
+
label: (0, import_i18n39.__)("Line-through", "elementor"),
|
|
2910
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(import_icons20.StrikethroughIcon, { fontSize: size }),
|
|
2686
2911
|
showTooltip: true
|
|
2687
2912
|
},
|
|
2688
2913
|
{
|
|
2689
2914
|
value: "overline",
|
|
2690
|
-
label: (0,
|
|
2691
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2915
|
+
label: (0, import_i18n39.__)("Overline", "elementor"),
|
|
2916
|
+
renderContent: ({ size }) => /* @__PURE__ */ React61.createElement(import_icons20.OverlineIcon, { fontSize: size }),
|
|
2692
2917
|
showTooltip: true
|
|
2693
2918
|
}
|
|
2694
2919
|
];
|
|
2695
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
2920
|
+
var TextDecorationField = () => /* @__PURE__ */ React61.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React61.createElement(import_ui49.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(import_ui49.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel, null, (0, import_i18n39.__)("Line decoration", "elementor"))), /* @__PURE__ */ React61.createElement(import_ui49.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React61.createElement(import_editor_controls40.ToggleControl, { options: options9, exclusive: false }))));
|
|
2696
2921
|
|
|
2697
2922
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2698
|
-
var
|
|
2699
|
-
var
|
|
2923
|
+
var React62 = __toESM(require("react"));
|
|
2924
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
2700
2925
|
var import_icons21 = require("@elementor/icons");
|
|
2701
|
-
var
|
|
2702
|
-
var
|
|
2926
|
+
var import_ui50 = require("@elementor/ui");
|
|
2927
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
2703
2928
|
var options10 = [
|
|
2704
2929
|
{
|
|
2705
2930
|
value: "ltr",
|
|
2706
|
-
label: (0,
|
|
2707
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2931
|
+
label: (0, import_i18n40.__)("Left to right", "elementor"),
|
|
2932
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons21.TextDirectionLtrIcon, { fontSize: size }),
|
|
2708
2933
|
showTooltip: true
|
|
2709
2934
|
},
|
|
2710
2935
|
{
|
|
2711
2936
|
value: "rtl",
|
|
2712
|
-
label: (0,
|
|
2713
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2937
|
+
label: (0, import_i18n40.__)("Right to left", "elementor"),
|
|
2938
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(import_icons21.TextDirectionRtlIcon, { fontSize: size }),
|
|
2714
2939
|
showTooltip: true
|
|
2715
2940
|
}
|
|
2716
2941
|
];
|
|
2717
2942
|
var TextDirectionField = () => {
|
|
2718
|
-
return /* @__PURE__ */
|
|
2943
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React62.createElement(import_ui50.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React62.createElement(import_ui50.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React62.createElement(ControlLabel, null, (0, import_i18n40.__)("Direction", "elementor"))), /* @__PURE__ */ React62.createElement(import_ui50.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React62.createElement(import_editor_controls41.ToggleControl, { options: options10 }))));
|
|
2719
2944
|
};
|
|
2720
2945
|
|
|
2721
2946
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2722
|
-
var
|
|
2723
|
-
var
|
|
2724
|
-
var
|
|
2947
|
+
var React63 = __toESM(require("react"));
|
|
2948
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
2949
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
2725
2950
|
var initTextStroke = {
|
|
2726
2951
|
$$type: "stroke",
|
|
2727
2952
|
value: {
|
|
@@ -2747,73 +2972,81 @@ var TextStrokeField = () => {
|
|
|
2747
2972
|
setTextStroke(null);
|
|
2748
2973
|
};
|
|
2749
2974
|
const hasTextStroke = Boolean(textStroke);
|
|
2750
|
-
return /* @__PURE__ */
|
|
2975
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React63.createElement(
|
|
2751
2976
|
AddOrRemoveContent,
|
|
2752
2977
|
{
|
|
2753
|
-
label: (0,
|
|
2978
|
+
label: (0, import_i18n41.__)("Text stroke", "elementor"),
|
|
2754
2979
|
isAdded: hasTextStroke,
|
|
2755
2980
|
onAdd: addTextStroke,
|
|
2756
2981
|
onRemove: removeTextStroke
|
|
2757
2982
|
},
|
|
2758
|
-
/* @__PURE__ */
|
|
2983
|
+
/* @__PURE__ */ React63.createElement(import_editor_controls42.StrokeControl, null)
|
|
2759
2984
|
));
|
|
2760
2985
|
};
|
|
2761
2986
|
|
|
2762
2987
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2763
|
-
var
|
|
2764
|
-
var
|
|
2988
|
+
var React64 = __toESM(require("react"));
|
|
2989
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
2765
2990
|
var import_icons22 = require("@elementor/icons");
|
|
2766
|
-
var
|
|
2767
|
-
var
|
|
2991
|
+
var import_ui51 = require("@elementor/ui");
|
|
2992
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
2768
2993
|
var options11 = [
|
|
2769
2994
|
{
|
|
2770
2995
|
value: "none",
|
|
2771
|
-
label: (0,
|
|
2772
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2996
|
+
label: (0, import_i18n42.__)("None", "elementor"),
|
|
2997
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons22.MinusIcon, { fontSize: size }),
|
|
2773
2998
|
showTooltip: true
|
|
2774
2999
|
},
|
|
2775
3000
|
{
|
|
2776
3001
|
value: "capitalize",
|
|
2777
|
-
label: (0,
|
|
2778
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3002
|
+
label: (0, import_i18n42.__)("Capitalize", "elementor"),
|
|
3003
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons22.LetterCaseIcon, { fontSize: size }),
|
|
2779
3004
|
showTooltip: true
|
|
2780
3005
|
},
|
|
2781
3006
|
{
|
|
2782
3007
|
value: "uppercase",
|
|
2783
|
-
label: (0,
|
|
2784
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3008
|
+
label: (0, import_i18n42.__)("Uppercase", "elementor"),
|
|
3009
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons22.LetterCaseUpperIcon, { fontSize: size }),
|
|
2785
3010
|
showTooltip: true
|
|
2786
3011
|
},
|
|
2787
3012
|
{
|
|
2788
3013
|
value: "lowercase",
|
|
2789
|
-
label: (0,
|
|
2790
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3014
|
+
label: (0, import_i18n42.__)("Lowercase", "elementor"),
|
|
3015
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons22.LetterCaseLowerIcon, { fontSize: size }),
|
|
2791
3016
|
showTooltip: true
|
|
2792
3017
|
}
|
|
2793
3018
|
];
|
|
2794
|
-
var TransformField = () => /* @__PURE__ */
|
|
3019
|
+
var TransformField = () => /* @__PURE__ */ React64.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React64.createElement(import_ui51.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React64.createElement(import_ui51.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React64.createElement(ControlLabel, null, (0, import_i18n42.__)("Text transform", "elementor"))), /* @__PURE__ */ React64.createElement(import_ui51.Grid, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React64.createElement(import_editor_controls43.ToggleControl, { options: options11 }))));
|
|
2795
3020
|
|
|
2796
3021
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2797
|
-
var
|
|
2798
|
-
var
|
|
2799
|
-
var
|
|
2800
|
-
var
|
|
3022
|
+
var React65 = __toESM(require("react"));
|
|
3023
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
3024
|
+
var import_ui52 = require("@elementor/ui");
|
|
3025
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
2801
3026
|
var WordSpacingField = () => {
|
|
2802
|
-
return /* @__PURE__ */
|
|
3027
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React65.createElement(import_ui52.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React65.createElement(import_ui52.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, (0, import_i18n43.__)("Word spacing", "elementor"))), /* @__PURE__ */ React65.createElement(import_ui52.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(import_editor_controls44.SizeControl, null))));
|
|
2803
3028
|
};
|
|
2804
3029
|
|
|
2805
3030
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2806
3031
|
var TypographySection = () => {
|
|
2807
|
-
return /* @__PURE__ */
|
|
3032
|
+
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))));
|
|
2808
3033
|
};
|
|
2809
3034
|
|
|
2810
3035
|
// src/components/style-tab.tsx
|
|
3036
|
+
var TABS_HEADER_HEIGHT = "37px";
|
|
3037
|
+
var stickyHeaderStyles = {
|
|
3038
|
+
position: "sticky",
|
|
3039
|
+
zIndex: 1,
|
|
3040
|
+
opacity: 1,
|
|
3041
|
+
backgroundColor: "background.default",
|
|
3042
|
+
transition: "top 300ms ease"
|
|
3043
|
+
};
|
|
2811
3044
|
var StyleTab = () => {
|
|
2812
3045
|
const currentClassesProp = useCurrentClassesProp();
|
|
2813
3046
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2814
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
3047
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react20.useState)(null);
|
|
2815
3048
|
const breakpoint = (0, import_editor_responsive2.useActiveBreakpoint)();
|
|
2816
|
-
return /* @__PURE__ */
|
|
3049
|
+
return /* @__PURE__ */ React67.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React67.createElement(
|
|
2817
3050
|
StyleProvider,
|
|
2818
3051
|
{
|
|
2819
3052
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -2824,9 +3057,13 @@ var StyleTab = () => {
|
|
|
2824
3057
|
},
|
|
2825
3058
|
setMetaState: setActiveStyleState
|
|
2826
3059
|
},
|
|
2827
|
-
/* @__PURE__ */
|
|
3060
|
+
/* @__PURE__ */ React67.createElement(import_session3.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React67.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React67.createElement(ClassesHeader, null, /* @__PURE__ */ React67.createElement(CssClassSelector, null), /* @__PURE__ */ React67.createElement(import_ui53.Divider, null)), /* @__PURE__ */ React67.createElement(SectionsList, null, /* @__PURE__ */ React67.createElement(Section, { title: (0, import_i18n44.__)("Layout", "elementor") }, /* @__PURE__ */ React67.createElement(LayoutSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: (0, import_i18n44.__)("Spacing", "elementor") }, /* @__PURE__ */ React67.createElement(SpacingSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: (0, import_i18n44.__)("Size", "elementor") }, /* @__PURE__ */ React67.createElement(SizeSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: (0, import_i18n44.__)("Position", "elementor") }, /* @__PURE__ */ React67.createElement(PositionSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: (0, import_i18n44.__)("Typography", "elementor") }, /* @__PURE__ */ React67.createElement(TypographySection, null)), /* @__PURE__ */ React67.createElement(Section, { title: (0, import_i18n44.__)("Background", "elementor") }, /* @__PURE__ */ React67.createElement(BackgroundSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: (0, import_i18n44.__)("Border", "elementor") }, /* @__PURE__ */ React67.createElement(BorderSection, null)), /* @__PURE__ */ React67.createElement(Section, { title: (0, import_i18n44.__)("Effects", "elementor") }, /* @__PURE__ */ React67.createElement(EffectsSection, null)))))
|
|
2828
3061
|
));
|
|
2829
3062
|
};
|
|
3063
|
+
function ClassesHeader({ children }) {
|
|
3064
|
+
const scrollDirection = useScrollDirection();
|
|
3065
|
+
return /* @__PURE__ */ React67.createElement(import_ui53.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
3066
|
+
}
|
|
2830
3067
|
function useCurrentClassesProp() {
|
|
2831
3068
|
const { elementType } = useElement();
|
|
2832
3069
|
const prop = Object.entries(elementType.propsSchema).find(
|
|
@@ -2841,11 +3078,11 @@ function useCurrentClassesProp() {
|
|
|
2841
3078
|
// src/components/editing-panel-tabs.tsx
|
|
2842
3079
|
var EditingPanelTabs = () => {
|
|
2843
3080
|
const { element } = useElement();
|
|
2844
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
3081
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui54.useTabs)("settings");
|
|
2845
3082
|
return (
|
|
2846
3083
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2847
3084
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2848
|
-
/* @__PURE__ */
|
|
3085
|
+
/* @__PURE__ */ React68.createElement(import_react21.Fragment, { key: element.id }, /* @__PURE__ */ React68.createElement(ScrollProvider, null, /* @__PURE__ */ React68.createElement(import_ui54.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React68.createElement(import_ui54.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React68.createElement(import_ui54.Tabs, { variant: "fullWidth", size: "small", sx: { mt: 0.5 }, ...getTabsProps() }, /* @__PURE__ */ React68.createElement(import_ui54.Tab, { label: (0, import_i18n45.__)("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React68.createElement(import_ui54.Tab, { label: (0, import_i18n45.__)("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React68.createElement(import_ui54.Divider, null)), /* @__PURE__ */ React68.createElement(import_ui54.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React68.createElement(SettingsTab, null)), /* @__PURE__ */ React68.createElement(import_ui54.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React68.createElement(StyleTab, null)))))
|
|
2849
3086
|
);
|
|
2850
3087
|
};
|
|
2851
3088
|
|
|
@@ -2858,8 +3095,8 @@ var EditingPanel = () => {
|
|
|
2858
3095
|
if (!element || !elementType) {
|
|
2859
3096
|
return null;
|
|
2860
3097
|
}
|
|
2861
|
-
const panelTitle = (0,
|
|
2862
|
-
return /* @__PURE__ */
|
|
3098
|
+
const panelTitle = (0, import_i18n46.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
3099
|
+
return /* @__PURE__ */ React69.createElement(import_ui55.ErrorBoundary, { fallback: /* @__PURE__ */ React69.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React69.createElement(import_session4.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React69.createElement(import_editor_ui3.ThemeProvider, null, /* @__PURE__ */ React69.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React69.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React69.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React69.createElement(import_icons23.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React69.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React69.createElement(import_editor_controls45.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React69.createElement(import_editor_controls45.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React69.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React69.createElement(EditingPanelTabs, null)))))))));
|
|
2863
3100
|
};
|
|
2864
3101
|
|
|
2865
3102
|
// src/panel.ts
|
|
@@ -2875,7 +3112,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
2875
3112
|
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
2876
3113
|
|
|
2877
3114
|
// src/hooks/use-open-editor-panel.ts
|
|
2878
|
-
var
|
|
3115
|
+
var import_react22 = require("react");
|
|
2879
3116
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
2880
3117
|
|
|
2881
3118
|
// src/sync/is-atomic-widget-selected.ts
|
|
@@ -2892,7 +3129,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
2892
3129
|
// src/hooks/use-open-editor-panel.ts
|
|
2893
3130
|
var useOpenEditorPanel = () => {
|
|
2894
3131
|
const { open } = usePanelActions();
|
|
2895
|
-
(0,
|
|
3132
|
+
(0, import_react22.useEffect)(() => {
|
|
2896
3133
|
return (0, import_editor_v1_adapters3.__privateListenTo)((0, import_editor_v1_adapters3.commandStartEvent)("panel/editor/open"), () => {
|
|
2897
3134
|
if (isAtomicWidgetSelected()) {
|
|
2898
3135
|
open();
|
|
@@ -2911,16 +3148,16 @@ var EditingPanelHooks = () => {
|
|
|
2911
3148
|
var import_editor_canvas2 = require("@elementor/editor-canvas");
|
|
2912
3149
|
|
|
2913
3150
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2914
|
-
var
|
|
2915
|
-
var
|
|
3151
|
+
var React73 = __toESM(require("react"));
|
|
3152
|
+
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
2916
3153
|
var import_icons25 = require("@elementor/icons");
|
|
2917
|
-
var
|
|
2918
|
-
var
|
|
3154
|
+
var import_ui58 = require("@elementor/ui");
|
|
3155
|
+
var import_i18n48 = require("@wordpress/i18n");
|
|
2919
3156
|
|
|
2920
3157
|
// src/components/popover-content.tsx
|
|
2921
|
-
var
|
|
2922
|
-
var
|
|
2923
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
3158
|
+
var React70 = __toESM(require("react"));
|
|
3159
|
+
var import_ui56 = require("@elementor/ui");
|
|
3160
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React70.createElement(import_ui56.Stack, { alignItems, gap, p }, children);
|
|
2924
3161
|
|
|
2925
3162
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2926
3163
|
var import_session5 = require("@elementor/session");
|
|
@@ -2931,15 +3168,15 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
2931
3168
|
};
|
|
2932
3169
|
|
|
2933
3170
|
// src/dynamics/dynamic-control.tsx
|
|
2934
|
-
var
|
|
2935
|
-
var
|
|
3171
|
+
var React71 = __toESM(require("react"));
|
|
3172
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
2936
3173
|
|
|
2937
3174
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2938
|
-
var
|
|
3175
|
+
var import_react24 = require("react");
|
|
2939
3176
|
|
|
2940
3177
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2941
|
-
var
|
|
2942
|
-
var
|
|
3178
|
+
var import_react23 = require("react");
|
|
3179
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
2943
3180
|
|
|
2944
3181
|
// src/dynamics/sync/get-elementor-config.ts
|
|
2945
3182
|
var getElementorConfig2 = () => {
|
|
@@ -2985,12 +3222,12 @@ var dynamicPropTypeUtil = (0, import_editor_props8.createPropUtils)(
|
|
|
2985
3222
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2986
3223
|
var usePropDynamicTags = () => {
|
|
2987
3224
|
let categories = [];
|
|
2988
|
-
const { propType } = (0,
|
|
3225
|
+
const { propType } = (0, import_editor_controls46.useBoundProp)();
|
|
2989
3226
|
if (propType) {
|
|
2990
3227
|
const propDynamicType = getDynamicPropType(propType);
|
|
2991
3228
|
categories = propDynamicType?.settings.categories || [];
|
|
2992
3229
|
}
|
|
2993
|
-
return (0,
|
|
3230
|
+
return (0, import_react23.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
2994
3231
|
};
|
|
2995
3232
|
var getDynamicTagsByCategories = (categories) => {
|
|
2996
3233
|
const dynamicTags = getAtomicDynamicTags();
|
|
@@ -3006,12 +3243,12 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
3006
3243
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
3007
3244
|
var useDynamicTag = (tagName) => {
|
|
3008
3245
|
const dynamicTags = usePropDynamicTags();
|
|
3009
|
-
return (0,
|
|
3246
|
+
return (0, import_react24.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
3010
3247
|
};
|
|
3011
3248
|
|
|
3012
3249
|
// src/dynamics/dynamic-control.tsx
|
|
3013
3250
|
var DynamicControl = ({ bind, children }) => {
|
|
3014
|
-
const { value, setValue } = (0,
|
|
3251
|
+
const { value, setValue } = (0, import_editor_controls47.useBoundProp)(dynamicPropTypeUtil);
|
|
3015
3252
|
const { name = "", settings } = value ?? {};
|
|
3016
3253
|
const dynamicTag = useDynamicTag(name);
|
|
3017
3254
|
if (!dynamicTag) {
|
|
@@ -3030,22 +3267,22 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
3030
3267
|
});
|
|
3031
3268
|
};
|
|
3032
3269
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
3033
|
-
return /* @__PURE__ */
|
|
3270
|
+
return /* @__PURE__ */ React71.createElement(import_editor_controls47.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React71.createElement(import_editor_controls47.PropKeyProvider, { bind }, children));
|
|
3034
3271
|
};
|
|
3035
3272
|
|
|
3036
3273
|
// src/dynamics/components/dynamic-selection.tsx
|
|
3037
|
-
var
|
|
3038
|
-
var
|
|
3039
|
-
var
|
|
3274
|
+
var React72 = __toESM(require("react"));
|
|
3275
|
+
var import_react25 = require("react");
|
|
3276
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
3040
3277
|
var import_icons24 = require("@elementor/icons");
|
|
3041
|
-
var
|
|
3042
|
-
var
|
|
3278
|
+
var import_ui57 = require("@elementor/ui");
|
|
3279
|
+
var import_i18n47 = require("@wordpress/i18n");
|
|
3043
3280
|
var SIZE3 = "tiny";
|
|
3044
3281
|
var DynamicSelection = ({ onSelect }) => {
|
|
3045
|
-
const [searchValue, setSearchValue] = (0,
|
|
3282
|
+
const [searchValue, setSearchValue] = (0, import_react25.useState)("");
|
|
3046
3283
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
3047
|
-
const { value: anyValue } = (0,
|
|
3048
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
3284
|
+
const { value: anyValue } = (0, import_editor_controls48.useBoundProp)();
|
|
3285
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls48.useBoundProp)(dynamicPropTypeUtil);
|
|
3049
3286
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
3050
3287
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
3051
3288
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -3060,28 +3297,28 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3060
3297
|
setValue({ name: value, settings: { label } });
|
|
3061
3298
|
onSelect?.();
|
|
3062
3299
|
};
|
|
3063
|
-
return /* @__PURE__ */
|
|
3064
|
-
|
|
3300
|
+
return /* @__PURE__ */ React72.createElement(import_ui57.Stack, null, hasNoDynamicTags ? /* @__PURE__ */ React72.createElement(NoDynamicTags, null) : /* @__PURE__ */ React72.createElement(import_react25.Fragment, null, /* @__PURE__ */ React72.createElement(import_ui57.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React72.createElement(
|
|
3301
|
+
import_ui57.TextField,
|
|
3065
3302
|
{
|
|
3066
3303
|
fullWidth: true,
|
|
3067
3304
|
size: SIZE3,
|
|
3068
3305
|
value: searchValue,
|
|
3069
3306
|
onChange: handleSearch,
|
|
3070
|
-
placeholder: (0,
|
|
3307
|
+
placeholder: (0, import_i18n47.__)("Search dynamic tags\u2026", "elementor"),
|
|
3071
3308
|
InputProps: {
|
|
3072
|
-
startAdornment: /* @__PURE__ */
|
|
3309
|
+
startAdornment: /* @__PURE__ */ React72.createElement(import_ui57.InputAdornment, { position: "start" }, /* @__PURE__ */ React72.createElement(import_icons24.SearchIcon, { fontSize: SIZE3 }))
|
|
3073
3310
|
}
|
|
3074
3311
|
}
|
|
3075
|
-
)), /* @__PURE__ */
|
|
3076
|
-
|
|
3312
|
+
)), /* @__PURE__ */ React72.createElement(import_ui57.Divider, null), /* @__PURE__ */ React72.createElement(import_ui57.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React72.createElement(import_ui57.MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React72.createElement(import_react25.Fragment, { key: index }, /* @__PURE__ */ React72.createElement(
|
|
3313
|
+
import_ui57.MenuSubheader,
|
|
3077
3314
|
{
|
|
3078
3315
|
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
3079
3316
|
},
|
|
3080
3317
|
dynamicGroups?.[category]?.title || category
|
|
3081
3318
|
), items3.map(({ value, label: tagLabel }) => {
|
|
3082
3319
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
3083
|
-
return /* @__PURE__ */
|
|
3084
|
-
|
|
3320
|
+
return /* @__PURE__ */ React72.createElement(
|
|
3321
|
+
import_ui57.MenuItem,
|
|
3085
3322
|
{
|
|
3086
3323
|
key: value,
|
|
3087
3324
|
selected: isSelected,
|
|
@@ -3091,10 +3328,10 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
3091
3328
|
},
|
|
3092
3329
|
tagLabel
|
|
3093
3330
|
);
|
|
3094
|
-
})))) : /* @__PURE__ */
|
|
3331
|
+
})))) : /* @__PURE__ */ React72.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
3095
3332
|
};
|
|
3096
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
3097
|
-
|
|
3333
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React72.createElement(
|
|
3334
|
+
import_ui57.Stack,
|
|
3098
3335
|
{
|
|
3099
3336
|
gap: 1,
|
|
3100
3337
|
alignItems: "center",
|
|
@@ -3104,12 +3341,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React70.createElem
|
|
|
3104
3341
|
color: "text.secondary",
|
|
3105
3342
|
sx: { pb: 3.5 }
|
|
3106
3343
|
},
|
|
3107
|
-
/* @__PURE__ */
|
|
3108
|
-
/* @__PURE__ */
|
|
3109
|
-
/* @__PURE__ */
|
|
3344
|
+
/* @__PURE__ */ React72.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
3345
|
+
/* @__PURE__ */ React72.createElement(import_ui57.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n47.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React72.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
3346
|
+
/* @__PURE__ */ React72.createElement(import_ui57.Typography, { align: "center", variant: "caption" }, (0, import_i18n47.__)("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React72.createElement(import_ui57.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n47.__)("Clear & try again", "elementor")))
|
|
3110
3347
|
);
|
|
3111
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
3112
|
-
|
|
3348
|
+
var NoDynamicTags = () => /* @__PURE__ */ React72.createElement(import_ui57.Box, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React72.createElement(import_ui57.Divider, null), /* @__PURE__ */ React72.createElement(
|
|
3349
|
+
import_ui57.Stack,
|
|
3113
3350
|
{
|
|
3114
3351
|
gap: 1,
|
|
3115
3352
|
alignItems: "center",
|
|
@@ -3119,9 +3356,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React70.createElement(import_ui54.Box,
|
|
|
3119
3356
|
color: "text.secondary",
|
|
3120
3357
|
sx: { pb: 3.5 }
|
|
3121
3358
|
},
|
|
3122
|
-
/* @__PURE__ */
|
|
3123
|
-
/* @__PURE__ */
|
|
3124
|
-
/* @__PURE__ */
|
|
3359
|
+
/* @__PURE__ */ React72.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
3360
|
+
/* @__PURE__ */ React72.createElement(import_ui57.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n47.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
3361
|
+
/* @__PURE__ */ React72.createElement(import_ui57.Typography, { align: "center", variant: "caption" }, (0, import_i18n47.__)("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
3125
3362
|
));
|
|
3126
3363
|
var useFilteredOptions = (searchValue) => {
|
|
3127
3364
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -3142,10 +3379,10 @@ var useFilteredOptions = (searchValue) => {
|
|
|
3142
3379
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
3143
3380
|
var SIZE4 = "tiny";
|
|
3144
3381
|
var DynamicSelectionControl = () => {
|
|
3145
|
-
const { setValue: setAnyValue } = (0,
|
|
3146
|
-
const { bind, value } = (0,
|
|
3382
|
+
const { setValue: setAnyValue } = (0, import_editor_controls49.useBoundProp)();
|
|
3383
|
+
const { bind, value } = (0, import_editor_controls49.useBoundProp)(dynamicPropTypeUtil);
|
|
3147
3384
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
3148
|
-
const selectionPopoverState = (0,
|
|
3385
|
+
const selectionPopoverState = (0, import_ui58.usePopupState)({ variant: "popover" });
|
|
3149
3386
|
const { name: tagName = "" } = value;
|
|
3150
3387
|
const dynamicTag = useDynamicTag(tagName);
|
|
3151
3388
|
const removeDynamicTag = () => {
|
|
@@ -3154,62 +3391,62 @@ var DynamicSelectionControl = () => {
|
|
|
3154
3391
|
if (!dynamicTag) {
|
|
3155
3392
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
3156
3393
|
}
|
|
3157
|
-
return /* @__PURE__ */
|
|
3158
|
-
|
|
3394
|
+
return /* @__PURE__ */ React73.createElement(import_ui58.Box, null, /* @__PURE__ */ React73.createElement(
|
|
3395
|
+
import_ui58.UnstableTag,
|
|
3159
3396
|
{
|
|
3160
3397
|
fullWidth: true,
|
|
3161
3398
|
showActionsOnHover: true,
|
|
3162
3399
|
label: dynamicTag.label,
|
|
3163
|
-
startIcon: /* @__PURE__ */
|
|
3164
|
-
...(0,
|
|
3165
|
-
actions: /* @__PURE__ */
|
|
3166
|
-
|
|
3400
|
+
startIcon: /* @__PURE__ */ React73.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4 }),
|
|
3401
|
+
...(0, import_ui58.bindTrigger)(selectionPopoverState),
|
|
3402
|
+
actions: /* @__PURE__ */ React73.createElement(React73.Fragment, null, /* @__PURE__ */ React73.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React73.createElement(
|
|
3403
|
+
import_ui58.IconButton,
|
|
3167
3404
|
{
|
|
3168
3405
|
size: SIZE4,
|
|
3169
3406
|
onClick: removeDynamicTag,
|
|
3170
|
-
"aria-label": (0,
|
|
3407
|
+
"aria-label": (0, import_i18n48.__)("Remove dynamic value", "elementor")
|
|
3171
3408
|
},
|
|
3172
|
-
/* @__PURE__ */
|
|
3409
|
+
/* @__PURE__ */ React73.createElement(import_icons25.XIcon, { fontSize: SIZE4 })
|
|
3173
3410
|
))
|
|
3174
3411
|
}
|
|
3175
|
-
), /* @__PURE__ */
|
|
3176
|
-
|
|
3412
|
+
), /* @__PURE__ */ React73.createElement(
|
|
3413
|
+
import_ui58.Popover,
|
|
3177
3414
|
{
|
|
3178
3415
|
disablePortal: true,
|
|
3179
3416
|
disableScrollLock: true,
|
|
3180
3417
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
3181
|
-
...(0,
|
|
3418
|
+
...(0, import_ui58.bindPopover)(selectionPopoverState)
|
|
3182
3419
|
},
|
|
3183
|
-
/* @__PURE__ */
|
|
3420
|
+
/* @__PURE__ */ React73.createElement(import_ui58.Stack, null, /* @__PURE__ */ React73.createElement(import_ui58.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React73.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React73.createElement(import_ui58.Typography, { variant: "subtitle2" }, (0, import_i18n48.__)("Dynamic tags", "elementor")), /* @__PURE__ */ React73.createElement(import_ui58.IconButton, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React73.createElement(import_icons25.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React73.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
3184
3421
|
));
|
|
3185
3422
|
};
|
|
3186
3423
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
3187
|
-
const popupState = (0,
|
|
3424
|
+
const popupState = (0, import_ui58.usePopupState)({ variant: "popover" });
|
|
3188
3425
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
3189
3426
|
if (!hasDynamicSettings) {
|
|
3190
3427
|
return null;
|
|
3191
3428
|
}
|
|
3192
|
-
return /* @__PURE__ */
|
|
3193
|
-
|
|
3429
|
+
return /* @__PURE__ */ React73.createElement(React73.Fragment, null, /* @__PURE__ */ React73.createElement(import_ui58.IconButton, { size: SIZE4, ...(0, import_ui58.bindTrigger)(popupState), "aria-label": (0, import_i18n48.__)("Settings", "elementor") }, /* @__PURE__ */ React73.createElement(import_icons25.SettingsIcon, { fontSize: SIZE4 })), /* @__PURE__ */ React73.createElement(
|
|
3430
|
+
import_ui58.Popover,
|
|
3194
3431
|
{
|
|
3195
3432
|
disablePortal: true,
|
|
3196
3433
|
disableScrollLock: true,
|
|
3197
3434
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3198
|
-
...(0,
|
|
3435
|
+
...(0, import_ui58.bindPopover)(popupState)
|
|
3199
3436
|
},
|
|
3200
|
-
/* @__PURE__ */
|
|
3437
|
+
/* @__PURE__ */ React73.createElement(import_ui58.Paper, { component: import_ui58.Stack, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React73.createElement(import_ui58.Stack, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React73.createElement(import_icons25.DatabaseIcon, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React73.createElement(import_ui58.Typography, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React73.createElement(import_ui58.IconButton, { sx: { ml: "auto" }, size: SIZE4, onClick: popupState.close }, /* @__PURE__ */ React73.createElement(import_icons25.XIcon, { fontSize: SIZE4 }))), /* @__PURE__ */ React73.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
3201
3438
|
));
|
|
3202
3439
|
};
|
|
3203
3440
|
var DynamicSettings = ({ controls }) => {
|
|
3204
3441
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
3205
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
3442
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui58.useTabs)(0);
|
|
3206
3443
|
if (!tabs.length) {
|
|
3207
3444
|
return null;
|
|
3208
3445
|
}
|
|
3209
|
-
return /* @__PURE__ */
|
|
3210
|
-
return /* @__PURE__ */
|
|
3446
|
+
return /* @__PURE__ */ React73.createElement(React73.Fragment, null, /* @__PURE__ */ React73.createElement(import_ui58.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React73.createElement(import_ui58.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React73.createElement(import_ui58.Divider, null), tabs.map(({ value }, index) => {
|
|
3447
|
+
return /* @__PURE__ */ React73.createElement(import_ui58.TabPanel, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React73.createElement(PopoverContent, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
3211
3448
|
if (item.type === "control") {
|
|
3212
|
-
return /* @__PURE__ */
|
|
3449
|
+
return /* @__PURE__ */ React73.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
3213
3450
|
}
|
|
3214
3451
|
return null;
|
|
3215
3452
|
})));
|
|
@@ -3219,7 +3456,7 @@ var Control3 = ({ control }) => {
|
|
|
3219
3456
|
if (!getControlByType(control.type)) {
|
|
3220
3457
|
return null;
|
|
3221
3458
|
}
|
|
3222
|
-
return /* @__PURE__ */
|
|
3459
|
+
return /* @__PURE__ */ React73.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React73.createElement(import_ui58.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React73.createElement(import_editor_controls49.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React73.createElement(import_ui58.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React73.createElement(Control, { type: control.type, props: control.props }))));
|
|
3223
3460
|
};
|
|
3224
3461
|
|
|
3225
3462
|
// src/dynamics/dynamic-transformer.ts
|
|
@@ -3272,18 +3509,18 @@ function getDynamicValue(name, settings) {
|
|
|
3272
3509
|
}
|
|
3273
3510
|
|
|
3274
3511
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
3275
|
-
var
|
|
3276
|
-
var
|
|
3512
|
+
var React74 = __toESM(require("react"));
|
|
3513
|
+
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
3277
3514
|
var import_icons26 = require("@elementor/icons");
|
|
3278
|
-
var
|
|
3515
|
+
var import_i18n49 = require("@wordpress/i18n");
|
|
3279
3516
|
var usePropDynamicAction = () => {
|
|
3280
|
-
const { propType } = (0,
|
|
3517
|
+
const { propType } = (0, import_editor_controls50.useBoundProp)();
|
|
3281
3518
|
const visible = !!propType && supportsDynamic(propType);
|
|
3282
3519
|
return {
|
|
3283
3520
|
visible,
|
|
3284
3521
|
icon: import_icons26.DatabaseIcon,
|
|
3285
|
-
title: (0,
|
|
3286
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
3522
|
+
title: (0, import_i18n49.__)("Dynamic tags", "elementor"),
|
|
3523
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React74.createElement(DynamicSelection, { onSelect: closePopover })
|
|
3287
3524
|
};
|
|
3288
3525
|
};
|
|
3289
3526
|
|