@elementor/editor-editing-panel 1.17.1 → 1.19.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 +72 -0
- package/dist/index.js +1014 -724
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +826 -536
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -11
- package/src/components/control-label-with-adornments.tsx +13 -0
- package/src/components/css-classes/css-class-item.tsx +32 -10
- package/src/components/css-classes/css-class-menu.tsx +25 -9
- package/src/components/css-classes/css-class-selector.tsx +13 -7
- package/src/components/editing-panel-hooks.tsx +0 -2
- package/src/components/editing-panel.tsx +2 -2
- package/src/components/multi-combobox.tsx +9 -4
- package/src/components/style-sections/border-section/border-radius-field.tsx +6 -5
- package/src/components/style-sections/position-section/dimensions-field.tsx +2 -2
- package/src/components/style-sections/spacing-section/spacing-section.tsx +4 -4
- package/src/components/style-sections/typography-section/font-family-field.tsx +2 -46
- package/src/components/style-sections/typography-section/font-style-field.tsx +1 -1
- package/src/components/style-sections/typography-section/hooks/use-font-families.ts +52 -0
- package/src/components/style-sections/typography-section/text-decoration-field.tsx +40 -89
- package/src/components/style-tab.tsx +34 -33
- package/src/contexts/styles-inheritance-context.tsx +80 -0
- package/src/controls-registry/control.tsx +3 -1
- package/src/controls-registry/styles-field.tsx +14 -4
- package/src/dynamics/components/dynamic-selection.tsx +111 -74
- package/src/hooks/use-styles-fields.ts +3 -4
- package/src/hooks/use-styles-rerender.ts +10 -0
- package/src/init.ts +6 -0
- package/src/styles-inheritance/styles-inheritance-indicator.tsx +70 -0
- package/src/sync/types.ts +1 -1
- package/src/hooks/use-close-editor-panel.ts +0 -23
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import { useBoundProp as
|
|
2
|
+
import { useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
3
3
|
|
|
4
4
|
// src/control-replacement.tsx
|
|
5
5
|
import { createControlReplacement } from "@elementor/editor-controls";
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
useCreateActionsByProvider,
|
|
16
16
|
useProviders
|
|
17
17
|
} from "@elementor/editor-styles-repository";
|
|
18
|
+
import { MapPinIcon } from "@elementor/icons";
|
|
18
19
|
import { createLocation } from "@elementor/locations";
|
|
19
20
|
import { Chip as Chip2, Stack as Stack2, Typography as Typography2 } from "@elementor/ui";
|
|
20
21
|
import { __ as __3 } from "@wordpress/i18n";
|
|
@@ -109,7 +110,7 @@ import {
|
|
|
109
110
|
function MultiCombobox({
|
|
110
111
|
actions = [],
|
|
111
112
|
selected,
|
|
112
|
-
options:
|
|
113
|
+
options: options12,
|
|
113
114
|
onSelect,
|
|
114
115
|
...props
|
|
115
116
|
}) {
|
|
@@ -127,23 +128,23 @@ function MultiCombobox({
|
|
|
127
128
|
handleHomeEndKeys: true,
|
|
128
129
|
disabled: loading,
|
|
129
130
|
value: selected,
|
|
130
|
-
options:
|
|
131
|
+
options: options12,
|
|
131
132
|
renderGroup: (params) => /* @__PURE__ */ React4.createElement(Group, { ...params }),
|
|
132
133
|
renderInput: (params) => /* @__PURE__ */ React4.createElement(TextField, { ...params }),
|
|
133
134
|
onChange: (_, selectedOrInputValue, reason) => {
|
|
134
135
|
const inputValue = selectedOrInputValue.find((option) => typeof option === "string");
|
|
135
136
|
const optionsAndActions = selectedOrInputValue.filter((option) => typeof option !== "string");
|
|
136
137
|
if (reason === "createOption") {
|
|
137
|
-
const [firstAction] = filterActions(actions, { options:
|
|
138
|
-
if (firstAction) {
|
|
138
|
+
const [firstAction] = filterActions(actions, { options: options12, inputValue: inputValue ?? "" });
|
|
139
|
+
if (firstAction.value) {
|
|
139
140
|
return run(firstAction.apply, firstAction.value);
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
143
|
const action = optionsAndActions.find((value) => isAction(value));
|
|
143
|
-
if (reason === "selectOption" && action) {
|
|
144
|
+
if (reason === "selectOption" && action?.value) {
|
|
144
145
|
return run(action.apply, action.value);
|
|
145
146
|
}
|
|
146
|
-
const fixedValues =
|
|
147
|
+
const fixedValues = options12.filter((option) => !!option.fixed);
|
|
147
148
|
onSelect?.([.../* @__PURE__ */ new Set([...optionsAndActions, ...fixedValues])]);
|
|
148
149
|
},
|
|
149
150
|
getOptionLabel: (option) => typeof option === "string" ? option : option.label,
|
|
@@ -151,7 +152,7 @@ function MultiCombobox({
|
|
|
151
152
|
if (typeof option === "string") {
|
|
152
153
|
return option;
|
|
153
154
|
}
|
|
154
|
-
return option.key ?? option.value;
|
|
155
|
+
return option.key ?? option.value ?? option.label;
|
|
155
156
|
},
|
|
156
157
|
filterOptions: (optionList, params) => {
|
|
157
158
|
const selectedValues = selected.map((option) => option.value);
|
|
@@ -163,7 +164,8 @@ function MultiCombobox({
|
|
|
163
164
|
)
|
|
164
165
|
];
|
|
165
166
|
},
|
|
166
|
-
groupBy: (option) => option.group ?? ""
|
|
167
|
+
groupBy: (option) => option.group ?? "",
|
|
168
|
+
renderOption: (optionProps, { label }) => /* @__PURE__ */ React4.createElement("li", { ...optionProps, style: { display: "block", textOverflow: "ellipsis" } }, label)
|
|
167
169
|
}
|
|
168
170
|
);
|
|
169
171
|
}
|
|
@@ -200,8 +202,8 @@ function useActionRunner() {
|
|
|
200
202
|
};
|
|
201
203
|
return { run, loading };
|
|
202
204
|
}
|
|
203
|
-
function filterActions(actions, { options:
|
|
204
|
-
return actions.filter((action) => action.condition(
|
|
205
|
+
function filterActions(actions, { options: options12, inputValue }) {
|
|
206
|
+
return actions.filter((action) => action.condition(options12, inputValue)).map((action, index) => ({
|
|
205
207
|
label: action.label(inputValue),
|
|
206
208
|
value: inputValue,
|
|
207
209
|
group: action.group,
|
|
@@ -282,8 +284,9 @@ function CssClassMenu({ styleId, provider, popupState, handleRename, anchorEl })
|
|
|
282
284
|
},
|
|
283
285
|
getMenuItemsByProvider({ provider, styleId, handleRename, closeMenu: popupState.close }),
|
|
284
286
|
/* @__PURE__ */ React5.createElement(ListSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __("Pseudo classes", "elementor")),
|
|
287
|
+
/* @__PURE__ */ React5.createElement(StateMenuItem, { key: "normal", state: null, styleId, closeMenu: popupState.close }),
|
|
285
288
|
STATES.map((state) => {
|
|
286
|
-
return /* @__PURE__ */ React5.createElement(StateMenuItem, { key: state, state, styleId });
|
|
289
|
+
return /* @__PURE__ */ React5.createElement(StateMenuItem, { key: state, state, styleId, closeMenu: popupState.close });
|
|
287
290
|
})
|
|
288
291
|
);
|
|
289
292
|
}
|
|
@@ -293,12 +296,15 @@ function getMenuItemsByProvider({
|
|
|
293
296
|
handleRename,
|
|
294
297
|
closeMenu
|
|
295
298
|
}) {
|
|
299
|
+
if (!styleId) {
|
|
300
|
+
return [];
|
|
301
|
+
}
|
|
296
302
|
const providerInstance = stylesRepository2.getProviderByKey(provider);
|
|
297
303
|
const providerActions = providerInstance?.actions;
|
|
298
304
|
const [canUpdate, canDelete] = [providerActions?.update, providerActions?.delete];
|
|
299
305
|
const actions = [
|
|
300
306
|
canUpdate && /* @__PURE__ */ React5.createElement(RenameClassMenuItem, { key: "rename-class", handleRename, closeMenu }),
|
|
301
|
-
canDelete && /* @__PURE__ */ React5.createElement(UnapplyClassMenuItem, { key: "unapply-class", styleId })
|
|
307
|
+
canDelete && /* @__PURE__ */ React5.createElement(UnapplyClassMenuItem, { key: "unapply-class", styleId, closeMenu })
|
|
302
308
|
].filter(Boolean);
|
|
303
309
|
if (actions.length) {
|
|
304
310
|
actions.unshift(
|
|
@@ -315,7 +321,7 @@ function getMenuItemsByProvider({
|
|
|
315
321
|
}
|
|
316
322
|
return actions;
|
|
317
323
|
}
|
|
318
|
-
function StateMenuItem({ state, styleId, ...props }) {
|
|
324
|
+
function StateMenuItem({ state, styleId, closeMenu, ...props }) {
|
|
319
325
|
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
320
326
|
const { state: activeState } = meta;
|
|
321
327
|
const isActive = styleId === activeId;
|
|
@@ -331,14 +337,25 @@ function StateMenuItem({ state, styleId, ...props }) {
|
|
|
331
337
|
setActiveId(styleId);
|
|
332
338
|
}
|
|
333
339
|
setActiveMetaState(state);
|
|
340
|
+
closeMenu();
|
|
334
341
|
}
|
|
335
342
|
},
|
|
336
|
-
state
|
|
343
|
+
state ? state : "Normal"
|
|
337
344
|
);
|
|
338
345
|
}
|
|
339
|
-
function UnapplyClassMenuItem({ styleId, ...props }) {
|
|
346
|
+
function UnapplyClassMenuItem({ styleId, closeMenu, ...props }) {
|
|
340
347
|
const unapplyClass = useUnapplyClass(styleId);
|
|
341
|
-
return /* @__PURE__ */ React5.createElement(
|
|
348
|
+
return /* @__PURE__ */ React5.createElement(
|
|
349
|
+
StyledMenuItem,
|
|
350
|
+
{
|
|
351
|
+
...props,
|
|
352
|
+
onClick: () => {
|
|
353
|
+
unapplyClass();
|
|
354
|
+
closeMenu();
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
__("Remove", "elementor")
|
|
358
|
+
);
|
|
342
359
|
}
|
|
343
360
|
function RenameClassMenuItem({
|
|
344
361
|
handleRename,
|
|
@@ -367,11 +384,12 @@ function CssClassItem({
|
|
|
367
384
|
provider,
|
|
368
385
|
isActive,
|
|
369
386
|
color: colorProp,
|
|
387
|
+
icon,
|
|
370
388
|
chipProps,
|
|
371
389
|
onClickActive,
|
|
372
390
|
renameLabel
|
|
373
391
|
}) {
|
|
374
|
-
const { meta } = useStyle();
|
|
392
|
+
const { meta, setMetaState } = useStyle();
|
|
375
393
|
const popupState = usePopupState({ variant: "popover" });
|
|
376
394
|
const [chipRef, setChipRef] = useState2(null);
|
|
377
395
|
const { onDelete, ...chipGroupProps } = chipProps;
|
|
@@ -389,21 +407,30 @@ function CssClassItem({
|
|
|
389
407
|
const color = error ? "error" : colorProp;
|
|
390
408
|
const providerActions = stylesRepository3.getProviderByKey(provider)?.actions;
|
|
391
409
|
const allowRename = Boolean(providerActions?.update);
|
|
410
|
+
const isShowingState = isActive && meta.state;
|
|
392
411
|
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(UnstableChipGroup, { ref: setChipRef, ...chipGroupProps, "aria-label": `Edit ${label}`, role: "group" }, /* @__PURE__ */ React6.createElement(
|
|
393
412
|
Chip,
|
|
394
413
|
{
|
|
395
414
|
size: CHIP_SIZE,
|
|
396
415
|
label: isEditing ? /* @__PURE__ */ React6.createElement(EditableField, { ref, error, ...getEditableProps() }) : /* @__PURE__ */ React6.createElement(EllipsisWithTooltip, { maxWidth: "10ch", title: label, as: "div" }),
|
|
397
|
-
variant: isActive && !meta.state ? "filled" : "standard",
|
|
416
|
+
variant: isActive && !meta.state && !isEditing ? "filled" : "standard",
|
|
417
|
+
shape: "rounded",
|
|
418
|
+
icon,
|
|
398
419
|
color,
|
|
399
420
|
onClick: () => {
|
|
400
|
-
if (
|
|
421
|
+
if (isShowingState) {
|
|
422
|
+
setMetaState(null);
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
if (allowRename && isActive) {
|
|
401
426
|
openEditMode();
|
|
427
|
+
return;
|
|
402
428
|
}
|
|
403
429
|
onClickActive(id);
|
|
404
430
|
},
|
|
405
431
|
"aria-pressed": isActive,
|
|
406
432
|
sx: {
|
|
433
|
+
cursor: isActive && allowRename && !isShowingState ? "text" : "pointer",
|
|
407
434
|
"&.Mui-focusVisible": {
|
|
408
435
|
boxShadow: "none !important"
|
|
409
436
|
}
|
|
@@ -412,12 +439,19 @@ function CssClassItem({
|
|
|
412
439
|
), !isEditing && /* @__PURE__ */ React6.createElement(
|
|
413
440
|
Chip,
|
|
414
441
|
{
|
|
442
|
+
icon: isShowingState ? void 0 : /* @__PURE__ */ React6.createElement(DotsVerticalIcon, { fontSize: "tiny" }),
|
|
415
443
|
size: CHIP_SIZE,
|
|
416
|
-
label: /* @__PURE__ */ React6.createElement(Stack, { direction: "row", gap: 0.5, alignItems: "center" },
|
|
444
|
+
label: isShowingState ? /* @__PURE__ */ React6.createElement(Stack, { direction: "row", gap: 0.5, alignItems: "center" }, /* @__PURE__ */ React6.createElement(Typography, { variant: "inherit" }, meta.state), /* @__PURE__ */ React6.createElement(DotsVerticalIcon, { fontSize: "tiny" })) : void 0,
|
|
417
445
|
variant: "filled",
|
|
446
|
+
shape: "rounded",
|
|
418
447
|
color,
|
|
419
448
|
...bindTrigger(popupState),
|
|
420
|
-
"aria-label": __2("Open CSS Class Menu", "elementor")
|
|
449
|
+
"aria-label": __2("Open CSS Class Menu", "elementor"),
|
|
450
|
+
sx: {
|
|
451
|
+
paddingRight: 0,
|
|
452
|
+
...!isShowingState ? { paddingLeft: 0 } : {},
|
|
453
|
+
".MuiChip-label": isShowingState ? { paddingRight: 0 } : { padding: 0 }
|
|
454
|
+
}
|
|
421
455
|
}
|
|
422
456
|
)), /* @__PURE__ */ React6.createElement(
|
|
423
457
|
CssClassMenu,
|
|
@@ -442,29 +476,30 @@ var validateLabel = (newLabel) => {
|
|
|
442
476
|
|
|
443
477
|
// src/components/css-classes/css-class-selector.tsx
|
|
444
478
|
var ID = "elementor-css-class-selector";
|
|
445
|
-
var TAGS_LIMIT =
|
|
479
|
+
var TAGS_LIMIT = 50;
|
|
446
480
|
var EMPTY_OPTION = {
|
|
447
481
|
label: __3("local", "elementor"),
|
|
448
|
-
value:
|
|
482
|
+
value: null,
|
|
449
483
|
fixed: true,
|
|
450
484
|
color: "primary",
|
|
485
|
+
icon: /* @__PURE__ */ React7.createElement(MapPinIcon, null),
|
|
451
486
|
provider: ELEMENTS_STYLES_PROVIDER_KEY
|
|
452
487
|
};
|
|
453
488
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation();
|
|
454
489
|
function CssClassSelector() {
|
|
455
|
-
const
|
|
490
|
+
const options12 = useOptions();
|
|
456
491
|
const { value: appliedIds, setValue: setAppliedIds, pushValue: pushAppliedId } = useAppliedClassesIds();
|
|
457
492
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
458
493
|
const actions = useCreateActions({ pushAppliedId, setActiveId });
|
|
459
494
|
const handleApply = useHandleApply(appliedIds, setAppliedIds);
|
|
460
|
-
const applied = useAppliedOptions(
|
|
495
|
+
const applied = useAppliedOptions(options12, appliedIds);
|
|
461
496
|
const active = applied.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
462
497
|
return /* @__PURE__ */ React7.createElement(Stack2, { gap: 1, p: 2 }, /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React7.createElement(Typography2, { component: "label", variant: "caption", htmlFor: ID }, __3("CSS classes", "elementor")), /* @__PURE__ */ React7.createElement(Stack2, { direction: "row", gap: 1 }, /* @__PURE__ */ React7.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React7.createElement(
|
|
463
498
|
MultiCombobox,
|
|
464
499
|
{
|
|
465
500
|
id: ID,
|
|
466
501
|
size: "tiny",
|
|
467
|
-
options:
|
|
502
|
+
options: options12,
|
|
468
503
|
selected: applied,
|
|
469
504
|
onSelect: handleApply,
|
|
470
505
|
limitTags: TAGS_LIMIT,
|
|
@@ -473,8 +508,10 @@ function CssClassSelector() {
|
|
|
473
508
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
474
509
|
const chipProps = getTagProps({ index });
|
|
475
510
|
const isActive = value.value === active?.value;
|
|
476
|
-
const isElementsProvider = value.provider === ELEMENTS_STYLES_PROVIDER_KEY;
|
|
477
511
|
const renameLabel = (newLabel) => {
|
|
512
|
+
if (!value.value) {
|
|
513
|
+
throw new Error(`Cannot rename a class without style id`);
|
|
514
|
+
}
|
|
478
515
|
return updateClassByProvider(value.provider, { label: newLabel, id: value.value });
|
|
479
516
|
};
|
|
480
517
|
return /* @__PURE__ */ React7.createElement(
|
|
@@ -486,8 +523,9 @@ function CssClassSelector() {
|
|
|
486
523
|
id: value.value,
|
|
487
524
|
isActive,
|
|
488
525
|
color: isActive && value.color ? value.color : "default",
|
|
526
|
+
icon: value.icon,
|
|
489
527
|
chipProps,
|
|
490
|
-
onClickActive: () => setActiveId(
|
|
528
|
+
onClickActive: () => setActiveId(value.value),
|
|
491
529
|
renameLabel
|
|
492
530
|
}
|
|
493
531
|
);
|
|
@@ -517,6 +555,7 @@ function useOptions() {
|
|
|
517
555
|
value: styleDef.id,
|
|
518
556
|
fixed: isElements,
|
|
519
557
|
color: isElements ? "primary" : "global",
|
|
558
|
+
icon: isElements ? /* @__PURE__ */ React7.createElement(MapPinIcon, null) : null,
|
|
520
559
|
provider: provider.key,
|
|
521
560
|
group: provider.labels?.plural
|
|
522
561
|
};
|
|
@@ -545,8 +584,8 @@ function useCreateActions({
|
|
|
545
584
|
};
|
|
546
585
|
});
|
|
547
586
|
}
|
|
548
|
-
function useAppliedOptions(
|
|
549
|
-
const applied =
|
|
587
|
+
function useAppliedOptions(options12, appliedIds) {
|
|
588
|
+
const applied = options12.filter((option) => option.value && appliedIds.includes(option.value));
|
|
550
589
|
const hasElementsProviderStyleApplied = applied.some(
|
|
551
590
|
(option) => option.provider === ELEMENTS_STYLES_PROVIDER_KEY
|
|
552
591
|
);
|
|
@@ -602,14 +641,14 @@ function useHandleApply(appliedIds, setAppliedIds) {
|
|
|
602
641
|
import { __createPanel as createPanel } from "@elementor/editor-panels";
|
|
603
642
|
|
|
604
643
|
// src/components/editing-panel.tsx
|
|
605
|
-
import * as
|
|
644
|
+
import * as React65 from "react";
|
|
606
645
|
import { ControlActionsProvider, ControlReplacementProvider } from "@elementor/editor-controls";
|
|
607
646
|
import { useSelectedElement } from "@elementor/editor-elements";
|
|
608
647
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
609
|
-
import {
|
|
648
|
+
import { AtomIcon } from "@elementor/icons";
|
|
610
649
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
611
650
|
import { ErrorBoundary } from "@elementor/ui";
|
|
612
|
-
import { __ as
|
|
651
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
613
652
|
|
|
614
653
|
// src/controls-actions.ts
|
|
615
654
|
import { createMenu } from "@elementor/menus";
|
|
@@ -665,10 +704,10 @@ function EditorPanelErrorFallback() {
|
|
|
665
704
|
}
|
|
666
705
|
|
|
667
706
|
// src/components/editing-panel-tabs.tsx
|
|
668
|
-
import * as
|
|
707
|
+
import * as React64 from "react";
|
|
669
708
|
import { Fragment as Fragment8 } from "react";
|
|
670
709
|
import { Divider as Divider5, Stack as Stack13, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
671
|
-
import { __ as
|
|
710
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
672
711
|
|
|
673
712
|
// src/components/settings-tab.tsx
|
|
674
713
|
import * as React15 from "react";
|
|
@@ -705,12 +744,13 @@ var getLayoutByType = (type) => controlTypes[type].layout;
|
|
|
705
744
|
// src/controls-registry/control.tsx
|
|
706
745
|
var Control = ({ props, type }) => {
|
|
707
746
|
const ControlByType = getControlByType(type);
|
|
747
|
+
const { element } = useElement();
|
|
708
748
|
if (!ControlByType) {
|
|
709
749
|
throw new ControlTypeNotFoundError({
|
|
710
750
|
context: { controlType: type }
|
|
711
751
|
});
|
|
712
752
|
}
|
|
713
|
-
return /* @__PURE__ */ React10.createElement(ControlByType, { ...props });
|
|
753
|
+
return /* @__PURE__ */ React10.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
714
754
|
};
|
|
715
755
|
|
|
716
756
|
// src/controls-registry/control-type-container.tsx
|
|
@@ -839,25 +879,232 @@ var Control2 = ({ control }) => {
|
|
|
839
879
|
};
|
|
840
880
|
|
|
841
881
|
// src/components/style-tab.tsx
|
|
842
|
-
import * as
|
|
882
|
+
import * as React63 from "react";
|
|
843
883
|
import { useState as useState7 } from "react";
|
|
844
|
-
import { useElementSetting as
|
|
884
|
+
import { getElementStyles, useElementSetting as useElementSetting5 } from "@elementor/editor-elements";
|
|
885
|
+
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
845
886
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
846
887
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
847
888
|
import { Divider as Divider4 } from "@elementor/ui";
|
|
848
|
-
import { __ as
|
|
889
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
890
|
+
|
|
891
|
+
// src/contexts/styles-inheritance-context.tsx
|
|
892
|
+
import * as React16 from "react";
|
|
893
|
+
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
894
|
+
import { getWidgetsCache, useElementSetting as useElementSetting4 } from "@elementor/editor-elements";
|
|
895
|
+
import { classesPropTypeUtil as classesPropTypeUtil2 } from "@elementor/editor-props";
|
|
896
|
+
import { getBreakpointsTree } from "@elementor/editor-responsive";
|
|
897
|
+
import { stylesRepository as stylesRepository5 } from "@elementor/editor-styles-repository";
|
|
898
|
+
|
|
899
|
+
// src/hooks/use-styles-rerender.ts
|
|
900
|
+
import { useEffect, useReducer } from "react";
|
|
901
|
+
var useStylesRerender = () => {
|
|
902
|
+
const { provider } = useStyle();
|
|
903
|
+
const [, reRender] = useReducer((p) => !p, false);
|
|
904
|
+
useEffect(() => provider?.subscribe(reRender), [provider]);
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
// src/styles-inheritance/utils.ts
|
|
908
|
+
var DEFAULT_STATE = "normal";
|
|
909
|
+
var DEFAULT_BREAKPOINT = "desktop";
|
|
910
|
+
var getStateKey = (state) => state ?? DEFAULT_STATE;
|
|
911
|
+
var getBreakpointKey = (breakpoint) => breakpoint ?? DEFAULT_BREAKPOINT;
|
|
912
|
+
|
|
913
|
+
// src/styles-inheritance/create-snapshots-manager.ts
|
|
914
|
+
function createSnapshotsManager(getStylesByMeta, breakpointsRoot) {
|
|
915
|
+
const breakpointsInheritancePaths = makeBreakpointsInheritancePaths(breakpointsRoot);
|
|
916
|
+
const allBreakpointStatesSnapshots = {};
|
|
917
|
+
const buildMissingSnapshotsForBreakpoint = (currentBreakpointId, parentBreakpoint, state) => {
|
|
918
|
+
const currentBreakpointKey = getBreakpointKey(currentBreakpointId);
|
|
919
|
+
const stateKey = getStateKey(state);
|
|
920
|
+
if (!allBreakpointStatesSnapshots[currentBreakpointKey]) {
|
|
921
|
+
allBreakpointStatesSnapshots[currentBreakpointKey] = {
|
|
922
|
+
[DEFAULT_STATE]: buildStateSnapshotSlot(
|
|
923
|
+
getStylesByMeta({ breakpoint: currentBreakpointId, state: null }),
|
|
924
|
+
parentBreakpoint,
|
|
925
|
+
{},
|
|
926
|
+
null
|
|
927
|
+
)
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
if (state && !allBreakpointStatesSnapshots[currentBreakpointKey][stateKey]) {
|
|
931
|
+
allBreakpointStatesSnapshots[currentBreakpointKey][stateKey] = buildStateSnapshotSlot(
|
|
932
|
+
getStylesByMeta({ breakpoint: currentBreakpointId, state }),
|
|
933
|
+
parentBreakpoint,
|
|
934
|
+
allBreakpointStatesSnapshots[currentBreakpointKey],
|
|
935
|
+
state
|
|
936
|
+
);
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
return (meta) => {
|
|
940
|
+
const { breakpoint, state } = meta;
|
|
941
|
+
const stateKey = getStateKey(state);
|
|
942
|
+
const breakpointKey = getBreakpointKey(breakpoint);
|
|
943
|
+
if (allBreakpointStatesSnapshots[breakpointKey]?.[stateKey]) {
|
|
944
|
+
return allBreakpointStatesSnapshots[breakpointKey][stateKey].snapshot;
|
|
945
|
+
}
|
|
946
|
+
const breakpointsChain = [...breakpointsInheritancePaths[breakpointKey], breakpoint];
|
|
947
|
+
breakpointsChain.forEach((breakpointId, index) => {
|
|
948
|
+
const parentBreakpointId = index > 0 ? breakpointsChain[index - 1] : null;
|
|
949
|
+
buildMissingSnapshotsForBreakpoint(
|
|
950
|
+
breakpointId,
|
|
951
|
+
parentBreakpointId ? allBreakpointStatesSnapshots[parentBreakpointId] : void 0,
|
|
952
|
+
state
|
|
953
|
+
);
|
|
954
|
+
});
|
|
955
|
+
return allBreakpointStatesSnapshots[breakpointKey]?.[stateKey]?.snapshot;
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
function makeBreakpointsInheritancePaths(root) {
|
|
959
|
+
const breakpoints = {};
|
|
960
|
+
const traverse = (node, parent) => {
|
|
961
|
+
const { id, children } = node;
|
|
962
|
+
breakpoints[id] = parent ? [...parent] : [];
|
|
963
|
+
children?.forEach((child) => {
|
|
964
|
+
traverse(child, [...breakpoints[id] ?? [], id]);
|
|
965
|
+
});
|
|
966
|
+
};
|
|
967
|
+
traverse(root);
|
|
968
|
+
return breakpoints;
|
|
969
|
+
}
|
|
970
|
+
function buildStateSnapshotSlot(styles, parentBreakpoint, currentBreakpoint, state) {
|
|
971
|
+
const initialSlot = buildInitialSnapshotFromStyles(styles);
|
|
972
|
+
if (!state) {
|
|
973
|
+
return {
|
|
974
|
+
snapshot: mergeSnapshots([initialSlot.snapshot, parentBreakpoint?.[DEFAULT_STATE]?.snapshot]),
|
|
975
|
+
stateSpecificSnapshot: void 0
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
return {
|
|
979
|
+
snapshot: mergeSnapshots([
|
|
980
|
+
initialSlot.snapshot,
|
|
981
|
+
parentBreakpoint?.[state]?.stateSpecificSnapshot,
|
|
982
|
+
currentBreakpoint[DEFAULT_STATE]?.snapshot
|
|
983
|
+
]),
|
|
984
|
+
stateSpecificSnapshot: mergeSnapshots([
|
|
985
|
+
initialSlot.stateSpecificSnapshot,
|
|
986
|
+
parentBreakpoint?.[state]?.stateSpecificSnapshot
|
|
987
|
+
])
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
function buildInitialSnapshotFromStyles(styles) {
|
|
991
|
+
const snapshot = {};
|
|
992
|
+
styles.forEach((styleVariantWithId) => {
|
|
993
|
+
const {
|
|
994
|
+
styleVariant: { props }
|
|
995
|
+
} = styleVariantWithId;
|
|
996
|
+
Object.entries(props).forEach(([key, value]) => {
|
|
997
|
+
if (!snapshot[key]) {
|
|
998
|
+
snapshot[key] = [];
|
|
999
|
+
}
|
|
1000
|
+
const snapshotPropValue = {
|
|
1001
|
+
...styleVariantWithId,
|
|
1002
|
+
value
|
|
1003
|
+
};
|
|
1004
|
+
snapshot[key].push(snapshotPropValue);
|
|
1005
|
+
});
|
|
1006
|
+
});
|
|
1007
|
+
return {
|
|
1008
|
+
snapshot,
|
|
1009
|
+
stateSpecificSnapshot: snapshot
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
function mergeSnapshots(snapshots) {
|
|
1013
|
+
const snapshot = {};
|
|
1014
|
+
snapshots.filter(Boolean).forEach(
|
|
1015
|
+
(currentSnapshot) => Object.entries(currentSnapshot).forEach(([key, values]) => {
|
|
1016
|
+
if (!snapshot[key]) {
|
|
1017
|
+
snapshot[key] = [];
|
|
1018
|
+
}
|
|
1019
|
+
snapshot[key] = snapshot[key].concat(values);
|
|
1020
|
+
})
|
|
1021
|
+
);
|
|
1022
|
+
return snapshot;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
// src/styles-inheritance/create-styles-inheritance.ts
|
|
1026
|
+
function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
1027
|
+
const styleVariantsByMeta = buildStyleVariantsByMetaMapping(styleDefs);
|
|
1028
|
+
const getStyles = ({ breakpoint, state }) => styleVariantsByMeta?.[getBreakpointKey(breakpoint)]?.[getStateKey(state)] ?? [];
|
|
1029
|
+
return createSnapshotsManager(getStyles, breakpointsRoot);
|
|
1030
|
+
}
|
|
1031
|
+
function buildStyleVariantsByMetaMapping(styleDefs) {
|
|
1032
|
+
const breakpointStateSlots = {};
|
|
1033
|
+
styleDefs.forEach((styleDef) => {
|
|
1034
|
+
styleDef.variants.forEach((styleVariant) => {
|
|
1035
|
+
const { meta } = styleVariant;
|
|
1036
|
+
const { state, breakpoint } = meta;
|
|
1037
|
+
const breakpointKey = getBreakpointKey(breakpoint);
|
|
1038
|
+
const stateKey = getStateKey(state);
|
|
1039
|
+
if (!breakpointStateSlots[breakpointKey]) {
|
|
1040
|
+
breakpointStateSlots[breakpointKey] = {};
|
|
1041
|
+
}
|
|
1042
|
+
const breakpointNode = breakpointStateSlots[breakpointKey];
|
|
1043
|
+
if (!breakpointNode[stateKey]) {
|
|
1044
|
+
breakpointNode[stateKey] = [];
|
|
1045
|
+
}
|
|
1046
|
+
breakpointNode[stateKey].push({
|
|
1047
|
+
styleId: styleDef.id,
|
|
1048
|
+
styleVariant
|
|
1049
|
+
});
|
|
1050
|
+
});
|
|
1051
|
+
});
|
|
1052
|
+
return breakpointStateSlots;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
// src/contexts/styles-inheritance-context.tsx
|
|
1056
|
+
var Context4 = createContext4(null);
|
|
1057
|
+
function StyleInheritanceProvider({ children }) {
|
|
1058
|
+
const styleDefs = useAppliedStyles();
|
|
1059
|
+
const breakpointsTree = getBreakpointsTree();
|
|
1060
|
+
const getSnapshot = createStylesInheritance(styleDefs, breakpointsTree);
|
|
1061
|
+
return /* @__PURE__ */ React16.createElement(Context4.Provider, { value: { getSnapshot } }, children);
|
|
1062
|
+
}
|
|
1063
|
+
function useStylesInheritanceFields(fields) {
|
|
1064
|
+
const context = useContext4(Context4);
|
|
1065
|
+
const { meta } = useStyle();
|
|
1066
|
+
if (!context) {
|
|
1067
|
+
throw new Error("useStylesInheritanceFields must be used within a StyleInheritanceProvider");
|
|
1068
|
+
}
|
|
1069
|
+
if (!meta) {
|
|
1070
|
+
return null;
|
|
1071
|
+
}
|
|
1072
|
+
const snapshot = context.getSnapshot(meta);
|
|
1073
|
+
return fields.reduce(
|
|
1074
|
+
(acc, key) => ({ ...acc, [key]: snapshot?.[key] ?? [] }),
|
|
1075
|
+
{}
|
|
1076
|
+
);
|
|
1077
|
+
}
|
|
1078
|
+
function useStylesInheritanceField(field) {
|
|
1079
|
+
return useStylesInheritanceFields([field])?.[field] ?? [];
|
|
1080
|
+
}
|
|
1081
|
+
var useAppliedStyles = () => {
|
|
1082
|
+
const { element } = useElement();
|
|
1083
|
+
const currentClassesProp = useClassesProp();
|
|
1084
|
+
const baseStyles = useBaseStyles();
|
|
1085
|
+
useStylesRerender();
|
|
1086
|
+
const classesProp = useElementSetting4(element.id, currentClassesProp);
|
|
1087
|
+
const appliedStyles = classesPropTypeUtil2.extract(classesProp);
|
|
1088
|
+
return stylesRepository5.all().filter((style) => appliedStyles?.includes(style.id)).concat(baseStyles);
|
|
1089
|
+
};
|
|
1090
|
+
var useBaseStyles = () => {
|
|
1091
|
+
const { elementType } = useElement();
|
|
1092
|
+
const widgetsCache = getWidgetsCache();
|
|
1093
|
+
const widgetCache = widgetsCache?.[elementType.key];
|
|
1094
|
+
return Object.values(widgetCache?.base_styles ?? {});
|
|
1095
|
+
};
|
|
849
1096
|
|
|
850
1097
|
// src/components/style-sections/background-section/background-section.tsx
|
|
851
|
-
import * as
|
|
1098
|
+
import * as React19 from "react";
|
|
852
1099
|
import { BackgroundControl } from "@elementor/editor-controls";
|
|
853
1100
|
|
|
854
1101
|
// src/controls-registry/styles-field.tsx
|
|
855
|
-
import * as
|
|
856
|
-
import { PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2 } from "@elementor/editor-controls";
|
|
1102
|
+
import * as React18 from "react";
|
|
1103
|
+
import { ControlAdornmentsProvider, PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2 } from "@elementor/editor-controls";
|
|
857
1104
|
import { getStylesSchema } from "@elementor/editor-styles";
|
|
858
1105
|
|
|
859
1106
|
// src/hooks/use-styles-fields.ts
|
|
860
|
-
import {
|
|
1107
|
+
import { useMemo } from "react";
|
|
861
1108
|
import {
|
|
862
1109
|
createElementStyle,
|
|
863
1110
|
deleteElementStyle,
|
|
@@ -873,8 +1120,7 @@ function useStylesFields(propNames) {
|
|
|
873
1120
|
const classesProp = useClassesProp();
|
|
874
1121
|
const undoableUpdateStyle = useUndoableUpdateStyle();
|
|
875
1122
|
const undoableCreateElementStyle = useUndoableCreateElementStyle();
|
|
876
|
-
|
|
877
|
-
useEffect(() => provider?.subscribe(reRender), [provider]);
|
|
1123
|
+
useStylesRerender();
|
|
878
1124
|
const value = getProps({
|
|
879
1125
|
elementId: element.id,
|
|
880
1126
|
styleId: id,
|
|
@@ -997,6 +1243,62 @@ function useStylesField(propName) {
|
|
|
997
1243
|
return [value, setValue];
|
|
998
1244
|
}
|
|
999
1245
|
|
|
1246
|
+
// src/styles-inheritance/styles-inheritance-indicator.tsx
|
|
1247
|
+
import * as React17 from "react";
|
|
1248
|
+
import { useBoundProp } from "@elementor/editor-controls";
|
|
1249
|
+
import { ELEMENTS_STYLES_PROVIDER_KEY as ELEMENTS_STYLES_PROVIDER_KEY2 } from "@elementor/editor-styles-repository";
|
|
1250
|
+
import { styled as styled4 } from "@elementor/ui";
|
|
1251
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
1252
|
+
var Circle = styled4("div", {
|
|
1253
|
+
shouldForwardProp: (prop) => prop !== "variant"
|
|
1254
|
+
})`
|
|
1255
|
+
width: 5px;
|
|
1256
|
+
height: 5px;
|
|
1257
|
+
border-radius: 50%;
|
|
1258
|
+
background-color: ${({ theme, variant }) => {
|
|
1259
|
+
switch (variant) {
|
|
1260
|
+
case "overridden":
|
|
1261
|
+
return theme.palette.warning.main;
|
|
1262
|
+
case "global-affects":
|
|
1263
|
+
return theme.palette.global.main;
|
|
1264
|
+
case "local-affects":
|
|
1265
|
+
return theme.palette.primary.main;
|
|
1266
|
+
default:
|
|
1267
|
+
return theme.palette.text.secondary;
|
|
1268
|
+
}
|
|
1269
|
+
}};
|
|
1270
|
+
`;
|
|
1271
|
+
var StylesInheritanceIndicator = () => {
|
|
1272
|
+
const { bind } = useBoundProp();
|
|
1273
|
+
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
1274
|
+
const [value] = useStylesField(bind);
|
|
1275
|
+
const inheritanceChain = useStylesInheritanceField(bind);
|
|
1276
|
+
if (!inheritanceChain.length) {
|
|
1277
|
+
return null;
|
|
1278
|
+
}
|
|
1279
|
+
const [{ styleId, styleVariant }] = inheritanceChain;
|
|
1280
|
+
const { breakpoint, state } = styleVariant.meta;
|
|
1281
|
+
if (styleId === currentStyleId && breakpoint === currentStyleMeta.breakpoint && state === currentStyleMeta.state) {
|
|
1282
|
+
return /* @__PURE__ */ React17.createElement(
|
|
1283
|
+
Circle,
|
|
1284
|
+
{
|
|
1285
|
+
"aria-label": __5("This is the final value", "elementor"),
|
|
1286
|
+
variant: currentStyleProvider?.key === ELEMENTS_STYLES_PROVIDER_KEY2 ? "local-affects" : "global-affects"
|
|
1287
|
+
}
|
|
1288
|
+
);
|
|
1289
|
+
}
|
|
1290
|
+
if (value !== null && value !== void 0) {
|
|
1291
|
+
return /* @__PURE__ */ React17.createElement(
|
|
1292
|
+
Circle,
|
|
1293
|
+
{
|
|
1294
|
+
"aria-label": __5("This value is overridden by another style", "elementor"),
|
|
1295
|
+
variant: "overridden"
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
return /* @__PURE__ */ React17.createElement(Circle, { "aria-label": __5("This has value from another style", "elementor") });
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1000
1302
|
// src/controls-registry/styles-field.tsx
|
|
1001
1303
|
var StylesField = ({ bind, children }) => {
|
|
1002
1304
|
const [value, setValue] = useStylesField(bind);
|
|
@@ -1006,39 +1308,50 @@ var StylesField = ({ bind, children }) => {
|
|
|
1006
1308
|
const setValues = (newValue) => {
|
|
1007
1309
|
setValue(newValue[bind]);
|
|
1008
1310
|
};
|
|
1009
|
-
return /* @__PURE__ */
|
|
1311
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1312
|
+
ControlAdornmentsProvider,
|
|
1313
|
+
{
|
|
1314
|
+
items: [
|
|
1315
|
+
{
|
|
1316
|
+
id: "styles-inheritance",
|
|
1317
|
+
Adornment: StylesInheritanceIndicator
|
|
1318
|
+
}
|
|
1319
|
+
]
|
|
1320
|
+
},
|
|
1321
|
+
/* @__PURE__ */ React18.createElement(PropProvider2, { propType, value: values, setValue: setValues }, /* @__PURE__ */ React18.createElement(PropKeyProvider2, { bind }, children))
|
|
1322
|
+
);
|
|
1010
1323
|
};
|
|
1011
1324
|
|
|
1012
1325
|
// src/components/style-sections/background-section/background-section.tsx
|
|
1013
1326
|
var BackgroundSection = () => {
|
|
1014
|
-
return /* @__PURE__ */
|
|
1327
|
+
return /* @__PURE__ */ React19.createElement(StylesField, { bind: "background" }, /* @__PURE__ */ React19.createElement(BackgroundControl, null));
|
|
1015
1328
|
};
|
|
1016
1329
|
|
|
1017
1330
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1018
|
-
import * as
|
|
1331
|
+
import * as React29 from "react";
|
|
1019
1332
|
|
|
1020
1333
|
// src/components/panel-divider.tsx
|
|
1021
|
-
import * as
|
|
1334
|
+
import * as React20 from "react";
|
|
1022
1335
|
import { Divider as Divider3 } from "@elementor/ui";
|
|
1023
|
-
var PanelDivider = () => /* @__PURE__ */
|
|
1336
|
+
var PanelDivider = () => /* @__PURE__ */ React20.createElement(Divider3, { sx: { my: 0.5 } });
|
|
1024
1337
|
|
|
1025
1338
|
// src/components/section-content.tsx
|
|
1026
|
-
import * as
|
|
1339
|
+
import * as React21 from "react";
|
|
1027
1340
|
import { Stack as Stack5 } from "@elementor/ui";
|
|
1028
|
-
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */
|
|
1341
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React21.createElement(Stack5, { gap, sx: { ...sx } }, children);
|
|
1029
1342
|
|
|
1030
1343
|
// src/components/style-sections/border-section/border-field.tsx
|
|
1031
|
-
import * as
|
|
1032
|
-
import { __ as
|
|
1344
|
+
import * as React27 from "react";
|
|
1345
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
1033
1346
|
|
|
1034
1347
|
// src/components/add-or-remove-content.tsx
|
|
1035
|
-
import * as
|
|
1348
|
+
import * as React22 from "react";
|
|
1036
1349
|
import { ControlLabel as ControlLabel2 } from "@elementor/editor-controls";
|
|
1037
1350
|
import { MinusIcon, PlusIcon } from "@elementor/icons";
|
|
1038
1351
|
import { Collapse as Collapse2, IconButton as IconButton2, Stack as Stack6 } from "@elementor/ui";
|
|
1039
1352
|
var SIZE2 = "tiny";
|
|
1040
1353
|
var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
1041
|
-
return /* @__PURE__ */
|
|
1354
|
+
return /* @__PURE__ */ React22.createElement(SectionContent, null, /* @__PURE__ */ React22.createElement(
|
|
1042
1355
|
Stack6,
|
|
1043
1356
|
{
|
|
1044
1357
|
direction: "row",
|
|
@@ -1047,47 +1360,47 @@ var AddOrRemoveContent = ({ isAdded, label, onAdd, onRemove, children }) => {
|
|
|
1047
1360
|
alignItems: "center"
|
|
1048
1361
|
}
|
|
1049
1362
|
},
|
|
1050
|
-
/* @__PURE__ */
|
|
1051
|
-
isAdded ? /* @__PURE__ */
|
|
1052
|
-
), /* @__PURE__ */
|
|
1363
|
+
/* @__PURE__ */ React22.createElement(ControlLabel2, null, label),
|
|
1364
|
+
isAdded ? /* @__PURE__ */ React22.createElement(IconButton2, { size: SIZE2, onClick: onRemove, "aria-label": "Remove" }, /* @__PURE__ */ React22.createElement(MinusIcon, { fontSize: SIZE2 })) : /* @__PURE__ */ React22.createElement(IconButton2, { size: SIZE2, onClick: onAdd, "aria-label": "Add" }, /* @__PURE__ */ React22.createElement(PlusIcon, { fontSize: SIZE2 }))
|
|
1365
|
+
), /* @__PURE__ */ React22.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React22.createElement(SectionContent, null, children)));
|
|
1053
1366
|
};
|
|
1054
1367
|
|
|
1055
1368
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
1056
|
-
import * as
|
|
1369
|
+
import * as React23 from "react";
|
|
1057
1370
|
import { ColorControl, ControlLabel as ControlLabel3 } from "@elementor/editor-controls";
|
|
1058
1371
|
import { Grid } from "@elementor/ui";
|
|
1059
|
-
import { __ as
|
|
1372
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
1060
1373
|
var BorderColorField = () => {
|
|
1061
|
-
return /* @__PURE__ */
|
|
1374
|
+
return /* @__PURE__ */ React23.createElement(StylesField, { bind: "border-color" }, /* @__PURE__ */ React23.createElement(Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React23.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(ControlLabel3, null, __6("Border color", "elementor"))), /* @__PURE__ */ React23.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React23.createElement(ColorControl, null))));
|
|
1062
1375
|
};
|
|
1063
1376
|
|
|
1064
1377
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
1065
|
-
import * as
|
|
1378
|
+
import * as React24 from "react";
|
|
1066
1379
|
import { ControlLabel as ControlLabel4, SelectControl as SelectControl2 } from "@elementor/editor-controls";
|
|
1067
1380
|
import { Grid as Grid2 } from "@elementor/ui";
|
|
1068
|
-
import { __ as
|
|
1381
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
1069
1382
|
var borderStyles = [
|
|
1070
|
-
{ value: "none", label:
|
|
1071
|
-
{ value: "solid", label:
|
|
1072
|
-
{ value: "dashed", label:
|
|
1073
|
-
{ value: "dotted", label:
|
|
1074
|
-
{ value: "double", label:
|
|
1075
|
-
{ value: "groove", label:
|
|
1076
|
-
{ value: "ridge", label:
|
|
1077
|
-
{ value: "inset", label:
|
|
1078
|
-
{ value: "outset", label:
|
|
1383
|
+
{ value: "none", label: __7("None", "elementor") },
|
|
1384
|
+
{ value: "solid", label: __7("Solid", "elementor") },
|
|
1385
|
+
{ value: "dashed", label: __7("Dashed", "elementor") },
|
|
1386
|
+
{ value: "dotted", label: __7("Dotted", "elementor") },
|
|
1387
|
+
{ value: "double", label: __7("Double", "elementor") },
|
|
1388
|
+
{ value: "groove", label: __7("Groove", "elementor") },
|
|
1389
|
+
{ value: "ridge", label: __7("Ridge", "elementor") },
|
|
1390
|
+
{ value: "inset", label: __7("Inset", "elementor") },
|
|
1391
|
+
{ value: "outset", label: __7("Outset", "elementor") }
|
|
1079
1392
|
];
|
|
1080
1393
|
var BorderStyleField = () => {
|
|
1081
|
-
return /* @__PURE__ */
|
|
1394
|
+
return /* @__PURE__ */ React24.createElement(StylesField, { bind: "border-style" }, /* @__PURE__ */ React24.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React24.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React24.createElement(ControlLabel4, null, __7("Border type", "elementor"))), /* @__PURE__ */ React24.createElement(Grid2, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React24.createElement(SelectControl2, { options: borderStyles }))));
|
|
1082
1395
|
};
|
|
1083
1396
|
|
|
1084
1397
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
1085
|
-
import * as
|
|
1398
|
+
import * as React26 from "react";
|
|
1086
1399
|
import { EqualUnequalSizesControl } from "@elementor/editor-controls";
|
|
1087
1400
|
import { borderWidthPropTypeUtil } from "@elementor/editor-props";
|
|
1088
1401
|
import { SideAllIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
1089
1402
|
import { withDirection } from "@elementor/ui";
|
|
1090
|
-
import { __ as
|
|
1403
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
1091
1404
|
|
|
1092
1405
|
// src/hooks/use-direction.ts
|
|
1093
1406
|
import { useTheme } from "@elementor/ui";
|
|
@@ -1098,7 +1411,7 @@ function useDirection() {
|
|
|
1098
1411
|
}
|
|
1099
1412
|
|
|
1100
1413
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
1101
|
-
import * as
|
|
1414
|
+
import * as React25 from "react";
|
|
1102
1415
|
import { useRef } from "react";
|
|
1103
1416
|
import { useTheme as useTheme2 } from "@elementor/ui";
|
|
1104
1417
|
var CLOCKWISE_ANGLES = {
|
|
@@ -1116,7 +1429,7 @@ var COUNTER_CLOCKWISE_ANGLES = {
|
|
|
1116
1429
|
var RotatedIcon = ({ icon: Icon, size, isClockwise = true, offset = 0 }) => {
|
|
1117
1430
|
const rotate = useRef(useGetTargetAngle(isClockwise, offset));
|
|
1118
1431
|
rotate.current = useGetTargetAngle(isClockwise, offset, rotate);
|
|
1119
|
-
return /* @__PURE__ */
|
|
1432
|
+
return /* @__PURE__ */ React25.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
1120
1433
|
};
|
|
1121
1434
|
var useGetTargetAngle = (isClockwise, offset, existingRef) => {
|
|
1122
1435
|
const [direction] = useStylesField("flex-direction");
|
|
@@ -1135,35 +1448,35 @@ var InlineStartIcon = withDirection(SideRightIcon);
|
|
|
1135
1448
|
var InlineEndIcon = withDirection(SideLeftIcon);
|
|
1136
1449
|
var getEdges = (isSiteRtl) => [
|
|
1137
1450
|
{
|
|
1138
|
-
label:
|
|
1139
|
-
icon: /* @__PURE__ */
|
|
1451
|
+
label: __8("Top", "elementor"),
|
|
1452
|
+
icon: /* @__PURE__ */ React26.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1140
1453
|
bind: "block-start"
|
|
1141
1454
|
},
|
|
1142
1455
|
{
|
|
1143
|
-
label: isSiteRtl ?
|
|
1144
|
-
icon: /* @__PURE__ */
|
|
1456
|
+
label: isSiteRtl ? __8("Left", "elementor") : __8("Right", "elementor"),
|
|
1457
|
+
icon: /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: InlineStartIcon, size: "tiny" }),
|
|
1145
1458
|
bind: "inline-end"
|
|
1146
1459
|
},
|
|
1147
1460
|
{
|
|
1148
|
-
label:
|
|
1149
|
-
icon: /* @__PURE__ */
|
|
1461
|
+
label: __8("Bottom", "elementor"),
|
|
1462
|
+
icon: /* @__PURE__ */ React26.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1150
1463
|
bind: "block-end"
|
|
1151
1464
|
},
|
|
1152
1465
|
{
|
|
1153
|
-
label: isSiteRtl ?
|
|
1154
|
-
icon: /* @__PURE__ */
|
|
1466
|
+
label: isSiteRtl ? __8("Right", "elementor") : __8("Left", "elementor"),
|
|
1467
|
+
icon: /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: InlineEndIcon, size: "tiny" }),
|
|
1155
1468
|
bind: "inline-start"
|
|
1156
1469
|
}
|
|
1157
1470
|
];
|
|
1158
1471
|
var BorderWidthField = () => {
|
|
1159
1472
|
const { isSiteRtl } = useDirection();
|
|
1160
|
-
return /* @__PURE__ */
|
|
1473
|
+
return /* @__PURE__ */ React26.createElement(StylesField, { bind: "border-width" }, /* @__PURE__ */ React26.createElement(
|
|
1161
1474
|
EqualUnequalSizesControl,
|
|
1162
1475
|
{
|
|
1163
1476
|
items: getEdges(isSiteRtl),
|
|
1164
|
-
label:
|
|
1165
|
-
icon: /* @__PURE__ */
|
|
1166
|
-
tooltipLabel:
|
|
1477
|
+
label: __8("Border width", "elementor"),
|
|
1478
|
+
icon: /* @__PURE__ */ React26.createElement(SideAllIcon, { fontSize: "tiny" }),
|
|
1479
|
+
tooltipLabel: __8("Adjust borders", "elementor"),
|
|
1167
1480
|
multiSizePropTypeUtil: borderWidthPropTypeUtil
|
|
1168
1481
|
}
|
|
1169
1482
|
));
|
|
@@ -1188,22 +1501,22 @@ var BorderField = () => {
|
|
|
1188
1501
|
});
|
|
1189
1502
|
};
|
|
1190
1503
|
const hasBorder = Object.values(border ?? {}).some(Boolean);
|
|
1191
|
-
return /* @__PURE__ */
|
|
1504
|
+
return /* @__PURE__ */ React27.createElement(
|
|
1192
1505
|
AddOrRemoveContent,
|
|
1193
1506
|
{
|
|
1194
|
-
label:
|
|
1507
|
+
label: __9("Border", "elementor"),
|
|
1195
1508
|
isAdded: hasBorder,
|
|
1196
1509
|
onAdd: addBorder,
|
|
1197
1510
|
onRemove: removeBorder
|
|
1198
1511
|
},
|
|
1199
|
-
/* @__PURE__ */
|
|
1200
|
-
/* @__PURE__ */
|
|
1201
|
-
/* @__PURE__ */
|
|
1512
|
+
/* @__PURE__ */ React27.createElement(BorderWidthField, null),
|
|
1513
|
+
/* @__PURE__ */ React27.createElement(BorderColorField, null),
|
|
1514
|
+
/* @__PURE__ */ React27.createElement(BorderStyleField, null)
|
|
1202
1515
|
);
|
|
1203
1516
|
};
|
|
1204
1517
|
|
|
1205
1518
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
1206
|
-
import * as
|
|
1519
|
+
import * as React28 from "react";
|
|
1207
1520
|
import { EqualUnequalSizesControl as EqualUnequalSizesControl2 } from "@elementor/editor-controls";
|
|
1208
1521
|
import { borderRadiusPropTypeUtil } from "@elementor/editor-props";
|
|
1209
1522
|
import {
|
|
@@ -1214,66 +1527,66 @@ import {
|
|
|
1214
1527
|
RadiusTopRightIcon
|
|
1215
1528
|
} from "@elementor/icons";
|
|
1216
1529
|
import { withDirection as withDirection2 } from "@elementor/ui";
|
|
1217
|
-
import { __ as
|
|
1530
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
1218
1531
|
var StartStartIcon = withDirection2(RadiusTopLeftIcon);
|
|
1219
1532
|
var StartEndIcon = withDirection2(RadiusTopRightIcon);
|
|
1220
1533
|
var EndStartIcon = withDirection2(RadiusBottomLeftIcon);
|
|
1221
1534
|
var EndEndIcon = withDirection2(RadiusBottomRightIcon);
|
|
1222
|
-
var getStartStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
1223
|
-
var getStartEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
1224
|
-
var getEndStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
1225
|
-
var getEndEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
1535
|
+
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? __10("Top right", "elementor") : __10("Top left", "elementor");
|
|
1536
|
+
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? __10("Top left", "elementor") : __10("Top right", "elementor");
|
|
1537
|
+
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? __10("Bottom right", "elementor") : __10("Bottom left", "elementor");
|
|
1538
|
+
var getEndEndLabel = (isSiteRtl) => isSiteRtl ? __10("Bottom left", "elementor") : __10("Bottom right", "elementor");
|
|
1226
1539
|
var getCorners = (isSiteRtl) => [
|
|
1227
1540
|
{
|
|
1228
1541
|
label: getStartStartLabel(isSiteRtl),
|
|
1229
|
-
icon: /* @__PURE__ */
|
|
1542
|
+
icon: /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartStartIcon, size: "tiny" }),
|
|
1230
1543
|
bind: "start-start"
|
|
1231
1544
|
},
|
|
1232
1545
|
{
|
|
1233
1546
|
label: getStartEndLabel(isSiteRtl),
|
|
1234
|
-
icon: /* @__PURE__ */
|
|
1547
|
+
icon: /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: StartEndIcon, size: "tiny" }),
|
|
1235
1548
|
bind: "start-end"
|
|
1236
1549
|
},
|
|
1237
|
-
{
|
|
1238
|
-
label: getEndEndLabel(isSiteRtl),
|
|
1239
|
-
icon: /* @__PURE__ */ React26.createElement(RotatedIcon, { icon: EndEndIcon, size: "tiny" }),
|
|
1240
|
-
bind: "end-end"
|
|
1241
|
-
},
|
|
1242
1550
|
{
|
|
1243
1551
|
label: getEndStartLabel(isSiteRtl),
|
|
1244
|
-
icon: /* @__PURE__ */
|
|
1552
|
+
icon: /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndStartIcon, size: "tiny" }),
|
|
1245
1553
|
bind: "end-start"
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
label: getEndEndLabel(isSiteRtl),
|
|
1557
|
+
icon: /* @__PURE__ */ React28.createElement(RotatedIcon, { icon: EndEndIcon, size: "tiny" }),
|
|
1558
|
+
bind: "end-end"
|
|
1246
1559
|
}
|
|
1247
1560
|
];
|
|
1248
1561
|
var BorderRadiusField = () => {
|
|
1249
1562
|
const { isSiteRtl } = useDirection();
|
|
1250
|
-
return /* @__PURE__ */
|
|
1563
|
+
return /* @__PURE__ */ React28.createElement(StylesField, { bind: "border-radius" }, /* @__PURE__ */ React28.createElement(
|
|
1251
1564
|
EqualUnequalSizesControl2,
|
|
1252
1565
|
{
|
|
1253
1566
|
items: getCorners(isSiteRtl),
|
|
1254
|
-
label:
|
|
1255
|
-
icon: /* @__PURE__ */
|
|
1256
|
-
tooltipLabel:
|
|
1567
|
+
label: __10("Border radius", "elementor"),
|
|
1568
|
+
icon: /* @__PURE__ */ React28.createElement(BorderCornersIcon, { fontSize: "tiny" }),
|
|
1569
|
+
tooltipLabel: __10("Adjust corners", "elementor"),
|
|
1257
1570
|
multiSizePropTypeUtil: borderRadiusPropTypeUtil
|
|
1258
1571
|
}
|
|
1259
1572
|
));
|
|
1260
1573
|
};
|
|
1261
1574
|
|
|
1262
1575
|
// src/components/style-sections/border-section/border-section.tsx
|
|
1263
|
-
var BorderSection = () => /* @__PURE__ */
|
|
1576
|
+
var BorderSection = () => /* @__PURE__ */ React29.createElement(SectionContent, null, /* @__PURE__ */ React29.createElement(BorderRadiusField, null), /* @__PURE__ */ React29.createElement(PanelDivider, null), /* @__PURE__ */ React29.createElement(BorderField, null));
|
|
1264
1577
|
|
|
1265
1578
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
1266
|
-
import * as
|
|
1579
|
+
import * as React30 from "react";
|
|
1267
1580
|
import { BoxShadowRepeaterControl } from "@elementor/editor-controls";
|
|
1268
1581
|
var EffectsSection = () => {
|
|
1269
|
-
return /* @__PURE__ */
|
|
1582
|
+
return /* @__PURE__ */ React30.createElement(SectionContent, null, /* @__PURE__ */ React30.createElement(StylesField, { bind: "box-shadow" }, /* @__PURE__ */ React30.createElement(BoxShadowRepeaterControl, null)));
|
|
1270
1583
|
};
|
|
1271
1584
|
|
|
1272
1585
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
1273
|
-
import * as
|
|
1586
|
+
import * as React40 from "react";
|
|
1274
1587
|
import { ControlLabel as ControlLabel13 } from "@elementor/editor-controls";
|
|
1275
1588
|
import { useParentElement } from "@elementor/editor-elements";
|
|
1276
|
-
import { __ as
|
|
1589
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1277
1590
|
|
|
1278
1591
|
// src/hooks/use-computed-style.ts
|
|
1279
1592
|
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
@@ -1301,7 +1614,7 @@ function useComputedStyle(elementId) {
|
|
|
1301
1614
|
}
|
|
1302
1615
|
|
|
1303
1616
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
1304
|
-
import * as
|
|
1617
|
+
import * as React31 from "react";
|
|
1305
1618
|
import { ControlLabel as ControlLabel5, ToggleControl } from "@elementor/editor-controls";
|
|
1306
1619
|
import {
|
|
1307
1620
|
LayoutAlignCenterIcon as CenterIcon,
|
|
@@ -1310,7 +1623,7 @@ import {
|
|
|
1310
1623
|
LayoutDistributeVerticalIcon as JustifyIcon
|
|
1311
1624
|
} from "@elementor/icons";
|
|
1312
1625
|
import { DirectionProvider, Grid as Grid3, ThemeProvider, withDirection as withDirection3 } from "@elementor/ui";
|
|
1313
|
-
import { __ as
|
|
1626
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
1314
1627
|
var StartIcon = withDirection3(LayoutAlignLeftIcon);
|
|
1315
1628
|
var EndIcon = withDirection3(LayoutAlignRightIcon);
|
|
1316
1629
|
var iconProps = {
|
|
@@ -1320,36 +1633,36 @@ var iconProps = {
|
|
|
1320
1633
|
var options = [
|
|
1321
1634
|
{
|
|
1322
1635
|
value: "start",
|
|
1323
|
-
label:
|
|
1324
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1636
|
+
label: __11("Start", "elementor"),
|
|
1637
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: StartIcon, size, ...iconProps }),
|
|
1325
1638
|
showTooltip: true
|
|
1326
1639
|
},
|
|
1327
1640
|
{
|
|
1328
1641
|
value: "center",
|
|
1329
|
-
label:
|
|
1330
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1642
|
+
label: __11("Center", "elementor"),
|
|
1643
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: CenterIcon, size, ...iconProps }),
|
|
1331
1644
|
showTooltip: true
|
|
1332
1645
|
},
|
|
1333
1646
|
{
|
|
1334
1647
|
value: "end",
|
|
1335
|
-
label:
|
|
1336
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1648
|
+
label: __11("End", "elementor"),
|
|
1649
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: EndIcon, size, ...iconProps }),
|
|
1337
1650
|
showTooltip: true
|
|
1338
1651
|
},
|
|
1339
1652
|
{
|
|
1340
1653
|
value: "stretch",
|
|
1341
|
-
label:
|
|
1342
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1654
|
+
label: __11("Stretch", "elementor"),
|
|
1655
|
+
renderContent: ({ size }) => /* @__PURE__ */ React31.createElement(RotatedIcon, { icon: JustifyIcon, size, ...iconProps }),
|
|
1343
1656
|
showTooltip: true
|
|
1344
1657
|
}
|
|
1345
1658
|
];
|
|
1346
1659
|
var AlignItemsField = () => {
|
|
1347
1660
|
const { isSiteRtl } = useDirection();
|
|
1348
|
-
return /* @__PURE__ */
|
|
1661
|
+
return /* @__PURE__ */ React31.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React31.createElement(ThemeProvider, null, /* @__PURE__ */ React31.createElement(StylesField, { bind: "align-items" }, /* @__PURE__ */ React31.createElement(Grid3, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React31.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React31.createElement(ControlLabel5, null, __11("Align items", "elementor"))), /* @__PURE__ */ React31.createElement(Grid3, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React31.createElement(ToggleControl, { options }))))));
|
|
1349
1662
|
};
|
|
1350
1663
|
|
|
1351
1664
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
1352
|
-
import * as
|
|
1665
|
+
import * as React32 from "react";
|
|
1353
1666
|
import { ControlLabel as ControlLabel6, ToggleControl as ToggleControl2 } from "@elementor/editor-controls";
|
|
1354
1667
|
import {
|
|
1355
1668
|
LayoutAlignCenterIcon as CenterIcon2,
|
|
@@ -1358,7 +1671,7 @@ import {
|
|
|
1358
1671
|
LayoutDistributeVerticalIcon as JustifyIcon2
|
|
1359
1672
|
} from "@elementor/icons";
|
|
1360
1673
|
import { DirectionProvider as DirectionProvider2, Grid as Grid4, ThemeProvider as ThemeProvider2, withDirection as withDirection4 } from "@elementor/ui";
|
|
1361
|
-
import { __ as
|
|
1674
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
1362
1675
|
var StartIcon2 = withDirection4(LayoutAlignLeftIcon2);
|
|
1363
1676
|
var EndIcon2 = withDirection4(LayoutAlignRightIcon2);
|
|
1364
1677
|
var iconProps2 = {
|
|
@@ -1368,114 +1681,114 @@ var iconProps2 = {
|
|
|
1368
1681
|
var options2 = [
|
|
1369
1682
|
{
|
|
1370
1683
|
value: "start",
|
|
1371
|
-
label:
|
|
1372
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1684
|
+
label: __12("Start", "elementor"),
|
|
1685
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: StartIcon2, size, ...iconProps2 }),
|
|
1373
1686
|
showTooltip: true
|
|
1374
1687
|
},
|
|
1375
1688
|
{
|
|
1376
1689
|
value: "center",
|
|
1377
|
-
label:
|
|
1378
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1690
|
+
label: __12("Center", "elementor"),
|
|
1691
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: CenterIcon2, size, ...iconProps2 }),
|
|
1379
1692
|
showTooltip: true
|
|
1380
1693
|
},
|
|
1381
1694
|
{
|
|
1382
1695
|
value: "end",
|
|
1383
|
-
label:
|
|
1384
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1696
|
+
label: __12("End", "elementor"),
|
|
1697
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: EndIcon2, size, ...iconProps2 }),
|
|
1385
1698
|
showTooltip: true
|
|
1386
1699
|
},
|
|
1387
1700
|
{
|
|
1388
1701
|
value: "stretch",
|
|
1389
|
-
label:
|
|
1390
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1702
|
+
label: __12("Stretch", "elementor"),
|
|
1703
|
+
renderContent: ({ size }) => /* @__PURE__ */ React32.createElement(RotatedIcon, { icon: JustifyIcon2, size, ...iconProps2 }),
|
|
1391
1704
|
showTooltip: true
|
|
1392
1705
|
}
|
|
1393
1706
|
];
|
|
1394
1707
|
var AlignSelfChild = () => {
|
|
1395
1708
|
const { isSiteRtl } = useDirection();
|
|
1396
|
-
return /* @__PURE__ */
|
|
1709
|
+
return /* @__PURE__ */ React32.createElement(DirectionProvider2, { rtl: isSiteRtl }, /* @__PURE__ */ React32.createElement(ThemeProvider2, null, /* @__PURE__ */ React32.createElement(StylesField, { bind: "align-self" }, /* @__PURE__ */ React32.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React32.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React32.createElement(ControlLabel6, null, __12("Align self", "elementor"))), /* @__PURE__ */ React32.createElement(Grid4, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React32.createElement(ToggleControl2, { options: options2 }))))));
|
|
1397
1710
|
};
|
|
1398
1711
|
|
|
1399
1712
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
1400
|
-
import * as
|
|
1713
|
+
import * as React33 from "react";
|
|
1401
1714
|
import { ControlLabel as ControlLabel7, ToggleControl as ToggleControl3 } from "@elementor/editor-controls";
|
|
1402
1715
|
import { Stack as Stack7 } from "@elementor/ui";
|
|
1403
|
-
import { __ as
|
|
1716
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
1404
1717
|
var DisplayField = () => {
|
|
1405
|
-
const
|
|
1718
|
+
const options12 = [
|
|
1406
1719
|
{
|
|
1407
1720
|
value: "block",
|
|
1408
|
-
renderContent: () =>
|
|
1409
|
-
label:
|
|
1721
|
+
renderContent: () => __13("Block", "elementor"),
|
|
1722
|
+
label: __13("Block", "elementor"),
|
|
1410
1723
|
showTooltip: true
|
|
1411
1724
|
},
|
|
1412
1725
|
{
|
|
1413
1726
|
value: "flex",
|
|
1414
|
-
renderContent: () =>
|
|
1415
|
-
label:
|
|
1727
|
+
renderContent: () => __13("Flex", "elementor"),
|
|
1728
|
+
label: __13("Flex", "elementor"),
|
|
1416
1729
|
showTooltip: true
|
|
1417
1730
|
},
|
|
1418
1731
|
{
|
|
1419
1732
|
value: "inline-block",
|
|
1420
|
-
renderContent: () =>
|
|
1421
|
-
label:
|
|
1733
|
+
renderContent: () => __13("In-blk", "elementor"),
|
|
1734
|
+
label: __13("Inline-block", "elementor"),
|
|
1422
1735
|
showTooltip: true
|
|
1423
1736
|
},
|
|
1424
1737
|
{
|
|
1425
1738
|
value: "inline-flex",
|
|
1426
|
-
renderContent: () =>
|
|
1427
|
-
label:
|
|
1739
|
+
renderContent: () => __13("In-flx", "elementor"),
|
|
1740
|
+
label: __13("Inline-flex", "elementor"),
|
|
1428
1741
|
showTooltip: true
|
|
1429
1742
|
}
|
|
1430
1743
|
];
|
|
1431
|
-
return /* @__PURE__ */
|
|
1744
|
+
return /* @__PURE__ */ React33.createElement(StylesField, { bind: "display" }, /* @__PURE__ */ React33.createElement(Stack7, { gap: 1 }, /* @__PURE__ */ React33.createElement(ControlLabel7, null, __13("Display", "elementor")), /* @__PURE__ */ React33.createElement(ToggleControl3, { options: options12, fullWidth: true })));
|
|
1432
1745
|
};
|
|
1433
1746
|
|
|
1434
1747
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
1435
|
-
import * as
|
|
1748
|
+
import * as React34 from "react";
|
|
1436
1749
|
import { ControlLabel as ControlLabel8, ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
|
|
1437
1750
|
import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
|
|
1438
1751
|
import { DirectionProvider as DirectionProvider3, Grid as Grid5, ThemeProvider as ThemeProvider3, withDirection as withDirection5 } from "@elementor/ui";
|
|
1439
|
-
import { __ as
|
|
1752
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
1440
1753
|
var options3 = [
|
|
1441
1754
|
{
|
|
1442
1755
|
value: "row",
|
|
1443
|
-
label:
|
|
1756
|
+
label: __14("Row", "elementor"),
|
|
1444
1757
|
renderContent: ({ size }) => {
|
|
1445
1758
|
const StartIcon5 = withDirection5(ArrowRightIcon);
|
|
1446
|
-
return /* @__PURE__ */
|
|
1759
|
+
return /* @__PURE__ */ React34.createElement(StartIcon5, { fontSize: size });
|
|
1447
1760
|
},
|
|
1448
1761
|
showTooltip: true
|
|
1449
1762
|
},
|
|
1450
1763
|
{
|
|
1451
1764
|
value: "column",
|
|
1452
|
-
label:
|
|
1453
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1765
|
+
label: __14("Column", "elementor"),
|
|
1766
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(ArrowDownSmallIcon, { fontSize: size }),
|
|
1454
1767
|
showTooltip: true
|
|
1455
1768
|
},
|
|
1456
1769
|
{
|
|
1457
1770
|
value: "row-reverse",
|
|
1458
|
-
label:
|
|
1771
|
+
label: __14("Reversed row", "elementor"),
|
|
1459
1772
|
renderContent: ({ size }) => {
|
|
1460
1773
|
const EndIcon5 = withDirection5(ArrowLeftIcon);
|
|
1461
|
-
return /* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ React34.createElement(EndIcon5, { fontSize: size });
|
|
1462
1775
|
},
|
|
1463
1776
|
showTooltip: true
|
|
1464
1777
|
},
|
|
1465
1778
|
{
|
|
1466
1779
|
value: "column-reverse",
|
|
1467
|
-
label:
|
|
1468
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1780
|
+
label: __14("Reversed column", "elementor"),
|
|
1781
|
+
renderContent: ({ size }) => /* @__PURE__ */ React34.createElement(ArrowUpSmallIcon, { fontSize: size }),
|
|
1469
1782
|
showTooltip: true
|
|
1470
1783
|
}
|
|
1471
1784
|
];
|
|
1472
1785
|
var FlexDirectionField = () => {
|
|
1473
1786
|
const { isSiteRtl } = useDirection();
|
|
1474
|
-
return /* @__PURE__ */
|
|
1787
|
+
return /* @__PURE__ */ React34.createElement(DirectionProvider3, { rtl: isSiteRtl }, /* @__PURE__ */ React34.createElement(ThemeProvider3, null, /* @__PURE__ */ React34.createElement(StylesField, { bind: "flex-direction" }, /* @__PURE__ */ React34.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React34.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React34.createElement(ControlLabel8, null, __14("Direction", "elementor"))), /* @__PURE__ */ React34.createElement(Grid5, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React34.createElement(ToggleControl4, { options: options3 }))))));
|
|
1475
1788
|
};
|
|
1476
1789
|
|
|
1477
1790
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
1478
|
-
import * as
|
|
1791
|
+
import * as React35 from "react";
|
|
1479
1792
|
import { useState as useState4 } from "react";
|
|
1480
1793
|
import {
|
|
1481
1794
|
ControlLabel as ControlLabel9,
|
|
@@ -1484,7 +1797,7 @@ import {
|
|
|
1484
1797
|
} from "@elementor/editor-controls";
|
|
1485
1798
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowUpSmallIcon as ArrowUpSmallIcon2, PencilIcon } from "@elementor/icons";
|
|
1486
1799
|
import { DirectionProvider as DirectionProvider4, Grid as Grid6, ThemeProvider as ThemeProvider4 } from "@elementor/ui";
|
|
1487
|
-
import { __ as
|
|
1800
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
1488
1801
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
1489
1802
|
var LAST_DEFAULT_VALUE = 99999;
|
|
1490
1803
|
var FIRST = "first";
|
|
@@ -1497,20 +1810,20 @@ var orderValueMap = {
|
|
|
1497
1810
|
var items = [
|
|
1498
1811
|
{
|
|
1499
1812
|
value: FIRST,
|
|
1500
|
-
label:
|
|
1501
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1813
|
+
label: __15("First", "elementor"),
|
|
1814
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowUpSmallIcon2, { fontSize: size }),
|
|
1502
1815
|
showTooltip: true
|
|
1503
1816
|
},
|
|
1504
1817
|
{
|
|
1505
1818
|
value: LAST,
|
|
1506
|
-
label:
|
|
1507
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1819
|
+
label: __15("Last", "elementor"),
|
|
1820
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(ArrowDownSmallIcon2, { fontSize: size }),
|
|
1508
1821
|
showTooltip: true
|
|
1509
1822
|
},
|
|
1510
1823
|
{
|
|
1511
1824
|
value: CUSTOM,
|
|
1512
|
-
label:
|
|
1513
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1825
|
+
label: __15("Custom", "elementor"),
|
|
1826
|
+
renderContent: ({ size }) => /* @__PURE__ */ React35.createElement(PencilIcon, { fontSize: size }),
|
|
1514
1827
|
showTooltip: true
|
|
1515
1828
|
}
|
|
1516
1829
|
];
|
|
@@ -1525,7 +1838,7 @@ var FlexOrderField = () => {
|
|
|
1525
1838
|
}
|
|
1526
1839
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
1527
1840
|
};
|
|
1528
|
-
return /* @__PURE__ */
|
|
1841
|
+
return /* @__PURE__ */ React35.createElement(DirectionProvider4, { rtl: isSiteRtl }, /* @__PURE__ */ React35.createElement(ThemeProvider4, null, /* @__PURE__ */ React35.createElement(SectionContent, null, /* @__PURE__ */ React35.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel9, null, __15("Order", "elementor"))), /* @__PURE__ */ React35.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React35.createElement(
|
|
1529
1842
|
ControlToggleButtonGroup,
|
|
1530
1843
|
{
|
|
1531
1844
|
items,
|
|
@@ -1533,7 +1846,7 @@ var FlexOrderField = () => {
|
|
|
1533
1846
|
onChange: handleToggleButtonChange,
|
|
1534
1847
|
exclusive: true
|
|
1535
1848
|
}
|
|
1536
|
-
))), CUSTOM === groupControlValue && /* @__PURE__ */
|
|
1849
|
+
))), CUSTOM === groupControlValue && /* @__PURE__ */ React35.createElement(StylesField, { bind: "order" }, /* @__PURE__ */ React35.createElement(Grid6, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React35.createElement(ControlLabel9, null, __15("Custom order", "elementor"))), /* @__PURE__ */ React35.createElement(Grid6, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React35.createElement(
|
|
1537
1850
|
NumberControl,
|
|
1538
1851
|
{
|
|
1539
1852
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
@@ -1553,7 +1866,7 @@ var getGroupControlValue = (order) => {
|
|
|
1553
1866
|
};
|
|
1554
1867
|
|
|
1555
1868
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
1556
|
-
import * as
|
|
1869
|
+
import * as React36 from "react";
|
|
1557
1870
|
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
1558
1871
|
import {
|
|
1559
1872
|
ControlLabel as ControlLabel10,
|
|
@@ -1563,25 +1876,25 @@ import {
|
|
|
1563
1876
|
} from "@elementor/editor-controls";
|
|
1564
1877
|
import { ExpandIcon, PencilIcon as PencilIcon2, ShrinkIcon } from "@elementor/icons";
|
|
1565
1878
|
import { DirectionProvider as DirectionProvider5, Grid as Grid7, ThemeProvider as ThemeProvider5 } from "@elementor/ui";
|
|
1566
|
-
import { __ as
|
|
1879
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
1567
1880
|
var DEFAULT = 1;
|
|
1568
1881
|
var items2 = [
|
|
1569
1882
|
{
|
|
1570
1883
|
value: "flex-grow",
|
|
1571
|
-
label:
|
|
1572
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1884
|
+
label: __16("Grow", "elementor"),
|
|
1885
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ExpandIcon, { fontSize: size }),
|
|
1573
1886
|
showTooltip: true
|
|
1574
1887
|
},
|
|
1575
1888
|
{
|
|
1576
1889
|
value: "flex-shrink",
|
|
1577
|
-
label:
|
|
1578
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1890
|
+
label: __16("Shrink", "elementor"),
|
|
1891
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(ShrinkIcon, { fontSize: size }),
|
|
1579
1892
|
showTooltip: true
|
|
1580
1893
|
},
|
|
1581
1894
|
{
|
|
1582
1895
|
value: "custom",
|
|
1583
|
-
label:
|
|
1584
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1896
|
+
label: __16("Custom", "elementor"),
|
|
1897
|
+
renderContent: ({ size }) => /* @__PURE__ */ React36.createElement(PencilIcon2, { fontSize: size }),
|
|
1585
1898
|
showTooltip: true
|
|
1586
1899
|
}
|
|
1587
1900
|
];
|
|
@@ -1605,7 +1918,7 @@ var FlexSizeField = () => {
|
|
|
1605
1918
|
setGrowField(null);
|
|
1606
1919
|
setShrinkField({ $$type: "number", value: DEFAULT });
|
|
1607
1920
|
};
|
|
1608
|
-
return /* @__PURE__ */
|
|
1921
|
+
return /* @__PURE__ */ React36.createElement(DirectionProvider5, { rtl: isSiteRtl }, /* @__PURE__ */ React36.createElement(ThemeProvider5, null, /* @__PURE__ */ React36.createElement(SectionContent, null, /* @__PURE__ */ React36.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel10, null, __16("Size", "elementor"))), /* @__PURE__ */ React36.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(
|
|
1609
1922
|
ControlToggleButtonGroup2,
|
|
1610
1923
|
{
|
|
1611
1924
|
value: activeGroup,
|
|
@@ -1613,9 +1926,9 @@ var FlexSizeField = () => {
|
|
|
1613
1926
|
items: items2,
|
|
1614
1927
|
exclusive: true
|
|
1615
1928
|
}
|
|
1616
|
-
))), "custom" === activeGroup && /* @__PURE__ */
|
|
1929
|
+
))), "custom" === activeGroup && /* @__PURE__ */ React36.createElement(FlexCustomField, null))));
|
|
1617
1930
|
};
|
|
1618
|
-
var FlexCustomField = () => /* @__PURE__ */
|
|
1931
|
+
var FlexCustomField = () => /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-grow" }, /* @__PURE__ */ React36.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel10, null, __16("Grow", "elementor"))), /* @__PURE__ */ React36.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-shrink" }, /* @__PURE__ */ React36.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel10, null, __16("Shrink", "elementor"))), /* @__PURE__ */ React36.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(NumberControl2, { min: 0, shouldForceInt: true })))), /* @__PURE__ */ React36.createElement(StylesField, { bind: "flex-basis" }, /* @__PURE__ */ React36.createElement(Grid7, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React36.createElement(Grid7, { item: true, xs: 6 }, /* @__PURE__ */ React36.createElement(ControlLabel10, null, __16("Basis", "elementor"))), /* @__PURE__ */ React36.createElement(Grid7, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React36.createElement(SizeControl2, { extendedValues: ["auto"] })))));
|
|
1619
1932
|
var getActiveGroup = ({
|
|
1620
1933
|
grow,
|
|
1621
1934
|
shrink,
|
|
@@ -1637,16 +1950,16 @@ var getActiveGroup = ({
|
|
|
1637
1950
|
};
|
|
1638
1951
|
|
|
1639
1952
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
1640
|
-
import * as
|
|
1953
|
+
import * as React37 from "react";
|
|
1641
1954
|
import { GapControl } from "@elementor/editor-controls";
|
|
1642
1955
|
import { Stack as Stack8 } from "@elementor/ui";
|
|
1643
|
-
import { __ as
|
|
1956
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
1644
1957
|
var GapControlField = () => {
|
|
1645
|
-
return /* @__PURE__ */
|
|
1958
|
+
return /* @__PURE__ */ React37.createElement(Stack8, { gap: 1 }, /* @__PURE__ */ React37.createElement(StylesField, { bind: "gap" }, /* @__PURE__ */ React37.createElement(GapControl, { label: __17("Gaps", "elementor") })));
|
|
1646
1959
|
};
|
|
1647
1960
|
|
|
1648
1961
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
1649
|
-
import * as
|
|
1962
|
+
import * as React38 from "react";
|
|
1650
1963
|
import { ControlLabel as ControlLabel11, ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
1651
1964
|
import {
|
|
1652
1965
|
JustifyBottomIcon,
|
|
@@ -1657,7 +1970,7 @@ import {
|
|
|
1657
1970
|
JustifyTopIcon
|
|
1658
1971
|
} from "@elementor/icons";
|
|
1659
1972
|
import { DirectionProvider as DirectionProvider6, Stack as Stack9, ThemeProvider as ThemeProvider6, withDirection as withDirection6 } from "@elementor/ui";
|
|
1660
|
-
import { __ as
|
|
1973
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1661
1974
|
var StartIcon3 = withDirection6(JustifyTopIcon);
|
|
1662
1975
|
var EndIcon3 = withDirection6(JustifyBottomIcon);
|
|
1663
1976
|
var iconProps3 = {
|
|
@@ -1667,75 +1980,75 @@ var iconProps3 = {
|
|
|
1667
1980
|
var options4 = [
|
|
1668
1981
|
{
|
|
1669
1982
|
value: "start",
|
|
1670
|
-
label:
|
|
1671
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1983
|
+
label: __18("Start", "elementor"),
|
|
1984
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: StartIcon3, size, ...iconProps3 }),
|
|
1672
1985
|
showTooltip: true
|
|
1673
1986
|
},
|
|
1674
1987
|
{
|
|
1675
1988
|
value: "center",
|
|
1676
|
-
label:
|
|
1677
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1989
|
+
label: __18("Center", "elementor"),
|
|
1990
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: CenterIcon3, size, ...iconProps3 }),
|
|
1678
1991
|
showTooltip: true
|
|
1679
1992
|
},
|
|
1680
1993
|
{
|
|
1681
1994
|
value: "end",
|
|
1682
|
-
label:
|
|
1683
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
1995
|
+
label: __18("End", "elementor"),
|
|
1996
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: EndIcon3, size, ...iconProps3 }),
|
|
1684
1997
|
showTooltip: true
|
|
1685
1998
|
},
|
|
1686
1999
|
{
|
|
1687
2000
|
value: "space-between",
|
|
1688
|
-
label:
|
|
1689
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2001
|
+
label: __18("Space between", "elementor"),
|
|
2002
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: BetweenIcon, size, ...iconProps3 }),
|
|
1690
2003
|
showTooltip: true
|
|
1691
2004
|
},
|
|
1692
2005
|
{
|
|
1693
2006
|
value: "space-around",
|
|
1694
|
-
label:
|
|
1695
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2007
|
+
label: __18("Space around", "elementor"),
|
|
2008
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: AroundIcon, size, ...iconProps3 }),
|
|
1696
2009
|
showTooltip: true
|
|
1697
2010
|
},
|
|
1698
2011
|
{
|
|
1699
2012
|
value: "space-evenly",
|
|
1700
|
-
label:
|
|
1701
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2013
|
+
label: __18("Space evenly", "elementor"),
|
|
2014
|
+
renderContent: ({ size }) => /* @__PURE__ */ React38.createElement(RotatedIcon, { icon: EvenlyIcon, size, ...iconProps3 }),
|
|
1702
2015
|
showTooltip: true
|
|
1703
2016
|
}
|
|
1704
2017
|
];
|
|
1705
2018
|
var JustifyContentField = () => {
|
|
1706
2019
|
const { isSiteRtl } = useDirection();
|
|
1707
|
-
return /* @__PURE__ */
|
|
2020
|
+
return /* @__PURE__ */ React38.createElement(DirectionProvider6, { rtl: isSiteRtl }, /* @__PURE__ */ React38.createElement(ThemeProvider6, null, /* @__PURE__ */ React38.createElement(StylesField, { bind: "justify-content" }, /* @__PURE__ */ React38.createElement(Stack9, { gap: 1 }, /* @__PURE__ */ React38.createElement(ControlLabel11, null, __18("Justify content", "elementor")), /* @__PURE__ */ React38.createElement(ToggleControl5, { options: options4, fullWidth: true })))));
|
|
1708
2021
|
};
|
|
1709
2022
|
|
|
1710
2023
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
1711
|
-
import * as
|
|
2024
|
+
import * as React39 from "react";
|
|
1712
2025
|
import { ControlLabel as ControlLabel12, ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
1713
2026
|
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
1714
2027
|
import { DirectionProvider as DirectionProvider7, Grid as Grid8, ThemeProvider as ThemeProvider7 } from "@elementor/ui";
|
|
1715
|
-
import { __ as
|
|
2028
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
1716
2029
|
var options5 = [
|
|
1717
2030
|
{
|
|
1718
2031
|
value: "nowrap",
|
|
1719
|
-
label:
|
|
1720
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2032
|
+
label: __19("No wrap", "elementor"),
|
|
2033
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(ArrowRightIcon2, { fontSize: size }),
|
|
1721
2034
|
showTooltip: true
|
|
1722
2035
|
},
|
|
1723
2036
|
{
|
|
1724
2037
|
value: "wrap",
|
|
1725
|
-
label:
|
|
1726
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2038
|
+
label: __19("Wrap", "elementor"),
|
|
2039
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(ArrowBackIcon, { fontSize: size }),
|
|
1727
2040
|
showTooltip: true
|
|
1728
2041
|
},
|
|
1729
2042
|
{
|
|
1730
2043
|
value: "wrap-reverse",
|
|
1731
|
-
label:
|
|
1732
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2044
|
+
label: __19("Reversed wrap", "elementor"),
|
|
2045
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
1733
2046
|
showTooltip: true
|
|
1734
2047
|
}
|
|
1735
2048
|
];
|
|
1736
2049
|
var WrapField = () => {
|
|
1737
2050
|
const { isSiteRtl } = useDirection();
|
|
1738
|
-
return /* @__PURE__ */
|
|
2051
|
+
return /* @__PURE__ */ React39.createElement(DirectionProvider7, { rtl: isSiteRtl }, /* @__PURE__ */ React39.createElement(ThemeProvider7, null, /* @__PURE__ */ React39.createElement(StylesField, { bind: "flex-wrap" }, /* @__PURE__ */ React39.createElement(Grid8, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React39.createElement(Grid8, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlLabel12, null, __19("Wrap", "elementor"))), /* @__PURE__ */ React39.createElement(Grid8, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React39.createElement(ToggleControl6, { options: options5 }))))));
|
|
1739
2052
|
};
|
|
1740
2053
|
|
|
1741
2054
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -1744,62 +2057,62 @@ var LayoutSection = () => {
|
|
|
1744
2057
|
const { element } = useElement();
|
|
1745
2058
|
const parent = useParentElement(element.id);
|
|
1746
2059
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
1747
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ React40.createElement(SectionContent, null, /* @__PURE__ */ React40.createElement(DisplayField, null), ("flex" === display?.value || "inline-flex" === display?.value) && /* @__PURE__ */ React40.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React40.createElement(FlexChildFields, null));
|
|
1748
2061
|
};
|
|
1749
|
-
var FlexFields = () => /* @__PURE__ */
|
|
1750
|
-
var FlexChildFields = () => /* @__PURE__ */
|
|
2062
|
+
var FlexFields = () => /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(FlexDirectionField, null), /* @__PURE__ */ React40.createElement(JustifyContentField, null), /* @__PURE__ */ React40.createElement(AlignItemsField, null), /* @__PURE__ */ React40.createElement(PanelDivider, null), /* @__PURE__ */ React40.createElement(GapControlField, null), /* @__PURE__ */ React40.createElement(WrapField, null));
|
|
2063
|
+
var FlexChildFields = () => /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(PanelDivider, null), /* @__PURE__ */ React40.createElement(ControlLabel13, null, __20("Flex child", "elementor")), /* @__PURE__ */ React40.createElement(AlignSelfChild, null), /* @__PURE__ */ React40.createElement(FlexOrderField, null), /* @__PURE__ */ React40.createElement(FlexSizeField, null));
|
|
1751
2064
|
|
|
1752
2065
|
// src/components/style-sections/position-section/position-section.tsx
|
|
1753
|
-
import * as
|
|
2066
|
+
import * as React44 from "react";
|
|
1754
2067
|
import { useSessionStorage } from "@elementor/session";
|
|
1755
2068
|
|
|
1756
2069
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
1757
|
-
import * as
|
|
2070
|
+
import * as React41 from "react";
|
|
1758
2071
|
import { ControlLabel as ControlLabel14, SizeControl as SizeControl3 } from "@elementor/editor-controls";
|
|
1759
2072
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
1760
2073
|
import { Grid as Grid9, Stack as Stack10, withDirection as withDirection7 } from "@elementor/ui";
|
|
1761
|
-
import { __ as
|
|
2074
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1762
2075
|
var InlineStartIcon2 = withDirection7(SideLeftIcon2);
|
|
1763
2076
|
var InlineEndIcon2 = withDirection7(SideRightIcon2);
|
|
1764
2077
|
var sideIcons = {
|
|
1765
|
-
"inset-block-start": /* @__PURE__ */
|
|
1766
|
-
"inset-block-end": /* @__PURE__ */
|
|
1767
|
-
"inset-inline-start": /* @__PURE__ */
|
|
1768
|
-
"inset-inline-end": /* @__PURE__ */
|
|
2078
|
+
"inset-block-start": /* @__PURE__ */ React41.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
2079
|
+
"inset-block-end": /* @__PURE__ */ React41.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
2080
|
+
"inset-inline-start": /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
2081
|
+
"inset-inline-end": /* @__PURE__ */ React41.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
1769
2082
|
};
|
|
1770
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
1771
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
2083
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __21("Right", "elementor") : __21("Left", "elementor");
|
|
2084
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __21("Left", "elementor") : __21("Right", "elementor");
|
|
1772
2085
|
var DimensionsField = () => {
|
|
1773
2086
|
const { isSiteRtl } = useDirection();
|
|
1774
|
-
return /* @__PURE__ */
|
|
2087
|
+
return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(Stack10, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(DimensionField, { side: "inset-block-start", label: __21("Top", "elementor") }), /* @__PURE__ */ React41.createElement(DimensionField, { side: "inset-inline-end", label: getInlineEndLabel(isSiteRtl) })), /* @__PURE__ */ React41.createElement(Stack10, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(DimensionField, { side: "inset-block-end", label: __21("Bottom", "elementor") }), /* @__PURE__ */ React41.createElement(DimensionField, { side: "inset-inline-start", label: getInlineStartLabel(isSiteRtl) })));
|
|
1775
2088
|
};
|
|
1776
2089
|
var DimensionField = ({ side, label }) => {
|
|
1777
|
-
return /* @__PURE__ */
|
|
2090
|
+
return /* @__PURE__ */ React41.createElement(Grid9, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(ControlLabel14, null, label)), /* @__PURE__ */ React41.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React41.createElement(StylesField, { bind: side }, /* @__PURE__ */ React41.createElement(SizeControl3, { startIcon: sideIcons[side], extendedValues: ["auto"] }))));
|
|
1778
2091
|
};
|
|
1779
2092
|
|
|
1780
2093
|
// src/components/style-sections/position-section/position-field.tsx
|
|
1781
|
-
import * as
|
|
2094
|
+
import * as React42 from "react";
|
|
1782
2095
|
import { ControlLabel as ControlLabel15, SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
1783
2096
|
import { Grid as Grid10 } from "@elementor/ui";
|
|
1784
|
-
import { __ as
|
|
2097
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
1785
2098
|
var positionOptions = [
|
|
1786
|
-
{ label:
|
|
1787
|
-
{ label:
|
|
1788
|
-
{ label:
|
|
1789
|
-
{ label:
|
|
1790
|
-
{ label:
|
|
2099
|
+
{ label: __22("Static", "elementor"), value: "static" },
|
|
2100
|
+
{ label: __22("Relative", "elementor"), value: "relative" },
|
|
2101
|
+
{ label: __22("Absolute", "elementor"), value: "absolute" },
|
|
2102
|
+
{ label: __22("Fixed", "elementor"), value: "fixed" },
|
|
2103
|
+
{ label: __22("Sticky", "elementor"), value: "sticky" }
|
|
1791
2104
|
];
|
|
1792
2105
|
var PositionField = ({ onChange }) => {
|
|
1793
|
-
return /* @__PURE__ */
|
|
2106
|
+
return /* @__PURE__ */ React42.createElement(StylesField, { bind: "position" }, /* @__PURE__ */ React42.createElement(Grid10, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React42.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlLabel15, null, __22("Position", "elementor"))), /* @__PURE__ */ React42.createElement(Grid10, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React42.createElement(SelectControl3, { options: positionOptions, onChange }))));
|
|
1794
2107
|
};
|
|
1795
2108
|
|
|
1796
2109
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
1797
|
-
import * as
|
|
2110
|
+
import * as React43 from "react";
|
|
1798
2111
|
import { ControlLabel as ControlLabel16, NumberControl as NumberControl3 } from "@elementor/editor-controls";
|
|
1799
2112
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
1800
|
-
import { __ as
|
|
2113
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
1801
2114
|
var ZIndexField = () => {
|
|
1802
|
-
return /* @__PURE__ */
|
|
2115
|
+
return /* @__PURE__ */ React43.createElement(StylesField, { bind: "z-index" }, /* @__PURE__ */ React43.createElement(Grid11, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React43.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(ControlLabel16, null, __23("Z-index", "elementor"))), /* @__PURE__ */ React43.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React43.createElement(NumberControl3, null))));
|
|
1803
2116
|
};
|
|
1804
2117
|
|
|
1805
2118
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -1831,7 +2144,7 @@ var PositionSection = () => {
|
|
|
1831
2144
|
}
|
|
1832
2145
|
};
|
|
1833
2146
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
1834
|
-
return /* @__PURE__ */
|
|
2147
|
+
return /* @__PURE__ */ React44.createElement(SectionContent, null, /* @__PURE__ */ React44.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(DimensionsField, null), /* @__PURE__ */ React44.createElement(ZIndexField, null)) : null);
|
|
1835
2148
|
};
|
|
1836
2149
|
var usePersistDimensions = () => {
|
|
1837
2150
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -1841,93 +2154,93 @@ var usePersistDimensions = () => {
|
|
|
1841
2154
|
};
|
|
1842
2155
|
|
|
1843
2156
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1844
|
-
import * as
|
|
2157
|
+
import * as React46 from "react";
|
|
1845
2158
|
import { ControlLabel as ControlLabel18, SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
1846
2159
|
import { Grid as Grid13, Stack as Stack11 } from "@elementor/ui";
|
|
1847
|
-
import { __ as
|
|
2160
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1848
2161
|
|
|
1849
2162
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
1850
|
-
import * as
|
|
2163
|
+
import * as React45 from "react";
|
|
1851
2164
|
import { ControlLabel as ControlLabel17, ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
1852
2165
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
1853
2166
|
import { Grid as Grid12 } from "@elementor/ui";
|
|
1854
|
-
import { __ as
|
|
2167
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
1855
2168
|
var options6 = [
|
|
1856
2169
|
{
|
|
1857
2170
|
value: "visible",
|
|
1858
|
-
label:
|
|
1859
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2171
|
+
label: __24("Visible", "elementor"),
|
|
2172
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(EyeIcon, { fontSize: size }),
|
|
1860
2173
|
showTooltip: true
|
|
1861
2174
|
},
|
|
1862
2175
|
{
|
|
1863
2176
|
value: "hidden",
|
|
1864
|
-
label:
|
|
1865
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2177
|
+
label: __24("Hidden", "elementor"),
|
|
2178
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(EyeOffIcon, { fontSize: size }),
|
|
1866
2179
|
showTooltip: true
|
|
1867
2180
|
},
|
|
1868
2181
|
{
|
|
1869
2182
|
value: "auto",
|
|
1870
|
-
label:
|
|
1871
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2183
|
+
label: __24("Auto", "elementor"),
|
|
2184
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(LetterAIcon, { fontSize: size }),
|
|
1872
2185
|
showTooltip: true
|
|
1873
2186
|
}
|
|
1874
2187
|
];
|
|
1875
2188
|
var OverflowField = () => {
|
|
1876
|
-
return /* @__PURE__ */
|
|
2189
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "overflow" }, /* @__PURE__ */ React45.createElement(Grid12, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React45.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React45.createElement(ControlLabel17, null, __24("Overflow", "elementor"))), /* @__PURE__ */ React45.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React45.createElement(ToggleControl7, { options: options6 }))));
|
|
1877
2190
|
};
|
|
1878
2191
|
|
|
1879
2192
|
// src/components/style-sections/size-section/size-section.tsx
|
|
1880
2193
|
var SizeSection = () => {
|
|
1881
|
-
return /* @__PURE__ */
|
|
2194
|
+
return /* @__PURE__ */ React46.createElement(SectionContent, null, /* @__PURE__ */ React46.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeField, { bind: "width", label: __25("Width", "elementor"), extendedValues: ["auto"] })), /* @__PURE__ */ React46.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeField, { bind: "height", label: __25("Height", "elementor"), extendedValues: ["auto"] }))), /* @__PURE__ */ React46.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(
|
|
1882
2195
|
SizeField,
|
|
1883
2196
|
{
|
|
1884
2197
|
bind: "min-width",
|
|
1885
|
-
label:
|
|
2198
|
+
label: __25("Min width", "elementor"),
|
|
1886
2199
|
extendedValues: ["auto"]
|
|
1887
2200
|
}
|
|
1888
|
-
)), /* @__PURE__ */
|
|
2201
|
+
)), /* @__PURE__ */ React46.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(
|
|
1889
2202
|
SizeField,
|
|
1890
2203
|
{
|
|
1891
2204
|
bind: "min-height",
|
|
1892
|
-
label:
|
|
2205
|
+
label: __25("Min height", "elementor"),
|
|
1893
2206
|
extendedValues: ["auto"]
|
|
1894
2207
|
}
|
|
1895
|
-
))), /* @__PURE__ */
|
|
2208
|
+
))), /* @__PURE__ */ React46.createElement(Grid13, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeField, { bind: "max-width", label: __25("Max width", "elementor") })), /* @__PURE__ */ React46.createElement(Grid13, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(SizeField, { bind: "max-height", label: __25("Max height", "elementor") }))), /* @__PURE__ */ React46.createElement(PanelDivider, null), /* @__PURE__ */ React46.createElement(Stack11, null, /* @__PURE__ */ React46.createElement(OverflowField, null)));
|
|
1896
2209
|
};
|
|
1897
2210
|
var SizeField = ({ label, bind, extendedValues }) => {
|
|
1898
|
-
return /* @__PURE__ */
|
|
2211
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind }, /* @__PURE__ */ React46.createElement(Grid13, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React46.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(ControlLabel18, null, label)), /* @__PURE__ */ React46.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React46.createElement(SizeControl4, { extendedValues }))));
|
|
1899
2212
|
};
|
|
1900
2213
|
|
|
1901
2214
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
1902
|
-
import * as
|
|
2215
|
+
import * as React47 from "react";
|
|
1903
2216
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
1904
|
-
import { __ as
|
|
2217
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1905
2218
|
var SpacingSection = () => {
|
|
1906
2219
|
const { isSiteRtl } = useDirection();
|
|
1907
|
-
return /* @__PURE__ */
|
|
2220
|
+
return /* @__PURE__ */ React47.createElement(SectionContent, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "margin" }, /* @__PURE__ */ React47.createElement(
|
|
1908
2221
|
LinkedDimensionsControl,
|
|
1909
2222
|
{
|
|
1910
|
-
label:
|
|
2223
|
+
label: __26("Margin", "elementor"),
|
|
1911
2224
|
isSiteRtl,
|
|
1912
2225
|
extendedValues: ["auto"]
|
|
1913
2226
|
}
|
|
1914
|
-
)));
|
|
2227
|
+
)), /* @__PURE__ */ React47.createElement(PanelDivider, null), /* @__PURE__ */ React47.createElement(StylesField, { bind: "padding" }, /* @__PURE__ */ React47.createElement(LinkedDimensionsControl, { label: __26("Padding", "elementor"), isSiteRtl })));
|
|
1915
2228
|
};
|
|
1916
2229
|
|
|
1917
2230
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
1918
|
-
import * as
|
|
2231
|
+
import * as React62 from "react";
|
|
1919
2232
|
|
|
1920
2233
|
// src/components/collapsible-content.tsx
|
|
1921
|
-
import * as
|
|
2234
|
+
import * as React48 from "react";
|
|
1922
2235
|
import { useState as useState6 } from "react";
|
|
1923
2236
|
import { Button, Collapse as Collapse3, Stack as Stack12 } from "@elementor/ui";
|
|
1924
|
-
import { __ as
|
|
2237
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1925
2238
|
var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
1926
2239
|
const [open, setOpen] = useState6(defaultOpen);
|
|
1927
2240
|
const handleToggle = () => {
|
|
1928
2241
|
setOpen((prevOpen) => !prevOpen);
|
|
1929
2242
|
};
|
|
1930
|
-
return /* @__PURE__ */
|
|
2243
|
+
return /* @__PURE__ */ React48.createElement(Stack12, null, /* @__PURE__ */ React48.createElement(
|
|
1931
2244
|
Button,
|
|
1932
2245
|
{
|
|
1933
2246
|
fullWidth: true,
|
|
@@ -1935,19 +2248,22 @@ var CollapsibleContent = ({ children, defaultOpen = false }) => {
|
|
|
1935
2248
|
color: "secondary",
|
|
1936
2249
|
variant: "outlined",
|
|
1937
2250
|
onClick: handleToggle,
|
|
1938
|
-
endIcon: /* @__PURE__ */
|
|
2251
|
+
endIcon: /* @__PURE__ */ React48.createElement(CollapseIcon, { open }),
|
|
1939
2252
|
sx: { my: 0.5 }
|
|
1940
2253
|
},
|
|
1941
|
-
open ?
|
|
1942
|
-
), /* @__PURE__ */
|
|
2254
|
+
open ? __27("Show less", "elementor") : __27("Show more", "elementor")
|
|
2255
|
+
), /* @__PURE__ */ React48.createElement(Collapse3, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1943
2256
|
};
|
|
1944
2257
|
|
|
1945
2258
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
1946
|
-
import * as
|
|
1947
|
-
import { useMemo as useMemo3 } from "react";
|
|
2259
|
+
import * as React49 from "react";
|
|
1948
2260
|
import { ControlLabel as ControlLabel19, FontFamilyControl } from "@elementor/editor-controls";
|
|
1949
2261
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
1950
|
-
import { __ as
|
|
2262
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
2263
|
+
|
|
2264
|
+
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2265
|
+
import { useMemo as useMemo3 } from "react";
|
|
2266
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1951
2267
|
|
|
1952
2268
|
// src/sync/get-elementor-config.ts
|
|
1953
2269
|
var getElementorConfig = () => {
|
|
@@ -1955,254 +2271,229 @@ var getElementorConfig = () => {
|
|
|
1955
2271
|
return extendedWindow.elementor?.config ?? {};
|
|
1956
2272
|
};
|
|
1957
2273
|
|
|
1958
|
-
// src/components/style-sections/typography-section/font-
|
|
2274
|
+
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
1959
2275
|
var supportedCategories = {
|
|
1960
|
-
system:
|
|
1961
|
-
custom:
|
|
1962
|
-
googlefonts:
|
|
1963
|
-
};
|
|
1964
|
-
var FontFamilyField = () => {
|
|
1965
|
-
const fontFamilies = useFontFamilies();
|
|
1966
|
-
if (Object.keys(fontFamilies).length === 0) {
|
|
1967
|
-
return null;
|
|
1968
|
-
}
|
|
1969
|
-
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React47.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React47.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React47.createElement(ControlLabel19, null, __27("Font family", "elementor"))), /* @__PURE__ */ React47.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React47.createElement(FontFamilyControl, { fontFamilies }))));
|
|
2276
|
+
system: __28("System", "elementor"),
|
|
2277
|
+
custom: __28("Custom Fonts", "elementor"),
|
|
2278
|
+
googlefonts: __28("Google Fonts", "elementor")
|
|
1970
2279
|
};
|
|
1971
2280
|
var getFontFamilies = () => {
|
|
1972
2281
|
const { controls } = getElementorConfig();
|
|
1973
|
-
const
|
|
1974
|
-
if (!
|
|
2282
|
+
const options12 = controls?.font?.options;
|
|
2283
|
+
if (!options12) {
|
|
1975
2284
|
return null;
|
|
1976
2285
|
}
|
|
1977
|
-
return
|
|
2286
|
+
return options12;
|
|
1978
2287
|
};
|
|
1979
2288
|
var useFontFamilies = () => {
|
|
1980
2289
|
const fontFamilies = getFontFamilies();
|
|
1981
|
-
return useMemo3(
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
if (!categoryLabel) {
|
|
2290
|
+
return useMemo3(() => {
|
|
2291
|
+
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
2292
|
+
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
2293
|
+
if (!supportedCategories[category]) {
|
|
1986
2294
|
return acc;
|
|
1987
2295
|
}
|
|
1988
|
-
|
|
1989
|
-
|
|
2296
|
+
const categoryIndex = categoriesOrder.indexOf(category);
|
|
2297
|
+
if (!acc[categoryIndex]) {
|
|
2298
|
+
acc[categoryIndex] = {
|
|
2299
|
+
label: supportedCategories[category],
|
|
2300
|
+
fonts: []
|
|
2301
|
+
};
|
|
1990
2302
|
}
|
|
1991
|
-
acc[
|
|
2303
|
+
acc[categoryIndex].fonts.push(font);
|
|
1992
2304
|
return acc;
|
|
1993
|
-
},
|
|
1994
|
-
|
|
1995
|
-
|
|
2305
|
+
}, []).filter(Boolean);
|
|
2306
|
+
}, [fontFamilies]);
|
|
2307
|
+
};
|
|
2308
|
+
|
|
2309
|
+
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
2310
|
+
var FontFamilyField = () => {
|
|
2311
|
+
const fontFamilies = useFontFamilies();
|
|
2312
|
+
if (fontFamilies.length === 0) {
|
|
2313
|
+
return null;
|
|
2314
|
+
}
|
|
2315
|
+
return /* @__PURE__ */ React49.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React49.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React49.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React49.createElement(ControlLabel19, null, __29("Font family", "elementor"))), /* @__PURE__ */ React49.createElement(Grid14, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React49.createElement(FontFamilyControl, { fontFamilies }))));
|
|
1996
2316
|
};
|
|
1997
2317
|
|
|
1998
2318
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
1999
|
-
import * as
|
|
2319
|
+
import * as React50 from "react";
|
|
2000
2320
|
import { ControlLabel as ControlLabel20, SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
2001
2321
|
import { Grid as Grid15 } from "@elementor/ui";
|
|
2002
|
-
import { __ as
|
|
2322
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
2003
2323
|
var FontSizeField = () => {
|
|
2004
|
-
return /* @__PURE__ */
|
|
2324
|
+
return /* @__PURE__ */ React50.createElement(StylesField, { bind: "font-size" }, /* @__PURE__ */ React50.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(ControlLabel20, null, __30("Font size", "elementor"))), /* @__PURE__ */ React50.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(SizeControl5, null))));
|
|
2005
2325
|
};
|
|
2006
2326
|
|
|
2007
2327
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
2008
|
-
import * as
|
|
2328
|
+
import * as React51 from "react";
|
|
2009
2329
|
import { ControlLabel as ControlLabel21, ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
2010
2330
|
import { ItalicIcon, MinusIcon as MinusIcon2 } from "@elementor/icons";
|
|
2011
2331
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
2012
|
-
import { __ as
|
|
2332
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
2013
2333
|
var options7 = [
|
|
2014
2334
|
{
|
|
2015
2335
|
value: "normal",
|
|
2016
|
-
label:
|
|
2017
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2336
|
+
label: __31("Normal", "elementor"),
|
|
2337
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(MinusIcon2, { fontSize: size }),
|
|
2018
2338
|
showTooltip: true
|
|
2019
2339
|
},
|
|
2020
2340
|
{
|
|
2021
2341
|
value: "italic",
|
|
2022
|
-
label:
|
|
2023
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2342
|
+
label: __31("Italic", "elementor"),
|
|
2343
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(ItalicIcon, { fontSize: size }),
|
|
2024
2344
|
showTooltip: true
|
|
2025
2345
|
}
|
|
2026
2346
|
];
|
|
2027
|
-
var FontStyleField = () => /* @__PURE__ */
|
|
2347
|
+
var FontStyleField = () => /* @__PURE__ */ React51.createElement(StylesField, { bind: "font-style" }, /* @__PURE__ */ React51.createElement(Grid16, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(ControlLabel21, null, __31("Font style", "elementor"))), /* @__PURE__ */ React51.createElement(Grid16, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React51.createElement(ToggleControl8, { options: options7 }))));
|
|
2028
2348
|
|
|
2029
2349
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
2030
|
-
import * as
|
|
2350
|
+
import * as React52 from "react";
|
|
2031
2351
|
import { ControlLabel as ControlLabel22, SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
2032
2352
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
2033
|
-
import { __ as
|
|
2353
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
2034
2354
|
var fontWeightOptions = [
|
|
2035
|
-
{ value: "100", label:
|
|
2036
|
-
{ value: "200", label:
|
|
2037
|
-
{ value: "300", label:
|
|
2038
|
-
{ value: "400", label:
|
|
2039
|
-
{ value: "500", label:
|
|
2040
|
-
{ value: "600", label:
|
|
2041
|
-
{ value: "700", label:
|
|
2042
|
-
{ value: "800", label:
|
|
2043
|
-
{ value: "900", label:
|
|
2355
|
+
{ value: "100", label: __32("100 - Thin", "elementor") },
|
|
2356
|
+
{ value: "200", label: __32("200 - Extra light", "elementor") },
|
|
2357
|
+
{ value: "300", label: __32("300 - Light", "elementor") },
|
|
2358
|
+
{ value: "400", label: __32("400 - Normal", "elementor") },
|
|
2359
|
+
{ value: "500", label: __32("500 - Medium", "elementor") },
|
|
2360
|
+
{ value: "600", label: __32("600 - Semi bold", "elementor") },
|
|
2361
|
+
{ value: "700", label: __32("700 - Bold", "elementor") },
|
|
2362
|
+
{ value: "800", label: __32("800 - Extra bold", "elementor") },
|
|
2363
|
+
{ value: "900", label: __32("900 - Black", "elementor") }
|
|
2044
2364
|
];
|
|
2045
2365
|
var FontWeightField = () => {
|
|
2046
|
-
return /* @__PURE__ */
|
|
2366
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "font-weight" }, /* @__PURE__ */ React52.createElement(Grid17, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(ControlLabel22, null, __32("Font weight", "elementor"))), /* @__PURE__ */ React52.createElement(Grid17, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React52.createElement(SelectControl4, { options: fontWeightOptions }))));
|
|
2047
2367
|
};
|
|
2048
2368
|
|
|
2049
2369
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
2050
|
-
import * as
|
|
2370
|
+
import * as React53 from "react";
|
|
2051
2371
|
import { ControlLabel as ControlLabel23, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
2052
2372
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
2053
|
-
import { __ as
|
|
2373
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
2054
2374
|
var LetterSpacingField = () => {
|
|
2055
|
-
return /* @__PURE__ */
|
|
2375
|
+
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "letter-spacing" }, /* @__PURE__ */ React53.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel23, null, __33("Letter spacing", "elementor"))), /* @__PURE__ */ React53.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(SizeControl6, null))));
|
|
2056
2376
|
};
|
|
2057
2377
|
|
|
2058
2378
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
2059
|
-
import * as
|
|
2379
|
+
import * as React54 from "react";
|
|
2060
2380
|
import { ControlLabel as ControlLabel24, SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
2061
2381
|
import { Grid as Grid19 } from "@elementor/ui";
|
|
2062
|
-
import { __ as
|
|
2382
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
2063
2383
|
var LineHeightField = () => {
|
|
2064
|
-
return /* @__PURE__ */
|
|
2384
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "line-height" }, /* @__PURE__ */ React54.createElement(Grid19, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel24, null, __34("Line height", "elementor"))), /* @__PURE__ */ React54.createElement(Grid19, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(SizeControl7, null))));
|
|
2065
2385
|
};
|
|
2066
2386
|
|
|
2067
2387
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
2068
|
-
import * as
|
|
2388
|
+
import * as React55 from "react";
|
|
2069
2389
|
import { ControlLabel as ControlLabel25, ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
2070
2390
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
2071
2391
|
import { Grid as Grid20, withDirection as withDirection8 } from "@elementor/ui";
|
|
2072
|
-
import { __ as
|
|
2392
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
2073
2393
|
var StartIcon4 = withDirection8(AlignLeftIcon);
|
|
2074
2394
|
var EndIcon4 = withDirection8(AlignRightIcon);
|
|
2075
2395
|
var options8 = [
|
|
2076
2396
|
{
|
|
2077
2397
|
value: "start",
|
|
2078
|
-
label:
|
|
2079
|
-
renderContent: () => /* @__PURE__ */
|
|
2398
|
+
label: __35("Start", "elementor"),
|
|
2399
|
+
renderContent: () => /* @__PURE__ */ React55.createElement(RotatedIcon, { icon: StartIcon4, size: "tiny" }),
|
|
2080
2400
|
showTooltip: true
|
|
2081
2401
|
},
|
|
2082
2402
|
{
|
|
2083
2403
|
value: "center",
|
|
2084
|
-
label:
|
|
2085
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2404
|
+
label: __35("Center", "elementor"),
|
|
2405
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(AlignCenterIcon, { fontSize: size }),
|
|
2086
2406
|
showTooltip: true
|
|
2087
2407
|
},
|
|
2088
2408
|
{
|
|
2089
2409
|
value: "end",
|
|
2090
|
-
label:
|
|
2091
|
-
renderContent: () => /* @__PURE__ */
|
|
2410
|
+
label: __35("End", "elementor"),
|
|
2411
|
+
renderContent: () => /* @__PURE__ */ React55.createElement(RotatedIcon, { icon: EndIcon4, size: "tiny" }),
|
|
2092
2412
|
showTooltip: true
|
|
2093
2413
|
},
|
|
2094
2414
|
{
|
|
2095
2415
|
value: "justify",
|
|
2096
|
-
label:
|
|
2097
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2416
|
+
label: __35("Justify", "elementor"),
|
|
2417
|
+
renderContent: ({ size }) => /* @__PURE__ */ React55.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
2098
2418
|
showTooltip: true
|
|
2099
2419
|
}
|
|
2100
2420
|
];
|
|
2101
2421
|
var TextAlignmentField = () => {
|
|
2102
|
-
return /* @__PURE__ */
|
|
2422
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "text-align" }, /* @__PURE__ */ React55.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React55.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React55.createElement(ControlLabel25, null, __35("Alignment", "elementor"))), /* @__PURE__ */ React55.createElement(Grid20, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React55.createElement(ToggleControl9, { options: options8 }))));
|
|
2103
2423
|
};
|
|
2104
2424
|
|
|
2105
2425
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
2106
|
-
import * as
|
|
2426
|
+
import * as React56 from "react";
|
|
2107
2427
|
import { ColorControl as ColorControl2, ControlLabel as ControlLabel26 } from "@elementor/editor-controls";
|
|
2108
2428
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
2109
|
-
import { __ as
|
|
2429
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
2110
2430
|
var TextColorField = () => {
|
|
2111
|
-
return /* @__PURE__ */
|
|
2431
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "color" }, /* @__PURE__ */ React56.createElement(Grid21, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React56.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ControlLabel26, null, __36("Text color", "elementor"))), /* @__PURE__ */ React56.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React56.createElement(ColorControl2, null))));
|
|
2112
2432
|
};
|
|
2113
2433
|
|
|
2114
2434
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
2115
|
-
import * as
|
|
2116
|
-
import { ControlLabel as ControlLabel27 } from "@elementor/editor-controls";
|
|
2117
|
-
import { StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
2118
|
-
import { Grid as Grid22
|
|
2119
|
-
import { __ as
|
|
2120
|
-
var
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
})
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
"aria-label": "underline"
|
|
2149
|
-
},
|
|
2150
|
-
/* @__PURE__ */ React55.createElement(UnderlineIcon, { fontSize: buttonSize })
|
|
2151
|
-
))));
|
|
2152
|
-
};
|
|
2153
|
-
var ShorthandControl = ({
|
|
2154
|
-
children,
|
|
2155
|
-
value,
|
|
2156
|
-
currentValues,
|
|
2157
|
-
updateValues,
|
|
2158
|
-
"aria-label": ariaLabel
|
|
2159
|
-
}) => {
|
|
2160
|
-
const valuesArr = currentValues.split(" ").filter(Boolean);
|
|
2161
|
-
const selected = valuesArr.includes(value);
|
|
2162
|
-
const toggleValue = (newValue) => {
|
|
2163
|
-
if (selected) {
|
|
2164
|
-
updateValues(valuesArr.filter((v) => v !== newValue).join(" ") || null);
|
|
2165
|
-
} else {
|
|
2166
|
-
updateValues([...valuesArr, newValue].join(" "));
|
|
2167
|
-
}
|
|
2168
|
-
};
|
|
2169
|
-
return /* @__PURE__ */ React55.createElement(ToggleButton, { value, onChange: toggleValue, selected, "aria-label": ariaLabel }, children);
|
|
2170
|
-
};
|
|
2171
|
-
var ToggleButton = ({ onChange, ...props }) => {
|
|
2172
|
-
const handleChange = (_e, newValue) => {
|
|
2173
|
-
onChange(newValue);
|
|
2174
|
-
};
|
|
2175
|
-
return /* @__PURE__ */ React55.createElement(ToggleButtonBase, { ...props, onChange: handleChange, size: buttonSize });
|
|
2176
|
-
};
|
|
2435
|
+
import * as React57 from "react";
|
|
2436
|
+
import { ControlLabel as ControlLabel27, ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
2437
|
+
import { MinusIcon as MinusIcon3, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
2438
|
+
import { Grid as Grid22 } from "@elementor/ui";
|
|
2439
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
2440
|
+
var options9 = [
|
|
2441
|
+
{
|
|
2442
|
+
value: "none",
|
|
2443
|
+
label: __37("None", "elementor"),
|
|
2444
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(MinusIcon3, { fontSize: size }),
|
|
2445
|
+
showTooltip: true,
|
|
2446
|
+
exclusive: true
|
|
2447
|
+
},
|
|
2448
|
+
{
|
|
2449
|
+
value: "underline",
|
|
2450
|
+
label: __37("Underline", "elementor"),
|
|
2451
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(UnderlineIcon, { fontSize: size }),
|
|
2452
|
+
showTooltip: true
|
|
2453
|
+
},
|
|
2454
|
+
{
|
|
2455
|
+
value: "line-through",
|
|
2456
|
+
label: __37("Line-through", "elementor"),
|
|
2457
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(StrikethroughIcon, { fontSize: size }),
|
|
2458
|
+
showTooltip: true
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
value: "overline",
|
|
2462
|
+
label: __37("Overline", "elementor"),
|
|
2463
|
+
renderContent: ({ size }) => /* @__PURE__ */ React57.createElement(OverlineIcon, { fontSize: size }),
|
|
2464
|
+
showTooltip: true
|
|
2465
|
+
}
|
|
2466
|
+
];
|
|
2467
|
+
var TextDecorationField = () => /* @__PURE__ */ React57.createElement(StylesField, { bind: "text-decoration" }, /* @__PURE__ */ React57.createElement(Grid22, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(Grid22, { item: true, xs: 6 }, /* @__PURE__ */ React57.createElement(ControlLabel27, null, __37("Line decoration", "elementor"))), /* @__PURE__ */ React57.createElement(Grid22, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React57.createElement(ToggleControl10, { options: options9, exclusive: false }))));
|
|
2177
2468
|
|
|
2178
2469
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
2179
|
-
import * as
|
|
2180
|
-
import { ControlLabel as ControlLabel28, ToggleControl as
|
|
2470
|
+
import * as React58 from "react";
|
|
2471
|
+
import { ControlLabel as ControlLabel28, ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
2181
2472
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
2182
2473
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
2183
|
-
import { __ as
|
|
2184
|
-
var
|
|
2474
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
2475
|
+
var options10 = [
|
|
2185
2476
|
{
|
|
2186
2477
|
value: "ltr",
|
|
2187
|
-
label:
|
|
2188
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2478
|
+
label: __38("Left to right", "elementor"),
|
|
2479
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
2189
2480
|
showTooltip: true
|
|
2190
2481
|
},
|
|
2191
2482
|
{
|
|
2192
2483
|
value: "rtl",
|
|
2193
|
-
label:
|
|
2194
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2484
|
+
label: __38("Right to left", "elementor"),
|
|
2485
|
+
renderContent: ({ size }) => /* @__PURE__ */ React58.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
2195
2486
|
showTooltip: true
|
|
2196
2487
|
}
|
|
2197
2488
|
];
|
|
2198
2489
|
var TextDirectionField = () => {
|
|
2199
|
-
return /* @__PURE__ */
|
|
2490
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "direction" }, /* @__PURE__ */ React58.createElement(Grid23, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React58.createElement(Grid23, { item: true, xs: 6 }, /* @__PURE__ */ React58.createElement(ControlLabel28, null, __38("Direction", "elementor"))), /* @__PURE__ */ React58.createElement(Grid23, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React58.createElement(ToggleControl11, { options: options10 }))));
|
|
2200
2491
|
};
|
|
2201
2492
|
|
|
2202
2493
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
2203
|
-
import * as
|
|
2494
|
+
import * as React59 from "react";
|
|
2204
2495
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
2205
|
-
import { __ as
|
|
2496
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
2206
2497
|
var initTextStroke = {
|
|
2207
2498
|
$$type: "stroke",
|
|
2208
2499
|
value: {
|
|
@@ -2228,74 +2519,73 @@ var TextStrokeField = () => {
|
|
|
2228
2519
|
setTextStroke(null);
|
|
2229
2520
|
};
|
|
2230
2521
|
const hasTextStroke = Boolean(textStroke);
|
|
2231
|
-
return /* @__PURE__ */
|
|
2522
|
+
return /* @__PURE__ */ React59.createElement(
|
|
2232
2523
|
AddOrRemoveContent,
|
|
2233
2524
|
{
|
|
2234
|
-
label:
|
|
2525
|
+
label: __39("Text stroke", "elementor"),
|
|
2235
2526
|
isAdded: hasTextStroke,
|
|
2236
2527
|
onAdd: addTextStroke,
|
|
2237
2528
|
onRemove: removeTextStroke
|
|
2238
2529
|
},
|
|
2239
|
-
/* @__PURE__ */
|
|
2530
|
+
/* @__PURE__ */ React59.createElement(StylesField, { bind: "stroke" }, /* @__PURE__ */ React59.createElement(StrokeControl, null))
|
|
2240
2531
|
);
|
|
2241
2532
|
};
|
|
2242
2533
|
|
|
2243
2534
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
2244
|
-
import * as
|
|
2245
|
-
import { ControlLabel as ControlLabel29, ToggleControl as
|
|
2246
|
-
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as
|
|
2535
|
+
import * as React60 from "react";
|
|
2536
|
+
import { ControlLabel as ControlLabel29, ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
2537
|
+
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
2247
2538
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
2248
|
-
import { __ as
|
|
2249
|
-
var
|
|
2539
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
2540
|
+
var options11 = [
|
|
2250
2541
|
{
|
|
2251
2542
|
value: "none",
|
|
2252
|
-
label:
|
|
2253
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2543
|
+
label: __40("None", "elementor"),
|
|
2544
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(MinusIcon4, { fontSize: size }),
|
|
2254
2545
|
showTooltip: true
|
|
2255
2546
|
},
|
|
2256
2547
|
{
|
|
2257
2548
|
value: "capitalize",
|
|
2258
|
-
label:
|
|
2259
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2549
|
+
label: __40("Capitalize", "elementor"),
|
|
2550
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(LetterCaseIcon, { fontSize: size }),
|
|
2260
2551
|
showTooltip: true
|
|
2261
2552
|
},
|
|
2262
2553
|
{
|
|
2263
2554
|
value: "uppercase",
|
|
2264
|
-
label:
|
|
2265
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2555
|
+
label: __40("Uppercase", "elementor"),
|
|
2556
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
2266
2557
|
showTooltip: true
|
|
2267
2558
|
},
|
|
2268
2559
|
{
|
|
2269
2560
|
value: "lowercase",
|
|
2270
|
-
label:
|
|
2271
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2561
|
+
label: __40("Lowercase", "elementor"),
|
|
2562
|
+
renderContent: ({ size }) => /* @__PURE__ */ React60.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
2272
2563
|
showTooltip: true
|
|
2273
2564
|
}
|
|
2274
2565
|
];
|
|
2275
|
-
var TransformField = () => /* @__PURE__ */
|
|
2566
|
+
var TransformField = () => /* @__PURE__ */ React60.createElement(StylesField, { bind: "text-transform" }, /* @__PURE__ */ React60.createElement(Grid24, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React60.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React60.createElement(ControlLabel29, null, __40("Text transform", "elementor"))), /* @__PURE__ */ React60.createElement(Grid24, { item: true, xs: 6, display: "flex", justifyContent: "end" }, /* @__PURE__ */ React60.createElement(ToggleControl12, { options: options11 }))));
|
|
2276
2567
|
|
|
2277
2568
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
2278
|
-
import * as
|
|
2569
|
+
import * as React61 from "react";
|
|
2279
2570
|
import { ControlLabel as ControlLabel30, SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
2280
2571
|
import { Grid as Grid25 } from "@elementor/ui";
|
|
2281
|
-
import { __ as
|
|
2572
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
2282
2573
|
var WordSpacingField = () => {
|
|
2283
|
-
return /* @__PURE__ */
|
|
2574
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "word-spacing" }, /* @__PURE__ */ React61.createElement(Grid25, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React61.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(ControlLabel30, null, __41("Word spacing", "elementor"))), /* @__PURE__ */ React61.createElement(Grid25, { item: true, xs: 6 }, /* @__PURE__ */ React61.createElement(SizeControl8, null))));
|
|
2284
2575
|
};
|
|
2285
2576
|
|
|
2286
2577
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
2287
2578
|
var TypographySection = () => {
|
|
2288
|
-
return /* @__PURE__ */
|
|
2579
|
+
return /* @__PURE__ */ React62.createElement(SectionContent, null, /* @__PURE__ */ React62.createElement(FontFamilyField, null), /* @__PURE__ */ React62.createElement(FontWeightField, null), /* @__PURE__ */ React62.createElement(FontSizeField, null), /* @__PURE__ */ React62.createElement(PanelDivider, null), /* @__PURE__ */ React62.createElement(TextAlignmentField, null), /* @__PURE__ */ React62.createElement(TextColorField, null), /* @__PURE__ */ React62.createElement(CollapsibleContent, null, /* @__PURE__ */ React62.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React62.createElement(LineHeightField, null), /* @__PURE__ */ React62.createElement(LetterSpacingField, null), /* @__PURE__ */ React62.createElement(WordSpacingField, null), /* @__PURE__ */ React62.createElement(PanelDivider, null), /* @__PURE__ */ React62.createElement(TextDecorationField, null), /* @__PURE__ */ React62.createElement(TransformField, null), /* @__PURE__ */ React62.createElement(TextDirectionField, null), /* @__PURE__ */ React62.createElement(FontStyleField, null), /* @__PURE__ */ React62.createElement(TextStrokeField, null))));
|
|
2289
2580
|
};
|
|
2290
2581
|
|
|
2291
2582
|
// src/components/style-tab.tsx
|
|
2292
|
-
var CLASSES_PROP_KEY = "classes";
|
|
2293
2583
|
var StyleTab = () => {
|
|
2294
2584
|
const currentClassesProp = useCurrentClassesProp();
|
|
2295
2585
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp);
|
|
2296
2586
|
const [activeStyleState, setActiveStyleState] = useState7(null);
|
|
2297
2587
|
const breakpoint = useActiveBreakpoint();
|
|
2298
|
-
return /* @__PURE__ */
|
|
2588
|
+
return /* @__PURE__ */ React63.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React63.createElement(
|
|
2299
2589
|
StyleProvider,
|
|
2300
2590
|
{
|
|
2301
2591
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -2306,7 +2596,7 @@ var StyleTab = () => {
|
|
|
2306
2596
|
},
|
|
2307
2597
|
setMetaState: setActiveStyleState
|
|
2308
2598
|
},
|
|
2309
|
-
/* @__PURE__ */
|
|
2599
|
+
/* @__PURE__ */ React63.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React63.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React63.createElement(CssClassSelector, null), /* @__PURE__ */ React63.createElement(Divider4, null), /* @__PURE__ */ React63.createElement(SectionsList, null, /* @__PURE__ */ React63.createElement(Section, { title: __42("Layout", "elementor") }, /* @__PURE__ */ React63.createElement(LayoutSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: __42("Spacing", "elementor") }, /* @__PURE__ */ React63.createElement(SpacingSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: __42("Size", "elementor") }, /* @__PURE__ */ React63.createElement(SizeSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: __42("Position", "elementor") }, /* @__PURE__ */ React63.createElement(PositionSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: __42("Typography", "elementor") }, /* @__PURE__ */ React63.createElement(TypographySection, null)), /* @__PURE__ */ React63.createElement(Section, { title: __42("Background", "elementor") }, /* @__PURE__ */ React63.createElement(BackgroundSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: __42("Border", "elementor") }, /* @__PURE__ */ React63.createElement(BorderSection, null)), /* @__PURE__ */ React63.createElement(Section, { title: __42("Effects", "elementor") }, /* @__PURE__ */ React63.createElement(EffectsSection, null)))))
|
|
2310
2600
|
));
|
|
2311
2601
|
};
|
|
2312
2602
|
function useActiveStyleDefId(currentClassesProp) {
|
|
@@ -2316,8 +2606,8 @@ function useActiveStyleDefId(currentClassesProp) {
|
|
|
2316
2606
|
}
|
|
2317
2607
|
function useFirstElementStyleDef(currentClassesProp) {
|
|
2318
2608
|
const { element } = useElement();
|
|
2319
|
-
const classesIds =
|
|
2320
|
-
const stylesDefs =
|
|
2609
|
+
const classesIds = useElementSetting5(element.id, currentClassesProp)?.value || [];
|
|
2610
|
+
const stylesDefs = getElementStyles(element.id) ?? {};
|
|
2321
2611
|
return Object.values(stylesDefs).find((styleDef) => classesIds.includes(styleDef.id));
|
|
2322
2612
|
}
|
|
2323
2613
|
function useCurrentClassesProp() {
|
|
@@ -2338,7 +2628,7 @@ var EditingPanelTabs = () => {
|
|
|
2338
2628
|
return (
|
|
2339
2629
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
2340
2630
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
2341
|
-
/* @__PURE__ */
|
|
2631
|
+
/* @__PURE__ */ React64.createElement(Fragment8, { key: element.id }, /* @__PURE__ */ React64.createElement(Stack13, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React64.createElement(Tabs, { variant: "fullWidth", indicatorColor: "secondary", textColor: "inherit", ...getTabsProps() }, /* @__PURE__ */ React64.createElement(Tab, { label: __43("General", "elementor"), ...getTabProps("settings") }), /* @__PURE__ */ React64.createElement(Tab, { label: __43("Style", "elementor"), ...getTabProps("style") })), /* @__PURE__ */ React64.createElement(Divider5, null), /* @__PURE__ */ React64.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React64.createElement(SettingsTab, null)), /* @__PURE__ */ React64.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React64.createElement(StyleTab, null))))
|
|
2342
2632
|
);
|
|
2343
2633
|
};
|
|
2344
2634
|
|
|
@@ -2351,8 +2641,8 @@ var EditingPanel = () => {
|
|
|
2351
2641
|
if (!element || !elementType) {
|
|
2352
2642
|
return null;
|
|
2353
2643
|
}
|
|
2354
|
-
const panelTitle =
|
|
2355
|
-
return /* @__PURE__ */
|
|
2644
|
+
const panelTitle = __44("Edit %s", "elementor").replace("%s", elementType.title);
|
|
2645
|
+
return /* @__PURE__ */ React65.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React65.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React65.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React65.createElement(Panel, null, /* @__PURE__ */ React65.createElement(PanelHeader, null, /* @__PURE__ */ React65.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React65.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React65.createElement(PanelBody, null, /* @__PURE__ */ React65.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React65.createElement(ControlReplacementProvider, { ...controlReplacement }, /* @__PURE__ */ React65.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React65.createElement(EditingPanelTabs, null))))))));
|
|
2356
2646
|
};
|
|
2357
2647
|
|
|
2358
2648
|
// src/panel.ts
|
|
@@ -2363,47 +2653,30 @@ var { panel, usePanelActions, usePanelStatus } = createPanel({
|
|
|
2363
2653
|
|
|
2364
2654
|
// src/init.ts
|
|
2365
2655
|
import { injectIntoLogic } from "@elementor/editor";
|
|
2656
|
+
import { PrefetchUserData } from "@elementor/editor-current-user";
|
|
2366
2657
|
import { __registerPanel as registerPanel } from "@elementor/editor-panels";
|
|
2367
2658
|
import { blockCommand } from "@elementor/editor-v1-adapters";
|
|
2368
2659
|
|
|
2369
|
-
// src/hooks/use-
|
|
2660
|
+
// src/hooks/use-open-editor-panel.ts
|
|
2370
2661
|
import { useEffect as useEffect2 } from "react";
|
|
2371
|
-
import { getSelectedElements as getSelectedElements2, isElementInContainer } from "@elementor/editor-elements";
|
|
2372
2662
|
import { __privateListenTo as listenTo, commandStartEvent } from "@elementor/editor-v1-adapters";
|
|
2373
2663
|
|
|
2374
2664
|
// src/sync/is-atomic-widget-selected.ts
|
|
2375
|
-
import { getSelectedElements, getWidgetsCache } from "@elementor/editor-elements";
|
|
2665
|
+
import { getSelectedElements, getWidgetsCache as getWidgetsCache2 } from "@elementor/editor-elements";
|
|
2376
2666
|
var isAtomicWidgetSelected = () => {
|
|
2377
2667
|
const selectedElements = getSelectedElements();
|
|
2378
|
-
const widgetCache =
|
|
2668
|
+
const widgetCache = getWidgetsCache2();
|
|
2379
2669
|
if (selectedElements.length !== 1) {
|
|
2380
2670
|
return false;
|
|
2381
2671
|
}
|
|
2382
2672
|
return !!widgetCache?.[selectedElements[0].type]?.atomic_controls;
|
|
2383
2673
|
};
|
|
2384
2674
|
|
|
2385
|
-
// src/hooks/use-close-editor-panel.ts
|
|
2386
|
-
var useCloseEditorPanel = () => {
|
|
2387
|
-
const { close } = usePanelActions();
|
|
2388
|
-
return useEffect2(() => {
|
|
2389
|
-
return listenTo(commandStartEvent("document/elements/delete"), (e) => {
|
|
2390
|
-
const selectedElement = getSelectedElements2()[0];
|
|
2391
|
-
const { container: deletedContainer } = e?.args;
|
|
2392
|
-
const isSelectedElementInDeletedContainer = deletedContainer && selectedElement && isElementInContainer(selectedElement, deletedContainer);
|
|
2393
|
-
if (isSelectedElementInDeletedContainer && isAtomicWidgetSelected()) {
|
|
2394
|
-
close();
|
|
2395
|
-
}
|
|
2396
|
-
});
|
|
2397
|
-
}, []);
|
|
2398
|
-
};
|
|
2399
|
-
|
|
2400
2675
|
// src/hooks/use-open-editor-panel.ts
|
|
2401
|
-
import { useEffect as useEffect3 } from "react";
|
|
2402
|
-
import { __privateListenTo as listenTo2, commandStartEvent as commandStartEvent2 } from "@elementor/editor-v1-adapters";
|
|
2403
2676
|
var useOpenEditorPanel = () => {
|
|
2404
2677
|
const { open } = usePanelActions();
|
|
2405
|
-
|
|
2406
|
-
return
|
|
2678
|
+
useEffect2(() => {
|
|
2679
|
+
return listenTo(commandStartEvent("panel/editor/open"), () => {
|
|
2407
2680
|
if (isAtomicWidgetSelected()) {
|
|
2408
2681
|
open();
|
|
2409
2682
|
}
|
|
@@ -2414,14 +2687,13 @@ var useOpenEditorPanel = () => {
|
|
|
2414
2687
|
// src/components/editing-panel-hooks.tsx
|
|
2415
2688
|
var EditingPanelHooks = () => {
|
|
2416
2689
|
useOpenEditorPanel();
|
|
2417
|
-
useCloseEditorPanel();
|
|
2418
2690
|
return null;
|
|
2419
2691
|
};
|
|
2420
2692
|
|
|
2421
2693
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2422
|
-
import * as
|
|
2694
|
+
import * as React69 from "react";
|
|
2423
2695
|
import { useId as useId4 } from "react";
|
|
2424
|
-
import { ControlLabel as ControlLabel31, useBoundProp as
|
|
2696
|
+
import { ControlLabel as ControlLabel31, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
2425
2697
|
import { DatabaseIcon as DatabaseIcon2, SettingsIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
2426
2698
|
import {
|
|
2427
2699
|
bindPopover as bindPopover2,
|
|
@@ -2441,12 +2713,12 @@ import {
|
|
|
2441
2713
|
usePopupState as usePopupState3,
|
|
2442
2714
|
useTabs as useTabs2
|
|
2443
2715
|
} from "@elementor/ui";
|
|
2444
|
-
import { __ as
|
|
2716
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
2445
2717
|
|
|
2446
2718
|
// src/components/popover-content.tsx
|
|
2447
|
-
import * as
|
|
2719
|
+
import * as React66 from "react";
|
|
2448
2720
|
import { Stack as Stack14 } from "@elementor/ui";
|
|
2449
|
-
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */
|
|
2721
|
+
var PopoverContent = ({ alignItems, gap = 1.5, p, children }) => /* @__PURE__ */ React66.createElement(Stack14, { alignItems, gap, p }, children);
|
|
2450
2722
|
|
|
2451
2723
|
// src/hooks/use-persist-dynamic-value.ts
|
|
2452
2724
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
@@ -2457,15 +2729,15 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
2457
2729
|
};
|
|
2458
2730
|
|
|
2459
2731
|
// src/dynamics/dynamic-control.tsx
|
|
2460
|
-
import * as
|
|
2461
|
-
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as
|
|
2732
|
+
import * as React67 from "react";
|
|
2733
|
+
import { PropKeyProvider as PropKeyProvider3, PropProvider as PropProvider3, useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
2462
2734
|
|
|
2463
2735
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
2464
2736
|
import { useMemo as useMemo5 } from "react";
|
|
2465
2737
|
|
|
2466
2738
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2467
2739
|
import { useMemo as useMemo4 } from "react";
|
|
2468
|
-
import { useBoundProp } from "@elementor/editor-controls";
|
|
2740
|
+
import { useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
2469
2741
|
|
|
2470
2742
|
// src/dynamics/sync/get-elementor-config.ts
|
|
2471
2743
|
var getElementorConfig2 = () => {
|
|
@@ -2514,7 +2786,7 @@ var dynamicPropTypeUtil = createPropUtils(
|
|
|
2514
2786
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
2515
2787
|
var usePropDynamicTags = () => {
|
|
2516
2788
|
let categories = [];
|
|
2517
|
-
const { propType } =
|
|
2789
|
+
const { propType } = useBoundProp2();
|
|
2518
2790
|
if (propType) {
|
|
2519
2791
|
const propDynamicType = getDynamicPropType(propType);
|
|
2520
2792
|
categories = propDynamicType?.settings.categories || [];
|
|
@@ -2540,7 +2812,7 @@ var useDynamicTag = (tagName) => {
|
|
|
2540
2812
|
|
|
2541
2813
|
// src/dynamics/dynamic-control.tsx
|
|
2542
2814
|
var DynamicControl = ({ bind, children }) => {
|
|
2543
|
-
const { value, setValue } =
|
|
2815
|
+
const { value, setValue } = useBoundProp3(dynamicPropTypeUtil);
|
|
2544
2816
|
const { name = "", settings } = value ?? {};
|
|
2545
2817
|
const dynamicTag = useDynamicTag(name);
|
|
2546
2818
|
if (!dynamicTag) {
|
|
@@ -2559,13 +2831,13 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
2559
2831
|
});
|
|
2560
2832
|
};
|
|
2561
2833
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
2562
|
-
return /* @__PURE__ */
|
|
2834
|
+
return /* @__PURE__ */ React67.createElement(PropProvider3, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React67.createElement(PropKeyProvider3, { bind }, children));
|
|
2563
2835
|
};
|
|
2564
2836
|
|
|
2565
2837
|
// src/dynamics/components/dynamic-selection.tsx
|
|
2566
|
-
import * as
|
|
2838
|
+
import * as React68 from "react";
|
|
2567
2839
|
import { Fragment as Fragment9, useState as useState8 } from "react";
|
|
2568
|
-
import { useBoundProp as
|
|
2840
|
+
import { useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
2569
2841
|
import { DatabaseIcon, SearchIcon } from "@elementor/icons";
|
|
2570
2842
|
import {
|
|
2571
2843
|
Box as Box4,
|
|
@@ -2579,16 +2851,17 @@ import {
|
|
|
2579
2851
|
TextField as TextField2,
|
|
2580
2852
|
Typography as Typography4
|
|
2581
2853
|
} from "@elementor/ui";
|
|
2582
|
-
import { __ as
|
|
2854
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
2583
2855
|
var SIZE3 = "tiny";
|
|
2584
2856
|
var DynamicSelection = ({ onSelect }) => {
|
|
2585
2857
|
const [searchValue, setSearchValue] = useState8("");
|
|
2586
2858
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
2587
|
-
const { value: anyValue } =
|
|
2588
|
-
const { bind, value: dynamicValue, setValue } =
|
|
2859
|
+
const { value: anyValue } = useBoundProp4();
|
|
2860
|
+
const { bind, value: dynamicValue, setValue } = useBoundProp4(dynamicPropTypeUtil);
|
|
2589
2861
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
2590
2862
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
2591
|
-
const
|
|
2863
|
+
const options12 = useFilteredOptions(searchValue);
|
|
2864
|
+
const hasNoDynamicTags = !options12.length && !searchValue.trim();
|
|
2592
2865
|
const handleSearch = (event) => {
|
|
2593
2866
|
setSearchValue(event.target.value);
|
|
2594
2867
|
};
|
|
@@ -2599,21 +2872,27 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2599
2872
|
setValue({ name: value, settings: {} });
|
|
2600
2873
|
onSelect?.();
|
|
2601
2874
|
};
|
|
2602
|
-
return /* @__PURE__ */
|
|
2875
|
+
return /* @__PURE__ */ React68.createElement(Stack15, null, hasNoDynamicTags ? /* @__PURE__ */ React68.createElement(NoDynamicTags, null) : /* @__PURE__ */ React68.createElement(Fragment9, null, /* @__PURE__ */ React68.createElement(Box4, { px: 1.5, pb: 1 }, /* @__PURE__ */ React68.createElement(
|
|
2603
2876
|
TextField2,
|
|
2604
2877
|
{
|
|
2605
2878
|
fullWidth: true,
|
|
2606
2879
|
size: SIZE3,
|
|
2607
2880
|
value: searchValue,
|
|
2608
2881
|
onChange: handleSearch,
|
|
2609
|
-
placeholder:
|
|
2882
|
+
placeholder: __45("Search dynamic tags\u2026", "elementor"),
|
|
2610
2883
|
InputProps: {
|
|
2611
|
-
startAdornment: /* @__PURE__ */
|
|
2884
|
+
startAdornment: /* @__PURE__ */ React68.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React68.createElement(SearchIcon, { fontSize: SIZE3 }))
|
|
2612
2885
|
}
|
|
2613
2886
|
}
|
|
2614
|
-
)), /* @__PURE__ */
|
|
2887
|
+
)), /* @__PURE__ */ React68.createElement(Divider6, null), /* @__PURE__ */ React68.createElement(Box4, { sx: { overflowY: "auto", height: 260, width: 220 } }, options12.length > 0 ? /* @__PURE__ */ React68.createElement(MenuList, { role: "listbox", tabIndex: 0 }, options12.map(([category, items3], index) => /* @__PURE__ */ React68.createElement(Fragment9, { key: index }, /* @__PURE__ */ React68.createElement(
|
|
2888
|
+
ListSubheader2,
|
|
2889
|
+
{
|
|
2890
|
+
sx: { px: 1.5, typography: "caption", color: "text.tertiary" }
|
|
2891
|
+
},
|
|
2892
|
+
dynamicGroups?.[category]?.title || category
|
|
2893
|
+
), items3.map(({ value, label: tagLabel }) => {
|
|
2615
2894
|
const isSelected = isCurrentValueDynamic && value === dynamicValue?.name;
|
|
2616
|
-
return /* @__PURE__ */
|
|
2895
|
+
return /* @__PURE__ */ React68.createElement(
|
|
2617
2896
|
MenuItem2,
|
|
2618
2897
|
{
|
|
2619
2898
|
key: value,
|
|
@@ -2624,34 +2903,41 @@ var DynamicSelection = ({ onSelect }) => {
|
|
|
2624
2903
|
},
|
|
2625
2904
|
tagLabel
|
|
2626
2905
|
);
|
|
2627
|
-
})))) : /* @__PURE__ */
|
|
2628
|
-
Stack15,
|
|
2629
|
-
{
|
|
2630
|
-
gap: 1,
|
|
2631
|
-
alignItems: "center",
|
|
2632
|
-
justifyContent: "center",
|
|
2633
|
-
height: "100%",
|
|
2634
|
-
p: 2.5,
|
|
2635
|
-
color: "text.secondary",
|
|
2636
|
-
sx: { pb: 3.5 }
|
|
2637
|
-
},
|
|
2638
|
-
/* @__PURE__ */ React66.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
2639
|
-
/* @__PURE__ */ React66.createElement(Typography4, { align: "center", variant: "subtitle2" }, __43("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React66.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
2640
|
-
/* @__PURE__ */ React66.createElement(Typography4, { align: "center", variant: "caption" }, __43("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React66.createElement(
|
|
2641
|
-
Link,
|
|
2642
|
-
{
|
|
2643
|
-
color: "text.secondary",
|
|
2644
|
-
variant: "caption",
|
|
2645
|
-
component: "button",
|
|
2646
|
-
onClick: () => setSearchValue("")
|
|
2647
|
-
},
|
|
2648
|
-
__43("Clear & try again", "elementor")
|
|
2649
|
-
))
|
|
2650
|
-
)));
|
|
2906
|
+
})))) : /* @__PURE__ */ React68.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") }))));
|
|
2651
2907
|
};
|
|
2908
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React68.createElement(
|
|
2909
|
+
Stack15,
|
|
2910
|
+
{
|
|
2911
|
+
gap: 1,
|
|
2912
|
+
alignItems: "center",
|
|
2913
|
+
justifyContent: "center",
|
|
2914
|
+
height: "100%",
|
|
2915
|
+
p: 2.5,
|
|
2916
|
+
color: "text.secondary",
|
|
2917
|
+
sx: { pb: 3.5 }
|
|
2918
|
+
},
|
|
2919
|
+
/* @__PURE__ */ React68.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
2920
|
+
/* @__PURE__ */ React68.createElement(Typography4, { align: "center", variant: "subtitle2" }, __45("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React68.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
2921
|
+
/* @__PURE__ */ React68.createElement(Typography4, { align: "center", variant: "caption" }, __45("Try something else.", "elementor"), "\xA0", /* @__PURE__ */ React68.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __45("Clear & try again", "elementor")))
|
|
2922
|
+
);
|
|
2923
|
+
var NoDynamicTags = () => /* @__PURE__ */ React68.createElement(Box4, { sx: { overflowY: "hidden", height: 297, width: 220 } }, /* @__PURE__ */ React68.createElement(Divider6, null), /* @__PURE__ */ React68.createElement(
|
|
2924
|
+
Stack15,
|
|
2925
|
+
{
|
|
2926
|
+
gap: 1,
|
|
2927
|
+
alignItems: "center",
|
|
2928
|
+
justifyContent: "center",
|
|
2929
|
+
height: "100%",
|
|
2930
|
+
p: 2.5,
|
|
2931
|
+
color: "text.secondary",
|
|
2932
|
+
sx: { pb: 3.5 }
|
|
2933
|
+
},
|
|
2934
|
+
/* @__PURE__ */ React68.createElement(DatabaseIcon, { fontSize: "large" }),
|
|
2935
|
+
/* @__PURE__ */ React68.createElement(Typography4, { align: "center", variant: "subtitle2" }, __45("Streamline your workflow with dynamic tags", "elementor")),
|
|
2936
|
+
/* @__PURE__ */ React68.createElement(Typography4, { align: "center", variant: "caption" }, __45("You\u2019ll need Elementor Pro to use this feature.", "elementor"))
|
|
2937
|
+
));
|
|
2652
2938
|
var useFilteredOptions = (searchValue) => {
|
|
2653
2939
|
const dynamicTags = usePropDynamicTags();
|
|
2654
|
-
const
|
|
2940
|
+
const options12 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
2655
2941
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
2656
2942
|
if (!isVisible) {
|
|
2657
2943
|
return categories;
|
|
@@ -2662,14 +2948,14 @@ var useFilteredOptions = (searchValue) => {
|
|
|
2662
2948
|
categories.get(group)?.push({ label, value: name });
|
|
2663
2949
|
return categories;
|
|
2664
2950
|
}, /* @__PURE__ */ new Map());
|
|
2665
|
-
return [...
|
|
2951
|
+
return [...options12];
|
|
2666
2952
|
};
|
|
2667
2953
|
|
|
2668
2954
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
2669
2955
|
var SIZE4 = "tiny";
|
|
2670
2956
|
var DynamicSelectionControl = () => {
|
|
2671
|
-
const { setValue: setAnyValue } =
|
|
2672
|
-
const { bind, value } =
|
|
2957
|
+
const { setValue: setAnyValue } = useBoundProp5();
|
|
2958
|
+
const { bind, value } = useBoundProp5(dynamicPropTypeUtil);
|
|
2673
2959
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
2674
2960
|
const { name: tagName = "" } = value;
|
|
2675
2961
|
const selectionPopoverId = useId4();
|
|
@@ -2681,25 +2967,25 @@ var DynamicSelectionControl = () => {
|
|
|
2681
2967
|
if (!dynamicTag) {
|
|
2682
2968
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
2683
2969
|
}
|
|
2684
|
-
return /* @__PURE__ */
|
|
2970
|
+
return /* @__PURE__ */ React69.createElement(Box5, null, /* @__PURE__ */ React69.createElement(
|
|
2685
2971
|
Tag,
|
|
2686
2972
|
{
|
|
2687
2973
|
fullWidth: true,
|
|
2688
2974
|
showActionsOnHover: true,
|
|
2689
2975
|
label: dynamicTag.label,
|
|
2690
|
-
startIcon: /* @__PURE__ */
|
|
2976
|
+
startIcon: /* @__PURE__ */ React69.createElement(DatabaseIcon2, { fontSize: SIZE4 }),
|
|
2691
2977
|
...bindTrigger2(selectionPopoverState),
|
|
2692
|
-
actions: /* @__PURE__ */
|
|
2978
|
+
actions: /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React69.createElement(
|
|
2693
2979
|
IconButton3,
|
|
2694
2980
|
{
|
|
2695
2981
|
size: SIZE4,
|
|
2696
2982
|
onClick: removeDynamicTag,
|
|
2697
|
-
"aria-label":
|
|
2983
|
+
"aria-label": __46("Remove dynamic value", "elementor")
|
|
2698
2984
|
},
|
|
2699
|
-
/* @__PURE__ */
|
|
2985
|
+
/* @__PURE__ */ React69.createElement(XIcon2, { fontSize: SIZE4 })
|
|
2700
2986
|
))
|
|
2701
2987
|
}
|
|
2702
|
-
), /* @__PURE__ */
|
|
2988
|
+
), /* @__PURE__ */ React69.createElement(
|
|
2703
2989
|
Popover2,
|
|
2704
2990
|
{
|
|
2705
2991
|
disablePortal: true,
|
|
@@ -2707,7 +2993,7 @@ var DynamicSelectionControl = () => {
|
|
|
2707
2993
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
2708
2994
|
...bindPopover2(selectionPopoverState)
|
|
2709
2995
|
},
|
|
2710
|
-
/* @__PURE__ */
|
|
2996
|
+
/* @__PURE__ */ React69.createElement(Stack16, null, /* @__PURE__ */ React69.createElement(Stack16, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React69.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React69.createElement(Typography5, { variant: "subtitle2" }, __46("Dynamic tags", "elementor")), /* @__PURE__ */ React69.createElement(IconButton3, { size: SIZE4, sx: { ml: "auto" }, onClick: selectionPopoverState.close }, /* @__PURE__ */ React69.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React69.createElement(DynamicSelection, { onSelect: selectionPopoverState.close }))
|
|
2711
2997
|
));
|
|
2712
2998
|
};
|
|
2713
2999
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -2717,22 +3003,22 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
2717
3003
|
if (!hasDynamicSettings) {
|
|
2718
3004
|
return null;
|
|
2719
3005
|
}
|
|
2720
|
-
return /* @__PURE__ */
|
|
3006
|
+
return /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(
|
|
2721
3007
|
IconButton3,
|
|
2722
3008
|
{
|
|
2723
3009
|
size: SIZE4,
|
|
2724
3010
|
...bindTrigger2(settingsPopupState),
|
|
2725
|
-
"aria-label":
|
|
3011
|
+
"aria-label": __46("Settings", "elementor")
|
|
2726
3012
|
},
|
|
2727
|
-
/* @__PURE__ */
|
|
2728
|
-
), /* @__PURE__ */
|
|
3013
|
+
/* @__PURE__ */ React69.createElement(SettingsIcon, { fontSize: SIZE4 })
|
|
3014
|
+
), /* @__PURE__ */ React69.createElement(
|
|
2729
3015
|
Popover2,
|
|
2730
3016
|
{
|
|
2731
3017
|
disableScrollLock: true,
|
|
2732
3018
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2733
3019
|
...bindPopover2(settingsPopupState)
|
|
2734
3020
|
},
|
|
2735
|
-
/* @__PURE__ */
|
|
3021
|
+
/* @__PURE__ */ React69.createElement(Paper, { component: Stack16, sx: { minHeight: "300px", width: "220px" } }, /* @__PURE__ */ React69.createElement(Stack16, { direction: "row", alignItems: "center", px: 1.5, pt: 2, pb: 1 }, /* @__PURE__ */ React69.createElement(DatabaseIcon2, { fontSize: SIZE4, sx: { mr: 0.5 } }), /* @__PURE__ */ React69.createElement(Typography5, { variant: "subtitle2" }, dynamicTag.label), /* @__PURE__ */ React69.createElement(IconButton3, { sx: { ml: "auto" }, size: SIZE4, onClick: settingsPopupState.close }, /* @__PURE__ */ React69.createElement(XIcon2, { fontSize: SIZE4 }))), /* @__PURE__ */ React69.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls }))
|
|
2736
3022
|
));
|
|
2737
3023
|
};
|
|
2738
3024
|
var DynamicSettings = ({ controls }) => {
|
|
@@ -2741,10 +3027,10 @@ var DynamicSettings = ({ controls }) => {
|
|
|
2741
3027
|
if (!tabs.length) {
|
|
2742
3028
|
return null;
|
|
2743
3029
|
}
|
|
2744
|
-
return /* @__PURE__ */
|
|
2745
|
-
return /* @__PURE__ */
|
|
3030
|
+
return /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(Tabs2, { indicatorColor: "secondary", textColor: "secondary", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React69.createElement(Tab2, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React69.createElement(Divider7, null), tabs.map(({ value }, index) => {
|
|
3031
|
+
return /* @__PURE__ */ React69.createElement(TabPanel2, { key: index, sx: { flexGrow: 1, py: 0 }, ...getTabPanelProps(index) }, /* @__PURE__ */ React69.createElement(PopoverContent, { p: 1.5 }, value.items.map((item) => {
|
|
2746
3032
|
if (item.type === "control") {
|
|
2747
|
-
return /* @__PURE__ */
|
|
3033
|
+
return /* @__PURE__ */ React69.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
2748
3034
|
}
|
|
2749
3035
|
return null;
|
|
2750
3036
|
})));
|
|
@@ -2754,22 +3040,22 @@ var Control3 = ({ control }) => {
|
|
|
2754
3040
|
if (!getControlByType(control.type)) {
|
|
2755
3041
|
return null;
|
|
2756
3042
|
}
|
|
2757
|
-
return /* @__PURE__ */
|
|
3043
|
+
return /* @__PURE__ */ React69.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React69.createElement(Grid26, { container: true, gap: 1 }, control.label ? /* @__PURE__ */ React69.createElement(Grid26, { item: true, xs: 12 }, /* @__PURE__ */ React69.createElement(ControlLabel31, null, control.label)) : null, /* @__PURE__ */ React69.createElement(Grid26, { item: true, xs: 12 }, /* @__PURE__ */ React69.createElement(Control, { type: control.type, props: control.props }))));
|
|
2758
3044
|
};
|
|
2759
3045
|
|
|
2760
3046
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
2761
|
-
import * as
|
|
2762
|
-
import { useBoundProp as
|
|
3047
|
+
import * as React70 from "react";
|
|
3048
|
+
import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
2763
3049
|
import { DatabaseIcon as DatabaseIcon3 } from "@elementor/icons";
|
|
2764
|
-
import { __ as
|
|
3050
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
2765
3051
|
var usePropDynamicAction = () => {
|
|
2766
|
-
const { propType } =
|
|
3052
|
+
const { propType } = useBoundProp6();
|
|
2767
3053
|
const visible = !!propType && supportsDynamic(propType);
|
|
2768
3054
|
return {
|
|
2769
3055
|
visible,
|
|
2770
3056
|
icon: DatabaseIcon3,
|
|
2771
|
-
title:
|
|
2772
|
-
popoverContent: ({ closePopover }) => /* @__PURE__ */
|
|
3057
|
+
title: __47("Dynamic tags", "elementor"),
|
|
3058
|
+
popoverContent: ({ closePopover }) => /* @__PURE__ */ React70.createElement(DynamicSelection, { onSelect: closePopover })
|
|
2773
3059
|
};
|
|
2774
3060
|
};
|
|
2775
3061
|
|
|
@@ -2794,6 +3080,10 @@ function init2() {
|
|
|
2794
3080
|
id: "editing-panel-hooks",
|
|
2795
3081
|
component: EditingPanelHooks
|
|
2796
3082
|
});
|
|
3083
|
+
injectIntoLogic({
|
|
3084
|
+
id: "current-user-data",
|
|
3085
|
+
component: PrefetchUserData
|
|
3086
|
+
});
|
|
2797
3087
|
init();
|
|
2798
3088
|
}
|
|
2799
3089
|
var blockV1Panel = () => {
|
|
@@ -2808,7 +3098,7 @@ init2();
|
|
|
2808
3098
|
export {
|
|
2809
3099
|
injectIntoClassSelectorActions,
|
|
2810
3100
|
replaceControl,
|
|
2811
|
-
|
|
3101
|
+
useBoundProp7 as useBoundProp,
|
|
2812
3102
|
usePanelActions,
|
|
2813
3103
|
usePanelStatus
|
|
2814
3104
|
};
|