@reach/dialog
Advanced tools
Comparing version 0.17.0 to 0.18.0-pre.0
{ | ||
"name": "@reach/dialog", | ||
"version": "0.17.0", | ||
"version": "0.18.0-pre.0", | ||
"description": "Accessible React Modal Dialog.", | ||
@@ -16,12 +16,14 @@ "author": "React Training <hello@reacttraining.com>", | ||
"dependencies": { | ||
"@reach/portal": "0.17.0", | ||
"@reach/utils": "0.17.0", | ||
"prop-types": "^15.7.2", | ||
"react-focus-lock": "^2.5.2", | ||
"react-remove-scroll": "^2.4.3", | ||
"tslib": "^2.3.0" | ||
"@reach/portal": "0.18.0-pre.0", | ||
"@reach/utils": "0.18.0-pre.0", | ||
"react-focus-lock": "2.5.2", | ||
"react-remove-scroll": "2.4.3" | ||
}, | ||
"devDependencies": { | ||
"@reach-internal/dev": "0.0.0", | ||
"@reach-internal/test": "0.0.0", | ||
"@reach-internal/tsconfig": "0.0.0", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2" | ||
"react-dom": "^17.0.2", | ||
"tsup": "^6.1.3" | ||
}, | ||
@@ -32,6 +34,7 @@ "peerDependencies": { | ||
}, | ||
"main": "dist/reach-dialog.cjs.js", | ||
"module": "dist/reach-dialog.esm.js", | ||
"types": "dist/reach-dialog.cjs.d.ts", | ||
"main": "./dist/index.cjs.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"CHANGELOG.md", | ||
"LICENSE", | ||
"README.md", | ||
@@ -41,7 +44,9 @@ "dist", | ||
], | ||
"eslintIgnore": [ | ||
"node_modules", | ||
"dist" | ||
], | ||
"gitHead": "d206aefac2bede58c06a54b18d48eee7537096e0" | ||
} | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"module": "./dist/index.mjs", | ||
"scripts": { | ||
"build": "tsup" | ||
} | ||
} |
@@ -14,19 +14,19 @@ # @reach/dialog | ||
function Example(props) { | ||
const [showDialog, setShowDialog] = React.useState(false); | ||
const open = () => setShowDialog(true); | ||
const close = () => setShowDialog(false); | ||
const [showDialog, setShowDialog] = React.useState(false); | ||
const open = () => setShowDialog(true); | ||
const close = () => setShowDialog(false); | ||
return ( | ||
<div> | ||
<button onClick={open}>Open Dialog</button> | ||
<Dialog isOpen={showDialog} onDismiss={close}> | ||
<button className="close-button" onClick={close}> | ||
<VisuallyHidden>Close</VisuallyHidden> | ||
<span aria-hidden>×</span> | ||
</button> | ||
<p>Hello there. I am a dialog</p> | ||
</Dialog> | ||
</div> | ||
); | ||
return ( | ||
<div> | ||
<button onClick={open}>Open Dialog</button> | ||
<Dialog isOpen={showDialog} onDismiss={close}> | ||
<button className="close-button" onClick={close}> | ||
<VisuallyHidden>Close</VisuallyHidden> | ||
<span aria-hidden>×</span> | ||
</button> | ||
<p>Hello there. I am a dialog</p> | ||
</Dialog> | ||
</div> | ||
); | ||
} | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
53244
6
11
1
6
729
1
+ Added@reach/portal@0.18.0-pre.0(transitive)
+ Added@reach/utils@0.18.0-pre.0(transitive)
+ Addedfocus-lock@0.9.2(transitive)
+ Addedreact-focus-lock@2.5.2(transitive)
+ Addedreact-remove-scroll@2.4.3(transitive)
+ Addedtslib@1.14.1(transitive)
- Removedprop-types@^15.7.2
- Removedtslib@^2.3.0
- Removed@reach/portal@0.17.0(transitive)
- Removed@reach/utils@0.17.0(transitive)
- Removedfocus-lock@1.3.5(transitive)
- Removedreact-focus-lock@2.12.1(transitive)
- Removedreact-remove-scroll@2.5.10(transitive)
- Removedtiny-warning@1.0.3(transitive)
Updated@reach/portal@0.18.0-pre.0
Updated@reach/utils@0.18.0-pre.0
Updatedreact-focus-lock@2.5.2
Updatedreact-remove-scroll@2.4.3