@elementor/editor-editing-panel 4.1.0 → 4.2.0-839
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.d.mts +169 -1
- package/dist/index.d.ts +169 -1
- package/dist/index.js +1301 -857
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1145 -683
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -22
- package/src/components/css-classes/use-apply-and-unapply-class.ts +10 -0
- package/src/components/design-system-import/components/conflict-options.tsx +67 -0
- package/src/components/design-system-import/components/trigger-button.tsx +33 -0
- package/src/components/design-system-import/hooks/use-dialog-state.ts +24 -0
- package/src/components/design-system-import/hooks/use-import-request.ts +38 -0
- package/src/components/design-system-import/import-design-system-dialog.tsx +89 -0
- package/src/components/design-system-import/import-notifications.tsx +57 -0
- package/src/components/design-system-import/types.ts +1 -0
- package/src/components/promotions/init.tsx +6 -7
- package/src/components/section-content.tsx +9 -2
- package/src/components/style-sections/layout-section/align-self-grid-child-field.tsx +74 -0
- 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/grid-span-field.tsx +78 -0
- package/src/components/style-sections/layout-section/layout-section.tsx +50 -2
- package/src/components/style-sections/position-section/position-field.tsx +2 -6
- package/src/components/style-sections/position-section/position-section.tsx +82 -85
- package/src/components/style-sections/position-section/z-index-field.tsx +29 -3
- package/src/components/style-tab.tsx +3 -0
- package/src/contexts/styles-inheritance-context.tsx +16 -2
- package/src/controls-registry/conditional-field.tsx +84 -7
- package/src/controls-registry/controls-registry.tsx +16 -0
- package/src/hooks/use-styles-fields.ts +1 -1
- package/src/utils/prop-dependency-utils.ts +88 -12
package/dist/index.js
CHANGED
|
@@ -287,8 +287,8 @@ var import_react6 = require("react");
|
|
|
287
287
|
var import_ui2 = require("@elementor/ui");
|
|
288
288
|
|
|
289
289
|
// src/components/creatable-autocomplete/autocomplete-option-internal-properties.ts
|
|
290
|
-
function addGroupToOptions(
|
|
291
|
-
return
|
|
290
|
+
function addGroupToOptions(options13, pluralEntityName) {
|
|
291
|
+
return options13.map((option) => {
|
|
292
292
|
return {
|
|
293
293
|
...option,
|
|
294
294
|
_group: `Existing ${pluralEntityName ?? "options"}`
|
|
@@ -302,7 +302,7 @@ function removeInternalKeys(option) {
|
|
|
302
302
|
|
|
303
303
|
// src/components/creatable-autocomplete/use-autocomplete-change.ts
|
|
304
304
|
function useAutocompleteChange(params) {
|
|
305
|
-
const { options:
|
|
305
|
+
const { options: options13, onSelect, createOption, setInputValue, closeDropdown } = params;
|
|
306
306
|
if (!onSelect && !createOption) {
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
@@ -330,7 +330,7 @@ function useAutocompleteChange(params) {
|
|
|
330
330
|
// User pressed "Enter" after typing input. The input is either matching existing option or a new option to create.
|
|
331
331
|
case "createOption": {
|
|
332
332
|
const inputValue = changedOption;
|
|
333
|
-
const matchingOption =
|
|
333
|
+
const matchingOption = options13.find(
|
|
334
334
|
(option) => option.label.toLocaleLowerCase() === inputValue.toLocaleLowerCase()
|
|
335
335
|
);
|
|
336
336
|
if (matchingOption) {
|
|
@@ -432,7 +432,7 @@ function useCreateOption(params) {
|
|
|
432
432
|
// src/components/creatable-autocomplete/use-filter-options.ts
|
|
433
433
|
var import_ui = require("@elementor/ui");
|
|
434
434
|
function useFilterOptions(parameters) {
|
|
435
|
-
const { options:
|
|
435
|
+
const { options: options13, selected, onCreate, entityName } = parameters;
|
|
436
436
|
const filter = (0, import_ui.createFilterOptions)();
|
|
437
437
|
const filterOptions = (optionList, params) => {
|
|
438
438
|
const selectedValues = selected.map((option) => option.value);
|
|
@@ -440,7 +440,7 @@ function useFilterOptions(parameters) {
|
|
|
440
440
|
optionList.filter((option) => !selectedValues.includes(option.value)),
|
|
441
441
|
params
|
|
442
442
|
);
|
|
443
|
-
const isExisting =
|
|
443
|
+
const isExisting = options13.some((option) => params.inputValue === option.label);
|
|
444
444
|
const allowCreate = Boolean(onCreate) && params.inputValue !== "" && !selectedValues.includes(params.inputValue) && !isExisting;
|
|
445
445
|
if (allowCreate) {
|
|
446
446
|
filteredOptions.unshift({
|
|
@@ -461,7 +461,7 @@ var MIN_INPUT_LENGTH = 2;
|
|
|
461
461
|
var CreatableAutocomplete = React5.forwardRef(CreatableAutocompleteInner);
|
|
462
462
|
function CreatableAutocompleteInner({
|
|
463
463
|
selected,
|
|
464
|
-
options:
|
|
464
|
+
options: options13,
|
|
465
465
|
entityName,
|
|
466
466
|
onSelect,
|
|
467
467
|
placeholder,
|
|
@@ -474,8 +474,8 @@ function CreatableAutocompleteInner({
|
|
|
474
474
|
const { open, openDropdown, closeDropdown } = useOpenState(props.open);
|
|
475
475
|
const { createOption, loading } = useCreateOption({ onCreate, validate, setInputValue, setError, closeDropdown });
|
|
476
476
|
const [internalOptions, internalSelected] = (0, import_react6.useMemo)(
|
|
477
|
-
() => [
|
|
478
|
-
[
|
|
477
|
+
() => [options13, selected].map((optionsArr) => addGroupToOptions(optionsArr, entityName?.plural)),
|
|
478
|
+
[options13, selected, entityName?.plural]
|
|
479
479
|
);
|
|
480
480
|
const handleChange = useAutocompleteChange({
|
|
481
481
|
options: internalOptions,
|
|
@@ -484,7 +484,7 @@ function CreatableAutocompleteInner({
|
|
|
484
484
|
setInputValue,
|
|
485
485
|
closeDropdown
|
|
486
486
|
});
|
|
487
|
-
const filterOptions = useFilterOptions({ options:
|
|
487
|
+
const filterOptions = useFilterOptions({ options: options13, selected, onCreate, entityName });
|
|
488
488
|
const isCreatable = Boolean(onCreate);
|
|
489
489
|
const freeSolo = isCreatable || inputValue.length < MIN_INPUT_LENGTH || void 0;
|
|
490
490
|
return /* @__PURE__ */ React5.createElement(
|
|
@@ -773,6 +773,12 @@ function useCreateAndApplyClass() {
|
|
|
773
773
|
unapplyClass(createdId);
|
|
774
774
|
deleteAction?.(createdId);
|
|
775
775
|
setActiveId(prevActiveId);
|
|
776
|
+
},
|
|
777
|
+
redo: ({ classLabel }, { createdId }) => {
|
|
778
|
+
const prevActiveId = activeId;
|
|
779
|
+
createAction(classLabel, [], createdId);
|
|
780
|
+
applyClass(createdId);
|
|
781
|
+
return { prevActiveId, createdId };
|
|
776
782
|
}
|
|
777
783
|
},
|
|
778
784
|
{
|
|
@@ -1277,13 +1283,13 @@ var EMPTY_OPTION = {
|
|
|
1277
1283
|
};
|
|
1278
1284
|
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = (0, import_locations2.createLocation)();
|
|
1279
1285
|
function CssClassSelector() {
|
|
1280
|
-
const
|
|
1286
|
+
const options13 = useOptions();
|
|
1281
1287
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
1282
1288
|
const autocompleteRef = (0, import_react10.useRef)(null);
|
|
1283
1289
|
const [renameError, setRenameError] = (0, import_react10.useState)(null);
|
|
1284
1290
|
const handleSelect = useHandleSelect();
|
|
1285
1291
|
const { create, validate, entityName } = useCreateAction();
|
|
1286
|
-
const appliedOptions = useAppliedOptions(
|
|
1292
|
+
const appliedOptions = useAppliedOptions(options13);
|
|
1287
1293
|
const active = appliedOptions.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
1288
1294
|
const showPlaceholder = appliedOptions.every(({ fixed }) => fixed);
|
|
1289
1295
|
const { userCan } = (0, import_editor_styles_repository9.useUserStylesCapability)();
|
|
@@ -1304,7 +1310,7 @@ function CssClassSelector() {
|
|
|
1304
1310
|
ref: autocompleteRef,
|
|
1305
1311
|
size: "tiny",
|
|
1306
1312
|
placeholder: showPlaceholder ? (0, import_i18n6.__)("Type class name", "elementor") : void 0,
|
|
1307
|
-
options:
|
|
1313
|
+
options: options13,
|
|
1308
1314
|
selected: appliedOptions,
|
|
1309
1315
|
entityName,
|
|
1310
1316
|
onSelect: handleSelect,
|
|
@@ -1433,10 +1439,10 @@ function useCreateAction() {
|
|
|
1433
1439
|
function hasReachedLimit(provider) {
|
|
1434
1440
|
return provider.actions.all().length >= provider.limit;
|
|
1435
1441
|
}
|
|
1436
|
-
function useAppliedOptions(
|
|
1442
|
+
function useAppliedOptions(options13) {
|
|
1437
1443
|
const currentClassesProp = useClassesProp();
|
|
1438
1444
|
const appliedIds = usePanelElementSetting(currentClassesProp)?.value ?? [];
|
|
1439
|
-
const appliedOptions =
|
|
1445
|
+
const appliedOptions = options13.filter((option) => option.value && appliedIds.includes(option.value));
|
|
1440
1446
|
const hasElementsProviderStyleApplied = appliedOptions.some(
|
|
1441
1447
|
(option) => option.provider && (0, import_editor_styles_repository9.isElementsStylesProvider)(option.provider)
|
|
1442
1448
|
);
|
|
@@ -1591,7 +1597,7 @@ function useUndoableActions({
|
|
|
1591
1597
|
return { styleId, provider, prevProps };
|
|
1592
1598
|
}
|
|
1593
1599
|
function undo(_, { styleId, provider, prevProps }) {
|
|
1594
|
-
provider.actions.updateProps?.({ id: styleId, meta, props: prevProps }, { elementId });
|
|
1600
|
+
provider.actions.updateProps?.({ id: styleId, meta, props: prevProps, mode: "replace" }, { elementId });
|
|
1595
1601
|
}
|
|
1596
1602
|
}, [elementId, breakpoint, state, classesProp]);
|
|
1597
1603
|
}
|
|
@@ -1809,17 +1815,17 @@ var hasInheritedCustomCss = (style, meta) => {
|
|
|
1809
1815
|
};
|
|
1810
1816
|
|
|
1811
1817
|
// src/components/editing-panel.tsx
|
|
1812
|
-
var
|
|
1813
|
-
var
|
|
1818
|
+
var React87 = __toESM(require("react"));
|
|
1819
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
1814
1820
|
var import_editor_elements13 = require("@elementor/editor-elements");
|
|
1815
1821
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
1816
1822
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
1817
|
-
var
|
|
1823
|
+
var import_icons25 = require("@elementor/icons");
|
|
1818
1824
|
var import_locations4 = require("@elementor/locations");
|
|
1819
1825
|
var import_menus = require("@elementor/menus");
|
|
1820
1826
|
var import_session9 = require("@elementor/session");
|
|
1821
|
-
var
|
|
1822
|
-
var
|
|
1827
|
+
var import_ui42 = require("@elementor/ui");
|
|
1828
|
+
var import_i18n61 = require("@wordpress/i18n");
|
|
1823
1829
|
|
|
1824
1830
|
// src/editing-panel-replacement-registry.tsx
|
|
1825
1831
|
var registry = /* @__PURE__ */ new Map();
|
|
@@ -1841,12 +1847,12 @@ function EditorPanelErrorFallback() {
|
|
|
1841
1847
|
}
|
|
1842
1848
|
|
|
1843
1849
|
// src/components/editing-panel-tabs.tsx
|
|
1844
|
-
var
|
|
1845
|
-
var
|
|
1850
|
+
var import_react38 = require("react");
|
|
1851
|
+
var React86 = __toESM(require("react"));
|
|
1846
1852
|
var import_editor_elements12 = require("@elementor/editor-elements");
|
|
1847
|
-
var
|
|
1848
|
-
var
|
|
1849
|
-
var
|
|
1853
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
1854
|
+
var import_ui41 = require("@elementor/ui");
|
|
1855
|
+
var import_i18n60 = require("@wordpress/i18n");
|
|
1850
1856
|
|
|
1851
1857
|
// src/contexts/scroll-context.tsx
|
|
1852
1858
|
var React14 = __toESM(require("react"));
|
|
@@ -2043,7 +2049,18 @@ var controlTypes = {
|
|
|
2043
2049
|
"date-time": { component: import_editor_controls.DateTimeControl, layout: "full", propTypeUtil: import_editor_props4.DateTimePropTypeUtil },
|
|
2044
2050
|
video: { component: import_editor_controls.VideoMediaControl, layout: "full", propTypeUtil: import_editor_props4.videoSrcPropTypeUtil },
|
|
2045
2051
|
"inline-editing": { component: import_editor_controls.InlineEditingControl, layout: "full", propTypeUtil: import_editor_props4.htmlV3PropTypeUtil },
|
|
2046
|
-
email: { component: import_editor_controls.EmailFormActionControl, layout: "custom", propTypeUtil: import_editor_props4.emailPropTypeUtil }
|
|
2052
|
+
email: { component: import_editor_controls.EmailFormActionControl, layout: "custom", propTypeUtil: import_editor_props4.emailPropTypeUtil },
|
|
2053
|
+
"date-range": {
|
|
2054
|
+
component: import_editor_controls.DateRangeControl,
|
|
2055
|
+
layout: "custom",
|
|
2056
|
+
propTypeUtil: import_editor_props4.dateRangePropTypeUtil
|
|
2057
|
+
},
|
|
2058
|
+
"time-range": {
|
|
2059
|
+
component: import_editor_controls.TimeRangeControl,
|
|
2060
|
+
layout: "custom",
|
|
2061
|
+
propTypeUtil: import_editor_props4.timeRangePropTypeUtil
|
|
2062
|
+
},
|
|
2063
|
+
"attachment-type": { component: import_editor_controls.AttachmentTypeControl, layout: "custom", propTypeUtil: import_editor_props4.stringPropTypeUtil }
|
|
2047
2064
|
};
|
|
2048
2065
|
var ControlsRegistry = class {
|
|
2049
2066
|
constructor(controlsRegistry2) {
|
|
@@ -2189,10 +2206,14 @@ function getUpdatedValues(values, dependencies, propsSchema, elementValues, elem
|
|
|
2189
2206
|
}
|
|
2190
2207
|
if (!testDependencies.previousValues.isMet) {
|
|
2191
2208
|
const savedValue = retrievePreviousValueFromStorage({ path: dependency, elementId });
|
|
2209
|
+
const currentValue = (0, import_editor_props5.extractValue)(path, combinedValues, [], {
|
|
2210
|
+
unwrapOverridableLeaf: false
|
|
2211
|
+
});
|
|
2192
2212
|
removePreviousValueFromStorage({ path: dependency, elementId });
|
|
2213
|
+
const restored = isCompatibleSavedValue(savedValue, currentValue) ? savedValue : propType.default;
|
|
2193
2214
|
return {
|
|
2194
2215
|
...newValues,
|
|
2195
|
-
...updateValue(path,
|
|
2216
|
+
...updateValue(path, restored, combinedValues)
|
|
2196
2217
|
};
|
|
2197
2218
|
}
|
|
2198
2219
|
return newValues;
|
|
@@ -2238,18 +2259,67 @@ function evaluatePropType(props) {
|
|
|
2238
2259
|
}
|
|
2239
2260
|
function updateValue(path, value, values) {
|
|
2240
2261
|
const topPropKey = path[0];
|
|
2241
|
-
const
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2262
|
+
const root = { ...values };
|
|
2263
|
+
let carry = root;
|
|
2264
|
+
for (let index = 0; index < path.length; index++) {
|
|
2265
|
+
const key = path[index];
|
|
2266
|
+
const isLeaf = index === path.length - 1;
|
|
2267
|
+
if (isLeaf) {
|
|
2268
|
+
carry[key] = mergeLeafValue(carry[key], value);
|
|
2269
|
+
break;
|
|
2270
|
+
}
|
|
2271
|
+
const next = cloneDescent(carry[key]);
|
|
2272
|
+
if (!next) {
|
|
2273
|
+
break;
|
|
2245
2274
|
}
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2275
|
+
carry[key] = next.replacement;
|
|
2276
|
+
carry = next.descended;
|
|
2277
|
+
}
|
|
2278
|
+
return { [topPropKey]: root[topPropKey] ?? null };
|
|
2279
|
+
}
|
|
2280
|
+
function cloneDescent(child) {
|
|
2281
|
+
if (!child) {
|
|
2282
|
+
return null;
|
|
2283
|
+
}
|
|
2284
|
+
if ((0, import_editor_props5.isOverridable)(child)) {
|
|
2285
|
+
const origin = child.value.origin_value;
|
|
2286
|
+
if (!origin || !(0, import_editor_props5.isTransformable)(origin)) {
|
|
2287
|
+
return null;
|
|
2249
2288
|
}
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2289
|
+
const descended = { ...origin.value };
|
|
2290
|
+
const replacement = {
|
|
2291
|
+
...child,
|
|
2292
|
+
value: {
|
|
2293
|
+
...child.value,
|
|
2294
|
+
origin_value: { ...origin, value: descended }
|
|
2295
|
+
}
|
|
2296
|
+
};
|
|
2297
|
+
return { replacement, descended };
|
|
2298
|
+
}
|
|
2299
|
+
if ((0, import_editor_props5.isTransformable)(child)) {
|
|
2300
|
+
const descended = { ...child.value };
|
|
2301
|
+
const replacement = { ...child, value: descended };
|
|
2302
|
+
return { replacement, descended };
|
|
2303
|
+
}
|
|
2304
|
+
return null;
|
|
2305
|
+
}
|
|
2306
|
+
function isCompatibleSavedValue(saved, current) {
|
|
2307
|
+
if (!saved) {
|
|
2308
|
+
return false;
|
|
2309
|
+
}
|
|
2310
|
+
return (0, import_editor_props5.isOverridable)(saved) === (0, import_editor_props5.isOverridable)(current);
|
|
2311
|
+
}
|
|
2312
|
+
function mergeLeafValue(existing, incoming) {
|
|
2313
|
+
if (incoming === null) {
|
|
2314
|
+
return null;
|
|
2315
|
+
}
|
|
2316
|
+
if (incoming && (0, import_editor_props5.isOverridable)(incoming)) {
|
|
2317
|
+
return incoming;
|
|
2318
|
+
}
|
|
2319
|
+
if (existing && (0, import_editor_props5.isOverridable)(existing) && incoming) {
|
|
2320
|
+
return (0, import_editor_props5.rewrapOverridableValue)(existing, incoming);
|
|
2321
|
+
}
|
|
2322
|
+
return incoming;
|
|
2253
2323
|
}
|
|
2254
2324
|
function handleUnmetCondition(props) {
|
|
2255
2325
|
const { failingDependencies, dependency, elementValues, defaultValue, elementId } = props;
|
|
@@ -2257,7 +2327,7 @@ function handleUnmetCondition(props) {
|
|
|
2257
2327
|
(term) => "newValue" in term && !!term.newValue
|
|
2258
2328
|
);
|
|
2259
2329
|
const newValue = termWithNewValue?.newValue ?? null;
|
|
2260
|
-
const currentValue = (0, import_editor_props5.extractValue)(dependency.split("."), elementValues) ?? defaultValue;
|
|
2330
|
+
const currentValue = (0, import_editor_props5.extractValue)(dependency.split("."), elementValues, [], { unwrapOverridableLeaf: false }) ?? defaultValue;
|
|
2261
2331
|
savePreviousValueToStorage({
|
|
2262
2332
|
path: dependency,
|
|
2263
2333
|
elementId,
|
|
@@ -2466,14 +2536,14 @@ function isControl(control) {
|
|
|
2466
2536
|
}
|
|
2467
2537
|
|
|
2468
2538
|
// src/components/style-tab.tsx
|
|
2469
|
-
var
|
|
2470
|
-
var
|
|
2539
|
+
var React85 = __toESM(require("react"));
|
|
2540
|
+
var import_react37 = require("react");
|
|
2471
2541
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
2472
2542
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
2473
2543
|
var import_locations3 = require("@elementor/locations");
|
|
2474
2544
|
var import_session8 = require("@elementor/session");
|
|
2475
|
-
var
|
|
2476
|
-
var
|
|
2545
|
+
var import_ui40 = require("@elementor/ui");
|
|
2546
|
+
var import_i18n59 = require("@wordpress/i18n");
|
|
2477
2547
|
|
|
2478
2548
|
// src/contexts/styles-inheritance-context.tsx
|
|
2479
2549
|
var React24 = __toESM(require("react"));
|
|
@@ -2740,6 +2810,16 @@ function useStylesInheritanceChain(path) {
|
|
|
2740
2810
|
}
|
|
2741
2811
|
return context.getInheritanceChain(snapshot, path, topLevelPropType);
|
|
2742
2812
|
}
|
|
2813
|
+
var EMPTY_INHERITED_VALUES = {};
|
|
2814
|
+
function useInheritedValues(propKeys) {
|
|
2815
|
+
const snapshot = useStylesInheritanceSnapshot();
|
|
2816
|
+
return (0, import_react20.useMemo)(() => {
|
|
2817
|
+
if (!snapshot || propKeys.length === 0) {
|
|
2818
|
+
return EMPTY_INHERITED_VALUES;
|
|
2819
|
+
}
|
|
2820
|
+
return Object.fromEntries(propKeys.map((key) => [key, snapshot[key]?.[0]?.value ?? null]));
|
|
2821
|
+
}, [snapshot, propKeys]);
|
|
2822
|
+
}
|
|
2743
2823
|
var useAppliedStyles = () => {
|
|
2744
2824
|
const currentClassesProp = useClassesProp();
|
|
2745
2825
|
const baseStyles = useBaseStyles();
|
|
@@ -2799,15 +2879,67 @@ function useStylesField(propName, meta) {
|
|
|
2799
2879
|
}
|
|
2800
2880
|
|
|
2801
2881
|
// src/controls-registry/conditional-field.tsx
|
|
2882
|
+
var import_react21 = require("react");
|
|
2802
2883
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
2803
2884
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
2804
2885
|
var ConditionalField = ({ children }) => {
|
|
2805
|
-
const { propType } = (0, import_editor_controls5.useBoundProp)();
|
|
2886
|
+
const { propType, value, resetValue } = (0, import_editor_controls5.useBoundProp)();
|
|
2806
2887
|
const depList = getDependencies(propType);
|
|
2807
|
-
const { values: depValues } = useStylesFields(depList);
|
|
2808
|
-
const
|
|
2888
|
+
const { values: depValues, setValues: setDepValues } = useStylesFields(depList);
|
|
2889
|
+
const inheritedValues = useInheritedValues(depList);
|
|
2890
|
+
const resolvedValues = resolveWithInherited(depValues, inheritedValues);
|
|
2891
|
+
const isHidden = !(0, import_editor_props9.isDependencyMet)(propType?.dependencies, resolvedValues).isMet;
|
|
2892
|
+
useSyncDepsWithInherited({ isHidden, depValues, value, inheritedValues, setDepValues, resetValue });
|
|
2809
2893
|
return isHidden ? null : children;
|
|
2810
2894
|
};
|
|
2895
|
+
function wasDepsCleared(prevDepValues, depValues) {
|
|
2896
|
+
if (!prevDepValues) {
|
|
2897
|
+
return false;
|
|
2898
|
+
}
|
|
2899
|
+
return Object.keys(prevDepValues).some(
|
|
2900
|
+
(key) => prevDepValues[key] && (!depValues || !depValues[key])
|
|
2901
|
+
);
|
|
2902
|
+
}
|
|
2903
|
+
function useSyncDepsWithInherited({
|
|
2904
|
+
isHidden,
|
|
2905
|
+
depValues,
|
|
2906
|
+
value,
|
|
2907
|
+
inheritedValues,
|
|
2908
|
+
setDepValues,
|
|
2909
|
+
resetValue
|
|
2910
|
+
}) {
|
|
2911
|
+
const syncRef = (0, import_react21.useRef)({ hasSynced: false, prevDepValues: depValues });
|
|
2912
|
+
(0, import_react21.useEffect)(() => {
|
|
2913
|
+
const { hasSynced, prevDepValues } = syncRef.current;
|
|
2914
|
+
if (hasSynced && value && wasDepsCleared(prevDepValues, depValues) || isHidden && depValues && value) {
|
|
2915
|
+
resetValue();
|
|
2916
|
+
}
|
|
2917
|
+
if (isHidden || !value || !depValues) {
|
|
2918
|
+
syncRef.current = { hasSynced: false, prevDepValues: depValues };
|
|
2919
|
+
return;
|
|
2920
|
+
}
|
|
2921
|
+
if (hasSynced) {
|
|
2922
|
+
syncRef.current.prevDepValues = depValues;
|
|
2923
|
+
return;
|
|
2924
|
+
}
|
|
2925
|
+
syncRef.current = { hasSynced: true, prevDepValues: depValues };
|
|
2926
|
+
Object.entries(depValues).forEach(([key, depValue]) => {
|
|
2927
|
+
const inherited = inheritedValues[key];
|
|
2928
|
+
if (!depValue && inherited) {
|
|
2929
|
+
setDepValues({ [key]: inherited }, { history: { propDisplayName: key } });
|
|
2930
|
+
}
|
|
2931
|
+
});
|
|
2932
|
+
}, [isHidden, depValues, value, inheritedValues, setDepValues, resetValue]);
|
|
2933
|
+
}
|
|
2934
|
+
function resolveWithInherited(localValues, inheritedValues) {
|
|
2935
|
+
if (!localValues) {
|
|
2936
|
+
const hasInherited = Object.keys(inheritedValues).length > 0;
|
|
2937
|
+
return hasInherited ? { ...inheritedValues } : null;
|
|
2938
|
+
}
|
|
2939
|
+
return Object.fromEntries(
|
|
2940
|
+
Object.entries(localValues).map(([key, val]) => [key, val ?? inheritedValues[key] ?? null])
|
|
2941
|
+
);
|
|
2942
|
+
}
|
|
2811
2943
|
function getDependencies(propType) {
|
|
2812
2944
|
if (!propType?.dependencies?.terms.length) {
|
|
2813
2945
|
return [];
|
|
@@ -2892,7 +3024,13 @@ var StylesField = ({ bind, propDisplayName, children }) => {
|
|
|
2892
3024
|
// src/components/section-content.tsx
|
|
2893
3025
|
var React26 = __toESM(require("react"));
|
|
2894
3026
|
var import_ui15 = require("@elementor/ui");
|
|
2895
|
-
var SectionContent = ({
|
|
3027
|
+
var SectionContent = ({
|
|
3028
|
+
gap = 2,
|
|
3029
|
+
sx,
|
|
3030
|
+
children,
|
|
3031
|
+
"aria-label": ariaLabel,
|
|
3032
|
+
className
|
|
3033
|
+
}) => /* @__PURE__ */ React26.createElement(import_ui15.Stack, { gap, sx: { ...sx }, "aria-label": ariaLabel, className }, children);
|
|
2896
3034
|
|
|
2897
3035
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2898
3036
|
var BACKGROUND_LABEL = (0, import_i18n9.__)("Background", "elementor");
|
|
@@ -3180,12 +3318,12 @@ var BlendModeField = () => {
|
|
|
3180
3318
|
|
|
3181
3319
|
// src/components/style-sections/effects-section/opacity-control-field.tsx
|
|
3182
3320
|
var React37 = __toESM(require("react"));
|
|
3183
|
-
var
|
|
3321
|
+
var import_react22 = require("react");
|
|
3184
3322
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
3185
3323
|
var import_i18n15 = require("@wordpress/i18n");
|
|
3186
3324
|
var OPACITY_LABEL = (0, import_i18n15.__)("Opacity", "elementor");
|
|
3187
3325
|
var OpacityControlField = () => {
|
|
3188
|
-
const rowRef = (0,
|
|
3326
|
+
const rowRef = (0, import_react22.useRef)(null);
|
|
3189
3327
|
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React37.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React37.createElement(import_editor_controls13.SizeControl, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
3190
3328
|
};
|
|
3191
3329
|
|
|
@@ -3209,10 +3347,11 @@ var EffectsSection = () => {
|
|
|
3209
3347
|
};
|
|
3210
3348
|
|
|
3211
3349
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3212
|
-
var
|
|
3213
|
-
var
|
|
3350
|
+
var React55 = __toESM(require("react"));
|
|
3351
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3214
3352
|
var import_editor_elements11 = require("@elementor/editor-elements");
|
|
3215
|
-
var
|
|
3353
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
3354
|
+
var import_i18n33 = require("@wordpress/i18n");
|
|
3216
3355
|
|
|
3217
3356
|
// src/hooks/use-computed-style.ts
|
|
3218
3357
|
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
@@ -3247,7 +3386,7 @@ var import_i18n18 = require("@wordpress/i18n");
|
|
|
3247
3386
|
|
|
3248
3387
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
3249
3388
|
var React39 = __toESM(require("react"));
|
|
3250
|
-
var
|
|
3389
|
+
var import_react23 = require("react");
|
|
3251
3390
|
var import_ui22 = require("@elementor/ui");
|
|
3252
3391
|
var import_i18n17 = require("@wordpress/i18n");
|
|
3253
3392
|
var FLEX_DIRECTION_LABEL = (0, import_i18n17.__)("Flex direction", "elementor");
|
|
@@ -3270,7 +3409,7 @@ var RotatedIcon = ({
|
|
|
3270
3409
|
offset = 0,
|
|
3271
3410
|
disableRotationForReversed = false
|
|
3272
3411
|
}) => {
|
|
3273
|
-
const rotate = (0,
|
|
3412
|
+
const rotate = (0, import_react23.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
3274
3413
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
3275
3414
|
return /* @__PURE__ */ React39.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
3276
3415
|
};
|
|
@@ -3462,100 +3601,159 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3462
3601
|
];
|
|
3463
3602
|
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React42.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL }, /* @__PURE__ */ React42.createElement(UiProviders, null, /* @__PURE__ */ React42.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL }, /* @__PURE__ */ React42.createElement(import_editor_controls17.ToggleControl, { options: getOptions(parentStyleDirection) }))));
|
|
3464
3603
|
|
|
3465
|
-
// src/components/style-sections/layout-section/
|
|
3604
|
+
// src/components/style-sections/layout-section/align-self-grid-child-field.tsx
|
|
3466
3605
|
var React43 = __toESM(require("react"));
|
|
3467
3606
|
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
3607
|
+
var import_icons8 = require("@elementor/icons");
|
|
3468
3608
|
var import_i18n21 = require("@wordpress/i18n");
|
|
3469
|
-
var
|
|
3609
|
+
var ALIGN_SELF_LABEL2 = (0, import_i18n21.__)("Align self", "elementor");
|
|
3610
|
+
var ALIGN_SELF_CHILD_OFFSET_MAP2 = {
|
|
3611
|
+
row: 0,
|
|
3612
|
+
column: -90
|
|
3613
|
+
};
|
|
3614
|
+
var AlignSelfGridChild = ({ parentStyleDirection }) => /* @__PURE__ */ React43.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL2 }, /* @__PURE__ */ React43.createElement(UiProviders, null, /* @__PURE__ */ React43.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL2 }, /* @__PURE__ */ React43.createElement(import_editor_controls18.ToggleControl, { options: getOptions2(parentStyleDirection ?? "row") }))));
|
|
3615
|
+
var RotatedIcon2 = ({
|
|
3616
|
+
icon: Icon,
|
|
3617
|
+
size,
|
|
3618
|
+
offset
|
|
3619
|
+
}) => /* @__PURE__ */ React43.createElement(Icon, { fontSize: size, sx: { rotate: `${offset}deg` } });
|
|
3620
|
+
var getOptions2 = (parentStyleDirection) => {
|
|
3621
|
+
const offset = ALIGN_SELF_CHILD_OFFSET_MAP2[parentStyleDirection.replace("dense", "").trim()];
|
|
3622
|
+
return [
|
|
3623
|
+
{
|
|
3624
|
+
value: "start",
|
|
3625
|
+
label: (0, import_i18n21.__)("Start", "elementor"),
|
|
3626
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon2, { icon: import_icons8.JustifyTopIcon, size, offset }),
|
|
3627
|
+
showTooltip: true
|
|
3628
|
+
},
|
|
3629
|
+
{
|
|
3630
|
+
value: "center",
|
|
3631
|
+
label: (0, import_i18n21.__)("Center", "elementor"),
|
|
3632
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon2, { icon: import_icons8.JustifyCenterIcon, size, offset }),
|
|
3633
|
+
showTooltip: true
|
|
3634
|
+
},
|
|
3635
|
+
{
|
|
3636
|
+
value: "end",
|
|
3637
|
+
label: (0, import_i18n21.__)("End", "elementor"),
|
|
3638
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon2, { icon: import_icons8.JustifyBottomIcon, size, offset }),
|
|
3639
|
+
showTooltip: true
|
|
3640
|
+
},
|
|
3641
|
+
{
|
|
3642
|
+
value: "stretch",
|
|
3643
|
+
label: (0, import_i18n21.__)("Stretch", "elementor"),
|
|
3644
|
+
renderContent: ({ size }) => /* @__PURE__ */ React43.createElement(RotatedIcon2, { icon: import_icons8.LayoutDistributeVerticalIcon, size, offset }),
|
|
3645
|
+
showTooltip: true
|
|
3646
|
+
}
|
|
3647
|
+
];
|
|
3648
|
+
};
|
|
3649
|
+
|
|
3650
|
+
// src/components/style-sections/layout-section/display-field.tsx
|
|
3651
|
+
var React44 = __toESM(require("react"));
|
|
3652
|
+
var import_react24 = require("react");
|
|
3653
|
+
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
3654
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
3655
|
+
var import_i18n22 = require("@wordpress/i18n");
|
|
3656
|
+
var DISPLAY_LABEL = (0, import_i18n22.__)("Display", "elementor");
|
|
3470
3657
|
var displayFieldItems = [
|
|
3471
3658
|
{
|
|
3472
3659
|
value: "block",
|
|
3473
|
-
renderContent: () => (0,
|
|
3474
|
-
label: (0,
|
|
3660
|
+
renderContent: () => (0, import_i18n22.__)("Block", "elementor"),
|
|
3661
|
+
label: (0, import_i18n22.__)("Block", "elementor"),
|
|
3475
3662
|
showTooltip: true
|
|
3476
3663
|
},
|
|
3477
3664
|
{
|
|
3478
3665
|
value: "flex",
|
|
3479
|
-
renderContent: () => (0,
|
|
3480
|
-
label: (0,
|
|
3666
|
+
renderContent: () => (0, import_i18n22.__)("Flex", "elementor"),
|
|
3667
|
+
label: (0, import_i18n22.__)("Flex", "elementor"),
|
|
3481
3668
|
showTooltip: true
|
|
3482
3669
|
},
|
|
3483
3670
|
{
|
|
3484
|
-
value: "
|
|
3485
|
-
renderContent: () => (0,
|
|
3486
|
-
label: (0,
|
|
3671
|
+
value: "grid",
|
|
3672
|
+
renderContent: () => (0, import_i18n22.__)("Grid", "elementor"),
|
|
3673
|
+
label: (0, import_i18n22.__)("Grid", "elementor"),
|
|
3487
3674
|
showTooltip: true
|
|
3488
3675
|
},
|
|
3489
3676
|
{
|
|
3490
|
-
value: "
|
|
3491
|
-
renderContent: () => (0,
|
|
3492
|
-
label: (0,
|
|
3677
|
+
value: "inline-block",
|
|
3678
|
+
renderContent: () => (0, import_i18n22.__)("In-blk", "elementor"),
|
|
3679
|
+
label: (0, import_i18n22.__)("Inline-block", "elementor"),
|
|
3493
3680
|
showTooltip: true
|
|
3494
3681
|
},
|
|
3495
3682
|
{
|
|
3496
3683
|
value: "inline-flex",
|
|
3497
|
-
renderContent: () => (0,
|
|
3498
|
-
label: (0,
|
|
3684
|
+
renderContent: () => (0, import_i18n22.__)("In-flx", "elementor"),
|
|
3685
|
+
label: (0, import_i18n22.__)("Inline-flex", "elementor"),
|
|
3686
|
+
showTooltip: true
|
|
3687
|
+
},
|
|
3688
|
+
{
|
|
3689
|
+
value: "none",
|
|
3690
|
+
renderContent: () => (0, import_i18n22.__)("None", "elementor"),
|
|
3691
|
+
label: (0, import_i18n22.__)("None", "elementor"),
|
|
3499
3692
|
showTooltip: true
|
|
3500
3693
|
}
|
|
3501
3694
|
];
|
|
3502
3695
|
var DisplayField = () => {
|
|
3503
3696
|
const placeholder = useDisplayPlaceholderValue();
|
|
3504
|
-
|
|
3697
|
+
const isGridActive = (0, import_editor_v1_adapters7.isExperimentActive)("e_css_grid");
|
|
3698
|
+
const items3 = (0, import_react24.useMemo)(
|
|
3699
|
+
() => isGridActive ? displayFieldItems : displayFieldItems.filter((item) => item.value !== "grid"),
|
|
3700
|
+
[isGridActive]
|
|
3701
|
+
);
|
|
3702
|
+
return /* @__PURE__ */ React44.createElement(StylesField, { bind: "display", propDisplayName: DISPLAY_LABEL, placeholder }, /* @__PURE__ */ React44.createElement(StylesFieldLayout, { label: DISPLAY_LABEL, direction: "column" }, /* @__PURE__ */ React44.createElement(import_editor_controls19.ToggleControl, { options: items3, maxItems: 4, fullWidth: true })));
|
|
3505
3703
|
};
|
|
3506
3704
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
3507
3705
|
|
|
3508
3706
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
3509
|
-
var
|
|
3510
|
-
var
|
|
3511
|
-
var
|
|
3707
|
+
var React45 = __toESM(require("react"));
|
|
3708
|
+
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
3709
|
+
var import_icons9 = require("@elementor/icons");
|
|
3512
3710
|
var import_ui26 = require("@elementor/ui");
|
|
3513
|
-
var
|
|
3514
|
-
var FLEX_DIRECTION_LABEL2 = (0,
|
|
3711
|
+
var import_i18n23 = require("@wordpress/i18n");
|
|
3712
|
+
var FLEX_DIRECTION_LABEL2 = (0, import_i18n23.__)("Direction", "elementor");
|
|
3515
3713
|
var options3 = [
|
|
3516
3714
|
{
|
|
3517
3715
|
value: "row",
|
|
3518
|
-
label: (0,
|
|
3716
|
+
label: (0, import_i18n23.__)("Row", "elementor"),
|
|
3519
3717
|
renderContent: ({ size }) => {
|
|
3520
|
-
const
|
|
3521
|
-
return /* @__PURE__ */
|
|
3718
|
+
const StartIcon7 = (0, import_ui26.withDirection)(import_icons9.ArrowRightIcon);
|
|
3719
|
+
return /* @__PURE__ */ React45.createElement(StartIcon7, { fontSize: size });
|
|
3522
3720
|
},
|
|
3523
3721
|
showTooltip: true
|
|
3524
3722
|
},
|
|
3525
3723
|
{
|
|
3526
3724
|
value: "column",
|
|
3527
|
-
label: (0,
|
|
3528
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3725
|
+
label: (0, import_i18n23.__)("Column", "elementor"),
|
|
3726
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(import_icons9.ArrowDownSmallIcon, { fontSize: size }),
|
|
3529
3727
|
showTooltip: true
|
|
3530
3728
|
},
|
|
3531
3729
|
{
|
|
3532
3730
|
value: "row-reverse",
|
|
3533
|
-
label: (0,
|
|
3731
|
+
label: (0, import_i18n23.__)("Reversed row", "elementor"),
|
|
3534
3732
|
renderContent: ({ size }) => {
|
|
3535
|
-
const
|
|
3536
|
-
return /* @__PURE__ */
|
|
3733
|
+
const EndIcon6 = (0, import_ui26.withDirection)(import_icons9.ArrowLeftIcon);
|
|
3734
|
+
return /* @__PURE__ */ React45.createElement(EndIcon6, { fontSize: size });
|
|
3537
3735
|
},
|
|
3538
3736
|
showTooltip: true
|
|
3539
3737
|
},
|
|
3540
3738
|
{
|
|
3541
3739
|
value: "column-reverse",
|
|
3542
|
-
label: (0,
|
|
3543
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3740
|
+
label: (0, import_i18n23.__)("Reversed column", "elementor"),
|
|
3741
|
+
renderContent: ({ size }) => /* @__PURE__ */ React45.createElement(import_icons9.ArrowUpSmallIcon, { fontSize: size }),
|
|
3544
3742
|
showTooltip: true
|
|
3545
3743
|
}
|
|
3546
3744
|
];
|
|
3547
3745
|
var FlexDirectionField = () => {
|
|
3548
|
-
return /* @__PURE__ */
|
|
3746
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "flex-direction", propDisplayName: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React45.createElement(UiProviders, null, /* @__PURE__ */ React45.createElement(StylesFieldLayout, { label: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React45.createElement(import_editor_controls20.ToggleControl, { options: options3 }))));
|
|
3549
3747
|
};
|
|
3550
3748
|
|
|
3551
3749
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3552
|
-
var
|
|
3553
|
-
var
|
|
3554
|
-
var
|
|
3555
|
-
var
|
|
3750
|
+
var React46 = __toESM(require("react"));
|
|
3751
|
+
var import_react25 = require("react");
|
|
3752
|
+
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3753
|
+
var import_icons10 = require("@elementor/icons");
|
|
3556
3754
|
var import_ui27 = require("@elementor/ui");
|
|
3557
|
-
var
|
|
3558
|
-
var ORDER_LABEL = (0,
|
|
3755
|
+
var import_i18n24 = require("@wordpress/i18n");
|
|
3756
|
+
var ORDER_LABEL = (0, import_i18n24.__)("Order", "elementor");
|
|
3559
3757
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
3560
3758
|
var LAST_DEFAULT_VALUE = 99999;
|
|
3561
3759
|
var FIRST = "first";
|
|
@@ -3568,25 +3766,25 @@ var orderValueMap = {
|
|
|
3568
3766
|
var items = [
|
|
3569
3767
|
{
|
|
3570
3768
|
value: FIRST,
|
|
3571
|
-
label: (0,
|
|
3572
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3769
|
+
label: (0, import_i18n24.__)("First", "elementor"),
|
|
3770
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons10.ArrowUpSmallIcon, { fontSize: size }),
|
|
3573
3771
|
showTooltip: true
|
|
3574
3772
|
},
|
|
3575
3773
|
{
|
|
3576
3774
|
value: LAST,
|
|
3577
|
-
label: (0,
|
|
3578
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3775
|
+
label: (0, import_i18n24.__)("Last", "elementor"),
|
|
3776
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons10.ArrowDownSmallIcon, { fontSize: size }),
|
|
3579
3777
|
showTooltip: true
|
|
3580
3778
|
},
|
|
3581
3779
|
{
|
|
3582
3780
|
value: CUSTOM,
|
|
3583
|
-
label: (0,
|
|
3584
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3781
|
+
label: (0, import_i18n24.__)("Custom", "elementor"),
|
|
3782
|
+
renderContent: ({ size }) => /* @__PURE__ */ React46.createElement(import_icons10.PencilIcon, { fontSize: size }),
|
|
3585
3783
|
showTooltip: true
|
|
3586
3784
|
}
|
|
3587
3785
|
];
|
|
3588
3786
|
var FlexOrderField = () => {
|
|
3589
|
-
return /* @__PURE__ */
|
|
3787
|
+
return /* @__PURE__ */ React46.createElement(StylesField, { bind: "order", propDisplayName: ORDER_LABEL }, /* @__PURE__ */ React46.createElement(UiProviders, null, /* @__PURE__ */ React46.createElement(SectionContent, null, /* @__PURE__ */ React46.createElement(FlexOrderFieldContent, null))));
|
|
3590
3788
|
};
|
|
3591
3789
|
function FlexOrderFieldContent() {
|
|
3592
3790
|
const {
|
|
@@ -3596,17 +3794,17 @@ function FlexOrderFieldContent() {
|
|
|
3596
3794
|
} = useStylesField("order", {
|
|
3597
3795
|
history: { propDisplayName: ORDER_LABEL }
|
|
3598
3796
|
});
|
|
3599
|
-
const { placeholder } = (0,
|
|
3797
|
+
const { placeholder } = (0, import_editor_controls21.useBoundProp)();
|
|
3600
3798
|
const placeholderValue = placeholder;
|
|
3601
|
-
const currentGroup = (0,
|
|
3602
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
3603
|
-
const [customLocked, setCustomLocked] = (0,
|
|
3604
|
-
(0,
|
|
3799
|
+
const currentGroup = (0, import_react25.useMemo)(() => getGroupControlValue(order?.value ?? null), [order]);
|
|
3800
|
+
const [activeGroup, setActiveGroup] = (0, import_react25.useState)(currentGroup);
|
|
3801
|
+
const [customLocked, setCustomLocked] = (0, import_react25.useState)(false);
|
|
3802
|
+
(0, import_react25.useEffect)(() => {
|
|
3605
3803
|
if (!customLocked) {
|
|
3606
3804
|
setActiveGroup(currentGroup);
|
|
3607
3805
|
}
|
|
3608
3806
|
}, [currentGroup, customLocked]);
|
|
3609
|
-
(0,
|
|
3807
|
+
(0, import_react25.useEffect)(() => {
|
|
3610
3808
|
if (order === null) {
|
|
3611
3809
|
setCustomLocked(false);
|
|
3612
3810
|
}
|
|
@@ -3631,8 +3829,8 @@ function FlexOrderFieldContent() {
|
|
|
3631
3829
|
};
|
|
3632
3830
|
const isCustomVisible = CUSTOM === activeGroup || CUSTOM === groupPlaceholder;
|
|
3633
3831
|
const orderPlaceholder = CUSTOM === groupPlaceholder ? String(placeholderValue?.value ?? null) : "";
|
|
3634
|
-
return /* @__PURE__ */
|
|
3635
|
-
|
|
3832
|
+
return /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(StylesFieldLayout, { label: ORDER_LABEL }, /* @__PURE__ */ React46.createElement(
|
|
3833
|
+
import_editor_controls21.ControlToggleButtonGroup,
|
|
3636
3834
|
{
|
|
3637
3835
|
items,
|
|
3638
3836
|
value: activeGroup,
|
|
@@ -3641,8 +3839,8 @@ function FlexOrderFieldContent() {
|
|
|
3641
3839
|
placeholder: groupPlaceholder,
|
|
3642
3840
|
disabled: !canEdit
|
|
3643
3841
|
}
|
|
3644
|
-
)), isCustomVisible && /* @__PURE__ */
|
|
3645
|
-
|
|
3842
|
+
)), isCustomVisible && /* @__PURE__ */ React46.createElement(import_ui27.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React46.createElement(import_ui27.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React46.createElement(ControlLabel, null, (0, import_i18n24.__)("Custom order", "elementor"))), /* @__PURE__ */ React46.createElement(import_ui27.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React46.createElement(
|
|
3843
|
+
import_editor_controls21.NumberControl,
|
|
3646
3844
|
{
|
|
3647
3845
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
3648
3846
|
max: LAST_DEFAULT_VALUE - 1,
|
|
@@ -3665,52 +3863,52 @@ var getGroupControlValue = (order) => {
|
|
|
3665
3863
|
};
|
|
3666
3864
|
|
|
3667
3865
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3668
|
-
var
|
|
3669
|
-
var
|
|
3670
|
-
var
|
|
3866
|
+
var React47 = __toESM(require("react"));
|
|
3867
|
+
var import_react26 = require("react");
|
|
3868
|
+
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
3671
3869
|
var import_editor_props13 = require("@elementor/editor-props");
|
|
3672
|
-
var
|
|
3673
|
-
var
|
|
3674
|
-
var FLEX_SIZE_LABEL = (0,
|
|
3870
|
+
var import_icons11 = require("@elementor/icons");
|
|
3871
|
+
var import_i18n25 = require("@wordpress/i18n");
|
|
3872
|
+
var FLEX_SIZE_LABEL = (0, import_i18n25.__)("Flex Size", "elementor");
|
|
3675
3873
|
var DEFAULT = 1;
|
|
3676
3874
|
var items2 = [
|
|
3677
3875
|
{
|
|
3678
3876
|
value: "flex-grow",
|
|
3679
|
-
label: (0,
|
|
3680
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3877
|
+
label: (0, import_i18n25.__)("Grow", "elementor"),
|
|
3878
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons11.ExpandIcon, { fontSize: size }),
|
|
3681
3879
|
showTooltip: true
|
|
3682
3880
|
},
|
|
3683
3881
|
{
|
|
3684
3882
|
value: "flex-shrink",
|
|
3685
|
-
label: (0,
|
|
3686
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3883
|
+
label: (0, import_i18n25.__)("Shrink", "elementor"),
|
|
3884
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons11.ShrinkIcon, { fontSize: size }),
|
|
3687
3885
|
showTooltip: true
|
|
3688
3886
|
},
|
|
3689
3887
|
{
|
|
3690
3888
|
value: "custom",
|
|
3691
|
-
label: (0,
|
|
3692
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
3889
|
+
label: (0, import_i18n25.__)("Custom", "elementor"),
|
|
3890
|
+
renderContent: ({ size }) => /* @__PURE__ */ React47.createElement(import_icons11.PencilIcon, { fontSize: size }),
|
|
3693
3891
|
showTooltip: true
|
|
3694
3892
|
}
|
|
3695
3893
|
];
|
|
3696
3894
|
var FlexSizeField = () => {
|
|
3697
|
-
return /* @__PURE__ */
|
|
3895
|
+
return /* @__PURE__ */ React47.createElement(UiProviders, null, /* @__PURE__ */ React47.createElement(SectionContent, null, /* @__PURE__ */ React47.createElement(StylesField, { bind: "flex", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React47.createElement(FlexSizeFieldContent, null))));
|
|
3698
3896
|
};
|
|
3699
3897
|
var FlexSizeFieldContent = () => {
|
|
3700
3898
|
const { value, setValue, canEdit } = useStylesField("flex", {
|
|
3701
3899
|
history: { propDisplayName: FLEX_SIZE_LABEL }
|
|
3702
3900
|
});
|
|
3703
|
-
const { placeholder } = (0,
|
|
3901
|
+
const { placeholder } = (0, import_editor_controls22.useBoundProp)();
|
|
3704
3902
|
const flexValues = extractFlexValues(value);
|
|
3705
|
-
const currentGroup = (0,
|
|
3706
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
3707
|
-
const [customLocked, setCustomLocked] = (0,
|
|
3708
|
-
(0,
|
|
3903
|
+
const currentGroup = (0, import_react26.useMemo)(() => getActiveGroup(flexValues), [flexValues]);
|
|
3904
|
+
const [activeGroup, setActiveGroup] = (0, import_react26.useState)(currentGroup);
|
|
3905
|
+
const [customLocked, setCustomLocked] = (0, import_react26.useState)(false);
|
|
3906
|
+
(0, import_react26.useEffect)(() => {
|
|
3709
3907
|
if (!customLocked) {
|
|
3710
3908
|
setActiveGroup(currentGroup);
|
|
3711
3909
|
}
|
|
3712
3910
|
}, [currentGroup, customLocked]);
|
|
3713
|
-
(0,
|
|
3911
|
+
(0, import_react26.useEffect)(() => {
|
|
3714
3912
|
if (value === null) {
|
|
3715
3913
|
setCustomLocked(false);
|
|
3716
3914
|
}
|
|
@@ -3723,8 +3921,8 @@ var FlexSizeFieldContent = () => {
|
|
|
3723
3921
|
};
|
|
3724
3922
|
const groupPlaceholder = getActiveGroup(extractFlexValues(placeholder));
|
|
3725
3923
|
const isCustomVisible = "custom" === activeGroup || "custom" === groupPlaceholder;
|
|
3726
|
-
return /* @__PURE__ */
|
|
3727
|
-
|
|
3924
|
+
return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(StylesFieldLayout, { label: FLEX_SIZE_LABEL }, /* @__PURE__ */ React47.createElement(
|
|
3925
|
+
import_editor_controls22.ControlToggleButtonGroup,
|
|
3728
3926
|
{
|
|
3729
3927
|
value: activeGroup ?? null,
|
|
3730
3928
|
placeholder: groupPlaceholder ?? null,
|
|
@@ -3733,7 +3931,7 @@ var FlexSizeFieldContent = () => {
|
|
|
3733
3931
|
items: items2,
|
|
3734
3932
|
exclusive: true
|
|
3735
3933
|
}
|
|
3736
|
-
)), isCustomVisible && /* @__PURE__ */
|
|
3934
|
+
)), isCustomVisible && /* @__PURE__ */ React47.createElement(FlexCustomField, null));
|
|
3737
3935
|
};
|
|
3738
3936
|
function extractFlexValues(source) {
|
|
3739
3937
|
return {
|
|
@@ -3773,9 +3971,9 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
3773
3971
|
return null;
|
|
3774
3972
|
};
|
|
3775
3973
|
var FlexCustomField = () => {
|
|
3776
|
-
const flexBasisRowRef = (0,
|
|
3777
|
-
const context = (0,
|
|
3778
|
-
return /* @__PURE__ */
|
|
3974
|
+
const flexBasisRowRef = (0, import_react26.useRef)(null);
|
|
3975
|
+
const context = (0, import_editor_controls22.useBoundProp)(import_editor_props13.flexPropTypeUtil);
|
|
3976
|
+
return /* @__PURE__ */ React47.createElement(import_editor_controls22.PropProvider, { ...context }, /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(StylesFieldLayout, { label: (0, import_i18n25.__)("Grow", "elementor") }, /* @__PURE__ */ React47.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexGrow" }, /* @__PURE__ */ React47.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React47.createElement(StylesFieldLayout, { label: (0, import_i18n25.__)("Shrink", "elementor") }, /* @__PURE__ */ React47.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexShrink" }, /* @__PURE__ */ React47.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React47.createElement(StylesFieldLayout, { label: (0, import_i18n25.__)("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React47.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexBasis" }, /* @__PURE__ */ React47.createElement(import_editor_controls22.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3779
3977
|
};
|
|
3780
3978
|
var getActiveGroup = ({
|
|
3781
3979
|
grow,
|
|
@@ -3799,119 +3997,336 @@ var getActiveGroup = ({
|
|
|
3799
3997
|
};
|
|
3800
3998
|
|
|
3801
3999
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3802
|
-
var React47 = __toESM(require("react"));
|
|
3803
|
-
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
3804
|
-
var import_i18n25 = require("@wordpress/i18n");
|
|
3805
|
-
var GAPS_LABEL = (0, import_i18n25.__)("Gaps", "elementor");
|
|
3806
|
-
var GapControlField = () => {
|
|
3807
|
-
return /* @__PURE__ */ React47.createElement(StylesField, { bind: "gap", propDisplayName: GAPS_LABEL }, /* @__PURE__ */ React47.createElement(import_editor_controls22.GapControl, { label: GAPS_LABEL }));
|
|
3808
|
-
};
|
|
3809
|
-
|
|
3810
|
-
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3811
4000
|
var React48 = __toESM(require("react"));
|
|
3812
4001
|
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
3813
|
-
var import_icons11 = require("@elementor/icons");
|
|
3814
|
-
var import_ui28 = require("@elementor/ui");
|
|
3815
4002
|
var import_i18n26 = require("@wordpress/i18n");
|
|
3816
|
-
var
|
|
3817
|
-
var
|
|
3818
|
-
|
|
3819
|
-
var iconProps4 = {
|
|
3820
|
-
isClockwise: true,
|
|
3821
|
-
offset: -90
|
|
4003
|
+
var GAPS_LABEL = (0, import_i18n26.__)("Gaps", "elementor");
|
|
4004
|
+
var GapControlField = () => {
|
|
4005
|
+
return /* @__PURE__ */ React48.createElement(StylesField, { bind: "gap", propDisplayName: GAPS_LABEL }, /* @__PURE__ */ React48.createElement(import_editor_controls23.GapControl, { label: GAPS_LABEL }));
|
|
3822
4006
|
};
|
|
3823
|
-
|
|
4007
|
+
|
|
4008
|
+
// src/components/style-sections/layout-section/grid-auto-flow-field.tsx
|
|
4009
|
+
var React49 = __toESM(require("react"));
|
|
4010
|
+
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
4011
|
+
var import_icons12 = require("@elementor/icons");
|
|
4012
|
+
var import_ui28 = require("@elementor/ui");
|
|
4013
|
+
var import_i18n27 = require("@wordpress/i18n");
|
|
4014
|
+
var AUTO_FLOW_LABEL = (0, import_i18n27.__)("Auto flow", "elementor");
|
|
4015
|
+
var DENSE_LABEL = (0, import_i18n27.__)("Dense", "elementor");
|
|
4016
|
+
var StartIcon4 = (0, import_ui28.withDirection)(import_icons12.ArrowRightIcon);
|
|
4017
|
+
var directionOptions = [
|
|
3824
4018
|
{
|
|
3825
|
-
value: "
|
|
3826
|
-
label: (0,
|
|
3827
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4019
|
+
value: "row",
|
|
4020
|
+
label: (0, import_i18n27.__)("Row", "elementor"),
|
|
4021
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(StartIcon4, { fontSize: size }),
|
|
3828
4022
|
showTooltip: true
|
|
3829
4023
|
},
|
|
3830
4024
|
{
|
|
3831
|
-
value: "
|
|
3832
|
-
label: (0,
|
|
3833
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4025
|
+
value: "column",
|
|
4026
|
+
label: (0, import_i18n27.__)("Column", "elementor"),
|
|
4027
|
+
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons12.ArrowDownSmallIcon, { fontSize: size }),
|
|
3834
4028
|
showTooltip: true
|
|
3835
|
-
}
|
|
4029
|
+
}
|
|
4030
|
+
];
|
|
4031
|
+
var parseAutoFlow = (value) => {
|
|
4032
|
+
if (!value) {
|
|
4033
|
+
return { direction: "row", dense: false };
|
|
4034
|
+
}
|
|
4035
|
+
const dense = value.includes("dense");
|
|
4036
|
+
const direction = value.replace(/\s*dense\s*/, "").trim();
|
|
4037
|
+
return { direction: direction || "row", dense };
|
|
4038
|
+
};
|
|
4039
|
+
var composeAutoFlow = (direction, dense) => {
|
|
4040
|
+
return dense ? `${direction} dense` : direction;
|
|
4041
|
+
};
|
|
4042
|
+
var GridAutoFlowFieldContent = () => {
|
|
4043
|
+
const { value, setValue } = useStylesField("grid-auto-flow", {
|
|
4044
|
+
history: { propDisplayName: AUTO_FLOW_LABEL }
|
|
4045
|
+
});
|
|
4046
|
+
const { direction, dense } = parseAutoFlow(value?.value ?? null);
|
|
4047
|
+
const handleDirectionChange = (newDirection) => {
|
|
4048
|
+
if (!newDirection) {
|
|
4049
|
+
return;
|
|
4050
|
+
}
|
|
4051
|
+
setValue({ $$type: "string", value: composeAutoFlow(newDirection, dense) });
|
|
4052
|
+
};
|
|
4053
|
+
const handleDenseToggle = () => {
|
|
4054
|
+
setValue({ $$type: "string", value: composeAutoFlow(direction, !dense) });
|
|
4055
|
+
};
|
|
4056
|
+
return /* @__PURE__ */ React49.createElement(StylesFieldLayout, { label: AUTO_FLOW_LABEL }, /* @__PURE__ */ React49.createElement(import_ui28.Grid, { container: true, gap: 1, flexWrap: "nowrap", alignItems: "center", justifyContent: "flex-end" }, /* @__PURE__ */ React49.createElement(import_ui28.Grid, { item: true, sx: { width: 64, maxWidth: "100%" } }, /* @__PURE__ */ React49.createElement(
|
|
4057
|
+
import_editor_controls24.ControlToggleButtonGroup,
|
|
4058
|
+
{
|
|
4059
|
+
items: directionOptions,
|
|
4060
|
+
value: direction,
|
|
4061
|
+
onChange: handleDirectionChange,
|
|
4062
|
+
exclusive: true,
|
|
4063
|
+
fullWidth: true
|
|
4064
|
+
}
|
|
4065
|
+
)), /* @__PURE__ */ React49.createElement(import_ui28.Grid, { item: true }, /* @__PURE__ */ React49.createElement(import_ui28.Tooltip, { title: DENSE_LABEL }, /* @__PURE__ */ React49.createElement(
|
|
4066
|
+
import_ui28.ToggleButton,
|
|
4067
|
+
{
|
|
4068
|
+
value: "dense",
|
|
4069
|
+
selected: dense,
|
|
4070
|
+
onChange: handleDenseToggle,
|
|
4071
|
+
size: "tiny",
|
|
4072
|
+
"aria-label": DENSE_LABEL
|
|
4073
|
+
},
|
|
4074
|
+
/* @__PURE__ */ React49.createElement(import_icons12.LayoutDashboardIcon, { fontSize: "tiny" })
|
|
4075
|
+
)))));
|
|
4076
|
+
};
|
|
4077
|
+
var GridAutoFlowField = () => /* @__PURE__ */ React49.createElement(StylesField, { bind: "grid-auto-flow", propDisplayName: AUTO_FLOW_LABEL }, /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(GridAutoFlowFieldContent, null)));
|
|
4078
|
+
|
|
4079
|
+
// src/components/style-sections/layout-section/grid-justify-items-field.tsx
|
|
4080
|
+
var React50 = __toESM(require("react"));
|
|
4081
|
+
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
4082
|
+
var import_icons13 = require("@elementor/icons");
|
|
4083
|
+
var import_ui29 = require("@elementor/ui");
|
|
4084
|
+
var import_i18n28 = require("@wordpress/i18n");
|
|
4085
|
+
var JUSTIFY_ITEMS_LABEL = (0, import_i18n28.__)("Justify items", "elementor");
|
|
4086
|
+
var StartIcon5 = (0, import_ui29.withDirection)(import_icons13.LayoutAlignLeftIcon);
|
|
4087
|
+
var EndIcon4 = (0, import_ui29.withDirection)(import_icons13.LayoutAlignRightIcon);
|
|
4088
|
+
var options4 = [
|
|
3836
4089
|
{
|
|
3837
|
-
value: "
|
|
3838
|
-
label: (0,
|
|
3839
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4090
|
+
value: "start",
|
|
4091
|
+
label: (0, import_i18n28.__)("Start", "elementor"),
|
|
4092
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(StartIcon5, { fontSize: size }),
|
|
3840
4093
|
showTooltip: true
|
|
3841
4094
|
},
|
|
3842
4095
|
{
|
|
3843
|
-
value: "
|
|
3844
|
-
label: (0,
|
|
3845
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4096
|
+
value: "center",
|
|
4097
|
+
label: (0, import_i18n28.__)("Center", "elementor"),
|
|
4098
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons13.LayoutAlignCenterIcon, { fontSize: size }),
|
|
3846
4099
|
showTooltip: true
|
|
3847
4100
|
},
|
|
3848
4101
|
{
|
|
3849
|
-
value: "
|
|
3850
|
-
label: (0,
|
|
3851
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4102
|
+
value: "end",
|
|
4103
|
+
label: (0, import_i18n28.__)("End", "elementor"),
|
|
4104
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(EndIcon4, { fontSize: size }),
|
|
3852
4105
|
showTooltip: true
|
|
3853
4106
|
},
|
|
3854
4107
|
{
|
|
3855
|
-
value: "
|
|
3856
|
-
label: (0,
|
|
3857
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4108
|
+
value: "stretch",
|
|
4109
|
+
label: (0, import_i18n28.__)("Stretch", "elementor"),
|
|
4110
|
+
renderContent: ({ size }) => /* @__PURE__ */ React50.createElement(import_icons13.LayoutDistributeVerticalIcon, { fontSize: size }),
|
|
3858
4111
|
showTooltip: true
|
|
3859
4112
|
}
|
|
3860
4113
|
];
|
|
3861
|
-
var
|
|
4114
|
+
var GridJustifyItemsField = () => /* @__PURE__ */ React50.createElement(StylesField, { bind: "justify-items", propDisplayName: JUSTIFY_ITEMS_LABEL }, /* @__PURE__ */ React50.createElement(UiProviders, null, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: JUSTIFY_ITEMS_LABEL }, /* @__PURE__ */ React50.createElement(import_editor_controls25.ToggleControl, { options: options4 }))));
|
|
3862
4115
|
|
|
3863
|
-
// src/components/style-sections/layout-section/
|
|
3864
|
-
var
|
|
3865
|
-
var
|
|
3866
|
-
var
|
|
3867
|
-
var
|
|
3868
|
-
var
|
|
3869
|
-
var
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
{
|
|
3877
|
-
value: "wrap",
|
|
3878
|
-
label: (0, import_i18n27.__)("Wrap", "elementor"),
|
|
3879
|
-
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons12.ArrowBackIcon, { fontSize: size }),
|
|
3880
|
-
showTooltip: true
|
|
3881
|
-
},
|
|
3882
|
-
{
|
|
3883
|
-
value: "wrap-reverse",
|
|
3884
|
-
label: (0, import_i18n27.__)("Reversed wrap", "elementor"),
|
|
3885
|
-
renderContent: ({ size }) => /* @__PURE__ */ React49.createElement(import_icons12.ArrowForwardIcon, { fontSize: size }),
|
|
3886
|
-
showTooltip: true
|
|
4116
|
+
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
4117
|
+
var React51 = __toESM(require("react"));
|
|
4118
|
+
var import_react27 = require("react");
|
|
4119
|
+
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
4120
|
+
var import_ui30 = require("@elementor/ui");
|
|
4121
|
+
var import_i18n29 = require("@wordpress/i18n");
|
|
4122
|
+
var FR = "fr";
|
|
4123
|
+
var CUSTOM2 = "custom";
|
|
4124
|
+
var UNITS = [FR, CUSTOM2];
|
|
4125
|
+
var REPEAT_FR_PATTERN = /^repeat\(\s*(\d+)\s*,\s*1fr\s*\)$/;
|
|
4126
|
+
var cssToTrackValue = (css) => {
|
|
4127
|
+
if (!css) {
|
|
4128
|
+
return null;
|
|
3887
4129
|
}
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
4130
|
+
const match = css.match(REPEAT_FR_PATTERN);
|
|
4131
|
+
if (match) {
|
|
4132
|
+
return { size: parseInt(match[1], 10), unit: FR };
|
|
4133
|
+
}
|
|
4134
|
+
return { size: css, unit: CUSTOM2 };
|
|
3891
4135
|
};
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
4136
|
+
var trackValueToCss = (trackValue) => {
|
|
4137
|
+
if (!trackValue || trackValue.size === "" || trackValue.size === null) {
|
|
4138
|
+
return null;
|
|
4139
|
+
}
|
|
4140
|
+
if (trackValue.unit === FR) {
|
|
4141
|
+
return `repeat(${trackValue.size}, 1fr)`;
|
|
4142
|
+
}
|
|
4143
|
+
return String(trackValue.size);
|
|
4144
|
+
};
|
|
4145
|
+
var GridTrackField = ({ cssProp, label }) => /* @__PURE__ */ React51.createElement(StylesField, { bind: cssProp, propDisplayName: label }, /* @__PURE__ */ React51.createElement(GridTrackFieldContent, { cssProp, label }));
|
|
4146
|
+
var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
4147
|
+
const { value, setValue } = useStylesField(cssProp, {
|
|
4148
|
+
history: { propDisplayName: label }
|
|
3899
4149
|
});
|
|
3900
|
-
const
|
|
3901
|
-
const
|
|
3902
|
-
const
|
|
4150
|
+
const anchorRef = (0, import_react27.useRef)(null);
|
|
4151
|
+
const trackValue = cssToTrackValue(value?.value ?? null);
|
|
4152
|
+
const handleChange = (newValue) => {
|
|
4153
|
+
const css = trackValueToCss(newValue);
|
|
4154
|
+
setValue(css ? { $$type: "string", value: css } : null);
|
|
4155
|
+
};
|
|
4156
|
+
return /* @__PURE__ */ React51.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React51.createElement("div", { ref: anchorRef }, /* @__PURE__ */ React51.createElement(
|
|
4157
|
+
import_editor_controls26.SizeComponent,
|
|
4158
|
+
{
|
|
4159
|
+
units: UNITS,
|
|
4160
|
+
value: trackValue ?? { size: NaN, unit: FR },
|
|
4161
|
+
defaultUnit: FR,
|
|
4162
|
+
setValue: handleChange,
|
|
4163
|
+
onBlur: () => {
|
|
4164
|
+
},
|
|
4165
|
+
min: 1,
|
|
4166
|
+
anchorRef
|
|
4167
|
+
}
|
|
4168
|
+
)));
|
|
4169
|
+
};
|
|
4170
|
+
var GridSizeFields = () => /* @__PURE__ */ React51.createElement(import_ui30.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React51.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(GridTrackField, { cssProp: "grid-template-columns", label: (0, import_i18n29.__)("Columns", "elementor") })), /* @__PURE__ */ React51.createElement(import_ui30.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React51.createElement(GridTrackField, { cssProp: "grid-template-rows", label: (0, import_i18n29.__)("Rows", "elementor") })));
|
|
4171
|
+
|
|
4172
|
+
// src/components/style-sections/layout-section/grid-span-field.tsx
|
|
4173
|
+
var React52 = __toESM(require("react"));
|
|
4174
|
+
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
4175
|
+
var import_ui31 = require("@elementor/ui");
|
|
4176
|
+
var import_i18n30 = require("@wordpress/i18n");
|
|
4177
|
+
var MIN_SPAN = 1;
|
|
4178
|
+
var GridSpanFieldContent = ({ cssProp, label }) => {
|
|
4179
|
+
const { value, setValue, canEdit } = useStylesField(cssProp, {
|
|
4180
|
+
history: { propDisplayName: label }
|
|
4181
|
+
});
|
|
4182
|
+
const spanValue = value?.value ?? null;
|
|
4183
|
+
const handleChange = (event) => {
|
|
4184
|
+
const raw = event.target.value;
|
|
4185
|
+
if (raw === "") {
|
|
4186
|
+
setValue(null);
|
|
4187
|
+
return;
|
|
4188
|
+
}
|
|
4189
|
+
const num = parseInt(raw, 10);
|
|
4190
|
+
if (Number.isNaN(num)) {
|
|
4191
|
+
return;
|
|
4192
|
+
}
|
|
4193
|
+
const clamped = Math.max(num, MIN_SPAN);
|
|
4194
|
+
setValue({ $$type: "span", value: clamped });
|
|
4195
|
+
};
|
|
4196
|
+
return /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label, direction: "column" }, /* @__PURE__ */ React52.createElement(
|
|
4197
|
+
import_editor_controls27.NumberInput,
|
|
4198
|
+
{
|
|
4199
|
+
size: "tiny",
|
|
4200
|
+
type: "number",
|
|
4201
|
+
fullWidth: true,
|
|
4202
|
+
disabled: !canEdit,
|
|
4203
|
+
value: spanValue ?? "",
|
|
4204
|
+
onInput: handleChange,
|
|
4205
|
+
inputProps: { min: MIN_SPAN }
|
|
4206
|
+
}
|
|
4207
|
+
));
|
|
4208
|
+
};
|
|
4209
|
+
var GridSpanField = ({ cssProp, label }) => /* @__PURE__ */ React52.createElement(StylesField, { bind: cssProp, propDisplayName: label }, /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(GridSpanFieldContent, { cssProp, label })));
|
|
4210
|
+
var GridSpanFields = () => /* @__PURE__ */ React52.createElement(import_ui31.Grid, { container: true, gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React52.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(GridSpanField, { cssProp: "grid-column", label: (0, import_i18n30.__)("Column Span", "elementor") })), /* @__PURE__ */ React52.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React52.createElement(GridSpanField, { cssProp: "grid-row", label: (0, import_i18n30.__)("Row Span", "elementor") })));
|
|
4211
|
+
|
|
4212
|
+
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
4213
|
+
var React53 = __toESM(require("react"));
|
|
4214
|
+
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
4215
|
+
var import_icons14 = require("@elementor/icons");
|
|
4216
|
+
var import_ui32 = require("@elementor/ui");
|
|
4217
|
+
var import_i18n31 = require("@wordpress/i18n");
|
|
4218
|
+
var JUSTIFY_CONTENT_LABEL = (0, import_i18n31.__)("Justify content", "elementor");
|
|
4219
|
+
var StartIcon6 = (0, import_ui32.withDirection)(import_icons14.JustifyTopIcon);
|
|
4220
|
+
var EndIcon5 = (0, import_ui32.withDirection)(import_icons14.JustifyBottomIcon);
|
|
4221
|
+
var iconProps4 = {
|
|
4222
|
+
isClockwise: true,
|
|
4223
|
+
offset: -90
|
|
4224
|
+
};
|
|
4225
|
+
var options5 = [
|
|
4226
|
+
{
|
|
4227
|
+
value: "flex-start",
|
|
4228
|
+
label: (0, import_i18n31.__)("Start", "elementor"),
|
|
4229
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: StartIcon6, size, ...iconProps4 }),
|
|
4230
|
+
showTooltip: true
|
|
4231
|
+
},
|
|
4232
|
+
{
|
|
4233
|
+
value: "center",
|
|
4234
|
+
label: (0, import_i18n31.__)("Center", "elementor"),
|
|
4235
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: import_icons14.JustifyCenterIcon, size, ...iconProps4 }),
|
|
4236
|
+
showTooltip: true
|
|
4237
|
+
},
|
|
4238
|
+
{
|
|
4239
|
+
value: "flex-end",
|
|
4240
|
+
label: (0, import_i18n31.__)("End", "elementor"),
|
|
4241
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: EndIcon5, size, ...iconProps4 }),
|
|
4242
|
+
showTooltip: true
|
|
4243
|
+
},
|
|
4244
|
+
{
|
|
4245
|
+
value: "space-between",
|
|
4246
|
+
label: (0, import_i18n31.__)("Space between", "elementor"),
|
|
4247
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: import_icons14.JustifySpaceBetweenVerticalIcon, size, ...iconProps4 }),
|
|
4248
|
+
showTooltip: true
|
|
4249
|
+
},
|
|
4250
|
+
{
|
|
4251
|
+
value: "space-around",
|
|
4252
|
+
label: (0, import_i18n31.__)("Space around", "elementor"),
|
|
4253
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: import_icons14.JustifySpaceAroundVerticalIcon, size, ...iconProps4 }),
|
|
4254
|
+
showTooltip: true
|
|
4255
|
+
},
|
|
4256
|
+
{
|
|
4257
|
+
value: "space-evenly",
|
|
4258
|
+
label: (0, import_i18n31.__)("Space evenly", "elementor"),
|
|
4259
|
+
renderContent: ({ size }) => /* @__PURE__ */ React53.createElement(RotatedIcon, { icon: import_icons14.JustifyDistributeVerticalIcon, size, ...iconProps4 }),
|
|
4260
|
+
showTooltip: true
|
|
4261
|
+
}
|
|
4262
|
+
];
|
|
4263
|
+
var JustifyContentField = () => /* @__PURE__ */ React53.createElement(StylesField, { bind: "justify-content", propDisplayName: JUSTIFY_CONTENT_LABEL }, /* @__PURE__ */ React53.createElement(UiProviders, null, /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: JUSTIFY_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React53.createElement(import_editor_controls28.ToggleControl, { options: options5, fullWidth: true }))));
|
|
4264
|
+
|
|
4265
|
+
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
4266
|
+
var React54 = __toESM(require("react"));
|
|
4267
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
4268
|
+
var import_icons15 = require("@elementor/icons");
|
|
4269
|
+
var import_i18n32 = require("@wordpress/i18n");
|
|
4270
|
+
var FLEX_WRAP_LABEL = (0, import_i18n32.__)("Wrap", "elementor");
|
|
4271
|
+
var options6 = [
|
|
4272
|
+
{
|
|
4273
|
+
value: "nowrap",
|
|
4274
|
+
label: (0, import_i18n32.__)("No wrap", "elementor"),
|
|
4275
|
+
renderContent: ({ size }) => /* @__PURE__ */ React54.createElement(import_icons15.ArrowRightIcon, { fontSize: size }),
|
|
4276
|
+
showTooltip: true
|
|
4277
|
+
},
|
|
4278
|
+
{
|
|
4279
|
+
value: "wrap",
|
|
4280
|
+
label: (0, import_i18n32.__)("Wrap", "elementor"),
|
|
4281
|
+
renderContent: ({ size }) => /* @__PURE__ */ React54.createElement(import_icons15.ArrowBackIcon, { fontSize: size }),
|
|
4282
|
+
showTooltip: true
|
|
4283
|
+
},
|
|
4284
|
+
{
|
|
4285
|
+
value: "wrap-reverse",
|
|
4286
|
+
label: (0, import_i18n32.__)("Reversed wrap", "elementor"),
|
|
4287
|
+
renderContent: ({ size }) => /* @__PURE__ */ React54.createElement(import_icons15.ArrowForwardIcon, { fontSize: size }),
|
|
4288
|
+
showTooltip: true
|
|
4289
|
+
}
|
|
4290
|
+
];
|
|
4291
|
+
var WrapField = () => {
|
|
4292
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "flex-wrap", propDisplayName: FLEX_WRAP_LABEL }, /* @__PURE__ */ React54.createElement(UiProviders, null, /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: FLEX_WRAP_LABEL }, /* @__PURE__ */ React54.createElement(import_editor_controls29.ToggleControl, { options: options6 }))));
|
|
4293
|
+
};
|
|
4294
|
+
|
|
4295
|
+
// src/components/style-sections/layout-section/layout-section.tsx
|
|
4296
|
+
var DISPLAY_LABEL2 = (0, import_i18n33.__)("Display", "elementor");
|
|
4297
|
+
var FLEX_WRAP_LABEL2 = (0, import_i18n33.__)("Flex wrap", "elementor");
|
|
4298
|
+
var DEFAULT_PARENT_FLOW_DIRECTION = "row";
|
|
4299
|
+
var LayoutSection = () => {
|
|
4300
|
+
const { value: display } = useStylesField("display", {
|
|
4301
|
+
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
4302
|
+
});
|
|
4303
|
+
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
4304
|
+
const isGridExperimentActive = (0, import_editor_v1_adapters8.isExperimentActive)("e_css_grid");
|
|
4305
|
+
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
4306
|
+
const isDisplayGrid = "grid" === (display?.value ?? displayPlaceholder?.value);
|
|
4307
|
+
const { element } = useElement();
|
|
3903
4308
|
const parent = (0, import_editor_elements11.useParentElement)(element.id);
|
|
3904
4309
|
const parentStyle = useComputedStyle(parent?.id || null);
|
|
3905
|
-
const
|
|
3906
|
-
|
|
4310
|
+
const getParentStyleDirection = () => {
|
|
4311
|
+
if ("flex" === parentStyle?.display) {
|
|
4312
|
+
return parentStyle?.flexDirection ?? DEFAULT_PARENT_FLOW_DIRECTION;
|
|
4313
|
+
}
|
|
4314
|
+
if ("grid" === parentStyle?.display) {
|
|
4315
|
+
return parentStyle?.gridAutoFlow ?? DEFAULT_PARENT_FLOW_DIRECTION;
|
|
4316
|
+
}
|
|
4317
|
+
return DEFAULT_PARENT_FLOW_DIRECTION;
|
|
4318
|
+
};
|
|
4319
|
+
return /* @__PURE__ */ React55.createElement(SectionContent, null, /* @__PURE__ */ React55.createElement(DisplayField, null), isDisplayFlex && /* @__PURE__ */ React55.createElement(FlexFields, null), "flex" === parentStyle?.display && /* @__PURE__ */ React55.createElement(FlexChildFields, { parentStyleDirection: getParentStyleDirection() }), isGridExperimentActive && isDisplayGrid && /* @__PURE__ */ React55.createElement(GridFields, null), isGridExperimentActive && "grid" === parentStyle?.display && /* @__PURE__ */ React55.createElement(GridChildFields, { parentStyleDirection: getParentStyleDirection() }));
|
|
3907
4320
|
};
|
|
3908
4321
|
var FlexFields = () => {
|
|
3909
4322
|
const { value: flexWrap } = useStylesField("flex-wrap", {
|
|
3910
4323
|
history: { propDisplayName: FLEX_WRAP_LABEL2 }
|
|
3911
4324
|
});
|
|
3912
|
-
return /* @__PURE__ */
|
|
4325
|
+
return /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(FlexDirectionField, null), /* @__PURE__ */ React55.createElement(JustifyContentField, null), /* @__PURE__ */ React55.createElement(AlignItemsField, null), /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(GapControlField, null), /* @__PURE__ */ React55.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React55.createElement(AlignContentField, null));
|
|
3913
4326
|
};
|
|
3914
|
-
var
|
|
4327
|
+
var GridFields = () => /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(GridSizeFields, null), /* @__PURE__ */ React55.createElement(GridAutoFlowField, null), /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(GapControlField, null), /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(GridJustifyItemsField, null), /* @__PURE__ */ React55.createElement(AlignItemsField, null));
|
|
4328
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(import_editor_controls30.ControlFormLabel, null, (0, import_i18n33.__)("Flex child", "elementor")), /* @__PURE__ */ React55.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React55.createElement(FlexOrderField, null), /* @__PURE__ */ React55.createElement(FlexSizeField, null));
|
|
4329
|
+
var GridChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(PanelDivider, null), /* @__PURE__ */ React55.createElement(import_editor_controls30.ControlFormLabel, null, (0, import_i18n33.__)("Grid Child", "elementor")), /* @__PURE__ */ React55.createElement(GridSpanFields, null), /* @__PURE__ */ React55.createElement(AlignSelfGridChild, { parentStyleDirection }), /* @__PURE__ */ React55.createElement(FlexOrderField, null));
|
|
3915
4330
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3916
4331
|
const value = display?.value ?? local?.value;
|
|
3917
4332
|
if (!value) {
|
|
@@ -3921,39 +4336,40 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3921
4336
|
};
|
|
3922
4337
|
|
|
3923
4338
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3924
|
-
var
|
|
3925
|
-
var
|
|
4339
|
+
var React60 = __toESM(require("react"));
|
|
4340
|
+
var import_react30 = require("react");
|
|
3926
4341
|
var import_session7 = require("@elementor/session");
|
|
3927
|
-
var
|
|
4342
|
+
var import_ui35 = require("@elementor/ui");
|
|
4343
|
+
var import_i18n38 = require("@wordpress/i18n");
|
|
3928
4344
|
|
|
3929
4345
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3930
|
-
var
|
|
3931
|
-
var
|
|
3932
|
-
var
|
|
3933
|
-
var
|
|
3934
|
-
var
|
|
3935
|
-
var
|
|
3936
|
-
var InlineStartIcon2 = (0,
|
|
3937
|
-
var InlineEndIcon2 = (0,
|
|
4346
|
+
var React56 = __toESM(require("react"));
|
|
4347
|
+
var import_react28 = require("react");
|
|
4348
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
4349
|
+
var import_icons16 = require("@elementor/icons");
|
|
4350
|
+
var import_ui33 = require("@elementor/ui");
|
|
4351
|
+
var import_i18n34 = require("@wordpress/i18n");
|
|
4352
|
+
var InlineStartIcon2 = (0, import_ui33.withDirection)(import_icons16.SideLeftIcon);
|
|
4353
|
+
var InlineEndIcon2 = (0, import_ui33.withDirection)(import_icons16.SideRightIcon);
|
|
3938
4354
|
var sideIcons = {
|
|
3939
|
-
"inset-block-start": /* @__PURE__ */
|
|
3940
|
-
"inset-block-end": /* @__PURE__ */
|
|
3941
|
-
"inset-inline-start": /* @__PURE__ */
|
|
3942
|
-
"inset-inline-end": /* @__PURE__ */
|
|
4355
|
+
"inset-block-start": /* @__PURE__ */ React56.createElement(import_icons16.SideTopIcon, { fontSize: "tiny" }),
|
|
4356
|
+
"inset-block-end": /* @__PURE__ */ React56.createElement(import_icons16.SideBottomIcon, { fontSize: "tiny" }),
|
|
4357
|
+
"inset-inline-start": /* @__PURE__ */ React56.createElement(RotatedIcon, { icon: InlineStartIcon2, size: "tiny" }),
|
|
4358
|
+
"inset-inline-end": /* @__PURE__ */ React56.createElement(RotatedIcon, { icon: InlineEndIcon2, size: "tiny" })
|
|
3943
4359
|
};
|
|
3944
|
-
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
3945
|
-
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0,
|
|
4360
|
+
var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n34.__)("Right", "elementor") : (0, import_i18n34.__)("Left", "elementor");
|
|
4361
|
+
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n34.__)("Left", "elementor") : (0, import_i18n34.__)("Right", "elementor");
|
|
3946
4362
|
var DimensionsField = () => {
|
|
3947
4363
|
const { isSiteRtl } = useDirection();
|
|
3948
|
-
const rowRefs = [(0,
|
|
3949
|
-
return /* @__PURE__ */
|
|
4364
|
+
const rowRefs = [(0, import_react28.useRef)(null), (0, import_react28.useRef)(null)];
|
|
4365
|
+
return /* @__PURE__ */ React56.createElement(UiProviders, null, /* @__PURE__ */ React56.createElement(import_ui33.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React56.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n34.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React56.createElement(
|
|
3950
4366
|
DimensionField,
|
|
3951
4367
|
{
|
|
3952
4368
|
side: "inset-inline-end",
|
|
3953
4369
|
label: getInlineEndLabel(isSiteRtl),
|
|
3954
4370
|
rowRef: rowRefs[0]
|
|
3955
4371
|
}
|
|
3956
|
-
)), /* @__PURE__ */
|
|
4372
|
+
)), /* @__PURE__ */ React56.createElement(import_ui33.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React56.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n34.__)("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React56.createElement(
|
|
3957
4373
|
DimensionField,
|
|
3958
4374
|
{
|
|
3959
4375
|
side: "inset-inline-start",
|
|
@@ -3966,8 +4382,8 @@ var DimensionField = ({
|
|
|
3966
4382
|
side,
|
|
3967
4383
|
label,
|
|
3968
4384
|
rowRef
|
|
3969
|
-
}) => /* @__PURE__ */
|
|
3970
|
-
|
|
4385
|
+
}) => /* @__PURE__ */ React56.createElement(StylesField, { bind: side, propDisplayName: label }, /* @__PURE__ */ React56.createElement(import_ui33.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React56.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(ControlLabel, null, label)), /* @__PURE__ */ React56.createElement(import_ui33.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React56.createElement(
|
|
4386
|
+
import_editor_controls31.SizeControl,
|
|
3971
4387
|
{
|
|
3972
4388
|
startIcon: sideIcons[side],
|
|
3973
4389
|
extendedOptions: ["auto"],
|
|
@@ -3977,103 +4393,88 @@ var DimensionField = ({
|
|
|
3977
4393
|
))));
|
|
3978
4394
|
|
|
3979
4395
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3980
|
-
var
|
|
3981
|
-
var
|
|
3982
|
-
var
|
|
3983
|
-
var
|
|
3984
|
-
var OFFSET_LABEL = (0,
|
|
3985
|
-
var
|
|
4396
|
+
var React57 = __toESM(require("react"));
|
|
4397
|
+
var import_react29 = require("react");
|
|
4398
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
4399
|
+
var import_i18n35 = require("@wordpress/i18n");
|
|
4400
|
+
var OFFSET_LABEL = (0, import_i18n35.__)("Anchor offset", "elementor");
|
|
4401
|
+
var UNITS2 = ["px", "em", "rem", "vw", "vh"];
|
|
3986
4402
|
var OffsetField = () => {
|
|
3987
|
-
const rowRef = (0,
|
|
3988
|
-
return /* @__PURE__ */
|
|
4403
|
+
const rowRef = (0, import_react29.useRef)(null);
|
|
4404
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React57.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React57.createElement(import_editor_controls32.SizeControl, { units: UNITS2, anchorRef: rowRef })));
|
|
3989
4405
|
};
|
|
3990
4406
|
|
|
3991
4407
|
// src/components/style-sections/position-section/position-field.tsx
|
|
3992
|
-
var
|
|
3993
|
-
var
|
|
3994
|
-
var
|
|
3995
|
-
var POSITION_LABEL = (0,
|
|
4408
|
+
var React58 = __toESM(require("react"));
|
|
4409
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
4410
|
+
var import_i18n36 = require("@wordpress/i18n");
|
|
4411
|
+
var POSITION_LABEL = (0, import_i18n36.__)("Position", "elementor");
|
|
3996
4412
|
var positionOptions = [
|
|
3997
|
-
{ label: (0,
|
|
3998
|
-
{ label: (0,
|
|
3999
|
-
{ label: (0,
|
|
4000
|
-
{ label: (0,
|
|
4001
|
-
{ label: (0,
|
|
4413
|
+
{ label: (0, import_i18n36.__)("Static", "elementor"), value: "static" },
|
|
4414
|
+
{ label: (0, import_i18n36.__)("Relative", "elementor"), value: "relative" },
|
|
4415
|
+
{ label: (0, import_i18n36.__)("Absolute", "elementor"), value: "absolute" },
|
|
4416
|
+
{ label: (0, import_i18n36.__)("Fixed", "elementor"), value: "fixed" },
|
|
4417
|
+
{ label: (0, import_i18n36.__)("Sticky", "elementor"), value: "sticky" }
|
|
4002
4418
|
];
|
|
4003
|
-
var PositionField = (
|
|
4004
|
-
return /* @__PURE__ */
|
|
4419
|
+
var PositionField = () => {
|
|
4420
|
+
return /* @__PURE__ */ React58.createElement(StylesField, { bind: "position", propDisplayName: POSITION_LABEL }, /* @__PURE__ */ React58.createElement(StylesFieldLayout, { label: POSITION_LABEL }, /* @__PURE__ */ React58.createElement(import_editor_controls33.SelectControl, { options: positionOptions })));
|
|
4005
4421
|
};
|
|
4006
4422
|
|
|
4007
4423
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
4008
|
-
var
|
|
4009
|
-
var
|
|
4010
|
-
var
|
|
4011
|
-
var
|
|
4012
|
-
var
|
|
4013
|
-
|
|
4424
|
+
var React59 = __toESM(require("react"));
|
|
4425
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
4426
|
+
var import_icons17 = require("@elementor/icons");
|
|
4427
|
+
var import_ui34 = require("@elementor/ui");
|
|
4428
|
+
var import_i18n37 = require("@wordpress/i18n");
|
|
4429
|
+
var Z_INDEX_LABEL = (0, import_i18n37.__)("Z-index", "elementor");
|
|
4430
|
+
var ZIndexField = ({ disabled }) => {
|
|
4431
|
+
const StyleField = /* @__PURE__ */ React59.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React59.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React59.createElement(import_editor_controls34.NumberControl, { disabled })));
|
|
4432
|
+
const content = /* @__PURE__ */ React59.createElement(import_ui34.Alert, { color: "secondary", icon: /* @__PURE__ */ React59.createElement(import_icons17.InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React59.createElement(import_ui34.AlertTitle, null, (0, import_i18n37.__)("Z-index", "elementor")), /* @__PURE__ */ React59.createElement(import_ui34.Box, { component: "span" }, (0, import_i18n37.__)(
|
|
4433
|
+
"z-index only works on positioned elements. Change position to relative, absolute, or fixed to enable layering.",
|
|
4434
|
+
"elementor"
|
|
4435
|
+
)));
|
|
4436
|
+
return disabled ? /* @__PURE__ */ React59.createElement(
|
|
4437
|
+
import_ui34.Infotip,
|
|
4438
|
+
{
|
|
4439
|
+
placement: "right",
|
|
4440
|
+
content,
|
|
4441
|
+
color: "secondary",
|
|
4442
|
+
slotProps: { popper: { sx: { width: 300 } } }
|
|
4443
|
+
},
|
|
4444
|
+
/* @__PURE__ */ React59.createElement(import_ui34.Box, null, StyleField)
|
|
4445
|
+
) : /* @__PURE__ */ React59.createElement(React59.Fragment, null, StyleField);
|
|
4014
4446
|
};
|
|
4015
4447
|
|
|
4016
4448
|
// src/components/style-sections/position-section/position-section.tsx
|
|
4017
4449
|
var POSITION_STATIC = "static";
|
|
4018
|
-
var POSITION_LABEL2 = (0,
|
|
4019
|
-
var DIMENSIONS_LABEL = (0,
|
|
4020
|
-
var
|
|
4450
|
+
var POSITION_LABEL2 = (0, import_i18n38.__)("Position", "elementor");
|
|
4451
|
+
var DIMENSIONS_LABEL = (0, import_i18n38.__)("Dimensions", "elementor");
|
|
4452
|
+
var DEPENDENT_PROP_NAMES = [
|
|
4021
4453
|
"inset-block-start",
|
|
4022
4454
|
"inset-block-end",
|
|
4023
4455
|
"inset-inline-start",
|
|
4024
4456
|
"inset-inline-end",
|
|
4025
4457
|
"z-index"
|
|
4026
4458
|
];
|
|
4027
|
-
var CLEARED_POSITION_DEPENDENT_VALUES = {
|
|
4028
|
-
"inset-block-start": null,
|
|
4029
|
-
"inset-block-end": null,
|
|
4030
|
-
"inset-inline-start": null,
|
|
4031
|
-
"inset-inline-end": null,
|
|
4032
|
-
"z-index": null
|
|
4033
|
-
};
|
|
4034
4459
|
var PositionSection = () => {
|
|
4035
|
-
const { value:
|
|
4036
|
-
|
|
4037
|
-
});
|
|
4038
|
-
const
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
"inset-block-start": positionDependentValues?.["inset-block-start"],
|
|
4043
|
-
"inset-block-end": positionDependentValues?.["inset-block-end"],
|
|
4044
|
-
"inset-inline-start": positionDependentValues?.["inset-inline-start"],
|
|
4045
|
-
"inset-inline-end": positionDependentValues?.["inset-inline-end"]
|
|
4046
|
-
};
|
|
4047
|
-
const meta = { history: { propDisplayName: DIMENSIONS_LABEL } };
|
|
4048
|
-
const hasValuesToClear = Object.values(dimensions).some((v) => v !== null) || positionDependentValues?.["z-index"] !== null;
|
|
4049
|
-
if (hasValuesToClear) {
|
|
4050
|
-
updateDimensionsHistory(dimensions);
|
|
4051
|
-
setPositionDependentValues(CLEARED_POSITION_DEPENDENT_VALUES, meta);
|
|
4052
|
-
}
|
|
4053
|
-
}, [positionDependentValues, updateDimensionsHistory, setPositionDependentValues]);
|
|
4054
|
-
const clearPositionDependentPropsRef = (0, import_react27.useRef)(clearPositionDependentProps);
|
|
4055
|
-
clearPositionDependentPropsRef.current = clearPositionDependentProps;
|
|
4056
|
-
(0, import_react27.useEffect)(() => {
|
|
4057
|
-
if (positionValue?.value === POSITION_STATIC || positionValue === null) {
|
|
4058
|
-
clearPositionDependentPropsRef.current();
|
|
4059
|
-
}
|
|
4060
|
-
}, [positionValue]);
|
|
4061
|
-
const onPositionChange = (newPosition, previousPosition) => {
|
|
4062
|
-
const meta = { history: { propDisplayName: DIMENSIONS_LABEL } };
|
|
4063
|
-
if (newPosition === POSITION_STATIC) {
|
|
4064
|
-
clearPositionDependentProps();
|
|
4065
|
-
} else if (previousPosition === POSITION_STATIC) {
|
|
4066
|
-
if (dimensionsValuesFromHistory) {
|
|
4067
|
-
setPositionDependentValues(
|
|
4068
|
-
{ ...dimensionsValuesFromHistory, "z-index": void 0 },
|
|
4069
|
-
meta
|
|
4070
|
-
);
|
|
4071
|
-
clearDimensionsHistory();
|
|
4072
|
-
}
|
|
4460
|
+
const { value: position } = useStylesField("position", withHistoryLabel(POSITION_LABEL2));
|
|
4461
|
+
const positionPrevRef = (0, import_react30.useRef)(position);
|
|
4462
|
+
const { values: dependentValues, setValues: setDependentValues } = useStylesFields(DEPENDENT_PROP_NAMES);
|
|
4463
|
+
const [savedDependentValues, saveToHistory, clearHistory] = usePersistDimensions();
|
|
4464
|
+
(0, import_react30.useEffect)(() => {
|
|
4465
|
+
if (position && position?.value === POSITION_STATIC && hasDependentValues(dependentValues)) {
|
|
4466
|
+
saveToHistory(extractDimensions(dependentValues));
|
|
4073
4467
|
}
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4468
|
+
if (positionPrevRef.current?.value === POSITION_STATIC) {
|
|
4469
|
+
setDependentValues({ ...savedDependentValues }, withHistoryLabel(DIMENSIONS_LABEL));
|
|
4470
|
+
clearHistory();
|
|
4471
|
+
}
|
|
4472
|
+
if ((!position || position?.value === POSITION_STATIC) && dependentValues?.["z-index"]) {
|
|
4473
|
+
setDependentValues({ "z-index": null }, withHistoryLabel(DIMENSIONS_LABEL));
|
|
4474
|
+
}
|
|
4475
|
+
positionPrevRef.current = position;
|
|
4476
|
+
}, [position?.value]);
|
|
4477
|
+
return /* @__PURE__ */ React60.createElement(StyledSectionContent, null, /* @__PURE__ */ React60.createElement(PositionField, null), /* @__PURE__ */ React60.createElement(DimensionsField, null), /* @__PURE__ */ React60.createElement(ZIndexField, { disabled: !position || position?.value === POSITION_STATIC }), /* @__PURE__ */ React60.createElement(PanelDivider, null), /* @__PURE__ */ React60.createElement(OffsetField, null));
|
|
4077
4478
|
};
|
|
4078
4479
|
var usePersistDimensions = () => {
|
|
4079
4480
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -4081,28 +4482,68 @@ var usePersistDimensions = () => {
|
|
|
4081
4482
|
const dimensionsPath = `${styleVariantPath}/dimensions`;
|
|
4082
4483
|
return (0, import_session7.useSessionStorage)(dimensionsPath);
|
|
4083
4484
|
};
|
|
4485
|
+
var withHistoryLabel = (name) => {
|
|
4486
|
+
return {
|
|
4487
|
+
history: { propDisplayName: name }
|
|
4488
|
+
};
|
|
4489
|
+
};
|
|
4490
|
+
var hasDependentValues = (values) => {
|
|
4491
|
+
if (!values) {
|
|
4492
|
+
return false;
|
|
4493
|
+
}
|
|
4494
|
+
const dimensions = extractDimensions(values);
|
|
4495
|
+
return Object.values(dimensions).some((v) => v !== null);
|
|
4496
|
+
};
|
|
4497
|
+
var extractDimensions = (values) => {
|
|
4498
|
+
return DEPENDENT_PROP_NAMES.reduce((acc, key) => {
|
|
4499
|
+
return {
|
|
4500
|
+
...acc,
|
|
4501
|
+
[key]: values?.[key] ?? null
|
|
4502
|
+
};
|
|
4503
|
+
}, {});
|
|
4504
|
+
};
|
|
4505
|
+
var StyledSectionContent = (0, import_ui35.styled)(SectionContent, {
|
|
4506
|
+
shouldForwardProp: (prop) => prop !== "gap"
|
|
4507
|
+
})(({ gap = 2, theme }) => ({
|
|
4508
|
+
gap: 0,
|
|
4509
|
+
"& > *": {
|
|
4510
|
+
marginBottom: theme.spacing(gap)
|
|
4511
|
+
},
|
|
4512
|
+
"& > *:last-child": {
|
|
4513
|
+
marginBottom: 0
|
|
4514
|
+
},
|
|
4515
|
+
"& > .MuiStack-root": {
|
|
4516
|
+
marginBottom: 0
|
|
4517
|
+
},
|
|
4518
|
+
"& > .MuiStack-root:has(> *)": {
|
|
4519
|
+
marginBottom: theme.spacing(gap)
|
|
4520
|
+
},
|
|
4521
|
+
"& > .MuiDivider-root": {
|
|
4522
|
+
marginBottom: theme.spacing(gap)
|
|
4523
|
+
}
|
|
4524
|
+
}));
|
|
4084
4525
|
|
|
4085
4526
|
// src/components/style-sections/size-section/size-section.tsx
|
|
4086
|
-
var
|
|
4087
|
-
var
|
|
4088
|
-
var
|
|
4089
|
-
var
|
|
4090
|
-
var
|
|
4527
|
+
var React65 = __toESM(require("react"));
|
|
4528
|
+
var import_react31 = require("react");
|
|
4529
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
4530
|
+
var import_ui37 = require("@elementor/ui");
|
|
4531
|
+
var import_i18n42 = require("@wordpress/i18n");
|
|
4091
4532
|
|
|
4092
4533
|
// src/components/style-tab-collapsible-content.tsx
|
|
4093
|
-
var
|
|
4534
|
+
var React62 = __toESM(require("react"));
|
|
4094
4535
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
4095
4536
|
|
|
4096
4537
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
4097
|
-
var
|
|
4538
|
+
var React61 = __toESM(require("react"));
|
|
4098
4539
|
var import_editor_styles_repository14 = require("@elementor/editor-styles-repository");
|
|
4099
|
-
var
|
|
4100
|
-
var
|
|
4540
|
+
var import_ui36 = require("@elementor/ui");
|
|
4541
|
+
var import_i18n39 = require("@wordpress/i18n");
|
|
4101
4542
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
4102
4543
|
const { id, meta, provider } = useStyle();
|
|
4103
4544
|
const snapshot = useStylesInheritanceSnapshot();
|
|
4104
4545
|
if (fields.includes("custom_css")) {
|
|
4105
|
-
return /* @__PURE__ */
|
|
4546
|
+
return /* @__PURE__ */ React61.createElement(CustomCssIndicator, null);
|
|
4106
4547
|
}
|
|
4107
4548
|
const snapshotFields = Object.fromEntries(
|
|
4108
4549
|
Object.entries(snapshot ?? {}).filter(([key]) => fields.includes(key))
|
|
@@ -4111,9 +4552,9 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
4111
4552
|
if (!hasValues && !hasOverrides) {
|
|
4112
4553
|
return null;
|
|
4113
4554
|
}
|
|
4114
|
-
const hasValueLabel = (0,
|
|
4115
|
-
const hasOverridesLabel = (0,
|
|
4116
|
-
return /* @__PURE__ */
|
|
4555
|
+
const hasValueLabel = (0, import_i18n39.__)("Has effective styles", "elementor");
|
|
4556
|
+
const hasOverridesLabel = (0, import_i18n39.__)("Has overridden styles", "elementor");
|
|
4557
|
+
return /* @__PURE__ */ React61.createElement(import_ui36.Tooltip, { title: (0, import_i18n39.__)("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React61.createElement(import_ui36.Stack, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React61.createElement(
|
|
4117
4558
|
StyleIndicator,
|
|
4118
4559
|
{
|
|
4119
4560
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
@@ -4121,7 +4562,7 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
4121
4562
|
role: "listitem",
|
|
4122
4563
|
"aria-label": hasValueLabel
|
|
4123
4564
|
}
|
|
4124
|
-
), hasOverrides && /* @__PURE__ */
|
|
4565
|
+
), hasOverrides && /* @__PURE__ */ React61.createElement(
|
|
4125
4566
|
StyleIndicator,
|
|
4126
4567
|
{
|
|
4127
4568
|
isOverridden: true,
|
|
@@ -4161,59 +4602,59 @@ function getCurrentStyleFromChain(chain, styleId, meta) {
|
|
|
4161
4602
|
|
|
4162
4603
|
// src/components/style-tab-collapsible-content.tsx
|
|
4163
4604
|
var StyleTabCollapsibleContent = ({ fields = [], children }) => {
|
|
4164
|
-
return /* @__PURE__ */
|
|
4605
|
+
return /* @__PURE__ */ React62.createElement(import_editor_ui6.CollapsibleContent, { titleEnd: getStylesInheritanceIndicators(fields) }, children);
|
|
4165
4606
|
};
|
|
4166
4607
|
function getStylesInheritanceIndicators(fields) {
|
|
4167
4608
|
if (fields.length === 0) {
|
|
4168
4609
|
return null;
|
|
4169
4610
|
}
|
|
4170
|
-
return (isOpen) => !isOpen ? /* @__PURE__ */
|
|
4611
|
+
return (isOpen) => !isOpen ? /* @__PURE__ */ React62.createElement(StylesInheritanceSectionIndicators, { fields }) : null;
|
|
4171
4612
|
}
|
|
4172
4613
|
|
|
4173
4614
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
4174
|
-
var
|
|
4175
|
-
var
|
|
4176
|
-
var
|
|
4177
|
-
var OBJECT_FIT_LABEL = (0,
|
|
4615
|
+
var React63 = __toESM(require("react"));
|
|
4616
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
4617
|
+
var import_i18n40 = require("@wordpress/i18n");
|
|
4618
|
+
var OBJECT_FIT_LABEL = (0, import_i18n40.__)("Object fit", "elementor");
|
|
4178
4619
|
var positionOptions2 = [
|
|
4179
|
-
{ label: (0,
|
|
4180
|
-
{ label: (0,
|
|
4181
|
-
{ label: (0,
|
|
4182
|
-
{ label: (0,
|
|
4183
|
-
{ label: (0,
|
|
4620
|
+
{ label: (0, import_i18n40.__)("Fill", "elementor"), value: "fill" },
|
|
4621
|
+
{ label: (0, import_i18n40.__)("Cover", "elementor"), value: "cover" },
|
|
4622
|
+
{ label: (0, import_i18n40.__)("Contain", "elementor"), value: "contain" },
|
|
4623
|
+
{ label: (0, import_i18n40.__)("None", "elementor"), value: "none" },
|
|
4624
|
+
{ label: (0, import_i18n40.__)("Scale down", "elementor"), value: "scale-down" }
|
|
4184
4625
|
];
|
|
4185
4626
|
var ObjectFitField = () => {
|
|
4186
|
-
return /* @__PURE__ */
|
|
4627
|
+
return /* @__PURE__ */ React63.createElement(StylesField, { bind: "object-fit", propDisplayName: OBJECT_FIT_LABEL }, /* @__PURE__ */ React63.createElement(StylesFieldLayout, { label: OBJECT_FIT_LABEL }, /* @__PURE__ */ React63.createElement(import_editor_controls35.SelectControl, { options: positionOptions2 })));
|
|
4187
4628
|
};
|
|
4188
4629
|
|
|
4189
4630
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
4190
|
-
var
|
|
4191
|
-
var
|
|
4192
|
-
var
|
|
4193
|
-
var
|
|
4194
|
-
var OVERFLOW_LABEL = (0,
|
|
4195
|
-
var
|
|
4631
|
+
var React64 = __toESM(require("react"));
|
|
4632
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
4633
|
+
var import_icons18 = require("@elementor/icons");
|
|
4634
|
+
var import_i18n41 = require("@wordpress/i18n");
|
|
4635
|
+
var OVERFLOW_LABEL = (0, import_i18n41.__)("Overflow", "elementor");
|
|
4636
|
+
var options7 = [
|
|
4196
4637
|
{
|
|
4197
4638
|
value: "visible",
|
|
4198
|
-
label: (0,
|
|
4199
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4639
|
+
label: (0, import_i18n41.__)("Visible", "elementor"),
|
|
4640
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons18.EyeIcon, { fontSize: size }),
|
|
4200
4641
|
showTooltip: true
|
|
4201
4642
|
},
|
|
4202
4643
|
{
|
|
4203
4644
|
value: "hidden",
|
|
4204
|
-
label: (0,
|
|
4205
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4645
|
+
label: (0, import_i18n41.__)("Hidden", "elementor"),
|
|
4646
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons18.EyeOffIcon, { fontSize: size }),
|
|
4206
4647
|
showTooltip: true
|
|
4207
4648
|
},
|
|
4208
4649
|
{
|
|
4209
4650
|
value: "auto",
|
|
4210
|
-
label: (0,
|
|
4211
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4651
|
+
label: (0, import_i18n41.__)("Auto", "elementor"),
|
|
4652
|
+
renderContent: ({ size }) => /* @__PURE__ */ React64.createElement(import_icons18.LetterAIcon, { fontSize: size }),
|
|
4212
4653
|
showTooltip: true
|
|
4213
4654
|
}
|
|
4214
4655
|
];
|
|
4215
4656
|
var OverflowField = () => {
|
|
4216
|
-
return /* @__PURE__ */
|
|
4657
|
+
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "overflow", propDisplayName: OVERFLOW_LABEL }, /* @__PURE__ */ React64.createElement(StylesFieldLayout, { label: OVERFLOW_LABEL }, /* @__PURE__ */ React64.createElement(import_editor_controls36.ToggleControl, { options: options7 })));
|
|
4217
4658
|
};
|
|
4218
4659
|
|
|
4219
4660
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -4221,98 +4662,98 @@ var CssSizeProps = [
|
|
|
4221
4662
|
[
|
|
4222
4663
|
{
|
|
4223
4664
|
bind: "width",
|
|
4224
|
-
label: (0,
|
|
4665
|
+
label: (0, import_i18n42.__)("Width", "elementor")
|
|
4225
4666
|
},
|
|
4226
4667
|
{
|
|
4227
4668
|
bind: "height",
|
|
4228
|
-
label: (0,
|
|
4669
|
+
label: (0, import_i18n42.__)("Height", "elementor")
|
|
4229
4670
|
}
|
|
4230
4671
|
],
|
|
4231
4672
|
[
|
|
4232
4673
|
{
|
|
4233
4674
|
bind: "min-width",
|
|
4234
|
-
label: (0,
|
|
4675
|
+
label: (0, import_i18n42.__)("Min width", "elementor")
|
|
4235
4676
|
},
|
|
4236
4677
|
{
|
|
4237
4678
|
bind: "min-height",
|
|
4238
|
-
label: (0,
|
|
4679
|
+
label: (0, import_i18n42.__)("Min height", "elementor")
|
|
4239
4680
|
}
|
|
4240
4681
|
],
|
|
4241
4682
|
[
|
|
4242
4683
|
{
|
|
4243
4684
|
bind: "max-width",
|
|
4244
|
-
label: (0,
|
|
4685
|
+
label: (0, import_i18n42.__)("Max width", "elementor")
|
|
4245
4686
|
},
|
|
4246
4687
|
{
|
|
4247
4688
|
bind: "max-height",
|
|
4248
|
-
label: (0,
|
|
4689
|
+
label: (0, import_i18n42.__)("Max height", "elementor")
|
|
4249
4690
|
}
|
|
4250
4691
|
]
|
|
4251
4692
|
];
|
|
4252
|
-
var ASPECT_RATIO_LABEL = (0,
|
|
4693
|
+
var ASPECT_RATIO_LABEL = (0, import_i18n42.__)("Aspect Ratio", "elementor");
|
|
4253
4694
|
var SizeSection = () => {
|
|
4254
|
-
const gridRowRefs = [(0,
|
|
4255
|
-
return /* @__PURE__ */
|
|
4695
|
+
const gridRowRefs = [(0, import_react31.useRef)(null), (0, import_react31.useRef)(null), (0, import_react31.useRef)(null)];
|
|
4696
|
+
return /* @__PURE__ */ React65.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React65.createElement(import_ui37.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React65.createElement(import_ui37.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React65.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React65.createElement(PanelDivider, null), /* @__PURE__ */ React65.createElement(import_ui37.Stack, null, /* @__PURE__ */ React65.createElement(OverflowField, null)), /* @__PURE__ */ React65.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React65.createElement(import_ui37.Stack, { gap: 2, pt: 2 }, /* @__PURE__ */ React65.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React65.createElement(import_editor_controls37.AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React65.createElement(PanelDivider, null), /* @__PURE__ */ React65.createElement(ObjectFitField, null), /* @__PURE__ */ React65.createElement(StylesField, { bind: "object-position", propDisplayName: (0, import_i18n42.__)("Object position", "elementor") }, /* @__PURE__ */ React65.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React65.createElement(import_editor_controls37.PositionControl, null))))));
|
|
4256
4697
|
};
|
|
4257
4698
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
4258
|
-
return /* @__PURE__ */
|
|
4699
|
+
return /* @__PURE__ */ React65.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React65.createElement(import_ui37.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React65.createElement(import_ui37.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React65.createElement(ControlLabel, null, label)), /* @__PURE__ */ React65.createElement(import_ui37.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React65.createElement(import_editor_controls37.SizeControl, { extendedOptions, anchorRef: rowRef }))));
|
|
4259
4700
|
};
|
|
4260
4701
|
|
|
4261
4702
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
4262
|
-
var
|
|
4263
|
-
var
|
|
4264
|
-
var
|
|
4265
|
-
var MARGIN_LABEL = (0,
|
|
4266
|
-
var PADDING_LABEL = (0,
|
|
4703
|
+
var React66 = __toESM(require("react"));
|
|
4704
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
4705
|
+
var import_i18n43 = require("@wordpress/i18n");
|
|
4706
|
+
var MARGIN_LABEL = (0, import_i18n43.__)("Margin", "elementor");
|
|
4707
|
+
var PADDING_LABEL = (0, import_i18n43.__)("Padding", "elementor");
|
|
4267
4708
|
var SpacingSection = () => {
|
|
4268
4709
|
const { isSiteRtl } = useDirection();
|
|
4269
|
-
return /* @__PURE__ */
|
|
4270
|
-
|
|
4710
|
+
return /* @__PURE__ */ React66.createElement(SectionContent, null, /* @__PURE__ */ React66.createElement(StylesField, { bind: "margin", propDisplayName: MARGIN_LABEL }, /* @__PURE__ */ React66.createElement(
|
|
4711
|
+
import_editor_controls38.LinkedDimensionsControl,
|
|
4271
4712
|
{
|
|
4272
4713
|
label: MARGIN_LABEL,
|
|
4273
4714
|
isSiteRtl,
|
|
4274
4715
|
min: -Number.MAX_SAFE_INTEGER
|
|
4275
4716
|
}
|
|
4276
|
-
)), /* @__PURE__ */
|
|
4717
|
+
)), /* @__PURE__ */ React66.createElement(PanelDivider, null), /* @__PURE__ */ React66.createElement(StylesField, { bind: "padding", propDisplayName: PADDING_LABEL }, /* @__PURE__ */ React66.createElement(import_editor_controls38.LinkedDimensionsControl, { label: PADDING_LABEL, isSiteRtl })));
|
|
4277
4718
|
};
|
|
4278
4719
|
|
|
4279
4720
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4280
|
-
var
|
|
4721
|
+
var React83 = __toESM(require("react"));
|
|
4281
4722
|
|
|
4282
4723
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
4283
|
-
var
|
|
4284
|
-
var
|
|
4285
|
-
var
|
|
4286
|
-
var COLUMN_COUNT_LABEL = (0,
|
|
4724
|
+
var React67 = __toESM(require("react"));
|
|
4725
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
4726
|
+
var import_i18n44 = require("@wordpress/i18n");
|
|
4727
|
+
var COLUMN_COUNT_LABEL = (0, import_i18n44.__)("Columns", "elementor");
|
|
4287
4728
|
var ColumnCountField = () => {
|
|
4288
|
-
return /* @__PURE__ */
|
|
4729
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "column-count", propDisplayName: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React67.createElement(import_editor_controls39.NumberControl, { shouldForceInt: true, min: 0, step: 1 })));
|
|
4289
4730
|
};
|
|
4290
4731
|
|
|
4291
4732
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
4292
|
-
var
|
|
4293
|
-
var
|
|
4294
|
-
var
|
|
4295
|
-
var
|
|
4296
|
-
var COLUMN_GAP_LABEL = (0,
|
|
4733
|
+
var React68 = __toESM(require("react"));
|
|
4734
|
+
var import_react32 = require("react");
|
|
4735
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
4736
|
+
var import_i18n45 = require("@wordpress/i18n");
|
|
4737
|
+
var COLUMN_GAP_LABEL = (0, import_i18n45.__)("Column gap", "elementor");
|
|
4297
4738
|
var ColumnGapField = () => {
|
|
4298
|
-
const rowRef = (0,
|
|
4299
|
-
return /* @__PURE__ */
|
|
4739
|
+
const rowRef = (0, import_react32.useRef)(null);
|
|
4740
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React68.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React68.createElement(import_editor_controls40.SizeControl, { anchorRef: rowRef })));
|
|
4300
4741
|
};
|
|
4301
4742
|
|
|
4302
4743
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
4303
|
-
var
|
|
4304
|
-
var
|
|
4744
|
+
var React69 = __toESM(require("react"));
|
|
4745
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
4305
4746
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
4306
|
-
var
|
|
4307
|
-
var FONT_FAMILY_LABEL = (0,
|
|
4747
|
+
var import_i18n46 = require("@wordpress/i18n");
|
|
4748
|
+
var FONT_FAMILY_LABEL = (0, import_i18n46.__)("Font family", "elementor");
|
|
4308
4749
|
var FontFamilyField = () => {
|
|
4309
|
-
const fontFamilies = (0,
|
|
4750
|
+
const fontFamilies = (0, import_editor_controls41.useFontFamilies)();
|
|
4310
4751
|
const sectionWidth = (0, import_editor_ui7.useSectionWidth)();
|
|
4311
4752
|
if (fontFamilies.length === 0) {
|
|
4312
4753
|
return null;
|
|
4313
4754
|
}
|
|
4314
|
-
return /* @__PURE__ */
|
|
4315
|
-
|
|
4755
|
+
return /* @__PURE__ */ React69.createElement(StylesField, { bind: "font-family", propDisplayName: FONT_FAMILY_LABEL }, /* @__PURE__ */ React69.createElement(StylesFieldLayout, { label: FONT_FAMILY_LABEL }, /* @__PURE__ */ React69.createElement(
|
|
4756
|
+
import_editor_controls41.FontFamilyControl,
|
|
4316
4757
|
{
|
|
4317
4758
|
fontFamilies,
|
|
4318
4759
|
sectionWidth,
|
|
@@ -4322,198 +4763,198 @@ var FontFamilyField = () => {
|
|
|
4322
4763
|
};
|
|
4323
4764
|
|
|
4324
4765
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
4325
|
-
var
|
|
4326
|
-
var
|
|
4327
|
-
var
|
|
4328
|
-
var
|
|
4329
|
-
var FONT_SIZE_LABEL = (0,
|
|
4766
|
+
var React70 = __toESM(require("react"));
|
|
4767
|
+
var import_react33 = require("react");
|
|
4768
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
4769
|
+
var import_i18n47 = require("@wordpress/i18n");
|
|
4770
|
+
var FONT_SIZE_LABEL = (0, import_i18n47.__)("Font size", "elementor");
|
|
4330
4771
|
var FontSizeField = () => {
|
|
4331
|
-
const rowRef = (0,
|
|
4332
|
-
return /* @__PURE__ */
|
|
4772
|
+
const rowRef = (0, import_react33.useRef)(null);
|
|
4773
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React70.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React70.createElement(import_editor_controls42.SizeControl, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
|
|
4333
4774
|
};
|
|
4334
4775
|
|
|
4335
4776
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
4336
|
-
var
|
|
4337
|
-
var
|
|
4338
|
-
var
|
|
4339
|
-
var
|
|
4340
|
-
var FONT_STYLE_LABEL = (0,
|
|
4341
|
-
var
|
|
4777
|
+
var React71 = __toESM(require("react"));
|
|
4778
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
4779
|
+
var import_icons19 = require("@elementor/icons");
|
|
4780
|
+
var import_i18n48 = require("@wordpress/i18n");
|
|
4781
|
+
var FONT_STYLE_LABEL = (0, import_i18n48.__)("Font style", "elementor");
|
|
4782
|
+
var options8 = [
|
|
4342
4783
|
{
|
|
4343
4784
|
value: "normal",
|
|
4344
|
-
label: (0,
|
|
4345
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4785
|
+
label: (0, import_i18n48.__)("Normal", "elementor"),
|
|
4786
|
+
renderContent: ({ size }) => /* @__PURE__ */ React71.createElement(import_icons19.MinusIcon, { fontSize: size }),
|
|
4346
4787
|
showTooltip: true
|
|
4347
4788
|
},
|
|
4348
4789
|
{
|
|
4349
4790
|
value: "italic",
|
|
4350
|
-
label: (0,
|
|
4351
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4791
|
+
label: (0, import_i18n48.__)("Italic", "elementor"),
|
|
4792
|
+
renderContent: ({ size }) => /* @__PURE__ */ React71.createElement(import_icons19.ItalicIcon, { fontSize: size }),
|
|
4352
4793
|
showTooltip: true
|
|
4353
4794
|
}
|
|
4354
4795
|
];
|
|
4355
4796
|
var FontStyleField = () => {
|
|
4356
|
-
return /* @__PURE__ */
|
|
4797
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "font-style", propDisplayName: FONT_STYLE_LABEL }, /* @__PURE__ */ React71.createElement(StylesFieldLayout, { label: FONT_STYLE_LABEL }, /* @__PURE__ */ React71.createElement(import_editor_controls43.ToggleControl, { options: options8 })));
|
|
4357
4798
|
};
|
|
4358
4799
|
|
|
4359
4800
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
4360
|
-
var
|
|
4361
|
-
var
|
|
4362
|
-
var
|
|
4363
|
-
var FONT_WEIGHT_LABEL = (0,
|
|
4801
|
+
var React72 = __toESM(require("react"));
|
|
4802
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
4803
|
+
var import_i18n49 = require("@wordpress/i18n");
|
|
4804
|
+
var FONT_WEIGHT_LABEL = (0, import_i18n49.__)("Font weight", "elementor");
|
|
4364
4805
|
var fontWeightOptions = [
|
|
4365
|
-
{ value: "100", label: (0,
|
|
4366
|
-
{ value: "200", label: (0,
|
|
4367
|
-
{ value: "300", label: (0,
|
|
4368
|
-
{ value: "400", label: (0,
|
|
4369
|
-
{ value: "500", label: (0,
|
|
4370
|
-
{ value: "600", label: (0,
|
|
4371
|
-
{ value: "700", label: (0,
|
|
4372
|
-
{ value: "800", label: (0,
|
|
4373
|
-
{ value: "900", label: (0,
|
|
4806
|
+
{ value: "100", label: (0, import_i18n49.__)("100 - Thin", "elementor") },
|
|
4807
|
+
{ value: "200", label: (0, import_i18n49.__)("200 - Extra light", "elementor") },
|
|
4808
|
+
{ value: "300", label: (0, import_i18n49.__)("300 - Light", "elementor") },
|
|
4809
|
+
{ value: "400", label: (0, import_i18n49.__)("400 - Normal", "elementor") },
|
|
4810
|
+
{ value: "500", label: (0, import_i18n49.__)("500 - Medium", "elementor") },
|
|
4811
|
+
{ value: "600", label: (0, import_i18n49.__)("600 - Semi bold", "elementor") },
|
|
4812
|
+
{ value: "700", label: (0, import_i18n49.__)("700 - Bold", "elementor") },
|
|
4813
|
+
{ value: "800", label: (0, import_i18n49.__)("800 - Extra bold", "elementor") },
|
|
4814
|
+
{ value: "900", label: (0, import_i18n49.__)("900 - Black", "elementor") }
|
|
4374
4815
|
];
|
|
4375
4816
|
var FontWeightField = () => {
|
|
4376
|
-
return /* @__PURE__ */
|
|
4817
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "font-weight", propDisplayName: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React72.createElement(StylesFieldLayout, { label: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React72.createElement(import_editor_controls44.SelectControl, { options: fontWeightOptions })));
|
|
4377
4818
|
};
|
|
4378
4819
|
|
|
4379
4820
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
4380
|
-
var
|
|
4381
|
-
var
|
|
4382
|
-
var
|
|
4383
|
-
var
|
|
4384
|
-
var LETTER_SPACING_LABEL = (0,
|
|
4821
|
+
var React73 = __toESM(require("react"));
|
|
4822
|
+
var import_react34 = require("react");
|
|
4823
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
4824
|
+
var import_i18n50 = require("@wordpress/i18n");
|
|
4825
|
+
var LETTER_SPACING_LABEL = (0, import_i18n50.__)("Letter spacing", "elementor");
|
|
4385
4826
|
var LetterSpacingField = () => {
|
|
4386
|
-
const rowRef = (0,
|
|
4387
|
-
return /* @__PURE__ */
|
|
4827
|
+
const rowRef = (0, import_react34.useRef)(null);
|
|
4828
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React73.createElement(import_editor_controls45.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4388
4829
|
};
|
|
4389
4830
|
|
|
4390
4831
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
4391
|
-
var
|
|
4392
|
-
var
|
|
4393
|
-
var
|
|
4394
|
-
var
|
|
4395
|
-
var LINE_HEIGHT_LABEL = (0,
|
|
4832
|
+
var React74 = __toESM(require("react"));
|
|
4833
|
+
var import_react35 = require("react");
|
|
4834
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
4835
|
+
var import_i18n51 = require("@wordpress/i18n");
|
|
4836
|
+
var LINE_HEIGHT_LABEL = (0, import_i18n51.__)("Line height", "elementor");
|
|
4396
4837
|
var LineHeightField = () => {
|
|
4397
|
-
const rowRef = (0,
|
|
4398
|
-
return /* @__PURE__ */
|
|
4838
|
+
const rowRef = (0, import_react35.useRef)(null);
|
|
4839
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React74.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React74.createElement(import_editor_controls46.SizeControl, { anchorRef: rowRef })));
|
|
4399
4840
|
};
|
|
4400
4841
|
|
|
4401
4842
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
4402
|
-
var
|
|
4403
|
-
var
|
|
4404
|
-
var
|
|
4405
|
-
var
|
|
4406
|
-
var
|
|
4407
|
-
var TEXT_ALIGNMENT_LABEL = (0,
|
|
4408
|
-
var AlignStartIcon = (0,
|
|
4409
|
-
var AlignEndIcon = (0,
|
|
4410
|
-
var
|
|
4843
|
+
var React75 = __toESM(require("react"));
|
|
4844
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
4845
|
+
var import_icons20 = require("@elementor/icons");
|
|
4846
|
+
var import_ui38 = require("@elementor/ui");
|
|
4847
|
+
var import_i18n52 = require("@wordpress/i18n");
|
|
4848
|
+
var TEXT_ALIGNMENT_LABEL = (0, import_i18n52.__)("Text align", "elementor");
|
|
4849
|
+
var AlignStartIcon = (0, import_ui38.withDirection)(import_icons20.AlignLeftIcon);
|
|
4850
|
+
var AlignEndIcon = (0, import_ui38.withDirection)(import_icons20.AlignRightIcon);
|
|
4851
|
+
var options9 = [
|
|
4411
4852
|
{
|
|
4412
4853
|
value: "start",
|
|
4413
|
-
label: (0,
|
|
4414
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4854
|
+
label: (0, import_i18n52.__)("Start", "elementor"),
|
|
4855
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(AlignStartIcon, { fontSize: size }),
|
|
4415
4856
|
showTooltip: true
|
|
4416
4857
|
},
|
|
4417
4858
|
{
|
|
4418
4859
|
value: "center",
|
|
4419
|
-
label: (0,
|
|
4420
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4860
|
+
label: (0, import_i18n52.__)("Center", "elementor"),
|
|
4861
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons20.AlignCenterIcon, { fontSize: size }),
|
|
4421
4862
|
showTooltip: true
|
|
4422
4863
|
},
|
|
4423
4864
|
{
|
|
4424
4865
|
value: "end",
|
|
4425
|
-
label: (0,
|
|
4426
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4866
|
+
label: (0, import_i18n52.__)("End", "elementor"),
|
|
4867
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(AlignEndIcon, { fontSize: size }),
|
|
4427
4868
|
showTooltip: true
|
|
4428
4869
|
},
|
|
4429
4870
|
{
|
|
4430
4871
|
value: "justify",
|
|
4431
|
-
label: (0,
|
|
4432
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4872
|
+
label: (0, import_i18n52.__)("Justify", "elementor"),
|
|
4873
|
+
renderContent: ({ size }) => /* @__PURE__ */ React75.createElement(import_icons20.AlignJustifiedIcon, { fontSize: size }),
|
|
4433
4874
|
showTooltip: true
|
|
4434
4875
|
}
|
|
4435
4876
|
];
|
|
4436
4877
|
var TextAlignmentField = () => {
|
|
4437
|
-
return /* @__PURE__ */
|
|
4878
|
+
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "text-align", propDisplayName: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React75.createElement(UiProviders, null, /* @__PURE__ */ React75.createElement(StylesFieldLayout, { label: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React75.createElement(import_editor_controls47.ToggleControl, { options: options9 }))));
|
|
4438
4879
|
};
|
|
4439
4880
|
|
|
4440
4881
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
4441
|
-
var
|
|
4442
|
-
var
|
|
4443
|
-
var
|
|
4444
|
-
var TEXT_COLOR_LABEL = (0,
|
|
4882
|
+
var React76 = __toESM(require("react"));
|
|
4883
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
4884
|
+
var import_i18n53 = require("@wordpress/i18n");
|
|
4885
|
+
var TEXT_COLOR_LABEL = (0, import_i18n53.__)("Text color", "elementor");
|
|
4445
4886
|
var TextColorField = () => {
|
|
4446
|
-
return /* @__PURE__ */
|
|
4887
|
+
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "color", propDisplayName: TEXT_COLOR_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: TEXT_COLOR_LABEL }, /* @__PURE__ */ React76.createElement(import_editor_controls48.ColorControl, { id: "text-color-control" })));
|
|
4447
4888
|
};
|
|
4448
4889
|
|
|
4449
4890
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
4450
|
-
var
|
|
4451
|
-
var
|
|
4452
|
-
var
|
|
4453
|
-
var
|
|
4454
|
-
var TEXT_DECORATION_LABEL = (0,
|
|
4455
|
-
var
|
|
4891
|
+
var React77 = __toESM(require("react"));
|
|
4892
|
+
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
4893
|
+
var import_icons21 = require("@elementor/icons");
|
|
4894
|
+
var import_i18n54 = require("@wordpress/i18n");
|
|
4895
|
+
var TEXT_DECORATION_LABEL = (0, import_i18n54.__)("Line decoration", "elementor");
|
|
4896
|
+
var options10 = [
|
|
4456
4897
|
{
|
|
4457
4898
|
value: "none",
|
|
4458
|
-
label: (0,
|
|
4459
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4899
|
+
label: (0, import_i18n54.__)("None", "elementor"),
|
|
4900
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons21.MinusIcon, { fontSize: size }),
|
|
4460
4901
|
showTooltip: true,
|
|
4461
4902
|
exclusive: true
|
|
4462
4903
|
},
|
|
4463
4904
|
{
|
|
4464
4905
|
value: "underline",
|
|
4465
|
-
label: (0,
|
|
4466
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4906
|
+
label: (0, import_i18n54.__)("Underline", "elementor"),
|
|
4907
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons21.UnderlineIcon, { fontSize: size }),
|
|
4467
4908
|
showTooltip: true
|
|
4468
4909
|
},
|
|
4469
4910
|
{
|
|
4470
4911
|
value: "line-through",
|
|
4471
|
-
label: (0,
|
|
4472
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4912
|
+
label: (0, import_i18n54.__)("Line-through", "elementor"),
|
|
4913
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons21.StrikethroughIcon, { fontSize: size }),
|
|
4473
4914
|
showTooltip: true
|
|
4474
4915
|
},
|
|
4475
4916
|
{
|
|
4476
4917
|
value: "overline",
|
|
4477
|
-
label: (0,
|
|
4478
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4918
|
+
label: (0, import_i18n54.__)("Overline", "elementor"),
|
|
4919
|
+
renderContent: ({ size }) => /* @__PURE__ */ React77.createElement(import_icons21.OverlineIcon, { fontSize: size }),
|
|
4479
4920
|
showTooltip: true
|
|
4480
4921
|
}
|
|
4481
4922
|
];
|
|
4482
|
-
var TextDecorationField = () => /* @__PURE__ */
|
|
4923
|
+
var TextDecorationField = () => /* @__PURE__ */ React77.createElement(StylesField, { bind: "text-decoration", propDisplayName: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React77.createElement(StylesFieldLayout, { label: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React77.createElement(import_editor_controls49.ToggleControl, { options: options10, exclusive: false })));
|
|
4483
4924
|
|
|
4484
4925
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
4485
|
-
var
|
|
4486
|
-
var
|
|
4487
|
-
var
|
|
4488
|
-
var
|
|
4489
|
-
var TEXT_DIRECTION_LABEL = (0,
|
|
4490
|
-
var
|
|
4926
|
+
var React78 = __toESM(require("react"));
|
|
4927
|
+
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
4928
|
+
var import_icons22 = require("@elementor/icons");
|
|
4929
|
+
var import_i18n55 = require("@wordpress/i18n");
|
|
4930
|
+
var TEXT_DIRECTION_LABEL = (0, import_i18n55.__)("Direction", "elementor");
|
|
4931
|
+
var options11 = [
|
|
4491
4932
|
{
|
|
4492
4933
|
value: "ltr",
|
|
4493
|
-
label: (0,
|
|
4494
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4934
|
+
label: (0, import_i18n55.__)("Left to right", "elementor"),
|
|
4935
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons22.TextDirectionLtrIcon, { fontSize: size }),
|
|
4495
4936
|
showTooltip: true
|
|
4496
4937
|
},
|
|
4497
4938
|
{
|
|
4498
4939
|
value: "rtl",
|
|
4499
|
-
label: (0,
|
|
4500
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
4940
|
+
label: (0, import_i18n55.__)("Right to left", "elementor"),
|
|
4941
|
+
renderContent: ({ size }) => /* @__PURE__ */ React78.createElement(import_icons22.TextDirectionRtlIcon, { fontSize: size }),
|
|
4501
4942
|
showTooltip: true
|
|
4502
4943
|
}
|
|
4503
4944
|
];
|
|
4504
4945
|
var TextDirectionField = () => {
|
|
4505
|
-
return /* @__PURE__ */
|
|
4946
|
+
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "direction", propDisplayName: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React78.createElement(StylesFieldLayout, { label: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React78.createElement(import_editor_controls50.ToggleControl, { options: options11 })));
|
|
4506
4947
|
};
|
|
4507
4948
|
|
|
4508
4949
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
4509
|
-
var
|
|
4510
|
-
var
|
|
4511
|
-
var
|
|
4950
|
+
var React80 = __toESM(require("react"));
|
|
4951
|
+
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4952
|
+
var import_i18n56 = require("@wordpress/i18n");
|
|
4512
4953
|
|
|
4513
4954
|
// src/components/add-or-remove-content.tsx
|
|
4514
|
-
var
|
|
4515
|
-
var
|
|
4516
|
-
var
|
|
4955
|
+
var React79 = __toESM(require("react"));
|
|
4956
|
+
var import_icons23 = require("@elementor/icons");
|
|
4957
|
+
var import_ui39 = require("@elementor/ui");
|
|
4517
4958
|
var SIZE = "tiny";
|
|
4518
4959
|
var AddOrRemoveContent = ({
|
|
4519
4960
|
isAdded,
|
|
@@ -4523,8 +4964,8 @@ var AddOrRemoveContent = ({
|
|
|
4523
4964
|
disabled,
|
|
4524
4965
|
renderLabel
|
|
4525
4966
|
}) => {
|
|
4526
|
-
return /* @__PURE__ */
|
|
4527
|
-
|
|
4967
|
+
return /* @__PURE__ */ React79.createElement(SectionContent, null, /* @__PURE__ */ React79.createElement(
|
|
4968
|
+
import_ui39.Stack,
|
|
4528
4969
|
{
|
|
4529
4970
|
direction: "row",
|
|
4530
4971
|
sx: {
|
|
@@ -4534,8 +4975,8 @@ var AddOrRemoveContent = ({
|
|
|
4534
4975
|
}
|
|
4535
4976
|
},
|
|
4536
4977
|
renderLabel(),
|
|
4537
|
-
isAdded ? /* @__PURE__ */
|
|
4538
|
-
), /* @__PURE__ */
|
|
4978
|
+
isAdded ? /* @__PURE__ */ React79.createElement(import_ui39.IconButton, { size: SIZE, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React79.createElement(import_icons23.MinusIcon, { fontSize: SIZE })) : /* @__PURE__ */ React79.createElement(import_ui39.IconButton, { size: SIZE, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React79.createElement(import_icons23.PlusIcon, { fontSize: SIZE }))
|
|
4979
|
+
), /* @__PURE__ */ React79.createElement(import_ui39.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React79.createElement(SectionContent, null, children)));
|
|
4539
4980
|
};
|
|
4540
4981
|
|
|
4541
4982
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
@@ -4555,7 +4996,7 @@ var initTextStroke = {
|
|
|
4555
4996
|
}
|
|
4556
4997
|
}
|
|
4557
4998
|
};
|
|
4558
|
-
var TEXT_STROKE_LABEL = (0,
|
|
4999
|
+
var TEXT_STROKE_LABEL = (0, import_i18n56.__)("Text stroke", "elementor");
|
|
4559
5000
|
var TextStrokeField = () => {
|
|
4560
5001
|
const { value, setValue, canEdit } = useStylesField("stroke", {
|
|
4561
5002
|
history: { propDisplayName: TEXT_STROKE_LABEL }
|
|
@@ -4567,67 +5008,67 @@ var TextStrokeField = () => {
|
|
|
4567
5008
|
setValue(null);
|
|
4568
5009
|
};
|
|
4569
5010
|
const hasTextStroke = Boolean(value);
|
|
4570
|
-
return /* @__PURE__ */
|
|
5011
|
+
return /* @__PURE__ */ React80.createElement(StylesField, { bind: "stroke", propDisplayName: TEXT_STROKE_LABEL }, /* @__PURE__ */ React80.createElement(
|
|
4571
5012
|
AddOrRemoveContent,
|
|
4572
5013
|
{
|
|
4573
5014
|
isAdded: hasTextStroke,
|
|
4574
5015
|
onAdd: addTextStroke,
|
|
4575
5016
|
onRemove: removeTextStroke,
|
|
4576
5017
|
disabled: !canEdit,
|
|
4577
|
-
renderLabel: () => /* @__PURE__ */
|
|
5018
|
+
renderLabel: () => /* @__PURE__ */ React80.createElement(ControlLabel, null, TEXT_STROKE_LABEL)
|
|
4578
5019
|
},
|
|
4579
|
-
/* @__PURE__ */
|
|
5020
|
+
/* @__PURE__ */ React80.createElement(import_editor_controls51.StrokeControl, null)
|
|
4580
5021
|
));
|
|
4581
5022
|
};
|
|
4582
5023
|
|
|
4583
5024
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
4584
|
-
var
|
|
4585
|
-
var
|
|
4586
|
-
var
|
|
4587
|
-
var
|
|
4588
|
-
var TEXT_TRANSFORM_LABEL = (0,
|
|
4589
|
-
var
|
|
5025
|
+
var React81 = __toESM(require("react"));
|
|
5026
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
5027
|
+
var import_icons24 = require("@elementor/icons");
|
|
5028
|
+
var import_i18n57 = require("@wordpress/i18n");
|
|
5029
|
+
var TEXT_TRANSFORM_LABEL = (0, import_i18n57.__)("Text transform", "elementor");
|
|
5030
|
+
var options12 = [
|
|
4590
5031
|
{
|
|
4591
5032
|
value: "none",
|
|
4592
|
-
label: (0,
|
|
4593
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5033
|
+
label: (0, import_i18n57.__)("None", "elementor"),
|
|
5034
|
+
renderContent: ({ size }) => /* @__PURE__ */ React81.createElement(import_icons24.MinusIcon, { fontSize: size }),
|
|
4594
5035
|
showTooltip: true
|
|
4595
5036
|
},
|
|
4596
5037
|
{
|
|
4597
5038
|
value: "capitalize",
|
|
4598
|
-
label: (0,
|
|
4599
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5039
|
+
label: (0, import_i18n57.__)("Capitalize", "elementor"),
|
|
5040
|
+
renderContent: ({ size }) => /* @__PURE__ */ React81.createElement(import_icons24.LetterCaseIcon, { fontSize: size }),
|
|
4600
5041
|
showTooltip: true
|
|
4601
5042
|
},
|
|
4602
5043
|
{
|
|
4603
5044
|
value: "uppercase",
|
|
4604
|
-
label: (0,
|
|
4605
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5045
|
+
label: (0, import_i18n57.__)("Uppercase", "elementor"),
|
|
5046
|
+
renderContent: ({ size }) => /* @__PURE__ */ React81.createElement(import_icons24.LetterCaseUpperIcon, { fontSize: size }),
|
|
4606
5047
|
showTooltip: true
|
|
4607
5048
|
},
|
|
4608
5049
|
{
|
|
4609
5050
|
value: "lowercase",
|
|
4610
|
-
label: (0,
|
|
4611
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
5051
|
+
label: (0, import_i18n57.__)("Lowercase", "elementor"),
|
|
5052
|
+
renderContent: ({ size }) => /* @__PURE__ */ React81.createElement(import_icons24.LetterCaseLowerIcon, { fontSize: size }),
|
|
4612
5053
|
showTooltip: true
|
|
4613
5054
|
}
|
|
4614
5055
|
];
|
|
4615
|
-
var TransformField = () => /* @__PURE__ */
|
|
5056
|
+
var TransformField = () => /* @__PURE__ */ React81.createElement(StylesField, { bind: "text-transform", propDisplayName: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React81.createElement(StylesFieldLayout, { label: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React81.createElement(import_editor_controls52.ToggleControl, { options: options12 })));
|
|
4616
5057
|
|
|
4617
5058
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4618
|
-
var
|
|
4619
|
-
var
|
|
4620
|
-
var
|
|
4621
|
-
var
|
|
4622
|
-
var WORD_SPACING_LABEL = (0,
|
|
5059
|
+
var React82 = __toESM(require("react"));
|
|
5060
|
+
var import_react36 = require("react");
|
|
5061
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
5062
|
+
var import_i18n58 = require("@wordpress/i18n");
|
|
5063
|
+
var WORD_SPACING_LABEL = (0, import_i18n58.__)("Word spacing", "elementor");
|
|
4623
5064
|
var WordSpacingField = () => {
|
|
4624
|
-
const rowRef = (0,
|
|
4625
|
-
return /* @__PURE__ */
|
|
5065
|
+
const rowRef = (0, import_react36.useRef)(null);
|
|
5066
|
+
return /* @__PURE__ */ React82.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React82.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React82.createElement(import_editor_controls53.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4626
5067
|
};
|
|
4627
5068
|
|
|
4628
5069
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
4629
5070
|
var TypographySection = () => {
|
|
4630
|
-
return /* @__PURE__ */
|
|
5071
|
+
return /* @__PURE__ */ React83.createElement(SectionContent, null, /* @__PURE__ */ React83.createElement(FontFamilyField, null), /* @__PURE__ */ React83.createElement(FontWeightField, null), /* @__PURE__ */ React83.createElement(FontSizeField, null), /* @__PURE__ */ React83.createElement(PanelDivider, null), /* @__PURE__ */ React83.createElement(TextAlignmentField, null), /* @__PURE__ */ React83.createElement(TextColorField, null), /* @__PURE__ */ React83.createElement(
|
|
4631
5072
|
StyleTabCollapsibleContent,
|
|
4632
5073
|
{
|
|
4633
5074
|
fields: [
|
|
@@ -4642,18 +5083,18 @@ var TypographySection = () => {
|
|
|
4642
5083
|
"stroke"
|
|
4643
5084
|
]
|
|
4644
5085
|
},
|
|
4645
|
-
/* @__PURE__ */
|
|
5086
|
+
/* @__PURE__ */ React83.createElement(SectionContent, { sx: { pt: 2 } }, /* @__PURE__ */ React83.createElement(LineHeightField, null), /* @__PURE__ */ React83.createElement(LetterSpacingField, null), /* @__PURE__ */ React83.createElement(WordSpacingField, null), /* @__PURE__ */ React83.createElement(ColumnCountField, null), /* @__PURE__ */ React83.createElement(ColumnGapField, null), /* @__PURE__ */ React83.createElement(PanelDivider, null), /* @__PURE__ */ React83.createElement(TextDecorationField, null), /* @__PURE__ */ React83.createElement(TransformField, null), /* @__PURE__ */ React83.createElement(TextDirectionField, null), /* @__PURE__ */ React83.createElement(FontStyleField, null), /* @__PURE__ */ React83.createElement(TextStrokeField, null))
|
|
4646
5087
|
));
|
|
4647
5088
|
};
|
|
4648
5089
|
|
|
4649
5090
|
// src/components/style-tab-section.tsx
|
|
4650
|
-
var
|
|
5091
|
+
var React84 = __toESM(require("react"));
|
|
4651
5092
|
var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
4652
5093
|
const { component, name, title, action } = section;
|
|
4653
5094
|
const tabDefaults = useDefaultPanelSettings();
|
|
4654
|
-
const SectionComponent = component || (() => /* @__PURE__ */
|
|
5095
|
+
const SectionComponent = component || (() => /* @__PURE__ */ React84.createElement(React84.Fragment, null));
|
|
4655
5096
|
const isExpanded = tabDefaults.defaultSectionsExpanded.style?.includes(name);
|
|
4656
|
-
return /* @__PURE__ */
|
|
5097
|
+
return /* @__PURE__ */ React84.createElement(
|
|
4657
5098
|
Section,
|
|
4658
5099
|
{
|
|
4659
5100
|
title,
|
|
@@ -4662,7 +5103,7 @@ var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
|
4662
5103
|
unmountOnExit,
|
|
4663
5104
|
action
|
|
4664
5105
|
},
|
|
4665
|
-
/* @__PURE__ */
|
|
5106
|
+
/* @__PURE__ */ React84.createElement(SectionComponent, null)
|
|
4666
5107
|
);
|
|
4667
5108
|
};
|
|
4668
5109
|
|
|
@@ -4679,12 +5120,12 @@ var stickyHeaderStyles = {
|
|
|
4679
5120
|
var StyleTab = () => {
|
|
4680
5121
|
const currentClassesProp = useCurrentClassesProp();
|
|
4681
5122
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp ?? "");
|
|
4682
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
5123
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react37.useState)(null);
|
|
4683
5124
|
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
4684
5125
|
if (!currentClassesProp) {
|
|
4685
5126
|
return null;
|
|
4686
5127
|
}
|
|
4687
|
-
return /* @__PURE__ */
|
|
5128
|
+
return /* @__PURE__ */ React85.createElement(ClassesPropProvider, { prop: currentClassesProp }, /* @__PURE__ */ React85.createElement(
|
|
4688
5129
|
StyleProvider,
|
|
4689
5130
|
{
|
|
4690
5131
|
meta: { breakpoint, state: activeStyleState },
|
|
@@ -4695,13 +5136,13 @@ var StyleTab = () => {
|
|
|
4695
5136
|
},
|
|
4696
5137
|
setMetaState: setActiveStyleState
|
|
4697
5138
|
},
|
|
4698
|
-
/* @__PURE__ */
|
|
5139
|
+
/* @__PURE__ */ React85.createElement(import_session8.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React85.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React85.createElement(ClassesHeader, null, /* @__PURE__ */ React85.createElement(CssClassSelector, null), /* @__PURE__ */ React85.createElement(import_ui40.Divider, null)), /* @__PURE__ */ React85.createElement(SectionsList, null, /* @__PURE__ */ React85.createElement(
|
|
4699
5140
|
StyleTabSection,
|
|
4700
5141
|
{
|
|
4701
5142
|
section: {
|
|
4702
5143
|
component: LayoutSection,
|
|
4703
5144
|
name: "Layout",
|
|
4704
|
-
title: (0,
|
|
5145
|
+
title: (0, import_i18n59.__)("Layout", "elementor")
|
|
4705
5146
|
},
|
|
4706
5147
|
fields: [
|
|
4707
5148
|
"display",
|
|
@@ -4711,26 +5152,29 @@ var StyleTab = () => {
|
|
|
4711
5152
|
"align-items",
|
|
4712
5153
|
"align-content",
|
|
4713
5154
|
"align-self",
|
|
4714
|
-
"gap"
|
|
5155
|
+
"gap",
|
|
5156
|
+
"order",
|
|
5157
|
+
"grid-column",
|
|
5158
|
+
"grid-row"
|
|
4715
5159
|
]
|
|
4716
5160
|
}
|
|
4717
|
-
), /* @__PURE__ */
|
|
5161
|
+
), /* @__PURE__ */ React85.createElement(
|
|
4718
5162
|
StyleTabSection,
|
|
4719
5163
|
{
|
|
4720
5164
|
section: {
|
|
4721
5165
|
component: SpacingSection,
|
|
4722
5166
|
name: "Spacing",
|
|
4723
|
-
title: (0,
|
|
5167
|
+
title: (0, import_i18n59.__)("Spacing", "elementor")
|
|
4724
5168
|
},
|
|
4725
5169
|
fields: ["margin", "padding"]
|
|
4726
5170
|
}
|
|
4727
|
-
), /* @__PURE__ */
|
|
5171
|
+
), /* @__PURE__ */ React85.createElement(
|
|
4728
5172
|
StyleTabSection,
|
|
4729
5173
|
{
|
|
4730
5174
|
section: {
|
|
4731
5175
|
component: SizeSection,
|
|
4732
5176
|
name: "Size",
|
|
4733
|
-
title: (0,
|
|
5177
|
+
title: (0, import_i18n59.__)("Size", "elementor")
|
|
4734
5178
|
},
|
|
4735
5179
|
fields: [
|
|
4736
5180
|
"width",
|
|
@@ -4744,23 +5188,23 @@ var StyleTab = () => {
|
|
|
4744
5188
|
"object-fit"
|
|
4745
5189
|
]
|
|
4746
5190
|
}
|
|
4747
|
-
), /* @__PURE__ */
|
|
5191
|
+
), /* @__PURE__ */ React85.createElement(
|
|
4748
5192
|
StyleTabSection,
|
|
4749
5193
|
{
|
|
4750
5194
|
section: {
|
|
4751
5195
|
component: PositionSection,
|
|
4752
5196
|
name: "Position",
|
|
4753
|
-
title: (0,
|
|
5197
|
+
title: (0, import_i18n59.__)("Position", "elementor")
|
|
4754
5198
|
},
|
|
4755
5199
|
fields: ["position", "z-index", "scroll-margin-top"]
|
|
4756
5200
|
}
|
|
4757
|
-
), /* @__PURE__ */
|
|
5201
|
+
), /* @__PURE__ */ React85.createElement(
|
|
4758
5202
|
StyleTabSection,
|
|
4759
5203
|
{
|
|
4760
5204
|
section: {
|
|
4761
5205
|
component: TypographySection,
|
|
4762
5206
|
name: "Typography",
|
|
4763
|
-
title: (0,
|
|
5207
|
+
title: (0, import_i18n59.__)("Typography", "elementor")
|
|
4764
5208
|
},
|
|
4765
5209
|
fields: [
|
|
4766
5210
|
"font-family",
|
|
@@ -4779,33 +5223,33 @@ var StyleTab = () => {
|
|
|
4779
5223
|
"stroke"
|
|
4780
5224
|
]
|
|
4781
5225
|
}
|
|
4782
|
-
), /* @__PURE__ */
|
|
5226
|
+
), /* @__PURE__ */ React85.createElement(
|
|
4783
5227
|
StyleTabSection,
|
|
4784
5228
|
{
|
|
4785
5229
|
section: {
|
|
4786
5230
|
component: BackgroundSection,
|
|
4787
5231
|
name: "Background",
|
|
4788
|
-
title: (0,
|
|
5232
|
+
title: (0, import_i18n59.__)("Background", "elementor")
|
|
4789
5233
|
},
|
|
4790
5234
|
fields: ["background"]
|
|
4791
5235
|
}
|
|
4792
|
-
), /* @__PURE__ */
|
|
5236
|
+
), /* @__PURE__ */ React85.createElement(
|
|
4793
5237
|
StyleTabSection,
|
|
4794
5238
|
{
|
|
4795
5239
|
section: {
|
|
4796
5240
|
component: BorderSection,
|
|
4797
5241
|
name: "Border",
|
|
4798
|
-
title: (0,
|
|
5242
|
+
title: (0, import_i18n59.__)("Border", "elementor")
|
|
4799
5243
|
},
|
|
4800
5244
|
fields: ["border-radius", "border-width", "border-color", "border-style"]
|
|
4801
5245
|
}
|
|
4802
|
-
), /* @__PURE__ */
|
|
5246
|
+
), /* @__PURE__ */ React85.createElement(
|
|
4803
5247
|
StyleTabSection,
|
|
4804
5248
|
{
|
|
4805
5249
|
section: {
|
|
4806
5250
|
component: EffectsSection,
|
|
4807
5251
|
name: "Effects",
|
|
4808
|
-
title: (0,
|
|
5252
|
+
title: (0, import_i18n59.__)("Effects", "elementor")
|
|
4809
5253
|
},
|
|
4810
5254
|
fields: [
|
|
4811
5255
|
"mix-blend-mode",
|
|
@@ -4818,12 +5262,12 @@ var StyleTab = () => {
|
|
|
4818
5262
|
"transition"
|
|
4819
5263
|
]
|
|
4820
5264
|
}
|
|
4821
|
-
), /* @__PURE__ */
|
|
5265
|
+
), /* @__PURE__ */ React85.createElement(StyleTabSlot, null)), /* @__PURE__ */ React85.createElement(import_ui40.Box, { sx: { height: "150px" } })))
|
|
4822
5266
|
));
|
|
4823
5267
|
};
|
|
4824
5268
|
function ClassesHeader({ children }) {
|
|
4825
5269
|
const scrollDirection = useScrollDirection();
|
|
4826
|
-
return /* @__PURE__ */
|
|
5270
|
+
return /* @__PURE__ */ React85.createElement(import_ui40.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4827
5271
|
}
|
|
4828
5272
|
function useCurrentClassesProp() {
|
|
4829
5273
|
const { elementType } = useElement();
|
|
@@ -4842,20 +5286,20 @@ var EditingPanelTabs = () => {
|
|
|
4842
5286
|
return (
|
|
4843
5287
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4844
5288
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4845
|
-
/* @__PURE__ */
|
|
5289
|
+
/* @__PURE__ */ React86.createElement(import_react38.Fragment, { key: element.id }, /* @__PURE__ */ React86.createElement(PanelTabContent, null))
|
|
4846
5290
|
);
|
|
4847
5291
|
};
|
|
4848
5292
|
var PanelTabContent = () => {
|
|
4849
5293
|
const { element } = useElement();
|
|
4850
5294
|
const editorDefaults = useDefaultPanelSettings();
|
|
4851
5295
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
4852
|
-
const isInteractionsActive = (0,
|
|
5296
|
+
const isInteractionsActive = (0, import_editor_v1_adapters9.isExperimentActive)("e_interactions");
|
|
4853
5297
|
const isPromotedElement = !!(0, import_editor_elements12.getWidgetsCache)()?.[element.type]?.meta?.is_pro_promotion;
|
|
4854
5298
|
const [storedTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4855
5299
|
const currentTab = isPromotedElement && storedTab === "settings" ? "style" : storedTab;
|
|
4856
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
4857
|
-
return /* @__PURE__ */
|
|
4858
|
-
|
|
5300
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui41.useTabs)(currentTab);
|
|
5301
|
+
return /* @__PURE__ */ React86.createElement(ScrollProvider, null, /* @__PURE__ */ React86.createElement(import_ui41.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React86.createElement(import_ui41.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React86.createElement(
|
|
5302
|
+
import_ui41.Tabs,
|
|
4859
5303
|
{
|
|
4860
5304
|
variant: "fullWidth",
|
|
4861
5305
|
size: "small",
|
|
@@ -4866,10 +5310,10 @@ var PanelTabContent = () => {
|
|
|
4866
5310
|
setCurrentTab(newValue);
|
|
4867
5311
|
}
|
|
4868
5312
|
},
|
|
4869
|
-
!isPromotedElement && /* @__PURE__ */
|
|
4870
|
-
/* @__PURE__ */
|
|
4871
|
-
isInteractionsActive && /* @__PURE__ */
|
|
4872
|
-
), /* @__PURE__ */
|
|
5313
|
+
!isPromotedElement && /* @__PURE__ */ React86.createElement(import_ui41.Tab, { label: (0, import_i18n60.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
5314
|
+
/* @__PURE__ */ React86.createElement(import_ui41.Tab, { label: (0, import_i18n60.__)("Style", "elementor"), ...getTabProps("style") }),
|
|
5315
|
+
isInteractionsActive && /* @__PURE__ */ React86.createElement(import_ui41.Tab, { label: (0, import_i18n60.__)("Interactions", "elementor"), ...getTabProps("interactions") })
|
|
5316
|
+
), /* @__PURE__ */ React86.createElement(import_ui41.Divider, null)), !isPromotedElement && /* @__PURE__ */ React86.createElement(import_ui41.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React86.createElement(SettingsTab, null)), /* @__PURE__ */ React86.createElement(import_ui41.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React86.createElement(StyleTab, null)), isInteractionsActive && /* @__PURE__ */ React86.createElement(import_ui41.TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React86.createElement(InteractionsTab, null))));
|
|
4873
5317
|
};
|
|
4874
5318
|
|
|
4875
5319
|
// src/components/editing-panel.tsx
|
|
@@ -4877,28 +5321,28 @@ var { Slot: PanelHeaderTopSlot, inject: injectIntoPanelHeaderTop } = (0, import_
|
|
|
4877
5321
|
var { useMenuItems } = import_menus.controlActionsMenu;
|
|
4878
5322
|
var EditingPanel = () => {
|
|
4879
5323
|
const { element, elementType, settings } = (0, import_editor_elements13.useSelectedElementSettings)();
|
|
4880
|
-
const controlReplacements = (0,
|
|
5324
|
+
const controlReplacements = (0, import_editor_controls54.getControlReplacements)();
|
|
4881
5325
|
const menuItems = useMenuItems().default;
|
|
4882
5326
|
if (!element || !elementType) {
|
|
4883
5327
|
return null;
|
|
4884
5328
|
}
|
|
4885
|
-
const panelTitle = (0,
|
|
5329
|
+
const panelTitle = (0, import_i18n61.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4886
5330
|
const { component: ReplacementComponent } = getEditingPanelReplacement(element, elementType) ?? {};
|
|
4887
|
-
let panelContent = /* @__PURE__ */
|
|
5331
|
+
let panelContent = /* @__PURE__ */ React87.createElement(React87.Fragment, null, /* @__PURE__ */ React87.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React87.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React87.createElement(import_icons25.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React87.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React87.createElement(EditingPanelTabs, null)));
|
|
4888
5332
|
if (ReplacementComponent) {
|
|
4889
|
-
panelContent = /* @__PURE__ */
|
|
5333
|
+
panelContent = /* @__PURE__ */ React87.createElement(ReplacementComponent, null);
|
|
4890
5334
|
}
|
|
4891
|
-
return /* @__PURE__ */
|
|
5335
|
+
return /* @__PURE__ */ React87.createElement(import_ui42.ErrorBoundary, { fallback: /* @__PURE__ */ React87.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React87.createElement(import_session9.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React87.createElement(import_editor_ui8.ThemeProvider, null, /* @__PURE__ */ React87.createElement(import_editor_controls54.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React87.createElement(import_editor_controls54.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React87.createElement(ElementProvider, { element, elementType, settings }, /* @__PURE__ */ React87.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React87.createElement(PanelHeaderTopSlot, null), panelContent)))))));
|
|
4892
5336
|
};
|
|
4893
5337
|
|
|
4894
5338
|
// src/init.ts
|
|
4895
5339
|
var import_editor = require("@elementor/editor");
|
|
4896
5340
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
4897
|
-
var
|
|
5341
|
+
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
4898
5342
|
|
|
4899
5343
|
// src/hooks/use-open-editor-panel.ts
|
|
4900
|
-
var
|
|
4901
|
-
var
|
|
5344
|
+
var import_react39 = require("react");
|
|
5345
|
+
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
4902
5346
|
|
|
4903
5347
|
// src/panel.ts
|
|
4904
5348
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
@@ -4921,8 +5365,8 @@ var isAtomicWidgetSelected = () => {
|
|
|
4921
5365
|
// src/hooks/use-open-editor-panel.ts
|
|
4922
5366
|
var useOpenEditorPanel = () => {
|
|
4923
5367
|
const { open } = usePanelActions();
|
|
4924
|
-
(0,
|
|
4925
|
-
return (0,
|
|
5368
|
+
(0, import_react39.useEffect)(() => {
|
|
5369
|
+
return (0, import_editor_v1_adapters10.__privateListenTo)((0, import_editor_v1_adapters10.commandStartEvent)("panel/editor/open"), () => {
|
|
4926
5370
|
if (isAtomicWidgetSelected()) {
|
|
4927
5371
|
open();
|
|
4928
5372
|
}
|
|
@@ -4937,24 +5381,24 @@ var EditingPanelHooks = () => {
|
|
|
4937
5381
|
};
|
|
4938
5382
|
|
|
4939
5383
|
// src/components/promotions/init.tsx
|
|
4940
|
-
var
|
|
5384
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
4941
5385
|
|
|
4942
5386
|
// src/components/promotions/custom-css.tsx
|
|
4943
|
-
var
|
|
4944
|
-
var
|
|
4945
|
-
var
|
|
4946
|
-
var
|
|
5387
|
+
var React88 = __toESM(require("react"));
|
|
5388
|
+
var import_react40 = require("react");
|
|
5389
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
5390
|
+
var import_i18n62 = require("@wordpress/i18n");
|
|
4947
5391
|
var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
|
|
4948
5392
|
var CustomCssSection = () => {
|
|
4949
|
-
const triggerRef = (0,
|
|
4950
|
-
return /* @__PURE__ */
|
|
5393
|
+
const triggerRef = (0, import_react40.useRef)(null);
|
|
5394
|
+
return /* @__PURE__ */ React88.createElement(
|
|
4951
5395
|
StyleTabSection,
|
|
4952
5396
|
{
|
|
4953
5397
|
section: {
|
|
4954
5398
|
name: "Custom CSS",
|
|
4955
|
-
title: (0,
|
|
5399
|
+
title: (0, import_i18n62.__)("Custom CSS", "elementor"),
|
|
4956
5400
|
action: {
|
|
4957
|
-
component: /* @__PURE__ */
|
|
5401
|
+
component: /* @__PURE__ */ React88.createElement(import_editor_controls55.PromotionTrigger, { ref: triggerRef, promotionKey: "customCss", trackingData: TRACKING_DATA }),
|
|
4958
5402
|
onClick: () => triggerRef.current?.toggle()
|
|
4959
5403
|
}
|
|
4960
5404
|
}
|
|
@@ -4964,25 +5408,25 @@ var CustomCssSection = () => {
|
|
|
4964
5408
|
|
|
4965
5409
|
// src/components/promotions/init.tsx
|
|
4966
5410
|
var init = () => {
|
|
5411
|
+
injectIntoStyleTab({
|
|
5412
|
+
id: "custom-css",
|
|
5413
|
+
component: CustomCssSection,
|
|
5414
|
+
options: { overwrite: true }
|
|
5415
|
+
});
|
|
4967
5416
|
if (!window.elementorPro) {
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
component: CustomCssSection,
|
|
4971
|
-
options: { overwrite: true }
|
|
4972
|
-
});
|
|
4973
|
-
controlsRegistry.register("attributes", import_editor_controls51.AttributesControl, "two-columns");
|
|
4974
|
-
controlsRegistry.register("display-conditions", import_editor_controls51.DisplayConditionsControl, "two-columns");
|
|
5417
|
+
controlsRegistry.register("attributes", import_editor_controls56.AttributesControl, "two-columns");
|
|
5418
|
+
controlsRegistry.register("display-conditions", import_editor_controls56.DisplayConditionsControl, "two-columns");
|
|
4975
5419
|
}
|
|
4976
5420
|
};
|
|
4977
5421
|
|
|
4978
5422
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
4979
|
-
var
|
|
4980
|
-
var
|
|
5423
|
+
var React89 = __toESM(require("react"));
|
|
5424
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
4981
5425
|
var import_editor_elements17 = require("@elementor/editor-elements");
|
|
4982
5426
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
4983
|
-
var
|
|
4984
|
-
var
|
|
4985
|
-
var
|
|
5427
|
+
var import_icons26 = require("@elementor/icons");
|
|
5428
|
+
var import_ui43 = require("@elementor/ui");
|
|
5429
|
+
var import_i18n64 = require("@wordpress/i18n");
|
|
4986
5430
|
|
|
4987
5431
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
4988
5432
|
var import_editor_elements15 = require("@elementor/editor-elements");
|
|
@@ -4998,14 +5442,14 @@ var getElementByType = (elementId, type) => {
|
|
|
4998
5442
|
};
|
|
4999
5443
|
|
|
5000
5444
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
5001
|
-
var
|
|
5445
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5002
5446
|
var import_editor_elements16 = require("@elementor/editor-elements");
|
|
5003
5447
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
5004
|
-
var
|
|
5448
|
+
var import_i18n63 = require("@wordpress/i18n");
|
|
5005
5449
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5006
5450
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5007
5451
|
var useActions = () => {
|
|
5008
|
-
const { value, setValue: setDefaultActiveTab } = (0,
|
|
5452
|
+
const { value, setValue: setDefaultActiveTab } = (0, import_editor_controls57.useBoundProp)(import_editor_props15.numberPropTypeUtil);
|
|
5009
5453
|
const defaultActiveTab = value ?? 0;
|
|
5010
5454
|
const duplicateItem = ({
|
|
5011
5455
|
items: items3,
|
|
@@ -5024,7 +5468,7 @@ var useActions = () => {
|
|
|
5024
5468
|
}
|
|
5025
5469
|
(0, import_editor_elements16.duplicateElements)({
|
|
5026
5470
|
elementIds: [tabId, tabContentId],
|
|
5027
|
-
title: (0,
|
|
5471
|
+
title: (0, import_i18n63.__)("Duplicate Tab", "elementor"),
|
|
5028
5472
|
onDuplicateElements: () => {
|
|
5029
5473
|
if (newDefault !== defaultActiveTab) {
|
|
5030
5474
|
setDefaultActiveTab(newDefault, {}, { withHistory: false });
|
|
@@ -5061,7 +5505,7 @@ var useActions = () => {
|
|
|
5061
5505
|
defaultActiveTab
|
|
5062
5506
|
});
|
|
5063
5507
|
(0, import_editor_elements16.moveElements)({
|
|
5064
|
-
title: (0,
|
|
5508
|
+
title: (0, import_i18n63.__)("Reorder Tabs", "elementor"),
|
|
5065
5509
|
moves: [
|
|
5066
5510
|
{
|
|
5067
5511
|
element: movedElement,
|
|
@@ -5095,7 +5539,7 @@ var useActions = () => {
|
|
|
5095
5539
|
defaultActiveTab
|
|
5096
5540
|
});
|
|
5097
5541
|
(0, import_editor_elements16.removeElements)({
|
|
5098
|
-
title: (0,
|
|
5542
|
+
title: (0, import_i18n63.__)("Tabs", "elementor"),
|
|
5099
5543
|
elementIds: items3.flatMap(({ item, index }) => {
|
|
5100
5544
|
const tabId = item.id;
|
|
5101
5545
|
const tabContentContainer = (0, import_editor_elements16.getContainer)(tabContentAreaId);
|
|
@@ -5130,7 +5574,7 @@ var useActions = () => {
|
|
|
5130
5574
|
items3.forEach(({ index }) => {
|
|
5131
5575
|
const position = index + 1;
|
|
5132
5576
|
(0, import_editor_elements16.createElements)({
|
|
5133
|
-
title: (0,
|
|
5577
|
+
title: (0, import_i18n63.__)("Tabs", "elementor"),
|
|
5134
5578
|
elements: [
|
|
5135
5579
|
{
|
|
5136
5580
|
container: tabContentArea,
|
|
@@ -5199,7 +5643,7 @@ var calculateDefaultOnDuplicate = ({
|
|
|
5199
5643
|
var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
|
|
5200
5644
|
var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
|
|
5201
5645
|
var TabsControl = ({ label }) => {
|
|
5202
|
-
return /* @__PURE__ */
|
|
5646
|
+
return /* @__PURE__ */ React89.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n64.__)("Tabs", "elementor") }, /* @__PURE__ */ React89.createElement(TabsControlContent, { label }));
|
|
5203
5647
|
};
|
|
5204
5648
|
var TabsControlContent = ({ label }) => {
|
|
5205
5649
|
const { element } = useElement();
|
|
@@ -5243,8 +5687,8 @@ var TabsControlContent = ({ label }) => {
|
|
|
5243
5687
|
});
|
|
5244
5688
|
}
|
|
5245
5689
|
};
|
|
5246
|
-
return /* @__PURE__ */
|
|
5247
|
-
|
|
5690
|
+
return /* @__PURE__ */ React89.createElement(
|
|
5691
|
+
import_editor_controls58.Repeater,
|
|
5248
5692
|
{
|
|
5249
5693
|
showToggle: false,
|
|
5250
5694
|
values: repeaterValues,
|
|
@@ -5263,27 +5707,27 @@ var TabsControlContent = ({ label }) => {
|
|
|
5263
5707
|
};
|
|
5264
5708
|
var ItemLabel = ({ value, index }) => {
|
|
5265
5709
|
const elementTitle = value?.title;
|
|
5266
|
-
return /* @__PURE__ */
|
|
5710
|
+
return /* @__PURE__ */ React89.createElement(import_ui43.Stack, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React89.createElement("span", null, elementTitle), /* @__PURE__ */ React89.createElement(ItemDefaultTab, { index }));
|
|
5267
5711
|
};
|
|
5268
5712
|
var ItemDefaultTab = ({ index }) => {
|
|
5269
|
-
const { value: defaultItem } = (0,
|
|
5713
|
+
const { value: defaultItem } = (0, import_editor_controls58.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5270
5714
|
const isDefault = defaultItem === index;
|
|
5271
5715
|
if (!isDefault) {
|
|
5272
5716
|
return null;
|
|
5273
5717
|
}
|
|
5274
|
-
return /* @__PURE__ */
|
|
5718
|
+
return /* @__PURE__ */ React89.createElement(import_ui43.Chip, { size: "tiny", shape: "rounded", label: (0, import_i18n64.__)("Default", "elementor") });
|
|
5275
5719
|
};
|
|
5276
5720
|
var ItemContent = ({ value, index }) => {
|
|
5277
5721
|
if (!value.id) {
|
|
5278
5722
|
return null;
|
|
5279
5723
|
}
|
|
5280
|
-
return /* @__PURE__ */
|
|
5724
|
+
return /* @__PURE__ */ React89.createElement(import_ui43.Stack, { p: 2, gap: 1.5 }, /* @__PURE__ */ React89.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React89.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n64.__)("Tabs", "elementor") }, /* @__PURE__ */ React89.createElement(DefaultTabControl, { tabIndex: index })));
|
|
5281
5725
|
};
|
|
5282
5726
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
5283
|
-
const { value, setValue } = (0,
|
|
5727
|
+
const { value, setValue } = (0, import_editor_controls58.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5284
5728
|
const isDefault = value === tabIndex;
|
|
5285
|
-
return /* @__PURE__ */
|
|
5286
|
-
|
|
5729
|
+
return /* @__PURE__ */ React89.createElement(import_ui43.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React89.createElement(import_editor_controls58.ControlFormLabel, null, (0, import_i18n64.__)("Set as default tab", "elementor")), /* @__PURE__ */ React89.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React89.createElement(
|
|
5730
|
+
import_ui43.Switch,
|
|
5287
5731
|
{
|
|
5288
5732
|
size: "small",
|
|
5289
5733
|
checked: isDefault,
|
|
@@ -5300,8 +5744,8 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
5300
5744
|
var TabLabelControl = ({ elementId }) => {
|
|
5301
5745
|
const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(elementId);
|
|
5302
5746
|
const label = editorSettings?.title ?? "";
|
|
5303
|
-
return /* @__PURE__ */
|
|
5304
|
-
|
|
5747
|
+
return /* @__PURE__ */ React89.createElement(import_ui43.Stack, { gap: 1 }, /* @__PURE__ */ React89.createElement(import_editor_controls58.ControlFormLabel, null, (0, import_i18n64.__)("Tab name", "elementor")), /* @__PURE__ */ React89.createElement(
|
|
5748
|
+
import_ui43.TextField,
|
|
5305
5749
|
{
|
|
5306
5750
|
size: "tiny",
|
|
5307
5751
|
value: label,
|
|
@@ -5321,22 +5765,22 @@ var ConditionalTooltip = ({
|
|
|
5321
5765
|
if (!showTooltip) {
|
|
5322
5766
|
return children;
|
|
5323
5767
|
}
|
|
5324
|
-
return /* @__PURE__ */
|
|
5325
|
-
|
|
5768
|
+
return /* @__PURE__ */ React89.createElement(
|
|
5769
|
+
import_ui43.Infotip,
|
|
5326
5770
|
{
|
|
5327
5771
|
arrow: false,
|
|
5328
|
-
content: /* @__PURE__ */
|
|
5329
|
-
|
|
5772
|
+
content: /* @__PURE__ */ React89.createElement(
|
|
5773
|
+
import_ui43.Alert,
|
|
5330
5774
|
{
|
|
5331
5775
|
color: "secondary",
|
|
5332
|
-
icon: /* @__PURE__ */
|
|
5776
|
+
icon: /* @__PURE__ */ React89.createElement(import_icons26.InfoCircleFilledIcon, { fontSize: "tiny" }),
|
|
5333
5777
|
size: "small",
|
|
5334
5778
|
sx: { width: 288 }
|
|
5335
5779
|
},
|
|
5336
|
-
/* @__PURE__ */
|
|
5780
|
+
/* @__PURE__ */ React89.createElement(import_ui43.Typography, { variant: "body2" }, (0, import_i18n64.__)("To change the default tab, simply set another tab as default.", "elementor"))
|
|
5337
5781
|
)
|
|
5338
5782
|
},
|
|
5339
|
-
/* @__PURE__ */
|
|
5783
|
+
/* @__PURE__ */ React89.createElement("span", null, children)
|
|
5340
5784
|
);
|
|
5341
5785
|
};
|
|
5342
5786
|
|
|
@@ -5354,27 +5798,27 @@ var registerElementControls = () => {
|
|
|
5354
5798
|
|
|
5355
5799
|
// src/dynamics/init.ts
|
|
5356
5800
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
5357
|
-
var
|
|
5801
|
+
var import_editor_controls65 = require("@elementor/editor-controls");
|
|
5358
5802
|
var import_menus2 = require("@elementor/menus");
|
|
5359
5803
|
|
|
5360
5804
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5361
|
-
var
|
|
5362
|
-
var
|
|
5805
|
+
var React90 = __toESM(require("react"));
|
|
5806
|
+
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
5363
5807
|
var import_editor_props18 = require("@elementor/editor-props");
|
|
5364
|
-
var
|
|
5808
|
+
var import_icons27 = require("@elementor/icons");
|
|
5365
5809
|
|
|
5366
5810
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5367
|
-
var
|
|
5811
|
+
var import_react43 = require("react");
|
|
5368
5812
|
|
|
5369
5813
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5370
|
-
var
|
|
5371
|
-
var
|
|
5814
|
+
var import_react42 = require("react");
|
|
5815
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5372
5816
|
|
|
5373
5817
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5374
|
-
var
|
|
5818
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
5375
5819
|
|
|
5376
5820
|
// src/hooks/use-license-config.ts
|
|
5377
|
-
var
|
|
5821
|
+
var import_react41 = require("react");
|
|
5378
5822
|
var config = { expired: false };
|
|
5379
5823
|
var listeners = /* @__PURE__ */ new Set();
|
|
5380
5824
|
function setLicenseConfig(newConfig) {
|
|
@@ -5389,12 +5833,12 @@ function subscribe(listener) {
|
|
|
5389
5833
|
return () => listeners.delete(listener);
|
|
5390
5834
|
}
|
|
5391
5835
|
function useLicenseConfig() {
|
|
5392
|
-
return (0,
|
|
5836
|
+
return (0, import_react41.useSyncExternalStore)(subscribe, getLicenseConfig, getLicenseConfig);
|
|
5393
5837
|
}
|
|
5394
5838
|
|
|
5395
5839
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5396
5840
|
var getAtomicDynamicTags = (shouldFilterByLicense = true) => {
|
|
5397
|
-
const { atomicDynamicTags } = (0,
|
|
5841
|
+
const { atomicDynamicTags } = (0, import_editor_v1_adapters11.getElementorConfig)();
|
|
5398
5842
|
if (!atomicDynamicTags) {
|
|
5399
5843
|
return null;
|
|
5400
5844
|
}
|
|
@@ -5417,7 +5861,7 @@ var filterByLicense = (tags) => {
|
|
|
5417
5861
|
|
|
5418
5862
|
// src/dynamics/utils.ts
|
|
5419
5863
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
5420
|
-
var
|
|
5864
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
5421
5865
|
var import_schema = require("@elementor/schema");
|
|
5422
5866
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
5423
5867
|
var dynamicPropTypeUtil = (0, import_editor_props17.createPropUtils)(
|
|
@@ -5429,7 +5873,7 @@ var dynamicPropTypeUtil = (0, import_editor_props17.createPropUtils)(
|
|
|
5429
5873
|
})
|
|
5430
5874
|
);
|
|
5431
5875
|
var isDynamicTagSupported = (tagName) => {
|
|
5432
|
-
return !!(0,
|
|
5876
|
+
return !!(0, import_editor_v1_adapters12.getElementorConfig)()?.atomicDynamicTags?.tags?.[tagName];
|
|
5433
5877
|
};
|
|
5434
5878
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
5435
5879
|
var getDynamicPropType = (propType) => {
|
|
@@ -5452,13 +5896,13 @@ var useAllPropDynamicTags = () => {
|
|
|
5452
5896
|
};
|
|
5453
5897
|
var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
5454
5898
|
let categories = [];
|
|
5455
|
-
const { propType } = (0,
|
|
5899
|
+
const { propType } = (0, import_editor_controls59.useBoundProp)();
|
|
5456
5900
|
if (propType) {
|
|
5457
5901
|
const propDynamicType = getDynamicPropType(propType);
|
|
5458
5902
|
categories = propDynamicType?.settings.categories || [];
|
|
5459
5903
|
}
|
|
5460
5904
|
const categoriesKey = categories.join();
|
|
5461
|
-
return (0,
|
|
5905
|
+
return (0, import_react42.useMemo)(
|
|
5462
5906
|
() => getDynamicTagsByCategories(categories, filterByLicense2),
|
|
5463
5907
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5464
5908
|
[categoriesKey, filterByLicense2]
|
|
@@ -5492,33 +5936,33 @@ var getDynamicTagsByCategories = (categories, filterByLicense2) => {
|
|
|
5492
5936
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5493
5937
|
var useDynamicTag = (tagName) => {
|
|
5494
5938
|
const dynamicTags = useAllPropDynamicTags();
|
|
5495
|
-
return (0,
|
|
5939
|
+
return (0, import_react43.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
5496
5940
|
};
|
|
5497
5941
|
|
|
5498
5942
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5499
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
5943
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React90.createElement(import_icons27.DatabaseIcon, { fontSize: "tiny" });
|
|
5500
5944
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5501
|
-
const context = (0,
|
|
5502
|
-
return /* @__PURE__ */
|
|
5945
|
+
const context = (0, import_editor_controls60.useBoundProp)(import_editor_props18.backgroundImageOverlayPropTypeUtil);
|
|
5946
|
+
return /* @__PURE__ */ React90.createElement(import_editor_controls60.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React90.createElement(import_editor_controls60.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React90.createElement(Wrapper2, { rawValue: value.value })));
|
|
5503
5947
|
};
|
|
5504
5948
|
var Wrapper2 = ({ rawValue }) => {
|
|
5505
|
-
const { propType } = (0,
|
|
5949
|
+
const { propType } = (0, import_editor_controls60.useBoundProp)();
|
|
5506
5950
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5507
|
-
return /* @__PURE__ */
|
|
5951
|
+
return /* @__PURE__ */ React90.createElement(import_editor_controls60.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React90.createElement(import_editor_controls60.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React90.createElement(Content, { rawValue: rawValue.image })));
|
|
5508
5952
|
};
|
|
5509
5953
|
var Content = ({ rawValue }) => {
|
|
5510
5954
|
const src = rawValue.value.src;
|
|
5511
5955
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
5512
|
-
return /* @__PURE__ */
|
|
5956
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, dynamicTag?.label);
|
|
5513
5957
|
};
|
|
5514
5958
|
|
|
5515
5959
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5516
|
-
var
|
|
5517
|
-
var
|
|
5960
|
+
var React94 = __toESM(require("react"));
|
|
5961
|
+
var import_editor_controls63 = require("@elementor/editor-controls");
|
|
5518
5962
|
var import_editor_ui10 = require("@elementor/editor-ui");
|
|
5519
|
-
var
|
|
5520
|
-
var
|
|
5521
|
-
var
|
|
5963
|
+
var import_icons29 = require("@elementor/icons");
|
|
5964
|
+
var import_ui45 = require("@elementor/ui");
|
|
5965
|
+
var import_i18n66 = require("@wordpress/i18n");
|
|
5522
5966
|
|
|
5523
5967
|
// src/hooks/use-persist-dynamic-value.ts
|
|
5524
5968
|
var import_session10 = require("@elementor/session");
|
|
@@ -5529,12 +5973,12 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
5529
5973
|
};
|
|
5530
5974
|
|
|
5531
5975
|
// src/dynamics/dynamic-control.tsx
|
|
5532
|
-
var
|
|
5533
|
-
var
|
|
5976
|
+
var React92 = __toESM(require("react"));
|
|
5977
|
+
var import_editor_controls61 = require("@elementor/editor-controls");
|
|
5534
5978
|
|
|
5535
5979
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5536
|
-
var
|
|
5537
|
-
var
|
|
5980
|
+
var React91 = __toESM(require("react"));
|
|
5981
|
+
var import_react44 = require("react");
|
|
5538
5982
|
var import_editor_props19 = require("@elementor/editor-props");
|
|
5539
5983
|
var DynamicConditionalControl = ({
|
|
5540
5984
|
children,
|
|
@@ -5542,7 +5986,7 @@ var DynamicConditionalControl = ({
|
|
|
5542
5986
|
propsSchema,
|
|
5543
5987
|
dynamicSettings
|
|
5544
5988
|
}) => {
|
|
5545
|
-
const defaults = (0,
|
|
5989
|
+
const defaults = (0, import_react44.useMemo)(() => {
|
|
5546
5990
|
if (!propsSchema) {
|
|
5547
5991
|
return {};
|
|
5548
5992
|
}
|
|
@@ -5552,7 +5996,7 @@ var DynamicConditionalControl = ({
|
|
|
5552
5996
|
return result;
|
|
5553
5997
|
}, {});
|
|
5554
5998
|
}, [propsSchema]);
|
|
5555
|
-
const convertedSettings = (0,
|
|
5999
|
+
const convertedSettings = (0, import_react44.useMemo)(() => {
|
|
5556
6000
|
if (!dynamicSettings) {
|
|
5557
6001
|
return {};
|
|
5558
6002
|
}
|
|
@@ -5571,19 +6015,19 @@ var DynamicConditionalControl = ({
|
|
|
5571
6015
|
{}
|
|
5572
6016
|
);
|
|
5573
6017
|
}, [dynamicSettings]);
|
|
5574
|
-
const effectiveSettings = (0,
|
|
6018
|
+
const effectiveSettings = (0, import_react44.useMemo)(() => {
|
|
5575
6019
|
return { ...defaults, ...convertedSettings };
|
|
5576
6020
|
}, [defaults, convertedSettings]);
|
|
5577
6021
|
if (!propType?.dependencies?.terms.length) {
|
|
5578
|
-
return /* @__PURE__ */
|
|
6022
|
+
return /* @__PURE__ */ React91.createElement(React91.Fragment, null, children);
|
|
5579
6023
|
}
|
|
5580
6024
|
const isHidden = !(0, import_editor_props19.isDependencyMet)(propType?.dependencies, effectiveSettings).isMet;
|
|
5581
|
-
return isHidden ? null : /* @__PURE__ */
|
|
6025
|
+
return isHidden ? null : /* @__PURE__ */ React91.createElement(React91.Fragment, null, children);
|
|
5582
6026
|
};
|
|
5583
6027
|
|
|
5584
6028
|
// src/dynamics/dynamic-control.tsx
|
|
5585
6029
|
var DynamicControl = ({ bind, children }) => {
|
|
5586
|
-
const { value, setValue } = (0,
|
|
6030
|
+
const { value, setValue } = (0, import_editor_controls61.useBoundProp)(dynamicPropTypeUtil);
|
|
5587
6031
|
const { name = "", group = "", settings } = value ?? {};
|
|
5588
6032
|
const dynamicTag = useDynamicTag(name);
|
|
5589
6033
|
if (!dynamicTag) {
|
|
@@ -5603,7 +6047,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5603
6047
|
});
|
|
5604
6048
|
};
|
|
5605
6049
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5606
|
-
return /* @__PURE__ */
|
|
6050
|
+
return /* @__PURE__ */ React92.createElement(import_editor_controls61.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React92.createElement(import_editor_controls61.PropKeyProvider, { bind }, /* @__PURE__ */ React92.createElement(
|
|
5607
6051
|
DynamicConditionalControl,
|
|
5608
6052
|
{
|
|
5609
6053
|
propType: dynamicPropType,
|
|
@@ -5615,32 +6059,32 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5615
6059
|
};
|
|
5616
6060
|
|
|
5617
6061
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5618
|
-
var
|
|
5619
|
-
var
|
|
5620
|
-
var
|
|
6062
|
+
var React93 = __toESM(require("react"));
|
|
6063
|
+
var import_react45 = require("react");
|
|
6064
|
+
var import_editor_controls62 = require("@elementor/editor-controls");
|
|
5621
6065
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
5622
|
-
var
|
|
5623
|
-
var
|
|
5624
|
-
var
|
|
6066
|
+
var import_icons28 = require("@elementor/icons");
|
|
6067
|
+
var import_ui44 = require("@elementor/ui");
|
|
6068
|
+
var import_i18n65 = require("@wordpress/i18n");
|
|
5625
6069
|
var SIZE2 = "tiny";
|
|
5626
6070
|
var PROMO_TEXT_WIDTH = 170;
|
|
5627
6071
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
5628
6072
|
var RENEW_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-renew-modal/";
|
|
5629
6073
|
var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
5630
|
-
const [searchValue, setSearchValue] = (0,
|
|
6074
|
+
const [searchValue, setSearchValue] = (0, import_react45.useState)("");
|
|
5631
6075
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5632
|
-
const theme = (0,
|
|
5633
|
-
const { value: anyValue } = (0,
|
|
5634
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
6076
|
+
const theme = (0, import_ui44.useTheme)();
|
|
6077
|
+
const { value: anyValue } = (0, import_editor_controls62.useBoundProp)();
|
|
6078
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls62.useBoundProp)(dynamicPropTypeUtil);
|
|
5635
6079
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
5636
6080
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5637
|
-
const
|
|
5638
|
-
const hasNoDynamicTags = !
|
|
5639
|
-
(0,
|
|
6081
|
+
const options13 = useFilteredOptions(searchValue);
|
|
6082
|
+
const hasNoDynamicTags = !options13.length && !searchValue.trim();
|
|
6083
|
+
(0, import_react45.useEffect)(() => {
|
|
5640
6084
|
if (hasNoDynamicTags) {
|
|
5641
|
-
(0,
|
|
6085
|
+
(0, import_editor_controls62.trackViewPromotion)({ target_name: "dynamic_tags" });
|
|
5642
6086
|
} else if (expired) {
|
|
5643
|
-
(0,
|
|
6087
|
+
(0, import_editor_controls62.trackViewPromotion)({ target_name: "dynamic_tags" });
|
|
5644
6088
|
}
|
|
5645
6089
|
}, [hasNoDynamicTags, expired]);
|
|
5646
6090
|
const handleSearch = (value) => {
|
|
@@ -5650,11 +6094,11 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5650
6094
|
if (!isCurrentValueDynamic) {
|
|
5651
6095
|
updatePropValueHistory(anyValue);
|
|
5652
6096
|
}
|
|
5653
|
-
const selectedOption =
|
|
6097
|
+
const selectedOption = options13.flatMap(([, items3]) => items3).find((item) => item.value === value);
|
|
5654
6098
|
setValue({ name: value, group: selectedOption?.group ?? "", settings: { label: selectedOption?.label } });
|
|
5655
6099
|
closePopover();
|
|
5656
6100
|
};
|
|
5657
|
-
const virtualizedItems =
|
|
6101
|
+
const virtualizedItems = options13.flatMap(([category, items3]) => [
|
|
5658
6102
|
{
|
|
5659
6103
|
type: "category",
|
|
5660
6104
|
value: category,
|
|
@@ -5668,19 +6112,19 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5668
6112
|
]);
|
|
5669
6113
|
const getPopOverContent = () => {
|
|
5670
6114
|
if (hasNoDynamicTags) {
|
|
5671
|
-
return /* @__PURE__ */
|
|
6115
|
+
return /* @__PURE__ */ React93.createElement(NoDynamicTags, null);
|
|
5672
6116
|
}
|
|
5673
6117
|
if (expired) {
|
|
5674
|
-
return /* @__PURE__ */
|
|
6118
|
+
return /* @__PURE__ */ React93.createElement(ExpiredDynamicTags, null);
|
|
5675
6119
|
}
|
|
5676
|
-
return /* @__PURE__ */
|
|
6120
|
+
return /* @__PURE__ */ React93.createElement(import_react45.Fragment, null, /* @__PURE__ */ React93.createElement(
|
|
5677
6121
|
import_editor_ui9.SearchField,
|
|
5678
6122
|
{
|
|
5679
6123
|
value: searchValue,
|
|
5680
6124
|
onSearch: handleSearch,
|
|
5681
|
-
placeholder: (0,
|
|
6125
|
+
placeholder: (0, import_i18n65.__)("Search dynamic tags\u2026", "elementor")
|
|
5682
6126
|
}
|
|
5683
|
-
), /* @__PURE__ */
|
|
6127
|
+
), /* @__PURE__ */ React93.createElement(import_ui44.Divider, null), /* @__PURE__ */ React93.createElement(
|
|
5684
6128
|
import_editor_ui9.PopoverMenuList,
|
|
5685
6129
|
{
|
|
5686
6130
|
items: virtualizedItems,
|
|
@@ -5688,21 +6132,21 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5688
6132
|
onClose: closePopover,
|
|
5689
6133
|
selectedValue: dynamicValue?.name,
|
|
5690
6134
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
5691
|
-
noResultsComponent: /* @__PURE__ */
|
|
6135
|
+
noResultsComponent: /* @__PURE__ */ React93.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
5692
6136
|
}
|
|
5693
6137
|
));
|
|
5694
6138
|
};
|
|
5695
|
-
return /* @__PURE__ */
|
|
6139
|
+
return /* @__PURE__ */ React93.createElement(import_editor_ui9.SectionPopoverBody, { "aria-label": (0, import_i18n65.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React93.createElement(
|
|
5696
6140
|
import_editor_ui9.PopoverHeader,
|
|
5697
6141
|
{
|
|
5698
|
-
title: (0,
|
|
6142
|
+
title: (0, import_i18n65.__)("Dynamic tags", "elementor"),
|
|
5699
6143
|
onClose: closePopover,
|
|
5700
|
-
icon: /* @__PURE__ */
|
|
6144
|
+
icon: /* @__PURE__ */ React93.createElement(import_icons28.DatabaseIcon, { fontSize: SIZE2 })
|
|
5701
6145
|
}
|
|
5702
6146
|
), getPopOverContent());
|
|
5703
6147
|
};
|
|
5704
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
5705
|
-
|
|
6148
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React93.createElement(
|
|
6149
|
+
import_ui44.Stack,
|
|
5706
6150
|
{
|
|
5707
6151
|
gap: 1,
|
|
5708
6152
|
alignItems: "center",
|
|
@@ -5712,12 +6156,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React88.createElem
|
|
|
5712
6156
|
color: "text.secondary",
|
|
5713
6157
|
sx: { pb: 3.5 }
|
|
5714
6158
|
},
|
|
5715
|
-
/* @__PURE__ */
|
|
5716
|
-
/* @__PURE__ */
|
|
5717
|
-
/* @__PURE__ */
|
|
6159
|
+
/* @__PURE__ */ React93.createElement(import_icons28.DatabaseIcon, { fontSize: "large" }),
|
|
6160
|
+
/* @__PURE__ */ React93.createElement(import_ui44.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n65.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React93.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
6161
|
+
/* @__PURE__ */ React93.createElement(import_ui44.Typography, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, (0, import_i18n65.__)("Try something else.", "elementor"), /* @__PURE__ */ React93.createElement(import_ui44.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n65.__)("Clear & try again", "elementor")))
|
|
5718
6162
|
);
|
|
5719
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
5720
|
-
|
|
6163
|
+
var NoDynamicTags = () => /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(import_ui44.Divider, null), /* @__PURE__ */ React93.createElement(
|
|
6164
|
+
import_ui44.Stack,
|
|
5721
6165
|
{
|
|
5722
6166
|
gap: 1,
|
|
5723
6167
|
alignItems: "center",
|
|
@@ -5727,20 +6171,20 @@ var NoDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fragment
|
|
|
5727
6171
|
color: "text.secondary",
|
|
5728
6172
|
sx: { pb: 3.5 }
|
|
5729
6173
|
},
|
|
5730
|
-
/* @__PURE__ */
|
|
5731
|
-
/* @__PURE__ */
|
|
5732
|
-
/* @__PURE__ */
|
|
5733
|
-
/* @__PURE__ */
|
|
6174
|
+
/* @__PURE__ */ React93.createElement(import_icons28.DatabaseIcon, { fontSize: "large" }),
|
|
6175
|
+
/* @__PURE__ */ React93.createElement(import_ui44.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n65.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
6176
|
+
/* @__PURE__ */ React93.createElement(import_ui44.Typography, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, (0, import_i18n65.__)("Upgrade now to display your content dynamically.", "elementor")),
|
|
6177
|
+
/* @__PURE__ */ React93.createElement(
|
|
5734
6178
|
import_editor_ui9.CtaButton,
|
|
5735
6179
|
{
|
|
5736
6180
|
size: "small",
|
|
5737
6181
|
href: PRO_DYNAMIC_TAGS_URL,
|
|
5738
|
-
onClick: () => (0,
|
|
6182
|
+
onClick: () => (0, import_editor_controls62.trackUpgradePromotionClick)({ target_name: "dynamic_tags" })
|
|
5739
6183
|
}
|
|
5740
6184
|
)
|
|
5741
6185
|
));
|
|
5742
|
-
var ExpiredDynamicTags = () => /* @__PURE__ */
|
|
5743
|
-
|
|
6186
|
+
var ExpiredDynamicTags = () => /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(import_ui44.Divider, null), /* @__PURE__ */ React93.createElement(
|
|
6187
|
+
import_ui44.Stack,
|
|
5744
6188
|
{
|
|
5745
6189
|
gap: 1,
|
|
5746
6190
|
alignItems: "center",
|
|
@@ -5750,22 +6194,22 @@ var ExpiredDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fra
|
|
|
5750
6194
|
color: "text.secondary",
|
|
5751
6195
|
sx: { pb: 3.5 }
|
|
5752
6196
|
},
|
|
5753
|
-
/* @__PURE__ */
|
|
5754
|
-
/* @__PURE__ */
|
|
5755
|
-
/* @__PURE__ */
|
|
5756
|
-
/* @__PURE__ */
|
|
6197
|
+
/* @__PURE__ */ React93.createElement(import_icons28.DatabaseIcon, { fontSize: "large" }),
|
|
6198
|
+
/* @__PURE__ */ React93.createElement(import_ui44.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n65.__)("Unlock your Dynamic tags again", "elementor")),
|
|
6199
|
+
/* @__PURE__ */ React93.createElement(import_ui44.Typography, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, (0, import_i18n65.__)("Dynamic tags need Elementor Pro. Renew now to keep them active.", "elementor")),
|
|
6200
|
+
/* @__PURE__ */ React93.createElement(
|
|
5757
6201
|
import_editor_ui9.CtaButton,
|
|
5758
6202
|
{
|
|
5759
6203
|
size: "small",
|
|
5760
6204
|
href: RENEW_DYNAMIC_TAGS_URL,
|
|
5761
|
-
onClick: () => (0,
|
|
5762
|
-
children: (0,
|
|
6205
|
+
onClick: () => (0, import_editor_controls62.trackUpgradePromotionClick)({ target_name: "dynamic_tags" }),
|
|
6206
|
+
children: (0, import_i18n65.__)("Renew Now", "elementor")
|
|
5763
6207
|
}
|
|
5764
6208
|
)
|
|
5765
6209
|
));
|
|
5766
6210
|
var useFilteredOptions = (searchValue) => {
|
|
5767
6211
|
const dynamicTags = usePropDynamicTags();
|
|
5768
|
-
const
|
|
6212
|
+
const options13 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
5769
6213
|
const isVisible = label.toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
5770
6214
|
if (!isVisible) {
|
|
5771
6215
|
return categories;
|
|
@@ -5776,15 +6220,15 @@ var useFilteredOptions = (searchValue) => {
|
|
|
5776
6220
|
categories.get(group)?.push({ label, group, value: name });
|
|
5777
6221
|
return categories;
|
|
5778
6222
|
}, /* @__PURE__ */ new Map());
|
|
5779
|
-
return [...
|
|
6223
|
+
return [...options13];
|
|
5780
6224
|
};
|
|
5781
6225
|
|
|
5782
6226
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5783
6227
|
var SIZE3 = "tiny";
|
|
5784
6228
|
var tagsWithoutTabs = ["popup"];
|
|
5785
6229
|
var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
5786
|
-
const { setValue: setAnyValue, propType } = (0,
|
|
5787
|
-
const { bind, value } = (0,
|
|
6230
|
+
const { setValue: setAnyValue, propType } = (0, import_editor_controls63.useBoundProp)();
|
|
6231
|
+
const { bind, value } = (0, import_editor_controls63.useBoundProp)(dynamicPropTypeUtil);
|
|
5788
6232
|
const { expired: readonly } = useLicenseConfig();
|
|
5789
6233
|
const originalPropType = createTopLevelObjectType({
|
|
5790
6234
|
schema: {
|
|
@@ -5792,11 +6236,11 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5792
6236
|
}
|
|
5793
6237
|
});
|
|
5794
6238
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
5795
|
-
const selectionPopoverState = (0,
|
|
6239
|
+
const selectionPopoverState = (0, import_ui45.usePopupState)({ variant: "popover" });
|
|
5796
6240
|
const { name: tagName = "" } = value;
|
|
5797
6241
|
const dynamicTag = useDynamicTag(tagName);
|
|
5798
6242
|
if (!isDynamicTagSupported(tagName) && OriginalControl) {
|
|
5799
|
-
return /* @__PURE__ */
|
|
6243
|
+
return /* @__PURE__ */ React94.createElement(import_editor_controls63.PropProvider, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React94.createElement(import_editor_controls63.PropKeyProvider, { bind }, /* @__PURE__ */ React94.createElement(OriginalControl, { ...props })));
|
|
5800
6244
|
}
|
|
5801
6245
|
const removeDynamicTag = () => {
|
|
5802
6246
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -5804,26 +6248,26 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5804
6248
|
if (!dynamicTag) {
|
|
5805
6249
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
5806
6250
|
}
|
|
5807
|
-
return /* @__PURE__ */
|
|
5808
|
-
|
|
6251
|
+
return /* @__PURE__ */ React94.createElement(import_ui45.Box, null, /* @__PURE__ */ React94.createElement(
|
|
6252
|
+
import_ui45.UnstableTag,
|
|
5809
6253
|
{
|
|
5810
6254
|
fullWidth: true,
|
|
5811
6255
|
showActionsOnHover: true,
|
|
5812
6256
|
label: dynamicTag.label,
|
|
5813
|
-
startIcon: /* @__PURE__ */
|
|
5814
|
-
...(0,
|
|
5815
|
-
actions: /* @__PURE__ */
|
|
5816
|
-
|
|
6257
|
+
startIcon: /* @__PURE__ */ React94.createElement(import_icons29.DatabaseIcon, { fontSize: SIZE3 }),
|
|
6258
|
+
...(0, import_ui45.bindTrigger)(selectionPopoverState),
|
|
6259
|
+
actions: /* @__PURE__ */ React94.createElement(React94.Fragment, null, /* @__PURE__ */ React94.createElement(DynamicSettingsPopover, { dynamicTag, disabled: readonly }), /* @__PURE__ */ React94.createElement(
|
|
6260
|
+
import_ui45.IconButton,
|
|
5817
6261
|
{
|
|
5818
6262
|
size: SIZE3,
|
|
5819
6263
|
onClick: removeDynamicTag,
|
|
5820
|
-
"aria-label": (0,
|
|
6264
|
+
"aria-label": (0, import_i18n66.__)("Remove dynamic value", "elementor")
|
|
5821
6265
|
},
|
|
5822
|
-
/* @__PURE__ */
|
|
6266
|
+
/* @__PURE__ */ React94.createElement(import_icons29.XIcon, { fontSize: SIZE3 })
|
|
5823
6267
|
))
|
|
5824
6268
|
}
|
|
5825
|
-
), /* @__PURE__ */
|
|
5826
|
-
|
|
6269
|
+
), /* @__PURE__ */ React94.createElement(
|
|
6270
|
+
import_ui45.Popover,
|
|
5827
6271
|
{
|
|
5828
6272
|
disablePortal: true,
|
|
5829
6273
|
disableScrollLock: true,
|
|
@@ -5832,31 +6276,31 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5832
6276
|
PaperProps: {
|
|
5833
6277
|
sx: { my: 1 }
|
|
5834
6278
|
},
|
|
5835
|
-
...(0,
|
|
6279
|
+
...(0, import_ui45.bindPopover)(selectionPopoverState)
|
|
5836
6280
|
},
|
|
5837
|
-
/* @__PURE__ */
|
|
6281
|
+
/* @__PURE__ */ React94.createElement(import_editor_ui10.SectionPopoverBody, { "aria-label": (0, import_i18n66.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React94.createElement(DynamicSelection, { close: selectionPopoverState.close, expired: readonly }))
|
|
5838
6282
|
));
|
|
5839
6283
|
};
|
|
5840
6284
|
var DynamicSettingsPopover = ({
|
|
5841
6285
|
dynamicTag,
|
|
5842
6286
|
disabled = false
|
|
5843
6287
|
}) => {
|
|
5844
|
-
const popupState = (0,
|
|
6288
|
+
const popupState = (0, import_ui45.usePopupState)({ variant: "popover" });
|
|
5845
6289
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
5846
6290
|
if (!hasDynamicSettings) {
|
|
5847
6291
|
return null;
|
|
5848
6292
|
}
|
|
5849
|
-
return /* @__PURE__ */
|
|
5850
|
-
|
|
6293
|
+
return /* @__PURE__ */ React94.createElement(React94.Fragment, null, /* @__PURE__ */ React94.createElement(
|
|
6294
|
+
import_ui45.IconButton,
|
|
5851
6295
|
{
|
|
5852
6296
|
size: SIZE3,
|
|
5853
6297
|
disabled,
|
|
5854
|
-
...!disabled && (0,
|
|
5855
|
-
"aria-label": (0,
|
|
6298
|
+
...!disabled && (0, import_ui45.bindTrigger)(popupState),
|
|
6299
|
+
"aria-label": (0, import_i18n66.__)("Dynamic settings", "elementor")
|
|
5856
6300
|
},
|
|
5857
|
-
/* @__PURE__ */
|
|
5858
|
-
), /* @__PURE__ */
|
|
5859
|
-
|
|
6301
|
+
/* @__PURE__ */ React94.createElement(import_icons29.SettingsIcon, { fontSize: SIZE3 })
|
|
6302
|
+
), /* @__PURE__ */ React94.createElement(
|
|
6303
|
+
import_ui45.Popover,
|
|
5860
6304
|
{
|
|
5861
6305
|
disablePortal: true,
|
|
5862
6306
|
disableScrollLock: true,
|
|
@@ -5865,45 +6309,45 @@ var DynamicSettingsPopover = ({
|
|
|
5865
6309
|
PaperProps: {
|
|
5866
6310
|
sx: { my: 1 }
|
|
5867
6311
|
},
|
|
5868
|
-
...(0,
|
|
6312
|
+
...(0, import_ui45.bindPopover)(popupState)
|
|
5869
6313
|
},
|
|
5870
|
-
/* @__PURE__ */
|
|
6314
|
+
/* @__PURE__ */ React94.createElement(import_editor_ui10.SectionPopoverBody, { "aria-label": (0, import_i18n66.__)("Dynamic settings", "elementor") }, /* @__PURE__ */ React94.createElement(
|
|
5871
6315
|
import_editor_ui10.PopoverHeader,
|
|
5872
6316
|
{
|
|
5873
6317
|
title: dynamicTag.label,
|
|
5874
6318
|
onClose: popupState.close,
|
|
5875
|
-
icon: /* @__PURE__ */
|
|
6319
|
+
icon: /* @__PURE__ */ React94.createElement(import_icons29.DatabaseIcon, { fontSize: SIZE3 })
|
|
5876
6320
|
}
|
|
5877
|
-
), /* @__PURE__ */
|
|
6321
|
+
), /* @__PURE__ */ React94.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls, tagName: dynamicTag.name }))
|
|
5878
6322
|
));
|
|
5879
6323
|
};
|
|
5880
6324
|
var DynamicSettings = ({ controls, tagName }) => {
|
|
5881
6325
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
5882
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
6326
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui45.useTabs)(0);
|
|
5883
6327
|
if (!tabs.length) {
|
|
5884
6328
|
return null;
|
|
5885
6329
|
}
|
|
5886
6330
|
if (tagsWithoutTabs.includes(tagName)) {
|
|
5887
6331
|
const singleTab = tabs[0];
|
|
5888
|
-
return /* @__PURE__ */
|
|
6332
|
+
return /* @__PURE__ */ React94.createElement(React94.Fragment, null, /* @__PURE__ */ React94.createElement(import_ui45.Divider, null), /* @__PURE__ */ React94.createElement(ControlsItemsStack, { items: singleTab.value.items }));
|
|
5889
6333
|
}
|
|
5890
|
-
return /* @__PURE__ */
|
|
5891
|
-
|
|
6334
|
+
return /* @__PURE__ */ React94.createElement(React94.Fragment, null, tabs.length > 1 && /* @__PURE__ */ React94.createElement(import_ui45.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React94.createElement(
|
|
6335
|
+
import_ui45.Tab,
|
|
5892
6336
|
{
|
|
5893
6337
|
key: index,
|
|
5894
6338
|
label: value.label,
|
|
5895
6339
|
sx: { px: 1, py: 0.5 },
|
|
5896
6340
|
...getTabProps(index)
|
|
5897
6341
|
}
|
|
5898
|
-
))), /* @__PURE__ */
|
|
5899
|
-
return /* @__PURE__ */
|
|
5900
|
-
|
|
6342
|
+
))), /* @__PURE__ */ React94.createElement(import_ui45.Divider, null), tabs.map(({ value }, index) => {
|
|
6343
|
+
return /* @__PURE__ */ React94.createElement(
|
|
6344
|
+
import_ui45.TabPanel,
|
|
5901
6345
|
{
|
|
5902
6346
|
key: index,
|
|
5903
6347
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
5904
6348
|
...getTabPanelProps(index)
|
|
5905
6349
|
},
|
|
5906
|
-
/* @__PURE__ */
|
|
6350
|
+
/* @__PURE__ */ React94.createElement(ControlsItemsStack, { items: value.items })
|
|
5907
6351
|
);
|
|
5908
6352
|
}));
|
|
5909
6353
|
};
|
|
@@ -5945,11 +6389,11 @@ var Control2 = ({ control }) => {
|
|
|
5945
6389
|
display: "grid",
|
|
5946
6390
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
5947
6391
|
} : {};
|
|
5948
|
-
return /* @__PURE__ */
|
|
6392
|
+
return /* @__PURE__ */ React94.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React94.createElement(import_ui45.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React94.createElement(import_ui45.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React94.createElement(import_editor_controls63.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React94.createElement(import_ui45.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React94.createElement(Control, { type: control.type, props: controlProps }))));
|
|
5949
6393
|
};
|
|
5950
6394
|
function ControlsItemsStack({ items: items3 }) {
|
|
5951
|
-
return /* @__PURE__ */
|
|
5952
|
-
(item) => item.type === "control" ? /* @__PURE__ */
|
|
6395
|
+
return /* @__PURE__ */ React94.createElement(import_ui45.Stack, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
6396
|
+
(item) => item.type === "control" ? /* @__PURE__ */ React94.createElement(Control2, { key: item.value.bind, control: item.value }) : null
|
|
5953
6397
|
));
|
|
5954
6398
|
}
|
|
5955
6399
|
|
|
@@ -6002,34 +6446,34 @@ function getDynamicValue(name, settings) {
|
|
|
6002
6446
|
}
|
|
6003
6447
|
|
|
6004
6448
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
6005
|
-
var
|
|
6006
|
-
var
|
|
6007
|
-
var
|
|
6008
|
-
var
|
|
6449
|
+
var React95 = __toESM(require("react"));
|
|
6450
|
+
var import_editor_controls64 = require("@elementor/editor-controls");
|
|
6451
|
+
var import_icons30 = require("@elementor/icons");
|
|
6452
|
+
var import_i18n67 = require("@wordpress/i18n");
|
|
6009
6453
|
var usePropDynamicAction = () => {
|
|
6010
|
-
const { propType } = (0,
|
|
6454
|
+
const { propType } = (0, import_editor_controls64.useBoundProp)();
|
|
6011
6455
|
const visible = !!propType && supportsDynamic(propType);
|
|
6012
6456
|
return {
|
|
6013
6457
|
visible,
|
|
6014
|
-
icon:
|
|
6015
|
-
title: (0,
|
|
6016
|
-
content: ({ close }) => /* @__PURE__ */
|
|
6458
|
+
icon: import_icons30.DatabaseIcon,
|
|
6459
|
+
title: (0, import_i18n67.__)("Dynamic tags", "elementor"),
|
|
6460
|
+
content: ({ close }) => /* @__PURE__ */ React95.createElement(DynamicSelection, { close })
|
|
6017
6461
|
};
|
|
6018
6462
|
};
|
|
6019
6463
|
|
|
6020
6464
|
// src/dynamics/init.ts
|
|
6021
6465
|
var { registerPopoverAction } = import_menus2.controlActionsMenu;
|
|
6022
6466
|
var init2 = () => {
|
|
6023
|
-
(0,
|
|
6467
|
+
(0, import_editor_controls65.registerControlReplacement)({
|
|
6024
6468
|
component: DynamicSelectionControl,
|
|
6025
6469
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
6026
6470
|
});
|
|
6027
|
-
(0,
|
|
6471
|
+
(0, import_editor_controls65.injectIntoRepeaterItemLabel)({
|
|
6028
6472
|
id: "dynamic-background-image",
|
|
6029
6473
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
6030
6474
|
component: BackgroundControlDynamicTagLabel
|
|
6031
6475
|
});
|
|
6032
|
-
(0,
|
|
6476
|
+
(0, import_editor_controls65.injectIntoRepeaterItemIcon)({
|
|
6033
6477
|
id: "dynamic-background-image",
|
|
6034
6478
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
6035
6479
|
component: BackgroundControlDynamicTagIcon
|
|
@@ -6044,11 +6488,11 @@ var init2 = () => {
|
|
|
6044
6488
|
};
|
|
6045
6489
|
|
|
6046
6490
|
// src/reset-style-props.tsx
|
|
6047
|
-
var
|
|
6491
|
+
var import_editor_controls66 = require("@elementor/editor-controls");
|
|
6048
6492
|
var import_editor_variables2 = require("@elementor/editor-variables");
|
|
6049
|
-
var
|
|
6493
|
+
var import_icons31 = require("@elementor/icons");
|
|
6050
6494
|
var import_menus3 = require("@elementor/menus");
|
|
6051
|
-
var
|
|
6495
|
+
var import_i18n68 = require("@wordpress/i18n");
|
|
6052
6496
|
|
|
6053
6497
|
// src/utils/is-equal.ts
|
|
6054
6498
|
function isEqual(a, b) {
|
|
@@ -6104,7 +6548,7 @@ function initResetStyleProps() {
|
|
|
6104
6548
|
}
|
|
6105
6549
|
function useResetStyleValueProps() {
|
|
6106
6550
|
const isStyle = useIsStyle();
|
|
6107
|
-
const { value, resetValue, propType } = (0,
|
|
6551
|
+
const { value, resetValue, propType } = (0, import_editor_controls66.useBoundProp)();
|
|
6108
6552
|
const hasValue = value !== null && value !== void 0;
|
|
6109
6553
|
const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
|
|
6110
6554
|
const isRequired = !!propType.settings?.required;
|
|
@@ -6124,44 +6568,44 @@ function useResetStyleValueProps() {
|
|
|
6124
6568
|
const visible = calculateVisibility();
|
|
6125
6569
|
return {
|
|
6126
6570
|
visible,
|
|
6127
|
-
title: (0,
|
|
6128
|
-
icon:
|
|
6571
|
+
title: (0, import_i18n68.__)("Clear", "elementor"),
|
|
6572
|
+
icon: import_icons31.BrushBigIcon,
|
|
6129
6573
|
onClick: () => resetValue()
|
|
6130
6574
|
};
|
|
6131
6575
|
}
|
|
6132
6576
|
|
|
6133
6577
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6134
|
-
var
|
|
6135
|
-
var
|
|
6578
|
+
var React101 = __toESM(require("react"));
|
|
6579
|
+
var import_editor_controls67 = require("@elementor/editor-controls");
|
|
6136
6580
|
var import_editor_props21 = require("@elementor/editor-props");
|
|
6137
6581
|
var import_editor_styles_repository17 = require("@elementor/editor-styles-repository");
|
|
6138
|
-
var
|
|
6582
|
+
var import_i18n72 = require("@wordpress/i18n");
|
|
6139
6583
|
|
|
6140
6584
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6141
|
-
var
|
|
6142
|
-
var
|
|
6585
|
+
var React100 = __toESM(require("react"));
|
|
6586
|
+
var import_react47 = require("react");
|
|
6143
6587
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
6144
6588
|
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
6145
|
-
var
|
|
6146
|
-
var
|
|
6589
|
+
var import_ui50 = require("@elementor/ui");
|
|
6590
|
+
var import_i18n71 = require("@wordpress/i18n");
|
|
6147
6591
|
|
|
6148
6592
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6149
|
-
var
|
|
6593
|
+
var import_react46 = require("react");
|
|
6150
6594
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
6151
6595
|
var import_editor_styles8 = require("@elementor/editor-styles");
|
|
6152
6596
|
var import_editor_styles_repository15 = require("@elementor/editor-styles-repository");
|
|
6153
|
-
var
|
|
6597
|
+
var import_i18n69 = require("@wordpress/i18n");
|
|
6154
6598
|
var MAXIMUM_ITEMS = 2;
|
|
6155
6599
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
6156
|
-
const [items3, setItems] = (0,
|
|
6157
|
-
(0,
|
|
6600
|
+
const [items3, setItems] = (0, import_react46.useState)([]);
|
|
6601
|
+
(0, import_react46.useEffect)(() => {
|
|
6158
6602
|
(async () => {
|
|
6159
6603
|
const normalizedItems = await Promise.all(
|
|
6160
6604
|
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
6161
6605
|
);
|
|
6162
6606
|
const validItems = normalizedItems.map((item) => ({
|
|
6163
6607
|
...item,
|
|
6164
|
-
displayLabel: import_editor_styles_repository15.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0,
|
|
6608
|
+
displayLabel: import_editor_styles_repository15.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0, import_i18n69.__)("Base", "elementor")
|
|
6165
6609
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
6166
6610
|
setItems(validItems);
|
|
6167
6611
|
})();
|
|
@@ -6205,7 +6649,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
6205
6649
|
}
|
|
6206
6650
|
});
|
|
6207
6651
|
const value = result?.[bind] ?? result;
|
|
6208
|
-
if ((0,
|
|
6652
|
+
if ((0, import_react46.isValidElement)(value)) {
|
|
6209
6653
|
return value;
|
|
6210
6654
|
}
|
|
6211
6655
|
if (typeof value === "object") {
|
|
@@ -6218,20 +6662,20 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
6218
6662
|
};
|
|
6219
6663
|
|
|
6220
6664
|
// src/styles-inheritance/components/infotip/breakpoint-icon.tsx
|
|
6221
|
-
var
|
|
6665
|
+
var React96 = __toESM(require("react"));
|
|
6222
6666
|
var import_editor_responsive4 = require("@elementor/editor-responsive");
|
|
6223
|
-
var
|
|
6224
|
-
var
|
|
6667
|
+
var import_icons32 = require("@elementor/icons");
|
|
6668
|
+
var import_ui46 = require("@elementor/ui");
|
|
6225
6669
|
var SIZE4 = "tiny";
|
|
6226
6670
|
var DEFAULT_BREAKPOINT3 = "desktop";
|
|
6227
6671
|
var breakpointIconMap = {
|
|
6228
|
-
widescreen:
|
|
6229
|
-
desktop:
|
|
6230
|
-
laptop:
|
|
6231
|
-
tablet_extra:
|
|
6232
|
-
tablet:
|
|
6233
|
-
mobile_extra:
|
|
6234
|
-
mobile:
|
|
6672
|
+
widescreen: import_icons32.WidescreenIcon,
|
|
6673
|
+
desktop: import_icons32.DesktopIcon,
|
|
6674
|
+
laptop: import_icons32.LaptopIcon,
|
|
6675
|
+
tablet_extra: import_icons32.TabletLandscapeIcon,
|
|
6676
|
+
tablet: import_icons32.TabletPortraitIcon,
|
|
6677
|
+
mobile_extra: import_icons32.MobileLandscapeIcon,
|
|
6678
|
+
mobile: import_icons32.MobilePortraitIcon
|
|
6235
6679
|
};
|
|
6236
6680
|
var BreakpointIcon = ({ breakpoint }) => {
|
|
6237
6681
|
const breakpoints = (0, import_editor_responsive4.useBreakpoints)();
|
|
@@ -6241,21 +6685,21 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
6241
6685
|
return null;
|
|
6242
6686
|
}
|
|
6243
6687
|
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
6244
|
-
return /* @__PURE__ */
|
|
6688
|
+
return /* @__PURE__ */ React96.createElement(import_ui46.Tooltip, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React96.createElement(IconComponent, { fontSize: SIZE4, sx: { mt: "2px" } }));
|
|
6245
6689
|
};
|
|
6246
6690
|
|
|
6247
6691
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
6248
|
-
var
|
|
6692
|
+
var React97 = __toESM(require("react"));
|
|
6249
6693
|
var import_editor_styles_repository16 = require("@elementor/editor-styles-repository");
|
|
6250
|
-
var
|
|
6251
|
-
var
|
|
6252
|
-
var
|
|
6694
|
+
var import_icons33 = require("@elementor/icons");
|
|
6695
|
+
var import_ui47 = require("@elementor/ui");
|
|
6696
|
+
var import_i18n70 = require("@wordpress/i18n");
|
|
6253
6697
|
var SIZE5 = "tiny";
|
|
6254
6698
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
6255
6699
|
const isBaseStyle = provider === import_editor_styles_repository16.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
6256
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */
|
|
6257
|
-
return /* @__PURE__ */
|
|
6258
|
-
|
|
6700
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React97.createElement(import_ui47.Tooltip, { title: (0, import_i18n70.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React97.createElement(import_icons33.InfoCircleIcon, { fontSize: SIZE5 })) : void 0;
|
|
6701
|
+
return /* @__PURE__ */ React97.createElement(
|
|
6702
|
+
import_ui47.Chip,
|
|
6259
6703
|
{
|
|
6260
6704
|
label: displayLabel,
|
|
6261
6705
|
size: SIZE5,
|
|
@@ -6280,11 +6724,11 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
6280
6724
|
};
|
|
6281
6725
|
|
|
6282
6726
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
6283
|
-
var
|
|
6284
|
-
var
|
|
6727
|
+
var React98 = __toESM(require("react"));
|
|
6728
|
+
var import_ui48 = require("@elementor/ui");
|
|
6285
6729
|
var ValueComponent = ({ index, value }) => {
|
|
6286
|
-
return /* @__PURE__ */
|
|
6287
|
-
|
|
6730
|
+
return /* @__PURE__ */ React98.createElement(import_ui48.Tooltip, { title: value, placement: "top" }, /* @__PURE__ */ React98.createElement(
|
|
6731
|
+
import_ui48.Typography,
|
|
6288
6732
|
{
|
|
6289
6733
|
variant: "caption",
|
|
6290
6734
|
color: "text.tertiary",
|
|
@@ -6305,9 +6749,9 @@ var ValueComponent = ({ index, value }) => {
|
|
|
6305
6749
|
};
|
|
6306
6750
|
|
|
6307
6751
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
6308
|
-
var
|
|
6309
|
-
var
|
|
6310
|
-
var ActionIcons = () => /* @__PURE__ */
|
|
6752
|
+
var React99 = __toESM(require("react"));
|
|
6753
|
+
var import_ui49 = require("@elementor/ui");
|
|
6754
|
+
var ActionIcons = () => /* @__PURE__ */ React99.createElement(import_ui49.Box, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
6311
6755
|
|
|
6312
6756
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6313
6757
|
var SECTION_PADDING_INLINE = 32;
|
|
@@ -6320,8 +6764,8 @@ var StylesInheritanceInfotip = ({
|
|
|
6320
6764
|
children,
|
|
6321
6765
|
isDisabled
|
|
6322
6766
|
}) => {
|
|
6323
|
-
const [showInfotip, setShowInfotip] = (0,
|
|
6324
|
-
const triggerRef = (0,
|
|
6767
|
+
const [showInfotip, setShowInfotip] = (0, import_react47.useState)(false);
|
|
6768
|
+
const triggerRef = (0, import_react47.useRef)(null);
|
|
6325
6769
|
const toggleInfotip = () => {
|
|
6326
6770
|
if (isDisabled) {
|
|
6327
6771
|
return;
|
|
@@ -6336,15 +6780,15 @@ var StylesInheritanceInfotip = ({
|
|
|
6336
6780
|
};
|
|
6337
6781
|
const key = path.join(".");
|
|
6338
6782
|
const sectionWidth = (0, import_editor_ui11.useSectionWidth)();
|
|
6339
|
-
const resolve = (0,
|
|
6783
|
+
const resolve = (0, import_react47.useMemo)(() => {
|
|
6340
6784
|
return (0, import_editor_canvas5.createPropsResolver)({
|
|
6341
6785
|
transformers: import_editor_canvas5.stylesInheritanceTransformersRegistry,
|
|
6342
6786
|
schema: { [key]: propType }
|
|
6343
6787
|
});
|
|
6344
6788
|
}, [key, propType]);
|
|
6345
6789
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
6346
|
-
const infotipContent = /* @__PURE__ */
|
|
6347
|
-
|
|
6790
|
+
const infotipContent = /* @__PURE__ */ React100.createElement(import_ui50.ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React100.createElement(
|
|
6791
|
+
import_ui50.Card,
|
|
6348
6792
|
{
|
|
6349
6793
|
elevation: 0,
|
|
6350
6794
|
sx: {
|
|
@@ -6356,8 +6800,8 @@ var StylesInheritanceInfotip = ({
|
|
|
6356
6800
|
flexDirection: "column"
|
|
6357
6801
|
}
|
|
6358
6802
|
},
|
|
6359
|
-
/* @__PURE__ */
|
|
6360
|
-
|
|
6803
|
+
/* @__PURE__ */ React100.createElement(
|
|
6804
|
+
import_ui50.Box,
|
|
6361
6805
|
{
|
|
6362
6806
|
sx: {
|
|
6363
6807
|
position: "sticky",
|
|
@@ -6366,10 +6810,10 @@ var StylesInheritanceInfotip = ({
|
|
|
6366
6810
|
backgroundColor: "background.paper"
|
|
6367
6811
|
}
|
|
6368
6812
|
},
|
|
6369
|
-
/* @__PURE__ */
|
|
6813
|
+
/* @__PURE__ */ React100.createElement(import_editor_ui11.PopoverHeader, { title: (0, import_i18n71.__)("Style origin", "elementor"), onClose: closeInfotip })
|
|
6370
6814
|
),
|
|
6371
|
-
/* @__PURE__ */
|
|
6372
|
-
|
|
6815
|
+
/* @__PURE__ */ React100.createElement(
|
|
6816
|
+
import_ui50.CardContent,
|
|
6373
6817
|
{
|
|
6374
6818
|
sx: {
|
|
6375
6819
|
display: "flex",
|
|
@@ -6382,39 +6826,39 @@ var StylesInheritanceInfotip = ({
|
|
|
6382
6826
|
}
|
|
6383
6827
|
}
|
|
6384
6828
|
},
|
|
6385
|
-
/* @__PURE__ */
|
|
6386
|
-
return /* @__PURE__ */
|
|
6387
|
-
|
|
6829
|
+
/* @__PURE__ */ React100.createElement(import_ui50.Stack, { gap: 1.5, sx: { pl: 2, pr: 1, pt: 1.5, pb: 1.5 }, role: "list" }, items3.map((item, index) => {
|
|
6830
|
+
return /* @__PURE__ */ React100.createElement(
|
|
6831
|
+
import_ui50.Box,
|
|
6388
6832
|
{
|
|
6389
6833
|
key: item.id,
|
|
6390
6834
|
display: "flex",
|
|
6391
6835
|
gap: 0.5,
|
|
6392
6836
|
role: "listitem",
|
|
6393
|
-
"aria-label": (0,
|
|
6837
|
+
"aria-label": (0, import_i18n71.__)("Inheritance item: %s", "elementor").replace(
|
|
6394
6838
|
"%s",
|
|
6395
6839
|
item.displayLabel
|
|
6396
6840
|
)
|
|
6397
6841
|
},
|
|
6398
|
-
/* @__PURE__ */
|
|
6399
|
-
|
|
6842
|
+
/* @__PURE__ */ React100.createElement(
|
|
6843
|
+
import_ui50.Box,
|
|
6400
6844
|
{
|
|
6401
6845
|
display: "flex",
|
|
6402
6846
|
gap: 0.5,
|
|
6403
6847
|
sx: { flexWrap: "wrap", width: "100%", alignItems: "flex-start" }
|
|
6404
6848
|
},
|
|
6405
|
-
/* @__PURE__ */
|
|
6406
|
-
/* @__PURE__ */
|
|
6407
|
-
/* @__PURE__ */
|
|
6849
|
+
/* @__PURE__ */ React100.createElement(BreakpointIcon, { breakpoint: item.breakpoint }),
|
|
6850
|
+
/* @__PURE__ */ React100.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }),
|
|
6851
|
+
/* @__PURE__ */ React100.createElement(ValueComponent, { index, value: item.value })
|
|
6408
6852
|
),
|
|
6409
|
-
/* @__PURE__ */
|
|
6853
|
+
/* @__PURE__ */ React100.createElement(ActionIcons, null)
|
|
6410
6854
|
);
|
|
6411
6855
|
}))
|
|
6412
6856
|
)
|
|
6413
6857
|
));
|
|
6414
6858
|
if (isDisabled) {
|
|
6415
|
-
return /* @__PURE__ */
|
|
6859
|
+
return /* @__PURE__ */ React100.createElement(import_ui50.Box, { sx: { display: "inline-flex" } }, children);
|
|
6416
6860
|
}
|
|
6417
|
-
return /* @__PURE__ */
|
|
6861
|
+
return /* @__PURE__ */ React100.createElement(import_ui50.Box, { ref: triggerRef, sx: { display: "inline-flex" } }, /* @__PURE__ */ React100.createElement(
|
|
6418
6862
|
TooltipOrInfotip,
|
|
6419
6863
|
{
|
|
6420
6864
|
showInfotip,
|
|
@@ -6422,8 +6866,8 @@ var StylesInheritanceInfotip = ({
|
|
|
6422
6866
|
infotipContent,
|
|
6423
6867
|
isDisabled
|
|
6424
6868
|
},
|
|
6425
|
-
/* @__PURE__ */
|
|
6426
|
-
|
|
6869
|
+
/* @__PURE__ */ React100.createElement(
|
|
6870
|
+
import_ui50.IconButton,
|
|
6427
6871
|
{
|
|
6428
6872
|
onClick: toggleInfotip,
|
|
6429
6873
|
"aria-label": label,
|
|
@@ -6442,11 +6886,11 @@ function TooltipOrInfotip({
|
|
|
6442
6886
|
isDisabled
|
|
6443
6887
|
}) {
|
|
6444
6888
|
if (isDisabled) {
|
|
6445
|
-
return /* @__PURE__ */
|
|
6889
|
+
return /* @__PURE__ */ React100.createElement(import_ui50.Box, { sx: { display: "inline-flex" } }, children);
|
|
6446
6890
|
}
|
|
6447
6891
|
if (showInfotip) {
|
|
6448
|
-
return /* @__PURE__ */
|
|
6449
|
-
|
|
6892
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(
|
|
6893
|
+
import_ui50.Backdrop,
|
|
6450
6894
|
{
|
|
6451
6895
|
open: showInfotip,
|
|
6452
6896
|
onClick: onClose,
|
|
@@ -6455,8 +6899,8 @@ function TooltipOrInfotip({
|
|
|
6455
6899
|
zIndex: (theme) => theme.zIndex.modal - 1
|
|
6456
6900
|
}
|
|
6457
6901
|
}
|
|
6458
|
-
), /* @__PURE__ */
|
|
6459
|
-
|
|
6902
|
+
), /* @__PURE__ */ React100.createElement(
|
|
6903
|
+
import_ui50.Infotip,
|
|
6460
6904
|
{
|
|
6461
6905
|
placement: "top-end",
|
|
6462
6906
|
content: infotipContent,
|
|
@@ -6467,20 +6911,20 @@ function TooltipOrInfotip({
|
|
|
6467
6911
|
children
|
|
6468
6912
|
));
|
|
6469
6913
|
}
|
|
6470
|
-
return /* @__PURE__ */
|
|
6914
|
+
return /* @__PURE__ */ React100.createElement(import_ui50.Tooltip, { title: (0, import_i18n71.__)("Style origin", "elementor"), placement: "top" }, children);
|
|
6471
6915
|
}
|
|
6472
6916
|
|
|
6473
6917
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6474
6918
|
var StylesInheritanceIndicator = ({
|
|
6475
6919
|
customContext
|
|
6476
6920
|
}) => {
|
|
6477
|
-
const context = (0,
|
|
6921
|
+
const context = (0, import_editor_controls67.useBoundProp)();
|
|
6478
6922
|
const { path, propType } = customContext || context;
|
|
6479
6923
|
const inheritanceChain = useStylesInheritanceChain(path);
|
|
6480
6924
|
if (!path || !inheritanceChain.length) {
|
|
6481
6925
|
return null;
|
|
6482
6926
|
}
|
|
6483
|
-
return /* @__PURE__ */
|
|
6927
|
+
return /* @__PURE__ */ React101.createElement(Indicator, { inheritanceChain, path, propType });
|
|
6484
6928
|
};
|
|
6485
6929
|
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
6486
6930
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
@@ -6496,7 +6940,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6496
6940
|
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
6497
6941
|
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
6498
6942
|
};
|
|
6499
|
-
return /* @__PURE__ */
|
|
6943
|
+
return /* @__PURE__ */ React101.createElement(
|
|
6500
6944
|
StylesInheritanceInfotip,
|
|
6501
6945
|
{
|
|
6502
6946
|
inheritanceChain,
|
|
@@ -6505,17 +6949,17 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6505
6949
|
label,
|
|
6506
6950
|
isDisabled
|
|
6507
6951
|
},
|
|
6508
|
-
/* @__PURE__ */
|
|
6952
|
+
/* @__PURE__ */ React101.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
6509
6953
|
);
|
|
6510
6954
|
};
|
|
6511
6955
|
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
6512
6956
|
if (isFinalValue) {
|
|
6513
|
-
return (0,
|
|
6957
|
+
return (0, import_i18n72.__)("This is the final value", "elementor");
|
|
6514
6958
|
}
|
|
6515
6959
|
if (hasValue) {
|
|
6516
|
-
return (0,
|
|
6960
|
+
return (0, import_i18n72.__)("This value is overridden by another style", "elementor");
|
|
6517
6961
|
}
|
|
6518
|
-
return (0,
|
|
6962
|
+
return (0, import_i18n72.__)("This has value from another style", "elementor");
|
|
6519
6963
|
};
|
|
6520
6964
|
|
|
6521
6965
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -6536,7 +6980,7 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
6536
6980
|
]);
|
|
6537
6981
|
|
|
6538
6982
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
6539
|
-
var
|
|
6983
|
+
var React102 = __toESM(require("react"));
|
|
6540
6984
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
6541
6985
|
var arrayTransformer = (0, import_editor_canvas6.createTransformer)((values) => {
|
|
6542
6986
|
if (!values || values.length === 0) {
|
|
@@ -6546,18 +6990,18 @@ var arrayTransformer = (0, import_editor_canvas6.createTransformer)((values) =>
|
|
|
6546
6990
|
if (allStrings) {
|
|
6547
6991
|
return values.join(" ");
|
|
6548
6992
|
}
|
|
6549
|
-
return /* @__PURE__ */
|
|
6993
|
+
return /* @__PURE__ */ React102.createElement(React102.Fragment, null, values.map((item, index) => /* @__PURE__ */ React102.createElement(React102.Fragment, { key: index }, index > 0 && " ", item)));
|
|
6550
6994
|
});
|
|
6551
6995
|
|
|
6552
6996
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
6553
|
-
var
|
|
6997
|
+
var React103 = __toESM(require("react"));
|
|
6554
6998
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
6555
|
-
var
|
|
6556
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */
|
|
6999
|
+
var import_ui51 = require("@elementor/ui");
|
|
7000
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React103.createElement(import_ui51.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React103.createElement(ItemLabelColor, { value })));
|
|
6557
7001
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
6558
|
-
return /* @__PURE__ */
|
|
7002
|
+
return /* @__PURE__ */ React103.createElement("span", null, color);
|
|
6559
7003
|
};
|
|
6560
|
-
var StyledUnstableColorIndicator = (0,
|
|
7004
|
+
var StyledUnstableColorIndicator = (0, import_ui51.styled)(import_ui51.UnstableColorIndicator)(({ theme }) => ({
|
|
6561
7005
|
width: "1em",
|
|
6562
7006
|
height: "1em",
|
|
6563
7007
|
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
@@ -6566,20 +7010,20 @@ var StyledUnstableColorIndicator = (0, import_ui45.styled)(import_ui45.UnstableC
|
|
|
6566
7010
|
}));
|
|
6567
7011
|
|
|
6568
7012
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
6569
|
-
var
|
|
7013
|
+
var React104 = __toESM(require("react"));
|
|
6570
7014
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
6571
|
-
var
|
|
6572
|
-
var
|
|
6573
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas8.createTransformer)((value) => /* @__PURE__ */
|
|
7015
|
+
var import_ui52 = require("@elementor/ui");
|
|
7016
|
+
var import_i18n73 = require("@wordpress/i18n");
|
|
7017
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas8.createTransformer)((value) => /* @__PURE__ */ React104.createElement(import_ui52.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React104.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React104.createElement(ItemLabelGradient, { value })));
|
|
6574
7018
|
var ItemIconGradient = ({ value }) => {
|
|
6575
7019
|
const gradient = getGradientValue(value);
|
|
6576
|
-
return /* @__PURE__ */
|
|
7020
|
+
return /* @__PURE__ */ React104.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
6577
7021
|
};
|
|
6578
7022
|
var ItemLabelGradient = ({ value }) => {
|
|
6579
7023
|
if (value.type === "linear") {
|
|
6580
|
-
return /* @__PURE__ */
|
|
7024
|
+
return /* @__PURE__ */ React104.createElement("span", null, (0, import_i18n73.__)("Linear gradient", "elementor"));
|
|
6581
7025
|
}
|
|
6582
|
-
return /* @__PURE__ */
|
|
7026
|
+
return /* @__PURE__ */ React104.createElement("span", null, (0, import_i18n73.__)("Radial gradient", "elementor"));
|
|
6583
7027
|
};
|
|
6584
7028
|
var getGradientValue = (gradient) => {
|
|
6585
7029
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -6590,16 +7034,16 @@ var getGradientValue = (gradient) => {
|
|
|
6590
7034
|
};
|
|
6591
7035
|
|
|
6592
7036
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
6593
|
-
var
|
|
7037
|
+
var React105 = __toESM(require("react"));
|
|
6594
7038
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
6595
7039
|
var import_editor_ui12 = require("@elementor/editor-ui");
|
|
6596
|
-
var
|
|
7040
|
+
var import_ui53 = require("@elementor/ui");
|
|
6597
7041
|
var import_wp_media = require("@elementor/wp-media");
|
|
6598
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas9.createTransformer)((value) => /* @__PURE__ */
|
|
7042
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas9.createTransformer)((value) => /* @__PURE__ */ React105.createElement(import_ui53.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React105.createElement(ItemIconImage, { value }), /* @__PURE__ */ React105.createElement(ItemLabelImage, { value })));
|
|
6599
7043
|
var ItemIconImage = ({ value }) => {
|
|
6600
7044
|
const { imageUrl } = useImage(value);
|
|
6601
|
-
return /* @__PURE__ */
|
|
6602
|
-
|
|
7045
|
+
return /* @__PURE__ */ React105.createElement(
|
|
7046
|
+
import_ui53.CardMedia,
|
|
6603
7047
|
{
|
|
6604
7048
|
image: imageUrl,
|
|
6605
7049
|
sx: (theme) => ({
|
|
@@ -6614,7 +7058,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
6614
7058
|
};
|
|
6615
7059
|
var ItemLabelImage = ({ value }) => {
|
|
6616
7060
|
const { imageTitle } = useImage(value);
|
|
6617
|
-
return /* @__PURE__ */
|
|
7061
|
+
return /* @__PURE__ */ React105.createElement(import_editor_ui12.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React105.createElement("span", null, imageTitle));
|
|
6618
7062
|
};
|
|
6619
7063
|
var useImage = (image) => {
|
|
6620
7064
|
let imageTitle, imageUrl = null;
|
|
@@ -6639,7 +7083,7 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
6639
7083
|
};
|
|
6640
7084
|
|
|
6641
7085
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
6642
|
-
var
|
|
7086
|
+
var React106 = __toESM(require("react"));
|
|
6643
7087
|
var import_editor_canvas10 = require("@elementor/editor-canvas");
|
|
6644
7088
|
var boxShadowTransformer = (0, import_editor_canvas10.createTransformer)((value) => {
|
|
6645
7089
|
if (!value) {
|
|
@@ -6649,20 +7093,20 @@ var boxShadowTransformer = (0, import_editor_canvas10.createTransformer)((value)
|
|
|
6649
7093
|
const colorValue = color || "#000000";
|
|
6650
7094
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
6651
7095
|
const positionValue = position || "outset";
|
|
6652
|
-
return /* @__PURE__ */
|
|
7096
|
+
return /* @__PURE__ */ React106.createElement(React106.Fragment, null, colorValue, " ", positionValue, ", ", sizes);
|
|
6653
7097
|
});
|
|
6654
7098
|
|
|
6655
7099
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
6656
|
-
var
|
|
7100
|
+
var React107 = __toESM(require("react"));
|
|
6657
7101
|
var import_editor_canvas11 = require("@elementor/editor-canvas");
|
|
6658
|
-
var
|
|
7102
|
+
var import_ui54 = require("@elementor/ui");
|
|
6659
7103
|
function isValidCSSColor(value) {
|
|
6660
7104
|
if (!value.trim()) {
|
|
6661
7105
|
return false;
|
|
6662
7106
|
}
|
|
6663
7107
|
return CSS.supports("color", value.trim());
|
|
6664
7108
|
}
|
|
6665
|
-
var StyledColorIndicator = (0,
|
|
7109
|
+
var StyledColorIndicator = (0, import_ui54.styled)(import_ui54.UnstableColorIndicator)(({ theme }) => ({
|
|
6666
7110
|
width: "1em",
|
|
6667
7111
|
height: "1em",
|
|
6668
7112
|
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
@@ -6673,14 +7117,14 @@ var colorTransformer = (0, import_editor_canvas11.createTransformer)((value) =>
|
|
|
6673
7117
|
if (!isValidCSSColor(value)) {
|
|
6674
7118
|
return value;
|
|
6675
7119
|
}
|
|
6676
|
-
return /* @__PURE__ */
|
|
7120
|
+
return /* @__PURE__ */ React107.createElement(import_ui54.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React107.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React107.createElement("span", null, value));
|
|
6677
7121
|
});
|
|
6678
7122
|
|
|
6679
7123
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|
|
6680
7124
|
var import_editor_canvas12 = require("@elementor/editor-canvas");
|
|
6681
7125
|
var createRepeaterToItemsTransformer = (originalTransformer) => {
|
|
6682
|
-
return (0, import_editor_canvas12.createTransformer)((value,
|
|
6683
|
-
const stringResult = originalTransformer(value,
|
|
7126
|
+
return (0, import_editor_canvas12.createTransformer)((value, options13) => {
|
|
7127
|
+
const stringResult = originalTransformer(value, options13);
|
|
6684
7128
|
if (!stringResult || typeof stringResult !== "string") {
|
|
6685
7129
|
return stringResult;
|
|
6686
7130
|
}
|
|
@@ -6756,7 +7200,7 @@ function init4() {
|
|
|
6756
7200
|
init();
|
|
6757
7201
|
}
|
|
6758
7202
|
var blockV1Panel = () => {
|
|
6759
|
-
(0,
|
|
7203
|
+
(0, import_editor_v1_adapters13.blockCommand)({
|
|
6760
7204
|
command: "panel/editor/open",
|
|
6761
7205
|
condition: isAtomicWidgetSelected
|
|
6762
7206
|
});
|