@zonos/amino 5.1.75 → 5.1.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-ccfac372.js"),o=require("react/jsx-runtime"),n=require("react"),i=require("react-dom"),t=require("clsx"),a=require("framer-motion"),r=require("../../style-inject.es-d4ddeae4.js");function l(e){return e&&e.__esModule?e:{default:e}}var c=l(t),d="Amino_BaseDialog-module__backdrop--Tykyp",s="Amino_BaseDialog-module__popup--1AFN-";r.styleInject(".Amino_BaseDialog-module__backdrop--Tykyp{align-items:center;color:var(--amino-text-color);display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:1000}.Amino_BaseDialog-module__popup--1AFN-{background:var(--amino-surface-color);border-radius:var(--amino-radius-12);box-shadow:var(--amino-v3-shadow-xxl);display:flex;flex-direction:column;outline:none;overflow:hidden;width:var(--amino-base-dialog-width);z-index:1001}");exports.BaseDialog=function(t){var r=t.children,l=t.className,u=t.closeOnBlur,m=void 0===u||u,p=t.closeOnEsc,v=void 0===p||p,f=t.onClose,g=t.open,_=t.popupMotionProps,y=t.style,b=t.themeOverride,x=t.width,h=void 0===x?444:x,k=t.withBackdrop,w=void 0===k||k,q=n.useRef(null),j=n.useRef(null);n.useEffect((function(){var e,o;(null===(e=j.current)||void 0===e?void 0:e.contains(document.activeElement))||null===(o=j.current)||void 0===o||o.focus(),(null===document||void 0===document?void 0:document.body)&&(document.body.style.overflow=g?"hidden":"auto")}),[g]);var A=w?{animate:{backgroundColor:"rgba(16, 17, 22, 0.65)"},exit:{backgroundColor:"rgba(16, 17, 22, 0)"},initial:{backgroundColor:"rgba(16, 17, 22, 0)"}}:{},B=e.__assign({animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},initial:{opacity:0,scale:.95},transition:{duration:.3,ease:[.4,0,.2,1]}},_);return"undefined"!=typeof document?i.createPortal(o.jsx(a.AnimatePresence,{children:g&&n.createElement(a.motion.div,e.__assign({className:d},A,{key:"dialog-backdrop",ref:j,"data-theme":b,onKeyDown:function(e){f&&v&&"Escape"===e.key&&f()},onMouseDown:function(e){q.current=e.target},onMouseUp:function(e){var o=e.target===q.current,n=f&&m&&e.target===j.current;o&&n&&f(),q.current=null},style:e.__assign(e.__assign({},y),{"--amino-base-dialog-width":"".concat(h,"px")}),tabIndex:-1,transition:{duration:.3}}),n.createElement(a.motion.div,e.__assign({},B,{key:"dialog",className:c.default(l,s,"elevated"),onClick:function(e){e.stopPropagation()}}),r))}),document.querySelector("body")):null};
1
+ "use strict";var e=require("../../_tslib-ccfac372.js"),o=require("react/jsx-runtime"),n=require("react"),i=require("react-dom"),t=require("clsx"),a=require("framer-motion"),r=require("../../style-inject.es-d4ddeae4.js");function l(e){return e&&e.__esModule?e:{default:e}}var c=l(t),d="Amino_BaseDialog-module__backdrop--Tykyp",s="Amino_BaseDialog-module__popup--1AFN-";r.styleInject(".Amino_BaseDialog-module__backdrop--Tykyp{align-items:center;color:var(--amino-text-color);display:flex;height:100vh;justify-content:center;left:0;position:fixed;top:0;width:100vw;z-index:1000}.Amino_BaseDialog-module__popup--1AFN-{background:var(--amino-surface-color);border-radius:var(--amino-radius-12);box-shadow:var(--amino-v3-shadow-xxl);display:flex;flex-direction:column;max-height:90vh;outline:none;overflow:hidden;width:var(--amino-base-dialog-width);z-index:1001}");exports.BaseDialog=function(t){var r=t.children,l=t.className,u=t.closeOnBlur,m=void 0===u||u,p=t.closeOnEsc,v=void 0===p||p,g=t.onClose,f=t.open,_=t.popupMotionProps,y=t.style,h=t.themeOverride,b=t.width,x=void 0===b?444:b,k=t.withBackdrop,w=void 0===k||k,q=n.useRef(null),j=n.useRef(null);n.useEffect((function(){var e,o;(null===(e=j.current)||void 0===e?void 0:e.contains(document.activeElement))||null===(o=j.current)||void 0===o||o.focus(),(null===document||void 0===document?void 0:document.body)&&(document.body.style.overflow=f?"hidden":"auto")}),[f]);var A=w?{animate:{backgroundColor:"rgba(16, 17, 22, 0.65)"},exit:{backgroundColor:"rgba(16, 17, 22, 0)"},initial:{backgroundColor:"rgba(16, 17, 22, 0)"}}:{},B=e.__assign({animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},initial:{opacity:0,scale:.95},transition:{duration:.3,ease:[.4,0,.2,1]}},_);return"undefined"!=typeof document?i.createPortal(o.jsx(a.AnimatePresence,{children:f&&n.createElement(a.motion.div,e.__assign({className:d},A,{key:"dialog-backdrop",ref:j,"data-theme":h,onKeyDown:function(e){g&&v&&"Escape"===e.key&&g()},onMouseDown:function(e){q.current=e.target},onMouseUp:function(e){var o=e.target===q.current,n=g&&m&&e.target===j.current;o&&n&&g(),q.current=null},style:e.__assign(e.__assign({},y),{"--amino-base-dialog-width":"".concat(x,"px")}),tabIndex:-1,transition:{duration:.3}}),n.createElement(a.motion.div,e.__assign({},B,{key:"dialog",className:c.default(l,s,"elevated"),onClick:function(e){e.stopPropagation()}}),r))}),document.querySelector("body")):null};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.1.75",
3
+ "version": "5.1.76",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",