@elementor/editor-editing-panel 4.0.0-591 → 4.0.0-598

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 CHANGED
@@ -848,15 +848,26 @@ function useClasses() {
848
848
  }
849
849
 
850
850
  // src/components/css-classes/css-class-menu.tsx
851
- var STATES = [
851
+ var DEFAULT_PSEUDO_STATES = [
852
852
  { key: "normal", value: null, label: (0, import_i18n3.__)("normal", "elementor") },
853
853
  { key: "hover", value: "hover", label: (0, import_i18n3.__)("hover", "elementor") },
854
854
  { key: "focus", value: "focus", label: (0, import_i18n3.__)("focus", "elementor") },
855
855
  { key: "active", value: "active", label: (0, import_i18n3.__)("active", "elementor") }
856
856
  ];
857
+ function usePseudoStates() {
858
+ const { elementType } = useElement();
859
+ const { pseudoStates = [] } = elementType;
860
+ const additionalStates = pseudoStates.map(({ name, value }) => ({
861
+ key: value,
862
+ value,
863
+ label: name
864
+ }));
865
+ return [...DEFAULT_PSEUDO_STATES, ...additionalStates];
866
+ }
857
867
  function CssClassMenu({ popupState, anchorEl, fixed }) {
858
868
  const { provider } = useCssClass();
859
869
  const isLocalStyle2 = provider ? (0, import_editor_styles_repository6.isElementsStylesProvider)(provider) : true;
870
+ const pseudoStates = usePseudoStates();
860
871
  const handleKeyDown = (e) => {
861
872
  e.stopPropagation();
862
873
  };
@@ -880,7 +891,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
880
891
  isLocalStyle2 && /* @__PURE__ */ React8.createElement(LocalClassSubMenu, { popupState }),
881
892
  getMenuItemsByProvider({ provider, closeMenu: popupState.close, fixed }),
882
893
  /* @__PURE__ */ React8.createElement(import_ui5.MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, (0, import_i18n3.__)("States", "elementor")),
883
- STATES.map((state) => {
894
+ pseudoStates.map((state) => {
884
895
  return /* @__PURE__ */ React8.createElement(
885
896
  StateMenuItem,
886
897
  {
@@ -5828,6 +5839,7 @@ var init2 = () => {
5828
5839
  });
5829
5840
  registerPopoverAction({
5830
5841
  id: "dynamic-tags",
5842
+ priority: 20,
5831
5843
  useProps: usePropDynamicAction
5832
5844
  });
5833
5845
  import_editor_canvas3.styleTransformersRegistry.register("dynamic", dynamicTransformer);
@@ -5889,6 +5901,7 @@ var { registerAction } = import_menus3.controlActionsMenu;
5889
5901
  function initResetStyleProps() {
5890
5902
  registerAction({
5891
5903
  id: "reset-style-value",
5904
+ priority: 10,
5892
5905
  useProps: useResetStyleValueProps
5893
5906
  });
5894
5907
  }