Skip to content

Commit

Permalink
fix: update underlaying packages; brings React 18 and Shadow DOM support
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed May 1, 2022
1 parent f2804bf commit 5bd7b5c
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 98 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [3.5.4](https://github.com/theKashey/react-focus-on/compare/v3.5.3...v3.5.4) (2021-11-09)



## [3.5.3](https://github.com/theKashey/react-focus-on/compare/v3.5.2...v3.5.3) (2021-11-09)


Expand Down
Empty file removed custom-typings/.gitkeep
Empty file.
1 change: 0 additions & 1 deletion custom-typings/atlaskit.d.ts

This file was deleted.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"author": "Anton Korzunov <thekashey@gmail.com>",
"license": "MIT",
"devDependencies": {
"@types/react": "^16.8.19",
"@types/react": "^18.0.8",
"conventional-changelog-cli": "^2.0.12",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
Expand All @@ -45,12 +45,12 @@
},
"dependencies": {
"aria-hidden": "^1.1.3",
"react-focus-lock": "^2.6.0",
"react-remove-scroll": "^2.4.1",
"react-style-singleton": "^2.1.1",
"react-focus-lock": "^2.9.0",
"react-remove-scroll": "^2.5.2",
"react-style-singleton": "^2.2.0",
"tslib": "^2.3.1",
"use-callback-ref": "^1.2.5",
"use-sidecar": "^1.0.5"
"use-callback-ref": "^1.3.0",
"use-sidecar": "^1.1.2"
},
"engines": {
"node": ">=8.5.0"
Expand Down Expand Up @@ -80,7 +80,7 @@
"isolation"
],
"resolutions": {
"typescript": "^3.0.0"
"typescript": "^3.8.0"
},
"homepage": "https://github.com/theKashey/react-focus-on#readme"
}
2 changes: 1 addition & 1 deletion sidecar/sidecar.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';

declare var sidecar: React.SFC;
declare var sidecar: React.FC;

export default sidecar;
2 changes: 1 addition & 1 deletion src/InteractivityDisabler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ const styles = `
}
`;

export const InteractivityDisabler: React.SFC = () => <Style styles={styles} />;
export const InteractivityDisabler: React.FC = () => <Style styles={styles} />;
24 changes: 13 additions & 11 deletions src/UI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ export const FocusOn = React.forwardRef<HTMLElement, ReactFocusOnSideProps>(

const { onActivation, onDeactivation, ...restProps } = lockProps;

const appliedLockProps = {
...restProps,
sideCar,
shards,
allowPinchZoom,
as,
inert,
style,
enabled: enabled && scrollLock,
} as const;

return (
<>
<ReactFocusLock
Expand All @@ -45,18 +56,9 @@ export const FocusOn = React.forwardRef<HTMLElement, ReactFocusOnSideProps>(
onActivation={onActivation}
onDeactivation={onDeactivation}
className={className}
as={RemoveScroll}
whiteList={shouldIgnore}
lockProps={{
...restProps,
sideCar,
shards,
allowPinchZoom,
as,
inert,
style,
enabled: enabled && scrollLock,
}}
lockProps={appliedLockProps}
as={RemoveScroll}
>
{children}
</ReactFocusLock>
Expand Down
3 changes: 2 additions & 1 deletion src/medium.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createSidecarMedium } from 'use-sidecar';
import {EffectProps} from "./types";

export const effectCar = createSidecarMedium();
export const effectCar = createSidecarMedium<EffectProps>();
export const focusHiddenMarker = 'data-focus-on-hidden';
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export interface ReactFocusOnProps extends CommonProps {
}

export interface ReactFocusOnSideProps extends ReactFocusOnProps {
sideCar: React.SFC<any>;
sideCar: React.FC<any>;
}

export interface EffectProps extends CommonProps {
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@
"es2015.promise"
],
"jsx": "react"
},
"files": [
"./custom-typings/atlaskit.d.ts"
]
}
}
138 changes: 67 additions & 71 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -547,13 +547,19 @@
"@types/prop-types" "*"
csstype "^2.2.0"

"@types/react@^16.8.19":
version "16.8.19"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.19.tgz#629154ef05e2e1985cdde94477deefd823ad9be3"
integrity sha512-QzEzjrd1zFzY9cDlbIiFvdr+YUmefuuRYrPxmkwG0UQv5XF35gFIi7a95m1bNVcFU0VimxSZ5QVGSiBmlggQXQ==
"@types/react@^18.0.8":
version "18.0.8"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.8.tgz#a051eb380a9fbcaa404550543c58e1cf5ce4ab87"
integrity sha512-+j2hk9BzCOrrOSJASi5XiOyBbERk9jG5O73Ya4M0env5Ixi6vUNli4qy994AINcEF+1IEHISYFfIT4zwr++LKw==
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/scheduler@*":
version "0.16.2"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==

