@madie/madie-design-system 2.0.0 → 2.0.2

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 (78) 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 +24 -5
  16. package/components/MadieDeleteDialog/index.jsx +18 -8
  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 +18 -10
  63. package/styles/_main.scss +4 -3
  64. package/test/components/Button.test.js +6 -16
  65. package/test/components/MadieDeleteDialog.test.js +30 -1
  66. package/test/components/Search.test.js +1 -1
  67. package/test/components/TruncateText.test.js +1 -1
  68. package/webpack.config.mjs +79 -0
  69. package/webpack.config.react.mjs +72 -0
  70. package/components/NotificationBanner/NotificationBanner.stories.js +0 -29
  71. package/components/NotificationBanner/index.js +0 -279
  72. package/components/UnwrappedSpinner/index.js +0 -8
  73. package/dist/browser.js +0 -1
  74. package/dist/react/index.js +0 -316
  75. package/dist/react/index.js.map +0 -1
  76. package/jest.config.js +0 -17
  77. package/webpack.config.js +0 -123
  78. package/webpack.config.react.js +0 -104
package/jest.config.js DELETED
@@ -1,17 +0,0 @@
1
- module.exports = {
2
- roots: ["<rootDir>"],
3
- modulePathIgnorePatterns: ["<rootDir>/dist/"],
4
- testEnvironment: "jsdom",
5
- transform: {
6
- "^.+\\.(j|t)sx?$": "babel-jest",
7
- },
8
- setupFilesAfterEnv: ["@testing-library/jest-dom"],
9
- globals: {
10
- "ts-jest": {
11
- tsconfig: {
12
- jsx: "react-jsx",
13
- },
14
- useEsm: true,
15
- },
16
- },
17
- };
package/webpack.config.js DELETED
@@ -1,123 +0,0 @@
1
- const path = require("path");
2
- const webpack = require("webpack");
3
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4
- const TerserPlugin = require("terser-webpack-plugin");
5
-
6
- const pkg = require("./package.json");
7
- const entry = ["./index.js"];
8
-
9
- const _module = {
10
- rules: [
11
- {
12
- test: /\.(js|jsx)?$/,
13
- loader: "babel-loader",
14
- exclude: /node_modules/,
15
- },
16
- {
17
- test: /\.scss$/,
18
- use: [
19
- {
20
- loader: MiniCssExtractPlugin.loader,
21
- },
22
- "css-loader",
23
- {
24
- loader: "sass-loader",
25
- options: {
26
- sassOptions: {
27
- includePaths: ["styles"],
28
- },
29
- },
30
- },
31
- "sass-loader",
32
- ],
33
- exclude: /node_modules/,
34
- },
35
- {
36
- test: /\.(ttf|eot|woff|otf|woff2)$/,
37
- loader: "file-loader",
38
- options: {
39
- name: "fonts/[name].[ext]",
40
- },
41
- },
42
- {
43
- test: /\.svg$/,
44
- use: [
45
- "raw-loader",
46
- {
47
- loader: "svgo-loader",
48
- options: {
49
- plugins: [
50
- { removeTitle: true },
51
- { convertColors: { shorthex: false } },
52
- { convertPathData: false },
53
- ],
54
- },
55
- },
56
- ],
57
- },
58
- ],
59
- };
60
-
61
- const plugins = [
62
- new MiniCssExtractPlugin({
63
- filename: "default.css",
64
- }),
65
- new webpack.DefinePlugin({
66
- "process.env": {
67
- NODE_ENV: JSON.stringify("production"),
68
- },
69
- }),
70
- new webpack.DefinePlugin({
71
- buildVersion: JSON.stringify(pkg.version),
72
- }),
73
- ];
74
-
75
- const resolve = {
76
- extensions: [".js", ".jsx", ".json", ".svg", "*"],
77
- alias: {
78
- react: "preact/compat",
79
- "react-dom": "preact/compat",
80
- },
81
- };
82
-
83
- const optimization = {
84
- minimizer: [new TerserPlugin()],
85
- };
86
-
87
- const defaultConfig = (env, argv) => {
88
- return {
89
- mode: "production",
90
- entry,
91
- output: {
92
- library: "QPPStyle",
93
- libraryTarget: "umd",
94
- filename: "index.js",
95
- path: path.resolve(__dirname, "dist"),
96
- },
97
- devtool: env.production === "true" ? "source-map" : "eval-source-map",
98
- module: _module, // module is already defined
99
- plugins,
100
- resolve,
101
- optimization,
102
- };
103
- };
104
-
105
- const browserConfig = (env, argv) => {
106
- return {
107
- mode: "production",
108
- entry,
109
- output: {
110
- libraryTarget: "var",
111
- library: "QPPStyle",
112
- filename: "browser.js",
113
- path: path.resolve(__dirname, "dist"),
114
- },
115
- devtool: env.production === "true" ? "source-map" : "eval-source-map",
116
- module: _module, // module is already defined
117
- plugins,
118
- resolve,
119
- optimization,
120
- };
121
- };
122
-
123
- module.exports = [defaultConfig, browserConfig];
@@ -1,104 +0,0 @@
1
- const path = require("path");
2
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3
- const TerserPlugin = require("terser-webpack-plugin");
4
- const HtmlWebpackPlugin = require("html-webpack-plugin");
5
-
6
- // const ESLintPlugin = require('eslint-webpack-plugin');
7
-
8
- const _module = {
9
- rules: [
10
- {
11
- test: /\.(js|jsx)?$/,
12
- exclude: /node_modules/,
13
- use: {
14
- loader: "babel-loader",
15
- },
16
- },
17
- {
18
- test: /\.scss$/,
19
- use: [
20
- {
21
- loader: MiniCssExtractPlugin.loader,
22
- },
23
- "css-loader",
24
- {
25
- loader: "sass-loader",
26
- options: {
27
- sassOptions: {
28
- includePaths: ["styles"],
29
- },
30
- },
31
- },
32
- "style-loader",
33
- ],
34
- exclude: /node_modules/,
35
- },
36
- {
37
- test: /\.(ttf|eot|woff|otf|woff2)$/,
38
- loader: "file-loader",
39
- options: {
40
- name: "fonts/[name].[ext]",
41
- },
42
- },
43
- {
44
- test: /\.svg$/,
45
- use: [
46
- "raw-loader",
47
- {
48
- loader: "svgo-loader",
49
- options: {
50
- plugins: [
51
- { removeTitle: true },
52
- { convertColors: { shorthex: false } },
53
- { convertPathData: false },
54
- ],
55
- },
56
- },
57
- ],
58
- },
59
- ],
60
- };
61
-
62
- const optimization = {
63
- minimizer: [new TerserPlugin()],
64
- };
65
-
66
- const plugins = [
67
- new MiniCssExtractPlugin({
68
- filename: "default.css",
69
- }),
70
- new HtmlWebpackPlugin(),
71
- ];
72
-
73
- module.exports = {
74
- mode: "production",
75
- entry: "./components/index.js",
76
- output: {
77
- filename: "index.js",
78
- path: path.resolve(__dirname, "dist/react"),
79
- library: "$",
80
- libraryTarget: "umd",
81
- globalObject: "this",
82
- },
83
- // below lines fix hot reload but put CI/CD into a hanging state
84
- // watch: true,
85
- // watchOptions: {
86
- // ignored: /node_modules/, // Don't watch files in node_modules
87
- // aggregateTimeout: 300,
88
- // poll: 1000,
89
- // },
90
- // devServer: {
91
- // // static: path.join(__dirname, "dist/react"),
92
- // // compress: true,
93
- // hot: true, // Enable hot module replacement
94
- // watchFiles: ["src/**/*", "components/**/*"], // Watch these files
95
- // },
96
- devtool: "source-map",
97
- module: _module,
98
- plugins,
99
- resolve: {
100
- extensions: [".js", ".jsx", ".json", ".svg", "*"],
101
- },
102
- optimization,
103
- externals: { react: "react" },
104
- };