@madie/madie-design-system 1.2.42 → 1.2.45
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/AutoComplete/AutoComplete.jsx +1 -0
- package/components/MadieDialog/MadieDialog.stories.js +119 -0
- package/components/MadieDialog/index.jsx +40 -4
- package/components/Modal/HumanReadable.ts +1322 -0
- package/components/Modal/Modal.jsx +16 -0
- package/components/Modal/Modal.stories.js +41 -0
- package/components/Tabs/Tab.js +1 -1
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/coverage/clover.xml +0 -6
- package/coverage/coverage-final.json +0 -1
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -101
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -0
- package/doctor-storybook.log +0 -41
- package/migration-storybook.log +0 -329
- package/storybook-static/149.65bbc904.iframe.bundle.js +0 -2
- package/storybook-static/149.65bbc904.iframe.bundle.js.LICENSE.txt +0 -14
- package/storybook-static/164.e319e208c2d3a626e1f5.manager.bundle.js +0 -1
- package/storybook-static/192.69f71338.iframe.bundle.js +0 -1
- package/storybook-static/198.80608638.iframe.bundle.js +0 -2
- package/storybook-static/198.80608638.iframe.bundle.js.LICENSE.txt +0 -31
- package/storybook-static/217.b9975326.iframe.bundle.js +0 -2
- package/storybook-static/217.b9975326.iframe.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/261.70d64bef7770b201fb77.manager.bundle.js +0 -1
- package/storybook-static/303.0d9893ef.iframe.bundle.js +0 -1
- package/storybook-static/319.3e8dc6b4a7d2f3e67eb0.manager.bundle.js +0 -2
- package/storybook-static/319.3e8dc6b4a7d2f3e67eb0.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/322.8b797be6.iframe.bundle.js +0 -103
- package/storybook-static/322.8b797be6.iframe.bundle.js.LICENSE.txt +0 -140
- package/storybook-static/322.8b797be6.iframe.bundle.js.map +0 -1
- package/storybook-static/40.df6534995de03601f813.manager.bundle.js +0 -2
- package/storybook-static/40.df6534995de03601f813.manager.bundle.js.LICENSE.txt +0 -31
- package/storybook-static/45.b37f580f.iframe.bundle.js +0 -2
- package/storybook-static/45.b37f580f.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/467.7fabc4cd8819eddb42f9.manager.bundle.js +0 -2
- package/storybook-static/467.7fabc4cd8819eddb42f9.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/582.ffbf0b74.iframe.bundle.js +0 -1
- package/storybook-static/609.e27a5f77.iframe.bundle.js +0 -2
- package/storybook-static/609.e27a5f77.iframe.bundle.js.LICENSE.txt +0 -11
- package/storybook-static/794.cbe100d1870b4d8a130a.manager.bundle.js +0 -1
- package/storybook-static/861.0b692bf7.iframe.bundle.js +0 -1
- package/storybook-static/931.51f69825a96d7bce33f5.manager.bundle.js +0 -2
- package/storybook-static/931.51f69825a96d7bce33f5.manager.bundle.js.LICENSE.txt +0 -94
- package/storybook-static/987.874321cb40e99203aabe.manager.bundle.js +0 -1
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +0 -364
- package/storybook-static/index.html +0 -59
- package/storybook-static/main.07b67595538d689438e4.manager.bundle.js +0 -1
- package/storybook-static/main.8ae59f4f.iframe.bundle.js +0 -1
- package/storybook-static/project.json +0 -1
- package/storybook-static/runtime~main.09b9b14c88359f235007.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.c9dcb6d8.iframe.bundle.js +0 -1
- package/storybook-static/static/media/Bitter-Bold.091bd4b7.woff +0 -0
- package/storybook-static/static/media/Bitter-Bold.24bf01e4.woff2 +0 -0
- package/storybook-static/static/media/Bitter-Bold.46bc29e4.ttf +0 -0
- package/storybook-static/static/media/Bitter-Bold.790f4f2f.eot +0 -0
- package/storybook-static/static/media/Bitter-Italic.1fa5390c.eot +0 -0
- package/storybook-static/static/media/Bitter-Italic.25e5675f.woff +0 -0
- package/storybook-static/static/media/Bitter-Italic.2eb18f5a.ttf +0 -0
- package/storybook-static/static/media/Bitter-Italic.34644574.woff2 +0 -0
- package/storybook-static/static/media/Bitter-Regular.4b22b6e8.woff +0 -0
- package/storybook-static/static/media/Bitter-Regular.559e7075.eot +0 -0
- package/storybook-static/static/media/Bitter-Regular.8db0301b.ttf +0 -0
- package/storybook-static/static/media/Bitter-Regular.f4e2f1f1.woff2 +0 -0
- package/storybook-static/static/media/FontAwesome.91f80bba.otf +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.202d819d.eot +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.92e570c6.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.da71e99a.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.e75949bb.woff +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.72daa33a.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.74ead3a8.woff +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.ae19388f.eot +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.ec7a2746.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.63a5fa7d.woff +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.66451be4.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.7882d20f.eot +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.ca4dd835.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.17ded75f.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.2a5adf6c.woff +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.6059fecb.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.c9808185.eot +0 -0
- package/storybook-static/static/media/Rubik-Bold.31bbd4d2.ttf +0 -0
- package/storybook-static/static/media/Rubik-Light.c90e2014.ttf +0 -0
- package/storybook-static/static/media/Rubik-Medium.5daa89aa.ttf +0 -0
- package/storybook-static/static/media/Rubik-Regular.cdf97d58.ttf +0 -0
- package/storybook-static/static/media/arrow-both.a0959e13.svg +0 -3
- package/storybook-static/static/media/fontawesome-webfont.1e59d233.ttf +0 -0
- package/storybook-static/static/media/fontawesome-webfont.20fd1704.woff2 +0 -0
- package/storybook-static/static/media/fontawesome-webfont.8b43027f.eot +0 -0
- package/storybook-static/static/media/fontawesome-webfont.c1e38fd9.svg +0 -2671
- package/storybook-static/static/media/fontawesome-webfont.f691f37e.woff +0 -0
- package/storybook.log +0 -26
|
@@ -22,6 +22,18 @@ const Modal = ({
|
|
|
22
22
|
ReactModal.setAppElement(appElement);
|
|
23
23
|
}, []);
|
|
24
24
|
|
|
25
|
+
const getWidth = () => {
|
|
26
|
+
if (props.width) {
|
|
27
|
+
return {
|
|
28
|
+
width: props.width,
|
|
29
|
+
maxWidth: "calc(100vw - 2rem)",
|
|
30
|
+
maxHeight: "calc(100vh - 2rem)",
|
|
31
|
+
};
|
|
32
|
+
} else {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
25
37
|
return (
|
|
26
38
|
<ReactModal
|
|
27
39
|
onRequestClose={onRequestClose}
|
|
@@ -30,6 +42,9 @@ const Modal = ({
|
|
|
30
42
|
overlayClassName="qpp-c-modal__overlay"
|
|
31
43
|
bodyOpenClassName="qpp-c-modal__body-open"
|
|
32
44
|
isOpen={isOpen}
|
|
45
|
+
style={{
|
|
46
|
+
content: getWidth(),
|
|
47
|
+
}}
|
|
33
48
|
onAfterOpen={() => {
|
|
34
49
|
// Add heading separator based on overflow
|
|
35
50
|
if (
|
|
@@ -126,6 +141,7 @@ Modal.propTypes = {
|
|
|
126
141
|
onRequestClose: PropTypes.func,
|
|
127
142
|
appElement: PropTypes.string,
|
|
128
143
|
isOpen: PropTypes.bool,
|
|
144
|
+
width: PropTypes.string,
|
|
129
145
|
};
|
|
130
146
|
|
|
131
147
|
Modal.defaultProps = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import Modal from "./index";
|
|
3
3
|
import { withKnobs, boolean, text } from "@storybook/addon-knobs";
|
|
4
|
+
import { humanReadable } from "./HumanReadable";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
title: "Modal",
|
|
@@ -165,3 +166,43 @@ export const WithDesignSystemOverflow = () => {
|
|
|
165
166
|
</div>
|
|
166
167
|
);
|
|
167
168
|
};
|
|
169
|
+
|
|
170
|
+
export const WithDesignSystemOverflowForHR = () => {
|
|
171
|
+
const [open, openModal, closeModal] = useModal();
|
|
172
|
+
const knobIsOpen = boolean("isOpen", false);
|
|
173
|
+
|
|
174
|
+
const hr = humanReadable();
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
<div className="qpp-u-padding--12">
|
|
178
|
+
<button className="qpp-c-button" onClick={openModal}>
|
|
179
|
+
Open Modal
|
|
180
|
+
</button>
|
|
181
|
+
|
|
182
|
+
<div data-testid="view-hr-modal">
|
|
183
|
+
<Modal
|
|
184
|
+
useDesignSystem
|
|
185
|
+
isOpen={open || knobIsOpen}
|
|
186
|
+
title="Human Readable"
|
|
187
|
+
onRequestClose={closeModal}
|
|
188
|
+
width="75rem"
|
|
189
|
+
primary={{
|
|
190
|
+
title: "Yes, go for it",
|
|
191
|
+
onClick: () => {
|
|
192
|
+
console.log("submit");
|
|
193
|
+
closeModal();
|
|
194
|
+
},
|
|
195
|
+
}}
|
|
196
|
+
secondary={{
|
|
197
|
+
title: "No, take me back",
|
|
198
|
+
}}
|
|
199
|
+
>
|
|
200
|
+
<div
|
|
201
|
+
className="modal-body"
|
|
202
|
+
dangerouslySetInnerHTML={{ __html: hr }}
|
|
203
|
+
/>
|
|
204
|
+
</Modal>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
);
|
|
208
|
+
};
|
package/components/Tabs/Tab.js
CHANGED
|
@@ -43,7 +43,7 @@ const Tab = ({ type, orientation, size, ...rest }) => {
|
|
|
43
43
|
height: size === "standard" ? "48px" : "60px",
|
|
44
44
|
fontFamily: "Rubik, sans serif",
|
|
45
45
|
fontWeight: 400,
|
|
46
|
-
padding: size === "standard" ? "14.5px
|
|
46
|
+
padding: size === "standard" ? "14.5px 24px" : "20.5px 24px",
|
|
47
47
|
textTransform: "none",
|
|
48
48
|
fontSize: "16px",
|
|
49
49
|
alignItems: orientation === "vertical" && "flex-start",
|