@hexure/ui 1.9.0 → 1.9.1
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/cjs/index.js +11 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Modal/Modal.d.ts +3 -1
- package/dist/esm/index.js +11 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Modal/Modal.d.ts +3 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3787,8 +3787,10 @@ const Wrapper$7 = styled.div `
|
|
|
3787
3787
|
justify-content: center;
|
|
3788
3788
|
`;
|
|
3789
3789
|
const Container$1 = styled.dialog `
|
|
3790
|
-
|
|
3791
|
-
width:
|
|
3790
|
+
width: ${props => (props.$fullscreen ? 'calc(100vw - 80px)' : props.$maxWidth || '900px')};
|
|
3791
|
+
max-width: calc(100vw - 80px);
|
|
3792
|
+
height: ${props => (props.$fullscreen ? 'calc(100vh - 80px)' : 'auto')};
|
|
3793
|
+
max-height: calc(100vh - 80px);
|
|
3792
3794
|
border-radius: 8px;
|
|
3793
3795
|
overflow: hidden;
|
|
3794
3796
|
box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
|
|
@@ -3797,10 +3799,11 @@ const Container$1 = styled.dialog `
|
|
|
3797
3799
|
position: relative;
|
|
3798
3800
|
padding: 0px;
|
|
3799
3801
|
box-sizing: border-box;
|
|
3802
|
+
display: flex;
|
|
3803
|
+
flex-direction: column;
|
|
3800
3804
|
`;
|
|
3801
3805
|
const Header$1 = styled.div `
|
|
3802
|
-
|
|
3803
|
-
top: 0;
|
|
3806
|
+
flex-shrink: 0;
|
|
3804
3807
|
padding: 20px;
|
|
3805
3808
|
border-bottom: 1px solid #e7e6e6;
|
|
3806
3809
|
display: flex;
|
|
@@ -3826,12 +3829,11 @@ const ContentWrapper = styled.div `
|
|
|
3826
3829
|
overflow-x: hidden;
|
|
3827
3830
|
overflow-y: auto;
|
|
3828
3831
|
background: #ffffff;
|
|
3829
|
-
|
|
3832
|
+
flex: 1;
|
|
3830
3833
|
box-sizing: border-box;
|
|
3831
3834
|
`;
|
|
3832
3835
|
const ButtonBar = styled.div `
|
|
3833
|
-
|
|
3834
|
-
bottom: 0;
|
|
3836
|
+
flex-shrink: 0;
|
|
3835
3837
|
background: #ffffff;
|
|
3836
3838
|
padding: 20px;
|
|
3837
3839
|
border-top: 1px solid #e7e6e6;
|
|
@@ -3841,7 +3843,7 @@ const ButtonBar = styled.div `
|
|
|
3841
3843
|
box-sizing: border-box;
|
|
3842
3844
|
`;
|
|
3843
3845
|
const Modal = (_a) => {
|
|
3844
|
-
var { children, title, onClose, maxWidth, steps, primaryButton, secondaryButton, tertiaryButton } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "steps", "primaryButton", "secondaryButton", "tertiaryButton"]);
|
|
3846
|
+
var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "fullscreen", "steps", "primaryButton", "secondaryButton", "tertiaryButton"]);
|
|
3845
3847
|
React.useEffect(() => {
|
|
3846
3848
|
document.onkeydown = e => {
|
|
3847
3849
|
if (e.key === 'Escape') {
|
|
@@ -3853,7 +3855,7 @@ const Modal = (_a) => {
|
|
|
3853
3855
|
};
|
|
3854
3856
|
}, []);
|
|
3855
3857
|
return (React.createElement(Wrapper$7, null,
|
|
3856
|
-
React.createElement(Container$1, Object.assign({ "$maxWidth": maxWidth, open: true }, accessibleProps),
|
|
3858
|
+
React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps),
|
|
3857
3859
|
React.createElement(Header$1, null,
|
|
3858
3860
|
title ? React.createElement(Heading, { type: 'secondary' }, title) : null,
|
|
3859
3861
|
React.createElement(Close, { onClick: onClose },
|