@wethegit/react-gallery
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -16,3 +16,3 @@ import cr, { createContext as jr, useState as Ce, useRef as Ir, useCallback as ye, useEffect as $r, useContext as Dr } from "react"; | ||
Ze = 1; | ||
var r = Object.getOwnPropertySymbols, E = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable; | ||
var r = Object.getOwnPropertySymbols, E = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable; | ||
function s(v) { | ||
@@ -48,8 +48,8 @@ if (v == null) | ||
l = Object(arguments[d]); | ||
for (var y in l) | ||
E.call(l, y) && (u[y] = l[y]); | ||
for (var g in l) | ||
E.call(l, g) && (u[g] = l[g]); | ||
if (r) { | ||
f = r(l); | ||
for (var _ = 0; _ < f.length; _++) | ||
g.call(l, f[_]) && (u[f[_]] = l[f[_]]); | ||
y.call(l, f[_]) && (u[f[_]] = l[f[_]]); | ||
} | ||
@@ -75,15 +75,15 @@ } | ||
if (pe.Fragment = 60107, typeof Symbol == "function" && Symbol.for) { | ||
var g = Symbol.for; | ||
E = g("react.element"), pe.Fragment = g("react.fragment"); | ||
var y = Symbol.for; | ||
E = y("react.element"), pe.Fragment = y("react.fragment"); | ||
} | ||
var s = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = Object.prototype.hasOwnProperty, v = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function p(l, u, f) { | ||
var d, y = {}, _ = null, M = null; | ||
var d, g = {}, _ = null, M = null; | ||
f !== void 0 && (_ = "" + f), u.key !== void 0 && (_ = "" + u.key), u.ref !== void 0 && (M = u.ref); | ||
for (d in u) | ||
b.call(u, d) && !v.hasOwnProperty(d) && (y[d] = u[d]); | ||
b.call(u, d) && !v.hasOwnProperty(d) && (g[d] = u[d]); | ||
if (l && l.defaultProps) | ||
for (d in u = l.defaultProps, u) | ||
y[d] === void 0 && (y[d] = u[d]); | ||
return { $$typeof: E, type: l, key: _, ref: M, props: y, _owner: s.current }; | ||
g[d] === void 0 && (g[d] = u[d]); | ||
return { $$typeof: E, type: l, key: _, ref: M, props: g, _owner: s.current }; | ||
} | ||
@@ -105,8 +105,8 @@ return pe.jsx = p, pe.jsxs = p, pe; | ||
process.env.NODE_ENV !== "production" && function() { | ||
var E = cr, g = We(), s = 60103, b = 60106; | ||
var E = cr, y = We(), s = 60103, b = 60106; | ||
r.Fragment = 60107; | ||
var v = 60108, p = 60114, l = 60109, u = 60110, f = 60112, d = 60113, y = 60120, _ = 60115, M = 60116, k = 60121, C = 60122, U = 60117, F = 60129, Z = 60131; | ||
var v = 60108, p = 60114, l = 60109, u = 60110, f = 60112, d = 60113, g = 60120, _ = 60115, M = 60116, k = 60121, C = 60122, U = 60117, F = 60129, Z = 60131; | ||
if (typeof Symbol == "function" && Symbol.for) { | ||
var R = Symbol.for; | ||
s = R("react.element"), b = R("react.portal"), r.Fragment = R("react.fragment"), v = R("react.strict_mode"), p = R("react.profiler"), l = R("react.provider"), u = R("react.context"), f = R("react.forward_ref"), d = R("react.suspense"), y = R("react.suspense_list"), _ = R("react.memo"), M = R("react.lazy"), k = R("react.block"), C = R("react.server.block"), U = R("react.fundamental"), R("react.scope"), R("react.opaque.id"), F = R("react.debug_trace_mode"), R("react.offscreen"), Z = R("react.legacy_hidden"); | ||
s = R("react.element"), b = R("react.portal"), r.Fragment = R("react.fragment"), v = R("react.strict_mode"), p = R("react.profiler"), l = R("react.provider"), u = R("react.context"), f = R("react.forward_ref"), d = R("react.suspense"), g = R("react.suspense_list"), _ = R("react.memo"), M = R("react.lazy"), k = R("react.block"), C = R("react.server.block"), U = R("react.fundamental"), R("react.scope"), R("react.opaque.id"), F = R("react.debug_trace_mode"), R("react.offscreen"), Z = R("react.legacy_hidden"); | ||
} | ||
@@ -140,3 +140,3 @@ var j = typeof Symbol == "function" && Symbol.iterator, a = "@@iterator"; | ||
function ue(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === r.Fragment || e === p || e === F || e === v || e === d || e === y || e === Z || be || typeof e == "object" && e !== null && (e.$$typeof === M || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === u || e.$$typeof === f || e.$$typeof === U || e.$$typeof === k || e[0] === C)); | ||
return !!(typeof e == "string" || typeof e == "function" || e === r.Fragment || e === p || e === F || e === v || e === d || e === g || e === Z || be || typeof e == "object" && e !== null && (e.$$typeof === M || e.$$typeof === _ || e.$$typeof === l || e.$$typeof === u || e.$$typeof === f || e.$$typeof === U || e.$$typeof === k || e[0] === C)); | ||
} | ||
@@ -168,3 +168,3 @@ function Ee(e, t, o) { | ||
return "Suspense"; | ||
case y: | ||
case g: | ||
return "SuspenseList"; | ||
@@ -233,21 +233,21 @@ } | ||
Object.defineProperties(console, { | ||
log: g({}, e, { | ||
log: y({}, e, { | ||
value: K | ||
}), | ||
info: g({}, e, { | ||
info: y({}, e, { | ||
value: re | ||
}), | ||
warn: g({}, e, { | ||
warn: y({}, e, { | ||
value: oe | ||
}), | ||
error: g({}, e, { | ||
error: y({}, e, { | ||
value: fe | ||
}), | ||
group: g({}, e, { | ||
group: y({}, e, { | ||
value: n | ||
}), | ||
groupCollapsed: g({}, e, { | ||
groupCollapsed: y({}, e, { | ||
value: c | ||
}), | ||
groupEnd: g({}, e, { | ||
groupEnd: y({}, e, { | ||
value: x | ||
@@ -367,3 +367,3 @@ }) | ||
return S("Suspense"); | ||
case y: | ||
case g: | ||
return S("SuspenseList"); | ||
@@ -688,3 +688,3 @@ } | ||
rr = 1; | ||
var r = typeof Symbol == "function" && Symbol.for, E = r ? Symbol.for("react.element") : 60103, g = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, b = r ? Symbol.for("react.strict_mode") : 60108, v = r ? Symbol.for("react.profiler") : 60114, p = r ? Symbol.for("react.provider") : 60109, l = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, f = r ? Symbol.for("react.concurrent_mode") : 60111, d = r ? Symbol.for("react.forward_ref") : 60112, y = r ? Symbol.for("react.suspense") : 60113, _ = r ? Symbol.for("react.suspense_list") : 60120, M = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, C = r ? Symbol.for("react.block") : 60121, U = r ? Symbol.for("react.fundamental") : 60117, F = r ? Symbol.for("react.responder") : 60118, Z = r ? Symbol.for("react.scope") : 60119; | ||
var r = typeof Symbol == "function" && Symbol.for, E = r ? Symbol.for("react.element") : 60103, y = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, b = r ? Symbol.for("react.strict_mode") : 60108, v = r ? Symbol.for("react.profiler") : 60114, p = r ? Symbol.for("react.provider") : 60109, l = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, f = r ? Symbol.for("react.concurrent_mode") : 60111, d = r ? Symbol.for("react.forward_ref") : 60112, g = r ? Symbol.for("react.suspense") : 60113, _ = r ? Symbol.for("react.suspense_list") : 60120, M = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, C = r ? Symbol.for("react.block") : 60121, U = r ? Symbol.for("react.fundamental") : 60117, F = r ? Symbol.for("react.responder") : 60118, Z = r ? Symbol.for("react.scope") : 60119; | ||
function R(a) { | ||
@@ -701,3 +701,3 @@ if (typeof a == "object" && a !== null) { | ||
case b: | ||
case y: | ||
case g: | ||
return a; | ||
@@ -716,3 +716,3 @@ default: | ||
} | ||
case g: | ||
case y: | ||
return Q; | ||
@@ -725,3 +725,3 @@ } | ||
} | ||
return Y.AsyncMode = u, Y.ConcurrentMode = f, Y.ContextConsumer = l, Y.ContextProvider = p, Y.Element = E, Y.ForwardRef = d, Y.Fragment = s, Y.Lazy = k, Y.Memo = M, Y.Portal = g, Y.Profiler = v, Y.StrictMode = b, Y.Suspense = y, Y.isAsyncMode = function(a) { | ||
return Y.AsyncMode = u, Y.ConcurrentMode = f, Y.ContextConsumer = l, Y.ContextProvider = p, Y.Element = E, Y.ForwardRef = d, Y.Fragment = s, Y.Lazy = k, Y.Memo = M, Y.Portal = y, Y.Profiler = v, Y.StrictMode = b, Y.Suspense = g, Y.isAsyncMode = function(a) { | ||
return j(a) || R(a) === u; | ||
@@ -743,3 +743,3 @@ }, Y.isConcurrentMode = j, Y.isContextConsumer = function(a) { | ||
}, Y.isPortal = function(a) { | ||
return R(a) === g; | ||
return R(a) === y; | ||
}, Y.isProfiler = function(a) { | ||
@@ -750,5 +750,5 @@ return R(a) === v; | ||
}, Y.isSuspense = function(a) { | ||
return R(a) === y; | ||
return R(a) === g; | ||
}, Y.isValidElementType = function(a) { | ||
return typeof a == "string" || typeof a == "function" || a === s || a === f || a === v || a === b || a === y || a === _ || typeof a == "object" && a !== null && (a.$$typeof === k || a.$$typeof === M || a.$$typeof === p || a.$$typeof === l || a.$$typeof === d || a.$$typeof === U || a.$$typeof === F || a.$$typeof === Z || a.$$typeof === C); | ||
return typeof a == "string" || typeof a == "function" || a === s || a === f || a === v || a === b || a === g || a === _ || typeof a == "object" && a !== null && (a.$$typeof === k || a.$$typeof === M || a.$$typeof === p || a.$$typeof === l || a.$$typeof === d || a.$$typeof === U || a.$$typeof === F || a.$$typeof === Z || a.$$typeof === C); | ||
}, Y.typeOf = R, Y; | ||
@@ -768,6 +768,6 @@ } | ||
return tr || (tr = 1, process.env.NODE_ENV !== "production" && function() { | ||
var r = typeof Symbol == "function" && Symbol.for, E = r ? Symbol.for("react.element") : 60103, g = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, b = r ? Symbol.for("react.strict_mode") : 60108, v = r ? Symbol.for("react.profiler") : 60114, p = r ? Symbol.for("react.provider") : 60109, l = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, f = r ? Symbol.for("react.concurrent_mode") : 60111, d = r ? Symbol.for("react.forward_ref") : 60112, y = r ? Symbol.for("react.suspense") : 60113, _ = r ? Symbol.for("react.suspense_list") : 60120, M = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, C = r ? Symbol.for("react.block") : 60121, U = r ? Symbol.for("react.fundamental") : 60117, F = r ? Symbol.for("react.responder") : 60118, Z = r ? Symbol.for("react.scope") : 60119; | ||
var r = typeof Symbol == "function" && Symbol.for, E = r ? Symbol.for("react.element") : 60103, y = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, b = r ? Symbol.for("react.strict_mode") : 60108, v = r ? Symbol.for("react.profiler") : 60114, p = r ? Symbol.for("react.provider") : 60109, l = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, f = r ? Symbol.for("react.concurrent_mode") : 60111, d = r ? Symbol.for("react.forward_ref") : 60112, g = r ? Symbol.for("react.suspense") : 60113, _ = r ? Symbol.for("react.suspense_list") : 60120, M = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, C = r ? Symbol.for("react.block") : 60121, U = r ? Symbol.for("react.fundamental") : 60117, F = r ? Symbol.for("react.responder") : 60118, Z = r ? Symbol.for("react.scope") : 60119; | ||
function R(i) { | ||
return typeof i == "string" || typeof i == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | ||
i === s || i === f || i === v || i === b || i === y || i === _ || typeof i == "object" && i !== null && (i.$$typeof === k || i.$$typeof === M || i.$$typeof === p || i.$$typeof === l || i.$$typeof === d || i.$$typeof === U || i.$$typeof === F || i.$$typeof === Z || i.$$typeof === C); | ||
i === s || i === f || i === v || i === b || i === g || i === _ || typeof i == "object" && i !== null && (i.$$typeof === k || i.$$typeof === M || i.$$typeof === p || i.$$typeof === l || i.$$typeof === d || i.$$typeof === U || i.$$typeof === F || i.$$typeof === Z || i.$$typeof === C); | ||
} | ||
@@ -786,3 +786,3 @@ function j(i) { | ||
case b: | ||
case y: | ||
case g: | ||
return le; | ||
@@ -802,3 +802,3 @@ default: | ||
} | ||
case g: | ||
case y: | ||
return X; | ||
@@ -808,3 +808,3 @@ } | ||
} | ||
var a = u, Q = f, ee = l, B = p, he = E, be = d, ue = s, Ee = k, ce = M, z = g, te = v, K = b, re = y, oe = !1; | ||
var a = u, Q = f, ee = l, B = p, he = E, be = d, ue = s, Ee = k, ce = M, z = y, te = v, K = b, re = g, oe = !1; | ||
function fe(i) { | ||
@@ -838,3 +838,3 @@ return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), n(i) || j(i) === u; | ||
function S(i) { | ||
return j(i) === g; | ||
return j(i) === y; | ||
} | ||
@@ -848,3 +848,3 @@ function $(i) { | ||
function J(i) { | ||
return j(i) === y; | ||
return j(i) === g; | ||
} | ||
@@ -878,3 +878,3 @@ q.AsyncMode = a, q.ConcurrentMode = Q, q.ContextConsumer = ee, q.ContextProvider = B, q.Element = he, q.ForwardRef = be, q.Fragment = ue, q.Lazy = Ee, q.Memo = ce, q.Portal = z, q.Profiler = te, q.StrictMode = K, q.Suspense = re, q.isAsyncMode = fe, q.isConcurrentMode = n, q.isContextConsumer = c, q.isContextProvider = x, q.isElement = O, q.isForwardRef = m, q.isFragment = I, q.isLazy = T, q.isMemo = P, q.isPortal = S, q.isProfiler = $, q.isStrictMode = w, q.isSuspense = J, q.isValidElementType = R, q.typeOf = j; | ||
if (process.env.NODE_ENV !== "production") { | ||
var E = Le(), g = {}, s = lr(); | ||
var E = Le(), y = {}, s = lr(); | ||
r = function(v) { | ||
@@ -893,3 +893,3 @@ var p = "Warning: " + v; | ||
if (s(v, d)) { | ||
var y; | ||
var g; | ||
try { | ||
@@ -902,13 +902,13 @@ if (typeof v[d] != "function") { | ||
} | ||
y = v[d](p, d, u, l, null, E); | ||
g = v[d](p, d, u, l, null, E); | ||
} catch (k) { | ||
y = k; | ||
g = k; | ||
} | ||
if (y && !(y instanceof Error) && r( | ||
(u || "React class") + ": type specification of " + l + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof y + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." | ||
), y instanceof Error && !(y.message in g)) { | ||
g[y.message] = !0; | ||
if (g && !(g instanceof Error) && r( | ||
(u || "React class") + ": type specification of " + l + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof g + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." | ||
), g instanceof Error && !(g.message in y)) { | ||
y[g.message] = !0; | ||
var M = f ? f() : ""; | ||
r( | ||
"Failed " + l + " type: " + y.message + (M ?? "") | ||
"Failed " + l + " type: " + g.message + (M ?? "") | ||
); | ||
@@ -920,3 +920,3 @@ } | ||
return b.resetWarningCache = function() { | ||
process.env.NODE_ENV !== "production" && (g = {}); | ||
process.env.NODE_ENV !== "production" && (y = {}); | ||
}, De = b, De; | ||
@@ -929,3 +929,3 @@ } | ||
sr = 1; | ||
var r = fr(), E = We(), g = Le(), s = lr(), b = Lr(), v = function() { | ||
var r = fr(), E = We(), y = Le(), s = lr(), b = Lr(), v = function() { | ||
}; | ||
@@ -945,3 +945,3 @@ process.env.NODE_ENV !== "production" && (v = function(l) { | ||
var f = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator"; | ||
function y(n) { | ||
function g(n) { | ||
var c = n && (f && n[f] || n[d]); | ||
@@ -983,3 +983,3 @@ if (typeof c == "function") | ||
function O(I, T, P, S, $, w, J) { | ||
if (S = S || _, w = w || P, J !== g) { | ||
if (S = S || _, w = w || P, J !== y) { | ||
if (u) { | ||
@@ -1030,3 +1030,3 @@ var i = new Error( | ||
for (var $ = 0; $ < P.length; $++) { | ||
var w = n(P, $, m, I, T + "[" + $ + "]", g); | ||
var w = n(P, $, m, I, T + "[" + $ + "]", y); | ||
if (w instanceof Error) | ||
@@ -1097,3 +1097,3 @@ return w; | ||
if (s(P, $)) { | ||
var w = n(P, $, m, I, T + "." + $, g); | ||
var w = n(P, $, m, I, T + "." + $, y); | ||
if (w instanceof Error) | ||
@@ -1118,3 +1118,3 @@ return w; | ||
for (var $ = [], w = 0; w < n.length; w++) { | ||
var J = n[w], i = J(m, I, T, P, S, g); | ||
var J = n[w], i = J(m, I, T, P, S, y); | ||
if (i == null) | ||
@@ -1149,3 +1149,3 @@ return null; | ||
return ue(m, I, T, $, re(w)); | ||
var J = w(P, $, m, I, T + "." + $, g); | ||
var J = w(P, $, m, I, T + "." + $, y); | ||
if (J) | ||
@@ -1173,3 +1173,3 @@ return J; | ||
); | ||
var i = J(P, w, m, I, T + "." + w, g); | ||
var i = J(P, w, m, I, T + "." + w, y); | ||
if (i) | ||
@@ -1195,3 +1195,3 @@ return i; | ||
return !0; | ||
var c = y(n); | ||
var c = g(n); | ||
if (c) { | ||
@@ -1263,7 +1263,7 @@ var x = c.call(n), O; | ||
} | ||
function g() { | ||
function y() { | ||
} | ||
return g.resetWarningCache = E, Me = function() { | ||
function s(p, l, u, f, d, y) { | ||
if (y !== r) { | ||
return y.resetWarningCache = E, Me = function() { | ||
function s(p, l, u, f, d, g) { | ||
if (g !== r) { | ||
var _ = new Error( | ||
@@ -1299,3 +1299,3 @@ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" | ||
exact: b, | ||
checkPropTypes: g, | ||
checkPropTypes: y, | ||
resetWarningCache: E | ||
@@ -1316,4 +1316,4 @@ }; | ||
let E = []; | ||
return r.forEach((g) => { | ||
typeof g == "string" && E.push(g); | ||
return r.forEach((y) => { | ||
typeof y == "string" && E.push(y); | ||
}), E.join(" "); | ||
@@ -1330,3 +1330,3 @@ }; | ||
loop: E, | ||
draggable: g, | ||
draggable: y, | ||
onChange: s, | ||
@@ -1339,3 +1339,3 @@ startIndex: b, | ||
}) => { | ||
const [f, d] = Ce(() => b || 0), [y, _] = Ce( | ||
const [f, d] = Ce(() => b || 0), [g, _] = Ce( | ||
() => b || 0 | ||
@@ -1373,3 +1373,3 @@ ), [M, k] = Ce(() => Br), C = Ir([]); | ||
setActiveIndex: d, | ||
previouslyActiveIndex: y, | ||
previouslyActiveIndex: g, | ||
setPreviouslyActiveIndex: _, | ||
@@ -1380,3 +1380,3 @@ goToIndex: Z, | ||
loop: E, | ||
draggable: g, | ||
draggable: y, | ||
touchState: M, | ||
@@ -1391,3 +1391,3 @@ setTouchState: k, | ||
{ | ||
className: ge(["gallery", l]), | ||
className: ge(["gallery", y && "gallery--draggable", l]), | ||
style: { "--touch-offset": M.xOffset }, | ||
@@ -1424,3 +1424,3 @@ children: [ | ||
return r; | ||
}, Jr = ({ renderGalleryItem: r, className: E, ...g }) => { | ||
}, Jr = ({ renderGalleryItem: r, className: E, ...y }) => { | ||
const { | ||
@@ -1435,3 +1435,3 @@ activeIndex: s, | ||
swipeThreshold: d | ||
} = me(), y = ye(() => { | ||
} = me(), g = ye(() => { | ||
l && f((k) => ({ ...k, isDragging: !0 })); | ||
@@ -1481,7 +1481,7 @@ }, [l, f]), _ = ye( | ||
className: ge(["gallery__main", E]), | ||
onPointerDown: l ? y : null, | ||
onPointerDown: l ? g : null, | ||
onPointerMove: l ? _ : null, | ||
onPointerUp: l ? M : null, | ||
style: { "--selected": s, "--total": b.length }, | ||
...g, | ||
...y, | ||
children: b.map((k, C) => r({ item: k, index: C, activeIndex: s, active: s === C })) | ||
@@ -1495,5 +1495,5 @@ } | ||
}; | ||
const Hr = ({ renderPaginationItem: r, className: E, ...g }) => { | ||
const Hr = ({ renderPaginationItem: r, className: E, ...y }) => { | ||
const { activeIndex: s, galleryItems: b } = me(); | ||
return /* @__PURE__ */ ie.jsx("ul", { className: ge(["gallery__pagination", E]), ...g, children: b.map((v, p) => r({ index: p, active: s === p, activeIndex: s, item: v })) }); | ||
return /* @__PURE__ */ ie.jsx("ul", { className: ge(["gallery__pagination", E]), ...y, children: b.map((v, p) => r({ index: p, active: s === p, activeIndex: s, item: v })) }); | ||
}; | ||
@@ -1507,3 +1507,3 @@ Hr.propTypes = { | ||
active: E, | ||
className: g, | ||
className: y, | ||
buttonClassName: s, | ||
@@ -1515,6 +1515,6 @@ buttonProps: b, | ||
}) => { | ||
const { goToIndex: u, itemNodes: f } = me(), d = (y) => (_) => { | ||
u(y), f.current[y].focus({ preventScroll: !0 }), p == null || p({ event: _, index: r }); | ||
const { goToIndex: u, itemNodes: f } = me(), d = (g) => (_) => { | ||
u(g), f.current[g].focus({ preventScroll: !0 }), p == null || p({ event: _, index: r }); | ||
}; | ||
return /* @__PURE__ */ ie.jsx("li", { className: ge(["gallery__pagination-item", g]), ...l, children: /* @__PURE__ */ ie.jsx( | ||
return /* @__PURE__ */ ie.jsx("li", { className: ge(["gallery__pagination-item", y]), ...l, children: /* @__PURE__ */ ie.jsx( | ||
"button", | ||
@@ -1542,3 +1542,3 @@ { | ||
renderNavItem: E, | ||
className: g, | ||
className: y, | ||
children: s, | ||
@@ -1549,5 +1549,5 @@ ...b | ||
r ? v() : p(); | ||
}, y = r && u === f.length - 1 || !r && u === 0, _ = { | ||
disabled: y ? !0 : null, | ||
"aria-disabled": y ? "true" : null | ||
}, g = r && u === f.length - 1 || !r && u === 0, _ = { | ||
disabled: g ? !0 : null, | ||
"aria-disabled": g ? "true" : null | ||
}; | ||
@@ -1558,3 +1558,3 @@ return !s && !E ? null : /* @__PURE__ */ ie.jsx( | ||
className: ge([ | ||
g, | ||
y, | ||
"gallery__nav", | ||
@@ -1566,3 +1566,3 @@ `gallery__nav--${r ? "next" : "previous"}` | ||
...b, | ||
children: s || E({ activeIndex: u, disabled: !l && y }) | ||
children: s || E({ activeIndex: u, disabled: !l && g }) | ||
} | ||
@@ -1577,3 +1577,3 @@ ); | ||
}; | ||
const Zr = ({ index: r, active: E, className: g, children: s, ...b }) => { | ||
const Zr = ({ index: r, active: E, className: y, children: s, ...b }) => { | ||
const { | ||
@@ -1586,3 +1586,3 @@ itemNodes: v, | ||
visibleRange: d | ||
} = me(), y = { | ||
} = me(), g = { | ||
"aria-hidden": E ? null : "true", | ||
@@ -1595,3 +1595,3 @@ tabIndex: E ? 0 : -1 | ||
ref: (_) => v.current[r] = _, | ||
...y, | ||
...g, | ||
...b, | ||
@@ -1607,3 +1607,3 @@ className: ge([ | ||
(d === -1 || Math.abs(r - p) <= d) && "gallery__item--visible", | ||
g | ||
y | ||
]), | ||
@@ -1610,0 +1610,0 @@ style: { |
{ | ||
"name": "@wethegit/react-gallery", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A customizable, accessible gallery component for React projects.", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
125456