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