@zonos/amino 5.1.66 → 5.1.67

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.
@@ -16,7 +16,6 @@ export declare const AnnouncementDialog: import("react").ForwardRefExoticCompone
16
16
  themeOverride?: "day" | "night" | "midnight" | undefined;
17
17
  width?: number | undefined;
18
18
  withBackdrop?: boolean | undefined;
19
- withBorder?: boolean | undefined;
20
19
  onClose?: (() => void) | undefined;
21
20
  } & {
22
21
  announcementId: string;
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),a=require("react"),i=require("zod"),t=require("../dialog/BaseDialog.js"),o=require("../stack/VStack.js"),r=require("../text/Text.js"),s=require("../../utils/hooks/useStorage.js"),l=require("../../style-inject.es-d4ddeae4.js");require("react-dom"),require("clsx"),require("framer-motion"),require("../../styles/constants/theme.js"),require("styled-components"),require("../stack/Stack.js"),require("../../utils/storage.js"),require("swr");var c="Amino_AnnouncementDialog-module__content--FjcMN",m="Amino_AnnouncementDialog-module__styledImage--wWADJ";l.styleInject(".Amino_AnnouncementDialog-module__content--FjcMN{flex-grow:1;overflow-y:auto;padding:var(--amino-space-16) var(--amino-space-24)}.Amino_AnnouncementDialog-module__styledImage--wWADJ{height:auto;margin:var(--amino-announcement-dialog-image-margin);margin-bottom:var(--amino-space-16);width:var(--amino-announcement-dialog-image-width)}");var u=a.forwardRef((function(a,l){var u=a.announcementId,g=a.children,d=a.className,j=a.image,_=a.imageWidth,h=a.label,q=a.onClose,x=a.open,y=a.style,p=a.title,v=e.__rest(a,["announcementId","children","className","image","imageWidth","label","onClose","open","style","title"]),A=s.useStorage({defaultValue:"",key:"announcement:".concat(u),schema:i.z.enum(["seen",""]),type:"local"}),f=A.setValue,w=A.value;return n.jsxs(t.BaseDialog,e.__assign({},v,{className:[d||"","announcement-dialog"].join(" "),onClose:function(){q&&q(),f("seen")},open:x||!w,style:e.__assign(e.__assign({},y),{"--amino-announcement-dialog-image-margin":_?"0 auto":"unset","--amino-announcement-dialog-image-width":_?"".concat(_,"px"):"100%"}),children:[n.jsx("div",{className:m,children:j}),n.jsxs(o.VStack,{className:c,spacing:8,children:[n.jsx(r.Text,{color:"blue600",type:"label",children:h}),n.jsx(r.Text,{type:"title",children:p}),n.jsx("div",{ref:l,children:n.jsx(r.Text,{color:"gray800",children:g})})]})]}))}));exports.AnnouncementDialog=u;
1
+ "use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime"),a=require("react"),i=require("zod"),t=require("../dialog/BaseDialog.js"),o=require("../stack/VStack.js"),r=require("../text/Text.js"),s=require("../../utils/hooks/useStorage.js"),l=require("../../style-inject.es-d4ddeae4.js");require("react-dom"),require("clsx"),require("framer-motion"),require("styled-components"),require("../stack/Stack.js"),require("../../styles/constants/theme.js"),require("../../utils/storage.js"),require("swr");var c="Amino_AnnouncementDialog-module__content--FjcMN",m="Amino_AnnouncementDialog-module__styledImage--wWADJ";l.styleInject(".Amino_AnnouncementDialog-module__content--FjcMN{flex-grow:1;overflow-y:auto;padding:var(--amino-space-16) var(--amino-space-24)}.Amino_AnnouncementDialog-module__styledImage--wWADJ{height:auto;margin:var(--amino-announcement-dialog-image-margin);margin-bottom:var(--amino-space-16);width:var(--amino-announcement-dialog-image-width)}");var u=a.forwardRef((function(a,l){var u=a.announcementId,g=a.children,d=a.className,j=a.image,_=a.imageWidth,h=a.label,q=a.onClose,x=a.open,y=a.style,p=a.title,v=e.__rest(a,["announcementId","children","className","image","imageWidth","label","onClose","open","style","title"]),A=s.useStorage({defaultValue:"",key:"announcement:".concat(u),schema:i.z.enum(["seen",""]),type:"local"}),f=A.setValue,w=A.value;return n.jsxs(t.BaseDialog,e.__assign({},v,{className:[d||"","announcement-dialog"].join(" "),onClose:function(){q&&q(),f("seen")},open:x||!w,style:e.__assign(e.__assign({},y),{"--amino-announcement-dialog-image-margin":_?"0 auto":"unset","--amino-announcement-dialog-image-width":_?"".concat(_,"px"):"100%"}),children:[n.jsx("div",{className:m,children:j}),n.jsxs(o.VStack,{className:c,spacing:8,children:[n.jsx(r.Text,{color:"blue600",type:"label",children:h}),n.jsx(r.Text,{type:"title",children:p}),n.jsx("div",{ref:l,children:n.jsx(r.Text,{color:"gray800",children:g})})]})]}))}));exports.AnnouncementDialog=u;
@@ -38,10 +38,6 @@ export type BaseDialogProps = BaseProps & {
38
38
  * @default true
39
39
  */
40
40
  withBackdrop?: boolean;
41
- /**
42
- * @default true
43
- */
44
- withBorder?: boolean;
45
41
  onClose?: () => void;
46
42
  };
