Skip to content

Commit 53792a0

Browse files
Merge branch 'master' of https://github.com/ReactTooltip/react-tooltip into ReactTooltip-master
2 parents 2eec877 + d99b3e8 commit 53792a0

21 files changed

+7912
-17626
lines changed

.eslintrc

+54-47
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,54 @@
1-
{
2-
"parser": "babel-eslint",
3-
"extends": ["standard", "standard-react", "prettier", "eslint:recommended"],
4-
"env": {
5-
"es6": true,
6-
"jest": true
7-
},
8-
"plugins": ["react", "prettier"],
9-
"parserOptions": {
10-
"sourceType": "module",
11-
"ecmaVersion": 2018,
12-
"ecmaFeatures": {
13-
"impliedStrict": true,
14-
"jsx": true,
15-
"arrowFunctions": true,
16-
"blockBindings": true,
17-
"defaultParams": true,
18-
"destructuring": true,
19-
"forOf": true,
20-
"generators": true,
21-
"objectLiteralComputedProperties": true,
22-
"objectLiteralShorthandMethods": true,
23-
"objectLiteralShorthandProperties": true,
24-
"experimentalObjectRestSpread": true,
25-
"restParams": true,
26-
"spread": true,
27-
"templateStrings": true,
28-
"modules": true,
29-
"classes": true
30-
}
31-
},
32-
"rules": {
33-
"react/jsx-no-bind": "off",
34-
"space-before-function-paren": 0,
35-
"react/jsx-boolean-value": 0,
36-
"max-len": [2, { "code": 120, "ignoreComments": true }],
37-
"newline-per-chained-call": 0,
38-
"no-trailing-spaces": ["error"],
39-
"quotes": ["error", "single", { "avoidEscape": true }],
40-
"comma-dangle": ["error", "never"],
41-
"no-template-curly-in-string": "off",
42-
"semi": ["error", "always"],
43-
"object-curly-spacing": ["error", "always"],
44-
"quote-props": ["error", "consistent"],
45-
"no-var": ["error"]
46-
}
47-
}
1+
{
2+
"parser": "@babel/eslint-parser",
3+
"extends": [
4+
"plugin:react/recommended",
5+
"standard-react",
6+
"prettier",
7+
"eslint:recommended"
8+
],
9+
"env": {
10+
"es6": true,
11+
"jest": true,
12+
"browser": true
13+
},
14+
"ignorePatterns": ["/bin", "/example", "/test", "/dist"],
15+
"plugins": ["react", "prettier"],
16+
"parserOptions": {
17+
"sourceType": "module",
18+
"ecmaVersion": 2018,
19+
"ecmaFeatures": {
20+
"impliedStrict": true,
21+
"jsx": true,
22+
"arrowFunctions": true,
23+
"blockBindings": true,
24+
"defaultParams": true,
25+
"destructuring": true,
26+
"forOf": true,
27+
"generators": true,
28+
"objectLiteralComputedProperties": true,
29+
"objectLiteralShorthandMethods": true,
30+
"objectLiteralShorthandProperties": true,
31+
"experimentalObjectRestSpread": true,
32+
"restParams": true,
33+
"spread": true,
34+
"templateStrings": true,
35+
"modules": true,
36+
"classes": true
37+
}
38+
},
39+
"rules": {
40+
"react/jsx-no-bind": "off",
41+
"space-before-function-paren": 0,
42+
"react/jsx-boolean-value": 0,
43+
"max-len": [2, { "code": 120, "ignoreComments": true }],
44+
"newline-per-chained-call": 0,
45+
"no-trailing-spaces": ["error"],
46+
"quotes": ["error", "single", { "avoidEscape": true }],
47+
"comma-dangle": ["error", "never"],
48+
"no-template-curly-in-string": "off",
49+
"semi": ["error", "always"],
50+
"object-curly-spacing": ["error", "always"],
51+
"quote-props": ["error", "consistent"],
52+
"no-var": ["error"]
53+
}
54+
}

.github/workflows/lint.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/pull-request.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Pull request workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- '!master'
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
uses: ./.github/workflows/lint.yaml

.github/workflows/release.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -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

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@
1212
node_modules/
1313
dist/
1414
build/
15+
.env
16+
.npmrc

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm test

