ably-ui 7.9.3.dev.99c382d → 7.10.0.dev.45e131a

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c713be4519012e6b160a62b3964df40784eb555d191dbc916b98d3efb6764527
4
- data.tar.gz: debc152e25c4895407a082dd3bdbd5cd0ec5af9e216982448ae795d339d53aa2
3
+ metadata.gz: c23a334790ac7b889f531c6f97e45506f9863a6af73a105dc5298d4f4e76bd86
4
+ data.tar.gz: a017459c9d2d4ee42b67f6a82bdffa1d1bacd54438b34e22f585d953bfff5765
5
5
  SHA512:
6
- metadata.gz: 54125665ec6f22f78747ff44b352f9a6f69774e890fe8ffbee3985c3fedd3197f81eb57819eb527a4cd4a25d263f66d0b32fd786d944e16b737be3ed1d72738a
7
- data.tar.gz: 77a70eaa694da0add2e83f6b3a1482b468e1682ede0b6fca1e6b0c1e4744a55419fd522feea748f3f3ba2726ec03de368dcf13efbf910d81899e3fcba37dfd26
6
+ metadata.gz: 8d744bce1d58d808fac4e94d30a82f550b8f47889ce1297273933a005ae52108b3b95957d3c83c31fdb4d2a516d053568488a025221f8b37581c75cf92546237
7
+ data.tar.gz: de586f0c83a3a90f2cacd648910aa7ccc8063edfe992d8c051081c034814136ead3054ee4edd64ef5033faa8dc5e2f390b2e3541fa3d548f9d59a05c8a55d287
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ably-ui (7.9.3.dev.a74555e)
4
+ ably-ui (7.10.0)
5
5
  view_component (>= 2.33, < 2.50)
6
6
 
7
7
  GEM
@@ -48,11 +48,15 @@
48
48
 
49
49
  .ui-meganav-link {
50
50
  @apply text-menu2 font-medium block;
51
- @apply mx-8 lg:mx-12 px-0 py-20;
51
+ @apply mr-12 lg:mr-24 px-0 py-20;
52
52
  @apply hover:text-gui-hover focus:text-gui-focus focus:outline-none;
53
53
  @apply transition-colors;
54
54
  }
55
55
 
