@elementor/editor-editing-panel 4.4.0-1141 → 4.4.0-1142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +30 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +26 -26
- package/src/components/css-classes/css-class-item.tsx +2 -3
- package/src/components/css-classes/css-class-menu.tsx +2 -2
- package/src/components/css-classes/css-class-selector.tsx +2 -10
- package/src/styles-inheritance/components/ui-providers.tsx +2 -1
- package/src/utils/get-styles-provider-color.ts +0 -8
package/dist/index.mjs
CHANGED
|
@@ -552,12 +552,6 @@ var getStylesProviderThemeColor = (provider) => {
|
|
|
552
552
|
}
|
|
553
553
|
return getStyleProviderColors(provider).getThemeColor;
|
|
554
554
|
};
|
|
555
|
-
function getTempStylesProviderThemeColor(provider) {
|
|
556
|
-
if (isElementsStylesProvider(provider)) {
|
|
557
|
-
return (theme) => theme.palette.primary.main;
|
|
558
|
-
}
|
|
559
|
-
return getStylesProviderThemeColor(provider);
|
|
560
|
-
}
|
|
561
555
|
|
|
562
556
|
// src/utils/tracking/subscribe.ts
|
|
563
557
|
import { stylesRepository as stylesRepository2 } from "@elementor/editor-styles-repository";
|
|
@@ -571,14 +565,13 @@ import * as React11 from "react";
|
|
|
571
565
|
import { useEffect, useMemo as useMemo3, useState as useState3 } from "react";
|
|
572
566
|
import { isClassState } from "@elementor/editor-styles";
|
|
573
567
|
import { stylesRepository as stylesRepository6, useUserStylesCapability as useUserStylesCapability4, validateStyleLabel } from "@elementor/editor-styles-repository";
|
|
574
|
-
import { EditableField, EllipsisWithTooltip, useEditable } from "@elementor/editor-ui";
|
|
568
|
+
import { EditableField, EllipsisWithTooltip, ThemeProvider, useEditable } from "@elementor/editor-ui";
|
|
575
569
|
import { DotsVerticalIcon } from "@elementor/icons";
|
|
576
570
|
import { useSessionStorage as useSessionStorage3 } from "@elementor/session";
|
|
577
571
|
import {
|
|
578
572
|
bindTrigger,
|
|
579
573
|
Chip as Chip2,
|
|
580
574
|
Stack as Stack3,
|
|
581
|
-
ThemeProvider,
|
|
582
575
|
Typography as Typography2,
|
|
583
576
|
UnstableChipGroup,
|
|
584
577
|
usePopupState
|
|
@@ -1130,7 +1123,7 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
1130
1123
|
StyleIndicator,
|
|
1131
1124
|
{
|
|
1132
1125
|
"aria-label": __5("Has style", "elementor"),
|
|
1133
|
-
getColor:
|
|
1126
|
+
getColor: getStylesProviderThemeColor(provider ?? "")
|
|
1134
1127
|
}
|
|
1135
1128
|
), label)
|
|
1136
1129
|
)
|
|
@@ -1229,7 +1222,7 @@ function CssClassItem(props) {
|
|
|
1229
1222
|
openEditMode();
|
|
1230
1223
|
}
|
|
1231
1224
|
}, [id, convertedFromLocalId]);
|
|
1232
|
-
return /* @__PURE__ */ React11.createElement(ThemeProvider,
|
|
1225
|
+
return /* @__PURE__ */ React11.createElement(ThemeProvider, null, /* @__PURE__ */ React11.createElement(
|
|
1233
1226
|
UnstableChipGroup,
|
|
1234
1227
|
{
|
|
1235
1228
|
ref: setChipRef,
|
|
@@ -1346,7 +1339,7 @@ var EMPTY_OPTION = {
|
|
|
1346
1339
|
label: __8("local", "elementor"),
|
|
1347
1340
|
value: null,
|
|
1348
1341
|
fixed: true,
|
|
1349
|
-
color:
|
|
1342
|
+
color: "accent",
|
|
1350
1343
|
icon: /* @__PURE__ */ React13.createElement(MapPinIcon, null),
|
|
1351
1344
|
provider: null
|
|
1352
1345
|
};
|
|
@@ -1514,19 +1507,13 @@ function useOptions() {
|
|
|
1514
1507
|
label: styleDef.label,
|
|
1515
1508
|
value: styleDef.id,
|
|
1516
1509
|
fixed: isElements,
|
|
1517
|
-
color:
|
|
1510
|
+
color: getStylesProviderColorName(provider.getKey()),
|
|
1518
1511
|
icon: isElements ? /* @__PURE__ */ React13.createElement(MapPinIcon, null) : null,
|
|
1519
1512
|
provider: provider.getKey()
|
|
1520
1513
|
};
|
|
1521
1514
|
});
|
|
1522
1515
|
});
|
|
1523
1516
|
}
|
|
1524
|
-
function getTempStylesProviderColorName(color) {
|
|
1525
|
-
if (color === "accent") {
|
|
1526
|
-
return "primary";
|
|
1527
|
-
}
|
|
1528
|
-
return color;
|
|
1529
|
-
}
|
|
1530
1517
|
function useCreateAction() {
|
|
1531
1518
|
const [provider, createAction] = useCreateAndApplyClass();
|
|
1532
1519
|
if (!provider || !createAction) {
|
|
@@ -3445,7 +3432,8 @@ function useDirection() {
|
|
|
3445
3432
|
|
|
3446
3433
|
// src/styles-inheritance/components/ui-providers.tsx
|
|
3447
3434
|
import * as React33 from "react";
|
|
3448
|
-
import {
|
|
3435
|
+
import { ThemeProvider as ThemeProvider2 } from "@elementor/editor-ui";
|
|
3436
|
+
import { DirectionProvider } from "@elementor/ui";
|
|
3449
3437
|
var UiProviders = ({ children }) => {
|
|
3450
3438
|
const { isSiteRtl } = useDirection();
|
|
3451
3439
|
return /* @__PURE__ */ React33.createElement(DirectionProvider, { rtl: isSiteRtl }, /* @__PURE__ */ React33.createElement(ThemeProvider2, null, children));
|