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