popupz
Advanced tools
Comparing version 1.3.6 to 2.0.0
{ | ||
"name": "popupz", | ||
"version": "1.3.6", | ||
"type": "module", | ||
"description": "A simple and customizable popup notification library for React and Next.js applications.", | ||
"main": "dist/index.js", | ||
"module": "dist/index.js", | ||
"version": "2.0.0", | ||
"description": "A simple and customizable popup notification/modal library for React applications.", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "npx rollup -c", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"build": "vite build", | ||
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0" | ||
}, | ||
@@ -15,25 +13,28 @@ "keywords": [ | ||
"popup", | ||
"modal", | ||
"popupz", | ||
"library" | ||
"notification", | ||
"modal" | ||
], | ||
"author": "Vikas Ipar", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@babel/core": "^7.24.0", | ||
"@babel/preset-react": "^7.23.3", | ||
"@rollup/plugin-babel": "^6.0.4", | ||
"@rollup/plugin-commonjs": "^25.0.7", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/vikasipar/react-popupz.git" | ||
}, | ||
"homepage": "https://github.com/vikasipar/react-popupz", | ||
"dependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"rollup": "^4.12.0", | ||
"rollup-plugin-postcss": "^4.0.2" | ||
"react-icons": "^5.0.1" | ||
}, | ||
"dependencies": { | ||
"devDependencies": { | ||
"@types/react": "^18.2.56", | ||
"@types/react-dom": "^18.2.19", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"autoprefixer": "^10.4.17", | ||
"eslint": "^8.56.0", | ||
"eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-react-refresh": "^0.4.5", | ||
"postcss": "^8.4.35", | ||
"postcss-preset-env": "^9.4.0", | ||
"react-icons": "^5.0.1", | ||
"tailwindcss": "^3.4.1" | ||
"tailwindcss": "^3.4.1", | ||
"vite": "^5.1.4" | ||
} | ||
} |
@@ -1,11 +0,11 @@ | ||
## Popupz 🍿 | ||
### 🍿 React-Popupz | ||
Popupz is a simple and customizable popup notification library for React applications. It provides an easy way to display success, error, warning, info, or default messages to users with customizable themes and message content. | ||
React-Popupz is a simple and customizable popup notification library for React applications. It provides an easy way to display success, error, warning, info, or default messages to users with customizable themes and message content. | ||
#### Installation | ||
To install Popupz, you can use npm: | ||
To install React-Popupz, you can use npm: | ||
```bash | ||
npm install popupz | ||
npm install react-popupz | ||
``` | ||
@@ -17,16 +17,16 @@ | ||
Wrap your App.jsx component with the `PopzProvider` to enable the pop-up notifications. Your `main.jsx` should be structured as follows: | ||
Wrap your application component with the `PopzProvider` to enable the popup notifications. Your `main.jsx` should be structured as follows: | ||
```jsx | ||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
import App from './App.jsx' | ||
import './index.css' | ||
import { PopzProvider } from 'popupz'; | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import App from './App.jsx'; | ||
import { PopzProvider } from 'react-popupz'; | ||
import './index.css'; | ||
ReactDOM.createRoot(document.getElementById('root')).render( | ||
<React.StrictMode> | ||
<PopzProvider> | ||
<App /> | ||
</PopzProvider> | ||
<PopzProvider> | ||
<App /> | ||
<PopzProvider /> | ||
</React.StrictMode>, | ||
@@ -39,14 +39,4 @@ ) | ||
To display popup notifications, first import the **usePopz** hook in your component. | ||
To display popup notifications, use the `popz` function provided by the `usePopz` hook. The function accepts four parameters: `theme`, `type`, `message`, and `progressBar`. | ||
```jsx | ||
import { usePopz } from 'popupz/dist'; | ||
``` | ||
Now use the `popz` function provided by the `usePopz` hook. The function accepts four parameters: `theme`, `type`, `message`, and `progressBar`. | ||
```jsx | ||
//syntax- popz(theme, type, message, progress-bar); | ||
``` | ||
- `theme`: Specify the theme of the popup. It can be either `'dark'` or `'light'`. | ||
@@ -61,5 +51,5 @@ - `type`: Specify the type of message. Available options are `'success'`, `'error'`, `'warning'`, `'info'`, or `'default'`. | ||
import React from 'react'; | ||
import { usePopz } from 'popupz/dist'; | ||
import { usePopz } from 'react-popupz'; | ||
const MyComponent = () => { | ||
const App = () => { | ||
const { popz } = usePopz(); | ||
@@ -69,2 +59,3 @@ | ||
// your logic | ||
//syntax- popz(theme, type, message, progress-bar); | ||
popz('dark', 'success', 'Logged in Successfully!', 'true'); | ||
@@ -74,5 +65,8 @@ }; | ||
return ( | ||
<div> | ||
<h1>My Component</h1> | ||
<button onClick={handleSubmit} > | ||
<div className='App'> | ||
<h1>My Test App</h1> | ||
<button | ||
className='p-2 bg-blue-700 text-white font-semibold rounded-lg my-5' | ||
onClick={handleSubmit} | ||
> | ||
Submit | ||
@@ -84,6 +78,5 @@ </button> | ||
export default MyComponent; | ||
export default App; | ||
``` | ||
In this example, clicking the submit button triggers the display of a success popup notification with a dark theme, displaying the message "Logged in Successfully!" and including a progress bar. | ||
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
3
15
0
0
12362
11
2
229
2
77
1
No
+ Addedreact@^18.2.0
+ Addedreact-dom@^18.2.0
+ Addedreact-dom@18.3.1(transitive)
+ Addedscheduler@0.23.2(transitive)
- Removedpostcss@^8.4.35
- Removedpostcss-preset-env@^9.4.0
- Removedtailwindcss@^3.4.1
- Removed@alloc/quick-lru@5.2.0(transitive)
- Removed@csstools/cascade-layer-name-parser@1.0.11(transitive)
- Removed@csstools/color-helpers@4.2.0(transitive)
- Removed@csstools/css-calc@1.2.2(transitive)
- Removed@csstools/css-color-parser@2.0.2(transitive)
- Removed@csstools/css-parser-algorithms@2.6.3(transitive)
- Removed@csstools/css-tokenizer@2.3.1(transitive)
- Removed@csstools/media-query-list-parser@2.1.11(transitive)
- Removed@csstools/postcss-cascade-layers@4.0.6(transitive)
- Removed@csstools/postcss-color-function@3.0.16(transitive)
- Removed@csstools/postcss-color-mix-function@2.0.16(transitive)
- Removed@csstools/postcss-exponential-functions@1.0.7(transitive)
- Removed@csstools/postcss-font-format-keywords@3.0.2(transitive)
- Removed@csstools/postcss-gamut-mapping@1.0.9(transitive)
- Removed@csstools/postcss-gradients-interpolation-method@4.0.17(transitive)
- Removed@csstools/postcss-hwb-function@3.0.15(transitive)
- Removed@csstools/postcss-ic-unit@3.0.6(transitive)
- Removed@csstools/postcss-initial@1.0.1(transitive)
- Removed@csstools/postcss-is-pseudo-class@4.0.8(transitive)
- Removed@csstools/postcss-light-dark-function@1.0.5(transitive)
- Removed@csstools/postcss-logical-float-and-clear@2.0.1(transitive)
- Removed@csstools/postcss-logical-overflow@1.0.1(transitive)
- Removed@csstools/postcss-logical-overscroll-behavior@1.0.1(transitive)
- Removed@csstools/postcss-logical-resize@2.0.1(transitive)
- Removed@csstools/postcss-logical-viewport-units@2.0.9(transitive)
- Removed@csstools/postcss-media-minmax@1.1.6(transitive)
- Removed@csstools/postcss-media-queries-aspect-ratio-number-values@2.0.9(transitive)
- Removed@csstools/postcss-nested-calc@3.0.2(transitive)
- Removed@csstools/postcss-normalize-display-values@3.0.2(transitive)
- Removed@csstools/postcss-oklab-function@3.0.16(transitive)
- Removed@csstools/postcss-progressive-custom-properties@3.2.0(transitive)
- Removed@csstools/postcss-relative-color-syntax@2.0.16(transitive)
- Removed@csstools/postcss-scope-pseudo-class@3.0.1(transitive)
- Removed@csstools/postcss-stepped-value-functions@3.0.8(transitive)
- Removed@csstools/postcss-text-decoration-shorthand@3.0.6(transitive)
- Removed@csstools/postcss-trigonometric-functions@3.0.8(transitive)
- Removed@csstools/postcss-unset-value@3.0.1(transitive)
- Removed@csstools/selector-resolve-nested@1.1.0(transitive)
- Removed@csstools/selector-specificity@3.1.1(transitive)
- Removed@csstools/utilities@1.0.0(transitive)
- Removed@isaacs/cliui@8.0.2(transitive)
- Removed@jridgewell/gen-mapping@0.3.5(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.4.15(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removed@nodelib/fs.scandir@2.1.5(transitive)
- Removed@nodelib/fs.stat@2.0.5(transitive)
- Removed@nodelib/fs.walk@1.2.8(transitive)
- Removed@pkgjs/parseargs@0.11.0(transitive)
- Removedansi-regex@5.0.16.0.1(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedany-promise@1.3.0(transitive)
- Removedanymatch@3.1.3(transitive)
- Removedarg@5.0.2(transitive)
- Removedautoprefixer@10.4.19(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbinary-extensions@2.3.0(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedbraces@3.0.3(transitive)
- Removedbrowserslist@4.23.1(transitive)
- Removedcamelcase-css@2.0.1(transitive)
- Removedcaniuse-lite@1.0.30001638(transitive)
- Removedchokidar@3.6.0(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcommander@4.1.1(transitive)
- Removedcross-spawn@7.0.3(transitive)
- Removedcss-blank-pseudo@6.0.2(transitive)
- Removedcss-has-pseudo@6.0.5(transitive)
- Removedcss-prefers-color-scheme@9.0.1(transitive)
- Removedcssdb@8.0.2(transitive)
- Removedcssesc@3.0.0(transitive)
- Removeddidyoumean@1.2.2(transitive)
- Removeddlv@1.1.3(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedelectron-to-chromium@1.4.814(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedescalade@3.1.2(transitive)
- Removedfast-glob@3.3.2(transitive)
- Removedfastq@1.17.1(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedforeground-child@3.2.1(transitive)
- Removedfraction.js@4.3.7(transitive)
- Removedfsevents@2.3.3(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedglob@10.4.2(transitive)
- Removedglob-parent@5.1.26.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-binary-path@2.1.0(transitive)
- Removedis-core-module@2.14.0(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjackspeak@3.4.0(transitive)
- Removedjiti@1.21.6(transitive)
- Removedlilconfig@2.1.03.1.2(transitive)
- Removedlines-and-columns@1.2.4(transitive)
- Removedlru-cache@10.3.0(transitive)
- Removedmerge2@1.4.1(transitive)
- Removedmicromatch@4.0.7(transitive)
- Removedminimatch@9.0.5(transitive)
- Removedminipass@7.1.2(transitive)
- Removedmz@2.7.0(transitive)
- Removednanoid@3.3.7(transitive)
- Removednode-releases@2.0.14(transitive)
- Removednormalize-path@3.0.0(transitive)
- Removednormalize-range@0.1.2(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedobject-hash@3.0.0(transitive)
- Removedpackage-json-from-dist@1.0.0(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-scurry@1.11.1(transitive)
- Removedpicocolors@1.0.1(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedpify@2.3.0(transitive)
- Removedpirates@4.0.6(transitive)
- Removedpostcss@8.4.38(transitive)
- Removedpostcss-attribute-case-insensitive@6.0.3(transitive)
- Removedpostcss-clamp@4.1.0(transitive)
- Removedpostcss-color-functional-notation@6.0.11(transitive)
- Removedpostcss-color-hex-alpha@9.0.4(transitive)
- Removedpostcss-color-rebeccapurple@9.0.3(transitive)
- Removedpostcss-custom-media@10.0.6(transitive)
- Removedpostcss-custom-properties@13.3.10(transitive)
- Removedpostcss-custom-selectors@7.1.10(transitive)
- Removedpostcss-dir-pseudo-class@8.0.1(transitive)
- Removedpostcss-double-position-gradients@5.0.6(transitive)
- Removedpostcss-focus-visible@9.0.1(transitive)
- Removedpostcss-focus-within@8.0.1(transitive)
- Removedpostcss-font-variant@5.0.0(transitive)
- Removedpostcss-gap-properties@5.0.1(transitive)
- Removedpostcss-image-set-function@6.0.3(transitive)
- Removedpostcss-import@15.1.0(transitive)
- Removedpostcss-js@4.0.1(transitive)
- Removedpostcss-lab-function@6.0.16(transitive)
- Removedpostcss-load-config@4.0.2(transitive)
- Removedpostcss-logical@7.0.1(transitive)
- Removedpostcss-nested@6.0.1(transitive)
- Removedpostcss-nesting@12.1.5(transitive)
- Removedpostcss-opacity-percentage@2.0.0(transitive)
- Removedpostcss-overflow-shorthand@5.0.1(transitive)
- Removedpostcss-page-break@3.0.4(transitive)
- Removedpostcss-place@9.0.1(transitive)
- Removedpostcss-preset-env@9.5.14(transitive)
- Removedpostcss-pseudo-class-any-link@9.0.2(transitive)
- Removedpostcss-replace-overflow-wrap@4.0.0(transitive)
- Removedpostcss-selector-not@7.0.2(transitive)
- Removedpostcss-selector-parser@6.1.0(transitive)
- Removedpostcss-value-parser@4.2.0(transitive)
- Removedqueue-microtask@1.2.3(transitive)
- Removedread-cache@1.0.0(transitive)
- Removedreaddirp@3.6.0(transitive)
- Removedresolve@1.22.8(transitive)
- Removedreusify@1.0.4(transitive)
- Removedrun-parallel@1.2.0(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedsource-map-js@1.2.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedsucrase@3.35.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedtailwindcss@3.4.4(transitive)
- Removedthenify@3.3.1(transitive)
- Removedthenify-all@1.6.0(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedts-interface-checker@0.1.13(transitive)
- Removedupdate-browserslist-db@1.0.16(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)
- Removedyaml@2.4.5(transitive)