56
+ .ui-meganav-item {
57
+ flex: 1 0 auto;
58
+ }
59
+
56
60
  .ui-meganav-mobile-link {
57
61
  @apply p-menu-row relative -left-8 w-extend-8;
58
62
  @apply text-menu2 font-medium block text-cool-black text-left;
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Meganav=t())}(this,(function(){return(()=>{var e={2498:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var n=r(9581);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const l=function(){var e=Array.from((0,n.n)("meganav-control")),t=Array.from((0,n.n)("meganav-panel")),r=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),l=function(t,n,l){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(r,")")).matches&&!e.some((function(e){return e===document.activeElement}))){var i,a=["invisible","visible"];(i=n.classList).replace.apply(i,function(e){if(Array.isArray(e))return o(e)}(c=l?a:a.reverse())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),t.setAttribute("aria-expanded",l)}var c};return e.map((function(r){var n=r.parentNode,o=document.querySelector("#".concat(r.getAttribute("aria-controls"))),i=function(r,n){return function(){e.forEach((function(e){return e!==r&&e.setAttribute("aria-expanded",!1)})),t.forEach((function(e){return e!==n&&e.classList.replace("visible","invisible")})),r.getAttribute("aria-expanded")?(r.setAttribute("aria-expanded",!0),n.classList.replace("invisible","visible")):(r.setAttribute("aria-expanded",!1),n.classList.replace("visible","invisible"))}}(r,o),a=function(e,t){return function(){return l(e,t,!0)}}(r,o),c=function(e,t){return function(){return l(e,t,!1)}}(r,o);return n.addEventListener("mouseenter",a),n.addEventListener("mouseleave",c),r.addEventListener("click",i),[{teardown:function(){n.removeEventListener("mouseenter",a),n.removeEventListener("mouseleave",c),r.removeEventListener("click",i)},clear:function(){r.setAttribute("aria-expanded",!1),o.classList.replace("visible","invisible")}}]})).flat()}},1792:(e,t,r)=>{"use strict";r.d(t,{default:()=>i});var n=r(6265),o=r.n(n),l=r(9581);const i=function(e){var t=e.clearPanels,r=(0,l.A)("meganav-control-mobile-dropdown"),n=(0,l.A)("meganav-mobile-dropdown"),i=(0,l.A)("meganav-control-mobile-dropdown-menu"),a=(0,l.A)("meganav-control-mobile-dropdown-close"),c=function(){"false"===r.getAttribute("aria-expanded")?(n.classList.replace("invisible","visible"),r.setAttribute("aria-expanded",!0),o().disablePageScroll()):(n.classList.replace("visible","invisible"),r.setAttribute("aria-expanded",!1),o().enablePageScroll(),t()),i.classList.toggle("hidden"),a.classList.toggle("hidden")};return r.addEventListener("click",c),{teardown:function(){r.removeEventListener("click",c),o().enablePageScroll()},clear:function(){n.classList.replace("visible","invisible"),r.setAttribute("aria-expanded",!1),i.classList.remove("hidden"),a.classList.add("hidden"),o().enablePageScroll()}}}},7359:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var n=r(9581);const o=function(){var e=Array.from((0,n.n)("meganav-control-mobile-panel-close")),t=Array.from((0,n.n)("meganav-control-mobile-panel-open"));return e.map((function(e){var r=t.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),n=document.querySelector("#".concat(e.getAttribute("aria-controls"))),o=function(e,t,r){return function(){e.setAttribute("aria-expanded",!1),t.setAttribute("aria-expanded",!1),r.classList.replace("block","hidden"),r.style.height=null}}(e,r,n);return e.addEventListener("click",o),{teardown:function(){return e.removeEventListener("click",o)},clear:function(){return e.setAttribute("aria-expanded",!1)}}}))}},9552:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var n=r(9581);const o=function(){var e,t=Array.from((0,n.n)("meganav-control-mobile-panel-close")),r=Array.from((0,n.n)("meganav-control-mobile-panel-open")),o=(0,n.A)("meganav-mobile-dropdown"),l=(e=getComputedStyle(document.documentElement).getPropertyValue("--ui-meganav-height"),parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize));return r.map((function(e){var r=t.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),n=document.querySelector("#".concat(e.getAttribute("aria-controls"))),i=function(e,t,r){return function(){e.setAttribute("aria-expanded",!0),t.setAttribute("aria-expanded",!0),r.classList.replace("hidden","block"),r.style.height="".concat(window.innerHeight-l>r.offsetHeight?r.offsetHeight:window.innerHeight-l,"px")}}(e,r,n);return e.addEventListener("click",i),{teardown:function(){return e.removeEventListener("click",i)},clear:function(){n.classList.replace("block","hidden"),o.classList.remove("ui-meganav-mobile-dropdown-expand"),e.setAttribute("aria-expanded",!1),n.style.height=null}}}))}},9581:(e,t,r)=>{"use strict";r.d(t,{A:()=>n,n:()=>o});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}},3096:(e,t,r)=>{var n="Expected a function",o=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,s="object"==typeof self&&self&&self.Object===Object&&self,d=u||s||Function("return this")(),f=Object.prototype.toString,p=Math.max,g=Math.min,b=function(){return d.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=i.test(e);return r||a.test(e)?c(e.slice(2),r?2:8):l.test(e)?NaN:+e}e.exports=function(e,t,r){var o=!0,l=!0;if("function"!=typeof e)throw new TypeError(n);return v(r)&&(o="leading"in r?!!r.leading:o,l="trailing"in r?!!r.trailing:l),function(e,t,r){var o,l,i,a,c,u,s=0,d=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError(n);function y(t){var r=o,n=l;return o=l=void 0,s=t,a=e.apply(n,r)}function S(e){return s=e,c=setTimeout(A,t),d?y(e):a}function w(e){var r=e-u;return void 0===u||r>=t||r<0||f&&e-s>=i}function A(){var e=b();if(w(e))return k(e);c=setTimeout(A,function(e){var r=t-(e-u);return f?g(r,i-(e-s)):r}(e))}function k(e){return c=void 0,h&&o?y(e):(o=l=void 0,a)}function L(){var e=b(),r=w(e);if(o=arguments,l=this,u=e,r){if(void 0===c)return S(u);if(f)return c=setTimeout(A,t),y(u)}return void 0===c&&(c=setTimeout(A,t)),a}return t=m(t)||0,v(r)&&(d=!!r.leading,i=(f="maxWait"in r)?p(m(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h),L.cancel=function(){void 0!==c&&clearTimeout(c),s=0,o=u=l=c=void 0},L.flush=function(){return void 0===c?a:k(b())},L}(e,t,{leading:o,maxWait:t,trailing:l})}},6265:function(e){var t;t=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var n=function(e){return Array.isArray(e)?e:[e]},o=function(e){return e instanceof Node},l=function(e,t){if(e&&t){e=function(e){return e instanceof NodeList}(e)?e:[e];for(var r=0;r<e.length&&!0!==t(e[r],r,e.length);r++);}},i=function(e){return console.error("[scroll-lock] ".concat(e))},a=function(e){if(Array.isArray(e))return e.join(", ")},c=function(e){var t=[];return l(e,(function(e){return t.push(e)})),t},u=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(r&&-1!==c(n.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===c(n.querySelectorAll(t)).indexOf(e););return e},s=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n=-1!==c(r.querySelectorAll(t)).indexOf(e);return n},d=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},f=function(e){if(e)return!!d(e)||e.scrollTop<=0},p=function(e){if(e){if(d(e))return!0;var t=e.scrollTop,r=e.scrollHeight;return t+e.offsetHeight>=r}},g=function(e){if(e)return!!d(e)||e.scrollLeft<=0},b=function(e){if(e){if(d(e))return!0;var t=e.scrollLeft,r=e.scrollWidth;return t+e.offsetWidth>=r}},v=function(e){return s(e,'textarea, [contenteditable="true"]')},m=function(e){return s(e,'input[type="range"]')};function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"disablePageScroll",(function(){return w})),r.d(t,"enablePageScroll",(function(){return A})),r.d(t,"getScrollState",(function(){return k})),r.d(t,"clearQueueScrollLocks",(function(){return L})),r.d(t,"getTargetScrollBarWidth",(function(){return x})),r.d(t,"getCurrentTargetScrollBarWidth",(function(){return E})),r.d(t,"getPageScrollBarWidth",(function(){return T})),r.d(t,"getCurrentPageScrollBarWidth",(function(){return j})),r.d(t,"addScrollableTarget",(function(){return O})),r.d(t,"removeScrollableTarget",(function(){return G})),r.d(t,"addScrollableSelector",(function(){return W})),r.d(t,"removeScrollableSelector",(function(){return F})),r.d(t,"addLockableTarget",(function(){return P})),r.d(t,"addLockableSelector",(function(){return Y})),r.d(t,"setFillGapMethod",(function(){return q})),r.d(t,"addFillGapTarget",(function(){return M})),r.d(t,"removeFillGapTarget",(function(){return C})),r.d(t,"addFillGapSelector",(function(){return N})),r.d(t,"removeFillGapSelector",(function(){return U})),r.d(t,"refillGaps",(function(){return B}));var y=["padding","margin","width","max-width","none"],S={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:y[0],startTouchY:0,startTouchX:0},w=function(e){S.queue<=0&&(S.scroll=!1,K(),$()),O(e),S.queue++},A=function(e){S.queue>0&&S.queue--,S.queue<=0&&(S.scroll=!0,R(),D()),G(e)},k=function(){return S.scroll},L=function(){S.queue=0},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r=e.style.overflowY;t?k()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var n=E(e);return e.style.overflowY=r,n}return 0},E=function(e){if(o(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var r=e.style.borderLeftWidth,n=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var l=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=r,e.style.borderRightWidth=n,l}return 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return x(document.body,e)},j=function(){return E(document.body)},O=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-scrollable",""):i('"'.concat(e,'" is not a Element.'))}))}))},G=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?e.removeAttribute("data-scroll-lock-scrollable"):i('"'.concat(e,'" is not a Element.'))}))}))},W=function(e){e&&n(e).map((function(e){S.scrollableSelectors.push(e)}))},F=function(e){e&&n(e).map((function(e){S.scrollableSelectors=S.scrollableSelectors.filter((function(t){return t!==e}))}))},P=function(e){e&&(n(e).map((function(e){l(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-lockable",""):i('"'.concat(e,'" is not a Element.'))}))})),k()||K())},Y=function(e){e&&(n(e).map((function(e){S.lockableSelectors.push(e)})),k()||K(),N(e))},q=function(e){if(e)if(-1!==y.indexOf(e))S.fillGapMethod=e,B();else{var t=y.join(", ");i('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},M=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),S.scroll||z(e)):i('"'.concat(e,'" is not a Element.'))}))}))},C=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),S.scroll||J(e)):i('"'.concat(e,'" is not a Element.'))}))}))},N=function(e){e&&n(e).map((function(e){-1===S.fillGapSelectors.indexOf(e)&&(S.fillGapSelectors.push(e),S.scroll||Q(e))}))},U=function(e){e&&n(e).map((function(e){S.fillGapSelectors=S.fillGapSelectors.filter((function(t){return t!==e})),S.scroll||V(e)}))},B=function(){S.scroll||$()},K=function(){var e=a(S.lockableSelectors);_(e)},R=function(){var e=a(S.lockableSelectors);I(e)},_=function(e){var t=document.querySelectorAll(e);l(t,(function(e){H(e)}))},I=function(e){var t=document.querySelectorAll(e);l(t,(function(e){X(e)}))},H=function(e){if(o(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},X=function(e){o(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},$=function(){S.fillGapSelectors.map((function(e){Q(e)}))},D=function(){S.fillGapSelectors.map((function(e){V(e)}))},Q=function(e){var t=document.querySelectorAll(e),r=-1!==S.lockableSelectors.indexOf(e);l(t,(function(e){z(e,r)}))},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r;if(""===e.getAttribute("data-scroll-lock-lockable")||t)r=x(e,!0);else{var n=u(e,a(S.lockableSelectors));r=x(n,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&J(e);var l=window.getComputedStyle(e);if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",S.fillGapMethod),"margin"===S.fillGapMethod){var i=parseFloat(l.marginRight);e.style.marginRight="".concat(i+r,"px")}else if("width"===S.fillGapMethod)e.style.width="calc(100% - ".concat(r,"px)");else if("max-width"===S.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(r,"px)");else if("padding"===S.fillGapMethod){var c=parseFloat(l.paddingRight);e.style.paddingRight="".concat(c+r,"px")}}},V=function(e){var t=document.querySelectorAll(e);l(t,(function(e){J(e)}))},J=function(e){if(o(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(e){B()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(e){S.scroll||(S.startTouchY=e.touches[0].clientY,S.startTouchX=e.touches[0].clientX)})),document.addEventListener("touchmove",(function(e){if(!S.scroll){var t=S.startTouchY,r=S.startTouchX,n=e.touches[0].clientY,o=e.touches[0].clientX;if(e.touches.length<2){var l=a(S.scrollableSelectors),i={up:t<n,down:t>n,left:r<o,right:r>o},c={up:t+3<n,down:t-3>n,left:r+3<o,right:r-3>o};!function t(r){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r){var o=u(r,l,!1);if(m(r))return!1;if(n||v(r)&&u(r,l)||s(r,l)){var a=!1;g(r)&&b(r)?(i.up&&f(r)||i.down&&p(r))&&(a=!0):f(r)&&p(r)?(i.left&&g(r)||i.right&&b(r))&&(a=!0):(c.up&&f(r)||c.down&&p(r)||c.left&&g(r)||c.right&&b(r))&&(a=!0),a&&(o?t(o,!0):e.cancelable&&e.preventDefault())}else t(o)}else e.cancelable&&e.preventDefault()}(e.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(e){S.scroll||(S.startTouchY=0,S.startTouchX=0)})));var Z={hide:function(e){i('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),w(e)},show:function(e){i('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),A(e)},toggle:function(e){i('"toggle" is deprecated! Do not use it.'),k()?w():A(e)},getState:function(){return i('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),k()},getWidth:function(){return i('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),T()},getCurrentWidth:function(){return i('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),j()},setScrollableTargets:function(e){i('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),O(e)},setFillGapSelectors:function(e){i('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),N(e)},setFillGapTargets:function(e){i('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),M(e)},clearQueue:function(){i('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),L()}},ee=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){h(e,t,r[t])}))}return e}({disablePageScroll:w,enablePageScroll:A,getScrollState:k,clearQueueScrollLocks:L,getTargetScrollBarWidth:x,getCurrentTargetScrollBarWidth:E,getPageScrollBarWidth:T,getCurrentPageScrollBarWidth:j,addScrollableSelector:W,removeScrollableSelector:F,addScrollableTarget:O,removeScrollableTarget:G,addLockableSelector:Y,addLockableTarget:P,addFillGapSelector:N,removeFillGapSelector:U,addFillGapTarget:M,removeFillGapTarget:C,setFillGapMethod:q,refillGaps:B,_state:S},Z);t.default=ee}]).default},e.exports=t()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var l=t[n]={exports:{}};return e[n].call(l.exports,l,l.exports,r),l.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{"use strict";r.d(n,{default:()=>g});var e=r(3096),t=r.n(e),o=r(9581),l=r(2498),i=r(1792),a=r(9552),c=r(7359);function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e){return window.onblur=function(){return e()},{teardown:function(){return window.onblur=null}}},f=function(e){var t=(0,o.A)("meganav"),r=function(r){t.contains(r.target)||e()};return document.addEventListener("click",r),{teardown:function(){return document.removeEventListener("click",r)}}},p=function(e){if("transparentToWhite"!==e)return{teardown:function(){}};var r=(0,o.A)("meganav"),n=(0,o.n)("meganav-link"),l=(0,o.A)("meganav-control-mobile-dropdown-menu"),i=(0,o.A)("meganav-control-mobile-dropdown-close"),a=(0,o.n)("meganav-control"),c=(0,o.A)("meganav-sign-up-btn"),s=[].concat(u(Array.from(a)),u(Array.from(n)),[(0,o.A)("meganav-logo")]),d=function(e){var t,r,n,o,a=["ui-icon-white","ui-icon-cool-black"],c=[].concat(a).reverse();e?(null==l||(t=l.classList).replace.apply(t,a),null==i||(r=i.classList).replace.apply(r,a)):(null==l||(n=l.classList).replace.apply(n,u(c)),null==i||(o=i.classList).replace.apply(o,u(c)))},f=function(e){e?(null==c||c.classList.replace("bg-white","bg-cool-black"),null==c||c.classList.replace("text-cool-black","text-white")):(null==c||c.classList.replace("bg-cool-black","bg-white"),null==c||c.classList.replace("text-white","text-cool-black"))},p=t()((function(){window.scrollY>5?(r.classList.replace("bg-transparent","bg-white"),f(!0),d(!0),s.forEach((function(e){return e.classList.replace("text-white","text-cool-black")}))):(r.classList.replace("bg-white","bg-transparent"),f(!1),d(!1),s.forEach((function(e){return e.classList.replace("text-cool-black","text-white")})))}),150);return document.addEventListener("scroll",p),{teardown:function(){return document.removeEventListener("scroll",p)}}};function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themeName:null},t=e.themeName,r=(0,l.default)(),n=(0,a.default)(),o=(0,c.default)(),s=(0,i.default)({clearPanels:function(){return[].concat(u(n),u(o)).forEach((function(e){return e.clear()}))}}),g=function(){return[s].concat(u(n),u(o),u(r)).forEach((function(e){return e.clear()}))},b=[p(t),f(g),d(g),s].concat(u(r),u(n),u(o)).map((function(e){return e.teardown}));return function(){return b.forEach((function(e){return e()}))}}})(),n.default})()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Meganav=t())}(this,(function(){return(()=>{var e={2498:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var n=r(9581);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const l=function(){var e=Array.from((0,n.n)("meganav-control")),t=Array.from((0,n.n)("meganav-panel")),r=getComputedStyle(document.documentElement).getPropertyValue("--bp-md"),l=function(t,n,l){if(window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: ".concat(r,")")).matches&&!e.some((function(e){return e===document.activeElement}))){var a,i=["invisible","visible"];(a=n.classList).replace.apply(a,function(e){if(Array.isArray(e))return o(e)}(c=l?i:i.reverse())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),t.setAttribute("aria-expanded",l)}var c};return e.map((function(r){var n=r.parentNode,o=document.querySelector("#".concat(r.getAttribute("aria-controls"))),a=function(r,n){return function(){e.forEach((function(e){return e!==r&&e.setAttribute("aria-expanded",!1)})),t.forEach((function(e){return e!==n&&e.classList.replace("visible","invisible")})),r.getAttribute("aria-expanded")?(r.setAttribute("aria-expanded",!0),n.classList.replace("invisible","visible")):(r.setAttribute("aria-expanded",!1),n.classList.replace("visible","invisible"))}}(r,o),i=function(e,t){return function(){return l(e,t,!0)}}(r,o),c=function(e,t){return function(){return l(e,t,!1)}}(r,o);return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",c),r.addEventListener("click",a),[{teardown:function(){n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",c),r.removeEventListener("click",a)},clear:function(){r.setAttribute("aria-expanded",!1),o.classList.replace("visible","invisible")}}]})).flat()}},1792:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var n=r(6265),o=r.n(n),l=r(9581);const a=function(e){var t=e.clearPanels,r=(0,l.A)("meganav-control-mobile-dropdown"),n=(0,l.A)("meganav-mobile-dropdown"),a=(0,l.A)("meganav-control-mobile-dropdown-menu"),i=(0,l.A)("meganav-control-mobile-dropdown-close"),c=(0,l.A)("meganav-mobile-search-input"),u=(0,l.A)("meganav-mobile-search-suggestions"),s=function(){"false"===r.getAttribute("aria-expanded")?(n.classList.replace("invisible","visible"),r.setAttribute("aria-expanded",!0),o().disablePageScroll()):(n.classList.replace("visible","invisible"),r.setAttribute("aria-expanded",!1),o().enablePageScroll(),t()),a.classList.toggle("hidden"),i.classList.toggle("hidden")};return r.addEventListener("click",s),c.addEventListener("focus",(function(){u.classList.add("max-h-96")})),c.addEventListener("blur",(function(e){e.relatedTarget!==u.querySelectorAll("a")[0]&&u.classList.remove("max-h-96")})),{teardown:function(){r.removeEventListener("click",s),o().enablePageScroll()},clear:function(){n.classList.replace("visible","invisible"),r.setAttribute("aria-expanded",!1),a.classList.remove("hidden"),i.classList.add("hidden"),o().enablePageScroll()}}}},7359:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var n=r(9581);const o=function(){var e=Array.from((0,n.n)("meganav-control-mobile-panel-close")),t=Array.from((0,n.n)("meganav-control-mobile-panel-open"));return e.map((function(e){var r=t.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),n=document.querySelector("#".concat(e.getAttribute("aria-controls"))),o=function(e,t,r){return function(){e.setAttribute("aria-expanded",!1),t.setAttribute("aria-expanded",!1),r.classList.replace("block","hidden"),r.style.height=null}}(e,r,n);return e.addEventListener("click",o),{teardown:function(){return e.removeEventListener("click",o)},clear:function(){return e.setAttribute("aria-expanded",!1)}}}))}},9552:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var n=r(9581);const o=function(){var e,t=Array.from((0,n.n)("meganav-control-mobile-panel-close")),r=Array.from((0,n.n)("meganav-control-mobile-panel-open")),o=(0,n.A)("meganav-mobile-dropdown"),l=(e=getComputedStyle(document.documentElement).getPropertyValue("--ui-meganav-height"),parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize));return r.map((function(e){var r=t.find((function(t){return t.getAttribute("aria-controls")===e.getAttribute("aria-controls")})),n=document.querySelector("#".concat(e.getAttribute("aria-controls"))),a=function(e,t,r){return function(){e.setAttribute("aria-expanded",!0),t.setAttribute("aria-expanded",!0),r.classList.replace("hidden","block"),r.style.height="".concat(window.innerHeight-l>r.offsetHeight?r.offsetHeight:window.innerHeight-l,"px")}}(e,r,n);return e.addEventListener("click",a),{teardown:function(){return e.removeEventListener("click",a)},clear:function(){n.classList.replace("block","hidden"),o.classList.remove("ui-meganav-mobile-dropdown-expand"),e.setAttribute("aria-expanded",!1),n.style.height=null}}}))}},9581:(e,t,r)=>{"use strict";r.d(t,{A:()=>n,n:()=>o});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelectorAll("[data-id=".concat(e,"]"))}},3096:(e,t,r)=>{var n="Expected a function",o=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,s="object"==typeof self&&self&&self.Object===Object&&self,d=u||s||Function("return this")(),f=Object.prototype.toString,p=Math.max,g=Math.min,b=function(){return d.Date.now()};function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=a.test(e);return r||i.test(e)?c(e.slice(2),r?2:8):l.test(e)?NaN:+e}e.exports=function(e,t,r){var o=!0,l=!0;if("function"!=typeof e)throw new TypeError(n);return v(r)&&(o="leading"in r?!!r.leading:o,l="trailing"in r?!!r.trailing:l),function(e,t,r){var o,l,a,i,c,u,s=0,d=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError(n);function y(t){var r=o,n=l;return o=l=void 0,s=t,i=e.apply(n,r)}function S(e){return s=e,c=setTimeout(A,t),d?y(e):i}function w(e){var r=e-u;return void 0===u||r>=t||r<0||f&&e-s>=a}function A(){var e=b();if(w(e))return k(e);c=setTimeout(A,function(e){var r=t-(e-u);return f?g(r,a-(e-s)):r}(e))}function k(e){return c=void 0,h&&o?y(e):(o=l=void 0,i)}function L(){var e=b(),r=w(e);if(o=arguments,l=this,u=e,r){if(void 0===c)return S(u);if(f)return c=setTimeout(A,t),y(u)}return void 0===c&&(c=setTimeout(A,t)),i}return t=m(t)||0,v(r)&&(d=!!r.leading,a=(f="maxWait"in r)?p(m(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),L.cancel=function(){void 0!==c&&clearTimeout(c),s=0,o=u=l=c=void 0},L.flush=function(){return void 0===c?i:k(b())},L}(e,t,{leading:o,maxWait:t,trailing:l})}},6265:function(e){var t;t=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var n=function(e){return Array.isArray(e)?e:[e]},o=function(e){return e instanceof Node},l=function(e,t){if(e&&t){e=function(e){return e instanceof NodeList}(e)?e:[e];for(var r=0;r<e.length&&!0!==t(e[r],r,e.length);r++);}},a=function(e){return console.error("[scroll-lock] ".concat(e))},i=function(e){if(Array.isArray(e))return e.join(", ")},c=function(e){var t=[];return l(e,(function(e){return t.push(e)})),t},u=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(r&&-1!==c(n.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===c(n.querySelectorAll(t)).indexOf(e););return e},s=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n=-1!==c(r.querySelectorAll(t)).indexOf(e);return n},d=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},f=function(e){if(e)return!!d(e)||e.scrollTop<=0},p=function(e){if(e){if(d(e))return!0;var t=e.scrollTop,r=e.scrollHeight;return t+e.offsetHeight>=r}},g=function(e){if(e)return!!d(e)||e.scrollLeft<=0},b=function(e){if(e){if(d(e))return!0;var t=e.scrollLeft,r=e.scrollWidth;return t+e.offsetWidth>=r}},v=function(e){return s(e,'textarea, [contenteditable="true"]')},m=function(e){return s(e,'input[type="range"]')};function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"disablePageScroll",(function(){return w})),r.d(t,"enablePageScroll",(function(){return A})),r.d(t,"getScrollState",(function(){return k})),r.d(t,"clearQueueScrollLocks",(function(){return L})),r.d(t,"getTargetScrollBarWidth",(function(){return x})),r.d(t,"getCurrentTargetScrollBarWidth",(function(){return E})),r.d(t,"getPageScrollBarWidth",(function(){return T})),r.d(t,"getCurrentPageScrollBarWidth",(function(){return j})),r.d(t,"addScrollableTarget",(function(){return O})),r.d(t,"removeScrollableTarget",(function(){return G})),r.d(t,"addScrollableSelector",(function(){return W})),r.d(t,"removeScrollableSelector",(function(){return F})),r.d(t,"addLockableTarget",(function(){return P})),r.d(t,"addLockableSelector",(function(){return Y})),r.d(t,"setFillGapMethod",(function(){return q})),r.d(t,"addFillGapTarget",(function(){return M})),r.d(t,"removeFillGapTarget",(function(){return C})),r.d(t,"addFillGapSelector",(function(){return N})),r.d(t,"removeFillGapSelector",(function(){return U})),r.d(t,"refillGaps",(function(){return B}));var y=["padding","margin","width","max-width","none"],S={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:y[0],startTouchY:0,startTouchX:0},w=function(e){S.queue<=0&&(S.scroll=!1,K(),$()),O(e),S.queue++},A=function(e){S.queue>0&&S.queue--,S.queue<=0&&(S.scroll=!0,R(),D()),G(e)},k=function(){return S.scroll},L=function(){S.queue=0},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r=e.style.overflowY;t?k()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var n=E(e);return e.style.overflowY=r,n}return 0},E=function(e){if(o(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var r=e.style.borderLeftWidth,n=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var l=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=r,e.style.borderRightWidth=n,l}return 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return x(document.body,e)},j=function(){return E(document.body)},O=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-scrollable",""):a('"'.concat(e,'" is not a Element.'))}))}))},G=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?e.removeAttribute("data-scroll-lock-scrollable"):a('"'.concat(e,'" is not a Element.'))}))}))},W=function(e){e&&n(e).map((function(e){S.scrollableSelectors.push(e)}))},F=function(e){e&&n(e).map((function(e){S.scrollableSelectors=S.scrollableSelectors.filter((function(t){return t!==e}))}))},P=function(e){e&&(n(e).map((function(e){l(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-lockable",""):a('"'.concat(e,'" is not a Element.'))}))})),k()||K())},Y=function(e){e&&(n(e).map((function(e){S.lockableSelectors.push(e)})),k()||K(),N(e))},q=function(e){if(e)if(-1!==y.indexOf(e))S.fillGapMethod=e,B();else{var t=y.join(", ");a('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},M=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),S.scroll||z(e)):a('"'.concat(e,'" is not a Element.'))}))}))},C=function(e){e&&n(e).map((function(e){l(e,(function(e){o(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),S.scroll||J(e)):a('"'.concat(e,'" is not a Element.'))}))}))},N=function(e){e&&n(e).map((function(e){-1===S.fillGapSelectors.indexOf(e)&&(S.fillGapSelectors.push(e),S.scroll||Q(e))}))},U=function(e){e&&n(e).map((function(e){S.fillGapSelectors=S.fillGapSelectors.filter((function(t){return t!==e})),S.scroll||V(e)}))},B=function(){S.scroll||$()},K=function(){var e=i(S.lockableSelectors);_(e)},R=function(){var e=i(S.lockableSelectors);I(e)},_=function(e){var t=document.querySelectorAll(e);l(t,(function(e){H(e)}))},I=function(e){var t=document.querySelectorAll(e);l(t,(function(e){X(e)}))},H=function(e){if(o(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},X=function(e){o(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},$=function(){S.fillGapSelectors.map((function(e){Q(e)}))},D=function(){S.fillGapSelectors.map((function(e){V(e)}))},Q=function(e){var t=document.querySelectorAll(e),r=-1!==S.lockableSelectors.indexOf(e);l(t,(function(e){z(e,r)}))},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r;if(""===e.getAttribute("data-scroll-lock-lockable")||t)r=x(e,!0);else{var n=u(e,i(S.lockableSelectors));r=x(n,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&J(e);var l=window.getComputedStyle(e);if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",S.fillGapMethod),"margin"===S.fillGapMethod){var a=parseFloat(l.marginRight);e.style.marginRight="".concat(a+r,"px")}else if("width"===S.fillGapMethod)e.style.width="calc(100% - ".concat(r,"px)");else if("max-width"===S.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(r,"px)");else if("padding"===S.fillGapMethod){var c=parseFloat(l.paddingRight);e.style.paddingRight="".concat(c+r,"px")}}},V=function(e){var t=document.querySelectorAll(e);l(t,(function(e){J(e)}))},J=function(e){if(o(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(e){B()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(e){S.scroll||(S.startTouchY=e.touches[0].clientY,S.startTouchX=e.touches[0].clientX)})),document.addEventListener("touchmove",(function(e){if(!S.scroll){var t=S.startTouchY,r=S.startTouchX,n=e.touches[0].clientY,o=e.touches[0].clientX;if(e.touches.length<2){var l=i(S.scrollableSelectors),a={up:t<n,down:t>n,left:r<o,right:r>o},c={up:t+3<n,down:t-3>n,left:r+3<o,right:r-3>o};!function t(r){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r){var o=u(r,l,!1);if(m(r))return!1;if(n||v(r)&&u(r,l)||s(r,l)){var i=!1;g(r)&&b(r)?(a.up&&f(r)||a.down&&p(r))&&(i=!0):f(r)&&p(r)?(a.left&&g(r)||a.right&&b(r))&&(i=!0):(c.up&&f(r)||c.down&&p(r)||c.left&&g(r)||c.right&&b(r))&&(i=!0),i&&(o?t(o,!0):e.cancelable&&e.preventDefault())}else t(o)}else e.cancelable&&e.preventDefault()}(e.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(e){S.scroll||(S.startTouchY=0,S.startTouchX=0)})));var Z={hide:function(e){a('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),w(e)},show:function(e){a('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),A(e)},toggle:function(e){a('"toggle" is deprecated! Do not use it.'),k()?w():A(e)},getState:function(){return a('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),k()},getWidth:function(){return a('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),T()},getCurrentWidth:function(){return a('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),j()},setScrollableTargets:function(e){a('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),O(e)},setFillGapSelectors:function(e){a('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),N(e)},setFillGapTargets:function(e){a('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),M(e)},clearQueue:function(){a('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),L()}},ee=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){h(e,t,r[t])}))}return e}({disablePageScroll:w,enablePageScroll:A,getScrollState:k,clearQueueScrollLocks:L,getTargetScrollBarWidth:x,getCurrentTargetScrollBarWidth:E,getPageScrollBarWidth:T,getCurrentPageScrollBarWidth:j,addScrollableSelector:W,removeScrollableSelector:F,addScrollableTarget:O,removeScrollableTarget:G,addLockableSelector:Y,addLockableTarget:P,addFillGapSelector:N,removeFillGapSelector:U,addFillGapTarget:M,removeFillGapTarget:C,setFillGapMethod:q,refillGaps:B,_state:S},Z);t.default=ee}]).default},e.exports=t()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var l=t[n]={exports:{}};return e[n].call(l.exports,l,l.exports,r),l.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{"use strict";r.d(n,{default:()=>g});var e=r(3096),t=r.n(e),o=r(9581),l=r(2498),a=r(1792),i=r(9552),c=r(7359);function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e){return window.onblur=function(){return e()},{teardown:function(){return window.onblur=null}}},f=function(e){var t=(0,o.A)("meganav"),r=function(r){t.contains(r.target)||e()};return document.addEventListener("click",r),{teardown:function(){return document.removeEventListener("click",r)}}},p=function(e){if("transparentToWhite"!==e)return{teardown:function(){}};var r=(0,o.A)("meganav"),n=(0,o.n)("meganav-link"),l=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),i=(0,o.n)("meganav-control"),c=(0,o.A)("meganav-sign-up-btn"),s=[].concat(u(Array.from(i)),u(Array.from(n)),[(0,o.A)("meganav-logo")]),d=function(e){var t,r,n,o,i=["ui-icon-white","ui-icon-cool-black"],c=[].concat(i).reverse();e?(null==l||(t=l.classList).replace.apply(t,i),null==a||(r=a.classList).replace.apply(r,i)):(null==l||(n=l.classList).replace.apply(n,u(c)),null==a||(o=a.classList).replace.apply(o,u(c)))},f=function(e){e?(null==c||c.classList.replace("bg-white","bg-cool-black"),null==c||c.classList.replace("text-cool-black","text-white")):(null==c||c.classList.replace("bg-cool-black","bg-white"),null==c||c.classList.replace("text-white","text-cool-black"))},p=t()((function(){window.scrollY>5?(r.classList.replace("bg-transparent","bg-white"),f(!0),d(!0),s.forEach((function(e){return e.classList.replace("text-white","text-cool-black")}))):(r.classList.replace("bg-white","bg-transparent"),f(!1),d(!1),s.forEach((function(e){return e.classList.replace("text-cool-black","text-white")})))}),150);return document.addEventListener("scroll",p),{teardown:function(){return document.removeEventListener("scroll",p)}}};function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themeName:null},t=e.themeName,r=(0,l.default)(),n=(0,i.default)(),o=(0,c.default)(),s=(0,a.default)({clearPanels:function(){return[].concat(u(n),u(o)).forEach((function(e){return e.clear()}))}}),g=function(){return[s].concat(u(n),u(o),u(r)).forEach((function(e){return e.clear()}))},b=[p(t),f(g),d(g),s].concat(u(r),u(n),u(o)).map((function(e){return e.teardown}));return function(){return b.forEach((function(e){return e()}))}}})(),n.default})()}));
@@ -2,20 +2,25 @@
2
2
  <%= notice %>
3
3
 
4
4
  <div class="ui-meganav ui-grid-px">
5
- <%= render(AblyUi::Core::Logo.new(data_id: "meganav-logo", href: logo_link)) %>
5
+ <div className="mr-24">
6
+ <%= render(AblyUi::Core::Logo.new(data_id: "meganav-logo", href: logo_link)) %>
7
+ </div>
6
8
  <%= render(AblyUi::Core::MeganavItemsDesktop.new(theme_name: @theme_name, url_base: url_base)) %>
7
9
 
8
10
  <% if @session_data[:signedIn] %>
9
11
  <%= render(AblyUi::Core::MeganavItemsSignedIn.new(session_data: @session_data, theme_name: @theme_name, url_base: url_base)) %>
10
12
  <% else %>
11
13
  <ul class="hidden md:flex items-center">
12
- <li>
14
+ <li class="ui-meganav-item">
13
15
  <%= link_to "Contact us", abs_url("/contact"), data: { id: "meganav-link" }, class: ["ui-meganav-link", theme(:text_color)] %>
14
16
  </li>
15
- <li>
16
- <%= link_to "Login", abs_url(login_link), data: { id: "meganav-link" }, class: ["ui-meganav-link", theme(:text_color)] %>
17
+ <li class="ui-meganav-item">
18
+ <%= link_to "Login", abs_url(login_link), data: { id: "meganav-link" }, class: ["ui-meganav-link", "mr-0", theme(:text_color)] %>
17
19
  </li>
18
- <li class="ml-16">
20
+ <li class="ui-meganav-item">
21
+ <%= render(AblyUi::Core::MeganavSearch.new(url_base: url_base)) %>
22
+ </li>
23
+ <li class="ui-meganav-item">
19
24
  <%= link_to "Sign up free", abs_url("/sign-up"), data: { id: "meganav-sign-up-btn" }, class: ["ui-btn", "p-btn-small", theme(:button_background_color), theme(:button_text_color)] %>
20
25
  </li>
21
26
  </ul>
@@ -1,6 +1,6 @@
1
1
  <%= button_tag(type: "button",
2
- class: ["ui-meganav-link", "h-64", "flex", "items-center", "group", theme(:text_color)],
2
+ class: ["ui-meganav-link", "h-64", "flex", "items-center", "group", theme(:text_color), additional_css],
3
3
  data: { id: "meganav-control" },
4
- aria: { expanded: false, controls: @aria_controls, label: "Show #{content}" }) do -%>
4
+ aria: { expanded: false, controls: aria_controls, label: "Show #{content}" }) do -%>
5
5
  <%= content -%><%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1.5rem", color: "text-cool-black", additional_css: "transform rotate-90 group-hover:text-gui-hover group-focus:text-gui-focus")) %>
6
6
  <% end %>
@@ -2,9 +2,11 @@ module AblyUi
2
2
  module Core
3
3
  class MeganavControl < ViewComponent::Base
4
4
  include AblyUi::Core::MeganavConfig
5
+ attr_reader :aria_controls, :additional_css
5
6
 
6
- def initialize(aria_controls:, theme_name:)
7
+ def initialize(aria_controls:, theme_name:, additional_css: '')
7
8
  @aria_controls = aria_controls
9
+ @additional_css = additional_css
8
10
  theme_setup(theme_name)
9
11
  end
10
12
  end
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControlMobileDropdown=t())}(this,(function(){return(()=>{var e={9581:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))}},6265:function(e){var t;t=function(){return function(e){var t={};function r(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,l){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(l,o,function(t){return e[t]}.bind(null,o));return l},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var l=function(e){return Array.isArray(e)?e:[e]},o=function(e){return e instanceof Node},n=function(e,t){if(e&&t){e=function(e){return e instanceof NodeList}(e)?e:[e];for(var r=0;r<e.length&&!0!==t(e[r],r,e.length);r++);}},c=function(e){return console.error("[scroll-lock] ".concat(e))},a=function(e){if(Array.isArray(e))return e.join(", ")},i=function(e){var t=[];return n(e,(function(e){return t.push(e)})),t},u=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(r&&-1!==i(l.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===i(l.querySelectorAll(t)).indexOf(e););return e},d=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,l=-1!==i(r.querySelectorAll(t)).indexOf(e);return l},s=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},f=function(e){if(e)return!!s(e)||e.scrollTop<=0},p=function(e){if(e){if(s(e))return!0;var t=e.scrollTop,r=e.scrollHeight;return t+e.offsetHeight>=r}},g=function(e){if(e)return!!s(e)||e.scrollLeft<=0},b=function(e){if(e){if(s(e))return!0;var t=e.scrollLeft,r=e.scrollWidth;return t+e.offsetWidth>=r}},v=function(e){return d(e,'textarea, [contenteditable="true"]')},h=function(e){return d(e,'input[type="range"]')};function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"disablePageScroll",(function(){return k})),r.d(t,"enablePageScroll",(function(){return w})),r.d(t,"getScrollState",(function(){return A})),r.d(t,"clearQueueScrollLocks",(function(){return x})),r.d(t,"getTargetScrollBarWidth",(function(){return L})),r.d(t,"getCurrentTargetScrollBarWidth",(function(){return G})),r.d(t,"getPageScrollBarWidth",(function(){return T})),r.d(t,"getCurrentPageScrollBarWidth",(function(){return P})),r.d(t,"addScrollableTarget",(function(){return W})),r.d(t,"removeScrollableTarget",(function(){return F})),r.d(t,"addScrollableSelector",(function(){return O})),r.d(t,"removeScrollableSelector",(function(){return E})),r.d(t,"addLockableTarget",(function(){return Y})),r.d(t,"addLockableSelector",(function(){return j})),r.d(t,"setFillGapMethod",(function(){return q})),r.d(t,"addFillGapTarget",(function(){return M})),r.d(t,"removeFillGapTarget",(function(){return U})),r.d(t,"addFillGapSelector",(function(){return C})),r.d(t,"removeFillGapSelector",(function(){return N})),r.d(t,"refillGaps",(function(){return B}));var y=["padding","margin","width","max-width","none"],S={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:y[0],startTouchY:0,startTouchX:0},k=function(e){S.queue<=0&&(S.scroll=!1,K(),H()),W(e),S.queue++},w=function(e){S.queue>0&&S.queue--,S.queue<=0&&(S.scroll=!0,R(),z()),F(e)},A=function(){return S.scroll},x=function(){S.queue=0},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r=e.style.overflowY;t?A()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var l=G(e);return e.style.overflowY=r,l}return 0},G=function(e){if(o(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var r=e.style.borderLeftWidth,l=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var n=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=r,e.style.borderRightWidth=l,n}return 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return L(document.body,e)},P=function(){return G(document.body)},W=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-scrollable",""):c('"'.concat(e,'" is not a Element.'))}))}))},F=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.removeAttribute("data-scroll-lock-scrollable"):c('"'.concat(e,'" is not a Element.'))}))}))},O=function(e){e&&l(e).map((function(e){S.scrollableSelectors.push(e)}))},E=function(e){e&&l(e).map((function(e){S.scrollableSelectors=S.scrollableSelectors.filter((function(t){return t!==e}))}))},Y=function(e){e&&(l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-lockable",""):c('"'.concat(e,'" is not a Element.'))}))})),A()||K())},j=function(e){e&&(l(e).map((function(e){S.lockableSelectors.push(e)})),A()||K(),C(e))},q=function(e){if(e)if(-1!==y.indexOf(e))S.fillGapMethod=e,B();else{var t=y.join(", ");c('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},M=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),S.scroll||J(e)):c('"'.concat(e,'" is not a Element.'))}))}))},U=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),S.scroll||Z(e)):c('"'.concat(e,'" is not a Element.'))}))}))},C=function(e){e&&l(e).map((function(e){-1===S.fillGapSelectors.indexOf(e)&&(S.fillGapSelectors.push(e),S.scroll||I(e))}))},N=function(e){e&&l(e).map((function(e){S.fillGapSelectors=S.fillGapSelectors.filter((function(t){return t!==e})),S.scroll||V(e)}))},B=function(){S.scroll||H()},K=function(){var e=a(S.lockableSelectors);_(e)},R=function(){var e=a(S.lockableSelectors);X(e)},_=function(e){var t=document.querySelectorAll(e);n(t,(function(e){D(e)}))},X=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Q(e)}))},D=function(e){if(o(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},Q=function(e){o(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},H=function(){S.fillGapSelectors.map((function(e){I(e)}))},z=function(){S.fillGapSelectors.map((function(e){V(e)}))},I=function(e){var t=document.querySelectorAll(e),r=-1!==S.lockableSelectors.indexOf(e);n(t,(function(e){J(e,r)}))},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r;if(""===e.getAttribute("data-scroll-lock-lockable")||t)r=L(e,!0);else{var l=u(e,a(S.lockableSelectors));r=L(l,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&Z(e);var n=window.getComputedStyle(e);if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",S.fillGapMethod),"margin"===S.fillGapMethod){var c=parseFloat(n.marginRight);e.style.marginRight="".concat(c+r,"px")}else if("width"===S.fillGapMethod)e.style.width="calc(100% - ".concat(r,"px)");else if("max-width"===S.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(r,"px)");else if("padding"===S.fillGapMethod){var i=parseFloat(n.paddingRight);e.style.paddingRight="".concat(i+r,"px")}}},V=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Z(e)}))},Z=function(e){if(o(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(e){B()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(e){S.scroll||(S.startTouchY=e.touches[0].clientY,S.startTouchX=e.touches[0].clientX)})),document.addEventListener("touchmove",(function(e){if(!S.scroll){var t=S.startTouchY,r=S.startTouchX,l=e.touches[0].clientY,o=e.touches[0].clientX;if(e.touches.length<2){var n=a(S.scrollableSelectors),c={up:t<l,down:t>l,left:r<o,right:r>o},i={up:t+3<l,down:t-3>l,left:r+3<o,right:r-3>o};!function t(r){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r){var o=u(r,n,!1);if(h(r))return!1;if(l||v(r)&&u(r,n)||d(r,n)){var a=!1;g(r)&&b(r)?(c.up&&f(r)||c.down&&p(r))&&(a=!0):f(r)&&p(r)?(c.left&&g(r)||c.right&&b(r))&&(a=!0):(i.up&&f(r)||i.down&&p(r)||i.left&&g(r)||i.right&&b(r))&&(a=!0),a&&(o?t(o,!0):e.cancelable&&e.preventDefault())}else t(o)}else e.cancelable&&e.preventDefault()}(e.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(e){S.scroll||(S.startTouchY=0,S.startTouchX=0)})));var $={hide:function(e){c('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),k(e)},show:function(e){c('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),w(e)},toggle:function(e){c('"toggle" is deprecated! Do not use it.'),A()?k():w(e)},getState:function(){return c('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),A()},getWidth:function(){return c('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),T()},getCurrentWidth:function(){return c('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),P()},setScrollableTargets:function(e){c('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),W(e)},setFillGapSelectors:function(e){c('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),C(e)},setFillGapTargets:function(e){c('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),M(e)},clearQueue:function(){c('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),x()}},ee=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},l=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),l.forEach((function(t){m(e,t,r[t])}))}return e}({disablePageScroll:k,enablePageScroll:w,getScrollState:A,clearQueueScrollLocks:x,getTargetScrollBarWidth:L,getCurrentTargetScrollBarWidth:G,getPageScrollBarWidth:T,getCurrentPageScrollBarWidth:P,addScrollableSelector:O,removeScrollableSelector:E,addScrollableTarget:W,removeScrollableTarget:F,addLockableSelector:j,addLockableTarget:Y,addFillGapSelector:C,removeFillGapSelector:N,addFillGapTarget:M,removeFillGapTarget:U,setFillGapMethod:q,refillGaps:B,_state:S},$);t.default=ee}]).default},e.exports=t()}},t={};function r(l){var o=t[l];if(void 0!==o)return o.exports;var n=t[l]={exports:{}};return e[l].call(n.exports,n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};return(()=>{"use strict";r.d(l,{default:()=>n});var e=r(6265),t=r.n(e),o=r(9581);const n=function(e){var r=e.clearPanels,l=(0,o.A)("meganav-control-mobile-dropdown"),n=(0,o.A)("meganav-mobile-dropdown"),c=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),i=function(){"false"===l.getAttribute("aria-expanded")?(n.classList.replace("invisible","visible"),l.setAttribute("aria-expanded",!0),t().disablePageScroll()):(n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),t().enablePageScroll(),r()),c.classList.toggle("hidden"),a.classList.toggle("hidden")};return l.addEventListener("click",i),{teardown:function(){l.removeEventListener("click",i),t().enablePageScroll()},clear:function(){n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),c.classList.remove("hidden"),a.classList.add("hidden"),t().enablePageScroll()}}}})(),l.default})()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavControlMobileDropdown=t())}(this,(function(){return(()=>{var e={9581:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector("[data-id=".concat(e,"]"))}},6265:function(e){var t;t=function(){return function(e){var t={};function r(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,l){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(l,o,function(t){return e[t]}.bind(null,o));return l},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var l=function(e){return Array.isArray(e)?e:[e]},o=function(e){return e instanceof Node},n=function(e,t){if(e&&t){e=function(e){return e instanceof NodeList}(e)?e:[e];for(var r=0;r<e.length&&!0!==t(e[r],r,e.length);r++);}},c=function(e){return console.error("[scroll-lock] ".concat(e))},a=function(e){if(Array.isArray(e))return e.join(", ")},i=function(e){var t=[];return n(e,(function(e){return t.push(e)})),t},u=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;if(r&&-1!==i(l.querySelectorAll(t)).indexOf(e))return e;for(;(e=e.parentElement)&&-1===i(l.querySelectorAll(t)).indexOf(e););return e},d=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,l=-1!==i(r.querySelectorAll(t)).indexOf(e);return l},s=function(e){if(e)return"hidden"===getComputedStyle(e).overflow},f=function(e){if(e)return!!s(e)||e.scrollTop<=0},p=function(e){if(e){if(s(e))return!0;var t=e.scrollTop,r=e.scrollHeight;return t+e.offsetHeight>=r}},g=function(e){if(e)return!!s(e)||e.scrollLeft<=0},b=function(e){if(e){if(s(e))return!0;var t=e.scrollLeft,r=e.scrollWidth;return t+e.offsetWidth>=r}},v=function(e){return d(e,'textarea, [contenteditable="true"]')},h=function(e){return d(e,'input[type="range"]')};function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"disablePageScroll",(function(){return k})),r.d(t,"enablePageScroll",(function(){return w})),r.d(t,"getScrollState",(function(){return A})),r.d(t,"clearQueueScrollLocks",(function(){return x})),r.d(t,"getTargetScrollBarWidth",(function(){return L})),r.d(t,"getCurrentTargetScrollBarWidth",(function(){return T})),r.d(t,"getPageScrollBarWidth",(function(){return G})),r.d(t,"getCurrentPageScrollBarWidth",(function(){return P})),r.d(t,"addScrollableTarget",(function(){return W})),r.d(t,"removeScrollableTarget",(function(){return F})),r.d(t,"addScrollableSelector",(function(){return E})),r.d(t,"removeScrollableSelector",(function(){return O})),r.d(t,"addLockableTarget",(function(){return Y})),r.d(t,"addLockableSelector",(function(){return j})),r.d(t,"setFillGapMethod",(function(){return q})),r.d(t,"addFillGapTarget",(function(){return M})),r.d(t,"removeFillGapTarget",(function(){return U})),r.d(t,"addFillGapSelector",(function(){return C})),r.d(t,"removeFillGapSelector",(function(){return N})),r.d(t,"refillGaps",(function(){return B}));var y=["padding","margin","width","max-width","none"],S={scroll:!0,queue:0,scrollableSelectors:["[data-scroll-lock-scrollable]"],lockableSelectors:["body","[data-scroll-lock-lockable]"],fillGapSelectors:["body","[data-scroll-lock-fill-gap]","[data-scroll-lock-lockable]"],fillGapMethod:y[0],startTouchY:0,startTouchX:0},k=function(e){S.queue<=0&&(S.scroll=!1,K(),H()),W(e),S.queue++},w=function(e){S.queue>0&&S.queue--,S.queue<=0&&(S.scroll=!0,R(),z()),F(e)},A=function(){return S.scroll},x=function(){S.queue=0},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r=e.style.overflowY;t?A()||(e.style.overflowY=e.getAttribute("data-scroll-lock-saved-overflow-y-property")):e.style.overflowY="scroll";var l=T(e);return e.style.overflowY=r,l}return 0},T=function(e){if(o(e)){if(e===document.body){var t=document.documentElement.clientWidth;return window.innerWidth-t}var r=e.style.borderLeftWidth,l=e.style.borderRightWidth;e.style.borderLeftWidth="0px",e.style.borderRightWidth="0px";var n=e.offsetWidth-e.clientWidth;return e.style.borderLeftWidth=r,e.style.borderRightWidth=l,n}return 0},G=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return L(document.body,e)},P=function(){return T(document.body)},W=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-scrollable",""):c('"'.concat(e,'" is not a Element.'))}))}))},F=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?e.removeAttribute("data-scroll-lock-scrollable"):c('"'.concat(e,'" is not a Element.'))}))}))},E=function(e){e&&l(e).map((function(e){S.scrollableSelectors.push(e)}))},O=function(e){e&&l(e).map((function(e){S.scrollableSelectors=S.scrollableSelectors.filter((function(t){return t!==e}))}))},Y=function(e){e&&(l(e).map((function(e){n(e,(function(e){o(e)?e.setAttribute("data-scroll-lock-lockable",""):c('"'.concat(e,'" is not a Element.'))}))})),A()||K())},j=function(e){e&&(l(e).map((function(e){S.lockableSelectors.push(e)})),A()||K(),C(e))},q=function(e){if(e)if(-1!==y.indexOf(e))S.fillGapMethod=e,B();else{var t=y.join(", ");c('"'.concat(e,'" method is not available!\nAvailable fill gap methods: ').concat(t,"."))}},M=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.setAttribute("data-scroll-lock-fill-gap",""),S.scroll||J(e)):c('"'.concat(e,'" is not a Element.'))}))}))},U=function(e){e&&l(e).map((function(e){n(e,(function(e){o(e)?(e.removeAttribute("data-scroll-lock-fill-gap"),S.scroll||Z(e)):c('"'.concat(e,'" is not a Element.'))}))}))},C=function(e){e&&l(e).map((function(e){-1===S.fillGapSelectors.indexOf(e)&&(S.fillGapSelectors.push(e),S.scroll||I(e))}))},N=function(e){e&&l(e).map((function(e){S.fillGapSelectors=S.fillGapSelectors.filter((function(t){return t!==e})),S.scroll||V(e)}))},B=function(){S.scroll||H()},K=function(){var e=a(S.lockableSelectors);_(e)},R=function(){var e=a(S.lockableSelectors);X(e)},_=function(e){var t=document.querySelectorAll(e);n(t,(function(e){D(e)}))},X=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Q(e)}))},D=function(e){if(o(e)&&"true"!==e.getAttribute("data-scroll-lock-locked")){var t=window.getComputedStyle(e);e.setAttribute("data-scroll-lock-saved-overflow-y-property",t.overflowY),e.setAttribute("data-scroll-lock-saved-inline-overflow-property",e.style.overflow),e.setAttribute("data-scroll-lock-saved-inline-overflow-y-property",e.style.overflowY),e.style.overflow="hidden",e.setAttribute("data-scroll-lock-locked","true")}},Q=function(e){o(e)&&"true"===e.getAttribute("data-scroll-lock-locked")&&(e.style.overflow=e.getAttribute("data-scroll-lock-saved-inline-overflow-property"),e.style.overflowY=e.getAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-saved-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-property"),e.removeAttribute("data-scroll-lock-saved-inline-overflow-y-property"),e.removeAttribute("data-scroll-lock-locked"))},H=function(){S.fillGapSelectors.map((function(e){I(e)}))},z=function(){S.fillGapSelectors.map((function(e){V(e)}))},I=function(e){var t=document.querySelectorAll(e),r=-1!==S.lockableSelectors.indexOf(e);n(t,(function(e){J(e,r)}))},J=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(o(e)){var r;if(""===e.getAttribute("data-scroll-lock-lockable")||t)r=L(e,!0);else{var l=u(e,a(S.lockableSelectors));r=L(l,!0)}"true"===e.getAttribute("data-scroll-lock-filled-gap")&&Z(e);var n=window.getComputedStyle(e);if(e.setAttribute("data-scroll-lock-filled-gap","true"),e.setAttribute("data-scroll-lock-current-fill-gap-method",S.fillGapMethod),"margin"===S.fillGapMethod){var c=parseFloat(n.marginRight);e.style.marginRight="".concat(c+r,"px")}else if("width"===S.fillGapMethod)e.style.width="calc(100% - ".concat(r,"px)");else if("max-width"===S.fillGapMethod)e.style.maxWidth="calc(100% - ".concat(r,"px)");else if("padding"===S.fillGapMethod){var i=parseFloat(n.paddingRight);e.style.paddingRight="".concat(i+r,"px")}}},V=function(e){var t=document.querySelectorAll(e);n(t,(function(e){Z(e)}))},Z=function(e){if(o(e)&&"true"===e.getAttribute("data-scroll-lock-filled-gap")){var t=e.getAttribute("data-scroll-lock-current-fill-gap-method");e.removeAttribute("data-scroll-lock-filled-gap"),e.removeAttribute("data-scroll-lock-current-fill-gap-method"),"margin"===t?e.style.marginRight="":"width"===t?e.style.width="":"max-width"===t?e.style.maxWidth="":"padding"===t&&(e.style.paddingRight="")}};"undefined"!=typeof window&&window.addEventListener("resize",(function(e){B()})),"undefined"!=typeof document&&(document.addEventListener("touchstart",(function(e){S.scroll||(S.startTouchY=e.touches[0].clientY,S.startTouchX=e.touches[0].clientX)})),document.addEventListener("touchmove",(function(e){if(!S.scroll){var t=S.startTouchY,r=S.startTouchX,l=e.touches[0].clientY,o=e.touches[0].clientX;if(e.touches.length<2){var n=a(S.scrollableSelectors),c={up:t<l,down:t>l,left:r<o,right:r>o},i={up:t+3<l,down:t-3>l,left:r+3<o,right:r-3>o};!function t(r){var l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(r){var o=u(r,n,!1);if(h(r))return!1;if(l||v(r)&&u(r,n)||d(r,n)){var a=!1;g(r)&&b(r)?(c.up&&f(r)||c.down&&p(r))&&(a=!0):f(r)&&p(r)?(c.left&&g(r)||c.right&&b(r))&&(a=!0):(i.up&&f(r)||i.down&&p(r)||i.left&&g(r)||i.right&&b(r))&&(a=!0),a&&(o?t(o,!0):e.cancelable&&e.preventDefault())}else t(o)}else e.cancelable&&e.preventDefault()}(e.target)}}}),{passive:!1}),document.addEventListener("touchend",(function(e){S.scroll||(S.startTouchY=0,S.startTouchX=0)})));var $={hide:function(e){c('"hide" is deprecated! Use "disablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#disablepagescrollscrollabletarget'),k(e)},show:function(e){c('"show" is deprecated! Use "enablePageScroll" instead. \n https://github.com/FL3NKEY/scroll-lock#enablepagescrollscrollabletarget'),w(e)},toggle:function(e){c('"toggle" is deprecated! Do not use it.'),A()?k():w(e)},getState:function(){return c('"getState" is deprecated! Use "getScrollState" instead. \n https://github.com/FL3NKEY/scroll-lock#getscrollstate'),A()},getWidth:function(){return c('"getWidth" is deprecated! Use "getPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getpagescrollbarwidth'),G()},getCurrentWidth:function(){return c('"getCurrentWidth" is deprecated! Use "getCurrentPageScrollBarWidth" instead. \n https://github.com/FL3NKEY/scroll-lock#getcurrentpagescrollbarwidth'),P()},setScrollableTargets:function(e){c('"setScrollableTargets" is deprecated! Use "addScrollableTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addscrollabletargetscrollabletarget'),W(e)},setFillGapSelectors:function(e){c('"setFillGapSelectors" is deprecated! Use "addFillGapSelector" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgapselectorfillgapselector'),C(e)},setFillGapTargets:function(e){c('"setFillGapTargets" is deprecated! Use "addFillGapTarget" instead. \n https://github.com/FL3NKEY/scroll-lock#addfillgaptargetfillgaptarget'),M(e)},clearQueue:function(){c('"clearQueue" is deprecated! Use "clearQueueScrollLocks" instead. \n https://github.com/FL3NKEY/scroll-lock#clearqueuescrolllocks'),x()}},ee=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},l=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),l.forEach((function(t){m(e,t,r[t])}))}return e}({disablePageScroll:k,enablePageScroll:w,getScrollState:A,clearQueueScrollLocks:x,getTargetScrollBarWidth:L,getCurrentTargetScrollBarWidth:T,getPageScrollBarWidth:G,getCurrentPageScrollBarWidth:P,addScrollableSelector:E,removeScrollableSelector:O,addScrollableTarget:W,removeScrollableTarget:F,addLockableSelector:j,addLockableTarget:Y,addFillGapSelector:C,removeFillGapSelector:N,addFillGapTarget:M,removeFillGapTarget:U,setFillGapMethod:q,refillGaps:B,_state:S},$);t.default=ee}]).default},e.exports=t()}},t={};function r(l){var o=t[l];if(void 0!==o)return o.exports;var n=t[l]={exports:{}};return e[l].call(n.exports,n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};return(()=>{"use strict";r.d(l,{default:()=>n});var e=r(6265),t=r.n(e),o=r(9581);const n=function(e){var r=e.clearPanels,l=(0,o.A)("meganav-control-mobile-dropdown"),n=(0,o.A)("meganav-mobile-dropdown"),c=(0,o.A)("meganav-control-mobile-dropdown-menu"),a=(0,o.A)("meganav-control-mobile-dropdown-close"),i=(0,o.A)("meganav-mobile-search-input"),u=(0,o.A)("meganav-mobile-search-suggestions"),d=function(){"false"===l.getAttribute("aria-expanded")?(n.classList.replace("invisible","visible"),l.setAttribute("aria-expanded",!0),t().disablePageScroll()):(n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),t().enablePageScroll(),r()),c.classList.toggle("hidden"),a.classList.toggle("hidden")};return l.addEventListener("click",d),i.addEventListener("focus",(function(){u.classList.add("max-h-96")})),i.addEventListener("blur",(function(e){e.relatedTarget!==u.querySelectorAll("a")[0]&&u.classList.remove("max-h-96")})),{teardown:function(){l.removeEventListener("click",d),t().enablePageScroll()},clear:function(){n.classList.replace("visible","invisible"),l.setAttribute("aria-expanded",!1),c.classList.remove("hidden"),a.classList.add("hidden"),t().enablePageScroll()}}}})(),l.default})()}));
@@ -11,7 +11,18 @@
11
11
  <%= render(AblyUi::Core::MeganavControlMobileDropdown.new(theme_name: @theme_name)) %>
12
12
 
13
13
  <div class="ui-meganav-mobile-dropdown invisible" id="meganav-mobile-dropdown" data-id="meganav-mobile-dropdown">
14
- <div class="py-16 ui-grid-px bg-white">
14
+ <div class="pt-24 pb-16 ui-grid-px bg-white">
15
+ <%= tag.form class: "mb-16", action: abs_url("/search"), method: "get" do %>
16
+ <div class="relative w-full">
17
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-search", size: "1.5rem", color: "text-cool-black", additional_css: "absolute top-12 left-16")) %>
18
+ <input type="search" name="q" class="ui-input pl-48 h-48" placeholder="Search" data-id="meganav-mobile-search-input" />
19
+ </div>
20
+ <% end %>
21
+
22
+ <div class="max-h-0 overflow-hidden transition-all" data-id="meganav-mobile-search-suggestions">
23
+ <%= render(AblyUi::Core::MeganavSearchSuggestions.new(url_base: url_base, display_support_link: false)) %>
24
+ </div>
25
+
15
26
  <ul class="mb-16">
16
27
  <% panels.each do |panel| %>
17
28
  <li class="ui-meganav-mobile-item">
@@ -1,6 +1,6 @@
1
1
  <ul class="hidden md:flex items-center">
2
2
  <li class="ui-meganav-item relative">