.stylelintrc.json

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
{
22
"extends": "stylelint-config-standard",
3-
"ignoreFiles": [
4-
"src/decorators/*.js"
5-
]
3+
"ignoreFiles": ["src/**/*.js"],
4+
"overrides": [
5+
{
6+
"files": ["*.scss", "**/*.scss"],
7+
"customSyntax": "postcss-scss"
8+
}
9+
],
10+
"rules": {
11+
"selector-class-pattern": null
12+
}
613
}

CHANGELOG.md

+40-28
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,112 @@
1-
## [4.2.21](https://github.com/wwayne/react-tooltip/compare/v4.2.20...v4.2.21) (2021-05-28)
1+
## [4.3.1](https://github.com/ReactTooltip/react-tooltip/compare/v4.3.0...v4.3.1) (2022-10-13)
22

3+
### Bug Fixes
4+
5+
- add validation before call callbackAfter function as function ([aae936e](https://github.com/ReactTooltip/react-tooltip/commit/aae936e2f7a820cf1edcb68927b8973051dae9c2))
6+
7+
# [4.3.0](https://github.com/wwayne/react-tooltip/compare/v4.2.21...v4.3.0) (2022-10-12)
38

49
### Bug Fixes
510

6-
* **compability:** add polyfill and change styles ([#706](https://github.com/wwayne/react-tooltip/issues/706)) ([b6e9a1c](https://github.com/wwayne/react-tooltip/commit/b6e9a1c))
11+
- #759 (https://github.com/wwayne/react-tooltip/issues/759) - Disable tooltip when disable prop changes (8e9cca0 (https://github.com/wwayne/react-tooltip/commit/8e9cca016f8eb59036c0c4623b85bf3f465ba262))
12+
- \*aftershow: call afterShow only after state has fully updated (54752e8 (https://github.com/wwayne/react-tooltip/commit/54752e81093f4c41bae1b49f7de65f28cf54df1a))
13+
- effect and type not properly applied at first render (a8d0e51 (https://github.com/wwayne/react-tooltip/commit/a8d0e51dd5dc0eb85d985232da90d54fd031ae4b))
14+
- getposition: no error when all placements outside (249b925 (https://github.com/wwayne/react-tooltip/commit/249b925a30ac2e7f04648a20bc9976e85358205b))
15+
- performance issue caused by excessive use of clearTimeout/Interval (22aea50 (https://github.com/wwayne/react-tooltip/commit/22aea5086db47727feae609bb7a6f8e269b7f2de))
16+
- **react18: tip not hiding with React 18 StrictMode enabled** (83b72c6 (https://github.com/wwayne/react-tooltip/commit/83b72c63ea9fe527bcbfb0b85414527e172c970b))
17+
- set aria-describedby value wrong when custom id (a04d26c (https://github.com/wwayne/react-tooltip/commit/a04d26cc0639054b474ca8b373c95a09b199973a))
718

8-
## [4.2.20](https://github.com/wwayne/react-tooltip/compare/v4.2.19...v4.2.20) (2021-05-28)
19+
### Features
20+
21+
- component: adding "padding" property to customize padding style (9ae765a (https://github.com/wwayne/react-tooltip/commit/9ae765a3cc38b36ce5ea77edd8fcc0f7bd9646a6))
22+
- getposition: support desired-place-list (by priority) (982d89d (https://github.com/wwayne/react-tooltip/commit/982d89d2b9d663ed92d41743f63069d0c8a4aac0))
23+
- parent_body_mode: #535 (https://github.com/wwayne/react-tooltip/issues/535) search parents for data-tip if in body mode (71da348 (https://github.com/wwayne/react-tooltip/commit/71da34870163c4377a82b009ac63692e34eeb444))
24+
- pencil: readme updated to trigger next minor release (react 18 support release) (bb9c79e (https://github.com/wwayne/react-tooltip/commit/bb9c79e248918e4b0641b9305752e59019a60a72))
25+
- pencil: readme updated to trigger next minor release (react 18 support release) (3a6ec6c (https://github.com/wwayne/react-tooltip/commit/3a6ec6c1a1c61434532a9350e7ceafe17e8794b9))
926

27+
# [4.2.21](https://github.com/wwayne/react-tooltip/compare/v4.2.20...v4.2.21) (2021-05-28)
1028

1129
### Bug Fixes
1230

13-
* add aria hidden attribute to style tag ([#703](https://github.com/wwayne/react-tooltip/issues/703)) ([d60c2b7](https://github.com/wwayne/react-tooltip/commit/d60c2b7))
31+
- **compability:** add polyfill and change styles ([#706](https://github.com/wwayne/react-tooltip/issues/706)) ([b6e9a1c](https://github.com/wwayne/react-tooltip/commit/b6e9a1c))
1432

15-
## [4.2.19](https://github.com/wwayne/react-tooltip/compare/v4.2.18...v4.2.19) (2021-05-06)
33+
## [4.2.20](https://github.com/wwayne/react-tooltip/compare/v4.2.19...v4.2.20) (2021-05-28)
34+
35+
### Bug Fixes
1636

37+
- add aria hidden attribute to style tag ([#703](https://github.com/wwayne/react-tooltip/issues/703)) ([d60c2b7](https://github.com/wwayne/react-tooltip/commit/d60c2b7))
38+
39+
## [4.2.19](https://github.com/wwayne/react-tooltip/compare/v4.2.18...v4.2.19) (2021-05-06)
1740

1841
### Bug Fixes
1942

20-
* **src/index.js:** hide tooltip if blurred (tabbed out) ([#699](https://github.com/wwayne/react-tooltip/issues/699)) ([e0a2a1d](https://github.com/wwayne/react-tooltip/commit/e0a2a1d))
43+
- **src/index.js:** hide tooltip if blurred (tabbed out) ([#699](https://github.com/wwayne/react-tooltip/issues/699)) ([e0a2a1d](https://github.com/wwayne/react-tooltip/commit/e0a2a1d))
2144

2245
## [4.2.18](https://github.com/wwayne/react-tooltip/compare/v4.2.17...v4.2.18) (2021-04-25)
2346

24-
2547
### Bug Fixes
2648

27-
* **src/index.js:** add accessibility support for tabbing ([#695](https://github.com/wwayne/react-tooltip/issues/695)) ([ae936a5](https://github.com/wwayne/react-tooltip/commit/ae936a5))
49+
- **src/index.js:** add accessibility support for tabbing ([#695](https://github.com/wwayne/react-tooltip/issues/695)) ([ae936a5](https://github.com/wwayne/react-tooltip/commit/ae936a5))
2850

2951
## [4.2.17](https://github.com/wwayne/react-tooltip/compare/v4.2.16...v4.2.17) (2021-03-26)
3052

31-
3253
### Bug Fixes
3354

34-
* **type:** added role property to types ([#679](https://github.com/wwayne/react-tooltip/issues/679)) ([9b49395](https://github.com/wwayne/react-tooltip/commit/9b49395))
55+
- **type:** added role property to types ([#679](https://github.com/wwayne/react-tooltip/issues/679)) ([9b49395](https://github.com/wwayne/react-tooltip/commit/9b49395))
3556

3657
## [4.2.16](https://github.com/wwayne/react-tooltip/compare/v4.2.15...v4.2.16) (2021-03-26)
3758

38-
3959
### Bug Fixes
4060

41-
* **index.js:** fix exception when testing with Jest ([#682](https://github.com/wwayne/react-tooltip/issues/682)) ([f885f1f](https://github.com/wwayne/react-tooltip/commit/f885f1f))
61+
- **index.js:** fix exception when testing with Jest ([#682](https://github.com/wwayne/react-tooltip/issues/682)) ([f885f1f](https://github.com/wwayne/react-tooltip/commit/f885f1f))
4262

4363
## [4.2.15](https://github.com/wwayne/react-tooltip/compare/v4.2.14...v4.2.15) (2021-02-26)
4464

45-
4665
### Bug Fixes
4766

48-
* do not delay show if tooltip is already shown ([#676](https://github.com/wwayne/react-tooltip/issues/676)) ([e8b9d84](https://github.com/wwayne/react-tooltip/commit/e8b9d84))
67+
- do not delay show if tooltip is already shown ([#676](https://github.com/wwayne/react-tooltip/issues/676)) ([e8b9d84](https://github.com/wwayne/react-tooltip/commit/e8b9d84))
4968

5069
## [4.2.14](https://github.com/wwayne/react-tooltip/compare/v4.2.13...v4.2.14) (2021-02-16)
5170

52-
5371
### Bug Fixes
5472

55-
* **styles:** change style injection way ([#668](https://github.com/wwayne/react-tooltip/issues/668)) ([1e10cce](https://github.com/wwayne/react-tooltip/commit/1e10cce)), closes [#650](https://github.com/wwayne/react-tooltip/issues/650)
73+
- **styles:** change style injection way ([#668](https://github.com/wwayne/react-tooltip/issues/668)) ([1e10cce](https://github.com/wwayne/react-tooltip/commit/1e10cce)), closes [#650](https://github.com/wwayne/react-tooltip/issues/650)
5674

5775
## [4.2.13](https://github.com/wwayne/react-tooltip/compare/v4.2.12...v4.2.13) (2021-01-15)
5876

59-
6077
### Bug Fixes
6178

62-
* **domexception:** revert previous changed for unexpected behavior ([85e38bb](https://github.com/wwayne/react-tooltip/commit/85e38bb)), closes [#667](https://github.com/wwayne/react-tooltip/issues/667)
79+
- **domexception:** revert previous changed for unexpected behavior ([85e38bb](https://github.com/wwayne/react-tooltip/commit/85e38bb)), closes [#667](https://github.com/wwayne/react-tooltip/issues/667)
6380

6481
## [4.2.12](https://github.com/wwayne/react-tooltip/compare/v4.2.11...v4.2.12) (2021-01-14)
6582

66-
6783
### Bug Fixes
6884

69-
* **style injection:** change style injection default root ([a00c5b7](https://github.com/wwayne/react-tooltip/commit/a00c5b7)), closes [#665](https://github.com/wwayne/react-tooltip/issues/665)
85+
- **style injection:** change style injection default root ([a00c5b7](https://github.com/wwayne/react-tooltip/commit/a00c5b7)), closes [#665](https://github.com/wwayne/react-tooltip/issues/665)
7086

7187
## [4.2.11](https://github.com/wwayne/react-tooltip/compare/v4.2.10...v4.2.11) (2020-11-22)
7288

73-
7489
### Bug Fixes
7590

76-
* **styles:** add styles for shadow dom ([00d1539](https://github.com/wwayne/react-tooltip/commit/00d1539)), closes [#597](https://github.com/wwayne/react-tooltip/issues/597)
91+
- **styles:** add styles for shadow dom ([00d1539](https://github.com/wwayne/react-tooltip/commit/00d1539)), closes [#597](https://github.com/wwayne/react-tooltip/issues/597)
7792

7893
## [4.2.10](https://github.com/wwayne/react-tooltip/compare/v4.2.9...v4.2.10) (2020-09-14)
7994

80-
8195
### Bug Fixes
8296

83-
* **build:** removing single quotes on cpy for windows shell ([#632](https://github.com/wwayne/react-tooltip/issues/632)) ([9c280af](https://github.com/wwayne/react-tooltip/commit/9c280af))
97+
- **build:** removing single quotes on cpy for windows shell ([#632](https://github.com/wwayne/react-tooltip/issues/632)) ([9c280af](https://github.com/wwayne/react-tooltip/commit/9c280af))
8498

8599
## [4.2.9](https://github.com/wwayne/react-tooltip/compare/v4.2.8...v4.2.9) (2020-08-27)
86100

87-
88101
### Bug Fixes
89102

90-
* **getposition:** properly determine parents with will-change: transform ([3a76250](https://github.com/wwayne/react-tooltip/commit/3a76250))
103+
- **getposition:** properly determine parents with will-change: transform ([3a76250](https://github.com/wwayne/react-tooltip/commit/3a76250))
91104

92105
## [4.2.8](https://github.com/wwayne/react-tooltip/compare/v4.2.7...v4.2.8) (2020-08-06)
93106

94-
95107
### Bug Fixes
96108

97-
* **showtooltip:** check if tooltipRef is undefined ([#623](https://github.com/wwayne/react-tooltip/issues/623)) ([f63eab2](https://github.com/wwayne/react-tooltip/commit/f63eab2))
109+
- **showtooltip:** check if tooltipRef is undefined ([#623](https://github.com/wwayne/react-tooltip/issues/623)) ([f63eab2](https://github.com/wwayne/react-tooltip/commit/f63eab2))
98110

99111
## Change Log
100112

0 commit comments

Comments
 (0)