@wix/editor-react-components 1.2495.0 → 1.2497.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/site/components/AnimatedIcon/types.d.ts +1 -1
- package/dist/site/components/Image3/component.js +479 -6
- package/dist/site/components/Logo/component.js +156 -1
- package/dist/site/components/Logo/css.css +15 -16
- package/dist/site/components/Menu/Menu.types.d.ts +1 -22
- package/dist/site/components/Menu/component.js +11 -176
- package/dist/site/components/Menu/constants.d.ts +0 -18
- package/dist/site/components/Menu/css.css +26 -39
- package/dist/site/components/Menu/manifest.js +4 -68
- package/dist/site/components/Menu/manifestConfigs/itemConfig.d.ts +1 -4
- package/dist/site/components/Menu/manifestConfigs/overrides/horizontalHugNavbarConfig.d.ts +0 -2
- package/dist/site/components/Menu/manifestConfigs/overrides/horizontalScrollNavbarConfig.d.ts +0 -2
- package/dist/site/components/Menu/manifestConfigs/overrides/verticalNavbarConfig.d.ts +1 -3
- package/dist/site/components/TransparentVideo/TransparentVideo.types.d.ts +2 -2
- package/dist/site/components/TransparentVideo/component.js +8 -7
- package/dist/site/components/TransparentVideo/css.css +5 -21
- package/dist/site/components/TransparentVideo/useTransparentVideo.d.ts +1 -1
- package/dist/site/components/VideoUpload/css.css +5 -13
- package/dist/site/components/chunks/Video.js +651 -12
- package/dist/site/components/chunks/constants27.js +4 -23
- package/dist/site/components/chunks/fastdom.js +166 -0
- package/dist/site/components/chunks/index5.js +8 -4
- package/package.json +4 -4
- package/dist/site/components/Menu/components/MenuContent/MenuItem/useIconAnimation.d.ts +0 -17
- package/dist/site/components/Menu/manifestConfigs/animatedIconConfig.d.ts +0 -2
- package/dist/site/components/chunks/Image.js +0 -159
- package/dist/site/components/chunks/customElementInit.js +0 -644
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
.
|
|
1
|
+
.image__WopE9 {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
.image__WopE9 img {
|
|
7
|
+
max-width: var(--wix-img-max-width, 100%);
|
|
8
|
+
}
|
|
9
|
+
.image__WopE9[data-animate-blur] img {
|
|
10
|
+
filter: blur(9px);
|
|
11
|
+
transition: filter 0.8s ease-in;
|
|
12
|
+
}
|
|
13
|
+
.image__WopE9[data-animate-blur] img[data-load-done] {
|
|
14
|
+
filter: none;
|
|
15
|
+
}.logo__Y9w6a {
|
|
2
16
|
display: flex;
|
|
3
17
|
align-items: center;
|
|
4
18
|
justify-content: center;
|
|
@@ -28,19 +42,4 @@
|
|
|
28
42
|
width: 100%;
|
|
29
43
|
height: 100%;
|
|
30
44
|
display: block;
|
|
31
|
-
}
|
|
32
|
-
.image__WopE9 {
|
|
33
|
-
display: block;
|
|
34
|
-
width: 100%;
|
|
35
|
-
height: 100%;
|
|
36
|
-
}
|
|
37
|
-
.image__WopE9 img {
|
|
38
|
-
max-width: var(--wix-img-max-width, 100%);
|
|
39
|
-
}
|
|
40
|
-
.image__WopE9[data-animate-blur] img {
|
|
41
|
-
filter: blur(9px);
|
|
42
|
-
transition: filter 0.8s ease-in;
|
|
43
|
-
}
|
|
44
|
-
.image__WopE9[data-animate-blur] img[data-load-done] {
|
|
45
|
-
filter: none;
|
|
46
45
|
}
|
|
@@ -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
|
|
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 & {
|
|
@@ -27,10 +26,6 @@ export type MenuDropdownElementProps = {
|
|
|
27
26
|
export type MenuNavbarElementProps = {
|
|
28
27
|
item?: {
|
|
29
28
|
className?: string;
|
|
30
|
-
elementProps?: {
|
|
31
|
-
animatedIcon?: AnimatedIconElementProps;
|
|
32
|
-
itemLabel?: ItemLabelElementProps;
|
|
33
|
-
};
|
|
34
29
|
};
|
|
35
30
|
scrollButton?: {
|
|
36
31
|
className?: string;
|
|
@@ -40,20 +35,6 @@ export type MenuNavbarElementProps = {
|
|
|
40
35
|
export type HamburgerMenuElementProps = {
|
|
41
36
|
hamburgerCloseButton?: ButtonProps;
|
|
42
37
|
};
|
|
43
|
-
export type BuilderAnimationIconProps = {
|
|
44
|
-
className?: string;
|
|
45
|
-
'data-testid'?: string;
|
|
46
|
-
};
|
|
47
|
-
export type BuilderAnimationIconComponent = React.ForwardRefExoticComponent<BuilderAnimationIconProps & React.RefAttributes<AnimatedSvgRef>>;
|
|
48
|
-
export interface AnimatedIconElementProps {
|
|
49
|
-
svg?: VectorArt;
|
|
50
|
-
duration?: number;
|
|
51
|
-
svgLastAnimatedSelected?: VectorArt;
|
|
52
|
-
className?: string;
|
|
53
|
-
}
|
|
54
|
-
export interface ItemLabelElementProps {
|
|
55
|
-
className?: string;
|
|
56
|
-
}
|
|
57
38
|
export type HamburgerMenuProps = {
|
|
58
39
|
className?: string;
|
|
59
40
|
isOpen?: boolean;
|
|
@@ -158,7 +139,6 @@ export type IMenuContentProps = Partial<IMenuItemsPropsSDKActions> & {
|
|
|
158
139
|
submenuDirection?: Direction;
|
|
159
140
|
submenuToggleIdPrefix?: string;
|
|
160
141
|
menuElementProps?: MenuNavbarElementProps;
|
|
161
|
-
BuilderAnimationIcon?: BuilderAnimationIconComponent;
|
|
162
142
|
};
|
|
163
143
|
export type IMenuItemProps = Partial<IMenuItemsPropsSDKActions> & {
|
|
164
144
|
item: PropsWithChildren<MenuItemData & {
|
|
@@ -172,7 +152,6 @@ export type IMenuItemProps = Partial<IMenuItemsPropsSDKActions> & {
|
|
|
172
152
|
submenuDirection?: Direction;
|
|
173
153
|
submenuToggleIdPrefix?: string;
|
|
174
154
|
menuElementProps?: MenuNavbarElementProps;
|
|
175
|
-
BuilderAnimationIcon?: BuilderAnimationIconComponent;
|
|
176
155
|
} & Translations;
|
|
177
156
|
export type ScrollControlsProps = {
|
|
178
157
|
isScrollForwardButtonShown: boolean;
|
|
@@ -5,7 +5,7 @@ import { U as UrlDefinition } from "../chunks/index12.js";
|
|
|
5
5
|
import { d as defineService } from "../chunks/index8.js";
|
|
6
6
|
import { T as TranslationsDefinition } from "../chunks/index6.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, c as DesignStates, u as useAnimationState, e as ARIA_LABEL_NAMESPACE, t as translationsKeys } from "../chunks/constants27.js";
|
|
8
|
-
import React__default, { createContext, useContext, useRef, useCallback, useMemo, useState, useEffect, useLayoutEffect
|
|
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/utils3.js";
|
|
11
11
|
import { d as debounce } from "../chunks/performanceUtils.js";
|
|
@@ -14,7 +14,6 @@ import { i as isEmptyObject, a as getDataAttributes } from "../chunks/dataUtils.
|
|
|
14
14
|
import { u as useResizeObserver } from "../chunks/useResizeObserver.js";
|
|
15
15
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
16
16
|
import { E as EnvironmentDefinition } from "../chunks/index2.js";
|
|
17
|
-
import AnimatedIconWithReducedMotion from "../AnimatedIcon/component.js";
|
|
18
17
|
import { B as Button } from "../chunks/Button.js";
|
|
19
18
|
import { f as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
|
|
20
19
|
const AnchorsDefinition = defineService("@wix/viewer-service-anchors");
|
|
@@ -375,7 +374,6 @@ const itemWrapper = "itemWrapper__sn71X";
|
|
|
375
374
|
const labelContainer = "labelContainer__E4y-p";
|
|
376
375
|
const label = "label__BBchK";
|
|
377
376
|
const dropdownToggleButton = "dropdownToggleButton__nisoC";
|
|
378
|
-
const labelWrapper = "labelWrapper__u5Jgh";
|
|
379
377
|
const horizontalDropdown = "horizontalDropdown__TETsA";
|
|
380
378
|
const coverAllSpace = "coverAllSpace__Iwj6W";
|
|
381
379
|
const srOnly = "srOnly__AGv2l";
|
|
@@ -395,7 +393,6 @@ const classes$6 = {
|
|
|
395
393
|
labelContainer,
|
|
396
394
|
label,
|
|
397
395
|
dropdownToggleButton,
|
|
398
|
-
labelWrapper,
|
|
399
396
|
horizontalDropdown,
|
|
400
397
|
coverAllSpace,
|
|
401
398
|
srOnly,
|
|
@@ -741,105 +738,7 @@ const MenuItemDropdownIcon = ({
|
|
|
741
738
|
button
|
|
742
739
|
] }) : button;
|
|
743
740
|
};
|
|
744
|
-
const SELECTION_ANIMATION_SETTLE_DELAY_MS = 0;
|
|
745
|
-
const useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
|
|
746
|
-
function useIconAnimation({
|
|
747
|
-
BuilderAnimationIcon,
|
|
748
|
-
isCurrentPage,
|
|
749
|
-
isOpen,
|
|
750
|
-
onMouseEnter,
|
|
751
|
-
onMouseLeave
|
|
752
|
-
}) {
|
|
753
|
-
const iconAnimatedRef = useRef(null);
|
|
754
|
-
const isAnimatedForwardRef = useRef(null);
|
|
755
|
-
const prevIsImmediateRef = useRef(null);
|
|
756
|
-
const prevIsSelectedRef = useRef(null);
|
|
757
|
-
const pendingTimeoutRef = useRef(null);
|
|
758
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
759
|
-
const onMouseEnterRef = useRef(onMouseEnter);
|
|
760
|
-
onMouseEnterRef.current = onMouseEnter;
|
|
761
|
-
const onMouseLeaveRef = useRef(onMouseLeave);
|
|
762
|
-
onMouseLeaveRef.current = onMouseLeave;
|
|
763
|
-
const cancelPending = useCallback(() => {
|
|
764
|
-
if (pendingTimeoutRef.current !== null) {
|
|
765
|
-
clearTimeout(pendingTimeoutRef.current);
|
|
766
|
-
pendingTimeoutRef.current = null;
|
|
767
|
-
}
|
|
768
|
-
}, []);
|
|
769
|
-
useIsomorphicLayoutEffect(() => {
|
|
770
|
-
var _a;
|
|
771
|
-
if (!BuilderAnimationIcon) {
|
|
772
|
-
cancelPending();
|
|
773
|
-
isAnimatedForwardRef.current = null;
|
|
774
|
-
prevIsImmediateRef.current = null;
|
|
775
|
-
prevIsSelectedRef.current = null;
|
|
776
|
-
return cancelPending;
|
|
777
|
-
}
|
|
778
|
-
const applyAnimation = (forward) => {
|
|
779
|
-
var _a2, _b;
|
|
780
|
-
isAnimatedForwardRef.current = forward;
|
|
781
|
-
if (forward) {
|
|
782
|
-
(_a2 = iconAnimatedRef.current) == null ? void 0 : _a2.runAnimationForward();
|
|
783
|
-
} else {
|
|
784
|
-
(_b = iconAnimatedRef.current) == null ? void 0 : _b.runAnimationBackward();
|
|
785
|
-
}
|
|
786
|
-
};
|
|
787
|
-
const isImmediate = isHovered || isOpen;
|
|
788
|
-
const isSelected = isCurrentPage;
|
|
789
|
-
const shouldBeForward = isImmediate || isSelected;
|
|
790
|
-
if (isAnimatedForwardRef.current === null) {
|
|
791
|
-
isAnimatedForwardRef.current = shouldBeForward;
|
|
792
|
-
prevIsImmediateRef.current = isImmediate;
|
|
793
|
-
prevIsSelectedRef.current = isSelected;
|
|
794
|
-
if (shouldBeForward) {
|
|
795
|
-
(_a = iconAnimatedRef.current) == null ? void 0 : _a.runAnimationForward();
|
|
796
|
-
}
|
|
797
|
-
return cancelPending;
|
|
798
|
-
}
|
|
799
|
-
if (prevIsImmediateRef.current !== isImmediate) {
|
|
800
|
-
prevIsImmediateRef.current = isImmediate;
|
|
801
|
-
cancelPending();
|
|
802
|
-
if (isAnimatedForwardRef.current !== shouldBeForward) {
|
|
803
|
-
applyAnimation(shouldBeForward);
|
|
804
|
-
}
|
|
805
|
-
return cancelPending;
|
|
806
|
-
}
|
|
807
|
-
if (prevIsSelectedRef.current === isSelected) {
|
|
808
|
-
cancelPending();
|
|
809
|
-
return cancelPending;
|
|
810
|
-
}
|
|
811
|
-
prevIsSelectedRef.current = isSelected;
|
|
812
|
-
if (isImmediate || isAnimatedForwardRef.current === shouldBeForward) {
|
|
813
|
-
cancelPending();
|
|
814
|
-
return cancelPending;
|
|
815
|
-
}
|
|
816
|
-
cancelPending();
|
|
817
|
-
pendingTimeoutRef.current = setTimeout(() => {
|
|
818
|
-
pendingTimeoutRef.current = null;
|
|
819
|
-
applyAnimation(isSelected);
|
|
820
|
-
}, SELECTION_ANIMATION_SETTLE_DELAY_MS);
|
|
821
|
-
return cancelPending;
|
|
822
|
-
}, [BuilderAnimationIcon, cancelPending, isCurrentPage, isHovered, isOpen]);
|
|
823
|
-
const handleMouseEnter = useCallback(
|
|
824
|
-
(event) => {
|
|
825
|
-
var _a;
|
|
826
|
-
setIsHovered(true);
|
|
827
|
-
(_a = onMouseEnterRef.current) == null ? void 0 : _a.call(onMouseEnterRef, event);
|
|
828
|
-
},
|
|
829
|
-
[]
|
|
830
|
-
);
|
|
831
|
-
const handleMouseLeave = useCallback(
|
|
832
|
-
(event) => {
|
|
833
|
-
var _a;
|
|
834
|
-
setIsHovered(false);
|
|
835
|
-
(_a = onMouseLeaveRef.current) == null ? void 0 : _a.call(onMouseLeaveRef, event);
|
|
836
|
-
},
|
|
837
|
-
[]
|
|
838
|
-
);
|
|
839
|
-
return { iconAnimatedRef, handleMouseEnter, handleMouseLeave };
|
|
840
|
-
}
|
|
841
741
|
const MenuItemLabel = (props) => {
|
|
842
|
-
var _a, _b, _c, _d;
|
|
843
742
|
const {
|
|
844
743
|
item: item2,
|
|
845
744
|
currentItem,
|
|
@@ -857,14 +756,12 @@ const MenuItemLabel = (props) => {
|
|
|
857
756
|
isOpen,
|
|
858
757
|
dropdownAnimationState,
|
|
859
758
|
submenuToggleId,
|
|
860
|
-
itemClassName
|
|
861
|
-
BuilderAnimationIcon
|
|
759
|
+
itemClassName
|
|
862
760
|
} = props;
|
|
863
761
|
const isCurrentPage = isCurrentItem(item2, currentItem);
|
|
864
762
|
const { label: label2, link } = item2;
|
|
865
763
|
const hasLink = !isEmptyObject(link);
|
|
866
764
|
const linkRef = useRef(null);
|
|
867
|
-
const itemLabelClassName = (_d = (_c = (_b = (_a = props.menuElementProps) == null ? void 0 : _a.item) == null ? void 0 : _b.elementProps) == null ? void 0 : _c.itemLabel) == null ? void 0 : _d.className;
|
|
868
765
|
const labelContainerClassNames = clsx(
|
|
869
766
|
selectors.item,
|
|
870
767
|
classes$6.labelContainer,
|
|
@@ -873,15 +770,6 @@ const MenuItemLabel = (props) => {
|
|
|
873
770
|
);
|
|
874
771
|
const isInteractive = (hasSubItems || hasLink) && !isCurrentPage;
|
|
875
772
|
const isDropdownIconOpen = isOpen && dropdownAnimationState.phase !== AnimationPhase.ExitActive;
|
|
876
|
-
const mouseEnterAction = createSDKAction(item2, isCurrentPage, onItemMouseIn);
|
|
877
|
-
const mouseLeaveAction = createSDKAction(item2, isCurrentPage, onItemMouseOut);
|
|
878
|
-
const { iconAnimatedRef, handleMouseEnter, handleMouseLeave } = useIconAnimation({
|
|
879
|
-
BuilderAnimationIcon,
|
|
880
|
-
isCurrentPage,
|
|
881
|
-
isOpen,
|
|
882
|
-
onMouseEnter: mouseEnterAction,
|
|
883
|
-
onMouseLeave: mouseLeaveAction
|
|
884
|
-
});
|
|
885
773
|
return /* @__PURE__ */ jsxs(
|
|
886
774
|
"div",
|
|
887
775
|
{
|
|
@@ -891,8 +779,8 @@ const MenuItemLabel = (props) => {
|
|
|
891
779
|
"data-preview": partToPreviewStateMap == null ? void 0 : partToPreviewStateMap.item,
|
|
892
780
|
"data-interactive": isInteractive,
|
|
893
781
|
onClick: createSDKAction(item2, isCurrentPage, onItemClick),
|
|
894
|
-
onMouseEnter:
|
|
895
|
-
onMouseLeave:
|
|
782
|
+
onMouseEnter: createSDKAction(item2, isCurrentPage, onItemMouseIn),
|
|
783
|
+
onMouseLeave: createSDKAction(item2, isCurrentPage, onItemMouseOut),
|
|
896
784
|
onDoubleClick: createSDKAction(item2, isCurrentPage, onItemDblClick),
|
|
897
785
|
children: [
|
|
898
786
|
/* @__PURE__ */ jsx(
|
|
@@ -905,35 +793,15 @@ const MenuItemLabel = (props) => {
|
|
|
905
793
|
...isCurrentPage && {
|
|
906
794
|
"aria-current": "page"
|
|
907
795
|
},
|
|
908
|
-
children: /* @__PURE__ */
|
|
909
|
-
BuilderAnimationIcon && /* @__PURE__ */ jsx(
|
|
910
|
-
BuilderAnimationIcon,
|
|
911
|
-
{
|
|
912
|
-
ref: iconAnimatedRef,
|
|
913
|
-
"data-testid": "menu-builder-animation-icon"
|
|
914
|
-
}
|
|
915
|
-
),
|
|
916
|
-
/* @__PURE__ */ jsx(
|
|
917
|
-
"span",
|
|
918
|
-
{
|
|
919
|
-
className: clsx(
|
|
920
|
-
selectors.itemLabel,
|
|
921
|
-
classes$6.label,
|
|
922
|
-
itemLabelClassName
|
|
923
|
-
),
|
|
924
|
-
"data-part": MenuParts.Label,
|
|
925
|
-
children: label2
|
|
926
|
-
}
|
|
927
|
-
)
|
|
928
|
-
] })
|
|
796
|
+
children: /* @__PURE__ */ jsx("div", { className: classes$6.label, "data-part": MenuParts.Label, children: label2 })
|
|
929
797
|
}
|
|
930
798
|
),
|
|
931
799
|
hasDropdownMenu && ["default", "srOnly"].map((variant) => {
|
|
932
|
-
var
|
|
800
|
+
var _a;
|
|
933
801
|
return /* @__PURE__ */ jsx(
|
|
934
802
|
MenuItemDropdownIcon,
|
|
935
803
|
{
|
|
936
|
-
ariaLabel: (
|
|
804
|
+
ariaLabel: (_a = translations.dropdownButtonAriaLabel) == null ? void 0 : _a.replace(
|
|
937
805
|
"<%= itemName %>",
|
|
938
806
|
label2
|
|
939
807
|
),
|
|
@@ -1915,8 +1783,7 @@ const MenuContent = (props) => {
|
|
|
1915
1783
|
onItemClick,
|
|
1916
1784
|
onItemDblClick,
|
|
1917
1785
|
submenuToggleIdPrefix,
|
|
1918
|
-
menuElementProps
|
|
1919
|
-
BuilderAnimationIcon
|
|
1786
|
+
menuElementProps
|
|
1920
1787
|
} = props;
|
|
1921
1788
|
const {
|
|
1922
1789
|
items,
|
|
@@ -2018,8 +1885,7 @@ const MenuContent = (props) => {
|
|
|
2018
1885
|
getAnimationPackage,
|
|
2019
1886
|
submenuDirection,
|
|
2020
1887
|
submenuToggleIdPrefix,
|
|
2021
|
-
menuElementProps
|
|
2022
|
-
BuilderAnimationIcon
|
|
1888
|
+
menuElementProps
|
|
2023
1889
|
},
|
|
2024
1890
|
item2.id
|
|
2025
1891
|
)) }),
|
|
@@ -2039,18 +1905,14 @@ const MenuContent = (props) => {
|
|
|
2039
1905
|
) });
|
|
2040
1906
|
};
|
|
2041
1907
|
const navbar$1 = "navbar__H6ySL";
|
|
2042
|
-
const itemIcon = "itemIcon__zQPE-";
|
|
2043
1908
|
const rtl = "rtl__7sC1t";
|
|
2044
1909
|
const ltr = "ltr__r9AkY";
|
|
2045
1910
|
const classes$1 = {
|
|
2046
1911
|
navbar: navbar$1,
|
|
2047
|
-
itemIcon,
|
|
2048
1912
|
rtl,
|
|
2049
1913
|
ltr
|
|
2050
1914
|
};
|
|
2051
|
-
const DEFAULT_ANIMATED_ICON_DURATION = 0.2;
|
|
2052
1915
|
const NavbarMenu = (props) => {
|
|
2053
|
-
var _a;
|
|
2054
1916
|
const { getLanguageDirection } = useService(
|
|
2055
1917
|
EnvironmentDefinition
|
|
2056
1918
|
);
|
|
@@ -2059,39 +1921,13 @@ const NavbarMenu = (props) => {
|
|
|
2059
1921
|
id,
|
|
2060
1922
|
className,
|
|
2061
1923
|
submenuDirection,
|
|
2062
|
-
elementProps,
|
|
2063
1924
|
direction = siteDirection,
|
|
2064
1925
|
onItemClick,
|
|
2065
1926
|
onItemDblClick,
|
|
2066
1927
|
onItemMouseIn,
|
|
2067
|
-
onItemMouseOut
|
|
1928
|
+
onItemMouseOut,
|
|
1929
|
+
elementProps
|
|
2068
1930
|
} = props;
|
|
2069
|
-
const { item: item2 } = elementProps ?? {};
|
|
2070
|
-
const animatedIconProps = (_a = item2 == null ? void 0 : item2.elementProps) == null ? void 0 : _a.animatedIcon;
|
|
2071
|
-
const animatedIconPropsRef = useRef(animatedIconProps);
|
|
2072
|
-
animatedIconPropsRef.current = animatedIconProps;
|
|
2073
|
-
const BuilderAnimationIcon = useMemo(() => {
|
|
2074
|
-
const AnimatedIconWithProps = forwardRef(({ className: iconClassName, ...iconProps }, ref) => {
|
|
2075
|
-
var _a2, _b, _c;
|
|
2076
|
-
return /* @__PURE__ */ jsx(
|
|
2077
|
-
AnimatedIconWithReducedMotion,
|
|
2078
|
-
{
|
|
2079
|
-
...iconProps,
|
|
2080
|
-
duration: ((_a2 = animatedIconPropsRef.current) == null ? void 0 : _a2.duration) ?? DEFAULT_ANIMATED_ICON_DURATION,
|
|
2081
|
-
svg: (_b = animatedIconPropsRef.current) == null ? void 0 : _b.svg,
|
|
2082
|
-
className: clsx(
|
|
2083
|
-
selectors.animatedIcon,
|
|
2084
|
-
classes$1.itemIcon,
|
|
2085
|
-
(_c = animatedIconPropsRef.current) == null ? void 0 : _c.className,
|
|
2086
|
-
iconClassName
|
|
2087
|
-
),
|
|
2088
|
-
ref
|
|
2089
|
-
}
|
|
2090
|
-
);
|
|
2091
|
-
});
|
|
2092
|
-
AnimatedIconWithProps.displayName = "NavbarAnimatedIcon";
|
|
2093
|
-
return AnimatedIconWithProps;
|
|
2094
|
-
}, []);
|
|
2095
1931
|
return /* @__PURE__ */ jsx(
|
|
2096
1932
|
MenuContent,
|
|
2097
1933
|
{
|
|
@@ -2106,7 +1942,6 @@ const NavbarMenu = (props) => {
|
|
|
2106
1942
|
direction,
|
|
2107
1943
|
submenuDirection,
|
|
2108
1944
|
onItemClick,
|
|
2109
|
-
BuilderAnimationIcon: (animatedIconProps == null ? void 0 : animatedIconProps.svg) ? BuilderAnimationIcon : void 0,
|
|
2110
1945
|
onItemDblClick,
|
|
2111
1946
|
onItemMouseIn,
|
|
2112
1947
|
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(--
|
|
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(--
|
|
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,
|
|
@@ -773,12 +766,6 @@
|
|
|
773
766
|
--sr-only-item-icon-display: none;
|
|
774
767
|
}
|
|
775
768
|
|
|
776
|
-
.itemIcon__zQPE- {
|
|
777
|
-
display: flex;
|
|
778
|
-
align-items: center;
|
|
779
|
-
flex-shrink: 0;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
769
|
.rtl__7sC1t {
|
|
783
770
|
--scroll-button-transform: scaleX(-1);
|
|
784
771
|
}
|
|
@@ -900,30 +887,6 @@
|
|
|
900
887
|
.fallbackDirection__HeRgn:not([dir]) {
|
|
901
888
|
direction: var(--wix-opt-in-direction);
|
|
902
889
|
}
|
|
903
|
-
.animatedIcon__3o5ii {
|
|
904
|
-
--size: 16px;
|
|
905
|
-
--fill: #000000;
|
|
906
|
-
--rotation: 0deg;
|
|
907
|
-
}
|
|
908
|
-
.animatedIcon__3o5ii {
|
|
909
|
-
display: block;
|
|
910
|
-
width: inherit;
|
|
911
|
-
height: inherit;
|
|
912
|
-
width: var(--size);
|
|
913
|
-
height: var(--size);
|
|
914
|
-
}
|
|
915
|
-
.animatedIcon__3o5ii svg {
|
|
916
|
-
width: var(--size);
|
|
917
|
-
height: var(--size);
|
|
918
|
-
display: block;
|
|
919
|
-
fill: var(--fill);
|
|
920
|
-
transform: rotate(var(--rotation));
|
|
921
|
-
}
|
|
922
|
-
@media (forced-colors: active) {
|
|
923
|
-
.animatedIcon__3o5ii svg {
|
|
924
|
-
fill: currentColor;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
890
|
.rootDirection__PPhdq {
|
|
928
891
|
direction: var(--btn-direction);
|
|
929
892
|
}
|
|
@@ -1048,4 +1011,28 @@
|
|
|
1048
1011
|
|
|
1049
1012
|
.button__i8gkO {
|
|
1050
1013
|
min-width: min-content !important;
|
|
1014
|
+
}
|
|
1015
|
+
.animatedIcon__3o5ii {
|
|
1016
|
+
--size: 16px;
|
|
1017
|
+
--fill: #000000;
|
|
1018
|
+
--rotation: 0deg;
|
|
1019
|
+
}
|
|
1020
|
+
.animatedIcon__3o5ii {
|
|
1021
|
+
display: block;
|
|
1022
|
+
width: inherit;
|
|
1023
|
+
height: inherit;
|
|
1024
|
+
width: var(--size);
|
|
1025
|
+
height: var(--size);
|
|
1026
|
+
}
|
|
1027
|
+
.animatedIcon__3o5ii svg {
|
|
1028
|
+
width: var(--size);
|
|
1029
|
+
height: var(--size);
|
|
1030
|
+
display: block;
|
|
1031
|
+
fill: var(--fill);
|
|
1032
|
+
transform: rotate(var(--rotation));
|
|
1033
|
+
}
|
|
1034
|
+
@media (forced-colors: active) {
|
|
1035
|
+
.animatedIcon__3o5ii svg {
|
|
1036
|
+
fill: currentColor;
|
|
1037
|
+
}
|
|
1051
1038
|
}
|
|
@@ -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-V7QOLP3D.js";
|
|
2
|
-
import { c as DesignStates, f as DisplayNames, s as selectors, g as DropdownAnchorPositions, h as DropdownAppliedStyleProperties, i as elementKeys, j as
|
|
2
|
+
import { c 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/constants27.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.
|
|
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.
|
|
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
|
|
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 {};
|