3
- <%= render(AblyUi::Core::MeganavControl.new(aria_controls: "account-panel", theme_name: @theme_name)) do %>
3
+ <%= render(AblyUi::Core::MeganavControl.new(aria_controls: "account-panel", theme_name: @theme_name, additional_css: "mr-0")) do %>
4
4
  <%= account_name %>
5
5
  <% end %>
6
6
 
@@ -41,6 +41,10 @@
41
41
  </div>
42
42
  </li>
43
43
 
44
+ <li>
45
+ <%= render(AblyUi::Core::MeganavSearch.new(url_base: url_base)) %>
46
+ <li>
47
+
44
48
  <% if account? %>
45
49
  <li class="ml-16">
46
50
  <%= link_to "Dashboard", @session_data[:account][:links][:dashboard][:href], class: "ui-btn-secondary p-btn-small" %>
@@ -0,0 +1 @@
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavSearch=o())}(this,(function(){return{}.default}));
@@ -0,0 +1,14 @@
1
+ <button
2
+ type="button"
3
+ data-id="meganav-control"
4
+ class="h-64 w-24 px-24 pr-48 py-20"
5
+ aria-expanded="false"
6
+ aria-controls="panel-search"
7
+ aria-label="Show Search Panel"
8
+ >
9
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-search", size: "1.5rem", color: "text-cool-black")) %>
10
+ </button>
11
+
12
+ <div class="ui-meganav-panel invisible" id="panel-search" data-id="meganav-panel">
13
+ <%= render(AblyUi::Core::MeganavSearchPanel.new(url_base: url_base)) %>
14
+ </div>
@@ -0,0 +1,13 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavSearch < ViewComponent::Base
4
+ include Util
5
+
6
+ attr_reader :url_base
7
+
8
+ def initialize(url_base:)
9
+ @url_base = url_base
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1 @@
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavSearchPanel=o())}(this,(function(){return{}.default}));
@@ -0,0 +1,20 @@
1
+ <section class="ui-meganav-content grid-cols-12">
2
+ <div class="col-span-8">
3
+ <div class="mb-32">
4
+ <form class="flex items-start" action={absUrl("/search")} method="get">
5
+ <div class="relative w-full">
6
+ <%= render(AblyUi::Core::Icon.new(name: "icon-gui-search", size: "1.5rem", color: "text-cool-black", additional_css:"absolute top-12 left-16")) %>
7
+ <input type="search" name="q" class="ui-input pl-48 h-48" placeholder="Search" />
8
+ </div>
9
+
10
+ <button type="submit" class="ui-btn-secondary ml-8 sm:ml-16 md:ml-24 xl:ml-32">
11
+ Search
12
+ </button>
13
+ </form>
14
+ </div>
15
+ </div>
16
+
17
+ <div class="col-span-12">
18
+ <%= render(AblyUi::Core::MeganavSearchSuggestions.new(url_base: url_base)) %>
19
+ </div>
20
+ </section>
@@ -0,0 +1,13 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavSearchPanel < ViewComponent::Base
4
+ include Util
5
+
6
+ attr_reader :url_base
7
+
8
+ def initialize(url_base:)
9
+ @url_base = url_base
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1 @@
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.MeganavSearchSuggestions=o())}(this,(function(){return{}.default}));
@@ -0,0 +1,22 @@
1
+ <p class="ui-text-overline2 text-cool-black py-12">Popular pages</p>
2
+
3
+ <div class="flex justify-between items-center overflow-x-scroll">
4
+ <ul class="flex">
5
+ <li class="py-12 pr-8 flex-shrink-0">
6
+ <%= link_to 'How does Ably work?', abs_url("/docs/how-ably-works"), class: "ui-text-p2 ui-link" %>
7
+ </li>
8
+ <li class="py-12 px-8 flex-shrink-0">
9
+ <%= link_to 'Quickstart guide', abs_url("/docs/quick-start-guide"), class: "ui-text-p2 ui-link" %>
10
+ </li>
11
+ <li class="py-12 px-8 flex-shrink-0">
12
+ <%= link_to 'Publish/Subscribe Messaging', abs_url("/docs/core-features/pubsub"), class: "ui-text-p2 ui-link" %>
13
+ </li>
14
+ <li class="py-12 pl-8 flex-shrink-0">
15
+ <%= link_to 'Platform', abs_url("/docs/how-ably-works"), class: "ui-text-p2 ui-link" %>
16
+ </li>
17
+ </ul>
18
+
19
+ <% if display_support_link? %>
20
+ <%= render(AblyUi::Core::FeaturedLink.new(url: abs_url("/support"), text_size: "text-p2")) do %>Support<% end %>
21
+ <% end %>
22
+ </div>
@@ -0,0 +1,18 @@
1
+ module AblyUi
2
+ module Core
3
+ class MeganavSearchSuggestions < ViewComponent::Base
4
+ include Util
5
+
6
+ attr_reader :url_base
7
+
8
+ def initialize(url_base:, display_support_link: true)
9
+ @url_base = url_base
10
+ @display_support_link = display_support_link
11
+ end
12
+
13
+ def display_support_link?
14
+ @display_support_link
15
+ end
16
+ end
17
+ end
18
+ end
@@ -117,7 +117,9 @@
117
117
 
