@andoniaina/react-modal 1.0.4 → 1.0.6
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/dist/index.cjs.js +2 -2
- package/dist/index.es.js +49 -46
- package/dist/react-modal.css +1 -1
- package/package.json +2 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const g=require("react");var w={exports:{}},_={};var L;function re(){if(L)return _;L=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function i(c,o,s){var f=null;if(s!==void 0&&(f=""+s),o.key!==void 0&&(f=""+o.key),"key"in o){s={};for(var d in o)d!=="key"&&(s[d]=o[d])}else s=o;return o=s.ref,{$$typeof:l,type:c,key:f,ref:o!==void 0?o:null,props:s}}return _.Fragment=u,_.jsx=i,_.jsxs=i,_}var v={};var M;function te(){return M||(M=1,process.env.NODE_ENV!=="production"&&(function(){function l(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case J:return"Profiler";case q:return"StrictMode";case X:return"Suspense";case H:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case U:return"Portal";case z:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case G:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return r=e.displayName||null,r!==null?r:l(e.type)||"Memo";case h:r=e._payload,e=e._init;try{return l(e(r))}catch{}}return null}function u(e){return""+e}function i(e){try{u(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),u(e)}}function c(e){if(e===O)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===h)return"<...>";try{var r=l(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function o(){var e=A.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function f(e){if(C.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function d(e,r){function t(){Y||(Y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function b(){var e=l(this.type);return $[e]||($[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function R(e,r,t,n,y,S){var a=t.ref;return e={$$typeof:N,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:b}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:y}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function p(e,r,t,n,y,S){var a=r.children;if(a!==void 0)if(n)if(K(a)){for(n=0;n<a.length;n++)m(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(a);if(C.call(r,"key")){a=l(e);var E=Object.keys(r).filter(function(ee){return ee!=="key"});n=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",F[a+n]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,n,a,E,a),
|
|
6
|
+
<%s key={someKey} {...props} />`,n,a,E,a),F[a+n]=!0)}if(a=null,t!==void 0&&(i(t),a=""+t),f(r)&&(i(r.key),a=""+r.key),"key"in r){t={};for(var x in r)x!=="key"&&(t[x]=r[x])}else t=r;return a&&d(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),R(e,a,t,o(),y,S)}function m(e){T(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===h&&(e._payload.status==="fulfilled"?T(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function T(e){return typeof e=="object"&&e!==null&&e.$$typeof===N}var k=g,N=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),z=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),A=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=Object.prototype.hasOwnProperty,K=Array.isArray,P=console.createTask?console.createTask:function(){return null};k={react_stack_bottom_frame:function(e){return e()}};var Y,$={},I=k.react_stack_bottom_frame.bind(k,s)(),D=P(c(s)),F={};v.Fragment=O,v.jsx=function(e,r,t){var n=1e4>A.recentlyCreatedOwnerStacks++;return p(e,r,t,!1,n?Error("react-stack-top-frame"):I,n?P(c(e)):D)},v.jsxs=function(e,r,t){var n=1e4>A.recentlyCreatedOwnerStacks++;return p(e,r,t,!0,n?Error("react-stack-top-frame"):I,n?P(c(e)):D)}})()),v}var W;function ne(){return W||(W=1,process.env.NODE_ENV==="production"?w.exports=re():w.exports=te()),w.exports}var j=ne();function ae({isOpen:l,onClose:u,children:i,closeOnEsc:c=!0,closeOnOverlayClick:o=!0,animationDuration:s=300,onBeforeOpen:f,onAfterOpen:d,onBeforeClose:b,onAfterClose:R}){if(g.useEffect(()=>(l?(f?.(),d?.(),document.body.style.overflow="hidden"):document.body.style.overflow="",()=>{document.body.style.overflow=""}),[l]),g.useEffect(()=>{if(!c)return;const m=T=>{T.key==="Escape"&&(b?.(),u(),R?.())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[c,u]),!l)return null;const p=()=>{o&&(b?.(),u(),R?.())};return j.jsx("div",{className:"modal-overlay show",style:{transitionDuration:`${s}ms`},onClick:p,role:"dialog","aria-modal":"true",children:j.jsxs("div",{className:"modal-content",onClick:m=>m.stopPropagation(),children:[j.jsx("button",{className:"modal-close",onClick:u,children:"×"}),i]})})}module.exports=ae;
|
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import re, { useEffect as
|
|
1
|
+
import re, { useEffect as F } from "react";
|
|
2
2
|
var w = { exports: {} }, _ = {};
|
|
3
|
-
var
|
|
3
|
+
var L;
|
|
4
4
|
function te() {
|
|
5
|
-
if (
|
|
6
|
-
|
|
5
|
+
if (L) return _;
|
|
6
|
+
L = 1;
|
|
7
7
|
var s = /* @__PURE__ */ Symbol.for("react.transitional.element"), u = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
8
|
function i(c, o, l) {
|
|
9
9
|
var f = null;
|
|
@@ -23,9 +23,9 @@ function te() {
|
|
|
23
23
|
return _.Fragment = u, _.jsx = i, _.jsxs = i, _;
|
|
24
24
|
}
|
|
25
25
|
var v = {};
|
|
26
|
-
var
|
|
26
|
+
var M;
|
|
27
27
|
function ne() {
|
|
28
|
-
return
|
|
28
|
+
return M || (M = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
29
|
function s(e) {
|
|
30
30
|
if (e == null) return null;
|
|
31
31
|
if (typeof e == "function")
|
|
@@ -60,7 +60,7 @@ function ne() {
|
|
|
60
60
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
61
61
|
case Z:
|
|
62
62
|
return r = e.displayName || null, r !== null ? r : s(e.type) || "Memo";
|
|
63
|
-
case
|
|
63
|
+
case h:
|
|
64
64
|
r = e._payload, e = e._init;
|
|
65
65
|
try {
|
|
66
66
|
return s(e(r));
|
|
@@ -91,7 +91,7 @@ function ne() {
|
|
|
91
91
|
}
|
|
92
92
|
function c(e) {
|
|
93
93
|
if (e === O) return "<>";
|
|
94
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
94
|
+
if (typeof e == "object" && e !== null && e.$$typeof === h)
|
|
95
95
|
return "<...>";
|
|
96
96
|
try {
|
|
97
97
|
var r = s(e);
|
|
@@ -101,14 +101,14 @@ function ne() {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
function o() {
|
|
104
|
-
var e =
|
|
104
|
+
var e = A.A;
|
|
105
105
|
return e === null ? null : e.getOwner();
|
|
106
106
|
}
|
|
107
107
|
function l() {
|
|
108
108
|
return Error("react-stack-top-frame");
|
|
109
109
|
}
|
|
110
110
|
function f(e) {
|
|
111
|
-
if (
|
|
111
|
+
if (N.call(e, "key")) {
|
|
112
112
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
113
113
|
if (r && r.isReactWarning) return !1;
|
|
114
114
|
}
|
|
@@ -116,7 +116,7 @@ function ne() {
|
|
|
116
116
|
}
|
|
117
117
|
function d(e, r) {
|
|
118
118
|
function t() {
|
|
119
|
-
|
|
119
|
+
C || (C = !0, console.error(
|
|
120
120
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
121
121
|
r
|
|
122
122
|
));
|
|
@@ -126,23 +126,23 @@ function ne() {
|
|
|
126
126
|
configurable: !0
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function b() {
|
|
130
130
|
var e = s(this.type);
|
|
131
|
-
return
|
|
131
|
+
return Y[e] || (Y[e] = !0, console.error(
|
|
132
132
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
133
133
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function R(e, r, t, n, y, S) {
|
|
136
136
|
var a = t.ref;
|
|
137
137
|
return e = {
|
|
138
|
-
$$typeof:
|
|
138
|
+
$$typeof: g,
|
|
139
139
|
type: e,
|
|
140
140
|
key: r,
|
|
141
141
|
props: t,
|
|
142
142
|
_owner: n
|
|
143
143
|
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
144
144
|
enumerable: !1,
|
|
145
|
-
get:
|
|
145
|
+
get: b
|
|
146
146
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
147
147
|
configurable: !1,
|
|
148
148
|
enumerable: !1,
|
|
@@ -162,10 +162,10 @@ function ne() {
|
|
|
162
162
|
configurable: !1,
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
writable: !0,
|
|
165
|
-
value:
|
|
165
|
+
value: S
|
|
166
166
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
167
167
|
}
|
|
168
|
-
function p(e, r, t, n, y,
|
|
168
|
+
function p(e, r, t, n, y, S) {
|
|
169
169
|
var a = r.children;
|
|
170
170
|
if (a !== void 0)
|
|
171
171
|
if (n)
|
|
@@ -178,12 +178,12 @@ function ne() {
|
|
|
178
178
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
179
|
);
|
|
180
180
|
else m(a);
|
|
181
|
-
if (
|
|
181
|
+
if (N.call(r, "key")) {
|
|
182
182
|
a = s(e);
|
|
183
183
|
var E = Object.keys(r).filter(function(ee) {
|
|
184
184
|
return ee !== "key";
|
|
185
185
|
});
|
|
186
|
-
n = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
186
|
+
n = 0 < E.length ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}", D[a + n] || (E = 0 < E.length ? "{" + E.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
187
187
|
`A props object containing a "key" prop is being spread into JSX:
|
|
188
188
|
let props = %s;
|
|
189
189
|
<%s {...props} />
|
|
@@ -194,7 +194,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
194
194
|
a,
|
|
195
195
|
E,
|
|
196
196
|
a
|
|
197
|
-
),
|
|
197
|
+
), D[a + n] = !0);
|
|
198
198
|
}
|
|
199
199
|
if (a = null, t !== void 0 && (i(t), a = "" + t), f(r) && (i(r.key), a = "" + r.key), "key" in r) {
|
|
200
200
|
t = {};
|
|
@@ -204,22 +204,22 @@ React keys must be passed directly to JSX without using spread:
|
|
|
204
204
|
return a && d(
|
|
205
205
|
t,
|
|
206
206
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
207
|
-
),
|
|
207
|
+
), R(
|
|
208
208
|
e,
|
|
209
209
|
a,
|
|
210
210
|
t,
|
|
211
211
|
o(),
|
|
212
212
|
y,
|
|
213
|
-
|
|
213
|
+
S
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
function m(e) {
|
|
217
|
-
T(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof ===
|
|
217
|
+
T(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === h && (e._payload.status === "fulfilled" ? T(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
218
218
|
}
|
|
219
219
|
function T(e) {
|
|
220
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
220
|
+
return typeof e == "object" && e !== null && e.$$typeof === g;
|
|
221
221
|
}
|
|
222
|
-
var k = re,
|
|
222
|
+
var k = re, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), U = /* @__PURE__ */ Symbol.for("react.portal"), O = /* @__PURE__ */ Symbol.for("react.fragment"), q = /* @__PURE__ */ Symbol.for("react.strict_mode"), J = /* @__PURE__ */ Symbol.for("react.profiler"), V = /* @__PURE__ */ Symbol.for("react.consumer"), z = /* @__PURE__ */ Symbol.for("react.context"), G = /* @__PURE__ */ Symbol.for("react.forward_ref"), X = /* @__PURE__ */ Symbol.for("react.suspense"), H = /* @__PURE__ */ Symbol.for("react.suspense_list"), Z = /* @__PURE__ */ Symbol.for("react.memo"), h = /* @__PURE__ */ Symbol.for("react.lazy"), B = /* @__PURE__ */ Symbol.for("react.activity"), Q = /* @__PURE__ */ Symbol.for("react.client.reference"), A = k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, K = Array.isArray, P = console.createTask ? console.createTask : function() {
|
|
223
223
|
return null;
|
|
224
224
|
};
|
|
225
225
|
k = {
|
|
@@ -227,38 +227,38 @@ React keys must be passed directly to JSX without using spread:
|
|
|
227
227
|
return e();
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
|
-
var
|
|
230
|
+
var C, Y = {}, $ = k.react_stack_bottom_frame.bind(
|
|
231
231
|
k,
|
|
232
232
|
l
|
|
233
|
-
)(),
|
|
233
|
+
)(), I = P(c(l)), D = {};
|
|
234
234
|
v.Fragment = O, v.jsx = function(e, r, t) {
|
|
235
|
-
var n = 1e4 >
|
|
235
|
+
var n = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
236
236
|
return p(
|
|
237
237
|
e,
|
|
238
238
|
r,
|
|
239
239
|
t,
|
|
240
240
|
!1,
|
|
241
|
-
n ? Error("react-stack-top-frame") :
|
|
242
|
-
n ?
|
|
241
|
+
n ? Error("react-stack-top-frame") : $,
|
|
242
|
+
n ? P(c(e)) : I
|
|
243
243
|
);
|
|
244
244
|
}, v.jsxs = function(e, r, t) {
|
|
245
|
-
var n = 1e4 >
|
|
245
|
+
var n = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
246
246
|
return p(
|
|
247
247
|
e,
|
|
248
248
|
r,
|
|
249
249
|
t,
|
|
250
250
|
!0,
|
|
251
|
-
n ? Error("react-stack-top-frame") :
|
|
252
|
-
n ?
|
|
251
|
+
n ? Error("react-stack-top-frame") : $,
|
|
252
|
+
n ? P(c(e)) : I
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
255
|
})()), v;
|
|
256
256
|
}
|
|
257
|
-
var
|
|
257
|
+
var W;
|
|
258
258
|
function ae() {
|
|
259
|
-
return
|
|
259
|
+
return W || (W = 1, process.env.NODE_ENV === "production" ? w.exports = te() : w.exports = ne()), w.exports;
|
|
260
260
|
}
|
|
261
|
-
var
|
|
261
|
+
var j = ae();
|
|
262
262
|
function le({
|
|
263
263
|
isOpen: s,
|
|
264
264
|
onClose: u,
|
|
@@ -268,22 +268,22 @@ function le({
|
|
|
268
268
|
animationDuration: l = 300,
|
|
269
269
|
onBeforeOpen: f,
|
|
270
270
|
onAfterOpen: d,
|
|
271
|
-
onBeforeClose:
|
|
272
|
-
onAfterClose:
|
|
271
|
+
onBeforeClose: b,
|
|
272
|
+
onAfterClose: R
|
|
273
273
|
}) {
|
|
274
|
-
if (
|
|
274
|
+
if (F(() => (s ? (f?.(), d?.(), document.body.style.overflow = "hidden") : document.body.style.overflow = "", () => {
|
|
275
275
|
document.body.style.overflow = "";
|
|
276
|
-
}), [s]),
|
|
276
|
+
}), [s]), F(() => {
|
|
277
277
|
if (!c) return;
|
|
278
278
|
const m = (T) => {
|
|
279
|
-
T.key === "Escape" && (
|
|
279
|
+
T.key === "Escape" && (b?.(), u(), R?.());
|
|
280
280
|
};
|
|
281
281
|
return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
|
|
282
282
|
}, [c, u]), !s) return null;
|
|
283
283
|
const p = () => {
|
|
284
|
-
o && (
|
|
284
|
+
o && (b?.(), u(), R?.());
|
|
285
285
|
};
|
|
286
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ j.jsx(
|
|
287
287
|
"div",
|
|
288
288
|
{
|
|
289
289
|
className: "modal-overlay show",
|
|
@@ -291,12 +291,15 @@ function le({
|
|
|
291
291
|
onClick: p,
|
|
292
292
|
role: "dialog",
|
|
293
293
|
"aria-modal": "true",
|
|
294
|
-
children: /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ j.jsxs(
|
|
295
295
|
"div",
|
|
296
296
|
{
|
|
297
297
|
className: "modal-content",
|
|
298
298
|
onClick: (m) => m.stopPropagation(),
|
|
299
|
-
children:
|
|
299
|
+
children: [
|
|
300
|
+
/* @__PURE__ */ j.jsx("button", { className: "modal-close", onClick: u, children: "×" }),
|
|
301
|
+
i
|
|
302
|
+
]
|
|
300
303
|
}
|
|
301
304
|
)
|
|
302
305
|
}
|
package/dist/react-modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.modal-overlay{position:fixed;
|
|
1
|
+
.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:1000;transition:opacity .3s ease}.modal-content{background-color:#fff;padding:2rem 2.5rem;border-radius:12px;box-shadow:0 4px 16px #00000040;max-width:400px;width:90%;text-align:center;position:relative;animation:fadeIn .3s ease-in-out}.modal-close{position:absolute;top:10px;right:10px;border:none;background:transparent;font-size:1.5rem;font-weight:700;cursor:pointer;line-height:1;color:#333}.modal-close:hover{color:#000}.modal-success h2{color:green;margin-bottom:.5rem;font-size:1.5rem}.modal-success p{margin-top:.5rem;font-size:1rem}.modal-error h2{color:red;margin-bottom:.5rem;font-size:1.5rem}.modal-error p{margin-top:.5rem;font-size:1rem}@keyframes fadeIn{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}.modal-content button{margin-top:1.5rem;padding:.5rem 1.2rem;border:none;border-radius:6px;background-color:#007bff;color:#fff;cursor:pointer;font-size:1rem}.modal-content button:hover{background-color:#0056b3}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andoniaina/react-modal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Reusable, accessible and customizable React modal component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
|
+
"style": "dist/react-modal.css",
|
|
12
13
|
"exports": {
|
|
13
14
|
".": {
|
|
14
15
|
"types": "./dist/index.d.ts",
|