@elementor/editor-editing-panel 3.32.0-22 → 3.32.0-24
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 +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +856 -852
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +770 -769
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -19
- package/src/components/custom-css.tsx +6 -8
- package/src/index.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -30,7 +30,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
CustomCss: () => CustomCss,
|
|
33
34
|
PopoverBody: () => PopoverBody,
|
|
35
|
+
SectionContent: () => SectionContent,
|
|
34
36
|
controlActionsMenu: () => controlActionsMenu,
|
|
35
37
|
init: () => init3,
|
|
36
38
|
injectIntoClassSelectorActions: () => injectIntoClassSelectorActions,
|
|
@@ -38,14 +40,15 @@ __export(index_exports, {
|
|
|
38
40
|
registerControlReplacement: () => registerControlReplacement,
|
|
39
41
|
registerStyleProviderToColors: () => registerStyleProviderToColors,
|
|
40
42
|
stylesInheritanceTransformersRegistry: () => stylesInheritanceTransformersRegistry,
|
|
41
|
-
useBoundProp: () =>
|
|
43
|
+
useBoundProp: () => import_editor_controls62.useBoundProp,
|
|
44
|
+
useCustomCss: () => useCustomCss,
|
|
42
45
|
useFontFamilies: () => useFontFamilies,
|
|
43
46
|
usePanelActions: () => usePanelActions,
|
|
44
47
|
usePanelStatus: () => usePanelStatus,
|
|
45
48
|
useSectionWidth: () => useSectionWidth
|
|
46
49
|
});
|
|
47
50
|
module.exports = __toCommonJS(index_exports);
|
|
48
|
-
var
|
|
51
|
+
var import_editor_controls62 = require("@elementor/editor-controls");
|
|
49
52
|
|
|
50
53
|
// src/components/css-classes/css-class-convert-local.tsx
|
|
51
54
|
var React4 = __toESM(require("react"));
|
|
@@ -1273,140 +1276,432 @@ var PopoverBody = (props) => {
|
|
|
1273
1276
|
return /* @__PURE__ */ React11.createElement(import_editor_ui4.PopoverBody, { ...props, width: sectionWidth });
|
|
1274
1277
|
};
|
|
1275
1278
|
|
|
1276
|
-
// src/components/
|
|
1277
|
-
var
|
|
1279
|
+
// src/components/section-content.tsx
|
|
1280
|
+
var React12 = __toESM(require("react"));
|
|
1281
|
+
var import_ui8 = require("@elementor/ui");
|
|
1282
|
+
var SectionContent = ({ gap = 2, sx, children }) => /* @__PURE__ */ React12.createElement(import_ui8.Stack, { gap, sx: { ...sx } }, children);
|
|
1283
|
+
|
|
1284
|
+
// src/components/custom-css.tsx
|
|
1285
|
+
var React13 = __toESM(require("react"));
|
|
1286
|
+
var import_editor_controls = require("@elementor/editor-controls");
|
|
1287
|
+
|
|
1288
|
+
// src/hooks/use-custom-css.ts
|
|
1289
|
+
var import_react14 = require("react");
|
|
1290
|
+
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
1291
|
+
var import_editor_props3 = require("@elementor/editor-props");
|
|
1292
|
+
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1293
|
+
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
1294
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
1295
|
+
var import_utils2 = require("@elementor/utils");
|
|
1296
|
+
|
|
1297
|
+
// src/hooks/use-styles-fields.ts
|
|
1298
|
+
var import_react13 = require("react");
|
|
1299
|
+
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
1300
|
+
var import_editor_styles = require("@elementor/editor-styles");
|
|
1301
|
+
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
1302
|
+
var import_editor_styles_repository9 = require("@elementor/editor-styles-repository");
|
|
1303
|
+
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
1278
1304
|
var import_i18n6 = require("@wordpress/i18n");
|
|
1279
1305
|
|
|
1280
|
-
// src/
|
|
1281
|
-
var
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
const extendedWindow = window;
|
|
1287
|
-
return extendedWindow.elementorFrontend?.config ?? {};
|
|
1306
|
+
// src/hooks/use-styles-rerender.ts
|
|
1307
|
+
var import_react12 = require("react");
|
|
1308
|
+
var useStylesRerender = () => {
|
|
1309
|
+
const { provider } = useStyle();
|
|
1310
|
+
const [, reRender] = (0, import_react12.useReducer)((p) => !p, false);
|
|
1311
|
+
(0, import_react12.useEffect)(() => provider?.subscribe(reRender), [provider]);
|
|
1288
1312
|
};
|
|
1289
1313
|
|
|
1290
|
-
// src/
|
|
1291
|
-
var
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
};
|
|
1296
|
-
|
|
1297
|
-
const {
|
|
1298
|
-
|
|
1299
|
-
|
|
1314
|
+
// src/hooks/use-styles-fields.ts
|
|
1315
|
+
var HISTORY_DEBOUNCE_WAIT = 800;
|
|
1316
|
+
function useStylesFields(propNames) {
|
|
1317
|
+
const {
|
|
1318
|
+
element: { id: elementId }
|
|
1319
|
+
} = useElement();
|
|
1320
|
+
const { id: styleId, meta, provider, canEdit } = useStyle();
|
|
1321
|
+
const undoableUpdateStyle = useUndoableActions({ elementId, meta });
|
|
1322
|
+
useStylesRerender();
|
|
1323
|
+
const values = getProps({ elementId, styleId, provider, meta, propNames });
|
|
1324
|
+
const setValues = (props, { history: { propDisplayName } }) => {
|
|
1325
|
+
if (!styleId) {
|
|
1326
|
+
undoableUpdateStyle({ styleId: null, provider: null, props, propDisplayName });
|
|
1327
|
+
} else {
|
|
1328
|
+
undoableUpdateStyle({ styleId, provider, props, propDisplayName });
|
|
1329
|
+
}
|
|
1330
|
+
};
|
|
1331
|
+
return { values, setValues, canEdit };
|
|
1332
|
+
}
|
|
1333
|
+
function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
1334
|
+
if (!provider || !styleId) {
|
|
1300
1335
|
return null;
|
|
1301
1336
|
}
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1337
|
+
const style = provider.actions.get(styleId, { elementId });
|
|
1338
|
+
if (!style) {
|
|
1339
|
+
throw new StyleNotFoundUnderProviderError({ context: { styleId, providerKey: provider.getKey() } });
|
|
1340
|
+
}
|
|
1341
|
+
const variant = (0, import_editor_styles.getVariantByMeta)(style, meta);
|
|
1342
|
+
return Object.fromEntries(
|
|
1343
|
+
propNames.map((key) => [key, variant?.props[key] ?? null])
|
|
1344
|
+
);
|
|
1345
|
+
}
|
|
1346
|
+
function useUndoableActions({
|
|
1347
|
+
elementId,
|
|
1348
|
+
meta: { breakpoint, state }
|
|
1349
|
+
}) {
|
|
1350
|
+
const classesProp = useClassesProp();
|
|
1351
|
+
return (0, import_react13.useMemo)(() => {
|
|
1352
|
+
const meta = { breakpoint, state };
|
|
1353
|
+
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository9.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
1354
|
+
return (0, import_editor_v1_adapters2.undoable)(
|
|
1355
|
+
{
|
|
1356
|
+
do: (payload) => {
|
|
1357
|
+
if ((0, import_editor_elements4.shouldCreateNewLocalStyle)(payload)) {
|
|
1358
|
+
return create(payload);
|
|
1359
|
+
}
|
|
1360
|
+
return update(payload);
|
|
1361
|
+
},
|
|
1362
|
+
undo: (payload, doReturn) => {
|
|
1363
|
+
const wasLocalStyleCreated = (0, import_editor_elements4.shouldCreateNewLocalStyle)(payload);
|
|
1364
|
+
if (wasLocalStyleCreated) {
|
|
1365
|
+
return undoCreate(payload, doReturn);
|
|
1366
|
+
}
|
|
1367
|
+
return undo(payload, doReturn);
|
|
1368
|
+
},
|
|
1369
|
+
redo: (payload, doReturn) => {
|
|
1370
|
+
const wasLocalStyleCreated = (0, import_editor_elements4.shouldCreateNewLocalStyle)(payload);
|
|
1371
|
+
if (wasLocalStyleCreated) {
|
|
1372
|
+
return create(payload, doReturn);
|
|
1373
|
+
}
|
|
1374
|
+
return update(payload);
|
|
1375
|
+
}
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
title: ({ provider, styleId }) => getTitle({ provider, styleId, elementId }),
|
|
1379
|
+
subtitle: ({ provider, styleId, propDisplayName }) => getSubtitle({ provider, styleId, elementId, propDisplayName }),
|
|
1380
|
+
debounce: { wait: HISTORY_DEBOUNCE_WAIT }
|
|
1311
1381
|
}
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1382
|
+
);
|
|
1383
|
+
function create({ props }, redoArgs) {
|
|
1384
|
+
const createdStyle = (0, import_editor_elements4.createElementStyle)({ ...createStyleArgs, props, styleId: redoArgs?.createdStyleId });
|
|
1385
|
+
return { createdStyleId: createdStyle };
|
|
1386
|
+
}
|
|
1387
|
+
function undoCreate(_, { createdStyleId }) {
|
|
1388
|
+
(0, import_editor_elements4.deleteElementStyle)(elementId, createdStyleId);
|
|
1389
|
+
}
|
|
1390
|
+
function update({ provider, styleId, props }) {
|
|
1391
|
+
if (!provider.actions.updateProps) {
|
|
1392
|
+
throw new StylesProviderCannotUpdatePropsError({
|
|
1393
|
+
context: { providerKey: provider.getKey() }
|
|
1394
|
+
});
|
|
1318
1395
|
}
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
// src/controls-actions.ts
|
|
1330
|
-
var import_menus = require("@elementor/menus");
|
|
1331
|
-
|
|
1332
|
-
// src/action.tsx
|
|
1333
|
-
var React12 = __toESM(require("react"));
|
|
1334
|
-
var import_ui8 = require("@elementor/ui");
|
|
1335
|
-
var SIZE = "tiny";
|
|
1336
|
-
function Action({ title, visible = true, icon: Icon, onClick }) {
|
|
1337
|
-
if (!visible) {
|
|
1338
|
-
return null;
|
|
1339
|
-
}
|
|
1340
|
-
return /* @__PURE__ */ React12.createElement(import_ui8.Tooltip, { placement: "top", title, arrow: true }, /* @__PURE__ */ React12.createElement(import_ui8.IconButton, { "aria-label": title, size: SIZE, onClick }, /* @__PURE__ */ React12.createElement(Icon, { fontSize: SIZE })));
|
|
1396
|
+
const style = provider.actions.get(styleId, { elementId });
|
|
1397
|
+
const prevProps = getCurrentProps(style, meta);
|
|
1398
|
+
provider.actions.updateProps({ id: styleId, meta, props }, { elementId });
|
|
1399
|
+
return { styleId, provider, prevProps };
|
|
1400
|
+
}
|
|
1401
|
+
function undo(_, { styleId, provider, prevProps }) {
|
|
1402
|
+
provider.actions.updateProps?.({ id: styleId, meta, props: prevProps }, { elementId });
|
|
1403
|
+
}
|
|
1404
|
+
}, [elementId, breakpoint, state, classesProp]);
|
|
1341
1405
|
}
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
1346
|
-
var import_ui9 = require("@elementor/ui");
|
|
1347
|
-
var SIZE2 = "tiny";
|
|
1348
|
-
function PopoverAction({ title, visible = true, icon: Icon, content: PopoverContent }) {
|
|
1349
|
-
const { popupState, triggerProps, popoverProps } = useFloatingActionsPopover();
|
|
1350
|
-
if (!visible) {
|
|
1351
|
-
return null;
|
|
1406
|
+
function getCurrentProps(style, meta) {
|
|
1407
|
+
if (!style) {
|
|
1408
|
+
return {};
|
|
1352
1409
|
}
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
disablePortal: true,
|
|
1357
|
-
disableScrollLock: true,
|
|
1358
|
-
anchorOrigin: {
|
|
1359
|
-
vertical: "bottom",
|
|
1360
|
-
horizontal: "right"
|
|
1361
|
-
},
|
|
1362
|
-
transformOrigin: {
|
|
1363
|
-
vertical: "top",
|
|
1364
|
-
horizontal: "right"
|
|
1365
|
-
},
|
|
1366
|
-
PaperProps: {
|
|
1367
|
-
sx: { my: 2.5 }
|
|
1368
|
-
},
|
|
1369
|
-
...popoverProps
|
|
1370
|
-
},
|
|
1371
|
-
/* @__PURE__ */ React13.createElement(PopoverContent, { close: popupState.close })
|
|
1372
|
-
));
|
|
1410
|
+
const variant = (0, import_editor_styles.getVariantByMeta)(style, meta);
|
|
1411
|
+
const props = variant?.props ?? {};
|
|
1412
|
+
return structuredClone(props);
|
|
1373
1413
|
}
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1414
|
+
var defaultHistoryTitles = {
|
|
1415
|
+
title: ({ provider }) => {
|
|
1416
|
+
const providerLabel = provider.labels?.singular;
|
|
1417
|
+
return providerLabel ? capitalize(providerLabel) : (0, import_i18n6.__)("Style", "elementor");
|
|
1418
|
+
},
|
|
1419
|
+
subtitle: ({ provider, styleId, elementId, propDisplayName }) => {
|
|
1420
|
+
const styleLabel = provider.actions.get(styleId, { elementId })?.label;
|
|
1421
|
+
if (!styleLabel) {
|
|
1422
|
+
throw new Error(`Style ${styleId} not found`);
|
|
1423
|
+
}
|
|
1424
|
+
return (0, import_i18n6.__)(`%s$1 %s$2 edited`, "elementor").replace("%s$1", styleLabel).replace("%s$2", propDisplayName);
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
var localStyleHistoryTitles = {
|
|
1428
|
+
title: ({ elementId }) => (0, import_editor_elements4.getElementLabel)(elementId),
|
|
1429
|
+
subtitle: ({ propDisplayName }) => (
|
|
1430
|
+
// translators: %s is the name of the style property being edited
|
|
1431
|
+
(0, import_i18n6.__)(`%s edited`, "elementor").replace("%s", propDisplayName)
|
|
1432
|
+
)
|
|
1433
|
+
};
|
|
1434
|
+
function capitalize(str) {
|
|
1435
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
1396
1436
|
}
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
PopoverAction
|
|
1437
|
+
var isLocalStyle = (provider, styleId) => !provider || !styleId || (0, import_editor_styles_repository8.isElementsStylesProvider)(provider.getKey());
|
|
1438
|
+
var getTitle = ({ provider, styleId, elementId }) => {
|
|
1439
|
+
const isLocal = isLocalStyle(provider, styleId);
|
|
1440
|
+
if (isLocal) {
|
|
1441
|
+
return localStyleHistoryTitles.title({ elementId });
|
|
1403
1442
|
}
|
|
1404
|
-
});
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1443
|
+
return defaultHistoryTitles.title({ provider });
|
|
1444
|
+
};
|
|
1445
|
+
var getSubtitle = ({ provider, styleId, propDisplayName, elementId }) => {
|
|
1446
|
+
const isLocal = isLocalStyle(provider, styleId);
|
|
1447
|
+
if (isLocal) {
|
|
1448
|
+
return localStyleHistoryTitles.subtitle({ propDisplayName });
|
|
1449
|
+
}
|
|
1450
|
+
return defaultHistoryTitles.subtitle({
|
|
1451
|
+
provider,
|
|
1452
|
+
styleId,
|
|
1453
|
+
elementId,
|
|
1454
|
+
propDisplayName
|
|
1455
|
+
});
|
|
1456
|
+
};
|
|
1457
|
+
|
|
1458
|
+
// src/hooks/use-custom-css.ts
|
|
1459
|
+
var useCustomCss = () => {
|
|
1460
|
+
const {
|
|
1461
|
+
element: { id: elementId }
|
|
1462
|
+
} = useElement();
|
|
1463
|
+
const { id: styleId, meta, provider } = useStyle();
|
|
1464
|
+
const style = provider?.actions.get(styleId, { elementId });
|
|
1465
|
+
const undoableUpdateStyle = useUndoableActions2({ elementId, meta });
|
|
1466
|
+
const currentStyleId = styleId ? styleId : null;
|
|
1467
|
+
const currentProvider = styleId ? provider : null;
|
|
1468
|
+
useStylesRerender();
|
|
1469
|
+
const variant = style ? (0, import_editor_styles2.getVariantByMeta)(style, meta) : null;
|
|
1470
|
+
const setCustomCss = (raw, { history: { propDisplayName } }) => {
|
|
1471
|
+
const newValue = { raw: (0, import_utils2.encodeString)(sanitize(raw)) };
|
|
1472
|
+
undoableUpdateStyle({
|
|
1473
|
+
styleId: currentStyleId,
|
|
1474
|
+
provider: currentProvider,
|
|
1475
|
+
customCss: newValue,
|
|
1476
|
+
propDisplayName
|
|
1477
|
+
});
|
|
1478
|
+
};
|
|
1479
|
+
const customCss = variant?.custom_css?.raw ? { raw: (0, import_utils2.decodeString)(variant.custom_css.raw) } : null;
|
|
1480
|
+
return {
|
|
1481
|
+
customCss,
|
|
1482
|
+
setCustomCss
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
function useUndoableActions2({
|
|
1486
|
+
elementId,
|
|
1487
|
+
meta: { breakpoint, state }
|
|
1488
|
+
}) {
|
|
1489
|
+
const classesProp = useClassesProp();
|
|
1490
|
+
return (0, import_react14.useMemo)(() => {
|
|
1491
|
+
const meta = { breakpoint, state };
|
|
1492
|
+
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository10.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
1493
|
+
return (0, import_editor_v1_adapters3.undoable)(
|
|
1494
|
+
{
|
|
1495
|
+
do: (payload) => {
|
|
1496
|
+
if ((0, import_editor_elements5.shouldCreateNewLocalStyle)(payload)) {
|
|
1497
|
+
return create(payload);
|
|
1498
|
+
}
|
|
1499
|
+
return update(payload);
|
|
1500
|
+
},
|
|
1501
|
+
undo: (payload, doReturn) => {
|
|
1502
|
+
if ((0, import_editor_elements5.shouldCreateNewLocalStyle)(payload)) {
|
|
1503
|
+
return undoCreate(payload, doReturn);
|
|
1504
|
+
}
|
|
1505
|
+
return undoUpdate(payload, doReturn);
|
|
1506
|
+
},
|
|
1507
|
+
redo: (payload, doReturn) => {
|
|
1508
|
+
if ((0, import_editor_elements5.shouldCreateNewLocalStyle)(payload)) {
|
|
1509
|
+
return create(payload, doReturn);
|
|
1510
|
+
}
|
|
1511
|
+
return update(payload);
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
title: ({ provider, styleId }) => getTitle({ provider, styleId, elementId }),
|
|
1516
|
+
subtitle: ({ provider, styleId, propDisplayName }) => getSubtitle({ provider, styleId, elementId, propDisplayName }),
|
|
1517
|
+
debounce: { wait: HISTORY_DEBOUNCE_WAIT }
|
|
1518
|
+
}
|
|
1519
|
+
);
|
|
1520
|
+
function create({ customCss }, redoArgs) {
|
|
1521
|
+
const createdStyle = (0, import_editor_elements5.createElementStyle)({
|
|
1522
|
+
...createStyleArgs,
|
|
1523
|
+
props: {},
|
|
1524
|
+
custom_css: customCss ?? null,
|
|
1525
|
+
styleId: redoArgs?.createdStyleId
|
|
1526
|
+
});
|
|
1527
|
+
return { createdStyleId: createdStyle };
|
|
1528
|
+
}
|
|
1529
|
+
function undoCreate(_, { createdStyleId }) {
|
|
1530
|
+
(0, import_editor_elements5.deleteElementStyle)(elementId, createdStyleId);
|
|
1531
|
+
}
|
|
1532
|
+
function update({ provider, styleId, customCss }) {
|
|
1533
|
+
if (!provider.actions.updateCustomCss) {
|
|
1534
|
+
throw new StylesProviderCannotUpdatePropsError({
|
|
1535
|
+
context: { providerKey: provider.getKey() }
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
const style = provider.actions.get(styleId, { elementId });
|
|
1539
|
+
const prevCustomCss = getCurrentCustomCss(style, meta);
|
|
1540
|
+
provider.actions.updateCustomCss({ id: styleId, meta, custom_css: customCss }, { elementId });
|
|
1541
|
+
return { styleId, provider, prevCustomCss };
|
|
1542
|
+
}
|
|
1543
|
+
function undoUpdate(_, { styleId, provider, prevCustomCss }) {
|
|
1544
|
+
provider.actions.updateCustomCss?.(
|
|
1545
|
+
{ id: styleId, meta, custom_css: prevCustomCss ?? { raw: "" } },
|
|
1546
|
+
{ elementId }
|
|
1547
|
+
);
|
|
1548
|
+
}
|
|
1549
|
+
}, [elementId, breakpoint, state, classesProp]);
|
|
1550
|
+
}
|
|
1551
|
+
function getCurrentCustomCss(style, meta) {
|
|
1552
|
+
if (!style) {
|
|
1553
|
+
return null;
|
|
1554
|
+
}
|
|
1555
|
+
const variant = (0, import_editor_styles2.getVariantByMeta)(style, meta);
|
|
1556
|
+
return variant?.custom_css ?? null;
|
|
1557
|
+
}
|
|
1558
|
+
function sanitize(raw) {
|
|
1559
|
+
return import_editor_props3.stringPropTypeUtil.schema.safeParse(import_editor_props3.stringPropTypeUtil.create(raw)).data?.value?.trim() ?? "";
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
// src/components/custom-css.tsx
|
|
1563
|
+
var CustomCss = () => {
|
|
1564
|
+
const { customCss, setCustomCss } = useCustomCss();
|
|
1565
|
+
const handleChange = (value) => {
|
|
1566
|
+
setCustomCss(value, { history: { propDisplayName: "Custom CSS" } });
|
|
1567
|
+
};
|
|
1568
|
+
return /* @__PURE__ */ React13.createElement(SectionContent, null, /* @__PURE__ */ React13.createElement(import_editor_controls.CssEditor, { value: customCss?.raw || "", onChange: handleChange }));
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1571
|
+
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
1572
|
+
var import_react15 = require("react");
|
|
1573
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
1574
|
+
|
|
1575
|
+
// src/sync/get-elementor-globals.ts
|
|
1576
|
+
var getElementorConfig = () => {
|
|
1577
|
+
const extendedWindow = window;
|
|
1578
|
+
return extendedWindow.elementor?.config ?? {};
|
|
1579
|
+
};
|
|
1580
|
+
var getElementorFrontendConfig = () => {
|
|
1581
|
+
const extendedWindow = window;
|
|
1582
|
+
return extendedWindow.elementorFrontend?.config ?? {};
|
|
1583
|
+
};
|
|
1584
|
+
|
|
1585
|
+
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
1586
|
+
var supportedCategories = {
|
|
1587
|
+
system: (0, import_i18n7.__)("System", "elementor"),
|
|
1588
|
+
custom: (0, import_i18n7.__)("Custom Fonts", "elementor"),
|
|
1589
|
+
googlefonts: (0, import_i18n7.__)("Google Fonts", "elementor")
|
|
1590
|
+
};
|
|
1591
|
+
var getFontFamilies = () => {
|
|
1592
|
+
const { controls } = getElementorConfig();
|
|
1593
|
+
const options12 = controls?.font?.options;
|
|
1594
|
+
if (!options12) {
|
|
1595
|
+
return null;
|
|
1596
|
+
}
|
|
1597
|
+
return options12;
|
|
1598
|
+
};
|
|
1599
|
+
var useFontFamilies = () => {
|
|
1600
|
+
const fontFamilies = getFontFamilies();
|
|
1601
|
+
return (0, import_react15.useMemo)(() => {
|
|
1602
|
+
const categoriesOrder = ["system", "custom", "googlefonts"];
|
|
1603
|
+
return Object.entries(fontFamilies || {}).reduce((acc, [font, category]) => {
|
|
1604
|
+
if (!supportedCategories[category]) {
|
|
1605
|
+
return acc;
|
|
1606
|
+
}
|
|
1607
|
+
const categoryIndex = categoriesOrder.indexOf(category);
|
|
1608
|
+
if (!acc[categoryIndex]) {
|
|
1609
|
+
acc[categoryIndex] = {
|
|
1610
|
+
label: supportedCategories[category],
|
|
1611
|
+
fonts: []
|
|
1612
|
+
};
|
|
1613
|
+
}
|
|
1614
|
+
acc[categoryIndex].fonts.push(font);
|
|
1615
|
+
return acc;
|
|
1616
|
+
}, []).filter(Boolean);
|
|
1617
|
+
}, [fontFamilies]);
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
// src/control-replacement.tsx
|
|
1621
|
+
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
1622
|
+
var { registerControlReplacement, getControlReplacements } = (0, import_editor_controls2.createControlReplacementsRegistry)();
|
|
1623
|
+
|
|
1624
|
+
// src/controls-actions.ts
|
|
1625
|
+
var import_menus = require("@elementor/menus");
|
|
1626
|
+
|
|
1627
|
+
// src/action.tsx
|
|
1628
|
+
var React14 = __toESM(require("react"));
|
|
1629
|
+
var import_ui9 = require("@elementor/ui");
|
|
1630
|
+
var SIZE = "tiny";
|
|
1631
|
+
function Action({ title, visible = true, icon: Icon, onClick }) {
|
|
1632
|
+
if (!visible) {
|
|
1633
|
+
return null;
|
|
1634
|
+
}
|
|
1635
|
+
return /* @__PURE__ */ React14.createElement(import_ui9.Tooltip, { placement: "top", title, arrow: true }, /* @__PURE__ */ React14.createElement(import_ui9.IconButton, { "aria-label": title, size: SIZE, onClick }, /* @__PURE__ */ React14.createElement(Icon, { fontSize: SIZE })));
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
// src/popover-action.tsx
|
|
1639
|
+
var React15 = __toESM(require("react"));
|
|
1640
|
+
var import_editor_controls3 = require("@elementor/editor-controls");
|
|
1641
|
+
var import_ui10 = require("@elementor/ui");
|
|
1642
|
+
var SIZE2 = "tiny";
|
|
1643
|
+
function PopoverAction({ title, visible = true, icon: Icon, content: PopoverContent }) {
|
|
1644
|
+
const { popupState, triggerProps, popoverProps } = useFloatingActionsPopover();
|
|
1645
|
+
if (!visible) {
|
|
1646
|
+
return null;
|
|
1647
|
+
}
|
|
1648
|
+
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(import_ui10.Tooltip, { placement: "top", title }, /* @__PURE__ */ React15.createElement(import_ui10.IconButton, { "aria-label": title, size: SIZE2, ...triggerProps }, /* @__PURE__ */ React15.createElement(Icon, { fontSize: SIZE2 }))), /* @__PURE__ */ React15.createElement(
|
|
1649
|
+
import_ui10.Popover,
|
|
1650
|
+
{
|
|
1651
|
+
disablePortal: true,
|
|
1652
|
+
disableScrollLock: true,
|
|
1653
|
+
anchorOrigin: {
|
|
1654
|
+
vertical: "bottom",
|
|
1655
|
+
horizontal: "right"
|
|
1656
|
+
},
|
|
1657
|
+
transformOrigin: {
|
|
1658
|
+
vertical: "top",
|
|
1659
|
+
horizontal: "right"
|
|
1660
|
+
},
|
|
1661
|
+
PaperProps: {
|
|
1662
|
+
sx: { my: 2.5 }
|
|
1663
|
+
},
|
|
1664
|
+
...popoverProps
|
|
1665
|
+
},
|
|
1666
|
+
/* @__PURE__ */ React15.createElement(PopoverContent, { close: popupState.close })
|
|
1667
|
+
));
|
|
1668
|
+
}
|
|
1669
|
+
function useFloatingActionsPopover() {
|
|
1670
|
+
const { setOpen } = (0, import_editor_controls3.useFloatingActionsBar)();
|
|
1671
|
+
const popupState = (0, import_ui10.usePopupState)({ variant: "popover" });
|
|
1672
|
+
const triggerProps = (0, import_ui10.bindTrigger)(popupState);
|
|
1673
|
+
const popoverProps = (0, import_ui10.bindPopover)(popupState);
|
|
1674
|
+
const onClick = (e) => {
|
|
1675
|
+
triggerProps.onClick(e);
|
|
1676
|
+
setOpen(true);
|
|
1677
|
+
};
|
|
1678
|
+
const onClose = () => {
|
|
1679
|
+
popoverProps.onClose();
|
|
1680
|
+
setOpen(false);
|
|
1681
|
+
};
|
|
1682
|
+
const close = () => {
|
|
1683
|
+
popupState.close();
|
|
1684
|
+
setOpen(false);
|
|
1685
|
+
};
|
|
1686
|
+
return {
|
|
1687
|
+
popupState: { ...popupState, close },
|
|
1688
|
+
triggerProps: { ...triggerProps, onClick },
|
|
1689
|
+
popoverProps: { ...popoverProps, onClose }
|
|
1690
|
+
};
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
// src/controls-actions.ts
|
|
1694
|
+
var controlActionsMenu = (0, import_menus.createMenu)({
|
|
1695
|
+
components: {
|
|
1696
|
+
Action,
|
|
1697
|
+
PopoverAction
|
|
1698
|
+
}
|
|
1699
|
+
});
|
|
1700
|
+
|
|
1701
|
+
// src/init.ts
|
|
1702
|
+
var import_editor = require("@elementor/editor");
|
|
1703
|
+
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
1704
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
1410
1705
|
|
|
1411
1706
|
// src/hooks/use-open-editor-panel.ts
|
|
1412
1707
|
var import_react39 = require("react");
|
|
@@ -1417,43 +1712,43 @@ var import_editor_panels2 = require("@elementor/editor-panels");
|
|
|
1417
1712
|
|
|
1418
1713
|
// src/components/editing-panel.tsx
|
|
1419
1714
|
var React89 = __toESM(require("react"));
|
|
1420
|
-
var
|
|
1715
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
1421
1716
|
var import_editor_elements10 = require("@elementor/editor-elements");
|
|
1422
1717
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
1423
1718
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
1424
1719
|
var import_icons24 = require("@elementor/icons");
|
|
1425
1720
|
var import_session7 = require("@elementor/session");
|
|
1426
|
-
var
|
|
1721
|
+
var import_ui45 = require("@elementor/ui");
|
|
1427
1722
|
var import_i18n61 = require("@wordpress/i18n");
|
|
1428
1723
|
|
|
1429
1724
|
// src/components/editing-panel-error-fallback.tsx
|
|
1430
|
-
var
|
|
1431
|
-
var
|
|
1725
|
+
var React16 = __toESM(require("react"));
|
|
1726
|
+
var import_ui11 = require("@elementor/ui");
|
|
1432
1727
|
function EditorPanelErrorFallback() {
|
|
1433
|
-
return /* @__PURE__ */
|
|
1728
|
+
return /* @__PURE__ */ React16.createElement(import_ui11.Box, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React16.createElement(import_ui11.Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React16.createElement("strong", null, "Something went wrong")));
|
|
1434
1729
|
}
|
|
1435
1730
|
|
|
1436
1731
|
// src/components/editing-panel-tabs.tsx
|
|
1437
1732
|
var React88 = __toESM(require("react"));
|
|
1438
1733
|
var import_react38 = require("react");
|
|
1439
|
-
var
|
|
1734
|
+
var import_ui44 = require("@elementor/ui");
|
|
1440
1735
|
var import_i18n60 = require("@wordpress/i18n");
|
|
1441
1736
|
|
|
1442
1737
|
// src/contexts/scroll-context.tsx
|
|
1443
|
-
var
|
|
1444
|
-
var
|
|
1445
|
-
var
|
|
1446
|
-
var ScrollContext = (0,
|
|
1447
|
-
var ScrollPanel = (0,
|
|
1738
|
+
var React17 = __toESM(require("react"));
|
|
1739
|
+
var import_react16 = require("react");
|
|
1740
|
+
var import_ui12 = require("@elementor/ui");
|
|
1741
|
+
var ScrollContext = (0, import_react16.createContext)(void 0);
|
|
1742
|
+
var ScrollPanel = (0, import_ui12.styled)("div")`
|
|
1448
1743
|
height: 100%;
|
|
1449
1744
|
overflow-y: auto;
|
|
1450
1745
|
`;
|
|
1451
1746
|
var DEFAULT_SCROLL_DIRECTION = "up";
|
|
1452
1747
|
function ScrollProvider({ children }) {
|
|
1453
|
-
const [direction, setDirection] = (0,
|
|
1454
|
-
const ref = (0,
|
|
1455
|
-
const scrollPos = (0,
|
|
1456
|
-
(0,
|
|
1748
|
+
const [direction, setDirection] = (0, import_react16.useState)(DEFAULT_SCROLL_DIRECTION);
|
|
1749
|
+
const ref = (0, import_react16.useRef)(null);
|
|
1750
|
+
const scrollPos = (0, import_react16.useRef)(0);
|
|
1751
|
+
(0, import_react16.useEffect)(() => {
|
|
1457
1752
|
const scrollElement = ref.current;
|
|
1458
1753
|
if (!scrollElement) {
|
|
1459
1754
|
return;
|
|
@@ -1472,14 +1767,14 @@ function ScrollProvider({ children }) {
|
|
|
1472
1767
|
scrollElement.removeEventListener("scroll", handleScroll);
|
|
1473
1768
|
};
|
|
1474
1769
|
});
|
|
1475
|
-
return /* @__PURE__ */
|
|
1770
|
+
return /* @__PURE__ */ React17.createElement(ScrollContext.Provider, { value: { direction } }, /* @__PURE__ */ React17.createElement(ScrollPanel, { ref }, children));
|
|
1476
1771
|
}
|
|
1477
1772
|
function useScrollDirection() {
|
|
1478
|
-
return (0,
|
|
1773
|
+
return (0, import_react16.useContext)(ScrollContext)?.direction ?? DEFAULT_SCROLL_DIRECTION;
|
|
1479
1774
|
}
|
|
1480
1775
|
|
|
1481
1776
|
// src/hooks/use-default-panel-settings.ts
|
|
1482
|
-
var
|
|
1777
|
+
var import_react17 = require("react");
|
|
1483
1778
|
var fallbackEditorSettings = {
|
|
1484
1779
|
defaultSectionsExpanded: {
|
|
1485
1780
|
settings: ["Content", "Settings"],
|
|
@@ -1487,7 +1782,7 @@ var fallbackEditorSettings = {
|
|
|
1487
1782
|
},
|
|
1488
1783
|
defaultTab: "settings"
|
|
1489
1784
|
};
|
|
1490
|
-
var defaultPanelSettingsContext = (0,
|
|
1785
|
+
var defaultPanelSettingsContext = (0, import_react17.createContext)({
|
|
1491
1786
|
"e-div-block": {
|
|
1492
1787
|
defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
|
|
1493
1788
|
defaultTab: "style"
|
|
@@ -1503,18 +1798,18 @@ var defaultPanelSettingsContext = (0, import_react14.createContext)({
|
|
|
1503
1798
|
});
|
|
1504
1799
|
var useDefaultPanelSettings = () => {
|
|
1505
1800
|
const { element } = useElement();
|
|
1506
|
-
const defaults = (0,
|
|
1801
|
+
const defaults = (0, import_react17.useContext)(defaultPanelSettingsContext)[element.type];
|
|
1507
1802
|
return defaults || fallbackEditorSettings;
|
|
1508
1803
|
};
|
|
1509
1804
|
|
|
1510
1805
|
// src/hooks/use-state-by-element.ts
|
|
1511
|
-
var
|
|
1806
|
+
var import_react18 = require("react");
|
|
1512
1807
|
var import_session3 = require("@elementor/session");
|
|
1513
1808
|
var useStateByElement = (key, initialValue) => {
|
|
1514
1809
|
const { element } = useElement();
|
|
1515
1810
|
const lookup = `elementor/editor-state/${element.id}/${key}`;
|
|
1516
1811
|
const storedValue = (0, import_session3.getSessionStorageItem)(lookup);
|
|
1517
|
-
const [value, setValue] = (0,
|
|
1812
|
+
const [value, setValue] = (0, import_react18.useState)(storedValue ?? initialValue);
|
|
1518
1813
|
const doUpdate = (newValue) => {
|
|
1519
1814
|
(0, import_session3.setSessionStorageItem)(lookup, newValue);
|
|
1520
1815
|
setValue(newValue);
|
|
@@ -1523,29 +1818,29 @@ var useStateByElement = (key, initialValue) => {
|
|
|
1523
1818
|
};
|
|
1524
1819
|
|
|
1525
1820
|
// src/components/settings-tab.tsx
|
|
1526
|
-
var
|
|
1527
|
-
var
|
|
1821
|
+
var React24 = __toESM(require("react"));
|
|
1822
|
+
var import_editor_controls6 = require("@elementor/editor-controls");
|
|
1528
1823
|
var import_session4 = require("@elementor/session");
|
|
1529
|
-
var
|
|
1824
|
+
var import_ui18 = require("@elementor/ui");
|
|
1530
1825
|
|
|
1531
1826
|
// src/controls-registry/control.tsx
|
|
1532
|
-
var
|
|
1827
|
+
var React18 = __toESM(require("react"));
|
|
1533
1828
|
|
|
1534
1829
|
// src/controls-registry/controls-registry.tsx
|
|
1535
|
-
var
|
|
1536
|
-
var
|
|
1830
|
+
var import_editor_controls4 = require("@elementor/editor-controls");
|
|
1831
|
+
var import_editor_props4 = require("@elementor/editor-props");
|
|
1537
1832
|
var controlTypes = {
|
|
1538
|
-
image: { component:
|
|
1539
|
-
"svg-media": { component:
|
|
1540
|
-
text: { component:
|
|
1541
|
-
textarea: { component:
|
|
1542
|
-
size: { component:
|
|
1543
|
-
select: { component:
|
|
1544
|
-
link: { component:
|
|
1545
|
-
url: { component:
|
|
1546
|
-
switch: { component:
|
|
1547
|
-
repeatable: { component:
|
|
1548
|
-
"key-value": { component:
|
|
1833
|
+
image: { component: import_editor_controls4.ImageControl, layout: "full", propTypeUtil: import_editor_props4.imagePropTypeUtil },
|
|
1834
|
+
"svg-media": { component: import_editor_controls4.SvgMediaControl, layout: "full", propTypeUtil: import_editor_props4.imageSrcPropTypeUtil },
|
|
1835
|
+
text: { component: import_editor_controls4.TextControl, layout: "full", propTypeUtil: import_editor_props4.stringPropTypeUtil },
|
|
1836
|
+
textarea: { component: import_editor_controls4.TextAreaControl, layout: "full", propTypeUtil: import_editor_props4.stringPropTypeUtil },
|
|
1837
|
+
size: { component: import_editor_controls4.SizeControl, layout: "two-columns", propTypeUtil: import_editor_props4.sizePropTypeUtil },
|
|
1838
|
+
select: { component: import_editor_controls4.SelectControl, layout: "two-columns", propTypeUtil: import_editor_props4.stringPropTypeUtil },
|
|
1839
|
+
link: { component: import_editor_controls4.LinkControl, layout: "custom", propTypeUtil: import_editor_props4.linkPropTypeUtil },
|
|
1840
|
+
url: { component: import_editor_controls4.UrlControl, layout: "full", propTypeUtil: import_editor_props4.stringPropTypeUtil },
|
|
1841
|
+
switch: { component: import_editor_controls4.SwitchControl, layout: "two-columns", propTypeUtil: import_editor_props4.booleanPropTypeUtil },
|
|
1842
|
+
repeatable: { component: import_editor_controls4.RepeatableControl, layout: "full", propTypeUtil: void 0 },
|
|
1843
|
+
"key-value": { component: import_editor_controls4.KeyValueControl, layout: "full", propTypeUtil: import_editor_props4.keyValuePropTypeUtil }
|
|
1549
1844
|
};
|
|
1550
1845
|
var ControlsRegistry = class {
|
|
1551
1846
|
constructor(controlsRegistry2 = controlTypes) {
|
|
@@ -1588,19 +1883,19 @@ var Control = ({ props, type }) => {
|
|
|
1588
1883
|
context: { controlType: type }
|
|
1589
1884
|
});
|
|
1590
1885
|
}
|
|
1591
|
-
return /* @__PURE__ */
|
|
1886
|
+
return /* @__PURE__ */ React18.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
1592
1887
|
};
|
|
1593
1888
|
|
|
1594
1889
|
// src/controls-registry/control-type-container.tsx
|
|
1595
|
-
var
|
|
1596
|
-
var
|
|
1890
|
+
var React19 = __toESM(require("react"));
|
|
1891
|
+
var import_ui13 = require("@elementor/ui");
|
|
1597
1892
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
1598
1893
|
if (layout === "custom") {
|
|
1599
1894
|
return children;
|
|
1600
1895
|
}
|
|
1601
|
-
return /* @__PURE__ */
|
|
1896
|
+
return /* @__PURE__ */ React19.createElement(StyledContainer, { layout }, children);
|
|
1602
1897
|
};
|
|
1603
|
-
var StyledContainer = (0,
|
|
1898
|
+
var StyledContainer = (0, import_ui13.styled)(import_ui13.Box, {
|
|
1604
1899
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
1605
1900
|
})(({ layout, theme }) => ({
|
|
1606
1901
|
display: "grid",
|
|
@@ -1616,17 +1911,17 @@ var getGridLayout = (layout) => ({
|
|
|
1616
1911
|
});
|
|
1617
1912
|
|
|
1618
1913
|
// src/controls-registry/settings-field.tsx
|
|
1619
|
-
var
|
|
1620
|
-
var
|
|
1621
|
-
var
|
|
1914
|
+
var React20 = __toESM(require("react"));
|
|
1915
|
+
var import_react19 = require("react");
|
|
1916
|
+
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
1622
1917
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
1623
|
-
var
|
|
1624
|
-
var
|
|
1625
|
-
var
|
|
1626
|
-
var
|
|
1918
|
+
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
1919
|
+
var import_editor_props6 = require("@elementor/editor-props");
|
|
1920
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
1921
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
1627
1922
|
|
|
1628
1923
|
// src/utils/prop-dependency-utils.ts
|
|
1629
|
-
var
|
|
1924
|
+
var import_editor_props5 = require("@elementor/editor-props");
|
|
1630
1925
|
function extractOrderedDependencies(bind, propsSchema, elementValues, dependenciesPerTargetMapping) {
|
|
1631
1926
|
const prop = getPropType(propsSchema, elementValues, bind.split("."));
|
|
1632
1927
|
if (!prop) {
|
|
@@ -1673,7 +1968,7 @@ function updateValues(values, dependencies, propsSchema, elementValues) {
|
|
|
1673
1968
|
if (!propType) {
|
|
1674
1969
|
return newValues;
|
|
1675
1970
|
}
|
|
1676
|
-
if (!(0,
|
|
1971
|
+
if (!(0, import_editor_props5.isDependencyMet)(propType?.dependencies, combinedValues)) {
|
|
1677
1972
|
return {
|
|
1678
1973
|
...newValues,
|
|
1679
1974
|
...updateValue(path, null, combinedValues)
|
|
@@ -1698,7 +1993,7 @@ function getPropType(schema, elementValues, path) {
|
|
|
1698
1993
|
return null;
|
|
1699
1994
|
}
|
|
1700
1995
|
if ("union" === prop.kind) {
|
|
1701
|
-
const value = (0,
|
|
1996
|
+
const value = (0, import_editor_props5.extractValue)(path.slice(0, index + 1), elementValues);
|
|
1702
1997
|
const type = value?.$$type ?? null;
|
|
1703
1998
|
return getPropType(
|
|
1704
1999
|
{ [basePropKey]: prop.prop_types?.[type] },
|
|
@@ -1745,13 +2040,13 @@ var createTopLevelOjectType = ({ schema }) => {
|
|
|
1745
2040
|
};
|
|
1746
2041
|
|
|
1747
2042
|
// src/controls-registry/settings-field.tsx
|
|
1748
|
-
var
|
|
2043
|
+
var HISTORY_DEBOUNCE_WAIT2 = 800;
|
|
1749
2044
|
var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
1750
2045
|
const {
|
|
1751
2046
|
element: { id: elementId },
|
|
1752
2047
|
elementType: { propsSchema, dependenciesPerTargetMapping = {} }
|
|
1753
2048
|
} = useElement();
|
|
1754
|
-
const elementSettingValues = (0,
|
|
2049
|
+
const elementSettingValues = (0, import_editor_elements6.useElementSettings)(elementId, Object.keys(propsSchema));
|
|
1755
2050
|
const value = { [bind]: elementSettingValues?.[bind] ?? null };
|
|
1756
2051
|
const propType = createTopLevelOjectType({ schema: propsSchema });
|
|
1757
2052
|
const undoableUpdateElementProp = useUndoableUpdateElementProp({
|
|
@@ -1768,45 +2063,45 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
1768
2063
|
const settings = updateValues(newValue, dependents, propsSchema, elementSettingValues);
|
|
1769
2064
|
undoableUpdateElementProp(settings);
|
|
1770
2065
|
};
|
|
1771
|
-
const isDisabled = (prop) => !(0,
|
|
1772
|
-
return /* @__PURE__ */
|
|
2066
|
+
const isDisabled = (prop) => !(0, import_editor_props6.isDependencyMet)(prop?.dependencies, elementSettingValues);
|
|
2067
|
+
return /* @__PURE__ */ React20.createElement(import_editor_controls5.PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React20.createElement(import_editor_controls5.PropKeyProvider, { bind }, children));
|
|
1773
2068
|
};
|
|
1774
2069
|
function useUndoableUpdateElementProp({
|
|
1775
2070
|
elementId,
|
|
1776
2071
|
propDisplayName
|
|
1777
2072
|
}) {
|
|
1778
|
-
return (0,
|
|
1779
|
-
return (0,
|
|
2073
|
+
return (0, import_react19.useMemo)(() => {
|
|
2074
|
+
return (0, import_editor_v1_adapters4.undoable)(
|
|
1780
2075
|
{
|
|
1781
2076
|
do: (newSettings) => {
|
|
1782
|
-
const prevPropValue = (0,
|
|
1783
|
-
(0,
|
|
2077
|
+
const prevPropValue = (0, import_editor_elements6.getElementSettings)(elementId, Object.keys(newSettings));
|
|
2078
|
+
(0, import_editor_elements6.updateElementSettings)({ id: elementId, props: newSettings, withHistory: false });
|
|
1784
2079
|
(0, import_editor_documents2.setDocumentModifiedStatus)(true);
|
|
1785
2080
|
return prevPropValue;
|
|
1786
2081
|
},
|
|
1787
2082
|
undo: ({}, prevProps) => {
|
|
1788
|
-
(0,
|
|
2083
|
+
(0, import_editor_elements6.updateElementSettings)({ id: elementId, props: prevProps, withHistory: false });
|
|
1789
2084
|
}
|
|
1790
2085
|
},
|
|
1791
2086
|
{
|
|
1792
|
-
title: (0,
|
|
2087
|
+
title: (0, import_editor_elements6.getElementLabel)(elementId),
|
|
1793
2088
|
// translators: %s is the name of the property that was edited.
|
|
1794
|
-
subtitle: (0,
|
|
1795
|
-
debounce: { wait:
|
|
2089
|
+
subtitle: (0, import_i18n8.__)("%s edited", "elementor").replace("%s", propDisplayName),
|
|
2090
|
+
debounce: { wait: HISTORY_DEBOUNCE_WAIT2 }
|
|
1796
2091
|
}
|
|
1797
2092
|
);
|
|
1798
2093
|
}, [elementId, propDisplayName]);
|
|
1799
2094
|
}
|
|
1800
2095
|
|
|
1801
2096
|
// src/components/section.tsx
|
|
1802
|
-
var
|
|
1803
|
-
var
|
|
1804
|
-
var
|
|
2097
|
+
var React22 = __toESM(require("react"));
|
|
2098
|
+
var import_react21 = require("react");
|
|
2099
|
+
var import_ui16 = require("@elementor/ui");
|
|
1805
2100
|
|
|
1806
2101
|
// src/components/collapse-icon.tsx
|
|
1807
2102
|
var import_icons3 = require("@elementor/icons");
|
|
1808
|
-
var
|
|
1809
|
-
var CollapseIcon = (0,
|
|
2103
|
+
var import_ui14 = require("@elementor/ui");
|
|
2104
|
+
var CollapseIcon = (0, import_ui14.styled)(import_icons3.ChevronDownIcon, {
|
|
1810
2105
|
shouldForwardProp: (prop) => prop !== "open"
|
|
1811
2106
|
})(({ theme, open }) => ({
|
|
1812
2107
|
transform: open ? "rotate(180deg)" : "rotate(0deg)",
|
|
@@ -1816,11 +2111,11 @@ var CollapseIcon = (0, import_ui13.styled)(import_icons3.ChevronDownIcon, {
|
|
|
1816
2111
|
}));
|
|
1817
2112
|
|
|
1818
2113
|
// src/components/collapsible-content.tsx
|
|
1819
|
-
var
|
|
1820
|
-
var
|
|
1821
|
-
var
|
|
1822
|
-
var
|
|
1823
|
-
var IndicatorsWrapper = (0,
|
|
2114
|
+
var React21 = __toESM(require("react"));
|
|
2115
|
+
var import_react20 = require("react");
|
|
2116
|
+
var import_ui15 = require("@elementor/ui");
|
|
2117
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
2118
|
+
var IndicatorsWrapper = (0, import_ui15.styled)("div")`
|
|
1824
2119
|
position: absolute;
|
|
1825
2120
|
top: 0;
|
|
1826
2121
|
right: ${({ theme }) => theme.spacing(3)};
|
|
@@ -1831,23 +2126,23 @@ var IndicatorsWrapper = (0, import_ui14.styled)("div")`
|
|
|
1831
2126
|
justify-content: center;
|
|
1832
2127
|
`;
|
|
1833
2128
|
var CollapsibleContent = ({ children, defaultOpen = false, titleEnd = null }) => {
|
|
1834
|
-
const [open, setOpen] = (0,
|
|
2129
|
+
const [open, setOpen] = (0, import_react20.useState)(defaultOpen);
|
|
1835
2130
|
const handleToggle = () => {
|
|
1836
2131
|
setOpen((prevOpen) => !prevOpen);
|
|
1837
2132
|
};
|
|
1838
|
-
return /* @__PURE__ */
|
|
1839
|
-
|
|
2133
|
+
return /* @__PURE__ */ React21.createElement(import_ui15.Stack, null, /* @__PURE__ */ React21.createElement(import_ui15.Stack, { sx: { position: "relative" } }, /* @__PURE__ */ React21.createElement(
|
|
2134
|
+
import_ui15.Button,
|
|
1840
2135
|
{
|
|
1841
2136
|
fullWidth: true,
|
|
1842
2137
|
size: "small",
|
|
1843
2138
|
color: "secondary",
|
|
1844
2139
|
variant: "outlined",
|
|
1845
2140
|
onClick: handleToggle,
|
|
1846
|
-
endIcon: /* @__PURE__ */
|
|
2141
|
+
endIcon: /* @__PURE__ */ React21.createElement(CollapseIcon, { open }),
|
|
1847
2142
|
sx: { my: 0.5 }
|
|
1848
2143
|
},
|
|
1849
|
-
open ? (0,
|
|
1850
|
-
), titleEnd && /* @__PURE__ */
|
|
2144
|
+
open ? (0, import_i18n9.__)("Show less", "elementor") : (0, import_i18n9.__)("Show more", "elementor")
|
|
2145
|
+
), titleEnd && /* @__PURE__ */ React21.createElement(IndicatorsWrapper, null, getCollapsibleValue(titleEnd, open))), /* @__PURE__ */ React21.createElement(import_ui15.Collapse, { in: open, timeout: "auto", unmountOnExit: true }, children));
|
|
1851
2146
|
};
|
|
1852
2147
|
function getCollapsibleValue(value, isOpen) {
|
|
1853
2148
|
if (typeof value === "function") {
|
|
@@ -1859,38 +2154,38 @@ function getCollapsibleValue(value, isOpen) {
|
|
|
1859
2154
|
// src/components/section.tsx
|
|
1860
2155
|
function Section({ title, children, defaultExpanded = false, titleEnd }) {
|
|
1861
2156
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
1862
|
-
const ref = (0,
|
|
2157
|
+
const ref = (0, import_react21.useRef)(null);
|
|
1863
2158
|
const handleClick = () => {
|
|
1864
2159
|
setIsOpen(!isOpen);
|
|
1865
2160
|
};
|
|
1866
|
-
const id = (0,
|
|
2161
|
+
const id = (0, import_react21.useId)();
|
|
1867
2162
|
const labelId = `label-${id}`;
|
|
1868
2163
|
const contentId = `content-${id}`;
|
|
1869
|
-
return /* @__PURE__ */
|
|
1870
|
-
|
|
2164
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
|
|
2165
|
+
import_ui16.ListItemButton,
|
|
1871
2166
|
{
|
|
1872
2167
|
id: labelId,
|
|
1873
2168
|
"aria-controls": contentId,
|
|
1874
2169
|
onClick: handleClick,
|
|
1875
2170
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
1876
2171
|
},
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
|
|
2172
|
+
/* @__PURE__ */ React22.createElement(import_ui16.Stack, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React22.createElement(
|
|
2173
|
+
import_ui16.ListItemText,
|
|
1879
2174
|
{
|
|
1880
2175
|
secondary: title,
|
|
1881
2176
|
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" },
|
|
1882
2177
|
sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
|
|
1883
2178
|
}
|
|
1884
2179
|
), getCollapsibleValue(titleEnd, isOpen)),
|
|
1885
|
-
/* @__PURE__ */
|
|
1886
|
-
), /* @__PURE__ */
|
|
2180
|
+
/* @__PURE__ */ React22.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
2181
|
+
), /* @__PURE__ */ React22.createElement(import_ui16.Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React22.createElement(SectionRefContext.Provider, { value: ref }, /* @__PURE__ */ React22.createElement(import_ui16.Stack, { ref, gap: 2.5, p: 2 }, children))), /* @__PURE__ */ React22.createElement(import_ui16.Divider, null));
|
|
1887
2182
|
}
|
|
1888
2183
|
|
|
1889
2184
|
// src/components/sections-list.tsx
|
|
1890
|
-
var
|
|
1891
|
-
var
|
|
2185
|
+
var React23 = __toESM(require("react"));
|
|
2186
|
+
var import_ui17 = require("@elementor/ui");
|
|
1892
2187
|
function SectionsList(props) {
|
|
1893
|
-
return /* @__PURE__ */
|
|
2188
|
+
return /* @__PURE__ */ React23.createElement(import_ui17.List, { disablePadding: true, component: "div", ...props });
|
|
1894
2189
|
}
|
|
1895
2190
|
|
|
1896
2191
|
// src/components/settings-tab.tsx
|
|
@@ -1898,12 +2193,12 @@ var SettingsTab = () => {
|
|
|
1898
2193
|
const { elementType, element } = useElement();
|
|
1899
2194
|
const settingsDefault = useDefaultPanelSettings();
|
|
1900
2195
|
const isDefaultExpanded = (sectionId) => settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId);
|
|
1901
|
-
return /* @__PURE__ */
|
|
2196
|
+
return /* @__PURE__ */ React24.createElement(import_session4.SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React24.createElement(SectionsList, null, elementType.controls.map(({ type, value }, index) => {
|
|
1902
2197
|
if (type === "control") {
|
|
1903
|
-
return /* @__PURE__ */
|
|
2198
|
+
return /* @__PURE__ */ React24.createElement(Control2, { key: value.bind, control: value });
|
|
1904
2199
|
}
|
|
1905
2200
|
if (type === "section") {
|
|
1906
|
-
return /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1907
2202
|
Section,
|
|
1908
2203
|
{
|
|
1909
2204
|
title: value.label,
|
|
@@ -1912,7 +2207,7 @@ var SettingsTab = () => {
|
|
|
1912
2207
|
},
|
|
1913
2208
|
value.items?.map((item) => {
|
|
1914
2209
|
if (item.type === "control") {
|
|
1915
|
-
return /* @__PURE__ */
|
|
2210
|
+
return /* @__PURE__ */ React24.createElement(Control2, { key: item.value.bind, control: item.value });
|
|
1916
2211
|
}
|
|
1917
2212
|
return null;
|
|
1918
2213
|
})
|
|
@@ -1930,7 +2225,7 @@ var Control2 = ({ control }) => {
|
|
|
1930
2225
|
if (layout === "custom") {
|
|
1931
2226
|
controlProps.label = control.label;
|
|
1932
2227
|
}
|
|
1933
|
-
return /* @__PURE__ */
|
|
2228
|
+
return /* @__PURE__ */ React24.createElement(SettingsField, { bind: control.bind, propDisplayName: control.label || control.bind }, control.meta?.topDivider && /* @__PURE__ */ React24.createElement(import_ui18.Divider, null), /* @__PURE__ */ React24.createElement(ControlTypeContainer, { layout }, control.label && layout !== "custom" ? /* @__PURE__ */ React24.createElement(import_editor_controls6.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React24.createElement(Control, { type: control.type, props: controlProps })));
|
|
1934
2229
|
};
|
|
1935
2230
|
function populateChildControlProps(props) {
|
|
1936
2231
|
if (props.childControlType) {
|
|
@@ -1955,31 +2250,23 @@ var import_editor_props15 = require("@elementor/editor-props");
|
|
|
1955
2250
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
1956
2251
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
1957
2252
|
var import_session6 = require("@elementor/session");
|
|
1958
|
-
var
|
|
2253
|
+
var import_ui43 = require("@elementor/ui");
|
|
1959
2254
|
var import_i18n59 = require("@wordpress/i18n");
|
|
1960
2255
|
|
|
1961
2256
|
// src/contexts/styles-inheritance-context.tsx
|
|
1962
|
-
var
|
|
1963
|
-
var
|
|
1964
|
-
var
|
|
1965
|
-
var
|
|
2257
|
+
var React25 = __toESM(require("react"));
|
|
2258
|
+
var import_react22 = require("react");
|
|
2259
|
+
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
2260
|
+
var import_editor_props9 = require("@elementor/editor-props");
|
|
1966
2261
|
var import_editor_responsive = require("@elementor/editor-responsive");
|
|
1967
|
-
var
|
|
1968
|
-
var
|
|
1969
|
-
|
|
1970
|
-
// src/hooks/use-styles-rerender.ts
|
|
1971
|
-
var import_react19 = require("react");
|
|
1972
|
-
var useStylesRerender = () => {
|
|
1973
|
-
const { provider } = useStyle();
|
|
1974
|
-
const [, reRender] = (0, import_react19.useReducer)((p) => !p, false);
|
|
1975
|
-
(0, import_react19.useEffect)(() => provider?.subscribe(reRender), [provider]);
|
|
1976
|
-
};
|
|
2262
|
+
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
2263
|
+
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
1977
2264
|
|
|
1978
2265
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
1979
|
-
var
|
|
2266
|
+
var import_editor_props8 = require("@elementor/editor-props");
|
|
1980
2267
|
|
|
1981
2268
|
// src/styles-inheritance/create-snapshots-manager.ts
|
|
1982
|
-
var
|
|
2269
|
+
var import_editor_props7 = require("@elementor/editor-props");
|
|
1983
2270
|
|
|
1984
2271
|
// src/styles-inheritance/utils.ts
|
|
1985
2272
|
var DEFAULT_STATE = "normal";
|
|
@@ -2079,7 +2366,7 @@ function buildInitialSnapshotFromStyles(styles) {
|
|
|
2079
2366
|
variant: { props }
|
|
2080
2367
|
} = styleData;
|
|
2081
2368
|
Object.entries(props).forEach(([key, value]) => {
|
|
2082
|
-
const filteredValue = (0,
|
|
2369
|
+
const filteredValue = (0, import_editor_props7.filterEmptyValues)(value);
|
|
2083
2370
|
if (filteredValue === null) {
|
|
2084
2371
|
return;
|
|
2085
2372
|
}
|
|
@@ -2125,7 +2412,7 @@ function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
|
2125
2412
|
inheritanceChain = inheritanceChain.map(({ value: styleValue, ...rest }) => ({
|
|
2126
2413
|
...rest,
|
|
2127
2414
|
value: getValueByPath(styleValue, nextFields, filterPropType)
|
|
2128
|
-
})).filter(({ value: styleValue }) => !(0,
|
|
2415
|
+
})).filter(({ value: styleValue }) => !(0, import_editor_props8.isEmpty)(styleValue));
|
|
2129
2416
|
}
|
|
2130
2417
|
return inheritanceChain;
|
|
2131
2418
|
}
|
|
@@ -2167,7 +2454,7 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
2167
2454
|
if (!currentScope) {
|
|
2168
2455
|
return null;
|
|
2169
2456
|
}
|
|
2170
|
-
if ((0,
|
|
2457
|
+
if ((0, import_editor_props8.isTransformable)(currentScope)) {
|
|
2171
2458
|
return currentScope.value?.[key] ?? null;
|
|
2172
2459
|
}
|
|
2173
2460
|
if (typeof currentScope === "object") {
|
|
@@ -2177,394 +2464,108 @@ function getValueByPath(value, path, filterPropType) {
|
|
|
2177
2464
|
}, value);
|
|
2178
2465
|
}
|
|
2179
2466
|
function shouldUseOriginalValue(filterPropType, value) {
|
|
2180
|
-
return !!filterPropType && (0,
|
|
2467
|
+
return !!filterPropType && (0, import_editor_props8.isTransformable)(value) && filterPropType.key !== value.$$type;
|
|
2181
2468
|
}
|
|
2182
2469
|
var getFilterPropType = (propType, path) => {
|
|
2183
2470
|
if (!propType || propType.kind !== "union") {
|
|
2184
2471
|
return null;
|
|
2185
2472
|
}
|
|
2186
|
-
return Object.values(propType.prop_types).find((type) => {
|
|
2187
|
-
return !!path.reduce((currentScope, key) => {
|
|
2188
|
-
if (currentScope?.kind !== "object") {
|
|
2189
|
-
return null;
|
|
2190
|
-
}
|
|
2191
|
-
const { shape } = currentScope;
|
|
2192
|
-
if (shape[key]) {
|
|
2193
|
-
return shape[key];
|
|
2194
|
-
}
|
|
2195
|
-
return null;
|
|
2196
|
-
}, type);
|
|
2197
|
-
}) ?? null;
|
|
2198
|
-
};
|
|
2199
|
-
|
|
2200
|
-
// src/contexts/styles-inheritance-context.tsx
|
|
2201
|
-
var Context4 = (0,
|
|
2202
|
-
function StyleInheritanceProvider({ children }) {
|
|
2203
|
-
const styleDefs = useAppliedStyles();
|
|
2204
|
-
const breakpointsTree = (0, import_editor_responsive.getBreakpointsTree)();
|
|
2205
|
-
const { getSnapshot, getInheritanceChain } = createStylesInheritance(styleDefs, breakpointsTree);
|
|
2206
|
-
return /* @__PURE__ */
|
|
2207
|
-
}
|
|
2208
|
-
function useStylesInheritanceSnapshot() {
|
|
2209
|
-
const context = (0, import_react20.useContext)(Context4);
|
|
2210
|
-
const { meta } = useStyle();
|
|
2211
|
-
if (!context) {
|
|
2212
|
-
throw new Error("useStylesInheritanceSnapshot must be used within a StyleInheritanceProvider");
|
|
2213
|
-
}
|
|
2214
|
-
if (!meta) {
|
|
2215
|
-
return null;
|
|
2216
|
-
}
|
|
2217
|
-
return context.getSnapshot(meta) ?? null;
|
|
2218
|
-
}
|
|
2219
|
-
function useStylesInheritanceChain(path) {
|
|
2220
|
-
const context = (0, import_react20.useContext)(Context4);
|
|
2221
|
-
if (!context) {
|
|
2222
|
-
throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
|
|
2223
|
-
}
|
|
2224
|
-
const schema = (0, import_editor_styles.getStylesSchema)();
|
|
2225
|
-
const topLevelPropType = schema?.[path[0]];
|
|
2226
|
-
const snapshot = useStylesInheritanceSnapshot();
|
|
2227
|
-
if (!snapshot) {
|
|
2228
|
-
return [];
|
|
2229
|
-
}
|
|
2230
|
-
return context.getInheritanceChain(snapshot, path, topLevelPropType);
|
|
2231
|
-
}
|
|
2232
|
-
var useAppliedStyles = () => {
|
|
2233
|
-
const { element } = useElement();
|
|
2234
|
-
const currentClassesProp = useClassesProp();
|
|
2235
|
-
const baseStyles = useBaseStyles();
|
|
2236
|
-
useStylesRerender();
|
|
2237
|
-
const classesProp = (0, import_editor_elements5.useElementSetting)(element.id, currentClassesProp);
|
|
2238
|
-
const appliedStyles = import_editor_props8.classesPropTypeUtil.extract(classesProp) ?? [];
|
|
2239
|
-
return import_editor_styles_repository8.stylesRepository.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
2240
|
-
};
|
|
2241
|
-
var useBaseStyles = () => {
|
|
2242
|
-
const { elementType } = useElement();
|
|
2243
|
-
const widgetsCache = (0, import_editor_elements5.getWidgetsCache)();
|
|
2244
|
-
const widgetCache = widgetsCache?.[elementType.key];
|
|
2245
|
-
return Object.keys(widgetCache?.base_styles ?? {});
|
|
2246
|
-
};
|
|
2247
|
-
|
|
2248
|
-
// src/hooks/use-active-style-def-id.ts
|
|
2249
|
-
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
2250
|
-
function useActiveStyleDefId(classProp) {
|
|
2251
|
-
const [activeStyledDefId, setActiveStyledDefId] = useStateByElement(
|
|
2252
|
-
"active-style-id",
|
|
2253
|
-
null
|
|
2254
|
-
);
|
|
2255
|
-
const appliedClassesIds = useAppliedClassesIds(classProp)?.value || [];
|
|
2256
|
-
const fallback = useFirstAppliedClass(appliedClassesIds);
|
|
2257
|
-
const activeAndAppliedClassId = useActiveAndAppliedClassId(activeStyledDefId, appliedClassesIds);
|
|
2258
|
-
return [activeAndAppliedClassId || fallback?.id || null, setActiveStyledDefId];
|
|
2259
|
-
}
|
|
2260
|
-
function useFirstAppliedClass(appliedClassesIds) {
|
|
2261
|
-
const { element } = useElement();
|
|
2262
|
-
const stylesDefs = (0, import_editor_elements6.getElementStyles)(element.id) ?? {};
|
|
2263
|
-
return Object.values(stylesDefs).find((styleDef) => appliedClassesIds.includes(styleDef.id));
|
|
2264
|
-
}
|
|
2265
|
-
function useAppliedClassesIds(classProp) {
|
|
2266
|
-
const { element } = useElement();
|
|
2267
|
-
return (0, import_editor_elements6.useElementSetting)(element.id, classProp);
|
|
2268
|
-
}
|
|
2269
|
-
function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
2270
|
-
const isClassApplied = !!id && appliedClassesIds.includes(id);
|
|
2271
|
-
return isClassApplied ? id : null;
|
|
2272
|
-
}
|
|
2273
|
-
|
|
2274
|
-
// src/components/custom-css.tsx
|
|
2275
|
-
var React25 = __toESM(require("react"));
|
|
2276
|
-
var import_ui19 = require("@elementor/ui");
|
|
2277
|
-
|
|
2278
|
-
// src/hooks/use-custom-css.ts
|
|
2279
|
-
var import_react22 = require("react");
|
|
2280
|
-
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
2281
|
-
var import_editor_props9 = require("@elementor/editor-props");
|
|
2282
|
-
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
2283
|
-
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
2284
|
-
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
2285
|
-
var import_utils4 = require("@elementor/utils");
|
|
2286
|
-
|
|
2287
|
-
// src/hooks/use-styles-fields.ts
|
|
2288
|
-
var import_react21 = require("react");
|
|
2289
|
-
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
2290
|
-
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
2291
|
-
var import_editor_styles_repository9 = require("@elementor/editor-styles-repository");
|
|
2292
|
-
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
2293
|
-
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
2294
|
-
var import_i18n9 = require("@wordpress/i18n");
|
|
2295
|
-
var HISTORY_DEBOUNCE_WAIT2 = 800;
|
|
2296
|
-
function useStylesFields(propNames) {
|
|
2297
|
-
const {
|
|
2298
|
-
element: { id: elementId }
|
|
2299
|
-
} = useElement();
|
|
2300
|
-
const { id: styleId, meta, provider, canEdit } = useStyle();
|
|
2301
|
-
const undoableUpdateStyle = useUndoableActions({ elementId, meta });
|
|
2302
|
-
useStylesRerender();
|
|
2303
|
-
const values = getProps({ elementId, styleId, provider, meta, propNames });
|
|
2304
|
-
const setValues = (props, { history: { propDisplayName } }) => {
|
|
2305
|
-
if (!styleId) {
|
|
2306
|
-
undoableUpdateStyle({ styleId: null, provider: null, props, propDisplayName });
|
|
2307
|
-
} else {
|
|
2308
|
-
undoableUpdateStyle({ styleId, provider, props, propDisplayName });
|
|
2309
|
-
}
|
|
2310
|
-
};
|
|
2311
|
-
return { values, setValues, canEdit };
|
|
2312
|
-
}
|
|
2313
|
-
function getProps({ styleId, elementId, provider, meta, propNames }) {
|
|
2314
|
-
if (!provider || !styleId) {
|
|
2315
|
-
return null;
|
|
2316
|
-
}
|
|
2317
|
-
const style = provider.actions.get(styleId, { elementId });
|
|
2318
|
-
if (!style) {
|
|
2319
|
-
throw new StyleNotFoundUnderProviderError({ context: { styleId, providerKey: provider.getKey() } });
|
|
2320
|
-
}
|
|
2321
|
-
const variant = (0, import_editor_styles2.getVariantByMeta)(style, meta);
|
|
2322
|
-
return Object.fromEntries(
|
|
2323
|
-
propNames.map((key) => [key, variant?.props[key] ?? null])
|
|
2324
|
-
);
|
|
2325
|
-
}
|
|
2326
|
-
function useUndoableActions({
|
|
2327
|
-
elementId,
|
|
2328
|
-
meta: { breakpoint, state }
|
|
2329
|
-
}) {
|
|
2330
|
-
const classesProp = useClassesProp();
|
|
2331
|
-
return (0, import_react21.useMemo)(() => {
|
|
2332
|
-
const meta = { breakpoint, state };
|
|
2333
|
-
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository10.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
2334
|
-
return (0, import_editor_v1_adapters3.undoable)(
|
|
2335
|
-
{
|
|
2336
|
-
do: (payload) => {
|
|
2337
|
-
if ((0, import_editor_elements7.shouldCreateNewLocalStyle)(payload)) {
|
|
2338
|
-
return create(payload);
|
|
2339
|
-
}
|
|
2340
|
-
return update(payload);
|
|
2341
|
-
},
|
|
2342
|
-
undo: (payload, doReturn) => {
|
|
2343
|
-
const wasLocalStyleCreated = (0, import_editor_elements7.shouldCreateNewLocalStyle)(payload);
|
|
2344
|
-
if (wasLocalStyleCreated) {
|
|
2345
|
-
return undoCreate(payload, doReturn);
|
|
2346
|
-
}
|
|
2347
|
-
return undo(payload, doReturn);
|
|
2348
|
-
},
|
|
2349
|
-
redo: (payload, doReturn) => {
|
|
2350
|
-
const wasLocalStyleCreated = (0, import_editor_elements7.shouldCreateNewLocalStyle)(payload);
|
|
2351
|
-
if (wasLocalStyleCreated) {
|
|
2352
|
-
return create(payload, doReturn);
|
|
2353
|
-
}
|
|
2354
|
-
return update(payload);
|
|
2355
|
-
}
|
|
2356
|
-
},
|
|
2357
|
-
{
|
|
2358
|
-
title: ({ provider, styleId }) => getTitle({ provider, styleId, elementId }),
|
|
2359
|
-
subtitle: ({ provider, styleId, propDisplayName }) => getSubtitle({ provider, styleId, elementId, propDisplayName }),
|
|
2360
|
-
debounce: { wait: HISTORY_DEBOUNCE_WAIT2 }
|
|
2361
|
-
}
|
|
2362
|
-
);
|
|
2363
|
-
function create({ props }, redoArgs) {
|
|
2364
|
-
const createdStyle = (0, import_editor_elements7.createElementStyle)({ ...createStyleArgs, props, styleId: redoArgs?.createdStyleId });
|
|
2365
|
-
return { createdStyleId: createdStyle };
|
|
2366
|
-
}
|
|
2367
|
-
function undoCreate(_, { createdStyleId }) {
|
|
2368
|
-
(0, import_editor_elements7.deleteElementStyle)(elementId, createdStyleId);
|
|
2369
|
-
}
|
|
2370
|
-
function update({ provider, styleId, props }) {
|
|
2371
|
-
if (!provider.actions.updateProps) {
|
|
2372
|
-
throw new StylesProviderCannotUpdatePropsError({
|
|
2373
|
-
context: { providerKey: provider.getKey() }
|
|
2374
|
-
});
|
|
2375
|
-
}
|
|
2376
|
-
const style = provider.actions.get(styleId, { elementId });
|
|
2377
|
-
const prevProps = getCurrentProps(style, meta);
|
|
2378
|
-
provider.actions.updateProps({ id: styleId, meta, props }, { elementId });
|
|
2379
|
-
return { styleId, provider, prevProps };
|
|
2380
|
-
}
|
|
2381
|
-
function undo(_, { styleId, provider, prevProps }) {
|
|
2382
|
-
provider.actions.updateProps?.({ id: styleId, meta, props: prevProps }, { elementId });
|
|
2383
|
-
}
|
|
2384
|
-
}, [elementId, breakpoint, state, classesProp]);
|
|
2385
|
-
}
|
|
2386
|
-
function getCurrentProps(style, meta) {
|
|
2387
|
-
if (!style) {
|
|
2388
|
-
return {};
|
|
2389
|
-
}
|
|
2390
|
-
const variant = (0, import_editor_styles2.getVariantByMeta)(style, meta);
|
|
2391
|
-
const props = variant?.props ?? {};
|
|
2392
|
-
return structuredClone(props);
|
|
2393
|
-
}
|
|
2394
|
-
var defaultHistoryTitles = {
|
|
2395
|
-
title: ({ provider }) => {
|
|
2396
|
-
const providerLabel = provider.labels?.singular;
|
|
2397
|
-
return providerLabel ? capitalize(providerLabel) : (0, import_i18n9.__)("Style", "elementor");
|
|
2398
|
-
},
|
|
2399
|
-
subtitle: ({ provider, styleId, elementId, propDisplayName }) => {
|
|
2400
|
-
const styleLabel = provider.actions.get(styleId, { elementId })?.label;
|
|
2401
|
-
if (!styleLabel) {
|
|
2402
|
-
throw new Error(`Style ${styleId} not found`);
|
|
2403
|
-
}
|
|
2404
|
-
return (0, import_i18n9.__)(`%s$1 %s$2 edited`, "elementor").replace("%s$1", styleLabel).replace("%s$2", propDisplayName);
|
|
2405
|
-
}
|
|
2406
|
-
};
|
|
2407
|
-
var localStyleHistoryTitles = {
|
|
2408
|
-
title: ({ elementId }) => (0, import_editor_elements7.getElementLabel)(elementId),
|
|
2409
|
-
subtitle: ({ propDisplayName }) => (
|
|
2410
|
-
// translators: %s is the name of the style property being edited
|
|
2411
|
-
(0, import_i18n9.__)(`%s edited`, "elementor").replace("%s", propDisplayName)
|
|
2412
|
-
)
|
|
2413
|
-
};
|
|
2414
|
-
function capitalize(str) {
|
|
2415
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
2416
|
-
}
|
|
2417
|
-
var isLocalStyle = (provider, styleId) => !provider || !styleId || (0, import_editor_styles_repository9.isElementsStylesProvider)(provider.getKey());
|
|
2418
|
-
var getTitle = ({ provider, styleId, elementId }) => {
|
|
2419
|
-
const isLocal = isLocalStyle(provider, styleId);
|
|
2420
|
-
if (isLocal) {
|
|
2421
|
-
return localStyleHistoryTitles.title({ elementId });
|
|
2422
|
-
}
|
|
2423
|
-
return defaultHistoryTitles.title({ provider });
|
|
2424
|
-
};
|
|
2425
|
-
var getSubtitle = ({ provider, styleId, propDisplayName, elementId }) => {
|
|
2426
|
-
const isLocal = isLocalStyle(provider, styleId);
|
|
2427
|
-
if (isLocal) {
|
|
2428
|
-
return localStyleHistoryTitles.subtitle({ propDisplayName });
|
|
2429
|
-
}
|
|
2430
|
-
return defaultHistoryTitles.subtitle({
|
|
2431
|
-
provider,
|
|
2432
|
-
styleId,
|
|
2433
|
-
elementId,
|
|
2434
|
-
propDisplayName
|
|
2435
|
-
});
|
|
2436
|
-
};
|
|
2437
|
-
|
|
2438
|
-
// src/hooks/use-custom-css.ts
|
|
2439
|
-
var useCustomCss = () => {
|
|
2440
|
-
const {
|
|
2441
|
-
element: { id: elementId }
|
|
2442
|
-
} = useElement();
|
|
2443
|
-
const { id: styleId, meta, provider } = useStyle();
|
|
2444
|
-
const style = provider?.actions.get(styleId, { elementId });
|
|
2445
|
-
const undoableUpdateStyle = useUndoableActions2({ elementId, meta });
|
|
2446
|
-
const currentStyleId = styleId ? styleId : null;
|
|
2447
|
-
const currentProvider = styleId ? provider : null;
|
|
2448
|
-
useStylesRerender();
|
|
2449
|
-
const variant = style ? (0, import_editor_styles3.getVariantByMeta)(style, meta) : null;
|
|
2450
|
-
const setCustomCss = (raw, { history: { propDisplayName } }) => {
|
|
2451
|
-
const newValue = { raw: (0, import_utils4.encodeString)(sanitize(raw)) };
|
|
2452
|
-
undoableUpdateStyle({
|
|
2453
|
-
styleId: currentStyleId,
|
|
2454
|
-
provider: currentProvider,
|
|
2455
|
-
customCss: newValue,
|
|
2456
|
-
propDisplayName
|
|
2457
|
-
});
|
|
2458
|
-
};
|
|
2459
|
-
const customCss = variant?.custom_css?.raw ? { raw: (0, import_utils4.decodeString)(variant.custom_css.raw) } : null;
|
|
2460
|
-
return {
|
|
2461
|
-
customCss,
|
|
2462
|
-
setCustomCss
|
|
2463
|
-
};
|
|
2464
|
-
};
|
|
2465
|
-
function useUndoableActions2({
|
|
2466
|
-
elementId,
|
|
2467
|
-
meta: { breakpoint, state }
|
|
2468
|
-
}) {
|
|
2469
|
-
const classesProp = useClassesProp();
|
|
2470
|
-
return (0, import_react22.useMemo)(() => {
|
|
2471
|
-
const meta = { breakpoint, state };
|
|
2472
|
-
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository11.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
2473
|
-
return (0, import_editor_v1_adapters4.undoable)(
|
|
2474
|
-
{
|
|
2475
|
-
do: (payload) => {
|
|
2476
|
-
if ((0, import_editor_elements8.shouldCreateNewLocalStyle)(payload)) {
|
|
2477
|
-
return create(payload);
|
|
2478
|
-
}
|
|
2479
|
-
return update(payload);
|
|
2480
|
-
},
|
|
2481
|
-
undo: (payload, doReturn) => {
|
|
2482
|
-
if ((0, import_editor_elements8.shouldCreateNewLocalStyle)(payload)) {
|
|
2483
|
-
return undoCreate(payload, doReturn);
|
|
2484
|
-
}
|
|
2485
|
-
return undoUpdate(payload, doReturn);
|
|
2486
|
-
},
|
|
2487
|
-
redo: (payload, doReturn) => {
|
|
2488
|
-
if ((0, import_editor_elements8.shouldCreateNewLocalStyle)(payload)) {
|
|
2489
|
-
return create(payload, doReturn);
|
|
2490
|
-
}
|
|
2491
|
-
return update(payload);
|
|
2492
|
-
}
|
|
2493
|
-
},
|
|
2494
|
-
{
|
|
2495
|
-
title: ({ provider, styleId }) => getTitle({ provider, styleId, elementId }),
|
|
2496
|
-
subtitle: ({ provider, styleId, propDisplayName }) => getSubtitle({ provider, styleId, elementId, propDisplayName }),
|
|
2497
|
-
debounce: { wait: HISTORY_DEBOUNCE_WAIT2 }
|
|
2498
|
-
}
|
|
2499
|
-
);
|
|
2500
|
-
function create({ customCss }, redoArgs) {
|
|
2501
|
-
const createdStyle = (0, import_editor_elements8.createElementStyle)({
|
|
2502
|
-
...createStyleArgs,
|
|
2503
|
-
props: {},
|
|
2504
|
-
custom_css: customCss ?? null,
|
|
2505
|
-
styleId: redoArgs?.createdStyleId
|
|
2506
|
-
});
|
|
2507
|
-
return { createdStyleId: createdStyle };
|
|
2508
|
-
}
|
|
2509
|
-
function undoCreate(_, { createdStyleId }) {
|
|
2510
|
-
(0, import_editor_elements8.deleteElementStyle)(elementId, createdStyleId);
|
|
2511
|
-
}
|
|
2512
|
-
function update({ provider, styleId, customCss }) {
|
|
2513
|
-
if (!provider.actions.updateCustomCss) {
|
|
2514
|
-
throw new StylesProviderCannotUpdatePropsError({
|
|
2515
|
-
context: { providerKey: provider.getKey() }
|
|
2516
|
-
});
|
|
2517
|
-
}
|
|
2518
|
-
const style = provider.actions.get(styleId, { elementId });
|
|
2519
|
-
const prevCustomCss = getCurrentCustomCss(style, meta);
|
|
2520
|
-
provider.actions.updateCustomCss({ id: styleId, meta, custom_css: customCss }, { elementId });
|
|
2521
|
-
return { styleId, provider, prevCustomCss };
|
|
2522
|
-
}
|
|
2523
|
-
function undoUpdate(_, { styleId, provider, prevCustomCss }) {
|
|
2524
|
-
provider.actions.updateCustomCss?.(
|
|
2525
|
-
{ id: styleId, meta, custom_css: prevCustomCss ?? { raw: "" } },
|
|
2526
|
-
{ elementId }
|
|
2527
|
-
);
|
|
2528
|
-
}
|
|
2529
|
-
}, [elementId, breakpoint, state, classesProp]);
|
|
2473
|
+
return Object.values(propType.prop_types).find((type) => {
|
|
2474
|
+
return !!path.reduce((currentScope, key) => {
|
|
2475
|
+
if (currentScope?.kind !== "object") {
|
|
2476
|
+
return null;
|
|
2477
|
+
}
|
|
2478
|
+
const { shape } = currentScope;
|
|
2479
|
+
if (shape[key]) {
|
|
2480
|
+
return shape[key];
|
|
2481
|
+
}
|
|
2482
|
+
return null;
|
|
2483
|
+
}, type);
|
|
2484
|
+
}) ?? null;
|
|
2485
|
+
};
|
|
2486
|
+
|
|
2487
|
+
// src/contexts/styles-inheritance-context.tsx
|
|
2488
|
+
var Context4 = (0, import_react22.createContext)(null);
|
|
2489
|
+
function StyleInheritanceProvider({ children }) {
|
|
2490
|
+
const styleDefs = useAppliedStyles();
|
|
2491
|
+
const breakpointsTree = (0, import_editor_responsive.getBreakpointsTree)();
|
|
2492
|
+
const { getSnapshot, getInheritanceChain } = createStylesInheritance(styleDefs, breakpointsTree);
|
|
2493
|
+
return /* @__PURE__ */ React25.createElement(Context4.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
|
|
2530
2494
|
}
|
|
2531
|
-
function
|
|
2532
|
-
|
|
2495
|
+
function useStylesInheritanceSnapshot() {
|
|
2496
|
+
const context = (0, import_react22.useContext)(Context4);
|
|
2497
|
+
const { meta } = useStyle();
|
|
2498
|
+
if (!context) {
|
|
2499
|
+
throw new Error("useStylesInheritanceSnapshot must be used within a StyleInheritanceProvider");
|
|
2500
|
+
}
|
|
2501
|
+
if (!meta) {
|
|
2533
2502
|
return null;
|
|
2534
2503
|
}
|
|
2535
|
-
|
|
2536
|
-
return variant?.custom_css ?? null;
|
|
2504
|
+
return context.getSnapshot(meta) ?? null;
|
|
2537
2505
|
}
|
|
2538
|
-
function
|
|
2539
|
-
|
|
2506
|
+
function useStylesInheritanceChain(path) {
|
|
2507
|
+
const context = (0, import_react22.useContext)(Context4);
|
|
2508
|
+
if (!context) {
|
|
2509
|
+
throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
|
|
2510
|
+
}
|
|
2511
|
+
const schema = (0, import_editor_styles3.getStylesSchema)();
|
|
2512
|
+
const topLevelPropType = schema?.[path[0]];
|
|
2513
|
+
const snapshot = useStylesInheritanceSnapshot();
|
|
2514
|
+
if (!snapshot) {
|
|
2515
|
+
return [];
|
|
2516
|
+
}
|
|
2517
|
+
return context.getInheritanceChain(snapshot, path, topLevelPropType);
|
|
2540
2518
|
}
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
const { customCss, setCustomCss } = useCustomCss();
|
|
2550
|
-
return /* @__PURE__ */ React25.createElement(SectionContent, null, /* @__PURE__ */ React25.createElement(
|
|
2551
|
-
import_ui19.TextField,
|
|
2552
|
-
{
|
|
2553
|
-
value: customCss?.raw || "",
|
|
2554
|
-
onChange: (ev) => setCustomCss(ev.target.value, { history: { propDisplayName: "Custom CSS" } }),
|
|
2555
|
-
multiline: true
|
|
2556
|
-
}
|
|
2557
|
-
));
|
|
2519
|
+
var useAppliedStyles = () => {
|
|
2520
|
+
const { element } = useElement();
|
|
2521
|
+
const currentClassesProp = useClassesProp();
|
|
2522
|
+
const baseStyles = useBaseStyles();
|
|
2523
|
+
useStylesRerender();
|
|
2524
|
+
const classesProp = (0, import_editor_elements7.useElementSetting)(element.id, currentClassesProp);
|
|
2525
|
+
const appliedStyles = import_editor_props9.classesPropTypeUtil.extract(classesProp) ?? [];
|
|
2526
|
+
return import_editor_styles_repository11.stylesRepository.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
2558
2527
|
};
|
|
2528
|
+
var useBaseStyles = () => {
|
|
2529
|
+
const { elementType } = useElement();
|
|
2530
|
+
const widgetsCache = (0, import_editor_elements7.getWidgetsCache)();
|
|
2531
|
+
const widgetCache = widgetsCache?.[elementType.key];
|
|
2532
|
+
return Object.keys(widgetCache?.base_styles ?? {});
|
|
2533
|
+
};
|
|
2534
|
+
|
|
2535
|
+
// src/hooks/use-active-style-def-id.ts
|
|
2536
|
+
var import_editor_elements8 = require("@elementor/editor-elements");
|
|
2537
|
+
function useActiveStyleDefId(classProp) {
|
|
2538
|
+
const [activeStyledDefId, setActiveStyledDefId] = useStateByElement(
|
|
2539
|
+
"active-style-id",
|
|
2540
|
+
null
|
|
2541
|
+
);
|
|
2542
|
+
const appliedClassesIds = useAppliedClassesIds(classProp)?.value || [];
|
|
2543
|
+
const fallback = useFirstAppliedClass(appliedClassesIds);
|
|
2544
|
+
const activeAndAppliedClassId = useActiveAndAppliedClassId(activeStyledDefId, appliedClassesIds);
|
|
2545
|
+
return [activeAndAppliedClassId || fallback?.id || null, setActiveStyledDefId];
|
|
2546
|
+
}
|
|
2547
|
+
function useFirstAppliedClass(appliedClassesIds) {
|
|
2548
|
+
const { element } = useElement();
|
|
2549
|
+
const stylesDefs = (0, import_editor_elements8.getElementStyles)(element.id) ?? {};
|
|
2550
|
+
return Object.values(stylesDefs).find((styleDef) => appliedClassesIds.includes(styleDef.id));
|
|
2551
|
+
}
|
|
2552
|
+
function useAppliedClassesIds(classProp) {
|
|
2553
|
+
const { element } = useElement();
|
|
2554
|
+
return (0, import_editor_elements8.useElementSetting)(element.id, classProp);
|
|
2555
|
+
}
|
|
2556
|
+
function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
2557
|
+
const isClassApplied = !!id && appliedClassesIds.includes(id);
|
|
2558
|
+
return isClassApplied ? id : null;
|
|
2559
|
+
}
|
|
2559
2560
|
|
|
2560
2561
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2561
2562
|
var React33 = __toESM(require("react"));
|
|
2562
|
-
var
|
|
2563
|
+
var import_editor_controls10 = require("@elementor/editor-controls");
|
|
2563
2564
|
var import_i18n14 = require("@wordpress/i18n");
|
|
2564
2565
|
|
|
2565
2566
|
// src/controls-registry/styles-field.tsx
|
|
2566
2567
|
var React32 = __toESM(require("react"));
|
|
2567
|
-
var
|
|
2568
|
+
var import_editor_controls9 = require("@elementor/editor-controls");
|
|
2568
2569
|
var import_editor_styles4 = require("@elementor/editor-styles");
|
|
2569
2570
|
|
|
2570
2571
|
// src/hooks/use-styles-field.ts
|
|
@@ -2579,7 +2580,7 @@ function useStylesField(propName, meta) {
|
|
|
2579
2580
|
|
|
2580
2581
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2581
2582
|
var React31 = __toESM(require("react"));
|
|
2582
|
-
var
|
|
2583
|
+
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
2583
2584
|
var import_editor_props10 = require("@elementor/editor-props");
|
|
2584
2585
|
var import_editor_styles_repository14 = require("@elementor/editor-styles-repository");
|
|
2585
2586
|
var import_i18n13 = require("@wordpress/i18n");
|
|
@@ -2589,13 +2590,13 @@ var React30 = __toESM(require("react"));
|
|
|
2589
2590
|
var import_react24 = require("react");
|
|
2590
2591
|
var import_editor_canvas2 = require("@elementor/editor-canvas");
|
|
2591
2592
|
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
2592
|
-
var
|
|
2593
|
+
var import_ui24 = require("@elementor/ui");
|
|
2593
2594
|
var import_i18n12 = require("@wordpress/i18n");
|
|
2594
2595
|
|
|
2595
2596
|
// src/hooks/use-direction.ts
|
|
2596
|
-
var
|
|
2597
|
+
var import_ui19 = require("@elementor/ui");
|
|
2597
2598
|
function useDirection() {
|
|
2598
|
-
const theme = (0,
|
|
2599
|
+
const theme = (0, import_ui19.useTheme)();
|
|
2599
2600
|
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
2600
2601
|
return { isSiteRtl, isUiRtl };
|
|
2601
2602
|
}
|
|
@@ -2666,7 +2667,7 @@ var stylesInheritanceTransformersRegistry = (0, import_editor_canvas.createTrans
|
|
|
2666
2667
|
var React26 = __toESM(require("react"));
|
|
2667
2668
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
2668
2669
|
var import_icons4 = require("@elementor/icons");
|
|
2669
|
-
var
|
|
2670
|
+
var import_ui20 = require("@elementor/ui");
|
|
2670
2671
|
var SIZE3 = "tiny";
|
|
2671
2672
|
var DEFAULT_BREAKPOINT3 = "desktop";
|
|
2672
2673
|
var breakpointIconMap = {
|
|
@@ -2686,21 +2687,21 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
2686
2687
|
return null;
|
|
2687
2688
|
}
|
|
2688
2689
|
const breakpointLabel = breakpoints.find((breakpointItem) => breakpointItem.id === currentBreakpoint)?.label;
|
|
2689
|
-
return /* @__PURE__ */ React26.createElement(
|
|
2690
|
+
return /* @__PURE__ */ React26.createElement(import_ui20.Tooltip, { title: breakpointLabel, placement: "top" }, /* @__PURE__ */ React26.createElement(IconComponent, { fontSize: SIZE3, sx: { mt: "2px" } }));
|
|
2690
2691
|
};
|
|
2691
2692
|
|
|
2692
2693
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
2693
2694
|
var React27 = __toESM(require("react"));
|
|
2694
2695
|
var import_editor_styles_repository13 = require("@elementor/editor-styles-repository");
|
|
2695
2696
|
var import_icons5 = require("@elementor/icons");
|
|
2696
|
-
var
|
|
2697
|
+
var import_ui21 = require("@elementor/ui");
|
|
2697
2698
|
var import_i18n11 = require("@wordpress/i18n");
|
|
2698
2699
|
var SIZE4 = "tiny";
|
|
2699
2700
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
2700
2701
|
const isBaseStyle = provider === import_editor_styles_repository13.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
2701
|
-
const chipIcon = isBaseStyle ? /* @__PURE__ */ React27.createElement(
|
|
2702
|
+
const chipIcon = isBaseStyle ? /* @__PURE__ */ React27.createElement(import_ui21.Tooltip, { title: (0, import_i18n11.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React27.createElement(import_icons5.InfoCircleIcon, { fontSize: SIZE4 })) : void 0;
|
|
2702
2703
|
return /* @__PURE__ */ React27.createElement(
|
|
2703
|
-
|
|
2704
|
+
import_ui21.Chip,
|
|
2704
2705
|
{
|
|
2705
2706
|
label: displayLabel,
|
|
2706
2707
|
size: SIZE4,
|
|
@@ -2726,10 +2727,10 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
2726
2727
|
|
|
2727
2728
|
// src/styles-inheritance/components/infotip/value-component.tsx
|
|
2728
2729
|
var React28 = __toESM(require("react"));
|
|
2729
|
-
var
|
|
2730
|
+
var import_ui22 = require("@elementor/ui");
|
|
2730
2731
|
var ValueComponent = ({ index, value }) => {
|
|
2731
2732
|
return /* @__PURE__ */ React28.createElement(
|
|
2732
|
-
|
|
2733
|
+
import_ui22.Typography,
|
|
2733
2734
|
{
|
|
2734
2735
|
variant: "caption",
|
|
2735
2736
|
color: "text.tertiary",
|
|
@@ -2748,8 +2749,8 @@ var ValueComponent = ({ index, value }) => {
|
|
|
2748
2749
|
|
|
2749
2750
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
2750
2751
|
var React29 = __toESM(require("react"));
|
|
2751
|
-
var
|
|
2752
|
-
var ActionIcons = () => /* @__PURE__ */ React29.createElement(
|
|
2752
|
+
var import_ui23 = require("@elementor/ui");
|
|
2753
|
+
var ActionIcons = () => /* @__PURE__ */ React29.createElement(import_ui23.Box, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
2753
2754
|
|
|
2754
2755
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
2755
2756
|
var SECTION_PADDING_INLINE = 32;
|
|
@@ -2766,8 +2767,8 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2766
2767
|
});
|
|
2767
2768
|
}, [key, propType]);
|
|
2768
2769
|
const items3 = useNormalizedInheritanceChainItems(inheritanceChain, key, resolve);
|
|
2769
|
-
const infotipContent = /* @__PURE__ */ React30.createElement(
|
|
2770
|
-
|
|
2770
|
+
const infotipContent = /* @__PURE__ */ React30.createElement(import_ui24.ClickAwayListener, { onClickAway: closeInfotip }, /* @__PURE__ */ React30.createElement(
|
|
2771
|
+
import_ui24.Card,
|
|
2771
2772
|
{
|
|
2772
2773
|
elevation: 0,
|
|
2773
2774
|
sx: {
|
|
@@ -2780,7 +2781,7 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2780
2781
|
}
|
|
2781
2782
|
},
|
|
2782
2783
|
/* @__PURE__ */ React30.createElement(
|
|
2783
|
-
|
|
2784
|
+
import_ui24.Box,
|
|
2784
2785
|
{
|
|
2785
2786
|
sx: {
|
|
2786
2787
|
position: "sticky",
|
|
@@ -2792,7 +2793,7 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2792
2793
|
/* @__PURE__ */ React30.createElement(import_editor_ui5.PopoverHeader, { title: (0, import_i18n12.__)("Style origin", "elementor"), onClose: closeInfotip })
|
|
2793
2794
|
),
|
|
2794
2795
|
/* @__PURE__ */ React30.createElement(
|
|
2795
|
-
|
|
2796
|
+
import_ui24.CardContent,
|
|
2796
2797
|
{
|
|
2797
2798
|
sx: {
|
|
2798
2799
|
display: "flex",
|
|
@@ -2805,9 +2806,9 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2805
2806
|
}
|
|
2806
2807
|
}
|
|
2807
2808
|
},
|
|
2808
|
-
/* @__PURE__ */ React30.createElement(
|
|
2809
|
+
/* @__PURE__ */ React30.createElement(import_ui24.Stack, { gap: 1.5, sx: { pl: 3, pr: 1, pb: 2 }, role: "list" }, items3.map((item, index) => {
|
|
2809
2810
|
return /* @__PURE__ */ React30.createElement(
|
|
2810
|
-
|
|
2811
|
+
import_ui24.Box,
|
|
2811
2812
|
{
|
|
2812
2813
|
key: item.id,
|
|
2813
2814
|
display: "flex",
|
|
@@ -2818,13 +2819,13 @@ var StylesInheritanceInfotip = ({ inheritanceChain, propType, path, label, child
|
|
|
2818
2819
|
item.displayLabel
|
|
2819
2820
|
)
|
|
2820
2821
|
},
|
|
2821
|
-
/* @__PURE__ */ React30.createElement(
|
|
2822
|
+
/* @__PURE__ */ React30.createElement(import_ui24.Box, { display: "flex", gap: 0.5, sx: { flexWrap: "wrap", width: "100%" } }, /* @__PURE__ */ React30.createElement(BreakpointIcon, { breakpoint: item.breakpoint }), /* @__PURE__ */ React30.createElement(LabelChip, { displayLabel: item.displayLabel, provider: item.provider }), /* @__PURE__ */ React30.createElement(ValueComponent, { index, value: item.value })),
|
|
2822
2823
|
/* @__PURE__ */ React30.createElement(ActionIcons, null)
|
|
2823
2824
|
);
|
|
2824
2825
|
}))
|
|
2825
2826
|
)
|
|
2826
2827
|
));
|
|
2827
|
-
return /* @__PURE__ */ React30.createElement(TooltipOrInfotip, { showInfotip, onClose: closeInfotip, infotipContent }, /* @__PURE__ */ React30.createElement(
|
|
2828
|
+
return /* @__PURE__ */ React30.createElement(TooltipOrInfotip, { showInfotip, onClose: closeInfotip, infotipContent }, /* @__PURE__ */ React30.createElement(import_ui24.IconButton, { onClick: toggleInfotip, "aria-label": label, sx: { my: "-1px" } }, children));
|
|
2828
2829
|
};
|
|
2829
2830
|
function TooltipOrInfotip({
|
|
2830
2831
|
children,
|
|
@@ -2836,7 +2837,7 @@ function TooltipOrInfotip({
|
|
|
2836
2837
|
const forceInfotipAlignLeft = isSiteRtl ? 9999999 : -9999999;
|
|
2837
2838
|
if (showInfotip) {
|
|
2838
2839
|
return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(
|
|
2839
|
-
|
|
2840
|
+
import_ui24.Backdrop,
|
|
2840
2841
|
{
|
|
2841
2842
|
open: showInfotip,
|
|
2842
2843
|
onClick: onClose,
|
|
@@ -2846,7 +2847,7 @@ function TooltipOrInfotip({
|
|
|
2846
2847
|
}
|
|
2847
2848
|
}
|
|
2848
2849
|
), /* @__PURE__ */ React30.createElement(
|
|
2849
|
-
|
|
2850
|
+
import_ui24.Infotip,
|
|
2850
2851
|
{
|
|
2851
2852
|
placement: "top",
|
|
2852
2853
|
content: infotipContent,
|
|
@@ -2872,13 +2873,13 @@ function TooltipOrInfotip({
|
|
|
2872
2873
|
children
|
|
2873
2874
|
));
|
|
2874
2875
|
}
|
|
2875
|
-
return /* @__PURE__ */ React30.createElement(
|
|
2876
|
+
return /* @__PURE__ */ React30.createElement(import_ui24.Tooltip, { title: (0, import_i18n12.__)("Style origin", "elementor"), placement: "top" }, children);
|
|
2876
2877
|
}
|
|
2877
2878
|
|
|
2878
2879
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
2879
2880
|
var skipControls = ["box-shadow", "background-overlay", "filter", "backdrop-filter", "transform"];
|
|
2880
2881
|
var StylesInheritanceIndicator = () => {
|
|
2881
|
-
const { path, propType } = (0,
|
|
2882
|
+
const { path, propType } = (0, import_editor_controls7.useBoundProp)();
|
|
2882
2883
|
const inheritanceChain = useStylesInheritanceChain(path);
|
|
2883
2884
|
if (!path || path.some((pathItem) => skipControls.includes(pathItem)) || !inheritanceChain.length) {
|
|
2884
2885
|
return null;
|
|
@@ -2921,10 +2922,10 @@ var getLabel = ({ isFinalValue, hasValue }) => {
|
|
|
2921
2922
|
};
|
|
2922
2923
|
|
|
2923
2924
|
// src/controls-registry/conditional-field.tsx
|
|
2924
|
-
var
|
|
2925
|
+
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
2925
2926
|
var import_editor_props11 = require("@elementor/editor-props");
|
|
2926
2927
|
var ConditionalField = ({ children }) => {
|
|
2927
|
-
const { propType } = (0,
|
|
2928
|
+
const { propType } = (0, import_editor_controls8.useBoundProp)();
|
|
2928
2929
|
const depList = getDependencies(propType);
|
|
2929
2930
|
const { values: depValues } = useStylesFields(depList);
|
|
2930
2931
|
const isHidden = !(0, import_editor_props11.isDependencyMet)(propType?.dependencies, depValues);
|
|
@@ -2951,7 +2952,7 @@ var StylesField = ({ bind, propDisplayName, children }) => {
|
|
|
2951
2952
|
fields.setValue(newValue[bind]);
|
|
2952
2953
|
};
|
|
2953
2954
|
return /* @__PURE__ */ React32.createElement(
|
|
2954
|
-
|
|
2955
|
+
import_editor_controls9.ControlAdornmentsProvider,
|
|
2955
2956
|
{
|
|
2956
2957
|
items: [
|
|
2957
2958
|
{
|
|
@@ -2961,7 +2962,7 @@ var StylesField = ({ bind, propDisplayName, children }) => {
|
|
|
2961
2962
|
]
|
|
2962
2963
|
},
|
|
2963
2964
|
/* @__PURE__ */ React32.createElement(
|
|
2964
|
-
|
|
2965
|
+
import_editor_controls9.PropProvider,
|
|
2965
2966
|
{
|
|
2966
2967
|
propType,
|
|
2967
2968
|
value: { [bind]: value },
|
|
@@ -2969,7 +2970,7 @@ var StylesField = ({ bind, propDisplayName, children }) => {
|
|
|
2969
2970
|
placeholder: placeholderValues,
|
|
2970
2971
|
isDisabled: () => !canEdit
|
|
2971
2972
|
},
|
|
2972
|
-
/* @__PURE__ */ React32.createElement(
|
|
2973
|
+
/* @__PURE__ */ React32.createElement(import_editor_controls9.PropKeyProvider, { bind }, /* @__PURE__ */ React32.createElement(ConditionalField, null, children))
|
|
2973
2974
|
)
|
|
2974
2975
|
);
|
|
2975
2976
|
};
|
|
@@ -2977,7 +2978,7 @@ var StylesField = ({ bind, propDisplayName, children }) => {
|
|
|
2977
2978
|
// src/components/style-sections/background-section/background-section.tsx
|
|
2978
2979
|
var BACKGROUND_LABEL = (0, import_i18n14.__)("Background", "elementor");
|
|
2979
2980
|
var BackgroundSection = () => {
|
|
2980
|
-
return /* @__PURE__ */ React33.createElement(SectionContent, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "background", propDisplayName: BACKGROUND_LABEL }, /* @__PURE__ */ React33.createElement(
|
|
2981
|
+
return /* @__PURE__ */ React33.createElement(SectionContent, null, /* @__PURE__ */ React33.createElement(StylesField, { bind: "background", propDisplayName: BACKGROUND_LABEL }, /* @__PURE__ */ React33.createElement(import_editor_controls10.BackgroundControl, null)));
|
|
2981
2982
|
};
|
|
2982
2983
|
|
|
2983
2984
|
// src/components/style-sections/border-section/border-section.tsx
|
|
@@ -2985,18 +2986,18 @@ var React44 = __toESM(require("react"));
|
|
|
2985
2986
|
|
|
2986
2987
|
// src/components/panel-divider.tsx
|
|
2987
2988
|
var React34 = __toESM(require("react"));
|
|
2988
|
-
var
|
|
2989
|
-
var PanelDivider = () => /* @__PURE__ */ React34.createElement(
|
|
2989
|
+
var import_ui25 = require("@elementor/ui");
|
|
2990
|
+
var PanelDivider = () => /* @__PURE__ */ React34.createElement(import_ui25.Divider, { sx: { my: 0.5 } });
|
|
2990
2991
|
|
|
2991
2992
|
// src/components/style-sections/border-section/border-field.tsx
|
|
2992
2993
|
var React41 = __toESM(require("react"));
|
|
2993
|
-
var
|
|
2994
|
+
var import_editor_controls15 = require("@elementor/editor-controls");
|
|
2994
2995
|
var import_i18n18 = require("@wordpress/i18n");
|
|
2995
2996
|
|
|
2996
2997
|
// src/components/add-or-remove-content.tsx
|
|
2997
2998
|
var React35 = __toESM(require("react"));
|
|
2998
2999
|
var import_icons6 = require("@elementor/icons");
|
|
2999
|
-
var
|
|
3000
|
+
var import_ui26 = require("@elementor/ui");
|
|
3000
3001
|
var SIZE5 = "tiny";
|
|
3001
3002
|
var AddOrRemoveContent = ({
|
|
3002
3003
|
isAdded,
|
|
@@ -3007,7 +3008,7 @@ var AddOrRemoveContent = ({
|
|
|
3007
3008
|
renderLabel
|
|
3008
3009
|
}) => {
|
|
3009
3010
|
return /* @__PURE__ */ React35.createElement(SectionContent, null, /* @__PURE__ */ React35.createElement(
|
|
3010
|
-
|
|
3011
|
+
import_ui26.Stack,
|
|
3011
3012
|
{
|
|
3012
3013
|
direction: "row",
|
|
3013
3014
|
sx: {
|
|
@@ -3017,25 +3018,25 @@ var AddOrRemoveContent = ({
|
|
|
3017
3018
|
}
|
|
3018
3019
|
},
|
|
3019
3020
|
renderLabel(),
|
|
3020
|
-
isAdded ? /* @__PURE__ */ React35.createElement(
|
|
3021
|
-
), /* @__PURE__ */ React35.createElement(
|
|
3021
|
+
isAdded ? /* @__PURE__ */ React35.createElement(import_ui26.IconButton, { size: SIZE5, onClick: onRemove, "aria-label": "Remove", disabled }, /* @__PURE__ */ React35.createElement(import_icons6.MinusIcon, { fontSize: SIZE5 })) : /* @__PURE__ */ React35.createElement(import_ui26.IconButton, { size: SIZE5, onClick: onAdd, "aria-label": "Add", disabled }, /* @__PURE__ */ React35.createElement(import_icons6.PlusIcon, { fontSize: SIZE5 }))
|
|
3022
|
+
), /* @__PURE__ */ React35.createElement(import_ui26.Collapse, { in: isAdded, unmountOnExit: true }, /* @__PURE__ */ React35.createElement(SectionContent, null, children)));
|
|
3022
3023
|
};
|
|
3023
3024
|
|
|
3024
3025
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
3025
3026
|
var React38 = __toESM(require("react"));
|
|
3026
|
-
var
|
|
3027
|
+
var import_editor_controls12 = require("@elementor/editor-controls");
|
|
3027
3028
|
var import_i18n15 = require("@wordpress/i18n");
|
|
3028
3029
|
|
|
3029
3030
|
// src/components/styles-field-layout.tsx
|
|
3030
3031
|
var React37 = __toESM(require("react"));
|
|
3031
|
-
var
|
|
3032
|
+
var import_ui28 = require("@elementor/ui");
|
|
3032
3033
|
|
|
3033
3034
|
// src/components/control-label.tsx
|
|
3034
3035
|
var React36 = __toESM(require("react"));
|
|
3035
|
-
var
|
|
3036
|
-
var
|
|
3036
|
+
var import_editor_controls11 = require("@elementor/editor-controls");
|
|
3037
|
+
var import_ui27 = require("@elementor/ui");
|
|
3037
3038
|
var ControlLabel = ({ children }) => {
|
|
3038
|
-
return /* @__PURE__ */ React36.createElement(
|
|
3039
|
+
return /* @__PURE__ */ React36.createElement(import_ui27.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React36.createElement(import_editor_controls11.ControlFormLabel, null, children), /* @__PURE__ */ React36.createElement(import_editor_controls11.ControlAdornments, null));
|
|
3039
3040
|
};
|
|
3040
3041
|
|
|
3041
3042
|
// src/components/styles-field-layout.tsx
|
|
@@ -3046,8 +3047,8 @@ var StylesFieldLayout = React37.forwardRef((props, ref) => {
|
|
|
3046
3047
|
});
|
|
3047
3048
|
var Row = React37.forwardRef(
|
|
3048
3049
|
({ label, children }, ref) => {
|
|
3049
|
-
return /* @__PURE__ */ React37.createElement(
|
|
3050
|
-
|
|
3050
|
+
return /* @__PURE__ */ React37.createElement(import_ui28.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref }, /* @__PURE__ */ React37.createElement(import_ui28.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, label)), /* @__PURE__ */ React37.createElement(
|
|
3051
|
+
import_ui28.Grid,
|
|
3051
3052
|
{
|
|
3052
3053
|
item: true,
|
|
3053
3054
|
xs: 6,
|
|
@@ -3061,17 +3062,17 @@ var Row = React37.forwardRef(
|
|
|
3061
3062
|
);
|
|
3062
3063
|
var Column = React37.forwardRef(
|
|
3063
3064
|
({ label, children }, ref) => {
|
|
3064
|
-
return /* @__PURE__ */ React37.createElement(
|
|
3065
|
+
return /* @__PURE__ */ React37.createElement(import_ui28.Stack, { gap: 0.75, ref }, /* @__PURE__ */ React37.createElement(ControlLabel, null, label), children);
|
|
3065
3066
|
}
|
|
3066
3067
|
);
|
|
3067
3068
|
|
|
3068
3069
|
// src/components/style-sections/border-section/border-color-field.tsx
|
|
3069
3070
|
var BORDER_COLOR_LABEL = (0, import_i18n15.__)("Border color", "elementor");
|
|
3070
|
-
var BorderColorField = () => /* @__PURE__ */ React38.createElement(StylesField, { bind: "border-color", propDisplayName: BORDER_COLOR_LABEL }, /* @__PURE__ */ React38.createElement(StylesFieldLayout, { label: BORDER_COLOR_LABEL }, /* @__PURE__ */ React38.createElement(
|
|
3071
|
+
var BorderColorField = () => /* @__PURE__ */ React38.createElement(StylesField, { bind: "border-color", propDisplayName: BORDER_COLOR_LABEL }, /* @__PURE__ */ React38.createElement(StylesFieldLayout, { label: BORDER_COLOR_LABEL }, /* @__PURE__ */ React38.createElement(import_editor_controls12.ColorControl, null)));
|
|
3071
3072
|
|
|
3072
3073
|
// src/components/style-sections/border-section/border-style-field.tsx
|
|
3073
3074
|
var React39 = __toESM(require("react"));
|
|
3074
|
-
var
|
|
3075
|
+
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
3075
3076
|
var import_i18n16 = require("@wordpress/i18n");
|
|
3076
3077
|
var BORDER_TYPE_LABEL = (0, import_i18n16.__)("Border type", "elementor");
|
|
3077
3078
|
var borderStyles = [
|
|
@@ -3085,18 +3086,18 @@ var borderStyles = [
|
|
|
3085
3086
|
{ value: "inset", label: (0, import_i18n16.__)("Inset", "elementor") },
|
|
3086
3087
|
{ value: "outset", label: (0, import_i18n16.__)("Outset", "elementor") }
|
|
3087
3088
|
];
|
|
3088
|
-
var BorderStyleField = () => /* @__PURE__ */ React39.createElement(StylesField, { bind: "border-style", propDisplayName: BORDER_TYPE_LABEL }, /* @__PURE__ */ React39.createElement(StylesFieldLayout, { label: BORDER_TYPE_LABEL }, /* @__PURE__ */ React39.createElement(
|
|
3089
|
+
var BorderStyleField = () => /* @__PURE__ */ React39.createElement(StylesField, { bind: "border-style", propDisplayName: BORDER_TYPE_LABEL }, /* @__PURE__ */ React39.createElement(StylesFieldLayout, { label: BORDER_TYPE_LABEL }, /* @__PURE__ */ React39.createElement(import_editor_controls13.SelectControl, { options: borderStyles })));
|
|
3089
3090
|
|
|
3090
3091
|
// src/components/style-sections/border-section/border-width-field.tsx
|
|
3091
3092
|
var React40 = __toESM(require("react"));
|
|
3092
|
-
var
|
|
3093
|
+
var import_editor_controls14 = require("@elementor/editor-controls");
|
|
3093
3094
|
var import_editor_props12 = require("@elementor/editor-props");
|
|
3094
3095
|
var import_icons7 = require("@elementor/icons");
|
|
3095
|
-
var
|
|
3096
|
+
var import_ui29 = require("@elementor/ui");
|
|
3096
3097
|
var import_i18n17 = require("@wordpress/i18n");
|
|
3097
3098
|
var BORDER_WIDTH_LABEL = (0, import_i18n17.__)("Border width", "elementor");
|
|
3098
|
-
var InlineStartIcon = (0,
|
|
3099
|
-
var InlineEndIcon = (0,
|
|
3099
|
+
var InlineStartIcon = (0, import_ui29.withDirection)(import_icons7.SideRightIcon);
|
|
3100
|
+
var InlineEndIcon = (0, import_ui29.withDirection)(import_icons7.SideLeftIcon);
|
|
3100
3101
|
var getEdges = (isSiteRtl) => [
|
|
3101
3102
|
{
|
|
3102
3103
|
label: (0, import_i18n17.__)("Top", "elementor"),
|
|
@@ -3122,7 +3123,7 @@ var getEdges = (isSiteRtl) => [
|
|
|
3122
3123
|
var BorderWidthField = () => {
|
|
3123
3124
|
const { isSiteRtl } = useDirection();
|
|
3124
3125
|
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "border-width", propDisplayName: BORDER_WIDTH_LABEL }, /* @__PURE__ */ React40.createElement(
|
|
3125
|
-
|
|
3126
|
+
import_editor_controls14.EqualUnequalSizesControl,
|
|
3126
3127
|
{
|
|
3127
3128
|
items: getEdges(isSiteRtl),
|
|
3128
3129
|
label: BORDER_WIDTH_LABEL,
|
|
@@ -3164,7 +3165,7 @@ var BorderField = () => {
|
|
|
3164
3165
|
onAdd: addBorder,
|
|
3165
3166
|
onRemove: removeBorder,
|
|
3166
3167
|
disabled: !canEdit,
|
|
3167
|
-
renderLabel: () => /* @__PURE__ */ React41.createElement(
|
|
3168
|
+
renderLabel: () => /* @__PURE__ */ React41.createElement(import_editor_controls15.ControlFormLabel, null, BORDER_LABEL)
|
|
3168
3169
|
},
|
|
3169
3170
|
/* @__PURE__ */ React41.createElement(BorderWidthField, null),
|
|
3170
3171
|
/* @__PURE__ */ React41.createElement(BorderColorField, null),
|
|
@@ -3174,26 +3175,26 @@ var BorderField = () => {
|
|
|
3174
3175
|
|
|
3175
3176
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
3176
3177
|
var React43 = __toESM(require("react"));
|
|
3177
|
-
var
|
|
3178
|
+
var import_editor_controls16 = require("@elementor/editor-controls");
|
|
3178
3179
|
var import_editor_props13 = require("@elementor/editor-props");
|
|
3179
3180
|
var import_icons8 = require("@elementor/icons");
|
|
3180
|
-
var
|
|
3181
|
+
var import_ui31 = require("@elementor/ui");
|
|
3181
3182
|
var import_i18n19 = require("@wordpress/i18n");
|
|
3182
3183
|
|
|
3183
3184
|
// src/styles-inheritance/components/ui-providers.tsx
|
|
3184
3185
|
var React42 = __toESM(require("react"));
|
|
3185
|
-
var
|
|
3186
|
+
var import_ui30 = require("@elementor/ui");
|
|
3186
3187
|
var UiProviders = ({ children }) => {
|
|
3187
3188
|
const { isSiteRtl } = useDirection();
|
|
3188
|
-
return /* @__PURE__ */ React42.createElement(
|
|
3189
|
+
return /* @__PURE__ */ React42.createElement(import_ui30.DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React42.createElement(import_ui30.ThemeProvider, null, children));
|
|
3189
3190
|
};
|
|
3190
3191
|
|
|
3191
3192
|
// src/components/style-sections/border-section/border-radius-field.tsx
|
|
3192
3193
|
var BORDER_RADIUS_LABEL = (0, import_i18n19.__)("Border radius", "elementor");
|
|
3193
|
-
var StartStartIcon = (0,
|
|
3194
|
-
var StartEndIcon = (0,
|
|
3195
|
-
var EndStartIcon = (0,
|
|
3196
|
-
var EndEndIcon = (0,
|
|
3194
|
+
var StartStartIcon = (0, import_ui31.withDirection)(import_icons8.RadiusTopLeftIcon);
|
|
3195
|
+
var StartEndIcon = (0, import_ui31.withDirection)(import_icons8.RadiusTopRightIcon);
|
|
3196
|
+
var EndStartIcon = (0, import_ui31.withDirection)(import_icons8.RadiusBottomLeftIcon);
|
|
3197
|
+
var EndEndIcon = (0, import_ui31.withDirection)(import_icons8.RadiusBottomRightIcon);
|
|
3197
3198
|
var getStartStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n19.__)("Top right", "elementor") : (0, import_i18n19.__)("Top left", "elementor");
|
|
3198
3199
|
var getStartEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n19.__)("Top left", "elementor") : (0, import_i18n19.__)("Top right", "elementor");
|
|
3199
3200
|
var getEndStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n19.__)("Bottom right", "elementor") : (0, import_i18n19.__)("Bottom left", "elementor");
|
|
@@ -3223,7 +3224,7 @@ var getCorners = (isSiteRtl) => [
|
|
|
3223
3224
|
var BorderRadiusField = () => {
|
|
3224
3225
|
const { isSiteRtl } = useDirection();
|
|
3225
3226
|
return /* @__PURE__ */ React43.createElement(UiProviders, null, /* @__PURE__ */ React43.createElement(StylesField, { bind: "border-radius", propDisplayName: BORDER_RADIUS_LABEL }, /* @__PURE__ */ React43.createElement(
|
|
3226
|
-
|
|
3227
|
+
import_editor_controls16.EqualUnequalSizesControl,
|
|
3227
3228
|
{
|
|
3228
3229
|
items: getCorners(isSiteRtl),
|
|
3229
3230
|
label: BORDER_RADIUS_LABEL,
|
|
@@ -3239,19 +3240,19 @@ var BorderSection = () => /* @__PURE__ */ React44.createElement(SectionContent,
|
|
|
3239
3240
|
|
|
3240
3241
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
3241
3242
|
var React46 = __toESM(require("react"));
|
|
3242
|
-
var
|
|
3243
|
+
var import_editor_controls18 = require("@elementor/editor-controls");
|
|
3243
3244
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
3244
3245
|
var import_i18n21 = require("@wordpress/i18n");
|
|
3245
3246
|
|
|
3246
3247
|
// src/components/style-sections/effects-section/opacity-control-field.tsx
|
|
3247
3248
|
var React45 = __toESM(require("react"));
|
|
3248
3249
|
var import_react25 = require("react");
|
|
3249
|
-
var
|
|
3250
|
+
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
3250
3251
|
var import_i18n20 = require("@wordpress/i18n");
|
|
3251
3252
|
var OPACITY_LABEL = (0, import_i18n20.__)("Opacity", "elementor");
|
|
3252
3253
|
var OpacityControlField = () => {
|
|
3253
3254
|
const rowRef = (0, import_react25.useRef)(null);
|
|
3254
|
-
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React45.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React45.createElement(
|
|
3255
|
+
return /* @__PURE__ */ React45.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React45.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React45.createElement(import_editor_controls17.SizeControl, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
3255
3256
|
};
|
|
3256
3257
|
|
|
3257
3258
|
// src/components/style-sections/effects-section/effects-section.tsx
|
|
@@ -3263,12 +3264,12 @@ var TRANSITIONS_LABEL = (0, import_i18n21.__)("Transitions", "elementor");
|
|
|
3263
3264
|
var EffectsSection = () => {
|
|
3264
3265
|
const shouldShowTransition = (0, import_editor_v1_adapters5.isExperimentActive)(import_editor_v1_adapters5.EXPERIMENTAL_FEATURES.TRANSITIONS);
|
|
3265
3266
|
const isUnstableRepeaterActive = (0, import_editor_v1_adapters5.isExperimentActive)(import_editor_v1_adapters5.EXPERIMENTAL_FEATURES.UNSTABLE_REPEATER);
|
|
3266
|
-
return /* @__PURE__ */ React46.createElement(SectionContent, null, /* @__PURE__ */ React46.createElement(OpacityControlField, null), /* @__PURE__ */ React46.createElement(PanelDivider, null), /* @__PURE__ */ React46.createElement(StylesField, { bind: "box-shadow", propDisplayName: BOX_SHADOW_LABEL }, /* @__PURE__ */ React46.createElement(
|
|
3267
|
+
return /* @__PURE__ */ React46.createElement(SectionContent, null, /* @__PURE__ */ React46.createElement(OpacityControlField, null), /* @__PURE__ */ React46.createElement(PanelDivider, null), /* @__PURE__ */ React46.createElement(StylesField, { bind: "box-shadow", propDisplayName: BOX_SHADOW_LABEL }, /* @__PURE__ */ React46.createElement(import_editor_controls18.BoxShadowRepeaterControl, null)), /* @__PURE__ */ React46.createElement(PanelDivider, null), /* @__PURE__ */ React46.createElement(StylesField, { bind: "transform", propDisplayName: TRANSFORM_LABEL }, isUnstableRepeaterActive ? /* @__PURE__ */ React46.createElement(import_editor_controls18.UnstableTransformRepeaterControl, null) : /* @__PURE__ */ React46.createElement(import_editor_controls18.TransformRepeaterControl, null)), shouldShowTransition && /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(PanelDivider, null), /* @__PURE__ */ React46.createElement(StylesField, { bind: "transition", propDisplayName: TRANSITIONS_LABEL }, /* @__PURE__ */ React46.createElement(import_editor_controls18.TransitionRepeaterControl, null))), /* @__PURE__ */ React46.createElement(PanelDivider, null), /* @__PURE__ */ React46.createElement(StylesField, { bind: "filter", propDisplayName: FILTER_LABEL }, /* @__PURE__ */ React46.createElement(import_editor_controls18.FilterRepeaterControl, null)), /* @__PURE__ */ React46.createElement(PanelDivider, null), /* @__PURE__ */ React46.createElement(StylesField, { bind: "backdrop-filter", propDisplayName: BACKDROP_FILTER_LABEL }, /* @__PURE__ */ React46.createElement(import_editor_controls18.FilterRepeaterControl, { filterPropName: "backdrop-filter" })));
|
|
3267
3268
|
};
|
|
3268
3269
|
|
|
3269
3270
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
3270
3271
|
var React58 = __toESM(require("react"));
|
|
3271
|
-
var
|
|
3272
|
+
var import_editor_controls29 = require("@elementor/editor-controls");
|
|
3272
3273
|
var import_editor_elements9 = require("@elementor/editor-elements");
|
|
3273
3274
|
var import_i18n33 = require("@wordpress/i18n");
|
|
3274
3275
|
|
|
@@ -3299,15 +3300,15 @@ function useComputedStyle(elementId) {
|
|
|
3299
3300
|
|
|
3300
3301
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
3301
3302
|
var React48 = __toESM(require("react"));
|
|
3302
|
-
var
|
|
3303
|
+
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
3303
3304
|
var import_icons9 = require("@elementor/icons");
|
|
3304
|
-
var
|
|
3305
|
+
var import_ui33 = require("@elementor/ui");
|
|
3305
3306
|
var import_i18n23 = require("@wordpress/i18n");
|
|
3306
3307
|
|
|
3307
3308
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
3308
3309
|
var React47 = __toESM(require("react"));
|
|
3309
3310
|
var import_react26 = require("react");
|
|
3310
|
-
var
|
|
3311
|
+
var import_ui32 = require("@elementor/ui");
|
|
3311
3312
|
var import_i18n22 = require("@wordpress/i18n");
|
|
3312
3313
|
var FLEX_DIRECTION_LABEL = (0, import_i18n22.__)("Flex direction", "elementor");
|
|
3313
3314
|
var CLOCKWISE_ANGLES = {
|
|
@@ -3337,7 +3338,7 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
3337
3338
|
const { value: direction } = useStylesField("flex-direction", {
|
|
3338
3339
|
history: { propDisplayName: FLEX_DIRECTION_LABEL }
|
|
3339
3340
|
});
|
|
3340
|
-
const isRtl = "rtl" === (0,
|
|
3341
|
+
const isRtl = "rtl" === (0, import_ui32.useTheme)().direction;
|
|
3341
3342
|
const rotationMultiplier = isRtl ? -1 : 1;
|
|
3342
3343
|
const angleMap = isClockwise ? CLOCKWISE_ANGLES : COUNTER_CLOCKWISE_ANGLES;
|
|
3343
3344
|
const currentDirection = direction?.value || "row";
|
|
@@ -3353,8 +3354,8 @@ var useGetTargetAngle = (isClockwise, offset, disableRotationForReversed, existi
|
|
|
3353
3354
|
|
|
3354
3355
|
// src/components/style-sections/layout-section/align-content-field.tsx
|
|
3355
3356
|
var ALIGN_CONTENT_LABEL = (0, import_i18n23.__)("Align content", "elementor");
|
|
3356
|
-
var StartIcon = (0,
|
|
3357
|
-
var EndIcon = (0,
|
|
3357
|
+
var StartIcon = (0, import_ui33.withDirection)(import_icons9.JustifyTopIcon);
|
|
3358
|
+
var EndIcon = (0, import_ui33.withDirection)(import_icons9.JustifyBottomIcon);
|
|
3358
3359
|
var iconProps = {
|
|
3359
3360
|
isClockwise: false,
|
|
3360
3361
|
offset: 0,
|
|
@@ -3398,17 +3399,17 @@ var options = [
|
|
|
3398
3399
|
showTooltip: true
|
|
3399
3400
|
}
|
|
3400
3401
|
];
|
|
3401
|
-
var AlignContentField = () => /* @__PURE__ */ React48.createElement(StylesField, { bind: "align-content", propDisplayName: ALIGN_CONTENT_LABEL }, /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(StylesFieldLayout, { label: ALIGN_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React48.createElement(
|
|
3402
|
+
var AlignContentField = () => /* @__PURE__ */ React48.createElement(StylesField, { bind: "align-content", propDisplayName: ALIGN_CONTENT_LABEL }, /* @__PURE__ */ React48.createElement(UiProviders, null, /* @__PURE__ */ React48.createElement(StylesFieldLayout, { label: ALIGN_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React48.createElement(import_editor_controls19.ToggleControl, { options, fullWidth: true }))));
|
|
3402
3403
|
|
|
3403
3404
|
// src/components/style-sections/layout-section/align-items-field.tsx
|
|
3404
3405
|
var React49 = __toESM(require("react"));
|
|
3405
|
-
var
|
|
3406
|
+
var import_editor_controls20 = require("@elementor/editor-controls");
|
|
3406
3407
|
var import_icons10 = require("@elementor/icons");
|
|
3407
|
-
var
|
|
3408
|
+
var import_ui34 = require("@elementor/ui");
|
|
3408
3409
|
var import_i18n24 = require("@wordpress/i18n");
|
|
3409
3410
|
var ALIGN_ITEMS_LABEL = (0, import_i18n24.__)("Align items", "elementor");
|
|
3410
|
-
var StartIcon2 = (0,
|
|
3411
|
-
var EndIcon2 = (0,
|
|
3411
|
+
var StartIcon2 = (0, import_ui34.withDirection)(import_icons10.LayoutAlignLeftIcon);
|
|
3412
|
+
var EndIcon2 = (0, import_ui34.withDirection)(import_icons10.LayoutAlignRightIcon);
|
|
3412
3413
|
var iconProps2 = {
|
|
3413
3414
|
isClockwise: false,
|
|
3414
3415
|
offset: 90
|
|
@@ -3440,14 +3441,14 @@ var options2 = [
|
|
|
3440
3441
|
}
|
|
3441
3442
|
];
|
|
3442
3443
|
var AlignItemsField = () => {
|
|
3443
|
-
return /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "align-items", propDisplayName: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React49.createElement(StylesFieldLayout, { label: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React49.createElement(
|
|
3444
|
+
return /* @__PURE__ */ React49.createElement(UiProviders, null, /* @__PURE__ */ React49.createElement(StylesField, { bind: "align-items", propDisplayName: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React49.createElement(StylesFieldLayout, { label: ALIGN_ITEMS_LABEL }, /* @__PURE__ */ React49.createElement(import_editor_controls20.ToggleControl, { options: options2 }))));
|
|
3444
3445
|
};
|
|
3445
3446
|
|
|
3446
3447
|
// src/components/style-sections/layout-section/align-self-child-field.tsx
|
|
3447
3448
|
var React50 = __toESM(require("react"));
|
|
3448
|
-
var
|
|
3449
|
+
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3449
3450
|
var import_icons11 = require("@elementor/icons");
|
|
3450
|
-
var
|
|
3451
|
+
var import_ui35 = require("@elementor/ui");
|
|
3451
3452
|
var import_i18n25 = require("@wordpress/i18n");
|
|
3452
3453
|
var ALIGN_SELF_LABEL = (0, import_i18n25.__)("Align self", "elementor");
|
|
3453
3454
|
var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
@@ -3456,8 +3457,8 @@ var ALIGN_SELF_CHILD_OFFSET_MAP = {
|
|
|
3456
3457
|
column: 0,
|
|
3457
3458
|
"column-reverse": 0
|
|
3458
3459
|
};
|
|
3459
|
-
var StartIcon3 = (0,
|
|
3460
|
-
var EndIcon3 = (0,
|
|
3460
|
+
var StartIcon3 = (0, import_ui35.withDirection)(import_icons11.LayoutAlignLeftIcon);
|
|
3461
|
+
var EndIcon3 = (0, import_ui35.withDirection)(import_icons11.LayoutAlignRightIcon);
|
|
3461
3462
|
var iconProps3 = {
|
|
3462
3463
|
isClockwise: false
|
|
3463
3464
|
};
|
|
@@ -3519,11 +3520,11 @@ var getOptions = (parentStyleDirection) => [
|
|
|
3519
3520
|
showTooltip: true
|
|
3520
3521
|
}
|
|
3521
3522
|
];
|
|
3522
|
-
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React50.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL }, /* @__PURE__ */ React50.createElement(UiProviders, null, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL }, /* @__PURE__ */ React50.createElement(
|
|
3523
|
+
var AlignSelfChild = ({ parentStyleDirection }) => /* @__PURE__ */ React50.createElement(StylesField, { bind: "align-self", propDisplayName: ALIGN_SELF_LABEL }, /* @__PURE__ */ React50.createElement(UiProviders, null, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: ALIGN_SELF_LABEL }, /* @__PURE__ */ React50.createElement(import_editor_controls21.ToggleControl, { options: getOptions(parentStyleDirection) }))));
|
|
3523
3524
|
|
|
3524
3525
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
3525
3526
|
var React51 = __toESM(require("react"));
|
|
3526
|
-
var
|
|
3527
|
+
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
3527
3528
|
var import_i18n26 = require("@wordpress/i18n");
|
|
3528
3529
|
var DISPLAY_LABEL = (0, import_i18n26.__)("Display", "elementor");
|
|
3529
3530
|
var displayFieldItems = [
|
|
@@ -3560,15 +3561,15 @@ var displayFieldItems = [
|
|
|
3560
3561
|
];
|
|
3561
3562
|
var DisplayField = () => {
|
|
3562
3563
|
const placeholder = useDisplayPlaceholderValue();
|
|
3563
|
-
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "display", propDisplayName: DISPLAY_LABEL, placeholder }, /* @__PURE__ */ React51.createElement(StylesFieldLayout, { label: DISPLAY_LABEL, direction: "column" }, /* @__PURE__ */ React51.createElement(
|
|
3564
|
+
return /* @__PURE__ */ React51.createElement(StylesField, { bind: "display", propDisplayName: DISPLAY_LABEL, placeholder }, /* @__PURE__ */ React51.createElement(StylesFieldLayout, { label: DISPLAY_LABEL, direction: "column" }, /* @__PURE__ */ React51.createElement(import_editor_controls22.ToggleControl, { options: displayFieldItems, maxItems: 4, fullWidth: true })));
|
|
3564
3565
|
};
|
|
3565
3566
|
var useDisplayPlaceholderValue = () => useStylesInheritanceChain(["display"])[0]?.value ?? void 0;
|
|
3566
3567
|
|
|
3567
3568
|
// src/components/style-sections/layout-section/flex-direction-field.tsx
|
|
3568
3569
|
var React52 = __toESM(require("react"));
|
|
3569
|
-
var
|
|
3570
|
+
var import_editor_controls23 = require("@elementor/editor-controls");
|
|
3570
3571
|
var import_icons12 = require("@elementor/icons");
|
|
3571
|
-
var
|
|
3572
|
+
var import_ui36 = require("@elementor/ui");
|
|
3572
3573
|
var import_i18n27 = require("@wordpress/i18n");
|
|
3573
3574
|
var FLEX_DIRECTION_LABEL2 = (0, import_i18n27.__)("Direction", "elementor");
|
|
3574
3575
|
var options3 = [
|
|
@@ -3576,7 +3577,7 @@ var options3 = [
|
|
|
3576
3577
|
value: "row",
|
|
3577
3578
|
label: (0, import_i18n27.__)("Row", "elementor"),
|
|
3578
3579
|
renderContent: ({ size }) => {
|
|
3579
|
-
const StartIcon5 = (0,
|
|
3580
|
+
const StartIcon5 = (0, import_ui36.withDirection)(import_icons12.ArrowRightIcon);
|
|
3580
3581
|
return /* @__PURE__ */ React52.createElement(StartIcon5, { fontSize: size });
|
|
3581
3582
|
},
|
|
3582
3583
|
showTooltip: true
|
|
@@ -3591,7 +3592,7 @@ var options3 = [
|
|
|
3591
3592
|
value: "row-reverse",
|
|
3592
3593
|
label: (0, import_i18n27.__)("Reversed row", "elementor"),
|
|
3593
3594
|
renderContent: ({ size }) => {
|
|
3594
|
-
const EndIcon5 = (0,
|
|
3595
|
+
const EndIcon5 = (0, import_ui36.withDirection)(import_icons12.ArrowLeftIcon);
|
|
3595
3596
|
return /* @__PURE__ */ React52.createElement(EndIcon5, { fontSize: size });
|
|
3596
3597
|
},
|
|
3597
3598
|
showTooltip: true
|
|
@@ -3604,15 +3605,15 @@ var options3 = [
|
|
|
3604
3605
|
}
|
|
3605
3606
|
];
|
|
3606
3607
|
var FlexDirectionField = () => {
|
|
3607
|
-
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "flex-direction", propDisplayName: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React52.createElement(
|
|
3608
|
+
return /* @__PURE__ */ React52.createElement(StylesField, { bind: "flex-direction", propDisplayName: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React52.createElement(UiProviders, null, /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: FLEX_DIRECTION_LABEL2 }, /* @__PURE__ */ React52.createElement(import_editor_controls23.ToggleControl, { options: options3 }))));
|
|
3608
3609
|
};
|
|
3609
3610
|
|
|
3610
3611
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3611
3612
|
var React53 = __toESM(require("react"));
|
|
3612
3613
|
var import_react27 = require("react");
|
|
3613
|
-
var
|
|
3614
|
+
var import_editor_controls24 = require("@elementor/editor-controls");
|
|
3614
3615
|
var import_icons13 = require("@elementor/icons");
|
|
3615
|
-
var
|
|
3616
|
+
var import_ui37 = require("@elementor/ui");
|
|
3616
3617
|
var import_i18n28 = require("@wordpress/i18n");
|
|
3617
3618
|
var ORDER_LABEL = (0, import_i18n28.__)("Order", "elementor");
|
|
3618
3619
|
var FIRST_DEFAULT_VALUE = -99999;
|
|
@@ -3666,7 +3667,7 @@ var FlexOrderField = () => {
|
|
|
3666
3667
|
setOrder({ $$type: "number", value: orderValueMap[group] });
|
|
3667
3668
|
};
|
|
3668
3669
|
return /* @__PURE__ */ React53.createElement(StylesField, { bind: "order", propDisplayName: ORDER_LABEL }, /* @__PURE__ */ React53.createElement(UiProviders, null, /* @__PURE__ */ React53.createElement(SectionContent, null, /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: ORDER_LABEL }, /* @__PURE__ */ React53.createElement(
|
|
3669
|
-
|
|
3670
|
+
import_editor_controls24.ControlToggleButtonGroup,
|
|
3670
3671
|
{
|
|
3671
3672
|
items,
|
|
3672
3673
|
value: groupControlValue,
|
|
@@ -3674,8 +3675,8 @@ var FlexOrderField = () => {
|
|
|
3674
3675
|
exclusive: true,
|
|
3675
3676
|
disabled: !canEdit
|
|
3676
3677
|
}
|
|
3677
|
-
)), CUSTOM === groupControlValue && /* @__PURE__ */ React53.createElement(
|
|
3678
|
-
|
|
3678
|
+
)), CUSTOM === groupControlValue && /* @__PURE__ */ React53.createElement(import_ui37.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React53.createElement(import_ui37.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React53.createElement(ControlLabel, null, (0, import_i18n28.__)("Custom order", "elementor"))), /* @__PURE__ */ React53.createElement(import_ui37.Grid, { item: true, xs: 6, sx: { display: "flex", justifyContent: "end" } }, /* @__PURE__ */ React53.createElement(
|
|
3679
|
+
import_editor_controls24.NumberControl,
|
|
3679
3680
|
{
|
|
3680
3681
|
min: FIRST_DEFAULT_VALUE + 1,
|
|
3681
3682
|
max: LAST_DEFAULT_VALUE - 1,
|
|
@@ -3696,7 +3697,7 @@ var getGroupControlValue = (order) => {
|
|
|
3696
3697
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
3697
3698
|
var React54 = __toESM(require("react"));
|
|
3698
3699
|
var import_react28 = require("react");
|
|
3699
|
-
var
|
|
3700
|
+
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
3700
3701
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
3701
3702
|
var import_icons14 = require("@elementor/icons");
|
|
3702
3703
|
var import_i18n29 = require("@wordpress/i18n");
|
|
@@ -3750,7 +3751,7 @@ var FlexSizeField = () => {
|
|
|
3750
3751
|
setValue(newFlexValue);
|
|
3751
3752
|
};
|
|
3752
3753
|
return /* @__PURE__ */ React54.createElement(UiProviders, null, /* @__PURE__ */ React54.createElement(SectionContent, null, /* @__PURE__ */ React54.createElement(StylesField, { bind: "flex", propDisplayName: FLEX_SIZE_LABEL }, /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: FLEX_SIZE_LABEL }, /* @__PURE__ */ React54.createElement(
|
|
3753
|
-
|
|
3754
|
+
import_editor_controls25.ControlToggleButtonGroup,
|
|
3754
3755
|
{
|
|
3755
3756
|
value: activeGroup,
|
|
3756
3757
|
onChange: onChangeGroup,
|
|
@@ -3792,8 +3793,8 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
3792
3793
|
};
|
|
3793
3794
|
var FlexCustomField = () => {
|
|
3794
3795
|
const flexBasisRowRef = (0, import_react28.useRef)(null);
|
|
3795
|
-
const context = (0,
|
|
3796
|
-
return /* @__PURE__ */ React54.createElement(
|
|
3796
|
+
const context = (0, import_editor_controls25.useBoundProp)(import_editor_props14.flexPropTypeUtil);
|
|
3797
|
+
return /* @__PURE__ */ React54.createElement(import_editor_controls25.PropProvider, { ...context }, /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: (0, import_i18n29.__)("Grow", "elementor") }, /* @__PURE__ */ React54.createElement(import_editor_controls25.PropKeyProvider, { bind: "flexGrow" }, /* @__PURE__ */ React54.createElement(import_editor_controls25.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: (0, import_i18n29.__)("Shrink", "elementor") }, /* @__PURE__ */ React54.createElement(import_editor_controls25.PropKeyProvider, { bind: "flexShrink" }, /* @__PURE__ */ React54.createElement(import_editor_controls25.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React54.createElement(StylesFieldLayout, { label: (0, import_i18n29.__)("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React54.createElement(import_editor_controls25.PropKeyProvider, { bind: "flexBasis" }, /* @__PURE__ */ React54.createElement(import_editor_controls25.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
3797
3798
|
};
|
|
3798
3799
|
var getActiveGroup = ({
|
|
3799
3800
|
grow,
|
|
@@ -3817,22 +3818,22 @@ var getActiveGroup = ({
|
|
|
3817
3818
|
|
|
3818
3819
|
// src/components/style-sections/layout-section/gap-control-field.tsx
|
|
3819
3820
|
var React55 = __toESM(require("react"));
|
|
3820
|
-
var
|
|
3821
|
+
var import_editor_controls26 = require("@elementor/editor-controls");
|
|
3821
3822
|
var import_i18n30 = require("@wordpress/i18n");
|
|
3822
3823
|
var GAPS_LABEL = (0, import_i18n30.__)("Gaps", "elementor");
|
|
3823
3824
|
var GapControlField = () => {
|
|
3824
|
-
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "gap", propDisplayName: GAPS_LABEL }, /* @__PURE__ */ React55.createElement(
|
|
3825
|
+
return /* @__PURE__ */ React55.createElement(StylesField, { bind: "gap", propDisplayName: GAPS_LABEL }, /* @__PURE__ */ React55.createElement(import_editor_controls26.GapControl, { label: GAPS_LABEL }));
|
|
3825
3826
|
};
|
|
3826
3827
|
|
|
3827
3828
|
// src/components/style-sections/layout-section/justify-content-field.tsx
|
|
3828
3829
|
var React56 = __toESM(require("react"));
|
|
3829
|
-
var
|
|
3830
|
+
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
3830
3831
|
var import_icons15 = require("@elementor/icons");
|
|
3831
|
-
var
|
|
3832
|
+
var import_ui38 = require("@elementor/ui");
|
|
3832
3833
|
var import_i18n31 = require("@wordpress/i18n");
|
|
3833
3834
|
var JUSTIFY_CONTENT_LABEL = (0, import_i18n31.__)("Justify content", "elementor");
|
|
3834
|
-
var StartIcon4 = (0,
|
|
3835
|
-
var EndIcon4 = (0,
|
|
3835
|
+
var StartIcon4 = (0, import_ui38.withDirection)(import_icons15.JustifyTopIcon);
|
|
3836
|
+
var EndIcon4 = (0, import_ui38.withDirection)(import_icons15.JustifyBottomIcon);
|
|
3836
3837
|
var iconProps4 = {
|
|
3837
3838
|
isClockwise: true,
|
|
3838
3839
|
offset: -90
|
|
@@ -3875,11 +3876,11 @@ var options4 = [
|
|
|
3875
3876
|
showTooltip: true
|
|
3876
3877
|
}
|
|
3877
3878
|
];
|
|
3878
|
-
var JustifyContentField = () => /* @__PURE__ */ React56.createElement(StylesField, { bind: "justify-content", propDisplayName: JUSTIFY_CONTENT_LABEL }, /* @__PURE__ */ React56.createElement(UiProviders, null, /* @__PURE__ */ React56.createElement(StylesFieldLayout, { label: JUSTIFY_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React56.createElement(
|
|
3879
|
+
var JustifyContentField = () => /* @__PURE__ */ React56.createElement(StylesField, { bind: "justify-content", propDisplayName: JUSTIFY_CONTENT_LABEL }, /* @__PURE__ */ React56.createElement(UiProviders, null, /* @__PURE__ */ React56.createElement(StylesFieldLayout, { label: JUSTIFY_CONTENT_LABEL, direction: "column" }, /* @__PURE__ */ React56.createElement(import_editor_controls27.ToggleControl, { options: options4, fullWidth: true }))));
|
|
3879
3880
|
|
|
3880
3881
|
// src/components/style-sections/layout-section/wrap-field.tsx
|
|
3881
3882
|
var React57 = __toESM(require("react"));
|
|
3882
|
-
var
|
|
3883
|
+
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
3883
3884
|
var import_icons16 = require("@elementor/icons");
|
|
3884
3885
|
var import_i18n32 = require("@wordpress/i18n");
|
|
3885
3886
|
var FLEX_WRAP_LABEL = (0, import_i18n32.__)("Wrap", "elementor");
|
|
@@ -3904,7 +3905,7 @@ var options5 = [
|
|
|
3904
3905
|
}
|
|
3905
3906
|
];
|
|
3906
3907
|
var WrapField = () => {
|
|
3907
|
-
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "flex-wrap", propDisplayName: FLEX_WRAP_LABEL }, /* @__PURE__ */ React57.createElement(UiProviders, null, /* @__PURE__ */ React57.createElement(StylesFieldLayout, { label: FLEX_WRAP_LABEL }, /* @__PURE__ */ React57.createElement(
|
|
3908
|
+
return /* @__PURE__ */ React57.createElement(StylesField, { bind: "flex-wrap", propDisplayName: FLEX_WRAP_LABEL }, /* @__PURE__ */ React57.createElement(UiProviders, null, /* @__PURE__ */ React57.createElement(StylesFieldLayout, { label: FLEX_WRAP_LABEL }, /* @__PURE__ */ React57.createElement(import_editor_controls28.ToggleControl, { options: options5 }))));
|
|
3908
3909
|
};
|
|
3909
3910
|
|
|
3910
3911
|
// src/components/style-sections/layout-section/layout-section.tsx
|
|
@@ -3928,7 +3929,7 @@ var FlexFields = () => {
|
|
|
3928
3929
|
});
|
|
3929
3930
|
return /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(FlexDirectionField, null), /* @__PURE__ */ React58.createElement(JustifyContentField, null), /* @__PURE__ */ React58.createElement(AlignItemsField, null), /* @__PURE__ */ React58.createElement(PanelDivider, null), /* @__PURE__ */ React58.createElement(GapControlField, null), /* @__PURE__ */ React58.createElement(WrapField, null), ["wrap", "wrap-reverse"].includes(flexWrap?.value) && /* @__PURE__ */ React58.createElement(AlignContentField, null));
|
|
3930
3931
|
};
|
|
3931
|
-
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(PanelDivider, null), /* @__PURE__ */ React58.createElement(
|
|
3932
|
+
var FlexChildFields = ({ parentStyleDirection }) => /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(PanelDivider, null), /* @__PURE__ */ React58.createElement(import_editor_controls29.ControlFormLabel, null, (0, import_i18n33.__)("Flex child", "elementor")), /* @__PURE__ */ React58.createElement(AlignSelfChild, { parentStyleDirection }), /* @__PURE__ */ React58.createElement(FlexOrderField, null), /* @__PURE__ */ React58.createElement(FlexSizeField, null));
|
|
3932
3933
|
var shouldDisplayFlexFields = (display, local) => {
|
|
3933
3934
|
const value = display?.value ?? local?.value;
|
|
3934
3935
|
if (!value) {
|
|
@@ -3945,12 +3946,12 @@ var import_i18n38 = require("@wordpress/i18n");
|
|
|
3945
3946
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
3946
3947
|
var React59 = __toESM(require("react"));
|
|
3947
3948
|
var import_react29 = require("react");
|
|
3948
|
-
var
|
|
3949
|
+
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3949
3950
|
var import_icons17 = require("@elementor/icons");
|
|
3950
|
-
var
|
|
3951
|
+
var import_ui39 = require("@elementor/ui");
|
|
3951
3952
|
var import_i18n34 = require("@wordpress/i18n");
|
|
3952
|
-
var InlineStartIcon2 = (0,
|
|
3953
|
-
var InlineEndIcon2 = (0,
|
|
3953
|
+
var InlineStartIcon2 = (0, import_ui39.withDirection)(import_icons17.SideLeftIcon);
|
|
3954
|
+
var InlineEndIcon2 = (0, import_ui39.withDirection)(import_icons17.SideRightIcon);
|
|
3954
3955
|
var sideIcons = {
|
|
3955
3956
|
"inset-block-start": /* @__PURE__ */ React59.createElement(import_icons17.SideTopIcon, { fontSize: "tiny" }),
|
|
3956
3957
|
"inset-block-end": /* @__PURE__ */ React59.createElement(import_icons17.SideBottomIcon, { fontSize: "tiny" }),
|
|
@@ -3962,14 +3963,14 @@ var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n34.__)("Left",
|
|
|
3962
3963
|
var DimensionsField = () => {
|
|
3963
3964
|
const { isSiteRtl } = useDirection();
|
|
3964
3965
|
const rowRefs = [(0, import_react29.useRef)(null), (0, import_react29.useRef)(null)];
|
|
3965
|
-
return /* @__PURE__ */ React59.createElement(UiProviders, null, /* @__PURE__ */ React59.createElement(
|
|
3966
|
+
return /* @__PURE__ */ React59.createElement(UiProviders, null, /* @__PURE__ */ React59.createElement(import_ui39.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React59.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n34.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React59.createElement(
|
|
3966
3967
|
DimensionField,
|
|
3967
3968
|
{
|
|
3968
3969
|
side: "inset-inline-end",
|
|
3969
3970
|
label: getInlineEndLabel(isSiteRtl),
|
|
3970
3971
|
rowRef: rowRefs[0]
|
|
3971
3972
|
}
|
|
3972
|
-
)), /* @__PURE__ */ React59.createElement(
|
|
3973
|
+
)), /* @__PURE__ */ React59.createElement(import_ui39.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[1] }, /* @__PURE__ */ React59.createElement(DimensionField, { side: "inset-block-end", label: (0, import_i18n34.__)("Bottom", "elementor"), rowRef: rowRefs[1] }), /* @__PURE__ */ React59.createElement(
|
|
3973
3974
|
DimensionField,
|
|
3974
3975
|
{
|
|
3975
3976
|
side: "inset-inline-start",
|
|
@@ -3982,23 +3983,23 @@ var DimensionField = ({
|
|
|
3982
3983
|
side,
|
|
3983
3984
|
label,
|
|
3984
3985
|
rowRef
|
|
3985
|
-
}) => /* @__PURE__ */ React59.createElement(StylesField, { bind: side, propDisplayName: label }, /* @__PURE__ */ React59.createElement(
|
|
3986
|
+
}) => /* @__PURE__ */ React59.createElement(StylesField, { bind: side, propDisplayName: label }, /* @__PURE__ */ React59.createElement(import_ui39.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React59.createElement(import_ui39.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React59.createElement(ControlLabel, null, label)), /* @__PURE__ */ React59.createElement(import_ui39.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React59.createElement(import_editor_controls30.SizeControl, { startIcon: sideIcons[side], extendedOptions: ["auto"], anchorRef: rowRef }))));
|
|
3986
3987
|
|
|
3987
3988
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
3988
3989
|
var React60 = __toESM(require("react"));
|
|
3989
3990
|
var import_react30 = require("react");
|
|
3990
|
-
var
|
|
3991
|
+
var import_editor_controls31 = require("@elementor/editor-controls");
|
|
3991
3992
|
var import_i18n35 = require("@wordpress/i18n");
|
|
3992
3993
|
var OFFSET_LABEL = (0, import_i18n35.__)("Anchor offset", "elementor");
|
|
3993
3994
|
var UNITS = ["px", "em", "rem", "vw", "vh"];
|
|
3994
3995
|
var OffsetField = () => {
|
|
3995
3996
|
const rowRef = (0, import_react30.useRef)(null);
|
|
3996
|
-
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React60.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React60.createElement(
|
|
3997
|
+
return /* @__PURE__ */ React60.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React60.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React60.createElement(import_editor_controls31.SizeControl, { units: UNITS, anchorRef: rowRef })));
|
|
3997
3998
|
};
|
|
3998
3999
|
|
|
3999
4000
|
// src/components/style-sections/position-section/position-field.tsx
|
|
4000
4001
|
var React61 = __toESM(require("react"));
|
|
4001
|
-
var
|
|
4002
|
+
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
4002
4003
|
var import_i18n36 = require("@wordpress/i18n");
|
|
4003
4004
|
var POSITION_LABEL = (0, import_i18n36.__)("Position", "elementor");
|
|
4004
4005
|
var positionOptions = [
|
|
@@ -4009,16 +4010,16 @@ var positionOptions = [
|
|
|
4009
4010
|
{ label: (0, import_i18n36.__)("Sticky", "elementor"), value: "sticky" }
|
|
4010
4011
|
];
|
|
4011
4012
|
var PositionField = ({ onChange }) => {
|
|
4012
|
-
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "position", propDisplayName: POSITION_LABEL }, /* @__PURE__ */ React61.createElement(StylesFieldLayout, { label: POSITION_LABEL }, /* @__PURE__ */ React61.createElement(
|
|
4013
|
+
return /* @__PURE__ */ React61.createElement(StylesField, { bind: "position", propDisplayName: POSITION_LABEL }, /* @__PURE__ */ React61.createElement(StylesFieldLayout, { label: POSITION_LABEL }, /* @__PURE__ */ React61.createElement(import_editor_controls32.SelectControl, { options: positionOptions, onChange })));
|
|
4013
4014
|
};
|
|
4014
4015
|
|
|
4015
4016
|
// src/components/style-sections/position-section/z-index-field.tsx
|
|
4016
4017
|
var React62 = __toESM(require("react"));
|
|
4017
|
-
var
|
|
4018
|
+
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
4018
4019
|
var import_i18n37 = require("@wordpress/i18n");
|
|
4019
4020
|
var Z_INDEX_LABEL = (0, import_i18n37.__)("Z-index", "elementor");
|
|
4020
4021
|
var ZIndexField = () => {
|
|
4021
|
-
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React62.createElement(
|
|
4022
|
+
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React62.createElement(import_editor_controls33.NumberControl, null)));
|
|
4022
4023
|
};
|
|
4023
4024
|
|
|
4024
4025
|
// src/components/style-sections/position-section/position-section.tsx
|
|
@@ -4070,8 +4071,8 @@ var usePersistDimensions = () => {
|
|
|
4070
4071
|
// src/components/style-sections/size-section/size-section.tsx
|
|
4071
4072
|
var React68 = __toESM(require("react"));
|
|
4072
4073
|
var import_react31 = require("react");
|
|
4073
|
-
var
|
|
4074
|
-
var
|
|
4074
|
+
var import_editor_controls36 = require("@elementor/editor-controls");
|
|
4075
|
+
var import_ui41 = require("@elementor/ui");
|
|
4075
4076
|
var import_i18n42 = require("@wordpress/i18n");
|
|
4076
4077
|
|
|
4077
4078
|
// src/components/style-tab-collapsible-content.tsx
|
|
@@ -4080,7 +4081,7 @@ var React65 = __toESM(require("react"));
|
|
|
4080
4081
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
4081
4082
|
var React64 = __toESM(require("react"));
|
|
4082
4083
|
var import_editor_styles_repository15 = require("@elementor/editor-styles-repository");
|
|
4083
|
-
var
|
|
4084
|
+
var import_ui40 = require("@elementor/ui");
|
|
4084
4085
|
var import_i18n39 = require("@wordpress/i18n");
|
|
4085
4086
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
4086
4087
|
const { id, meta, provider } = useStyle();
|
|
@@ -4094,7 +4095,7 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
4094
4095
|
}
|
|
4095
4096
|
const hasValueLabel = (0, import_i18n39.__)("Has effective styles", "elementor");
|
|
4096
4097
|
const hasOverridesLabel = (0, import_i18n39.__)("Has overridden styles", "elementor");
|
|
4097
|
-
return /* @__PURE__ */ React64.createElement(
|
|
4098
|
+
return /* @__PURE__ */ React64.createElement(import_ui40.Tooltip, { title: (0, import_i18n39.__)("Has styles", "elementor"), placement: "top" }, /* @__PURE__ */ React64.createElement(import_ui40.Stack, { direction: "row", sx: { "& > *": { marginInlineStart: -0.25 } }, role: "list" }, hasValues && provider && /* @__PURE__ */ React64.createElement(
|
|
4098
4099
|
StyleIndicator,
|
|
4099
4100
|
{
|
|
4100
4101
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
@@ -4153,7 +4154,7 @@ function getStylesInheritanceIndicators(fields) {
|
|
|
4153
4154
|
|
|
4154
4155
|
// src/components/style-sections/size-section/object-fit-field.tsx
|
|
4155
4156
|
var React66 = __toESM(require("react"));
|
|
4156
|
-
var
|
|
4157
|
+
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
4157
4158
|
var import_i18n40 = require("@wordpress/i18n");
|
|
4158
4159
|
var OBJECT_FIT_LABEL = (0, import_i18n40.__)("Object fit", "elementor");
|
|
4159
4160
|
var positionOptions2 = [
|
|
@@ -4164,12 +4165,12 @@ var positionOptions2 = [
|
|
|
4164
4165
|
{ label: (0, import_i18n40.__)("Scale down", "elementor"), value: "scale-down" }
|
|
4165
4166
|
];
|
|
4166
4167
|
var ObjectFitField = () => {
|
|
4167
|
-
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "object-fit", propDisplayName: OBJECT_FIT_LABEL }, /* @__PURE__ */ React66.createElement(StylesFieldLayout, { label: OBJECT_FIT_LABEL }, /* @__PURE__ */ React66.createElement(
|
|
4168
|
+
return /* @__PURE__ */ React66.createElement(StylesField, { bind: "object-fit", propDisplayName: OBJECT_FIT_LABEL }, /* @__PURE__ */ React66.createElement(StylesFieldLayout, { label: OBJECT_FIT_LABEL }, /* @__PURE__ */ React66.createElement(import_editor_controls34.SelectControl, { options: positionOptions2 })));
|
|
4168
4169
|
};
|
|
4169
4170
|
|
|
4170
4171
|
// src/components/style-sections/size-section/overflow-field.tsx
|
|
4171
4172
|
var React67 = __toESM(require("react"));
|
|
4172
|
-
var
|
|
4173
|
+
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
4173
4174
|
var import_icons18 = require("@elementor/icons");
|
|
4174
4175
|
var import_i18n41 = require("@wordpress/i18n");
|
|
4175
4176
|
var OVERFLOW_LABEL = (0, import_i18n41.__)("Overflow", "elementor");
|
|
@@ -4194,7 +4195,7 @@ var options6 = [
|
|
|
4194
4195
|
}
|
|
4195
4196
|
];
|
|
4196
4197
|
var OverflowField = () => {
|
|
4197
|
-
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "overflow", propDisplayName: OVERFLOW_LABEL }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label: OVERFLOW_LABEL }, /* @__PURE__ */ React67.createElement(
|
|
4198
|
+
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "overflow", propDisplayName: OVERFLOW_LABEL }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label: OVERFLOW_LABEL }, /* @__PURE__ */ React67.createElement(import_editor_controls35.ToggleControl, { options: options6 })));
|
|
4198
4199
|
};
|
|
4199
4200
|
|
|
4200
4201
|
// src/components/style-sections/size-section/size-section.tsx
|
|
@@ -4233,28 +4234,28 @@ var CssSizeProps = [
|
|
|
4233
4234
|
var ASPECT_RATIO_LABEL = (0, import_i18n42.__)("Aspect Ratio", "elementor");
|
|
4234
4235
|
var SizeSection = () => {
|
|
4235
4236
|
const gridRowRefs = [(0, import_react31.useRef)(null), (0, import_react31.useRef)(null), (0, import_react31.useRef)(null)];
|
|
4236
|
-
return /* @__PURE__ */ React68.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React68.createElement(
|
|
4237
|
+
return /* @__PURE__ */ React68.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React68.createElement(import_ui41.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React68.createElement(import_ui41.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React68.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React68.createElement(PanelDivider, null), /* @__PURE__ */ React68.createElement(import_ui41.Stack, null, /* @__PURE__ */ React68.createElement(OverflowField, null)), /* @__PURE__ */ React68.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React68.createElement(import_ui41.Stack, { gap: 2, pt: 2 }, /* @__PURE__ */ React68.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React68.createElement(import_editor_controls36.AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React68.createElement(PanelDivider, null), /* @__PURE__ */ React68.createElement(ObjectFitField, null), /* @__PURE__ */ React68.createElement(StylesField, { bind: "object-position", propDisplayName: (0, import_i18n42.__)("Object position", "elementor") }, /* @__PURE__ */ React68.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(import_editor_controls36.PositionControl, null))))));
|
|
4237
4238
|
};
|
|
4238
4239
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
4239
|
-
return /* @__PURE__ */ React68.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React68.createElement(
|
|
4240
|
+
return /* @__PURE__ */ React68.createElement(StylesField, { bind, propDisplayName: label }, /* @__PURE__ */ React68.createElement(import_ui41.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React68.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(ControlLabel, null, label)), /* @__PURE__ */ React68.createElement(import_ui41.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React68.createElement(import_editor_controls36.SizeControl, { extendedOptions, anchorRef: rowRef }))));
|
|
4240
4241
|
};
|
|
4241
4242
|
|
|
4242
4243
|
// src/components/style-sections/spacing-section/spacing-section.tsx
|
|
4243
4244
|
var React69 = __toESM(require("react"));
|
|
4244
|
-
var
|
|
4245
|
+
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
4245
4246
|
var import_i18n43 = require("@wordpress/i18n");
|
|
4246
4247
|
var MARGIN_LABEL = (0, import_i18n43.__)("Margin", "elementor");
|
|
4247
4248
|
var PADDING_LABEL = (0, import_i18n43.__)("Padding", "elementor");
|
|
4248
4249
|
var SpacingSection = () => {
|
|
4249
4250
|
const { isSiteRtl } = useDirection();
|
|
4250
4251
|
return /* @__PURE__ */ React69.createElement(SectionContent, null, /* @__PURE__ */ React69.createElement(StylesField, { bind: "margin", propDisplayName: MARGIN_LABEL }, /* @__PURE__ */ React69.createElement(
|
|
4251
|
-
|
|
4252
|
+
import_editor_controls37.LinkedDimensionsControl,
|
|
4252
4253
|
{
|
|
4253
4254
|
label: MARGIN_LABEL,
|
|
4254
4255
|
isSiteRtl,
|
|
4255
4256
|
extendedOptions: ["auto"]
|
|
4256
4257
|
}
|
|
4257
|
-
)), /* @__PURE__ */ React69.createElement(PanelDivider, null), /* @__PURE__ */ React69.createElement(StylesField, { bind: "padding", propDisplayName: PADDING_LABEL }, /* @__PURE__ */ React69.createElement(
|
|
4258
|
+
)), /* @__PURE__ */ React69.createElement(PanelDivider, null), /* @__PURE__ */ React69.createElement(StylesField, { bind: "padding", propDisplayName: PADDING_LABEL }, /* @__PURE__ */ React69.createElement(import_editor_controls37.LinkedDimensionsControl, { label: PADDING_LABEL, isSiteRtl })));
|
|
4258
4259
|
};
|
|
4259
4260
|
|
|
4260
4261
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
@@ -4262,27 +4263,27 @@ var React85 = __toESM(require("react"));
|
|
|
4262
4263
|
|
|
4263
4264
|
// src/components/style-sections/typography-section/column-count-field.tsx
|
|
4264
4265
|
var React70 = __toESM(require("react"));
|
|
4265
|
-
var
|
|
4266
|
+
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
4266
4267
|
var import_i18n44 = require("@wordpress/i18n");
|
|
4267
4268
|
var COLUMN_COUNT_LABEL = (0, import_i18n44.__)("Columns", "elementor");
|
|
4268
4269
|
var ColumnCountField = () => {
|
|
4269
|
-
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "column-count", propDisplayName: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React70.createElement(StylesFieldLayout, { label: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React70.createElement(
|
|
4270
|
+
return /* @__PURE__ */ React70.createElement(StylesField, { bind: "column-count", propDisplayName: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React70.createElement(StylesFieldLayout, { label: COLUMN_COUNT_LABEL }, /* @__PURE__ */ React70.createElement(import_editor_controls38.NumberControl, { shouldForceInt: true, min: 0, step: 1 })));
|
|
4270
4271
|
};
|
|
4271
4272
|
|
|
4272
4273
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
4273
4274
|
var React71 = __toESM(require("react"));
|
|
4274
4275
|
var import_react32 = require("react");
|
|
4275
|
-
var
|
|
4276
|
+
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
4276
4277
|
var import_i18n45 = require("@wordpress/i18n");
|
|
4277
4278
|
var COLUMN_GAP_LABEL = (0, import_i18n45.__)("Column gap", "elementor");
|
|
4278
4279
|
var ColumnGapField = () => {
|
|
4279
4280
|
const rowRef = (0, import_react32.useRef)(null);
|
|
4280
|
-
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React71.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React71.createElement(
|
|
4281
|
+
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React71.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React71.createElement(import_editor_controls39.SizeControl, { anchorRef: rowRef })));
|
|
4281
4282
|
};
|
|
4282
4283
|
|
|
4283
4284
|
// src/components/style-sections/typography-section/font-family-field.tsx
|
|
4284
4285
|
var React72 = __toESM(require("react"));
|
|
4285
|
-
var
|
|
4286
|
+
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
4286
4287
|
var import_i18n46 = require("@wordpress/i18n");
|
|
4287
4288
|
var FONT_FAMILY_LABEL = (0, import_i18n46.__)("Font family", "elementor");
|
|
4288
4289
|
var FontFamilyField = () => {
|
|
@@ -4291,23 +4292,23 @@ var FontFamilyField = () => {
|
|
|
4291
4292
|
if (fontFamilies.length === 0) {
|
|
4292
4293
|
return null;
|
|
4293
4294
|
}
|
|
4294
|
-
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "font-family", propDisplayName: FONT_FAMILY_LABEL }, /* @__PURE__ */ React72.createElement(StylesFieldLayout, { label: FONT_FAMILY_LABEL }, /* @__PURE__ */ React72.createElement(
|
|
4295
|
+
return /* @__PURE__ */ React72.createElement(StylesField, { bind: "font-family", propDisplayName: FONT_FAMILY_LABEL }, /* @__PURE__ */ React72.createElement(StylesFieldLayout, { label: FONT_FAMILY_LABEL }, /* @__PURE__ */ React72.createElement(import_editor_controls40.FontFamilyControl, { fontFamilies, sectionWidth })));
|
|
4295
4296
|
};
|
|
4296
4297
|
|
|
4297
4298
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
4298
4299
|
var React73 = __toESM(require("react"));
|
|
4299
4300
|
var import_react33 = require("react");
|
|
4300
|
-
var
|
|
4301
|
+
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
4301
4302
|
var import_i18n47 = require("@wordpress/i18n");
|
|
4302
4303
|
var FONT_SIZE_LABEL = (0, import_i18n47.__)("Font size", "elementor");
|
|
4303
4304
|
var FontSizeField = () => {
|
|
4304
4305
|
const rowRef = (0, import_react33.useRef)(null);
|
|
4305
|
-
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React73.createElement(
|
|
4306
|
+
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React73.createElement(import_editor_controls41.SizeControl, { anchorRef: rowRef })));
|
|
4306
4307
|
};
|
|
4307
4308
|
|
|
4308
4309
|
// src/components/style-sections/typography-section/font-style-field.tsx
|
|
4309
4310
|
var React74 = __toESM(require("react"));
|
|
4310
|
-
var
|
|
4311
|
+
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
4311
4312
|
var import_icons19 = require("@elementor/icons");
|
|
4312
4313
|
var import_i18n48 = require("@wordpress/i18n");
|
|
4313
4314
|
var FONT_STYLE_LABEL = (0, import_i18n48.__)("Font style", "elementor");
|
|
@@ -4326,12 +4327,12 @@ var options7 = [
|
|
|
4326
4327
|
}
|
|
4327
4328
|
];
|
|
4328
4329
|
var FontStyleField = () => {
|
|
4329
|
-
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "font-style", propDisplayName: FONT_STYLE_LABEL }, /* @__PURE__ */ React74.createElement(StylesFieldLayout, { label: FONT_STYLE_LABEL }, /* @__PURE__ */ React74.createElement(
|
|
4330
|
+
return /* @__PURE__ */ React74.createElement(StylesField, { bind: "font-style", propDisplayName: FONT_STYLE_LABEL }, /* @__PURE__ */ React74.createElement(StylesFieldLayout, { label: FONT_STYLE_LABEL }, /* @__PURE__ */ React74.createElement(import_editor_controls42.ToggleControl, { options: options7 })));
|
|
4330
4331
|
};
|
|
4331
4332
|
|
|
4332
4333
|
// src/components/style-sections/typography-section/font-weight-field.tsx
|
|
4333
4334
|
var React75 = __toESM(require("react"));
|
|
4334
|
-
var
|
|
4335
|
+
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
4335
4336
|
var import_i18n49 = require("@wordpress/i18n");
|
|
4336
4337
|
var FONT_WEIGHT_LABEL = (0, import_i18n49.__)("Font weight", "elementor");
|
|
4337
4338
|
var fontWeightOptions = [
|
|
@@ -4346,40 +4347,40 @@ var fontWeightOptions = [
|
|
|
4346
4347
|
{ value: "900", label: (0, import_i18n49.__)("900 - Black", "elementor") }
|
|
4347
4348
|
];
|
|
4348
4349
|
var FontWeightField = () => {
|
|
4349
|
-
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "font-weight", propDisplayName: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React75.createElement(StylesFieldLayout, { label: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React75.createElement(
|
|
4350
|
+
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "font-weight", propDisplayName: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React75.createElement(StylesFieldLayout, { label: FONT_WEIGHT_LABEL }, /* @__PURE__ */ React75.createElement(import_editor_controls43.SelectControl, { options: fontWeightOptions })));
|
|
4350
4351
|
};
|
|
4351
4352
|
|
|
4352
4353
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
4353
4354
|
var React76 = __toESM(require("react"));
|
|
4354
4355
|
var import_react34 = require("react");
|
|
4355
|
-
var
|
|
4356
|
+
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
4356
4357
|
var import_i18n50 = require("@wordpress/i18n");
|
|
4357
4358
|
var LETTER_SPACING_LABEL = (0, import_i18n50.__)("Letter spacing", "elementor");
|
|
4358
4359
|
var LetterSpacingField = () => {
|
|
4359
4360
|
const rowRef = (0, import_react34.useRef)(null);
|
|
4360
|
-
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React76.createElement(
|
|
4361
|
+
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React76.createElement(import_editor_controls44.SizeControl, { anchorRef: rowRef })));
|
|
4361
4362
|
};
|
|
4362
4363
|
|
|
4363
4364
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
4364
4365
|
var React77 = __toESM(require("react"));
|
|
4365
4366
|
var import_react35 = require("react");
|
|
4366
|
-
var
|
|
4367
|
+
var import_editor_controls45 = require("@elementor/editor-controls");
|
|
4367
4368
|
var import_i18n51 = require("@wordpress/i18n");
|
|
4368
4369
|
var LINE_HEIGHT_LABEL = (0, import_i18n51.__)("Line height", "elementor");
|
|
4369
4370
|
var LineHeightField = () => {
|
|
4370
4371
|
const rowRef = (0, import_react35.useRef)(null);
|
|
4371
|
-
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React77.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React77.createElement(
|
|
4372
|
+
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React77.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React77.createElement(import_editor_controls45.SizeControl, { anchorRef: rowRef })));
|
|
4372
4373
|
};
|
|
4373
4374
|
|
|
4374
4375
|
// src/components/style-sections/typography-section/text-alignment-field.tsx
|
|
4375
4376
|
var React78 = __toESM(require("react"));
|
|
4376
|
-
var
|
|
4377
|
+
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
4377
4378
|
var import_icons20 = require("@elementor/icons");
|
|
4378
|
-
var
|
|
4379
|
+
var import_ui42 = require("@elementor/ui");
|
|
4379
4380
|
var import_i18n52 = require("@wordpress/i18n");
|
|
4380
4381
|
var TEXT_ALIGNMENT_LABEL = (0, import_i18n52.__)("Text align", "elementor");
|
|
4381
|
-
var AlignStartIcon = (0,
|
|
4382
|
-
var AlignEndIcon = (0,
|
|
4382
|
+
var AlignStartIcon = (0, import_ui42.withDirection)(import_icons20.AlignLeftIcon);
|
|
4383
|
+
var AlignEndIcon = (0, import_ui42.withDirection)(import_icons20.AlignRightIcon);
|
|
4383
4384
|
var options8 = [
|
|
4384
4385
|
{
|
|
4385
4386
|
value: "start",
|
|
@@ -4407,21 +4408,21 @@ var options8 = [
|
|
|
4407
4408
|
}
|
|
4408
4409
|
];
|
|
4409
4410
|
var TextAlignmentField = () => {
|
|
4410
|
-
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "text-align", propDisplayName: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React78.createElement(UiProviders, null, /* @__PURE__ */ React78.createElement(StylesFieldLayout, { label: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React78.createElement(
|
|
4411
|
+
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "text-align", propDisplayName: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React78.createElement(UiProviders, null, /* @__PURE__ */ React78.createElement(StylesFieldLayout, { label: TEXT_ALIGNMENT_LABEL }, /* @__PURE__ */ React78.createElement(import_editor_controls46.ToggleControl, { options: options8 }))));
|
|
4411
4412
|
};
|
|
4412
4413
|
|
|
4413
4414
|
// src/components/style-sections/typography-section/text-color-field.tsx
|
|
4414
4415
|
var React79 = __toESM(require("react"));
|
|
4415
|
-
var
|
|
4416
|
+
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
4416
4417
|
var import_i18n53 = require("@wordpress/i18n");
|
|
4417
4418
|
var TEXT_COLOR_LABEL = (0, import_i18n53.__)("Text color", "elementor");
|
|
4418
4419
|
var TextColorField = () => {
|
|
4419
|
-
return /* @__PURE__ */ React79.createElement(StylesField, { bind: "color", propDisplayName: TEXT_COLOR_LABEL }, /* @__PURE__ */ React79.createElement(StylesFieldLayout, { label: TEXT_COLOR_LABEL }, /* @__PURE__ */ React79.createElement(
|
|
4420
|
+
return /* @__PURE__ */ React79.createElement(StylesField, { bind: "color", propDisplayName: TEXT_COLOR_LABEL }, /* @__PURE__ */ React79.createElement(StylesFieldLayout, { label: TEXT_COLOR_LABEL }, /* @__PURE__ */ React79.createElement(import_editor_controls47.ColorControl, null)));
|
|
4420
4421
|
};
|
|
4421
4422
|
|
|
4422
4423
|
// src/components/style-sections/typography-section/text-decoration-field.tsx
|
|
4423
4424
|
var React80 = __toESM(require("react"));
|
|
4424
|
-
var
|
|
4425
|
+
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
4425
4426
|
var import_icons21 = require("@elementor/icons");
|
|
4426
4427
|
var import_i18n54 = require("@wordpress/i18n");
|
|
4427
4428
|
var TEXT_DECORATION_LABEL = (0, import_i18n54.__)("Line decoration", "elementor");
|
|
@@ -4452,11 +4453,11 @@ var options9 = [
|
|
|
4452
4453
|
showTooltip: true
|
|
4453
4454
|
}
|
|
4454
4455
|
];
|
|
4455
|
-
var TextDecorationField = () => /* @__PURE__ */ React80.createElement(StylesField, { bind: "text-decoration", propDisplayName: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React80.createElement(StylesFieldLayout, { label: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React80.createElement(
|
|
4456
|
+
var TextDecorationField = () => /* @__PURE__ */ React80.createElement(StylesField, { bind: "text-decoration", propDisplayName: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React80.createElement(StylesFieldLayout, { label: TEXT_DECORATION_LABEL }, /* @__PURE__ */ React80.createElement(import_editor_controls48.ToggleControl, { options: options9, exclusive: false })));
|
|
4456
4457
|
|
|
4457
4458
|
// src/components/style-sections/typography-section/text-direction-field.tsx
|
|
4458
4459
|
var React81 = __toESM(require("react"));
|
|
4459
|
-
var
|
|
4460
|
+
var import_editor_controls49 = require("@elementor/editor-controls");
|
|
4460
4461
|
var import_icons22 = require("@elementor/icons");
|
|
4461
4462
|
var import_i18n55 = require("@wordpress/i18n");
|
|
4462
4463
|
var TEXT_DIRECTION_LABEL = (0, import_i18n55.__)("Direction", "elementor");
|
|
@@ -4475,12 +4476,12 @@ var options10 = [
|
|
|
4475
4476
|
}
|
|
4476
4477
|
];
|
|
4477
4478
|
var TextDirectionField = () => {
|
|
4478
|
-
return /* @__PURE__ */ React81.createElement(StylesField, { bind: "direction", propDisplayName: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React81.createElement(StylesFieldLayout, { label: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React81.createElement(
|
|
4479
|
+
return /* @__PURE__ */ React81.createElement(StylesField, { bind: "direction", propDisplayName: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React81.createElement(StylesFieldLayout, { label: TEXT_DIRECTION_LABEL }, /* @__PURE__ */ React81.createElement(import_editor_controls49.ToggleControl, { options: options10 })));
|
|
4479
4480
|
};
|
|
4480
4481
|
|
|
4481
4482
|
// src/components/style-sections/typography-section/text-stroke-field.tsx
|
|
4482
4483
|
var React82 = __toESM(require("react"));
|
|
4483
|
-
var
|
|
4484
|
+
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
4484
4485
|
var import_i18n56 = require("@wordpress/i18n");
|
|
4485
4486
|
var initTextStroke = {
|
|
4486
4487
|
$$type: "stroke",
|
|
@@ -4519,13 +4520,13 @@ var TextStrokeField = () => {
|
|
|
4519
4520
|
disabled: !canEdit,
|
|
4520
4521
|
renderLabel: () => /* @__PURE__ */ React82.createElement(ControlLabel, null, TEXT_STROKE_LABEL)
|
|
4521
4522
|
},
|
|
4522
|
-
/* @__PURE__ */ React82.createElement(
|
|
4523
|
+
/* @__PURE__ */ React82.createElement(import_editor_controls50.StrokeControl, null)
|
|
4523
4524
|
));
|
|
4524
4525
|
};
|
|
4525
4526
|
|
|
4526
4527
|
// src/components/style-sections/typography-section/transform-field.tsx
|
|
4527
4528
|
var React83 = __toESM(require("react"));
|
|
4528
|
-
var
|
|
4529
|
+
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4529
4530
|
var import_icons23 = require("@elementor/icons");
|
|
4530
4531
|
var import_i18n57 = require("@wordpress/i18n");
|
|
4531
4532
|
var TEXT_TRANSFORM_LABEL = (0, import_i18n57.__)("Text transform", "elementor");
|
|
@@ -4555,17 +4556,17 @@ var options11 = [
|
|
|
4555
4556
|
showTooltip: true
|
|
4556
4557
|
}
|
|
4557
4558
|
];
|
|
4558
|
-
var TransformField = () => /* @__PURE__ */ React83.createElement(StylesField, { bind: "text-transform", propDisplayName: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React83.createElement(StylesFieldLayout, { label: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React83.createElement(
|
|
4559
|
+
var TransformField = () => /* @__PURE__ */ React83.createElement(StylesField, { bind: "text-transform", propDisplayName: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React83.createElement(StylesFieldLayout, { label: TEXT_TRANSFORM_LABEL }, /* @__PURE__ */ React83.createElement(import_editor_controls51.ToggleControl, { options: options11 })));
|
|
4559
4560
|
|
|
4560
4561
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4561
4562
|
var React84 = __toESM(require("react"));
|
|
4562
4563
|
var import_react36 = require("react");
|
|
4563
|
-
var
|
|
4564
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4564
4565
|
var import_i18n58 = require("@wordpress/i18n");
|
|
4565
4566
|
var WORD_SPACING_LABEL = (0, import_i18n58.__)("Word spacing", "elementor");
|
|
4566
4567
|
var WordSpacingField = () => {
|
|
4567
4568
|
const rowRef = (0, import_react36.useRef)(null);
|
|
4568
|
-
return /* @__PURE__ */ React84.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React84.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React84.createElement(
|
|
4569
|
+
return /* @__PURE__ */ React84.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React84.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React84.createElement(import_editor_controls52.SizeControl, { anchorRef: rowRef })));
|
|
4569
4570
|
};
|
|
4570
4571
|
|
|
4571
4572
|
// src/components/style-sections/typography-section/typography-section.tsx
|
|
@@ -4625,7 +4626,7 @@ var StyleTab = () => {
|
|
|
4625
4626
|
},
|
|
4626
4627
|
setMetaState: setActiveStyleState
|
|
4627
4628
|
},
|
|
4628
|
-
/* @__PURE__ */ React87.createElement(import_session6.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React87.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React87.createElement(ClassesHeader, null, /* @__PURE__ */ React87.createElement(CssClassSelector, null), /* @__PURE__ */ React87.createElement(
|
|
4629
|
+
/* @__PURE__ */ React87.createElement(import_session6.SessionStorageProvider, { prefix: activeStyleDefId ?? "" }, /* @__PURE__ */ React87.createElement(StyleInheritanceProvider, null, /* @__PURE__ */ React87.createElement(ClassesHeader, null, /* @__PURE__ */ React87.createElement(CssClassSelector, null), /* @__PURE__ */ React87.createElement(import_ui43.Divider, null)), /* @__PURE__ */ React87.createElement(SectionsList, null, /* @__PURE__ */ React87.createElement(
|
|
4629
4630
|
StyleTabSection,
|
|
4630
4631
|
{
|
|
4631
4632
|
section: {
|
|
@@ -4748,12 +4749,12 @@ var StyleTab = () => {
|
|
|
4748
4749
|
title: (0, import_i18n59.__)("Custom CSS", "elementor")
|
|
4749
4750
|
}
|
|
4750
4751
|
}
|
|
4751
|
-
)), /* @__PURE__ */ React87.createElement(
|
|
4752
|
+
)), /* @__PURE__ */ React87.createElement(import_ui43.Box, { sx: { height: "150px" } })))
|
|
4752
4753
|
));
|
|
4753
4754
|
};
|
|
4754
4755
|
function ClassesHeader({ children }) {
|
|
4755
4756
|
const scrollDirection = useScrollDirection();
|
|
4756
|
-
return /* @__PURE__ */ React87.createElement(
|
|
4757
|
+
return /* @__PURE__ */ React87.createElement(import_ui43.Stack, { sx: { ...stickyHeaderStyles, top: scrollDirection === "up" ? TABS_HEADER_HEIGHT : 0 } }, children);
|
|
4757
4758
|
}
|
|
4758
4759
|
function useCurrentClassesProp() {
|
|
4759
4760
|
const { elementType } = useElement();
|
|
@@ -4779,9 +4780,9 @@ var PanelTabContent = () => {
|
|
|
4779
4780
|
const editorDefaults = useDefaultPanelSettings();
|
|
4780
4781
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
4781
4782
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4782
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
4783
|
-
return /* @__PURE__ */ React88.createElement(ScrollProvider, null, /* @__PURE__ */ React88.createElement(
|
|
4784
|
-
|
|
4783
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui44.useTabs)(currentTab);
|
|
4784
|
+
return /* @__PURE__ */ React88.createElement(ScrollProvider, null, /* @__PURE__ */ React88.createElement(import_ui44.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React88.createElement(import_ui44.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React88.createElement(
|
|
4785
|
+
import_ui44.Tabs,
|
|
4785
4786
|
{
|
|
4786
4787
|
variant: "fullWidth",
|
|
4787
4788
|
size: "small",
|
|
@@ -4792,9 +4793,9 @@ var PanelTabContent = () => {
|
|
|
4792
4793
|
setCurrentTab(newValue);
|
|
4793
4794
|
}
|
|
4794
4795
|
},
|
|
4795
|
-
/* @__PURE__ */ React88.createElement(
|
|
4796
|
-
/* @__PURE__ */ React88.createElement(
|
|
4797
|
-
), /* @__PURE__ */ React88.createElement(
|
|
4796
|
+
/* @__PURE__ */ React88.createElement(import_ui44.Tab, { label: (0, import_i18n60.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
4797
|
+
/* @__PURE__ */ React88.createElement(import_ui44.Tab, { label: (0, import_i18n60.__)("Style", "elementor"), ...getTabProps("style") })
|
|
4798
|
+
), /* @__PURE__ */ React88.createElement(import_ui44.Divider, null)), /* @__PURE__ */ React88.createElement(import_ui44.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React88.createElement(SettingsTab, null)), /* @__PURE__ */ React88.createElement(import_ui44.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React88.createElement(StyleTab, null))));
|
|
4798
4799
|
};
|
|
4799
4800
|
|
|
4800
4801
|
// src/components/editing-panel.tsx
|
|
@@ -4807,7 +4808,7 @@ var EditingPanel = () => {
|
|
|
4807
4808
|
return null;
|
|
4808
4809
|
}
|
|
4809
4810
|
const panelTitle = (0, import_i18n61.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
4810
|
-
return /* @__PURE__ */ React89.createElement(
|
|
4811
|
+
return /* @__PURE__ */ React89.createElement(import_ui45.ErrorBoundary, { fallback: /* @__PURE__ */ React89.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React89.createElement(import_session7.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React89.createElement(import_editor_ui6.ThemeProvider, null, /* @__PURE__ */ React89.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React89.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React89.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React89.createElement(import_icons24.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React89.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React89.createElement(import_editor_controls53.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React89.createElement(import_editor_controls53.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React89.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React89.createElement(EditingPanelTabs, null)))))))));
|
|
4811
4812
|
};
|
|
4812
4813
|
|
|
4813
4814
|
// src/panel.ts
|
|
@@ -4847,11 +4848,11 @@ var EditingPanelHooks = () => {
|
|
|
4847
4848
|
|
|
4848
4849
|
// src/dynamics/init.ts
|
|
4849
4850
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
4850
|
-
var
|
|
4851
|
+
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
4851
4852
|
|
|
4852
4853
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4853
4854
|
var React90 = __toESM(require("react"));
|
|
4854
|
-
var
|
|
4855
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
4855
4856
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
4856
4857
|
var import_icons25 = require("@elementor/icons");
|
|
4857
4858
|
|
|
@@ -4860,7 +4861,7 @@ var import_react41 = require("react");
|
|
|
4860
4861
|
|
|
4861
4862
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4862
4863
|
var import_react40 = require("react");
|
|
4863
|
-
var
|
|
4864
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
4864
4865
|
|
|
4865
4866
|
// src/dynamics/sync/get-elementor-config.ts
|
|
4866
4867
|
var getElementorConfig2 = () => {
|
|
@@ -4906,7 +4907,7 @@ var dynamicPropTypeUtil = (0, import_editor_props16.createPropUtils)(
|
|
|
4906
4907
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
4907
4908
|
var usePropDynamicTags = () => {
|
|
4908
4909
|
let categories = [];
|
|
4909
|
-
const { propType } = (0,
|
|
4910
|
+
const { propType } = (0, import_editor_controls54.useBoundProp)();
|
|
4910
4911
|
if (propType) {
|
|
4911
4912
|
const propDynamicType = getDynamicPropType(propType);
|
|
4912
4913
|
categories = propDynamicType?.settings.categories || [];
|
|
@@ -4933,13 +4934,13 @@ var useDynamicTag = (tagName) => {
|
|
|
4933
4934
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
4934
4935
|
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React90.createElement(import_icons25.DatabaseIcon, { fontSize: "tiny" });
|
|
4935
4936
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
4936
|
-
const context = (0,
|
|
4937
|
-
return /* @__PURE__ */ React90.createElement(
|
|
4937
|
+
const context = (0, import_editor_controls55.useBoundProp)(import_editor_props17.backgroundImageOverlayPropTypeUtil);
|
|
4938
|
+
return /* @__PURE__ */ React90.createElement(import_editor_controls55.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React90.createElement(import_editor_controls55.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React90.createElement(Wrapper, { rawValue: value.value })));
|
|
4938
4939
|
};
|
|
4939
4940
|
var Wrapper = ({ rawValue }) => {
|
|
4940
|
-
const { propType } = (0,
|
|
4941
|
+
const { propType } = (0, import_editor_controls55.useBoundProp)();
|
|
4941
4942
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
4942
|
-
return /* @__PURE__ */ React90.createElement(
|
|
4943
|
+
return /* @__PURE__ */ React90.createElement(import_editor_controls55.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React90.createElement(import_editor_controls55.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React90.createElement(Content, { rawValue: rawValue.image })));
|
|
4943
4944
|
};
|
|
4944
4945
|
var Content = ({ rawValue }) => {
|
|
4945
4946
|
const src = rawValue.value.src;
|
|
@@ -4949,10 +4950,10 @@ var Content = ({ rawValue }) => {
|
|
|
4949
4950
|
|
|
4950
4951
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
4951
4952
|
var React93 = __toESM(require("react"));
|
|
4952
|
-
var
|
|
4953
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
4953
4954
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
4954
4955
|
var import_icons27 = require("@elementor/icons");
|
|
4955
|
-
var
|
|
4956
|
+
var import_ui47 = require("@elementor/ui");
|
|
4956
4957
|
var import_i18n63 = require("@wordpress/i18n");
|
|
4957
4958
|
|
|
4958
4959
|
// src/hooks/use-persist-dynamic-value.ts
|
|
@@ -4965,9 +4966,9 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
4965
4966
|
|
|
4966
4967
|
// src/dynamics/dynamic-control.tsx
|
|
4967
4968
|
var React91 = __toESM(require("react"));
|
|
4968
|
-
var
|
|
4969
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
4969
4970
|
var DynamicControl = ({ bind, children }) => {
|
|
4970
|
-
const { value, setValue } = (0,
|
|
4971
|
+
const { value, setValue } = (0, import_editor_controls56.useBoundProp)(dynamicPropTypeUtil);
|
|
4971
4972
|
const { name = "", settings } = value ?? {};
|
|
4972
4973
|
const dynamicTag = useDynamicTag(name);
|
|
4973
4974
|
if (!dynamicTag) {
|
|
@@ -4986,24 +4987,24 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
4986
4987
|
});
|
|
4987
4988
|
};
|
|
4988
4989
|
const propType = createTopLevelOjectType({ schema: dynamicTag.props_schema });
|
|
4989
|
-
return /* @__PURE__ */ React91.createElement(
|
|
4990
|
+
return /* @__PURE__ */ React91.createElement(import_editor_controls56.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React91.createElement(import_editor_controls56.PropKeyProvider, { bind }, children));
|
|
4990
4991
|
};
|
|
4991
4992
|
|
|
4992
4993
|
// src/dynamics/components/dynamic-selection.tsx
|
|
4993
4994
|
var import_react42 = require("react");
|
|
4994
4995
|
var React92 = __toESM(require("react"));
|
|
4995
|
-
var
|
|
4996
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
4996
4997
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
4997
4998
|
var import_icons26 = require("@elementor/icons");
|
|
4998
|
-
var
|
|
4999
|
+
var import_ui46 = require("@elementor/ui");
|
|
4999
5000
|
var import_i18n62 = require("@wordpress/i18n");
|
|
5000
5001
|
var SIZE6 = "tiny";
|
|
5001
5002
|
var DynamicSelection = ({ close: closePopover }) => {
|
|
5002
5003
|
const [searchValue, setSearchValue] = (0, import_react42.useState)("");
|
|
5003
5004
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5004
|
-
const theme = (0,
|
|
5005
|
-
const { value: anyValue } = (0,
|
|
5006
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
5005
|
+
const theme = (0, import_ui46.useTheme)();
|
|
5006
|
+
const { value: anyValue } = (0, import_editor_controls57.useBoundProp)();
|
|
5007
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls57.useBoundProp)(dynamicPropTypeUtil);
|
|
5007
5008
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
5008
5009
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5009
5010
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -5045,7 +5046,7 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5045
5046
|
onSearch: handleSearch,
|
|
5046
5047
|
placeholder: (0, import_i18n62.__)("Search dynamic tags\u2026", "elementor")
|
|
5047
5048
|
}
|
|
5048
|
-
), /* @__PURE__ */ React92.createElement(
|
|
5049
|
+
), /* @__PURE__ */ React92.createElement(import_ui46.Divider, null), /* @__PURE__ */ React92.createElement(
|
|
5049
5050
|
import_editor_ui7.PopoverMenuList,
|
|
5050
5051
|
{
|
|
5051
5052
|
items: virtualizedItems,
|
|
@@ -5058,7 +5059,7 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5058
5059
|
)));
|
|
5059
5060
|
};
|
|
5060
5061
|
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React92.createElement(
|
|
5061
|
-
|
|
5062
|
+
import_ui46.Stack,
|
|
5062
5063
|
{
|
|
5063
5064
|
gap: 1,
|
|
5064
5065
|
alignItems: "center",
|
|
@@ -5069,11 +5070,11 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React92.createElem
|
|
|
5069
5070
|
sx: { pb: 3.5 }
|
|
5070
5071
|
},
|
|
5071
5072
|
/* @__PURE__ */ React92.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
5072
|
-
/* @__PURE__ */ React92.createElement(
|
|
5073
|
-
/* @__PURE__ */ React92.createElement(
|
|
5073
|
+
/* @__PURE__ */ React92.createElement(import_ui46.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n62.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React92.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
5074
|
+
/* @__PURE__ */ React92.createElement(import_ui46.Typography, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, (0, import_i18n62.__)("Try something else.", "elementor"), /* @__PURE__ */ React92.createElement(import_ui46.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n62.__)("Clear & try again", "elementor")))
|
|
5074
5075
|
);
|
|
5075
|
-
var NoDynamicTags = () => /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(
|
|
5076
|
-
|
|
5076
|
+
var NoDynamicTags = () => /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(import_ui46.Divider, null), /* @__PURE__ */ React92.createElement(
|
|
5077
|
+
import_ui46.Stack,
|
|
5077
5078
|
{
|
|
5078
5079
|
gap: 1,
|
|
5079
5080
|
alignItems: "center",
|
|
@@ -5084,8 +5085,8 @@ var NoDynamicTags = () => /* @__PURE__ */ React92.createElement(React92.Fragment
|
|
|
5084
5085
|
sx: { pb: 3.5 }
|
|
5085
5086
|
},
|
|
5086
5087
|
/* @__PURE__ */ React92.createElement(import_icons26.DatabaseIcon, { fontSize: "large" }),
|
|
5087
|
-
/* @__PURE__ */ React92.createElement(
|
|
5088
|
-
/* @__PURE__ */ React92.createElement(
|
|
5088
|
+
/* @__PURE__ */ React92.createElement(import_ui46.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n62.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
5089
|
+
/* @__PURE__ */ React92.createElement(import_ui46.Typography, { align: "center", variant: "caption" }, (0, import_i18n62.__)("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
5089
5090
|
));
|
|
5090
5091
|
var useFilteredOptions = (searchValue) => {
|
|
5091
5092
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -5106,10 +5107,10 @@ var useFilteredOptions = (searchValue) => {
|
|
|
5106
5107
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5107
5108
|
var SIZE7 = "tiny";
|
|
5108
5109
|
var DynamicSelectionControl = () => {
|
|
5109
|
-
const { setValue: setAnyValue } = (0,
|
|
5110
|
-
const { bind, value } = (0,
|
|
5110
|
+
const { setValue: setAnyValue } = (0, import_editor_controls58.useBoundProp)();
|
|
5111
|
+
const { bind, value } = (0, import_editor_controls58.useBoundProp)(dynamicPropTypeUtil);
|
|
5111
5112
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
5112
|
-
const selectionPopoverState = (0,
|
|
5113
|
+
const selectionPopoverState = (0, import_ui47.usePopupState)({ variant: "popover" });
|
|
5113
5114
|
const { name: tagName = "" } = value;
|
|
5114
5115
|
const dynamicTag = useDynamicTag(tagName);
|
|
5115
5116
|
const removeDynamicTag = () => {
|
|
@@ -5118,16 +5119,16 @@ var DynamicSelectionControl = () => {
|
|
|
5118
5119
|
if (!dynamicTag) {
|
|
5119
5120
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
5120
5121
|
}
|
|
5121
|
-
return /* @__PURE__ */ React93.createElement(
|
|
5122
|
-
|
|
5122
|
+
return /* @__PURE__ */ React93.createElement(import_ui47.Box, null, /* @__PURE__ */ React93.createElement(
|
|
5123
|
+
import_ui47.UnstableTag,
|
|
5123
5124
|
{
|
|
5124
5125
|
fullWidth: true,
|
|
5125
5126
|
showActionsOnHover: true,
|
|
5126
5127
|
label: dynamicTag.label,
|
|
5127
5128
|
startIcon: /* @__PURE__ */ React93.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE7 }),
|
|
5128
|
-
...(0,
|
|
5129
|
+
...(0, import_ui47.bindTrigger)(selectionPopoverState),
|
|
5129
5130
|
actions: /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React93.createElement(
|
|
5130
|
-
|
|
5131
|
+
import_ui47.IconButton,
|
|
5131
5132
|
{
|
|
5132
5133
|
size: SIZE7,
|
|
5133
5134
|
onClick: removeDynamicTag,
|
|
@@ -5137,7 +5138,7 @@ var DynamicSelectionControl = () => {
|
|
|
5137
5138
|
))
|
|
5138
5139
|
}
|
|
5139
5140
|
), /* @__PURE__ */ React93.createElement(
|
|
5140
|
-
|
|
5141
|
+
import_ui47.Popover,
|
|
5141
5142
|
{
|
|
5142
5143
|
disablePortal: true,
|
|
5143
5144
|
disableScrollLock: true,
|
|
@@ -5146,19 +5147,19 @@ var DynamicSelectionControl = () => {
|
|
|
5146
5147
|
PaperProps: {
|
|
5147
5148
|
sx: { my: 1 }
|
|
5148
5149
|
},
|
|
5149
|
-
...(0,
|
|
5150
|
+
...(0, import_ui47.bindPopover)(selectionPopoverState)
|
|
5150
5151
|
},
|
|
5151
5152
|
/* @__PURE__ */ React93.createElement(PopoverBody, null, /* @__PURE__ */ React93.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
5152
5153
|
));
|
|
5153
5154
|
};
|
|
5154
5155
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
5155
|
-
const popupState = (0,
|
|
5156
|
+
const popupState = (0, import_ui47.usePopupState)({ variant: "popover" });
|
|
5156
5157
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
5157
5158
|
if (!hasDynamicSettings) {
|
|
5158
5159
|
return null;
|
|
5159
5160
|
}
|
|
5160
|
-
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(
|
|
5161
|
-
|
|
5161
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(import_ui47.IconButton, { size: SIZE7, ...(0, import_ui47.bindTrigger)(popupState), "aria-label": (0, import_i18n63.__)("Settings", "elementor") }, /* @__PURE__ */ React93.createElement(import_icons27.SettingsIcon, { fontSize: SIZE7 })), /* @__PURE__ */ React93.createElement(
|
|
5162
|
+
import_ui47.Popover,
|
|
5162
5163
|
{
|
|
5163
5164
|
disablePortal: true,
|
|
5164
5165
|
disableScrollLock: true,
|
|
@@ -5167,7 +5168,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
5167
5168
|
PaperProps: {
|
|
5168
5169
|
sx: { my: 1 }
|
|
5169
5170
|
},
|
|
5170
|
-
...(0,
|
|
5171
|
+
...(0, import_ui47.bindPopover)(popupState)
|
|
5171
5172
|
},
|
|
5172
5173
|
/* @__PURE__ */ React93.createElement(PopoverBody, null, /* @__PURE__ */ React93.createElement(
|
|
5173
5174
|
import_editor_ui8.PopoverHeader,
|
|
@@ -5181,19 +5182,19 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
5181
5182
|
};
|
|
5182
5183
|
var DynamicSettings = ({ controls }) => {
|
|
5183
5184
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
5184
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
5185
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui47.useTabs)(0);
|
|
5185
5186
|
if (!tabs.length) {
|
|
5186
5187
|
return null;
|
|
5187
5188
|
}
|
|
5188
|
-
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(
|
|
5189
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(import_ui47.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React93.createElement(import_ui47.Tab, { key: index, label: value.label, sx: { px: 1, py: 0.5 }, ...getTabProps(index) }))), /* @__PURE__ */ React93.createElement(import_ui47.Divider, null), tabs.map(({ value }, index) => {
|
|
5189
5190
|
return /* @__PURE__ */ React93.createElement(
|
|
5190
|
-
|
|
5191
|
+
import_ui47.TabPanel,
|
|
5191
5192
|
{
|
|
5192
5193
|
key: index,
|
|
5193
5194
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
5194
5195
|
...getTabPanelProps(index)
|
|
5195
5196
|
},
|
|
5196
|
-
/* @__PURE__ */ React93.createElement(
|
|
5197
|
+
/* @__PURE__ */ React93.createElement(import_ui47.Stack, { p: 2, gap: 2 }, value.items.map((item) => {
|
|
5197
5198
|
if (item.type === "control") {
|
|
5198
5199
|
return /* @__PURE__ */ React93.createElement(Control3, { key: item.value.bind, control: item.value });
|
|
5199
5200
|
}
|
|
@@ -5206,7 +5207,7 @@ var Control3 = ({ control }) => {
|
|
|
5206
5207
|
if (!controlsRegistry.get(control.type)) {
|
|
5207
5208
|
return null;
|
|
5208
5209
|
}
|
|
5209
|
-
return /* @__PURE__ */ React93.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React93.createElement(
|
|
5210
|
+
return /* @__PURE__ */ React93.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React93.createElement(import_ui47.Grid, { container: true, gap: 0.75 }, control.label ? /* @__PURE__ */ React93.createElement(import_ui47.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React93.createElement(import_editor_controls58.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React93.createElement(import_ui47.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React93.createElement(Control, { type: control.type, props: control.props }))));
|
|
5210
5211
|
};
|
|
5211
5212
|
|
|
5212
5213
|
// src/dynamics/dynamic-transformer.ts
|
|
@@ -5260,11 +5261,11 @@ function getDynamicValue(name, settings) {
|
|
|
5260
5261
|
|
|
5261
5262
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
5262
5263
|
var React94 = __toESM(require("react"));
|
|
5263
|
-
var
|
|
5264
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5264
5265
|
var import_icons28 = require("@elementor/icons");
|
|
5265
5266
|
var import_i18n64 = require("@wordpress/i18n");
|
|
5266
5267
|
var usePropDynamicAction = () => {
|
|
5267
|
-
const { propType } = (0,
|
|
5268
|
+
const { propType } = (0, import_editor_controls59.useBoundProp)();
|
|
5268
5269
|
const visible = !!propType && supportsDynamic(propType);
|
|
5269
5270
|
return {
|
|
5270
5271
|
visible,
|
|
@@ -5281,12 +5282,12 @@ var init = () => {
|
|
|
5281
5282
|
component: DynamicSelectionControl,
|
|
5282
5283
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
5283
5284
|
});
|
|
5284
|
-
(0,
|
|
5285
|
+
(0, import_editor_controls60.injectIntoRepeaterItemLabel)({
|
|
5285
5286
|
id: "dynamic-background-image",
|
|
5286
5287
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
5287
5288
|
component: BackgroundControlDynamicTagLabel
|
|
5288
5289
|
});
|
|
5289
|
-
(0,
|
|
5290
|
+
(0, import_editor_controls60.injectIntoRepeaterItemIcon)({
|
|
5290
5291
|
id: "dynamic-background-image",
|
|
5291
5292
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
5292
5293
|
component: BackgroundControlDynamicTagIcon
|
|
@@ -5300,7 +5301,7 @@ var init = () => {
|
|
|
5300
5301
|
};
|
|
5301
5302
|
|
|
5302
5303
|
// src/reset-style-props.tsx
|
|
5303
|
-
var
|
|
5304
|
+
var import_editor_controls61 = require("@elementor/editor-controls");
|
|
5304
5305
|
var import_icons29 = require("@elementor/icons");
|
|
5305
5306
|
var import_i18n65 = require("@wordpress/i18n");
|
|
5306
5307
|
var { registerAction } = controlActionsMenu;
|
|
@@ -5312,7 +5313,7 @@ function initResetStyleProps() {
|
|
|
5312
5313
|
}
|
|
5313
5314
|
function useResetStyleValueProps() {
|
|
5314
5315
|
const isStyle = useIsStyle();
|
|
5315
|
-
const { value, setValue, path } = (0,
|
|
5316
|
+
const { value, setValue, path } = (0, import_editor_controls61.useBoundProp)();
|
|
5316
5317
|
return {
|
|
5317
5318
|
visible: isStyle && value !== null && value !== void 0 && path.length <= 2,
|
|
5318
5319
|
title: (0, import_i18n65.__)("Clear", "elementor"),
|
|
@@ -5341,8 +5342,8 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
5341
5342
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
5342
5343
|
var React95 = __toESM(require("react"));
|
|
5343
5344
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
5344
|
-
var
|
|
5345
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */ React95.createElement(
|
|
5345
|
+
var import_ui48 = require("@elementor/ui");
|
|
5346
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas5.createTransformer)((value) => /* @__PURE__ */ React95.createElement(import_ui48.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React95.createElement(ItemIconColor, { value }), /* @__PURE__ */ React95.createElement(ItemLabelColor, { value })));
|
|
5346
5347
|
var ItemIconColor = ({ value }) => {
|
|
5347
5348
|
const { color } = value;
|
|
5348
5349
|
return /* @__PURE__ */ React95.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
@@ -5350,7 +5351,7 @@ var ItemIconColor = ({ value }) => {
|
|
|
5350
5351
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
5351
5352
|
return /* @__PURE__ */ React95.createElement("span", null, color);
|
|
5352
5353
|
};
|
|
5353
|
-
var StyledUnstableColorIndicator = (0,
|
|
5354
|
+
var StyledUnstableColorIndicator = (0, import_ui48.styled)(import_ui48.UnstableColorIndicator)(({ theme }) => ({
|
|
5354
5355
|
width: "1em",
|
|
5355
5356
|
height: "1em",
|
|
5356
5357
|
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
@@ -5361,9 +5362,9 @@ var StyledUnstableColorIndicator = (0, import_ui49.styled)(import_ui49.UnstableC
|
|
|
5361
5362
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
5362
5363
|
var React96 = __toESM(require("react"));
|
|
5363
5364
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
5364
|
-
var
|
|
5365
|
+
var import_ui49 = require("@elementor/ui");
|
|
5365
5366
|
var import_i18n66 = require("@wordpress/i18n");
|
|
5366
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */ React96.createElement(
|
|
5367
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas6.createTransformer)((value) => /* @__PURE__ */ React96.createElement(import_ui49.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React96.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React96.createElement(ItemLabelGradient, { value })));
|
|
5367
5368
|
var ItemIconGradient = ({ value }) => {
|
|
5368
5369
|
const gradient = getGradientValue(value);
|
|
5369
5370
|
return /* @__PURE__ */ React96.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
@@ -5386,13 +5387,13 @@ var getGradientValue = (gradient) => {
|
|
|
5386
5387
|
var React97 = __toESM(require("react"));
|
|
5387
5388
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
5388
5389
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
5389
|
-
var
|
|
5390
|
+
var import_ui50 = require("@elementor/ui");
|
|
5390
5391
|
var import_wp_media = require("@elementor/wp-media");
|
|
5391
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React97.createElement(
|
|
5392
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React97.createElement(import_ui50.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React97.createElement(ItemIconImage, { value }), /* @__PURE__ */ React97.createElement(ItemLabelImage, { value })));
|
|
5392
5393
|
var ItemIconImage = ({ value }) => {
|
|
5393
5394
|
const { imageUrl } = useImage(value);
|
|
5394
5395
|
return /* @__PURE__ */ React97.createElement(
|
|
5395
|
-
|
|
5396
|
+
import_ui50.CardMedia,
|
|
5396
5397
|
{
|
|
5397
5398
|
image: imageUrl,
|
|
5398
5399
|
sx: (theme) => ({
|
|
@@ -5434,12 +5435,12 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
5434
5435
|
// src/styles-inheritance/transformers/background-overlay-transformer.tsx
|
|
5435
5436
|
var React98 = __toESM(require("react"));
|
|
5436
5437
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
5437
|
-
var
|
|
5438
|
+
var import_ui51 = require("@elementor/ui");
|
|
5438
5439
|
var backgroundOverlayTransformer = (0, import_editor_canvas8.createTransformer)((values) => {
|
|
5439
5440
|
if (!values || values.length === 0) {
|
|
5440
5441
|
return null;
|
|
5441
5442
|
}
|
|
5442
|
-
return /* @__PURE__ */ React98.createElement(
|
|
5443
|
+
return /* @__PURE__ */ React98.createElement(import_ui51.Stack, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React98.createElement(import_ui51.Stack, { key: index }, item)));
|
|
5443
5444
|
});
|
|
5444
5445
|
|
|
5445
5446
|
// src/styles-inheritance/init-styles-inheritance-transformers.ts
|
|
@@ -5493,7 +5494,9 @@ var blockV1Panel = () => {
|
|
|
5493
5494
|
};
|
|
5494
5495
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5495
5496
|
0 && (module.exports = {
|
|
5497
|
+
CustomCss,
|
|
5496
5498
|
PopoverBody,
|
|
5499
|
+
SectionContent,
|
|
5497
5500
|
controlActionsMenu,
|
|
5498
5501
|
init,
|
|
5499
5502
|
injectIntoClassSelectorActions,
|
|
@@ -5502,6 +5505,7 @@ var blockV1Panel = () => {
|
|
|
5502
5505
|
registerStyleProviderToColors,
|
|
5503
5506
|
stylesInheritanceTransformersRegistry,
|
|
5504
5507
|
useBoundProp,
|
|
5508
|
+
useCustomCss,
|
|
5505
5509
|
useFontFamilies,
|
|
5506
5510
|
usePanelActions,
|
|
5507
5511
|
usePanelStatus,
|