├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .github
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── .gitignore
├── .gitpod.yml
├── .prettierrc
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── example
├── README.md
├── package.json
├── postcss.config.js
├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo.png
│ └── manifest.json
├── src
│ ├── App.test.tsx
│ ├── App.tsx
│ ├── index.css
│ ├── index.tsx
│ ├── react-app-env.d.ts
│ └── setupTests.ts
├── tailwind.config.js
├── tsconfig.json
└── yarn.lock
├── package.json
├── src
├── .eslintrc
├── components
│ ├── Toast.module.css
│ ├── Toast.tsx
│ ├── ToastContainer.module.css
│ ├── ToastContainer.tsx
│ ├── ToastContent.module.css
│ ├── ToastContent.tsx
│ └── ToastIcon.tsx
├── context
│ └── ToastContext.tsx
├── icons
│ ├── Default.tsx
│ ├── Error.tsx
│ ├── Info.tsx
│ ├── Loading.tsx
│ ├── Success.tsx
│ ├── Warning.tsx
│ └── index.tsx
├── index.tsx
├── react-app-env.d.ts
├── theme
│ └── index.tsx
├── types
│ └── index.ts
├── typings.d.ts
└── utils
│ └── index.ts
├── tsconfig.json
├── tsconfig.test.json
├── www
├── .gitignore
├── README.md
├── babel.config.js
├── docs
│ ├── advanced-usage
│ │ ├── custom-toasts.mdx
│ │ ├── index.mdx
│ │ └── promises.mdx
│ ├── examples.md
│ └── index.mdx
├── docusaurus.config.js
├── package.json
├── sidebars.js
├── src
│ ├── components
│ │ ├── Toaster
│ │ │ ├── index.tsx
│ │ │ ├── styles.module.css
│ │ │ └── with-promise.tsx
│ │ └── custom-toasts
│ │ │ ├── index.tsx
│ │ │ └── styles.module.css
│ ├── css
│ │ └── custom.css
│ └── pages
│ │ ├── index.module.css
│ │ ├── index.tsx
│ │ └── markdown-page.md
├── static
│ ├── .nojekyll
│ └── img
│ │ ├── favicon.ico
│ │ └── logo.png
├── tsconfig.json
└── yarn.lock
└── yarn.lock
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/
2 | dist/
3 | node_modules/
4 | .snapshots/
5 | *.min.js
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "@typescript-eslint/parser",
3 | "extends": [
4 | "standard",
5 | "standard-react",
6 | "plugin:prettier/recommended",
7 | "prettier/standard",
8 | "prettier/react",
9 | "plugin:@typescript-eslint/eslint-recommended"
10 | ],
11 | "env": {
12 | "node": true
13 | },
14 | "parserOptions": {
15 | "ecmaVersion": 2020,
16 | "ecmaFeatures": {
17 | "legacyDecorators": true,
18 | "jsx": true
19 | }
20 | },
21 | "settings": {
22 | "react": {
23 | "version": "16"
24 | }
25 | },
26 | "rules": {
27 | "space-before-function-paren": 0,
28 | "react/prop-types": 0,
29 | "react/jsx-handler-names": 0,
30 | "react/jsx-fragments": 0,
31 | "react/no-unused-prop-types": 0,
32 | "import/export": 0,
33 | "prettier/prettier": ["error", { "endOfLine": "auto" }],
34 | "no-unused-vars": "off",
35 | "@typescript-eslint/no-unused-vars": "off"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/.gitpod.yml:
--------------------------------------------------------------------------------
1 | # This configuration file was automatically generated by Gitpod.
2 | # Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
3 | # and commit this file to your remote git repository to share the goodness with others.
4 |
5 | tasks:
6 | - init: yarn install && yarn run build
7 | command: yarn run start
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "jsxSingleQuote": true,
4 | "semi": false,
5 | "tabWidth": 2,
6 | "bracketSpacing": true,
7 | "jsxBracketSameLine": false,
8 | "arrowParens": "always",
9 | "trailingComma": "none"
10 | }
11 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 12
4 | - 10
5 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | .
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | :+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
4 |
5 | When contributing to this repository, please first discuss the change you wish to make via issue before making a change.
6 |
7 | Please note we have a code of conduct, please follow it in all your interactions with the project.
8 |
9 | ## General Guidelines
10 |
11 | - Before starting to work on something, please open an issue first
12 | - Ensure that nothing get broke. You can use the playground for that
13 | - If applicable, update the [documentation](https://rc-toastr.vercel.app/docs)
14 | - Use prettier before committing
15 | - When solving a bug, please provide the steps to reproduce it(codesandbox is our best friend for that)
16 |
17 | ## Setup
18 |
19 | ### Pre-requisites
20 |
21 | - *Node:* `^16.0.0`
22 |
23 | ### Install
24 |
25 | Clone the repository and create a local branch:
26 |
27 | ```sh
28 | git clone https://github.com/walidcherhane/rc-toastr.git
29 | cd rc-toastr
30 | git checkout -b my-branch
31 | ```
32 | ## License
33 | By contributing, you agree that your contributions will be licensed under its MIT License.
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Walid Cherhane
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | 
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
19 |
20 | ## Usage
21 |
22 | ```jsx
23 | import { ToastProvider } from 'rc-toastr'
24 | import "rc-toastr/dist/index.css" // import the css file
25 |
26 | ReactDOM.render((
27 |
28 |
29 |
30 | ), document.getElementById('root'))
31 | ```
32 |
33 | ```jsx
34 | import { useToast } from 'rc-toastr'
35 |
36 | const App = () => {
37 | const { toast } = useToast()
38 | const hello = () => toast.success("Hello World!")
39 | return Say Hello
40 | }
41 |
42 | export default App
43 | ```
44 |
45 | ## Documentation:
46 |
47 | For more information and examples feel free to check the official website at: **[dub.sh/rc-toastr](https://dub.sh/rc-toastr)**
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | This example was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2 |
3 | It is linked to the rc-toastr package in the parent directory for development purposes.
4 |
5 | You can run `yarn install` and then `yarn start` to test your package.
6 |
--------------------------------------------------------------------------------
/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rc-toastr-example",
3 | "homepage": ".",
4 | "version": "0.0.0",
5 | "private": true,
6 | "scripts": {
7 | "start": "node ../node_modules/react-scripts/bin/react-scripts.js start",
8 | "build": "node ../node_modules/react-scripts/bin/react-scripts.js build",
9 | "test": "node ../node_modules/react-scripts/bin/react-scripts.js test",
10 | "eject": "node ../node_modules/react-scripts/bin/react-scripts.js eject"
11 | },
12 | "dependencies": {
13 | "@testing-library/jest-dom": "link:../node_modules/@testing-library/jest-dom",
14 | "@testing-library/react": "link:../node_modules/@testing-library/react",
15 | "@testing-library/user-event": "link:../node_modules/@testing-library/user-event",
16 | "@types/jest": "link:../node_modules/@types/jest",
17 | "@types/node": "link:../node_modules/@types/node",
18 | "@types/react": "link:../node_modules/@types/react",
19 | "@types/react-dom": "link:../node_modules/@types/react-dom",
20 | "rc-toastr": "link:../",
21 | "react": "link:../node_modules/react",
22 | "react-dom": "link:../node_modules/react-dom",
23 | "react-icons": "^4.4.0",
24 | "typescript": "link:../node_modules/typescript"
25 | },
26 | "devDependencies": {
27 | "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
28 | "autoprefixer": "^10.4.12",
29 | "postcss": "^8.4.18",
30 | "tailwindcss": "^3.2.0"
31 | },
32 | "eslintConfig": {
33 | "extends": "react-app"
34 | },
35 | "browserslist": {
36 | "production": [
37 | ">0.2%",
38 | "not dead",
39 | "not op_mini all"
40 | ],
41 | "development": [
42 | "last 1 chrome version",
43 | "last 1 firefox version",
44 | "last 1 safari version"
45 | ]
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/example/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/example/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walidcherhane/rc-toastr/4b3cea677aaf3c4ab6073a10773a69d0358ea148/example/public/favicon.ico
--------------------------------------------------------------------------------
/example/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
10 |
11 |
12 |
13 |
17 |
18 |
19 |
28 | rc-toastr
29 |
30 |
31 |
32 |
33 | You need to enable JavaScript to run this app.
34 |
35 |
36 |
37 |
38 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/example/public/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walidcherhane/rc-toastr/4b3cea677aaf3c4ab6073a10773a69d0358ea148/example/public/logo.png
--------------------------------------------------------------------------------
/example/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "rc-toastr",
3 | "name": "rc-toastr",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/example/src/App.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom'
3 | import App from './App'
4 | it('renders without crashing', () => {
5 | const div = document.createElement('div')
6 | ReactDOM.render( , div)
7 | ReactDOM.unmountComponentAtNode(div)
8 | })
9 |
10 |
--------------------------------------------------------------------------------
/example/src/App.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { useToast, theme } from 'rc-toastr'
3 | import { Variant } from 'rc-toastr/dist/types'
4 | const App = () => {
5 | const { updateConfig, config } = useToast()
6 | return
7 |
8 |
9 |
10 | rc-toastr
11 |
12 |
13 | 💡 Tip: Click the toast to show the others!
14 |
15 |
53 |
127 |
128 |
131 | Click me
132 |
133 |
136 | Click me
137 |
138 |
141 | Click me
142 |
143 |
146 | Click me
147 |
148 |
151 | Click me
152 |
153 |
154 |
155 |
156 |
157 | }
158 |
159 |
160 | const Button: React.FC<{
161 | variant: Variant
162 | children: React.ReactNode
163 |
164 | }> = ({ variant, children }) => {
165 | const { toast } = useToast()
166 |
167 | const handleToast = () => {
168 | toast.loading(
169 | new Promise((_, reject) => {
170 | setTimeout(() => {
171 | reject("Done")
172 | }, 3000)
173 | }),
174 | {
175 | success: "Success, it's done!",
176 | error: (e)=>{
177 | toast.error(e as string)
178 | },
179 | loading: `Loading data...`,
180 | }
181 | )
182 | }
183 | return (
184 |
185 |
188 | {children}
189 |
190 |
191 | )
192 | }
193 |
194 | export default App
195 |
--------------------------------------------------------------------------------
/example/src/index.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | body {
6 | margin: 0;
7 | padding: 0;
8 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
9 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
10 | sans-serif;
11 | -webkit-font-smoothing: antialiased;
12 | -moz-osx-font-smoothing: grayscale;
13 | background: linear-gradient(to right, #c9d6ff, #e2e2e2);
14 |
15 | }
16 |
17 |
18 | code {
19 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
20 | monospace;
21 | }
22 |
23 | .container {
24 | overflow-x: auto;
25 | min-height: 100vh;
26 | display: flex;
27 | flex-direction: column;
28 | align-content: center;
29 | justify-content: center;
30 | align-items: center;
31 | gap: 1rem;
32 | flex-wrap: wrap;
33 | padding: 1rem 0;
34 | }
35 |
36 | .title {
37 | font-size: 3.4rem;
38 | font-weight: 700;
39 | color: #1e3a8a;
40 | text-transform: capitalize;
41 | text-align: center;
42 | }
43 | .description {
44 | font-size: 1rem;
45 | font-weight: 400;
46 | color: #1e3a8a;
47 | text-align: center;
48 | margin-bottom: 1.5rem;
49 | }
50 |
51 | .buttons {
52 | display: flex;
53 | justify-content: center;
54 | align-items: center;
55 | gap: 1rem;
56 | flex-wrap: wrap;
57 | }
58 | /* From uiverse.io */
59 | .button {
60 | align-items: center;
61 | background-image: linear-gradient(144deg, #af40ff, #5b42f3 50%, #00ddeb);
62 | border: 0;
63 | border-radius: 8px;
64 | box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
65 | box-sizing: border-box;
66 | color: #ffffff;
67 | display: flex;
68 | font-family: Phantomsans, sans-serif;
69 | font-size: 18px;
70 | justify-content: center;
71 | line-height: 1em;
72 | max-width: 100%;
73 | min-width: 140px;
74 | padding: 3px;
75 | text-decoration: none;
76 | user-select: none;
77 | -webkit-user-select: none;
78 | touch-action: manipulation;
79 | white-space: nowrap;
80 | cursor: pointer;
81 | transition: all 0.3s;
82 | }
83 |
84 | .button:active,
85 | .button:hover {
86 | outline: 0;
87 | }
88 |
89 | .button span {
90 | padding: 16px 24px;
91 | border-radius: 6px;
92 | width: 100%;
93 | height: 100%;
94 | transition: 300ms;
95 | }
96 |
97 | .button:hover span {
98 | background: none !important;
99 | }
100 |
101 | .button:active {
102 | transform: scale(0.9);
103 | }
104 |
105 |
106 |
107 |
108 | .checkbox input {
109 | position: absolute;
110 | opacity: 0;
111 | cursor: pointer;
112 | height: 0;
113 | width: 0;
114 | }
115 |
116 | .checkbox {
117 | display: block;
118 | position: relative;
119 | cursor: pointer;
120 | font-size: 20px;
121 | user-select: none;
122 | }
123 |
124 | /* Create a custom checkbox */
125 | .checkmark {
126 | position: relative;
127 | top: 0;
128 | left: 0;
129 | height: 1.3em;
130 | width: 1.3em;
131 | /* background: ; */
132 | border: 2px solid #1D52C1;
133 | border-radius: 7px;
134 | box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.30), 0px 1px 1px rgba(0,5);
135 | }
136 |
137 | /* When the checkbox is checked, add a blue background */
138 | .checkbox input:checked ~ .checkmark {
139 | background-image: linear-gradient(#255CD2,#1D52C1)
140 | }
141 |
142 | .checkbox input[disabled] ~ .checkmark {
143 | cursor: not-allowed;
144 | background: #a1a1fa;
145 | opacity: 0.5;
146 | }
147 |
148 | /* Create the checkmark/indicator (hidden when not checked) */
149 | .checkmark:after {
150 | content: "";
151 | position: absolute;
152 | display: none;
153 | }
154 |
155 | /* Show the checkmark when checked */
156 | .checkbox input:checked ~ .checkmark:after {
157 | display: block;
158 | }
159 |
160 | /* Style the checkmark/indicator */
161 | .checkbox .checkmark:after {
162 | left: 0.40em;
163 | top: 0.1em;
164 | width: 0.24em;
165 | height: 0.6em;
166 | border: solid white;
167 | border-width: 0 0.15em 0.15em 0;
168 | transform: rotate(45deg);
169 | }
170 |
171 |
172 |
173 |
174 |
175 | .scrolldown {
176 | --color: rgb(135, 114, 255);
177 | --sizeX: 30px;
178 | --sizeY: 50px;
179 | position: relative;
180 | width: var(--sizeX);
181 | height: var(--sizeY);
182 | margin-left: var(sizeX / 2);
183 | border: calc(var(--sizeX) / 10) solid var(--color);
184 | border-radius: 50px;
185 | box-sizing: border-box;
186 | margin-bottom: 16px;
187 | cursor: pointer;
188 | }
189 |
190 | .scrolldown::before {
191 | content: "";
192 | position: absolute;
193 | bottom: 30px;
194 | left: 50%;
195 | width: 6px;
196 | height: 6px;
197 | margin-left: -3px;
198 | background-color: var(--color);
199 | border-radius: 100%;
200 | animation: scrolldown-anim 2s infinite;
201 | box-sizing: border-box;
202 | box-shadow: 0px -5px 3px 1px #2a547066;
203 | }
204 |
205 | @keyframes scrolldown-anim {
206 | 0% {
207 | opacity: 0;
208 | height: 6px;
209 | }
210 |
211 | 40% {
212 | opacity: 1;
213 | height: 10px;
214 | }
215 |
216 | 80% {
217 | transform: translate(0, 20px);
218 | height: 10px;
219 | opacity: 0;
220 | }
221 |
222 | 100% {
223 | height: 3px;
224 | opacity: 0;
225 | }
226 | }
227 |
228 | .chevrons {
229 | padding: 6px 0 0 0;
230 | margin-left: -3px;
231 | margin-top: 48px;
232 | width: 30px;
233 | display: flex;
234 | flex-direction: column;
235 | align-items: center;
236 | }
237 |
238 | .chevrondown {
239 | margin-top: -6px;
240 | position: relative;
241 | border: solid var(--color);
242 | border-width: 0 3px 3px 0;
243 | display: inline-block;
244 | width: 10px;
245 | height: 10px;
246 | transform: rotate(45deg);
247 | }
248 |
249 | .chevrondown:nth-child(odd) {
250 | animation: pulse54012 500ms ease infinite alternate;
251 | }
252 |
253 | .chevrondown:nth-child(even) {
254 | animation: pulse54012 500ms ease infinite alternate 250ms;
255 | }
256 |
257 | @keyframes pulse54012 {
258 | from {
259 | opacity: 0;
260 | }
261 |
262 | to {
263 | opacity: 0.5;
264 | }
265 | }
--------------------------------------------------------------------------------
/example/src/index.tsx:
--------------------------------------------------------------------------------
1 |
2 | import React from 'react'
3 | import ReactDOM from 'react-dom'
4 | import App from './App'
5 | import {ToastProvider } from 'rc-toastr'
6 | import "rc-toastr/dist/index.css"
7 | import './index.css'
8 |
9 | ReactDOM.render((
10 |
15 |
16 |
17 |
18 | ), document.getElementById('root'))
19 |
--------------------------------------------------------------------------------
/example/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/example/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom/extend-expect';
6 |
--------------------------------------------------------------------------------
/example/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "content": [
3 | "./src/**/*.{js,jsx,ts,tsx}"
4 | ],
5 | "theme": {
6 | "extend": {}
7 | },
8 | "plugins": []
9 | }
--------------------------------------------------------------------------------
/example/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "outDir": "dist",
4 | "module": "esnext",
5 | "lib": [
6 | "dom",
7 | "esnext"
8 | ],
9 | "moduleResolution": "node",
10 | "jsx": "react",
11 | "sourceMap": true,
12 | "declaration": true,
13 | "esModuleInterop": true,
14 | "noImplicitReturns": true,
15 | "noImplicitThis": true,
16 | "noImplicitAny": true,
17 | "strictNullChecks": true,
18 | "suppressImplicitAnyIndexErrors": true,
19 | "noUnusedLocals": true,
20 | "noUnusedParameters": true,
21 | "allowSyntheticDefaultImports": true,
22 | "target": "es5",
23 | "allowJs": true,
24 | "skipLibCheck": true,
25 | "strict": true,
26 | "forceConsistentCasingInFileNames": true,
27 | "resolveJsonModule": true,
28 | "isolatedModules": true,
29 | "noEmit": true
30 | },
31 | "include": [
32 | "src"
33 | ],
34 | "exclude": [
35 | "node_modules",
36 | "build"
37 | ]
38 | }
39 |
--------------------------------------------------------------------------------
/example/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@adobe/css-tools@^4.0.1":
6 | version "4.0.1"
7 | resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.0.1.tgz#b38b444ad3aa5fedbb15f2f746dcd934226a12dd"
8 | integrity sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==
9 |
10 | "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13":
11 | version "7.18.6"
12 | resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a"
13 | integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==
14 | dependencies:
15 | "@babel/highlight" "^7.18.6"
16 |
17 | "@babel/helper-plugin-utils@^7.8.0":
18 | version "7.19.0"
19 | resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf"
20 | integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==
21 |
22 | "@babel/helper-validator-identifier@^7.18.6":
23 | version "7.19.1"
24 | resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2"
25 | integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==
26 |
27 | "@babel/highlight@^7.18.6":
28 | version "7.18.6"
29 | resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf"
30 | integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==
31 | dependencies:
32 | "@babel/helper-validator-identifier" "^7.18.6"
33 | chalk "^2.0.0"
34 | js-tokens "^4.0.0"
35 |
36 | "@babel/plugin-syntax-object-rest-spread@^7.8.3":
37 | version "7.8.3"
38 | resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871"
39 | integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==
40 | dependencies:
41 | "@babel/helper-plugin-utils" "^7.8.0"
42 |
43 | "@babel/runtime@^7.12.5":
44 | version "7.19.0"
45 | resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259"
46 | integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA==
47 | dependencies:
48 | regenerator-runtime "^0.13.4"
49 |
50 | "@babel/runtime@^7.9.2":
51 | version "7.20.0"
52 | resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.0.tgz#824a9ef325ffde6f78056059db3168c08785e24a"
53 | integrity sha512-NDYdls71fTXoU8TZHfbBWg7DiZfNzClcKui/+kyi6ppD2L1qnWW3VV6CjtaBXSUGGhiTWJ6ereOIkUvenif66Q==
54 | dependencies:
55 | regenerator-runtime "^0.13.10"
56 |
57 | "@jest/expect-utils@^29.2.2":
58 | version "29.2.2"
59 | resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.2.2.tgz#460a5b5a3caf84d4feb2668677393dd66ff98665"
60 | integrity sha512-vwnVmrVhTmGgQzyvcpze08br91OL61t9O0lJMDyb6Y/D8EKQ9V7rGUb/p7PDt0GPzK0zFYqXWFo4EO2legXmkg==
61 | dependencies:
62 | jest-get-type "^29.2.0"
63 |
64 | "@jest/schemas@^29.0.0":
65 | version "29.0.0"
66 | resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.0.0.tgz#5f47f5994dd4ef067fb7b4188ceac45f77fe952a"
67 | integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==
68 | dependencies:
69 | "@sinclair/typebox" "^0.24.1"
70 |
71 | "@jest/types@^29.2.1":
72 | version "29.2.1"
73 | resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.2.1.tgz#ec9c683094d4eb754e41e2119d8bdaef01cf6da0"
74 | integrity sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==
75 | dependencies:
76 | "@jest/schemas" "^29.0.0"
77 | "@types/istanbul-lib-coverage" "^2.0.0"
78 | "@types/istanbul-reports" "^3.0.0"
79 | "@types/node" "*"
80 | "@types/yargs" "^17.0.8"
81 | chalk "^4.0.0"
82 |
83 | "@nodelib/fs.scandir@2.1.5":
84 | version "2.1.5"
85 | resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
86 | integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
87 | dependencies:
88 | "@nodelib/fs.stat" "2.0.5"
89 | run-parallel "^1.1.9"
90 |
91 | "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
92 | version "2.0.5"
93 | resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
94 | integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
95 |
96 | "@nodelib/fs.walk@^1.2.3":
97 | version "1.2.8"
98 | resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
99 | integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
100 | dependencies:
101 | "@nodelib/fs.scandir" "2.1.5"
102 | fastq "^1.6.0"
103 |
104 | "@sinclair/typebox@^0.24.1":
105 | version "0.24.51"
106 | resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f"
107 | integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==
108 |
109 | "@testing-library/dom@^8.5.0":
110 | version "8.19.0"
111 | resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.19.0.tgz#bd3f83c217ebac16694329e413d9ad5fdcfd785f"
112 | integrity sha512-6YWYPPpxG3e/xOo6HIWwB/58HukkwIVTOaZ0VwdMVjhRUX/01E4FtQbck9GazOOj7MXHc5RBzMrU86iBJHbI+A==
113 | dependencies:
114 | "@babel/code-frame" "^7.10.4"
115 | "@babel/runtime" "^7.12.5"
116 | "@types/aria-query" "^4.2.0"
117 | aria-query "^5.0.0"
118 | chalk "^4.1.0"
119 | dom-accessibility-api "^0.5.9"
120 | lz-string "^1.4.4"
121 | pretty-format "^27.0.2"
122 |
123 | "@testing-library/jest-dom@link:../node_modules/@testing-library/jest-dom":
124 | version "0.0.0"
125 | uid ""
126 |
127 | "@testing-library/react@link:../node_modules/@testing-library/react":
128 | version "0.0.0"
129 | uid ""
130 |
131 | "@testing-library/user-event@link:../node_modules/@testing-library/user-event":
132 | version "0.0.0"
133 | uid ""
134 |
135 | "@types/aria-query@^4.2.0":
136 | version "4.2.2"
137 | resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.2.tgz#ed4e0ad92306a704f9fb132a0cfcf77486dbe2bc"
138 | integrity sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==
139 |
140 | "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
141 | version "2.0.4"
142 | resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44"
143 | integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==
144 |
145 | "@types/istanbul-lib-report@*":
146 | version "3.0.0"
147 | resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686"
148 | integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==
149 | dependencies:
150 | "@types/istanbul-lib-coverage" "*"
151 |
152 | "@types/istanbul-reports@^3.0.0":
153 | version "3.0.1"
154 | resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff"
155 | integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==
156 | dependencies:
157 | "@types/istanbul-lib-report" "*"
158 |
159 | "@types/jest@*":
160 | version "29.2.0"
161 | resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.2.0.tgz#fa98e08b46ab119f1a74a9552c48c589f5378a96"
162 | integrity sha512-KO7bPV21d65PKwv3LLsD8Jn3E05pjNjRZvkm+YTacWhVmykAb07wW6IkZUmQAltwQafNcDUEUrMO2h3jeBSisg==
163 | dependencies:
164 | expect "^29.0.0"
165 | pretty-format "^29.0.0"
166 |
167 | "@types/jest@link:../node_modules/@types/jest":
168 | version "0.0.0"
169 | uid ""
170 |
171 | "@types/node@*":
172 | version "18.11.8"
173 | resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.8.tgz#16d222a58d4363a2a359656dd20b28414de5d265"
174 | integrity sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A==
175 |
176 | "@types/node@link:../node_modules/@types/node":
177 | version "0.0.0"
178 | uid ""
179 |
180 | "@types/prop-types@*":
181 | version "15.7.5"
182 | resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
183 | integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==
184 |
185 | "@types/react-dom@^18.0.0":
186 | version "18.0.8"
187 | resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.8.tgz#d2606d855186cd42cc1b11e63a71c39525441685"
188 | integrity sha512-C3GYO0HLaOkk9dDAz3Dl4sbe4AKUGTCfFIZsz3n/82dPNN8Du533HzKatDxeUYWu24wJgMP1xICqkWk1YOLOIw==
189 | dependencies:
190 | "@types/react" "*"
191 |
192 | "@types/react-dom@link:../node_modules/@types/react-dom":
193 | version "0.0.0"
194 | uid ""
195 |
196 | "@types/react@*":
197 | version "18.0.20"
198 | resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.20.tgz#e4c36be3a55eb5b456ecf501bd4a00fd4fd0c9ab"
199 | integrity sha512-MWul1teSPxujEHVwZl4a5HxQ9vVNsjTchVA+xRqv/VYGCuKGAU6UhfrTdF5aBefwD1BHUD8i/zq+O/vyCm/FrA==
200 | dependencies:
201 | "@types/prop-types" "*"
202 | "@types/scheduler" "*"
203 | csstype "^3.0.2"
204 |
205 | "@types/react@link:../node_modules/@types/react":
206 | version "0.0.0"
207 | uid ""
208 |
209 | "@types/scheduler@*":
210 | version "0.16.2"
211 | resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
212 | integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==
213 |
214 | "@types/stack-utils@^2.0.0":
215 | version "2.0.1"
216 | resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
217 | integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==
218 |
219 | "@types/testing-library__jest-dom@^5.9.1":
220 | version "5.14.5"
221 | resolved "https://registry.yarnpkg.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.5.tgz#d113709c90b3c75fdb127ec338dad7d5f86c974f"
222 | integrity sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ==
223 | dependencies:
224 | "@types/jest" "*"
225 |
226 | "@types/yargs-parser@*":
227 | version "21.0.0"
228 | resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"
229 | integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==
230 |
231 | "@types/yargs@^17.0.8":
232 | version "17.0.13"
233 | resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76"
234 | integrity sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==
235 | dependencies:
236 | "@types/yargs-parser" "*"
237 |
238 | acorn-node@^1.8.2:
239 | version "1.8.2"
240 | resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8"
241 | integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==
242 | dependencies:
243 | acorn "^7.0.0"
244 | acorn-walk "^7.0.0"
245 | xtend "^4.0.2"
246 |
247 | acorn-walk@^7.0.0:
248 | version "7.2.0"
249 | resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc"
250 | integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
251 |
252 | acorn@^7.0.0:
253 | version "7.4.1"
254 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
255 | integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
256 |
257 | ansi-regex@^5.0.1:
258 | version "5.0.1"
259 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
260 | integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
261 |
262 | ansi-styles@^3.2.1:
263 | version "3.2.1"
264 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
265 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
266 | dependencies:
267 | color-convert "^1.9.0"
268 |
269 | ansi-styles@^4.1.0:
270 | version "4.3.0"
271 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
272 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
273 | dependencies:
274 | color-convert "^2.0.1"
275 |
276 | ansi-styles@^5.0.0:
277 | version "5.2.0"
278 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
279 | integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
280 |
281 | anymatch@~3.1.2:
282 | version "3.1.2"
283 | resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
284 | integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
285 | dependencies:
286 | normalize-path "^3.0.0"
287 | picomatch "^2.0.4"
288 |
289 | arg@^5.0.2:
290 | version "5.0.2"
291 | resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c"
292 | integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==
293 |
294 | aria-query@^5.0.0:
295 | version "5.0.2"
296 | resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.0.2.tgz#0b8a744295271861e1d933f8feca13f9b70cfdc1"
297 | integrity sha512-eigU3vhqSO+Z8BKDnVLN/ompjhf3pYzecKXz8+whRy+9gZu8n1TCGfwzQUUPnqdHl9ax1Hr9031orZ+UOEYr7Q==
298 |
299 | autoprefixer@^10.4.12:
300 | version "10.4.12"
301 | resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.12.tgz#183f30bf0b0722af54ee5ef257f7d4320bb33129"
302 | integrity sha512-WrCGV9/b97Pa+jtwf5UGaRjgQIg7OK3D06GnoYoZNcG1Xb8Gt3EfuKjlhh9i/VtT16g6PYjZ69jdJ2g8FxSC4Q==
303 | dependencies:
304 | browserslist "^4.21.4"
305 | caniuse-lite "^1.0.30001407"
306 | fraction.js "^4.2.0"
307 | normalize-range "^0.1.2"
308 | picocolors "^1.0.0"
309 | postcss-value-parser "^4.2.0"
310 |
311 | binary-extensions@^2.0.0:
312 | version "2.2.0"
313 | resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
314 | integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
315 |
316 | braces@^3.0.2, braces@~3.0.2:
317 | version "3.0.2"
318 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
319 | integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
320 | dependencies:
321 | fill-range "^7.0.1"
322 |
323 | browserslist@^4.21.4:
324 | version "4.21.4"
325 | resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987"
326 | integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==
327 | dependencies:
328 | caniuse-lite "^1.0.30001400"
329 | electron-to-chromium "^1.4.251"
330 | node-releases "^2.0.6"
331 | update-browserslist-db "^1.0.9"
332 |
333 | camelcase-css@^2.0.1:
334 | version "2.0.1"
335 | resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5"
336 | integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
337 |
338 | caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001407:
339 | version "1.0.30001423"
340 | resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001423.tgz#57176d460aa8cd85ee1a72016b961eb9aca55d91"
341 | integrity sha512-09iwWGOlifvE1XuHokFMP7eR38a0JnajoyL3/i87c8ZjRWRrdKo1fqjNfugfBD0UDBIOz0U+jtNhJ0EPm1VleQ==
342 |
343 | chalk@^2.0.0:
344 | version "2.4.2"
345 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
346 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
347 | dependencies:
348 | ansi-styles "^3.2.1"
349 | escape-string-regexp "^1.0.5"
350 | supports-color "^5.3.0"
351 |
352 | chalk@^3.0.0:
353 | version "3.0.0"
354 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
355 | integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
356 | dependencies:
357 | ansi-styles "^4.1.0"
358 | supports-color "^7.1.0"
359 |
360 | chalk@^4.0.0, chalk@^4.1.0:
361 | version "4.1.2"
362 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
363 | integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
364 | dependencies:
365 | ansi-styles "^4.1.0"
366 | supports-color "^7.1.0"
367 |
368 | chokidar@^3.5.3:
369 | version "3.5.3"
370 | resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
371 | integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
372 | dependencies:
373 | anymatch "~3.1.2"
374 | braces "~3.0.2"
375 | glob-parent "~5.1.2"
376 | is-binary-path "~2.1.0"
377 | is-glob "~4.0.1"
378 | normalize-path "~3.0.0"
379 | readdirp "~3.6.0"
380 | optionalDependencies:
381 | fsevents "~2.3.2"
382 |
383 | ci-info@^3.2.0:
384 | version "3.5.0"
385 | resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.5.0.tgz#bfac2a29263de4c829d806b1ab478e35091e171f"
386 | integrity sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==
387 |
388 | color-convert@^1.9.0:
389 | version "1.9.3"
390 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
391 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
392 | dependencies:
393 | color-name "1.1.3"
394 |
395 | color-convert@^2.0.1:
396 | version "2.0.1"
397 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
398 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
399 | dependencies:
400 | color-name "~1.1.4"
401 |
402 | color-name@1.1.3:
403 | version "1.1.3"
404 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
405 | integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
406 |
407 | color-name@^1.1.4, color-name@~1.1.4:
408 | version "1.1.4"
409 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
410 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
411 |
412 | css.escape@^1.5.1:
413 | version "1.5.1"
414 | resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb"
415 | integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==
416 |
417 | cssesc@^3.0.0:
418 | version "3.0.0"
419 | resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
420 | integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
421 |
422 | csstype@^3.0.2:
423 | version "3.1.1"
424 | resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.1.tgz#841b532c45c758ee546a11d5bd7b7b473c8c30b9"
425 | integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==
426 |
427 | defined@^1.0.0:
428 | version "1.0.1"
429 | resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.1.tgz#c0b9db27bfaffd95d6f61399419b893df0f91ebf"
430 | integrity sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==
431 |
432 | detective@^5.2.1:
433 | version "5.2.1"
434 | resolved "https://registry.yarnpkg.com/detective/-/detective-5.2.1.tgz#6af01eeda11015acb0e73f933242b70f24f91034"
435 | integrity sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==
436 | dependencies:
437 | acorn-node "^1.8.2"
438 | defined "^1.0.0"
439 | minimist "^1.2.6"
440 |
441 | didyoumean@^1.2.2:
442 | version "1.2.2"
443 | resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037"
444 | integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==
445 |
446 | diff-sequences@^29.2.0:
447 | version "29.2.0"
448 | resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.2.0.tgz#4c55b5b40706c7b5d2c5c75999a50c56d214e8f6"
449 | integrity sha512-413SY5JpYeSBZxmenGEmCVQ8mCgtFJF0w9PROdaS6z987XC2Pd2GOKqOITLtMftmyFZqgtCOb/QA7/Z3ZXfzIw==
450 |
451 | dlv@^1.1.3:
452 | version "1.1.3"
453 | resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
454 | integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
455 |
456 | dom-accessibility-api@^0.5.6, dom-accessibility-api@^0.5.9:
457 | version "0.5.14"
458 | resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.14.tgz#56082f71b1dc7aac69d83c4285eef39c15d93f56"
459 | integrity sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==
460 |
461 | electron-to-chromium@^1.4.251:
462 | version "1.4.284"
463 | resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592"
464 | integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==
465 |
466 | escalade@^3.1.1:
467 | version "3.1.1"
468 | resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
469 | integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
470 |
471 | escape-string-regexp@^1.0.5:
472 | version "1.0.5"
473 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
474 | integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
475 |
476 | escape-string-regexp@^2.0.0:
477 | version "2.0.0"
478 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
479 | integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
480 |
481 | expect@^29.0.0:
482 | version "29.2.2"
483 | resolved "https://registry.yarnpkg.com/expect/-/expect-29.2.2.tgz#ba2dd0d7e818727710324a6e7f13dd0e6d086106"
484 | integrity sha512-hE09QerxZ5wXiOhqkXy5d2G9ar+EqOyifnCXCpMNu+vZ6DG9TJ6CO2c2kPDSLqERTTWrO7OZj8EkYHQqSd78Yw==
485 | dependencies:
486 | "@jest/expect-utils" "^29.2.2"
487 | jest-get-type "^29.2.0"
488 | jest-matcher-utils "^29.2.2"
489 | jest-message-util "^29.2.1"
490 | jest-util "^29.2.1"
491 |
492 | fast-glob@^3.2.12:
493 | version "3.2.12"
494 | resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80"
495 | integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==
496 | dependencies:
497 | "@nodelib/fs.stat" "^2.0.2"
498 | "@nodelib/fs.walk" "^1.2.3"
499 | glob-parent "^5.1.2"
500 | merge2 "^1.3.0"
501 | micromatch "^4.0.4"
502 |
503 | fastq@^1.6.0:
504 | version "1.13.0"
505 | resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c"
506 | integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==
507 | dependencies:
508 | reusify "^1.0.4"
509 |
510 | fill-range@^7.0.1:
511 | version "7.0.1"
512 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
513 | integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
514 | dependencies:
515 | to-regex-range "^5.0.1"
516 |
517 | fraction.js@^4.2.0:
518 | version "4.2.0"
519 | resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950"
520 | integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==
521 |
522 | fsevents@~2.3.2:
523 | version "2.3.2"
524 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
525 | integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
526 |
527 | function-bind@^1.1.1:
528 | version "1.1.1"
529 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
530 | integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
531 |
532 | glob-parent@^5.1.2, glob-parent@~5.1.2:
533 | version "5.1.2"
534 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
535 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
536 | dependencies:
537 | is-glob "^4.0.1"
538 |
539 | glob-parent@^6.0.2:
540 | version "6.0.2"
541 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
542 | integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
543 | dependencies:
544 | is-glob "^4.0.3"
545 |
546 | graceful-fs@^4.2.9:
547 | version "4.2.10"
548 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
549 | integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
550 |
551 | has-flag@^3.0.0:
552 | version "3.0.0"
553 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
554 | integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
555 |
556 | has-flag@^4.0.0:
557 | version "4.0.0"
558 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
559 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
560 |
561 | has@^1.0.3:
562 | version "1.0.3"
563 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
564 | integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
565 | dependencies:
566 | function-bind "^1.1.1"
567 |
568 | indent-string@^4.0.0:
569 | version "4.0.0"
570 | resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
571 | integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
572 |
573 | is-binary-path@~2.1.0:
574 | version "2.1.0"
575 | resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
576 | integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
577 | dependencies:
578 | binary-extensions "^2.0.0"
579 |
580 | is-core-module@^2.9.0:
581 | version "2.11.0"
582 | resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144"
583 | integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==
584 | dependencies:
585 | has "^1.0.3"
586 |
587 | is-extglob@^2.1.1:
588 | version "2.1.1"
589 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
590 | integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
591 |
592 | is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
593 | version "4.0.3"
594 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
595 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
596 | dependencies:
597 | is-extglob "^2.1.1"
598 |
599 | is-number@^7.0.0:
600 | version "7.0.0"
601 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
602 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
603 |
604 | jest-diff@^29.2.1:
605 | version "29.2.1"
606 | resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.2.1.tgz#027e42f5a18b693fb2e88f81b0ccab533c08faee"
607 | integrity sha512-gfh/SMNlQmP3MOUgdzxPOd4XETDJifADpT937fN1iUGz+9DgOu2eUPHH25JDkLVcLwwqxv3GzVyK4VBUr9fjfA==
608 | dependencies:
609 | chalk "^4.0.0"
610 | diff-sequences "^29.2.0"
611 | jest-get-type "^29.2.0"
612 | pretty-format "^29.2.1"
613 |
614 | jest-get-type@^29.2.0:
615 | version "29.2.0"
616 | resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.2.0.tgz#726646f927ef61d583a3b3adb1ab13f3a5036408"
617 | integrity sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==
618 |
619 | jest-matcher-utils@^29.2.2:
620 | version "29.2.2"
621 | resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.2.2.tgz#9202f8e8d3a54733266784ce7763e9a08688269c"
622 | integrity sha512-4DkJ1sDPT+UX2MR7Y3od6KtvRi9Im1ZGLGgdLFLm4lPexbTaCgJW5NN3IOXlQHF7NSHY/VHhflQ+WoKtD/vyCw==
623 | dependencies:
624 | chalk "^4.0.0"
625 | jest-diff "^29.2.1"
626 | jest-get-type "^29.2.0"
627 | pretty-format "^29.2.1"
628 |
629 | jest-message-util@^29.2.1:
630 | version "29.2.1"
631 | resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.2.1.tgz#3a51357fbbe0cc34236f17a90d772746cf8d9193"
632 | integrity sha512-Dx5nEjw9V8C1/Yj10S/8ivA8F439VS8vTq1L7hEgwHFn9ovSKNpYW/kwNh7UglaEgXO42XxzKJB+2x0nSglFVw==
633 | dependencies:
634 | "@babel/code-frame" "^7.12.13"
635 | "@jest/types" "^29.2.1"
636 | "@types/stack-utils" "^2.0.0"
637 | chalk "^4.0.0"
638 | graceful-fs "^4.2.9"
639 | micromatch "^4.0.4"
640 | pretty-format "^29.2.1"
641 | slash "^3.0.0"
642 | stack-utils "^2.0.3"
643 |
644 | jest-util@^29.2.1:
645 | version "29.2.1"
646 | resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.2.1.tgz#f26872ba0dc8cbefaba32c34f98935f6cf5fc747"
647 | integrity sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==
648 | dependencies:
649 | "@jest/types" "^29.2.1"
650 | "@types/node" "*"
651 | chalk "^4.0.0"
652 | ci-info "^3.2.0"
653 | graceful-fs "^4.2.9"
654 | picomatch "^2.2.3"
655 |
656 | "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
657 | version "4.0.0"
658 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
659 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
660 |
661 | lilconfig@^2.0.5, lilconfig@^2.0.6:
662 | version "2.0.6"
663 | resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4"
664 | integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==
665 |
666 | lodash@^4.17.15:
667 | version "4.17.21"
668 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
669 | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
670 |
671 | loose-envify@^1.1.0:
672 | version "1.4.0"
673 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
674 | integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
675 | dependencies:
676 | js-tokens "^3.0.0 || ^4.0.0"
677 |
678 | lz-string@^1.4.4:
679 | version "1.4.4"
680 | resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26"
681 | integrity sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==
682 |
683 | merge2@^1.3.0:
684 | version "1.4.1"
685 | resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
686 | integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
687 |
688 | micromatch@^4.0.4:
689 | version "4.0.5"
690 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
691 | integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
692 | dependencies:
693 | braces "^3.0.2"
694 | picomatch "^2.3.1"
695 |
696 | min-indent@^1.0.0:
697 | version "1.0.1"
698 | resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869"
699 | integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
700 |
701 | minimist@^1.2.6:
702 | version "1.2.7"
703 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
704 | integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
705 |
706 | nanoid@^3.3.4:
707 | version "3.3.4"
708 | resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
709 | integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
710 |
711 | node-releases@^2.0.6:
712 | version "2.0.6"
713 | resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503"
714 | integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==
715 |
716 | normalize-path@^3.0.0, normalize-path@~3.0.0:
717 | version "3.0.0"
718 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
719 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
720 |
721 | normalize-range@^0.1.2:
722 | version "0.1.2"
723 | resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
724 | integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==
725 |
726 | object-hash@^3.0.0:
727 | version "3.0.0"
728 | resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9"
729 | integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==
730 |
731 | path-parse@^1.0.7:
732 | version "1.0.7"
733 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
734 | integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
735 |
736 | picocolors@^1.0.0:
737 | version "1.0.0"
738 | resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
739 | integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
740 |
741 | picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1:
742 | version "2.3.1"
743 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
744 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
745 |
746 | pify@^2.3.0:
747 | version "2.3.0"
748 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
749 | integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==
750 |
751 | postcss-import@^14.1.0:
752 | version "14.1.0"
753 | resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-14.1.0.tgz#a7333ffe32f0b8795303ee9e40215dac922781f0"
754 | integrity sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==
755 | dependencies:
756 | postcss-value-parser "^4.0.0"
757 | read-cache "^1.0.0"
758 | resolve "^1.1.7"
759 |
760 | postcss-js@^4.0.0:
761 | version "4.0.0"
762 | resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.0.tgz#31db79889531b80dc7bc9b0ad283e418dce0ac00"
763 | integrity sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==
764 | dependencies:
765 | camelcase-css "^2.0.1"
766 |
767 | postcss-load-config@^3.1.4:
768 | version "3.1.4"
769 | resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855"
770 | integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==
771 | dependencies:
772 | lilconfig "^2.0.5"
773 | yaml "^1.10.2"
774 |
775 | postcss-nested@6.0.0:
776 | version "6.0.0"
777 | resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.0.0.tgz#1572f1984736578f360cffc7eb7dca69e30d1735"
778 | integrity sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==
779 | dependencies:
780 | postcss-selector-parser "^6.0.10"
781 |
782 | postcss-selector-parser@^6.0.10:
783 | version "6.0.10"
784 | resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz#79b61e2c0d1bfc2602d549e11d0876256f8df88d"
785 | integrity sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==
786 | dependencies:
787 | cssesc "^3.0.0"
788 | util-deprecate "^1.0.2"
789 |
790 | postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0:
791 | version "4.2.0"
792 | resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
793 | integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
794 |
795 | postcss@^8.4.17, postcss@^8.4.18:
796 | version "8.4.18"
797 | resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.18.tgz#6d50046ea7d3d66a85e0e782074e7203bc7fbca2"
798 | integrity sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==
799 | dependencies:
800 | nanoid "^3.3.4"
801 | picocolors "^1.0.0"
802 | source-map-js "^1.0.2"
803 |
804 | pretty-format@^27.0.2:
805 | version "27.5.1"
806 | resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e"
807 | integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==
808 | dependencies:
809 | ansi-regex "^5.0.1"
810 | ansi-styles "^5.0.0"
811 | react-is "^17.0.1"
812 |
813 | pretty-format@^29.0.0, pretty-format@^29.2.1:
814 | version "29.2.1"
815 | resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.2.1.tgz#86e7748fe8bbc96a6a4e04fa99172630907a9611"
816 | integrity sha512-Y41Sa4aLCtKAXvwuIpTvcFBkyeYp2gdFWzXGA+ZNES3VwURIB165XO/z7CjETwzCCS53MjW/rLMyyqEnTtaOfA==
817 | dependencies:
818 | "@jest/schemas" "^29.0.0"
819 | ansi-styles "^5.0.0"
820 | react-is "^18.0.0"
821 |
822 | queue-microtask@^1.2.2:
823 | version "1.2.3"
824 | resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
825 | integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
826 |
827 | quick-lru@^5.1.1:
828 | version "5.1.1"
829 | resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932"
830 | integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==
831 |
832 | "rc-toastr@link:..":
833 | version "0.0.0"
834 | uid ""
835 |
836 | "react-dom@link:../node_modules/react-dom":
837 | version "0.0.0"
838 | uid ""
839 |
840 | react-icons@^4.4.0:
841 | version "4.4.0"
842 | resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.4.0.tgz#a13a8a20c254854e1ec9aecef28a95cdf24ef703"
843 | integrity sha512-fSbvHeVYo/B5/L4VhB7sBA1i2tS8MkT0Hb9t2H1AVPkwGfVHLJCqyr2Py9dKMxsyM63Eng1GkdZfbWj+Fmv8Rg==
844 |
845 | react-is@^17.0.1:
846 | version "17.0.2"
847 | resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
848 | integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
849 |
850 | react-is@^18.0.0:
851 | version "18.2.0"
852 | resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b"
853 | integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==
854 |
855 | "react@link:../node_modules/react":
856 | version "0.0.0"
857 | uid ""
858 |
859 | read-cache@^1.0.0:
860 | version "1.0.0"
861 | resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
862 | integrity sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==
863 | dependencies:
864 | pify "^2.3.0"
865 |
866 | readdirp@~3.6.0:
867 | version "3.6.0"
868 | resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
869 | integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
870 | dependencies:
871 | picomatch "^2.2.1"
872 |
873 | redent@^3.0.0:
874 | version "3.0.0"
875 | resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f"
876 | integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==
877 | dependencies:
878 | indent-string "^4.0.0"
879 | strip-indent "^3.0.0"
880 |
881 | regenerator-runtime@^0.13.10:
882 | version "0.13.10"
883 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee"
884 | integrity sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==
885 |
886 | regenerator-runtime@^0.13.4:
887 | version "0.13.9"
888 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
889 | integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==
890 |
891 | resolve@^1.1.7, resolve@^1.22.1:
892 | version "1.22.1"
893 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
894 | integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==
895 | dependencies:
896 | is-core-module "^2.9.0"
897 | path-parse "^1.0.7"
898 | supports-preserve-symlinks-flag "^1.0.0"
899 |
900 | reusify@^1.0.4:
901 | version "1.0.4"
902 | resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
903 | integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
904 |
905 | run-parallel@^1.1.9:
906 | version "1.2.0"
907 | resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
908 | integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
909 | dependencies:
910 | queue-microtask "^1.2.2"
911 |
912 | scheduler@^0.23.0:
913 | version "0.23.0"
914 | resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
915 | integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
916 | dependencies:
917 | loose-envify "^1.1.0"
918 |
919 | slash@^3.0.0:
920 | version "3.0.0"
921 | resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
922 | integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
923 |
924 | source-map-js@^1.0.2:
925 | version "1.0.2"
926 | resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
927 | integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
928 |
929 | stack-utils@^2.0.3:
930 | version "2.0.5"
931 | resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5"
932 | integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==
933 | dependencies:
934 | escape-string-regexp "^2.0.0"
935 |
936 | strip-indent@^3.0.0:
937 | version "3.0.0"
938 | resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001"
939 | integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==
940 | dependencies:
941 | min-indent "^1.0.0"
942 |
943 | supports-color@^5.3.0:
944 | version "5.5.0"
945 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
946 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
947 | dependencies:
948 | has-flag "^3.0.0"
949 |
950 | supports-color@^7.1.0:
951 | version "7.2.0"
952 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
953 | integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
954 | dependencies:
955 | has-flag "^4.0.0"
956 |
957 | supports-preserve-symlinks-flag@^1.0.0:
958 | version "1.0.0"
959 | resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
960 | integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
961 |
962 | tailwindcss@^3.2.0:
963 | version "3.2.0"
964 | resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.2.0.tgz#0164a930645e7e1df301df1e9d434a52602c918d"
965 | integrity sha512-ARh/W0uH5UlWIC2nn02V0+5fyF0k6qZliyt4QYic2upOhPUE/Spu1EURNc9txJ3+4j8OEmdigqfDpw4d2tA4vA==
966 | dependencies:
967 | arg "^5.0.2"
968 | chokidar "^3.5.3"
969 | color-name "^1.1.4"
970 | detective "^5.2.1"
971 | didyoumean "^1.2.2"
972 | dlv "^1.1.3"
973 | fast-glob "^3.2.12"
974 | glob-parent "^6.0.2"
975 | is-glob "^4.0.3"
976 | lilconfig "^2.0.6"
977 | normalize-path "^3.0.0"
978 | object-hash "^3.0.0"
979 | picocolors "^1.0.0"
980 | postcss "^8.4.17"
981 | postcss-import "^14.1.0"
982 | postcss-js "^4.0.0"
983 | postcss-load-config "^3.1.4"
984 | postcss-nested "6.0.0"
985 | postcss-selector-parser "^6.0.10"
986 | postcss-value-parser "^4.2.0"
987 | quick-lru "^5.1.1"
988 | resolve "^1.22.1"
989 |
990 | to-regex-range@^5.0.1:
991 | version "5.0.1"
992 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
993 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
994 | dependencies:
995 | is-number "^7.0.0"
996 |
997 | "typescript@link:../node_modules/typescript":
998 | version "0.0.0"
999 | uid ""
1000 |
1001 | update-browserslist-db@^1.0.9:
1002 | version "1.0.10"
1003 | resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3"
1004 | integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==
1005 | dependencies:
1006 | escalade "^3.1.1"
1007 | picocolors "^1.0.0"
1008 |
1009 | util-deprecate@^1.0.2:
1010 | version "1.0.2"
1011 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
1012 | integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
1013 |
1014 | xtend@^4.0.2:
1015 | version "4.0.2"
1016 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
1017 | integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
1018 |
1019 | yaml@^1.10.2:
1020 | version "1.10.2"
1021 | resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
1022 | integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
1023 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rc-toastr",
3 | "version": "1.3.4",
4 | "description": "A fully customized reactJs toasting library",
5 | "keywords": [
6 | "react",
7 | "toast",
8 | "notifications",
9 | "toastr",
10 | "push",
11 | "alert",
12 | "snackbar"
13 | ],
14 | "author": "Walid Cherhane",
15 | "license": "MIT",
16 | "repository": "walidcherhane/rc-toastr",
17 | "main": "dist/index.js",
18 | "module": "dist/index.modern.js",
19 | "source": "src/index.tsx",
20 | "engines": {
21 | "node": ">=10"
22 | },
23 | "scripts": {
24 | "build": "microbundle-crl --no-compress --format modern,cjs",
25 | "start": "microbundle-crl watch --no-compress --format modern,cjs",
26 | "prepare": "run-s build",
27 | "test": "run-s test:unit test:lint test:build",
28 | "test:build": "run-s build",
29 | "test:lint": "eslint .",
30 | "test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
31 | "test:watch": "react-scripts test --env=jsdom",
32 | "predeploy": "cd example && yarn install && yarn run build",
33 | "deploy": "gh-pages -d example/build",
34 | "dev": "cd example && yarn install && yarn start"
35 | },
36 | "peerDependencies": {
37 | "react": "^18.2.0"
38 | },
39 | "devDependencies": {
40 | "@testing-library/jest-dom": "^5.16.5",
41 | "@testing-library/react": "^13.4.0",
42 | "@testing-library/user-event": "^14.4.3",
43 | "@types/jest": "^29.2.0",
44 | "@types/node": "^18.11.8",
45 | "@types/react": "^18.0.24",
46 | "@types/react-dom": "^18.0.8",
47 | "@typescript-eslint/eslint-plugin": "^5.42.0",
48 | "@typescript-eslint/parser": "^5.42.0",
49 | "babel-eslint": "^10.0.3",
50 | "cross-env": "^7.0.2",
51 | "eslint": "^8.26.0",
52 | "eslint-config-prettier": "^8.5.0",
53 | "eslint-config-standard": "^17.0.0",
54 | "eslint-config-standard-react": "^12.0.0",
55 | "eslint-plugin-import": "^2.18.2",
56 | "eslint-plugin-node": "^11.0.0",
57 | "eslint-plugin-prettier": "^4.2.1",
58 | "eslint-plugin-promise": "^6.1.1",
59 | "eslint-plugin-react": "^7.31.10",
60 | "eslint-plugin-standard": "^5.0.0",
61 | "framer-motion": "^7.6.2",
62 | "gh-pages": "^4.0.0",
63 | "microbundle-crl": "^0.13.10",
64 | "npm-run-all": "^4.1.5",
65 | "prettier": "^2.0.4",
66 | "react": "^18.2.0",
67 | "react-dom": "^18.2.0",
68 | "react-scripts": "^5.0.1",
69 | "typescript": "^4.8.4"
70 | },
71 | "files": [
72 | "dist"
73 | ]
74 | }
75 |
--------------------------------------------------------------------------------
/src/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "jest": true
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/Toast.module.css:
--------------------------------------------------------------------------------
1 | .container {
2 | position: relative;
3 | z-index: 20;
4 | border-radius: 0.375rem;
5 | pointer-events: all;
6 | }
7 |
8 |
9 | .inner {
10 | position: relative;
11 | color: #ffffff;
12 | overflow: hidden;
13 | margin: 0 auto;
14 | }
--------------------------------------------------------------------------------
/src/components/Toast.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react'
2 | import { motion } from 'framer-motion'
3 | import { useToast } from '../context/ToastContext'
4 | import type { Toast as T } from '../types'
5 | import styles from './Toast.module.css'
6 |
7 | const Toast = ({
8 | toast,
9 | opened,
10 | setOpened
11 | }: {
12 | toast: T
13 | opened: boolean
14 | setOpened: React.Dispatch>
15 | }) => {
16 | const { config, toasts, close } = useToast()
17 | const [progress, setProgress] = React.useState(100)
18 | const [isHovered, setIsHovered] = React.useState(false)
19 | const toastRef = React.useRef(null)
20 | const isLastToast = toasts[toasts.length - 1].id === toast.id
21 | const allNextToasts = toasts.filter(
22 | (t) => t.id !== toasts[toasts.length - 1].id
23 | )
24 | const allPreviousToasts = allNextToasts.filter((t) => t.id >= toast.id)
25 | const prevToast = toasts.find((t) => {
26 | const curr = toasts.indexOf(toast)
27 | const prev = allNextToasts[curr - 1]
28 | return t.id === prev?.id
29 | })
30 | const prevToastRef = React.useRef(null)
31 | const hidden = Boolean(!opened && !isLastToast)
32 | const mx = allPreviousToasts.length * 20
33 | const css = {
34 | toast: {
35 | container: styles.container,
36 | inner: styles.inner
37 | }
38 | }
39 |
40 | const handleMouseEnter = () => {
41 | setIsHovered(true)
42 | }
43 |
44 | const handleMouseLeave = () => {
45 | setIsHovered(false)
46 | }
47 |
48 | React.useEffect(() => {
49 | const toast = toastRef.current
50 | if (toast && config.pauseOnHover && config.autoClose) {
51 | toast.addEventListener('mouseenter', handleMouseEnter)
52 | toast.addEventListener('mouseleave', handleMouseLeave)
53 | }
54 | }, [toastRef])
55 |
56 | React.useEffect(() => {
57 | if (isHovered) return
58 | if (progress >= 0 && config.autoClose && toast.type !== 'loading') {
59 | const interval = setInterval(() => {
60 | setProgress((progress) => progress - 1)
61 | }, config.duration / 100)
62 | if (progress === 0) {
63 | close(toast.id)
64 | }
65 | return () => clearInterval(interval)
66 | }
67 | }, [progress, isHovered])
68 |
69 | return (
70 |
71 |
113 | toasts.length > 1 && setOpened((opened) => !opened)}
115 | >
116 | {config.renderAs({
117 | toast,
118 | progress,
119 | onClose: close,
120 | visible: !hidden,
121 | showProgressBar: config.showProgressBar && toast.type !== 'loading'
122 | })}
123 |
124 |
125 |
126 | )
127 | }
128 |
129 | export default Toast
130 |
--------------------------------------------------------------------------------
/src/components/ToastContainer.module.css:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | gap: 0.25rem;
4 | width: 100%;
5 | flex-direction: column;
6 | padding: 2.5rem;
7 | max-width: 24rem;
8 | pointer-events: none;
9 | }
10 |
--------------------------------------------------------------------------------
/src/components/ToastContainer.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react'
2 | import { motion } from 'framer-motion'
3 | import { useToast } from '../context/ToastContext'
4 | import Toast from './Toast'
5 | import styles from './ToastContainer.module.css'
6 |
7 | function ToastContainer() {
8 | const { toasts, config } = useToast()
9 | const [toastOpened, setToastOpened] = React.useState(false)
10 | const LeftPositionContainer = {
11 | left: 0,
12 | right: 'auto'
13 | }
14 | const RightPositionContainer = {
15 | left: 'auto',
16 | right: 0
17 | }
18 |
19 | return (
20 |
21 | {toasts.length ? (
22 |
44 | {toasts.map((toast) => (
45 |
51 | ))}
52 |
53 | ) : null}
54 |
55 | )
56 | }
57 |
58 | export default ToastContainer
59 |
--------------------------------------------------------------------------------
/src/components/ToastContent.module.css:
--------------------------------------------------------------------------------
1 | .content {
2 | display: flex;
3 | position: relative;
4 | z-index: 20;
5 | gap: 1rem;
6 | }
7 |
8 | .progress_bar {
9 | position: absolute;
10 | top: 0;
11 | right: 0;
12 | bottom: 0;
13 | left: 0;
14 | z-index: 10;
15 | background-color: rgba(0, 0, 0, 0.3);
16 | pointer-events: none;
17 | }
18 |
19 | .message {
20 | width: 100%;
21 | cursor: pointer;
22 | font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
23 | 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
24 | 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
25 |
26 | line-height: 1.5em;
27 | text-align: left;
28 | margin: 0;
29 | }
30 |
31 | .close_button {
32 | position: absolute;
33 | top: 0.5rem;
34 | right: 1rem;
35 | z-index: 20;
36 | color: #ffffff;
37 | width: 1.5rem;
38 | height: 1.5rem;
39 | cursor: pointer;
40 | background: transparent;
41 | border: none;
42 | }
43 | .icon {
44 | width: 1.5rem;
45 | height: 1.5rem;
46 | background: transparent;
47 | color: #ffffff;
48 | }
49 |
--------------------------------------------------------------------------------
/src/components/ToastContent.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react'
2 | import { useToast } from '../context/ToastContext'
3 | import { Toast } from '../types'
4 | import ToastIcon from './ToastIcon'
5 | import styles from './ToastContent.module.css'
6 | import { darken } from '../utils'
7 | const ToastContent = ({
8 | toast,
9 | onClick,
10 | visible,
11 | showProgressBar,
12 | progress
13 | }: {
14 | toast: Toast
15 | onClick?: () => void
16 | visible: boolean
17 | showProgressBar: boolean
18 | progress: number
19 | }) => {
20 | const { close, config } = useToast()
21 |
22 | return (
23 |
30 | {visible ? (
31 |
32 |
33 |
34 |
35 |
36 |
37 | {toast.message}
38 |
39 |
40 | close(toast.id)}
42 | className={styles.close_button}
43 | >
44 |
52 |
57 |
58 |
59 | {showProgressBar && (
60 |
70 | )}
71 |
72 | ) : null}
73 |
74 | )
75 | }
76 |
77 | export default ToastContent
78 |
--------------------------------------------------------------------------------
/src/components/ToastIcon.tsx:
--------------------------------------------------------------------------------
1 | import { useToast } from '../context/ToastContext'
2 | import { Variant } from '../types'
3 |
4 | const ToastIcon = ({ type }: { type: Variant }) => {
5 | const { config } = useToast()
6 | return config.renderToastIcon(type)
7 | }
8 |
9 | export default ToastIcon
10 |
--------------------------------------------------------------------------------
/src/context/ToastContext.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react'
2 | import ToastContainer from '../components/ToastContainer'
3 | import ToastContent from '../components/ToastContent'
4 | import { theme } from '../theme'
5 | import { Toast, Variant } from '../types'
6 |
7 | type Tvarients = {
8 | (message: string, variant?: Variant): Toast['id']
9 | success: (message: string) => void
10 | error: (message: string) => void
11 | warning: (message: string) => void
12 | info: (message: string) => void
13 | default: (message: string) => void
14 | loading: (
15 | promise: Promise,
16 | {
17 | loading,
18 | success,
19 | error
20 | }: {
21 | loading: string
22 | success: string | ((data: T) => void)
23 | error: string | ((error: unknown) => void)
24 | }
25 | ) => Promise
26 | }
27 | type ToastContext = {
28 | toast: Tvarients
29 | close: (id: number) => void
30 | clearToasts: () => void
31 | config: RequiredConfig
32 | updateConfig: (config: RequiredConfig) => void
33 | toasts: Toast[]
34 | }
35 |
36 | type Config = {
37 | duration?: number
38 | position?:
39 | | 'top'
40 | | 'bottom'
41 | | 'top-right'
42 | | 'top-left'
43 | | 'bottom-right'
44 | | 'bottom-left'
45 | pauseOnHover?: boolean
46 | autoClose?: boolean
47 | showProgressBar?: boolean
48 | zIndex?: number
49 | maxToasts?: number
50 | renderToastIcon?: (type: Toast['type']) => JSX.Element
51 | toastBackgroundColor?: (type: Toast['type']) => string
52 | renderAs?: ({
53 | toast,
54 | onClose,
55 | visible,
56 | showProgressBar,
57 | progress
58 | }: {
59 | toast: Toast
60 | onClose: (id: number) => void
61 | visible: boolean
62 | showProgressBar: boolean
63 | progress: number
64 | }) => JSX.Element | React.ReactElement
65 | }
66 |
67 | type RequiredConfig = {
68 | [K in keyof Config]-?: Config[K]
69 | }
70 |
71 | const ToastContext = React.createContext({} as ToastContext)
72 |
73 | export const useToast = () => {
74 | if (!ToastContext.Provider) {
75 | throw new Error('useToast must be used within a ToastProvider')
76 | }
77 | return React.useContext(ToastContext)
78 | }
79 |
80 | export const ToastProvider = ({
81 | children,
82 | config: _config
83 | }: {
84 | children: JSX.Element
85 | config?: Config
86 | }) => {
87 | const DEFAULT_TOAST_CONFIG: RequiredConfig = {
88 | position: _config?.position ?? 'top',
89 | autoClose: _config?.autoClose ?? true,
90 | duration: _config?.duration ?? 5000,
91 | maxToasts: _config?.maxToasts ?? 3,
92 | pauseOnHover: _config?.pauseOnHover ?? true,
93 | showProgressBar: _config?.showProgressBar ?? true,
94 | zIndex: _config?.zIndex ?? 30,
95 | renderToastIcon: _config?.renderToastIcon ?? ((type) => theme.icons[type]),
96 | toastBackgroundColor:
97 | _config?.toastBackgroundColor ?? ((type) => theme.colors[type]),
98 | renderAs: _config?.renderAs ?? ((props) => )
99 | }
100 | const [toasts, setToasts] = React.useState([])
101 | const [config, updateConfig] = React.useState(DEFAULT_TOAST_CONFIG)
102 |
103 | React.useEffect(() => {
104 | if (toasts.length > config.maxToasts) {
105 | setToasts(() => toasts.slice(1))
106 | }
107 | }, [toasts])
108 |
109 | const toast: Tvarients = (message: string, variant?: Variant) => {
110 | const id = toasts.length > 0 ? toasts[toasts.length - 1].id + 1 : 1
111 | setToasts(() => [
112 | ...toasts,
113 | {
114 | id,
115 | createdAt: new Date(),
116 | message: message,
117 | type: variant ?? 'default'
118 | }
119 | ])
120 | return id
121 | }
122 |
123 | toast.success = (message: string) => toast(message, 'success')
124 | toast.error = (message: string) => toast(message, 'error')
125 | toast.warning = (message: string) => toast(message, 'warning')
126 | toast.info = (message: string) => toast(message, 'info')
127 | toast.default = (message: string) => toast(message, 'default')
128 | toast.loading = async (promise, { loading, success, error }) => {
129 | const loadingId = toast(loading, 'loading')
130 | try {
131 | const res = await promise
132 | close(loadingId)
133 | if (typeof success === 'string') {
134 | toast(success, 'success')
135 | } else {
136 | success(res)
137 | }
138 | return res
139 | } catch (err) {
140 | close(loadingId)
141 | if (typeof error === 'string') {
142 | toast(error, 'error')
143 | } else {
144 | error(err)
145 | }
146 | }
147 | }
148 |
149 | const close = (id: number) => {
150 | setToasts(toasts.filter((toast) => toast.id !== id))
151 | }
152 |
153 | const clearToasts = () => {
154 | setToasts([])
155 | }
156 |
157 | return (
158 |
161 |
162 | {children}
163 |
164 | )
165 | }
166 |
--------------------------------------------------------------------------------
/src/icons/Default.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default function Default() {
4 | return (
5 |
12 |
17 |
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/src/icons/Error.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default function Error() {
4 | return (
5 |
12 |
17 |
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/src/icons/Info.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | export default function Info() {
4 | return (
5 |
12 |
17 |
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/src/icons/Loading.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { motion } from 'framer-motion'
3 | function Loading() {
4 | return (
5 |
16 |
20 |
21 | )
22 | }
23 |
24 | export default Loading
25 |
--------------------------------------------------------------------------------
/src/icons/Success.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | export default function Success() {
3 | return (
4 |
11 |
16 |
17 | )
18 | }
19 |
--------------------------------------------------------------------------------
/src/icons/Warning.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | export default function Warning() {
3 | return (
4 |
11 |
16 |
17 | )
18 | }
19 |
--------------------------------------------------------------------------------
/src/icons/index.tsx:
--------------------------------------------------------------------------------
1 | import ErrorIcon from './Error'
2 | import InfoIcon from './Info'
3 | import SuccessIcon from './Success'
4 | import WarningIcon from './Warning'
5 | import DefaultIcon from './Default'
6 | import Loading from './Loading'
7 |
8 | export { ErrorIcon, InfoIcon, SuccessIcon, WarningIcon, DefaultIcon, Loading }
9 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { useToast, ToastProvider } from './context/ToastContext'
2 | import { theme } from './theme'
3 | export { useToast, ToastProvider, theme }
4 |
--------------------------------------------------------------------------------
/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/src/theme/index.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | DefaultIcon,
3 | ErrorIcon,
4 | InfoIcon,
5 | Loading,
6 | SuccessIcon,
7 | WarningIcon
8 | } from '../icons'
9 | import React from 'react'
10 |
11 | export const theme = {
12 | colors: {
13 | error: '#E53E3E',
14 | info: '#5CB8E4',
15 | success: '#4BB543',
16 | warning: '#FFB200',
17 | default: '#2c2c54',
18 | loading: '#2c2c54'
19 | },
20 | icons: {
21 | error: ,
22 | info: ,
23 | success: ,
24 | warning: ,
25 | default: ,
26 | loading:
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export type Variant =
2 | | 'success'
3 | | 'error'
4 | | 'warning'
5 | | 'info'
6 | | 'default'
7 | | 'loading'
8 |
9 | export type Toast = {
10 | id: number
11 | message: string
12 | type: Variant
13 | createdAt: Date
14 | }
15 |
--------------------------------------------------------------------------------
/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Default CSS definition for typescript,
3 | * will be overridden with file-specific definitions by rollup
4 | */
5 | declare module '*.css' {
6 | const content: { [className: string]: string }
7 | export default content
8 | }
9 |
10 | interface SvgrComponent
11 | extends React.StatelessComponent> {}
12 |
13 | declare module '*.svg' {
14 | const svgUrl: string
15 | const svgComponent: SvgrComponent
16 | export default svgUrl
17 | export { svgComponent as ReactComponent }
18 | }
19 |
--------------------------------------------------------------------------------
/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export const darken = (color: string, amount: number) => {
2 | const usePound = color[0] === '#'
3 | const num = parseInt(color.slice(1), 16)
4 | let r = (num >> 16) + amount
5 | if (r > 255) r = 255
6 | else if (r < 0) r = 0
7 | let b = ((num >> 8) & 0x00ff) + amount
8 | if (b > 255) b = 255
9 | else if (b < 0) b = 0
10 | let g = (num & 0x0000ff) + amount
11 | if (g > 255) g = 255
12 | else if (g < 0) g = 0
13 | return (usePound ? '#' : '') + (g | (b << 8) | (r << 16)).toString(16)
14 | }
15 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "outDir": "dist",
4 | "module": "esnext",
5 | "lib": [
6 | "dom",
7 | "esnext"
8 | ],
9 | "moduleResolution": "node",
10 | "jsx": "react",
11 | "sourceMap": true,
12 | "declaration": true,
13 | "esModuleInterop": true,
14 | "noImplicitReturns": false,
15 | "noImplicitThis": true,
16 | "noImplicitAny": true,
17 | "strictNullChecks": true,
18 | "suppressImplicitAnyIndexErrors": true,
19 | "noUnusedLocals": true,
20 | "noUnusedParameters": true,
21 | "allowSyntheticDefaultImports": true,
22 | "target": "es5",
23 | "allowJs": true,
24 | "skipLibCheck": true,
25 | "strict": true,
26 | "forceConsistentCasingInFileNames": true,
27 | "resolveJsonModule": true,
28 | "isolatedModules": true,
29 | "noEmit": true
30 | },
31 | "include": [
32 | "./src/**/*.ts"
33 | ],
34 | "exclude": [
35 | "node_modules",
36 | "dist",
37 | "example"
38 | ],
39 | }
40 |
--------------------------------------------------------------------------------
/tsconfig.test.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/www/.gitignore:
--------------------------------------------------------------------------------
1 | # Dependencies
2 | /node_modules
3 |
4 | # Production
5 | /build
6 |
7 | # Generated files
8 | .docusaurus
9 | .cache-loader
10 |
11 | # Misc
12 | .DS_Store
13 | .env.local
14 | .env.development.local
15 | .env.test.local
16 | .env.production.local
17 |
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 |
--------------------------------------------------------------------------------
/www/README.md:
--------------------------------------------------------------------------------
1 | # Website
2 |
3 | This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4 |
5 | ### Installation
6 |
7 | ```
8 | $ yarn
9 | ```
10 |
11 | ### Local Development
12 |
13 | ```
14 | $ yarn start
15 | ```
16 |
17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18 |
19 | ### Build
20 |
21 | ```
22 | $ yarn build
23 | ```
24 |
25 | This command generates static content into the `build` directory and can be served using any static contents hosting service.
26 |
27 | ### Deployment
28 |
29 | Using SSH:
30 |
31 | ```
32 | $ USE_SSH=true yarn deploy
33 | ```
34 |
35 | Not using SSH:
36 |
37 | ```
38 | $ GIT_USER= yarn deploy
39 | ```
40 |
41 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
42 |
--------------------------------------------------------------------------------
/www/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3 | };
4 |
--------------------------------------------------------------------------------
/www/docs/advanced-usage/custom-toasts.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Custom Toasts
3 | ---
4 |
5 | One of the things that we see really useful is `renderAs` feature!
6 |
7 | Here is where we give you the full control on your and its up to you how you want to style them! you can literally anything to do so!
8 | This is how you can use it:
9 |
10 | ```jsx
11 | import { ToastProvider, theme } from 'rc-toastr'
12 | import 'rc-toastr/dist/index.css'
13 |
14 | ReactDOM.render(
15 | (
18 |
19 | {visible && (
20 |
21 |
{toast.message}
22 |
onClose(toast.id)}> close
23 |
24 | )}
25 |
26 | )
27 | }}
28 | >
29 |
30 | ,
31 | document.getElementById('root')
32 | )
33 | ```
34 |
35 | First thing to start with is the parameters `renderAs` has,
36 | It contains useful things like:
37 |
38 | - **toast:** this has all the information about toast: `message`, `id`, `type` and `createAt`.
39 | - **onClose**: trigger this function passing the toast to close that toast
40 | - **visible:** weather the toast is visible or hidden,
41 | - **progress:** the timer in **%** for the toast
42 | - **showProgressBar:** you can use this as a condition show the progress bar \*\*\*\*
43 |
44 | :::info
45 | As you may have noticed, that we conditionally the toast content only when `visible` is `true`, This an essential part for **rc-toastr** to work as expected since hidden toast or old toast are free of meaning that they don’t contain anything inside them as to have that cool effect of stacking toasts.
46 | :::
47 |
48 | Now that we have the parameters, let’s start styling our toast!
49 |
50 | ```jsx
51 | import { ToastProvider, theme } from 'rc-toastr'
52 | import 'rc-toastr/dist/index.css'
53 |
54 | ReactDOM.render(
55 | ,
58 | autoClose: false,
59 | zIndex: 1000
60 | }}
61 | >
62 |
63 | ,
64 | document.getElementById('root')
65 | )
66 | ```
67 |
68 | Now in your `CustomToast` component you can use the props to style your toast, here is an example:
69 |
70 | ```jsx
71 | import { theme } from 'rc-toastr'
72 |
73 | export default function CustomToast({ visible, toast, onClose }) {
74 | return (
75 |
81 | {visible && (
82 | <>
83 |
{theme.icons[toast.type]}
84 |
85 |
{toast.type}
86 |
{toast.message}
87 |
88 |
onClose(toast.id)}
90 | className={styles.toast__close}
91 | >
92 |
98 | ...
99 |
100 |
101 | >
102 | )}
103 |
104 | )
105 | }
106 | ```
107 |
108 | And here is the result:
109 |
110 | import Toast from '../../src/components/custom-toasts'
111 |
112 |
--------------------------------------------------------------------------------
/www/docs/advanced-usage/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'Advandced Usage'
3 | ---
4 |
5 | Its is true when we said **rc-toastr** is full customizable toasting library! Lets see go deeper on what is possible in this library:
6 |
7 | - **Adding configuration**
8 | The `ToastProvider` accept a `config` object where you can specify different things depending on your needs!
9 |
10 | For example you may need to adjust the background colors of each toast variant that matches your design system, It’s possible and easy now, Let us see how!
11 |
12 | Inside the `config` object add `toastBackgroundColor` , it’s a function that has the toast variant as a parameter and you can check and add a color on each different variant as you like:
13 |
14 | ```jsx
15 | import { ToastProvider, theme } from 'rc-toastr'
16 | import 'rc-toastr/dist/index.css' // import the css file
17 |
18 | ReactDOM.render(
19 | {
22 | if (variant === 'error') '#e74c3c' // <- return a custom color
23 | return theme.colors[variant] // <- return default colors
24 | }
25 | }}
26 | >
27 |
28 | ,
29 | document.getElementById('root')
30 | )
31 | ```
32 |
33 | :::tip
34 |
35 | There is a case where you might need to change **only one** variant color, we thought about this too that is why we provide you with the default `theme` that you can use **anywhere** you want!
36 | it has all the default `icons` and `colors` we use so you can default to them in any case
37 |
38 | :::
39 |
40 | The same thing imply on the toast’s icon, you can edit the icons of any toast variant with the same method:
41 |
42 | ```jsx
43 | import { ToastProvider, theme } from 'rc-toastr'
44 | import 'rc-toastr/dist/index.css'
45 |
46 | ReactDOM.render(
47 | {
50 | if (variant === 'error') 😫
51 | return theme.icons[variant] // <- return default icons
52 | }
53 | }}
54 | >
55 |
56 | ,
57 | document.getElementById('root')
58 | )
59 | ```
60 |
61 |
62 | Not only that! we gave you the ability to control more basic things like :
63 |
64 | - The position of the toast: `top` - `right` - `left` - `bottom` - `top-right` - `top-left` - `bottom-right` - `bottom-left`
65 | - The duration in milliseconds
66 | - Pause toast on hover
67 | - auto close the toast after the duration ends
68 | - show progress bar
69 | - z-index of the toast
70 | - max toast to show
71 |
72 | ```jsx
73 | import { ToastProvider, theme } from 'rc-toastr'
74 | import 'rc-toastr/dist/index.css'
75 |
76 | ReactDOM.render(
77 | {
84 | if (variant === 'error') '#e74c3c'
85 | return theme.colors[variant]
86 | },
87 | renderToastIcon: (variant) => {
88 | if (variant === 'error') 😫
89 | return theme.icons[variant]
90 | },
91 | maxToasts: 5,
92 | zIndex: 9999
93 | }}
94 | >
95 |
96 | ,
97 | document.getElementById('root')
98 | )
99 | ```
--------------------------------------------------------------------------------
/www/docs/advanced-usage/promises.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Using with Promises
3 | ---
4 |
5 | When dealing with data fetching and promises its more convenient to tell the user what is going on!
6 | With **rc-toastr,** you can use the `toast.loading` method to achieve that!
7 |
8 | This method accept the `Promise` as first argument and the second is an object where you specify what to do in each of the states `laoding`, `success`, or `error` . these states can be either a string and we will toast it to the user automatically OR for the `success` and `error` can have also the value of `function` that has either that data received or the occurred as a parameter, here is a practical example
9 |
10 | ```jsx
11 | toast.loading(
12 | new Promise((resolve) => setTimeout(() => resolve({name: 'John Doe'}), 2000)),
13 | {
14 | loading: 'loading...',
15 | success: (data) => toast.success(`Welcome back ${data.name}!`)
16 | error: (err)=> toast.error(err.message)
17 | }
18 | )
19 | ```
20 |
21 | import Toaster from '../../src/components/Toaster/with-promise.tsx'
22 |
23 |
24 |
25 | ---
26 |
27 | This example uses `success` and `error` as `functions` but you can use simple string that will be toasted to the user,
28 |
--------------------------------------------------------------------------------
/www/docs/examples.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Examples
3 | description: Examples of using the API
4 | order: 3
5 | ---
6 |
7 | ### Basic Usage:
8 |
9 |
19 |
20 | ### Using Promises:
21 |
22 |
34 |
35 | ### Using Custom Toasts:
36 |
37 |
49 |
--------------------------------------------------------------------------------
/www/docs/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Basic Usage
3 | sidebar_position: 1
4 | ---
5 | ## **Installation**
6 |
7 | import Tabs from '@theme/Tabs';
8 | import TabItem from '@theme/TabItem';
9 |
10 |
18 |
19 |
20 | ```shell
21 | npm install --save rc-toastr
22 | ```
23 |
24 |
25 |
26 | ```shell
27 | yarn add rc-toastr
28 | ```
29 |
30 |
31 |
32 | ## **Usage**
33 |
34 | In the index file of your app add `ToastProvider` as the following
35 |
36 | ```jsx title="src/index.js"
37 | import { ToastProvider } from 'rc-toastr'
38 | import "rc-toastr/dist/index.css" // import the css file
39 |
40 | ReactDOM.render((
41 |
42 |
43 |
44 | ), document.getElementById('root'))
45 | ```
46 |
47 | Then anywhere in your app use the `useToast` hook to have the access to the `toast` function
48 |
49 | ```jsx title="src/App.js"
50 | import { useToast } from 'rc-toastr'
51 |
52 | const App = () => {
53 | const { toast } = useToast()
54 | const sayHello = () => toast.success("Hello World!")
55 | return Say Hello
56 | }
57 |
58 | export default App
59 | ```
60 |
61 |
62 |
63 | import Toaster from '../src/components/Toaster';
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/www/docusaurus.config.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 | const lightCodeTheme = require('prism-react-renderer/themes/github')
3 | const darkCodeTheme = require('prism-react-renderer/themes/dracula')
4 |
5 | /** @type {import('@docusaurus/types').Config} */
6 | const config = {
7 | title: 'Rc-toastr',
8 | tagline: 'A simple and easy to use toastr for React',
9 | url: 'https://rc-toastr.vercel.app',
10 | baseUrl: '/',
11 | onBrokenLinks: 'throw',
12 | onBrokenMarkdownLinks: 'warn',
13 | favicon: 'img/favicon.ico',
14 | organizationName: 'walidcherhane',
15 | projectName: 'rc-toastr',
16 | i18n: {
17 | defaultLocale: 'en',
18 | locales: ['en']
19 | },
20 | presets: [
21 | [
22 | 'classic',
23 | /** @type {import('@docusaurus/preset-classic').Options} */
24 | ({
25 | docs: {
26 | sidebarPath: require.resolve('./sidebars.js'),
27 | editUrl: 'https://github.com/walidcherhane/rc-toastr/tree/main/www'
28 | },
29 | theme: {
30 | customCss: require.resolve('./src/css/custom.css')
31 | }
32 | })
33 | ]
34 | ],
35 |
36 | themeConfig:
37 | /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
38 | ({
39 | navbar: {
40 | title: 'Rc-toastr',
41 | logo: {
42 | alt: "Rc-toastr's Logo",
43 | src: 'img/logo.png'
44 | },
45 | items: [
46 | {
47 | type: 'doc',
48 | docId: 'index',
49 | position: 'left',
50 | label: 'Documentation'
51 | },
52 | {
53 | href: 'https://github.com/walidcherhane/rc-toastr',
54 | label: 'GitHub',
55 | position: 'left'
56 | }
57 | ]
58 | },
59 | footer: {
60 | style: 'dark',
61 | copyright: `Copyright © ${new Date().getFullYear()} - build with ❤ by walidcherhane.`
62 | },
63 | prism: {
64 | theme: lightCodeTheme,
65 | darkTheme: darkCodeTheme
66 | }
67 | })
68 | }
69 |
70 | module.exports = config
71 |
--------------------------------------------------------------------------------
/www/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rc-toastr-docs",
3 | "version": "0.0.0",
4 | "private": true,
5 | "scripts": {
6 | "docusaurus": "docusaurus",
7 | "start": "docusaurus start",
8 | "build": "docusaurus build",
9 | "swizzle": "docusaurus swizzle",
10 | "deploy": "docusaurus deploy",
11 | "clear": "docusaurus clear",
12 | "serve": "docusaurus serve",
13 | "write-translations": "docusaurus write-translations",
14 | "write-heading-ids": "docusaurus write-heading-ids",
15 | "typecheck": "tsc"
16 | },
17 | "dependencies": {
18 | "@docusaurus/core": "2.1.0",
19 | "@docusaurus/preset-classic": "2.1.0",
20 | "@mdx-js/react": "^1.6.22",
21 | "@splitbee/web": "^0.3.0",
22 | "clsx": "^1.2.1",
23 | "prism-react-renderer": "^1.3.5",
24 | "rc-toastr": "^1.3.4",
25 | "react": "^17.0.2",
26 | "react-dom": "^17.0.2"
27 | },
28 | "devDependencies": {
29 | "@docusaurus/module-type-aliases": "2.1.0",
30 | "@tsconfig/docusaurus": "^1.0.5",
31 | "typescript": "^4.7.4"
32 | },
33 | "browserslist": {
34 | "production": [
35 | ">0.5%",
36 | "not dead",
37 | "not op_mini all"
38 | ],
39 | "development": [
40 | "last 1 chrome version",
41 | "last 1 firefox version",
42 | "last 1 safari version"
43 | ]
44 | },
45 | "engines": {
46 | "node": ">=16.14"
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/www/sidebars.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Creating a sidebar enables you to:
3 | - create an ordered group of docs
4 | - render a sidebar for each doc of that group
5 | - provide next/previous navigation
6 |
7 | The sidebars can be generated from the filesystem, or explicitly defined here.
8 |
9 | Create as many sidebars as you want.
10 | */
11 |
12 | // @ts-check
13 |
14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
15 | const sidebars = {
16 | // By default, Docusaurus generates a sidebar from the docs folder structure
17 | tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
18 |
19 | // But you can create a sidebar manually
20 | /*
21 | tutorialSidebar: [
22 | 'intro',
23 | 'hello',
24 | {
25 | type: 'category',
26 | label: 'Tutorial',
27 | items: ['tutorial-basics/create-a-document'],
28 | },
29 | ],
30 | */
31 | }
32 |
33 | module.exports = sidebars
34 |
--------------------------------------------------------------------------------
/www/src/components/Toaster/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { theme, ToastProvider, useToast } from 'rc-toastr'
3 | import 'rc-toastr/dist/index.css' // import the css file
4 | import styles from './styles.module.css'
5 |
6 | function Toaster() {
7 | return (
8 |
14 |
15 |
16 | )
17 | }
18 |
19 | export const Provider = ({
20 | config,
21 | children
22 | }: {
23 | config: any
24 | children: JSX.Element
25 | }) => {
26 | return {children}
27 | }
28 |
29 | export const App = () => {
30 | const { toast } = useToast()
31 | const variants = ['error', 'success', 'warning', 'info', 'default']
32 | return (
33 |
34 | {variants.map((variant) => (
35 | toast[variant]('Hello World')}
40 | >
41 |
46 | {variant}
47 |
48 |
49 | ))}
50 |
51 | )
52 | }
53 |
54 | export default Toaster
55 |
--------------------------------------------------------------------------------
/www/src/components/Toaster/styles.module.css:
--------------------------------------------------------------------------------
1 | /* From uiverse.io */
2 | .toast_btn {
3 | padding: 1.3em 3em;
4 | font-size: 12px;
5 | text-transform: uppercase;
6 | letter-spacing: 2.5px;
7 | font-weight: 500;
8 | color: rgb(255, 255, 255);
9 | background-color: rgb(17, 17, 17);
10 | border: none;
11 | border-radius: 10px;
12 | box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
13 | transition: all 0.3s ease 0s;
14 | cursor: pointer;
15 | outline: none;
16 | margin-inline-end: 20px;
17 | }
18 |
19 | .toast_btn[data-variant='success'] {
20 | background-color: #69ffc3;
21 | }
22 | .toast_btn[data-variant='error'] {
23 | background-color: #c42323;
24 | }
25 | .toast_btn[data-variant='info'] {
26 | background-color: #3b23c4;
27 | }
28 | .toast_btn[data-variant='warning'] {
29 | background-color: #ffee00;
30 | }
31 |
32 | .toast_btn:hover {
33 | color: #fff;
34 | transform: translateY(-7px);
35 | }
36 |
37 | .toast_btn:active {
38 | transform: translateY(-1px);
39 | }
40 |
--------------------------------------------------------------------------------
/www/src/components/Toaster/with-promise.tsx:
--------------------------------------------------------------------------------
1 | import { ToastProvider, useToast } from 'rc-toastr'
2 | import React from 'react'
3 |
4 | const Provider = () => (
5 |
10 |
11 |
12 | )
13 |
14 | function App() {
15 | const { toast } = useToast()
16 |
17 | return (
18 |
19 | {
21 | toast.loading(
22 | new Promise<{
23 | name: string
24 | }>((resolve) =>
25 | setTimeout(() => resolve({ name: 'John Doe' }), 2000)
26 | ),
27 | {
28 | loading: 'loading...',
29 | success: (data) => toast.success(`Welcome back ${data.name}!`),
30 | error: (err) => {
31 | console.error(err)
32 | toast.error('Something went wrong!')
33 | }
34 | }
35 | )
36 | }}
37 | >
38 | Promise
39 |
40 |
41 | )
42 | }
43 | export default Provider
44 |
--------------------------------------------------------------------------------
/www/src/components/custom-toasts/index.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import styles from './styles.module.css'
3 | import { useToast, ToastProvider, theme } from 'rc-toastr'
4 | function Toast() {
5 | return (
6 | ,
9 | autoClose: false,
10 | zIndex: 1000
11 | }}
12 | >
13 |
14 |
15 | )
16 | }
17 |
18 | const App = () => {
19 | const { toast } = useToast()
20 | const variants = ['error', 'success', 'warning', 'info', 'default']
21 | return (
22 |
23 | {variants.map((variant) => (
24 |
28 | toast[variant]('Hello, this is your custom toast notification!')
29 | }
30 | >
31 |
36 | {variant} Toast
37 |
38 |
39 | ))}
40 |
41 | )
42 | }
43 |
44 | function CustomToasts({
45 | visible,
46 | toast,
47 | onClose
48 | }: {
49 | toast: any
50 | onClose: (id: number) => void
51 | visible: boolean
52 | showProgressBar: boolean
53 | progress: number
54 | }) {
55 | return (
56 |
62 | {visible && (
63 | <>
64 |
{theme.icons[toast.type]}
65 |
66 |
{toast.type}
67 |
{toast.message}
68 |
69 |
onClose(toast.id)}
71 | className={styles.toast__close}
72 | >
73 |
79 |
83 |
84 |
85 | >
86 | )}
87 |
88 | )
89 | }
90 |
91 | export default Toast
92 |
--------------------------------------------------------------------------------
/www/src/components/custom-toasts/styles.module.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css?family=Raleway:300,300i,400,400i,500,500i,600,600i,700,700i,800,800i');
2 |
3 |
4 | .toast__svg {
5 | fill: #fff;
6 | }
7 |
8 | .toast {
9 | text-align: left;
10 | background-color: rgb(255, 22, 22);
11 | border-radius: 4px;
12 | top: 0px;
13 | position: relative;
14 | box-shadow: 1px 7px 14px -5px rgba(0, 0, 0, 0.2);
15 | color: #fff;
16 | display: flex;
17 | padding: 10px ;
18 | }
19 |
20 |
21 | .toast__icon {
22 | width: 30px;
23 | height: 30px;
24 | }
25 |
26 | .toast__type {
27 | font-weight: 700;
28 | margin-top: 0;
29 | text-transform: capitalize;
30 | }
31 |
32 | .toast__message {
33 | font-size: 14px;
34 | margin-top: 0;
35 | margin-bottom: 0;
36 | }
37 |
38 | .toast__content {
39 | padding-inline: 10px;
40 | }
41 |
42 | .toast__close {
43 | position: absolute;
44 | right: 22px;
45 | top: 10px;
46 | width: 14px;
47 | cursor: pointer;
48 | height: 14px;
49 | fill: #fff;
50 | }
51 |
--------------------------------------------------------------------------------
/www/src/css/custom.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --ifm-color-primary: #152D73;
3 | --ifm-color-primary-dark: #091538;
4 | --ifm-color-primary-darker: #0e2055;
5 | --ifm-color-primary-darkest: #050c24;
6 | --ifm-color-primary-light: #2042a7;
7 | --ifm-color-primary-lighter: #406ae7;
8 | --ifm-color-primary-lightest: #6d8ce7;
9 | --ifm-code-font-size: 95%;
10 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
11 | --ifm-paragraph-margin-bottom: 0;
12 | --ifm-navbar-background-color: #ffffff;
13 | }
14 |
15 | [data-theme='dark'] {
16 | --ifm-color-primary: #41CBBF;
17 | --ifm-color-primary-dark: #21af90;
18 | --ifm-color-primary-darker: #1fa588;
19 | --ifm-color-primary-darkest: #1a8870;
20 | --ifm-color-primary-light: #29d5b0;
21 | --ifm-color-primary-lighter: #32d8b4;
22 | --ifm-color-primary-lightest: #4fddbf;
23 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
24 | --ifm-navbar-background-color: #242526
25 | }
26 |
27 |
28 |
29 | .main {
30 | overflow-x: auto;
31 | min-height: 100vh;
32 | display: flex;
33 | flex-direction: column;
34 | align-content: center;
35 | justify-content: center;
36 | align-items: center;
37 | gap: 1rem;
38 | flex-wrap: wrap;
39 | padding: 1rem 0;
40 | background: linear-gradient(to right, #c9d6ff, #e2e2e2);
41 | }
42 | .flex{
43 | display: flex;
44 | align-content: center;
45 | justify-content: center;
46 | align-items: center;
47 | }
48 | .flex-wrap{
49 | flex-wrap: wrap;
50 | }
51 | .gap-1{
52 | gap: 0.25rem; /* 4px */
53 | }
54 | .gap-2{
55 | gap: 0.5rem; /* 8px */
56 | }
57 | .gap-4{
58 | gap: 1rem; /* 16px */
59 | }
60 | .mt-4{
61 | margin-top: 1rem;
62 | }
63 | .mt-8{
64 | margin-top: 2rem;
65 | }
66 | .underline{
67 | text-decoration: underline;
68 | }
69 | .decoration-dotted{
70 | text-decoration-style: dotted;
71 |
72 | }
73 | .underline-offset-8 {
74 | text-underline-offset: 8px;
75 | }
76 |
77 | .title {
78 | font-size: 3.4rem;
79 | font-weight: 700;
80 | color: #1e3a8a;
81 | text-transform: capitalize;
82 | text-align: center;
83 | margin: 0;
84 | }
85 | .description {
86 | font-size: 1rem;
87 | font-weight: 400;
88 | color: #1e3a8a;
89 | text-align: center;
90 | margin-bottom: 1.5rem;
91 | }
92 |
93 | .buttons {
94 | display: flex;
95 | justify-content: center;
96 | align-items: center;
97 | gap: 1rem;
98 | flex-wrap: wrap;
99 | }
100 | /* From uiverse.io */
101 | .button {
102 | align-items: center;
103 | background-image: linear-gradient(144deg, #af40ff, #5b42f3 50%, #00ddeb);
104 | border: 0;
105 | border-radius: 8px;
106 | box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
107 | box-sizing: border-box;
108 | color: #ffffff;
109 | display: flex;
110 | font-family: Phantomsans, sans-serif;
111 | text-transform: uppercase;
112 | font-weight: 400;
113 | font-size: 18px;
114 | justify-content: center;
115 | line-height: 1em;
116 | max-width: 100%;
117 | min-width: 140px;
118 | padding: 3px;
119 | text-decoration: none;
120 | user-select: none;
121 | -webkit-user-select: none;
122 | touch-action: manipulation;
123 | white-space: nowrap;
124 | cursor: pointer;
125 | transition: all 0.3s;
126 | }
127 |
128 | .button:active,
129 | .button:hover {
130 | outline: 0;
131 | }
132 |
133 | .button span {
134 | padding: 16px 24px;
135 | border-radius: 6px;
136 | width: 100%;
137 | height: 100%;
138 | transition: 300ms;
139 | }
140 |
141 | .button:hover span {
142 | background: none !important;
143 | }
144 |
145 | .button:active {
146 | transform: scale(0.9);
147 | }
148 |
149 | .checkbox input {
150 | position: absolute;
151 | opacity: 0;
152 | cursor: pointer;
153 | height: 0;
154 | width: 0;
155 | }
156 |
157 | .checkbox {
158 | display: block;
159 | position: relative;
160 | cursor: pointer;
161 | font-size: 20px;
162 | user-select: none;
163 | }
164 |
165 | /* Create a custom checkbox */
166 | .checkmark {
167 | position: relative;
168 | top: 0;
169 | left: 0;
170 | height: 1.3em;
171 | width: 1.3em;
172 | border: 2px solid #1d52c1;
173 | border-radius: 7px;
174 | box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.3), 0px 1px 1px rgba(0, 5);
175 | }
176 |
177 | /* When the checkbox is checked, add a blue background */
178 | .checkbox input:checked ~ .checkmark {
179 | background-image: linear-gradient(#255cd2, #1d52c1);
180 | }
181 |
182 | .checkbox input[disabled] ~ .checkmark {
183 | cursor: not-allowed;
184 | background: #a1a1fa;
185 | opacity: 0.5;
186 | }
187 |
188 | /* Create the checkmark/indicator (hidden when not checked) */
189 | .checkmark:after {
190 | content: '';
191 | position: absolute;
192 | display: none;
193 | }
194 |
195 | /* Show the checkmark when checked */
196 | .checkbox input:checked ~ .checkmark:after {
197 | display: block;
198 | }
199 |
200 | /* Style the checkmark/indicator */
201 | .checkbox .checkmark:after {
202 | left: 0.4em;
203 | top: 0.2em;
204 | width: 0.35em;
205 | height: 0.6em;
206 | border: solid white;
207 | border-width: 0 0.15em 0.15em 0;
208 | transform: rotate(45deg);
209 | }
210 |
211 | .scrolldown {
212 | --color: rgb(135, 114, 255);
213 | --sizeX: 30px;
214 | --sizeY: 50px;
215 | position: relative;
216 | width: var(--sizeX);
217 | height: var(--sizeY);
218 | margin-left: var(sizeX / 2);
219 | border: calc(var(--sizeX) / 10) solid var(--color);
220 | border-radius: 50px;
221 | box-sizing: border-box;
222 | margin-bottom: 16px;
223 | cursor: pointer;
224 | }
225 |
226 | .scrolldown::before {
227 | content: '';
228 | position: absolute;
229 | bottom: 30px;
230 | left: 50%;
231 | width: 6px;
232 | height: 6px;
233 | margin-left: -3px;
234 | background-color: var(--color);
235 | border-radius: 100%;
236 | animation: scrolldown-anim 2s infinite;
237 | box-sizing: border-box;
238 | box-shadow: 0px -5px 3px 1px #2a547066;
239 | }
240 |
241 | @keyframes scrolldown-anim {
242 | 0% {
243 | opacity: 0;
244 | height: 6px;
245 | }
246 |
247 | 40% {
248 | opacity: 1;
249 | height: 10px;
250 | }
251 |
252 | 80% {
253 | transform: translate(0, 20px);
254 | height: 10px;
255 | opacity: 0;
256 | }
257 |
258 | 100% {
259 | height: 3px;
260 | opacity: 0;
261 | }
262 | }
263 |
264 | .chevrons {
265 | padding: 6px 0 0 0;
266 | margin-left: -3px;
267 | margin-top: 48px;
268 | width: 30px;
269 | display: flex;
270 | flex-direction: column;
271 | align-items: center;
272 | }
273 |
274 | .chevrondown {
275 | margin-top: -6px;
276 | position: relative;
277 | border: solid var(--color);
278 | border-width: 0 3px 3px 0;
279 | display: inline-block;
280 | width: 10px;
281 | height: 10px;
282 | transform: rotate(45deg);
283 | }
284 |
285 | .chevrondown:nth-child(odd) {
286 | animation: pulse54012 500ms ease infinite alternate;
287 | }
288 |
289 | .chevrondown:nth-child(even) {
290 | animation: pulse54012 500ms ease infinite alternate 250ms;
291 | }
292 |
293 | @keyframes pulse54012 {
294 | from {
295 | opacity: 0;
296 | }
297 |
298 | to {
299 | opacity: 0.5;
300 | }
301 | }
--------------------------------------------------------------------------------
/www/src/pages/index.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * CSS files with the .module.css suffix will be treated as CSS modules
3 | * and scoped locally.
4 | */
5 |
6 | .heroBanner {
7 | padding: 4rem 0;
8 | text-align: center;
9 | position: relative;
10 | overflow: hidden;
11 | }
12 |
13 | @media screen and (max-width: 996px) {
14 | .heroBanner {
15 | padding: 2rem;
16 | }
17 | }
18 |
19 | .buttons {
20 | display: flex;
21 | align-items: center;
22 | justify-content: center;
23 | }
24 |
--------------------------------------------------------------------------------
/www/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect } from 'react'
2 | import Link from '@docusaurus/Link'
3 | import { ToastProvider, useToast, theme } from 'rc-toastr'
4 | import splitbee from '@splitbee/web'
5 |
6 | function HomepageHeader() {
7 | const { updateConfig, config } = useToast()
8 | return (
9 |
10 |
11 |
12 |
13 |
rc-toastr
14 |
15 | A simple, easy to use, and highly customizable toast notification
16 |
17 |
69 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
197 |
198 |
199 |
200 | )
201 | }
202 |
203 | const Button: React.FC<{
204 | variant: 'error' | 'success' | 'warning' | 'info' | 'default'
205 | }> = ({ variant }) => {
206 | const { toast } = useToast()
207 | const sendToast = () => {
208 | splitbee.track('toast', {
209 | variant
210 | })
211 | toast(`This is a ${variant} toast`, variant)
212 | }
213 | return (
214 |
215 |
220 | {variant}
221 |
222 |
223 | )
224 | }
225 |
226 | export default function Home(): JSX.Element {
227 | React.useEffect(() => {
228 | splitbee.init()
229 | }, [])
230 | return (
231 |
236 |
237 |
238 | )
239 | }
240 |
--------------------------------------------------------------------------------
/www/src/pages/markdown-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Markdown page example
3 | ---
4 |
5 | # Markdown page example
6 |
7 | You don't need React to write simple standalone pages.
8 |
--------------------------------------------------------------------------------
/www/static/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walidcherhane/rc-toastr/4b3cea677aaf3c4ab6073a10773a69d0358ea148/www/static/.nojekyll
--------------------------------------------------------------------------------
/www/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walidcherhane/rc-toastr/4b3cea677aaf3c4ab6073a10773a69d0358ea148/www/static/img/favicon.ico
--------------------------------------------------------------------------------
/www/static/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/walidcherhane/rc-toastr/4b3cea677aaf3c4ab6073a10773a69d0358ea148/www/static/img/logo.png
--------------------------------------------------------------------------------
/www/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | // This file is not used in compilation. It is here just for a nice editor experience.
3 | "extends": "@tsconfig/docusaurus/tsconfig.json",
4 | "compilerOptions": {
5 | "baseUrl": "."
6 | }
7 | }
8 |
--------------------------------------------------------------------------------