react-pure-modal 2.3.4 → 3.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 (43) hide show
  1. package/README.md +94 -78
  2. package/dist/index.js +1 -0
  3. package/dist/rslib.config.d.ts +2 -0
  4. package/dist/src/compounds/Backdrop.d.ts +3 -0
  5. package/dist/src/compounds/Close.d.ts +5 -0
  6. package/dist/src/compounds/Content.d.ts +5 -0
  7. package/dist/src/compounds/Footer.d.ts +5 -0
  8. package/dist/src/compounds/Header.d.ts +5 -0
  9. package/dist/src/compounds/Modal.d.ts +15 -0
  10. package/dist/src/compounds/Modal.types.d.ts +15 -0
  11. package/dist/src/compounds/ModalContext.d.ts +4 -0
  12. package/dist/src/index.d.ts +1 -0
  13. package/package.json +40 -49
  14. package/.babelrc.js +0 -12
  15. package/.eslintrc +0 -22
  16. package/.github/release-drafter-config.yml +0 -20
  17. package/.github/workflows/build.yml +0 -24
  18. package/.github/workflows/npm-publish.yml +0 -35
  19. package/.github/workflows/release-drafter.yml +0 -16
  20. package/.prettierrc +0 -19
  21. package/.travis.yml +0 -16
  22. package/@types/scheduler/tracing.d.ts +0 -22
  23. package/__tests__/__snapshots__/react-pure-modal-test.js.snap +0 -92
  24. package/__tests__/react-pure-modal-test.js +0 -44
  25. package/dist/pure-modal-content.d.ts +0 -25
  26. package/dist/react-pure-modal.d.ts +0 -20
  27. package/dist/react-pure-modal.min.css +0 -1
  28. package/dist/react-pure-modal.min.js +0 -1
  29. package/dist/types.d.ts +0 -1
  30. package/example/content.ts +0 -50
  31. package/example/example.min.js +0 -2
  32. package/example/example.min.js.LICENSE.txt +0 -109
  33. package/example/example.tsx +0 -109
  34. package/index.html +0 -22
  35. package/screencast/scrollable.gif +0 -0
  36. package/screencast/simple.gif +0 -0
  37. package/src/pure-modal-content.tsx +0 -74
  38. package/src/react-pure-modal.css +0 -123
  39. package/src/react-pure-modal.tsx +0 -256
  40. package/tsconfig.json +0 -25
  41. package/webpack.config.dev.js +0 -65
  42. package/webpack.config.js +0 -62
  43. /package/{src/types.ts → dist/@types/types.d.ts} +0 -0
package/tsconfig.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "include": ["src/*.tsx"],
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "declaration": true,
6
- "emitDeclarationOnly": true,
7
- "sourceMap": true,
8
- "noImplicitAny": true,
9
- "module": "commonjs",
10
- "target": "es2016",
11
- "jsx": "react",
12
- "lib": ["es2018", "dom"],
13
- "esModuleInterop": true,
14
- "strict": true,
15
- "importsNotUsedAsValues": "error",
16
- "resolveJsonModule": true,
17
- "allowSyntheticDefaultImports": true,
18
- "baseUrl": ".",
19
- "paths": {
20
- "scheduler/tracing": ["@types/scheduler/tracing"]
21
- },
22
- "typeRoots": ["./@types", "./node_modules/@types"],
23
- "types": ["node", "jest"]
24
- }
25
- }
@@ -1,65 +0,0 @@
1
- const TerserPlugin = require('terser-webpack-plugin');
2
- const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
3
- const path = require('path');
4
- const webpack = require('webpack');
5
-
6
- const config = {
7
- mode: process.env.NODE_ENV || 'development',
8
- optimization: {
9
- minimize: process.env.NODE_ENV !== 'development',
10
- minimizer:
11
- process.env.NODE_ENV !== 'development'
12
- ? [
13
- new TerserPlugin({
14
- cache: true,
15
- parallel: true,
16
- sourceMap: true, // Must be set to true if using source-maps in production
17
- terserOptions: {},
18
- }),
19
- new CssMinimizerPlugin(),
20
- ]
21
- : [],
22
- },
23
- entry: {
24
- example: path.join(__dirname, 'example/example.tsx'),
25
- },
26
- devtool: process.env.NODE_ENV !== 'development' ? false : 'inline-source-map',
27
- module: {
28
- rules: [
29
- {
30
- test: /\.(js|ts|tsx)$/,
31
- exclude: /(node_modules)/,
32
- use: {
33
- loader: 'babel-loader',
34
- },
35
- },
36
- {
37
- test: /\.css$/,
38
- exclude: /(node_modules)/,
39
- use: ['style-loader', 'css-loader'],
40
- },
41
- ],
42
- },
43
- devServer: {
44
- contentBase: path.resolve(__dirname, 'examples/'),
45
- compress: true,
46
- port: 8000,
47
- stats: 'errors-only',
48
- open: true,
49
- },
50
- output: {
51
- path: path.join(__dirname, 'example/'),
52
- filename: '[name].min.js',
53
- },
54
- plugins: [
55
- new webpack.DefinePlugin({
56
- 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'),
57
- }),
58
- ],
59
- resolve: {
60
- extensions: ['.tsx', '.ts', '.js'],
61
- modules: [path.join(__dirname, './src'), path.join(__dirname, './node_modules')],
62
- },
63
- };
64
-
65
- module.exports = config;
package/webpack.config.js DELETED
@@ -1,62 +0,0 @@
1
- const TerserPlugin = require('terser-webpack-plugin');
2
- const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
3
- const path = require('path');
4
- const webpack = require('webpack');
5
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
6
-
7
- const config = {
8
- mode: 'production',
9
- optimization: {
10
- minimize: true,
11
- minimizer: [
12
- new TerserPlugin({
13
- cache: true,
14
- parallel: true,
15
- sourceMap: true, // Must be set to true if using source-maps in production
16
- terserOptions: {},
17
- }),
18
- new CssMinimizerPlugin(),
19
- ],
20
- },
21
- entry: {
22
- 'react-pure-modal': path.join(__dirname, './src/react-pure-modal.tsx'),
23
- },
24
- module: {
25
- rules: [
26
- {
27
- test: /\.(js|jsx|tsx|ts)$/,
28
- exclude: /(node_modules|dist)/,
29
- use: {
30
- loader: 'babel-loader',
31
- },
32
- },
33
- {
34
- test: /\.css$/,
35
- exclude: /(node_modules|dist)/,
36
- use: [MiniCssExtractPlugin.loader, 'css-loader'],
37
- },
38
- ],
39
- },
40
- output: {
41
- path: path.join(__dirname, 'dist/'),
42
- filename: '[name].min.js',
43
- libraryTarget: 'umd',
44
- globalObject: 'this',
45
- },
46
- plugins: [
47
- new webpack.DefinePlugin({
48
- 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
49
- }),
50
- new MiniCssExtractPlugin({ filename: '[name].min.css' }),
51
- ],
52
- resolve: {
53
- modules: ['node_modules'],
54
- extensions: ['.tsx', '.ts', '.js'],
55
- },
56
- externals: {
57
- react: 'umd react',
58
- 'react-dom': 'umd react-dom',
59
- },
60
- };
61
-
62
- module.exports = config;
File without changes