@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.
Files changed (102) hide show
  1. package/components/AutoComplete/AutoComplete.jsx +1 -0
  2. package/components/MadieDialog/MadieDialog.stories.js +119 -0
  3. package/components/MadieDialog/index.jsx +40 -4
  4. package/components/Modal/HumanReadable.ts +1322 -0
  5. package/components/Modal/Modal.jsx +16 -0
  6. package/components/Modal/Modal.stories.js +41 -0
  7. package/components/Tabs/Tab.js +1 -1
  8. package/dist/browser.js +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/react/index.js +1 -1
  11. package/dist/react/index.js.map +1 -1
  12. package/package.json +1 -1
  13. package/coverage/clover.xml +0 -6
  14. package/coverage/coverage-final.json +0 -1
  15. package/coverage/lcov-report/base.css +0 -224
  16. package/coverage/lcov-report/block-navigation.js +0 -87
  17. package/coverage/lcov-report/favicon.png +0 -0
  18. package/coverage/lcov-report/index.html +0 -101
  19. package/coverage/lcov-report/prettify.css +0 -1
  20. package/coverage/lcov-report/prettify.js +0 -2
  21. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  22. package/coverage/lcov-report/sorter.js +0 -196
  23. package/coverage/lcov.info +0 -0
  24. package/doctor-storybook.log +0 -41
  25. package/migration-storybook.log +0 -329
  26. package/storybook-static/149.65bbc904.iframe.bundle.js +0 -2
  27. package/storybook-static/149.65bbc904.iframe.bundle.js.LICENSE.txt +0 -14
  28. package/storybook-static/164.e319e208c2d3a626e1f5.manager.bundle.js +0 -1
  29. package/storybook-static/192.69f71338.iframe.bundle.js +0 -1
  30. package/storybook-static/198.80608638.iframe.bundle.js +0 -2
  31. package/storybook-static/198.80608638.iframe.bundle.js.LICENSE.txt +0 -31
  32. package/storybook-static/217.b9975326.iframe.bundle.js +0 -2
  33. package/storybook-static/217.b9975326.iframe.bundle.js.LICENSE.txt +0 -12
  34. package/storybook-static/261.70d64bef7770b201fb77.manager.bundle.js +0 -1
  35. package/storybook-static/303.0d9893ef.iframe.bundle.js +0 -1
  36. package/storybook-static/319.3e8dc6b4a7d2f3e67eb0.manager.bundle.js +0 -2
  37. package/storybook-static/319.3e8dc6b4a7d2f3e67eb0.manager.bundle.js.LICENSE.txt +0 -8
  38. package/storybook-static/322.8b797be6.iframe.bundle.js +0 -103
  39. package/storybook-static/322.8b797be6.iframe.bundle.js.LICENSE.txt +0 -140
  40. package/storybook-static/322.8b797be6.iframe.bundle.js.map +0 -1
  41. package/storybook-static/40.df6534995de03601f813.manager.bundle.js +0 -2
  42. package/storybook-static/40.df6534995de03601f813.manager.bundle.js.LICENSE.txt +0 -31
  43. package/storybook-static/45.b37f580f.iframe.bundle.js +0 -2
  44. package/storybook-static/45.b37f580f.iframe.bundle.js.LICENSE.txt +0 -8
  45. package/storybook-static/467.7fabc4cd8819eddb42f9.manager.bundle.js +0 -2
  46. package/storybook-static/467.7fabc4cd8819eddb42f9.manager.bundle.js.LICENSE.txt +0 -12
  47. package/storybook-static/582.ffbf0b74.iframe.bundle.js +0 -1
  48. package/storybook-static/609.e27a5f77.iframe.bundle.js +0 -2
  49. package/storybook-static/609.e27a5f77.iframe.bundle.js.LICENSE.txt +0 -11
  50. package/storybook-static/794.cbe100d1870b4d8a130a.manager.bundle.js +0 -1
  51. package/storybook-static/861.0b692bf7.iframe.bundle.js +0 -1
  52. package/storybook-static/931.51f69825a96d7bce33f5.manager.bundle.js +0 -2
  53. package/storybook-static/931.51f69825a96d7bce33f5.manager.bundle.js.LICENSE.txt +0 -94
  54. package/storybook-static/987.874321cb40e99203aabe.manager.bundle.js +0 -1
  55. package/storybook-static/favicon.ico +0 -0
  56. package/storybook-static/iframe.html +0 -364
  57. package/storybook-static/index.html +0 -59
  58. package/storybook-static/main.07b67595538d689438e4.manager.bundle.js +0 -1
  59. package/storybook-static/main.8ae59f4f.iframe.bundle.js +0 -1
  60. package/storybook-static/project.json +0 -1
  61. package/storybook-static/runtime~main.09b9b14c88359f235007.manager.bundle.js +0 -1
  62. package/storybook-static/runtime~main.c9dcb6d8.iframe.bundle.js +0 -1
  63. package/storybook-static/static/media/Bitter-Bold.091bd4b7.woff +0 -0
  64. package/storybook-static/static/media/Bitter-Bold.24bf01e4.woff2 +0 -0
  65. package/storybook-static/static/media/Bitter-Bold.46bc29e4.ttf +0 -0
  66. package/storybook-static/static/media/Bitter-Bold.790f4f2f.eot +0 -0
  67. package/storybook-static/static/media/Bitter-Italic.1fa5390c.eot +0 -0
  68. package/storybook-static/static/media/Bitter-Italic.25e5675f.woff +0 -0
  69. package/storybook-static/static/media/Bitter-Italic.2eb18f5a.ttf +0 -0
  70. package/storybook-static/static/media/Bitter-Italic.34644574.woff2 +0 -0
  71. package/storybook-static/static/media/Bitter-Regular.4b22b6e8.woff +0 -0
  72. package/storybook-static/static/media/Bitter-Regular.559e7075.eot +0 -0
  73. package/storybook-static/static/media/Bitter-Regular.8db0301b.ttf +0 -0
  74. package/storybook-static/static/media/Bitter-Regular.f4e2f1f1.woff2 +0 -0
  75. package/storybook-static/static/media/FontAwesome.91f80bba.otf +0 -0
  76. package/storybook-static/static/media/OpenSans-Bold-webfont.202d819d.eot +0 -0
  77. package/storybook-static/static/media/OpenSans-Bold-webfont.92e570c6.woff2 +0 -0
  78. package/storybook-static/static/media/OpenSans-Bold-webfont.da71e99a.ttf +0 -0
  79. package/storybook-static/static/media/OpenSans-Bold-webfont.e75949bb.woff +0 -0
  80. package/storybook-static/static/media/OpenSans-Italic-webfont.72daa33a.woff2 +0 -0
  81. package/storybook-static/static/media/OpenSans-Italic-webfont.74ead3a8.woff +0 -0
  82. package/storybook-static/static/media/OpenSans-Italic-webfont.ae19388f.eot +0 -0
  83. package/storybook-static/static/media/OpenSans-Italic-webfont.ec7a2746.ttf +0 -0
  84. package/storybook-static/static/media/OpenSans-Regular-webfont.63a5fa7d.woff +0 -0
  85. package/storybook-static/static/media/OpenSans-Regular-webfont.66451be4.ttf +0 -0
  86. package/storybook-static/static/media/OpenSans-Regular-webfont.7882d20f.eot +0 -0
  87. package/storybook-static/static/media/OpenSans-Regular-webfont.ca4dd835.woff2 +0 -0
  88. package/storybook-static/static/media/OpenSans-Semibold-webfont.17ded75f.woff2 +0 -0
  89. package/storybook-static/static/media/OpenSans-Semibold-webfont.2a5adf6c.woff +0 -0
  90. package/storybook-static/static/media/OpenSans-Semibold-webfont.6059fecb.ttf +0 -0
  91. package/storybook-static/static/media/OpenSans-Semibold-webfont.c9808185.eot +0 -0
  92. package/storybook-static/static/media/Rubik-Bold.31bbd4d2.ttf +0 -0
  93. package/storybook-static/static/media/Rubik-Light.c90e2014.ttf +0 -0
  94. package/storybook-static/static/media/Rubik-Medium.5daa89aa.ttf +0 -0
  95. package/storybook-static/static/media/Rubik-Regular.cdf97d58.ttf +0 -0
  96. package/storybook-static/static/media/arrow-both.a0959e13.svg +0 -3
  97. package/storybook-static/static/media/fontawesome-webfont.1e59d233.ttf +0 -0
  98. package/storybook-static/static/media/fontawesome-webfont.20fd1704.woff2 +0 -0
  99. package/storybook-static/static/media/fontawesome-webfont.8b43027f.eot +0 -0
  100. package/storybook-static/static/media/fontawesome-webfont.c1e38fd9.svg +0 -2671
  101. package/storybook-static/static/media/fontawesome-webfont.f691f37e.woff +0 -0
  102. 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
+ };
@@ -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 24.5px" : "20.5px 24px",
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",