@wix/editor-react-components 1.2736.0 → 1.2737.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/AccordionComponent/component.js +1 -1
- package/dist/site/components/AccordionComponent/manifest.js +1 -1
- package/dist/site/components/AnimatedIcon/manifest.js +1 -1
- package/dist/site/components/AudioPlayer/component.js +1 -1
- package/dist/site/components/AudioPlayer/manifest.js +1 -1
- package/dist/site/components/BoxContainer/component.js +1 -1
- package/dist/site/components/BoxContainer/manifest.js +1 -1
- package/dist/site/components/Breadcrumbs/component.js +1 -1
- package/dist/site/components/Breadcrumbs/manifest.js +1 -1
- package/dist/site/components/Button/manifest.js +1 -1
- package/dist/site/components/Checkbox/component.js +1 -1
- package/dist/site/components/Checkbox/manifest.js +1 -1
- package/dist/site/components/CheckboxGroup/component.js +1 -1
- package/dist/site/components/CheckboxGroup/manifest.js +1 -1
- package/dist/site/components/CollapsibleText/component.js +1 -1
- package/dist/site/components/CollapsibleText/manifest.js +1 -1
- package/dist/site/components/DatePicker/component.js +1 -1
- package/dist/site/components/DatePicker/manifest.js +1 -1
- package/dist/site/components/Dropdown/component.js +1 -1
- package/dist/site/components/Dropdown/manifest.js +1 -1
- package/dist/site/components/HTMLComponent/component.js +1 -1
- package/dist/site/components/HeadingTextBlock/component.js +1 -1
- package/dist/site/components/HeadingTextBlock/manifest.js +1 -1
- package/dist/site/components/HipaaIcon/component.js +1 -1
- package/dist/site/components/HipaaIcon/manifest.js +1 -1
- package/dist/site/components/ImageReveal/component.js +1 -1
- package/dist/site/components/ImageReveal/manifest.js +1 -1
- package/dist/site/components/LinkBar/component.js +1 -1
- package/dist/site/components/LinkBar/manifest.js +1 -1
- package/dist/site/components/Logo/component.js +1 -1
- package/dist/site/components/Logo/manifest.js +1 -1
- package/dist/site/components/Logo/sdk.js +1 -1
- package/dist/site/components/Lottie/component.js +1 -1
- package/dist/site/components/Lottie/manifest.js +1 -1
- package/dist/site/components/MarkdownBlock/component.js +1 -1
- package/dist/site/components/MarkdownBlock/manifest.js +1 -1
- package/dist/site/components/Menu/component.js +1 -1
- package/dist/site/components/Menu/manifest.js +1 -1
- package/dist/site/components/MultiStateBox/component.js +1 -1
- package/dist/site/components/MultiStateBox/manifest.js +1 -1
- package/dist/site/components/ProgressBar/component.js +1 -1
- package/dist/site/components/ProgressBar/manifest.js +1 -1
- package/dist/site/components/ProgressBar/sdk.js +1 -1
- package/dist/site/components/RadioButtons/component.js +1 -1
- package/dist/site/components/RadioButtons/manifest.js +1 -1
- package/dist/site/components/Repeater/component.js +1 -1
- package/dist/site/components/Repeater/manifest.js +1 -1
- package/dist/site/components/ShareButtons/component.js +1 -1
- package/dist/site/components/ShareButtons/manifest.js +1 -1
- package/dist/site/components/Tabs/component.js +1 -1
- package/dist/site/components/Tabs/manifest.js +1 -1
- package/dist/site/components/TextBox/component.js +1 -1
- package/dist/site/components/TextBox/manifest.js +1 -1
- package/dist/site/components/TextEffects3d/component.js +1 -1
- package/dist/site/components/TextEffects3d/manifest.js +1 -1
- package/dist/site/components/TextEffectsBauhaus/component.js +1 -1
- package/dist/site/components/TextEffectsBauhaus/manifest.js +1 -1
- package/dist/site/components/TextEffectsGlass/component.js +1 -1
- package/dist/site/components/TextEffectsGlass/manifest.js +1 -1
- package/dist/site/components/TextEffectsGlitch/component.js +1 -1
- package/dist/site/components/TextEffectsGlitch/manifest.js +1 -1
- package/dist/site/components/TextEffectsLetterPress/component.js +1 -1
- package/dist/site/components/TextEffectsLetterPress/manifest.js +1 -1
- package/dist/site/components/TextEffectsMatrix/component.js +1 -1
- package/dist/site/components/TextEffectsMatrix/manifest.js +1 -1
- package/dist/site/components/TextEffectsNeonSign/component.js +1 -1
- package/dist/site/components/TextEffectsNeonSign/manifest.js +1 -1
- package/dist/site/components/TextEffectsNoisy/component.js +1 -1
- package/dist/site/components/TextEffectsNoisy/manifest.js +1 -1
- package/dist/site/components/TextEffectsOutlineOut/component.js +2 -2
- package/dist/site/components/TextEffectsOutlineOut/manifest.js +1 -1
- package/dist/site/components/TextEffectsRetro/component.js +1 -1
- package/dist/site/components/TextEffectsRetro/manifest.js +1 -1
- package/dist/site/components/TextEffectsShook/component.js +1 -1
- package/dist/site/components/TextEffectsShook/manifest.js +1 -1
- package/dist/site/components/TextEffectsSticker/component.js +1 -1
- package/dist/site/components/TextEffectsSticker/manifest.js +2 -2
- package/dist/site/components/TextEffectsStriped/component.js +1 -1
- package/dist/site/components/TextEffectsStriped/manifest.js +1 -1
- package/dist/site/components/TextInput/component.js +1 -1
- package/dist/site/components/TextInput/manifest.js +1 -1
- package/dist/site/components/TimePicker/component.js +1 -1
- package/dist/site/components/TimePicker/manifest.js +1 -1
- package/dist/site/components/VideoScrub/VideoScrub.d.ts +4 -0
- package/dist/site/components/VideoScrub/VideoScrub.types.d.ts +17 -0
- package/dist/site/components/VideoScrub/component.d.ts +2 -0
- package/dist/site/components/VideoScrub/component.js +273 -0
- package/dist/site/components/VideoScrub/component.preview.d.ts +3 -0
- package/dist/site/components/VideoScrub/constants.d.ts +8 -0
- package/dist/site/components/VideoScrub/css.css +72 -0
- package/dist/site/components/VideoScrub/hooks/useScrubGate.d.ts +14 -0
- package/dist/site/components/VideoScrub/hooks/useScrubProgress.d.ts +11 -0
- package/dist/site/components/VideoScrub/hooks/useScrubVideo.d.ts +24 -0
- package/dist/site/components/VideoScrub/index.d.ts +2 -0
- package/dist/site/components/VideoScrub/index.js +6 -0
- package/dist/site/components/VideoScrub/manifest.d.ts +5 -0
- package/dist/site/components/VideoScrub/manifest.js +71 -0
- package/dist/site/components/VideoScrub/utils.d.ts +14 -0
- package/dist/site/components/chunks/AnimatedIcon.js +1 -1
- package/dist/site/components/chunks/Button.js +1 -1
- package/dist/site/components/chunks/Patterns.js +1 -1
- package/dist/site/components/chunks/TextEffectsShared.js +1 -1
- package/dist/site/components/chunks/constants10.js +65 -20
- package/dist/site/components/chunks/constants11.js +14 -12
- package/dist/site/components/chunks/constants12.js +9 -9
- package/dist/site/components/chunks/constants13.js +10 -8
- package/dist/site/components/chunks/constants14.js +9 -13
- package/dist/site/components/chunks/constants15.js +14 -17
- package/dist/site/components/chunks/constants16.js +17 -12
- package/dist/site/components/chunks/constants17.js +11 -13
- package/dist/site/components/chunks/constants18.js +21 -96
- package/dist/site/components/chunks/constants19.js +92 -50
- package/dist/site/components/chunks/constants2.js +47 -126
- package/dist/site/components/chunks/constants20.js +54 -50
- package/dist/site/components/chunks/constants21.js +49 -52
- package/dist/site/components/chunks/constants22.js +43 -310
- package/dist/site/components/chunks/constants23.js +310 -65
- package/dist/site/components/chunks/constants24.js +70 -99
- package/dist/site/components/chunks/constants25.js +101 -30
- package/dist/site/components/chunks/constants26.js +35 -17
- package/dist/site/components/chunks/constants27.js +16 -447
- package/dist/site/components/chunks/constants28.js +441 -29
- package/dist/site/components/chunks/constants29.js +26 -78
- package/dist/site/components/chunks/constants3.js +118 -84
- package/dist/site/components/chunks/constants30.js +85 -15
- package/dist/site/components/chunks/constants31.js +11 -42
- package/dist/site/components/chunks/constants32.js +41 -45
- package/dist/site/components/chunks/constants33.js +49 -24
- package/dist/site/components/chunks/constants34.js +25 -56
- package/dist/site/components/chunks/constants35.js +58 -13
- package/dist/site/components/chunks/constants36.js +14 -206
- package/dist/site/components/chunks/constants37.js +182 -153
- package/dist/site/components/chunks/constants38.js +162 -49
- package/dist/site/components/chunks/constants39.js +51 -102
- package/dist/site/components/chunks/constants4.js +88 -13
- package/dist/site/components/chunks/constants40.js +69 -39
- package/dist/site/components/chunks/constants41.js +72 -79
- package/dist/site/components/chunks/constants42.js +83 -77
- package/dist/site/components/chunks/constants43.js +75 -56
- package/dist/site/components/chunks/constants44.js +72 -0
- package/dist/site/components/chunks/constants5.js +10 -19
- package/dist/site/components/chunks/constants6.js +14 -14
- package/dist/site/components/chunks/constants7.js +11 -10
- package/dist/site/components/chunks/constants8.js +14 -14
- package/dist/site/components/chunks/constants9.js +22 -65
- package/dist/site/components/chunks/manifestBase.js +1 -1
- package/dist/site/components/chunks/utils2.js +1 -1
- package/dist/site/components/extensions.js +127 -125
- package/package.json +3 -2
|
@@ -1,41 +1,453 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
import { useRef, useState, useEffect } from "react";
|
|
2
|
+
const DISABLED_ANIMATION_NAME = "none";
|
|
3
|
+
const AnimationPhase = {
|
|
4
|
+
Enter: "enter",
|
|
5
|
+
EnterActive: "enterActive",
|
|
6
|
+
EnterDone: "enterDone",
|
|
7
|
+
Exit: "exit",
|
|
8
|
+
ExitActive: "exitActive",
|
|
9
|
+
ExitDone: "exitDone"
|
|
4
10
|
};
|
|
5
|
-
const
|
|
6
|
-
|
|
11
|
+
const useAnimationState = (animationConfigMap, initialAnimationState) => {
|
|
12
|
+
const afterAnimationInitRef = useRef(null);
|
|
13
|
+
const afterAnimationActiveRef = useRef(null);
|
|
14
|
+
const [animationState, setAnimationState] = useState(initialAnimationState);
|
|
15
|
+
const abortAnimationCallbacks = () => {
|
|
16
|
+
afterAnimationInitRef.current = null;
|
|
17
|
+
afterAnimationActiveRef.current = null;
|
|
18
|
+
};
|
|
19
|
+
const initEnterAnimation = (animationName, onAnimationDone) => {
|
|
20
|
+
abortAnimationCallbacks();
|
|
21
|
+
if (animationName === DISABLED_ANIMATION_NAME) {
|
|
22
|
+
return onAnimationDone == null ? void 0 : onAnimationDone();
|
|
23
|
+
}
|
|
24
|
+
setAnimationState({
|
|
25
|
+
name: animationName,
|
|
26
|
+
phase: AnimationPhase.Enter
|
|
27
|
+
});
|
|
28
|
+
afterAnimationInitRef.current = () => {
|
|
29
|
+
setAnimationState({
|
|
30
|
+
name: animationName,
|
|
31
|
+
phase: AnimationPhase.EnterActive
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
afterAnimationActiveRef.current = () => {
|
|
35
|
+
setAnimationState({
|
|
36
|
+
name: animationName,
|
|
37
|
+
phase: AnimationPhase.EnterDone
|
|
38
|
+
});
|
|
39
|
+
onAnimationDone == null ? void 0 : onAnimationDone();
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
const skipToEnterDone = (animationName) => {
|
|
43
|
+
abortAnimationCallbacks();
|
|
44
|
+
if (animationName === DISABLED_ANIMATION_NAME) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
setAnimationState({
|
|
48
|
+
name: animationName,
|
|
49
|
+
phase: AnimationPhase.EnterDone
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const skipToExitDone = (animationName) => {
|
|
53
|
+
abortAnimationCallbacks();
|
|
54
|
+
if (animationName === DISABLED_ANIMATION_NAME) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
setAnimationState({
|
|
58
|
+
name: animationName,
|
|
59
|
+
phase: AnimationPhase.ExitDone
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
const initExitAnimation = (animationName, onAnimationDone) => {
|
|
63
|
+
abortAnimationCallbacks();
|
|
64
|
+
if (animationName === DISABLED_ANIMATION_NAME) {
|
|
65
|
+
return onAnimationDone == null ? void 0 : onAnimationDone();
|
|
66
|
+
}
|
|
67
|
+
setAnimationState({
|
|
68
|
+
name: animationName,
|
|
69
|
+
phase: AnimationPhase.Exit
|
|
70
|
+
});
|
|
71
|
+
afterAnimationInitRef.current = () => {
|
|
72
|
+
setAnimationState({
|
|
73
|
+
name: animationName,
|
|
74
|
+
phase: AnimationPhase.ExitActive
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
afterAnimationActiveRef.current = () => {
|
|
78
|
+
setAnimationState({
|
|
79
|
+
name: animationName,
|
|
80
|
+
phase: AnimationPhase.ExitDone
|
|
81
|
+
});
|
|
82
|
+
onAnimationDone == null ? void 0 : onAnimationDone();
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
const { name } = animationState;
|
|
87
|
+
const { duration: animationDuration } = animationConfigMap[name];
|
|
88
|
+
const isInitPhase = animationState.phase === AnimationPhase.Enter || animationState.phase === AnimationPhase.Exit;
|
|
89
|
+
const isActivePhase = animationState.phase === AnimationPhase.EnterActive || animationState.phase === AnimationPhase.ExitActive;
|
|
90
|
+
if (isInitPhase) {
|
|
91
|
+
const frameId = window.requestAnimationFrame(() => {
|
|
92
|
+
var _a;
|
|
93
|
+
(_a = afterAnimationInitRef.current) == null ? void 0 : _a.call(afterAnimationInitRef);
|
|
94
|
+
afterAnimationInitRef.current = null;
|
|
95
|
+
});
|
|
96
|
+
return () => window.cancelAnimationFrame(frameId);
|
|
97
|
+
}
|
|
98
|
+
if (isActivePhase) {
|
|
99
|
+
const timeoutId = setTimeout(() => {
|
|
100
|
+
var _a;
|
|
101
|
+
(_a = afterAnimationActiveRef.current) == null ? void 0 : _a.call(afterAnimationActiveRef);
|
|
102
|
+
afterAnimationActiveRef.current = null;
|
|
103
|
+
}, animationDuration);
|
|
104
|
+
return () => clearTimeout(timeoutId);
|
|
105
|
+
}
|
|
106
|
+
}, [animationState.phase]);
|
|
107
|
+
return {
|
|
108
|
+
animationState,
|
|
109
|
+
initEnterAnimation,
|
|
110
|
+
initExitAnimation,
|
|
111
|
+
skipToEnterDone,
|
|
112
|
+
skipToExitDone
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
const MenuOrientation = {
|
|
116
|
+
Horizontal: "horizontal",
|
|
117
|
+
Vertical: "vertical"
|
|
118
|
+
};
|
|
119
|
+
const VerticalDropdownDisplay = {
|
|
120
|
+
AlwaysOpen: "alwaysOpen"
|
|
7
121
|
};
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
122
|
+
const MenuAnimationName = {
|
|
123
|
+
None: DISABLED_ANIMATION_NAME,
|
|
124
|
+
Calm: "calm",
|
|
125
|
+
Underline: "underline",
|
|
126
|
+
Wash: "wash",
|
|
127
|
+
Bullet: "bullet",
|
|
128
|
+
Wave: "wave",
|
|
129
|
+
Bounce: "bounce",
|
|
130
|
+
Tint: "tint",
|
|
131
|
+
TextWash: "textWash",
|
|
132
|
+
Wobble: "wobble",
|
|
133
|
+
Brackets: "brackets",
|
|
134
|
+
Float: "float",
|
|
135
|
+
Shape: "shape",
|
|
136
|
+
Expand: "expand",
|
|
137
|
+
Circle: "circle",
|
|
138
|
+
Shadow: "shadow",
|
|
139
|
+
LineRise: "lineRise",
|
|
140
|
+
Overline: "overline",
|
|
141
|
+
CenterLine: "centerLine",
|
|
142
|
+
Skew: "skew",
|
|
143
|
+
Point: "point",
|
|
144
|
+
Blur: "blur"
|
|
11
145
|
};
|
|
12
|
-
const
|
|
13
|
-
|
|
146
|
+
const DropdownAnimationName = {
|
|
147
|
+
None: DISABLED_ANIMATION_NAME,
|
|
148
|
+
RevealFromTop: "revealFromTop",
|
|
149
|
+
FadeIn: "fadeIn"
|
|
150
|
+
};
|
|
151
|
+
const HamburgerMenuAnimationName = {
|
|
152
|
+
None: DISABLED_ANIMATION_NAME,
|
|
153
|
+
RevealFromRight: "revealFromRight",
|
|
154
|
+
FadeIn: "fadeIn"
|
|
14
155
|
};
|
|
15
156
|
const DisplayNames = {
|
|
16
157
|
root: {
|
|
17
|
-
elementDisplayName: "
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
158
|
+
elementDisplayName: "Menu",
|
|
159
|
+
actions: {
|
|
160
|
+
manageMenu: "Manage Menu",
|
|
161
|
+
design: "Design",
|
|
162
|
+
settings: "Settings"
|
|
163
|
+
},
|
|
164
|
+
customActions: {
|
|
165
|
+
format: {
|
|
166
|
+
displayName: "Change layout"
|
|
167
|
+
},
|
|
168
|
+
animatedIcon: {
|
|
169
|
+
displayName: "Customize Icon"
|
|
170
|
+
},
|
|
171
|
+
hamburgerAnimatedIcon: {
|
|
172
|
+
displayName: "Customize Menu Icon"
|
|
29
173
|
}
|
|
174
|
+
},
|
|
175
|
+
presets: {
|
|
176
|
+
horizontalScrollNavbar: "Horizontal Scroll Navigation Bar",
|
|
177
|
+
horizontalHugNavbar: "Horizontal Hug Navigation Bar",
|
|
178
|
+
verticalNavbar: "Vertical Navigation Bar",
|
|
179
|
+
hamburgerMenu: "Hamburger menu"
|
|
180
|
+
},
|
|
181
|
+
states: {
|
|
182
|
+
hamburgerDialog: "Hamburger menu",
|
|
183
|
+
dropdown: "Dropdown"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
navbar: {
|
|
187
|
+
elementDisplayName: "Menu bar",
|
|
188
|
+
displayGroups: {
|
|
189
|
+
dividerBorderGroup: "Dividers"
|
|
190
|
+
},
|
|
191
|
+
cssCustomProperties: {
|
|
192
|
+
"vertical-dropdown-display": "Items display",
|
|
193
|
+
"items-width": "Item width",
|
|
194
|
+
"container-align": "Item alignment",
|
|
195
|
+
"menu-items-row-gap": "Space between menu items",
|
|
196
|
+
"menu-items-column-gap": "Space between menu items"
|
|
197
|
+
},
|
|
198
|
+
actions: {
|
|
199
|
+
manageMenu: "Manage Menu"
|
|
200
|
+
},
|
|
201
|
+
options: {
|
|
202
|
+
alwaysOpen: "Open",
|
|
203
|
+
expandCollapse: "Closed",
|
|
204
|
+
fitToText: "Fit to text",
|
|
205
|
+
fillMenu: "Fill menu"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
item: {
|
|
209
|
+
elementDisplayName: "Menu items",
|
|
210
|
+
cssProperties: {
|
|
211
|
+
justifyContent: "Text alignment",
|
|
212
|
+
background: "Background",
|
|
213
|
+
columnGap: "Space between items and chevrons"
|
|
214
|
+
},
|
|
215
|
+
cssCustomProperties: {
|
|
216
|
+
"item-icon-size": "Size",
|
|
217
|
+
"item-icon-gap": "Space between items and icons"
|
|
218
|
+
},
|
|
219
|
+
displayGroups: {
|
|
220
|
+
iconGroup: "Icons"
|
|
221
|
+
},
|
|
222
|
+
states: {
|
|
223
|
+
hover: "Hover",
|
|
224
|
+
selected: "Selected"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
itemLabel: {
|
|
228
|
+
elementDisplayName: "Item's text"
|
|
229
|
+
},
|
|
230
|
+
itemIcon: {
|
|
231
|
+
elementDisplayName: "Item's icon"
|
|
232
|
+
},
|
|
233
|
+
dropdown: {
|
|
234
|
+
elementDisplayName: "Dropdowns",
|
|
235
|
+
cssCustomProperties: {
|
|
236
|
+
anchor: "Dropdown width",
|
|
237
|
+
align: "Dropdown position",
|
|
238
|
+
"items-width": "Item width",
|
|
239
|
+
"columns-number": "Number of columns",
|
|
240
|
+
"space-above": "Space above dropdowns",
|
|
241
|
+
"horizontal-margin": "Dropdown margin",
|
|
242
|
+
"item-position": "Dropdown box position"
|
|
243
|
+
},
|
|
244
|
+
options: {
|
|
245
|
+
menuItem: "Fit to items",
|
|
246
|
+
menuStretched: "Fit to menu",
|
|
247
|
+
screen: "Stretch to page",
|
|
248
|
+
start: "Start",
|
|
249
|
+
center: "Middle",
|
|
250
|
+
end: "End",
|
|
251
|
+
fitToText: "Fit to text",
|
|
252
|
+
fillDropdown: "Fill dropdowns",
|
|
253
|
+
afterItems: "After items",
|
|
254
|
+
beforeItems: "Before items",
|
|
255
|
+
aboveItems: "Above items",
|
|
256
|
+
belowItems: "Below items"
|
|
257
|
+
},
|
|
258
|
+
displayGroups: {
|
|
259
|
+
gapGroup: "Space between items",
|
|
260
|
+
cornersGroup: "Corner radius"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
dropdownItem: {
|
|
264
|
+
elementDisplayName: "Dropdown items"
|
|
265
|
+
},
|
|
266
|
+
dropdownSubItem: {
|
|
267
|
+
elementDisplayName: "Dropdown sub-items"
|
|
268
|
+
},
|
|
269
|
+
scrollButton: {
|
|
270
|
+
elementDisplayName: "Scroll button",
|
|
271
|
+
cssProperties: {
|
|
272
|
+
background: "Background"
|
|
273
|
+
},
|
|
274
|
+
cssCustomProperties: {
|
|
275
|
+
"scroll-button-icon-size": "Size"
|
|
276
|
+
},
|
|
277
|
+
displayGroups: {
|
|
278
|
+
scrollButtonGroup: "Icon"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
hamburgerMenu: {
|
|
282
|
+
elementDisplayName: "Hamburger menu",
|
|
283
|
+
displayGroups: {
|
|
284
|
+
cornersGroup: "Corner radius"
|
|
285
|
+
},
|
|
286
|
+
cssCustomProperties: {
|
|
287
|
+
"hamburger-wrapper-width": "Width",
|
|
288
|
+
"wrapper-position": "Position",
|
|
289
|
+
"menu-position": "Menu Position",
|
|
290
|
+
"close-button-position": "Close button position",
|
|
291
|
+
"overlay-background": "Overlay Background"
|
|
292
|
+
},
|
|
293
|
+
options: {
|
|
294
|
+
third: "Third of page",
|
|
295
|
+
twoThirds: "Two thirds of page",
|
|
296
|
+
half: "Half page",
|
|
297
|
+
full: "Full page",
|
|
298
|
+
start: "Start",
|
|
299
|
+
middle: "Middle",
|
|
300
|
+
end: "End",
|
|
301
|
+
top: "Top",
|
|
302
|
+
bottom: "Bottom"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
hamburgerOpenButton: {
|
|
306
|
+
elementDisplayName: "Hamburger button"
|
|
307
|
+
},
|
|
308
|
+
hamburgerCloseButton: {
|
|
309
|
+
elementDisplayName: "Close Button"
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
const menuBuiltInActions = {
|
|
313
|
+
elements: "elements"
|
|
314
|
+
};
|
|
315
|
+
const MENU_ANIMATED_ICON_SPEC = "sp.erc.menuAnimatedIcon";
|
|
316
|
+
const selectors = {
|
|
317
|
+
menu: "menu",
|
|
318
|
+
navbar: "navbar",
|
|
319
|
+
item: "item",
|
|
320
|
+
dropdown: "dropdown",
|
|
321
|
+
dropdownItem: "dropdown-item",
|
|
322
|
+
dropdownSubItem: "dropdown-sub-item",
|
|
323
|
+
scrollButton: "scroll-button",
|
|
324
|
+
animatedIcon: "animated-icon",
|
|
325
|
+
itemIcon: "item-icon",
|
|
326
|
+
itemLabel: "item-label",
|
|
327
|
+
hamburgerMenu: "hamburger-menu",
|
|
328
|
+
hamburgerMenuContent: "hamburger-menu-content",
|
|
329
|
+
hamburgerMenuHeaderContent: "hamburger-menu-header-content",
|
|
330
|
+
hamburgerMenuOpenButton: "hamburger-open-button",
|
|
331
|
+
hamburgerMenuCloseButton: "hamburger-close-button"
|
|
332
|
+
};
|
|
333
|
+
const elementKeys = {
|
|
334
|
+
navbar: "navbar",
|
|
335
|
+
hamburgerMenu: "hamburgerMenu",
|
|
336
|
+
hamburgerOpenButton: "hamburgerOpenButton",
|
|
337
|
+
hamburgerCloseButton: "hamburgerCloseButton",
|
|
338
|
+
item: "item",
|
|
339
|
+
subItem: "subItem",
|
|
340
|
+
scrollButton: "scrollButton",
|
|
341
|
+
dropdown: "dropdown",
|
|
342
|
+
animatedIcon: "animatedIcon",
|
|
343
|
+
itemLabel: "itemLabel"
|
|
344
|
+
};
|
|
345
|
+
const presets = {
|
|
346
|
+
horizontalScrollNavbar: "horizontalScrollNavbar",
|
|
347
|
+
horizontalHugNavbar: "horizontalHugNavbar",
|
|
348
|
+
verticalNavbar: "verticalNavbar",
|
|
349
|
+
hamburgerMenu: "hamburgerMenu"
|
|
350
|
+
};
|
|
351
|
+
const states = {
|
|
352
|
+
dropdown: "dropdown",
|
|
353
|
+
hamburgerDialog: "hamburgerDialog",
|
|
354
|
+
hamburgerDialogDropdown: "hamburgerDialogDropdown"
|
|
355
|
+
};
|
|
356
|
+
const DesignStates = {
|
|
357
|
+
item: {
|
|
358
|
+
hover: {
|
|
359
|
+
displayName: DisplayNames.item.states.hover,
|
|
360
|
+
className: "menu__item--hover"
|
|
361
|
+
},
|
|
362
|
+
selected: {
|
|
363
|
+
displayName: DisplayNames.item.states.selected,
|
|
364
|
+
className: "menu__item--selected"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
dropdownItem: {
|
|
368
|
+
hover: {
|
|
369
|
+
displayName: "Hover",
|
|
370
|
+
className: "menu__dropdown-item--hover"
|
|
371
|
+
},
|
|
372
|
+
selected: {
|
|
373
|
+
displayName: "Selected",
|
|
374
|
+
className: "menu__dropdown-item--selected"
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
dropdownSubItem: {
|
|
378
|
+
hover: {
|
|
379
|
+
displayName: "Hover",
|
|
380
|
+
className: "menu__dropdown-sub-item--hover"
|
|
381
|
+
},
|
|
382
|
+
selected: {
|
|
383
|
+
displayName: "Selected",
|
|
384
|
+
className: "menu__dropdown-sub-item--selected"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
scrollButton: {
|
|
388
|
+
hover: {
|
|
389
|
+
displayName: "Hover",
|
|
390
|
+
className: "menu__scroll-button--hover"
|
|
30
391
|
}
|
|
31
392
|
}
|
|
32
393
|
};
|
|
394
|
+
const DropdownAppliedStyleProperties = {
|
|
395
|
+
anchor: "--wix-menu-dropdown-anchor"
|
|
396
|
+
};
|
|
397
|
+
const DropdownAnchorPositions = {
|
|
398
|
+
menuItem: "0",
|
|
399
|
+
menuStretched: "1",
|
|
400
|
+
screen: "2"
|
|
401
|
+
};
|
|
402
|
+
const ARIA_LABEL_NAMESPACE = "ariaLabels";
|
|
403
|
+
const translationsKeys = {
|
|
404
|
+
menuNavAriaLabel: "dropDownMenu_AriaLabel_TopLevel_SiteNavigation",
|
|
405
|
+
dropdownButtonAriaLabel: "menu_dropdown_chevron_button_aria_label",
|
|
406
|
+
hamburgerOpenButtonAriaLabel: "menu_hamburger_open_button_aria_label",
|
|
407
|
+
hamburgerCloseButtonAriaLabel: "menu_hamburger_close_button_aria_label"
|
|
408
|
+
};
|
|
409
|
+
const defaultTranslations = {
|
|
410
|
+
menuNavAriaLabel: "Site",
|
|
411
|
+
dropdownButtonAriaLabel: "More pages",
|
|
412
|
+
hamburgerOpenButtonAriaLabel: "Menu",
|
|
413
|
+
hamburgerCloseButtonAriaLabel: "Close Menu"
|
|
414
|
+
};
|
|
415
|
+
const MenuParts = {
|
|
416
|
+
Navbar: "navbar",
|
|
417
|
+
DropdownContainer: "dropdown-container",
|
|
418
|
+
DropdownButton: "dropdown-button",
|
|
419
|
+
DropdownIcon: "dropdown-icon",
|
|
420
|
+
Label: "label",
|
|
421
|
+
DropdownItem: "dropdown-item",
|
|
422
|
+
DropdownItemLabel: "dropdown-item-label",
|
|
423
|
+
DropdownSubItem: "dropdown-subitem",
|
|
424
|
+
DropdownSubItemLabel: "dropdown-subitem-label",
|
|
425
|
+
MenuItem: "menu-item",
|
|
426
|
+
MenuItemContent: "menu-item-content",
|
|
427
|
+
MenuItemLink: "menu-item-link",
|
|
428
|
+
ScrollBackwardButton: "scroll-backward-button",
|
|
429
|
+
ScrollForwardButton: "scroll-forward-button"
|
|
430
|
+
};
|
|
33
431
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
432
|
+
AnimationPhase as A,
|
|
433
|
+
DropdownAnimationName as D,
|
|
434
|
+
HamburgerMenuAnimationName as H,
|
|
435
|
+
MenuAnimationName as M,
|
|
436
|
+
VerticalDropdownDisplay as V,
|
|
437
|
+
MenuOrientation as a,
|
|
438
|
+
MenuParts as b,
|
|
439
|
+
DesignStates as c,
|
|
440
|
+
defaultTranslations as d,
|
|
441
|
+
ARIA_LABEL_NAMESPACE as e,
|
|
442
|
+
DisplayNames as f,
|
|
443
|
+
DropdownAnchorPositions as g,
|
|
444
|
+
DropdownAppliedStyleProperties as h,
|
|
445
|
+
elementKeys as i,
|
|
446
|
+
MENU_ANIMATED_ICON_SPEC as j,
|
|
447
|
+
states as k,
|
|
448
|
+
menuBuiltInActions as m,
|
|
449
|
+
presets as p,
|
|
450
|
+
selectors as s,
|
|
451
|
+
translationsKeys as t,
|
|
452
|
+
useAnimationState as u
|
|
41
453
|
};
|
|
@@ -1,93 +1,41 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const CONTENT_MAX_LENGTH = 1e5;
|
|
2
|
+
const manifestClasses = {
|
|
3
|
+
root: "markdown-block"
|
|
4
4
|
};
|
|
5
|
-
const
|
|
5
|
+
const defaultValues = {
|
|
6
|
+
theme: "light"
|
|
7
|
+
};
|
|
8
|
+
const TRANSLATIONS_NAMESPACE = "ariaLabels";
|
|
6
9
|
const TranslationKeys = {
|
|
7
|
-
|
|
8
|
-
pauseButton: "lottie_aria_label_pause"
|
|
10
|
+
scrollerAriaLabel: "markdownBlock_aria_label_content"
|
|
9
11
|
};
|
|
10
12
|
const DefaultTranslations = {
|
|
11
|
-
|
|
12
|
-
pauseButton: "Pause animation"
|
|
13
|
+
scrollerAriaLabel: "Markdown content"
|
|
13
14
|
};
|
|
14
15
|
const DisplayNames = {
|
|
15
16
|
root: {
|
|
16
|
-
elementDisplayName: "
|
|
17
|
+
elementDisplayName: "Markdown Block",
|
|
17
18
|
data: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
content: "Content",
|
|
20
|
+
theme: {
|
|
21
|
+
displayName: "Theme",
|
|
22
|
+
options: {
|
|
23
|
+
light: "Light",
|
|
24
|
+
dark: "Dark",
|
|
25
|
+
sepia: "Sepia",
|
|
26
|
+
prism: "Prism",
|
|
27
|
+
brand: "Site brand"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
23
30
|
}
|
|
24
|
-
},
|
|
25
|
-
playButton: {
|
|
26
|
-
elementDisplayName: "Play button"
|
|
27
31
|
}
|
|
28
32
|
};
|
|
29
|
-
const rootDataDefaults = {
|
|
30
|
-
loop: true,
|
|
31
|
-
speed: 1,
|
|
32
|
-
showButtonOnHover: "always",
|
|
33
|
-
allowClickToStop: true
|
|
34
|
-
};
|
|
35
|
-
const showButtonOnHoverDefaults = {
|
|
36
|
-
always: {
|
|
37
|
-
value: "always",
|
|
38
|
-
displayName: "Always"
|
|
39
|
-
},
|
|
40
|
-
onHover: {
|
|
41
|
-
value: "onHover",
|
|
42
|
-
displayName: "On hover"
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const testIds = {
|
|
46
|
-
animationClickWrapper: "lottie-animation-click-wrapper"
|
|
47
|
-
};
|
|
48
|
-
const borderDefaultValue = "0px none rgba(0, 0, 0, 1)";
|
|
49
|
-
const playButtonDefaults = {
|
|
50
|
-
insetInlineEnd: "5px",
|
|
51
|
-
insetBlockEnd: "5px"
|
|
52
|
-
};
|
|
53
|
-
const initialSize = {
|
|
54
|
-
width: 280,
|
|
55
|
-
height: 280
|
|
56
|
-
};
|
|
57
|
-
const speedConstraints = {
|
|
58
|
-
min: "0.5",
|
|
59
|
-
max: "5.0",
|
|
60
|
-
multiplier: "0.5"
|
|
61
|
-
};
|
|
62
|
-
const playIconSvg = {
|
|
63
|
-
uri: "",
|
|
64
|
-
viewBox: "0 0 24 24",
|
|
65
|
-
contentBox: "0 0 24 24",
|
|
66
|
-
colors: {},
|
|
67
|
-
contentType: "shape",
|
|
68
|
-
svgContent: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4.00142V19.0034C7 19.7884 7.864 20.2674 8.53 19.8514L20.537 12.3504C21.164 11.9584 21.164 11.0464 20.537 10.6544L8.53 3.15342C7.864 2.73742 7 3.21642 7 4.00142Z"/></svg>'
|
|
69
|
-
};
|
|
70
|
-
const pauseIconSvg = {
|
|
71
|
-
uri: "",
|
|
72
|
-
viewBox: "0 0 24 24",
|
|
73
|
-
contentBox: "0 0 24 24",
|
|
74
|
-
colors: {},
|
|
75
|
-
contentType: "shape",
|
|
76
|
-
svgContent: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><rect x="5" y="3" width="5" height="17" rx="1"/><rect x="14" y="3" width="5" height="17" rx="1"/></svg>'
|
|
77
|
-
};
|
|
78
33
|
export {
|
|
79
|
-
|
|
34
|
+
CONTENT_MAX_LENGTH as C,
|
|
80
35
|
DefaultTranslations as D,
|
|
81
36
|
TranslationKeys as T,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
DisplayNames as e,
|
|
87
|
-
borderDefaultValue as f,
|
|
88
|
-
initialSize as i,
|
|
89
|
-
pauseIconSvg as p,
|
|
90
|
-
rootDataDefaults as r,
|
|
91
|
-
semanticSelectors as s,
|
|
92
|
-
testIds as t
|
|
37
|
+
TRANSLATIONS_NAMESPACE as a,
|
|
38
|
+
DisplayNames as b,
|
|
39
|
+
defaultValues as d,
|
|
40
|
+
manifestClasses as m
|
|
93
41
|
};
|