diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9eafae0bd..1dba3e2e7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
Reactist follows [semantic versioning](https://semver.org/) and doesn't introduce breaking changes (API-wise) in minor or patch releases. However, the appearance of a component might change in a minor or patch release so keep an eye on redesigns and make sure your app still looks and feels like you expect it.
+# v22.0.0
+
+- [BREAKING] Remove `DeprecatedModal`.
+
# v21.3.0
- [Feat] `ToastProvider` accepts an optional `containerClassName` property, which let's you to add your own class for the container of all toasts.
diff --git a/package-lock.json b/package-lock.json
index 6b1debc18..95739362f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,16 +1,15 @@
{
"name": "@doist/reactist",
- "version": "21.3.0",
+ "version": "22.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@doist/reactist",
- "version": "21.3.0",
+ "version": "22.0.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
- "@reach/dialog": "^0.16.0",
"aria-hidden": "^1.2.1",
"ariakit": "2.0.0-next.43",
"ariakit-react-utils": "0.17.0-next.27",
@@ -4091,121 +4090,6 @@
"node": ">=10"
}
},
- "node_modules/@reach/dialog": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/@reach/dialog/-/dialog-0.16.0.tgz",
- "integrity": "sha512-EsQ6wPafXHkny7ATihGCCJuVb6bo8MzzFvsDY+BNLeUt4XN3Kcq1oe5xJbXfxbm1Ljzs80bqF3E/Q16O12fPng==",
- "dependencies": {
- "@reach/portal": "0.16.0",
- "@reach/utils": "0.16.0",
- "prop-types": "^15.7.2",
- "react-focus-lock": "^2.5.2",
- "react-remove-scroll": "^2.4.3",
- "tslib": "^2.3.0"
- },
- "peerDependencies": {
- "react": "^16.8.0 || 17.x",
- "react-dom": "^16.8.0 || 17.x"
- }
- },
- "node_modules/@reach/dialog/node_modules/react-remove-scroll": {
- "version": "2.4.3",
- "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.4.3.tgz",
- "integrity": "sha512-lGWYXfV6jykJwbFpsuPdexKKzp96f3RbvGapDSIdcyGvHb7/eqyn46C7/6h+rUzYar1j5mdU+XECITHXCKBk9Q==",
- "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"
- },
- "engines": {
- "node": ">=8.5.0"
- },
- "peerDependencies": {
- "@types/react": "^16.8.0 || ^17.0.0",
- "react": "^16.8.0 || ^17.0.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/@reach/dialog/node_modules/react-remove-scroll/node_modules/react-remove-scroll-bar": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.2.0.tgz",
- "integrity": "sha512-UU9ZBP1wdMR8qoUs7owiVcpaPwsQxUDC2lypP6mmixaGlARZa7ZIBx1jcuObLdhMOvCsnZcvetOho0wzPa9PYg==",
- "dependencies": {
- "react-style-singleton": "^2.1.0",
- "tslib": "^1.0.0"
- },
- "engines": {
- "node": ">=8.5.0"
- },
- "peerDependencies": {
- "@types/react": "^16.8.0 || ^17.0.0",
- "react": "^16.8.0 || ^17.0.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/@reach/dialog/node_modules/react-remove-scroll/node_modules/react-style-singleton": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.1.1.tgz",
- "integrity": "sha512-jNRp07Jza6CBqdRKNgGhT3u9umWvils1xsuMOjZlghBDH2MU0PL2WZor4PGYjXpnRCa9DQSlHMs/xnABWOwYbA==",
- "dependencies": {
- "get-nonce": "^1.0.0",
- "invariant": "^2.2.4",
- "tslib": "^1.0.0"
- },
- "engines": {
- "node": ">=8.5.0"
- },
- "peerDependencies": {
- "@types/react": "^16.8.0 || ^17.0.0",
- "react": "^16.8.0 || ^17.0.0"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- }
- }
- },
- "node_modules/@reach/dialog/node_modules/react-remove-scroll/node_modules/tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
- },
- "node_modules/@reach/portal": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.16.0.tgz",
- "integrity": "sha512-vXJ0O9T+72HiSEWHPs2cx7YbSO7pQsTMhgqPc5aaddIYpo2clJx1PnYuS0lSNlVaDO0IxQhwYq43evXaXnmviw==",
- "dependencies": {
- "@reach/utils": "0.16.0",
- "tslib": "^2.3.0"
- },
- "peerDependencies": {
- "react": "^16.8.0 || 17.x",
- "react-dom": "^16.8.0 || 17.x"
- }
- },
- "node_modules/@reach/utils": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.16.0.tgz",
- "integrity": "sha512-PCggBet3qaQmwFNcmQ/GqHSefadAFyNCUekq9RrWoaU9hh/S4iaFgf2MBMdM47eQj5i/Bk0Mm07cP/XPFlkN+Q==",
- "dependencies": {
- "tiny-warning": "^1.0.3",
- "tslib": "^2.3.0"
- },
- "peerDependencies": {
- "react": "^16.8.0 || 17.x",
- "react-dom": "^16.8.0 || 17.x"
- }
- },
"node_modules/@rollup/plugin-commonjs": {
"version": "11.1.0",
"integrity": "sha512-Ycr12N3ZPN96Fw2STurD21jMqzKwL9QuFhms3SD7KKRK7oaXUsBU9Zt0jL/rOPHiPYisI21/rXGO3jr9BnLHUA==",
@@ -17933,14 +17817,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/get-nonce": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz",
- "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==",
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/get-own-enumerable-property-symbols": {
"version": "3.0.2",
"integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
@@ -19450,13 +19326,6 @@
"node": ">= 0.10"
}
},
- "node_modules/invariant": {
- "version": "2.2.4",
- "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
- "dependencies": {
- "loose-envify": "^1.0.0"
- }
- },
"node_modules/ip": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
@@ -33772,11 +33641,6 @@
"globrex": "^0.1.1"
}
},
- "node_modules/tiny-warning": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
- "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
- },
"node_modules/title-case": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/title-case/-/title-case-3.0.3.tgz",
@@ -41088,77 +40952,6 @@
}
}
},
- "@reach/dialog": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/@reach/dialog/-/dialog-0.16.0.tgz",
- "integrity": "sha512-EsQ6wPafXHkny7ATihGCCJuVb6bo8MzzFvsDY+BNLeUt4XN3Kcq1oe5xJbXfxbm1Ljzs80bqF3E/Q16O12fPng==",
- "requires": {
- "@reach/portal": "0.16.0",
- "@reach/utils": "0.16.0",
- "prop-types": "^15.7.2",
- "react-focus-lock": "^2.5.2",
- "react-remove-scroll": "^2.4.3",
- "tslib": "^2.3.0"
- },
- "dependencies": {
- "react-remove-scroll": {
- "version": "2.4.3",
- "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.4.3.tgz",
- "integrity": "sha512-lGWYXfV6jykJwbFpsuPdexKKzp96f3RbvGapDSIdcyGvHb7/eqyn46C7/6h+rUzYar1j5mdU+XECITHXCKBk9Q==",
- "requires": {
- "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"
- },
- "dependencies": {
- "react-remove-scroll-bar": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.2.0.tgz",
- "integrity": "sha512-UU9ZBP1wdMR8qoUs7owiVcpaPwsQxUDC2lypP6mmixaGlARZa7ZIBx1jcuObLdhMOvCsnZcvetOho0wzPa9PYg==",
- "requires": {
- "react-style-singleton": "^2.1.0",
- "tslib": "^1.0.0"
- }
- },
- "react-style-singleton": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.1.1.tgz",
- "integrity": "sha512-jNRp07Jza6CBqdRKNgGhT3u9umWvils1xsuMOjZlghBDH2MU0PL2WZor4PGYjXpnRCa9DQSlHMs/xnABWOwYbA==",
- "requires": {
- "get-nonce": "^1.0.0",
- "invariant": "^2.2.4",
- "tslib": "^1.0.0"
- }
- },
- "tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
- }
- }
- }
- }
- },
- "@reach/portal": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/@reach/portal/-/portal-0.16.0.tgz",
- "integrity": "sha512-vXJ0O9T+72HiSEWHPs2cx7YbSO7pQsTMhgqPc5aaddIYpo2clJx1PnYuS0lSNlVaDO0IxQhwYq43evXaXnmviw==",
- "requires": {
- "@reach/utils": "0.16.0",
- "tslib": "^2.3.0"
- }
- },
- "@reach/utils": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/@reach/utils/-/utils-0.16.0.tgz",
- "integrity": "sha512-PCggBet3qaQmwFNcmQ/GqHSefadAFyNCUekq9RrWoaU9hh/S4iaFgf2MBMdM47eQj5i/Bk0Mm07cP/XPFlkN+Q==",
- "requires": {
- "tiny-warning": "^1.0.3",
- "tslib": "^2.3.0"
- }
- },
"@rollup/plugin-commonjs": {
"version": "11.1.0",
"integrity": "sha512-Ycr12N3ZPN96Fw2STurD21jMqzKwL9QuFhms3SD7KKRK7oaXUsBU9Zt0jL/rOPHiPYisI21/rXGO3jr9BnLHUA==",
@@ -51651,11 +51444,6 @@
"has-symbols": "^1.0.3"
}
},
- "get-nonce": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz",
- "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="
- },
"get-own-enumerable-property-symbols": {
"version": "3.0.2",
"integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
@@ -52806,13 +52594,6 @@
"integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==",
"dev": true
},
- "invariant": {
- "version": "2.2.4",
- "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
- "requires": {
- "loose-envify": "^1.0.0"
- }
- },
"ip": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
@@ -63736,11 +63517,6 @@
"globrex": "^0.1.1"
}
},
- "tiny-warning": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
- "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
- },
"title-case": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/title-case/-/title-case-3.0.3.tgz",
diff --git a/package.json b/package.json
index 76d2acfda..933c7ed66 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
"email": "henning@doist.com",
"url": "http://doist.com"
},
- "version": "21.3.0",
+ "version": "22.0.0",
"license": "MIT",
"homepage": "https://github.com/Doist/reactist#readme",
"repository": {
@@ -143,7 +143,6 @@
"webpack": "^4.43.0"
},
"dependencies": {
- "@reach/dialog": "^0.16.0",
"aria-hidden": "^1.2.1",
"ariakit": "2.0.0-next.43",
"ariakit-react-utils": "0.17.0-next.27",
diff --git a/src/deprecated-modal/index.ts b/src/deprecated-modal/index.ts
deleted file mode 100644
index cdbd4fb06..000000000
--- a/src/deprecated-modal/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './modal'
diff --git a/src/deprecated-modal/modal.module.css b/src/deprecated-modal/modal.module.css
deleted file mode 100644
index c2581081e..000000000
--- a/src/deprecated-modal/modal.module.css
+++ /dev/null
@@ -1,144 +0,0 @@
-@keyframes fadein {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
-}
-
-:root {
- --reach-dialog: 1;
- --reactist-modal-overlay-fill: rgba(0, 0, 0, 0.5);
- --reactist-modal-padding-top: 13vh;
-}
-
-.reach-portal {
- isolation: isolate;
-}
-
-[data-reach-dialog-overlay] {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- overflow: hidden;
- background-color: var(--reactist-modal-overlay-fill);
- animation: fadein 0.2s;
- animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
- transition: background-color 0.5s;
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: var(--reactist-stacking-order-modal);
-}
-
-[data-reach-dialog-overlay] > [data-focus-lock-disabled] {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 100%;
- height: 100%;
- box-sizing: border-box;
- padding: var(--reactist-spacing-xxlarge);
-}
-
-[data-reach-dialog-overlay].fitContent > [data-focus-lock-disabled] {
- padding-top: var(--reactist-modal-padding-top);
-}
-[data-reach-dialog-overlay].fitContent > [data-focus-lock-disabled] .container {
- max-height: calc(100vh - 2 * var(--reactist-modal-padding-top));
-}
-
-[data-reach-dialog-content] {
- background: var(--reactist-bg-default);
- padding: 0;
- outline: none;
- transition: box-shadow 0.5s;
-}
-
-.container {
- box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.16);
- transition: width 0.2s ease-in-out;
- max-width: 100%;
-}
-
-/* responsive styles */
-
-.full .container {
- width: 100%;
-}
-.large .container {
- width: 768px;
-}
-.medium .container {
- width: 580px;
-}
-.small .container {
- width: 450px;
-}
-
-@media (min-width: 992px) {
- .xlarge .container {
- width: 960px;
- }
-}
-
-@media (min-width: 1200px) {
- .xlarge .container {
- width: 1060px;
- }
-}
-
-@media (max-width: 1000px) {
- .xlarge .container {
- width: 768px;
- }
-}
-
-@media (max-width: 580px) {
- .overlay:not(.small) .container {
- width: 100% !important;
- max-height: none;
- }
- .overlay.expand:not(.small) > [data-focus-lock-disabled] {
- padding-left: 0;
- padding-right: 0;
- padding-bottom: 0;
- }
- .overlay.expand:not(.small) .container {
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0;
- }
-}
-
-@media (max-width: 400px) {
- .container {
- width: 100% !important;
- max-height: none;
- }
- .overlay.expand > [data-focus-lock-disabled] {
- padding-left: 0;
- padding-right: 0;
- padding-bottom: 0;
- }
- .overlay.expand .container {
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0;
- }
-}
-
-/* header */
-
-.buttonContainer {
- display: flex;
- align-items: center;
- height: 32px;
-}
-
-.headerContent {
- /* This ensures that the min-height is always applied to the header content, */
- /* regardless of the modal having a button or not. */
- min-height: 32px; /* must be the same as the .buttonContainer height above */
-}
diff --git a/src/deprecated-modal/modal.test.tsx b/src/deprecated-modal/modal.test.tsx
deleted file mode 100644
index 1d5a3288f..000000000
--- a/src/deprecated-modal/modal.test.tsx
+++ /dev/null
@@ -1,433 +0,0 @@
-import * as React from 'react'
-import { render, screen, within } from '@testing-library/react'
-import {
- DeprecatedModal,
- DeprecatedModalHeader,
- DeprecatedModalFooter,
- DeprecatedModalActions,
- DeprecatedModalBody,
- DeprecatedModalCloseButton,
-} from './modal'
-import userEvent from '@testing-library/user-event'
-import { axe } from 'jest-axe'
-
-describe('Modal', () => {
- function TestCaseWithState() {
- const [isOpen, setOpen] = React.useState(false)
- return (
- <>
-
-