@elementor/editor-editing-panel 3.33.0-101 → 3.33.0-103

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.mjs CHANGED
@@ -5655,7 +5655,7 @@ function useResetStyleValueProps() {
5655
5655
  }
5656
5656
 
5657
5657
  // src/styles-inheritance/init-styles-inheritance-transformers.ts
5658
- import { createTransformer as createTransformer6, styleTransformersRegistry as styleTransformersRegistry3 } from "@elementor/editor-canvas";
5658
+ import { createTransformer as createTransformer7, styleTransformersRegistry as styleTransformersRegistry3 } from "@elementor/editor-canvas";
5659
5659
 
5660
5660
  // src/styles-inheritance/consts.ts
5661
5661
  var excludePropTypeTransformers = /* @__PURE__ */ new Set([
@@ -5775,6 +5775,30 @@ var backgroundOverlayTransformer = createTransformer5((values) => {
5775
5775
  return /* @__PURE__ */ React100.createElement(Stack22, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React100.createElement(Stack22, { key: index }, item)));
5776
5776
  });
5777
5777
 
5778
+ // src/styles-inheritance/transformers/color-transformer.tsx
5779
+ import * as React101 from "react";
5780
+ import { createTransformer as createTransformer6 } from "@elementor/editor-canvas";
5781
+ import { Stack as Stack23, styled as styled8, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
5782
+ function isValidCSSColor(value) {
5783
+ if (!value.trim()) {
5784
+ return false;
5785
+ }
5786
+ return CSS.supports("color", value.trim());
5787
+ }
5788
+ var StyledColorIndicator = styled8(UnstableColorIndicator2)(({ theme }) => ({
5789
+ width: "1em",
5790
+ height: "1em",
5791
+ borderRadius: `${theme.shape.borderRadius / 2}px`,
5792
+ outline: `1px solid ${theme.palette.action.disabled}`,
5793
+ flexShrink: 0
5794
+ }));
5795
+ var colorTransformer = createTransformer6((value) => {
5796
+ if (!isValidCSSColor(value)) {
5797
+ return value;
5798
+ }
5799
+ return /* @__PURE__ */ React101.createElement(Stack23, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React101.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React101.createElement("span", null, value));
5800
+ });
5801
+
5778
5802
  // src/styles-inheritance/init-styles-inheritance-transformers.ts
5779
5803
  function initStylesInheritanceTransformers() {
5780
5804
  const originalStyleTransformers = styleTransformersRegistry3.all();
@@ -5785,13 +5809,14 @@ function initStylesInheritanceTransformers() {
5785
5809
  stylesInheritanceTransformersRegistry.register(propType, transformer);
5786
5810
  });
5787
5811
  stylesInheritanceTransformersRegistry.registerFallback(
5788
- createTransformer6((value) => {
5812
+ createTransformer7((value) => {
5789
5813
  return value;
5790
5814
  })
5791
5815
  );
5792
5816
  registerCustomTransformers();
5793
5817
  }
5794
5818
  function registerCustomTransformers() {
5819
+ stylesInheritanceTransformersRegistry.register("color", colorTransformer);
5795
5820
  stylesInheritanceTransformersRegistry.register("background-color-overlay", backgroundColorOverlayTransformer);
5796
5821
  stylesInheritanceTransformersRegistry.register(
5797
5822
  "background-gradient-overlay",