118
118
  --spacing-0: 0px;
119
119
  --spacing-1: 1px;
120
+ --spacing-2: 0.125rem;
120
121
  --spacing-4: 0.25rem;
122
+ --spacing-6: 0.375rem;
121
123
  --spacing-8: 0.5rem;
122
124
  --spacing-12: 0.75rem;
123
125
  --spacing-14: 0.875rem;
@@ -576,21 +578,6 @@
576
578
  stroke: var(--color-dark-grey);
577
579
  }
578
580
 
579
- /* Extend how tailwind does group hover for icons */
580
- .group {
581
- &:hover {
582
- .group-hover\:icon-gui-hover {
583
- stroke: var(--color-gui-hover);
584
- }
585
- }
586
-
587
- &:focus {
588
- .group-focus\:icon-gui-focus {
589
- stroke: var(--color-gui-focus);
590
- }
591
- }
592
- }
593
-
594
581
  .ui-version-tag {
595
582
  @apply inline-block absolute align-top uppercase font-bold whitespace-nowrap;
596
583
 
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.React=e.AblyUi.React||{},e.AblyUi.React.ConnectStateWrapper=t())}(this,(function(){return{}.default}));
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define([,],t):"object"==typeof exports?exports.AblyUi=t(require("react"),require("react-dom")):(e.AblyUi=e.AblyUi||{},e.AblyUi.React=t(e[void 0],e[void 0]))}(this,(function(e,t){return(()=>{"use strict";var r={281:t=>{t.exports=e},645:e=>{e.exports=t}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{a.r(n),a.d(n,{reactRenderer:()=>i});var e=a(281),t=a.n(e),r=a(645),o=a.n(r);function i(e){var r=document.querySelectorAll("[data-react]");Array.from(r).forEach((function(r){var a=r.getAttribute("data-react"),n=e[a];if(!n)throw new Error('Found a data-react attribute with "'.concat(a,'" but no matching component.'));var i=r.getAttribute("data-react-props"),c=i&&JSON.parse(i||{});o().render(t().createElement(n,c),r),r.removeAttribute("data-react"),r.removeAttribute("data-react-props")}))}})(),n})()}));
@@ -1,3 +1,3 @@
1
1
  module AblyUi
