layerpro 0.10.12 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -92
- package/index.js +1 -1
- package/package.json +12 -26
- package/docs/index.md +0 -286
package/README.md
CHANGED
|
@@ -2,15 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
```
|
|
6
|
-
LayerPro by Dario Passariello
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
[](#)
|
|
10
|
-
|
|
11
|
-
[](https://socket.dev/npm/package/layerpro/overview/latest)
|
|
12
|
-
[](https://snyk.io/advisor/npm-package/layerpro)
|
|
13
|
-
|
|
14
5
|
[](https://npmjs.org/package/layerpro)
|
|
15
6
|
[](https://npmjs.org/package/layerpro)
|
|
16
7
|
|
|
@@ -18,7 +9,7 @@ LayerPro by Dario Passariello
|
|
|
18
9
|
|
|
19
10
|
## About
|
|
20
11
|
|
|
21
|
-
LayerPro offers a completely new way to customize web
|
|
12
|
+
LayerPro offers a completely new way to customize web modals in your application. With LayerPro, you can create custom alerts, prompts, confirmations, and messages, effectively replacing the default browser modals.
|
|
22
13
|
|
|
23
14
|
Please make sure to read the [LICENSE](/LICENSE.md) agreement before implementing it in your application.
|
|
24
15
|
|
|
@@ -32,25 +23,25 @@ You can view an HTML version demonstrating how dpHelper and LayerPro work togeth
|
|
|
32
23
|
|
|
33
24
|
## Install for react + webpack projects
|
|
34
25
|
|
|
35
|
-
```
|
|
26
|
+
```js
|
|
36
27
|
npm i layerpro --save-dev
|
|
37
28
|
```
|
|
38
29
|
|
|
39
30
|
or update:
|
|
40
31
|
|
|
41
|
-
```
|
|
32
|
+
```js
|
|
42
33
|
npm i layerpro@latest --save-dev
|
|
43
34
|
```
|
|
44
35
|
|
|
45
36
|
in the index (and only there):
|
|
46
37
|
|
|
47
|
-
```
|
|
38
|
+
```js
|
|
48
39
|
import "layerpro";
|
|
49
40
|
```
|
|
50
41
|
|
|
51
42
|
or
|
|
52
43
|
|
|
53
|
-
```
|
|
44
|
+
```js
|
|
54
45
|
require("layerpro");
|
|
55
46
|
```
|
|
56
47
|
|
|
@@ -68,7 +59,7 @@ For example, if you type **alert("hello, world!")**, you can see the result.
|
|
|
68
59
|
|
|
69
60
|
You can also use these tools as messages directly from the console.
|
|
70
61
|
|
|
71
|
-
```
|
|
62
|
+
```js
|
|
72
63
|
alert("Hello world"); // Normal alert
|
|
73
64
|
|
|
74
65
|
prompt("Your Name"); // Ask for input
|
|
@@ -85,62 +76,9 @@ message(
|
|
|
85
76
|
);
|
|
86
77
|
```
|
|
87
78
|
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
Popup:
|
|
91
|
-
|
|
92
|
-
```javascript
|
|
93
|
-
import 'layerpro';
|
|
94
|
-
|
|
95
|
-
layerpro.popup.open(
|
|
96
|
-
{
|
|
97
|
-
id: String,
|
|
98
|
-
body: String | React Component | Module, // text or component
|
|
99
|
-
name: String,
|
|
100
|
-
icon: "⚠", // or from html symbols table
|
|
101
|
-
|
|
102
|
-
buttons: {
|
|
103
|
-
confirm: {
|
|
104
|
-
text: "accept", // customizable
|
|
105
|
-
cb: yourFunctionCallBack() // call your script
|
|
106
|
-
},
|
|
107
|
-
cancel: {
|
|
108
|
-
text: "cancel", // customizable
|
|
109
|
-
cb: yourFunctionCallBack() // optional
|
|
110
|
-
}, // optional
|
|
111
|
-
|
|
112
|
-
top: Number | String,
|
|
113
|
-
left: Number | String,
|
|
114
|
-
right: Number | String,
|
|
115
|
-
bottom: Number | String,
|
|
116
|
-
|
|
117
|
-
width: Number | String,
|
|
118
|
-
height: Number | String,
|
|
119
|
-
minWidth: Number | String,
|
|
120
|
-
minHeight: Number | String,
|
|
121
|
-
maxWidth: Number | String,
|
|
122
|
-
maxHeight: Number | String,
|
|
123
|
-
|
|
124
|
-
fadeIn: Number, // Milliseconds
|
|
125
|
-
fadeOut: Number, // Milliseconds
|
|
126
|
-
timer: Number // Milliseconds
|
|
127
|
-
|
|
128
|
-
iconize: Boolean,
|
|
129
|
-
maximize: Boolean,
|
|
130
|
-
close: Boolean,
|
|
131
|
-
isMaximize: Boolean,
|
|
132
|
-
dockable: Boolean,
|
|
133
|
-
raised: Boolean,
|
|
134
|
-
movable: Boolean,
|
|
135
|
-
resizable: Boolean,
|
|
136
|
-
store: Boolean,
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
```
|
|
140
|
-
|
|
141
79
|
Example:
|
|
142
80
|
|
|
143
|
-
```
|
|
81
|
+
```js
|
|
144
82
|
import 'layerpro'
|
|
145
83
|
|
|
146
84
|
// EXAMPLE WITH ALL OPTIONS
|
|
@@ -148,7 +86,7 @@ function App() {
|
|
|
148
86
|
|
|
149
87
|
layerpro.popup.open(
|
|
150
88
|
{
|
|
151
|
-
id: '
|
|
89
|
+
id: 'exampleModal',
|
|
152
90
|
body: 'Example',
|
|
153
91
|
name: 'example',
|
|
154
92
|
icon: '⚠',
|
|
@@ -176,7 +114,7 @@ function App() {
|
|
|
176
114
|
|
|
177
115
|
fadeIn: 500,
|
|
178
116
|
fadeOut: 500,
|
|
179
|
-
timer: 0
|
|
117
|
+
timer: 0,
|
|
180
118
|
|
|
181
119
|
iconize: true,
|
|
182
120
|
maximize: true,
|
|
@@ -186,7 +124,7 @@ function App() {
|
|
|
186
124
|
raised: true,
|
|
187
125
|
movable: true,
|
|
188
126
|
resizable: false,
|
|
189
|
-
store: false
|
|
127
|
+
store: false
|
|
190
128
|
}
|
|
191
129
|
)
|
|
192
130
|
}
|
|
@@ -197,7 +135,7 @@ export default App
|
|
|
197
135
|
|
|
198
136
|
Example with a React component:
|
|
199
137
|
|
|
200
|
-
```
|
|
138
|
+
```js
|
|
201
139
|
|
|
202
140
|
// Example using React Component
|
|
203
141
|
|
|
@@ -221,7 +159,7 @@ export default () => {
|
|
|
221
159
|
// Run into layerpro
|
|
222
160
|
layerpro.popup.open(
|
|
223
161
|
{
|
|
224
|
-
id: '
|
|
162
|
+
id: 'exampleModal',
|
|
225
163
|
body: TestApp(),
|
|
226
164
|
buttons: {
|
|
227
165
|
confirm: {
|
|
@@ -265,22 +203,4 @@ export default () => {
|
|
|
265
203
|
}
|
|
266
204
|
```
|
|
267
205
|
|
|
268
|
-
Here are some of the main advantages of using LayerPro:
|
|
269
|
-
|
|
270
|
-
**Complete Customization**: LayerPro allows you to create highly customized web pop-ups, surpassing the limitations of standard browser pop-ups. You can configure every aspect of the pop-up, including size, position, icons, and much more.
|
|
271
|
-
|
|
272
|
-
**Improved User Interface**: With LayerPro, you can create alerts, prompts, confirmations, and personalized messages that seamlessly integrate with your application's design, enhancing the user experience.
|
|
273
|
-
|
|
274
|
-
**Compatibility with Various Frameworks**: LayerPro is compatible with HTML, React, Vue, and other frontend frameworks and libraries, making it extremely versatile and easy to integrate into any project.
|
|
275
|
-
|
|
276
|
-
**Ease of Use**: Once LayerPro is imported into your project, you can access all its features globally without needing additional imports. This simplifies the development process and reduces boilerplate code.
|
|
277
|
-
|
|
278
|
-
**Advanced Features**: LayerPro offers advanced options such as the ability to maximize, resize, move, and dock pop-ups. You can also configure fade-in and fade-out effects for a smoother experience.
|
|
279
|
-
|
|
280
|
-
**Override Browser Pop-ups**: LayerPro allows you to replace browser pop-ups with customized versions, eliminating the unattractive look of default pop-ups and providing complete control over the appearance and behavior of your messages.
|
|
281
|
-
|
|
282
|
-
**Component Support**: You can use components or modules as the body of your pop-ups, allowing you to create complex and interactive user interfaces within the pop-ups themselves.
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
206
|
copyright (c) 2019 - 2025 by Dario Passariello
|