PageSourceSearch

https://aiven.io/remix-chunks/accordion-h3UzN4IZ.js

js aiven.io collected 2026-09-24 08:42:04 UTC 3,291 bytes, 13 lines download raw bytes

1import{r as g,j as a,P as f}from"./typography-C5LMSFAT.js";import{R as m,I as x,H as b,T as y,C as j}from"./index-DwOcx85B.js";import{d as N,I}from"./button-BhJu3BAA.js";import{I as w}from"./image-QydxE1Ws.js";import{t as v}from"./misc-bYcQwmo8.js";import{b as E}from"./site-CNjt5fhN.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"bb7bd624a8a3321ff6d1587f421551039a69f342"}}catch{}})();try{(function(){var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new s.Error().stack;l&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[l]="8974d032-6552-4ef7-8850-1d3eaeedb838",s._sentryDebugIdIdentifier="sentry-dbid-8974d032-6552-4ef7-8850-1d3eaeedb838")})()}catch{}const h=({items:s,variant:l,showChevron:i})=>s.map((e,o)=>{const c=`item-${o}`;return a.jsxs(x,{id:e.id,value:c,className:e.className?e.className:"border-stroke border-b",children:[a.jsx(b,{asChild:!0,className:e.headerClassName,children:a.jsxs(y,{className:`
2							group flex w-full items-center justify-between
3							gap-5 p-5 text-left
4							${e.triggerClassName??""}
5						`,children:[a.jsx("div",{className:"flex items-center gap-5",children:l==="sidebar"?a.jsx(f,{children:e.title}):a.jsxs("div",{className:"flex items-start gap-5",children:[e.iconImage&&e.iconImage.src?a.jsx(w,{className:e.imageClassName??"w-6",...e.iconImage}):null,a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(f,{size:"body-large",fontWeight:"font-semibold",children:e.title}),e.subtitle&&a.jsx(f,{size:"body-small",color:"secondary",children:e.subt
5itle})]})]})}),i&&a.jsx("div",{className:"shrink-0",children:a.jsx(I,{name:"chevron-down",color:"arrow",className:`
6										transition-transform
7										group-data-[state=open]:-rotate-180
8									`})})]})}),a.jsx(j,{forceMount:!0,className:`
9						max-h-0 overflow-hidden opacity-0
10						data-[state=open]:max-h-[var(--radix-accordion-content-height)]
11						data-[state=open]:opacity-100
12					`,children:a.jsx("div",{className:"min-h-0 overflow-hidden",children:typeof e.panel=="string"?a.jsx(f,{color:"secondary",className:"px-5 pb-5",children:e.panel}):a.jsx("div",{className:e.panelClassName??"px-5 pb-5",children:e.panel})})})]},c)});function V({items:s,variant:l="default",showChevron:i=!0,type:e="multiple"}){const o=N();function c(){return s.map((n,r)=>n.defaultOpen?`item-${r}`:null).filter(v)}const[d,u]=g.useState(c);g.useEffect(()=>{if(o){const n=o.replace("#",""),r=s.findIndex(t=>t.id===n);r!==-1&&u([`item-${r}`])}},[s,o]);function p(n){const r=n.find(t=>!d.includes(t))||d.find(t=>!n.includes(t));if(r){const t=parseInt(r.replace("item-",""),10);E({object:"accordion",action:d.includes(r)?"close":"open",value:s[t]?.title})}u(n)}if(e==="multiple")return a.jsx(m,{type:e,value:d,onValueChange:n=>p(n),className:"bg-transparent",suppressHydrationWarning:!0,children:a.jsx(h,{items:s,variant:l,showChevron:i})});if(e==="single")return a.jsx(m,{type:"single",collapsible:!0,value:d[0],onValueChange:n=>p([n]),className:"bg-transparent",suppressHydrationWarning:!0,children:a.jsx(h,{items:s,variant:l,showChevron:i})})}
12export{V as Accordion};
13//# sourceMappingURL=accordion-h3UzN4IZ.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.