@wix/editor-react-components 1.2349.0 → 1.2350.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/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/Checkbox/component.js +2 -2
- package/dist/site/components/Checkbox/manifest.js +1 -1
- package/dist/site/components/CheckboxGroup/component.js +2 -2
- 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/HipaaIcon/component.js +1 -1
- package/dist/site/components/HipaaIcon/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/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/RadioButtons.d.ts +3 -0
- package/dist/site/components/RadioButtons/RadioButtons.types.d.ts +22 -0
- package/dist/site/components/RadioButtons/component.d.ts +2 -0
- package/dist/site/components/RadioButtons/component.js +201 -0
- package/dist/site/components/RadioButtons/component.preview.d.ts +4 -0
- package/dist/site/components/RadioButtons/constants.d.ts +108 -0
- package/dist/site/components/RadioButtons/css.css +181 -0
- package/dist/site/components/RadioButtons/index.d.ts +2 -0
- package/dist/site/components/RadioButtons/index.js +6 -0
- package/dist/site/components/RadioButtons/manifest.d.ts +5 -0
- package/dist/site/components/RadioButtons/manifest.js +284 -0
- package/dist/site/components/chunks/constants24.js +97 -27
- package/dist/site/components/chunks/constants25.js +32 -17
- package/dist/site/components/chunks/constants26.js +16 -417
- package/dist/site/components/chunks/constants27.js +408 -73
- package/dist/site/components/chunks/constants28.js +80 -15
- package/dist/site/components/chunks/constants29.js +11 -42
- package/dist/site/components/chunks/constants30.js +44 -23
- package/dist/site/components/chunks/constants31.js +28 -10
- package/dist/site/components/chunks/constants32.js +10 -198
- package/dist/site/components/chunks/constants33.js +175 -152
- package/dist/site/components/chunks/constants34.js +160 -49
- package/dist/site/components/chunks/constants35.js +51 -98
- package/dist/site/components/chunks/constants36.js +67 -37
- package/dist/site/components/chunks/constants37.js +68 -69
- package/dist/site/components/chunks/constants38.js +73 -77
- package/dist/site/components/chunks/constants39.js +76 -57
- package/dist/site/components/chunks/constants40.js +72 -0
- package/dist/site/components/chunks/index10.js +4 -2
- package/dist/site/components/chunks/utils.js +1 -1
- package/dist/site/components/extensions.js +53 -51
- package/package.json +2 -2
|
@@ -1,88 +1,423 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
7
|
-
|
|
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
|
+
window.requestAnimationFrame(() => {
|
|
92
|
+
var _a;
|
|
93
|
+
(_a = afterAnimationInitRef.current) == null ? void 0 : _a.call(afterAnimationInitRef);
|
|
94
|
+
afterAnimationInitRef.current = null;
|
|
95
|
+
});
|
|
96
|
+
} else if (isActivePhase) {
|
|
97
|
+
setTimeout(() => {
|
|
98
|
+
var _a;
|
|
99
|
+
(_a = afterAnimationActiveRef.current) == null ? void 0 : _a.call(afterAnimationActiveRef);
|
|
100
|
+
afterAnimationActiveRef.current = null;
|
|
101
|
+
}, animationDuration);
|
|
102
|
+
}
|
|
103
|
+
}, [animationState.phase]);
|
|
104
|
+
return {
|
|
105
|
+
animationState,
|
|
106
|
+
initEnterAnimation,
|
|
107
|
+
initExitAnimation,
|
|
108
|
+
skipToEnterDone,
|
|
109
|
+
skipToExitDone
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
const MenuOrientation = {
|
|
113
|
+
Horizontal: "horizontal",
|
|
114
|
+
Vertical: "vertical"
|
|
115
|
+
};
|
|
116
|
+
const VerticalDropdownDisplay = {
|
|
117
|
+
AlwaysOpen: "alwaysOpen"
|
|
118
|
+
};
|
|
119
|
+
const MenuAnimationName = {
|
|
120
|
+
None: DISABLED_ANIMATION_NAME,
|
|
121
|
+
Calm: "calm",
|
|
122
|
+
Underline: "underline",
|
|
123
|
+
Wash: "wash",
|
|
124
|
+
Bullet: "bullet",
|
|
125
|
+
Wave: "wave",
|
|
126
|
+
Bounce: "bounce",
|
|
127
|
+
Tint: "tint",
|
|
128
|
+
TextWash: "textWash",
|
|
129
|
+
Wobble: "wobble",
|
|
130
|
+
Brackets: "brackets",
|
|
131
|
+
Float: "float",
|
|
132
|
+
Shape: "shape",
|
|
133
|
+
Expand: "expand",
|
|
134
|
+
Circle: "circle",
|
|
135
|
+
Shadow: "shadow",
|
|
136
|
+
LineRise: "lineRise",
|
|
137
|
+
Overline: "overline",
|
|
138
|
+
CenterLine: "centerLine",
|
|
139
|
+
Skew: "skew",
|
|
140
|
+
Point: "point",
|
|
141
|
+
Blur: "blur"
|
|
142
|
+
};
|
|
143
|
+
const DropdownAnimationName = {
|
|
144
|
+
None: DISABLED_ANIMATION_NAME,
|
|
145
|
+
RevealFromTop: "revealFromTop",
|
|
146
|
+
FadeIn: "fadeIn"
|
|
147
|
+
};
|
|
148
|
+
const HamburgerMenuAnimationName = {
|
|
149
|
+
None: DISABLED_ANIMATION_NAME,
|
|
150
|
+
RevealFromRight: "revealFromRight",
|
|
151
|
+
FadeIn: "fadeIn"
|
|
8
152
|
};
|
|
9
153
|
const DisplayNames = {
|
|
10
154
|
root: {
|
|
11
|
-
elementDisplayName: "
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
155
|
+
elementDisplayName: "Menu",
|
|
156
|
+
actions: {
|
|
157
|
+
manageMenu: "Manage Menu",
|
|
158
|
+
design: "Design",
|
|
159
|
+
settings: "Settings"
|
|
160
|
+
},
|
|
161
|
+
customActions: {
|
|
162
|
+
format: {
|
|
163
|
+
displayName: "Change Format"
|
|
164
|
+
},
|
|
165
|
+
animatedIcon: {
|
|
166
|
+
displayName: "Customize Icon"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
presets: {
|
|
170
|
+
horizontalScrollNavbar: "Horizontal Scroll Navigation Bar",
|
|
171
|
+
horizontalHugNavbar: "Horizontal Hug Navigation Bar",
|
|
172
|
+
verticalNavbar: "Vertical Navigation Bar",
|
|
173
|
+
hamburgerMenu: "Hamburger menu"
|
|
174
|
+
},
|
|
175
|
+
states: {
|
|
176
|
+
hamburgerDialog: "Hamburger menu",
|
|
177
|
+
dropdown: "Dropdown"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
navbar: {
|
|
181
|
+
elementDisplayName: "Menu bar",
|
|
182
|
+
displayGroups: {
|
|
183
|
+
dividerBorderGroup: "Dividers"
|
|
184
|
+
},
|
|
185
|
+
cssCustomProperties: {
|
|
186
|
+
"vertical-dropdown-display": "Items display",
|
|
187
|
+
"items-width": "Item width",
|
|
188
|
+
"container-align": "Item alignment",
|
|
189
|
+
"menu-items-row-gap": "Space between menu items",
|
|
190
|
+
"menu-items-column-gap": "Space between menu items"
|
|
191
|
+
},
|
|
192
|
+
actions: {
|
|
193
|
+
manageMenu: "Manage Menu"
|
|
194
|
+
},
|
|
195
|
+
options: {
|
|
196
|
+
alwaysOpen: "Open",
|
|
197
|
+
expandCollapse: "Closed",
|
|
198
|
+
fitToText: "Fit to text",
|
|
199
|
+
fillMenu: "Fill menu"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
item: {
|
|
203
|
+
elementDisplayName: "Menu items",
|
|
204
|
+
cssProperties: {
|
|
205
|
+
justifyContent: "Text alignment",
|
|
206
|
+
background: "Background",
|
|
207
|
+
columnGap: "Space between menu items and icons",
|
|
208
|
+
"item-icon-size": "Size"
|
|
209
|
+
},
|
|
210
|
+
displayGroups: {
|
|
211
|
+
iconGroup: "Icons"
|
|
212
|
+
},
|
|
213
|
+
states: {
|
|
214
|
+
hover: "Hover",
|
|
215
|
+
selected: "Selected"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
dropdown: {
|
|
219
|
+
elementDisplayName: "Dropdowns",
|
|
220
|
+
cssCustomProperties: {
|
|
221
|
+
anchor: "Dropdown width",
|
|
222
|
+
align: "Dropdown position",
|
|
223
|
+
"items-width": "Item width",
|
|
224
|
+
"columns-number": "Number of columns",
|
|
225
|
+
"space-above": "Space above dropdowns",
|
|
226
|
+
"horizontal-margin": "Dropdown margin",
|
|
227
|
+
"item-position": "Dropdown box position"
|
|
228
|
+
},
|
|
229
|
+
options: {
|
|
230
|
+
menuItem: "Fit to items",
|
|
231
|
+
menuStretched: "Fit to menu",
|
|
232
|
+
screen: "Stretch to page",
|
|
233
|
+
start: "Start",
|
|
234
|
+
center: "Middle",
|
|
235
|
+
end: "End",
|
|
236
|
+
fitToText: "Fit to text",
|
|
237
|
+
fillDropdown: "Fill dropdowns",
|
|
238
|
+
afterItems: "After items",
|
|
239
|
+
beforeItems: "Before items",
|
|
240
|
+
aboveItems: "Above items",
|
|
241
|
+
belowItems: "Below items"
|
|
242
|
+
},
|
|
243
|
+
displayGroups: {
|
|
244
|
+
gapGroup: "Space between items"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
dropdownItem: {
|
|
248
|
+
elementDisplayName: "Dropdown items"
|
|
249
|
+
},
|
|
250
|
+
dropdownSubItem: {
|
|
251
|
+
elementDisplayName: "Dropdown sub-items"
|
|
252
|
+
},
|
|
253
|
+
scrollButton: {
|
|
254
|
+
elementDisplayName: "Scroll button",
|
|
255
|
+
cssProperties: {
|
|
256
|
+
background: "Background"
|
|
257
|
+
},
|
|
258
|
+
cssCustomProperties: {
|
|
259
|
+
"scroll-button-icon-size": "Size"
|
|
260
|
+
},
|
|
261
|
+
displayGroups: {
|
|
262
|
+
scrollButtonGroup: "Icon"
|
|
18
263
|
}
|
|
19
264
|
},
|
|
20
|
-
|
|
21
|
-
elementDisplayName: "
|
|
265
|
+
hamburgerMenu: {
|
|
266
|
+
elementDisplayName: "Hamburger menu",
|
|
267
|
+
cssCustomProperties: {
|
|
268
|
+
"hamburger-wrapper-width": "Width",
|
|
269
|
+
"wrapper-position": "Position",
|
|
270
|
+
"menu-position": "Menu Position",
|
|
271
|
+
"close-button-position": "Close button position",
|
|
272
|
+
"overlay-background": "Overlay Background"
|
|
273
|
+
},
|
|
274
|
+
options: {
|
|
275
|
+
third: "Third of page",
|
|
276
|
+
twoThirds: "Two thirds of page",
|
|
277
|
+
half: "Half page",
|
|
278
|
+
full: "Full page",
|
|
279
|
+
start: "Start",
|
|
280
|
+
middle: "Middle",
|
|
281
|
+
end: "End",
|
|
282
|
+
top: "Top",
|
|
283
|
+
bottom: "Bottom"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
hamburgerOpenButton: {
|
|
287
|
+
elementDisplayName: "Hamburger button"
|
|
288
|
+
},
|
|
289
|
+
hamburgerCloseButton: {
|
|
290
|
+
elementDisplayName: "Close Button"
|
|
22
291
|
}
|
|
23
292
|
};
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
293
|
+
const selectors = {
|
|
294
|
+
menu: "menu",
|
|
295
|
+
navbar: "navbar",
|
|
296
|
+
item: "item",
|
|
297
|
+
dropdown: "dropdown",
|
|
298
|
+
dropdownItem: "dropdown-item",
|
|
299
|
+
dropdownSubItem: "dropdown-sub-item",
|
|
300
|
+
scrollButton: "scroll-button",
|
|
301
|
+
hamburgerMenu: "hamburger-menu",
|
|
302
|
+
hamburgerMenuContent: "hamburger-menu-content",
|
|
303
|
+
hamburgerMenuHeaderContent: "hamburger-menu-header-content",
|
|
304
|
+
hamburgerMenuOpenButton: "hamburger-open-button",
|
|
305
|
+
hamburgerMenuCloseButton: "hamburger-close-button"
|
|
29
306
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
307
|
+
const elementKeys = {
|
|
308
|
+
navbar: "navbar",
|
|
309
|
+
hamburgerMenu: "hamburgerMenu",
|
|
310
|
+
hamburgerOpenButton: "hamburgerOpenButton",
|
|
311
|
+
hamburgerCloseButton: "hamburgerCloseButton",
|
|
312
|
+
item: "item",
|
|
313
|
+
subItem: "subItem",
|
|
314
|
+
scrollButton: "scrollButton",
|
|
315
|
+
dropdown: "dropdown"
|
|
316
|
+
};
|
|
317
|
+
const presets = {
|
|
318
|
+
horizontalScrollNavbar: "horizontalScrollNavbar",
|
|
319
|
+
horizontalHugNavbar: "horizontalHugNavbar",
|
|
320
|
+
verticalNavbar: "verticalNavbar",
|
|
321
|
+
hamburgerMenu: "hamburgerMenu"
|
|
322
|
+
};
|
|
323
|
+
const states = {
|
|
324
|
+
dropdown: "dropdown",
|
|
325
|
+
hamburgerDialog: "hamburgerDialog",
|
|
326
|
+
hamburgerDialogDropdown: "hamburgerDialogDropdown"
|
|
327
|
+
};
|
|
328
|
+
const DesignStates = {
|
|
329
|
+
item: {
|
|
330
|
+
hover: {
|
|
331
|
+
displayName: DisplayNames.item.states.hover,
|
|
332
|
+
className: "menu__item--hover"
|
|
333
|
+
},
|
|
334
|
+
selected: {
|
|
335
|
+
displayName: DisplayNames.item.states.selected,
|
|
336
|
+
className: "menu__item--selected"
|
|
337
|
+
}
|
|
34
338
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
339
|
+
dropdownItem: {
|
|
340
|
+
hover: {
|
|
341
|
+
displayName: "Hover",
|
|
342
|
+
className: "menu__dropdown-item--hover"
|
|
343
|
+
},
|
|
344
|
+
selected: {
|
|
345
|
+
displayName: "Selected",
|
|
346
|
+
className: "menu__dropdown-item--selected"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
dropdownSubItem: {
|
|
350
|
+
hover: {
|
|
351
|
+
displayName: "Hover",
|
|
352
|
+
className: "menu__dropdown-sub-item--hover"
|
|
353
|
+
},
|
|
354
|
+
selected: {
|
|
355
|
+
displayName: "Selected",
|
|
356
|
+
className: "menu__dropdown-sub-item--selected"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
scrollButton: {
|
|
360
|
+
hover: {
|
|
361
|
+
displayName: "Hover",
|
|
362
|
+
className: "menu__scroll-button--hover"
|
|
363
|
+
}
|
|
38
364
|
}
|
|
39
365
|
};
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
366
|
+
const DropdownAppliedStyleProperties = {
|
|
367
|
+
anchor: "--wix-menu-dropdown-anchor"
|
|
368
|
+
};
|
|
369
|
+
const DropdownAnchorPositions = {
|
|
370
|
+
menuItem: "0",
|
|
371
|
+
menuStretched: "1",
|
|
372
|
+
screen: "2"
|
|
373
|
+
};
|
|
374
|
+
const ARIA_LABEL_NAMESPACE = "ariaLabels";
|
|
375
|
+
const translationsKeys = {
|
|
376
|
+
menuNavAriaLabel: "dropDownMenu_AriaLabel_TopLevel_SiteNavigation",
|
|
377
|
+
dropdownButtonAriaLabel: "menu_dropdown_chevron_button_aria_label",
|
|
378
|
+
hamburgerOpenButtonAriaLabel: "menu_hamburger_open_button_aria_label",
|
|
379
|
+
hamburgerCloseButtonAriaLabel: "menu_hamburger_close_button_aria_label"
|
|
380
|
+
};
|
|
381
|
+
const defaultTranslations = {
|
|
382
|
+
menuNavAriaLabel: "Site",
|
|
383
|
+
dropdownButtonAriaLabel: "More pages",
|
|
384
|
+
hamburgerOpenButtonAriaLabel: "Menu",
|
|
385
|
+
hamburgerCloseButtonAriaLabel: "Close Menu"
|
|
386
|
+
};
|
|
387
|
+
const MenuParts = {
|
|
388
|
+
Navbar: "navbar",
|
|
389
|
+
DropdownContainer: "dropdown-container",
|
|
390
|
+
DropdownButton: "dropdown-button",
|
|
391
|
+
DropdownIcon: "dropdown-icon",
|
|
392
|
+
Label: "label",
|
|
393
|
+
DropdownItem: "dropdown-item",
|
|
394
|
+
DropdownItemLabel: "dropdown-item-label",
|
|
395
|
+
DropdownSubItem: "dropdown-subitem",
|
|
396
|
+
DropdownSubItemLabel: "dropdown-subitem-label",
|
|
397
|
+
MenuItem: "menu-item",
|
|
398
|
+
MenuItemContent: "menu-item-content",
|
|
399
|
+
MenuItemLink: "menu-item-link",
|
|
400
|
+
ScrollBackwardButton: "scroll-backward-button",
|
|
401
|
+
ScrollForwardButton: "scroll-forward-button"
|
|
73
402
|
};
|
|
74
403
|
export {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
404
|
+
AnimationPhase as A,
|
|
405
|
+
DropdownAnimationName as D,
|
|
406
|
+
HamburgerMenuAnimationName as H,
|
|
407
|
+
MenuAnimationName as M,
|
|
408
|
+
VerticalDropdownDisplay as V,
|
|
409
|
+
MenuOrientation as a,
|
|
410
|
+
MenuParts as b,
|
|
411
|
+
ARIA_LABEL_NAMESPACE as c,
|
|
412
|
+
defaultTranslations as d,
|
|
413
|
+
DesignStates as e,
|
|
414
|
+
DisplayNames as f,
|
|
415
|
+
DropdownAnchorPositions as g,
|
|
416
|
+
DropdownAppliedStyleProperties as h,
|
|
417
|
+
elementKeys as i,
|
|
418
|
+
states as j,
|
|
419
|
+
presets as p,
|
|
420
|
+
selectors as s,
|
|
421
|
+
translationsKeys as t,
|
|
422
|
+
useAnimationState as u
|
|
88
423
|
};
|
|
@@ -1,23 +1,88 @@
|
|
|
1
|
+
const semanticSelectors = {
|
|
2
|
+
root: "lottie",
|
|
3
|
+
playButton: "playButton"
|
|
4
|
+
};
|
|
5
|
+
const ariaLabels = {
|
|
6
|
+
playButton: "Play animation",
|
|
7
|
+
pauseButton: "Pause animation"
|
|
8
|
+
};
|
|
1
9
|
const DisplayNames = {
|
|
2
10
|
root: {
|
|
3
|
-
elementDisplayName: "
|
|
4
|
-
actions: {
|
|
5
|
-
settings: "Settings"
|
|
6
|
-
},
|
|
7
|
-
customActions: {
|
|
8
|
-
customizeLogo: "Customize Logo"
|
|
9
|
-
},
|
|
11
|
+
elementDisplayName: "Lottie",
|
|
10
12
|
data: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
animationUrl: "Animation URL",
|
|
14
|
+
loop: "Plays in a loop",
|
|
15
|
+
speed: "Speed",
|
|
16
|
+
showButtonOnHover: "Show play/pause button",
|
|
17
|
+
allowClickToStop: "Click to stop animation"
|
|
14
18
|
}
|
|
19
|
+
},
|
|
20
|
+
playButton: {
|
|
21
|
+
elementDisplayName: "Play button"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const rootDataDefaults = {
|
|
25
|
+
loop: true,
|
|
26
|
+
speed: 1,
|
|
27
|
+
showButtonOnHover: "always",
|
|
28
|
+
allowClickToStop: true
|
|
29
|
+
};
|
|
30
|
+
const showButtonOnHoverDefaults = {
|
|
31
|
+
always: {
|
|
32
|
+
value: "always",
|
|
33
|
+
displayName: "Always"
|
|
34
|
+
},
|
|
35
|
+
onHover: {
|
|
36
|
+
value: "onHover",
|
|
37
|
+
displayName: "On hover"
|
|
15
38
|
}
|
|
16
39
|
};
|
|
17
|
-
const
|
|
18
|
-
const
|
|
40
|
+
const displayPropertyToObserve = ["display"];
|
|
41
|
+
const testIds = {
|
|
42
|
+
animationClickWrapper: "lottie-animation-click-wrapper"
|
|
43
|
+
};
|
|
44
|
+
const borderDefaultValue = "0px none rgba(0, 0, 0, 1)";
|
|
45
|
+
const playButtonDefaults = {
|
|
46
|
+
insetInlineEnd: "5px",
|
|
47
|
+
insetBlockEnd: "5px"
|
|
48
|
+
};
|
|
49
|
+
const initialSize = {
|
|
50
|
+
width: 280,
|
|
51
|
+
height: 280
|
|
52
|
+
};
|
|
53
|
+
const speedConstraints = {
|
|
54
|
+
min: "0.5",
|
|
55
|
+
max: "5.0",
|
|
56
|
+
multiplier: "0.5"
|
|
57
|
+
};
|
|
58
|
+
const playIconSvg = {
|
|
59
|
+
uri: "",
|
|
60
|
+
viewBox: "0 0 24 24",
|
|
61
|
+
contentBox: "0 0 24 24",
|
|
62
|
+
colors: {},
|
|
63
|
+
contentType: "shape",
|
|
64
|
+
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>'
|
|
65
|
+
};
|
|
66
|
+
const pauseIconSvg = {
|
|
67
|
+
uri: "",
|
|
68
|
+
viewBox: "0 0 24 24",
|
|
69
|
+
contentBox: "0 0 24 24",
|
|
70
|
+
colors: {},
|
|
71
|
+
contentType: "shape",
|
|
72
|
+
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>'
|
|
73
|
+
};
|
|
19
74
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
75
|
+
DisplayNames as D,
|
|
76
|
+
ariaLabels as a,
|
|
77
|
+
playIconSvg as b,
|
|
78
|
+
showButtonOnHoverDefaults as c,
|
|
79
|
+
displayPropertyToObserve as d,
|
|
80
|
+
speedConstraints as e,
|
|
81
|
+
playButtonDefaults as f,
|
|
82
|
+
borderDefaultValue as g,
|
|
83
|
+
initialSize as i,
|
|
84
|
+
pauseIconSvg as p,
|
|
85
|
+
rootDataDefaults as r,
|
|
86
|
+
semanticSelectors as s,
|
|
87
|
+
testIds as t
|
|
23
88
|
};
|
|
@@ -1,54 +1,23 @@
|
|
|
1
|
-
const presets = {
|
|
2
|
-
horizontal: "horizontal",
|
|
3
|
-
vertical: "vertical"
|
|
4
|
-
};
|
|
5
1
|
const DisplayNames = {
|
|
6
2
|
root: {
|
|
7
|
-
elementDisplayName: "
|
|
8
|
-
presets: {
|
|
9
|
-
horizontal: "Horizontal",
|
|
10
|
-
vertical: "Vertical"
|
|
11
|
-
},
|
|
12
|
-
cssCustomProperties: {
|
|
13
|
-
"item-size": "Size",
|
|
14
|
-
"row-gap": "Vertical space between icons",
|
|
15
|
-
"column-gap": "Horizontal space between icons",
|
|
16
|
-
"justify-content": "Alignment"
|
|
17
|
-
},
|
|
18
|
-
data: {
|
|
19
|
-
items: "Social",
|
|
20
|
-
icon: "Icon",
|
|
21
|
-
link: "Links to"
|
|
22
|
-
},
|
|
3
|
+
elementDisplayName: "Logo",
|
|
23
4
|
actions: {
|
|
24
|
-
|
|
5
|
+
settings: "Settings"
|
|
25
6
|
},
|
|
26
7
|
customActions: {
|
|
27
|
-
|
|
8
|
+
customizeLogo: "Customize Logo"
|
|
28
9
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
displayName: "
|
|
32
|
-
},
|
|
33
|
-
iconsGroup: {
|
|
34
|
-
displayName: "Icons"
|
|
10
|
+
data: {
|
|
11
|
+
image: {
|
|
12
|
+
displayName: "Logo Image"
|
|
35
13
|
}
|
|
36
14
|
}
|
|
37
15
|
}
|
|
38
16
|
};
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
hover: { displayName: "Hover", className: "link-bar--hover" }
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const ARIA_LABEL_NAMESPACE = "ariaLabels";
|
|
45
|
-
const ARIA_LABEL_KEY = "LinkBar_AriaLabel_SocialBarContainer";
|
|
46
|
-
const ARIA_LABEL_DEFAULT = "Social Bar";
|
|
17
|
+
const defaultLogoUrl = "https://static.parastorage.com/services/santa-resources/dist/editor/addPanelData/sections/logo/logoDefault.v2.png";
|
|
18
|
+
const DEFAULT_LOGO_SIZE = 80;
|
|
47
19
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
ARIA_LABEL_DEFAULT as b,
|
|
52
|
-
DisplayNames as c,
|
|
53
|
-
presets as p
|
|
20
|
+
DEFAULT_LOGO_SIZE as D,
|
|
21
|
+
DisplayNames as a,
|
|
22
|
+
defaultLogoUrl as d
|
|
54
23
|
};
|