This commit is contained in:
21
node_modules/react-toastify/LICENSE
generated
vendored
Normal file
21
node_modules/react-toastify/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Fadi Khadra
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
114
node_modules/react-toastify/README.md
generated
vendored
Normal file
114
node_modules/react-toastify/README.md
generated
vendored
Normal file
@@ -0,0 +1,114 @@
|
||||
# React-Toastify
|
||||
|
||||
[](https://opencollective.com/react-toastify) 
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
🎉 React-Toastify allows you to add notifications to your app with ease. No more nonsense!
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
$ npm install --save react-toastify
|
||||
$ yarn add react-toastify
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Easy to set up for real, you can make it work in less than 10sec!
|
||||
- Super easy to customize
|
||||
- RTL support
|
||||
- Swipe to close 👌
|
||||
- Can choose swipe direction
|
||||
- Super easy to use an animation of your choice. Works well with animate.css for example
|
||||
- Can display a react component inside the toast!
|
||||
- Has ```onOpen``` and ```onClose``` hooks. Both can access the props passed to the react component rendered inside the toast
|
||||
- Can remove a toast programmatically
|
||||
- Define behavior per toast
|
||||
- Pause toast when the window loses focus 👁
|
||||
- Fancy progress bar to display the remaining time
|
||||
- Possibility to update a toast
|
||||
- You can control the progress bar a la `nprogress` 😲
|
||||
- You can limit the number of toast displayed at the same time
|
||||
- Dark mode 🌒
|
||||
- And much more !
|
||||
|
||||
## The gist
|
||||
|
||||
```jsx
|
||||
import React from 'react';
|
||||
|
||||
import { ToastContainer, toast } from 'react-toastify';
|
||||
import 'react-toastify/dist/ReactToastify.css';
|
||||
|
||||
function App(){
|
||||
const notify = () => toast("Wow so easy!");
|
||||
|
||||
return (
|
||||
<div>
|
||||
<button onClick={notify}>Notify!</button>
|
||||
<ToastContainer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
## Demo
|
||||
|
||||
[A demo is worth a thousand words](https://fkhadra.github.io/react-toastify/introduction)
|
||||
|
||||
## Documentation
|
||||
|
||||
Check the [documentation](https://fkhadra.github.io/react-toastify/introduction) to get you started!
|
||||
|
||||
## Contribute
|
||||
|
||||
Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! Take a look at the contributing guide.
|
||||
|
||||
You can also find me on [reactiflux](https://www.reactiflux.com/). My pseudo is Fadi.
|
||||
|
||||
## Contributors
|
||||
|
||||
### Code Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
<a href="https://github.com/fkhadra/react-toastify/graphs/contributors"><img src="https://opencollective.com/react-toastify/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
### Financial Contributors
|
||||
|
||||
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/react-toastify/contribute)]
|
||||
|
||||
#### Individuals
|
||||
|
||||
<a href="https://opencollective.com/react-toastify"><img src="https://opencollective.com/react-toastify/individuals.svg?width=890"></a>
|
||||
|
||||
#### Organizations
|
||||
|
||||
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/react-toastify/contribute)]
|
||||
|
||||
<a href="https://opencollective.com/react-toastify/organization/0/website"><img src="https://opencollective.com/react-toastify/organization/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/1/website"><img src="https://opencollective.com/react-toastify/organization/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/2/website"><img src="https://opencollective.com/react-toastify/organization/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/3/website"><img src="https://opencollective.com/react-toastify/organization/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/4/website"><img src="https://opencollective.com/react-toastify/organization/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/5/website"><img src="https://opencollective.com/react-toastify/organization/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/6/website"><img src="https://opencollective.com/react-toastify/organization/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/7/website"><img src="https://opencollective.com/react-toastify/organization/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/8/website"><img src="https://opencollective.com/react-toastify/organization/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/react-toastify/organization/9/website"><img src="https://opencollective.com/react-toastify/organization/9/avatar.svg"></a>
|
||||
|
||||
## Release Notes
|
||||
|
||||
You can find the release note for the latest release [here](https://github.com/fkhadra/react-toastify/releases/latest)
|
||||
|
||||
You can browse them all [here](https://github.com/fkhadra/react-toastify/releases)
|
||||
|
||||
## License
|
||||
|
||||
Licensed under MIT
|
||||
1
node_modules/react-toastify/addons/use-notification-center/index.d.ts
generated
vendored
Normal file
1
node_modules/react-toastify/addons/use-notification-center/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './useNotificationCenter';
|
||||
153
node_modules/react-toastify/addons/use-notification-center/index.esm.mjs
generated
vendored
Normal file
153
node_modules/react-toastify/addons/use-notification-center/index.esm.mjs
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
import { useRef, useState, useEffect } from 'react';
|
||||
import { toast } from 'react-toastify';
|
||||
|
||||
function useNotificationCenter(params) {
|
||||
if (params === void 0) {
|
||||
params = {};
|
||||
}
|
||||
|
||||
const sortFn = useRef(params.sort || defaultSort);
|
||||
const filterFn = useRef(params.filter || null);
|
||||
const [notifications, setNotifications] = useState(() => {
|
||||
if (params.data) {
|
||||
return filterFn.current ? params.data.filter(filterFn.current).sort(sortFn.current) : [...params.data].sort(sortFn.current);
|
||||
}
|
||||
|
||||
return [];
|
||||
}); // used to method to be used inside effect without having stale `notifications`
|
||||
|
||||
const notificationsRef = useRef(notifications);
|
||||
useEffect(() => {
|
||||
notificationsRef.current = notifications;
|
||||
}, [notifications]);
|
||||
useEffect(() => {
|
||||
return toast.onChange(toast => {
|
||||
if (toast.status === 'added' || toast.status === 'updated') {
|
||||
const newItem = decorate(toast);
|
||||
if (filterFn.current && !filterFn.current(newItem)) return;
|
||||
setNotifications(prev => {
|
||||
let nextState = [];
|
||||
const updateIdx = prev.findIndex(v => v.id === newItem.id);
|
||||
|
||||
if (updateIdx !== -1) {
|
||||
nextState = prev.slice();
|
||||
Object.assign(nextState[updateIdx], newItem, {
|
||||
createdAt: Date.now()
|
||||
});
|
||||
} else if (prev.length === 0) {
|
||||
nextState = [newItem];
|
||||
} else {
|
||||
nextState = [newItem, ...prev];
|
||||
}
|
||||
|
||||
return nextState.sort(sortFn.current);
|
||||
});
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
const remove = id => {
|
||||
setNotifications(prev => prev.filter(Array.isArray(id) ? v => !id.includes(v.id) : v => v.id !== id));
|
||||
};
|
||||
|
||||
const clear = () => {
|
||||
setNotifications([]);
|
||||
};
|
||||
|
||||
const markAllAsRead = function (read) {
|
||||
if (read === void 0) {
|
||||
read = true;
|
||||
}
|
||||
|
||||
setNotifications(prev => prev.map(v => {
|
||||
v.read = read;
|
||||
return v;
|
||||
}));
|
||||
};
|
||||
|
||||
const markAsRead = function (id, read) {
|
||||
if (read === void 0) {
|
||||
read = true;
|
||||
}
|
||||
|
||||
let map = v => {
|
||||
if (v.id === id) v.read = read;
|
||||
return v;
|
||||
};
|
||||
|
||||
if (Array.isArray(id)) {
|
||||
map = v => {
|
||||
if (id.includes(v.id)) v.read = read;
|
||||
return v;
|
||||
};
|
||||
}
|
||||
|
||||
setNotifications(prev => prev.map(map));
|
||||
};
|
||||
|
||||
const find = id => {
|
||||
return Array.isArray(id) ? notificationsRef.current.filter(v => id.includes(v.id)) : notificationsRef.current.find(v => v.id === id);
|
||||
};
|
||||
|
||||
const add = item => {
|
||||
if (notificationsRef.current.find(v => v.id === item.id)) return null;
|
||||
const newItem = decorate(item);
|
||||
setNotifications(prev => [...prev, newItem].sort(sortFn.current));
|
||||
return newItem.id;
|
||||
};
|
||||
|
||||
const update = (id, item) => {
|
||||
const index = notificationsRef.current.findIndex(v => v.id === id);
|
||||
|
||||
if (index !== -1) {
|
||||
setNotifications(prev => {
|
||||
const nextState = [...prev];
|
||||
Object.assign(nextState[index], item, {
|
||||
createdAt: item.createdAt || Date.now()
|
||||
});
|
||||
return nextState.sort(sortFn.current);
|
||||
});
|
||||
return item.id;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
const sort = compareFn => {
|
||||
sortFn.current = compareFn;
|
||||
setNotifications(prev => prev.slice().sort(compareFn));
|
||||
};
|
||||
|
||||
return {
|
||||
notifications,
|
||||
clear,
|
||||
markAllAsRead,
|
||||
markAsRead,
|
||||
add,
|
||||
update,
|
||||
remove,
|
||||
// @ts-ignore fixme: overloading issue
|
||||
find,
|
||||
sort,
|
||||
|
||||
get unreadCount() {
|
||||
return notifications.reduce((prev, cur) => !cur.read ? prev + 1 : prev, 0);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
function decorate(item) {
|
||||
if (item.id == null) item.id = Date.now().toString(36).substring(2, 9);
|
||||
if (!item.createdAt) item.createdAt = Date.now();
|
||||
if (item.read == null) item.read = false;
|
||||
return item;
|
||||
} // newest to oldest
|
||||
|
||||
|
||||
function defaultSort(l, r) {
|
||||
return r.createdAt - l.createdAt;
|
||||
}
|
||||
|
||||
export { useNotificationCenter };
|
||||
//# sourceMappingURL=index.esm.mjs.map
|
||||
1
node_modules/react-toastify/addons/use-notification-center/index.esm.mjs.map
generated
vendored
Normal file
1
node_modules/react-toastify/addons/use-notification-center/index.esm.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
153
node_modules/react-toastify/addons/use-notification-center/index.js
generated
vendored
Normal file
153
node_modules/react-toastify/addons/use-notification-center/index.js
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
var react = require('react');
|
||||
var reactToastify = require('react-toastify');
|
||||
|
||||
function useNotificationCenter(params) {
|
||||
if (params === void 0) {
|
||||
params = {};
|
||||
}
|
||||
|
||||
const sortFn = react.useRef(params.sort || defaultSort);
|
||||
const filterFn = react.useRef(params.filter || null);
|
||||
const [notifications, setNotifications] = react.useState(() => {
|
||||
if (params.data) {
|
||||
return filterFn.current ? params.data.filter(filterFn.current).sort(sortFn.current) : [...params.data].sort(sortFn.current);
|
||||
}
|
||||
|
||||
return [];
|
||||
}); // used to method to be used inside effect without having stale `notifications`
|
||||
|
||||
const notificationsRef = react.useRef(notifications);
|
||||
react.useEffect(() => {
|
||||
notificationsRef.current = notifications;
|
||||
}, [notifications]);
|
||||
react.useEffect(() => {
|
||||
return reactToastify.toast.onChange(toast => {
|
||||
if (toast.status === 'added' || toast.status === 'updated') {
|
||||
const newItem = decorate(toast);
|
||||
if (filterFn.current && !filterFn.current(newItem)) return;
|
||||
setNotifications(prev => {
|
||||
let nextState = [];
|
||||
const updateIdx = prev.findIndex(v => v.id === newItem.id);
|
||||
|
||||
if (updateIdx !== -1) {
|
||||
nextState = prev.slice();
|
||||
Object.assign(nextState[updateIdx], newItem, {
|
||||
createdAt: Date.now()
|
||||
});
|
||||
} else if (prev.length === 0) {
|
||||
nextState = [newItem];
|
||||
} else {
|
||||
nextState = [newItem, ...prev];
|
||||
}
|
||||
|
||||
return nextState.sort(sortFn.current);
|
||||
});
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
const remove = id => {
|
||||
setNotifications(prev => prev.filter(Array.isArray(id) ? v => !id.includes(v.id) : v => v.id !== id));
|
||||
};
|
||||
|
||||
const clear = () => {
|
||||
setNotifications([]);
|
||||
};
|
||||
|
||||
const markAllAsRead = function (read) {
|
||||
if (read === void 0) {
|
||||
read = true;
|
||||
}
|
||||
|
||||
setNotifications(prev => prev.map(v => {
|
||||
v.read = read;
|
||||
return v;
|
||||
}));
|
||||
};
|
||||
|
||||
const markAsRead = function (id, read) {
|
||||
if (read === void 0) {
|
||||
read = true;
|
||||
}
|
||||
|
||||
let map = v => {
|
||||
if (v.id === id) v.read = read;
|
||||
return v;
|
||||
};
|
||||
|
||||
if (Array.isArray(id)) {
|
||||
map = v => {
|
||||
if (id.includes(v.id)) v.read = read;
|
||||
return v;
|
||||
};
|
||||
}
|
||||
|
||||
setNotifications(prev => prev.map(map));
|
||||
};
|
||||
|
||||
const find = id => {
|
||||
return Array.isArray(id) ? notificationsRef.current.filter(v => id.includes(v.id)) : notificationsRef.current.find(v => v.id === id);
|
||||
};
|
||||
|
||||
const add = item => {
|
||||
if (notificationsRef.current.find(v => v.id === item.id)) return null;
|
||||
const newItem = decorate(item);
|
||||
setNotifications(prev => [...prev, newItem].sort(sortFn.current));
|
||||
return newItem.id;
|
||||
};
|
||||
|
||||
const update = (id, item) => {
|
||||
const index = notificationsRef.current.findIndex(v => v.id === id);
|
||||
|
||||
if (index !== -1) {
|
||||
setNotifications(prev => {
|
||||
const nextState = [...prev];
|
||||
Object.assign(nextState[index], item, {
|
||||
createdAt: item.createdAt || Date.now()
|
||||
});
|
||||
return nextState.sort(sortFn.current);
|
||||
});
|
||||
return item.id;
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
const sort = compareFn => {
|
||||
sortFn.current = compareFn;
|
||||
setNotifications(prev => prev.slice().sort(compareFn));
|
||||
};
|
||||
|
||||
return {
|
||||
notifications,
|
||||
clear,
|
||||
markAllAsRead,
|
||||
markAsRead,
|
||||
add,
|
||||
update,
|
||||
remove,
|
||||
// @ts-ignore fixme: overloading issue
|
||||
find,
|
||||
sort,
|
||||
|
||||
get unreadCount() {
|
||||
return notifications.reduce((prev, cur) => !cur.read ? prev + 1 : prev, 0);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
function decorate(item) {
|
||||
if (item.id == null) item.id = Date.now().toString(36).substring(2, 9);
|
||||
if (!item.createdAt) item.createdAt = Date.now();
|
||||
if (item.read == null) item.read = false;
|
||||
return item;
|
||||
} // newest to oldest
|
||||
|
||||
|
||||
function defaultSort(l, r) {
|
||||
return r.createdAt - l.createdAt;
|
||||
}
|
||||
|
||||
exports.useNotificationCenter = useNotificationCenter;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/react-toastify/addons/use-notification-center/index.js.map
generated
vendored
Normal file
1
node_modules/react-toastify/addons/use-notification-center/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
158
node_modules/react-toastify/addons/use-notification-center/useNotificationCenter.d.ts
generated
vendored
Normal file
158
node_modules/react-toastify/addons/use-notification-center/useNotificationCenter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
import { ToastItem, Id } from 'react-toastify';
|
||||
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
||||
export interface NotificationCenterItem<Data = {}> extends Optional<ToastItem<Data>, 'content' | 'data'> {
|
||||
read: boolean;
|
||||
createdAt: number;
|
||||
}
|
||||
export type SortFn<Data> = (l: NotificationCenterItem<Data>, r: NotificationCenterItem<Data>) => number;
|
||||
export type FilterFn<Data = {}> = (item: NotificationCenterItem<Data>) => boolean;
|
||||
export interface UseNotificationCenterParams<Data = {}> {
|
||||
/**
|
||||
* initial data to rehydrate the notification center
|
||||
*/
|
||||
data?: NotificationCenterItem<Data>[];
|
||||
/**
|
||||
* By default, the notifications are sorted from the newest to the oldest using
|
||||
* the `createdAt` field. Use this to provide your own sort function
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* // old notifications first
|
||||
* useNotificationCenter({
|
||||
* sort: ((l, r) => l.createdAt - r.createdAt)
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
sort?: SortFn<Data>;
|
||||
/**
|
||||
* Keep the toast that meets the condition specified in the callback function.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* // keep only the toasts when hidden is set to false
|
||||
* useNotificationCenter({
|
||||
* filter: item => item.data.hidden === false
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
filter?: FilterFn<Data>;
|
||||
}
|
||||
export interface UseNotificationCenter<Data> {
|
||||
/**
|
||||
* Contains all the notifications
|
||||
*/
|
||||
notifications: NotificationCenterItem<Data>[];
|
||||
/**
|
||||
* Clear all notifications
|
||||
*/
|
||||
clear(): void;
|
||||
/**
|
||||
* Mark all notification as read
|
||||
*/
|
||||
markAllAsRead(): void;
|
||||
/**
|
||||
* Mark all notification as read or not.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* markAllAsRead(false) // mark all notification as not read
|
||||
*
|
||||
* markAllAsRead(true) // same as calling markAllAsRead()
|
||||
* ```
|
||||
*/
|
||||
markAllAsRead(read?: boolean): void;
|
||||
/**
|
||||
* Mark one or more notifications as read.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* markAsRead("anId")
|
||||
* markAsRead(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
markAsRead(id: Id | Id[]): void;
|
||||
/**
|
||||
* Mark one or more notifications as read.The second parameter let you mark the notificaiton as read or not.
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* markAsRead("anId", false)
|
||||
* markAsRead(["a","list", "of", "id"], false)
|
||||
*
|
||||
* markAsRead("anId", true) // same as markAsRead("anId")
|
||||
* ```
|
||||
*/
|
||||
markAsRead(id: Id | Id[], read?: boolean): void;
|
||||
/**
|
||||
* Remove one or more notifications
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* remove("anId")
|
||||
* remove(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
remove(id: Id | Id[]): void;
|
||||
/**
|
||||
* Push a notification to the notification center.
|
||||
* Returns null when an item with the given id already exists
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* const id = add({id: "id", content: "test", data: { foo: "hello" } })
|
||||
*
|
||||
* // Return the id of the notificaiton, generate one if none provided
|
||||
* const id = add({ data: {title: "a title", text: "some text"} })
|
||||
* ```
|
||||
*/
|
||||
add(item: Partial<NotificationCenterItem<Data>>): Id | null;
|
||||
/**
|
||||
* Update the notification that match the id
|
||||
* Returns null when no matching notification found
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* const id = update("anId", {content: "test", data: { foo: "hello" } })
|
||||
*
|
||||
* // It's also possible to update the id
|
||||
* const id = update("anId"m { id:"anotherOne", data: {title: "a title", text: "some text"} })
|
||||
* ```
|
||||
*/
|
||||
update(id: Id, item: Partial<NotificationCenterItem<Data>>): Id | null;
|
||||
/**
|
||||
* Retrive one or more notifications
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* find("anId")
|
||||
* find(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
find(id: Id): NotificationCenterItem<Data> | undefined;
|
||||
/**
|
||||
* Retrive one or more notifications
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* find("anId")
|
||||
* find(["a","list", "of", "id"])
|
||||
* ```
|
||||
*/
|
||||
find(id: Id[]): NotificationCenterItem<Data>[] | undefined;
|
||||
/**
|
||||
* Retrieve the count for unread notifications
|
||||
*/
|
||||
unreadCount: number;
|
||||
/**
|
||||
* Sort notifications using the newly provided function
|
||||
*
|
||||
* Usage:
|
||||
* ```
|
||||
* // old notifications first
|
||||
* sort((l, r) => l.createdAt - r.createdAt)
|
||||
* ```
|
||||
*/
|
||||
sort(sort: SortFn<Data>): void;
|
||||
}
|
||||
export declare function useNotificationCenter<Data = {}>(params?: UseNotificationCenterParams<Data>): UseNotificationCenter<Data>;
|
||||
export {};
|
||||
621
node_modules/react-toastify/dist/ReactToastify.css
generated
vendored
Normal file
621
node_modules/react-toastify/dist/ReactToastify.css
generated
vendored
Normal file
@@ -0,0 +1,621 @@
|
||||
:root {
|
||||
--toastify-color-light: #fff;
|
||||
--toastify-color-dark: #121212;
|
||||
--toastify-color-info: #3498db;
|
||||
--toastify-color-success: #07bc0c;
|
||||
--toastify-color-warning: #f1c40f;
|
||||
--toastify-color-error: #e74c3c;
|
||||
--toastify-color-transparent: rgba(255, 255, 255, 0.7);
|
||||
--toastify-icon-color-info: var(--toastify-color-info);
|
||||
--toastify-icon-color-success: var(--toastify-color-success);
|
||||
--toastify-icon-color-warning: var(--toastify-color-warning);
|
||||
--toastify-icon-color-error: var(--toastify-color-error);
|
||||
--toastify-toast-width: 320px;
|
||||
--toastify-toast-background: #fff;
|
||||
--toastify-toast-min-height: 64px;
|
||||
--toastify-toast-max-height: 800px;
|
||||
--toastify-font-family: sans-serif;
|
||||
--toastify-z-index: 9999;
|
||||
--toastify-text-color-light: #757575;
|
||||
--toastify-text-color-dark: #fff;
|
||||
--toastify-text-color-info: #fff;
|
||||
--toastify-text-color-success: #fff;
|
||||
--toastify-text-color-warning: #fff;
|
||||
--toastify-text-color-error: #fff;
|
||||
--toastify-spinner-color: #616161;
|
||||
--toastify-spinner-color-empty-area: #e0e0e0;
|
||||
--toastify-color-progress-light: linear-gradient(
|
||||
to right,
|
||||
#4cd964,
|
||||
#5ac8fa,
|
||||
#007aff,
|
||||
#34aadc,
|
||||
#5856d6,
|
||||
#ff2d55
|
||||
);
|
||||
--toastify-color-progress-dark: #bb86fc;
|
||||
--toastify-color-progress-info: var(--toastify-color-info);
|
||||
--toastify-color-progress-success: var(--toastify-color-success);
|
||||
--toastify-color-progress-warning: var(--toastify-color-warning);
|
||||
--toastify-color-progress-error: var(--toastify-color-error);
|
||||
}
|
||||
|
||||
.Toastify__toast-container {
|
||||
z-index: var(--toastify-z-index);
|
||||
-webkit-transform: translate3d(0, 0, var(--toastify-z-index));
|
||||
position: fixed;
|
||||
padding: 4px;
|
||||
width: var(--toastify-toast-width);
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
.Toastify__toast-container--top-left {
|
||||
top: 1em;
|
||||
left: 1em;
|
||||
}
|
||||
.Toastify__toast-container--top-center {
|
||||
top: 1em;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.Toastify__toast-container--top-right {
|
||||
top: 1em;
|
||||
right: 1em;
|
||||
}
|
||||
.Toastify__toast-container--bottom-left {
|
||||
bottom: 1em;
|
||||
left: 1em;
|
||||
}
|
||||
.Toastify__toast-container--bottom-center {
|
||||
bottom: 1em;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.Toastify__toast-container--bottom-right {
|
||||
bottom: 1em;
|
||||
right: 1em;
|
||||
}
|
||||
|
||||
@media only screen and (max-width : 480px) {
|
||||
.Toastify__toast-container {
|
||||
width: 100vw;
|
||||
padding: 0;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.Toastify__toast-container--top-left, .Toastify__toast-container--top-center, .Toastify__toast-container--top-right {
|
||||
top: 0;
|
||||
transform: translateX(0);
|
||||
}
|
||||
.Toastify__toast-container--bottom-left, .Toastify__toast-container--bottom-center, .Toastify__toast-container--bottom-right {
|
||||
bottom: 0;
|
||||
transform: translateX(0);
|
||||
}
|
||||
.Toastify__toast-container--rtl {
|
||||
right: 0;
|
||||
left: initial;
|
||||
}
|
||||
}
|
||||
.Toastify__toast {
|
||||
position: relative;
|
||||
min-height: var(--toastify-toast-min-height);
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 1rem;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 15px 0 rgba(0, 0, 0, 0.05);
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
max-height: var(--toastify-toast-max-height);
|
||||
overflow: hidden;
|
||||
font-family: var(--toastify-font-family);
|
||||
cursor: default;
|
||||
direction: ltr;
|
||||
/* webkit only issue #791 */
|
||||
z-index: 0;
|
||||
}
|
||||
.Toastify__toast--rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.Toastify__toast--close-on-click {
|
||||
cursor: pointer;
|
||||
}
|
||||
.Toastify__toast-body {
|
||||
margin: auto 0;
|
||||
-ms-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
padding: 6px;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
.Toastify__toast-body > div:last-child {
|
||||
word-break: break-word;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
.Toastify__toast-icon {
|
||||
-webkit-margin-end: 10px;
|
||||
margin-inline-end: 10px;
|
||||
width: 20px;
|
||||
-ms-flex-negative: 0;
|
||||
flex-shrink: 0;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.Toastify--animate {
|
||||
animation-fill-mode: both;
|
||||
animation-duration: 0.7s;
|
||||
}
|
||||
|
||||
.Toastify--animate-icon {
|
||||
animation-fill-mode: both;
|
||||
animation-duration: 0.3s;
|
||||
}
|
||||
|
||||
@media only screen and (max-width : 480px) {
|
||||
.Toastify__toast {
|
||||
margin-bottom: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
.Toastify__toast-theme--dark {
|
||||
background: var(--toastify-color-dark);
|
||||
color: var(--toastify-text-color-dark);
|
||||
}
|
||||
.Toastify__toast-theme--light {
|
||||
background: var(--toastify-color-light);
|
||||
color: var(--toastify-text-color-light);
|
||||
}
|
||||
.Toastify__toast-theme--colored.Toastify__toast--default {
|
||||
background: var(--toastify-color-light);
|
||||
color: var(--toastify-text-color-light);
|
||||
}
|
||||
.Toastify__toast-theme--colored.Toastify__toast--info {
|
||||
color: var(--toastify-text-color-info);
|
||||
background: var(--toastify-color-info);
|
||||
}
|
||||
.Toastify__toast-theme--colored.Toastify__toast--success {
|
||||
color: var(--toastify-text-color-success);
|
||||
background: var(--toastify-color-success);
|
||||
}
|
||||
.Toastify__toast-theme--colored.Toastify__toast--warning {
|
||||
color: var(--toastify-text-color-warning);
|
||||
background: var(--toastify-color-warning);
|
||||
}
|
||||
.Toastify__toast-theme--colored.Toastify__toast--error {
|
||||
color: var(--toastify-text-color-error);
|
||||
background: var(--toastify-color-error);
|
||||
}
|
||||
|
||||
.Toastify__progress-bar-theme--light {
|
||||
background: var(--toastify-color-progress-light);
|
||||
}
|
||||
.Toastify__progress-bar-theme--dark {
|
||||
background: var(--toastify-color-progress-dark);
|
||||
}
|
||||
.Toastify__progress-bar--info {
|
||||
background: var(--toastify-color-progress-info);
|
||||
}
|
||||
.Toastify__progress-bar--success {
|
||||
background: var(--toastify-color-progress-success);
|
||||
}
|
||||
.Toastify__progress-bar--warning {
|
||||
background: var(--toastify-color-progress-warning);
|
||||
}
|
||||
.Toastify__progress-bar--error {
|
||||
background: var(--toastify-color-progress-error);
|
||||
}
|
||||
.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info, .Toastify__progress-bar-theme--colored.Toastify__progress-bar--success, .Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning, .Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {
|
||||
background: var(--toastify-color-transparent);
|
||||
}
|
||||
|
||||
.Toastify__close-button {
|
||||
color: #fff;
|
||||
background: transparent;
|
||||
outline: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
opacity: 0.7;
|
||||
transition: 0.3s ease;
|
||||
-ms-flex-item-align: start;
|
||||
align-self: flex-start;
|
||||
}
|
||||
.Toastify__close-button--light {
|
||||
color: #000;
|
||||
opacity: 0.3;
|
||||
}
|
||||
.Toastify__close-button > svg {
|
||||
fill: currentColor;
|
||||
height: 16px;
|
||||
width: 14px;
|
||||
}
|
||||
.Toastify__close-button:hover, .Toastify__close-button:focus {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes Toastify__trackProgress {
|
||||
0% {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
100% {
|
||||
transform: scaleX(0);
|
||||
}
|
||||
}
|
||||
.Toastify__progress-bar {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
z-index: var(--toastify-z-index);
|
||||
opacity: 0.7;
|
||||
transform-origin: left;
|
||||
}
|
||||
.Toastify__progress-bar--animated {
|
||||
animation: Toastify__trackProgress linear 1 forwards;
|
||||
}
|
||||
.Toastify__progress-bar--controlled {
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
.Toastify__progress-bar--rtl {
|
||||
right: 0;
|
||||
left: initial;
|
||||
transform-origin: right;
|
||||
}
|
||||
|
||||
.Toastify__spinner {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid;
|
||||
border-radius: 100%;
|
||||
border-color: var(--toastify-spinner-color-empty-area);
|
||||
border-right-color: var(--toastify-spinner-color);
|
||||
animation: Toastify__spin 0.65s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes Toastify__bounceInRight {
|
||||
from, 60%, 75%, 90%, to {
|
||||
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
}
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(3000px, 0, 0);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(-25px, 0, 0);
|
||||
}
|
||||
75% {
|
||||
transform: translate3d(10px, 0, 0);
|
||||
}
|
||||
90% {
|
||||
transform: translate3d(-5px, 0, 0);
|
||||
}
|
||||
to {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__bounceOutRight {
|
||||
20% {
|
||||
opacity: 1;
|
||||
transform: translate3d(-20px, 0, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(2000px, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__bounceInLeft {
|
||||
from, 60%, 75%, 90%, to {
|
||||
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
}
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate3d(-3000px, 0, 0);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(25px, 0, 0);
|
||||
}
|
||||
75% {
|
||||
transform: translate3d(-10px, 0, 0);
|
||||
}
|
||||
90% {
|
||||
transform: translate3d(5px, 0, 0);
|
||||
}
|
||||
to {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__bounceOutLeft {
|
||||
20% {
|
||||
opacity: 1;
|
||||
transform: translate3d(20px, 0, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(-2000px, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__bounceInUp {
|
||||
from, 60%, 75%, 90%, to {
|
||||
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
}
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, 3000px, 0);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, -20px, 0);
|
||||
}
|
||||
75% {
|
||||
transform: translate3d(0, 10px, 0);
|
||||
}
|
||||
90% {
|
||||
transform: translate3d(0, -5px, 0);
|
||||
}
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__bounceOutUp {
|
||||
20% {
|
||||
transform: translate3d(0, -10px, 0);
|
||||
}
|
||||
40%, 45% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 20px, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -2000px, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__bounceInDown {
|
||||
from, 60%, 75%, 90%, to {
|
||||
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
}
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -3000px, 0);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 25px, 0);
|
||||
}
|
||||
75% {
|
||||
transform: translate3d(0, -10px, 0);
|
||||
}
|
||||
90% {
|
||||
transform: translate3d(0, 5px, 0);
|
||||
}
|
||||
to {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__bounceOutDown {
|
||||
20% {
|
||||
transform: translate3d(0, 10px, 0);
|
||||
}
|
||||
40%, 45% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, -20px, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, 2000px, 0);
|
||||
}
|
||||
}
|
||||
.Toastify__bounce-enter--top-left, .Toastify__bounce-enter--bottom-left {
|
||||
animation-name: Toastify__bounceInLeft;
|
||||
}
|
||||
.Toastify__bounce-enter--top-right, .Toastify__bounce-enter--bottom-right {
|
||||
animation-name: Toastify__bounceInRight;
|
||||
}
|
||||
.Toastify__bounce-enter--top-center {
|
||||
animation-name: Toastify__bounceInDown;
|
||||
}
|
||||
.Toastify__bounce-enter--bottom-center {
|
||||
animation-name: Toastify__bounceInUp;
|
||||
}
|
||||
|
||||
.Toastify__bounce-exit--top-left, .Toastify__bounce-exit--bottom-left {
|
||||
animation-name: Toastify__bounceOutLeft;
|
||||
}
|
||||
.Toastify__bounce-exit--top-right, .Toastify__bounce-exit--bottom-right {
|
||||
animation-name: Toastify__bounceOutRight;
|
||||
}
|
||||
.Toastify__bounce-exit--top-center {
|
||||
animation-name: Toastify__bounceOutUp;
|
||||
}
|
||||
.Toastify__bounce-exit--bottom-center {
|
||||
animation-name: Toastify__bounceOutDown;
|
||||
}
|
||||
|
||||
@keyframes Toastify__zoomIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale3d(0.3, 0.3, 0.3);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__zoomOut {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0;
|
||||
transform: scale3d(0.3, 0.3, 0.3);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.Toastify__zoom-enter {
|
||||
animation-name: Toastify__zoomIn;
|
||||
}
|
||||
|
||||
.Toastify__zoom-exit {
|
||||
animation-name: Toastify__zoomOut;
|
||||
}
|
||||
|
||||
@keyframes Toastify__flipIn {
|
||||
from {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
|
||||
animation-timing-function: ease-in;
|
||||
opacity: 0;
|
||||
}
|
||||
40% {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
|
||||
animation-timing-function: ease-in;
|
||||
}
|
||||
60% {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
|
||||
opacity: 1;
|
||||
}
|
||||
80% {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
|
||||
}
|
||||
to {
|
||||
transform: perspective(400px);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__flipOut {
|
||||
from {
|
||||
transform: perspective(400px);
|
||||
}
|
||||
30% {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.Toastify__flip-enter {
|
||||
animation-name: Toastify__flipIn;
|
||||
}
|
||||
|
||||
.Toastify__flip-exit {
|
||||
animation-name: Toastify__flipOut;
|
||||
}
|
||||
|
||||
@keyframes Toastify__slideInRight {
|
||||
from {
|
||||
transform: translate3d(110%, 0, 0);
|
||||
visibility: visible;
|
||||
}
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__slideInLeft {
|
||||
from {
|
||||
transform: translate3d(-110%, 0, 0);
|
||||
visibility: visible;
|
||||
}
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__slideInUp {
|
||||
from {
|
||||
transform: translate3d(0, 110%, 0);
|
||||
visibility: visible;
|
||||
}
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__slideInDown {
|
||||
from {
|
||||
transform: translate3d(0, -110%, 0);
|
||||
visibility: visible;
|
||||
}
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__slideOutRight {
|
||||
from {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
to {
|
||||
visibility: hidden;
|
||||
transform: translate3d(110%, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__slideOutLeft {
|
||||
from {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
to {
|
||||
visibility: hidden;
|
||||
transform: translate3d(-110%, 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__slideOutDown {
|
||||
from {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
to {
|
||||
visibility: hidden;
|
||||
transform: translate3d(0, 500px, 0);
|
||||
}
|
||||
}
|
||||
@keyframes Toastify__slideOutUp {
|
||||
from {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
to {
|
||||
visibility: hidden;
|
||||
transform: translate3d(0, -500px, 0);
|
||||
}
|
||||
}
|
||||
.Toastify__slide-enter--top-left, .Toastify__slide-enter--bottom-left {
|
||||
animation-name: Toastify__slideInLeft;
|
||||
}
|
||||
.Toastify__slide-enter--top-right, .Toastify__slide-enter--bottom-right {
|
||||
animation-name: Toastify__slideInRight;
|
||||
}
|
||||
.Toastify__slide-enter--top-center {
|
||||
animation-name: Toastify__slideInDown;
|
||||
}
|
||||
.Toastify__slide-enter--bottom-center {
|
||||
animation-name: Toastify__slideInUp;
|
||||
}
|
||||
|
||||
.Toastify__slide-exit--top-left, .Toastify__slide-exit--bottom-left {
|
||||
animation-name: Toastify__slideOutLeft;
|
||||
}
|
||||
.Toastify__slide-exit--top-right, .Toastify__slide-exit--bottom-right {
|
||||
animation-name: Toastify__slideOutRight;
|
||||
}
|
||||
.Toastify__slide-exit--top-center {
|
||||
animation-name: Toastify__slideOutUp;
|
||||
}
|
||||
.Toastify__slide-exit--bottom-center {
|
||||
animation-name: Toastify__slideOutDown;
|
||||
}
|
||||
|
||||
@keyframes Toastify__spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=ReactToastify.css.map */
|
||||
1
node_modules/react-toastify/dist/ReactToastify.css.map
generated
vendored
Normal file
1
node_modules/react-toastify/dist/ReactToastify.css.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/react-toastify/dist/ReactToastify.min.css
generated
vendored
Normal file
1
node_modules/react-toastify/dist/ReactToastify.min.css
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/react-toastify/dist/ReactToastify.minimal.css
generated
vendored
Normal file
1
node_modules/react-toastify/dist/ReactToastify.minimal.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
:root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error)}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{animation:Toastify__trackProgress linear 1 forwards}
|
||||
1
node_modules/react-toastify/dist/ReactToastify.minimal.css.map
generated
vendored
Normal file
1
node_modules/react-toastify/dist/ReactToastify.minimal.css.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../scss/_variables.scss","../scss/minimal.scss"],"names":[],"mappings":"AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EAGA;EACA;EACA;EACA;EAEA;EACA;EAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAUA;EACA;EACA;EACA;EACA;;;AC/CF;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE","file":"ReactToastify.minimal.css"}
|
||||
9
node_modules/react-toastify/dist/components/CloseButton.d.ts
generated
vendored
Normal file
9
node_modules/react-toastify/dist/components/CloseButton.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
import { Theme, TypeOptions } from '../types';
|
||||
export interface CloseButtonProps {
|
||||
closeToast: (e: React.MouseEvent<HTMLElement>) => void;
|
||||
type: TypeOptions;
|
||||
ariaLabel?: string;
|
||||
theme: Theme;
|
||||
}
|
||||
export declare function CloseButton({ closeToast, theme, ariaLabel }: CloseButtonProps): React.JSX.Element;
|
||||
24
node_modules/react-toastify/dist/components/Icons.d.ts
generated
vendored
Normal file
24
node_modules/react-toastify/dist/components/Icons.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import React from 'react';
|
||||
import { Theme, ToastProps, TypeOptions } from '../types';
|
||||
/**
|
||||
* Used when providing custom icon
|
||||
*/
|
||||
export interface IconProps {
|
||||
theme: Theme;
|
||||
type: TypeOptions;
|
||||
}
|
||||
export type BuiltInIconProps = React.SVGProps<SVGSVGElement> & IconProps;
|
||||
declare function Warning(props: BuiltInIconProps): React.JSX.Element;
|
||||
declare function Info(props: BuiltInIconProps): React.JSX.Element;
|
||||
declare function Success(props: BuiltInIconProps): React.JSX.Element;
|
||||
declare function Error(props: BuiltInIconProps): React.JSX.Element;
|
||||
declare function Spinner(): React.JSX.Element;
|
||||
export declare const Icons: {
|
||||
info: typeof Info;
|
||||
warning: typeof Warning;
|
||||
success: typeof Success;
|
||||
error: typeof Error;
|
||||
spinner: typeof Spinner;
|
||||
};
|
||||
export declare function getIcon({ theme, type, isLoading, icon }: ToastProps): React.ReactNode;
|
||||
export {};
|
||||
53
node_modules/react-toastify/dist/components/ProgressBar.d.ts
generated
vendored
Normal file
53
node_modules/react-toastify/dist/components/ProgressBar.d.ts
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
import React from 'react';
|
||||
import { TypeOptions, ToastClassName, Theme } from '../types';
|
||||
export interface ProgressBarProps {
|
||||
/**
|
||||
* The animation delay which determine when to close the toast
|
||||
*/
|
||||
delay: number;
|
||||
/**
|
||||
* Whether or not the animation is running or paused
|
||||
*/
|
||||
isRunning: boolean;
|
||||
/**
|
||||
* Func to close the current toast
|
||||
*/
|
||||
closeToast: () => void;
|
||||
/**
|
||||
* Optional type : info, success ...
|
||||
*/
|
||||
type?: TypeOptions;
|
||||
/**
|
||||
* The theme that is currently used
|
||||
*/
|
||||
theme: Theme;
|
||||
/**
|
||||
* Hide or not the progress bar
|
||||
*/
|
||||
hide?: boolean;
|
||||
/**
|
||||
* Optionnal className
|
||||
*/
|
||||
className?: ToastClassName;
|
||||
/**
|
||||
* Optionnal inline style
|
||||
*/
|
||||
style?: React.CSSProperties;
|
||||
/**
|
||||
* Tell wether or not controlled progress bar is used
|
||||
*/
|
||||
controlledProgress?: boolean;
|
||||
/**
|
||||
* Controlled progress value
|
||||
*/
|
||||
progress?: number | string;
|
||||
/**
|
||||
* Support rtl content
|
||||
*/
|
||||
rtl?: boolean;
|
||||
/**
|
||||
* Tell if the component is visible on screen or not
|
||||
*/
|
||||
isIn?: boolean;
|
||||
}
|
||||
export declare function ProgressBar({ delay, isRunning, closeToast, type, hide, className, style: userStyle, controlledProgress, progress, rtl, isIn, theme }: ProgressBarProps): React.JSX.Element;
|
||||
3
node_modules/react-toastify/dist/components/Toast.d.ts
generated
vendored
Normal file
3
node_modules/react-toastify/dist/components/Toast.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import React from 'react';
|
||||
import { ToastProps } from '../types';
|
||||
export declare const Toast: React.FC<ToastProps>;
|
||||
3
node_modules/react-toastify/dist/components/ToastContainer.d.ts
generated
vendored
Normal file
3
node_modules/react-toastify/dist/components/ToastContainer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import React from 'react';
|
||||
import { ToastContainerProps } from '../types';
|
||||
export declare const ToastContainer: React.ForwardRefExoticComponent<ToastContainerProps & React.RefAttributes<HTMLDivElement>>;
|
||||
6
node_modules/react-toastify/dist/components/Transitions.d.ts
generated
vendored
Normal file
6
node_modules/react-toastify/dist/components/Transitions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/// <reference types="react" />
|
||||
declare const Bounce: ({ children, position, preventExitTransition, done, nodeRef, isIn }: import("..").ToastTransitionProps) => import("react").JSX.Element;
|
||||
declare const Slide: ({ children, position, preventExitTransition, done, nodeRef, isIn }: import("..").ToastTransitionProps) => import("react").JSX.Element;
|
||||
declare const Zoom: ({ children, position, preventExitTransition, done, nodeRef, isIn }: import("..").ToastTransitionProps) => import("react").JSX.Element;
|
||||
declare const Flip: ({ children, position, preventExitTransition, done, nodeRef, isIn }: import("..").ToastTransitionProps) => import("react").JSX.Element;
|
||||
export { Bounce, Slide, Zoom, Flip };
|
||||
6
node_modules/react-toastify/dist/components/index.d.ts
generated
vendored
Normal file
6
node_modules/react-toastify/dist/components/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export * from './CloseButton';
|
||||
export * from './ProgressBar';
|
||||
export * from './ToastContainer';
|
||||
export * from './Transitions';
|
||||
export * from './Toast';
|
||||
export * from './Icons';
|
||||
39
node_modules/react-toastify/dist/core/eventManager.d.ts
generated
vendored
Normal file
39
node_modules/react-toastify/dist/core/eventManager.d.ts
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/// <reference types="react" />
|
||||
import { Id, ToastContent, ClearWaitingQueueParams, NotValidatedToastProps, ToastItem } from '../types';
|
||||
import { ContainerInstance } from '../hooks';
|
||||
export declare const enum Event {
|
||||
Show = 0,
|
||||
Clear = 1,
|
||||
DidMount = 2,
|
||||
WillUnmount = 3,
|
||||
Change = 4,
|
||||
ClearWaitingQueue = 5
|
||||
}
|
||||
type OnShowCallback = (content: ToastContent, options: NotValidatedToastProps) => void;
|
||||
type OnClearCallback = (id?: Id) => void;
|
||||
type OnClearWaitingQueue = (params: ClearWaitingQueueParams) => void;
|
||||
type OnDidMountCallback = (containerInstance: ContainerInstance) => void;
|
||||
type OnWillUnmountCallback = OnDidMountCallback;
|
||||
export type OnChangeCallback = (toast: ToastItem) => void;
|
||||
type Callback = OnShowCallback | OnClearCallback | OnClearWaitingQueue | OnDidMountCallback | OnWillUnmountCallback | OnChangeCallback;
|
||||
type TimeoutId = ReturnType<typeof setTimeout>;
|
||||
export interface EventManager {
|
||||
list: Map<Event, Callback[]>;
|
||||
emitQueue: Map<Event, TimeoutId[]>;
|
||||
on(event: Event.Show, callback: OnShowCallback): EventManager;
|
||||
on(event: Event.Clear, callback: OnClearCallback): EventManager;
|
||||
on(event: Event.ClearWaitingQueue, callback: OnClearWaitingQueue): EventManager;
|
||||
on(event: Event.DidMount, callback: OnDidMountCallback): EventManager;
|
||||
on(event: Event.WillUnmount, callback: OnWillUnmountCallback): EventManager;
|
||||
on(event: Event.Change, callback: OnChangeCallback): EventManager;
|
||||
off(event: Event, callback?: Callback): EventManager;
|
||||
cancelEmit(event: Event): EventManager;
|
||||
emit<TData>(event: Event.Show, content: React.ReactNode | ToastContent<TData>, options: NotValidatedToastProps): void;
|
||||
emit(event: Event.Clear, id?: string | number): void;
|
||||
emit(event: Event.ClearWaitingQueue, params: ClearWaitingQueueParams): void;
|
||||
emit(event: Event.DidMount, containerInstance: ContainerInstance): void;
|
||||
emit(event: Event.WillUnmount, containerInstance: ContainerInstance): void;
|
||||
emit(event: Event.Change, data: ToastItem): void;
|
||||
}
|
||||
export declare const eventManager: EventManager;
|
||||
export {};
|
||||
2
node_modules/react-toastify/dist/core/index.d.ts
generated
vendored
Normal file
2
node_modules/react-toastify/dist/core/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './eventManager';
|
||||
export * from './toast';
|
||||
41
node_modules/react-toastify/dist/core/toast.d.ts
generated
vendored
Normal file
41
node_modules/react-toastify/dist/core/toast.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import { OnChangeCallback } from './eventManager';
|
||||
import { ToastContent, ToastOptions, Id, UpdateOptions, ClearWaitingQueueParams, TypeOptions } from '../types';
|
||||
declare function toast<TData = unknown>(content: ToastContent<TData>, options?: ToastOptions): Id;
|
||||
declare namespace toast {
|
||||
var loading: <TData = unknown>(content: ToastContent<TData>, options?: ToastOptions<{}> | undefined) => Id;
|
||||
var promise: typeof handlePromise;
|
||||
var success: <TData = unknown>(content: ToastContent<TData>, options?: ToastOptions<{}> | undefined) => Id;
|
||||
var info: <TData = unknown>(content: ToastContent<TData>, options?: ToastOptions<{}> | undefined) => Id;
|
||||
var error: <TData = unknown>(content: ToastContent<TData>, options?: ToastOptions<{}> | undefined) => Id;
|
||||
var warning: <TData = unknown>(content: ToastContent<TData>, options?: ToastOptions<{}> | undefined) => Id;
|
||||
var warn: <TData = unknown>(content: ToastContent<TData>, options?: ToastOptions<{}> | undefined) => Id;
|
||||
var dark: (content: ToastContent, options?: ToastOptions<{}> | undefined) => Id;
|
||||
var dismiss: (id?: Id | undefined) => void;
|
||||
var clearWaitingQueue: (params?: ClearWaitingQueueParams) => void;
|
||||
var isActive: (id: Id) => boolean;
|
||||
var update: <TData = unknown>(toastId: Id, options?: UpdateOptions<TData>) => void;
|
||||
var done: (id: Id) => void;
|
||||
var onChange: (callback: OnChangeCallback) => () => void;
|
||||
var POSITION: {
|
||||
TOP_LEFT: import("../types").ToastPosition;
|
||||
TOP_RIGHT: import("../types").ToastPosition;
|
||||
TOP_CENTER: import("../types").ToastPosition;
|
||||
BOTTOM_LEFT: import("../types").ToastPosition;
|
||||
BOTTOM_RIGHT: import("../types").ToastPosition;
|
||||
BOTTOM_CENTER: import("../types").ToastPosition;
|
||||
};
|
||||
var TYPE: {
|
||||
INFO: TypeOptions;
|
||||
SUCCESS: TypeOptions;
|
||||
WARNING: TypeOptions;
|
||||
ERROR: TypeOptions;
|
||||
DEFAULT: TypeOptions;
|
||||
};
|
||||
}
|
||||
export interface ToastPromiseParams<TData = unknown, TError = unknown, TPending = unknown> {
|
||||
pending?: string | UpdateOptions<TPending>;
|
||||
success?: string | UpdateOptions<TData>;
|
||||
error?: string | UpdateOptions<TError>;
|
||||
}
|
||||
declare function handlePromise<TData = unknown, TError = unknown, TPending = unknown>(promise: Promise<TData> | (() => Promise<TData>), { pending, error, success }: ToastPromiseParams<TData, TError, TPending>, options?: ToastOptions): Promise<TData>;
|
||||
export { toast };
|
||||
2
node_modules/react-toastify/dist/hooks/index.d.ts
generated
vendored
Normal file
2
node_modules/react-toastify/dist/hooks/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './useToastContainer';
|
||||
export * from './useToast';
|
||||
10
node_modules/react-toastify/dist/hooks/useToast.d.ts
generated
vendored
Normal file
10
node_modules/react-toastify/dist/hooks/useToast.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { DOMAttributes } from 'react';
|
||||
import { ToastProps } from '../types';
|
||||
export declare function useToast(props: ToastProps): {
|
||||
playToast: () => void;
|
||||
pauseToast: () => void;
|
||||
isRunning: boolean;
|
||||
preventExitTransition: boolean;
|
||||
toastRef: import("react").RefObject<HTMLDivElement>;
|
||||
eventHandlers: DOMAttributes<HTMLElement>;
|
||||
};
|
||||
23
node_modules/react-toastify/dist/hooks/useToastContainer.d.ts
generated
vendored
Normal file
23
node_modules/react-toastify/dist/hooks/useToastContainer.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/// <reference types="react" />
|
||||
import { Id, ToastContainerProps, ToastProps, ToastContent, Toast, ToastPosition } from '../types';
|
||||
interface QueuedToast {
|
||||
toastContent: ToastContent;
|
||||
toastProps: ToastProps;
|
||||
staleId?: Id;
|
||||
}
|
||||
export interface ContainerInstance {
|
||||
toastKey: number;
|
||||
displayedToast: number;
|
||||
props: ToastContainerProps;
|
||||
containerId?: Id | null;
|
||||
isToastActive: (toastId: Id) => boolean;
|
||||
getToast: (id: Id) => Toast | null | undefined;
|
||||
queue: QueuedToast[];
|
||||
count: number;
|
||||
}
|
||||
export declare function useToastContainer(props: ToastContainerProps): {
|
||||
getToastToRender: <T>(cb: (position: ToastPosition, toastList: Toast[]) => T) => T[];
|
||||
containerRef: import("react").MutableRefObject<null>;
|
||||
isToastActive: (id: Id) => boolean;
|
||||
};
|
||||
export {};
|
||||
5
node_modules/react-toastify/dist/index.d.ts
generated
vendored
Normal file
5
node_modules/react-toastify/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { useToastContainer, useToast } from './hooks';
|
||||
export { cssTransition, collapseToast } from './utils';
|
||||
export { ToastContainer, Bounce, Flip, Slide, Zoom, Icons, IconProps, CloseButtonProps } from './components';
|
||||
export { toast, ToastPromiseParams } from './core';
|
||||
export { TypeOptions, Theme, ToastPosition, ToastContentProps, ToastContent, ToastTransition, ToastClassName, ClearWaitingQueueParams, DraggableDirection, ToastOptions, UpdateOptions, ToastContainerProps, ToastTransitionProps, Id, ToastItem } from './types';
|
||||
8
node_modules/react-toastify/dist/inject-style.d.ts
generated
vendored
Normal file
8
node_modules/react-toastify/dist/inject-style.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
/**
|
||||
* Inject the style in case you cannot import the css file
|
||||
* Call it once in your app
|
||||
*/
|
||||
export declare function injectStyle(): void;
|
||||
|
||||
|
||||
8
node_modules/react-toastify/dist/inject-style.esm.mjs
generated
vendored
Normal file
8
node_modules/react-toastify/dist/inject-style.esm.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
12
node_modules/react-toastify/dist/inject-style.js
generated
vendored
Normal file
12
node_modules/react-toastify/dist/inject-style.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/react-toastify/dist/react-toastify.esm.mjs
generated
vendored
Normal file
3
node_modules/react-toastify/dist/react-toastify.esm.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/react-toastify/dist/react-toastify.esm.mjs.map
generated
vendored
Normal file
1
node_modules/react-toastify/dist/react-toastify.esm.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/react-toastify/dist/react-toastify.js
generated
vendored
Normal file
3
node_modules/react-toastify/dist/react-toastify.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/react-toastify/dist/react-toastify.js.map
generated
vendored
Normal file
1
node_modules/react-toastify/dist/react-toastify.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/react-toastify/dist/react-toastify.umd.js
generated
vendored
Normal file
2
node_modules/react-toastify/dist/react-toastify.umd.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/react-toastify/dist/react-toastify.umd.js.map
generated
vendored
Normal file
1
node_modules/react-toastify/dist/react-toastify.umd.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
279
node_modules/react-toastify/dist/types/index.d.ts
generated
vendored
Normal file
279
node_modules/react-toastify/dist/types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,279 @@
|
||||
import React from 'react';
|
||||
import { CloseButtonProps, IconProps } from '../components';
|
||||
type Nullable<T> = {
|
||||
[P in keyof T]: T[P] | null;
|
||||
};
|
||||
export type TypeOptions = 'info' | 'success' | 'warning' | 'error' | 'default';
|
||||
export type Theme = 'light' | 'dark' | 'colored';
|
||||
export type ToastPosition = 'top-right' | 'top-center' | 'top-left' | 'bottom-right' | 'bottom-center' | 'bottom-left';
|
||||
export interface ToastContentProps<Data = {}> {
|
||||
closeToast?: () => void;
|
||||
toastProps: ToastProps;
|
||||
data?: Data;
|
||||
}
|
||||
export type ToastContent<T = unknown> = React.ReactNode | ((props: ToastContentProps<T>) => React.ReactNode);
|
||||
export type ToastIcon = boolean | ((props: IconProps) => React.ReactNode) | React.ReactElement<IconProps> | string | number | React.ReactNode;
|
||||
export type Id = number | string;
|
||||
export type ToastTransition = React.FC<ToastTransitionProps> | React.ComponentClass<ToastTransitionProps>;
|
||||
/**
|
||||
* ClassName for the elements - can take a function to build a classname or a raw string that is cx'ed to defaults
|
||||
*/
|
||||
export type ToastClassName = ((context?: {
|
||||
type?: TypeOptions;
|
||||
defaultClassName?: string;
|
||||
position?: ToastPosition;
|
||||
rtl?: boolean;
|
||||
}) => string) | string;
|
||||
export interface ClearWaitingQueueParams {
|
||||
containerId?: Id;
|
||||
}
|
||||
export type DraggableDirection = 'x' | 'y';
|
||||
interface CommonOptions {
|
||||
/**
|
||||
* Pause the timer when the mouse hover the toast.
|
||||
* `Default: true`
|
||||
*/
|
||||
pauseOnHover?: boolean;
|
||||
/**
|
||||
* Pause the toast when the window loses focus.
|
||||
* `Default: true`
|
||||
*/
|
||||
pauseOnFocusLoss?: boolean;
|
||||
/**
|
||||
* Remove the toast when clicked.
|
||||
* `Default: true`
|
||||
*/
|
||||
closeOnClick?: boolean;
|
||||
/**
|
||||
* Set the delay in ms to close the toast automatically.
|
||||
* Use `false` to prevent the toast from closing.
|
||||
* `Default: 5000`
|
||||
*/
|
||||
autoClose?: number | false;
|
||||
/**
|
||||
* Set the default position to use.
|
||||
* `One of: 'top-right', 'top-center', 'top-left', 'bottom-right', 'bottom-center', 'bottom-left'`
|
||||
* `Default: 'top-right'`
|
||||
*/
|
||||
position?: ToastPosition;
|
||||
/**
|
||||
* Pass a custom close button.
|
||||
* To remove the close button pass `false`
|
||||
*/
|
||||
closeButton?: boolean | ((props: CloseButtonProps) => React.ReactNode) | React.ReactElement<CloseButtonProps>;
|
||||
/**
|
||||
* An optional css class to set for the progress bar.
|
||||
*/
|
||||
progressClassName?: ToastClassName;
|
||||
/**
|
||||
* An optional style to set for the progress bar.
|
||||
*/
|
||||
progressStyle?: React.CSSProperties;
|
||||
/**
|
||||
* An optional css class to set for the toast content.
|
||||
*/
|
||||
bodyClassName?: ToastClassName;
|
||||
/**
|
||||
* An optional inline style to apply for the toast content.
|
||||
*/
|
||||
bodyStyle?: React.CSSProperties;
|
||||
/**
|
||||
* Hide or show the progress bar.
|
||||
* `Default: false`
|
||||
*/
|
||||
hideProgressBar?: boolean;
|
||||
/**
|
||||
* Pass a custom transition built with react-transition-group.
|
||||
*/
|
||||
transition?: ToastTransition;
|
||||
/**
|
||||
* Allow toast to be draggable
|
||||
* `Default: true`
|
||||
*/
|
||||
draggable?: boolean;
|
||||
/**
|
||||
* The percentage of the toast's width it takes for a drag to dismiss a toast
|
||||
* `Default: 80`
|
||||
*/
|
||||
draggablePercent?: number;
|
||||
/**
|
||||
* Specify in which direction should you swipe to dismiss the toast
|
||||
* `Default: "x"`
|
||||
*/
|
||||
draggableDirection?: DraggableDirection;
|
||||
/**
|
||||
* Define the ARIA role for the toast
|
||||
* `Default: alert`
|
||||
* https://www.w3.org/WAI/PF/aria/roles
|
||||
*/
|
||||
role?: string;
|
||||
/**
|
||||
* Set id to handle multiple container
|
||||
*/
|
||||
containerId?: Id;
|
||||
/**
|
||||
* @deprecated
|
||||
* ⚠️ Will be removed in the next major release. You can pass a react component with you handler instead.
|
||||
*
|
||||
* Fired when clicking inside toaster
|
||||
*/
|
||||
onClick?: (event: React.MouseEvent) => void;
|
||||
/**
|
||||
* Support right to left display.
|
||||
* `Default: false`
|
||||
*/
|
||||
rtl?: boolean;
|
||||
/**
|
||||
* Used to display a custom icon. Set it to `false` to prevent
|
||||
* the icons from being displayed
|
||||
*/
|
||||
icon?: ToastIcon;
|
||||
/**
|
||||
* Theme to use.
|
||||
* `One of: 'light', 'dark', 'colored'`
|
||||
* `Default: 'light'`
|
||||
*/
|
||||
theme?: Theme;
|
||||
}
|
||||
export interface ToastOptions<Data = {}> extends CommonOptions {
|
||||
/**
|
||||
* An optional css class to set.
|
||||
*/
|
||||
className?: ToastClassName;
|
||||
/**
|
||||
* @deprecated
|
||||
* ⚠️ Will be removed in the next major release. You can rely on `toast.onChange` instead.
|
||||
*
|
||||
* Called when toast is mounted.
|
||||
*/
|
||||
onOpen?: <T = {}>(props: T) => void;
|
||||
/**
|
||||
* @deprecated
|
||||
* ⚠️ Will be removed in the next major release. You can rely on `toast.onChange` instead.
|
||||
*
|
||||
* Called when toast is unmounted.
|
||||
*/
|
||||
onClose?: <T = {}>(props: T) => void;
|
||||
/**
|
||||
* An optional inline style to apply.
|
||||
*/
|
||||
style?: React.CSSProperties;
|
||||
/**
|
||||
* Set the toast type.
|
||||
* `One of: 'info', 'success', 'warning', 'error', 'default'`
|
||||
*/
|
||||
type?: TypeOptions;
|
||||
/**
|
||||
* Set a custom `toastId`
|
||||
*/
|
||||
toastId?: Id;
|
||||
/**
|
||||
* Used during update
|
||||
*/
|
||||
updateId?: Id;
|
||||
/**
|
||||
* Set the percentage for the controlled progress bar. `Value must be between 0 and 1.`
|
||||
*/
|
||||
progress?: number | string;
|
||||
/**
|
||||
* Add a delay in ms before the toast appear.
|
||||
*/
|
||||
delay?: number;
|
||||
isLoading?: boolean;
|
||||
data?: Data;
|
||||
}
|
||||
export interface UpdateOptions<T = unknown> extends Nullable<ToastOptions<T>> {
|
||||
/**
|
||||
* Used to update a toast.
|
||||
* Pass any valid ReactNode(string, number, component)
|
||||
*/
|
||||
render?: ToastContent<T>;
|
||||
}
|
||||
export interface ToastContainerProps extends CommonOptions {
|
||||
/**
|
||||
* An optional css class to set.
|
||||
*/
|
||||
className?: ToastClassName;
|
||||
/**
|
||||
* Whether or not to display the newest toast on top.
|
||||
* `Default: false`
|
||||
*/
|
||||
newestOnTop?: boolean;
|
||||
/**
|
||||
* An optional inline style to apply.
|
||||
*/
|
||||
style?: React.CSSProperties;
|
||||
/**
|
||||
* An optional inline style to apply for the toast.
|
||||
*/
|
||||
toastStyle?: React.CSSProperties;
|
||||
/**
|
||||
* An optional css class for the toast.
|
||||
*/
|
||||
toastClassName?: ToastClassName;
|
||||
/**
|
||||
* Show the toast only if it includes containerId and it's the same as containerId
|
||||
* `Default: false`
|
||||
*/
|
||||
enableMultiContainer?: boolean;
|
||||
/**
|
||||
* Limit the number of toast displayed at the same time
|
||||
*/
|
||||
limit?: number;
|
||||
}
|
||||
export interface ToastTransitionProps {
|
||||
isIn: boolean;
|
||||
done: () => void;
|
||||
position: ToastPosition | string;
|
||||
preventExitTransition: boolean;
|
||||
nodeRef: React.RefObject<HTMLElement>;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
/**
|
||||
* @INTERNAL
|
||||
*/
|
||||
export interface ToastProps extends ToastOptions {
|
||||
isIn: boolean;
|
||||
staleId?: Id;
|
||||
toastId: Id;
|
||||
key: Id;
|
||||
transition: ToastTransition;
|
||||
closeToast: () => void;
|
||||
position: ToastPosition;
|
||||
children?: ToastContent;
|
||||
draggablePercent: number;
|
||||
draggableDirection?: DraggableDirection;
|
||||
progressClassName?: ToastClassName;
|
||||
className?: ToastClassName;
|
||||
bodyClassName?: ToastClassName;
|
||||
deleteToast: () => void;
|
||||
theme: Theme;
|
||||
type: TypeOptions;
|
||||
iconOut?: React.ReactNode;
|
||||
}
|
||||
/**
|
||||
* @INTERNAL
|
||||
*/
|
||||
export interface NotValidatedToastProps extends Partial<ToastProps> {
|
||||
toastId: Id;
|
||||
}
|
||||
/**
|
||||
* @INTERNAL
|
||||
*/
|
||||
export interface Toast {
|
||||
content: ToastContent;
|
||||
props: ToastProps;
|
||||
}
|
||||
export type ToastItemStatus = 'added' | 'removed' | 'updated';
|
||||
export interface ToastItem<Data = {}> {
|
||||
content: ToastContent<Data>;
|
||||
id: Id;
|
||||
theme?: Theme;
|
||||
type?: TypeOptions;
|
||||
isLoading?: boolean;
|
||||
containerId?: Id;
|
||||
data: Data;
|
||||
icon?: ToastIcon;
|
||||
status: ToastItemStatus;
|
||||
}
|
||||
export {};
|
||||
5
node_modules/react-toastify/dist/utils/collapseToast.d.ts
generated
vendored
Normal file
5
node_modules/react-toastify/dist/utils/collapseToast.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Default } from './constant';
|
||||
/**
|
||||
* Used to collapse toast after exit animation
|
||||
*/
|
||||
export declare function collapseToast(node: HTMLElement, done: () => void, duration?: Default): void;
|
||||
36
node_modules/react-toastify/dist/utils/constant.d.ts
generated
vendored
Normal file
36
node_modules/react-toastify/dist/utils/constant.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import { ToastPosition, TypeOptions } from '../types';
|
||||
type KeyOfPosition = 'TOP_LEFT' | 'TOP_RIGHT' | 'TOP_CENTER' | 'BOTTOM_LEFT' | 'BOTTOM_RIGHT' | 'BOTTOM_CENTER';
|
||||
type KeyOfType = 'INFO' | 'SUCCESS' | 'WARNING' | 'ERROR' | 'DEFAULT';
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export declare const POSITION: {
|
||||
[key in KeyOfPosition]: ToastPosition;
|
||||
};
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export declare const TYPE: {
|
||||
[key in KeyOfType]: TypeOptions;
|
||||
};
|
||||
export declare const enum Type {
|
||||
INFO = "info",
|
||||
SUCCESS = "success",
|
||||
WARNING = "warning",
|
||||
ERROR = "error",
|
||||
DEFAULT = "default"
|
||||
}
|
||||
export declare const enum Default {
|
||||
COLLAPSE_DURATION = 300,
|
||||
DEBOUNCE_DURATION = 50,
|
||||
CSS_NAMESPACE = "Toastify",
|
||||
DRAGGABLE_PERCENT = 80
|
||||
}
|
||||
export declare const enum Direction {
|
||||
X = "x",
|
||||
Y = "y"
|
||||
}
|
||||
export declare const enum SyntheticEvent {
|
||||
ENTRANCE_ANIMATION_END = "d"
|
||||
}
|
||||
export {};
|
||||
43
node_modules/react-toastify/dist/utils/cssTransition.d.ts
generated
vendored
Normal file
43
node_modules/react-toastify/dist/utils/cssTransition.d.ts
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
import React from 'react';
|
||||
import { ToastTransitionProps } from '../types';
|
||||
export interface CSSTransitionProps {
|
||||
/**
|
||||
* Css class to apply when toast enter
|
||||
*/
|
||||
enter: string;
|
||||
/**
|
||||
* Css class to apply when toast leave
|
||||
*/
|
||||
exit: string;
|
||||
/**
|
||||
* Append current toast position to the classname.
|
||||
* If multiple classes are provided, only the last one will get the position
|
||||
* For instance `myclass--top-center`...
|
||||
* `Default: false`
|
||||
*/
|
||||
appendPosition?: boolean;
|
||||
/**
|
||||
* Collapse toast smoothly when exit animation end
|
||||
* `Default: true`
|
||||
*/
|
||||
collapse?: boolean;
|
||||
/**
|
||||
* Collapse transition duration
|
||||
* `Default: 300`
|
||||
*/
|
||||
collapseDuration?: number;
|
||||
}
|
||||
/**
|
||||
* Css animation that just work.
|
||||
* You could use animate.css for instance
|
||||
*
|
||||
*
|
||||
* ```
|
||||
* cssTransition({
|
||||
* enter: "animate__animated animate__bounceIn",
|
||||
* exit: "animate__animated animate__bounceOut"
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
export declare function cssTransition({ enter, exit, appendPosition, collapse, collapseDuration }: CSSTransitionProps): ({ children, position, preventExitTransition, done, nodeRef, isIn }: ToastTransitionProps) => React.JSX.Element;
|
||||
5
node_modules/react-toastify/dist/utils/index.d.ts
generated
vendored
Normal file
5
node_modules/react-toastify/dist/utils/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export * from './propValidator';
|
||||
export * from './constant';
|
||||
export * from './cssTransition';
|
||||
export * from './collapseToast';
|
||||
export * from './mapper';
|
||||
2
node_modules/react-toastify/dist/utils/mapper.d.ts
generated
vendored
Normal file
2
node_modules/react-toastify/dist/utils/mapper.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { Toast, ToastItem, ToastItemStatus } from '../types';
|
||||
export declare function toToastItem(toast: Toast, status: ToastItemStatus): ToastItem;
|
||||
6
node_modules/react-toastify/dist/utils/propValidator.d.ts
generated
vendored
Normal file
6
node_modules/react-toastify/dist/utils/propValidator.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare const isNum: (v: any) => v is Number;
|
||||
export declare const isStr: (v: any) => v is String;
|
||||
export declare const isFn: (v: any) => v is Function;
|
||||
export declare const parseClassName: (v: any) => any;
|
||||
export declare const getAutoCloseDelay: (toastAutoClose?: false | number, containerAutoClose?: false | number) => number | false | undefined;
|
||||
export declare const canBeRendered: <T>(content: T) => boolean;
|
||||
169
node_modules/react-toastify/package.json
generated
vendored
Normal file
169
node_modules/react-toastify/package.json
generated
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"version": "9.1.3",
|
||||
"license": "MIT",
|
||||
"typings": "dist/index.d.ts",
|
||||
"description": "React notification made easy",
|
||||
"keywords": [
|
||||
"react",
|
||||
"notification",
|
||||
"toast",
|
||||
"react-component",
|
||||
"react-toastify",
|
||||
"push",
|
||||
"alert"
|
||||
],
|
||||
"files": [
|
||||
"dist",
|
||||
"addons",
|
||||
"scss"
|
||||
],
|
||||
"sideEffects": true,
|
||||
"scripts": {
|
||||
"start": "cd example && npm run start",
|
||||
"test": "jest",
|
||||
"clean": "rimraf dist && rimraf addons",
|
||||
"test:coverage": "yarn test --coverage",
|
||||
"lint": "eslint \"src/**/*.{ts,tsx}\"",
|
||||
"prettier": "prettier --write src",
|
||||
"prettier-scss": "prettier --write scss",
|
||||
"sass": "sass scss/main.scss dist/ReactToastify.css",
|
||||
"sass-minimal": "sass scss/minimal.scss dist/ReactToastify.minimal.css",
|
||||
"postsass": "postcss dist/ReactToastify.css --use autoprefixer -m -o dist/ReactToastify.css",
|
||||
"postsass-minimal": "cssnano dist/ReactToastify.minimal.css dist/ReactToastify.minimal.css --no-zindex --no-reduceIdents",
|
||||
"style": "npm run sass && npm run sass-minimal && cssnano dist/ReactToastify.css dist/ReactToastify.min.css --no-zindex --no-reduceIdents && npm run style-injector",
|
||||
"style-injector": "style2js --out-dir dist dist/ReactToastify.min.css",
|
||||
"build": "npm run clean && npm run build:core && npm run pack-and-extract && npm run build:addons && npm run style && husky install",
|
||||
"build:core": "microbundle --jsx React.createElement --jsxFragment React.Fragment",
|
||||
"build:addons": "node build-addons.mjs",
|
||||
"postbuild": "./prepend-use-client.sh",
|
||||
"setup": "npm run clean && npm run build && npm run pack-and-extract",
|
||||
"pack-and-extract": "yarn pack -f react-toastify.tgz && npm run rm-pkg && npm run extract-pkg",
|
||||
"rm-pkg": "rimraf node_modules/react-toastify && mkdir -p node_modules/react-toastify",
|
||||
"extract-pkg": "tar xzvf react-toastify.tgz -C node_modules/react-toastify --strip-components 1 && rimraf react-toastify.tgz"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=16",
|
||||
"react-dom": ">=16"
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 80,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"arrowParens": "avoid"
|
||||
},
|
||||
"jest": {
|
||||
"verbose": true,
|
||||
"coveragePathIgnorePatterns": [
|
||||
"/dist/*",
|
||||
"/src/index.tsx"
|
||||
],
|
||||
"roots": [
|
||||
"<rootDir>/test"
|
||||
],
|
||||
"transform": {
|
||||
"^.+\\.tsx?$": [
|
||||
"ts-jest",
|
||||
{
|
||||
"isolatedModules": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"setupFilesAfterEnv": [
|
||||
"@testing-library/jest-dom/extend-expect"
|
||||
],
|
||||
"testRegex": "(.+(test|spec))\\.tsx?$",
|
||||
"testEnvironment": "jsdom",
|
||||
"testRunner": "jest-jasmine2",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"tsx",
|
||||
"js",
|
||||
"jsx",
|
||||
"json",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"name": "react-toastify",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/fkhadra/react-toastify.git"
|
||||
},
|
||||
"author": "Fadi Khadra <fdkhadra@gmail.com> (https://fkhadra.github.io)",
|
||||
"bugs": {
|
||||
"url": "https://github.com/fkhadra/react-toastify/issues"
|
||||
},
|
||||
"homepage": "https://github.com/fkhadra/react-toastify#readme",
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@types/jest": "^29.5.1",
|
||||
"@types/react": "^18.2.6",
|
||||
"@types/react-dom": "^18.2.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.59.5",
|
||||
"@typescript-eslint/parser": "^5.59.5",
|
||||
"coveralls": "^3.0.9",
|
||||
"cssnano": "^6.0.1",
|
||||
"cssnano-cli": "^1.0.5",
|
||||
"eslint": "^8.40.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-jsx-a11y": "^6.7.1",
|
||||
"eslint-plugin-react": "^7.32.2",
|
||||
"eslint-plugin-react-hooks": "^4.4.0",
|
||||
"husky": "^8.0.3",
|
||||
"jest": "^29.5.0",
|
||||
"jest-environment-jsdom": "^29.5.0",
|
||||
"jest-jasmine2": "^29.5.0",
|
||||
"microbundle": "^0.15.1",
|
||||
"postcss": "^8.4.23",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"prettier": "2.8.8",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"rimraf": "^5.0.0",
|
||||
"sass": "^1.62.1",
|
||||
"style2js": "^1.0.1",
|
||||
"ts-jest": "^29.1.0",
|
||||
"tslib": "^2.5.0",
|
||||
"typescript": "^5.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"clsx": "^1.1.1"
|
||||
},
|
||||
"main": "dist/react-toastify.js",
|
||||
"module": "dist/react-toastify.esm.mjs",
|
||||
"umd:main": "dist/react-toastify.umd.js",
|
||||
"unpkg": "dist/react-toastify.umd.js",
|
||||
"source": "src/index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"require": "./dist/react-toastify.js",
|
||||
"import": "./dist/react-toastify.esm.mjs",
|
||||
"umd": "./dist/react-toastify.umd.js"
|
||||
},
|
||||
"./dist/ReactToastify.min.css": "./dist/ReactToastify.min.css",
|
||||
"./dist/ReactToastify.css": "./dist/ReactToastify.css",
|
||||
"./dist/ReactToastify.minimal.css": "./dist/ReactToastify.minimal.css",
|
||||
"./ReactToastify.min.css": "./dist/ReactToastify.min.css",
|
||||
"./ReactToastify.css": "./dist/ReactToastify.css",
|
||||
"./ReactToastify.minimal.css": "./dist/ReactToastify.minimal.css",
|
||||
"./dist/inject-style": {
|
||||
"types": "./dist/inject-style.d.ts",
|
||||
"require": "./dist/inject-style.js",
|
||||
"import": "./dist/inject-style.esm.mjs"
|
||||
},
|
||||
"./inject-style": {
|
||||
"types": "./dist/inject-style.d.ts",
|
||||
"require": "./dist/inject-style.js",
|
||||
"import": "./dist/inject-style.esm.mjs"
|
||||
},
|
||||
"./package.json": "./package.json",
|
||||
"./scss/": "./scss/",
|
||||
"./addons/use-notification-center": {
|
||||
"types": "./addons/use-notification-center/index.d.ts",
|
||||
"require": "./addons/use-notification-center/index.js",
|
||||
"import": "./addons/use-notification-center/index.esm.mjs"
|
||||
}
|
||||
}
|
||||
}
|
||||
27
node_modules/react-toastify/scss/_closeButton.scss
generated
vendored
Normal file
27
node_modules/react-toastify/scss/_closeButton.scss
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
.#{$rt-namespace}__close-button {
|
||||
color: #fff;
|
||||
background: transparent;
|
||||
outline: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
opacity: 0.7;
|
||||
transition: 0.3s ease;
|
||||
align-self: flex-start;
|
||||
|
||||
&--light {
|
||||
color: #000;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
& > svg {
|
||||
fill: currentColor;
|
||||
height: 16px;
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
10
node_modules/react-toastify/scss/_icons.scss
generated
vendored
Normal file
10
node_modules/react-toastify/scss/_icons.scss
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
.#{$rt-namespace}__spinner {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid;
|
||||
border-radius: 100%;
|
||||
border-color: var(--toastify-spinner-color-empty-area);
|
||||
border-right-color: var(--toastify-spinner-color);
|
||||
animation: #{$rt-namespace}__spin 0.65s linear infinite;
|
||||
}
|
||||
33
node_modules/react-toastify/scss/_progressBar.scss
generated
vendored
Normal file
33
node_modules/react-toastify/scss/_progressBar.scss
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
@keyframes #{$rt-namespace}__trackProgress {
|
||||
0% {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
100% {
|
||||
transform: scaleX(0);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__progress-bar {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
z-index: var(--toastify-z-index);
|
||||
opacity: 0.7;
|
||||
transform-origin: left;
|
||||
|
||||
&--animated {
|
||||
animation: #{$rt-namespace}__trackProgress linear 1 forwards;
|
||||
}
|
||||
|
||||
&--controlled {
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
&--rtl {
|
||||
right: 0;
|
||||
left: initial;
|
||||
transform-origin: right;
|
||||
}
|
||||
}
|
||||
57
node_modules/react-toastify/scss/_theme.scss
generated
vendored
Normal file
57
node_modules/react-toastify/scss/_theme.scss
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
.#{$rt-namespace}__toast {
|
||||
&-theme--dark {
|
||||
background: var(--toastify-color-dark);
|
||||
color: var(--toastify-text-color-dark);
|
||||
}
|
||||
&-theme--light {
|
||||
background: var(--toastify-color-light);
|
||||
color: var(--toastify-text-color-light);
|
||||
}
|
||||
&-theme--colored#{&}--default {
|
||||
background: var(--toastify-color-light);
|
||||
color: var(--toastify-text-color-light);
|
||||
}
|
||||
&-theme--colored#{&}--info {
|
||||
color: var(--toastify-text-color-info);
|
||||
background: var(--toastify-color-info);
|
||||
}
|
||||
&-theme--colored#{&}--success {
|
||||
color: var(--toastify-text-color-success);
|
||||
background: var(--toastify-color-success);
|
||||
}
|
||||
&-theme--colored#{&}--warning {
|
||||
color: var(--toastify-text-color-warning);
|
||||
background: var(--toastify-color-warning);
|
||||
}
|
||||
&-theme--colored#{&}--error {
|
||||
color: var(--toastify-text-color-error);
|
||||
background: var(--toastify-color-error);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__progress-bar {
|
||||
&-theme--light {
|
||||
background: var(--toastify-color-progress-light);
|
||||
}
|
||||
&-theme--dark {
|
||||
background: var(--toastify-color-progress-dark);
|
||||
}
|
||||
&--info {
|
||||
background: var(--toastify-color-progress-info);
|
||||
}
|
||||
&--success {
|
||||
background: var(--toastify-color-progress-success);
|
||||
}
|
||||
&--warning {
|
||||
background: var(--toastify-color-progress-warning);
|
||||
}
|
||||
&--error {
|
||||
background: var(--toastify-color-progress-error);
|
||||
}
|
||||
&-theme--colored#{&}--info,
|
||||
&-theme--colored#{&}--success,
|
||||
&-theme--colored#{&}--warning,
|
||||
&-theme--colored#{&}--error {
|
||||
background: var(--toastify-color-transparent);
|
||||
}
|
||||
}
|
||||
58
node_modules/react-toastify/scss/_toast.scss
generated
vendored
Normal file
58
node_modules/react-toastify/scss/_toast.scss
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
.#{$rt-namespace}__toast {
|
||||
position: relative;
|
||||
min-height: var(--toastify-toast-min-height);
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 1rem;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 15px 0 rgba(0, 0, 0, 0.05);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
max-height: var(--toastify-toast-max-height);
|
||||
overflow: hidden;
|
||||
font-family: var(--toastify-font-family);
|
||||
cursor: default;
|
||||
direction: ltr;
|
||||
/* webkit only issue #791 */
|
||||
z-index: 0;
|
||||
&--rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
&--close-on-click {
|
||||
cursor: pointer;
|
||||
}
|
||||
&-body {
|
||||
margin: auto 0;
|
||||
flex: 1 1 auto;
|
||||
padding: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
& > div:last-child {
|
||||
word-break: break-word;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
&-icon {
|
||||
margin-inline-end: 10px;
|
||||
width: 20px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}--animate {
|
||||
animation-fill-mode: both;
|
||||
animation-duration: 0.7s;
|
||||
}
|
||||
|
||||
.#{$rt-namespace}--animate-icon {
|
||||
animation-fill-mode: both;
|
||||
animation-duration: 0.3s;
|
||||
}
|
||||
|
||||
@media #{$rt-mobile} {
|
||||
.#{$rt-namespace}__toast {
|
||||
margin-bottom: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
60
node_modules/react-toastify/scss/_toastContainer.scss
generated
vendored
Normal file
60
node_modules/react-toastify/scss/_toastContainer.scss
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
.#{$rt-namespace}__toast-container {
|
||||
z-index: var(--toastify-z-index);
|
||||
-webkit-transform: translate3d(0, 0, var(--toastify-z-index));
|
||||
position: fixed;
|
||||
padding: 4px;
|
||||
width: var(--toastify-toast-width);
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
&--top-left {
|
||||
top: 1em;
|
||||
left: 1em;
|
||||
}
|
||||
&--top-center {
|
||||
top: 1em;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
&--top-right {
|
||||
top: 1em;
|
||||
right: 1em;
|
||||
}
|
||||
&--bottom-left {
|
||||
bottom: 1em;
|
||||
left: 1em;
|
||||
}
|
||||
&--bottom-center {
|
||||
bottom: 1em;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
&--bottom-right {
|
||||
bottom: 1em;
|
||||
right: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
@media #{$rt-mobile} {
|
||||
.#{$rt-namespace}__toast-container {
|
||||
width: 100vw;
|
||||
padding: 0;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
&--top-left,
|
||||
&--top-center,
|
||||
&--top-right {
|
||||
top: 0;
|
||||
transform: translateX(0);
|
||||
}
|
||||
&--bottom-left,
|
||||
&--bottom-center,
|
||||
&--bottom-right {
|
||||
bottom: 0;
|
||||
transform: translateX(0);
|
||||
}
|
||||
&--rtl {
|
||||
right: 0;
|
||||
left: initial;
|
||||
}
|
||||
}
|
||||
}
|
||||
53
node_modules/react-toastify/scss/_variables.scss
generated
vendored
Normal file
53
node_modules/react-toastify/scss/_variables.scss
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
$rt-namespace: 'Toastify';
|
||||
$rt-mobile: 'only screen and (max-width : 480px)' !default;
|
||||
|
||||
:root {
|
||||
--toastify-color-light: #fff;
|
||||
--toastify-color-dark: #121212;
|
||||
--toastify-color-info: #3498db;
|
||||
--toastify-color-success: #07bc0c;
|
||||
--toastify-color-warning: #f1c40f;
|
||||
--toastify-color-error: #e74c3c;
|
||||
--toastify-color-transparent: rgba(255, 255, 255, 0.7);
|
||||
|
||||
--toastify-icon-color-info: var(--toastify-color-info);
|
||||
--toastify-icon-color-success: var(--toastify-color-success);
|
||||
--toastify-icon-color-warning: var(--toastify-color-warning);
|
||||
--toastify-icon-color-error: var(--toastify-color-error);
|
||||
|
||||
--toastify-toast-width: 320px;
|
||||
--toastify-toast-background: #fff;
|
||||
--toastify-toast-min-height: 64px;
|
||||
--toastify-toast-max-height: 800px;
|
||||
--toastify-font-family: sans-serif;
|
||||
--toastify-z-index: 9999;
|
||||
|
||||
--toastify-text-color-light: #757575;
|
||||
--toastify-text-color-dark: #fff;
|
||||
|
||||
//Used only for colored theme
|
||||
--toastify-text-color-info: #fff;
|
||||
--toastify-text-color-success: #fff;
|
||||
--toastify-text-color-warning: #fff;
|
||||
--toastify-text-color-error: #fff;
|
||||
|
||||
--toastify-spinner-color: #616161;
|
||||
--toastify-spinner-color-empty-area: #e0e0e0;
|
||||
|
||||
// Used when no type is provided
|
||||
--toastify-color-progress-light: linear-gradient(
|
||||
to right,
|
||||
#4cd964,
|
||||
#5ac8fa,
|
||||
#007aff,
|
||||
#34aadc,
|
||||
#5856d6,
|
||||
#ff2d55
|
||||
);
|
||||
// Used when no type is provided
|
||||
--toastify-color-progress-dark: #bb86fc;
|
||||
--toastify-color-progress-info: var(--toastify-color-info);
|
||||
--toastify-color-progress-success: var(--toastify-color-success);
|
||||
--toastify-color-progress-warning: var(--toastify-color-warning);
|
||||
--toastify-color-progress-error: var(--toastify-color-error);
|
||||
}
|
||||
197
node_modules/react-toastify/scss/animations/_bounce.scss
generated
vendored
Normal file
197
node_modules/react-toastify/scss/animations/_bounce.scss
generated
vendored
Normal file
@@ -0,0 +1,197 @@
|
||||
@mixin timing-function {
|
||||
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__bounceInRight {
|
||||
from,
|
||||
60%,
|
||||
75%,
|
||||
90%,
|
||||
to {
|
||||
@include timing-function;
|
||||
}
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(3000px, 0, 0);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(-25px, 0, 0);
|
||||
}
|
||||
75% {
|
||||
transform: translate3d(10px, 0, 0);
|
||||
}
|
||||
90% {
|
||||
transform: translate3d(-5px, 0, 0);
|
||||
}
|
||||
to {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__bounceOutRight {
|
||||
20% {
|
||||
opacity: 1;
|
||||
transform: translate3d(-20px, 0, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(2000px, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__bounceInLeft {
|
||||
from,
|
||||
60%,
|
||||
75%,
|
||||
90%,
|
||||
to {
|
||||
@include timing-function;
|
||||
}
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate3d(-3000px, 0, 0);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(25px, 0, 0);
|
||||
}
|
||||
75% {
|
||||
transform: translate3d(-10px, 0, 0);
|
||||
}
|
||||
90% {
|
||||
transform: translate3d(5px, 0, 0);
|
||||
}
|
||||
to {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__bounceOutLeft {
|
||||
20% {
|
||||
opacity: 1;
|
||||
transform: translate3d(20px, 0, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(-2000px, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__bounceInUp {
|
||||
from,
|
||||
60%,
|
||||
75%,
|
||||
90%,
|
||||
to {
|
||||
@include timing-function;
|
||||
}
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, 3000px, 0);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, -20px, 0);
|
||||
}
|
||||
75% {
|
||||
transform: translate3d(0, 10px, 0);
|
||||
}
|
||||
90% {
|
||||
transform: translate3d(0, -5px, 0);
|
||||
}
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__bounceOutUp {
|
||||
20% {
|
||||
transform: translate3d(0, -10px, 0);
|
||||
}
|
||||
40%,
|
||||
45% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 20px, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -2000px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__bounceInDown {
|
||||
from,
|
||||
60%,
|
||||
75%,
|
||||
90%,
|
||||
to {
|
||||
@include timing-function;
|
||||
}
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, -3000px, 0);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, 25px, 0);
|
||||
}
|
||||
75% {
|
||||
transform: translate3d(0, -10px, 0);
|
||||
}
|
||||
90% {
|
||||
transform: translate3d(0, 5px, 0);
|
||||
}
|
||||
to {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__bounceOutDown {
|
||||
20% {
|
||||
transform: translate3d(0, 10px, 0);
|
||||
}
|
||||
40%,
|
||||
45% {
|
||||
opacity: 1;
|
||||
transform: translate3d(0, -20px, 0);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translate3d(0, 2000px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__bounce-enter {
|
||||
&--top-left,
|
||||
&--bottom-left {
|
||||
animation-name: #{$rt-namespace}__bounceInLeft;
|
||||
}
|
||||
&--top-right,
|
||||
&--bottom-right {
|
||||
animation-name: #{$rt-namespace}__bounceInRight;
|
||||
}
|
||||
&--top-center {
|
||||
animation-name: #{$rt-namespace}__bounceInDown;
|
||||
}
|
||||
&--bottom-center {
|
||||
animation-name: #{$rt-namespace}__bounceInUp;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__bounce-exit {
|
||||
&--top-left,
|
||||
&--bottom-left {
|
||||
animation-name: #{$rt-namespace}__bounceOutLeft;
|
||||
}
|
||||
&--top-right,
|
||||
&--bottom-right {
|
||||
animation-name: #{$rt-namespace}__bounceOutRight;
|
||||
}
|
||||
&--top-center {
|
||||
animation-name: #{$rt-namespace}__bounceOutUp;
|
||||
}
|
||||
&--bottom-center {
|
||||
animation-name: #{$rt-namespace}__bounceOutDown;
|
||||
}
|
||||
}
|
||||
43
node_modules/react-toastify/scss/animations/_flip.scss
generated
vendored
Normal file
43
node_modules/react-toastify/scss/animations/_flip.scss
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
@keyframes #{$rt-namespace}__flipIn {
|
||||
from {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
|
||||
animation-timing-function: ease-in;
|
||||
opacity: 0;
|
||||
}
|
||||
40% {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
|
||||
animation-timing-function: ease-in;
|
||||
}
|
||||
60% {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
|
||||
opacity: 1;
|
||||
}
|
||||
80% {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
|
||||
}
|
||||
to {
|
||||
transform: perspective(400px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__flipOut {
|
||||
from {
|
||||
transform: perspective(400px);
|
||||
}
|
||||
30% {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__flip-enter {
|
||||
animation-name: #{$rt-namespace}__flipIn;
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__flip-exit {
|
||||
animation-name: #{$rt-namespace}__flipOut;
|
||||
}
|
||||
117
node_modules/react-toastify/scss/animations/_slide.scss
generated
vendored
Normal file
117
node_modules/react-toastify/scss/animations/_slide.scss
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
@mixin transform {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__slideInRight {
|
||||
from {
|
||||
transform: translate3d(110%, 0, 0);
|
||||
visibility: visible;
|
||||
}
|
||||
to {
|
||||
@include transform;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__slideInLeft {
|
||||
from {
|
||||
transform: translate3d(-110%, 0, 0);
|
||||
visibility: visible;
|
||||
}
|
||||
to {
|
||||
@include transform;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__slideInUp {
|
||||
from {
|
||||
transform: translate3d(0, 110%, 0);
|
||||
visibility: visible;
|
||||
}
|
||||
to {
|
||||
@include transform;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__slideInDown {
|
||||
from {
|
||||
transform: translate3d(0, -110%, 0);
|
||||
visibility: visible;
|
||||
}
|
||||
to {
|
||||
@include transform;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__slideOutRight {
|
||||
from {
|
||||
@include transform;
|
||||
}
|
||||
to {
|
||||
visibility: hidden;
|
||||
transform: translate3d(110%, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__slideOutLeft {
|
||||
from {
|
||||
@include transform;
|
||||
}
|
||||
to {
|
||||
visibility: hidden;
|
||||
transform: translate3d(-110%, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__slideOutDown {
|
||||
from {
|
||||
@include transform;
|
||||
}
|
||||
to {
|
||||
visibility: hidden;
|
||||
transform: translate3d(0, 500px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__slideOutUp {
|
||||
from {
|
||||
@include transform;
|
||||
}
|
||||
to {
|
||||
visibility: hidden;
|
||||
transform: translate3d(0, -500px, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__slide-enter {
|
||||
&--top-left,
|
||||
&--bottom-left {
|
||||
animation-name: #{$rt-namespace}__slideInLeft;
|
||||
}
|
||||
&--top-right,
|
||||
&--bottom-right {
|
||||
animation-name: #{$rt-namespace}__slideInRight;
|
||||
}
|
||||
&--top-center {
|
||||
animation-name: #{$rt-namespace}__slideInDown;
|
||||
}
|
||||
&--bottom-center {
|
||||
animation-name: #{$rt-namespace}__slideInUp;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__slide-exit {
|
||||
&--top-left,
|
||||
&--bottom-left {
|
||||
animation-name: #{$rt-namespace}__slideOutLeft;
|
||||
}
|
||||
&--top-right,
|
||||
&--bottom-right {
|
||||
animation-name: #{$rt-namespace}__slideOutRight;
|
||||
}
|
||||
&--top-center {
|
||||
animation-name: #{$rt-namespace}__slideOutUp;
|
||||
}
|
||||
&--bottom-center {
|
||||
animation-name: #{$rt-namespace}__slideOutDown;
|
||||
}
|
||||
}
|
||||
8
node_modules/react-toastify/scss/animations/_spin.scss
generated
vendored
Normal file
8
node_modules/react-toastify/scss/animations/_spin.scss
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
@keyframes #{$rt-namespace}__spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
30
node_modules/react-toastify/scss/animations/_zoom.scss
generated
vendored
Normal file
30
node_modules/react-toastify/scss/animations/_zoom.scss
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
@keyframes #{$rt-namespace}__zoomIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale3d(0.3, 0.3, 0.3);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes #{$rt-namespace}__zoomOut {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0;
|
||||
transform: scale3d(0.3, 0.3, 0.3);
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__zoom-enter {
|
||||
animation-name: #{$rt-namespace}__zoomIn;
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__zoom-exit {
|
||||
animation-name: #{$rt-namespace}__zoomOut;
|
||||
}
|
||||
16
node_modules/react-toastify/scss/main.scss
generated
vendored
Normal file
16
node_modules/react-toastify/scss/main.scss
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
@import 'variables';
|
||||
@import 'toastContainer';
|
||||
@import 'toast';
|
||||
@import 'theme';
|
||||
@import 'closeButton';
|
||||
@import 'progressBar';
|
||||
@import 'icons';
|
||||
|
||||
// entrance and exit animations
|
||||
@import 'animations/bounce.scss';
|
||||
@import 'animations/zoom.scss';
|
||||
@import 'animations/flip.scss';
|
||||
@import 'animations/slide.scss';
|
||||
@import 'animations/spin.scss';
|
||||
16
node_modules/react-toastify/scss/minimal.scss
generated
vendored
Normal file
16
node_modules/react-toastify/scss/minimal.scss
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
@import 'variables';
|
||||
|
||||
@keyframes #{$rt-namespace}__trackProgress {
|
||||
0% {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
100% {
|
||||
transform: scaleX(0);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$rt-namespace}__progress-bar {
|
||||
animation: #{$rt-namespace}__trackProgress linear 1 forwards;
|
||||
}
|
||||
Reference in New Issue
Block a user