@widelab-nc/widelab 1.1.15 → 1.1.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widelab-nc/widelab",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "description": "Widelab starter template based on Finsweet template + add-ons.",
5
5
  "homepage": "https://widelab.co",
6
6
  "license": "ISC",
package/src/index.js CHANGED
@@ -1025,11 +1025,24 @@ window.changeCheckboxLabelColor = function() {
1025
1025
  // Contact modal open animation
1026
1026
  window.openContactModal = function() {
1027
1027
  contactFormOpen.play();
1028
+ document.body.classList.add('is-scroll-off');
1029
+ lenis.stop();
1028
1030
  }
1029
1031
 
1030
1032
  // Contact modal close animation
1031
1033
  window.closeContactModal = function() {
1032
- contactFormOpen.timeScale(1).reverse();;
1034
+ contactFormOpen.timeScale(1).reverse();
1035
+ document.body.classList.remove('is-scroll-off');
1036
+ lenis.start();
1037
+ }
1038
+
1039
+ // Close contact modal on ESC click
1040
+ window.closeContactModalOnEsc = function(e) {
1041
+ document.addEventListener('keydown', function(event) {
1042
+ if (event.key === "Escape") {
1043
+ window.closeContactModal();
1044
+ }
1045
+ });
1033
1046
  }
1034
1047
 
1035
1048
  // Form animation
@@ -1108,6 +1121,7 @@ window.contactUsHide = function(e) {
1108
1121
  }));
1109
1122
  }
1110
1123
 
1124
+ // Refresh Gsap scrollTriggers
1111
1125
  window.scrollTriggerRefresh = function() {
1112
1126
  function refreshScrollTrigger() {
1113
1127
  ScrollTrigger.refresh();
@@ -1118,6 +1132,8 @@ window.scrollTriggerRefresh = function() {
1118
1132
  observer.observe(targetNode, config);
1119
1133
  }
1120
1134
 
1135
+
1136
+
1121
1137
  // !!!!!!!!! Keep this Alpine init at the end !!!!!!!!!
1122
1138
  window.Webflow ||= [];
1123
1139
  window.Webflow.push(() => {