react-tooltip 4.5.0 → 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/.editorconfig
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
# editorconfig.org
|
|
3
|
+
root = true
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
charset = utf-8
|
|
7
|
+
indent_style = space
|
|
8
|
+
indent_size = 2
|
|
9
|
+
end_of_line = lf
|
|
10
|
+
trim_trailing_whitespace = true
|
|
11
|
+
insert_final_newline = true
|
|
12
|
+
max_line_length = 100
|
|
13
|
+
|
|
14
|
+
[*.md]
|
|
15
|
+
max_line_length = 0
|
|
16
|
+
trim_trailing_whitespace = false
|
|
17
|
+
|
|
18
|
+
[{*.json, *.svg}]
|
|
19
|
+
indent_style = space
|
|
20
|
+
indent_size = 2
|
|
21
|
+
|
|
22
|
+
# Matches the exact package.json, or *rc
|
|
23
|
+
[{package.json,*.yml,*rc}]
|
|
24
|
+
indent_style = space
|
|
25
|
+
indent_size = 2
|
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"eslint-config-airbnb",
|
|
4
|
+
"plugin:import/typescript",
|
|
5
|
+
"plugin:@typescript-eslint/recommended",
|
|
6
|
+
"prettier",
|
|
7
|
+
"plugin:prettier/recommended"
|
|
8
|
+
],
|
|
9
|
+
"env": {
|
|
10
|
+
"browser": true
|
|
11
|
+
},
|
|
12
|
+
"parser": "@typescript-eslint/parser",
|
|
13
|
+
"plugins": ["react", "react-hooks", "prettier", "@typescript-eslint"],
|
|
14
|
+
"settings": {
|
|
15
|
+
"import/resolver": {
|
|
16
|
+
"node": {
|
|
17
|
+
"extensions": [".js", ".jsx", ".ts", ".tsx"],
|
|
18
|
+
"moduleDirectory": ["node_modules", "src/"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"rules": {
|
|
23
|
+
"operator-linebreak": [
|
|
24
|
+
2,
|
|
25
|
+
"after",
|
|
26
|
+
{
|
|
27
|
+
"overrides": {
|
|
28
|
+
"?": "before",
|
|
29
|
+
":": "before"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"object-curly-newline": 0,
|
|
34
|
+
"implicit-arrow-linebreak": 0,
|
|
35
|
+
"semi": ["error", "never"],
|
|
36
|
+
"quotes": [
|
|
37
|
+
"error",
|
|
38
|
+
"single",
|
|
39
|
+
{
|
|
40
|
+
"allowTemplateLiterals": true,
|
|
41
|
+
"avoidEscape": true
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"max-len": [
|
|
45
|
+
"error",
|
|
46
|
+
{
|
|
47
|
+
"code": 100,
|
|
48
|
+
"ignoreStrings": true,
|
|
49
|
+
"ignoreTemplateLiterals": true
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"import/no-extraneous-dependencies": [
|
|
53
|
+
"error",
|
|
54
|
+
{
|
|
55
|
+
"devDependencies": true
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"import/no-unresolved": [
|
|
59
|
+
"error",
|
|
60
|
+
{
|
|
61
|
+
"commonjs": true,
|
|
62
|
+
"amd": true
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"react/jsx-filename-extension": ["off"],
|
|
66
|
+
"react/prop-types": ["warn"],
|
|
67
|
+
"react/button-has-type": 0,
|
|
68
|
+
"jsx-a11y/href-no-hash": "off",
|
|
69
|
+
"jsx-a11y/label-has-for": [
|
|
70
|
+
"error",
|
|
71
|
+
{
|
|
72
|
+
"allowChildren": true
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"jsx-a11y/anchor-is-valid": [
|
|
76
|
+
"error",
|
|
77
|
+
{
|
|
78
|
+
"specialLink": ["to"]
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"react/jsx-props-no-spreading": 0,
|
|
82
|
+
"react/react-in-jsx-scope": "off",
|
|
83
|
+
"prettier/prettier": "error",
|
|
84
|
+
"import/extensions": 0,
|
|
85
|
+
"@typescript-eslint/no-unused-vars": "error",
|
|
86
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
87
|
+
"import/prefer-default-export": "off",
|
|
88
|
+
"react/function-component-definition": "off",
|
|
89
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
90
|
+
"dot-notation": "off",
|
|
91
|
+
"no-shadow": "off",
|
|
92
|
+
"@typescript-eslint/no-shadow": "error"
|
|
93
|
+
}
|
|
94
|
+
}
|
package/.gitattributes
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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']
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
|
@@ -0,0 +1,30 @@
|
|
|
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/.prettierrc.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["stylelint-config-standard", "stylelint-config-prettier"],
|
|
3
|
+
"rules": {
|
|
4
|
+
"declaration-no-important": true,
|
|
5
|
+
"declaration-colon-newline-after": null,
|
|
6
|
+
"selector-pseudo-class-no-unknown": [
|
|
7
|
+
true,
|
|
8
|
+
{
|
|
9
|
+
"ignorePseudoClasses": ["global"]
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"selector-pseudo-element-no-unknown": [
|
|
13
|
+
true,
|
|
14
|
+
{
|
|
15
|
+
"ignorePseudoElements": ["global"]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
}
|
package/bower.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-tooltip",
|
|
3
|
+
"description": "react tooltip component",
|
|
4
|
+
"main": "standalone/react-tooltip.js",
|
|
5
|
+
"moduleType": ["globals", "amd", "node"],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"ignore": ["bin", "example"],
|
|
8
|
+
"keywords": ["react", "react-component", "tooltip", "react-tooltip"],
|
|
9
|
+
"authors": [
|
|
10
|
+
"wwayne",
|
|
11
|
+
"danielbarion",
|
|
12
|
+
"alexgurr",
|
|
13
|
+
"aronhelser",
|
|
14
|
+
"roggervalf",
|
|
15
|
+
"huumanoid"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/wwayne/react-tooltip",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/wwayne/react-tooltip"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"react": ">=0.14",
|
|
24
|
+
"react-dom": ">=0.14"
|
|
25
|
+
}
|
|
26
|
+
}
|