@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,40 +1,111 @@
|
|
|
1
|
-
const FULL_PROGRESS = 100;
|
|
2
|
-
const NO_PROGRESS = 0;
|
|
3
1
|
const DisplayNames = {
|
|
4
2
|
root: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
elementDisplayName: "Radio Buttons",
|
|
4
|
+
data: {
|
|
5
|
+
options: "Options",
|
|
6
|
+
optionLabel: "Label",
|
|
7
|
+
optionValue: "Value",
|
|
8
|
+
optionDisabled: "Disabled",
|
|
9
|
+
value: "Selected value",
|
|
10
|
+
firstSelectedByDefault: "Default selection",
|
|
11
|
+
firstSelectedByDefaultNone: "None",
|
|
12
|
+
firstSelectedByDefaultFirst: "First Item",
|
|
13
|
+
label: "Label",
|
|
14
|
+
tooltip: "Tooltip",
|
|
15
|
+
required: "Required",
|
|
16
|
+
readOnly: "Read only",
|
|
17
|
+
disabled: "Disabled"
|
|
18
|
+
},
|
|
19
|
+
cssCustomProperties: {
|
|
20
|
+
orientation: "Orientation",
|
|
21
|
+
radiosSpacing: "Space between radio buttons",
|
|
22
|
+
labelSpacing: "Space between field and field title",
|
|
23
|
+
radioTextSpacing: "Space between radio button and text",
|
|
24
|
+
alignment: "Alignment",
|
|
25
|
+
labelAlignment: "Label alignment"
|
|
26
|
+
}
|
|
9
27
|
},
|
|
10
|
-
|
|
11
|
-
|
|
28
|
+
radio: {
|
|
29
|
+
elementDisplayName: "Radio button",
|
|
12
30
|
cssCustomProperties: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
displayGroups: {
|
|
20
|
-
cornersGroup: "Corner radius"
|
|
31
|
+
unselectedBackgroundColor: "Unselected background color",
|
|
32
|
+
unselectedBorderColor: "Unselected border color",
|
|
33
|
+
selectedBackgroundColor: "Selected background color",
|
|
34
|
+
selectedBorderColor: "Selected border color",
|
|
35
|
+
dotColor: "Dot color",
|
|
36
|
+
size: "Radio button size"
|
|
21
37
|
}
|
|
22
38
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
optionLabel: {
|
|
40
|
+
elementDisplayName: "Option label"
|
|
41
|
+
},
|
|
42
|
+
groupLabel: {
|
|
43
|
+
elementDisplayName: "Group label"
|
|
26
44
|
}
|
|
27
45
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
46
|
+
const DesignStates = {
|
|
47
|
+
radio: {
|
|
48
|
+
hover: { displayName: "Hover", className: "radio-buttons__radio--hover" },
|
|
49
|
+
focus: { displayName: "Focus", className: "radio-buttons__radio--focus" },
|
|
50
|
+
disabled: {
|
|
51
|
+
displayName: "Disabled",
|
|
52
|
+
className: "radio-buttons__radio--disabled"
|
|
53
|
+
},
|
|
54
|
+
invalid: {
|
|
55
|
+
displayName: "Invalid",
|
|
56
|
+
className: "radio-buttons__radio--invalid"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const defaultOptions = [
|
|
61
|
+
{ value: "option-1", label: "Option 1", disabled: false },
|
|
62
|
+
{ value: "option-2", label: "Option 2", disabled: false },
|
|
63
|
+
{ value: "option-3", label: "Option 3", disabled: false }
|
|
64
|
+
];
|
|
65
|
+
const defaultValues = {
|
|
66
|
+
label: "Label",
|
|
67
|
+
tooltip: "",
|
|
68
|
+
firstSelectedByDefault: "none",
|
|
69
|
+
required: false,
|
|
70
|
+
readOnly: false,
|
|
71
|
+
disabled: false
|
|
72
|
+
};
|
|
73
|
+
const VALUE_MISSING_MESSAGE = "This field is required";
|
|
74
|
+
const TestIds = {
|
|
75
|
+
root: "radio-buttons-root",
|
|
76
|
+
group: "radio-buttons-group",
|
|
77
|
+
legend: "radio-buttons-legend",
|
|
78
|
+
requiredIndicator: "radio-buttons-required-indicator",
|
|
79
|
+
tooltipButton: "radio-buttons-tooltip-button",
|
|
80
|
+
option: "radio-buttons-option",
|
|
81
|
+
control: "radio-buttons-control",
|
|
82
|
+
indicator: "radio-buttons-indicator",
|
|
83
|
+
optionLabel: "radio-buttons-option-label",
|
|
84
|
+
errorMessage: "radio-buttons-error-message"
|
|
85
|
+
};
|
|
86
|
+
const selectors = {
|
|
87
|
+
root: "radio-buttons",
|
|
88
|
+
radio: "radio-buttons__radio",
|
|
89
|
+
indicator: "radio-buttons__indicator",
|
|
90
|
+
label: "radio-buttons__label",
|
|
91
|
+
groupLabel: "radio-buttons__group-label"
|
|
92
|
+
};
|
|
93
|
+
const semanticClassNames = {
|
|
94
|
+
groupLabel: "radio-buttons__group-label",
|
|
95
|
+
requiredIndicator: "radio-buttons__required-indicator",
|
|
96
|
+
option: "radio-buttons__option",
|
|
97
|
+
radio: "radio-buttons__radio",
|
|
98
|
+
indicator: "radio-buttons__indicator",
|
|
99
|
+
label: "radio-buttons__label",
|
|
100
|
+
errorMessage: "radio-buttons__error-message"
|
|
101
|
+
};
|
|
35
102
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
103
|
+
DesignStates as D,
|
|
104
|
+
TestIds as T,
|
|
105
|
+
VALUE_MISSING_MESSAGE as V,
|
|
106
|
+
defaultOptions as a,
|
|
107
|
+
semanticClassNames as b,
|
|
108
|
+
DisplayNames as c,
|
|
109
|
+
defaultValues as d,
|
|
110
|
+
selectors as s
|
|
40
111
|
};
|
|
@@ -1,22 +1,40 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
const FULL_PROGRESS = 100;
|
|
2
|
+
const NO_PROGRESS = 0;
|
|
3
|
+
const DisplayNames = {
|
|
4
|
+
root: {
|
|
5
|
+
displayName: "Progress Bar"
|
|
6
|
+
},
|
|
7
|
+
label: {
|
|
8
|
+
displayName: "Label"
|
|
9
|
+
},
|
|
10
|
+
bar: {
|
|
11
|
+
displayName: "ProgressBar",
|
|
12
|
+
cssCustomProperties: {
|
|
13
|
+
barBackgroundColor: "Background color",
|
|
14
|
+
barForegroundColor: "Bar color"
|
|
15
|
+
},
|
|
16
|
+
cssProperties: {
|
|
17
|
+
barHeight: "Bar width"
|
|
18
|
+
},
|
|
19
|
+
displayGroups: {
|
|
20
|
+
cornersGroup: "Corner radius"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
14
23
|
data: {
|
|
15
|
-
|
|
24
|
+
targetValue: "Max value",
|
|
25
|
+
label: "Label"
|
|
16
26
|
}
|
|
17
27
|
};
|
|
28
|
+
var TestIDs = /* @__PURE__ */ ((TestIDs2) => {
|
|
29
|
+
TestIDs2["container"] = "progressbar-container";
|
|
30
|
+
TestIDs2["background"] = "progressbar-background";
|
|
31
|
+
TestIDs2["foreground"] = "progressbar-foreground";
|
|
32
|
+
TestIDs2["label"] = "progressbar-label";
|
|
33
|
+
return TestIDs2;
|
|
34
|
+
})(TestIDs || {});
|
|
18
35
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
36
|
+
DisplayNames as D,
|
|
37
|
+
FULL_PROGRESS as F,
|
|
38
|
+
NO_PROGRESS as N,
|
|
39
|
+
TestIDs as T
|
|
22
40
|
};
|
|
@@ -1,453 +1,22 @@
|
|
|
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"
|
|
10
|
-
};
|
|
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"
|
|
121
|
-
};
|
|
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"
|
|
145
|
-
};
|
|
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"
|
|
155
|
-
};
|
|
156
|
-
const DisplayNames = {
|
|
157
|
-
root: {
|
|
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"
|
|
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
1
|
const selectors = {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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"
|
|
391
|
-
}
|
|
2
|
+
root: "multi-state-box",
|
|
3
|
+
stateContainer: "state-container"
|
|
4
|
+
};
|
|
5
|
+
const DISPLAY_NAMES = {
|
|
6
|
+
component: "Multi-State Box",
|
|
7
|
+
data: {
|
|
8
|
+
states: "State",
|
|
9
|
+
activeStateName: "Active state",
|
|
10
|
+
stateName: "State name"
|
|
392
11
|
}
|
|
393
12
|
};
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
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"
|
|
13
|
+
const DESCRIPTIONS = {
|
|
14
|
+
data: {
|
|
15
|
+
activeStateName: "To trigger states from CMS or code, use the connect icon to bind this property"
|
|
16
|
+
}
|
|
430
17
|
};
|
|
431
18
|
export {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
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
|
|
19
|
+
DESCRIPTIONS as D,
|
|
20
|
+
DISPLAY_NAMES as a,
|
|
21
|
+
selectors as s
|
|
453
22
|
};
|