@madie/madie-design-system 2.0.0 → 2.0.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.
Files changed (77) hide show
  1. package/.babelrc +14 -2
  2. package/.storybook/preview.js +1 -1
  3. package/components/Accordion/index.jsx +32 -36
  4. package/components/AutoComplete/AutoComplete.jsx +1 -16
  5. package/components/Button/Button.stories.js +0 -5
  6. package/components/Button/index.js +34 -44
  7. package/components/DateField/DateField.jsx +1 -14
  8. package/components/DateTimeField/DateTimeField.jsx +1 -9
  9. package/components/InputLabel/index.jsx +1 -6
  10. package/components/Instant/index.jsx +0 -16
  11. package/components/Link/index.js +42 -0
  12. package/components/MadieAlert/index.jsx +1 -40
  13. package/components/MadieConfirmDialog/MadieConfirmDialog.stories.js +0 -5
  14. package/components/MadieConfirmDialog/index.jsx +0 -8
  15. package/components/MadieDeleteDialog/MadieDeleteDialog.stories.js +0 -6
  16. package/components/MadieDeleteDialog/index.jsx +0 -7
  17. package/components/MadieDialog/MadieDialog.stories.js +0 -5
  18. package/components/MadieDialog/index.jsx +0 -21
  19. package/components/MadieDiscardDialog/MadieDiscardDialog.stories.js +0 -5
  20. package/components/MadieDiscardDialog/index.jsx +0 -7
  21. package/components/MadieSpinner/MadieSpinner.stories.js +0 -6
  22. package/components/MadieSpinner/index.jsx +0 -5
  23. package/components/MadieTooltip/index.jsx +0 -6
  24. package/components/MadieTooltipIcon/index.jsx +0 -5
  25. package/components/Modal/Modal.jsx +31 -43
  26. package/components/Modal/index.jsx +6 -8
  27. package/components/NumberInput/NumberInput.stories.js +0 -5
  28. package/components/NumberInput/index.jsx +0 -13
  29. package/components/Pagination/index.jsx +0 -17
  30. package/components/Popover/index.js +0 -23
  31. package/components/RadioButton/RadioButton.jsx +1 -13
  32. package/components/ReadOnlyTextField/ReadOnlyTextField.stories.js +0 -6
  33. package/components/ReadOnlyTextField/index.jsx +0 -8
  34. package/components/RichTextEditor/index.jsx +0 -15
  35. package/components/SanitizedContent/index.jsx +0 -8
  36. package/components/Search/index.js +26 -40
  37. package/components/Select/Select.stories.js +0 -4
  38. package/components/Select/index.jsx +1 -16
  39. package/components/Tabs/Tab.js +29 -25
  40. package/components/Tabs/TabPanel.js +15 -19
  41. package/components/Tabs/Tabs.stories.js +14 -50
  42. package/components/Tabs/index.js +10 -28
  43. package/components/TextArea/TextArea.stories.js +0 -6
  44. package/components/TextArea/index.jsx +1 -13
  45. package/components/TextField/TextField.stories.js +0 -6
  46. package/components/TextField/index.jsx +1 -16
  47. package/components/TimeField/TimeField.jsx +0 -10
  48. package/components/Toast/index.jsx +0 -14
  49. package/components/TruncateText/index.js +0 -8
  50. package/components/{index.js → index.mjs} +37 -33
  51. package/dist/index.js +3 -1
  52. package/dist/index.js.LICENSE.txt +16 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/react/index.html +1 -1
  55. package/dist/react/index.mjs +103 -0
  56. package/dist/react/{index.js.LICENSE.txt → index.mjs.LICENSE.txt} +0 -52
  57. package/dist/react/index.mjs.map +1 -0
  58. package/dist/react/package.json +1 -0
  59. package/{eslint.config.js → eslint.config.cjs} +3 -0
  60. package/jest.config.mjs +10 -0
  61. package/lib/Chevron.jsx +2 -10
  62. package/package.json +17 -10
  63. package/styles/_main.scss +4 -3
  64. package/test/components/Button.test.js +6 -16
  65. package/test/components/Search.test.js +1 -1
  66. package/test/components/TruncateText.test.js +1 -1
  67. package/webpack.config.mjs +79 -0
  68. package/webpack.config.react.mjs +72 -0
  69. package/components/NotificationBanner/NotificationBanner.stories.js +0 -29
  70. package/components/NotificationBanner/index.js +0 -279
  71. package/components/UnwrappedSpinner/index.js +0 -8
  72. package/dist/browser.js +0 -1
  73. package/dist/react/index.js +0 -316
  74. package/dist/react/index.js.map +0 -1
  75. package/jest.config.js +0 -17
  76. package/webpack.config.js +0 -123
  77. package/webpack.config.react.js +0 -104
