@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.
- package/components/announcement-dialog/AnnouncementDialog.d.ts +0 -1
- package/components/announcement-dialog/AnnouncementDialog.js +1 -1
- package/components/dialog/BaseDialog.d.ts +1 -5
- package/components/dialog/BaseDialog.js +1 -1
- package/components/dialog/Dialog.d.ts +0 -1
- package/components/lightbox/LightBox.js +1 -1
- package/components/tooltip/Tooltip.js +1 -1
- package/package.json +1 -1
|
@@ -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("
|
|
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,
|
|
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"),
|
|
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("../../
|
|
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"),
|
|
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})};
|