react-tooltip 4.5.1 → 5.0.0-beta.0
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/.editorconfig +25 -0
- package/.eslintrc.json +94 -0
- package/.gitattributes +3 -0
- package/.github/FUNDING.yml +13 -0
- package/.github/workflows/lint.yaml +35 -0
- package/.github/workflows/pull-request.yaml +11 -0
- package/.github/workflows/release.yaml +30 -0
- package/.husky/pre-commit +6 -0
- package/.prettierrc.json +10 -0
- package/.stylelintrc.json +19 -0
- package/.vscode/settings.json +27 -0
- package/bower.json +26 -0
- package/build/dist/react-tooltip.cjs.js +2909 -0
- package/build/dist/react-tooltip.cjs.min.js +6 -0
- package/build/dist/react-tooltip.css +73 -0
- package/build/dist/react-tooltip.esm.js +2901 -0
- package/build/dist/react-tooltip.esm.min.js +6 -0
- package/build/dist/react-tooltip.min.css +1 -0
- package/build/dist/react-tooltip.umd.js +2913 -0
- package/build/dist/react-tooltip.umd.min.js +6 -0
- package/build/index.css +79 -0
- package/build/index.html +19 -0
- package/build/index.js +36190 -0
- package/cli.js +30 -0
- package/contributing.md +40 -0
- package/dist/react-tooltip.cjs.js +2932 -0
- package/dist/react-tooltip.cjs.min.js +6 -0
- package/dist/react-tooltip.css +73 -0
- package/dist/react-tooltip.esm.js +2924 -0
- package/dist/react-tooltip.esm.min.js +6 -0
- package/dist/react-tooltip.min.css +1 -0
- package/dist/react-tooltip.umd.js +2936 -0
- package/dist/react-tooltip.umd.min.js +6 -0
- package/docs/README.md +50 -0
- package/docs/babel.config.js +3 -0
- package/docs/docs/examples/_category_.json +7 -0
- package/docs/docs/examples/basic-examples.mdx +68 -0
- package/docs/docs/examples/children.mdx +67 -0
- package/docs/docs/examples/content.mdx +80 -0
- package/docs/docs/examples/delay.mdx +84 -0
- package/docs/docs/examples/events.mdx +85 -0
- package/docs/docs/examples/get-content.mdx +58 -0
- package/docs/docs/examples/html.mdx +75 -0
- package/docs/docs/examples/multiline.mdx +91 -0
- package/docs/docs/examples/offset.mdx +69 -0
- package/docs/docs/examples/place.mdx +55 -0
- package/docs/docs/examples/state.mdx +331 -0
- package/docs/docs/examples/styling.mdx +388 -0
- package/docs/docs/examples/variant.mdx +100 -0
- package/docs/docs/getting-started.md +70 -0
- package/docs/docs/options.mdx +105 -0
- package/docs/docs/upgrade-guide/_category_.json +7 -0
- package/docs/docs/upgrade-guide/basic-examples-v4-v5.mdx +119 -0
- package/docs/docs/upgrade-guide/changelog-v4-v5.md +85 -0
- package/docs/docusaurus.config.js +126 -0
- package/docs/package.json +47 -0
- package/docs/sidebars.js +33 -0
- package/docs/src/components/HomepageFeatures/index.tsx +70 -0
- package/docs/src/components/HomepageFeatures/styles.module.css +11 -0
- package/docs/src/css/custom.css +74 -0
- package/docs/src/pages/index.module.css +35 -0
- package/docs/src/pages/index.tsx +42 -0
- package/docs/src/pages/markdown-page.md +7 -0
- package/docs/static/.nojekyll +0 -0
- package/docs/static/img/docusaurus.png +0 -0
- package/docs/static/img/favicon.ico +0 -0
- package/docs/static/img/logo.svg +1 -0
- package/docs/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/docs/static/img/undraw_docusaurus_react.svg +170 -0
- package/docs/static/img/undraw_docusaurus_tree.svg +40 -0
- package/docs/tsconfig.json +7 -0
- package/docs/yarn.lock +7579 -0
- package/example-v5/package.json +21 -0
- package/example-v5/public/index.html +20 -0
- package/example-v5/public/manifest.json +8 -0
- package/example-v5/src/App.jsx +908 -0
- package/example-v5/src/index.css +238 -0
- package/example-v5/src/index.js +15 -0
- package/example-v5/src/index.scss +251 -0
- package/package.json +94 -146
- package/public/index.html +19 -0
- package/rollup.config.dev.js +88 -0
- package/rollup.config.prod.js +104 -0
- package/rollup.config.types.js +7 -0
- package/tsconfig.json +109 -0
- package/dist/index.es.js +0 -3185
- package/dist/index.es.js.map +0 -1
- package/dist/index.js +0 -3192
- package/dist/index.js.map +0 -1
- package/dist/react-tooltip.d.ts +0 -124
package/cli.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import fs from 'fs'
|
|
2
|
+
import rimraf from 'rimraf'
|
|
3
|
+
|
|
4
|
+
const args = process.argv.slice(2)
|
|
5
|
+
const parameters = args.reduce((acc, arg) => {
|
|
6
|
+
const [key, value] = arg.split('=')
|
|
7
|
+
acc[key.replace('--', '')] = value
|
|
8
|
+
return acc
|
|
9
|
+
}, {})
|
|
10
|
+
|
|
11
|
+
const bundleFolder = {
|
|
12
|
+
development: './build',
|
|
13
|
+
production: './dist',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Build folder
|
|
17
|
+
const dir = bundleFolder[parameters.env]
|
|
18
|
+
|
|
19
|
+
const log = (message) => console.log(`### ${message} ###`)
|
|
20
|
+
|
|
21
|
+
log(`Building for env: ${parameters.env}`)
|
|
22
|
+
|
|
23
|
+
// check if directory exists
|
|
24
|
+
if (fs.existsSync(dir)) {
|
|
25
|
+
rimraf(dir, function () {
|
|
26
|
+
fs.mkdirSync(dir)
|
|
27
|
+
})
|
|
28
|
+
} else {
|
|
29
|
+
fs.mkdirSync(dir)
|
|
30
|
+
}
|
package/contributing.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
This doc needs help! Please submit your PR...
|
|
4
|
+
|
|
5
|
+
## Commit messages
|
|
6
|
+
|
|
7
|
+
We are using semantic-release to automate the release process, and this depends on a specific format for commit messages. Please run `yarn cm` to use `commitizen` to properly format your commit messages so they can be automatically processed and included in release notes.
|
|
8
|
+
|
|
9
|
+
## Pull request testing
|
|
10
|
+
|
|
11
|
+
Some notes on testing and releasing.
|
|
12
|
+
|
|
13
|
+
- For a PR, follow Github's command-line instructions for retrieving the branch with the changes.
|
|
14
|
+
- To start a development server:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
yarn build
|
|
18
|
+
cd example
|
|
19
|
+
yarn
|
|
20
|
+
yarn start
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- Provide feedback on the PR about your results.
|
|
24
|
+
|
|
25
|
+
## Doing a release
|
|
26
|
+
|
|
27
|
+
We are using semantic-release instead of this:
|
|
28
|
+
|
|
29
|
+
- update the version number in `package.json`
|
|
30
|
+
- Fixes update the patch number, features update the minor number.
|
|
31
|
+
- Major version update is reserved for API breaking changes, not just additions.
|
|
32
|
+
- `yarn github-changes -- -n 3.X.Y` to update the changelog
|
|
33
|
+
- `git add`, `git commit` and `git push` to get the version to master.
|
|
34
|
+
- `git tag -a 3.X.Y -m 3.X.Y` `git push --tags`
|
|
35
|
+
- `npm publish`
|
|
36
|
+
- add a version on the github release page, based on the tag
|
|
37
|
+
|
|
38
|
+
## Typescript Type Definitions
|
|
39
|
+
|
|
40
|
+
Ensure that any changes modifying the **props** or **staticmethods** are also reflected in the typescript type definitions file.
|