@zonos/amino 5.1.112 → 5.1.114
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/cover-sheet/CoverSheet.d.ts +2 -1
- package/components/cover-sheet/CoverSheet.js +1 -1
- package/components/dialog/BaseDialog.d.ts +6 -1
- package/components/dialog/BaseDialog.js +1 -1
- package/components/dialog/Dialog.d.ts +1 -0
- package/components/dialog/announcement/AnnouncementDialog.d.ts +1 -0
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ export type CoverSheetProps = BaseDialogProps & {
|
|
|
6
6
|
actionWrapperId?: string;
|
|
7
7
|
actions?: ReactNode;
|
|
8
8
|
headerComponent?: ReactNode;
|
|
9
|
+
hideCloseButton?: boolean;
|
|
9
10
|
label: string;
|
|
10
11
|
};
|
|
11
|
-
export declare const CoverSheet: ({ actions, actionWrapperId, children, className, headerComponent, label, onClose, open, ...props }: CoverSheetProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const CoverSheet: ({ actions, actionWrapperId, children, className, headerComponent, hideCloseButton, label, onClose, open, ...props }: CoverSheetProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-bd4862e8.js"),o=require("react/jsx-runtime"),t=require("react"),r=require("clsx"),n=require("../button/Button.js"),i=require("./CoverSheetActions.js"),a=require("../dialog/BaseDialog.js"),s=require("../text/Text.js"),
|
|
1
|
+
"use strict";var e=require("../../_tslib-bd4862e8.js"),o=require("react/jsx-runtime"),t=require("react"),r=require("clsx"),n=require("../button/Button.js"),i=require("./CoverSheetActions.js"),a=require("../dialog/BaseDialog.js"),s=require("../text/Text.js"),d=require("../../icons/RemoveIcon.js"),c=require("../../style-inject.es-d4ddeae4.js");function l(e){return e&&e.__esModule?e:{default:e}}require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../../utils/getAminoColor.js"),require("../../styles/constants/theme.js"),require("../button/useRipple.js"),require("../spinner/Spinner.js"),require("react-dom"),require("../stack/HStack.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var u=l(r),m="Amino_CoverSheet-module__coverSheet--nZP66",h="Amino_CoverSheet-module__headerContainer--SCAgD",p="Amino_CoverSheet-module__header--praFM",v="Amino_CoverSheet-module__headerComponent--fgFRV",_="Amino_CoverSheet-module__content--Zht4F";c.styleInject(".Amino_CoverSheet-module__coverSheet--nZP66{background:var(--amino-page-background);border:var(--amino-border-subtle);border-radius:0;box-sizing:border-box;color:var(--amino-text-color);height:100vh;left:0;max-height:100vh;outline:none;overscroll-behavior:contain;position:fixed;top:0;width:100vw}@media print{.Amino_CoverSheet-module__coverSheet--nZP66{height:auto;min-height:100vh;position:absolute}}.Amino_CoverSheet-module__headerContainer--SCAgD{align-items:center;background-color:var(--amino-page-background);border-bottom:var(--amino-border-subtle);display:flex;height:64px;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-32);position:-webkit-sticky;position:sticky;top:0;z-index:99}@media print{.Amino_CoverSheet-module__headerContainer--SCAgD{display:none}}.Amino_CoverSheet-module__header--praFM{align-items:center;display:flex;gap:var(--amino-space-16)}.Amino_CoverSheet-module__headerComponent--fgFRV{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.Amino_CoverSheet-module__content--Zht4F{overflow:auto;padding:var(--amino-space-56)}");exports.CoverSheet=function(r){var c=r.actions,l=r.actionWrapperId,C=void 0===l?"__cover-sheet-actions":l,b=r.children,j=r.className,g=r.headerComponent,S=r.hideCloseButton,x=void 0!==S&&S,f=r.label,q=r.onClose,A=r.open,y=e.__rest(r,["actions","actionWrapperId","children","className","headerComponent","hideCloseButton","label","onClose","open"]);return t.useEffect((function(){"undefined"!=typeof document&&document.querySelectorAll("[id='".concat(C,"']")).length>1&&console.error('Duplicate id "'.concat(C,'" detected in "CoverSheet" component. Please set "actionWrapperId" to a unique id.'))}),[C]),t.useEffect((function(){(null===document||void 0===document?void 0:document.body)&&(document.body.style.overflow=A?"hidden":"auto")}),[A]),o.jsxs(a.BaseDialog,e.__assign({className:u.default(m,j),onClose:q,open:A,popupMotionProps:{animate:{translateY:0},exit:{translateY:"100vh"},initial:{translateY:"100vh"},transition:{duration:.35,ease:[0,0,0,1]}}},y,{children:[o.jsxs("header",{className:h,children:[o.jsxs("div",{className:p,children:[!x&&o.jsx(n.Button,{icon:o.jsx(d.RemoveIcon,{size:20}),onClick:q}),o.jsx(s.Text,{type:"subheader",children:f})]}),o.jsx("div",{className:v,children:g}),o.jsx("div",{id:C,children:c&&o.jsx(i.CoverSheetActions,{coverSheetActionId:C,children:c})})]}),o.jsx("div",{className:_,children:b})]}))};
|
|
@@ -28,6 +28,11 @@ export type BaseDialogProps = BaseProps & {
|
|
|
28
28
|
* }
|
|
29
29
|
*/
|
|
30
30
|
popupMotionProps?: MotionProps;
|
|
31
|
+
/**
|
|
32
|
+
* the selector for the root element to append the dialog to
|
|
33
|
+
* @default 'body'
|
|
34
|
+
*/
|
|
35
|
+
rootSelector?: string;
|
|
31
36
|
themeOverride?: Theme;
|
|
32
37
|
/**
|
|
33
38
|
* @default 444
|
|
@@ -40,4 +45,4 @@ export type BaseDialogProps = BaseProps & {
|
|
|
40
45
|
withBackdrop?: boolean;
|
|
41
46
|
onClose?: () => void;
|
|
42
47
|
};
|
|
43
|
-
export declare const BaseDialog: ({ children, className, closeOnBlur, closeOnEsc, onClose, open, popupMotionProps, style, themeOverride, width, withBackdrop, }: BaseDialogProps) => React.ReactPortal | null;
|
|
48
|
+
export declare const BaseDialog: ({ children, className, closeOnBlur, closeOnEsc, onClose, open, popupMotionProps, rootSelector, style, themeOverride, width, withBackdrop, }: BaseDialogProps) => React.ReactPortal | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../_tslib-bd4862e8.js"),o=require("react/jsx-runtime"),i=require("react"),n=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,f=t.onClose,g=t.open,_=t.popupMotionProps,y=t.
|
|
1
|
+
"use strict";var e=require("../../_tslib-bd4862e8.js"),o=require("react/jsx-runtime"),i=require("react"),n=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,f=t.onClose,g=t.open,_=t.popupMotionProps,y=t.rootSelector,h=t.style,b=t.themeOverride,x=t.width,k=void 0===x?444:x,w=t.withBackdrop,q=void 0===w||w,j=i.useRef(null),A=i.useRef(null);i.useEffect((function(){var e,o;(null===(e=A.current)||void 0===e?void 0:e.contains(document.activeElement))||null===(o=A.current)||void 0===o||o.focus(),(null===document||void 0===document?void 0:document.body)&&(document.body.style.overflow=g?"hidden":"auto")}),[g]);var B=q?{animate:{backgroundColor:"rgba(16, 17, 22, 0.65)"},exit:{backgroundColor:"rgba(16, 17, 22, 0)"},initial:{backgroundColor:"rgba(16, 17, 22, 0)"}}:{},D=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]}},_);if("undefined"!=typeof document){var E=document.querySelector(y||"body");if(E)return n.createPortal(o.jsx(a.AnimatePresence,{children:g&&i.createElement(a.motion.div,e.__assign({className:d},B,{key:"dialog-backdrop",ref:A,"data-theme":b,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),f&&v&&f())},onMouseDown:function(e){j.current=e.target},onMouseUp:function(e){var o=e.target===j.current,i=f&&m&&e.target===A.current;o&&i&&f(),j.current=null},style:e.__assign(e.__assign({},h),{"--amino-base-dialog-width":"".concat(k,"px")}),tabIndex:-1,transition:{duration:.3}}),i.createElement(a.motion.div,e.__assign({},D,{key:"dialog",className:c.default(l,s,"elevated"),onClick:function(e){e.stopPropagation()}}),r))}),E)}return null};
|
|
@@ -13,6 +13,7 @@ export declare const Dialog: import("react").ForwardRefExoticComponent<import(".
|
|
|
13
13
|
closeOnEsc?: boolean | undefined;
|
|
14
14
|
open: boolean;
|
|
15
15
|
popupMotionProps?: import("framer-motion").MotionProps | undefined;
|
|
16
|
+
rootSelector?: string | undefined;
|
|
16
17
|
themeOverride?: "day" | "night" | "midnight" | undefined;
|
|
17
18
|
width?: number | undefined;
|
|
18
19
|
withBackdrop?: boolean | undefined;
|
|
@@ -13,6 +13,7 @@ export declare const AnnouncementDialog: import("react").ForwardRefExoticCompone
|
|
|
13
13
|
closeOnEsc?: boolean | undefined;
|
|
14
14
|
open: boolean;
|
|
15
15
|
popupMotionProps?: import("framer-motion").MotionProps | undefined;
|
|
16
|
+
rootSelector?: string | undefined;
|
|
16
17
|
themeOverride?: "day" | "night" | "midnight" | undefined;
|
|
17
18
|
width?: number | undefined;
|
|
18
19
|
withBackdrop?: boolean | undefined;
|