@madie/madie-design-system 1.2.30 → 1.2.32
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/.babelrc +1 -1
- package/.storybook/.babelrc +1 -1
- package/.storybook/main.js +16 -5
- package/.storybook/preview.js +1 -0
- package/components/MadieDialog/MadieDialog.stories.js +29 -8
- package/components/MadieDialog/index.jsx +65 -66
- package/components/TextField/TextField.stories.js +36 -1
- package/coverage/clover.xml +20 -17
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +15 -15
- package/coverage/lcov-report/react/components/Accordion/index.html +2 -2
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Button/index.html +2 -2
- package/coverage/lcov-report/react/components/Button/index.js.html +4 -4
- package/coverage/lcov-report/react/components/DateField/DateField.jsx.html +2 -2
- package/coverage/lcov-report/react/components/DateField/index.html +2 -2
- package/coverage/lcov-report/react/components/DateTimeField/DateTimeField.jsx.html +2 -2
- package/coverage/lcov-report/react/components/DateTimeField/index.html +2 -2
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Error/error.js.html +2 -2
- package/coverage/lcov-report/react/components/Error/index.html +2 -2
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Footer/LegacyFooterUI.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Footer/footer.js.html +2 -2
- package/coverage/lcov-report/react/components/Footer/index.html +2 -2
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Infotip/index.html +2 -2
- package/coverage/lcov-report/react/components/Infotip/index.js.html +2 -2
- package/coverage/lcov-report/react/components/InputLabel/index.html +2 -2
- package/coverage/lcov-report/react/components/InputLabel/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/MadieAlert/index.html +2 -2
- package/coverage/lcov-report/react/components/MadieAlert/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/MadieDeleteDialog/index.html +2 -2
- package/coverage/lcov-report/react/components/MadieDeleteDialog/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/MadieDialog/index.html +12 -12
- package/coverage/lcov-report/react/components/MadieDialog/index.jsx.html +86 -89
- package/coverage/lcov-report/react/components/MadieDiscardDialog/index.html +2 -2
- package/coverage/lcov-report/react/components/MadieDiscardDialog/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/MadieSpinner/index.html +2 -2
- package/coverage/lcov-report/react/components/MadieSpinner/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/MadieTooltip/index.html +2 -2
- package/coverage/lcov-report/react/components/MadieTooltip/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/MadieTooltipIcon/index.html +2 -2
- package/coverage/lcov-report/react/components/MadieTooltipIcon/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Pagination/index.html +2 -2
- package/coverage/lcov-report/react/components/Pagination/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Popover/index.html +2 -2
- package/coverage/lcov-report/react/components/Popover/index.js.html +2 -2
- package/coverage/lcov-report/react/components/ReadOnlyTextField/index.html +2 -2
- package/coverage/lcov-report/react/components/ReadOnlyTextField/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Select/index.html +2 -2
- package/coverage/lcov-report/react/components/Select/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Tabs/Tab.js.html +2 -2
- package/coverage/lcov-report/react/components/Tabs/index.html +2 -2
- package/coverage/lcov-report/react/components/Tabs/index.js.html +2 -2
- package/coverage/lcov-report/react/components/TextArea/index.html +2 -2
- package/coverage/lcov-report/react/components/TextArea/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/TextField/index.html +2 -2
- package/coverage/lcov-report/react/components/TextField/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Toast/index.html +2 -2
- package/coverage/lcov-report/react/components/Toast/index.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Tooltip/index.html +2 -2
- package/coverage/lcov-report/react/components/Tooltip/index.js.html +2 -2
- package/coverage/lcov-report/react/components/Tooltip/position.js.html +2 -2
- package/coverage/lcov-report/react/index.html +2 -2
- package/coverage/lcov-report/react/index.js.html +2 -2
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +2 -2
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +2 -2
- package/coverage/lcov-report/react/lib/index.html +2 -2
- package/coverage/lcov.info +47 -32
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +40 -63
- package/dist/react/index.js.LICENSE.txt +6 -4
- package/dist/react/index.js.map +1 -1
- package/jest.config.js +13 -184
- package/package-lock.json +22067 -31693
- package/package.json +144 -149
- package/test/components/MadieDialog.test.js +44 -0
package/package.json
CHANGED
|
@@ -1,151 +1,146 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"trim-newlines": "^3.0.1",
|
|
147
|
-
"glob-parent": "^6.0.1",
|
|
148
|
-
"semver": "^7.5.3",
|
|
149
|
-
"optionator": "0.9.3"
|
|
150
|
-
}
|
|
2
|
+
"name": "@madie/madie-design-system",
|
|
3
|
+
"version": "1.2.32",
|
|
4
|
+
"description": "Shared style guide across the Madie program.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"homepage": "https://github.com/MeasureAuthoringTool/madie-design-system",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"prepublishOnly": "npm run build",
|
|
9
|
+
"build": "npm run clean && webpack-cli --progress --color --env production && npm run build-react",
|
|
10
|
+
"dev": "npm run clean && webpack-cli --progress --color --watch --env production=false",
|
|
11
|
+
"clean": "rimraf build && rimraf dist",
|
|
12
|
+
"build-react": "webpack --progress --config webpack.config.react.js",
|
|
13
|
+
"build-react-watch": "webpack --progress --watch --config webpack.config.react.js",
|
|
14
|
+
"start": "npm run build",
|
|
15
|
+
"test": "jest",
|
|
16
|
+
"watch-tests": "cross-env BABEL_ENV=test jest --watch",
|
|
17
|
+
"coverage": "cross-env BABEL_ENV=test jest --coverage",
|
|
18
|
+
"precommit": "npm run format && npm run lint && npm run format-styles",
|
|
19
|
+
"prepush": "npm test",
|
|
20
|
+
"check-format": "prettier --write 'components/**/*.(js|jsx)'",
|
|
21
|
+
"format-test": "prettier --write 'test/**/*.(js|jsx)'",
|
|
22
|
+
"lint": "eslint 'components/**/*.{js,jsx}'",
|
|
23
|
+
"stylelint": "stylelint 'styles/**/*.{css,scss}'",
|
|
24
|
+
"format-styles": "prettier 'styles/**/*.{css,scss}' --write --quiet",
|
|
25
|
+
"storybook": "storybook dev -p 6007",
|
|
26
|
+
"build-storybook": "storybook build",
|
|
27
|
+
"predeploy": "npm run build-storybook",
|
|
28
|
+
"deploy": "gh-pages -d storybook-static"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@babel/cli": "^7.25.6",
|
|
32
|
+
"@babel/core": "^7.25.2",
|
|
33
|
+
"@babel/preset-env": "^7.25.4",
|
|
34
|
+
"@babel/preset-react": "^7.24.7",
|
|
35
|
+
"@babel/register": "^7.24.6",
|
|
36
|
+
"@storybook/addon-a11y": "^8.3.0",
|
|
37
|
+
"@storybook/addon-actions": "^8.3.0",
|
|
38
|
+
"@storybook/addon-backgrounds": "^8.3.0",
|
|
39
|
+
"@storybook/addon-docs": "^8.3.0",
|
|
40
|
+
"@storybook/addon-knobs": "^8.0.1",
|
|
41
|
+
"@storybook/addon-links": "^8.3.0",
|
|
42
|
+
"@storybook/addon-postcss": "^2.0.0",
|
|
43
|
+
"@storybook/addon-storysource": "^8.3.0",
|
|
44
|
+
"@storybook/addon-viewport": "^8.3.0",
|
|
45
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
|
|
46
|
+
"@storybook/addons": "^7.6.17",
|
|
47
|
+
"@storybook/react": "^8.3.0",
|
|
48
|
+
"@storybook/react-webpack5": "^8.3.0",
|
|
49
|
+
"@testing-library/jest-dom": "^6.1.4",
|
|
50
|
+
"@testing-library/react": "^12.1.2",
|
|
51
|
+
"@testing-library/user-event": "^13.5.0",
|
|
52
|
+
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
|
|
53
|
+
"autoprefixer": "^10.4.2",
|
|
54
|
+
"babel-eslint": "^10.1.0",
|
|
55
|
+
"babel-jest": "^27.4.6",
|
|
56
|
+
"babel-loader": "^8.2.3",
|
|
57
|
+
"chai": "^4.3.4",
|
|
58
|
+
"copy-webpack-plugin": "^5.1.2",
|
|
59
|
+
"css-loader": "^7.1.2",
|
|
60
|
+
"enzyme": "^3.11.0",
|
|
61
|
+
"enzyme-to-json": "^3.6.2",
|
|
62
|
+
"eslint": "^7.32.0",
|
|
63
|
+
"eslint-config-prettier": "^6.15.0",
|
|
64
|
+
"eslint-plugin-babel": "^5.3.1",
|
|
65
|
+
"eslint-plugin-prettier": "^3.4.1",
|
|
66
|
+
"eslint-plugin-react": "^7.28.0",
|
|
67
|
+
"feather-icons-react": "^0.4.3",
|
|
68
|
+
"file-loader": "^6.2.0",
|
|
69
|
+
"gh-pages": "^6.0.0",
|
|
70
|
+
"html-webpack-plugin": "^5.5.0",
|
|
71
|
+
"jest": "^29.7.0",
|
|
72
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
73
|
+
"mini-css-extract-plugin": "^0.11.3",
|
|
74
|
+
"moxios": "^0.4.0",
|
|
75
|
+
"node-fetch": "^2.6.7",
|
|
76
|
+
"prettier": "^2.5.1",
|
|
77
|
+
"raw-loader": "^4.0.2",
|
|
78
|
+
"react": "^17.0.2",
|
|
79
|
+
"react-dom": "^17.0.2",
|
|
80
|
+
"react-test-renderer": "^17.0.2",
|
|
81
|
+
"regenerator-runtime": "^0.13.9",
|
|
82
|
+
"rimraf": "^3.0.2",
|
|
83
|
+
"sass": "^1.48.0",
|
|
84
|
+
"sass-loader": "^10.2.1",
|
|
85
|
+
"sinon": "^12.0.1",
|
|
86
|
+
"style-loader": "^1.3.0",
|
|
87
|
+
"svgo-loader": "^4.0.0",
|
|
88
|
+
"webpack": "^5.70.0",
|
|
89
|
+
"webpack-cli": "^4.9.2"
|
|
90
|
+
},
|
|
91
|
+
"repository": {
|
|
92
|
+
"type": "git",
|
|
93
|
+
"url": "git+https://github.com/MeasureAuthoringTool/madie-design-system.git"
|
|
94
|
+
},
|
|
95
|
+
"keywords": [
|
|
96
|
+
"QPP",
|
|
97
|
+
"Quality Payment Program",
|
|
98
|
+
"style",
|
|
99
|
+
"module",
|
|
100
|
+
"CMS",
|
|
101
|
+
"CMSgov"
|
|
102
|
+
],
|
|
103
|
+
"author": "Centers for Medicare & Medicaid Services",
|
|
104
|
+
"license": "CC0-1.0",
|
|
105
|
+
"bugs": {
|
|
106
|
+
"url": "https://github.com/MeasureAuthoringTool/madie-design-system/issues"
|
|
107
|
+
},
|
|
108
|
+
"dependencies": {
|
|
109
|
+
"@cmsgov/design-system": "^5.0.2",
|
|
110
|
+
"@emotion/react": "^11.8.2",
|
|
111
|
+
"@emotion/styled": "^11.8.1",
|
|
112
|
+
"@mui/icons-material": "^6.1.0",
|
|
113
|
+
"@mui/material": "^6.1.0",
|
|
114
|
+
"@mui/styles": "^6.1.0",
|
|
115
|
+
"@mui/system": "^6.1.0",
|
|
116
|
+
"@mui/x-date-pickers": "^7.17.0",
|
|
117
|
+
"@reach/portal": "^0.16.2",
|
|
118
|
+
"@reach/tooltip": "^0.16.2",
|
|
119
|
+
"axios": "^1.7.4",
|
|
120
|
+
"cookie": "^0.4.1",
|
|
121
|
+
"cross-env": "^7.0.3",
|
|
122
|
+
"d3-selection": "^1.4.2",
|
|
123
|
+
"d3-shape": "^1.3.7",
|
|
124
|
+
"dayjs": "^1.11.7",
|
|
125
|
+
"jwt-decode": "^3.1.2",
|
|
126
|
+
"preact": "^10.6.4",
|
|
127
|
+
"prop-types": "^15.8.1",
|
|
128
|
+
"react-draggable": "^4.4.6",
|
|
129
|
+
"react-modal": "^3.14.4",
|
|
130
|
+
"retry": "^0.13.1",
|
|
131
|
+
"svgo": "^3.0.3",
|
|
132
|
+
"what-input": "^5.2.10",
|
|
133
|
+
"xss": "^1.0.10"
|
|
134
|
+
},
|
|
135
|
+
"peerDependencies": {
|
|
136
|
+
"classnames": "^2.3.1"
|
|
137
|
+
},
|
|
138
|
+
"overrides": {
|
|
139
|
+
"trim": ">=0.0.3",
|
|
140
|
+
"webpack": "^5.70.0",
|
|
141
|
+
"trim-newlines": "^3.0.1",
|
|
142
|
+
"glob-parent": "^6.0.1",
|
|
143
|
+
"semver": "^7.5.3",
|
|
144
|
+
"optionator": "0.9.3"
|
|
145
|
+
}
|
|
151
146
|
}
|
|
@@ -99,4 +99,48 @@ describe("Madie Dialog", () => {
|
|
|
99
99
|
expect(onDialogSubmit).toHaveBeenCalledTimes(1);
|
|
100
100
|
});
|
|
101
101
|
});
|
|
102
|
+
|
|
103
|
+
it("It renders a basic dialog with no dialog actions", async () => {
|
|
104
|
+
const onDialogCancel = jest.fn();
|
|
105
|
+
const { queryAllByRole } = render(
|
|
106
|
+
<div>
|
|
107
|
+
<MadieDialog
|
|
108
|
+
title="Basic Dialog"
|
|
109
|
+
form={false}
|
|
110
|
+
dialogProps={{
|
|
111
|
+
open: true,
|
|
112
|
+
onClose: onDialogCancel,
|
|
113
|
+
maxWidth: "sm",
|
|
114
|
+
}}
|
|
115
|
+
cancelButtonProps={undefined}
|
|
116
|
+
continueButtonProps={undefined}
|
|
117
|
+
>
|
|
118
|
+
<div>this is a basic dialog</div>
|
|
119
|
+
</MadieDialog>
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
122
|
+
// only one button should be there i.e. cancel model icon at top right corner
|
|
123
|
+
expect(queryAllByRole("button")).toHaveLength(1);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it("It renders a form dialog with no dialog actions", async () => {
|
|
127
|
+
const onDialogCancel = jest.fn();
|
|
128
|
+
const { queryAllByRole } = render(
|
|
129
|
+
<div>
|
|
130
|
+
<MadieDialog
|
|
131
|
+
title="Basic Dialog"
|
|
132
|
+
form={true}
|
|
133
|
+
dialogProps={{
|
|
134
|
+
open: true,
|
|
135
|
+
onClose: onDialogCancel,
|
|
136
|
+
maxWidth: "sm",
|
|
137
|
+
}}
|
|
138
|
+
>
|
|
139
|
+
<div>this is a form dialog</div>
|
|
140
|
+
</MadieDialog>
|
|
141
|
+
</div>
|
|
142
|
+
);
|
|
143
|
+
// only one button should be there i.e. cancel model icon at top right corner
|
|
144
|
+
expect(queryAllByRole("button")).toHaveLength(1);
|
|
145
|
+
});
|
|
102
146
|
});
|