package/.babelrc CHANGED
@@ -1,4 +1,16 @@
1
1
  {
2
- "presets": ["@babel/preset-react", "@babel/preset-env"],
3
- "plugins": ["@babel/plugin-transform-modules-umd", "@babel/plugin-transform-class-properties"]
2
+ "presets": [
3
+ ["@babel/preset-react", { "runtime": "automatic" }],
4
+ ["@babel/preset-env", { "modules": false }]
5
+ ],
6
+ "plugins": [
7
+ "@babel/plugin-proposal-class-properties"
8
+ ],
9
+ "env": {
10
+ "test": {
11
+ "presets": [
12
+ ["@babel/preset-env", { "targets": { "node": "current" } }]
13
+ ]
14
+ }
15
+ }
4
16
  }
@@ -3,4 +3,4 @@ import "../../react/styles/_main.scss";
3
3
  export const parameters = {
4
4
  layout: "fullscreen",
5
5
  };
6
- export const tags = ["autodocs"];
6
+ export const tags = ["autodocs"];
@@ -1,17 +1,29 @@
1
1
  import React, { useState, useRef, useEffect } from "react";
2
- import PropTypes from "prop-types";
3
2
  import { Chevron } from "../../lib/Chevron.jsx";
4
3
 
5
- const Accordion = (props) => {
4
+ /**
5
+ * @param {{
6
+ * title?: string,
7
+ * subTitle?: string,
8
+ * children: React.ReactNode,
9
+ * centerItem?: string,
10
+ * rightItem?: string,
11
+ * isOpen?: boolean
12
+ * }} props
13
+ */
14
+ const Accordion = ({
15
+ title = "",
16
+ subTitle,
17
+ children,
18
+ centerItem,
19
+ rightItem,
20
+ isOpen = false,
21
+ }) => {
6
22
  const content = useRef(null);
7
- const [setActive, setActiveState] = useState(props.isOpen ? "active" : "");
23
+ const [setActive, setActiveState] = useState(isOpen ? "active" : "");
8
24
  const ariaPressed = setActive ? "true" : "false";
9
- const getHeight = (node) => {
10
- if (node) {
11
- return `${node.scrollHeight}px`;
12
- }
13
- return "auto";
14
- };
25
+
26
+ const getHeight = (node) => (node ? `${node.scrollHeight}px` : "auto");
15
27
  const height = setActive ? getHeight(content.current) : "0px";
16
28
  const rotate = setActive ? "accordion-icon rotate" : "accordion-icon";
17
29
 
@@ -28,37 +40,37 @@ const Accordion = (props) => {
28
40
  }
29
41
 
30
42
  useEffect(() => {
31
- if (props.isOpen) {
43
+ if (isOpen) {
32
44
  openAccordion();
33
45
  } else {
34
46
  closeAccordion();
35
47
  }
36
- }, [props.isOpen]);
48
+ }, [isOpen]);
37
49
 
38
50
  return (
39
51
  <div className="accordion-section" data-testid="accordion">
40
52
  <button
41
53
  className={`accordion ${setActive}`}
42
- aria-label={props.title}
54
+ aria-label={title}
43
55
  aria-pressed={ariaPressed}
44
56
  aria-expanded={ariaPressed}
45
57
  tabIndex="0"
46
58
  onClick={toggleAccordion}
47
59
  >
48
60
  <div className="accordion-left-title">
49
- <p className="accordion-title">{props.title}</p>
50
- {props.subTitle && (
51
- <p className="accordion-subtitle">{props.subTitle}</p>
61
+ <p className="accordion-title">{title}</p>
62
+ {subTitle && (
63
+ <p className="accordion-subtitle">{subTitle}</p>
52
64
  )}
53
65
  </div>
54
- {props.centerItem && (
66
+ {centerItem && (
55
67
  <div className="accordion-center">
56
- <p>{props.centerItem}</p>
68
+ <p>{centerItem}</p>
57
69
  </div>
58
70
  )}
59
- {props.rightItem && (
71
+ {rightItem && (
60
72
  <div className="accordion-right">
61
- <p>{props.rightItem}</p>
73
+ <p>{rightItem}</p>
62
74
  </div>
63
75
  )}
64
76
  <div className="chevron-container">
@@ -70,26 +82,10 @@ const Accordion = (props) => {
70
82
  style={{ maxHeight: height }}
71
83
  className="accordion-content"
72
84
  >
73
- <div className="accordion-text dashed-border">
74
- {props.children}
75
- </div>
85
+ <div className="accordion-text dashed-border">{children}</div>
76
86
  </div>
77
87
  </div>
78
88
  );
79
89
  };
80
90
 
81
- Accordion.propTypes = {
82
- title: PropTypes.string.isRequired,
83
- subTitle: PropTypes.string,
84
- children: PropTypes.any.isRequired,
85
- centerItem: PropTypes.string,
86
- rightItem: PropTypes.string,
87
- isOpen: PropTypes.bool,
88
- };
89
-
90
- Accordion.defaultProps = {
91
- title: "",
92
- isOpen: false,
93
- };
94
-
95
91
  export default Accordion;
@@ -6,11 +6,10 @@ import {
6
6
  TextField,
7
7
  Checkbox,
8
8
  } from "@mui/material";
9
- import PropTypes from "prop-types";
10
9
  import InputLabel from "../InputLabel";
11
10
  import CheckBoxOutlineBlankIcon from "@mui/icons-material/CheckBoxOutlineBlank";
12
11
  import CheckBoxIcon from "@mui/icons-material/CheckBox";
13
- import { ReadOnlyTextField } from "../index";
12
+ import ReadOnlyTextField from "../ReadOnlyTextField";
14
13
  import _ from "lodash";
15
14
 
16
15
  const autoCompleteStyles = {
@@ -244,18 +243,4 @@ const AutoComplete = ({
244
243
  );
245
244
  };
246
245
 
247
- AutoComplete.propTypes = {
248
- id: PropTypes.string,
249
- dataTestId: PropTypes.string,
250
- placeholder: PropTypes.string,
251
- required: PropTypes.bool,
252
- disabled: PropTypes.bool,
253
- multiple: PropTypes.bool,
254
- error: PropTypes.bool,
255
- label: PropTypes.string,
256
- helperText: PropTypes.string,
257
- options: PropTypes.arrayOf(PropTypes.element),
258
- onChange: PropTypes.any,
259
- };
260
-
261
246
  export default AutoComplete;
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import FeatherIcon from "feather-icons-react";
4
3
 
5
4
  import Button, { TextButton } from "./index";
@@ -12,10 +11,6 @@ export default {
12
11
  const Container = ({ className = "", children }) => (
13
12
  <div className={`qppds qpp-u-padding--16 ${className}`}>{children}</div>
14
13
  );
15
- Container.propTypes = {
16
- className: PropTypes.string,
17
- children: PropTypes.node,
18
- };
19
14
 
20
15
  export const Primary = () => (
21
16
  <div>
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
 
4
3
  const VARIANTS = [
5
4
  "secondary",
@@ -14,27 +13,42 @@ const VARIANTS = [
14
13
  ];
15
14
  const SIZES = ["big"];
16
15
 
16
+ /**
17
+ * @param {{
18
+ * children?: React.ReactNode,
19
+ * className?: string,
20
+ * href?: string,
21
+ * loading?: boolean,
22
+ * onClick?: () => void,
23
+ * size?: string | null,
24
+ * type?: string,
25
+ * variant?: string | null,
26
+ * [key: string]: any
27
+ * }} props
28
+ */
17
29
  const Button = ({
18
- children,
19
- className,
20
- href,
21
- loading,
22
- onClick,
23
- size,
24
- variant,
25
- type,
30
+ children = null,
31
+ className = "",
32
+ href = "",
33
+ loading = false,
34
+ onClick = () => null,
35
+ size = null,
36
+ type = "button",
37
+ variant = null,
26
38
  ...rest
27
39
  }) => {
28
40
  let btnClass = "qpp-c-button";
29
41
 
30
42
  if (VARIANTS.includes(variant)) {
31
- btnClass = btnClass.concat(" ", `qpp-c-button--${variant}`);
43
+ btnClass += ` qpp-c-button--${variant}`;
32
44
  }
45
+
33
46
  if (SIZES.includes(size)) {
34
- btnClass = btnClass.concat(" ", `qpp-c-button--${size}`);
47
+ btnClass += ` qpp-c-button--${size}`;
35
48
  }
49
+
36
50
  if (className) {
37
- btnClass = btnClass.concat(" ", className);
51
+ btnClass += ` ${className}`;
38
52
  }
39
53
 
40
54
  if (href) {
@@ -42,17 +56,18 @@ const Button = ({
42
56
  <a
43
57
  href={href}
44
58
  data-testid="ds-btn"
45
- className={btnClass || ""}
59
+ className={btnClass}
46
60
  onClick={onClick}
47
61
  >
48
62
  {children}
49
63
  </a>
50
64
  );
51
65
  }
66
+
52
67
  return (
53
68
  <button
54
69
  data-testid="ds-btn"
55
- className={btnClass || ""}
70
+ className={btnClass}
56
71
  onClick={onClick}
57
72
  disabled={loading}
58
73
  type={type}
@@ -63,38 +78,13 @@ const Button = ({
63
78
  );
64
79
  };
65
80
 
66
- Button.propTypes = {
67
- children: PropTypes.node,
68
- className: PropTypes.string,
69
- href: PropTypes.string,
70
- loading: PropTypes.bool,
71
- onClick: PropTypes.func,
72
- size: PropTypes.oneOf(SIZES),
73
- type: PropTypes.string,
74
- variant: PropTypes.oneOf(VARIANTS),
75
- };
76
-
77
- Button.defaultProps = {
78
- children: false,
79
- className: "",
80
- href: "",
81
- loading: false,
82
- onClick: () => null,
83
- size: null,
84
- type: "button",
85
- variant: null,
86
- };
87
-
81
+ /**
82
+ * @param {{
83
+ * className?: string
84
+ * } & React.ComponentProps<typeof Button>} props
85
+ */
88
86
  export const TextButton = ({ className = "", ...props }) => (
89
87
  <Button className={`qpp-c-button--text ${className}`} {...props} />
90
88
  );
91
89
 
92
- TextButton.propTypes = {
93
- className: PropTypes.string,
94
- };
95
-
96
- TextButton.defaultProps = {
97
- className: "",
98
- };
99
-
100
90
  export default Button;
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import TextField from "../TextField";
4
3
  import { Box } from "@mui/material";
5
4
  import { DatePicker } from "@mui/x-date-pickers/DatePicker";
@@ -7,7 +6,7 @@ import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
7
6
  import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
8
7
  import dayjs from "dayjs";
9
8
  import utc from "dayjs/plugin/utc";
10
- import { ReadOnlyTextField } from "../index";
9
+ import ReadOnlyTextField from "../ReadOnlyTextField";
11
10
 
12
11
  dayjs.extend(utc);
13
12
  dayjs.utc();
@@ -112,17 +111,5 @@ const DateField = ({
112
111
  </LocalizationProvider>
113
112
  );
114
113
  };
115
- DateField.propTypes = {
116
- label: PropTypes.string.isRequired,
117
- value: PropTypes.object,
118
- handleDateChange: PropTypes.func.isRequired,
119
- disabled: PropTypes.bool,
120
- id: PropTypes.string,
121
- error: PropTypes.bool,
122
- helperText: PropTypes.string,
123
- required: PropTypes.bool,
124
- containerSx: PropTypes.object,
125
- textFieldSx: PropTypes.object,
126
- };
127
114
 
128
115
  export default DateField;
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import TextField from "../TextField";
4
3
  import { DateTimePicker } from "@mui/x-date-pickers/DateTimePicker";
5
4
  import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
@@ -8,7 +7,7 @@ import dayjs from "dayjs";
8
7
  import utc from "dayjs/plugin/utc";
9
8
 
10
9
  import { FormControl } from "@mui/material";
11
- import { ReadOnlyTextField } from "../index";
10
+ import ReadOnlyTextField from "../ReadOnlyTextField";
12
11
 
13
12
  dayjs.extend(utc);
14
13
  dayjs.utc();
@@ -93,12 +92,5 @@ const DateTimeField = ({
93
92
  </FormControl>
94
93
  );
95
94
  };
96
- DateTimeField.propTypes = {
97
- id: PropTypes.string,
98
- dateTimeValue: PropTypes.object,
99
- handleDateTimeChange: PropTypes.func.isRequired,
100
- label: PropTypes.string.isRequired,
101
- disabled: PropTypes.bool,
102
- };
103
95
 
104
96
  export default DateTimeField;
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { InputLabel as MUIInputLabel } from "@mui/material";
3
- import PropTypes from "prop-types";
4
3
 
5
4
  const Label = ({ required, disabled, error, ...rest }) => {
6
5
  return (
@@ -45,9 +44,5 @@ const Label = ({ required, disabled, error, ...rest }) => {
45
44
  />
46
45
  );
47
46
  };
48
- Label.propTypes = {
49
- required: PropTypes.bool.isRequired,
50
- disabled: PropTypes.bool.isRequired,
51
- error: PropTypes.bool,
52
- };
47
+
53
48
  export default Label;
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import TextField from "../TextField";
4
3
  import { DatePicker } from "@mui/x-date-pickers/DatePicker";
5
4
  import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
@@ -249,19 +248,4 @@ const Instant = ({
249
248
  );
250
249
  };
251
250
 
252
- Instant.propTypes = {
253
- id: PropTypes.string,
254
- placeholder: PropTypes.string,
255
- disabled: PropTypes.bool,
256
- required: PropTypes.bool,
257
- dateTimeValue: PropTypes.any,
258
- handleDateTimeChange: PropTypes.function,
259
- textFieldSx: PropTypes.any,
260
- dateFieldSx: PropTypes.any,
261
- error: PropTypes.bool,
262
- helperText: PropTypes.string,
263
- datePickerProps: PropTypes.any,
264
- onBlur: PropTypes.any,
265
- };
266
-
267
251
  export default Instant;
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+
3
+ const VARIANTS = ["white", "gray"];
4
+
5
+ const DSLink = ({
6
+ className = "",
7
+ href = "",
8
+ download = false,
9
+ ariaLabel = null,
10
+ onClick = () => null,
11
+ children = null,
12
+ variant = null,
13
+ ...rest
14
+ }) => {
15
+ let linkClass = "qpp-c-link";
16
+
17
+ if (VARIANTS.includes(variant)) {
18
+ linkClass +=
19
+ variant === "gray"
20
+ ? " qpp-u-color--gray-60"
21
+ : ` qpp-u-color--${variant}`;
22
+ }
23
+
24
+ if (className) {
25
+ linkClass += ` ${className}`;
26
+ }
27
+
28
+ return (
29
+ <a
30
+ aria-label={ariaLabel}
31
+ className={linkClass}
32
+ href={href}
33
+ download={download}
34
+ onClick={onClick}
35
+ {...rest}
36
+ >
37
+ {children}
38
+ </a>
39
+ );
40
+ };
41
+
42
+ export default DSLink;
@@ -12,7 +12,6 @@ import { IconButton } from "@mui/material";
12
12
  import ClearIcon from "@mui/icons-material/Clear";
13
13
  import Toast from "../Toast/index";
14
14
  import classNames from "classnames";
15
- import PropTypes from "prop-types";
16
15
 
17
16
  // Define icon mapping outside component to avoid recreation on each render
18
17
  const typeToIconMap = {
@@ -144,15 +143,6 @@ const ActionButton = ({ tooltip, onClick, icon, testId, sx }) => (
144
143
  </Tooltip>
145
144
  );
146
145
 
147
- // Add PropTypes for ActionButton
148
- ActionButton.propTypes = {
149
- tooltip: PropTypes.string.isRequired,
150
- onClick: PropTypes.func.isRequired,
151
- icon: PropTypes.node.isRequired,
152
- testId: PropTypes.string.isRequired,
153
- sx: PropTypes.object,
154
- };
155
-
156
146
  const MadieAlert = ({
157
147
  type = "warning",
158
148
  visible = true,
@@ -161,7 +151,7 @@ const MadieAlert = ({
161
151
  minimizeAlerts = false,
162
152
  alertProps,
163
153
  closeButtonProps,
164
- copyButton,
154
+ copyButton = false,
165
155
  alerts = null,
166
156
  }) => {
167
157
  // Consolidate related state
@@ -370,33 +360,4 @@ const MadieAlert = ({
370
360
  );
371
361
  };
372
362
 
373
- // PropTypes definition
374
- MadieAlert.propTypes = {
375
- type: PropTypes.string,
376
- visible: PropTypes.bool,
377
- content: PropTypes.node,
378
- canClose: PropTypes.bool,
379
- alertProps: PropTypes.object,
380
- closeButtonProps: PropTypes.object,
381
- copyButton: PropTypes.bool,
382
- minimizeAlerts: PropTypes.bool,
383
- alerts: PropTypes.arrayOf(
384
- PropTypes.shape({
385
- type: PropTypes.string,
386
- visible: PropTypes.bool,
387
- content: PropTypes.node,
388
- canClose: PropTypes.bool,
389
- alertProps: PropTypes.object,
390
- closeButtonProps: PropTypes.object,
391
- copyButton: PropTypes.bool,
392
- }),
393
- ),
394
- };
395
-
396
- MadieAlert.defaultProps = {
397
- copyButton: false,
398
- minimizeAlerts: false,
399
- alerts: null,
400
- };
401
-
402
363
  export default MadieAlert;
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from "react";
2
- import PropTypes from "prop-types";
3
2
  import MadieConfirmDialog from "./index";
4
3
  import Button from "../Button";
5
4
 
@@ -13,10 +12,6 @@ const Wrapper = ({ children }) => (
13
12
  {children}
14
13
  </div>
15
14
  );
16
- Wrapper.propTypes = {
17
- className: PropTypes.string,
18
- children: PropTypes.node,
19
- };
20
15
 
21
16
  export const ConfirmDialog = () => {
22
17
  const [open, setOpen] = useState(false);
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import ErrorIcon from "@mui/icons-material/Error";
4
3
  import MadieDialog from "../MadieDialog";
5
4
 
@@ -53,12 +52,5 @@ const MadieConfirmDialog = ({
53
52
  </div>
54
53
  </MadieDialog>
55
54
  );
56
- MadieConfirmDialog.propTypes = {
57
- open: PropTypes.bool,
58
- onClose: PropTypes.func,
59
- onContinue: PropTypes.func,
60
- action: PropTypes.string,
61
- warning: PropTypes.string,
62
- };
63
55
 
64
56
  export default MadieConfirmDialog;
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from "react";
2
- import PropTypes from "prop-types";
3
2
  import MadieDeleteDialog from "./index";
4
3
  import Button from "../Button";
5
4
 
@@ -13,11 +12,6 @@ const Wrapper = ({ children }) => (
13
12
  {children}
14
13
  </div>
15
14
  );
16
- Wrapper.propTypes = {
17
- className: PropTypes.string,
18
- children: PropTypes.node,
19
- };
20
-
21
15
  export const DeleteDialog = () => {
22
16
  const [open, setOpen] = useState(false);
23
17
  const onClose = () => setOpen(false);
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import ErrorIcon from "@mui/icons-material/Error";
4
3
  import MadieDialog from "../MadieDialog";
5
4
 
@@ -47,10 +46,4 @@ const MadieDeleteDialog = ({
47
46
  </MadieDialog>
48
47
  );
49
48
 
50
- MadieDeleteDialog.propTypes = {
51
- open: PropTypes.bool,
52
- onClose: PropTypes.func,
53
- onContinue: PropTypes.func,
54
- };
55
-
56
49
  export default MadieDeleteDialog;
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from "react";
2
- import PropTypes from "prop-types";
3
2
  import MadieDialog from "./index";
4
3
  import TextArea from "../TextArea";
5
4
  import Select from "../Select";
@@ -17,10 +16,6 @@ const Wrapper = ({ children }) => (
17
16
  {children}
18
17
  </div>
19
18
  );
20
- Wrapper.propTypes = {
21
- className: PropTypes.string,
22
- children: PropTypes.node,
23
- };
24
19
 
25
20
  export const Dialog = () => {
26
21
  const [open, setOpen] = useState(false);
@@ -1,5 +1,4 @@
1
1
  import React, { useState, useRef } from "react";
2
- import PropTypes from "prop-types";
3
2
  import Draggable from "react-draggable";
4
3
  import CloseIcon from "@mui/icons-material/Close";
5
4
  import {
@@ -337,24 +336,4 @@ const MadieDialog = ({
337
336
  );
338
337
  };
339
338
 
340
- MadieDialog.propTypes = {
341
- required: PropTypes.bool,
342
- form: PropTypes.bool,
343
- title: PropTypes.string,
344
- dialogProps: PropTypes.object,
345
- cancelButtonProps: PropTypes.object,
346
- continueButtonProps: PropTypes.object,
347
- children: PropTypes.object,
348
- maxWidth: PropTypes.string,
349
- };
350
-
351
- DraggablePaper.propTypes = {
352
- children: PropTypes.object,
353
- };
354
-
355
- Actions.propTypes = {
356
- onClose: PropTypes.any,
357
- cancelButtonProps: PropTypes.object,
358
- continueButtonProps: PropTypes.object,
359
- };
360
339
  export default MadieDialog;
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from "react";
2
- import PropTypes from "prop-types";
3
2
  import MadieDiscardDialog from "./index";
4
3
  import Button from "../Button";
5
4
 
@@ -13,10 +12,6 @@ const Wrapper = ({ children }) => (
13
12
  {children}
14
13
  </div>
15
14
  );
16
- Wrapper.propTypes = {
17
- className: PropTypes.string,
18
- children: PropTypes.node,
19
- };
20
15
 
21
16
  export const DiscardDialog = () => {
22
17
  const [open, setOpen] = useState(false);
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import PropTypes from "prop-types";
3
2
  import ErrorIcon from "@mui/icons-material/Error";
4
3
  import MadieDialog from "../MadieDialog";
5
4
 
@@ -40,10 +39,4 @@ const MadieDiscardDialog = ({ open, onClose, onContinue }) => (
40
39
  </MadieDialog>
41
40
  );
42
41
 
43
- MadieDiscardDialog.propTypes = {
44
- open: PropTypes.bool,
45
- onClose: PropTypes.func,
46
- onContinue: PropTypes.func,
47
- };
48
-
49
42
  export default MadieDiscardDialog;