@widelab-nc/widelab 1.1.11 → 1.1.12
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/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
- package/src/index.js +43 -6
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1032,6 +1032,48 @@ window.closeContactModal = function() {
|
|
|
1032
1032
|
contactFormOpen.timeScale(1).reverse();;
|
|
1033
1033
|
}
|
|
1034
1034
|
|
|
1035
|
+
// Form animation
|
|
1036
|
+
// Hero animation on load
|
|
1037
|
+
window.successMsgAnimation = function(e) {
|
|
1038
|
+
const successMsgAnim = gsap.timeline({}),
|
|
1039
|
+
|
|
1040
|
+
homeHeroHeading = new SplitText('#successHoooray, #successHeadiline', {
|
|
1041
|
+
type: 'lines',
|
|
1042
|
+
linesClass: 'hero-line',
|
|
1043
|
+
}),
|
|
1044
|
+
homeHeroHeadingMask = new SplitText('#successHoooray, #successHeadiline', {
|
|
1045
|
+
type: 'lines',
|
|
1046
|
+
linesClass: 'hero-line-mask',
|
|
1047
|
+
});
|
|
1048
|
+
successMsgAnim.from(
|
|
1049
|
+
'.hero-line',
|
|
1050
|
+
{
|
|
1051
|
+
duration: 1.2,
|
|
1052
|
+
y: '100%',
|
|
1053
|
+
stagger: 0.2,
|
|
1054
|
+
ease: 'loader2',
|
|
1055
|
+
}
|
|
1056
|
+
);
|
|
1057
|
+
successMsgAnim.to(
|
|
1058
|
+
e,
|
|
1059
|
+
{
|
|
1060
|
+
width: '0%',
|
|
1061
|
+
duration: 0.6,
|
|
1062
|
+
ease: 'loader2',
|
|
1063
|
+
},
|
|
1064
|
+
'>-0.5'
|
|
1065
|
+
);
|
|
1066
|
+
successMsgAnim.from(
|
|
1067
|
+
'#successParagraph',
|
|
1068
|
+
{
|
|
1069
|
+
opacity: 0,
|
|
1070
|
+
duration: 0.3,
|
|
1071
|
+
ease: 'loader2',
|
|
1072
|
+
},
|
|
1073
|
+
'>-0.4'
|
|
1074
|
+
);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1035
1077
|
// Form animation on submit
|
|
1036
1078
|
window.formSubmitAnimation = function(e) {
|
|
1037
1079
|
function observeDisplayChanges() {
|
|
@@ -1043,12 +1085,7 @@ window.formSubmitAnimation = function(e) {
|
|
|
1043
1085
|
const observer = new MutationObserver(function(mutationsList, observer) {
|
|
1044
1086
|
mutationsList.forEach(function(mutation) {
|
|
1045
1087
|
if (mutation.target.style.display === 'block') {
|
|
1046
|
-
|
|
1047
|
-
scrollTrigger: { trigger: e, start: 'bottom bottom-=5%' },
|
|
1048
|
-
width: 0,
|
|
1049
|
-
ease: 'loader2',
|
|
1050
|
-
duration: 0.6,
|
|
1051
|
-
});
|
|
1088
|
+
successMsgAnimation(e);
|
|
1052
1089
|
}
|
|
1053
1090
|
});
|
|
1054
1091
|
});
|