2
- VERSION = '7.9.3.dev.99c382d'
2
+ VERSION = '7.10.0.dev.45e131a'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ably-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.9.3.dev.99c382d
4
+ version: 7.10.0.dev.45e131a
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Piatek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-07-06 00:00:00.000000000 Z
13
+ date: 2022-07-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: view_component
@@ -179,6 +179,15 @@ files:
179
179
  - lib/ably_ui/core/meganav_items_signed_in/component.js
180
180
  - lib/ably_ui/core/meganav_items_signed_in/meganav_items_signed_in.html.erb
181
181
  - lib/ably_ui/core/meganav_items_signed_in/meganav_items_signed_in.rb
182
+ - lib/ably_ui/core/meganav_search/component.js
183
+ - lib/ably_ui/core/meganav_search/meganav_search.html.erb
184
+ - lib/ably_ui/core/meganav_search/meganav_search.rb
185
+ - lib/ably_ui/core/meganav_search_panel/component.js
186
+ - lib/ably_ui/core/meganav_search_panel/meganav_search_panel.html.erb
187
+ - lib/ably_ui/core/meganav_search_panel/meganav_search_panel.rb
188
+ - lib/ably_ui/core/meganav_search_suggestions/component.js
189
+ - lib/ably_ui/core/meganav_search_suggestions/meganav_search_suggestions.html.erb
190
+ - lib/ably_ui/core/meganav_search_suggestions/meganav_search_suggestions.rb
182
191
  - lib/ably_ui/core/notice/component.css
183
192
  - lib/ably_ui/core/notice/component.js
184
193
  - lib/ably_ui/core/notice/notice.html.erb
@@ -201,6 +210,8 @@ files:
201
210
  - lib/ably_ui/core/uptime/component.js
202
211
  - lib/ably_ui/core/uptime/uptime.html.erb
203
212
  - lib/ably_ui/core/uptime/uptime.rb
213
+ - lib/ably_ui/react/connect_state_wrapper/component.js
214
+ - lib/ably_ui/react/scripts.js
204
215
  - lib/ably_ui/reset/scripts.js
205
216
  - lib/ably_ui/reset/styles.css
206
217
  - lib/ably_ui/version.rb
@@ -224,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
235
  - !ruby/object:Gem::Version
225
236
  version: 1.3.1
226
237
  requirements: []
227
- rubygems_version: 3.2.3
238
+ rubygems_version: 3.3.7
228
239
  signing_key:
229
240
  specification_version: 4
230
241
  summary: Shared component library and design system for Ably Real-time Ltd (ably.com)