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.10 to 0.0.1-beta.11

5

dist/Accordion.d.ts

@@ -1,3 +0,4 @@

import React from "react";
import { IAccordion, IAccordionButton, IAccordionItem, IAccordionPanel } from "./types";
import { default as React } from 'react';
import { IAccordion, IAccordionButton, IAccordionItem, IAccordionPanel } from './types';
export declare const Accordion: ({ children, allowMultiple }: IAccordion) => React.JSX.Element;

@@ -4,0 +5,0 @@ export declare const AccordionItem: ({ children }: IAccordionItem) => React.JSX.Element;

439

dist/accordion.es.js

@@ -1,3 +0,3 @@

import Sr, { createContext as ce, useRef as le, useContext as fe } from "react";
var Q = { exports: {} }, $ = {};
import Or, { createContext as de, useRef as ve, useContext as pe } from "react";
var Q = { exports: {} }, Y = {};
/**

@@ -12,19 +12,15 @@ * @license React

*/
var xr;
function de() {
if (xr)
return $;
xr = 1;
var m = Sr, v = Symbol.for("react.element"), c = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, s = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
function C(R, d, w) {
var h, b = {}, _ = null, P = null;
w !== void 0 && (_ = "" + w), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (P = d.ref);
for (h in d)
E.call(d, h) && !S.hasOwnProperty(h) && (b[h] = d[h]);
if (R && R.defaultProps)
for (h in d = R.defaultProps, d)
b[h] === void 0 && (b[h] = d[h]);
return { $$typeof: v, type: R, key: _, ref: P, props: b, _owner: s.current };
var Tr;
function he() {
if (Tr) return Y;
Tr = 1;
var y = Or, v = Symbol.for("react.element"), c = Symbol.for("react.fragment"), R = Object.prototype.hasOwnProperty, s = y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
function T(_, d, x) {
var p, m = {}, w = null, O = null;
x !== void 0 && (w = "" + x), d.key !== void 0 && (w = "" + d.key), d.ref !== void 0 && (O = d.ref);
for (p in d) R.call(d, p) && !S.hasOwnProperty(p) && (m[p] = d[p]);
if (_ && _.defaultProps) for (p in d = _.defaultProps, d) m[p] === void 0 && (m[p] = d[p]);
return { $$typeof: v, type: _, key: w, ref: O, props: m, _owner: s.current };
}
return $.Fragment = c, $.jsx = C, $.jsxs = C, $;
return Y.Fragment = c, Y.jsx = T, Y.jsxs = T, Y;
}

@@ -41,23 +37,23 @@ var N = {};

*/
var Tr;
function ve() {
return Tr || (Tr = 1, process.env.NODE_ENV !== "production" && function() {
var m = 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"), d = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), F = Symbol.iterator, L = "@@iterator";
function Or(r) {
var Cr;
function ge() {
return Cr || (Cr = 1, process.env.NODE_ENV !== "production" && function() {
var y = Or, v = Symbol.for("react.element"), c = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), _ = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), L = Symbol.iterator, I = "@@iterator";
function jr(r) {
if (r === null || typeof r != "object")
return null;
var e = F && r[F] || r[L];
var e = L && r[L] || r[I];
return typeof e == "function" ? e : null;
}
var k = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function p(r) {
var A = y.__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];
jr("error", r, n);
kr("error", r, n);
}
}
function jr(r, e, n) {
function kr(r, e, n) {
{
var t = k.ReactDebugCurrentFrame, i = t.getStackAddendum();
var t = A.ReactDebugCurrentFrame, i = t.getStackAddendum();
i !== "" && (e += "%s", n = n.concat([i]));

@@ -70,6 +66,6 @@ var u = n.map(function(o) {

}
var kr = !1, Ar = !1, Dr = !1, Fr = !1, Lr = !1, rr;
var Ar = !1, Dr = !1, Fr = !1, Lr = !1, Ir = !1, rr;
rr = Symbol.for("react.module.reference");
function Ir(r) {
return !!(typeof r == "string" || typeof r == "function" || r === E || r === S || Lr || r === s || r === w || r === h || Fr || r === P || kr || Ar || Dr || typeof r == "object" && r !== null && (r.$$typeof === _ || r.$$typeof === b || r.$$typeof === C || r.$$typeof === R || r.$$typeof === d || // This needs to include all possible module reference object
function $r(r) {
return !!(typeof r == "string" || typeof r == "function" || r === R || r === S || Ir || r === s || r === x || r === p || Lr || r === O || Ar || Dr || Fr || typeof r == "object" && r !== null && (r.$$typeof === w || r.$$typeof === m || r.$$typeof === T || r.$$typeof === _ || r.$$typeof === d || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since

@@ -90,6 +86,6 @@ // we don't know which Flight build this will end up being used

}
function x(r) {
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")
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;

@@ -99,3 +95,3 @@ if (typeof r == "string")

switch (r) {
case E:
case R:
return "Fragment";

@@ -108,5 +104,5 @@ case c:

return "StrictMode";
case w:
case x:
return "Suspense";
case h:
case p:
return "SuspenseList";

@@ -116,6 +112,6 @@ }

switch (r.$$typeof) {
case R:
case _:
var e = r;
return er(e) + ".Consumer";
case C:
case T:
var n = r;

@@ -125,9 +121,9 @@ return er(n._context) + ".Provider";

return Wr(r, r.render, "ForwardRef");
case b:
case m:
var t = r.displayName || null;
return t !== null ? t : x(r.type) || "Memo";
case _: {
return t !== null ? t : C(r.type) || "Memo";
case w: {
var i = r, u = i._payload, o = i._init;
try {
return x(o(u));
return C(o(u));
} catch {

@@ -140,9 +136,9 @@ return null;

}
var O = Object.assign, I = 0, nr, tr, ar, or, ir, ur, sr;
var P = Object.assign, $ = 0, nr, tr, ar, or, ir, ur, sr;
function cr() {
}
cr.__reactDisabledLog = !0;
function $r() {
function Yr() {
{
if (I === 0) {
if ($ === 0) {
nr = console.log, tr = console.info, ar = console.warn, or = console.error, ir = console.group, ur = console.groupCollapsed, sr = console.groupEnd;

@@ -165,3 +161,3 @@ var r = {

}
I++;
$++;
}

@@ -171,3 +167,3 @@ }

{
if (I--, I === 0) {
if ($--, $ === 0) {
var r = {

@@ -179,21 +175,21 @@ configurable: !0,

Object.defineProperties(console, {
log: O({}, r, {
log: P({}, r, {
value: nr
}),
info: O({}, r, {
info: P({}, r, {
value: tr
}),
warn: O({}, r, {
warn: P({}, r, {
value: ar
}),
error: O({}, r, {
error: P({}, r, {
value: or
}),
group: O({}, r, {
group: P({}, r, {
value: ir
}),
groupCollapsed: O({}, r, {
groupCollapsed: P({}, r, {
value: ur
}),
groupEnd: O({}, r, {
groupEnd: P({}, r, {
value: sr

@@ -203,7 +199,7 @@ })

}
I < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
$ < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var B = k.ReactCurrentDispatcher, J;
function Y(r, e, n) {
var B = A.ReactCurrentDispatcher, J;
function M(r, e, n) {
{

@@ -221,12 +217,12 @@ if (J === void 0)

}
var z = !1, M;
var K = !1, V;
{
var Yr = typeof WeakMap == "function" ? WeakMap : Map;
M = new Yr();
var Mr = typeof WeakMap == "function" ? WeakMap : Map;
V = new Mr();
}
function lr(r, e) {
if (!r || z)
if (!r || K)
return "";
{
var n = M.get(r);
var n = V.get(r);
if (n !== void 0)

@@ -236,7 +232,7 @@ return n;

var t;
z = !0;
K = !0;
var i = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var u;
u = B.current, B.current = null, $r();
u = B.current, B.current = null, Yr();
try {

@@ -254,4 +250,4 @@ if (e) {

Reflect.construct(o, []);
} catch (T) {
t = T;
} catch (b) {
t = b;
}

@@ -262,4 +258,4 @@ Reflect.construct(r, [], o);

o.call();
} catch (T) {
t = T;
} catch (b) {
t = b;
}

@@ -271,10 +267,10 @@ r.call(o.prototype);

throw Error();
} catch (T) {
t = T;
} catch (b) {
t = b;
}
r();
}
} catch (T) {
if (T && t && typeof T.stack == "string") {
for (var a = T.stack.split(`
} catch (b) {
if (b && t && typeof b.stack == "string") {
for (var a = b.stack.split(`
`), g = t.stack.split(`

@@ -288,5 +284,5 @@ `), l = a.length - 1, f = g.length - 1; l >= 1 && f >= 0 && a[l] !== g[f]; )

if (l--, f--, f < 0 || a[l] !== g[f]) {
var y = `
var E = `
` + 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;
return r.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", r.displayName)), typeof r == "function" && V.set(r, E), E;
}

@@ -298,26 +294,26 @@ while (l >= 1 && f >= 0);

} finally {
z = !1, B.current = u, Nr(), Error.prepareStackTrace = i;
K = !1, B.current = u, Nr(), Error.prepareStackTrace = i;
}
var D = r ? r.displayName || r.name : "", wr = D ? Y(D) : "";
return typeof r == "function" && M.set(r, wr), wr;
var F = r ? r.displayName || r.name : "", j = F ? M(F) : "";
return typeof r == "function" && V.set(r, j), j;
}
function Mr(r, e, n) {
function Vr(r, e, n) {
return lr(r, !1);
}
function Vr(r) {
function Ur(r) {
var e = r.prototype;
return !!(e && e.isReactComponent);
}
function V(r, e, n) {
function U(r, e, n) {
if (r == null)
return "";
if (typeof r == "function")
return lr(r, Vr(r));
return lr(r, Ur(r));
if (typeof r == "string")
return Y(r);
return M(r);
switch (r) {
case w:
return Y("Suspense");
case h:
return Y("SuspenseList");
case x:
return M("Suspense");
case p:
return M("SuspenseList");
}

@@ -327,9 +323,9 @@ if (typeof r == "object")

case d:
return Mr(r.render);
case b:
return V(r.type, e, n);
case _: {
return Vr(r.render);
case m:
return U(r.type, e, n);
case w: {
var t = r, i = t._payload, u = t._init;
try {
return V(u(i), e, n);
return U(u(i), e, n);
} catch {

@@ -341,6 +337,6 @@ }

}
var U = Object.prototype.hasOwnProperty, fr = {}, dr = k.ReactDebugCurrentFrame;
var W = Object.prototype.hasOwnProperty, fr = {}, dr = A.ReactDebugCurrentFrame;
function q(r) {
if (r) {
var e = r._owner, n = V(r.type, r._source, e ? e.type : null);
var e = r._owner, n = U(r.type, r._source, e ? e.type : null);
dr.setExtraStackFrame(n);

@@ -350,5 +346,5 @@ } else

}
function Ur(r, e, n, t, i) {
function qr(r, e, n, t, i) {
{
var u = Function.call.bind(U);
var u = Function.call.bind(W);
for (var o in r)

@@ -366,11 +362,11 @@ if (u(r, o)) {

}
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 fr) && (fr[a.message] = !0, q(i), p("Failed %s type: %s", n, a.message), q(null));
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));
}
}
}
var qr = Array.isArray;
function G(r) {
return qr(r);
var Br = Array.isArray;
function z(r) {
return Br(r);
}
function Br(r) {
function Jr(r) {
{

@@ -381,3 +377,3 @@ var e = typeof Symbol == "function" && Symbol.toStringTag, n = e && r[Symbol.toStringTag] || r.constructor.name || "Object";

}
function Jr(r) {
function Kr(r) {
try {

@@ -392,7 +388,7 @@ return vr(r), !1;

}
function hr(r) {
if (Jr(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);
function pr(r) {
if (Kr(r))
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Jr(r)), vr(r);
}
var W = k.ReactCurrentOwner, zr = {
var hr = A.ReactCurrentOwner, zr = {
key: !0,

@@ -402,6 +398,5 @@ ref: !0,

__source: !0
}, pr, gr, K;
K = {};
}, gr, br;
function Gr(r) {
if (U.call(r, "ref")) {
if (W.call(r, "ref")) {
var e = Object.getOwnPropertyDescriptor(r, "ref").get;

@@ -413,4 +408,4 @@ if (e && e.isReactWarning)

}
function Kr(r) {
if (U.call(r, "key")) {
function Xr(r) {
if (W.call(r, "key")) {
var e = Object.getOwnPropertyDescriptor(r, "key").get;

@@ -423,11 +418,8 @@ if (e && e.isReactWarning)

function Hr(r, e) {
if (typeof r.ref == "string" && W.current && e && W.current.stateNode !== e) {
var n = x(W.current.type);
K[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), K[n] = !0);
}
typeof r.ref == "string" && hr.current;
}
function Xr(r, e) {
function Zr(r, e) {
{
var n = function() {
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));
gr || (gr = !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));
};

@@ -440,6 +432,6 @@ n.isReactWarning = !0, Object.defineProperty(r, "key", {

}
function Zr(r, e) {
function Qr(r, e) {
{
var n = function() {
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));
br || (br = !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));
};

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

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

@@ -482,8 +474,8 @@ // This tag allows us to uniquely identify this as a React Element

};
function re(r, e, n, t, i) {
function ee(r, e, n, t, i) {
{
var u, o = {}, a = null, g = null;
n !== void 0 && (hr(n), a = "" + n), Kr(e) && (hr(e.key), a = "" + e.key), Gr(e) && (g = e.ref, Hr(e, i));
n !== void 0 && (pr(n), a = "" + n), Xr(e) && (pr(e.key), a = "" + e.key), Gr(e) && (g = e.ref, Hr(e, i));
for (u in e)
U.call(e, u) && !zr.hasOwnProperty(u) && (o[u] = e[u]);
W.call(e, u) && !zr.hasOwnProperty(u) && (o[u] = e[u]);
if (r && r.defaultProps) {

@@ -496,24 +488,24 @@ var l = r.defaultProps;

var f = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
a && Xr(o, f), g && Zr(o, f);
a && Zr(o, f), g && Qr(o, f);
}
return Qr(r, a, g, i, t, W.current, o);
return re(r, a, g, i, t, hr.current, o);
}
}
var H = k.ReactCurrentOwner, mr = k.ReactDebugCurrentFrame;
function A(r) {
var G = A.ReactCurrentOwner, yr = A.ReactDebugCurrentFrame;
function D(r) {
if (r) {
var e = r._owner, n = V(r.type, r._source, e ? e.type : null);
mr.setExtraStackFrame(n);
var e = r._owner, n = U(r.type, r._source, e ? e.type : null);
yr.setExtraStackFrame(n);
} else
mr.setExtraStackFrame(null);
yr.setExtraStackFrame(null);
}
var X;
X = !1;
function Z(r) {
function H(r) {
return typeof r == "object" && r !== null && r.$$typeof === v;
}
function br() {
function mr() {
{
if (H.current) {
var r = x(H.current.type);
if (G.current) {
var r = C(G.current.type);
if (r)

@@ -527,17 +519,9 @@ return `

}
function ee(r) {
{
if (r !== void 0) {
var e = r.fileName.replace(/^.*[\\\/]/, ""), n = r.lineNumber;
return `
Check your code at ` + e + ":" + n + ".";
}
return "";
}
function ne(r) {
return "";
}
var yr = {};
function ne(r) {
var Er = {};
function te(r) {
{
var e = br();
var e = mr();
if (!e) {

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

}
function Er(r, e) {
function Rr(r, e) {
{

@@ -558,30 +542,30 @@ if (!r._store || r._store.validated || r.key != null)

r._store.validated = !0;
var n = ne(e);
if (yr[n])
var n = te(e);
if (Er[n])
return;
yr[n] = !0;
Er[n] = !0;
var t = "";
r && r._owner && r._owner !== H.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);
r && r._owner && r._owner !== G.current && (t = " It was passed a child from " + C(r._owner.type) + "."), D(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), D(null);
}
}
function Rr(r, e) {
function _r(r, e) {
{
if (typeof r != "object")
return;
if (G(r))
if (z(r))
for (var n = 0; n < r.length; n++) {
var t = r[n];
Z(t) && Er(t, e);
H(t) && Rr(t, e);
}
else if (Z(r))
else if (H(r))
r._store && (r._store.validated = !0);
else if (r) {
var i = Or(r);
var i = jr(r);
if (typeof i == "function" && i !== r.entries)
for (var u = i.call(r), o; !(o = u.next()).done; )
Z(o.value) && Er(o.value, e);
H(o.value) && Rr(o.value, e);
}
}
}
function te(r) {
function ae(r) {
{

@@ -596,3 +580,3 @@ var e = r.type;

// Inner props are checked in the reconciler.
e.$$typeof === b))
e.$$typeof === m))
n = e.propTypes;

@@ -602,13 +586,13 @@ else

if (n) {
var t = x(e);
Ur(n, r.props, "prop", t, r);
var t = C(e);
qr(n, r.props, "prop", t, r);
} else if (e.PropTypes !== void 0 && !X) {
X = !0;
var i = x(e);
p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
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 && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
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 ae(r) {
function oe(r) {
{

@@ -618,52 +602,67 @@ for (var e = Object.keys(r.props), n = 0; n < e.length; n++) {

if (t !== "children" && t !== "key") {
A(r), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", t), A(null);
D(r), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", t), D(null);
break;
}
}
r.ref !== null && (A(r), p("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
r.ref !== null && (D(r), h("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
}
}
function _r(r, e, n, t, i, u) {
var wr = {};
function xr(r, e, n, t, i, u) {
{
var o = Ir(r);
var o = $r(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 = ee(i);
g ? a += g : a += br();
var g = ne();
g ? a += g : a += mr();
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);
r === null ? l = "null" : z(r) ? l = "array" : r !== void 0 && r.$$typeof === v ? (l = "<" + (C(r.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = 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", l, a);
}
var f = re(r, e, n, i, u);
var f = ee(r, e, n, i, u);
if (f == null)
return f;
if (o) {
var y = e.children;
if (y !== void 0)
var E = e.children;
if (E !== void 0)
if (t)
if (G(y)) {
for (var D = 0; D < y.length; D++)
Rr(y[D], r);
Object.freeze && Object.freeze(y);
if (z(E)) {
for (var F = 0; F < E.length; F++)
_r(E[F], 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.");
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
Rr(y, r);
_r(E, r);
}
return r === E ? ae(f) : te(f), f;
if (W.call(e, "key")) {
var j = C(r), b = Object.keys(e).filter(function(fe) {
return fe !== "key";
}), Z = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
if (!wr[j + Z]) {
var le = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
h(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`, Z, j, le, j), wr[j + Z] = !0;
}
}
return r === R ? oe(f) : ae(f), f;
}
}
function oe(r, e, n) {
return _r(r, e, n, !0);
}
function ie(r, e, n) {
return _r(r, e, n, !1);
return xr(r, e, n, !0);
}
var ue = ie, se = oe;
N.Fragment = E, N.jsx = ue, N.jsxs = se;
function ue(r, e, n) {
return xr(r, e, n, !1);
}
var se = ue, ce = ie;
N.Fragment = R, N.jsx = se, N.jsxs = ce;
}()), N;
}
process.env.NODE_ENV === "production" ? Q.exports = de() : Q.exports = ve();
var j = Q.exports;
const he = `.hudoro-accordion {
process.env.NODE_ENV === "production" ? Q.exports = he() : Q.exports = ge();
var k = Q.exports;
const be = `.hudoro-accordion {
border-radius: var(--hsd-ui-radii-md, 6px);

@@ -726,35 +725,35 @@ border: var(--hsd-ui-border, 1px) solid var(--hsd-ui-color-gray-200, #e5e7eb);

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

@@ -768,3 +767,3 @@ {

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

@@ -784,3 +783,3 @@ {

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

@@ -790,10 +789,10 @@ {

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

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

(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={};/**
(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 K={exports:{}},W={};/**
* @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 m=x,v=Symbol.for("react.element"),s=Symbol.for("react.fragment"),R=Object.prototype.hasOwnProperty,c=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 h,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(h in d)R.call(d,h)&&!j.hasOwnProperty(h)&&(b[h]=d[h]);if(_&&_.defaultProps)for(h in d=_.defaultProps,d)b[h]===void 0&&(b[h]=d[h]);return{$$typeof:v,type:_,key:w,ref:k,props:b,_owner:c.current}}return I.Fragment=s,I.jsx=P,I.jsxs=P,I}var W={};/**
*/var ne;function ke(){if(ne)return W;ne=1;var b=x,v=Symbol.for("react.element"),s=Symbol.for("react.fragment"),_=Object.prototype.hasOwnProperty,c=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function C(w,d,S){var p,m={},T=null,k=null;S!==void 0&&(T=""+S),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(k=d.ref);for(p in d)_.call(d,p)&&!j.hasOwnProperty(p)&&(m[p]=d[p]);if(w&&w.defaultProps)for(p in d=w.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:v,type:w,key:T,ref:k,props:m,_owner:c.current}}return W.Fragment=s,W.jsx=C,W.jsxs=C,W}var Y={};/**
* @license React

@@ -18,13 +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"),R=Symbol.for("react.fragment"),c=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"),h=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 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 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===R||r===j||$r||r===c||r===T||r===h||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"&&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 c:return"StrictMode";case T:return"Suspense";case h: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,cr,sr,lr,fr,dr,vr,hr;function pr(){}pr.__reactDisabledLog=!0;function Jr(){{if(M===0){cr=console.log,sr=console.info,lr=console.warn,fr=console.error,dr=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:cr}),info:A({},r,{value:sr}),warn:A({},r,{value:lr}),error:A({},r,{value:fr}),group:A({},r,{value:dr}),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,K;function U(r,e,n){{if(K===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);K=t&&t[1]||""}return`
`+K+r}}var H=!1,$;{var Gr=typeof WeakMap=="function"?WeakMap:Map;$=new Gr}function gr(r,e){if(!r||H)return"";{var n=$.get(r);if(n!==void 0)return n}var t;H=!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 te;function Ae(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var b=x,v=Symbol.for("react.element"),s=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),w=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),M=Symbol.iterator,N="@@iterator";function Ye(e){if(e===null||typeof e!="object")return null;var r=M&&e[M]||e[N];return typeof r=="function"?r:null}var F=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];Me("error",e,n)}}function Me(e,r,n){{var t=F.ReactDebugCurrentFrame,i=t.getStackAddendum();i!==""&&(r+="%s",n=n.concat([i]));var u=n.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Ne=!1,Ve=!1,Ue=!1,$e=!1,Be=!1,ie;ie=Symbol.for("react.module.reference");function qe(e){return!!(typeof e=="string"||typeof e=="function"||e===_||e===j||Be||e===c||e===S||e===p||$e||e===k||Ne||Ve||Ue||typeof e=="object"&&e!==null&&(e.$$typeof===T||e.$$typeof===m||e.$$typeof===C||e.$$typeof===w||e.$$typeof===d||e.$$typeof===ie||e.getModuleId!==void 0))}function Je(e,r,n){var t=e.displayName;if(t)return t;var i=r.displayName||r.name||"";return i!==""?n+"("+i+")":n}function ue(e){return e.displayName||"Context"}function P(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case s:return"Portal";case j:return"Profiler";case c:return"StrictMode";case S:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case w:var r=e;return ue(r)+".Consumer";case C:var n=e;return ue(n._context)+".Provider";case d:return Je(e,e.render,"ForwardRef");case m:var t=e.displayName||null;return t!==null?t:P(e.type)||"Memo";case T:{var i=e,u=i._payload,o=i._init;try{return P(o(u))}catch{return null}}}return null}var A=Object.assign,V=0,ce,se,le,fe,de,ve,pe;function he(){}he.__reactDisabledLog=!0;function Ke(){{if(V===0){ce=console.log,se=console.info,le=console.warn,fe=console.error,de=console.group,ve=console.groupCollapsed,pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function ze(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:ce}),info:A({},e,{value:se}),warn:A({},e,{value:le}),error:A({},e,{value:fe}),group:A({},e,{value:de}),groupCollapsed:A({},e,{value:ve}),groupEnd:A({},e,{value:pe})})}V<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=F.ReactCurrentDispatcher,G;function $(e,r,n){{if(G===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);G=t&&t[1]||""}return`
`+G+e}}var X=!1,B;{var Ge=typeof WeakMap=="function"?WeakMap:Map;B=new Ge}function ge(e,r){if(!e||X)return"";{var n=B.get(e);if(n!==void 0)return n}var t;X=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=z.current,z.current=null,Ke();try{if(r){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(y){t=y}Reflect.construct(e,[],o)}else{try{o.call()}catch(y){t=y}e.call(o.prototype)}}else{try{throw Error()}catch(y){t=y}e()}}catch(y){if(y&&t&&typeof y.stack=="string"){for(var a=y.stack.split(`
`),g=t.stack.split(`
`),l=a.length-1,f=g.length-1;l>=1&&f>=0&&a[l]!==g[f];)f--;for(;l>=1&&f>=0;l--,f--)if(a[l]!==g[f]){if(l!==1||f!==1)do if(l--,f--,f<0||a[l]!==g[f]){var y=`
`+a[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&&f>=0);break}}}finally{H=!1,G.current=u,zr(),Error.prepareStackTrace=i}var L=r?r.displayName||r.name:"",Or=L?U(L):"";return typeof r=="function"&&$.set(r,Or),Or}function Kr(r,e,n){return gr(r,!1)}function Hr(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,Hr(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 d:return Kr(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={},br=D.ReactDebugCurrentFrame;function J(r){if(r){var e=r._owner,n=B(r.type,r._source,e?e.type:null);br.setExtraStackFrame(n)}else br.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(l){a=l}a&&!(a 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,o,typeof a),J(null)),a instanceof Error&&!(a.message in mr)&&(mr[a.message]=!0,J(i),p("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 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 ae(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 oe(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 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 ce(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 l=r.defaultProps;for(u in l)o[u]===void 0&&(o[u]=l[u])}if(a||g){var f=typeof r=="function"?r.displayName||r.name||"Unknown":r;a&&oe(o,f),g&&ie(o,f)}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`
`),l=a.length-1,f=g.length-1;l>=1&&f>=0&&a[l]!==g[f];)f--;for(;l>=1&&f>=0;l--,f--)if(a[l]!==g[f]){if(l!==1||f!==1)do if(l--,f--,f<0||a[l]!==g[f]){var E=`
`+a[l].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,E),E}while(l>=1&&f>=0);break}}}finally{X=!1,z.current=u,ze(),Error.prepareStackTrace=i}var I=e?e.displayName||e.name:"",D=I?$(I):"";return typeof e=="function"&&B.set(e,D),D}function Xe(e,r,n){return ge(e,!1)}function He(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function q(e,r,n){if(e==null)return"";if(typeof e=="function")return ge(e,He(e));if(typeof e=="string")return $(e);switch(e){case S:return $("Suspense");case p:return $("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Xe(e.render);case m:return q(e.type,r,n);case T:{var t=e,i=t._payload,u=t._init;try{return q(u(i),r,n)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,ye={},be=F.ReactDebugCurrentFrame;function J(e){if(e){var r=e._owner,n=q(e.type,e._source,r?r.type:null);be.setExtraStackFrame(n)}else be.setExtraStackFrame(null)}function Ze(e,r,n,t,i){{var u=Function.call.bind(U);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[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 e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=e[o](r,o,t,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(l){a=l}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 ye)&&(ye[a.message]=!0,J(i),h("Failed %s type: %s",n,a.message),J(null))}}}var Qe=Array.isArray;function H(e){return Qe(e)}function er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function rr(e){try{return me(e),!1}catch{return!0}}function me(e){return""+e}function Ee(e){if(rr(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",er(e)),me(e)}var Re=F.ReactCurrentOwner,nr={key:!0,ref:!0,__self:!0,__source:!0},_e,we;function tr(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ar(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function or(e,r){typeof e.ref=="string"&&Re.current}function ir(e,r){{var n=function(){_e||(_e=!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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}}function ur(e,r){{var n=function(){we||(we=!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)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}}var cr=function(e,r,n,t,i,u,o){var a={$$typeof:v,type:e,key:r,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 sr(e,r,n,t,i){{var u,o={},a=null,g=null;n!==void 0&&(Ee(n),a=""+n),ar(r)&&(Ee(r.key),a=""+r.key),tr(r)&&(g=r.ref,or(r,i));for(u in r)U.call(r,u)&&!nr.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var l=e.defaultProps;for(u in l)o[u]===void 0&&(o[u]=l[u])}if(a||g){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ir(o,f),g&&ur(o,f)}return cr(e,a,g,i,t,Re.current,o)}}var Z=F.ReactCurrentOwner,Te=F.ReactDebugCurrentFrame;function L(e){if(e){var r=e._owner,n=q(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(n)}else Te.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===v}function xe(){{if(Z.current){var e=P(Z.current.type);if(e)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 the render method of \``+e+"`."}return""}}function lr(e){return""}var Se={};function fr(e){{var r=xe();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
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 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);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 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),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 Pr(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=se(i);g?a+=g:a+=xr();var l;r===null?l="null":X(r)?l="array":r!==void 0&&r.$$typeof===v?(l="<"+(C(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 f=ce(r,e,n,i,u);if(f==null)return f;if(o){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?de(f):fe(f),f}}function ve(r,e,n){return Pr(r,e,n,!0)}function he(r,e,n){return Pr(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 O=z.exports;const Ar=`.hudoro-accordion {
Check the top-level render call using <`+n+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var n=fr(r);if(Se[n])return;Se[n]=!0;var t="";e&&e._owner&&e._owner!==Z.current&&(t=" It was passed a child from "+P(e._owner.type)+"."),L(e),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),L(null)}}function Pe(e,r){{if(typeof e!="object")return;if(H(e))for(var n=0;n<e.length;n++){var t=e[n];ee(t)&&Ce(t,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var i=Ye(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)ee(o.value)&&Ce(o.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===m))n=r.propTypes;else return;if(n){var t=P(r);Ze(n,e.props,"prop",t,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var i=P(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var t=r[n];if(t!=="children"&&t!=="key"){L(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",t),L(null);break}}e.ref!==null&&(L(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}var Oe={};function je(e,r,n,t,i,u){{var o=qe(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).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=lr();g?a+=g:a+=xe();var l;e===null?l="null":H(e)?l="array":e!==void 0&&e.$$typeof===v?(l="<"+(P(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):l=typeof e,h("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 f=sr(e,r,n,i,u);if(f==null)return f;if(o){var E=r.children;if(E!==void 0)if(t)if(H(E)){for(var I=0;I<E.length;I++)Pe(E[I],e);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 Pe(E,e)}if(U.call(r,"key")){var D=P(e),y=Object.keys(r).filter(function(mr){return mr!=="key"}),re=y.length>0?"{key: someKey, "+y.join(": ..., ")+": ...}":"{key: someKey}";if(!Oe[D+re]){var br=y.length>0?"{"+y.join(": ..., ")+": ...}":"{}";h(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,re,D,br,D),Oe[D+re]=!0}}return e===_?vr(f):dr(f),f}}function pr(e,r,n){return je(e,r,n,!0)}function hr(e,r,n){return je(e,r,n,!1)}var gr=hr,yr=pr;Y.Fragment=_,Y.jsx=gr,Y.jsxs=yr}()),Y}process.env.NODE_ENV==="production"?K.exports=ke():K.exports=Ae();var O=K.exports;const De=`.hudoro-accordion {
border-radius: var(--hsd-ui-radii-md, 6px);

@@ -87,2 +90,2 @@ border: var(--hsd-ui-border, 1px) solid var(--hsd-ui-color-gray-200, #e5e7eb);

}
`,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([]),R=c=>{var P,_,d,T,h,b,w,k,N;const j=(P=s.current)==null?void 0:P.find(Y=>Y===c);v?j?j&&((T=c.querySelector(".hudoro-accordion-arrow"))==null||T.classList.remove("hudoro-accordion-arrow-active"),c.classList.remove("active"),s.current=s.current.filter(Y=>Y!==c)):(c.classList.add("active"),(_=c.querySelector(".hudoro-accordion-arrow"))==null||_.classList.add("hudoro-accordion-arrow-active"),(d=s.current)==null||d.push(c)):(h=s.current)!=null&&h.length?s.current[0]===c?((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=[],c.classList.add("active"),s.current[0]=c,(k=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||k.classList.add("hudoro-accordion-arrow-active")):(c.classList.add("active"),(N=c.querySelector(".hudoro-accordion-arrow"))==null||N.classList.add("hudoro-accordion-arrow-active"),s.current.push(c))};return O.jsx(or.Provider,{value:{allowMultiple:v,handlePushRef:R},children:O.jsx("div",{className:"hudoro-accordion",children:m})})},Fr=({children:m})=>O.jsx("div",{className:"hudoro-accordion-item",children:m}),Lr=({children:m,expand:v=!0})=>{const{handlePushRef:s}=x.useContext(or),R=c=>{c.currentTarget.parentElement&&s&&s(c.currentTarget.parentElement)};return O.jsxs("button",{className:"hudoro-accordion-button",onClick:c=>v?R(c):{},children:[m,v?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"})}):null]})},Ir=({children:m})=>O.jsx("div",{className:"hudoro-accordion-panel",onClick:v=>v.stopPropagation(),children:m});E.Accordion=Dr,E.AccordionButton=Lr,E.AccordionItem=Fr,E.AccordionPanel=Ir,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
`,ae="hudoro-accordion-styles";(b=>{if(!document.getElementById(ae)){const v=document.createElement("style");v.id=ae,v.textContent=b,document.head.appendChild(v)}})(De);const oe=x.createContext({allowMultiple:!1}),Fe=({children:b,allowMultiple:v=!1})=>{const s=x.useRef([]),_=c=>{var C,w,d,S,p,m,T,k,M;const j=(C=s.current)==null?void 0:C.find(N=>N===c);v?j?j&&((S=c.querySelector(".hudoro-accordion-arrow"))==null||S.classList.remove("hudoro-accordion-arrow-active"),c.classList.remove("active"),s.current=s.current.filter(N=>N!==c)):(c.classList.add("active"),(w=c.querySelector(".hudoro-accordion-arrow"))==null||w.classList.add("hudoro-accordion-arrow-active"),(d=s.current)==null||d.push(c)):(p=s.current)!=null&&p.length?s.current[0]===c?((m=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||m.classList.remove("hudoro-accordion-arrow-active"),s.current[0].classList.remove("active"),s.current=[]):((T=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||T.classList.remove("hudoro-accordion-arrow-active"),s.current[0].classList.remove("active"),s.current=[],c.classList.add("active"),s.current[0]=c,(k=s.current[0].querySelector(".hudoro-accordion-arrow"))==null||k.classList.add("hudoro-accordion-arrow-active")):(c.classList.add("active"),(M=c.querySelector(".hudoro-accordion-arrow"))==null||M.classList.add("hudoro-accordion-arrow-active"),s.current.push(c))};return O.jsx(oe.Provider,{value:{allowMultiple:v,handlePushRef:_},children:O.jsx("div",{className:"hudoro-accordion",children:b})})},Le=({children:b})=>O.jsx("div",{className:"hudoro-accordion-item",children:b}),Ie=({children:b,expand:v=!0})=>{const{handlePushRef:s}=x.useContext(oe),_=c=>{c.currentTarget.parentElement&&s&&s(c.currentTarget.parentElement)};return O.jsxs("button",{className:"hudoro-accordion-button",onClick:c=>v?_(c):{},children:[b,v?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"})}):null]})},We=({children:b})=>O.jsx("div",{className:"hudoro-accordion-panel",onClick:v=>v.stopPropagation(),children:b});R.Accordion=Fe,R.AccordionButton=Ie,R.AccordionItem=Le,R.AccordionPanel=We,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});

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

export { Accordion, AccordionItem, AccordionButton, AccordionPanel, } from "./Accordion";
export * from "./types";
export { Accordion, AccordionItem, AccordionButton, AccordionPanel, } from './Accordion';
export * from './types';

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

import { ReactNode } from "react";
import { ReactNode } from 'react';
export interface IAccordion {

@@ -3,0 +4,0 @@ children: ReactNode;

{
"name": "@hudoro/accordion",
"version": "0.0.1-beta.10",
"version": "0.0.1-beta.11",
"description": "Accordion component for Hudoro UI",

@@ -25,6 +25,3 @@ "author": "Prawito Hudoro",

},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {

@@ -38,3 +35,5 @@ "@types/node": "^20.11.5",

"vite": "^5.0.12",
"vite-plugin-dts": "^3.7.1"
"vite-plugin-dts": "^3.7.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},

@@ -41,0 +40,0 @@ "peerDependencies": {

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