47
- export declare const BaseDialog: ({ children, className, closeOnBlur, closeOnEsc, onClose, open, popupMotionProps, style, themeOverride, width, withBackdrop, withBorder, }: BaseDialogProps) => React.ReactPortal | null;
43
+ export declare const BaseDialog: ({ children, className, closeOnBlur, closeOnEsc, onClose, open, popupMotionProps, style, themeOverride, width, withBackdrop, }: BaseDialogProps) => React.ReactPortal | null;
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-ccfac372.js"),o=require("react/jsx-runtime"),i=require("react"),n=require("react-dom"),a=require("clsx"),t=require("framer-motion"),r=require("../../styles/constants/theme.js"),d=require("../../style-inject.es-d4ddeae4.js");function l(e){return e&&e.__esModule?e:{default:e}}var s=l(a),c="Amino_BaseDialog-module__backdrop--Tykyp",u="Amino_BaseDialog-module__popup--1AFN-";d.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:var(--amino-base-dialog-border);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(a){var d=a.children,l=a.className,m=a.closeOnBlur,v=void 0===m||m,p=a.closeOnEsc,g=void 0===p||p,f=a.onClose,b=a.open,y=a.popupMotionProps,_=a.style,h=a.themeOverride,x=a.width,k=void 0===x?444:x,w=a.withBackdrop,q=void 0===w||w,j=a.withBorder,B=void 0===j||j,A=i.useRef(null),D=i.useRef(null);i.useEffect((function(){var e,o;(null===(e=D.current)||void 0===e?void 0:e.contains(document.activeElement))||null===(o=D.current)||void 0===o||o.focus(),(null===document||void 0===document?void 0:document.body)&&(document.body.style.overflow=b?"hidden":"auto")}),[b]);var E=q?{animate:{backgroundColor:"rgba(16, 17, 22, 0.65)"},exit:{backgroundColor:"rgba(16, 17, 22, 0)"},initial:{backgroundColor:"rgba(16, 17, 22, 0)"}}:{},C=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]}},y);return"undefined"!=typeof document?n.createPortal(o.jsx(t.AnimatePresence,{children:b&&i.createElement(t.motion.div,e.__assign({className:s.default(c,l)},E,{key:"dialog-backdrop",ref:D,"data-theme":h,onKeyDown:function(e){f&&g&&"Escape"===e.key&&f()},onMouseDown:function(e){A.current=e.target},onMouseUp:function(e){var o=e.target===A.current,i=f&&v&&e.target===D.current;o&&i&&f(),A.current=null},style:e.__assign(e.__assign({},_),{"--amino-base-dialog-border":B?r.theme.border:"","--amino-base-dialog-width":"".concat(k,"px")}),tabIndex:-1,transition:{duration:.3}}),i.createElement(t.motion.div,e.__assign({},C,{key:"dialog",className:s.default(l,u,"elevated"),onClick:function(e){e.stopPropagation()}}),d))}),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 d=l(t),c="Amino_BaseDialog-module__backdrop--Tykyp",u="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,s=t.closeOnBlur,m=void 0===s||s,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.default(c,l)},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:d.default(l,u,"elevated"),onClick:function(e){e.stopPropagation()}}),r))}),document.querySelector("body")):null};
@@ -16,7 +16,6 @@ export declare const Dialog: import("react").ForwardRefExoticComponent<import(".
16
16
  themeOverride?: "day" | "night" | "midnight" | undefined;
17
17
  width?: number | undefined;
18
18
  withBackdrop?: boolean | undefined;
19
- withBorder?: boolean | undefined;
20
19
  onClose?: (() => void) | undefined;
21
20
  } & {
22
21
  actions?: ReactNode;
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),i=require("../dialog/BaseDialog.js");require("react"),require("react-dom"),require("clsx"),require("framer-motion"),require("../../styles/constants/theme.js"),require("../../style-inject.es-d4ddeae4.js");exports.LightBox=function(s){var t=s.children,a=e.__rest(s,["children"]);return r.jsx(i.BaseDialog,e.__assign({},a,{children:t}))};
1
+ "use strict";var e=require("../../_tslib-ccfac372.js"),r=require("react/jsx-runtime"),i=require("../dialog/BaseDialog.js");require("react"),require("react-dom"),require("clsx"),require("framer-motion"),require("../../style-inject.es-d4ddeae4.js");exports.LightBox=function(s){var t=s.children,a=e.__rest(s,["children"]);return r.jsx(i.BaseDialog,e.__assign({},a,{children:t}))};
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-ccfac372.js"),t=require("react/jsx-runtime"),o=require("@mui/material/styles"),s=require("@mui/material/Tooltip"),a=require("styled-components"),n=require("../stack/VStack.js"),r=require("../text/Text.js"),i=require("../../styles/constants/theme.js"),l=require("../../utils/hooks/useAminoTheme.js");function d(e){return e&&e.__esModule?e:{default:e}}require("../stack/Stack.js"),require("react"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/storage.js"),require("swr");var p,c,u,m,h=d(s),g=d(a),_=g.default(n.VStack)(p||(p=e.__makeTemplateObject(["\n padding-top: 3px;\n"],["\n padding-top: 3px;\n"]))),b=g.default.div(c||(c=e.__makeTemplateObject([""],[""]))),j=g.default.span(u||(u=e.__makeTemplateObject(["\n display: none;\n"],["\n display: none;\n"]))),k=g.default.div(m||(m=e.__makeTemplateObject(["\n position: relative;\n [disabled] + "," {\n display: block;\n cursor: not-allowed;\n /** @desc avoid showing tooltip on top of dialog or coversheet */\n z-index: 10;\n\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n }\n"],["\n position: relative;\n [disabled] + "," {\n display: block;\n cursor: not-allowed;\n /** @desc avoid showing tooltip on top of dialog or coversheet */\n z-index: 10;\n\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n }\n"])),j),x=o.styled((function(o){var s=o.className,a=o.dataTheme,n=e.__rest(o,["className","dataTheme"]);return t.jsx(h.default,e.__assign({},n,{classes:{popper:s},PopperProps:e.__assign(e.__assign({},n.PopperProps),{"data-theme":a})}))}))((function(e){var t,o,a=e.background;return(t={})["& .".concat(s.tooltipClasses.tooltip)]={backgroundColor:a?i.theme[a]:i.theme.gray1200,boxShadow:i.theme.v3ShadowLarge},t["&[data-theme='night']"]=((o={})[".".concat(s.tooltipClasses.tooltip)]={backgroundColor:a?i.theme[a]:i.theme.gray50},o),t}));exports.Tooltip=function(o){var s=o.background,a=o.children,n=o.className,i=o.open,d=o.showTooltip,p=o.subtitle,c=o.tag,u=o.themeOverride,m=o.title,h=e.__rest(o,["background","children","className","open","showTooltip","subtitle","tag","themeOverride","title"]),g=l.useAminoTheme().aminoTheme;return d?t.jsx(x,e.__assign({},h,{background:s,className:n,dataTheme:u||g,open:i,title:t.jsxs(_,{spacing:8,children:[m&&t.jsx(r.Text,{isUppercase:!1,type:"small-header",children:m}),"string"==typeof p?t.jsx(r.Text,{type:"caption",children:p}):p]}),children:t.jsxs(k,{as:c,children:[a,t.jsx(j,{})]})})):t.jsx(b,{as:c,children:a})};
1
+ "use strict";var e=require("../../_tslib-ccfac372.js"),t=require("react/jsx-runtime"),s=require("@mui/material/styles"),o=require("@mui/material/Tooltip"),a=require("styled-components"),n=require("../stack/VStack.js"),r=require("../text/Text.js"),i=require("../../styles/constants/theme.js"),l=require("../../utils/hooks/useAminoTheme.js");function d(e){return e&&e.__esModule?e:{default:e}}require("../stack/Stack.js"),require("react"),require("../../Theme-61f4342c.js"),require("zod"),require("../../utils/hooks/useStorage.js"),require("../../utils/storage.js"),require("swr");var c,u,p,m,h=d(o),g=d(a),b=g.default(n.VStack)(c||(c=e.__makeTemplateObject(["\n padding: ",";\n"],["\n padding: ",";\n"])),i.theme.space0),_=g.default.div(u||(u=e.__makeTemplateObject([""],[""]))),j=g.default.span(p||(p=e.__makeTemplateObject(["\n display: none;\n"],["\n display: none;\n"]))),k=g.default.div(m||(m=e.__makeTemplateObject(["\n position: relative;\n [disabled] + "," {\n display: block;\n cursor: not-allowed;\n /** @desc avoid showing tooltip on top of dialog or coversheet */\n z-index: 10;\n\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n }\n"],["\n position: relative;\n [disabled] + "," {\n display: block;\n cursor: not-allowed;\n /** @desc avoid showing tooltip on top of dialog or coversheet */\n z-index: 10;\n\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n }\n"])),j),T=s.styled((function(s){var o=s.className,a=s.dataTheme,n=e.__rest(s,["className","dataTheme"]);return t.jsx(h.default,e.__assign({},n,{classes:{popper:o},PopperProps:e.__assign(e.__assign({},n.PopperProps),{"data-theme":a})}))}))((function(e){var t,s,a=e.background;return(t={})["& .".concat(o.tooltipClasses.tooltip)]={backgroundColor:a?i.theme[a]:i.theme.gray1200,borderRadius:i.theme.radius10,boxShadow:i.theme.v3ShadowLarge,padding:i.theme.space12},t["&[data-theme='night']"]=((s={})[".".concat(o.tooltipClasses.tooltip)]={backgroundColor:a?i.theme[a]:i.theme.gray50},s),t}));exports.Tooltip=function(s){var o=s.background,a=s.children,n=s.className,i=s.open,d=s.showTooltip,c=s.subtitle,u=s.tag,p=s.themeOverride,m=s.title,h=e.__rest(s,["background","children","className","open","showTooltip","subtitle","tag","themeOverride","title"]),g=l.useAminoTheme().aminoTheme;return d?t.jsx(T,e.__assign({},h,{background:o,className:n,dataTheme:p||g,open:i,title:t.jsxs(b,{spacing:8,children:[m&&t.jsx(r.Text,{isUppercase:!1,type:"small-header",children:m}),"string"==typeof c?t.jsx(r.Text,{type:"caption",children:c}):c]}),children:t.jsxs(k,{as:u,children:[a,t.jsx(j,{})]})})):t.jsx(_,{as:u,children:a})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.1.66",
3
+ "version": "5.1.67",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",