@elementor/editor-editing-panel 4.1.0-808 → 4.1.0-810
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/dist/index.js +864 -684
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +702 -517
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/components/style-sections/layout-section/display-field.tsx +21 -8
- package/src/components/style-sections/layout-section/grid-auto-flow-field.tsx +102 -0
- package/src/components/style-sections/layout-section/grid-justify-items-field.tsx +58 -0
- package/src/components/style-sections/layout-section/grid-size-field.tsx +96 -0
- package/src/components/style-sections/layout-section/layout-section.tsx +18 -0
package/dist/index.mjs
CHANGED
|
@@ -230,8 +230,8 @@ import {
|
|
|
230
230
|
} from "@elementor/ui";
|
|
231
231
|
|
|
232
232
|
// src/components/creatable-autocomplete/autocomplete-option-internal-properties.ts
|
|
233
|
-
function addGroupToOptions(
|
|
234
|
-
return
|
|
233
|
+
function addGroupToOptions(options13, pluralEntityName) {
|
|
234
|
+
return options13.map((option) => {
|
|
235
235
|
return {
|
|
236
236
|
...option,
|
|
237
237
|
_group: `Existing ${pluralEntityName ?? "options"}`
|
|
@@ -245,7 +245,7 @@ function removeInternalKeys(option) {
|
|
|
245
245
|
|
|
246
246
|
// src/components/creatable-autocomplete/use-autocomplete-change.ts
|
|
247
247
|
function useAutocompleteChange(params) {
|
|
248
|
-
const { options:
|
|
248
|
+
const { options: options13, onSelect, createOption, setInputValue, closeDropdown } = params;
|
|
249
249
|
if (!onSelect && !createOption) {
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
@@ -273,7 +273,7 @@ function useAutocompleteChange(params) {
|
|
|
273
273
|
// User pressed "Enter" after typing input. The input is either matching existing option or a new option to create.
|
|
274
274
|
case "createOption": {
|
|
275
275
|
const inputValue = changedOption;
|
|
276
|
-
const matchingOption =
|
|
276
|
+
const matchingOption = options13.find(
|
|
277
277
|
(option) => option.label.toLocaleLowerCase() === inputValue.toLocaleLowerCase()
|
|
278
278
|
);
|
|
279
279
|
if (matchingOption) {
|
|
@@ -375,7 +375,7 @@ function useCreateOption(params) {
|
|
|
375
375
|
// src/components/creatable-autocomplete/use-filter-options.ts
|
|
376
376
|
import { createFilterOptions } from "@elementor/ui";
|
|
377
377
|
function useFilterOptions(parameters) {
|
|
378
|
-
const { options:
|
|
378
|
+
const { options: options13, selected, onCreate, entityName } = parameters;
|
|
379
379
|
const filter = createFilterOptions();
|
|
380
380
|
const filterOptions = (optionList, params) => {
|
|
381
381
|
const selectedValues = selected.map((option) => option.value);
|
|
@@ -383,7 +383,7 @@ function useFilterOptions(parameters) {
|
|
|
383
383
|
optionList.filter((option) => !selectedValues.includes(option.value)),
|
|
384
384
|
params
|
|
385
385
|
);
|
|
386
|
-
const isExisting =
|
|
386
|
+
const isExisting = options13.some((option) => params.inputValue === option.label);
|
|
387
387
|
const allowCreate = Boolean(onCreate) && params.inputValue !== "" && !selectedValues.includes(params.inputValue) && !isExisting;
|
|
388
388
|
if (allowCreate) {
|
|
389
389
|
filteredOptions.unshift({
|
|
@@ -404,7 +404,7 @@ var MIN_INPUT_LENGTH = 2;
|
|
|
404
404
|
var CreatableAutocomplete = React5.forwardRef(CreatableAutocompleteInner);
|
|
405
405
|
function CreatableAutocompleteInner({
|
|
406
406
|
selected,
|
|
407
|
-
options:
|
|
407
|
+
options: options13,
|
|
408
408
|
entityName,
|
|
409
409
|
onSelect,
|
|
410
410
|
placeholder,
|
|
@@ -417,8 +417,8 @@ function CreatableAutocompleteInner({
|
|
|
417
417
|
const { open, openDropdown, closeDropdown } = useOpenState(props.open);
|
|
418
418
|
const { createOption, loading } = useCreateOption({ onCreate, validate, setInputValue, setError, closeDropdown });
|
|
419
419
|
const [internalOptions, internalSelected] = useMemo(
|
|
420
|
-
() => [
|
|
421
|
-
[
|
|
420
|
+
() => [options13, selected].map((optionsArr) => addGroupToOptions(optionsArr, entityName?.plural)),
|
|
421
|
+
[options13, selected, entityName?.plural]
|
|
422
422
|
);
|
|
423
423
|
const handleChange = useAutocompleteChange({
|
|
424
424
|
options: internalOptions,
|
|
@@ -427,7 +427,7 @@ function CreatableAutocompleteInner({
|
|
|
427
427
|
setInputValue,
|
|
428
428
|
closeDropdown
|
|
429
429
|
});
|
|
430
|
-
const filterOptions = useFilterOptions({ options:
|
|
430
|
+
const filterOptions = useFilterOptions({ options: options13, selected, onCreate, entityName });
|
|
431
431
|
const isCreatable = Boolean(onCreate);
|
|
432
432
|
const freeSolo = isCreatable || inputValue.length < MIN_INPUT_LENGTH || void 0;
|
|
433
433
|
return /* @__PURE__ */ React5.createElement(
|
|
@@ -1238,13 +1238,13 @@ var EMPTY_OPTION = {
|
|
|
1238
1238
|
};
|
|
1239
1239
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation2();
|
|
1240
1240
|
function CssClassSelector() {
|
|
1241
|
-
const
|
|
1241
|
+
const options13 = useOptions();
|
|
1242
1242
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
1243
1243
|
const autocompleteRef = useRef(null);
|
|
1244
1244
|
const [renameError, setRenameError] = useState4(null);
|
|
1245
1245
|
const handleSelect = useHandleSelect();
|
|
1246
1246
|
const { create, validate, entityName } = useCreateAction();
|
|
1247
|
-
const appliedOptions = useAppliedOptions(
|
|
1247
|
+
const appliedOptions = useAppliedOptions(options13);
|
|
1248
1248
|
const active = appliedOptions.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
1249
1249
|
const showPlaceholder = appliedOptions.every(({ fixed }) => fixed);
|
|
1250
1250
|
const { userCan } = useUserStylesCapability5();
|
|
@@ -1265,7 +1265,7 @@ function CssClassSelector() {
|
|
|
1265
1265
|
ref: autocompleteRef,
|
|
1266
1266
|
size: "tiny",
|
|
1267
1267
|
placeholder: showPlaceholder ? __6("Type class name", "elementor") : void 0,
|
|
1268
|
-
options:
|
|
1268
|
+
options: options13,
|
|
1269
1269
|
selected: appliedOptions,
|
|
1270
1270
|
entityName,
|
|
1271
1271
|
onSelect: handleSelect,
|
|
@@ -1394,10 +1394,10 @@ function useCreateAction() {
|
|
|
1394
1394
|
function hasReachedLimit(provider) {
|
|
1395
1395
|
return provider.actions.all().length >= provider.limit;
|
|
1396
1396
|
}
|
|
1397
|
-
function useAppliedOptions(
|
|
1397
|
+
function useAppliedOptions(options13) {
|
|
1398
1398
|
const currentClassesProp = useClassesProp();
|
|
1399
1399
|
const appliedIds = usePanelElementSetting(currentClassesProp)?.value ?? [];
|
|
1400
|
-
const appliedOptions =
|
|
1400
|
+
const appliedOptions = options13.filter((option) => option.value && appliedIds.includes(option.value));
|
|
1401
1401
|
const hasElementsProviderStyleApplied = appliedOptions.some(
|
|
1402
1402
|
(option) => option.provider && isElementsStylesProvider4(option.provider)
|
|
1403
1403
|
);
|
|
@@ -1781,7 +1781,7 @@ var hasInheritedCustomCss = (style, meta) => {
|
|
|
1781
1781
|
};
|
|
1782
1782
|
|
|
1783
1783
|
// src/components/editing-panel.tsx
|
|
1784
|
-
import * as
|
|
1784
|
+
import * as React85 from "react";
|
|
1785
1785
|
import {
|
|
1786
1786
|
ControlActionsProvider,
|
|
1787
1787
|
ControlReplacementsProvider,
|
|
@@ -1795,7 +1795,7 @@ import { createLocation as createLocation4 } from "@elementor/locations";
|
|
|
1795
1795
|
import { controlActionsMenu } from "@elementor/menus";
|
|
1796
1796
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
1797
1797
|
import { ErrorBoundary } from "@elementor/ui";
|
|
1798
|
-
import { __ as
|
|
1798
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
1799
1799
|
|
|
1800
1800
|
// src/editing-panel-replacement-registry.tsx
|
|
1801
1801
|
var registry = /* @__PURE__ */ new Map();
|
|
@@ -1818,11 +1818,11 @@ function EditorPanelErrorFallback() {
|
|
|
1818
1818
|
|
|
1819
1819
|
// src/components/editing-panel-tabs.tsx
|
|
1820
1820
|
import { Fragment as Fragment9 } from "react";
|
|
1821
|
-
import * as
|
|
1821
|
+
import * as React84 from "react";
|
|
1822
1822
|
import { getWidgetsCache as getWidgetsCache2 } from "@elementor/editor-elements";
|
|
1823
|
-
import { isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
1823
|
+
import { isExperimentActive as isExperimentActive3 } from "@elementor/editor-v1-adapters";
|
|
1824
1824
|
import { Divider as Divider6, Stack as Stack13, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
1825
|
-
import { __ as
|
|
1825
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
1826
1826
|
|
|
1827
1827
|
// src/contexts/scroll-context.tsx
|
|
1828
1828
|
import * as React14 from "react";
|
|
@@ -2482,14 +2482,14 @@ function isControl(control) {
|
|
|
2482
2482
|
}
|
|
2483
2483
|
|
|
2484
2484
|
// src/components/style-tab.tsx
|
|
2485
|
-
import * as
|
|
2485
|
+
import * as React83 from "react";
|
|
2486
2486
|
import { useState as useState9 } from "react";
|
|
2487
2487
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
2488
2488
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
2489
2489
|
import { createLocation as createLocation3 } from "@elementor/locations";
|
|
2490
2490
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
2491
2491
|
import { Box as Box5, Divider as Divider5, Stack as Stack12 } from "@elementor/ui";
|
|
2492
|
-
import { __ as
|
|
2492
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
2493
2493
|
|
|
2494
2494
|
// src/contexts/styles-inheritance-context.tsx
|
|
2495
2495
|
import * as React24 from "react";
|
|
@@ -3239,10 +3239,11 @@ var EffectsSection = () => {
|
|
|
3239
3239
|
};
|
|
3240
3240
|
|
|
3241
3241
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3242
|
-
import * as
|
|
3242
|
+
import * as React53 from "react";
|
|
3243
3243
|
import { ControlFormLabel as ControlFormLabel2 } from "@elementor/editor-controls";
|
|
3244
3244
|
import { useParentElement } from "@elementor/editor-elements";
|
|
3245
|
-
import {
|
|
3245
|
+
import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
|
|
3246
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
3246
3247
|
|
|
3247
3248
|
// src/hooks/use-computed-style.ts
|
|
3248
3249
|
import { __privateUseListenTo as useListenTo, commandEndEvent, windowEvent } from "@elementor/editor-v1-adapters";
|
|
@@ -3511,7 +3512,9 @@ var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React42.creat
|
|
|
3511
3512
|
|
|
3512
3513
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
3513
3514
|
import * as React43 from "react";
|
|
3515
|
+
import { useMemo as useMemo8 } from "react";
|
|
3514
3516
|
import { ToggleControl as ToggleControl5 } from "@elementor/editor-controls";
|
|
3517
|
+
import { isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
3515
3518
|
import { __ as __21 } from "@wordpress/i18n";
|
|
3516
3519
|
var DISPLAY_LABEL = __21("Display", "elementor");
|
|
3517
3520
|
var displayFieldItems = [
|
|
@@ -3528,15 +3531,15 @@ var displayFieldItems = [
|
|
|
3528
3531
|
showTooltip: true
|
|
3529
3532
|
},
|
|
3530
3533
|
{
|
|
3531
|
-
value: "
|
|
3532
|
-
renderContent: () => __21("
|
|
3533
|
-
label: __21("
|
|
3534
|
+
value: "grid",
|
|
3535
|
+
renderContent: () => __21("Grid", "elementor"),
|
|
3536
|
+
label: __21("Grid", "elementor"),
|
|
3534
3537
|
showTooltip: true
|
|
3535
3538
|
},
|
|
3536
3539
|
{
|
|
3537
|
-
value: "
|
|
3538
|
-
renderContent: () => __21("
|
|
3539
|
-
label: __21("
|
|
3540
|
+
value: "inline-block",
|
|
3541
|
+
renderContent: () => __21("In-blk", "elementor"),
|
|
3542
|
+
label: __21("Inline-block", "elementor"),
|
|
3540
3543
|
showTooltip: true
|
|
3541
3544
|
},
|
|
3542
3545
|
{
|
|
@@ -3544,11 +3547,22 @@ var displayFieldItems = [
|
|
|
3544
3547
|
renderContent: () => __21("In-flx", "elementor"),
|
|
3545
3548
|
label: __21("Inline-flex", "elementor"),
|
|
3546
3549
|
showTooltip: true
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
value: "none",
|
|
3553
|
+
renderContent: () => __21("None", "elementor"),
|
|
3554
|
+
label: __21("None", "elementor"),
|
|
3555
|
+
showTooltip: true
|
|
3547
3556
|
}
|
|
3548
3557
|
];
|
|
3549
3558
|
var DisplayField = () => {
|
|
3550
3559
|
const placeholder = useDisplayPlaceholderValue();
|
|
3551
|
-
|
|
3560
|
+
const isGridActive = isExperimentActive("e_css_grid");
|
|
3561
|
+
const items3 = useMemo8(
|
|
3562
|
+
() => isGridActive ? displayFieldItems : displayFieldItems.filter((item) => item.value !== "grid"),
|
|
3563
|
+
[isGridActive]
|
|
3564
|
+
);
|
|
3565
|
+
return /* @__PURE__ */ React43.createElement(StylesField, { bind: "display", propDisplayName: DISPLAY_LABEL, placeholder }, /* @__PURE__ */ React43.createElement(StylesFieldLayout, { label: DISPLAY_LABEL, direction: "column" }, /* @__PURE__ */ React43.createElement(ToggleControl5, { options: items3, maxItems: 4, fullWidth: true })));
|
|
3552
3566
|
};
|
|
3553
3567
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
3554
3568
|
|
|
@@ -3564,8 +3578,8 @@ var options3 = [
|
|
|
3564
3578
|
value: "row",
|
|
3565
3579
|
label: __22("Row", "elementor"),
|
|
3566
3580
|
renderContent: ({ size }) => {
|
|
3567
|
-
const
|
|
3568
|
-
return /* @__PURE__ */ React44.createElement(
|
|
3581
|
+
const StartIcon7 = withDirection6(ArrowRightIcon);
|
|
3582
|
+
return /* @__PURE__ */ React44.createElement(StartIcon7, { fontSize: size });
|
|
3569
3583
|
},
|
|
3570
3584
|
showTooltip: true
|
|
3571
3585
|
},
|
|
@@ -3579,8 +3593,8 @@ var options3 = [
|
|
|
3579
3593
|
value: "row-reverse",
|
|
3580
3594
|
label: __22("Reversed row", "elementor"),
|
|
3581
3595
|
renderContent: ({ size }) => {
|
|
3582
|
-
const
|
|
3583
|
-
return /* @__PURE__ */ React44.createElement(
|
|
3596
|
+
const EndIcon6 = withDirection6(ArrowLeftIcon);
|
|
3597
|
+
return /* @__PURE__ */ React44.createElement(EndIcon6, { fontSize: size });
|
|
3584
3598
|
},
|
|
3585
3599
|
showTooltip: true
|
|
3586
3600
|
},
|
|
@@ -3597,7 +3611,7 @@ var FlexDirectionField = () => {
|
|
|
3597
3611
|
|
|
3598
3612
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3599
3613
|
import * as React45 from "react";
|
|
3600
|
-
import { useEffect as useEffect4, useMemo as
|
|
3614
|
+
import { useEffect as useEffect4, useMemo as useMemo9, useState as useState7 } from "react";
|
|
3601
3615
|
import {
|
|
3602
3616
|
ControlToggleButtonGroup,
|
|
3603
3617
|
NumberControl as NumberControl2,
|
|
@@ -3649,7 +3663,7 @@ function FlexOrderFieldContent() {
|
|
|
3649
3663
|
});
|
|
3650
3664
|
const { placeholder } = useBoundProp2();
|
|
3651
3665
|
const placeholderValue = placeholder;
|
|
3652
|
-
const currentGroup =
|
|
3666
|
+
const currentGroup = useMemo9(() => getGroupControlValue(order?.value ?? null), [order]);
|
|
3653
3667
|
const [activeGroup, setActiveGroup] = useState7(currentGroup);
|
|
3654
3668
|
const [customLocked, setCustomLocked] = useState7(false);
|
|
3655
3669
|
useEffect4(() => {
|
|
@@ -3717,7 +3731,7 @@ var getGroupControlValue = (order) => {
|
|
|
3717
3731
|
|
|
3718
3732
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3719
3733
|
import * as React46 from "react";
|
|
3720
|
-
import { useEffect as useEffect5, useMemo as
|
|
3734
|
+
import { useEffect as useEffect5, useMemo as useMemo10, useRef as useRef6, useState as useState8 } from "react";
|
|
3721
3735
|
import {
|
|
3722
3736
|
ControlToggleButtonGroup as ControlToggleButtonGroup2,
|
|
3723
3737
|
NumberControl as NumberControl3,
|
|
@@ -3760,7 +3774,7 @@ var FlexSizeFieldContent = () => {
|
|
|
3760
3774
|
});
|
|
3761
3775
|
const { placeholder } = useBoundProp3();
|
|
3762
3776
|
const flexValues = extractFlexValues(value);
|
|
3763
|
-
const currentGroup =
|
|
3777
|
+
const currentGroup = useMemo10(() => getActiveGroup(flexValues), [flexValues]);
|
|
3764
3778
|
const [activeGroup, setActiveGroup] = useState8(currentGroup);
|
|
3765
3779
|
const [customLocked, setCustomLocked] = useState8(false);
|
|
3766
3780
|
useEffect5(() => {
|
|
@@ -3865,118 +3879,289 @@ var GapControlField = () => {
|
|
|
3865
3879
|
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "gap", propDisplayName: GAPS_LABEL }, /* @__PURE__ */ React47.createElement(GapControl, { label: GAPS_LABEL }));
|
|
3866
3880
|
};
|
|
3867
3881
|
|
|
3868
|
-
// src/components/style-sections/layout-section/
|
|
3882
|
+
// src/components/style-sections/layout-section/grid-auto-flow-field.tsx
|
|
3869
3883
|
import * as React48 from "react";
|
|
3884
|
+
import { ControlToggleButtonGroup as ControlToggleButtonGroup3 } from "@elementor/editor-controls";
|
|
3885
|
+
import { ArrowDownSmallIcon as ArrowDownSmallIcon3, ArrowRightIcon as ArrowRightIcon2, LayoutDashboardIcon } from "@elementor/icons";
|
|
3886
|
+
import { Grid as Grid3, ToggleButton, Tooltip, withDirection as withDirection7 } from "@elementor/ui";
|
|
3887
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
3888
|
+
var AUTO_FLOW_LABEL = __26("Auto flow", "elementor");
|
|
3889
|
+
var DENSE_LABEL = __26("Dense", "elementor");
|
|
3890
|
+
var StartIcon4 = withDirection7(ArrowRightIcon2);
|
|
3891
|
+
var directionOptions = [
|
|
3892
|
+
{
|
|
3893
|
+
value: "row",
|
|
3894
|
+
label: __26("Row", "elementor"),
|
|
3895
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(StartIcon4, { fontSize: size }),
|
|
3896
|
+
showTooltip: true
|
|
3897
|
+
},
|
|
3898
|
+
{
|
|
3899
|
+
value: "column",
|
|
3900
|
+
label: __26("Column", "elementor"),
|
|
3901
|
+
renderContent: ({ size }) => /* @__PURE__ */ React48.createElement(ArrowDownSmallIcon3, { fontSize: size }),
|
|
3902
|
+
showTooltip: true
|
|
3903
|
+
}
|
|
3904
|
+
];
|
|
3905
|
+
var parseAutoFlow = (value) => {
|
|
3906
|
+
if (!value) {
|
|
3907
|
+
return { direction: "row", dense: false };
|
|
3908
|
+
}
|
|
3909
|
+
const dense = value.includes("dense");
|
|
3910
|
+
const direction = value.replace(/\s*dense\s*/, "").trim();
|
|
3911
|
+
return { direction: direction || "row", dense };
|
|
3912
|
+
};
|
|
3913
|
+
var composeAutoFlow = (direction, dense) => {
|
|
3914
|
+
return dense ? `${direction} dense` : direction;
|
|
3915
|
+
};
|
|
3916
|
+
var GridAutoFlowFieldContent = () => {
|
|
3917
|
+
const { value, setValue } = useStylesField("grid-auto-flow", {
|
|
3918
|
+
history: { propDisplayName: AUTO_FLOW_LABEL }
|
|
3919
|
+
});
|
|
3920
|
+
const { direction, dense } = parseAutoFlow(value?.value ?? null);
|
|
3921
|
+
const handleDirectionChange = (newDirection) => {
|
|
3922
|
+
if (!newDirection) {
|
|
3923
|
+
return;
|
|
3924
|
+
}
|
|
3925
|
+
setValue({ $$type: "string", value: composeAutoFlow(newDirection, dense) });
|
|
3926
|
+
};
|
|
3927
|
+
const handleDenseToggle = () => {
|
|
3928
|
+
setValue({ $$type: "string", value: composeAutoFlow(direction, !dense) });
|
|
3929
|
+
};
|
|
3930
|
+
return /* @__PURE__ */ React48.createElement(StylesFieldLayout, { label: AUTO_FLOW_LABEL }, /* @__PURE__ */ React48.createElement(Grid3, { container: true, gap: 1, flexWrap: "nowrap", alignItems: "center", justifyContent: "flex-end" }, /* @__PURE__ */ React48.createElement(Grid3, { item: true, sx: { width: 64, maxWidth: "100%" } }, /* @__PURE__ */ React48.createElement(
|
|
3931
|
+
ControlToggleButtonGroup3,
|
|
3932
|
+
{
|
|
3933
|
+
items: directionOptions,
|
|
3934
|
+
value: direction,
|
|
3935
|
+
onChange: handleDirectionChange,
|
|
3936
|
+
exclusive: true,
|
|
3937
|
+
fullWidth: true
|
|
3938
|
+
}
|
|
3939
|
+
)), /* @__PURE__ */ React48.createElement(Grid3, { item: true }, /* @__PURE__ */ React48.createElement(Tooltip, { title: DENSE_LABEL }, /* @__PURE__ */ React48.createElement(
|
|
3940
|
+
ToggleButton,
|
|
3941
|
+
{
|
|
3942
|
+
value: "dense",
|
|
3943
|
+
selected: dense,
|
|
3944
|
+
onChange: handleDenseToggle,
|
|
3945
|
+
size: "tiny",
|
|
3946
|
+
"aria-label": DENSE_LABEL
|
|
3947
|
+
},
|
|
3948
|
+
/* @__PURE__ */ React48.createElement(LayoutDashboardIcon, { fontSize: "tiny" })
|
|
3949
|
+
)))));
|
|
3950
|
+
};
|
|
3951
|
+
var GridAutoFlowField = () => /* @__PURE__ */ React48.createElement(StylesField, { bind: "grid-auto-flow", propDisplayName: AUTO_FLOW_LABEL }, /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(GridAutoFlowFieldContent, null)));
|
|
3952
|
+
|
|
3953
|
+
// src/components/style-sections/layout-section/grid-justify-items-field.tsx
|
|
3954
|
+
import * as React49 from "react";
|
|
3870
3955
|
import { ToggleControl as ToggleControl7 } from "@elementor/editor-controls";
|
|
3956
|
+
import {
|
|
3957
|
+
LayoutAlignCenterIcon as CenterIcon4,
|
|
3958
|
+
LayoutAlignLeftIcon as LayoutAlignLeftIcon3,
|
|
3959
|
+
LayoutAlignRightIcon as LayoutAlignRightIcon3,
|
|
3960
|
+
LayoutDistributeVerticalIcon as StretchIcon
|
|
3961
|
+
} from "@elementor/icons";
|
|
3962
|
+
import { withDirection as withDirection8 } from "@elementor/ui";
|
|
3963
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
3964
|
+
var JUSTIFY_ITEMS_LABEL = __27("Justify items", "elementor");
|
|
3965
|
+
var StartIcon5 = withDirection8(LayoutAlignLeftIcon3);
|
|
3966
|
+
var EndIcon4 = withDirection8(LayoutAlignRightIcon3);
|
|
3967
|
+
var options4 = [
|
|
3968
|
+
{
|
|
3969
|
+
value: "start",
|
|
3970
|
+
label: __27("Start", "elementor"),
|
|
3971
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(StartIcon5, { fontSize: size }),
|
|
3972
|
+
showTooltip: true
|
|
3973
|
+
},
|
|
3974
|
+
{
|
|
3975
|
+
value: "center",
|
|
3976
|
+
label: __27("Center", "elementor"),
|
|
3977
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(CenterIcon4, { fontSize: size }),
|
|
3978
|
+
showTooltip: true
|
|
3979
|
+
},
|
|
3980
|
+
{
|
|
3981
|
+
value: "end",
|
|
3982
|
+
label: __27("End", "elementor"),
|
|
3983
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(EndIcon4, { fontSize: size }),
|
|
3984
|
+
showTooltip: true
|
|
3985
|
+
},
|
|
3986
|
+
{
|
|
3987
|
+
value: "stretch",
|
|
3988
|
+
label: __27("Stretch", "elementor"),
|
|
3989
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(StretchIcon, { fontSize: size }),
|
|
3990
|
+
showTooltip: true
|
|
3991
|
+
}
|
|
3992
|
+
];
|
|
3993
|
+
var GridJustifyItemsField = () => /* @__PURE__ */ React49.createElement(StylesField, { bind: "justify-items", propDisplayName: JUSTIFY_ITEMS_LABEL }, /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(StylesFieldLayout, { label: JUSTIFY_ITEMS_LABEL }, /* @__PURE__ */ React49.createElement(ToggleControl7, { options: options4 }))));
|
|
3994
|
+
|
|
3995
|
+
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
3996
|
+
import * as React50 from "react";
|
|
3997
|
+
import { useRef as useRef7 } from "react";
|
|
3998
|
+
import { SizeComponent } from "@elementor/editor-controls";
|
|
3999
|
+
import { Grid as Grid4 } from "@elementor/ui";
|
|
4000
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
4001
|
+
var FR = "fr";
|
|
4002
|
+
var CUSTOM2 = "custom";
|
|
4003
|
+
var UNITS = [FR, CUSTOM2];
|
|
4004
|
+
var REPEAT_FR_PATTERN = /^repeat\(\s*(\d+)\s*,\s*1fr\s*\)$/;
|
|
4005
|
+
var cssToTrackValue = (css) => {
|
|
4006
|
+
if (!css) {
|
|
4007
|
+
return null;
|
|
4008
|
+
}
|
|
4009
|
+
const match = css.match(REPEAT_FR_PATTERN);
|
|
4010
|
+
if (match) {
|
|
4011
|
+
return { size: parseInt(match[1], 10), unit: FR };
|
|
4012
|
+
}
|
|
4013
|
+
return { size: css, unit: CUSTOM2 };
|
|
4014
|
+
};
|
|
4015
|
+
var trackValueToCss = (trackValue) => {
|
|
4016
|
+
if (!trackValue || trackValue.size === "" || trackValue.size === null) {
|
|
4017
|
+
return null;
|
|
4018
|
+
}
|
|
4019
|
+
if (trackValue.unit === FR) {
|
|
4020
|
+
return `repeat(${trackValue.size}, 1fr)`;
|
|
4021
|
+
}
|
|
4022
|
+
return String(trackValue.size);
|
|
4023
|
+
};
|
|
4024
|
+
var GridTrackField = ({ cssProp, label }) => /* @__PURE__ */ React50.createElement(StylesField, { bind: cssProp, propDisplayName: label }, /* @__PURE__ */ React50.createElement(GridTrackFieldContent, { cssProp, label }));
|
|
4025
|
+
var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
4026
|
+
const { value, setValue } = useStylesField(cssProp, {
|
|
4027
|
+
history: { propDisplayName: label }
|
|
4028
|
+
});
|
|
4029
|
+
const anchorRef = useRef7(null);
|
|
4030
|
+
const trackValue = cssToTrackValue(value?.value ?? null);
|
|
4031
|
+
const handleChange = (newValue) => {
|
|
4032
|
+
const css = trackValueToCss(newValue);
|
|
4033
|
+
setValue(css ? { $$type: "string", value: css } : null);
|
|
4034
|
+
};
|
|
4035
|
+
return /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React50.createElement("div", { ref: anchorRef }, /* @__PURE__ */ React50.createElement(
|
|
4036
|
+
SizeComponent,
|
|
4037
|
+
{
|
|
4038
|
+
units: UNITS,
|
|
4039
|
+
value: trackValue ?? { size: NaN, unit: FR },
|
|
4040
|
+
defaultUnit: FR,
|
|
4041
|
+
setValue: handleChange,
|
|
4042
|
+
onBlur: () => {
|
|
4043
|
+
},
|
|
4044
|
+
min: 1,
|
|
4045
|
+
anchorRef
|
|
4046
|
+
}
|
|
4047
|
+
)));
|
|
4048
|
+
};
|
|
4049
|
+
var GridSizeFields = () => /* @__PURE__ */ React50.createElement(Grid4, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React50.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(GridTrackField, { cssProp: "grid-template-columns", label: __28("Columns", "elementor") })), /* @__PURE__ */ React50.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React50.createElement(GridTrackField, { cssProp: "grid-template-rows", label: __28("Rows", "elementor") })));
|
|
4050
|
+
|
|
4051
|
+
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
4052
|
+
import * as React51 from "react";
|
|
4053
|
+
import { ToggleControl as ToggleControl8 } from "@elementor/editor-controls";
|
|
3871
4054
|
import {
|
|
3872
4055
|
JustifyBottomIcon as JustifyBottomIcon2,
|
|
3873
|
-
JustifyCenterIcon as
|
|
4056
|
+
JustifyCenterIcon as CenterIcon5,
|
|
3874
4057
|
JustifyDistributeVerticalIcon as EvenlyIcon2,
|
|
3875
4058
|
JustifySpaceAroundVerticalIcon as AroundIcon2,
|
|
3876
4059
|
JustifySpaceBetweenVerticalIcon as BetweenIcon2,
|
|
3877
4060
|
JustifyTopIcon as JustifyTopIcon2
|
|
3878
4061
|
} from "@elementor/icons";
|
|
3879
|
-
import { withDirection as
|
|
3880
|
-
import { __ as
|
|
3881
|
-
var JUSTIFY_CONTENT_LABEL =
|
|
3882
|
-
var
|
|
3883
|
-
var
|
|
4062
|
+
import { withDirection as withDirection9 } from "@elementor/ui";
|
|
4063
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
4064
|
+
var JUSTIFY_CONTENT_LABEL = __29("Justify content", "elementor");
|
|
4065
|
+
var StartIcon6 = withDirection9(JustifyTopIcon2);
|
|
4066
|
+
var EndIcon5 = withDirection9(JustifyBottomIcon2);
|
|
3884
4067
|
var iconProps4 = {
|
|
3885
4068
|
isClockwise: true,
|
|
3886
4069
|
offset: -90
|
|
3887
4070
|
};
|
|
3888
|
-
var
|
|
4071
|
+
var options5 = [
|
|
3889
4072
|
{
|
|
3890
4073
|
value: "flex-start",
|
|
3891
|
-
label:
|
|
3892
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4074
|
+
label: __29("Start", "elementor"),
|
|
4075
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: StartIcon6, size, ...iconProps4 }),
|
|
3893
4076
|
showTooltip: true
|
|
3894
4077
|
},
|
|
3895
4078
|
{
|
|
3896
4079
|
value: "center",
|
|
3897
|
-
label:
|
|
3898
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4080
|
+
label: __29("Center", "elementor"),
|
|
4081
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: CenterIcon5, size, ...iconProps4 }),
|
|
3899
4082
|
showTooltip: true
|
|
3900
4083
|
},
|
|
3901
4084
|
{
|
|
3902
4085
|
value: "flex-end",
|
|
3903
|
-
label:
|
|
3904
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4086
|
+
label: __29("End", "elementor"),
|
|
4087
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: EndIcon5, size, ...iconProps4 }),
|
|
3905
4088
|
showTooltip: true
|
|
3906
4089
|
},
|
|
3907
4090
|
{
|
|
3908
4091
|
value: "space-between",
|
|
3909
|
-
label:
|
|
3910
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4092
|
+
label: __29("Space between", "elementor"),
|
|
4093
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: BetweenIcon2, size, ...iconProps4 }),
|
|
3911
4094
|
showTooltip: true
|
|
3912
4095
|
},
|
|
3913
4096
|
{
|
|
3914
4097
|
value: "space-around",
|
|
3915
|
-
label:
|
|
3916
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4098
|
+
label: __29("Space around", "elementor"),
|
|
4099
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: AroundIcon2, size, ...iconProps4 }),
|
|
3917
4100
|
showTooltip: true
|
|
3918
4101
|
},
|
|
3919
4102
|
{
|
|
3920
4103
|
value: "space-evenly",
|
|
3921
|
-
label:
|
|
3922
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4104
|
+
label: __29("Space evenly", "elementor"),
|
|
4105
|
+
renderContent: ({ size }) => /* @__PURE__ */ React51.createElement(RotatedIcon, { icon: EvenlyIcon2, size, ...iconProps4 }),
|
|
3923
4106
|
showTooltip: true
|
|
3924
4107
|
}
|
|
3925
4108
|
];
|
|
3926
|
-
var JustifyContentField = () => /* @__PURE__ */
|
|
4109
|
+
var JustifyContentField = () => /* @__PURE__ */ React51.createElement(StylesField, { bind: "justify-content", propDisplayName: JUSTIFY_CONTENT_LABEL }, /* @__PURE__ */ React51.createElement(UiProviders, null, /* @__PURE__ */ React51.createElement(StylesFieldLayout, { label: JUSTIFY_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React51.createElement(ToggleControl8, { options: options5, fullWidth: true }))));
|
|
3927
4110
|
|
|
3928
4111
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3929
|
-
import * as
|
|
3930
|
-
import { ToggleControl as
|
|
3931
|
-
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as
|
|
3932
|
-
import { __ as
|
|
3933
|
-
var FLEX_WRAP_LABEL =
|
|
3934
|
-
var
|
|
4112
|
+
import * as React52 from "react";
|
|
4113
|
+
import { ToggleControl as ToggleControl9 } from "@elementor/editor-controls";
|
|
4114
|
+
import { ArrowBackIcon, ArrowForwardIcon, ArrowRightIcon as ArrowRightIcon3 } from "@elementor/icons";
|
|
4115
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
4116
|
+
var FLEX_WRAP_LABEL = __30("Wrap", "elementor");
|
|
4117
|
+
var options6 = [
|
|
3935
4118
|
{
|
|
3936
4119
|
value: "nowrap",
|
|
3937
|
-
label:
|
|
3938
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4120
|
+
label: __30("No wrap", "elementor"),
|
|
4121
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(ArrowRightIcon3, { fontSize: size }),
|
|
3939
4122
|
showTooltip: true
|
|
3940
4123
|
},
|
|
3941
4124
|
{
|
|
3942
4125
|
value: "wrap",
|
|
3943
|
-
label:
|
|
3944
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4126
|
+
label: __30("Wrap", "elementor"),
|
|
4127
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(ArrowBackIcon, { fontSize: size }),
|
|
3945
4128
|
showTooltip: true
|
|
3946
4129
|
},
|
|
3947
4130
|
{
|
|
3948
4131
|
value: "wrap-reverse",
|
|
3949
|
-
label:
|
|
3950
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4132
|
+
label: __30("Reversed wrap", "elementor"),
|
|
4133
|
+
renderContent: ({ size }) => /* @__PURE__ */ React52.createElement(ArrowForwardIcon, { fontSize: size }),
|
|
3951
4134
|
showTooltip: true
|
|
3952
4135
|
}
|
|
3953
4136
|
];
|
|
3954
4137
|
var WrapField = () => {
|
|
3955
|
-
return /* @__PURE__ */
|
|
4138
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "flex-wrap", propDisplayName: FLEX_WRAP_LABEL }, /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: FLEX_WRAP_LABEL }, /* @__PURE__ */ React52.createElement(ToggleControl9, { options: options6 }))));
|
|
3956
4139
|
};
|
|
3957
4140
|
|
|
3958
4141
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3959
|
-
var DISPLAY_LABEL2 =
|
|
3960
|
-
var FLEX_WRAP_LABEL2 =
|
|
4142
|
+
var DISPLAY_LABEL2 = __31("Display", "elementor");
|
|
4143
|
+
var FLEX_WRAP_LABEL2 = __31("Flex wrap", "elementor");
|
|
3961
4144
|
var LayoutSection = () => {
|
|
3962
4145
|
const { value: display } = useStylesField("display", {
|
|
3963
4146
|
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
3964
4147
|
});
|
|
3965
4148
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
3966
4149
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
4150
|
+
const isDisplayGrid = "grid" === (display?.value ?? displayPlaceholder?.value);
|
|
3967
4151
|
const { element } = useElement();
|
|
3968
4152
|
const parent = useParentElement(element.id);
|
|
3969
4153
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3970
4154
|
const parentStyleDirection = parentStyle?.flexDirection ?? "row";
|
|
3971
|
-
return /* @__PURE__ */
|
|
4155
|
+
return /* @__PURE__ */ React53.createElement(SectionContent, null, /* @__PURE__ */ React53.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React53.createElement(FlexFields, null), isExperimentActive2("e_css_grid") && isDisplayGrid && /* @__PURE__ */ React53.createElement(GridFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React53.createElement(FlexChildFields, { parentStyleDirection }));
|
|
3972
4156
|
};
|
|
3973
4157
|
var FlexFields = () => {
|
|
3974
4158
|
const { value: flexWrap } = useStylesField("flex-wrap", {
|
|
3975
4159
|
history: { propDisplayName: FLEX_WRAP_LABEL2 }
|
|
3976
4160
|
});
|
|
3977
|
-
return /* @__PURE__ */
|
|
4161
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(FlexDirectionField, null), /* @__PURE__ */ React53.createElement(JustifyContentField, null), /* @__PURE__ */ React53.createElement(AlignItemsField, null), /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(GapControlField, null), /* @__PURE__ */ React53.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React53.createElement(AlignContentField, null));
|
|
3978
4162
|
};
|
|
3979
|
-
var
|
|
4163
|
+
var GridFields = () => /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(GridSizeFields, null), /* @__PURE__ */ React53.createElement(GridAutoFlowField, null), /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(GapControlField, null), /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(GridJustifyItemsField, null), /* @__PURE__ */ React53.createElement(AlignItemsField, null));
|
|
4164
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement(PanelDivider, null), /* @__PURE__ */ React53.createElement(ControlFormLabel2, null, __31("Flex child", "elementor")), /* @__PURE__ */ React53.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React53.createElement(FlexOrderField, null), /* @__PURE__ */ React53.createElement(FlexSizeField, null));
|
|
3980
4165
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3981
4166
|
const value = display?.value ?? local?.value;
|
|
3982
4167
|
if (!value) {
|
|
@@ -3986,39 +4171,39 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3986
4171
|
};
|
|
3987
4172
|
|
|
3988
4173
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3989
|
-
import * as
|
|
3990
|
-
import { useCallback as useCallback2, useEffect as useEffect6, useRef as
|
|
4174
|
+
import * as React58 from "react";
|
|
4175
|
+
import { useCallback as useCallback2, useEffect as useEffect6, useRef as useRef10 } from "react";
|
|
3991
4176
|
import { useSessionStorage as useSessionStorage4 } from "@elementor/session";
|
|
3992
|
-
import { __ as
|
|
4177
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
3993
4178
|
|
|
3994
4179
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3995
|
-
import * as
|
|
3996
|
-
import { useRef as
|
|
4180
|
+
import * as React54 from "react";
|
|
4181
|
+
import { useRef as useRef8 } from "react";
|
|
3997
4182
|
import { SizeControl as SizeControl4 } from "@elementor/editor-controls";
|
|
3998
4183
|
import { SideBottomIcon as SideBottomIcon2, SideLeftIcon as SideLeftIcon2, SideRightIcon as SideRightIcon2, SideTopIcon as SideTopIcon2 } from "@elementor/icons";
|
|
3999
|
-
import { Grid as
|
|
4000
|
-
import { __ as
|
|
4001
|
-
var InlineStartIcon2 =
|
|
4002
|
-
var InlineEndIcon2 =
|
|
4184
|
+
import { Grid as Grid5, Stack as Stack8, withDirection as withDirection10 } from "@elementor/ui";
|
|
4185
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
4186
|
+
var InlineStartIcon2 = withDirection10(SideLeftIcon2);
|
|
4187
|
+
var InlineEndIcon2 = withDirection10(SideRightIcon2);
|
|
4003
4188
|
var sideIcons = {
|
|
4004
|
-
"inset-block-start": /* @__PURE__ */
|
|
4005
|
-
"inset-block-end": /* @__PURE__ */
|
|
4006
|
-
"inset-inline-start": /* @__PURE__ */
|
|
4007
|
-
"inset-inline-end": /* @__PURE__ */
|
|
4189
|
+
"inset-block-start": /* @__PURE__ */ React54.createElement(SideTopIcon2, { fontSize: "tiny" }),
|
|
4190
|
+
"inset-block-end": /* @__PURE__ */ React54.createElement(SideBottomIcon2, { fontSize: "tiny" }),
|
|
4191
|
+
"inset-inline-start": /* @__PURE__ */ React54.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
4192
|
+
"inset-inline-end": /* @__PURE__ */ React54.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
4008
4193
|
};
|
|
4009
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ?
|
|
4010
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ?
|
|
4194
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? __32("Right", "elementor") : __32("Left", "elementor");
|
|
4195
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? __32("Left", "elementor") : __32("Right", "elementor");
|
|
4011
4196
|
var DimensionsField = () => {
|
|
4012
4197
|
const { isSiteRtl } = useDirection();
|
|
4013
|
-
const rowRefs = [
|
|
4014
|
-
return /* @__PURE__ */
|
|
4198
|
+
const rowRefs = [useRef8(null), useRef8(null)];
|
|
4199
|
+
return /* @__PURE__ */ React54.createElement(UiProviders, null, /* @__PURE__ */ React54.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-start", label: __32("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React54.createElement(
|
|
4015
4200
|
DimensionField,
|
|
4016
4201
|
{
|
|
4017
4202
|
side: "inset-inline-end",
|
|
4018
4203
|
label: getInlineEndLabel(isSiteRtl),
|
|
4019
4204
|
rowRef: rowRefs[0]
|
|
4020
4205
|
}
|
|
4021
|
-
)), /* @__PURE__ */
|
|
4206
|
+
)), /* @__PURE__ */ React54.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React54.createElement(DimensionField, { side: "inset-block-end", label: __32("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React54.createElement(
|
|
4022
4207
|
DimensionField,
|
|
4023
4208
|
{
|
|
4024
4209
|
side: "inset-inline-start",
|
|
@@ -4031,7 +4216,7 @@ var DimensionField = ({
|
|
|
4031
4216
|
side,
|
|
4032
4217
|
label,
|
|
4033
4218
|
rowRef
|
|
4034
|
-
}) => /* @__PURE__ */
|
|
4219
|
+
}) => /* @__PURE__ */ React54.createElement(StylesField, { bind: side, propDisplayName: label }, /* @__PURE__ */ React54.createElement(Grid5, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React54.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, label)), /* @__PURE__ */ React54.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React54.createElement(
|
|
4035
4220
|
SizeControl4,
|
|
4036
4221
|
{
|
|
4037
4222
|
startIcon: sideIcons[side],
|
|
@@ -4042,46 +4227,46 @@ var DimensionField = ({
|
|
|
4042
4227
|
))));
|
|
4043
4228
|
|
|
4044
4229
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
4045
|
-
import * as
|
|
4046
|
-
import { useRef as
|
|
4230
|
+
import * as React55 from "react";
|
|
4231
|
+
import { useRef as useRef9 } from "react";
|
|
4047
4232
|
import { SizeControl as SizeControl5 } from "@elementor/editor-controls";
|
|
4048
|
-
import { __ as
|
|
4049
|
-
var OFFSET_LABEL =
|
|
4050
|
-
var
|
|
4233
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
4234
|
+
var OFFSET_LABEL = __33("Anchor offset", "elementor");
|
|
4235
|
+
var UNITS2 = ["px", "em", "rem", "vw", "vh"];
|
|
4051
4236
|
var OffsetField = () => {
|
|
4052
|
-
const rowRef =
|
|
4053
|
-
return /* @__PURE__ */
|
|
4237
|
+
const rowRef = useRef9(null);
|
|
4238
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React55.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React55.createElement(SizeControl5, { units: UNITS2, anchorRef: rowRef })));
|
|
4054
4239
|
};
|
|
4055
4240
|
|
|
4056
4241
|
// src/components/style-sections/position-section/position-field.tsx
|
|
4057
|
-
import * as
|
|
4242
|
+
import * as React56 from "react";
|
|
4058
4243
|
import { SelectControl as SelectControl3 } from "@elementor/editor-controls";
|
|
4059
|
-
import { __ as
|
|
4060
|
-
var POSITION_LABEL =
|
|
4244
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
4245
|
+
var POSITION_LABEL = __34("Position", "elementor");
|
|
4061
4246
|
var positionOptions = [
|
|
4062
|
-
{ label:
|
|
4063
|
-
{ label:
|
|
4064
|
-
{ label:
|
|
4065
|
-
{ label:
|
|
4066
|
-
{ label:
|
|
4247
|
+
{ label: __34("Static", "elementor"), value: "static" },
|
|
4248
|
+
{ label: __34("Relative", "elementor"), value: "relative" },
|
|
4249
|
+
{ label: __34("Absolute", "elementor"), value: "absolute" },
|
|
4250
|
+
{ label: __34("Fixed", "elementor"), value: "fixed" },
|
|
4251
|
+
{ label: __34("Sticky", "elementor"), value: "sticky" }
|
|
4067
4252
|
];
|
|
4068
4253
|
var PositionField = ({ onChange }) => {
|
|
4069
|
-
return /* @__PURE__ */
|
|
4254
|
+
return /* @__PURE__ */ React56.createElement(StylesField, { bind: "position", propDisplayName: POSITION_LABEL }, /* @__PURE__ */ React56.createElement(StylesFieldLayout, { label: POSITION_LABEL }, /* @__PURE__ */ React56.createElement(SelectControl3, { options: positionOptions, onChange })));
|
|
4070
4255
|
};
|
|
4071
4256
|
|
|
4072
4257
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
4073
|
-
import * as
|
|
4258
|
+
import * as React57 from "react";
|
|
4074
4259
|
import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
|
|
4075
|
-
import { __ as
|
|
4076
|
-
var Z_INDEX_LABEL =
|
|
4260
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
4261
|
+
var Z_INDEX_LABEL = __35("Z-index", "elementor");
|
|
4077
4262
|
var ZIndexField = () => {
|
|
4078
|
-
return /* @__PURE__ */
|
|
4263
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React57.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React57.createElement(NumberControl4, null)));
|
|
4079
4264
|
};
|
|
4080
4265
|
|
|
4081
4266
|
// src/components/style-sections/position-section/position-section.tsx
|
|
4082
4267
|
var POSITION_STATIC = "static";
|
|
4083
|
-
var POSITION_LABEL2 =
|
|
4084
|
-
var DIMENSIONS_LABEL =
|
|
4268
|
+
var POSITION_LABEL2 = __36("Position", "elementor");
|
|
4269
|
+
var DIMENSIONS_LABEL = __36("Dimensions", "elementor");
|
|
4085
4270
|
var POSITION_DEPENDENT_PROP_NAMES = [
|
|
4086
4271
|
"inset-block-start",
|
|
4087
4272
|
"inset-block-end",
|
|
@@ -4116,7 +4301,7 @@ var PositionSection = () => {
|
|
|
4116
4301
|
setPositionDependentValues(CLEARED_POSITION_DEPENDENT_VALUES, meta);
|
|
4117
4302
|
}
|
|
4118
4303
|
}, [positionDependentValues, updateDimensionsHistory, setPositionDependentValues]);
|
|
4119
|
-
const clearPositionDependentPropsRef =
|
|
4304
|
+
const clearPositionDependentPropsRef = useRef10(clearPositionDependentProps);
|
|
4120
4305
|
clearPositionDependentPropsRef.current = clearPositionDependentProps;
|
|
4121
4306
|
useEffect6(() => {
|
|
4122
4307
|
if (positionValue?.value === POSITION_STATIC || positionValue === null) {
|
|
@@ -4138,7 +4323,7 @@ var PositionSection = () => {
|
|
|
4138
4323
|
}
|
|
4139
4324
|
};
|
|
4140
4325
|
const isNotStatic = positionValue && positionValue?.value !== POSITION_STATIC;
|
|
4141
|
-
return /* @__PURE__ */
|
|
4326
|
+
return /* @__PURE__ */ React58.createElement(SectionContent, null, /* @__PURE__ */ React58.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(DimensionsField, null), /* @__PURE__ */ React58.createElement(ZIndexField, null)) : null, /* @__PURE__ */ React58.createElement(PanelDivider, null), /* @__PURE__ */ React58.createElement(OffsetField, null));
|
|
4142
4327
|
};
|
|
4143
4328
|
var usePersistDimensions = () => {
|
|
4144
4329
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -4148,26 +4333,26 @@ var usePersistDimensions = () => {
|
|
|
4148
4333
|
};
|
|
4149
4334
|
|
|
4150
4335
|
// src/components/style-sections/size-section/size-section.tsx
|
|
4151
|
-
import * as
|
|
4152
|
-
import { useRef as
|
|
4336
|
+
import * as React63 from "react";
|
|
4337
|
+
import { useRef as useRef11 } from "react";
|
|
4153
4338
|
import { AspectRatioControl, PositionControl, SizeControl as SizeControl6 } from "@elementor/editor-controls";
|
|
4154
|
-
import { Grid as
|
|
4155
|
-
import { __ as
|
|
4339
|
+
import { Grid as Grid6, Stack as Stack10 } from "@elementor/ui";
|
|
4340
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
4156
4341
|
|
|
4157
4342
|
// src/components/style-tab-collapsible-content.tsx
|
|
4158
|
-
import * as
|
|
4343
|
+
import * as React60 from "react";
|
|
4159
4344
|
import { CollapsibleContent } from "@elementor/editor-ui";
|
|
4160
4345
|
|
|
4161
4346
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
4162
|
-
import * as
|
|
4347
|
+
import * as React59 from "react";
|
|
4163
4348
|
import { isElementsStylesProvider as isElementsStylesProvider6 } from "@elementor/editor-styles-repository";
|
|
4164
|
-
import { Stack as Stack9, Tooltip } from "@elementor/ui";
|
|
4165
|
-
import { __ as
|
|
4349
|
+
import { Stack as Stack9, Tooltip as Tooltip2 } from "@elementor/ui";
|
|
4350
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
4166
4351
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
4167
4352
|
const { id, meta, provider } = useStyle();
|
|
4168
4353
|
const snapshot = useStylesInheritanceSnapshot();
|
|
4169
4354
|
if (fields.includes("custom_css")) {
|
|
4170
|
-
return /* @__PURE__ */
|
|
4355
|
+
return /* @__PURE__ */ React59.createElement(CustomCssIndicator, null);
|
|
4171
4356
|
}
|
|
4172
4357
|
const snapshotFields = Object.fromEntries(
|
|
4173
4358
|
Object.entries(snapshot ?? {}).filter(([key]) => fields.includes(key))
|
|
@@ -4176,9 +4361,9 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
4176
4361
|
if (!hasValues && !hasOverrides) {
|
|
4177
4362
|
return null;
|
|
4178
4363
|
}
|
|
4179
|
-
const hasValueLabel =
|
|
4180
|
-
const hasOverridesLabel =
|
|
4181
|
-
return /* @__PURE__ */
|
|
4364
|
+
const hasValueLabel = __37("Has effective styles", "elementor");
|
|
4365
|
+
const hasOverridesLabel = __37("Has overridden styles", "elementor");
|
|
4366
|
+
return /* @__PURE__ */ React59.createElement(Tooltip2, { title: __37("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React59.createElement(Stack9, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React59.createElement(
|
|
4182
4367
|
StyleIndicator,
|
|
4183
4368
|
{
|
|
4184
4369
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
@@ -4186,7 +4371,7 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
4186
4371
|
role: "listitem",
|
|
4187
4372
|
"aria-label": hasValueLabel
|
|
4188
4373
|
}
|
|
4189
|
-
), hasOverrides && /* @__PURE__ */
|
|
4374
|
+
), hasOverrides && /* @__PURE__ */ React59.createElement(
|
|
4190
4375
|
StyleIndicator,
|
|
4191
4376
|
{
|
|
4192
4377
|
isOverridden: true,
|
|
@@ -4226,59 +4411,59 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
4226
4411
|
|
|
4227
4412
|
// src/components/style-tab-collapsible-content.tsx
|
|
4228
4413
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
4229
|
-
return /* @__PURE__ */
|
|
4414
|
+
return /* @__PURE__ */ React60.createElement(CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
4230
4415
|
};
|
|
4231
4416
|
function getStylesInheritanceIndicators(fields) {
|
|
4232
4417
|
if (fields.length === 0) {
|
|
4233
4418
|
return null;
|
|
4234
4419
|
}
|
|
4235
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
4420
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React60.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
4236
4421
|
}
|
|
4237
4422
|
|
|
4238
4423
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
4239
|
-
import * as
|
|
4424
|
+
import * as React61 from "react";
|
|
4240
4425
|
import { SelectControl as SelectControl4 } from "@elementor/editor-controls";
|
|
4241
|
-
import { __ as
|
|
4242
|
-
var OBJECT_FIT_LABEL =
|
|
4426
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
4427
|
+
var OBJECT_FIT_LABEL = __38("Object fit", "elementor");
|
|
4243
4428
|
var positionOptions2 = [
|
|
4244
|
-
{ label:
|
|
4245
|
-
{ label:
|
|
4246
|
-
{ label:
|
|
4247
|
-
{ label:
|
|
4248
|
-
{ label:
|
|
4429
|
+
{ label: __38("Fill", "elementor"), value: "fill" },
|
|
4430
|
+
{ label: __38("Cover", "elementor"), value: "cover" },
|
|
4431
|
+
{ label: __38("Contain", "elementor"), value: "contain" },
|
|
4432
|
+
{ label: __38("None", "elementor"), value: "none" },
|
|
4433
|
+
{ label: __38("Scale down", "elementor"), value: "scale-down" }
|
|
4249
4434
|
];
|
|
4250
4435
|
var ObjectFitField = () => {
|
|
4251
|
-
return /* @__PURE__ */
|
|
4436
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "object-fit", propDisplayName: OBJECT_FIT_LABEL }, /* @__PURE__ */ React61.createElement(StylesFieldLayout, { label: OBJECT_FIT_LABEL }, /* @__PURE__ */ React61.createElement(SelectControl4, { options: positionOptions2 })));
|
|
4252
4437
|
};
|
|
4253
4438
|
|
|
4254
4439
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
4255
|
-
import * as
|
|
4256
|
-
import { ToggleControl as
|
|
4440
|
+
import * as React62 from "react";
|
|
4441
|
+
import { ToggleControl as ToggleControl10 } from "@elementor/editor-controls";
|
|
4257
4442
|
import { EyeIcon, EyeOffIcon, LetterAIcon } from "@elementor/icons";
|
|
4258
|
-
import { __ as
|
|
4259
|
-
var OVERFLOW_LABEL =
|
|
4260
|
-
var
|
|
4443
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
4444
|
+
var OVERFLOW_LABEL = __39("Overflow", "elementor");
|
|
4445
|
+
var options7 = [
|
|
4261
4446
|
{
|
|
4262
4447
|
value: "visible",
|
|
4263
|
-
label:
|
|
4264
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4448
|
+
label: __39("Visible", "elementor"),
|
|
4449
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(EyeIcon, { fontSize: size }),
|
|
4265
4450
|
showTooltip: true
|
|
4266
4451
|
},
|
|
4267
4452
|
{
|
|
4268
4453
|
value: "hidden",
|
|
4269
|
-
label:
|
|
4270
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4454
|
+
label: __39("Hidden", "elementor"),
|
|
4455
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(EyeOffIcon, { fontSize: size }),
|
|
4271
4456
|
showTooltip: true
|
|
4272
4457
|
},
|
|
4273
4458
|
{
|
|
4274
4459
|
value: "auto",
|
|
4275
|
-
label:
|
|
4276
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4460
|
+
label: __39("Auto", "elementor"),
|
|
4461
|
+
renderContent: ({ size }) => /* @__PURE__ */ React62.createElement(LetterAIcon, { fontSize: size }),
|
|
4277
4462
|
showTooltip: true
|
|
4278
4463
|
}
|
|
4279
4464
|
];
|
|
4280
4465
|
var OverflowField = () => {
|
|
4281
|
-
return /* @__PURE__ */
|
|
4466
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "overflow", propDisplayName: OVERFLOW_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: OVERFLOW_LABEL }, /* @__PURE__ */ React62.createElement(ToggleControl10, { options: options7 })));
|
|
4282
4467
|
};
|
|
4283
4468
|
|
|
4284
4469
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -4286,97 +4471,97 @@ var CssSizeProps = [
|
|
|
4286
4471
|
[
|
|
4287
4472
|
{
|
|
4288
4473
|
bind: "width",
|
|
4289
|
-
label:
|
|
4474
|
+
label: __40("Width", "elementor")
|
|
4290
4475
|
},
|
|
4291
4476
|
{
|
|
4292
4477
|
bind: "height",
|
|
4293
|
-
label:
|
|
4478
|
+
label: __40("Height", "elementor")
|
|
4294
4479
|
}
|
|
4295
4480
|
],
|
|
4296
4481
|
[
|
|
4297
4482
|
{
|
|
4298
4483
|
bind: "min-width",
|
|
4299
|
-
label:
|
|
4484
|
+
label: __40("Min width", "elementor")
|
|
4300
4485
|
},
|
|
4301
4486
|
{
|
|
4302
4487
|
bind: "min-height",
|
|
4303
|
-
label:
|
|
4488
|
+
label: __40("Min height", "elementor")
|
|
4304
4489
|
}
|
|
4305
4490
|
],
|
|
4306
4491
|
[
|
|
4307
4492
|
{
|
|
4308
4493
|
bind: "max-width",
|
|
4309
|
-
label:
|
|
4494
|
+
label: __40("Max width", "elementor")
|
|
4310
4495
|
},
|
|
4311
4496
|
{
|
|
4312
4497
|
bind: "max-height",
|
|
4313
|
-
label:
|
|
4498
|
+
label: __40("Max height", "elementor")
|
|
4314
4499
|
}
|
|
4315
4500
|
]
|
|
4316
4501
|
];
|
|
4317
|
-
var ASPECT_RATIO_LABEL =
|
|
4502
|
+
var ASPECT_RATIO_LABEL = __40("Aspect Ratio", "elementor");
|
|
4318
4503
|
var SizeSection = () => {
|
|
4319
|
-
const gridRowRefs = [
|
|
4320
|
-
return /* @__PURE__ */
|
|
4504
|
+
const gridRowRefs = [useRef11(null), useRef11(null), useRef11(null)];
|
|
4505
|
+
return /* @__PURE__ */ React63.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React63.createElement(Grid6, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React63.createElement(Grid6, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React63.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(Stack10, null, /* @__PURE__ */ React63.createElement(OverflowField, null)), /* @__PURE__ */ React63.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React63.createElement(Stack10, { gap: 2, pt: 2 }, /* @__PURE__ */ React63.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React63.createElement(AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React63.createElement(PanelDivider, null), /* @__PURE__ */ React63.createElement(ObjectFitField, null), /* @__PURE__ */ React63.createElement(StylesField, { bind: "object-position", propDisplayName: __40("Object position", "elementor") }, /* @__PURE__ */ React63.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React63.createElement(PositionControl, null))))));
|
|
4321
4506
|
};
|
|
4322
4507
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
4323
|
-
return /* @__PURE__ */
|
|
4508
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React63.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React63.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React63.createElement(ControlLabel, null, label)), /* @__PURE__ */ React63.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React63.createElement(SizeControl6, { extendedOptions, anchorRef: rowRef }))));
|
|
4324
4509
|
};
|
|
4325
4510
|
|
|
4326
4511
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
4327
|
-
import * as
|
|
4512
|
+
import * as React64 from "react";
|
|
4328
4513
|
import { LinkedDimensionsControl } from "@elementor/editor-controls";
|
|
4329
|
-
import { __ as
|
|
4330
|
-
var MARGIN_LABEL =
|
|
4331
|
-
var PADDING_LABEL =
|
|
4514
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
4515
|
+
var MARGIN_LABEL = __41("Margin", "elementor");
|
|
4516
|
+
var PADDING_LABEL = __41("Padding", "elementor");
|
|
4332
4517
|
var SpacingSection = () => {
|
|
4333
4518
|
const { isSiteRtl } = useDirection();
|
|
4334
|
-
return /* @__PURE__ */
|
|
4519
|
+
return /* @__PURE__ */ React64.createElement(SectionContent, null, /* @__PURE__ */ React64.createElement(StylesField, { bind: "margin", propDisplayName: MARGIN_LABEL }, /* @__PURE__ */ React64.createElement(
|
|
4335
4520
|
LinkedDimensionsControl,
|
|
4336
4521
|
{
|
|
4337
4522
|
label: MARGIN_LABEL,
|
|
4338
4523
|
isSiteRtl,
|
|
4339
4524
|
min: -Number.MAX_SAFE_INTEGER
|
|
4340
4525
|
}
|
|
4341
|
-
)), /* @__PURE__ */
|
|
4526
|
+
)), /* @__PURE__ */ React64.createElement(PanelDivider, null), /* @__PURE__ */ React64.createElement(StylesField, { bind: "padding", propDisplayName: PADDING_LABEL }, /* @__PURE__ */ React64.createElement(LinkedDimensionsControl, { label: PADDING_LABEL, isSiteRtl })));
|
|
4342
4527
|
};
|
|
4343
4528
|
|
|
4344
4529
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4345
|
-
import * as
|
|
4530
|
+
import * as React81 from "react";
|
|
4346
4531
|
|
|
4347
4532
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
4348
|
-
import * as
|
|
4533
|
+
import * as React65 from "react";
|
|
4349
4534
|
import { NumberControl as NumberControl5 } from "@elementor/editor-controls";
|
|
4350
|
-
import { __ as
|
|
4351
|
-
var COLUMN_COUNT_LABEL =
|
|
4535
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
4536
|
+
var COLUMN_COUNT_LABEL = __42("Columns", "elementor");
|
|
4352
4537
|
var ColumnCountField = () => {
|
|
4353
|
-
return /* @__PURE__ */
|
|
4538
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind: "column-count", propDisplayName: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React65.createElement(StylesFieldLayout, { label: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React65.createElement(NumberControl5, { shouldForceInt: true, min: 0, step: 1 })));
|
|
4354
4539
|
};
|
|
4355
4540
|
|
|
4356
4541
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
4357
|
-
import * as
|
|
4358
|
-
import { useRef as
|
|
4542
|
+
import * as React66 from "react";
|
|
4543
|
+
import { useRef as useRef12 } from "react";
|
|
4359
4544
|
import { SizeControl as SizeControl7 } from "@elementor/editor-controls";
|
|
4360
|
-
import { __ as
|
|
4361
|
-
var COLUMN_GAP_LABEL =
|
|
4545
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
4546
|
+
var COLUMN_GAP_LABEL = __43("Column gap", "elementor");
|
|
4362
4547
|
var ColumnGapField = () => {
|
|
4363
|
-
const rowRef =
|
|
4364
|
-
return /* @__PURE__ */
|
|
4548
|
+
const rowRef = useRef12(null);
|
|
4549
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React66.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React66.createElement(SizeControl7, { anchorRef: rowRef })));
|
|
4365
4550
|
};
|
|
4366
4551
|
|
|
4367
4552
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
4368
|
-
import * as
|
|
4553
|
+
import * as React67 from "react";
|
|
4369
4554
|
import { FontFamilyControl, useFontFamilies } from "@elementor/editor-controls";
|
|
4370
4555
|
import { useSectionWidth } from "@elementor/editor-ui";
|
|
4371
|
-
import { __ as
|
|
4372
|
-
var FONT_FAMILY_LABEL =
|
|
4556
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
4557
|
+
var FONT_FAMILY_LABEL = __44("Font family", "elementor");
|
|
4373
4558
|
var FontFamilyField = () => {
|
|
4374
4559
|
const fontFamilies = useFontFamilies();
|
|
4375
4560
|
const sectionWidth = useSectionWidth();
|
|
4376
4561
|
if (fontFamilies.length === 0) {
|
|
4377
4562
|
return null;
|
|
4378
4563
|
}
|
|
4379
|
-
return /* @__PURE__ */
|
|
4564
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "font-family", propDisplayName: FONT_FAMILY_LABEL }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label: FONT_FAMILY_LABEL }, /* @__PURE__ */ React67.createElement(
|
|
4380
4565
|
FontFamilyControl,
|
|
4381
4566
|
{
|
|
4382
4567
|
fontFamilies,
|
|
@@ -4387,196 +4572,196 @@ var FontFamilyField = () => {
|
|
|
4387
4572
|
};
|
|
4388
4573
|
|
|
4389
4574
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
4390
|
-
import * as
|
|
4391
|
-
import { useRef as
|
|
4575
|
+
import * as React68 from "react";
|
|
4576
|
+
import { useRef as useRef13 } from "react";
|
|
4392
4577
|
import { SizeControl as SizeControl8 } from "@elementor/editor-controls";
|
|
4393
|
-
import { __ as
|
|
4394
|
-
var FONT_SIZE_LABEL =
|
|
4578
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
4579
|
+
var FONT_SIZE_LABEL = __45("Font size", "elementor");
|
|
4395
4580
|
var FontSizeField = () => {
|
|
4396
|
-
const rowRef =
|
|
4397
|
-
return /* @__PURE__ */
|
|
4581
|
+
const rowRef = useRef13(null);
|
|
4582
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React68.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React68.createElement(SizeControl8, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
|
|
4398
4583
|
};
|
|
4399
4584
|
|
|
4400
4585
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
4401
|
-
import * as
|
|
4402
|
-
import { ToggleControl as
|
|
4586
|
+
import * as React69 from "react";
|
|
4587
|
+
import { ToggleControl as ToggleControl11 } from "@elementor/editor-controls";
|
|
4403
4588
|
import { ItalicIcon, MinusIcon } from "@elementor/icons";
|
|
4404
|
-
import { __ as
|
|
4405
|
-
var FONT_STYLE_LABEL =
|
|
4406
|
-
var
|
|
4589
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
4590
|
+
var FONT_STYLE_LABEL = __46("Font style", "elementor");
|
|
4591
|
+
var options8 = [
|
|
4407
4592
|
{
|
|
4408
4593
|
value: "normal",
|
|
4409
|
-
label:
|
|
4410
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4594
|
+
label: __46("Normal", "elementor"),
|
|
4595
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(MinusIcon, { fontSize: size }),
|
|
4411
4596
|
showTooltip: true
|
|
4412
4597
|
},
|
|
4413
4598
|
{
|
|
4414
4599
|
value: "italic",
|
|
4415
|
-
label:
|
|
4416
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4600
|
+
label: __46("Italic", "elementor"),
|
|
4601
|
+
renderContent: ({ size }) => /* @__PURE__ */ React69.createElement(ItalicIcon, { fontSize: size }),
|
|
4417
4602
|
showTooltip: true
|
|
4418
4603
|
}
|
|
4419
4604
|
];
|
|
4420
4605
|
var FontStyleField = () => {
|
|
4421
|
-
return /* @__PURE__ */
|
|
4606
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "font-style", propDisplayName: FONT_STYLE_LABEL }, /* @__PURE__ */ React69.createElement(StylesFieldLayout, { label: FONT_STYLE_LABEL }, /* @__PURE__ */ React69.createElement(ToggleControl11, { options: options8 })));
|
|
4422
4607
|
};
|
|
4423
4608
|
|
|
4424
4609
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
4425
|
-
import * as
|
|
4610
|
+
import * as React70 from "react";
|
|
4426
4611
|
import { SelectControl as SelectControl5 } from "@elementor/editor-controls";
|
|
4427
|
-
import { __ as
|
|
4428
|
-
var FONT_WEIGHT_LABEL =
|
|
4612
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
4613
|
+
var FONT_WEIGHT_LABEL = __47("Font weight", "elementor");
|
|
4429
4614
|
var fontWeightOptions = [
|
|
4430
|
-
{ value: "100", label:
|
|
4431
|
-
{ value: "200", label:
|
|
4432
|
-
{ value: "300", label:
|
|
4433
|
-
{ value: "400", label:
|
|
4434
|
-
{ value: "500", label:
|
|
4435
|
-
{ value: "600", label:
|
|
4436
|
-
{ value: "700", label:
|
|
4437
|
-
{ value: "800", label:
|
|
4438
|
-
{ value: "900", label:
|
|
4615
|
+
{ value: "100", label: __47("100 - Thin", "elementor") },
|
|
4616
|
+
{ value: "200", label: __47("200 - Extra light", "elementor") },
|
|
4617
|
+
{ value: "300", label: __47("300 - Light", "elementor") },
|
|
4618
|
+
{ value: "400", label: __47("400 - Normal", "elementor") },
|
|
4619
|
+
{ value: "500", label: __47("500 - Medium", "elementor") },
|
|
4620
|
+
{ value: "600", label: __47("600 - Semi bold", "elementor") },
|
|
4621
|
+
{ value: "700", label: __47("700 - Bold", "elementor") },
|
|
4622
|
+
{ value: "800", label: __47("800 - Extra bold", "elementor") },
|
|
4623
|
+
{ value: "900", label: __47("900 - Black", "elementor") }
|
|
4439
4624
|
];
|
|
4440
4625
|
var FontWeightField = () => {
|
|
4441
|
-
return /* @__PURE__ */
|
|
4626
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "font-weight", propDisplayName: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React70.createElement(StylesFieldLayout, { label: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React70.createElement(SelectControl5, { options: fontWeightOptions })));
|
|
4442
4627
|
};
|
|
4443
4628
|
|
|
4444
4629
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
4445
|
-
import * as
|
|
4446
|
-
import { useRef as
|
|
4630
|
+
import * as React71 from "react";
|
|
4631
|
+
import { useRef as useRef14 } from "react";
|
|
4447
4632
|
import { SizeControl as SizeControl9 } from "@elementor/editor-controls";
|
|
4448
|
-
import { __ as
|
|
4449
|
-
var LETTER_SPACING_LABEL =
|
|
4633
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
4634
|
+
var LETTER_SPACING_LABEL = __48("Letter spacing", "elementor");
|
|
4450
4635
|
var LetterSpacingField = () => {
|
|
4451
|
-
const rowRef =
|
|
4452
|
-
return /* @__PURE__ */
|
|
4636
|
+
const rowRef = useRef14(null);
|
|
4637
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React71.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React71.createElement(SizeControl9, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4453
4638
|
};
|
|
4454
4639
|
|
|
4455
4640
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
4456
|
-
import * as
|
|
4457
|
-
import { useRef as
|
|
4641
|
+
import * as React72 from "react";
|
|
4642
|
+
import { useRef as useRef15 } from "react";
|
|
4458
4643
|
import { SizeControl as SizeControl10 } from "@elementor/editor-controls";
|
|
4459
|
-
import { __ as
|
|
4460
|
-
var LINE_HEIGHT_LABEL =
|
|
4644
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
4645
|
+
var LINE_HEIGHT_LABEL = __49("Line height", "elementor");
|
|
4461
4646
|
var LineHeightField = () => {
|
|
4462
|
-
const rowRef =
|
|
4463
|
-
return /* @__PURE__ */
|
|
4647
|
+
const rowRef = useRef15(null);
|
|
4648
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React72.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React72.createElement(SizeControl10, { anchorRef: rowRef })));
|
|
4464
4649
|
};
|
|
4465
4650
|
|
|
4466
4651
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
4467
|
-
import * as
|
|
4468
|
-
import { ToggleControl as
|
|
4652
|
+
import * as React73 from "react";
|
|
4653
|
+
import { ToggleControl as ToggleControl12 } from "@elementor/editor-controls";
|
|
4469
4654
|
import { AlignCenterIcon, AlignJustifiedIcon, AlignLeftIcon, AlignRightIcon } from "@elementor/icons";
|
|
4470
|
-
import { withDirection as
|
|
4471
|
-
import { __ as
|
|
4472
|
-
var TEXT_ALIGNMENT_LABEL =
|
|
4473
|
-
var AlignStartIcon =
|
|
4474
|
-
var AlignEndIcon =
|
|
4475
|
-
var
|
|
4655
|
+
import { withDirection as withDirection11 } from "@elementor/ui";
|
|
4656
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
4657
|
+
var TEXT_ALIGNMENT_LABEL = __50("Text align", "elementor");
|
|
4658
|
+
var AlignStartIcon = withDirection11(AlignLeftIcon);
|
|
4659
|
+
var AlignEndIcon = withDirection11(AlignRightIcon);
|
|
4660
|
+
var options9 = [
|
|
4476
4661
|
{
|
|
4477
4662
|
value: "start",
|
|
4478
|
-
label:
|
|
4479
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4663
|
+
label: __50("Start", "elementor"),
|
|
4664
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(AlignStartIcon, { fontSize: size }),
|
|
4480
4665
|
showTooltip: true
|
|
4481
4666
|
},
|
|
4482
4667
|
{
|
|
4483
4668
|
value: "center",
|
|
4484
|
-
label:
|
|
4485
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4669
|
+
label: __50("Center", "elementor"),
|
|
4670
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(AlignCenterIcon, { fontSize: size }),
|
|
4486
4671
|
showTooltip: true
|
|
4487
4672
|
},
|
|
4488
4673
|
{
|
|
4489
4674
|
value: "end",
|
|
4490
|
-
label:
|
|
4491
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4675
|
+
label: __50("End", "elementor"),
|
|
4676
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(AlignEndIcon, { fontSize: size }),
|
|
4492
4677
|
showTooltip: true
|
|
4493
4678
|
},
|
|
4494
4679
|
{
|
|
4495
4680
|
value: "justify",
|
|
4496
|
-
label:
|
|
4497
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4681
|
+
label: __50("Justify", "elementor"),
|
|
4682
|
+
renderContent: ({ size }) => /* @__PURE__ */ React73.createElement(AlignJustifiedIcon, { fontSize: size }),
|
|
4498
4683
|
showTooltip: true
|
|
4499
4684
|
}
|
|
4500
4685
|
];
|
|
4501
4686
|
var TextAlignmentField = () => {
|
|
4502
|
-
return /* @__PURE__ */
|
|
4687
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "text-align", propDisplayName: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React73.createElement(UiProviders, null, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React73.createElement(ToggleControl12, { options: options9 }))));
|
|
4503
4688
|
};
|
|
4504
4689
|
|
|
4505
4690
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
4506
|
-
import * as
|
|
4691
|
+
import * as React74 from "react";
|
|
4507
4692
|
import { ColorControl as ColorControl2 } from "@elementor/editor-controls";
|
|
4508
|
-
import { __ as
|
|
4509
|
-
var TEXT_COLOR_LABEL =
|
|
4693
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
4694
|
+
var TEXT_COLOR_LABEL = __51("Text color", "elementor");
|
|
4510
4695
|
var TextColorField = () => {
|
|
4511
|
-
return /* @__PURE__ */
|
|
4696
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "color", propDisplayName: TEXT_COLOR_LABEL }, /* @__PURE__ */ React74.createElement(StylesFieldLayout, { label: TEXT_COLOR_LABEL }, /* @__PURE__ */ React74.createElement(ColorControl2, { id: "text-color-control" })));
|
|
4512
4697
|
};
|
|
4513
4698
|
|
|
4514
4699
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
4515
|
-
import * as
|
|
4516
|
-
import { ToggleControl as
|
|
4700
|
+
import * as React75 from "react";
|
|
4701
|
+
import { ToggleControl as ToggleControl13 } from "@elementor/editor-controls";
|
|
4517
4702
|
import { MinusIcon as MinusIcon2, OverlineIcon, StrikethroughIcon, UnderlineIcon } from "@elementor/icons";
|
|
4518
|
-
import { __ as
|
|
4519
|
-
var TEXT_DECORATION_LABEL =
|
|
4520
|
-
var
|
|
4703
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
4704
|
+
var TEXT_DECORATION_LABEL = __52("Line decoration", "elementor");
|
|
4705
|
+
var options10 = [
|
|
4521
4706
|
{
|
|
4522
4707
|
value: "none",
|
|
4523
|
-
label:
|
|
4524
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4708
|
+
label: __52("None", "elementor"),
|
|
4709
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(MinusIcon2, { fontSize: size }),
|
|
4525
4710
|
showTooltip: true,
|
|
4526
4711
|
exclusive: true
|
|
4527
4712
|
},
|
|
4528
4713
|
{
|
|
4529
4714
|
value: "underline",
|
|
4530
|
-
label:
|
|
4531
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4715
|
+
label: __52("Underline", "elementor"),
|
|
4716
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(UnderlineIcon, { fontSize: size }),
|
|
4532
4717
|
showTooltip: true
|
|
4533
4718
|
},
|
|
4534
4719
|
{
|
|
4535
4720
|
value: "line-through",
|
|
4536
|
-
label:
|
|
4537
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4721
|
+
label: __52("Line-through", "elementor"),
|
|
4722
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(StrikethroughIcon, { fontSize: size }),
|
|
4538
4723
|
showTooltip: true
|
|
4539
4724
|
},
|
|
4540
4725
|
{
|
|
4541
4726
|
value: "overline",
|
|
4542
|
-
label:
|
|
4543
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4727
|
+
label: __52("Overline", "elementor"),
|
|
4728
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(OverlineIcon, { fontSize: size }),
|
|
4544
4729
|
showTooltip: true
|
|
4545
4730
|
}
|
|
4546
4731
|
];
|
|
4547
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
4732
|
+
var TextDecorationField = () => /* @__PURE__ */ React75.createElement(StylesField, { bind: "text-decoration", propDisplayName: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React75.createElement(StylesFieldLayout, { label: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React75.createElement(ToggleControl13, { options: options10, exclusive: false })));
|
|
4548
4733
|
|
|
4549
4734
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
4550
|
-
import * as
|
|
4551
|
-
import { ToggleControl as
|
|
4735
|
+
import * as React76 from "react";
|
|
4736
|
+
import { ToggleControl as ToggleControl14 } from "@elementor/editor-controls";
|
|
4552
4737
|
import { TextDirectionLtrIcon, TextDirectionRtlIcon } from "@elementor/icons";
|
|
4553
|
-
import { __ as
|
|
4554
|
-
var TEXT_DIRECTION_LABEL =
|
|
4555
|
-
var
|
|
4738
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
4739
|
+
var TEXT_DIRECTION_LABEL = __53("Direction", "elementor");
|
|
4740
|
+
var options11 = [
|
|
4556
4741
|
{
|
|
4557
4742
|
value: "ltr",
|
|
4558
|
-
label:
|
|
4559
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4743
|
+
label: __53("Left to right", "elementor"),
|
|
4744
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(TextDirectionLtrIcon, { fontSize: size }),
|
|
4560
4745
|
showTooltip: true
|
|
4561
4746
|
},
|
|
4562
4747
|
{
|
|
4563
4748
|
value: "rtl",
|
|
4564
|
-
label:
|
|
4565
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4749
|
+
label: __53("Right to left", "elementor"),
|
|
4750
|
+
renderContent: ({ size }) => /* @__PURE__ */ React76.createElement(TextDirectionRtlIcon, { fontSize: size }),
|
|
4566
4751
|
showTooltip: true
|
|
4567
4752
|
}
|
|
4568
4753
|
];
|
|
4569
4754
|
var TextDirectionField = () => {
|
|
4570
|
-
return /* @__PURE__ */
|
|
4755
|
+
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "direction", propDisplayName: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React76.createElement(ToggleControl14, { options: options11 })));
|
|
4571
4756
|
};
|
|
4572
4757
|
|
|
4573
4758
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
4574
|
-
import * as
|
|
4759
|
+
import * as React78 from "react";
|
|
4575
4760
|
import { StrokeControl } from "@elementor/editor-controls";
|
|
4576
|
-
import { __ as
|
|
4761
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
4577
4762
|
|
|
4578
4763
|
// src/components/add-or-remove-content.tsx
|
|
4579
|
-
import * as
|
|
4764
|
+
import * as React77 from "react";
|
|
4580
4765
|
import { MinusIcon as MinusIcon3, PlusIcon } from "@elementor/icons";
|
|
4581
4766
|
import { Collapse as Collapse2, IconButton, Stack as Stack11 } from "@elementor/ui";
|
|
4582
4767
|
var SIZE = "tiny";
|
|
@@ -4588,7 +4773,7 @@ var AddOrRemoveContent = ({
|
|
|
4588
4773
|
disabled,
|
|
4589
4774
|
renderLabel
|
|
4590
4775
|
}) => {
|
|
4591
|
-
return /* @__PURE__ */
|
|
4776
|
+
return /* @__PURE__ */ React77.createElement(SectionContent, null, /* @__PURE__ */ React77.createElement(
|
|
4592
4777
|
Stack11,
|
|
4593
4778
|
{
|
|
4594
4779
|
direction: "row",
|
|
@@ -4599,8 +4784,8 @@ var AddOrRemoveContent = ({
|
|
|
4599
4784
|
}
|
|
4600
4785
|
},
|
|
4601
4786
|
renderLabel(),
|
|
4602
|
-
isAdded ? /* @__PURE__ */
|
|
4603
|
-
), /* @__PURE__ */
|
|
4787
|
+
isAdded ? /* @__PURE__ */ React77.createElement(IconButton, { size: SIZE, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React77.createElement(MinusIcon3, { fontSize: SIZE })) : /* @__PURE__ */ React77.createElement(IconButton, { size: SIZE, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React77.createElement(PlusIcon, { fontSize: SIZE }))
|
|
4788
|
+
), /* @__PURE__ */ React77.createElement(Collapse2, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React77.createElement(SectionContent, null, children)));
|
|
4604
4789
|
};
|
|
4605
4790
|
|
|
4606
4791
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
@@ -4620,7 +4805,7 @@ var initTextStroke = {
|
|
|
4620
4805
|
}
|
|
4621
4806
|
}
|
|
4622
4807
|
};
|
|
4623
|
-
var TEXT_STROKE_LABEL =
|
|
4808
|
+
var TEXT_STROKE_LABEL = __54("Text stroke", "elementor");
|
|
4624
4809
|
var TextStrokeField = () => {
|
|
4625
4810
|
const { value, setValue, canEdit } = useStylesField("stroke", {
|
|
4626
4811
|
history: { propDisplayName: TEXT_STROKE_LABEL }
|
|
@@ -4632,67 +4817,67 @@ var TextStrokeField = () => {
|
|
|
4632
4817
|
setValue(null);
|
|
4633
4818
|
};
|
|
4634
4819
|
const hasTextStroke = Boolean(value);
|
|
4635
|
-
return /* @__PURE__ */
|
|
4820
|
+
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "stroke", propDisplayName: TEXT_STROKE_LABEL }, /* @__PURE__ */ React78.createElement(
|
|
4636
4821
|
AddOrRemoveContent,
|
|
4637
4822
|
{
|
|
4638
4823
|
isAdded: hasTextStroke,
|
|
4639
4824
|
onAdd: addTextStroke,
|
|
4640
4825
|
onRemove: removeTextStroke,
|
|
4641
4826
|
disabled: !canEdit,
|
|
4642
|
-
renderLabel: () => /* @__PURE__ */
|
|
4827
|
+
renderLabel: () => /* @__PURE__ */ React78.createElement(ControlLabel, null, TEXT_STROKE_LABEL)
|
|
4643
4828
|
},
|
|
4644
|
-
/* @__PURE__ */
|
|
4829
|
+
/* @__PURE__ */ React78.createElement(StrokeControl, null)
|
|
4645
4830
|
));
|
|
4646
4831
|
};
|
|
4647
4832
|
|
|
4648
4833
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
4649
|
-
import * as
|
|
4650
|
-
import { ToggleControl as
|
|
4834
|
+
import * as React79 from "react";
|
|
4835
|
+
import { ToggleControl as ToggleControl15 } from "@elementor/editor-controls";
|
|
4651
4836
|
import { LetterCaseIcon, LetterCaseLowerIcon, LetterCaseUpperIcon, MinusIcon as MinusIcon4 } from "@elementor/icons";
|
|
4652
|
-
import { __ as
|
|
4653
|
-
var TEXT_TRANSFORM_LABEL =
|
|
4654
|
-
var
|
|
4837
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
4838
|
+
var TEXT_TRANSFORM_LABEL = __55("Text transform", "elementor");
|
|
4839
|
+
var options12 = [
|
|
4655
4840
|
{
|
|
4656
4841
|
value: "none",
|
|
4657
|
-
label:
|
|
4658
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4842
|
+
label: __55("None", "elementor"),
|
|
4843
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(MinusIcon4, { fontSize: size }),
|
|
4659
4844
|
showTooltip: true
|
|
4660
4845
|
},
|
|
4661
4846
|
{
|
|
4662
4847
|
value: "capitalize",
|
|
4663
|
-
label:
|
|
4664
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4848
|
+
label: __55("Capitalize", "elementor"),
|
|
4849
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(LetterCaseIcon, { fontSize: size }),
|
|
4665
4850
|
showTooltip: true
|
|
4666
4851
|
},
|
|
4667
4852
|
{
|
|
4668
4853
|
value: "uppercase",
|
|
4669
|
-
label:
|
|
4670
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4854
|
+
label: __55("Uppercase", "elementor"),
|
|
4855
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(LetterCaseUpperIcon, { fontSize: size }),
|
|
4671
4856
|
showTooltip: true
|
|
4672
4857
|
},
|
|
4673
4858
|
{
|
|
4674
4859
|
value: "lowercase",
|
|
4675
|
-
label:
|
|
4676
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4860
|
+
label: __55("Lowercase", "elementor"),
|
|
4861
|
+
renderContent: ({ size }) => /* @__PURE__ */ React79.createElement(LetterCaseLowerIcon, { fontSize: size }),
|
|
4677
4862
|
showTooltip: true
|
|
4678
4863
|
}
|
|
4679
4864
|
];
|
|
4680
|
-
var TransformField = () => /* @__PURE__ */
|
|
4865
|
+
var TransformField = () => /* @__PURE__ */ React79.createElement(StylesField, { bind: "text-transform", propDisplayName: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React79.createElement(StylesFieldLayout, { label: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React79.createElement(ToggleControl15, { options: options12 })));
|
|
4681
4866
|
|
|
4682
4867
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4683
|
-
import * as
|
|
4684
|
-
import { useRef as
|
|
4868
|
+
import * as React80 from "react";
|
|
4869
|
+
import { useRef as useRef16 } from "react";
|
|
4685
4870
|
import { SizeControl as SizeControl11 } from "@elementor/editor-controls";
|
|
4686
|
-
import { __ as
|
|
4687
|
-
var WORD_SPACING_LABEL =
|
|
4871
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
4872
|
+
var WORD_SPACING_LABEL = __56("Word spacing", "elementor");
|
|
4688
4873
|
var WordSpacingField = () => {
|
|
4689
|
-
const rowRef =
|
|
4690
|
-
return /* @__PURE__ */
|
|
4874
|
+
const rowRef = useRef16(null);
|
|
4875
|
+
return /* @__PURE__ */ React80.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React80.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React80.createElement(SizeControl11, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4691
4876
|
};
|
|
4692
4877
|
|
|
4693
4878
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4694
4879
|
var TypographySection = () => {
|
|
4695
|
-
return /* @__PURE__ */
|
|
4880
|
+
return /* @__PURE__ */ React81.createElement(SectionContent, null, /* @__PURE__ */ React81.createElement(FontFamilyField, null), /* @__PURE__ */ React81.createElement(FontWeightField, null), /* @__PURE__ */ React81.createElement(FontSizeField, null), /* @__PURE__ */ React81.createElement(PanelDivider, null), /* @__PURE__ */ React81.createElement(TextAlignmentField, null), /* @__PURE__ */ React81.createElement(TextColorField, null), /* @__PURE__ */ React81.createElement(
|
|
4696
4881
|
StyleTabCollapsibleContent,
|
|
4697
4882
|
{
|
|
4698
4883
|
fields: [
|
|
@@ -4707,18 +4892,18 @@ var TypographySection = () => {
|
|
|
4707
4892
|
"stroke"
|
|
4708
4893
|
]
|
|
4709
4894
|
},
|
|
4710
|
-
/* @__PURE__ */
|
|
4895
|
+
/* @__PURE__ */ React81.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React81.createElement(LineHeightField, null), /* @__PURE__ */ React81.createElement(LetterSpacingField, null), /* @__PURE__ */ React81.createElement(WordSpacingField, null), /* @__PURE__ */ React81.createElement(ColumnCountField, null), /* @__PURE__ */ React81.createElement(ColumnGapField, null), /* @__PURE__ */ React81.createElement(PanelDivider, null), /* @__PURE__ */ React81.createElement(TextDecorationField, null), /* @__PURE__ */ React81.createElement(TransformField, null), /* @__PURE__ */ React81.createElement(TextDirectionField, null), /* @__PURE__ */ React81.createElement(FontStyleField, null), /* @__PURE__ */ React81.createElement(TextStrokeField, null))
|
|
4711
4896
|
));
|
|
4712
4897
|
};
|
|
4713
4898
|
|
|
4714
4899
|
// src/components/style-tab-section.tsx
|
|
4715
|
-
import * as
|
|
4900
|
+
import * as React82 from "react";
|
|
4716
4901
|
var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
4717
4902
|
const { component, name, title, action } = section;
|
|
4718
4903
|
const tabDefaults = useDefaultPanelSettings();
|
|
4719
|
-
const SectionComponent = component || (() => /* @__PURE__ */
|
|
4904
|
+
const SectionComponent = component || (() => /* @__PURE__ */ React82.createElement(React82.Fragment, null));
|
|
4720
4905
|
const isExpanded = tabDefaults.defaultSectionsExpanded.style?.includes(name);
|
|
4721
|
-
return /* @__PURE__ */
|
|
4906
|
+
return /* @__PURE__ */ React82.createElement(
|
|
4722
4907
|
Section,
|
|
4723
4908
|
{
|
|
4724
4909
|
title,
|
|
@@ -4727,7 +4912,7 @@ var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
|
4727
4912
|
unmountOnExit,
|
|
4728
4913
|
action
|
|
4729
4914
|
},
|
|
4730
|
-
/* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ React82.createElement(SectionComponent, null)
|
|
4731
4916
|
);
|
|
4732
4917
|
};
|
|
4733
4918
|
|
|
@@ -4749,7 +4934,7 @@ var StyleTab = () => {
|
|
|
4749
4934
|
if (!currentClassesProp) {
|
|
4750
4935
|
return null;
|
|
4751
4936
|
}
|
|
4752
|
-
return /* @__PURE__ */
|
|
4937
|
+
return /* @__PURE__ */ React83.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React83.createElement(
|
|
4753
4938
|
StyleProvider,
|
|
4754
4939
|
{
|
|
4755
4940
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4760,13 +4945,13 @@ var StyleTab = () => {
|
|
|
4760
4945
|
},
|
|
4761
4946
|
setMetaState: setActiveStyleState
|
|
4762
4947
|
},
|
|
4763
|
-
/* @__PURE__ */
|
|
4948
|
+
/* @__PURE__ */ React83.createElement(SessionStorageProvider2, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React83.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React83.createElement(ClassesHeader, null, /* @__PURE__ */ React83.createElement(CssClassSelector, null), /* @__PURE__ */ React83.createElement(Divider5, null)), /* @__PURE__ */ React83.createElement(SectionsList, null, /* @__PURE__ */ React83.createElement(
|
|
4764
4949
|
StyleTabSection,
|
|
4765
4950
|
{
|
|
4766
4951
|
section: {
|
|
4767
4952
|
component: LayoutSection,
|
|
4768
4953
|
name: "Layout",
|
|
4769
|
-
title:
|
|
4954
|
+
title: __57("Layout", "elementor")
|
|
4770
4955
|
},
|
|
4771
4956
|
fields: [
|
|
4772
4957
|
"display",
|
|
@@ -4779,23 +4964,23 @@ var StyleTab = () => {
|
|
|
4779
4964
|
"gap"
|
|
4780
4965
|
]
|
|
4781
4966
|
}
|
|
4782
|
-
), /* @__PURE__ */
|
|
4967
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4783
4968
|
StyleTabSection,
|
|
4784
4969
|
{
|
|
4785
4970
|
section: {
|
|
4786
4971
|
component: SpacingSection,
|
|
4787
4972
|
name: "Spacing",
|
|
4788
|
-
title:
|
|
4973
|
+
title: __57("Spacing", "elementor")
|
|
4789
4974
|
},
|
|
4790
4975
|
fields: ["margin", "padding"]
|
|
4791
4976
|
}
|
|
4792
|
-
), /* @__PURE__ */
|
|
4977
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4793
4978
|
StyleTabSection,
|
|
4794
4979
|
{
|
|
4795
4980
|
section: {
|
|
4796
4981
|
component: SizeSection,
|
|
4797
4982
|
name: "Size",
|
|
4798
|
-
title:
|
|
4983
|
+
title: __57("Size", "elementor")
|
|
4799
4984
|
},
|
|
4800
4985
|
fields: [
|
|
4801
4986
|
"width",
|
|
@@ -4809,23 +4994,23 @@ var StyleTab = () => {
|
|
|
4809
4994
|
"object-fit"
|
|
4810
4995
|
]
|
|
4811
4996
|
}
|
|
4812
|
-
), /* @__PURE__ */
|
|
4997
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4813
4998
|
StyleTabSection,
|
|
4814
4999
|
{
|
|
4815
5000
|
section: {
|
|
4816
5001
|
component: PositionSection,
|
|
4817
5002
|
name: "Position",
|
|
4818
|
-
title:
|
|
5003
|
+
title: __57("Position", "elementor")
|
|
4819
5004
|
},
|
|
4820
5005
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4821
5006
|
}
|
|
4822
|
-
), /* @__PURE__ */
|
|
5007
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4823
5008
|
StyleTabSection,
|
|
4824
5009
|
{
|
|
4825
5010
|
section: {
|
|
4826
5011
|
component: TypographySection,
|
|
4827
5012
|
name: "Typography",
|
|
4828
|
-
title:
|
|
5013
|
+
title: __57("Typography", "elementor")
|
|
4829
5014
|
},
|
|
4830
5015
|
fields: [
|
|
4831
5016
|
"font-family",
|
|
@@ -4844,33 +5029,33 @@ var StyleTab = () => {
|
|
|
4844
5029
|
"stroke"
|
|
4845
5030
|
]
|
|
4846
5031
|
}
|
|
4847
|
-
), /* @__PURE__ */
|
|
5032
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4848
5033
|
StyleTabSection,
|
|
4849
5034
|
{
|
|
4850
5035
|
section: {
|
|
4851
5036
|
component: BackgroundSection,
|
|
4852
5037
|
name: "Background",
|
|
4853
|
-
title:
|
|
5038
|
+
title: __57("Background", "elementor")
|
|
4854
5039
|
},
|
|
4855
5040
|
fields: ["background"]
|
|
4856
5041
|
}
|
|
4857
|
-
), /* @__PURE__ */
|
|
5042
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4858
5043
|
StyleTabSection,
|
|
4859
5044
|
{
|
|
4860
5045
|
section: {
|
|
4861
5046
|
component: BorderSection,
|
|
4862
5047
|
name: "Border",
|
|
4863
|
-
title:
|
|
5048
|
+
title: __57("Border", "elementor")
|
|
4864
5049
|
},
|
|
4865
5050
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4866
5051
|
}
|
|
4867
|
-
), /* @__PURE__ */
|
|
5052
|
+
), /* @__PURE__ */ React83.createElement(
|
|
4868
5053
|
StyleTabSection,
|
|
4869
5054
|
{
|
|
4870
5055
|
section: {
|
|
4871
5056
|
component: EffectsSection,
|
|
4872
5057
|
name: "Effects",
|
|
4873
|
-
title:
|
|
5058
|
+
title: __57("Effects", "elementor")
|
|
4874
5059
|
},
|
|
4875
5060
|
fields: [
|
|
4876
5061
|
"mix-blend-mode",
|
|
@@ -4883,12 +5068,12 @@ var StyleTab = () => {
|
|
|
4883
5068
|
"transition"
|
|
4884
5069
|
]
|
|
4885
5070
|
}
|
|
4886
|
-
), /* @__PURE__ */
|
|
5071
|
+
), /* @__PURE__ */ React83.createElement(StyleTabSlot, null)), /* @__PURE__ */ React83.createElement(Box5, { sx: { height: "150px" } })))
|
|
4887
5072
|
));
|
|
4888
5073
|
};
|
|
4889
5074
|
function ClassesHeader({ children }) {
|
|
4890
5075
|
const scrollDirection = useScrollDirection();
|
|
4891
|
-
return /* @__PURE__ */
|
|
5076
|
+
return /* @__PURE__ */ React83.createElement(Stack12, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4892
5077
|
}
|
|
4893
5078
|
function useCurrentClassesProp() {
|
|
4894
5079
|
const { elementType } = useElement();
|
|
@@ -4907,19 +5092,19 @@ var EditingPanelTabs = () => {
|
|
|
4907
5092
|
return (
|
|
4908
5093
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4909
5094
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4910
|
-
/* @__PURE__ */
|
|
5095
|
+
/* @__PURE__ */ React84.createElement(Fragment9, { key: element.id }, /* @__PURE__ */ React84.createElement(PanelTabContent, null))
|
|
4911
5096
|
);
|
|
4912
5097
|
};
|
|
4913
5098
|
var PanelTabContent = () => {
|
|
4914
5099
|
const { element } = useElement();
|
|
4915
5100
|
const editorDefaults = useDefaultPanelSettings();
|
|
4916
5101
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
4917
|
-
const isInteractionsActive =
|
|
5102
|
+
const isInteractionsActive = isExperimentActive3("e_interactions");
|
|
4918
5103
|
const isPromotedElement = !!getWidgetsCache2()?.[element.type]?.meta?.is_pro_promotion;
|
|
4919
5104
|
const [storedTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4920
5105
|
const currentTab = isPromotedElement && storedTab === "settings" ? "style" : storedTab;
|
|
4921
5106
|
const { getTabProps, getTabPanelProps, getTabsProps } = useTabs(currentTab);
|
|
4922
|
-
return /* @__PURE__ */
|
|
5107
|
+
return /* @__PURE__ */ React84.createElement(ScrollProvider, null, /* @__PURE__ */ React84.createElement(Stack13, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React84.createElement(Stack13, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React84.createElement(
|
|
4923
5108
|
Tabs,
|
|
4924
5109
|
{
|
|
4925
5110
|
variant: "fullWidth",
|
|
@@ -4931,10 +5116,10 @@ var PanelTabContent = () => {
|
|
|
4931
5116
|
setCurrentTab(newValue);
|
|
4932
5117
|
}
|
|
4933
5118
|
},
|
|
4934
|
-
!isPromotedElement && /* @__PURE__ */
|
|
4935
|
-
/* @__PURE__ */
|
|
4936
|
-
isInteractionsActive && /* @__PURE__ */
|
|
4937
|
-
), /* @__PURE__ */
|
|
5119
|
+
!isPromotedElement && /* @__PURE__ */ React84.createElement(Tab, { label: __58("General", "elementor"), ...getTabProps("settings") }),
|
|
5120
|
+
/* @__PURE__ */ React84.createElement(Tab, { label: __58("Style", "elementor"), ...getTabProps("style") }),
|
|
5121
|
+
isInteractionsActive && /* @__PURE__ */ React84.createElement(Tab, { label: __58("Interactions", "elementor"), ...getTabProps("interactions") })
|
|
5122
|
+
), /* @__PURE__ */ React84.createElement(Divider6, null)), !isPromotedElement && /* @__PURE__ */ React84.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React84.createElement(SettingsTab, null)), /* @__PURE__ */ React84.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React84.createElement(StyleTab, null)), isInteractionsActive && /* @__PURE__ */ React84.createElement(TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React84.createElement(InteractionsTab, null))));
|
|
4938
5123
|
};
|
|
4939
5124
|
|
|
4940
5125
|
// src/components/editing-panel.tsx
|
|
@@ -4947,13 +5132,13 @@ var EditingPanel = () => {
|
|
|
4947
5132
|
if (!element || !elementType) {
|
|
4948
5133
|
return null;
|
|
4949
5134
|
}
|
|
4950
|
-
const panelTitle =
|
|
5135
|
+
const panelTitle = __59("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4951
5136
|
const { component: ReplacementComponent } = getEditingPanelReplacement(element, elementType) ?? {};
|
|
4952
|
-
let panelContent = /* @__PURE__ */
|
|
5137
|
+
let panelContent = /* @__PURE__ */ React85.createElement(React85.Fragment, null, /* @__PURE__ */ React85.createElement(PanelHeader, null, /* @__PURE__ */ React85.createElement(PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React85.createElement(AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React85.createElement(PanelBody, null, /* @__PURE__ */ React85.createElement(EditingPanelTabs, null)));
|
|
4953
5138
|
if (ReplacementComponent) {
|
|
4954
|
-
panelContent = /* @__PURE__ */
|
|
5139
|
+
panelContent = /* @__PURE__ */ React85.createElement(ReplacementComponent, null);
|
|
4955
5140
|
}
|
|
4956
|
-
return /* @__PURE__ */
|
|
5141
|
+
return /* @__PURE__ */ React85.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React85.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React85.createElement(SessionStorageProvider3, { prefix: "elementor" }, /* @__PURE__ */ React85.createElement(ThemeProvider3, null, /* @__PURE__ */ React85.createElement(ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React85.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React85.createElement(ElementProvider, { element, elementType, settings }, /* @__PURE__ */ React85.createElement(Panel, null, /* @__PURE__ */ React85.createElement(PanelHeaderTopSlot, null), panelContent)))))));
|
|
4957
5142
|
};
|
|
4958
5143
|
|
|
4959
5144
|
// src/init.ts
|
|
@@ -5005,21 +5190,21 @@ var EditingPanelHooks = () => {
|
|
|
5005
5190
|
import { AttributesControl, DisplayConditionsControl } from "@elementor/editor-controls";
|
|
5006
5191
|
|
|
5007
5192
|
// src/components/promotions/custom-css.tsx
|
|
5008
|
-
import * as
|
|
5009
|
-
import { useRef as
|
|
5193
|
+
import * as React86 from "react";
|
|
5194
|
+
import { useRef as useRef17 } from "react";
|
|
5010
5195
|
import { PromotionTrigger } from "@elementor/editor-controls";
|
|
5011
|
-
import { __ as
|
|
5196
|
+
import { __ as __60 } from "@wordpress/i18n";
|
|
5012
5197
|
var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
|
|
5013
5198
|
var CustomCssSection = () => {
|
|
5014
|
-
const triggerRef =
|
|
5015
|
-
return /* @__PURE__ */
|
|
5199
|
+
const triggerRef = useRef17(null);
|
|
5200
|
+
return /* @__PURE__ */ React86.createElement(
|
|
5016
5201
|
StyleTabSection,
|
|
5017
5202
|
{
|
|
5018
5203
|
section: {
|
|
5019
5204
|
name: "Custom CSS",
|
|
5020
|
-
title:
|
|
5205
|
+
title: __60("Custom CSS", "elementor"),
|
|
5021
5206
|
action: {
|
|
5022
|
-
component: /* @__PURE__ */
|
|
5207
|
+
component: /* @__PURE__ */ React86.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "customCss", trackingData: TRACKING_DATA }),
|
|
5023
5208
|
onClick: () => triggerRef.current?.toggle()
|
|
5024
5209
|
}
|
|
5025
5210
|
}
|
|
@@ -5041,7 +5226,7 @@ var init = () => {
|
|
|
5041
5226
|
};
|
|
5042
5227
|
|
|
5043
5228
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
5044
|
-
import * as
|
|
5229
|
+
import * as React87 from "react";
|
|
5045
5230
|
import {
|
|
5046
5231
|
ControlFormLabel as ControlFormLabel3,
|
|
5047
5232
|
Repeater,
|
|
@@ -5055,7 +5240,7 @@ import {
|
|
|
5055
5240
|
import { numberPropTypeUtil as numberPropTypeUtil4 } from "@elementor/editor-props";
|
|
5056
5241
|
import { InfoCircleFilledIcon } from "@elementor/icons";
|
|
5057
5242
|
import { Alert as Alert2, Chip as Chip4, Infotip, Stack as Stack14, Switch, TextField as TextField2, Typography as Typography4 } from "@elementor/ui";
|
|
5058
|
-
import { __ as
|
|
5243
|
+
import { __ as __62 } from "@wordpress/i18n";
|
|
5059
5244
|
|
|
5060
5245
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
5061
5246
|
import { getContainer as getContainer2 } from "@elementor/editor-elements";
|
|
@@ -5080,7 +5265,7 @@ import {
|
|
|
5080
5265
|
removeElements
|
|
5081
5266
|
} from "@elementor/editor-elements";
|
|
5082
5267
|
import { numberPropTypeUtil as numberPropTypeUtil3 } from "@elementor/editor-props";
|
|
5083
|
-
import { __ as
|
|
5268
|
+
import { __ as __61 } from "@wordpress/i18n";
|
|
5084
5269
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5085
5270
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5086
5271
|
var useActions = () => {
|
|
@@ -5103,7 +5288,7 @@ var useActions = () => {
|
|
|
5103
5288
|
}
|
|
5104
5289
|
duplicateElements({
|
|
5105
5290
|
elementIds: [tabId, tabContentId],
|
|
5106
|
-
title:
|
|
5291
|
+
title: __61("Duplicate Tab", "elementor"),
|
|
5107
5292
|
onDuplicateElements: () => {
|
|
5108
5293
|
if (newDefault !== defaultActiveTab) {
|
|
5109
5294
|
setDefaultActiveTab(newDefault, {}, { withHistory: false });
|
|
@@ -5140,7 +5325,7 @@ var useActions = () => {
|
|
|
5140
5325
|
defaultActiveTab
|
|
5141
5326
|
});
|
|
5142
5327
|
moveElements({
|
|
5143
|
-
title:
|
|
5328
|
+
title: __61("Reorder Tabs", "elementor"),
|
|
5144
5329
|
moves: [
|
|
5145
5330
|
{
|
|
5146
5331
|
element: movedElement,
|
|
@@ -5174,7 +5359,7 @@ var useActions = () => {
|
|
|
5174
5359
|
defaultActiveTab
|
|
5175
5360
|
});
|
|
5176
5361
|
removeElements({
|
|
5177
|
-
title:
|
|
5362
|
+
title: __61("Tabs", "elementor"),
|
|
5178
5363
|
elementIds: items3.flatMap(({ item, index }) => {
|
|
5179
5364
|
const tabId = item.id;
|
|
5180
5365
|
const tabContentContainer = getContainer3(tabContentAreaId);
|
|
@@ -5209,7 +5394,7 @@ var useActions = () => {
|
|
|
5209
5394
|
items3.forEach(({ index }) => {
|
|
5210
5395
|
const position = index + 1;
|
|
5211
5396
|
createElements({
|
|
5212
|
-
title:
|
|
5397
|
+
title: __61("Tabs", "elementor"),
|
|
5213
5398
|
elements: [
|
|
5214
5399
|
{
|
|
5215
5400
|
container: tabContentArea,
|
|
@@ -5278,7 +5463,7 @@ var calculateDefaultOnDuplicate = ({
|
|
|
5278
5463
|
var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
|
|
5279
5464
|
var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
|
|
5280
5465
|
var TabsControl = ({ label }) => {
|
|
5281
|
-
return /* @__PURE__ */
|
|
5466
|
+
return /* @__PURE__ */ React87.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __62("Tabs", "elementor") }, /* @__PURE__ */ React87.createElement(TabsControlContent, { label }));
|
|
5282
5467
|
};
|
|
5283
5468
|
var TabsControlContent = ({ label }) => {
|
|
5284
5469
|
const { element } = useElement();
|
|
@@ -5322,7 +5507,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
5322
5507
|
});
|
|
5323
5508
|
}
|
|
5324
5509
|
};
|
|
5325
|
-
return /* @__PURE__ */
|
|
5510
|
+
return /* @__PURE__ */ React87.createElement(
|
|
5326
5511
|
Repeater,
|
|
5327
5512
|
{
|
|
5328
5513
|
showToggle: false,
|
|
@@ -5342,7 +5527,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
5342
5527
|
};
|
|
5343
5528
|
var ItemLabel = ({ value, index }) => {
|
|
5344
5529
|
const elementTitle = value?.title;
|
|
5345
|
-
return /* @__PURE__ */
|
|
5530
|
+
return /* @__PURE__ */ React87.createElement(Stack14, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React87.createElement("span", null, elementTitle), /* @__PURE__ */ React87.createElement(ItemDefaultTab, { index }));
|
|
5346
5531
|
};
|
|
5347
5532
|
var ItemDefaultTab = ({ index }) => {
|
|
5348
5533
|
const { value: defaultItem } = useBoundProp5(numberPropTypeUtil4);
|
|
@@ -5350,18 +5535,18 @@ var ItemDefaultTab = ({ index }) => {
|
|
|
5350
5535
|
if (!isDefault) {
|
|
5351
5536
|
return null;
|
|
5352
5537
|
}
|
|
5353
|
-
return /* @__PURE__ */
|
|
5538
|
+
return /* @__PURE__ */ React87.createElement(Chip4, { size: "tiny", shape: "rounded", label: __62("Default", "elementor") });
|
|
5354
5539
|
};
|
|
5355
5540
|
var ItemContent = ({ value, index }) => {
|
|
5356
5541
|
if (!value.id) {
|
|
5357
5542
|
return null;
|
|
5358
5543
|
}
|
|
5359
|
-
return /* @__PURE__ */
|
|
5544
|
+
return /* @__PURE__ */ React87.createElement(Stack14, { p: 2, gap: 1.5 }, /* @__PURE__ */ React87.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React87.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __62("Tabs", "elementor") }, /* @__PURE__ */ React87.createElement(DefaultTabControl, { tabIndex: index })));
|
|
5360
5545
|
};
|
|
5361
5546
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
5362
5547
|
const { value, setValue } = useBoundProp5(numberPropTypeUtil4);
|
|
5363
5548
|
const isDefault = value === tabIndex;
|
|
5364
|
-
return /* @__PURE__ */
|
|
5549
|
+
return /* @__PURE__ */ React87.createElement(Stack14, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React87.createElement(ControlFormLabel3, null, __62("Set as default tab", "elementor")), /* @__PURE__ */ React87.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React87.createElement(
|
|
5365
5550
|
Switch,
|
|
5366
5551
|
{
|
|
5367
5552
|
size: "small",
|
|
@@ -5379,7 +5564,7 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
5379
5564
|
var TabLabelControl = ({ elementId }) => {
|
|
5380
5565
|
const editorSettings = useElementEditorSettings(elementId);
|
|
5381
5566
|
const label = editorSettings?.title ?? "";
|
|
5382
|
-
return /* @__PURE__ */
|
|
5567
|
+
return /* @__PURE__ */ React87.createElement(Stack14, { gap: 1 }, /* @__PURE__ */ React87.createElement(ControlFormLabel3, null, __62("Tab name", "elementor")), /* @__PURE__ */ React87.createElement(
|
|
5383
5568
|
TextField2,
|
|
5384
5569
|
{
|
|
5385
5570
|
size: "tiny",
|
|
@@ -5400,22 +5585,22 @@ var ConditionalTooltip = ({
|
|
|
5400
5585
|
if (!showTooltip) {
|
|
5401
5586
|
return children;
|
|
5402
5587
|
}
|
|
5403
|
-
return /* @__PURE__ */
|
|
5588
|
+
return /* @__PURE__ */ React87.createElement(
|
|
5404
5589
|
Infotip,
|
|
5405
5590
|
{
|
|
5406
5591
|
arrow: false,
|
|
5407
|
-
content: /* @__PURE__ */
|
|
5592
|
+
content: /* @__PURE__ */ React87.createElement(
|
|
5408
5593
|
Alert2,
|
|
5409
5594
|
{
|
|
5410
5595
|
color: "secondary",
|
|
5411
|
-
icon: /* @__PURE__ */
|
|
5596
|
+
icon: /* @__PURE__ */ React87.createElement(InfoCircleFilledIcon, { fontSize: "tiny" }),
|
|
5412
5597
|
size: "small",
|
|
5413
5598
|
sx: { width: 288 }
|
|
5414
5599
|
},
|
|
5415
|
-
/* @__PURE__ */
|
|
5600
|
+
/* @__PURE__ */ React87.createElement(Typography4, { variant: "body2" }, __62("To change the default tab, simply set another tab as default.", "elementor"))
|
|
5416
5601
|
)
|
|
5417
5602
|
},
|
|
5418
|
-
/* @__PURE__ */
|
|
5603
|
+
/* @__PURE__ */ React87.createElement("span", null, children)
|
|
5419
5604
|
);
|
|
5420
5605
|
};
|
|
5421
5606
|
|
|
@@ -5441,7 +5626,7 @@ import {
|
|
|
5441
5626
|
import { controlActionsMenu as controlActionsMenu2 } from "@elementor/menus";
|
|
5442
5627
|
|
|
5443
5628
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5444
|
-
import * as
|
|
5629
|
+
import * as React88 from "react";
|
|
5445
5630
|
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp7 } from "@elementor/editor-controls";
|
|
5446
5631
|
import {
|
|
5447
5632
|
backgroundImageOverlayPropTypeUtil
|
|
@@ -5449,10 +5634,10 @@ import {
|
|
|
5449
5634
|
import { DatabaseIcon } from "@elementor/icons";
|
|
5450
5635
|
|
|
5451
5636
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5452
|
-
import { useMemo as
|
|
5637
|
+
import { useMemo as useMemo12 } from "react";
|
|
5453
5638
|
|
|
5454
5639
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5455
|
-
import { useMemo as
|
|
5640
|
+
import { useMemo as useMemo11 } from "react";
|
|
5456
5641
|
import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
5457
5642
|
|
|
5458
5643
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
@@ -5546,7 +5731,7 @@ var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
|
5546
5731
|
categories = propDynamicType?.settings.categories || [];
|
|
5547
5732
|
}
|
|
5548
5733
|
const categoriesKey = categories.join();
|
|
5549
|
-
return
|
|
5734
|
+
return useMemo11(
|
|
5550
5735
|
() => getDynamicTagsByCategories(categories, filterByLicense2),
|
|
5551
5736
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5552
5737
|
[categoriesKey, filterByLicense2]
|
|
@@ -5580,28 +5765,28 @@ var getDynamicTagsByCategories = (categories, filterByLicense2) => {
|
|
|
5580
5765
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5581
5766
|
var useDynamicTag = (tagName) => {
|
|
5582
5767
|
const dynamicTags = useAllPropDynamicTags();
|
|
5583
|
-
return
|
|
5768
|
+
return useMemo12(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
5584
5769
|
};
|
|
5585
5770
|
|
|
5586
5771
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5587
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
5772
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React88.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
5588
5773
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5589
5774
|
const context = useBoundProp7(backgroundImageOverlayPropTypeUtil);
|
|
5590
|
-
return /* @__PURE__ */
|
|
5775
|
+
return /* @__PURE__ */ React88.createElement(PropProvider4, { ...context, value: value.value }, /* @__PURE__ */ React88.createElement(PropKeyProvider4, { bind: "image" }, /* @__PURE__ */ React88.createElement(Wrapper2, { rawValue: value.value })));
|
|
5591
5776
|
};
|
|
5592
5777
|
var Wrapper2 = ({ rawValue }) => {
|
|
5593
5778
|
const { propType } = useBoundProp7();
|
|
5594
5779
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5595
|
-
return /* @__PURE__ */
|
|
5780
|
+
return /* @__PURE__ */ React88.createElement(PropProvider4, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React88.createElement(PropKeyProvider4, { bind: "src" }, /* @__PURE__ */ React88.createElement(Content, { rawValue: rawValue.image })));
|
|
5596
5781
|
};
|
|
5597
5782
|
var Content = ({ rawValue }) => {
|
|
5598
5783
|
const src = rawValue.value.src;
|
|
5599
5784
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
5600
|
-
return /* @__PURE__ */
|
|
5785
|
+
return /* @__PURE__ */ React88.createElement(React88.Fragment, null, dynamicTag?.label);
|
|
5601
5786
|
};
|
|
5602
5787
|
|
|
5603
5788
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5604
|
-
import * as
|
|
5789
|
+
import * as React92 from "react";
|
|
5605
5790
|
import {
|
|
5606
5791
|
ControlFormLabel as ControlFormLabel4,
|
|
5607
5792
|
PropKeyProvider as PropKeyProvider6,
|
|
@@ -5615,7 +5800,7 @@ import {
|
|
|
5615
5800
|
bindTrigger as bindTrigger2,
|
|
5616
5801
|
Box as Box6,
|
|
5617
5802
|
Divider as Divider8,
|
|
5618
|
-
Grid as
|
|
5803
|
+
Grid as Grid7,
|
|
5619
5804
|
IconButton as IconButton2,
|
|
5620
5805
|
Popover,
|
|
5621
5806
|
Stack as Stack16,
|
|
@@ -5626,7 +5811,7 @@ import {
|
|
|
5626
5811
|
usePopupState as usePopupState2,
|
|
5627
5812
|
useTabs as useTabs2
|
|
5628
5813
|
} from "@elementor/ui";
|
|
5629
|
-
import { __ as
|
|
5814
|
+
import { __ as __64 } from "@wordpress/i18n";
|
|
5630
5815
|
|
|
5631
5816
|
// src/hooks/use-persist-dynamic-value.ts
|
|
5632
5817
|
import { useSessionStorage as useSessionStorage5 } from "@elementor/session";
|
|
@@ -5637,12 +5822,12 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
5637
5822
|
};
|
|
5638
5823
|
|
|
5639
5824
|
// src/dynamics/dynamic-control.tsx
|
|
5640
|
-
import * as
|
|
5825
|
+
import * as React90 from "react";
|
|
5641
5826
|
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as useBoundProp8 } from "@elementor/editor-controls";
|
|
5642
5827
|
|
|
5643
5828
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5644
|
-
import * as
|
|
5645
|
-
import { useMemo as
|
|
5829
|
+
import * as React89 from "react";
|
|
5830
|
+
import { useMemo as useMemo13 } from "react";
|
|
5646
5831
|
import { isDependencyMet as isDependencyMet3 } from "@elementor/editor-props";
|
|
5647
5832
|
var DynamicConditionalControl = ({
|
|
5648
5833
|
children,
|
|
@@ -5650,7 +5835,7 @@ var DynamicConditionalControl = ({
|
|
|
5650
5835
|
propsSchema,
|
|
5651
5836
|
dynamicSettings
|
|
5652
5837
|
}) => {
|
|
5653
|
-
const defaults =
|
|
5838
|
+
const defaults = useMemo13(() => {
|
|
5654
5839
|
if (!propsSchema) {
|
|
5655
5840
|
return {};
|
|
5656
5841
|
}
|
|
@@ -5660,7 +5845,7 @@ var DynamicConditionalControl = ({
|
|
|
5660
5845
|
return result;
|
|
5661
5846
|
}, {});
|
|
5662
5847
|
}, [propsSchema]);
|
|
5663
|
-
const convertedSettings =
|
|
5848
|
+
const convertedSettings = useMemo13(() => {
|
|
5664
5849
|
if (!dynamicSettings) {
|
|
5665
5850
|
return {};
|
|
5666
5851
|
}
|
|
@@ -5679,14 +5864,14 @@ var DynamicConditionalControl = ({
|
|
|
5679
5864
|
{}
|
|
5680
5865
|
);
|
|
5681
5866
|
}, [dynamicSettings]);
|
|
5682
|
-
const effectiveSettings =
|
|
5867
|
+
const effectiveSettings = useMemo13(() => {
|
|
5683
5868
|
return { ...defaults, ...convertedSettings };
|
|
5684
5869
|
}, [defaults, convertedSettings]);
|
|
5685
5870
|
if (!propType?.dependencies?.terms.length) {
|
|
5686
|
-
return /* @__PURE__ */
|
|
5871
|
+
return /* @__PURE__ */ React89.createElement(React89.Fragment, null, children);
|
|
5687
5872
|
}
|
|
5688
5873
|
const isHidden = !isDependencyMet3(propType?.dependencies, effectiveSettings).isMet;
|
|
5689
|
-
return isHidden ? null : /* @__PURE__ */
|
|
5874
|
+
return isHidden ? null : /* @__PURE__ */ React89.createElement(React89.Fragment, null, children);
|
|
5690
5875
|
};
|
|
5691
5876
|
|
|
5692
5877
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -5711,7 +5896,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5711
5896
|
});
|
|
5712
5897
|
};
|
|
5713
5898
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5714
|
-
return /* @__PURE__ */
|
|
5899
|
+
return /* @__PURE__ */ React90.createElement(PropProvider5, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React90.createElement(PropKeyProvider5, { bind }, /* @__PURE__ */ React90.createElement(
|
|
5715
5900
|
DynamicConditionalControl,
|
|
5716
5901
|
{
|
|
5717
5902
|
propType: dynamicPropType,
|
|
@@ -5723,13 +5908,13 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5723
5908
|
};
|
|
5724
5909
|
|
|
5725
5910
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5726
|
-
import * as
|
|
5911
|
+
import * as React91 from "react";
|
|
5727
5912
|
import { Fragment as Fragment14, useEffect as useEffect8, useState as useState10 } from "react";
|
|
5728
5913
|
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
5729
5914
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField, SectionPopoverBody } from "@elementor/editor-ui";
|
|
5730
5915
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
5731
5916
|
import { Divider as Divider7, Link as Link2, Stack as Stack15, Typography as Typography5, useTheme as useTheme3 } from "@elementor/ui";
|
|
5732
|
-
import { __ as
|
|
5917
|
+
import { __ as __63 } from "@wordpress/i18n";
|
|
5733
5918
|
var SIZE2 = "tiny";
|
|
5734
5919
|
var PROMO_TEXT_WIDTH = 170;
|
|
5735
5920
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
@@ -5742,8 +5927,8 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5742
5927
|
const { bind, value: dynamicValue, setValue } = useBoundProp9(dynamicPropTypeUtil);
|
|
5743
5928
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
5744
5929
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5745
|
-
const
|
|
5746
|
-
const hasNoDynamicTags = !
|
|
5930
|
+
const options13 = useFilteredOptions(searchValue);
|
|
5931
|
+
const hasNoDynamicTags = !options13.length && !searchValue.trim();
|
|
5747
5932
|
useEffect8(() => {
|
|
5748
5933
|
if (hasNoDynamicTags) {
|
|
5749
5934
|
trackViewPromotion({ target_name: "dynamic_tags" });
|
|
@@ -5758,11 +5943,11 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5758
5943
|
if (!isCurrentValueDynamic) {
|
|
5759
5944
|
updatePropValueHistory(anyValue);
|
|
5760
5945
|
}
|
|
5761
|
-
const selectedOption =
|
|
5946
|
+
const selectedOption = options13.flatMap(([, items3]) => items3).find((item) => item.value === value);
|
|
5762
5947
|
setValue({ name: value, group: selectedOption?.group ?? "", settings: { label: selectedOption?.label } });
|
|
5763
5948
|
closePopover();
|
|
5764
5949
|
};
|
|
5765
|
-
const virtualizedItems =
|
|
5950
|
+
const virtualizedItems = options13.flatMap(([category, items3]) => [
|
|
5766
5951
|
{
|
|
5767
5952
|
type: "category",
|
|
5768
5953
|
value: category,
|
|
@@ -5776,19 +5961,19 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5776
5961
|
]);
|
|
5777
5962
|
const getPopOverContent = () => {
|
|
5778
5963
|
if (hasNoDynamicTags) {
|
|
5779
|
-
return /* @__PURE__ */
|
|
5964
|
+
return /* @__PURE__ */ React91.createElement(NoDynamicTags, null);
|
|
5780
5965
|
}
|
|
5781
5966
|
if (expired) {
|
|
5782
|
-
return /* @__PURE__ */
|
|
5967
|
+
return /* @__PURE__ */ React91.createElement(ExpiredDynamicTags, null);
|
|
5783
5968
|
}
|
|
5784
|
-
return /* @__PURE__ */
|
|
5969
|
+
return /* @__PURE__ */ React91.createElement(Fragment14, null, /* @__PURE__ */ React91.createElement(
|
|
5785
5970
|
SearchField,
|
|
5786
5971
|
{
|
|
5787
5972
|
value: searchValue,
|
|
5788
5973
|
onSearch: handleSearch,
|
|
5789
|
-
placeholder:
|
|
5974
|
+
placeholder: __63("Search dynamic tags\u2026", "elementor")
|
|
5790
5975
|
}
|
|
5791
|
-
), /* @__PURE__ */
|
|
5976
|
+
), /* @__PURE__ */ React91.createElement(Divider7, null), /* @__PURE__ */ React91.createElement(
|
|
5792
5977
|
PopoverMenuList,
|
|
5793
5978
|
{
|
|
5794
5979
|
items: virtualizedItems,
|
|
@@ -5796,20 +5981,20 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5796
5981
|
onClose: closePopover,
|
|
5797
5982
|
selectedValue: dynamicValue?.name,
|
|
5798
5983
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
5799
|
-
noResultsComponent: /* @__PURE__ */
|
|
5984
|
+
noResultsComponent: /* @__PURE__ */ React91.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
5800
5985
|
}
|
|
5801
5986
|
));
|
|
5802
5987
|
};
|
|
5803
|
-
return /* @__PURE__ */
|
|
5988
|
+
return /* @__PURE__ */ React91.createElement(SectionPopoverBody, { "aria-label": __63("Dynamic tags", "elementor") }, /* @__PURE__ */ React91.createElement(
|
|
5804
5989
|
PopoverHeader,
|
|
5805
5990
|
{
|
|
5806
|
-
title:
|
|
5991
|
+
title: __63("Dynamic tags", "elementor"),
|
|
5807
5992
|
onClose: closePopover,
|
|
5808
|
-
icon: /* @__PURE__ */
|
|
5993
|
+
icon: /* @__PURE__ */ React91.createElement(DatabaseIcon2, { fontSize: SIZE2 })
|
|
5809
5994
|
}
|
|
5810
5995
|
), getPopOverContent());
|
|
5811
5996
|
};
|
|
5812
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
5997
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React91.createElement(
|
|
5813
5998
|
Stack15,
|
|
5814
5999
|
{
|
|
5815
6000
|
gap: 1,
|
|
@@ -5820,11 +6005,11 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React88.createElem
|
|
|
5820
6005
|
color: "text.secondary",
|
|
5821
6006
|
sx: { pb: 3.5 }
|
|
5822
6007
|
},
|
|
5823
|
-
/* @__PURE__ */
|
|
5824
|
-
/* @__PURE__ */
|
|
5825
|
-
/* @__PURE__ */
|
|
6008
|
+
/* @__PURE__ */ React91.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
6009
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "subtitle2" }, __63("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React91.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
6010
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, __63("Try something else.", "elementor"), /* @__PURE__ */ React91.createElement(Link2, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __63("Clear & try again", "elementor")))
|
|
5826
6011
|
);
|
|
5827
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
6012
|
+
var NoDynamicTags = () => /* @__PURE__ */ React91.createElement(React91.Fragment, null, /* @__PURE__ */ React91.createElement(Divider7, null), /* @__PURE__ */ React91.createElement(
|
|
5828
6013
|
Stack15,
|
|
5829
6014
|
{
|
|
5830
6015
|
gap: 1,
|
|
@@ -5835,10 +6020,10 @@ var NoDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fragment
|
|
|
5835
6020
|
color: "text.secondary",
|
|
5836
6021
|
sx: { pb: 3.5 }
|
|
5837
6022
|
},
|
|
5838
|
-
/* @__PURE__ */
|
|
5839
|
-
/* @__PURE__ */
|
|
5840
|
-
/* @__PURE__ */
|
|
5841
|
-
/* @__PURE__ */
|
|
6023
|
+
/* @__PURE__ */ React91.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
6024
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "subtitle2" }, __63("Streamline your workflow with dynamic tags", "elementor")),
|
|
6025
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __63("Upgrade now to display your content dynamically.", "elementor")),
|
|
6026
|
+
/* @__PURE__ */ React91.createElement(
|
|
5842
6027
|
CtaButton,
|
|
5843
6028
|
{
|
|
5844
6029
|
size: "small",
|
|
@@ -5847,7 +6032,7 @@ var NoDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fragment
|
|
|
5847
6032
|
}
|
|
5848
6033
|
)
|
|
5849
6034
|
));
|
|
5850
|
-
var ExpiredDynamicTags = () => /* @__PURE__ */
|
|
6035
|
+
var ExpiredDynamicTags = () => /* @__PURE__ */ React91.createElement(React91.Fragment, null, /* @__PURE__ */ React91.createElement(Divider7, null), /* @__PURE__ */ React91.createElement(
|
|
5851
6036
|
Stack15,
|
|
5852
6037
|
{
|
|
5853
6038
|
gap: 1,
|
|
@@ -5858,22 +6043,22 @@ var ExpiredDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fra
|
|
|
5858
6043
|
color: "text.secondary",
|
|
5859
6044
|
sx: { pb: 3.5 }
|
|
5860
6045
|
},
|
|
5861
|
-
/* @__PURE__ */
|
|
5862
|
-
/* @__PURE__ */
|
|
5863
|
-
/* @__PURE__ */
|
|
5864
|
-
/* @__PURE__ */
|
|
6046
|
+
/* @__PURE__ */ React91.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
6047
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "subtitle2" }, __63("Unlock your Dynamic tags again", "elementor")),
|
|
6048
|
+
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __63("Dynamic tags need Elementor Pro. Renew now to keep them active.", "elementor")),
|
|
6049
|
+
/* @__PURE__ */ React91.createElement(
|
|
5865
6050
|
CtaButton,
|
|
5866
6051
|
{
|
|
5867
6052
|
size: "small",
|
|
5868
6053
|
href: RENEW_DYNAMIC_TAGS_URL,
|
|
5869
6054
|
onClick: () => trackUpgradePromotionClick({ target_name: "dynamic_tags" }),
|
|
5870
|
-
children:
|
|
6055
|
+
children: __63("Renew Now", "elementor")
|
|
5871
6056
|
}
|
|
5872
6057
|
)
|
|
5873
6058
|
));
|
|
5874
6059
|
var useFilteredOptions = (searchValue) => {
|
|
5875
6060
|
const dynamicTags = usePropDynamicTags();
|
|
5876
|
-
const
|
|
6061
|
+
const options13 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
5877
6062
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
5878
6063
|
if (!isVisible) {
|
|
5879
6064
|
return categories;
|
|
@@ -5884,7 +6069,7 @@ var useFilteredOptions = (searchValue) => {
|
|
|
5884
6069
|
categories.get(group)?.push({ label, group, value: name });
|
|
5885
6070
|
return categories;
|
|
5886
6071
|
}, /* @__PURE__ */ new Map());
|
|
5887
|
-
return [...
|
|
6072
|
+
return [...options13];
|
|
5888
6073
|
};
|
|
5889
6074
|
|
|
5890
6075
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
@@ -5904,7 +6089,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5904
6089
|
const { name: tagName = "" } = value;
|
|
5905
6090
|
const dynamicTag = useDynamicTag(tagName);
|
|
5906
6091
|
if (!isDynamicTagSupported(tagName) && OriginalControl) {
|
|
5907
|
-
return /* @__PURE__ */
|
|
6092
|
+
return /* @__PURE__ */ React92.createElement(PropProvider6, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React92.createElement(PropKeyProvider6, { bind }, /* @__PURE__ */ React92.createElement(OriginalControl, { ...props })));
|
|
5908
6093
|
}
|
|
5909
6094
|
const removeDynamicTag = () => {
|
|
5910
6095
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -5912,25 +6097,25 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5912
6097
|
if (!dynamicTag) {
|
|
5913
6098
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
5914
6099
|
}
|
|
5915
|
-
return /* @__PURE__ */
|
|
6100
|
+
return /* @__PURE__ */ React92.createElement(Box6, null, /* @__PURE__ */ React92.createElement(
|
|
5916
6101
|
Tag,
|
|
5917
6102
|
{
|
|
5918
6103
|
fullWidth: true,
|
|
5919
6104
|
showActionsOnHover: true,
|
|
5920
6105
|
label: dynamicTag.label,
|
|
5921
|
-
startIcon: /* @__PURE__ */
|
|
6106
|
+
startIcon: /* @__PURE__ */ React92.createElement(DatabaseIcon3, { fontSize: SIZE3 }),
|
|
5922
6107
|
...bindTrigger2(selectionPopoverState),
|
|
5923
|
-
actions: /* @__PURE__ */
|
|
6108
|
+
actions: /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(DynamicSettingsPopover, { dynamicTag, disabled: readonly }), /* @__PURE__ */ React92.createElement(
|
|
5924
6109
|
IconButton2,
|
|
5925
6110
|
{
|
|
5926
6111
|
size: SIZE3,
|
|
5927
6112
|
onClick: removeDynamicTag,
|
|
5928
|
-
"aria-label":
|
|
6113
|
+
"aria-label": __64("Remove dynamic value", "elementor")
|
|
5929
6114
|
},
|
|
5930
|
-
/* @__PURE__ */
|
|
6115
|
+
/* @__PURE__ */ React92.createElement(XIcon, { fontSize: SIZE3 })
|
|
5931
6116
|
))
|
|
5932
6117
|
}
|
|
5933
|
-
), /* @__PURE__ */
|
|
6118
|
+
), /* @__PURE__ */ React92.createElement(
|
|
5934
6119
|
Popover,
|
|
5935
6120
|
{
|
|
5936
6121
|
disablePortal: true,
|
|
@@ -5942,7 +6127,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5942
6127
|
},
|
|
5943
6128
|
...bindPopover(selectionPopoverState)
|
|
5944
6129
|
},
|
|
5945
|
-
/* @__PURE__ */
|
|
6130
|
+
/* @__PURE__ */ React92.createElement(SectionPopoverBody2, { "aria-label": __64("Dynamic tags", "elementor") }, /* @__PURE__ */ React92.createElement(DynamicSelection, { close: selectionPopoverState.close, expired: readonly }))
|
|
5946
6131
|
));
|
|
5947
6132
|
};
|
|
5948
6133
|
var DynamicSettingsPopover = ({
|
|
@@ -5954,16 +6139,16 @@ var DynamicSettingsPopover = ({
|
|
|
5954
6139
|
if (!hasDynamicSettings) {
|
|
5955
6140
|
return null;
|
|
5956
6141
|
}
|
|
5957
|
-
return /* @__PURE__ */
|
|
6142
|
+
return /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(
|
|
5958
6143
|
IconButton2,
|
|
5959
6144
|
{
|
|
5960
6145
|
size: SIZE3,
|
|
5961
6146
|
disabled,
|
|
5962
6147
|
...!disabled && bindTrigger2(popupState),
|
|
5963
|
-
"aria-label":
|
|
6148
|
+
"aria-label": __64("Dynamic settings", "elementor")
|
|
5964
6149
|
},
|
|
5965
|
-
/* @__PURE__ */
|
|
5966
|
-
), /* @__PURE__ */
|
|
6150
|
+
/* @__PURE__ */ React92.createElement(SettingsIcon, { fontSize: SIZE3 })
|
|
6151
|
+
), /* @__PURE__ */ React92.createElement(
|
|
5967
6152
|
Popover,
|
|
5968
6153
|
{
|
|
5969
6154
|
disablePortal: true,
|
|
@@ -5975,14 +6160,14 @@ var DynamicSettingsPopover = ({
|
|
|
5975
6160
|
},
|
|
5976
6161
|
...bindPopover(popupState)
|
|
5977
6162
|
},
|
|
5978
|
-
/* @__PURE__ */
|
|
6163
|
+
/* @__PURE__ */ React92.createElement(SectionPopoverBody2, { "aria-label": __64("Dynamic settings", "elementor") }, /* @__PURE__ */ React92.createElement(
|
|
5979
6164
|
PopoverHeader2,
|
|
5980
6165
|
{
|
|
5981
6166
|
title: dynamicTag.label,
|
|
5982
6167
|
onClose: popupState.close,
|
|
5983
|
-
icon: /* @__PURE__ */
|
|
6168
|
+
icon: /* @__PURE__ */ React92.createElement(DatabaseIcon3, { fontSize: SIZE3 })
|
|
5984
6169
|
}
|
|
5985
|
-
), /* @__PURE__ */
|
|
6170
|
+
), /* @__PURE__ */ React92.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls, tagName: dynamicTag.name }))
|
|
5986
6171
|
));
|
|
5987
6172
|
};
|
|
5988
6173
|
var DynamicSettings = ({ controls, tagName }) => {
|
|
@@ -5993,9 +6178,9 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
5993
6178
|
}
|
|
5994
6179
|
if (tagsWithoutTabs.includes(tagName)) {
|
|
5995
6180
|
const singleTab = tabs[0];
|
|
5996
|
-
return /* @__PURE__ */
|
|
6181
|
+
return /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(Divider8, null), /* @__PURE__ */ React92.createElement(ControlsItemsStack, { items: singleTab.value.items }));
|
|
5997
6182
|
}
|
|
5998
|
-
return /* @__PURE__ */
|
|
6183
|
+
return /* @__PURE__ */ React92.createElement(React92.Fragment, null, tabs.length > 1 && /* @__PURE__ */ React92.createElement(Tabs2, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React92.createElement(
|
|
5999
6184
|
Tab2,
|
|
6000
6185
|
{
|
|
6001
6186
|
key: index,
|
|
@@ -6003,15 +6188,15 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
6003
6188
|
sx: { px: 1, py: 0.5 },
|
|
6004
6189
|
...getTabProps(index)
|
|
6005
6190
|
}
|
|
6006
|
-
))), /* @__PURE__ */
|
|
6007
|
-
return /* @__PURE__ */
|
|
6191
|
+
))), /* @__PURE__ */ React92.createElement(Divider8, null), tabs.map(({ value }, index) => {
|
|
6192
|
+
return /* @__PURE__ */ React92.createElement(
|
|
6008
6193
|
TabPanel2,
|
|
6009
6194
|
{
|
|
6010
6195
|
key: index,
|
|
6011
6196
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
6012
6197
|
...getTabPanelProps(index)
|
|
6013
6198
|
},
|
|
6014
|
-
/* @__PURE__ */
|
|
6199
|
+
/* @__PURE__ */ React92.createElement(ControlsItemsStack, { items: value.items })
|
|
6015
6200
|
);
|
|
6016
6201
|
}));
|
|
6017
6202
|
};
|
|
@@ -6053,11 +6238,11 @@ var Control2 = ({ control }) => {
|
|
|
6053
6238
|
display: "grid",
|
|
6054
6239
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
6055
6240
|
} : {};
|
|
6056
|
-
return /* @__PURE__ */
|
|
6241
|
+
return /* @__PURE__ */ React92.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React92.createElement(Grid7, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React92.createElement(Grid7, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(ControlFormLabel4, null, control.label)) : null, /* @__PURE__ */ React92.createElement(Grid7, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(Control, { type: control.type, props: controlProps }))));
|
|
6057
6242
|
};
|
|
6058
6243
|
function ControlsItemsStack({ items: items3 }) {
|
|
6059
|
-
return /* @__PURE__ */
|
|
6060
|
-
(item) => item.type === "control" ? /* @__PURE__ */
|
|
6244
|
+
return /* @__PURE__ */ React92.createElement(Stack16, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
6245
|
+
(item) => item.type === "control" ? /* @__PURE__ */ React92.createElement(Control2, { key: item.value.bind, control: item.value }) : null
|
|
6061
6246
|
));
|
|
6062
6247
|
}
|
|
6063
6248
|
|
|
@@ -6110,18 +6295,18 @@ function getDynamicValue(name, settings) {
|
|
|
6110
6295
|
}
|
|
6111
6296
|
|
|
6112
6297
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
6113
|
-
import * as
|
|
6298
|
+
import * as React93 from "react";
|
|
6114
6299
|
import { useBoundProp as useBoundProp11 } from "@elementor/editor-controls";
|
|
6115
6300
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
6116
|
-
import { __ as
|
|
6301
|
+
import { __ as __65 } from "@wordpress/i18n";
|
|
6117
6302
|
var usePropDynamicAction = () => {
|
|
6118
6303
|
const { propType } = useBoundProp11();
|
|
6119
6304
|
const visible = !!propType && supportsDynamic(propType);
|
|
6120
6305
|
return {
|
|
6121
6306
|
visible,
|
|
6122
6307
|
icon: DatabaseIcon4,
|
|
6123
|
-
title:
|
|
6124
|
-
content: ({ close }) => /* @__PURE__ */
|
|
6308
|
+
title: __65("Dynamic tags", "elementor"),
|
|
6309
|
+
content: ({ close }) => /* @__PURE__ */ React93.createElement(DynamicSelection, { close })
|
|
6125
6310
|
};
|
|
6126
6311
|
};
|
|
6127
6312
|
|
|
@@ -6156,7 +6341,7 @@ import { useBoundProp as useBoundProp12 } from "@elementor/editor-controls";
|
|
|
6156
6341
|
import { hasVariable as hasVariable2 } from "@elementor/editor-variables";
|
|
6157
6342
|
import { BrushBigIcon } from "@elementor/icons";
|
|
6158
6343
|
import { controlActionsMenu as controlActionsMenu3 } from "@elementor/menus";
|
|
6159
|
-
import { __ as
|
|
6344
|
+
import { __ as __66 } from "@wordpress/i18n";
|
|
6160
6345
|
|
|
6161
6346
|
// src/utils/is-equal.ts
|
|
6162
6347
|
function isEqual(a, b) {
|
|
@@ -6232,22 +6417,22 @@ function useResetStyleValueProps() {
|
|
|
6232
6417
|
const visible = calculateVisibility();
|
|
6233
6418
|
return {
|
|
6234
6419
|
visible,
|
|
6235
|
-
title:
|
|
6420
|
+
title: __66("Clear", "elementor"),
|
|
6236
6421
|
icon: BrushBigIcon,
|
|
6237
6422
|
onClick: () => resetValue()
|
|
6238
6423
|
};
|
|
6239
6424
|
}
|
|
6240
6425
|
|
|
6241
6426
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6242
|
-
import * as
|
|
6427
|
+
import * as React99 from "react";
|
|
6243
6428
|
import { useBoundProp as useBoundProp13 } from "@elementor/editor-controls";
|
|
6244
6429
|
import { isEmpty as isEmpty2 } from "@elementor/editor-props";
|
|
6245
6430
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
6246
|
-
import { __ as
|
|
6431
|
+
import { __ as __70 } from "@wordpress/i18n";
|
|
6247
6432
|
|
|
6248
6433
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6249
|
-
import * as
|
|
6250
|
-
import { useMemo as
|
|
6434
|
+
import * as React98 from "react";
|
|
6435
|
+
import { useMemo as useMemo14, useRef as useRef18, useState as useState12 } from "react";
|
|
6251
6436
|
import {
|
|
6252
6437
|
createPropsResolver as createPropsResolver2,
|
|
6253
6438
|
stylesInheritanceTransformersRegistry
|
|
@@ -6262,9 +6447,9 @@ import {
|
|
|
6262
6447
|
IconButton as IconButton3,
|
|
6263
6448
|
Infotip as Infotip2,
|
|
6264
6449
|
Stack as Stack17,
|
|
6265
|
-
Tooltip as
|
|
6450
|
+
Tooltip as Tooltip6
|
|
6266
6451
|
} from "@elementor/ui";
|
|
6267
|
-
import { __ as
|
|
6452
|
+
import { __ as __69 } from "@wordpress/i18n";
|
|
6268
6453
|
|
|
6269
6454
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6270
6455
|
import { isValidElement, useEffect as useEffect9, useState as useState11 } from "react";
|
|
@@ -6274,7 +6459,7 @@ import {
|
|
|
6274
6459
|
isPseudoState
|
|
6275
6460
|
} from "@elementor/editor-styles";
|
|
6276
6461
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2 } from "@elementor/editor-styles-repository";
|
|
6277
|
-
import { __ as
|
|
6462
|
+
import { __ as __67 } from "@wordpress/i18n";
|
|
6278
6463
|
var MAXIMUM_ITEMS = 2;
|
|
6279
6464
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
6280
6465
|
const [items3, setItems] = useState11([]);
|
|
@@ -6285,7 +6470,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
6285
6470
|
);
|
|
6286
6471
|
const validItems = normalizedItems.map((item) => ({
|
|
6287
6472
|
...item,
|
|
6288
|
-
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel :
|
|
6473
|
+
displayLabel: ELEMENTS_BASE_STYLES_PROVIDER_KEY2 !== item.provider ? item.displayLabel : __67("Base", "elementor")
|
|
6289
6474
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
6290
6475
|
setItems(validItems);
|
|
6291
6476
|
})();
|
|
@@ -6342,7 +6527,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
6342
6527
|
};
|
|
6343
6528
|
|
|
6344
6529
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
6345
|
-
import * as
|
|
6530
|
+
import * as React94 from "react";
|
|
6346
6531
|
import { useBreakpoints } from "@elementor/editor-responsive";
|
|
6347
6532
|
import {
|
|
6348
6533
|
DesktopIcon,
|
|
@@ -6353,7 +6538,7 @@ import {
|
|
|
6353
6538
|
TabletPortraitIcon,
|
|
6354
6539
|
WidescreenIcon
|
|
6355
6540
|
} from "@elementor/icons";
|
|
6356
|
-
import { Tooltip as
|
|
6541
|
+
import { Tooltip as Tooltip3 } from "@elementor/ui";
|
|
6357
6542
|
var SIZE4 = "tiny";
|
|
6358
6543
|
var DEFAULT_BREAKPOINT3 = "desktop";
|
|
6359
6544
|
var breakpointIconMap = {
|
|
@@ -6373,20 +6558,20 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
6373
6558
|
return null;
|
|
6374
6559
|
}
|
|
6375
6560
|
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
6376
|
-
return /* @__PURE__ */
|
|
6561
|
+
return /* @__PURE__ */ React94.createElement(Tooltip3, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React94.createElement(IconComponent, { fontSize: SIZE4, sx: { mt: "2px" } }));
|
|
6377
6562
|
};
|
|
6378
6563
|
|
|
6379
6564
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
6380
|
-
import * as
|
|
6565
|
+
import * as React95 from "react";
|
|
6381
6566
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY3 } from "@elementor/editor-styles-repository";
|
|
6382
6567
|
import { InfoCircleIcon } from "@elementor/icons";
|
|
6383
|
-
import { Chip as Chip5, Tooltip as
|
|
6384
|
-
import { __ as
|
|
6568
|
+
import { Chip as Chip5, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
6569
|
+
import { __ as __68 } from "@wordpress/i18n";
|
|
6385
6570
|
var SIZE5 = "tiny";
|
|
6386
6571
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
6387
6572
|
const isBaseStyle = provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY3;
|
|
6388
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */
|
|
6389
|
-
return /* @__PURE__ */
|
|
6573
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React95.createElement(Tooltip4, { title: __68("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React95.createElement(InfoCircleIcon, { fontSize: SIZE5 })) : void 0;
|
|
6574
|
+
return /* @__PURE__ */ React95.createElement(
|
|
6390
6575
|
Chip5,
|
|
6391
6576
|
{
|
|
6392
6577
|
label: displayLabel,
|
|
@@ -6412,10 +6597,10 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
6412
6597
|
};
|
|
6413
6598
|
|
|
6414
6599
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
6415
|
-
import * as
|
|
6416
|
-
import { Tooltip as
|
|
6600
|
+
import * as React96 from "react";
|
|
6601
|
+
import { Tooltip as Tooltip5, Typography as Typography6 } from "@elementor/ui";
|
|
6417
6602
|
var ValueComponent = ({ index, value }) => {
|
|
6418
|
-
return /* @__PURE__ */
|
|
6603
|
+
return /* @__PURE__ */ React96.createElement(Tooltip5, { title: value, placement: "top" }, /* @__PURE__ */ React96.createElement(
|
|
6419
6604
|
Typography6,
|
|
6420
6605
|
{
|
|
6421
6606
|
variant: "caption",
|
|
@@ -6437,9 +6622,9 @@ var ValueComponent = ({ index, value }) => {
|
|
|
6437
6622
|
};
|
|
6438
6623
|
|
|
6439
6624
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
6440
|
-
import * as
|
|
6625
|
+
import * as React97 from "react";
|
|
6441
6626
|
import { Box as Box7 } from "@elementor/ui";
|
|
6442
|
-
var ActionIcons = () => /* @__PURE__ */
|
|
6627
|
+
var ActionIcons = () => /* @__PURE__ */ React97.createElement(Box7, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
6443
6628
|
|
|
6444
6629
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6445
6630
|
var SECTION_PADDING_INLINE = 32;
|
|
@@ -6453,7 +6638,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6453
6638
|
isDisabled
|
|
6454
6639
|
}) => {
|
|
6455
6640
|
const [showInfotip, setShowInfotip] = useState12(false);
|
|
6456
|
-
const triggerRef =
|
|
6641
|
+
const triggerRef = useRef18(null);
|
|
6457
6642
|
const toggleInfotip = () => {
|
|
6458
6643
|
if (isDisabled) {
|
|
6459
6644
|
return;
|
|
@@ -6468,14 +6653,14 @@ var StylesInheritanceInfotip = ({
|
|
|
6468
6653
|
};
|
|
6469
6654
|
const key = path.join(".");
|
|
6470
6655
|
const sectionWidth = useSectionWidth2();
|
|
6471
|
-
const resolve =
|
|
6656
|
+
const resolve = useMemo14(() => {
|
|
6472
6657
|
return createPropsResolver2({
|
|
6473
6658
|
transformers: stylesInheritanceTransformersRegistry,
|
|
6474
6659
|
schema: { [key]: propType }
|
|
6475
6660
|
});
|
|
6476
6661
|
}, [key, propType]);
|
|
6477
6662
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
6478
|
-
const infotipContent = /* @__PURE__ */
|
|
6663
|
+
const infotipContent = /* @__PURE__ */ React98.createElement(ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React98.createElement(
|
|
6479
6664
|
Card,
|
|
6480
6665
|
{
|
|
6481
6666
|
elevation: 0,
|
|
@@ -6488,7 +6673,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6488
6673
|
flexDirection: "column"
|
|
6489
6674
|
}
|
|
6490
6675
|
},
|
|
6491
|
-
/* @__PURE__ */
|
|
6676
|
+
/* @__PURE__ */ React98.createElement(
|
|
6492
6677
|
Box8,
|
|
6493
6678
|
{
|
|
6494
6679
|
sx: {
|
|
@@ -6498,9 +6683,9 @@ var StylesInheritanceInfotip = ({
|
|
|
6498
6683
|
backgroundColor: "background.paper"
|
|
6499
6684
|
}
|
|
6500
6685
|
},
|
|
6501
|
-
/* @__PURE__ */
|
|
6686
|
+
/* @__PURE__ */ React98.createElement(PopoverHeader3, { title: __69("Style origin", "elementor"), onClose: closeInfotip })
|
|
6502
6687
|
),
|
|
6503
|
-
/* @__PURE__ */
|
|
6688
|
+
/* @__PURE__ */ React98.createElement(
|
|
6504
6689
|
CardContent,
|
|
6505
6690
|
{
|
|
6506
6691
|
sx: {
|
|
@@ -6514,39 +6699,39 @@ var StylesInheritanceInfotip = ({
|
|
|
6514
6699
|
}
|
|
6515
6700
|
}
|
|
6516
6701
|
},
|
|
6517
|
-
/* @__PURE__ */
|
|
6518
|
-
return /* @__PURE__ */
|
|
6702
|
+
/* @__PURE__ */ React98.createElement(Stack17, { gap: 1.5, sx: { pl: 2, pr: 1, pt: 1.5, pb: 1.5 }, role: "list" }, items3.map((item, index) => {
|
|
6703
|
+
return /* @__PURE__ */ React98.createElement(
|
|
6519
6704
|
Box8,
|
|
6520
6705
|
{
|
|
6521
6706
|
key: item.id,
|
|
6522
6707
|
display: "flex",
|
|
6523
6708
|
gap: 0.5,
|
|
6524
6709
|
role: "listitem",
|
|
6525
|
-
"aria-label":
|
|
6710
|
+
"aria-label": __69("Inheritance item: %s", "elementor").replace(
|
|
6526
6711
|
"%s",
|
|
6527
6712
|
item.displayLabel
|
|
6528
6713
|
)
|
|
6529
6714
|
},
|
|
6530
|
-
/* @__PURE__ */
|
|
6715
|
+
/* @__PURE__ */ React98.createElement(
|
|
6531
6716
|
Box8,
|
|
6532
6717
|
{
|
|
6533
6718
|
display: "flex",
|
|
6534
6719
|
gap: 0.5,
|
|
6535
6720
|
sx: { flexWrap: "wrap", width: "100%", alignItems: "flex-start" }
|
|
6536
6721
|
},
|
|
6537
|
-
/* @__PURE__ */
|
|
6538
|
-
/* @__PURE__ */
|
|
6539
|
-
/* @__PURE__ */
|
|
6722
|
+
/* @__PURE__ */ React98.createElement(BreakpointIcon, { breakpoint: item.breakpoint }),
|
|
6723
|
+
/* @__PURE__ */ React98.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }),
|
|
6724
|
+
/* @__PURE__ */ React98.createElement(ValueComponent, { index, value: item.value })
|
|
6540
6725
|
),
|
|
6541
|
-
/* @__PURE__ */
|
|
6726
|
+
/* @__PURE__ */ React98.createElement(ActionIcons, null)
|
|
6542
6727
|
);
|
|
6543
6728
|
}))
|
|
6544
6729
|
)
|
|
6545
6730
|
));
|
|
6546
6731
|
if (isDisabled) {
|
|
6547
|
-
return /* @__PURE__ */
|
|
6732
|
+
return /* @__PURE__ */ React98.createElement(Box8, { sx: { display: "inline-flex" } }, children);
|
|
6548
6733
|
}
|
|
6549
|
-
return /* @__PURE__ */
|
|
6734
|
+
return /* @__PURE__ */ React98.createElement(Box8, { ref: triggerRef, sx: { display: "inline-flex" } }, /* @__PURE__ */ React98.createElement(
|
|
6550
6735
|
TooltipOrInfotip,
|
|
6551
6736
|
{
|
|
6552
6737
|
showInfotip,
|
|
@@ -6554,7 +6739,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6554
6739
|
infotipContent,
|
|
6555
6740
|
isDisabled
|
|
6556
6741
|
},
|
|
6557
|
-
/* @__PURE__ */
|
|
6742
|
+
/* @__PURE__ */ React98.createElement(
|
|
6558
6743
|
IconButton3,
|
|
6559
6744
|
{
|
|
6560
6745
|
onClick: toggleInfotip,
|
|
@@ -6574,10 +6759,10 @@ function TooltipOrInfotip({
|
|
|
6574
6759
|
isDisabled
|
|
6575
6760
|
}) {
|
|
6576
6761
|
if (isDisabled) {
|
|
6577
|
-
return /* @__PURE__ */
|
|
6762
|
+
return /* @__PURE__ */ React98.createElement(Box8, { sx: { display: "inline-flex" } }, children);
|
|
6578
6763
|
}
|
|
6579
6764
|
if (showInfotip) {
|
|
6580
|
-
return /* @__PURE__ */
|
|
6765
|
+
return /* @__PURE__ */ React98.createElement(React98.Fragment, null, /* @__PURE__ */ React98.createElement(
|
|
6581
6766
|
Backdrop,
|
|
6582
6767
|
{
|
|
6583
6768
|
open: showInfotip,
|
|
@@ -6587,7 +6772,7 @@ function TooltipOrInfotip({
|
|
|
6587
6772
|
zIndex: (theme) => theme.zIndex.modal - 1
|
|
6588
6773
|
}
|
|
6589
6774
|
}
|
|
6590
|
-
), /* @__PURE__ */
|
|
6775
|
+
), /* @__PURE__ */ React98.createElement(
|
|
6591
6776
|
Infotip2,
|
|
6592
6777
|
{
|
|
6593
6778
|
placement: "top-end",
|
|
@@ -6599,7 +6784,7 @@ function TooltipOrInfotip({
|
|
|
6599
6784
|
children
|
|
6600
6785
|
));
|
|
6601
6786
|
}
|
|
6602
|
-
return /* @__PURE__ */
|
|
6787
|
+
return /* @__PURE__ */ React98.createElement(Tooltip6, { title: __69("Style origin", "elementor"), placement: "top" }, children);
|
|
6603
6788
|
}
|
|
6604
6789
|
|
|
6605
6790
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
@@ -6612,7 +6797,7 @@ var StylesInheritanceIndicator = ({
|
|
|
6612
6797
|
if (!path || !inheritanceChain.length) {
|
|
6613
6798
|
return null;
|
|
6614
6799
|
}
|
|
6615
|
-
return /* @__PURE__ */
|
|
6800
|
+
return /* @__PURE__ */ React99.createElement(Indicator, { inheritanceChain, path, propType });
|
|
6616
6801
|
};
|
|
6617
6802
|
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
6618
6803
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
@@ -6628,7 +6813,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6628
6813
|
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
6629
6814
|
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
6630
6815
|
};
|
|
6631
|
-
return /* @__PURE__ */
|
|
6816
|
+
return /* @__PURE__ */ React99.createElement(
|
|
6632
6817
|
StylesInheritanceInfotip,
|
|
6633
6818
|
{
|
|
6634
6819
|
inheritanceChain,
|
|
@@ -6637,17 +6822,17 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6637
6822
|
label,
|
|
6638
6823
|
isDisabled
|
|
6639
6824
|
},
|
|
6640
|
-
/* @__PURE__ */
|
|
6825
|
+
/* @__PURE__ */ React99.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
6641
6826
|
);
|
|
6642
6827
|
};
|
|
6643
6828
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
6644
6829
|
if (isFinalValue) {
|
|
6645
|
-
return
|
|
6830
|
+
return __70("This is the final value", "elementor");
|
|
6646
6831
|
}
|
|
6647
6832
|
if (hasValue) {
|
|
6648
|
-
return
|
|
6833
|
+
return __70("This value is overridden by another style", "elementor");
|
|
6649
6834
|
}
|
|
6650
|
-
return
|
|
6835
|
+
return __70("This has value from another style", "elementor");
|
|
6651
6836
|
};
|
|
6652
6837
|
|
|
6653
6838
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -6672,7 +6857,7 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
6672
6857
|
]);
|
|
6673
6858
|
|
|
6674
6859
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
6675
|
-
import * as
|
|
6860
|
+
import * as React100 from "react";
|
|
6676
6861
|
import { createTransformer as createTransformer2 } from "@elementor/editor-canvas";
|
|
6677
6862
|
var arrayTransformer = createTransformer2((values) => {
|
|
6678
6863
|
if (!values || values.length === 0) {
|
|
@@ -6682,16 +6867,16 @@ var arrayTransformer = createTransformer2((values) => {
|
|
|
6682
6867
|
if (allStrings) {
|
|
6683
6868
|
return values.join(" ");
|
|
6684
6869
|
}
|
|
6685
|
-
return /* @__PURE__ */
|
|
6870
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, values.map((item, index) => /* @__PURE__ */ React100.createElement(React100.Fragment, { key: index }, index > 0 && " ", item)));
|
|
6686
6871
|
});
|
|
6687
6872
|
|
|
6688
6873
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
6689
|
-
import * as
|
|
6874
|
+
import * as React101 from "react";
|
|
6690
6875
|
import { createTransformer as createTransformer3 } from "@elementor/editor-canvas";
|
|
6691
6876
|
import { Stack as Stack18, styled as styled6, UnstableColorIndicator } from "@elementor/ui";
|
|
6692
|
-
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */
|
|
6877
|
+
var backgroundColorOverlayTransformer = createTransformer3((value) => /* @__PURE__ */ React101.createElement(Stack18, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React101.createElement(ItemLabelColor, { value })));
|
|
6693
6878
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
6694
|
-
return /* @__PURE__ */
|
|
6879
|
+
return /* @__PURE__ */ React101.createElement("span", null, color);
|
|
6695
6880
|
};
|
|
6696
6881
|
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator)(({ theme }) => ({
|
|
6697
6882
|
width: "1em",
|
|
@@ -6702,20 +6887,20 @@ var StyledUnstableColorIndicator = styled6(UnstableColorIndicator)(({ theme }) =
|
|
|
6702
6887
|
}));
|
|
6703
6888
|
|
|
6704
6889
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
6705
|
-
import * as
|
|
6890
|
+
import * as React102 from "react";
|
|
6706
6891
|
import { createTransformer as createTransformer4 } from "@elementor/editor-canvas";
|
|
6707
6892
|
import { Stack as Stack19 } from "@elementor/ui";
|
|
6708
|
-
import { __ as
|
|
6709
|
-
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */
|
|
6893
|
+
import { __ as __71 } from "@wordpress/i18n";
|
|
6894
|
+
var backgroundGradientOverlayTransformer = createTransformer4((value) => /* @__PURE__ */ React102.createElement(Stack19, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React102.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React102.createElement(ItemLabelGradient, { value })));
|
|
6710
6895
|
var ItemIconGradient = ({ value }) => {
|
|
6711
6896
|
const gradient = getGradientValue(value);
|
|
6712
|
-
return /* @__PURE__ */
|
|
6897
|
+
return /* @__PURE__ */ React102.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
6713
6898
|
};
|
|
6714
6899
|
var ItemLabelGradient = ({ value }) => {
|
|
6715
6900
|
if (value.type === "linear") {
|
|
6716
|
-
return /* @__PURE__ */
|
|
6901
|
+
return /* @__PURE__ */ React102.createElement("span", null, __71("Linear gradient", "elementor"));
|
|
6717
6902
|
}
|
|
6718
|
-
return /* @__PURE__ */
|
|
6903
|
+
return /* @__PURE__ */ React102.createElement("span", null, __71("Radial gradient", "elementor"));
|
|
6719
6904
|
};
|
|
6720
6905
|
var getGradientValue = (gradient) => {
|
|
6721
6906
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -6726,15 +6911,15 @@ var getGradientValue = (gradient) => {
|
|
|
6726
6911
|
};
|
|
6727
6912
|
|
|
6728
6913
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
6729
|
-
import * as
|
|
6914
|
+
import * as React103 from "react";
|
|
6730
6915
|
import { createTransformer as createTransformer5 } from "@elementor/editor-canvas";
|
|
6731
6916
|
import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
|
|
6732
6917
|
import { CardMedia, Stack as Stack20 } from "@elementor/ui";
|
|
6733
6918
|
import { useWpMediaAttachment } from "@elementor/wp-media";
|
|
6734
|
-
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */
|
|
6919
|
+
var backgroundImageOverlayTransformer = createTransformer5((value) => /* @__PURE__ */ React103.createElement(Stack20, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React103.createElement(ItemIconImage, { value }), /* @__PURE__ */ React103.createElement(ItemLabelImage, { value })));
|
|
6735
6920
|
var ItemIconImage = ({ value }) => {
|
|
6736
6921
|
const { imageUrl } = useImage(value);
|
|
6737
|
-
return /* @__PURE__ */
|
|
6922
|
+
return /* @__PURE__ */ React103.createElement(
|
|
6738
6923
|
CardMedia,
|
|
6739
6924
|
{
|
|
6740
6925
|
image: imageUrl,
|
|
@@ -6750,7 +6935,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
6750
6935
|
};
|
|
6751
6936
|
var ItemLabelImage = ({ value }) => {
|
|
6752
6937
|
const { imageTitle } = useImage(value);
|
|
6753
|
-
return /* @__PURE__ */
|
|
6938
|
+
return /* @__PURE__ */ React103.createElement(EllipsisWithTooltip2, { title: imageTitle }, /* @__PURE__ */ React103.createElement("span", null, imageTitle));
|
|
6754
6939
|
};
|
|
6755
6940
|
var useImage = (image) => {
|
|
6756
6941
|
let imageTitle, imageUrl = null;
|
|
@@ -6775,7 +6960,7 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
6775
6960
|
};
|
|
6776
6961
|
|
|
6777
6962
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
6778
|
-
import * as
|
|
6963
|
+
import * as React104 from "react";
|
|
6779
6964
|
import { createTransformer as createTransformer6 } from "@elementor/editor-canvas";
|
|
6780
6965
|
var boxShadowTransformer = createTransformer6((value) => {
|
|
6781
6966
|
if (!value) {
|
|
@@ -6785,11 +6970,11 @@ var boxShadowTransformer = createTransformer6((value) => {
|
|
|
6785
6970
|
const colorValue = color || "#000000";
|
|
6786
6971
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
6787
6972
|
const positionValue = position || "outset";
|
|
6788
|
-
return /* @__PURE__ */
|
|
6973
|
+
return /* @__PURE__ */ React104.createElement(React104.Fragment, null, colorValue, " ", positionValue, ", ", sizes);
|
|
6789
6974
|
});
|
|
6790
6975
|
|
|
6791
6976
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
6792
|
-
import * as
|
|
6977
|
+
import * as React105 from "react";
|
|
6793
6978
|
import { createTransformer as createTransformer7 } from "@elementor/editor-canvas";
|
|
6794
6979
|
import { Stack as Stack21, styled as styled7, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
6795
6980
|
function isValidCSSColor(value) {
|
|
@@ -6809,14 +6994,14 @@ var colorTransformer = createTransformer7((value) => {
|
|
|
6809
6994
|
if (!isValidCSSColor(value)) {
|
|
6810
6995
|
return value;
|
|
6811
6996
|
}
|
|
6812
|
-
return /* @__PURE__ */
|
|
6997
|
+
return /* @__PURE__ */ React105.createElement(Stack21, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React105.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React105.createElement("span", null, value));
|
|
6813
6998
|
});
|
|
6814
6999
|
|
|
6815
7000
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|
|
6816
7001
|
import { createTransformer as createTransformer8 } from "@elementor/editor-canvas";
|
|
6817
7002
|
var createRepeaterToItemsTransformer = (originalTransformer) => {
|
|
6818
|
-
return createTransformer8((value,
|
|
6819
|
-
const stringResult = originalTransformer(value,
|
|
7003
|
+
return createTransformer8((value, options13) => {
|
|
7004
|
+
const stringResult = originalTransformer(value, options13);
|
|
6820
7005
|
if (!stringResult || typeof stringResult !== "string") {
|
|
6821
7006
|
return stringResult;
|
|
6822
7007
|
}
|