hrnet-modal-kechit 1.0.0 → 1.0.2
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/package.json +6 -3
- package/src/modal.css +95 -0
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hrnet-modal-kechit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"main": "index.js",
|
|
5
|
+
"files": [
|
|
6
|
+
"src"
|
|
7
|
+
],
|
|
5
8
|
"scripts": {
|
|
6
9
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
10
|
},
|
|
@@ -9,7 +12,7 @@
|
|
|
9
12
|
"author": "",
|
|
10
13
|
"license": "ISC",
|
|
11
14
|
"description": "",
|
|
12
|
-
|
|
13
|
-
"react": "^18.0.0"
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
14
17
|
}
|
|
15
18
|
}
|
package/src/modal.css
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* -------------------------- Overlay -------------------------- */
|
|
2
|
+
.overlay {
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
background-color: rgba(0, 0, 0, 0.6); /* fond sombre semi-transparent */
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
z-index: 1000;
|
|
13
|
+
|
|
14
|
+
/* animation fade-in */
|
|
15
|
+
opacity: 0;
|
|
16
|
+
animation: fadeIn 0.3s forwards;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* -------------------------- Modale -------------------------- */
|
|
20
|
+
.modal {
|
|
21
|
+
background-color: #fff;
|
|
22
|
+
padding: 30px 40px;
|
|
23
|
+
border-radius: 12px;
|
|
24
|
+
min-width: 320px;
|
|
25
|
+
max-width: 500px;
|
|
26
|
+
width: 90%;
|
|
27
|
+
position: relative;
|
|
28
|
+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
|
|
29
|
+
|
|
30
|
+
/* animation scale-in */
|
|
31
|
+
transform: scale(0.9);
|
|
32
|
+
animation: scaleIn 0.3s forwards;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* -------------------------- Bouton de fermeture -------------------------- */
|
|
36
|
+
.closeBtn {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 12px;
|
|
39
|
+
right: 12px;
|
|
40
|
+
border: none;
|
|
41
|
+
background: transparent;
|
|
42
|
+
font-size: 20px;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
color: #333;
|
|
45
|
+
transition: color 0.2s;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.closeBtn:hover {
|
|
49
|
+
color: #ff4d4f;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.delete_button-modal{
|
|
53
|
+
background-color: "#f44336";
|
|
54
|
+
color: "white";
|
|
55
|
+
border: "none";
|
|
56
|
+
padding: "4px 8px";
|
|
57
|
+
border-radius: "4px";
|
|
58
|
+
cursor: "pointer";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* -------------------------- Contenu -------------------------- */
|
|
62
|
+
.modal h2 {
|
|
63
|
+
margin-top: 0;
|
|
64
|
+
font-size: 1.5rem;
|
|
65
|
+
color: #222;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.modal p {
|
|
69
|
+
margin: 10px 0 0;
|
|
70
|
+
font-size: 1.5rem;
|
|
71
|
+
color: black;
|
|
72
|
+
line-height: 1.5;
|
|
73
|
+
font-weight: bold;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* -------------------------- Animations -------------------------- */
|
|
77
|
+
@keyframes fadeIn {
|
|
78
|
+
to {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes scaleIn {
|
|
84
|
+
to {
|
|
85
|
+
transform: scale(1);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* -------------------------- Responsive -------------------------- */
|
|
90
|
+
@media (max-width: 400px) {
|
|
91
|
+
.modal {
|
|
92
|
+
padding: 20px;
|
|
93
|
+
min-width: 90%;
|
|
94
|
+
}
|
|
95
|
+
}
|