theshtify 1.0.4 → 2.0.0
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/.claude/settings.local.json +8 -0
- package/LICENSE +21 -21
- package/css/theshtify.css +50 -40
- package/dist/assets/index-CGwBVT47.css +1 -0
- package/dist/index.html +65 -0
- package/dist/theshtify.cdn.js +674 -0
- package/dist/theshtify.min.js +2 -0
- package/index.html +65 -54
- package/lib/documentation.js +31 -31
- package/lib/theshtify.js +937 -730
- package/lib/theshtifyCDN.js +3 -730
- package/package.json +33 -27
- package/readme.md +221 -331
- package/tests/theshtify.test.js +228 -0
- package/vitest.config.js +7 -0
- package/lib/notif.js +0 -347
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 thesharsol
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 thesharsol
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/css/theshtify.css
CHANGED
|
@@ -1,41 +1,51 @@
|
|
|
1
|
-
.notif {
|
|
2
|
-
width: 30%;
|
|
3
|
-
position: absolute;
|
|
4
|
-
padding: 10px 20px;
|
|
5
|
-
background-color: white;
|
|
6
|
-
font-family: "nunito";
|
|
7
|
-
border-radius: 5px;
|
|
8
|
-
box-shadow: 0px 0px 10px silver;
|
|
9
|
-
opacity: 0;
|
|
10
|
-
color: white;
|
|
11
|
-
z-index: 2000;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.notif.warning {
|
|
15
|
-
background-color: #f89406;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.notif.danger {
|
|
19
|
-
background-color: red;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.notif.info {
|
|
23
|
-
background-color: rgba(7, 133, 250, 0.822);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.notif.success {
|
|
27
|
-
background-color: rgba(1, 191, 102, 0.822);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.close-icon:after {
|
|
31
|
-
display: inline-block;
|
|
32
|
-
content: "\00d7";
|
|
33
|
-
/* This will render the 'X' */
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.Thesharsol-notifyer {
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
padding: 2px;
|
|
40
|
-
transition: top linear 0.2s;
|
|
1
|
+
.notif {
|
|
2
|
+
width: 30%;
|
|
3
|
+
position: absolute;
|
|
4
|
+
padding: 10px 20px;
|
|
5
|
+
background-color: white;
|
|
6
|
+
font-family: "nunito";
|
|
7
|
+
border-radius: 5px;
|
|
8
|
+
box-shadow: 0px 0px 10px silver;
|
|
9
|
+
opacity: 0;
|
|
10
|
+
color: white;
|
|
11
|
+
z-index: 2000;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.notif.warning {
|
|
15
|
+
background-color: #f89406;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.notif.danger {
|
|
19
|
+
background-color: red;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.notif.info {
|
|
23
|
+
background-color: rgba(7, 133, 250, 0.822);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.notif.success {
|
|
27
|
+
background-color: rgba(1, 191, 102, 0.822);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.close-icon:after {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
content: "\00d7";
|
|
33
|
+
/* This will render the 'X' */
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.Thesharsol-notifyer {
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
padding: 2px;
|
|
40
|
+
transition: top linear 0.2s, opacity 0.15s ease-in;
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.Thesharsol-notifyer.fade-out {
|
|
45
|
+
opacity: 0 !important;
|
|
46
|
+
transition: opacity 0.3s ease-out;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.Thesharsol-notifyer .progress .content {
|
|
50
|
+
transition: width linear;
|
|
41
51
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.notif{width:30%;position:absolute;padding:10px 20px;background-color:#fff;font-family:nunito;border-radius:5px;box-shadow:0 0 10px silver;opacity:0;color:#fff;z-index:2000}.notif.warning{background-color:#f89406}.notif.danger{background-color:red}.notif.info{background-color:#0785fad2}.notif.success{background-color:#01bf66d2}.close-icon:after{display:inline-block;content:"×"}.Thesharsol-notifyer{overflow:hidden;padding:2px;transition:top linear .2s,opacity .15s ease-in;opacity:0}.Thesharsol-notifyer.fade-out{opacity:0!important;transition:opacity .3s ease-out}.Thesharsol-notifyer .progress .content{transition:width linear}
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>theshtify</title>
|
|
7
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CGwBVT47.css">
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
<button id="notif_button" onclick="notify()">theshtify</button>
|
|
12
|
+
</body>
|
|
13
|
+
<script src="./lib/theshtifyCDN.js"></script>
|
|
14
|
+
<script>
|
|
15
|
+
function notify() {
|
|
16
|
+
let config = {
|
|
17
|
+
main_box_classes:'thesh',
|
|
18
|
+
x_align: "right",
|
|
19
|
+
y_align: "top",
|
|
20
|
+
duration: 5000,
|
|
21
|
+
font: {
|
|
22
|
+
size: 15,
|
|
23
|
+
weight: 100,
|
|
24
|
+
family: "sans-serif,arial",
|
|
25
|
+
},
|
|
26
|
+
padding:16,
|
|
27
|
+
custom_colors: {
|
|
28
|
+
success: {
|
|
29
|
+
bg: "#fff",
|
|
30
|
+
color: "#000",
|
|
31
|
+
border: {
|
|
32
|
+
type: "solid",
|
|
33
|
+
color: "#efefef",
|
|
34
|
+
},
|
|
35
|
+
progress: {
|
|
36
|
+
bg: "#E0BC29",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
/** you can also add other types configs */
|
|
40
|
+
},
|
|
41
|
+
radius: 10,
|
|
42
|
+
bordered: false,
|
|
43
|
+
border_width: 1,
|
|
44
|
+
closer: false,
|
|
45
|
+
// progress: true,
|
|
46
|
+
progress_height: 2,
|
|
47
|
+
};
|
|
48
|
+
theshtify({
|
|
49
|
+
title:"Welcome Ivan",
|
|
50
|
+
message: "welcome to theshtify",
|
|
51
|
+
type: "success",
|
|
52
|
+
config: config,
|
|
53
|
+
callback: () => {
|
|
54
|
+
console.log("awesome callback");
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
<style>
|
|
60
|
+
.thesh{
|
|
61
|
+
|
|
62
|
+
box-shadow: 0px 0px 10px #efefef;
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
65
|
+
</html>
|