react-tooltip 5.0.0-beta.0 → 5.0.0-beta.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.
- package/.eslintrc.json +2 -1
- package/CODE_OF_CONDUCT.md +53 -0
- package/LICENSE +1 -2
- package/README.md +30 -152
- package/coverage/clover.xml +610 -0
- package/coverage/coverage-final.json +11 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/components/Tooltip/Tooltip.tsx.html +646 -0
- package/coverage/lcov-report/components/Tooltip/index.html +146 -0
- package/coverage/lcov-report/components/Tooltip/index.ts.html +88 -0
- package/coverage/lcov-report/components/Tooltip/styles.module.css.html +277 -0
- package/coverage/lcov-report/components/TooltipContent/TooltipContent.tsx.html +109 -0
- package/coverage/lcov-report/components/TooltipContent/index.html +131 -0
- package/coverage/lcov-report/components/TooltipContent/index.ts.html +88 -0
- package/coverage/lcov-report/components/TooltipController/TooltipController.tsx.html +664 -0
- package/coverage/lcov-report/components/TooltipController/constants.ts.html +118 -0
- package/coverage/lcov-report/components/TooltipController/index.html +146 -0
- package/coverage/lcov-report/components/TooltipController/index.ts.html +88 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/sum.js.html +97 -0
- package/coverage/lcov-report/sum.ts.html +100 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov-report/test/sum.ts.html +100 -0
- package/coverage/lcov-report/utils/compute-positions.ts.html +277 -0
- package/coverage/lcov-report/utils/debounce.ts.html +181 -0
- package/coverage/lcov-report/utils/index.html +131 -0
- package/coverage/lcov.info +729 -0
- package/dist/react-tooltip-tokens.css +8 -0
- package/dist/react-tooltip.cjs.js +3 -6
- package/dist/react-tooltip.cjs.min.js +1 -1
- package/dist/react-tooltip.d.ts +25 -0
- package/dist/react-tooltip.esm.js +3 -6
- package/dist/react-tooltip.esm.min.js +1 -1
- package/dist/react-tooltip.umd.js +3 -6
- package/dist/react-tooltip.umd.min.js +1 -1
- package/jest.config.ts +214 -0
- package/package.json +14 -6
- package/rollup.config.types.js +13 -3
- package/tsconfig.json +2 -2
- package/.github/FUNDING.yml +0 -13
- package/.github/workflows/lint.yaml +0 -35
- package/.github/workflows/pull-request.yaml +0 -11
- package/.github/workflows/release.yaml +0 -30
- package/.husky/pre-commit +0 -6
- package/.vscode/settings.json +0 -27
- package/build/dist/react-tooltip.cjs.js +0 -2909
- package/build/dist/react-tooltip.cjs.min.js +0 -6
- package/build/dist/react-tooltip.css +0 -73
- package/build/dist/react-tooltip.esm.js +0 -2901
- package/build/dist/react-tooltip.esm.min.js +0 -6
- package/build/dist/react-tooltip.min.css +0 -1
- package/build/dist/react-tooltip.umd.js +0 -2913
- package/build/dist/react-tooltip.umd.min.js +0 -6
- package/build/index.css +0 -79
- package/build/index.html +0 -19
- package/build/index.js +0 -36190
- package/docs/README.md +0 -50
- package/docs/babel.config.js +0 -3
- package/docs/docs/examples/_category_.json +0 -7
- package/docs/docs/examples/basic-examples.mdx +0 -68
- package/docs/docs/examples/children.mdx +0 -67
- package/docs/docs/examples/content.mdx +0 -80
- package/docs/docs/examples/delay.mdx +0 -84
- package/docs/docs/examples/events.mdx +0 -85
- package/docs/docs/examples/get-content.mdx +0 -58
- package/docs/docs/examples/html.mdx +0 -75
- package/docs/docs/examples/multiline.mdx +0 -91
- package/docs/docs/examples/offset.mdx +0 -69
- package/docs/docs/examples/place.mdx +0 -55
- package/docs/docs/examples/state.mdx +0 -331
- package/docs/docs/examples/styling.mdx +0 -388
- package/docs/docs/examples/variant.mdx +0 -100
- package/docs/docs/getting-started.md +0 -70
- package/docs/docs/options.mdx +0 -105
- package/docs/docs/upgrade-guide/_category_.json +0 -7
- package/docs/docs/upgrade-guide/basic-examples-v4-v5.mdx +0 -119
- package/docs/docs/upgrade-guide/changelog-v4-v5.md +0 -85
- package/docs/docusaurus.config.js +0 -126
- package/docs/package.json +0 -47
- package/docs/sidebars.js +0 -33
- package/docs/src/components/HomepageFeatures/index.tsx +0 -70
- package/docs/src/components/HomepageFeatures/styles.module.css +0 -11
- package/docs/src/css/custom.css +0 -74
- package/docs/src/pages/index.module.css +0 -35
- package/docs/src/pages/index.tsx +0 -42
- package/docs/src/pages/markdown-page.md +0 -7
- 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 +0 -1
- package/docs/static/img/undraw_docusaurus_mountain.svg +0 -171
- package/docs/static/img/undraw_docusaurus_react.svg +0 -170
- package/docs/static/img/undraw_docusaurus_tree.svg +0 -40
- package/docs/tsconfig.json +0 -7
- package/docs/yarn.lock +0 -7579
- package/example-v5/package.json +0 -21
- package/example-v5/public/index.html +0 -20
- package/example-v5/public/manifest.json +0 -8
- package/example-v5/src/App.jsx +0 -908
- package/example-v5/src/index.css +0 -238
- package/example-v5/src/index.js +0 -15
- package/example-v5/src/index.scss +0 -251
- package/public/index.html +0 -19
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-tooltip",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.2",
|
|
4
4
|
"description": "react tooltip component",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "node ./cli.js --env=development && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.dev.js --watch",
|
|
7
|
-
"build": "node ./cli.js --env=production && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.prod.js",
|
|
7
|
+
"build": "node ./cli.js --env=production && npm run types && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.prod.js",
|
|
8
8
|
"types": "node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.types.js",
|
|
9
9
|
"eslint": "eslint --ext=js --ext=jsx --ext=ts --ext=tsx --fix ./src",
|
|
10
10
|
"stylelint": "stylelint \"src/**/*.css\"",
|
|
11
11
|
"prettier": "prettier --config ./.prettierrc.json --write \"src/**/*{.js,.jsx,.ts,.tsx,.css}\"",
|
|
12
12
|
"cm": "git cz",
|
|
13
|
-
"prepare": "husky install"
|
|
13
|
+
"prepare": "husky install",
|
|
14
|
+
"test": "jest"
|
|
14
15
|
},
|
|
15
|
-
"main": "dist/react-tooltip.esm.js",
|
|
16
|
+
"main": "dist/react-tooltip.esm.min.js",
|
|
16
17
|
"buildFormats": [
|
|
17
18
|
{
|
|
18
19
|
"file": "dist/react-tooltip.umd.js",
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"format": "es"
|
|
28
29
|
}
|
|
29
30
|
],
|
|
30
|
-
"types": "dist/
|
|
31
|
+
"types": "dist/react-tooltip.d.ts",
|
|
31
32
|
"type": "module",
|
|
32
33
|
"license": "MIT",
|
|
33
34
|
"private": false,
|
|
@@ -50,8 +51,10 @@
|
|
|
50
51
|
"@rollup/plugin-typescript": "8.5.0",
|
|
51
52
|
"@types/css": "^0.0.33",
|
|
52
53
|
"@types/css-modules": "^1.0.2",
|
|
54
|
+
"@types/jest": "^29.2.3",
|
|
53
55
|
"@types/react": "^18.0.21",
|
|
54
56
|
"@types/react-dom": "^18.0.6",
|
|
57
|
+
"@types/react-test-renderer": "^18.0.0",
|
|
55
58
|
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
|
56
59
|
"@typescript-eslint/parser": "^5.42.1",
|
|
57
60
|
"commitizen": "^4.2.5",
|
|
@@ -66,6 +69,9 @@
|
|
|
66
69
|
"eslint-plugin-react": "7.31.11",
|
|
67
70
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
68
71
|
"husky": "^8.0.1",
|
|
72
|
+
"jest": "^29.3.1",
|
|
73
|
+
"jest-environment-jsdom": "^29.3.1",
|
|
74
|
+
"jest-transform-css": "^6.0.0",
|
|
69
75
|
"lint-staged": "13.0.3",
|
|
70
76
|
"postcss": "8.4.19",
|
|
71
77
|
"prettier": "^2.4.1",
|
|
@@ -73,7 +79,7 @@
|
|
|
73
79
|
"prop-types": "^15.7.2",
|
|
74
80
|
"react": "18.2.0",
|
|
75
81
|
"react-dom": "18.2.0",
|
|
76
|
-
"react-test-renderer": "18.2.0",
|
|
82
|
+
"react-test-renderer": "^18.2.0",
|
|
77
83
|
"rimraf": "^3.0.2",
|
|
78
84
|
"rollup": "2.79.1",
|
|
79
85
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
@@ -91,6 +97,8 @@
|
|
|
91
97
|
"stylelint": "^13.13.1",
|
|
92
98
|
"stylelint-config-prettier": "^8.0.2",
|
|
93
99
|
"stylelint-config-standard": "^22.0.0",
|
|
100
|
+
"ts-jest": "^29.0.3",
|
|
101
|
+
"ts-node": "^10.9.1",
|
|
94
102
|
"typescript": "^4.8.4"
|
|
95
103
|
},
|
|
96
104
|
"peerDependencies": {
|
package/rollup.config.types.js
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import dts from 'rollup-plugin-dts'
|
|
2
|
+
import postcss from 'rollup-plugin-postcss'
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
|
-
input: './
|
|
5
|
-
output: [{ file: '
|
|
6
|
-
plugins: [
|
|
5
|
+
input: './src/index.tsx',
|
|
6
|
+
output: [{ file: 'dist/react-tooltip.d.ts', format: 'es' }],
|
|
7
|
+
plugins: [
|
|
8
|
+
postcss({
|
|
9
|
+
extract: 'react-tooltip-tokens.css', // this will generate a specific file and override on multiples build, but the css will be the same
|
|
10
|
+
autoModules: true,
|
|
11
|
+
include: '**/*.css',
|
|
12
|
+
extensions: ['.css'],
|
|
13
|
+
plugins: [],
|
|
14
|
+
}),
|
|
15
|
+
dts(),
|
|
16
|
+
],
|
|
7
17
|
}
|
package/tsconfig.json
CHANGED
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
46
46
|
|
|
47
47
|
/* JavaScript Support */
|
|
48
|
-
|
|
49
|
-
// "checkJs": true
|
|
48
|
+
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
|
|
49
|
+
// "checkJs": true /* Enable error reporting in type-checked JavaScript files. */,
|
|
50
50
|
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
51
51
|
|
|
52
52
|
/* Emit */
|
package/.github/FUNDING.yml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: [danielbarion] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
otechie: # Replace with a single Otechie username
|
|
12
|
-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
13
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
name: Run basic linting and testing
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_call:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
lint:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- uses: actions/checkout@v2
|
|
11
|
-
- uses: actions/setup-node@v3
|
|
12
|
-
|
|
13
|
-
- name: Install dev dependencies
|
|
14
|
-
run: yarn install
|
|
15
|
-
|
|
16
|
-
- name: ESLint
|
|
17
|
-
run: yarn run eslint
|
|
18
|
-
|
|
19
|
-
test:
|
|
20
|
-
needs: lint
|
|
21
|
-
strategy:
|
|
22
|
-
matrix:
|
|
23
|
-
version: [14, 16, 18]
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
steps:
|
|
26
|
-
- uses: actions/checkout@v2
|
|
27
|
-
- uses: actions/setup-node@v3
|
|
28
|
-
with:
|
|
29
|
-
node-version: ${{ matrix.version }}
|
|
30
|
-
|
|
31
|
-
- name: Install dev dependencies
|
|
32
|
-
run: yarn install
|
|
33
|
-
|
|
34
|
-
- name: Run tests
|
|
35
|
-
run: yarn run test
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
name: Release workflow
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
lint:
|
|
10
|
-
uses: ./.github/workflows/lint.yaml
|
|
11
|
-
|
|
12
|
-
release:
|
|
13
|
-
needs: lint
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
environment: production
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v2
|
|
18
|
-
- uses: actions/setup-node@v3
|
|
19
|
-
with:
|
|
20
|
-
node-version: ${{ matrix.version }}
|
|
21
|
-
|
|
22
|
-
- name: Install dev dependencies
|
|
23
|
-
run: yarn install
|
|
24
|
-
|
|
25
|
-
- name: Publish package using semantic-release
|
|
26
|
-
env:
|
|
27
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
28
|
-
run: |
|
|
29
|
-
yarn build
|
|
30
|
-
yarn run semantic-release
|
package/.husky/pre-commit
DELETED
package/.vscode/settings.json
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"editor.codeActionsOnSave": {
|
|
3
|
-
"source.fixAll.eslint": true
|
|
4
|
-
},
|
|
5
|
-
"css.lint.unknownAtRules": "ignore",
|
|
6
|
-
"editor.formatOnSave": true,
|
|
7
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
8
|
-
"typescript.tsdk": "node_modules/typescript/lib",
|
|
9
|
-
"eslint.validate": [
|
|
10
|
-
"vue",
|
|
11
|
-
"html",
|
|
12
|
-
"javascript",
|
|
13
|
-
"typescript",
|
|
14
|
-
"javascriptreact",
|
|
15
|
-
"typescriptreact"
|
|
16
|
-
],
|
|
17
|
-
"grammarly.selectors": [
|
|
18
|
-
{
|
|
19
|
-
"language": "markdown",
|
|
20
|
-
"scheme": "file"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"language": "mdx",
|
|
24
|
-
"scheme": "file"
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
}
|