New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hudoro/accordion

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hudoro/accordion - npm Package Compare versions

Comparing version 0.0.1-beta.5 to 0.0.1-beta.6

254

dist/accordion.es.js

@@ -1,2 +0,2 @@

import Sr, { createContext as ce, useRef as le, useContext as fe } from "react";
import Sr, { createContext as ce, useRef as le, useContext as de } from "react";
var Q = { exports: {} }, $ = {};

@@ -13,18 +13,18 @@ /**

var xr;
function de() {
function fe() {
if (xr)
return $;
xr = 1;
var m = Sr, v = Symbol.for("react.element"), s = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, f = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, O = { key: !0, ref: !0, __self: !0, __source: !0 };
function C(R, d, w) {
var p, y = {}, _ = null, P = null;
w !== void 0 && (_ = "" + w), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (P = d.ref);
for (p in d)
b.call(d, p) && !O.hasOwnProperty(p) && (y[p] = d[p]);
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 };
function C(R, f, w) {
var h, y = {}, _ = 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]);
if (R && R.defaultProps)
for (p in d = R.defaultProps, d)
y[p] === void 0 && (y[p] = d[p]);
return { $$typeof: v, type: R, key: _, ref: P, props: y, _owner: f.current };
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 };
}
return $.Fragment = s, $.jsx = C, $.jsxs = C, $;
return $.Fragment = u, $.jsx = C, $.jsxs = C, $;
}

@@ -44,3 +44,3 @@ var N = {};

return Tr || (Tr = 1, process.env.NODE_ENV !== "production" && function() {
var m = Sr, v = Symbol.for("react.element"), s = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), R = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), F = Symbol.iterator, L = "@@iterator";
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";
function Pr(r) {

@@ -52,4 +52,4 @@ if (r === null || typeof r != "object")

}
var k = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function h(r) {
var k = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function p(r) {
{

@@ -65,6 +65,6 @@ for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), t = 1; t < e; t++)

i !== "" && (e += "%s", n = n.concat([i]));
var u = n.map(function(o) {
var s = n.map(function(o) {
return String(o);
});
u.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, u);
s.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, s);
}

@@ -75,3 +75,3 @@ }

function Ir(r) {
return !!(typeof r == "string" || typeof r == "function" || r === b || r === O || Lr || r === f || r === w || r === p || Fr || r === P || kr || Ar || Dr || typeof r == "object" && r !== null && (r.$$typeof === _ || r.$$typeof === y || r.$$typeof === C || r.$$typeof === R || r.$$typeof === d || // This needs to include all possible module reference object
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
// types supported by any Flight configuration anywhere since

@@ -95,3 +95,3 @@ // we don't know which Flight build this will end up being used

return null;
if (typeof r.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
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;

@@ -101,13 +101,13 @@ if (typeof r == "string")

switch (r) {
case b:
case m:
return "Fragment";
case s:
case u:
return "Portal";
case O:
case S:
return "Profiler";
case f:
case d:
return "StrictMode";
case w:
return "Suspense";
case p:
case h:
return "SuspenseList";

@@ -123,3 +123,3 @@ }

return er(n._context) + ".Provider";
case d:
case f:
return Wr(r, r.render, "ForwardRef");

@@ -130,5 +130,5 @@ case y:

case _: {
var i = r, u = i._payload, o = i._init;
var i = r, s = i._payload, o = i._init;
try {
return x(o(u));
return x(o(s));
} catch {

@@ -141,3 +141,3 @@ return null;

}
var j = Object.assign, I = 0, nr, tr, ar, or, ir, ur, sr;
var P = Object.assign, I = 0, nr, tr, ar, or, ir, sr, ur;
function cr() {

@@ -149,3 +149,3 @@ }

if (I === 0) {
nr = console.log, tr = console.info, ar = console.warn, or = console.error, ir = console.group, ur = console.groupCollapsed, sr = console.groupEnd;
nr = console.log, tr = console.info, ar = console.warn, or = console.error, ir = console.group, sr = console.groupCollapsed, ur = console.groupEnd;
var r = {

@@ -179,26 +179,26 @@ configurable: !0,

Object.defineProperties(console, {
log: j({}, r, {
log: P({}, r, {
value: nr
}),
info: j({}, r, {
info: P({}, r, {
value: tr
}),
warn: j({}, r, {
warn: P({}, r, {
value: ar
}),
error: j({}, r, {
error: P({}, r, {
value: or
}),
group: j({}, r, {
group: P({}, r, {
value: ir
}),
groupCollapsed: j({}, r, {
groupCollapsed: P({}, r, {
value: sr
}),
groupEnd: P({}, r, {
value: ur
}),
groupEnd: j({}, r, {
value: sr
})
});
}
I < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
I < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}

@@ -237,4 +237,4 @@ }

Error.prepareStackTrace = void 0;
var u;
u = B.current, B.current = null, $r();
var s;
s = B.current, B.current = null, $r();
try {

@@ -292,3 +292,3 @@ if (e) {

} finally {
z = !1, B.current = u, Nr(), Error.prepareStackTrace = i;
z = !1, B.current = s, Nr(), Error.prepareStackTrace = i;
}

@@ -315,3 +315,3 @@ var D = r ? r.displayName || r.name : "", wr = D ? Y(D) : "";

return Y("Suspense");
case p:
case h:
return Y("SuspenseList");

@@ -321,3 +321,3 @@ }

switch (r.$$typeof) {
case d:
case f:
return Mr(r.render);

@@ -327,5 +327,5 @@ case y:

case _: {
var t = r, i = t._payload, u = t._init;
var t = r, i = t._payload, s = t._init;
try {
return V(u(i), e, n);
return V(s(i), e, n);
} catch {

@@ -337,15 +337,15 @@ }

}
var U = Object.prototype.hasOwnProperty, fr = {}, dr = k.ReactDebugCurrentFrame;
var U = Object.prototype.hasOwnProperty, dr = {}, fr = k.ReactDebugCurrentFrame;
function q(r) {
if (r) {
var e = r._owner, n = V(r.type, r._source, e ? e.type : null);
dr.setExtraStackFrame(n);
fr.setExtraStackFrame(n);
} else
dr.setExtraStackFrame(null);
fr.setExtraStackFrame(null);
}
function Ur(r, e, n, t, i) {
{
var u = Function.call.bind(U);
var s = Function.call.bind(U);
for (var o in r)
if (u(r, o)) {
if (s(r, o)) {
var a = void 0;

@@ -361,3 +361,3 @@ try {

}
a && !(a instanceof Error) && (q(i), h("%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 fr) && (fr[a.message] = !0, q(i), h("Failed %s type: %s", n, a.message), q(null));
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));
}

@@ -386,5 +386,5 @@ }

}
function pr(r) {
function hr(r) {
if (Jr(r))
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Br(r)), vr(r);
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Br(r)), vr(r);
}

@@ -396,3 +396,3 @@ var W = k.ReactCurrentOwner, zr = {

__source: !0
}, hr, gr, H;
}, pr, gr, H;
H = {};

@@ -418,3 +418,3 @@ function Gr(r) {

var n = x(W.current.type);
H[n] || (h('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', x(W.current.type), r.ref), H[n] = !0);
H[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', x(W.current.type), r.ref), H[n] = !0);
}

@@ -425,3 +425,3 @@ }

var n = function() {
hr || (hr = !0, h("%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));
pr || (pr = !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));
};

@@ -437,3 +437,3 @@ n.isReactWarning = !0, Object.defineProperty(r, "key", {

var n = function() {
gr || (gr = !0, h("%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));
gr || (gr = !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));
};

@@ -446,3 +446,3 @@ n.isReactWarning = !0, Object.defineProperty(r, "ref", {

}
var Qr = function(r, e, n, t, i, u, o) {
var Qr = function(r, e, n, t, i, s, o) {
var a = {

@@ -457,3 +457,3 @@ // This tag allows us to uniquely identify this as a React Element

// Record the component responsible for creating this element.
_owner: u
_owner: s
};

@@ -479,10 +479,10 @@ return a._store = {}, Object.defineProperty(a._store, "validated", {

{
var u, o = {}, a = null, g = null;
n !== void 0 && (pr(n), a = "" + n), Hr(e) && (pr(e.key), a = "" + e.key), Gr(e) && (g = e.ref, Kr(e, i));
for (u in e)
U.call(e, u) && !zr.hasOwnProperty(u) && (o[u] = e[u]);
var s, 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]);
if (r && r.defaultProps) {
var c = r.defaultProps;
for (u in c)
o[u] === void 0 && (o[u] = c[u]);
for (s in c)
o[s] === void 0 && (o[s] = c[s]);
}

@@ -496,9 +496,9 @@ if (a || g) {

}
var K = k.ReactCurrentOwner, mr = k.ReactDebugCurrentFrame;
var K = k.ReactCurrentOwner, br = k.ReactDebugCurrentFrame;
function A(r) {
if (r) {
var e = r._owner, n = V(r.type, r._source, e ? e.type : null);
mr.setExtraStackFrame(n);
br.setExtraStackFrame(n);
} else
mr.setExtraStackFrame(null);
br.setExtraStackFrame(null);
}

@@ -510,3 +510,3 @@ var X;

}
function br() {
function mr() {
{

@@ -537,3 +537,3 @@ if (K.current) {

{
var e = br();
var e = mr();
if (!e) {

@@ -558,3 +558,3 @@ var n = typeof r == "string" ? r : r.displayName || r.name;

var t = "";
r && r._owner && r._owner !== K.current && (t = " It was passed a child from " + x(r._owner.type) + "."), A(r), h('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), A(null);
r && r._owner && r._owner !== K.current && (t = " It was passed a child from " + x(r._owner.type) + "."), A(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), A(null);
}

@@ -576,3 +576,3 @@ }

if (typeof i == "function" && i !== r.entries)
for (var u = i.call(r), o; !(o = u.next()).done; )
for (var s = i.call(r), o; !(o = s.next()).done; )
Z(o.value) && Er(o.value, e);

@@ -590,3 +590,3 @@ }

n = e.propTypes;
else if (typeof e == "object" && (e.$$typeof === d || // Note: Memo only checks outer props here.
else if (typeof e == "object" && (e.$$typeof === f || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.

@@ -603,5 +603,5 @@ e.$$typeof === y))

var i = x(e);
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
}
typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}

@@ -614,10 +614,10 @@ }

if (t !== "children" && t !== "key") {
A(r), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", t), A(null);
A(r), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", t), A(null);
break;
}
}
r.ref !== null && (A(r), h("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
r.ref !== null && (A(r), p("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
}
}
function _r(r, e, n, t, i, u) {
function _r(r, e, n, t, i, s) {
{

@@ -629,7 +629,7 @@ var o = Ir(r);

var g = ee(i);
g ? a += g : a += br();
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, h("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);
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 = re(r, e, n, i, u);
var l = re(r, e, n, i, s);
if (l == null)

@@ -646,7 +646,7 @@ return l;

} else
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
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);
}
return r === b ? ae(l) : te(l), l;
return r === m ? ae(l) : te(l), l;
}

@@ -660,11 +660,12 @@ }

}
var ue = ie, se = oe;
N.Fragment = b, N.jsx = ue, N.jsxs = se;
var se = ie, ue = oe;
N.Fragment = m, N.jsx = se, N.jsxs = ue;
}()), N;
}
process.env.NODE_ENV === "production" ? Q.exports = de() : Q.exports = ve();
var S = Q.exports;
const pe = `:root {
process.env.NODE_ENV === "production" ? Q.exports = fe() : Q.exports = ve();
var j = Q.exports;
const he = `:root {
/* gray */
--hsd-ui-color-gray-300: #d1d5db;
--hsd-ui-color-gray-200: #e5e7eb;

