@cyber-harbour/ui 1.1.36 → 1.1.37

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/dist/index.d.mts CHANGED
@@ -1641,11 +1641,12 @@ type ModalProps = {
1641
1641
  children: any;
1642
1642
  isNested?: boolean;
1643
1643
  closeOnEscape?: boolean;
1644
+ fullHeight?: boolean;
1644
1645
  };
1645
1646
  interface ModalChildrenProps extends FabricComponent<Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>> {
1646
1647
  children: any;
1647
1648
  }
1648
- declare const Modal: ({ children, onClose, isNested, width, closeOnEscape }: ModalProps) => react_jsx_runtime.JSX.Element;
1649
+ declare const Modal: ({ children, onClose, isNested, width, closeOnEscape, fullHeight, }: ModalProps) => react_jsx_runtime.JSX.Element;
1649
1650
  declare const ModalHeader: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
1650
1651
  declare const ModalBody: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
1651
1652
  declare const ModalFooter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
package/dist/index.d.ts CHANGED
@@ -1641,11 +1641,12 @@ type ModalProps = {
1641
1641
  children: any;
1642
1642
  isNested?: boolean;
1643
1643
  closeOnEscape?: boolean;
1644
+ fullHeight?: boolean;
1644
1645
  };
1645
1646
  interface ModalChildrenProps extends FabricComponent<Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>> {
1646
1647
  children: any;
1647
1648
  }
1648
- declare const Modal: ({ children, onClose, isNested, width, closeOnEscape }: ModalProps) => react_jsx_runtime.JSX.Element;
1649
+ declare const Modal: ({ children, onClose, isNested, width, closeOnEscape, fullHeight, }: ModalProps) => react_jsx_runtime.JSX.Element;
1649
1650
  declare const ModalHeader: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
1650
1651
  declare const ModalBody: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
1651
1652
  declare const ModalFooter: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<ModalChildrenProps | (ModalChildrenProps & react.RefAttributes<react.Component<ModalChildrenProps, any, any>>), StyledFabricComponent<ModalChildrenProps>>> & (string & (Omit<react.ComponentClass<ModalChildrenProps, any>, keyof react.Component<any, {}, any>> | Omit<react.FunctionComponent<ModalChildrenProps>, keyof react.Component<any, {}, any>>));
package/dist/index.js CHANGED
@@ -1126,7 +1126,7 @@
1126
1126
  background: ${e.overlay.background};
1127
1127
  z-index: ${e.zIndex.backdrop};
1128
1128
 
1129
- `));var Yh=r(({children:e,onClose:t,isNested:n=false,width:d,closeOnEscape:s=true})=>(e3.useEffect(()=>{if(!s)return;let u=r(b=>{b.key==="Escape"&&t();},"handleEscape");return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u);}},[s,t]),jsxRuntime.jsx(V6,{onOutsideClick:t,isLocked:!n,children:jsxRuntime.jsx(W9,{$width:d,children:e})})),"Modal"),Xh=X(z1__default.default.div(({theme:e,p:t=e.modal.padding,px:n,pl:d,pr:s})=>{let u=d||n||t,b=s||n||t;return `
1129
+ `));var Yh=r(({children:e,onClose:t,isNested:n=false,width:d,closeOnEscape:s=true,fullHeight:u=false})=>(e3.useEffect(()=>{if(!s)return;let b=r(M=>{M.key==="Escape"&&t();},"handleEscape");return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b);}},[s,t]),jsxRuntime.jsx(V6,{onOutsideClick:t,isLocked:!n,children:jsxRuntime.jsx(W9,{$width:d,$fullHeight:u,children:e})})),"Modal"),Xh=X(z1__default.default.div(({theme:e,p:t=e.modal.padding,px:n,pl:d,pr:s})=>{let u=d||n||t,b=s||n||t;return `
1130
1130
  grid-area: modal-header;
1131
1131
  position: relative;
1132
1132
  &::after {
@@ -1158,7 +1158,7 @@
1158
1158
  background-color: ${e.modal.borderColor};
1159
1159
  }
1160
1160
  ${R(e,"padding",t)};
1161
- `}),{ignoreStyles:["padding"]}),W9=z1__default.default.div(({theme:e,$width:t=e.modal.width})=>`
1161
+ `}),{ignoreStyles:["padding"]}),W9=z1__default.default.div(({theme:e,$width:t=e.modal.width,$fullHeight:n=false})=>`
1162
1162
  display: grid;
1163
1163
  grid-template-areas:
1164
1164
  "modal-header"
@@ -1177,7 +1177,7 @@
1177
1177
  top: 50%;
1178
1178
  left: 50%;
1179
1179
  transform: translate(-50%, -50%);
1180
- height: auto;
1180
+ height: ${n?"90dvh":"auto"};
1181
1181
  max-height: 90dvh;
1182
1182
  width: ${u1(t,e.baseSize)};
1183
1183
  max-width: 90vw;