@wix/editor-react-components 1.2346.0 → 1.2347.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.
@@ -12,7 +12,7 @@ export interface AnimatedSvgProps {
12
12
  }
13
13
  export interface AnimatedIconBuilderProps {
14
14
  /** DOM `id` on the root element. */
15
- id?: string;
15
+ id: string;
16
16
  /** Hover animation length in seconds. Rewritten into every `<animate>` tag's `dur` attribute on render. Default `0.2`. */
17
17
  duration?: number;
18
18
  /** The active SVG (start ↔ end morph). At runtime only `svgContent` is read; the other `VectorArt` fields are passed through. */
@@ -2,9 +2,8 @@ import { default as React, PropsWithChildren } from 'react';
2
2
  import { MenuOrientationType, MenuAnimationNameType, DropdownAnimationNameType, Translations } from './constants';
3
3
  import { MenuItemProps as MenuItemData, ActiveAnchor } from '../../../types/vendored/editor-elements-definitions';
4
4
  import { IMenuItemSDKAction, IMenuItemsPropsSDKActions } from '../../../common/sdk/props-factories/menuItemsPropsSDKFactory';
5
- import { A11y, Direction, VectorArt } from '@wix/editor-react-types';
5
+ import { A11y, Direction } from '@wix/editor-react-types';
6
6
  import { ButtonProps } from '../Button/Button';
7
- import { AnimatedSvgRef } from '../AnimatedIcon/types';
8
7
  import { SdkFunctionMouseHoverProps } from '../../../utils/functions/sdkFunctionCallbackProps';
9
8
  import { AnimationState } from './components/MenuContent/MenuItem/useAnimationState';
10
9
  export type MenuItemType = MenuItemData & {
@@ -12,34 +11,6 @@ export type MenuItemType = MenuItemData & {
12
11
  isContainerItem?: boolean;
13
12
  forceOpen?: boolean;
14
13
  };
15
- export type BuilderAnimationIconProps = {
16
- className?: string;
17
- 'data-testid'?: string;
18
- };
19
- export type BuilderAnimationIconComponent = React.ForwardRefExoticComponent<BuilderAnimationIconProps & React.RefAttributes<AnimatedSvgRef>>;
20
- export interface AnimatedIconElementProps {
21
- svg?: VectorArt;
22
- duration?: number;
23
- svgLastAnimatedSelected?: VectorArt;
24
- }
25
- type NavbarElementProps = {
26
- item?: {
27
- className?: string;
28
- elementProps?: {
29
- animatedIcon?: AnimatedIconElementProps;
30
- };
31
- };
32
- dropdown?: {
33
- elementProps?: {
34
- item?: {
35
- className?: string;
36
- };
37
- subItem?: {
38
- className?: string;
39
- };
40
- };
41
- };
42
- };
43
14
  export type HamburgerMenuProps = {
44
15
  isOpen?: boolean;
45
16
  content?: React.ReactNode;
@@ -70,7 +41,6 @@ export type MenuProps = SdkFunctionMouseHoverProps & {
70
41
  direction?: Direction;
71
42
  submenuDirection?: Direction;
72
43
  a11y?: A11y;
73
- elementProps?: NavbarElementProps;
74
44
  };
75
45
  hamburgerMenu?: HamburgerMenuProps;
76
46
  hamburgerOpenButton?: ButtonProps;
@@ -141,7 +111,6 @@ export type IMenuContentProps = Partial<IMenuItemsPropsSDKActions> & {
141
111
  direction?: Direction;
142
112
  submenuDirection?: Direction;
143
113
  submenuToggleIdPrefix?: string;
144
- BuilderAnimationIcon?: BuilderAnimationIconComponent;
145
114
  };
146
115
  export type IMenuItemProps = Partial<IMenuItemsPropsSDKActions> & {
147
116
  item: PropsWithChildren<MenuItemData & {
@@ -154,7 +123,6 @@ export type IMenuItemProps = Partial<IMenuItemsPropsSDKActions> & {
154
123
  getAnimationPackage: () => MenuAnimationNameType;
155
124
  submenuDirection?: Direction;
156
125
  submenuToggleIdPrefix?: string;
157
- BuilderAnimationIcon?: BuilderAnimationIconComponent;
158
126
  } & Translations;
159
127
  export type ScrollControlsProps = {
160
128
  isScrollForwardButtonShown: boolean;
@@ -5,7 +5,7 @@ import { U as UrlDefinition } from "../chunks/index11.js";
5
5
  import { d as defineService } from "../chunks/index7.js";
6
6
  import { T as TranslationsDefinition } from "../chunks/index5.js";
7
7
  import { M as MenuAnimationName, d as defaultTranslations, a as MenuOrientation, A as AnimationPhase, V as VerticalDropdownDisplay, D as DropdownAnimationName, H as HamburgerMenuAnimationName, b as MenuParts, s as selectors, u as useAnimationState, c as ARIA_LABEL_NAMESPACE, t as translationsKeys } from "../chunks/constants26.js";
8
- import React__default, { createContext, useContext, useRef, useCallback, useMemo, useState, useEffect, useLayoutEffect, forwardRef } from "react";
8
+ import React__default, { createContext, useContext, useRef, useCallback, useMemo, useState, useEffect, useLayoutEffect } from "react";
9
9
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
10
10
  import { g as getItemDepthSelector, r as rootItemDepthLevel, s as subItemDepthLevel, a as subSubItemDepthLevel } from "../chunks/utils2.js";
11
11
  import { d as debounce } from "../chunks/performanceUtils.js";
@@ -15,7 +15,6 @@ import { i as isEmptyObject, a as getDataAttributes } from "../chunks/dataUtils.
15
15
  import { u as useResizeObserver } from "../chunks/useResizeObserver.js";
16
16
  import { d as directionStyles } from "../chunks/direction.module.js";
17
17
  import { E as EnvironmentDefinition } from "../chunks/index2.js";
18
- import AnimatedIconWithReducedMotion from "../AnimatedIcon/component.js";
19
18
  import { B as Button } from "../chunks/Button.js";
20
19
  import { f as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
21
20
  const AnchorsDefinition = defineService("@wix/viewer-service-anchors");
@@ -380,7 +379,6 @@ const itemWrapper = "itemWrapper__sn71X";
380
379
  const labelContainer = "labelContainer__E4y-p";
381
380
  const label = "label__BBchK";
382
381
  const dropdownToggleButton = "dropdownToggleButton__nisoC";
383
- const labelWrapper = "labelWrapper__u5Jgh";
384
382
  const horizontalDropdown = "horizontalDropdown__TETsA";
385
383
  const coverAllSpace = "coverAllSpace__Iwj6W";
386
384
  const srOnly = "srOnly__AGv2l";
@@ -400,7 +398,6 @@ const classes$6 = {
400
398
  labelContainer,
401
399
  label,
402
400
  dropdownToggleButton,
403
- labelWrapper,
404
401
  horizontalDropdown,
405
402
  coverAllSpace,
406
403
  srOnly,
@@ -769,103 +766,6 @@ const MenuItemDropdownIcon = ({
769
766
  button
770
767
  ] }) : button;
771
768
  };
772
- const SELECTION_ANIMATION_SETTLE_DELAY_MS = 0;
773
- const useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
774
- function useIconAnimation({
775
- BuilderAnimationIcon,
776
- isCurrentPage,
777
- isOpen,
778
- onMouseEnter,
779
- onMouseLeave
780
- }) {
781
- const iconAnimatedRef = useRef(null);
782
- const isAnimatedForwardRef = useRef(null);
783
- const prevIsImmediateRef = useRef(null);
784
- const prevIsSelectedRef = useRef(null);
785
- const pendingTimeoutRef = useRef(null);
786
- const [isHovered, setIsHovered] = useState(false);
787
- const onMouseEnterRef = useRef(onMouseEnter);
788
- onMouseEnterRef.current = onMouseEnter;
789
- const onMouseLeaveRef = useRef(onMouseLeave);
790
- onMouseLeaveRef.current = onMouseLeave;
791
- const cancelPending = useCallback(() => {
792
- if (pendingTimeoutRef.current !== null) {
793
- clearTimeout(pendingTimeoutRef.current);
794
- pendingTimeoutRef.current = null;
795
- }
796
- }, []);
797
- useIsomorphicLayoutEffect(() => {
798
- var _a;
799
- if (!BuilderAnimationIcon) {
800
- cancelPending();
801
- isAnimatedForwardRef.current = null;
802
- prevIsImmediateRef.current = null;
803
- prevIsSelectedRef.current = null;
804
- return cancelPending;
805
- }
806
- const applyAnimation = (forward) => {
807
- var _a2, _b;
808
- isAnimatedForwardRef.current = forward;
809
- if (forward) {
810
- (_a2 = iconAnimatedRef.current) == null ? void 0 : _a2.runAnimationForward();
811
- } else {
812
- (_b = iconAnimatedRef.current) == null ? void 0 : _b.runAnimationBackward();
813
- }
814
- };
815
- const isImmediate = isHovered || isOpen;
816
- const isSelected = isCurrentPage;
817
- const shouldBeForward = isImmediate || isSelected;
818
- if (isAnimatedForwardRef.current === null) {
819
- isAnimatedForwardRef.current = shouldBeForward;
820
- prevIsImmediateRef.current = isImmediate;
821
- prevIsSelectedRef.current = isSelected;
822
- if (shouldBeForward) {
823
- (_a = iconAnimatedRef.current) == null ? void 0 : _a.runAnimationForward();
824
- }
825
- return cancelPending;
826
- }
827
- if (prevIsImmediateRef.current !== isImmediate) {
828
- prevIsImmediateRef.current = isImmediate;
829
- cancelPending();
830
- if (isAnimatedForwardRef.current !== shouldBeForward) {
831
- applyAnimation(shouldBeForward);
832
- }
833
- return cancelPending;
834
- }
835
- if (prevIsSelectedRef.current === isSelected) {
836
- cancelPending();
837
- return cancelPending;
838
- }
839
- prevIsSelectedRef.current = isSelected;
840
- if (isImmediate || isAnimatedForwardRef.current === shouldBeForward) {
841
- cancelPending();
842
- return cancelPending;
843
- }
844
- cancelPending();
845
- pendingTimeoutRef.current = setTimeout(() => {
846
- pendingTimeoutRef.current = null;
847
- applyAnimation(isSelected);
848
- }, SELECTION_ANIMATION_SETTLE_DELAY_MS);
849
- return cancelPending;
850
- }, [BuilderAnimationIcon, cancelPending, isCurrentPage, isHovered, isOpen]);
851
- const handleMouseEnter = useCallback(
852
- (event) => {
853
- var _a;
854
- setIsHovered(true);
855
- (_a = onMouseEnterRef.current) == null ? void 0 : _a.call(onMouseEnterRef, event);
856
- },
857
- []
858
- );
859
- const handleMouseLeave = useCallback(
860
- (event) => {
861
- var _a;
862
- setIsHovered(false);
863
- (_a = onMouseLeaveRef.current) == null ? void 0 : _a.call(onMouseLeaveRef, event);
864
- },
865
- []
866
- );
867
- return { iconAnimatedRef, handleMouseEnter, handleMouseLeave };
868
- }
869
769
  const MenuItemLabel = (props) => {
870
770
  const {
871
771
  item: item2,
@@ -883,8 +783,7 @@ const MenuItemLabel = (props) => {
883
783
  toggleDropdown,
884
784
  isOpen,
885
785
  dropdownAnimationState,
886
- submenuToggleId,
887
- BuilderAnimationIcon
786
+ submenuToggleId
888
787
  } = props;
889
788
  const itemLabelClassNames = clsx(
890
789
  classes$6.label,
@@ -903,15 +802,6 @@ const MenuItemLabel = (props) => {
903
802
  );
904
803
  const isInteractive = (hasSubItems || hasLink) && !isCurrentPage;
905
804
  const isDropdownIconOpen = isOpen && dropdownAnimationState.phase !== AnimationPhase.ExitActive;
906
- const mouseEnterAction = createSDKAction(item2, isCurrentPage, onItemMouseIn);
907
- const mouseLeaveAction = createSDKAction(item2, isCurrentPage, onItemMouseOut);
908
- const { iconAnimatedRef, handleMouseEnter, handleMouseLeave } = useIconAnimation({
909
- BuilderAnimationIcon,
910
- isCurrentPage,
911
- isOpen,
912
- onMouseEnter: mouseEnterAction,
913
- onMouseLeave: mouseLeaveAction
914
- });
915
805
  return /* @__PURE__ */ jsxs(
916
806
  "div",
917
807
  {
@@ -921,8 +811,8 @@ const MenuItemLabel = (props) => {
921
811
  "data-preview": partToPreviewStateMap == null ? void 0 : partToPreviewStateMap.item,
922
812
  "data-interactive": isInteractive,
923
813
  onClick: createSDKAction(item2, isCurrentPage, onItemClick),
924
- onMouseEnter: handleMouseEnter,
925
- onMouseLeave: handleMouseLeave,
814
+ onMouseEnter: createSDKAction(item2, isCurrentPage, onItemMouseIn),
815
+ onMouseLeave: createSDKAction(item2, isCurrentPage, onItemMouseOut),
926
816
  onDoubleClick: createSDKAction(item2, isCurrentPage, onItemDblClick),
927
817
  children: [
928
818
  /* @__PURE__ */ jsx(
@@ -935,16 +825,7 @@ const MenuItemLabel = (props) => {
935
825
  ...isCurrentPage && {
936
826
  "aria-current": "page"
937
827
  },
938
- children: /* @__PURE__ */ jsxs("span", { className: classes$6.labelWrapper, children: [
939
- BuilderAnimationIcon && /* @__PURE__ */ jsx(
940
- BuilderAnimationIcon,
941
- {
942
- ref: iconAnimatedRef,
943
- "data-testid": "menu-builder-animation-icon"
944
- }
945
- ),
946
- /* @__PURE__ */ jsx("span", { className: itemLabelClassNames, "data-part": MenuParts.Label, children: label2 })
947
- ] })
828
+ children: /* @__PURE__ */ jsx("div", { className: itemLabelClassNames, "data-part": MenuParts.Label, children: label2 })
948
829
  }
949
830
  ),
950
831
  hasDropdownMenu && ["default", "srOnly"].map((variant) => {
@@ -1928,8 +1809,7 @@ const MenuContent = (props) => {
1928
1809
  onItemMouseOut,
1929
1810
  onItemClick,
1930
1811
  onItemDblClick,
1931
- submenuToggleIdPrefix,
1932
- BuilderAnimationIcon
1812
+ submenuToggleIdPrefix
1933
1813
  } = props;
1934
1814
  const {
1935
1815
  items,
@@ -2033,8 +1913,7 @@ const MenuContent = (props) => {
2033
1913
  onItemDblClick,
2034
1914
  getAnimationPackage,
2035
1915
  submenuDirection,
2036
- submenuToggleIdPrefix,
2037
- BuilderAnimationIcon
1916
+ submenuToggleIdPrefix
2038
1917
  },
2039
1918
  item2.id
2040
1919
  )) }),
@@ -2053,18 +1932,14 @@ const MenuContent = (props) => {
2053
1932
  ) });
2054
1933
  };
2055
1934
  const navbar$1 = "navbar__H6ySL";
2056
- const itemIcon = "itemIcon__zQPE-";
2057
1935
  const rtl = "rtl__7sC1t";
2058
1936
  const ltr = "ltr__r9AkY";
2059
1937
  const classes$1 = {
2060
1938
  navbar: navbar$1,
2061
- itemIcon,
2062
1939
  rtl,
2063
1940
  ltr
2064
1941
  };
2065
- const DEFAULT_ANIMATED_ICON_DURATION = 0.2;
2066
1942
  const NavbarMenu = (props) => {
2067
- var _a;
2068
1943
  const { getLanguageDirection } = useService(
2069
1944
  EnvironmentDefinition
2070
1945
  );
@@ -2073,38 +1948,12 @@ const NavbarMenu = (props) => {
2073
1948
  id,
2074
1949
  className,
2075
1950
  submenuDirection,
2076
- elementProps,
2077
1951
  direction = siteDirection,
2078
1952
  onItemClick,
2079
1953
  onItemDblClick,
2080
1954
  onItemMouseIn,
2081
1955
  onItemMouseOut
2082
1956
  } = props;
2083
- const { item: item2 } = elementProps ?? {};
2084
- const animatedIconProps = (_a = item2 == null ? void 0 : item2.elementProps) == null ? void 0 : _a.animatedIcon;
2085
- const animatedIconPropsRef = useRef(animatedIconProps);
2086
- animatedIconPropsRef.current = animatedIconProps;
2087
- const BuilderAnimationIcon = useMemo(() => {
2088
- const AnimatedIconWithProps = forwardRef(({ className: iconClassName, ...iconProps }, ref) => {
2089
- var _a2, _b;
2090
- return /* @__PURE__ */ jsx(
2091
- AnimatedIconWithReducedMotion,
2092
- {
2093
- ...iconProps,
2094
- duration: ((_a2 = animatedIconPropsRef.current) == null ? void 0 : _a2.duration) ?? DEFAULT_ANIMATED_ICON_DURATION,
2095
- svg: (_b = animatedIconPropsRef.current) == null ? void 0 : _b.svg,
2096
- className: clsx(
2097
- selectors.animatedIcon,
2098
- classes$1.itemIcon,
2099
- iconClassName
2100
- ),
2101
- ref
2102
- }
2103
- );
2104
- });
2105
- AnimatedIconWithProps.displayName = "NavbarAnimatedIcon";
2106
- return AnimatedIconWithProps;
2107
- }, []);
2108
1957
  return /* @__PURE__ */ jsx(
2109
1958
  MenuContent,
2110
1959
  {
@@ -2119,7 +1968,6 @@ const NavbarMenu = (props) => {
2119
1968
  direction,
2120
1969
  submenuDirection,
2121
1970
  onItemClick,
2122
- BuilderAnimationIcon: (animatedIconProps == null ? void 0 : animatedIconProps.svg) ? BuilderAnimationIcon : void 0,
2123
1971
  onItemDblClick,
2124
1972
  onItemMouseIn,
2125
1973
  onItemMouseOut
@@ -1,4 +1,3 @@
1
- import { ACTIONS } from '@wix/component-protocol/schema';
2
1
  export declare const MenuOrientation: {
3
2
  readonly Horizontal: "horizontal";
4
3
  readonly Vertical: "vertical";
@@ -132,10 +131,7 @@ export declare const DisplayNames: {
132
131
  justifyContent: string;
133
132
  background: string;
134
133
  columnGap: string;
135
- };
136
- cssCustomProperties: {
137
134
  'item-icon-size': string;
138
- 'item-icon-gap': string;
139
135
  };
140
136
  displayGroups: {
141
137
  iconGroup: string;
@@ -145,12 +141,6 @@ export declare const DisplayNames: {
145
141
  selected: string;
146
142
  };
147
143
  };
148
- itemLabel: {
149
- elementDisplayName: string;
150
- };
151
- itemIcon: {
152
- elementDisplayName: string;
153
- };
154
144
  dropdown: {
155
145
  elementDisplayName: string;
156
146
  cssCustomProperties: {
@@ -226,10 +216,6 @@ export declare const DisplayNames: {
226
216
  elementDisplayName: string;
227
217
  };
228
218
  };
229
- export declare const menuBuiltInActions: {
230
- readonly elements: typeof ACTIONS.ACTION_NAME.design;
231
- };
232
- export declare const MENU_ANIMATED_ICON_SPEC: "sp.erc.menuAnimatedIcon";
233
219
  export declare const selectors: {
234
220
  menu: string;
235
221
  navbar: string;
@@ -238,8 +224,6 @@ export declare const selectors: {
238
224
  dropdownItem: string;
239
225
  dropdownSubItem: string;
240
226
  scrollButton: string;
241
- animatedIcon: string;
242
- itemLabel: string;
243
227
  hamburgerMenu: string;
244
228
  hamburgerMenuContent: string;
245
229
  hamburgerMenuHeaderContent: string;
@@ -255,8 +239,6 @@ export declare const elementKeys: {
255
239
  subItem: string;
256
240
  scrollButton: string;
257
241
  dropdown: string;
258
- animatedIcon: string;
259
- itemLabel: string;
260
242
  };
261
243
  export declare const presets: {
262
244
  horizontalScrollNavbar: string;
@@ -73,7 +73,7 @@
73
73
  line-height: var(--item-line-height);
74
74
  }
75
75
  [data-open]:not([data-animation-state=exitActive]):not([data-animation-state=exitDone]) > .itemWrapper__sn71X > .labelContainer__E4y-p path, .labelContainer__E4y-p[data-interactive=true]:hover path, .labelContainer__E4y-p[data-preview=hover] path, .labelContainer__E4y-p.hover__tD6A4 path, .labelContainer__E4y-p.menu__item--hover path {
76
- fill: var(--fill, var(--item-hover-icon-color, var(--item-icon-color, currentcolor)));
76
+ fill: var(--item-hover-icon-color, var(--item-icon-color, currentcolor));
77
77
  }
78
78
  .labelContainer__E4y-p[data-selected], .labelContainer__E4y-p[data-preview=selected], .labelContainer__E4y-p.selected__qC-k6, .labelContainer__E4y-p.menu__item--selected {
79
79
  background: var(--item-selected-background, var(--item-background));
@@ -89,7 +89,7 @@
89
89
  line-height: var(--item-line-height);
90
90
  }
91
91
  .labelContainer__E4y-p[data-selected] path, .labelContainer__E4y-p[data-preview=selected] path, .labelContainer__E4y-p.selected__qC-k6 path, .labelContainer__E4y-p.menu__item--selected path {
92
- fill: var(--fill, var(--item-selected-icon-color, var(--item-icon-color, currentcolor)));
92
+ fill: var(--item-selected-icon-color, var(--item-icon-color, currentcolor));
93
93
  }
94
94
  .labelContainer__E4y-p > a::before {
95
95
  content: "";
@@ -131,13 +131,6 @@
131
131
  }
132
132
  }
133
133
 
134
- .labelWrapper__u5Jgh {
135
- display: flex;
136
- align-items: center;
137
- min-width: 0;
138
- gap: var(--item-icon-gap, 0);
139
- }
140
-
141
134
  @media (forced-colors: active) {
142
135
  .dropdownToggleButton__nisoC,
143
136
  .dropdownToggleButton__nisoC svg,
@@ -825,12 +818,6 @@
825
818
  --sr-only-item-icon-display: none;
826
819
  }
827
820
 
828
- .itemIcon__zQPE- {
829
- display: flex;
830
- align-items: center;
831
- flex-shrink: 0;
832
- }
833
-
834
821
  .rtl__7sC1t {
835
822
  --scroll-button-transform: scaleX(-1);
836
823
  }
@@ -952,25 +939,6 @@
952
939
  .fallbackDirection__HeRgn:not([dir]) {
953
940
  direction: var(--wix-opt-in-direction);
954
941
  }
955
- .animatedIcon__3o5ii {
956
- --size: 16px;
957
- --fill: #000000;
958
- --rotation: 0deg;
959
- }
960
- .animatedIcon__3o5ii {
961
- display: block;
962
- width: inherit;
963
- height: inherit;
964
- width: var(--size);
965
- height: var(--size);
966
- }
967
- .animatedIcon__3o5ii svg {
968
- width: var(--size);
969
- height: var(--size);
970
- display: block;
971
- fill: var(--fill);
972
- transform: rotate(var(--rotation));
973
- }
974
942
  .rootDirection__PPhdq {
975
943
  direction: var(--btn-direction);
976
944
  }
@@ -1095,4 +1063,23 @@
1095
1063
 
1096
1064
  .button__i8gkO {
1097
1065
  min-width: min-content !important;
1066
+ }
1067
+ .animatedIcon__3o5ii {
1068
+ --size: 16px;
1069
+ --fill: #000000;
1070
+ --rotation: 0deg;
1071
+ }
1072
+ .animatedIcon__3o5ii {
1073
+ display: block;
1074
+ width: inherit;
1075
+ height: inherit;
1076
+ width: var(--size);
1077
+ height: var(--size);
1078
+ }
1079
+ .animatedIcon__3o5ii svg {
1080
+ width: var(--size);
1081
+ height: var(--size);
1082
+ display: block;
1083
+ fill: var(--fill);
1084
+ transform: rotate(var(--rotation));
1098
1085
  }
@@ -1,5 +1,5 @@
1
1
  import { E as ELEMENTS, C as CSS_PROPERTIES, b as DISPLAY_GROUPS, N as NativeStateType, a as ACTIONS, D as DATA, L as LAYOUT, I as INTERACTIONS, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
2
- import { e as DesignStates, f as DisplayNames, s as selectors, g as DropdownAnchorPositions, h as DropdownAppliedStyleProperties, i as elementKeys, j as MENU_ANIMATED_ICON_SPEC, k as states, p as presets, m as menuBuiltInActions } from "../chunks/constants26.js";
2
+ import { e as DesignStates, f as DisplayNames, s as selectors, g as DropdownAnchorPositions, h as DropdownAppliedStyleProperties, i as elementKeys, j as states, p as presets } from "../chunks/constants26.js";
3
3
  import { w as withSpec } from "../chunks/manifest.js";
4
4
  import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
5
5
  import { c as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
@@ -509,53 +509,6 @@ const scrollButtonConfig = {
509
509
  }
510
510
  }
511
511
  };
512
- const animatedIconConfig = {
513
- spec: MENU_ANIMATED_ICON_SPEC,
514
- elementType: ELEMENTS.ELEMENT_TYPE.refElement,
515
- [ELEMENTS.ELEMENT_TYPE.refElement]: {
516
- displayName: DisplayNames.itemIcon.elementDisplayName,
517
- selector: `.${selectors.animatedIcon}`,
518
- type: "wixEditorElements.AnimatedIcon",
519
- behaviors: {
520
- selectable: false,
521
- removable: true
522
- },
523
- cssProperties: {
524
- display: {
525
- defaultValue: CSS_PROPERTIES.DISPLAY_VALUE.none
526
- }
527
- }
528
- }
529
- };
530
- const itemLabelDisplayConfig = {
531
- displayValues: [
532
- CSS_PROPERTIES.DISPLAY_VALUE.none,
533
- CSS_PROPERTIES.DISPLAY_VALUE.flex
534
- ]
535
- };
536
- const itemLabelConfig = {
537
- elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
538
- [ELEMENTS.ELEMENT_TYPE.inlineElement]: {
539
- selector: `.${selectors.itemLabel}`,
540
- displayName: DisplayNames.itemLabel.elementDisplayName,
541
- behaviors: {
542
- selectable: false,
543
- removable: true
544
- },
545
- cssProperties: {
546
- display: {
547
- display: itemLabelDisplayConfig
548
- },
549
- font: { defaultValue: "14px sans-serif" },
550
- color: { defaultValue: "rgba(0, 0, 0, 1)" },
551
- textDecorationLine: { defaultValue: "none" },
552
- textTransform: { defaultValue: "none" },
553
- letterSpacing: { defaultValue: "normal" },
554
- textShadow: { defaultValue: "none" },
555
- textAlign: { defaultValue: "center" }
556
- }
557
- }
558
- };
559
512
  const itemConfig = {
560
513
  elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
561
514
  [ELEMENTS.ELEMENT_TYPE.inlineElement]: {
@@ -616,21 +569,14 @@ const itemConfig = {
616
569
  }
617
570
  },
618
571
  cssCustomProperties: {
572
+ // Icon
619
573
  "item-icon-size": {
620
- displayName: DisplayNames.item.cssCustomProperties["item-icon-size"],
574
+ displayName: DisplayNames.item.cssProperties["item-icon-size"],
621
575
  cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.length
622
576
  },
623
577
  "item-icon-color": {
624
578
  cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color
625
- },
626
- "item-icon-gap": {
627
- displayName: DisplayNames.item.cssCustomProperties["item-icon-gap"],
628
- cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.columnGap
629
579
  }
630
- },
631
- elements: {
632
- [elementKeys.itemLabel]: itemLabelConfig,
633
- [elementKeys.animatedIcon]: animatedIconConfig
634
580
  }
635
581
  }
636
582
  };
@@ -1271,15 +1217,6 @@ const manifest = {
1271
1217
  }
1272
1218
  }
1273
1219
  },
1274
- elements: {
1275
- execution: {
1276
- actionType: ACTIONS.ACTION_TYPE.forward,
1277
- forward: {
1278
- elementPath: `.self.${elementKeys.navbar}.${elementKeys.item}`,
1279
- actionName: menuBuiltInActions.elements
1280
- }
1281
- }
1282
- },
1283
1220
  design: {
1284
1221
  displayName: DisplayNames.root.actions.design
1285
1222
  },
@@ -1303,7 +1240,7 @@ const manifest = {
1303
1240
  execution: {
1304
1241
  actionType: ACTIONS.ACTION_TYPE.forward,
1305
1242
  forward: {
1306
- elementPath: `.self.${elementKeys.navbar}.${elementKeys.item}.${elementKeys.animatedIcon}`,
1243
+ elementPath: `.self.${elementKeys.hamburgerOpenButton}.animatedIcon`,
1307
1244
  actionName: ACTIONS.ACTION_NAME.custom,
1308
1245
  custom: "animatedIcon"
1309
1246
  }
@@ -1442,7 +1379,6 @@ const manifest = {
1442
1379
  "@wix/viewer-service-url"
1443
1380
  ],
1444
1381
  dependencies: {
1445
- componentDependencies: ["@wix/editor-react-components/AnimatedIcon"],
1446
1382
  serviceDependencies: [
1447
1383
  "@wix/viewer-service-anchors",
1448
1384
  "@wix/viewer-service-environment",
@@ -1,5 +1,2 @@
1
- import { ElementItem, CssPropertyItem } from '@wix/component-protocol/schema';
2
- export declare const itemLabelDisplayConfig: CssPropertyItem["display"];
3
- export declare const HIDDEN_ITEM_TEXT_CSS_PROPERTIES: readonly ["font", "color", "textDecorationLine", "textTransform", "letterSpacing", "textShadow"];
4
- export declare const itemLabelConfig: ElementItem;
1
+ import { ElementItem } from '@wix/component-protocol/schema';
5
2
  export declare const itemConfig: ElementItem;
@@ -8,8 +8,6 @@ type HorizontalHugNavbarProps = {
8
8
  isDropdownAnchorScreen: boolean;
9
9
  isDropdownAnchorMenuItem: boolean;
10
10
  dropdownColumnsNumber: string;
11
- hideItemIconGap: boolean;
12
- isIconHidden: boolean;
13
11
  };
14
12
  export declare const getHorizontalHugNavbarManifestOverrides: (props: HorizontalHugNavbarProps) => Partial<EditorElement>;
15
13
  export {};
@@ -9,8 +9,6 @@ type HorizontalScrollNavbarProps = {
9
9
  isDropdownAnchorScreen: boolean;
10
10
  isDropdownAnchorMenuItem: boolean;
11
11
  dropdownColumnsNumber: string;
12
- hideItemIconGap: boolean;
13
- isIconHidden: boolean;
14
12
  };
15
13
  export declare const getHorizontalScrollNavbarManifestOverrides: (props: HorizontalScrollNavbarProps) => Partial<EditorElement>;
16
14
  export {};
@@ -7,8 +7,6 @@ export type VerticalNavbarProps = {
7
7
  isDropdownItemFitToText: boolean;
8
8
  dropdownColumnsNumber: string;
9
9
  isVerticalDropdownAlwaysOpen: boolean;
10
- hideItemIconGap: boolean;
11
- isIconHidden: boolean;
12
10
  };
13
- export declare const getVerticalNavbarElementManifestOverrides: ({ hasDropdownItems, hasDropdownContent, hasDropdownSubItems, isItemFitToText, isDropdownItemFitToText, dropdownColumnsNumber, hideItemIconGap, }: VerticalNavbarProps) => ElementItem;
11
+ export declare const getVerticalNavbarElementManifestOverrides: ({ hasDropdownItems, hasDropdownContent, hasDropdownSubItems, isItemFitToText, isDropdownItemFitToText, dropdownColumnsNumber, }: VerticalNavbarProps) => ElementItem;
14
12
  export declare const getVerticalNavbarManifestOverrides: (props: VerticalNavbarProps) => Partial<EditorElement>;
@@ -204,11 +204,8 @@ const DisplayNames = {
204
204
  cssProperties: {
205
205
  justifyContent: "Text alignment",
206
206
  background: "Background",
207
- columnGap: "Space between items and chevrons"
208
- },
209
- cssCustomProperties: {
210
- "item-icon-size": "Size",
211
- "item-icon-gap": "Space between items and icons"
207
+ columnGap: "Space between menu items and icons",
208
+ "item-icon-size": "Size"
212
209
  },
213
210
  displayGroups: {
214
211
  iconGroup: "Icons"
@@ -218,12 +215,6 @@ const DisplayNames = {
218
215
  selected: "Selected"
219
216
  }
220
217
  },
221
- itemLabel: {
222
- elementDisplayName: "Item's text"
223
- },
224
- itemIcon: {
225
- elementDisplayName: "Item's icon"
226
- },
227
218
  dropdown: {
228
219
  elementDisplayName: "Dropdowns",
229
220
  cssCustomProperties: {
@@ -299,10 +290,6 @@ const DisplayNames = {
299
290
  elementDisplayName: "Close Button"
300
291
  }
301
292
  };
302
- const menuBuiltInActions = {
303
- elements: "elements"
304
- };
305
- const MENU_ANIMATED_ICON_SPEC = "sp.erc.menuAnimatedIcon";
306
293
  const selectors = {
307
294
  menu: "menu",
308
295
  navbar: "navbar",
@@ -311,8 +298,6 @@ const selectors = {
311
298
  dropdownItem: "dropdown-item",
312
299
  dropdownSubItem: "dropdown-sub-item",
313
300
  scrollButton: "scroll-button",
314
- animatedIcon: "animated-icon",
315
- itemLabel: "item-label",
316
301
  hamburgerMenu: "hamburger-menu",
317
302
  hamburgerMenuContent: "hamburger-menu-content",
318
303
  hamburgerMenuHeaderContent: "hamburger-menu-header-content",
@@ -327,9 +312,7 @@ const elementKeys = {
327
312
  item: "item",
328
313
  subItem: "subItem",
329
314
  scrollButton: "scrollButton",
330
- dropdown: "dropdown",
331
- animatedIcon: "animatedIcon",
332
- itemLabel: "itemLabel"
315
+ dropdown: "dropdown"
333
316
  };
334
317
  const presets = {
335
318
  horizontalScrollNavbar: "horizontalScrollNavbar",
@@ -432,9 +415,7 @@ export {
432
415
  DropdownAnchorPositions as g,
433
416
  DropdownAppliedStyleProperties as h,
434
417
  elementKeys as i,
435
- MENU_ANIMATED_ICON_SPEC as j,
436
- states as k,
437
- menuBuiltInActions as m,
418
+ states as j,
438
419
  presets as p,
439
420
  selectors as s,
440
421
  translationsKeys as t,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2346.0",
3
+ "version": "1.2347.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -199,5 +199,5 @@
199
199
  "registry": "https://registry.npmjs.org/",
200
200
  "access": "public"
201
201
  },
202
- "falconPackageHash": "4444237208bbeddbcf581380b41a436bef9adc00545781801642118b"
202
+ "falconPackageHash": "da47f7a892d684020ed2bc122b653607fc518a2d33af8b46aa75fa9a"
203
203
  }
@@ -1,17 +0,0 @@
1
- import { default as React, RefObject } from 'react';
2
- import { AnimatedSvgRef } from '../../../../AnimatedIcon/types';
3
- import { BuilderAnimationIconComponent } from '../../../Menu.types';
4
- type UseIconAnimationOptions = {
5
- BuilderAnimationIcon: BuilderAnimationIconComponent | undefined;
6
- isCurrentPage: boolean;
7
- isOpen: boolean;
8
- onMouseEnter?: (event: React.MouseEvent<HTMLDivElement>) => void;
9
- onMouseLeave?: (event: React.MouseEvent<HTMLDivElement>) => void;
10
- };
11
- type UseIconAnimationResult = {
12
- iconAnimatedRef: RefObject<AnimatedSvgRef>;
13
- handleMouseEnter: (event: React.MouseEvent<HTMLDivElement>) => void;
14
- handleMouseLeave: (event: React.MouseEvent<HTMLDivElement>) => void;
15
- };
16
- export declare function useIconAnimation({ BuilderAnimationIcon, isCurrentPage, isOpen, onMouseEnter, onMouseLeave, }: UseIconAnimationOptions): UseIconAnimationResult;
17
- export {};
@@ -1,2 +0,0 @@
1
- import { ElementItem } from '@wix/component-protocol/schema';
2
- export declare const animatedIconConfig: ElementItem;