@@ -680,9 +681,22 @@ /* radii */

0 2px 4px -2px rgb(0 0 0 / 0.1);
/* new root css */
/* border width */
--hsd-ui-accordion-border-width: var(--hsd-ui-border, 1px);
/* color */
--hsd-ui-accordion-primary-color: var(--hsd-ui-color-gray-300, #d1d5db);
--hsd-ui-accordion-secondary-color: var(--hsd-ui-color-gray-200, #e5e7eb);
/* border radius */
--hsd-ui-accordion-border-radius: var(--hsd-ui-radii-md, 6px);
}
.hudoro-accordion {
border-radius: var(--hsd-ui-radii-md);
border: 1px solid var(--hsd-ui-color-gray-300);
border-radius: var(--hsd-ui-accordion-border-radius);
border: var(--hsd-ui-accordion-border-width) solid
var(--hsd-ui-accordion-secondary-color);
background: var(--hsd-ui-color-gray-50);
box-shadow: var(--hsd-ui-shadow-md);
/* box-shadow: var(--hsd-ui-shadow-md); */
overflow: hidden;

@@ -702,3 +716,4 @@ }

.hudoro-accordion-button:hover {
background: var(--hsd-ui-color-gray-300);
background: #edf0f2;
/* background: var(--hsd-ui-color-gray-300); */
}

@@ -721,4 +736,7 @@ .hudoro-accordion-button,

transition: 0.3s;
border-bottom: 1px solid var(--hsd-ui-color-gray-300);
border-bottom: 1px solid var(--hsd-ui-accordion-secondary-color);
}
.hudoro-accordion-item:last-child {
border-bottom: none;
}
.hudoro-accordion-item.active {

@@ -740,32 +758,32 @@ transition: 0.3s;

}
`, Cr = "hudoro-accordion-styles", he = (m) => {
`, Cr = "hudoro-accordion-styles", pe = (b) => {
if (!document.getElementById(Cr)) {
const v = document.createElement("style");
v.id = Cr, v.textContent = m, document.head.appendChild(v);
v.id = Cr, v.textContent = b, document.head.appendChild(v);
}
};
he(pe);
const Or = ce({ allowMultiple: !1 }), me = ({ children: m, allowMultiple: v = !1 }) => {
const s = le([]), b = (f) => {
var C, R, d, w, p, y, _, P, F;
const O = (C = s.current) == null ? void 0 : C.find(
(L) => L === f
pe(he);
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
);
v ? O ? O && ((w = f.querySelector(".hudoro-accordion-arrow")) == null || w.classList.remove("hudoro-accordion-arrow-active"), f.classList.remove("active"), s.current = s.current.filter(
(L) => L !== f
)) : (f.classList.add("active"), (R = f.querySelector(".hudoro-accordion-arrow")) == null || R.classList.add("hudoro-accordion-arrow-active"), (d = s.current) == null || d.push(f)) : (p = s.current) != null && p.length ? s.current[0] === f ? ((y = s.current[0].querySelector(".hudoro-accordion-arrow")) == null || y.classList.remove("hudoro-accordion-arrow-active"), s.current[0].classList.remove("active"), s.current = []) : ((_ = s.current[0].querySelector(".hudoro-accordion-arrow")) == null || _.classList.remove("hudoro-accordion-arrow-active"), s.current[0].classList.remove("active"), s.current = [], f.classList.add("active"), s.current[0] = f, (P = s.current[0].querySelector(".hudoro-accordion-arrow")) == null || P.classList.add("hudoro-accordion-arrow-active")) : (f.classList.add("active"), (F = f.querySelector(".hudoro-accordion-arrow")) == null || F.classList.add("hudoro-accordion-arrow-active"), s.current.push(f));
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));
};
return /* @__PURE__ */ S.jsx(Or.Provider, { value: { allowMultiple: v, handlePushRef: b }, children: /* @__PURE__ */ S.jsx("div", { className: "hudoro-accordion", children: m }) });
}, be = ({ children: m }) => /* @__PURE__ */ S.jsx("div", { className: "hudoro-accordion-item", children: m }), ye = ({ children: m }) => {
const { handlePushRef: v } = fe(Or), s = (b) => {
b.currentTarget.parentElement && v && v(b.currentTarget.parentElement);
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__ */ S.jsxs(
return /* @__PURE__ */ j.jsxs(
"button",
{
className: "hudoro-accordion-button",
onClick: (b) => s(b),
onClick: (m) => u(m),
children: [
/* @__PURE__ */ S.jsx("div", { children: m }),
/* @__PURE__ */ S.jsx(
b,
/* @__PURE__ */ j.jsx(
"svg",

@@ -779,3 +797,3 @@ {

className: "hudoro-accordion-arrow",
children: /* @__PURE__ */ S.jsx(
children: /* @__PURE__ */ j.jsx(
"path",

@@ -795,3 +813,3 @@ {

);
}, Ee = ({ children: m }) => /* @__PURE__ */ S.jsx(
}, Ee = ({ children: b }) => /* @__PURE__ */ j.jsx(
"div",

@@ -801,10 +819,10 @@ {

onClick: (v) => v.stopPropagation(),
children: m
children: b
}
);
export {
me as Accordion,
be as Accordion,
ye as AccordionButton,
be as AccordionItem,
me as AccordionItem,
Ee as AccordionPanel
};

@@ -9,3 +9,3 @@ (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={};/**

* LICENSE file in the root directory of this source tree.
*/var nr;function jr(){if(nr)return I;nr=1;var m=x,v=Symbol.for("react.element"),s=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,f=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function P(_,d,T){var p,b={},w=null,k=null;T!==void 0&&(w=""+T),d.key!==void 0&&(w=""+d.key),d.ref!==void 0&&(k=d.ref);for(p in d)y.call(d,p)&&!j.hasOwnProperty(p)&&(b[p]=d[p]);if(_&&_.defaultProps)for(p in d=_.defaultProps,d)b[p]===void 0&&(b[p]=d[p]);return{$$typeof:v,type:_,key:w,ref:k,props:b,_owner:f.current}}return I.Fragment=s,I.jsx=P,I.jsxs=P,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"),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={};/**
* @license React

@@ -18,15 +18,16 @@ * 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 m=x,v=Symbol.for("react.element"),s=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),_=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=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=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(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 u=n.map(function(o){return String(o)});u.unshift("Warning: "+e),Function.prototype.apply.call(console[r],console,u)}}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===y||r===j||$r||r===f||r===T||r===p||Ur||r===k||Yr||Mr||Vr||typeof r=="object"&&r!==null&&(r.$$typeof===w||r.$$typeof===b||r.$$typeof===P||r.$$typeof===_||r.$$typeof===d||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 ur(r){return r.displayName||"Context"}function C(r){if(r==null)return null;if(typeof r.tag=="number"&&h("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 y:return"Fragment";case s:return"Portal";case j:return"Profiler";case f:return"StrictMode";case T:return"Suspense";case p:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case _:var e=r;return ur(e)+".Consumer";case P:var n=r;return ur(n._context)+".Provider";case d:return qr(r,r.render,"ForwardRef");case b:var t=r.displayName||null;return t!==null?t:C(r.type)||"Memo";case w:{var i=r,u=i._payload,o=i._init;try{return C(o(u))}catch{return null}}}return null}var A=Object.assign,M=0,sr,cr,lr,fr,dr,vr,pr;function hr(){}hr.__reactDisabledLog=!0;function Jr(){{if(M===0){sr=console.log,cr=console.info,lr=console.warn,fr=console.error,dr=console.group,vr=console.groupCollapsed,pr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:hr,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:cr}),warn:A({},r,{value:lr}),error:A({},r,{value:fr}),group:A({},r,{value:dr}),groupCollapsed:A({},r,{value:vr}),groupEnd:A({},r,{value:pr})})}M<0&&h("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 u;u=G.current,G.current=null,Jr();try{if(e){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(S){t=S}Reflect.construct(r,[],o)}else{try{o.call()}catch(S){t=S}r.call(o.prototype)}}else{try{throw Error()}catch(S){t=S}r()}}catch(S){if(S&&t&&typeof S.stack=="string"){for(var a=S.stack.split(`
*/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`
`+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(`
`),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)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"&&$.set(r,E),E}while(c>=1&&l>=0);break}}}finally{K=!1,G.current=u,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 p:return U("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case d:return Hr(r.render);case b:return B(r.type,e,n);case w:{var t=r,i=t._payload,u=t._init;try{return B(u(i),e,n)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,mr={},yr=D.ReactDebugCurrentFrame;function J(r){if(r){var e=r._owner,n=B(r.type,r._source,e?e.type:null);yr.setExtraStackFrame(n)}else yr.setExtraStackFrame(null)}function Xr(r,e,n,t,i){{var u=Function.call.bind(q);for(var o in r)if(u(r,o)){var a=void 0;try{if(typeof r[o]!="function"){var g=Error((t||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=r[o](e,o,t,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}a&&!(a instanceof Error)&&(J(i),h("%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),J(null)),a instanceof Error&&!(a.message in mr)&&(mr[a.message]=!0,J(i),h("Failed %s type: %s",n,a.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 br(r),!1}catch{return!0}}function br(r){return""+r}function Er(r){if(re(r))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qr(r)),br(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 ae(r,e){if(typeof r.ref=="string"&&V.current&&e&&V.current.stateNode!==e){var n=C(V.current.type);Z[n]||(h('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 oe(r,e){{var n=function(){Rr||(Rr=!0,h("%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,h("%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 ue=function(r,e,n,t,i,u,o){var a={$$typeof:v,type:r,key:e,ref:n,props:o,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:t}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function se(r,e,n,t,i){{var u,o={},a=null,g=null;n!==void 0&&(Er(n),a=""+n),te(e)&&(Er(e.key),a=""+e.key),ne(e)&&(g=e.ref,ae(e,i));for(u in e)q.call(e,u)&&!ee.hasOwnProperty(u)&&(o[u]=e[u]);if(r&&r.defaultProps){var c=r.defaultProps;for(u in c)o[u]===void 0&&(o[u]=c[u])}if(a||g){var l=typeof r=="function"?r.displayName||r.name||"Unknown":r;a&&oe(o,l),g&&ie(o,l)}return ue(r,a,g,i,t,V.current,o)}}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`
`),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`
Check the render method of \``+r+"`."}return""}}function ce(r){{if(r!==void 0){var e=r.fileName.replace(/^.*[\\\/]/,""),n=r.lineNumber;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 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),h('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 u=i.call(r),o;!(o=u.next()).done;)er(o.value)&&Cr(o.value,e)}}}function fe(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===d||e.$$typeof===b))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);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof e.getDefaultProps=="function"&&!e.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function de(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),h("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),h("Invalid attribute `ref` supplied to `React.Fragment`."),F(null))}}function Or(r,e,n,t,i,u){{var o=Br(r);if(!o){var a="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(a+=" 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=ce(i);g?a+=g:a+=xr();var c;r===null?c="null":X(r)?c="array":r!==void 0&&r.$$typeof===v?(c="<"+(C(r.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):c=typeof r,h("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=se(r,e,n,i,u);if(l==null)return l;if(o){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 h("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===y?de(l):fe(l),l}}function ve(r,e,n){return Or(r,e,n,!0)}function pe(r,e,n){return Or(r,e,n,!1)}var he=pe,ge=ve;W.Fragment=y,W.jsx=he,W.jsxs=ge}()),W}process.env.NODE_ENV==="production"?z.exports=jr():z.exports=kr();var O=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===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 {
/* gray */
--hsd-ui-color-gray-300: #d1d5db;
--hsd-ui-color-gray-200: #e5e7eb;

@@ -42,9 +43,22 @@ /* radii */

0 2px 4px -2px rgb(0 0 0 / 0.1);
/* new root css */
/* border width */
--hsd-ui-accordion-border-width: var(--hsd-ui-border, 1px);
/* color */
--hsd-ui-accordion-primary-color: var(--hsd-ui-color-gray-300, #d1d5db);
--hsd-ui-accordion-secondary-color: var(--hsd-ui-color-gray-200, #e5e7eb);
/* border radius */
--hsd-ui-accordion-border-radius: var(--hsd-ui-radii-md, 6px);
}
.hudoro-accordion {
border-radius: var(--hsd-ui-radii-md);
border: 1px solid var(--hsd-ui-color-gray-300);
border-radius: var(--hsd-ui-accordion-border-radius);
border: var(--hsd-ui-accordion-border-width) solid
var(--hsd-ui-accordion-secondary-color);
background: var(--hsd-ui-color-gray-50);
box-shadow: var(--hsd-ui-shadow-md);
/* box-shadow: var(--hsd-ui-shadow-md); */
overflow: hidden;

@@ -64,3 +78,4 @@ }

.hudoro-accordion-button:hover {
background: var(--hsd-ui-color-gray-300);
background: #edf0f2;
/* background: var(--hsd-ui-color-gray-300); */
}

@@ -83,4 +98,7 @@ .hudoro-accordion-button,

transition: 0.3s;
border-bottom: 1px solid var(--hsd-ui-color-gray-300);
border-bottom: 1px solid var(--hsd-ui-accordion-secondary-color);
}
.hudoro-accordion-item:last-child {
border-bottom: none;
}
.hudoro-accordion-item.active {

@@ -102,2 +120,2 @@ transition: 0.3s;

}
`,ar="hudoro-accordion-styles";(m=>{if(!document.getElementById(ar)){const v=document.createElement("style");v.id=ar,v.textContent=m,document.head.appendChild(v)}})(Ar);const or=x.createContext({allowMultiple:!1}),Dr=({children:m,allowMultiple:v=!1})=>{const s=x.useRef([]),y=f=>{var P,_,d,T,p,b,w,k,N;const j=(P=s.current)==null?void 0:P.find(Y=>Y===f);v?j?j&&((T=f.querySelector(".hudoro-accordion-arrow"))==null||T.classList.remove("hudoro-accordion-arrow-active"),f.classList.remove("active"),s.current=s.current.filter(Y=>Y!==f)):(f.classList.add("active"),(_=f.querySelector(".hudoro-accordion-arrow"))==null||_.classList.add("hudoro-accordion-arrow-active"),(d=s.current)==null||d.push(f)):(p=s.current)!=null&&p.length?s.current[0]===f?((b=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||b.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=[],f.classList.add("active"),s.current[0]=f,(k=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||k.classList.add("hudoro-accordion-arrow-active")):(f.classList.add("active"),(N=f.querySelector(".hudoro-accordion-arrow"))==null||N.classList.add("hudoro-accordion-arrow-active"),s.current.push(f))};return O.jsx(or.Provider,{value:{allowMultiple:v,handlePushRef:y},children:O.jsx("div",{className:"hudoro-accordion",children:m})})},Fr=({children:m})=>O.jsx("div",{className:"hudoro-accordion-item",children:m}),Lr=({children:m})=>{const{handlePushRef:v}=x.useContext(or),s=y=>{y.currentTarget.parentElement&&v&&v(y.currentTarget.parentElement)};return O.jsxs("button",{className:"hudoro-accordion-button",onClick:y=>s(y),children:[O.jsx("div",{children:m}),O.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:O.jsx("path",{d:"M4 9.5L12 17.5L20 9.5",stroke:"#111827",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})},Ir=({children:m})=>O.jsx("div",{className:"hudoro-accordion-panel",onClick:v=>v.stopPropagation(),children:m});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([]),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"})});
{
"name": "@hudoro/accordion",
"version": "0.0.1-beta.5",
"version": "0.0.1-beta.6",
"description": "Accordion component for Hudoro UI",

@@ -5,0 +5,0 @@ "author": "Prawito Hudoro",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc