@elementor/editor-editing-panel 4.0.0-591 → 4.0.0-597
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 +15 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/components/css-classes/css-class-menu.tsx +16 -2
- package/src/dynamics/init.ts +1 -0
- package/src/reset-style-props.tsx +1 -0
package/dist/index.mjs
CHANGED
|
@@ -808,15 +808,26 @@ function useClasses() {
|
|
|
808
808
|
}
|
|
809
809
|
|
|
810
810
|
// src/components/css-classes/css-class-menu.tsx
|
|
811
|
-
var
|
|
811
|
+
var DEFAULT_PSEUDO_STATES = [
|
|
812
812
|
{ key: "normal", value: null, label: __3("normal", "elementor") },
|
|
813
813
|
{ key: "hover", value: "hover", label: __3("hover", "elementor") },
|
|
814
814
|
{ key: "focus", value: "focus", label: __3("focus", "elementor") },
|
|
815
815
|
{ key: "active", value: "active", label: __3("active", "elementor") }
|
|
816
816
|
];
|
|
817
|
+
function usePseudoStates() {
|
|
818
|
+
const { elementType } = useElement();
|
|
819
|
+
const { pseudoStates = [] } = elementType;
|
|
820
|
+
const additionalStates = pseudoStates.map(({ name, value }) => ({
|
|
821
|
+
key: value,
|
|
822
|
+
value,
|
|
823
|
+
label: name
|
|
824
|
+
}));
|
|
825
|
+
return [...DEFAULT_PSEUDO_STATES, ...additionalStates];
|
|
826
|
+
}
|
|
817
827
|
function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
818
828
|
const { provider } = useCssClass();
|
|
819
829
|
const isLocalStyle2 = provider ? isElementsStylesProvider3(provider) : true;
|
|
830
|
+
const pseudoStates = usePseudoStates();
|
|
820
831
|
const handleKeyDown = (e) => {
|
|
821
832
|
e.stopPropagation();
|
|
822
833
|
};
|
|
@@ -840,7 +851,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
840
851
|
isLocalStyle2 && /* @__PURE__ */ React8.createElement(LocalClassSubMenu, { popupState }),
|
|
841
852
|
getMenuItemsByProvider({ provider, closeMenu: popupState.close, fixed }),
|
|
842
853
|
/* @__PURE__ */ React8.createElement(MenuSubheader2, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, __3("States", "elementor")),
|
|
843
|
-
|
|
854
|
+
pseudoStates.map((state) => {
|
|
844
855
|
return /* @__PURE__ */ React8.createElement(
|
|
845
856
|
StateMenuItem,
|
|
846
857
|
{
|
|
@@ -5940,6 +5951,7 @@ var init2 = () => {
|
|
|
5940
5951
|
});
|
|
5941
5952
|
registerPopoverAction({
|
|
5942
5953
|
id: "dynamic-tags",
|
|
5954
|
+
priority: 20,
|
|
5943
5955
|
useProps: usePropDynamicAction
|
|
5944
5956
|
});
|
|
5945
5957
|
styleTransformersRegistry2.register("dynamic", dynamicTransformer);
|
|
@@ -6001,6 +6013,7 @@ var { registerAction } = controlActionsMenu3;
|
|
|
6001
6013
|
function initResetStyleProps() {
|
|
6002
6014
|
registerAction({
|
|
6003
6015
|
id: "reset-style-value",
|
|
6016
|
+
priority: 10,
|
|
6004
6017
|
useProps: useResetStyleValueProps
|
|
6005
6018
|
});
|
|
6006
6019
|
}
|