@elementor/editor-controls 0.17.0 → 0.18.0

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
@@ -2619,11 +2619,33 @@ var BackgroundControl = createControl(() => {
2619
2619
  const propContext = useBoundProp(backgroundPropTypeUtil);
2620
2620
  return /* @__PURE__ */ React41.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React41.createElement(SectionContent, null, /* @__PURE__ */ React41.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React41.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React41.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React41.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React41.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlLabel, null, __18("Color", "elementor"))), /* @__PURE__ */ React41.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ColorControl, null))))));
2621
2621
  });
2622
+
2623
+ // src/control-adornments/control-adornments-context.tsx
2624
+ import * as React42 from "react";
2625
+ import { createContext as createContext5, useContext as useContext5 } from "react";
2626
+ var Context2 = createContext5(null);
2627
+ var ControlAdornmentsProvider = ({ children, items }) => /* @__PURE__ */ React42.createElement(Context2.Provider, { value: { items } }, children);
2628
+ var useControlAdornments = () => {
2629
+ const context = useContext5(Context2);
2630
+ return context?.items ?? [];
2631
+ };
2632
+
2633
+ // src/control-adornments/control-adornments.tsx
2634
+ import * as React43 from "react";
2635
+ function ControlAdornments() {
2636
+ const items = useControlAdornments();
2637
+ if (items?.length === 0) {
2638
+ return null;
2639
+ }
2640
+ return /* @__PURE__ */ React43.createElement(React43.Fragment, null, items.map(({ Adornment, id }) => /* @__PURE__ */ React43.createElement(Adornment, { key: id })));
2641
+ }
2622
2642
  export {
2623
2643
  BackgroundControl,
2624
2644
  BoxShadowRepeaterControl,
2625
2645
  ColorControl,
2626
2646
  ControlActionsProvider,
2647
+ ControlAdornments,
2648
+ ControlAdornmentsProvider,
2627
2649
  ControlLabel,
2628
2650
  ControlReplacementProvider,
2629
2651
  ControlToggleButtonGroup,