"@types/serve-static@*":
version "1.13.2"
Expand Down Expand Up @@ -3096,6 +3102,11 @@ csstype@^2.2.0:
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.7.tgz#bf9235d5872141eccfb2d16d82993c6b149179ff"
integrity sha512-Nt5VDyOTIIV4/nRFswoCKps1R5CD1hkiyjBE9/thNaNZILLEviVw9yWQw15+O+CpNjQKB/uvdcxFFOrSflY3Yw==

csstype@^3.0.2:
version "3.0.11"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33"
integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==

currently-unhandled@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
Expand Down Expand Up @@ -3345,7 +3356,7 @@ detect-node-es@^1.1.0:
resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493"
integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==

detect-node@^2.0.3, detect-node@^2.0.4:
detect-node@^2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==
Expand Down Expand Up @@ -4536,10 +4547,10 @@ flush-write-stream@^1.0.0:
inherits "^2.0.1"
readable-stream "^2.0.4"

focus-lock@^0.9.2:
version "0.9.2"
resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.9.2.tgz#9d30918aaa99b1b97677731053d017f82a540d5b"
integrity sha512-YtHxjX7a0IC0ZACL5wsX8QdncXofWpGPNoVMuI/nZUrPGp6LmNI6+D5j0pPj+v8Kw5EpweA+T5yImK0rnWf7oQ==
focus-lock@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/focus-lock/-/focus-lock-0.11.0.tgz#72f9055d34fff59d54aec8e602adbb5438108709"
integrity sha512-7tCIkCdnMEnqwEWr3PktH8wA/SAcIPlhrDuLg+o20DjZ/fZW/rIy7Tc9BC2kJBOttH4vbzTXqte5PL8babatBw==
dependencies:
tslib "^2.0.3"

Expand Down Expand Up @@ -8470,17 +8481,17 @@ react-dom@^16.8.6:
prop-types "^15.6.2"
scheduler "^0.13.6"

react-focus-lock@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.6.0.tgz#97345c7abe439bf2974410b45529c2e208b1a633"
integrity sha512-2yB5KWyaefbvFDgqvsg/KpIjbqVlhIY2c/dyDcokDLhB3Ib7I4bjsrta5OkI5euUoIu5xBTyBwIQZPykUJAr1g==
react-focus-lock@^2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-2.9.0.tgz#c148fcadb78cc86968c722b0ed7369aa45585f1c"
integrity sha512-MF4uqKm77jkz1gn5t2BAnHeWWsDevZofrCxp2utDls0FX7pW/F1cn7Xi7pSpnqxCP1JL2okS8tcFEFIfzjJcIw==
dependencies:
"@babel/runtime" "^7.0.0"
focus-lock "^0.9.2"
focus-lock "^0.11.0"
prop-types "^15.6.2"
react-clientside-effect "^1.2.5"
use-callback-ref "^1.2.5"
use-sidecar "^1.0.5"
use-callback-ref "^1.3.0"
use-sidecar "^1.1.2"

react-gh-corner@^1.1.2:
version "1.1.2"
Expand Down Expand Up @@ -8514,42 +8525,33 @@ react-powerplug@^1.0.0:
dependencies:
"@babel/runtime" "^7.0.0"

react-remove-scroll-bar@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.1.0.tgz#edafe9b42a42c0dad9bdd10712772a1f9a39d7b9"
integrity sha512-5X5Y5YIPjIPrAoMJxf6Pfa7RLNGCgwZ95TdnVPgPuMftRfO8DaC7F4KP1b5eiO8hHbe7u+wZNDbYN5WUTpv7+g==
dependencies:
react-style-singleton "^2.1.0"
tslib "^1.0.0"

react-remove-scroll@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.4.1.tgz#e0af6126621083a5064591d367291a81b2d107f5"
integrity sha512-K7XZySEzOHMTq7dDwcHsZA6Y7/1uX5RsWhRXVYv8rdh+y9Qz2nMwl9RX/Mwnj/j7JstCGmxyfyC0zbVGXYh3mA==
react-remove-scroll-bar@^2.3.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.1.tgz#9f13b05b249eaa57c8d646c1ebb83006b3581f5f"
integrity sha512-IvGX3mJclEF7+hga8APZczve1UyGMkMG+tjS0o/U1iLgvZRpjFAQEUBJ4JETfvbNlfNnZnoDyWJCICkA15Mghg==
dependencies:
react-remove-scroll-bar "^2.1.0"
react-style-singleton "^2.1.0"
tslib "^1.0.0"
use-callback-ref "^1.2.3"
use-sidecar "^1.0.1"
react-style-singleton "^2.2.0"
tslib "^2.0.0"

