Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@biotic-ui/dialog

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biotic-ui/dialog - npm Package Compare versions

Comparing version 0.1.3 to 0.1.5

2

lib/main.js

@@ -1,1 +0,1 @@

!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("react"),require("styled-components"),require("react-spring"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","styled-components","react-spring","react-dom"],e);else{var n="object"==typeof exports?e(require("react"),require("styled-components"),require("react-spring"),require("react-dom")):e(t.React,t[void 0],t[void 0],t[void 0]);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,(function(t,e,n,r){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){(function(t){var r,o,i,u;function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}u=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==c(t)&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([function(e,n){e.exports=t},function(t,e,n){var r=n(2),o=n(6),i=n(9),u=Math.max,c=Math.min;t.exports=function(t,e,n){var a,f,l,s,d,p,b=0,y=!1,v=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(e){var n=a,r=f;return a=f=void 0,b=e,s=t.apply(r,n)}function g(t){return b=t,d=setTimeout(O,e),y?h(t):s}function j(t){var n=t-p;return void 0===p||n>=e||n<0||v&&t-b>=l}function O(){var t=o();if(j(t))return w(t);d=setTimeout(O,function(t){var n=e-(t-p);return v?c(n,l-(t-b)):n}(t))}function w(t){return d=void 0,m&&a?h(t):(a=f=void 0,s)}function S(){var t=o(),n=j(t);if(a=arguments,f=this,p=t,n){if(void 0===d)return g(p);if(v)return clearTimeout(d),d=setTimeout(O,e),h(p)}return void 0===d&&(d=setTimeout(O,e)),s}return e=i(e)||0,r(n)&&(y=!!n.leading,l=(v="maxWait"in n)?u(i(n.maxWait)||0,e):l,m="trailing"in n?!!n.trailing:m),S.cancel=function(){void 0!==d&&clearTimeout(d),b=0,a=p=f=d=void 0},S.flush=function(){return void 0===d?s:w(o())},S}},function(t,e){t.exports=function(t){var e=c(t);return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(7),o="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(3).Symbol;t.exports=r},function(t,e,n){var r=n(1),o=n(2);t.exports=function(t,e,n){var i=!0,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,u="trailing"in n?!!n.trailing:u),r(t,e,{leading:i,maxWait:e,trailing:u})}},function(t,e,n){var r=n(3);t.exports=function(){return r.Date.now()}},function(t,e,n){(function(e){var n="object"==c(e)&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(8))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==("undefined"==typeof window?"undefined":c(window))&&(n=window)}t.exports=n},function(t,e,n){var r=n(2),o=n(10),i=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,a=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=c.test(t);return n||a.test(t)?f(t.slice(2),n?2:8):u.test(t)?NaN:+t}},function(t,e,n){var r=n(11),o=n(14);t.exports=function(t){return"symbol"==c(t)||o(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(4),o=n(12),i=n(13),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(4),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==c(t)}},function(t,e,n){"use strict";n.r(e),n.d(e,"useCombinedRefs",(function(){return i})),n.d(e,"useLongPress",(function(){return d})),n.d(e,"useOnEscape",(function(){return y})),n.d(e,"usePreventScroll",(function(){return v})),n.d(e,"useScrollShadow",(function(){return A})),n.d(e,"SHADOWS",(function(){return P})),n.d(e,"useMatchMedia",(function(){return T})),n.d(e,"useForm",(function(){return L})),n.d(e,"useOnline",(function(){return W})),n.d(e,"useThrottle",(function(){return z})),n.d(e,"useDebounce",(function(){return R})),n.d(e,"useGetContainer",(function(){return U})),n.d(e,"useResize",(function(){return B})),n.d(e,"useWindowSize",(function(){return G}));var r=n(0),o=n.n(r);function i(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=function(t){e.forEach((function(e){if(e)return"function"==typeof e?e(t):void(e.current=t)}))};return Object(r.useCallback)(o,e)}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s={shouldPreventDefault:!0,delay:300};function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=f(f({},s),e),o=n.shouldPreventDefault,i=n.delay,c=Object(r.useState)(!1),a=u(c,2),l=a[0],d=a[1],b=Object(r.useRef)(),y=Object(r.useRef)(),v=Object(r.useCallback)((function(e){o&&e.target&&(e.target.addEventListener("touchend",p,{passive:!1}),y.current=e.target),b.current=setTimeout((function(){t(e),d(!0)}),i)}),[t,i,o]),m=Object(r.useCallback)((function(t){b.current&&clearTimeout(b.current),d(!1),o&&y.current&&y.current.removeEventListener("touchend",p)}),[o,l]);return{onTouchStart:function(t){return v(t)},onTouchEnd:function(t){return m(t)}}}var p=function(t){(function(t){return"touches"in t})(t)&&t.touches.length<2&&t.preventDefault&&t.preventDefault()},b=function(){};function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,e=Object(r.useRef)(t);Object(r.useEffect)((function(){e.current=t})),Object(r.useEffect)((function(){function t(t){"Escape"==t.key&&e.current&&e.current(t)}return window.addEventListener("keydown",t),function(){window.removeEventListener("keydown",t)}}),[])}function v(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Object(r.useEffect)((function(){if(t){var e=document.body.style,n=e.overflow,r=e.paddingRight,o=(document.documentElement.clientWidth,window.innerWidth-document.body.offsetWidth);return document.body.style.paddingRight="calc(".concat(o,"px + ").concat(r,")"),document.body.style.overflow="hidden",function(){document.body.style.overflow=n,document.body.style.paddingRight=r}}}),[t])}var m=n(1),h=n.n(m);function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return j(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach((function(e){S(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var x="var(--scroll-shadow, var(--default-scroll-shadow))",P={top:"".concat(x," 0px 12px 8px -13px inset"),bottom:"".concat(x," 0px calc(-12px - var(--shadow-offset-bottom)) 8px -13px inset"),left:"".concat(x," 12px 0 8px -13px inset"),right:"".concat(x," calc(-12px - var(--shadow-offset-right)) 0 8px -13px inset")},E={top:!0,bottom:!0,left:!0,right:!0,shadows:P};function A(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=w(w({},E),e),o=Object(r.useState)({top:!1,bottom:!1,left:!1,right:!1}),i=g(o,2),u=i[0],c=i[1],a=Object(r.useState)({bottom:0,right:0}),f=g(a,2),l=f[0],s=f[1],d=Object(r.useCallback)(h()((function(){if(t.current){var e=t.current,r=e.scrollHeight,o=e.scrollWidth,i=e.scrollTop,u=e.scrollLeft,a=e.clientWidth,f=e.clientHeight;c({top:!!n.top&&i>0,bottom:!!n.bottom&&r>Math.ceil(i)+f,left:!!n.left&&u>0,right:!!n.right&&o>Math.ceil(u)+a})}}),500,{leading:!0,trailing:!0}),[n,c,t]);Object(r.useLayoutEffect)(d,[t,c]),Object(r.useEffect)((function(){return d.cancel}),[d]),Object(r.useLayoutEffect)((function(){if(t.current){var e=t.current,n=e.clientWidth,r=e.offsetWidth,o=e.offsetHeight,i=e.clientHeight;s({bottom:o-i,right:r-n})}}),[t,s]);var p={"--default-scroll-shadow":"rgba(0, 0, 0, 0.3)","--shadow-offset-bottom":"".concat(l.bottom,"px"),"--shadow-offset-right":"".concat(l.right,"px"),boxShadow:_(u,n.shadows)};return[d,p,u]}function _(t,e){return Object.entries(t).filter((function(t){return!0===t[1]})).map((function(t){return e[t[0]]})).join(",")}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function T(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object(r.useState)(!1),2),n=e[0],o=e[1];return Object(r.useEffect)((function(){var e=window.matchMedia(t);o(e.matches);var n=function(t){return o(t.matches)};return e.addListener(n),function(){e.removeListener(n)}}),[o,t]),n}function M(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){I(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function I(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function L(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.a.useState(t),2),n=e[0],r=e[1];return[n,function(t){var e=t.target,o=e.name,i=e.value;r(C(C({},n),{},I({},o,i)))},r]}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function W(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return N(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object(r.useState)(!0),2),e=t[0],n=t[1];return Object(r.useEffect)((function(){function t(t){n(navigator.onLine)}return window.addEventListener("online",t),window.addEventListener("offline",t),function(){window.removeEventListener("online",t),window.removeEventListener("offline",t)}}),[]),e}var $=n(5),q=n.n($);function z(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(r.useCallback)(q()(t,e),n,o)}function R(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(r.useCallback)(h()(t,e),n,o)}function H(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function U(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return H(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object(r.useState)(null),2),n=e[0],o=e[1];return Object(r.useEffect)((function(){if(null===n){var e=document.querySelector("#".concat(t));if(null===e){var r=document.createElement("div");r.id=t,document.body.appendChild(r),o(r)}else o(e)}}),[t]),n}function B(t){var e=Object(r.useRef)();Object(r.useEffect)((function(){e.current=t})),Object(r.useEffect)((function(){function t(t){e.current&&e.current(t)}return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}),[])}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function G(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return F(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object(r.useState)({innerHeight:0,innerWidth:0}),2),n=e[0],o=e[1];return Object(r.useEffect)((function(){function t(){o({innerHeight:window.innerHeight,innerWidth:window.innerWidth})}return t(),window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}),[o]),n}}])},"object"==c(e)&&"object"==c(t)?t.exports=u(n(0)):(o=[n(0)],void 0===(i="function"==typeof(r=u)?r.apply(e,o):r)||(t.exports=i))}).call(this,n(4)(t))},function(t,e){t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=r},function(t,e,n){(function(t){var r,o,i,u;function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}window,u=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==c(t)&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.r(e),n.d(e,"Backdrop",(function(){return o}));var r=n(0),o=n.n(r).a.div.withConfig({displayName:"backdrop__Backdrop",componentId:"ow9n5q-0"})(["background:var(--backdrop,rgba(63,63,63,0.1));position:fixed;width:100%;height:100%;top:0;left:0;z-index:var(--background-z-index,10);",""],(function(t){return!t.open&&"\n\t\tpointer-events: none;\n\t"}))}])},"object"==c(e)&&"object"==c(t)?t.exports=u(n(1)):(o=[n(1)],void 0===(i="function"==typeof(r=u)?r.apply(e,o):r)||(t.exports=i))}).call(this,n(4)(t))},function(t,e,n){"use strict";n.r(e),n.d(e,"DialogContent",(function(){return p})),n.d(e,"default",(function(){return b}));var r=n(0),o=n.n(r),i=n(5),u=n(1),c=n.n(u),a=n(2),f=n(3),l=n(6),s="C:\\workspace\\src\\riezler.co\\biotic\\packages\\dialog\\src\\main.js",d=c.a.div.withConfig({displayName:"main__Wrapper",componentId:"sc-13irtra-0"})(["display:",";position:fixed;top:0;bottom:0;left:0;right:0;align-items:center;justify-content:center;height:100vh;width:100vw;"],(function(t){return t.open?"flex":"none"})),p=c.a.div.withConfig({displayName:"main__DialogContent",componentId:"sc-13irtra-1"})(["--dialog-default-shadow:0px 8px 21px -5px rgba(0,0,0,0.2);box-shadow:var(--dialog-shadow,var(--dialog-default-shadow));position:absolute;background:var(--dialog-background,#fff);z-index:11;padding:var(--dialog-padding,1em);border-radius:var(--border-radius,0.5em);max-width:100vw;max-height:100vh;overflow:auto;width:",";height:",";"],(function(t){return"number"==typeof t.width?"".concat(t.width,"px"):t.width}),(function(t){return"number"==typeof t.height?"".concat(t.height,"px"):t.height}));function b(t){var e=Object(a.useGetContainer)("biotic-dialog"),n=t.open,r=void 0!==n&&n,u=t.children,c=t.backdrop,b=void 0===c||c,y=t.onClose,v=void 0===y?function(){}:y,m=t.width,h=void 0===m?"auto":m,g=t.height,j=void 0===g?"auto":g,O=Object(f.useSpring)({transform:r?"scale(1)":"scale(0.95)"}),w=Object(f.useSpring)({opacity:r?1:0});Object(a.useOnEscape)((function(){return r&&v({backdrop:!1,escape:!0})})),Object(a.usePreventScroll)(r);var S=o.a.createElement(d,{open:r,__self:this,__source:{fileName:s,lineNumber:68,columnNumber:3}},b&&o.a.createElement(l.Backdrop,{open:r,style:w,onClick:function(){v&&v({backdrop:!0,escape:!1})},__self:this,__source:{fileName:s,lineNumber:69,columnNumber:18}}),o.a.createElement(p,{as:f.animated.div,style:O,width:h,height:j,"aria-hidden":!r,role:"dialog",__self:this,__source:{fileName:s,lineNumber:70,columnNumber:4}},u));return e?Object(i.createPortal)(S,e):null}}])}));
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("react"),require("styled-components"),require("react-spring"),require("react-dom"));else if("function"==typeof define&&define.amd)define(["react","styled-components","react-spring","react-dom"],e);else{var n="object"==typeof exports?e(require("react"),require("styled-components"),require("react-spring"),require("react-dom")):e(t.React,t[void 0],t[void 0],t[void 0]);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,(function(t,e,n,r){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){(function(t){var r,o,i,u;function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}u=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==c(t)&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=15)}([function(e,n){e.exports=t},function(t,e,n){var r=n(3),o=n(2);t.exports=function(t,e,n){var i=!0,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,u="trailing"in n?!!n.trailing:u),r(t,e,{leading:i,maxWait:e,trailing:u})}},function(t,e){t.exports=function(t){var e=c(t);return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(2),o=n(6),i=n(9),u=Math.max,c=Math.min;t.exports=function(t,e,n){var a,f,l,s,d,p,b=0,y=!1,v=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(e){var n=a,r=f;return a=f=void 0,b=e,s=t.apply(r,n)}function g(t){return b=t,d=setTimeout(O,e),y?h(t):s}function j(t){var n=t-p;return void 0===p||n>=e||n<0||v&&t-b>=l}function O(){var t=o();if(j(t))return w(t);d=setTimeout(O,function(t){var n=e-(t-p);return v?c(n,l-(t-b)):n}(t))}function w(t){return d=void 0,m&&a?h(t):(a=f=void 0,s)}function S(){var t=o(),n=j(t);if(a=arguments,f=this,p=t,n){if(void 0===d)return g(p);if(v)return clearTimeout(d),d=setTimeout(O,e),h(p)}return void 0===d&&(d=setTimeout(O,e)),s}return e=i(e)||0,r(n)&&(y=!!n.leading,l=(v="maxWait"in n)?u(i(n.maxWait)||0,e):l,m="trailing"in n?!!n.trailing:m),S.cancel=function(){void 0!==d&&clearTimeout(d),b=0,a=p=f=d=void 0},S.flush=function(){return void 0===d?s:w(o())},S}},function(t,e,n){var r=n(7),o="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(4).Symbol;t.exports=r},function(t,e,n){var r=n(4);t.exports=function(){return r.Date.now()}},function(t,e,n){(function(e){var n="object"==c(e)&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(8))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==("undefined"==typeof window?"undefined":c(window))&&(n=window)}t.exports=n},function(t,e,n){var r=n(2),o=n(10),i=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,a=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=c.test(t);return n||a.test(t)?f(t.slice(2),n?2:8):u.test(t)?NaN:+t}},function(t,e,n){var r=n(11),o=n(14);t.exports=function(t){return"symbol"==c(t)||o(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(5),o=n(12),i=n(13),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(5),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==c(t)}},function(t,e,n){"use strict";n.r(e),n.d(e,"useCombinedRefs",(function(){return i})),n.d(e,"useLongPress",(function(){return d})),n.d(e,"useOnEscape",(function(){return y})),n.d(e,"usePreventScroll",(function(){return v})),n.d(e,"useScroll",(function(){return S})),n.d(e,"useScrollShadow",(function(){return L})),n.d(e,"SHADOWS",(function(){return M})),n.d(e,"useMatchMedia",(function(){return R})),n.d(e,"useForm",(function(){return H})),n.d(e,"useOnline",(function(){return F})),n.d(e,"useIdleCallback",(function(){return G})),n.d(e,"useThrottle",(function(){return X})),n.d(e,"useDebounce",(function(){return P})),n.d(e,"useGetContainer",(function(){return J})),n.d(e,"useResize",(function(){return K})),n.d(e,"useWindowSize",(function(){return V}));var r=n(0),o=n.n(r);function i(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=function(t){e.forEach((function(e){if(e)return"function"==typeof e?e(t):void(e.current=t)}))};return Object(r.useCallback)(o,e)}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s={shouldPreventDefault:!0,delay:300};function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=f(f({},s),e),o=n.shouldPreventDefault,i=n.delay,c=Object(r.useState)(!1),a=u(c,2),l=a[0],d=a[1],b=Object(r.useRef)(),y=Object(r.useRef)(),v=Object(r.useCallback)((function(e){o&&e.target&&(e.target.addEventListener("touchend",p,{passive:!1}),y.current=e.target),b.current=setTimeout((function(){t(e),d(!0)}),i)}),[t,i,o]),m=Object(r.useCallback)((function(t){b.current&&clearTimeout(b.current),d(!1),o&&y.current&&y.current.removeEventListener("touchend",p)}),[o,l]);return{onTouchStart:function(t){return v(t)},onTouchEnd:function(t){return m(t)}}}var p=function(t){(function(t){return"touches"in t})(t)&&t.touches.length<2&&t.preventDefault&&t.preventDefault()},b=function(){};function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,e=Object(r.useRef)(t);Object(r.useEffect)((function(){e.current=t})),Object(r.useEffect)((function(){function t(t){"Escape"==t.key&&e.current&&e.current(t)}return window.addEventListener("keydown",t),function(){window.removeEventListener("keydown",t)}}),[])}function v(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Object(r.useEffect)((function(){if(t){var e=document.body.style,n=e.overflow,r=e.paddingRight,o=(document.documentElement.clientWidth,window.innerWidth-document.body.offsetWidth);return document.body.style.paddingRight="calc(".concat(o,"px + ").concat(r,")"),document.body.style.overflow="hidden",function(){document.body.style.overflow=n,document.body.style.paddingRight=r}}}),[t])}var m=n(1),h=n.n(m);function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return j(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function O(t){return t?t.scrollTop:window.pageYOffset}function w(t){return t?t.scrollLeft:window.pageXOffset}function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.current,r=o.a.useState({y:O(n),x:w(n),delta:{y:O(n),x:w(n)}}),i=g(r,2),u=i[0],c=i[1],a=o.a.useRef();o.a.useEffect((function(){a.current=t}));var f=o.a.useCallback(h()((function(){var t={y:O(n),x:w(n),delta:{y:O(n)-u.y,x:w(n)-u.x}};c(t),a.current&&a.current(t)}),500,{leading:!1,trailing:!0}),[n]);return o.a.useEffect((function(){var t=e.current?e.current:window;return t.addEventListener("scroll",f),function(){t.removeEventListener("scroll",f),f.cancel()}}),[e.current]),u}var x=n(3),E=n.n(x);function P(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(r.useCallback)(E()(t,e,o),n)}function A(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach((function(e){I(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function I(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var C="var(--scroll-shadow, var(--default-scroll-shadow))",M={top:"".concat(C," 0px 12px 8px -13px inset"),bottom:"".concat(C," 0px calc(-12px - var(--shadow-offset-bottom)) 8px -13px inset"),left:"".concat(C," 12px 0 8px -13px inset"),right:"".concat(C," calc(-12px - var(--shadow-offset-right)) 0 8px -13px inset")},D={top:!0,bottom:!0,left:!0,right:!0,shadows:M};function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=k(k({},D),e),o=Object(r.useState)({top:!1,bottom:!1,left:!1,right:!1}),i=A(o,2),u=i[0],c=i[1],a=Object(r.useState)({bottom:0,right:0}),f=A(a,2),l=f[0],s=f[1],d=P((function(){if(t.current){var e=t.current,r=e.scrollHeight,o=e.scrollWidth,i=e.scrollTop,u=e.scrollLeft,a=e.clientWidth,f=e.clientHeight;c({top:!!n.top&&i>0,bottom:!!n.bottom&&r>Math.ceil(i)+f+5,left:!!n.left&&u>0,right:!!n.right&&o>Math.ceil(u)+a+5})}}),500,[n,c,t],{leading:!0,trailing:!0});Object(r.useEffect)(d,[t,c]),Object(r.useEffect)((function(){return d.cancel}),[d]),Object(r.useEffect)((function(){if(t.current){var e=t.current,n=e.clientWidth,r=e.offsetWidth,o=e.offsetHeight,i=e.clientHeight;s({bottom:o-i,right:r-n})}}),[t,s]);var p={"--default-scroll-shadow":"rgba(0, 0, 0, 0.3)","--shadow-offset-bottom":"".concat(l.bottom,"px"),"--shadow-offset-right":"".concat(l.right,"px"),boxShadow:N(u,n.shadows)};return[d,p,u]}function N(t,e){return Object.entries(t).filter((function(t){return!0===t[1]})).map((function(t){return e[t[0]]})).join(",")}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function R(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return W(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object(r.useState)(!1),2),n=e[0],o=e[1];return Object(r.useEffect)((function(){var e=window.matchMedia(t);o(e.matches);var n=function(t){return o(t.matches)};return e.addListener(n),function(){e.removeListener(n)}}),[o,t]),n}function $(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach((function(e){z(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function z(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function H(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.a.useState(t),2),n=e[0],r=e[1];return[n,function(t){var e=t.target,o=e.name,i=e.value;r(q(q({},n),{},z({},o,i)))},r]}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function F(){var t=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object(r.useState)(!0),2),e=t[0],n=t[1];return Object(r.useEffect)((function(){function t(t){n(navigator.onLine)}return window.addEventListener("online",t),window.addEventListener("offline",t),function(){window.removeEventListener("online",t),window.removeEventListener("offline",t)}}),[]),e}function G(t){var e=Object(r.useRef)(),n=Object(r.useRef)((function(){})),o=Object(r.useRef)((function(){}));Object(r.useEffect)((function(){n.current=window.requestIdleCallback||function(t){return setTimeout((function(){var e=Date.now();t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},o.current=window.cancelIdleCallback||function(t){clearTimeout(t)}})),Object(r.useEffect)((function(){e.current=t})),Object(r.useEffect)((function(){var t=n.current(e.current);return function(){o.current(t)}}),[])}function X(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(r.useCallback)(h()(t,e,o),n)}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function J(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object(r.useState)(null),2),n=e[0],o=e[1];return Object(r.useEffect)((function(){if(null===n){var e=document.querySelector("#".concat(t));if(null===e){var r=document.createElement("div");r.id=t,document.body.appendChild(r),o(r)}else o(e)}}),[t]),n}function K(t){var e=Object(r.useRef)();Object(r.useEffect)((function(){e.current=t})),Object(r.useEffect)((function(){function t(t){e.current&&e.current(t)}return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}),[])}function Q(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function V(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Q(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Object(r.useState)({innerHeight:0,innerWidth:0}),2),n=e[0],o=e[1];return Object(r.useEffect)((function(){function t(){o({innerHeight:window.innerHeight,innerWidth:window.innerWidth})}return t(),window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}),[o]),n}}])},"object"==c(e)&&"object"==c(t)?t.exports=u(n(0)):(o=[n(0)],void 0===(i="function"==typeof(r=u)?r.apply(e,o):r)||(t.exports=i))}).call(this,n(4)(t))},function(t,e){t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=r},function(t,e,n){(function(t){var r,o,i,u;function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}u=function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==c(t)&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.r(e),n.d(e,"Backdrop",(function(){return o}));var r=n(0),o=n.n(r).a.div.withConfig({displayName:"backdrop__Backdrop",componentId:"ow9n5q-0"})(["background:var(--backdrop,rgba(63,63,63,0.1));position:fixed;width:100%;height:100%;top:0;left:0;z-index:var(--background-z-index,10);",""],(function(t){return!t.open&&"\n\t\tpointer-events: none;\n\t"}))}])},"object"==c(e)&&"object"==c(t)?t.exports=u(n(1)):(o=[n(1)],void 0===(i="function"==typeof(r=u)?r.apply(e,o):r)||(t.exports=i))}).call(this,n(4)(t))},function(t,e,n){"use strict";n.r(e),n.d(e,"DialogContent",(function(){return p})),n.d(e,"default",(function(){return b}));var r=n(0),o=n.n(r),i=n(5),u=n(1),c=n.n(u),a=n(2),f=n(3),l=n(6),s="C:\\workspace\\src\\riezler.co\\biotic\\packages\\dialog\\src\\main.js",d=c.a.div.withConfig({displayName:"main__Wrapper",componentId:"sc-13irtra-0"})(["display:",";position:fixed;top:0;bottom:0;left:0;right:0;align-items:center;justify-content:center;height:100vh;width:100vw;"],(function(t){return t.open?"flex":"none"})),p=c.a.div.withConfig({displayName:"main__DialogContent",componentId:"sc-13irtra-1"})(["--dialog-default-shadow:0px 8px 21px -5px rgba(0,0,0,0.2);box-shadow:var(--dialog-shadow,var(--dialog-default-shadow));position:absolute;background:var(--dialog-background,#fff);z-index:11;padding:var(--dialog-padding,1em);border-radius:var(--border-radius,0.5em);max-width:100vw;max-height:100vh;overflow:auto;width:",";height:",";"],(function(t){return"number"==typeof t.width?"".concat(t.width,"px"):t.width}),(function(t){return"number"==typeof t.height?"".concat(t.height,"px"):t.height}));function b(t){var e=Object(a.useGetContainer)("biotic-dialog"),n=t.open,r=void 0!==n&&n,u=t.children,c=t.backdrop,b=void 0===c||c,y=t.onClose,v=void 0===y?function(){}:y,m=t.width,h=void 0===m?"auto":m,g=t.height,j=void 0===g?"auto":g,O=Object(f.useSpring)({transform:r?"scale(1)":"scale(0.95)"}),w=Object(f.useSpring)({opacity:r?1:0});Object(a.useOnEscape)((function(){return r&&v({backdrop:!1,escape:!0})})),Object(a.usePreventScroll)(r);var S=o.a.createElement(d,{open:r,__self:this,__source:{fileName:s,lineNumber:68,columnNumber:3}},b&&o.a.createElement(l.Backdrop,{open:r,style:w,onClick:function(){v&&v({backdrop:!0,escape:!1})},__self:this,__source:{fileName:s,lineNumber:69,columnNumber:18}}),o.a.createElement(p,{as:f.animated.div,style:O,width:h,height:j,"aria-hidden":!r,role:"dialog",__self:this,__source:{fileName:s,lineNumber:70,columnNumber:4}},u));return e?Object(i.createPortal)(S,e):null}}])}));
{
"name": "@biotic-ui/dialog",
"version": "0.1.3",
"version": "0.1.5",
"description": "React Dialog",

@@ -25,3 +25,3 @@ "main": "lib/main.js",

"devDependencies": {
"@biotic-ui/std": "^0.1.3",
"@biotic-ui/std": "^0.1.5",
"webpack": "^4.44.1",

@@ -41,3 +41,3 @@ "webpack-cli": "^3.3.12"

},
"gitHead": "508ec14a04411bf3fb96b2cb2505983dd5082981",
"gitHead": "5e7600de7db95db8255d73736cd36dc6cc7bf463",
"publishConfig": {

@@ -44,0 +44,0 @@ "access": "public"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc