@hudoro/accordion
Advanced tools
Comparing version 0.0.1-beta.6 to 0.0.1-beta.7
@@ -5,3 +5,3 @@ import React from "react"; | ||
export declare const AccordionItem: ({ children }: IAccordionItem) => React.JSX.Element; | ||
export declare const AccordionButton: ({ children }: IAccordionButton) => React.JSX.Element; | ||
export declare const AccordionButton: ({ children, expand, }: IAccordionButton) => React.JSX.Element; | ||
export declare const AccordionPanel: ({ children }: IAccordionPanel) => React.JSX.Element; |
@@ -17,14 +17,14 @@ import Sr, { createContext as ce, useRef as le, useContext as de } from "react"; | ||
xr = 1; | ||
var b = Sr, v = Symbol.for("react.element"), u = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, d = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
var b = Sr, v = Symbol.for("react.element"), c = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, s = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function C(R, f, w) { | ||
var h, y = {}, _ = null, O = null; | ||
var h, m = {}, _ = null, O = null; | ||
w !== void 0 && (_ = "" + w), f.key !== void 0 && (_ = "" + f.key), f.ref !== void 0 && (O = f.ref); | ||
for (h in f) | ||
m.call(f, h) && !S.hasOwnProperty(h) && (y[h] = f[h]); | ||
E.call(f, h) && !S.hasOwnProperty(h) && (m[h] = f[h]); | ||
if (R && R.defaultProps) | ||
for (h in f = R.defaultProps, f) | ||
y[h] === void 0 && (y[h] = f[h]); | ||
return { $$typeof: v, type: R, key: _, ref: O, props: y, _owner: d.current }; | ||
m[h] === void 0 && (m[h] = f[h]); | ||
return { $$typeof: v, type: R, key: _, ref: O, props: m, _owner: s.current }; | ||
} | ||
return $.Fragment = u, $.jsx = C, $.jsxs = C, $; | ||
return $.Fragment = c, $.jsx = C, $.jsxs = C, $; | ||
} | ||
@@ -44,3 +44,3 @@ var N = {}; | ||
return Tr || (Tr = 1, process.env.NODE_ENV !== "production" && function() { | ||
var b = Sr, v = Symbol.for("react.element"), u = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), R = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), F = Symbol.iterator, L = "@@iterator"; | ||
var b = Sr, v = Symbol.for("react.element"), c = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), R = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), F = Symbol.iterator, L = "@@iterator"; | ||
function Pr(r) { | ||
@@ -64,6 +64,6 @@ if (r === null || typeof r != "object") | ||
i !== "" && (e += "%s", n = n.concat([i])); | ||
var s = n.map(function(o) { | ||
var u = n.map(function(o) { | ||
return String(o); | ||
}); | ||
s.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, s); | ||
u.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, u); | ||
} | ||
@@ -74,3 +74,3 @@ } | ||
function Ir(r) { | ||
return !!(typeof r == "string" || typeof r == "function" || r === m || r === S || Lr || r === d || r === w || r === h || Fr || r === O || kr || Ar || Dr || typeof r == "object" && r !== null && (r.$$typeof === _ || r.$$typeof === y || r.$$typeof === C || r.$$typeof === R || r.$$typeof === f || // This needs to include all possible module reference object | ||
return !!(typeof r == "string" || typeof r == "function" || r === E || r === S || Lr || r === s || r === w || r === h || Fr || r === O || kr || Ar || Dr || typeof r == "object" && r !== null && (r.$$typeof === _ || r.$$typeof === m || r.$$typeof === C || r.$$typeof === R || r.$$typeof === f || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
@@ -99,9 +99,9 @@ // we don't know which Flight build this will end up being used | ||
switch (r) { | ||
case m: | ||
case E: | ||
return "Fragment"; | ||
case u: | ||
case c: | ||
return "Portal"; | ||
case S: | ||
return "Profiler"; | ||
case d: | ||
case s: | ||
return "StrictMode"; | ||
@@ -123,9 +123,9 @@ case w: | ||
return Wr(r, r.render, "ForwardRef"); | ||
case y: | ||
case m: | ||
var t = r.displayName || null; | ||
return t !== null ? t : x(r.type) || "Memo"; | ||
case _: { | ||
var i = r, s = i._payload, o = i._init; | ||
var i = r, u = i._payload, o = i._init; | ||
try { | ||
return x(o(s)); | ||
return x(o(u)); | ||
} catch { | ||
@@ -138,3 +138,3 @@ return null; | ||
} | ||
var P = Object.assign, I = 0, nr, tr, ar, or, ir, sr, ur; | ||
var P = Object.assign, I = 0, nr, tr, ar, or, ir, ur, sr; | ||
function cr() { | ||
@@ -146,3 +146,3 @@ } | ||
if (I === 0) { | ||
nr = console.log, tr = console.info, ar = console.warn, or = console.error, ir = console.group, sr = console.groupCollapsed, ur = console.groupEnd; | ||
nr = console.log, tr = console.info, ar = console.warn, or = console.error, ir = console.group, ur = console.groupCollapsed, sr = console.groupEnd; | ||
var r = { | ||
@@ -192,6 +192,6 @@ configurable: !0, | ||
groupCollapsed: P({}, r, { | ||
value: sr | ||
value: ur | ||
}), | ||
groupEnd: P({}, r, { | ||
value: ur | ||
value: sr | ||
}) | ||
@@ -234,4 +234,4 @@ }); | ||
Error.prepareStackTrace = void 0; | ||
var s; | ||
s = B.current, B.current = null, $r(); | ||
var u; | ||
u = B.current, B.current = null, $r(); | ||
try { | ||
@@ -273,14 +273,14 @@ if (e) { | ||
`), g = t.stack.split(` | ||
`), c = a.length - 1, l = g.length - 1; c >= 1 && l >= 0 && a[c] !== g[l]; ) | ||
l--; | ||
for (; c >= 1 && l >= 0; c--, l--) | ||
if (a[c] !== g[l]) { | ||
if (c !== 1 || l !== 1) | ||
`), l = a.length - 1, d = g.length - 1; l >= 1 && d >= 0 && a[l] !== g[d]; ) | ||
d--; | ||
for (; l >= 1 && d >= 0; l--, d--) | ||
if (a[l] !== g[d]) { | ||
if (l !== 1 || d !== 1) | ||
do | ||
if (c--, l--, l < 0 || a[c] !== g[l]) { | ||
var E = ` | ||
` + a[c].replace(" at new ", " at "); | ||
return r.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", r.displayName)), typeof r == "function" && M.set(r, E), E; | ||
if (l--, d--, d < 0 || a[l] !== g[d]) { | ||
var y = ` | ||
` + a[l].replace(" at new ", " at "); | ||
return r.displayName && y.includes("<anonymous>") && (y = y.replace("<anonymous>", r.displayName)), typeof r == "function" && M.set(r, y), y; | ||
} | ||
while (c >= 1 && l >= 0); | ||
while (l >= 1 && d >= 0); | ||
break; | ||
@@ -290,3 +290,3 @@ } | ||
} finally { | ||
z = !1, B.current = s, Nr(), Error.prepareStackTrace = i; | ||
z = !1, B.current = u, Nr(), Error.prepareStackTrace = i; | ||
} | ||
@@ -320,8 +320,8 @@ var D = r ? r.displayName || r.name : "", wr = D ? Y(D) : ""; | ||
return Mr(r.render); | ||
case y: | ||
case m: | ||
return V(r.type, e, n); | ||
case _: { | ||
var t = r, i = t._payload, s = t._init; | ||
var t = r, i = t._payload, u = t._init; | ||
try { | ||
return V(s(i), e, n); | ||
return V(u(i), e, n); | ||
} catch { | ||
@@ -343,5 +343,5 @@ } | ||
{ | ||
var s = Function.call.bind(U); | ||
var u = Function.call.bind(U); | ||
for (var o in r) | ||
if (s(r, o)) { | ||
if (u(r, o)) { | ||
var a = void 0; | ||
@@ -354,4 +354,4 @@ try { | ||
a = r[o](e, o, t, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (c) { | ||
a = c; | ||
} catch (l) { | ||
a = l; | ||
} | ||
@@ -437,3 +437,3 @@ a && !(a instanceof Error) && (q(i), p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", t || "React class", n, o, typeof a), q(null)), a instanceof Error && !(a.message in dr) && (dr[a.message] = !0, q(i), p("Failed %s type: %s", n, a.message), q(null)); | ||
} | ||
var Qr = function(r, e, n, t, i, s, o) { | ||
var Qr = function(r, e, n, t, i, u, o) { | ||
var a = { | ||
@@ -448,3 +448,3 @@ // This tag allows us to uniquely identify this as a React Element | ||
// Record the component responsible for creating this element. | ||
_owner: s | ||
_owner: u | ||
}; | ||
@@ -470,14 +470,14 @@ return a._store = {}, Object.defineProperty(a._store, "validated", { | ||
{ | ||
var s, o = {}, a = null, g = null; | ||
var u, o = {}, a = null, g = null; | ||
n !== void 0 && (hr(n), a = "" + n), Hr(e) && (hr(e.key), a = "" + e.key), Gr(e) && (g = e.ref, Kr(e, i)); | ||
for (s in e) | ||
U.call(e, s) && !zr.hasOwnProperty(s) && (o[s] = e[s]); | ||
for (u in e) | ||
U.call(e, u) && !zr.hasOwnProperty(u) && (o[u] = e[u]); | ||
if (r && r.defaultProps) { | ||
var c = r.defaultProps; | ||
for (s in c) | ||
o[s] === void 0 && (o[s] = c[s]); | ||
var l = r.defaultProps; | ||
for (u in l) | ||
o[u] === void 0 && (o[u] = l[u]); | ||
} | ||
if (a || g) { | ||
var l = typeof r == "function" ? r.displayName || r.name || "Unknown" : r; | ||
a && Xr(o, l), g && Zr(o, l); | ||
var d = typeof r == "function" ? r.displayName || r.name || "Unknown" : r; | ||
a && Xr(o, d), g && Zr(o, d); | ||
} | ||
@@ -563,3 +563,3 @@ return Qr(r, a, g, i, t, W.current, o); | ||
if (typeof i == "function" && i !== r.entries) | ||
for (var s = i.call(r), o; !(o = s.next()).done; ) | ||
for (var u = i.call(r), o; !(o = u.next()).done; ) | ||
Z(o.value) && Er(o.value, e); | ||
@@ -579,3 +579,3 @@ } | ||
// Inner props are checked in the reconciler. | ||
e.$$typeof === y)) | ||
e.$$typeof === m)) | ||
n = e.propTypes; | ||
@@ -607,3 +607,3 @@ else | ||
} | ||
function _r(r, e, n, t, i, s) { | ||
function _r(r, e, n, t, i, u) { | ||
{ | ||
@@ -616,22 +616,22 @@ var o = Ir(r); | ||
g ? a += g : a += mr(); | ||
var c; | ||
r === null ? c = "null" : G(r) ? c = "array" : r !== void 0 && r.$$typeof === v ? (c = "<" + (x(r.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : c = typeof r, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, a); | ||
var l; | ||
r === null ? l = "null" : G(r) ? l = "array" : r !== void 0 && r.$$typeof === v ? (l = "<" + (x(r.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof r, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a); | ||
} | ||
var l = re(r, e, n, i, s); | ||
if (l == null) | ||
return l; | ||
var d = re(r, e, n, i, u); | ||
if (d == null) | ||
return d; | ||
if (o) { | ||
var E = e.children; | ||
if (E !== void 0) | ||
var y = e.children; | ||
if (y !== void 0) | ||
if (t) | ||
if (G(E)) { | ||
for (var D = 0; D < E.length; D++) | ||
Rr(E[D], r); | ||
Object.freeze && Object.freeze(E); | ||
if (G(y)) { | ||
for (var D = 0; D < y.length; D++) | ||
Rr(y[D], r); | ||
Object.freeze && Object.freeze(y); | ||
} else | ||
p("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 | ||
Rr(E, r); | ||
Rr(y, r); | ||
} | ||
return r === m ? ae(l) : te(l), l; | ||
return r === E ? ae(d) : te(d), d; | ||
} | ||
@@ -645,4 +645,4 @@ } | ||
} | ||
var se = ie, ue = oe; | ||
N.Fragment = m, N.jsx = se, N.jsxs = ue; | ||
var ue = ie, se = oe; | ||
N.Fragment = E, N.jsx = ue, N.jsxs = se; | ||
}()), N; | ||
@@ -698,2 +698,3 @@ } | ||
justify-content: space-between; | ||
height: max-content; | ||
} | ||
@@ -749,15 +750,18 @@ .hudoro-accordion-button:hover { | ||
const Or = ce({ allowMultiple: !1 }), be = ({ children: b, allowMultiple: v = !1 }) => { | ||
const u = le([]), m = (d) => { | ||
var C, R, f, w, h, y, _, O, F; | ||
const S = (C = u.current) == null ? void 0 : C.find( | ||
(L) => L === d | ||
const c = le([]), E = (s) => { | ||
var C, R, f, w, h, m, _, O, F; | ||
const S = (C = c.current) == null ? void 0 : C.find( | ||
(L) => L === s | ||
); | ||
v ? S ? S && ((w = d.querySelector(".hudoro-accordion-arrow")) == null || w.classList.remove("hudoro-accordion-arrow-active"), d.classList.remove("active"), u.current = u.current.filter( | ||
(L) => L !== d | ||
)) : (d.classList.add("active"), (R = d.querySelector(".hudoro-accordion-arrow")) == null || R.classList.add("hudoro-accordion-arrow-active"), (f = u.current) == null || f.push(d)) : (h = u.current) != null && h.length ? u.current[0] === d ? ((y = u.current[0].querySelector(".hudoro-accordion-arrow")) == null || y.classList.remove("hudoro-accordion-arrow-active"), u.current[0].classList.remove("active"), u.current = []) : ((_ = u.current[0].querySelector(".hudoro-accordion-arrow")) == null || _.classList.remove("hudoro-accordion-arrow-active"), u.current[0].classList.remove("active"), u.current = [], d.classList.add("active"), u.current[0] = d, (O = u.current[0].querySelector(".hudoro-accordion-arrow")) == null || O.classList.add("hudoro-accordion-arrow-active")) : (d.classList.add("active"), (F = d.querySelector(".hudoro-accordion-arrow")) == null || F.classList.add("hudoro-accordion-arrow-active"), u.current.push(d)); | ||
v ? S ? S && ((w = s.querySelector(".hudoro-accordion-arrow")) == null || w.classList.remove("hudoro-accordion-arrow-active"), s.classList.remove("active"), c.current = c.current.filter( | ||
(L) => L !== s | ||
)) : (s.classList.add("active"), (R = s.querySelector(".hudoro-accordion-arrow")) == null || R.classList.add("hudoro-accordion-arrow-active"), (f = c.current) == null || f.push(s)) : (h = c.current) != null && h.length ? c.current[0] === s ? ((m = c.current[0].querySelector(".hudoro-accordion-arrow")) == null || m.classList.remove("hudoro-accordion-arrow-active"), c.current[0].classList.remove("active"), c.current = []) : ((_ = c.current[0].querySelector(".hudoro-accordion-arrow")) == null || _.classList.remove("hudoro-accordion-arrow-active"), c.current[0].classList.remove("active"), c.current = [], s.classList.add("active"), c.current[0] = s, (O = c.current[0].querySelector(".hudoro-accordion-arrow")) == null || O.classList.add("hudoro-accordion-arrow-active")) : (s.classList.add("active"), (F = s.querySelector(".hudoro-accordion-arrow")) == null || F.classList.add("hudoro-accordion-arrow-active"), c.current.push(s)); | ||
}; | ||
return /* @__PURE__ */ j.jsx(Or.Provider, { value: { allowMultiple: v, handlePushRef: m }, children: /* @__PURE__ */ j.jsx("div", { className: "hudoro-accordion", children: b }) }); | ||
}, me = ({ children: b }) => /* @__PURE__ */ j.jsx("div", { className: "hudoro-accordion-item", children: b }), ye = ({ children: b }) => { | ||
const { handlePushRef: v } = de(Or), u = (m) => { | ||
m.currentTarget.parentElement && v && v(m.currentTarget.parentElement); | ||
return /* @__PURE__ */ j.jsx(Or.Provider, { value: { allowMultiple: v, handlePushRef: E }, children: /* @__PURE__ */ j.jsx("div", { className: "hudoro-accordion", children: b }) }); | ||
}, me = ({ children: b }) => /* @__PURE__ */ j.jsx("div", { className: "hudoro-accordion-item", children: b }), ye = ({ | ||
children: b, | ||
expand: v = !0 | ||
}) => { | ||
const { handlePushRef: c } = de(Or), E = (s) => { | ||
s.currentTarget.parentElement && c && c(s.currentTarget.parentElement); | ||
}; | ||
@@ -768,6 +772,6 @@ return /* @__PURE__ */ j.jsxs( | ||
className: "hudoro-accordion-button", | ||
onClick: (m) => u(m), | ||
onClick: (s) => v ? E(s) : {}, | ||
children: [ | ||
b, | ||
/* @__PURE__ */ j.jsx( | ||
v ? /* @__PURE__ */ j.jsx( | ||
"svg", | ||
@@ -792,3 +796,3 @@ { | ||
} | ||
) | ||
) : null | ||
] | ||
@@ -795,0 +799,0 @@ } |
@@ -1,2 +0,2 @@ | ||
(function(R,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],x):(R=typeof globalThis<"u"?globalThis:R||self,x(R.Accordion={},R.React))})(this,function(R,x){"use strict";var z={exports:{}},I={};/** | ||
(function(E,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],x):(E=typeof globalThis<"u"?globalThis:E||self,x(E.Accordion={},E.React))})(this,function(E,x){"use strict";var z={exports:{}},I={};/** | ||
* @license React | ||
@@ -9,3 +9,3 @@ * react-jsx-runtime.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var nr;function jr(){if(nr)return I;nr=1;var b=x,v=Symbol.for("react.element"),s=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,d=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function O(_,f,T){var h,y={},w=null,k=null;T!==void 0&&(w=""+T),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(k=f.ref);for(h in f)m.call(f,h)&&!j.hasOwnProperty(h)&&(y[h]=f[h]);if(_&&_.defaultProps)for(h in f=_.defaultProps,f)y[h]===void 0&&(y[h]=f[h]);return{$$typeof:v,type:_,key:w,ref:k,props:y,_owner:d.current}}return I.Fragment=s,I.jsx=O,I.jsxs=O,I}var W={};/** | ||
*/var nr;function jr(){if(nr)return I;nr=1;var b=x,v=Symbol.for("react.element"),s=Symbol.for("react.fragment"),R=Object.prototype.hasOwnProperty,u=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function O(_,f,T){var h,m={},w=null,k=null;T!==void 0&&(w=""+T),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(k=f.ref);for(h in f)R.call(f,h)&&!j.hasOwnProperty(h)&&(m[h]=f[h]);if(_&&_.defaultProps)for(h in f=_.defaultProps,f)m[h]===void 0&&(m[h]=f[h]);return{$$typeof:v,type:_,key:w,ref:k,props:m,_owner:u.current}}return I.Fragment=s,I.jsx=O,I.jsxs=O,I}var W={};/** | ||
* @license React | ||
@@ -18,13 +18,13 @@ * react-jsx-runtime.development.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var tr;function kr(){return tr||(tr=1,process.env.NODE_ENV!=="production"&&function(){var b=x,v=Symbol.for("react.element"),s=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),_=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),N=Symbol.iterator,Y="@@iterator";function Wr(r){if(r===null||typeof r!="object")return null;var e=N&&r[N]||r[Y];return typeof e=="function"?e:null}var D=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(r){{for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];Nr("error",r,n)}}function Nr(r,e,n){{var t=D.ReactDebugCurrentFrame,i=t.getStackAddendum();i!==""&&(e+="%s",n=n.concat([i]));var c=n.map(function(a){return String(a)});c.unshift("Warning: "+e),Function.prototype.apply.call(console[r],console,c)}}var Yr=!1,Mr=!1,Vr=!1,Ur=!1,$r=!1,ir;ir=Symbol.for("react.module.reference");function Br(r){return!!(typeof r=="string"||typeof r=="function"||r===m||r===j||$r||r===d||r===T||r===h||Ur||r===k||Yr||Mr||Vr||typeof r=="object"&&r!==null&&(r.$$typeof===w||r.$$typeof===y||r.$$typeof===O||r.$$typeof===_||r.$$typeof===f||r.$$typeof===ir||r.getModuleId!==void 0))}function qr(r,e,n){var t=r.displayName;if(t)return t;var i=e.displayName||e.name||"";return i!==""?n+"("+i+")":n}function cr(r){return r.displayName||"Context"}function C(r){if(r==null)return null;if(typeof r.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case m:return"Fragment";case s:return"Portal";case j:return"Profiler";case d:return"StrictMode";case T:return"Suspense";case h:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case _:var e=r;return cr(e)+".Consumer";case O:var n=r;return cr(n._context)+".Provider";case f:return qr(r,r.render,"ForwardRef");case y:var t=r.displayName||null;return t!==null?t:C(r.type)||"Memo";case w:{var i=r,c=i._payload,a=i._init;try{return C(a(c))}catch{return null}}}return null}var A=Object.assign,M=0,sr,ur,lr,dr,fr,vr,hr;function pr(){}pr.__reactDisabledLog=!0;function Jr(){{if(M===0){sr=console.log,ur=console.info,lr=console.warn,dr=console.error,fr=console.group,vr=console.groupCollapsed,hr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:pr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}M++}}function zr(){{if(M--,M===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},r,{value:sr}),info:A({},r,{value:ur}),warn:A({},r,{value:lr}),error:A({},r,{value:dr}),group:A({},r,{value:fr}),groupCollapsed:A({},r,{value:vr}),groupEnd:A({},r,{value:hr})})}M<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=D.ReactCurrentDispatcher,H;function U(r,e,n){{if(H===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||""}return` | ||
*/var tr;function kr(){return tr||(tr=1,process.env.NODE_ENV!=="production"&&function(){var b=x,v=Symbol.for("react.element"),s=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),_=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),N=Symbol.iterator,Y="@@iterator";function Wr(r){if(r===null||typeof r!="object")return null;var e=N&&r[N]||r[Y];return typeof e=="function"?e:null}var D=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(r){{for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];Nr("error",r,n)}}function Nr(r,e,n){{var t=D.ReactDebugCurrentFrame,i=t.getStackAddendum();i!==""&&(e+="%s",n=n.concat([i]));var c=n.map(function(a){return String(a)});c.unshift("Warning: "+e),Function.prototype.apply.call(console[r],console,c)}}var Yr=!1,Mr=!1,Vr=!1,Ur=!1,$r=!1,ir;ir=Symbol.for("react.module.reference");function Br(r){return!!(typeof r=="string"||typeof r=="function"||r===R||r===j||$r||r===u||r===T||r===h||Ur||r===k||Yr||Mr||Vr||typeof r=="object"&&r!==null&&(r.$$typeof===w||r.$$typeof===m||r.$$typeof===O||r.$$typeof===_||r.$$typeof===f||r.$$typeof===ir||r.getModuleId!==void 0))}function qr(r,e,n){var t=r.displayName;if(t)return t;var i=e.displayName||e.name||"";return i!==""?n+"("+i+")":n}function cr(r){return r.displayName||"Context"}function C(r){if(r==null)return null;if(typeof r.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case R:return"Fragment";case s:return"Portal";case j:return"Profiler";case u:return"StrictMode";case T:return"Suspense";case h:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case _:var e=r;return cr(e)+".Consumer";case O:var n=r;return cr(n._context)+".Provider";case f:return qr(r,r.render,"ForwardRef");case m:var t=r.displayName||null;return t!==null?t:C(r.type)||"Memo";case w:{var i=r,c=i._payload,a=i._init;try{return C(a(c))}catch{return null}}}return null}var A=Object.assign,M=0,ur,sr,lr,dr,fr,vr,hr;function pr(){}pr.__reactDisabledLog=!0;function Jr(){{if(M===0){ur=console.log,sr=console.info,lr=console.warn,dr=console.error,fr=console.group,vr=console.groupCollapsed,hr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:pr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}M++}}function zr(){{if(M--,M===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},r,{value:ur}),info:A({},r,{value:sr}),warn:A({},r,{value:lr}),error:A({},r,{value:dr}),group:A({},r,{value:fr}),groupCollapsed:A({},r,{value:vr}),groupEnd:A({},r,{value:hr})})}M<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=D.ReactCurrentDispatcher,H;function U(r,e,n){{if(H===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||""}return` | ||
`+H+r}}var K=!1,$;{var Gr=typeof WeakMap=="function"?WeakMap:Map;$=new Gr}function gr(r,e){if(!r||K)return"";{var n=$.get(r);if(n!==void 0)return n}var t;K=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=G.current,G.current=null,Jr();try{if(e){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(S){t=S}Reflect.construct(r,[],a)}else{try{a.call()}catch(S){t=S}r.call(a.prototype)}}else{try{throw Error()}catch(S){t=S}r()}}catch(S){if(S&&t&&typeof S.stack=="string"){for(var o=S.stack.split(` | ||
`),g=t.stack.split(` | ||
`),u=o.length-1,l=g.length-1;u>=1&&l>=0&&o[u]!==g[l];)l--;for(;u>=1&&l>=0;u--,l--)if(o[u]!==g[l]){if(u!==1||l!==1)do if(u--,l--,l<0||o[u]!==g[l]){var E=` | ||
`+o[u].replace(" at new "," at ");return r.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",r.displayName)),typeof r=="function"&&$.set(r,E),E}while(u>=1&&l>=0);break}}}finally{K=!1,G.current=c,zr(),Error.prepareStackTrace=i}var L=r?r.displayName||r.name:"",Pr=L?U(L):"";return typeof r=="function"&&$.set(r,Pr),Pr}function Hr(r,e,n){return gr(r,!1)}function Kr(r){var e=r.prototype;return!!(e&&e.isReactComponent)}function B(r,e,n){if(r==null)return"";if(typeof r=="function")return gr(r,Kr(r));if(typeof r=="string")return U(r);switch(r){case T:return U("Suspense");case h:return U("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case f:return Hr(r.render);case y:return B(r.type,e,n);case w:{var t=r,i=t._payload,c=t._init;try{return B(c(i),e,n)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,br={},mr=D.ReactDebugCurrentFrame;function J(r){if(r){var e=r._owner,n=B(r.type,r._source,e?e.type:null);mr.setExtraStackFrame(n)}else mr.setExtraStackFrame(null)}function Xr(r,e,n,t,i){{var c=Function.call.bind(q);for(var a in r)if(c(r,a)){var o=void 0;try{if(typeof r[a]!="function"){var g=Error((t||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}o=r[a](e,a,t,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){o=u}o&&!(o instanceof Error)&&(J(i),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",t||"React class",n,a,typeof o),J(null)),o instanceof Error&&!(o.message in br)&&(br[o.message]=!0,J(i),p("Failed %s type: %s",n,o.message),J(null))}}}var Zr=Array.isArray;function X(r){return Zr(r)}function Qr(r){{var e=typeof Symbol=="function"&&Symbol.toStringTag,n=e&&r[Symbol.toStringTag]||r.constructor.name||"Object";return n}}function re(r){try{return yr(r),!1}catch{return!0}}function yr(r){return""+r}function Er(r){if(re(r))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qr(r)),yr(r)}var V=D.ReactCurrentOwner,ee={key:!0,ref:!0,__self:!0,__source:!0},Rr,_r,Z;Z={};function ne(r){if(q.call(r,"ref")){var e=Object.getOwnPropertyDescriptor(r,"ref").get;if(e&&e.isReactWarning)return!1}return r.ref!==void 0}function te(r){if(q.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return r.key!==void 0}function oe(r,e){if(typeof r.ref=="string"&&V.current&&e&&V.current.stateNode!==e){var n=C(V.current.type);Z[n]||(p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(V.current.type),r.ref),Z[n]=!0)}}function ae(r,e){{var n=function(){Rr||(Rr=!0,p("%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://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"key",{get:n,configurable:!0})}}function ie(r,e){{var n=function(){_r||(_r=!0,p("%s: `ref` 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://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"ref",{get:n,configurable:!0})}}var ce=function(r,e,n,t,i,c,a){var o={$$typeof:v,type:r,key:e,ref:n,props:a,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:t}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function se(r,e,n,t,i){{var c,a={},o=null,g=null;n!==void 0&&(Er(n),o=""+n),te(e)&&(Er(e.key),o=""+e.key),ne(e)&&(g=e.ref,oe(e,i));for(c in e)q.call(e,c)&&!ee.hasOwnProperty(c)&&(a[c]=e[c]);if(r&&r.defaultProps){var u=r.defaultProps;for(c in u)a[c]===void 0&&(a[c]=u[c])}if(o||g){var l=typeof r=="function"?r.displayName||r.name||"Unknown":r;o&&ae(a,l),g&&ie(a,l)}return ce(r,o,g,i,t,V.current,a)}}var Q=D.ReactCurrentOwner,wr=D.ReactDebugCurrentFrame;function F(r){if(r){var e=r._owner,n=B(r.type,r._source,e?e.type:null);wr.setExtraStackFrame(n)}else wr.setExtraStackFrame(null)}var rr;rr=!1;function er(r){return typeof r=="object"&&r!==null&&r.$$typeof===v}function xr(){{if(Q.current){var r=C(Q.current.type);if(r)return` | ||
`),l=o.length-1,d=g.length-1;l>=1&&d>=0&&o[l]!==g[d];)d--;for(;l>=1&&d>=0;l--,d--)if(o[l]!==g[d]){if(l!==1||d!==1)do if(l--,d--,d<0||o[l]!==g[d]){var y=` | ||
`+o[l].replace(" at new "," at ");return r.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",r.displayName)),typeof r=="function"&&$.set(r,y),y}while(l>=1&&d>=0);break}}}finally{K=!1,G.current=c,zr(),Error.prepareStackTrace=i}var L=r?r.displayName||r.name:"",Pr=L?U(L):"";return typeof r=="function"&&$.set(r,Pr),Pr}function Hr(r,e,n){return gr(r,!1)}function Kr(r){var e=r.prototype;return!!(e&&e.isReactComponent)}function B(r,e,n){if(r==null)return"";if(typeof r=="function")return gr(r,Kr(r));if(typeof r=="string")return U(r);switch(r){case T:return U("Suspense");case h:return U("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case f:return Hr(r.render);case m:return B(r.type,e,n);case w:{var t=r,i=t._payload,c=t._init;try{return B(c(i),e,n)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,br={},mr=D.ReactDebugCurrentFrame;function J(r){if(r){var e=r._owner,n=B(r.type,r._source,e?e.type:null);mr.setExtraStackFrame(n)}else mr.setExtraStackFrame(null)}function Xr(r,e,n,t,i){{var c=Function.call.bind(q);for(var a in r)if(c(r,a)){var o=void 0;try{if(typeof r[a]!="function"){var g=Error((t||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}o=r[a](e,a,t,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){o=l}o&&!(o instanceof Error)&&(J(i),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",t||"React class",n,a,typeof o),J(null)),o instanceof Error&&!(o.message in br)&&(br[o.message]=!0,J(i),p("Failed %s type: %s",n,o.message),J(null))}}}var Zr=Array.isArray;function X(r){return Zr(r)}function Qr(r){{var e=typeof Symbol=="function"&&Symbol.toStringTag,n=e&&r[Symbol.toStringTag]||r.constructor.name||"Object";return n}}function re(r){try{return yr(r),!1}catch{return!0}}function yr(r){return""+r}function Er(r){if(re(r))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qr(r)),yr(r)}var V=D.ReactCurrentOwner,ee={key:!0,ref:!0,__self:!0,__source:!0},Rr,_r,Z;Z={};function ne(r){if(q.call(r,"ref")){var e=Object.getOwnPropertyDescriptor(r,"ref").get;if(e&&e.isReactWarning)return!1}return r.ref!==void 0}function te(r){if(q.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return r.key!==void 0}function oe(r,e){if(typeof r.ref=="string"&&V.current&&e&&V.current.stateNode!==e){var n=C(V.current.type);Z[n]||(p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(V.current.type),r.ref),Z[n]=!0)}}function ae(r,e){{var n=function(){Rr||(Rr=!0,p("%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://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"key",{get:n,configurable:!0})}}function ie(r,e){{var n=function(){_r||(_r=!0,p("%s: `ref` 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://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(r,"ref",{get:n,configurable:!0})}}var ce=function(r,e,n,t,i,c,a){var o={$$typeof:v,type:r,key:e,ref:n,props:a,_owner:c};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:t}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function ue(r,e,n,t,i){{var c,a={},o=null,g=null;n!==void 0&&(Er(n),o=""+n),te(e)&&(Er(e.key),o=""+e.key),ne(e)&&(g=e.ref,oe(e,i));for(c in e)q.call(e,c)&&!ee.hasOwnProperty(c)&&(a[c]=e[c]);if(r&&r.defaultProps){var l=r.defaultProps;for(c in l)a[c]===void 0&&(a[c]=l[c])}if(o||g){var d=typeof r=="function"?r.displayName||r.name||"Unknown":r;o&&ae(a,d),g&&ie(a,d)}return ce(r,o,g,i,t,V.current,a)}}var Q=D.ReactCurrentOwner,wr=D.ReactDebugCurrentFrame;function F(r){if(r){var e=r._owner,n=B(r.type,r._source,e?e.type:null);wr.setExtraStackFrame(n)}else wr.setExtraStackFrame(null)}var rr;rr=!1;function er(r){return typeof r=="object"&&r!==null&&r.$$typeof===v}function xr(){{if(Q.current){var r=C(Q.current.type);if(r)return` | ||
Check the render method of \``+r+"`."}return""}}function ue(r){{if(r!==void 0){var e=r.fileName.replace(/^.*[\\\/]/,""),n=r.lineNumber;return` | ||
Check the render method of \``+r+"`."}return""}}function se(r){{if(r!==void 0){var e=r.fileName.replace(/^.*[\\\/]/,""),n=r.lineNumber;return` | ||
Check your code at `+e+":"+n+"."}return""}}var Tr={};function le(r){{var e=xr();if(!e){var n=typeof r=="string"?r:r.displayName||r.name;n&&(e=` | ||
Check the top-level render call using <`+n+">.")}return e}}function Cr(r,e){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var n=le(e);if(Tr[n])return;Tr[n]=!0;var t="";r&&r._owner&&r._owner!==Q.current&&(t=" It was passed a child from "+C(r._owner.type)+"."),F(r),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,t),F(null)}}function Sr(r,e){{if(typeof r!="object")return;if(X(r))for(var n=0;n<r.length;n++){var t=r[n];er(t)&&Cr(t,e)}else if(er(r))r._store&&(r._store.validated=!0);else if(r){var i=Wr(r);if(typeof i=="function"&&i!==r.entries)for(var c=i.call(r),a;!(a=c.next()).done;)er(a.value)&&Cr(a.value,e)}}}function de(r){{var e=r.type;if(e==null||typeof e=="string")return;var n;if(typeof e=="function")n=e.propTypes;else if(typeof e=="object"&&(e.$$typeof===f||e.$$typeof===y))n=e.propTypes;else return;if(n){var t=C(e);Xr(n,r.props,"prop",t,r)}else if(e.PropTypes!==void 0&&!rr){rr=!0;var i=C(e);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof e.getDefaultProps=="function"&&!e.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(r){{for(var e=Object.keys(r.props),n=0;n<e.length;n++){var t=e[n];if(t!=="children"&&t!=="key"){F(r),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",t),F(null);break}}r.ref!==null&&(F(r),p("Invalid attribute `ref` supplied to `React.Fragment`."),F(null))}}function Or(r,e,n,t,i,c){{var a=Br(r);if(!a){var o="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var g=ue(i);g?o+=g:o+=xr();var u;r===null?u="null":X(r)?u="array":r!==void 0&&r.$$typeof===v?(u="<"+(C(r.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):u=typeof r,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,o)}var l=se(r,e,n,i,c);if(l==null)return l;if(a){var E=e.children;if(E!==void 0)if(t)if(X(E)){for(var L=0;L<E.length;L++)Sr(E[L],r);Object.freeze&&Object.freeze(E)}else p("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 Sr(E,r)}return r===m?fe(l):de(l),l}}function ve(r,e,n){return Or(r,e,n,!0)}function he(r,e,n){return Or(r,e,n,!1)}var pe=he,ge=ve;W.Fragment=m,W.jsx=pe,W.jsxs=ge}()),W}process.env.NODE_ENV==="production"?z.exports=jr():z.exports=kr();var P=z.exports;const Ar=`:root { | ||
Check the top-level render call using <`+n+">.")}return e}}function Cr(r,e){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var n=le(e);if(Tr[n])return;Tr[n]=!0;var t="";r&&r._owner&&r._owner!==Q.current&&(t=" It was passed a child from "+C(r._owner.type)+"."),F(r),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,t),F(null)}}function Sr(r,e){{if(typeof r!="object")return;if(X(r))for(var n=0;n<r.length;n++){var t=r[n];er(t)&&Cr(t,e)}else if(er(r))r._store&&(r._store.validated=!0);else if(r){var i=Wr(r);if(typeof i=="function"&&i!==r.entries)for(var c=i.call(r),a;!(a=c.next()).done;)er(a.value)&&Cr(a.value,e)}}}function de(r){{var e=r.type;if(e==null||typeof e=="string")return;var n;if(typeof e=="function")n=e.propTypes;else if(typeof e=="object"&&(e.$$typeof===f||e.$$typeof===m))n=e.propTypes;else return;if(n){var t=C(e);Xr(n,r.props,"prop",t,r)}else if(e.PropTypes!==void 0&&!rr){rr=!0;var i=C(e);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof e.getDefaultProps=="function"&&!e.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function fe(r){{for(var e=Object.keys(r.props),n=0;n<e.length;n++){var t=e[n];if(t!=="children"&&t!=="key"){F(r),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",t),F(null);break}}r.ref!==null&&(F(r),p("Invalid attribute `ref` supplied to `React.Fragment`."),F(null))}}function Or(r,e,n,t,i,c){{var a=Br(r);if(!a){var o="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var g=se(i);g?o+=g:o+=xr();var l;r===null?l="null":X(r)?l="array":r!==void 0&&r.$$typeof===v?(l="<"+(C(r.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):l=typeof r,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",l,o)}var d=ue(r,e,n,i,c);if(d==null)return d;if(a){var y=e.children;if(y!==void 0)if(t)if(X(y)){for(var L=0;L<y.length;L++)Sr(y[L],r);Object.freeze&&Object.freeze(y)}else p("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 Sr(y,r)}return r===R?fe(d):de(d),d}}function ve(r,e,n){return Or(r,e,n,!0)}function he(r,e,n){return Or(r,e,n,!1)}var pe=he,ge=ve;W.Fragment=R,W.jsx=pe,W.jsxs=ge}()),W}process.env.NODE_ENV==="production"?z.exports=jr():z.exports=kr();var P=z.exports;const Ar=`:root { | ||
/* gray */ | ||
@@ -75,2 +75,3 @@ --hsd-ui-color-gray-300: #d1d5db; | ||
justify-content: space-between; | ||
height: max-content; | ||
} | ||
@@ -118,2 +119,2 @@ .hudoro-accordion-button:hover { | ||
} | ||
`,or="hudoro-accordion-styles";(b=>{if(!document.getElementById(or)){const v=document.createElement("style");v.id=or,v.textContent=b,document.head.appendChild(v)}})(Ar);const ar=x.createContext({allowMultiple:!1}),Dr=({children:b,allowMultiple:v=!1})=>{const s=x.useRef([]),m=d=>{var O,_,f,T,h,y,w,k,N;const j=(O=s.current)==null?void 0:O.find(Y=>Y===d);v?j?j&&((T=d.querySelector(".hudoro-accordion-arrow"))==null||T.classList.remove("hudoro-accordion-arrow-active"),d.classList.remove("active"),s.current=s.current.filter(Y=>Y!==d)):(d.classList.add("active"),(_=d.querySelector(".hudoro-accordion-arrow"))==null||_.classList.add("hudoro-accordion-arrow-active"),(f=s.current)==null||f.push(d)):(h=s.current)!=null&&h.length?s.current[0]===d?((y=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||y.classList.remove("hudoro-accordion-arrow-active"),s.current[0].classList.remove("active"),s.current=[]):((w=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||w.classList.remove("hudoro-accordion-arrow-active"),s.current[0].classList.remove("active"),s.current=[],d.classList.add("active"),s.current[0]=d,(k=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||k.classList.add("hudoro-accordion-arrow-active")):(d.classList.add("active"),(N=d.querySelector(".hudoro-accordion-arrow"))==null||N.classList.add("hudoro-accordion-arrow-active"),s.current.push(d))};return P.jsx(ar.Provider,{value:{allowMultiple:v,handlePushRef:m},children:P.jsx("div",{className:"hudoro-accordion",children:b})})},Fr=({children:b})=>P.jsx("div",{className:"hudoro-accordion-item",children:b}),Lr=({children:b})=>{const{handlePushRef:v}=x.useContext(ar),s=m=>{m.currentTarget.parentElement&&v&&v(m.currentTarget.parentElement)};return P.jsxs("button",{className:"hudoro-accordion-button",onClick:m=>s(m),children:[b,P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",className:"hudoro-accordion-arrow",children:P.jsx("path",{d:"M4 9.5L12 17.5L20 9.5",stroke:"#111827",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})},Ir=({children:b})=>P.jsx("div",{className:"hudoro-accordion-panel",onClick:v=>v.stopPropagation(),children:b});R.Accordion=Dr,R.AccordionButton=Lr,R.AccordionItem=Fr,R.AccordionPanel=Ir,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}); | ||
`,or="hudoro-accordion-styles";(b=>{if(!document.getElementById(or)){const v=document.createElement("style");v.id=or,v.textContent=b,document.head.appendChild(v)}})(Ar);const ar=x.createContext({allowMultiple:!1}),Dr=({children:b,allowMultiple:v=!1})=>{const s=x.useRef([]),R=u=>{var O,_,f,T,h,m,w,k,N;const j=(O=s.current)==null?void 0:O.find(Y=>Y===u);v?j?j&&((T=u.querySelector(".hudoro-accordion-arrow"))==null||T.classList.remove("hudoro-accordion-arrow-active"),u.classList.remove("active"),s.current=s.current.filter(Y=>Y!==u)):(u.classList.add("active"),(_=u.querySelector(".hudoro-accordion-arrow"))==null||_.classList.add("hudoro-accordion-arrow-active"),(f=s.current)==null||f.push(u)):(h=s.current)!=null&&h.length?s.current[0]===u?((m=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||m.classList.remove("hudoro-accordion-arrow-active"),s.current[0].classList.remove("active"),s.current=[]):((w=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||w.classList.remove("hudoro-accordion-arrow-active"),s.current[0].classList.remove("active"),s.current=[],u.classList.add("active"),s.current[0]=u,(k=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||k.classList.add("hudoro-accordion-arrow-active")):(u.classList.add("active"),(N=u.querySelector(".hudoro-accordion-arrow"))==null||N.classList.add("hudoro-accordion-arrow-active"),s.current.push(u))};return P.jsx(ar.Provider,{value:{allowMultiple:v,handlePushRef:R},children:P.jsx("div",{className:"hudoro-accordion",children:b})})},Fr=({children:b})=>P.jsx("div",{className:"hudoro-accordion-item",children:b}),Lr=({children:b,expand:v=!0})=>{const{handlePushRef:s}=x.useContext(ar),R=u=>{u.currentTarget.parentElement&&s&&s(u.currentTarget.parentElement)};return P.jsxs("button",{className:"hudoro-accordion-button",onClick:u=>v?R(u):{},children:[b,v?P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",className:"hudoro-accordion-arrow",children:P.jsx("path",{d:"M4 9.5L12 17.5L20 9.5",stroke:"#111827",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null]})},Ir=({children:b})=>P.jsx("div",{className:"hudoro-accordion-panel",onClick:v=>v.stopPropagation(),children:b});E.Accordion=Dr,E.AccordionButton=Lr,E.AccordionItem=Fr,E.AccordionPanel=Ir,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}); |
@@ -11,2 +11,3 @@ import { ReactNode } from "react"; | ||
children: ReactNode; | ||
expand?: boolean; | ||
} | ||
@@ -13,0 +14,0 @@ export interface IAccordionPanel { |
{ | ||
"name": "@hudoro/accordion", | ||
"version": "0.0.1-beta.6", | ||
"version": "0.0.1-beta.7", | ||
"description": "Accordion component for Hudoro UI", | ||
@@ -5,0 +5,0 @@ "author": "Prawito Hudoro", |
48525
958