react-style-singleton@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.1.0.tgz#7396885332e9729957f9df51f08cadbfc164e1c4"
integrity sha512-DH4ED+YABC1dhvSDYGGreAHmfuTXj6+ezT3CmHoqIEfxNgEYfIMoOtmbRp42JsUst3IPqBTDL+8r4TF7EWhIHw==
react-remove-scroll@^2.5.2:
version "2.5.2"
resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.5.2.tgz#9c402641ae3fadb35dbe560b5fd37aaef9bc676c"
integrity sha512-f8nbXX1QG9SzXilFUAopSLvbE9yyywkmgyxOUXDPv18XsOCPCYvBsLqB6hdFR47cD7A9a3xInNagvNziubfzRQ==
dependencies:
get-nonce "^1.0.0"
invariant "^2.2.4"
tslib "^1.0.0"
react-remove-scroll-bar "^2.3.0"
react-style-singleton "^2.2.0"
tslib "^2.0.0"
use-callback-ref "^1.3.0"
use-sidecar "^1.1.2"

react-style-singleton@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.1.1.tgz#ce7f90b67618be2b6b94902a30aaea152ce52e66"
integrity sha512-jNRp07Jza6CBqdRKNgGhT3u9umWvils1xsuMOjZlghBDH2MU0PL2WZor4PGYjXpnRCa9DQSlHMs/xnABWOwYbA==
react-style-singleton@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.2.0.tgz#70f45f5fef97fdb9a52eed98d1839fa6b9032b22"
integrity sha512-nK7mN92DMYZEu3cQcAhfwE48NpzO5RpxjG4okbSqRRbfal9Pk+fG2RdQXTMp+f6all1hB9LIJSt+j7dCYrU11g==
dependencies:
get-nonce "^1.0.0"
invariant "^2.2.4"
tslib "^1.0.0"
tslib "^2.0.0"

react-test-renderer@^16.0.0-0:
version "16.5.2"
Expand Down Expand Up @@ -10152,6 +10154,11 @@ tslib@^1.9.3:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==

tslib@^2.0.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==

tslib@^2.0.3, tslib@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
Expand Down Expand Up @@ -10231,10 +10238,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^3.0.0, typescript@^3.2.1, typescript@^3.5.2:
version "3.5.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202"
integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==
typescript@^3.2.1, typescript@^3.5.2, typescript@^3.8.0:
version "3.9.10"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8"
integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==

uglify-js@^3.1.4:
version "3.4.9"
Expand Down Expand Up @@ -10353,31 +10360,20 @@ url@^0.11.0:
punycode "1.3.2"
querystring "0.2.0"

use-callback-ref@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.2.3.tgz#9f939dfb5740807bbf9dd79cdd4e99d27e827756"
integrity sha512-DPBPh1i2adCZoIArRlTuKRy7yue7QogtEnfv0AKrWsY+GA+4EKe37zhRDouNnyWMoNQFYZZRF+2dLHsWE4YvJA==

use-callback-ref@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.2.5.tgz#6115ed242cfbaed5915499c0a9842ca2912f38a5"
integrity sha512-gN3vgMISAgacF7sqsLPByqoePooY3n2emTH59Ur5d/M8eg4WTWu1xp8i8DHjohftIyEx0S08RiYxbffr4j8Peg==

use-sidecar@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.0.1.tgz#75c7a5fdacc14bd3ab64992c638e45a396ad2fad"
integrity sha512-CLTDS2AZmUcXXFnxP/h/OadtvBOoHHnLYMMpKGntb5vKOQT94icrXMXX0mEdGiMhQU8vxHlndB72sRwRBHXTzw==
use-callback-ref@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.3.0.tgz#772199899b9c9a50526fedc4993fc7fa1f7e32d5"
integrity sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==
dependencies:
detect-node "^2.0.4"
tslib "^1.9.3"
tslib "^2.0.0"

use-sidecar@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.0.5.tgz#ffff2a17c1df42e348624b699ba6e5c220527f2b"
integrity sha512-k9jnrjYNwN6xYLj1iaGhonDghfvmeTmYjAiGvOr7clwKfPjMXJf4/HOr7oT5tJwYafgp2tG2l3eZEOfoELiMcA==
use-sidecar@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.1.2.tgz#2f43126ba2d7d7e117aa5855e5d8f0276dfe73c2"
integrity sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==
dependencies:
detect-node-es "^1.1.0"
tslib "^1.9.3"
tslib "^2.0.0"

use@^3.1.0:
version "3.1.1"
Expand Down

0 comments on commit 5bd7b5c

Please sign in to comment.