@purpurds/accordion 5.20.0 → 5.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +3 -3
- package/dist/accordion.cjs.js +5 -5
- package/dist/accordion.cjs.js.map +1 -1
- package/dist/accordion.d.ts +3 -11
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.es.js +129 -127
- package/dist/accordion.es.js.map +1 -1
- package/package.json +10 -10
- package/src/accordion.stories.tsx +1 -0
- package/src/accordion.tsx +4 -11
package/dist/LICENSE.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Name: @purpurds/heading
|
2
|
-
Version: 5.
|
2
|
+
Version: 5.20.1
|
3
3
|
License: AGPL-3.0-only
|
4
4
|
Private: false
|
5
5
|
|
@@ -202,13 +202,13 @@ SOFTWARE.
|
|
202
202
|
---
|
203
203
|
|
204
204
|
Name: @purpurds/icon
|
205
|
-
Version: 5.
|
205
|
+
Version: 5.20.1
|
206
206
|
License: AGPL-3.0-only
|
207
207
|
Private: false
|
208
208
|
|
209
209
|
---
|
210
210
|
|
211
211
|
Name: @purpurds/paragraph
|
212
|
-
Version: 5.
|
212
|
+
Version: 5.20.1
|
213
213
|
License: AGPL-3.0-only
|
214
214
|
Private: false
|
package/dist/accordion.cjs.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),a=require("react"),
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),a=require("react"),Ie=require("react-dom");function Pe(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const oe=Pe(a);function we(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ae={exports:{}};/*!
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
3
3
|
Licensed under the MIT License (MIT), see
|
4
4
|
http://jedwatson.github.io/classnames
|
5
|
-
*/(function(e){(function(){var r={}.hasOwnProperty;function n(){for(var t="",c=0;c<arguments.length;c++){var s=arguments[c];s&&(t=i(t,o(s)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return t;if(typeof t!="object")return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var c="";for(var s in t)r.call(t,s)&&t[s]&&(c=i(c,s));return c}function i(t,c){return c?t?t+" "+c:t+c:t}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ae);var we=ae.exports;const Se=Ie(we),O={"purpur-heading":"_purpur-heading_k9fhq_1","purpur-heading--hyphens":"_purpur-heading--hyphens_k9fhq_8","purpur-heading--negative":"_purpur-heading--negative_k9fhq_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_k9fhq_14","purpur-heading--title-100":"_purpur-heading--title-100_k9fhq_20","purpur-heading--title-200":"_purpur-heading--title-200_k9fhq_26","purpur-heading--title-300":"_purpur-heading--title-300_k9fhq_32","purpur-heading--title-400":"_purpur-heading--title-400_k9fhq_38","purpur-heading--title-500":"_purpur-heading--title-500_k9fhq_44","purpur-heading--title-600":"_purpur-heading--title-600_k9fhq_50","purpur-heading--title-700":"_purpur-heading--title-700_k9fhq_56","purpur-heading--display-25":"_purpur-heading--display-25_k9fhq_62","purpur-heading--display-50":"_purpur-heading--display-50_k9fhq_68","purpur-heading--display-100":"_purpur-heading--display-100_k9fhq_74","purpur-heading--display-200":"_purpur-heading--display-200_k9fhq_80"},Re={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},T="purpur-heading",F=({["data-testid"]:e,children:r,className:n="",enableHyphenation:o=!1,negative:i=!1,tag:t,variant:c=Re.TITLE100,...s})=>{const l=t,u=Se([n,O[T],O[`${T}--${c}`],{[O[`${T}--hyphens`]]:o,[O[`${T}--negative`]]:i}]);return y.jsx(l,{...s,className:u,"data-testid":e,children:r})};F.displayName="Heading";function h(){return h=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},h.apply(null,arguments)}function K(e,r=[]){let n=[];function o(t,c){const s=a.createContext(c),l=n.length;n=[...n,c];function u(p){const{scope:$,children:f,...b}=p,x=($==null?void 0:$[e][l])||s,g=a.useMemo(()=>b,Object.values(b));return a.createElement(x.Provider,{value:g},f)}function d(p,$){const f=($==null?void 0:$[e][l])||s,b=a.useContext(f);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${t}\``)}return u.displayName=t+"Provider",[u,d]}const i=()=>{const t=n.map(c=>a.createContext(c));return function(s){const l=(s==null?void 0:s[e])||t;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[o,Oe(i,...r)]}function Oe(...e){const r=e[0];if(e.length===1)return r;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(t){const c=o.reduce((s,{useScope:l,scopeName:u})=>{const p=l(t)[`__scope${u}`];return{...s,...p}},{});return a.useMemo(()=>({[`__scope${r.scopeName}`]:c}),[c])}};return n.scopeName=r.scopeName,n}function Te(e,r){typeof e=="function"?e(r):e!=null&&(e.current=r)}function ce(...e){return r=>e.forEach(n=>Te(n,r))}function S(...e){return a.useCallback(ce(...e),e)}const j=a.forwardRef((e,r)=>{const{children:n,...o}=e,i=a.Children.toArray(n),t=i.find(je);if(t){const c=t.props.children,s=i.map(l=>l===t?a.Children.count(c)>1?a.Children.only(null):a.isValidElement(c)?c.props.children:null:l);return a.createElement(H,h({},o,{ref:r}),a.isValidElement(c)?a.cloneElement(c,void 0,s):null)}return a.createElement(H,h({},o,{ref:r}),n)});j.displayName="Slot";const H=a.forwardRef((e,r)=>{const{children:n,...o}=e;return a.isValidElement(n)?a.cloneElement(n,{...ke(o,n.props),ref:r?ce(r,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});H.displayName="SlotClone";const Me=({children:e})=>a.createElement(a.Fragment,null,e);function je(e){return a.isValidElement(e)&&e.type===Me}function ke(e,r){const n={...r};for(const o in r){const i=e[o],t=r[o];/^on[A-Z]/.test(o)?i&&t?n[o]=(...s)=>{t(...s),i(...s)}:i&&(n[o]=i):o==="style"?n[o]={...i,...t}:o==="className"&&(n[o]=[i,t].filter(Boolean).join(" "))}return{...e,...n}}function De(e){const r=e+"CollectionProvider",[n,o]=K(r),[i,t]=n(r,{collectionRef:{current:null},itemMap:new Map}),c=f=>{const{scope:b,children:x}=f,g=a.useRef(null),_=a.useRef(new Map).current;return a.createElement(i,{scope:b,itemMap:_,collectionRef:g},x)},s=e+"CollectionSlot",l=a.forwardRef((f,b)=>{const{scope:x,children:g}=f,_=t(s,x),m=S(b,_.collectionRef);return a.createElement(j,{ref:m},g)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",p=a.forwardRef((f,b)=>{const{scope:x,children:g,..._}=f,m=a.useRef(null),v=S(b,m),C=t(u,x);return a.useEffect(()=>(C.itemMap.set(m,{ref:m,..._}),()=>void C.itemMap.delete(m))),a.createElement(j,{[d]:"",ref:v},g)});function $(f){const b=t(e+"CollectionConsumer",f);return a.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const _=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((C,P)=>_.indexOf(C.ref.current)-_.indexOf(P.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:l,ItemSlot:p},$,o]}function ie(e,r,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return r==null?void 0:r(i)}}function se(e){const r=a.useRef(e);return a.useEffect(()=>{r.current=e}),a.useMemo(()=>(...n)=>{var o;return(o=r.current)===null||o===void 0?void 0:o.call(r,...n)},[])}function Y({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,i]=Le({defaultProp:r,onChange:n}),t=e!==void 0,c=t?e:o,s=se(n),l=a.useCallback(u=>{if(t){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[t,e,i,s]);return[c,l]}function Le({defaultProp:e,onChange:r}){const n=a.useState(e),[o]=n,i=a.useRef(o),t=se(r);return a.useEffect(()=>{i.current!==o&&(t(o),i.current=o)},[o,i,t]),n}const qe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],R=qe.reduce((e,r)=>{const n=a.forwardRef((o,i)=>{const{asChild:t,...c}=o,s=t?j:r;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(s,h({},c,{ref:i}))});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{}),k=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{};function Ve(e,r){return a.useReducer((n,o)=>{const i=r[n][o];return i??n},e)}const le=e=>{const{present:r,children:n}=e,o=Ue(r),i=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),t=S(o.ref,i.ref);return typeof n=="function"||o.isPresent?a.cloneElement(i,{ref:t}):null};le.displayName="Presence";function Ue(e){const[r,n]=a.useState(),o=a.useRef({}),i=a.useRef(e),t=a.useRef("none"),c=e?"mounted":"unmounted",[s,l]=Ve(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=M(o.current);t.current=s==="mounted"?u:"none"},[s]),k(()=>{const u=o.current,d=i.current;if(d!==e){const $=t.current,f=M(u);e?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&$!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),k(()=>{if(r){const u=p=>{const f=M(o.current).includes(p.animationName);p.target===r&&f&&Ne.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===r&&(t.current=M(o.current))};return r.addEventListener("animationstart",d),r.addEventListener("animationcancel",u),r.addEventListener("animationend",u),()=>{r.removeEventListener("animationstart",d),r.removeEventListener("animationcancel",u),r.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[r,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:a.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function M(e){return(e==null?void 0:e.animationName)||"none"}const ze=oe.useId||(()=>{});let Be=0;function ue(e){const[r,n]=oe.useState(ze());return k(()=>{n(o=>o??String(Be++))},[e]),r?`radix-${r}`:""}const pe="Collapsible",[He,de]=K(pe),[Ge,Z]=He(pe),Fe=a.forwardRef((e,r)=>{const{__scopeCollapsible:n,open:o,defaultOpen:i,disabled:t,onOpenChange:c,...s}=e,[l=!1,u]=Y({prop:o,defaultProp:i,onChange:c});return a.createElement(Ge,{scope:n,disabled:t,contentId:ue(),open:l,onOpenToggle:a.useCallback(()=>u(d=>!d),[u])},a.createElement(R.div,h({"data-state":J(l),"data-disabled":t?"":void 0},s,{ref:r})))}),Ke="CollapsibleTrigger",Ye=a.forwardRef((e,r)=>{const{__scopeCollapsible:n,...o}=e,i=Z(Ke,n);return a.createElement(R.button,h({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":J(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},o,{ref:r,onClick:ie(e.onClick,i.onOpenToggle)}))}),fe="CollapsibleContent",Ze=a.forwardRef((e,r)=>{const{forceMount:n,...o}=e,i=Z(fe,e.__scopeCollapsible);return a.createElement(le,{present:n||i.open},({present:t})=>a.createElement(Je,h({},o,{ref:r,present:t})))}),Je=a.forwardRef((e,r)=>{const{__scopeCollapsible:n,present:o,children:i,...t}=e,c=Z(fe,n),[s,l]=a.useState(o),u=a.useRef(null),d=S(r,u),p=a.useRef(0),$=p.current,f=a.useRef(0),b=f.current,x=c.open||s,g=a.useRef(x),_=a.useRef();return a.useEffect(()=>{const m=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(m)},[]),k(()=>{const m=u.current;if(m){_.current=_.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const v=m.getBoundingClientRect();p.current=v.height,f.current=v.width,g.current||(m.style.transitionDuration=_.current.transitionDuration,m.style.animationName=_.current.animationName),l(o)}},[c.open,o]),a.createElement(R.div,h({"data-state":J(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!x},t,{ref:d,style:{"--radix-collapsible-content-height":$?`${$}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),x&&i)});function J(e){return e?"open":"closed"}const Xe=Fe,Qe=Ye,We=Ze,et=a.createContext(void 0);function tt(e){const r=a.useContext(et);return e||r||"ltr"}const E="Accordion",nt=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[X,rt,ot]=De(E),[D,Ht]=K(E,[ot,de]),Q=de(),be=a.forwardRef((e,r)=>{const{type:n,...o}=e,i=o,t=o;return a.createElement(X.Provider,{scope:e.__scopeAccordion},n==="multiple"?a.createElement(st,h({},t,{ref:r})):a.createElement(it,h({},i,{ref:r})))});be.propTypes={type(e){const r=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof r=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(r)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[me,at]=D(E),[$e,ct]=D(E,{collapsible:!1}),it=a.forwardRef((e,r)=>{const{value:n,defaultValue:o,onValueChange:i=()=>{},collapsible:t=!1,...c}=e,[s,l]=Y({prop:n,defaultProp:o,onChange:i});return a.createElement(me,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:l,onItemClose:a.useCallback(()=>t&&l(""),[t,l])},a.createElement($e,{scope:e.__scopeAccordion,collapsible:t},a.createElement(_e,h({},c,{ref:r}))))}),st=a.forwardRef((e,r)=>{const{value:n,defaultValue:o,onValueChange:i=()=>{},...t}=e,[c=[],s]=Y({prop:n,defaultProp:o,onChange:i}),l=a.useCallback(d=>s((p=[])=>[...p,d]),[s]),u=a.useCallback(d=>s((p=[])=>p.filter($=>$!==d)),[s]);return a.createElement(me,{scope:e.__scopeAccordion,value:c,onItemOpen:l,onItemClose:u},a.createElement($e,{scope:e.__scopeAccordion,collapsible:!0},a.createElement(_e,h({},t,{ref:r}))))}),[lt,L]=D(E),_e=a.forwardRef((e,r)=>{const{__scopeAccordion:n,disabled:o,dir:i,orientation:t="vertical",...c}=e,s=a.useRef(null),l=S(s,r),u=rt(n),p=tt(i)==="ltr",$=ie(e.onKeyDown,f=>{var b;if(!nt.includes(f.key))return;const x=f.target,g=u().filter(U=>{var z;return!((z=U.ref.current)!==null&&z!==void 0&&z.disabled)}),_=g.findIndex(U=>U.ref.current===x),m=g.length;if(_===-1)return;f.preventDefault();let v=_;const C=0,P=m-1,q=()=>{v=_+1,v>P&&(v=C)},V=()=>{v=_-1,v<C&&(v=P)};switch(f.key){case"Home":v=C;break;case"End":v=P;break;case"ArrowRight":t==="horizontal"&&(p?q():V());break;case"ArrowDown":t==="vertical"&&q();break;case"ArrowLeft":t==="horizontal"&&(p?V():q());break;case"ArrowUp":t==="vertical"&&V();break}const Ee=v%m;(b=g[Ee].ref.current)===null||b===void 0||b.focus()});return a.createElement(lt,{scope:n,disabled:o,direction:i,orientation:t},a.createElement(X.Slot,{scope:n},a.createElement(R.div,h({},c,{"data-orientation":t,ref:l,onKeyDown:o?void 0:$}))))}),G="AccordionItem",[ut,W]=D(G),pt=a.forwardRef((e,r)=>{const{__scopeAccordion:n,value:o,...i}=e,t=L(G,n),c=at(G,n),s=Q(n),l=ue(),u=o&&c.value.includes(o)||!1,d=t.disabled||e.disabled;return a.createElement(ut,{scope:n,open:u,disabled:d,triggerId:l},a.createElement(Xe,h({"data-orientation":t.orientation,"data-state":he(u)},s,i,{ref:r,disabled:d,open:u,onOpenChange:p=>{p?c.onItemOpen(o):c.onItemClose(o)}})))}),dt="AccordionHeader",ft=a.forwardRef((e,r)=>{const{__scopeAccordion:n,...o}=e,i=L(E,n),t=W(dt,n);return a.createElement(R.h3,h({"data-orientation":i.orientation,"data-state":he(t.open),"data-disabled":t.disabled?"":void 0},o,{ref:r}))}),te="AccordionTrigger",bt=a.forwardRef((e,r)=>{const{__scopeAccordion:n,...o}=e,i=L(E,n),t=W(te,n),c=ct(te,n),s=Q(n);return a.createElement(X.ItemSlot,{scope:n},a.createElement(Qe,h({"aria-disabled":t.open&&!c.collapsible||void 0,"data-orientation":i.orientation,id:t.triggerId},s,o,{ref:r})))}),mt="AccordionContent",$t=a.forwardRef((e,r)=>{const{__scopeAccordion:n,...o}=e,i=L(E,n),t=W(mt,n),c=Q(n);return a.createElement(We,h({role:"region","aria-labelledby":t.triggerId,"data-orientation":i.orientation},c,o,{ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function he(e){return e?"open":"closed"}const _t=be,ht=pt,gt=ft,vt=bt,xt=$t;function yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ge={exports:{}};/*!
|
5
|
+
*/(function(e){(function(){var r={}.hasOwnProperty;function n(){for(var t="",c=0;c<arguments.length;c++){var s=arguments[c];s&&(t=i(t,o(s)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return t;if(typeof t!="object")return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var c="";for(var s in t)r.call(t,s)&&t[s]&&(c=i(c,s));return c}function i(t,c){return c?t?t+" "+c:t+c:t}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ae);var Se=ae.exports;const Re=we(Se),O={"purpur-heading":"_purpur-heading_k9fhq_1","purpur-heading--hyphens":"_purpur-heading--hyphens_k9fhq_8","purpur-heading--negative":"_purpur-heading--negative_k9fhq_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_k9fhq_14","purpur-heading--title-100":"_purpur-heading--title-100_k9fhq_20","purpur-heading--title-200":"_purpur-heading--title-200_k9fhq_26","purpur-heading--title-300":"_purpur-heading--title-300_k9fhq_32","purpur-heading--title-400":"_purpur-heading--title-400_k9fhq_38","purpur-heading--title-500":"_purpur-heading--title-500_k9fhq_44","purpur-heading--title-600":"_purpur-heading--title-600_k9fhq_50","purpur-heading--title-700":"_purpur-heading--title-700_k9fhq_56","purpur-heading--display-25":"_purpur-heading--display-25_k9fhq_62","purpur-heading--display-50":"_purpur-heading--display-50_k9fhq_68","purpur-heading--display-100":"_purpur-heading--display-100_k9fhq_74","purpur-heading--display-200":"_purpur-heading--display-200_k9fhq_80"},Oe={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},T="purpur-heading",F=({["data-testid"]:e,children:r,className:n="",enableHyphenation:o=!1,negative:i=!1,tag:t,variant:c=Oe.TITLE100,...s})=>{const l=t,u=Re([n,O[T],O[`${T}--${c}`],{[O[`${T}--hyphens`]]:o,[O[`${T}--negative`]]:i}]);return y.jsx(l,{...s,className:u,"data-testid":e,children:r})};F.displayName="Heading";function h(){return h=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},h.apply(null,arguments)}function K(e,r=[]){let n=[];function o(t,c){const s=a.createContext(c),l=n.length;n=[...n,c];function u(p){const{scope:$,children:f,...b}=p,x=($==null?void 0:$[e][l])||s,g=a.useMemo(()=>b,Object.values(b));return a.createElement(x.Provider,{value:g},f)}function d(p,$){const f=($==null?void 0:$[e][l])||s,b=a.useContext(f);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${t}\``)}return u.displayName=t+"Provider",[u,d]}const i=()=>{const t=n.map(c=>a.createContext(c));return function(s){const l=(s==null?void 0:s[e])||t;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[o,Te(i,...r)]}function Te(...e){const r=e[0];if(e.length===1)return r;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(t){const c=o.reduce((s,{useScope:l,scopeName:u})=>{const p=l(t)[`__scope${u}`];return{...s,...p}},{});return a.useMemo(()=>({[`__scope${r.scopeName}`]:c}),[c])}};return n.scopeName=r.scopeName,n}function Me(e,r){typeof e=="function"?e(r):e!=null&&(e.current=r)}function ce(...e){return r=>e.forEach(n=>Me(n,r))}function S(...e){return a.useCallback(ce(...e),e)}const j=a.forwardRef((e,r)=>{const{children:n,...o}=e,i=a.Children.toArray(n),t=i.find(ke);if(t){const c=t.props.children,s=i.map(l=>l===t?a.Children.count(c)>1?a.Children.only(null):a.isValidElement(c)?c.props.children:null:l);return a.createElement(H,h({},o,{ref:r}),a.isValidElement(c)?a.cloneElement(c,void 0,s):null)}return a.createElement(H,h({},o,{ref:r}),n)});j.displayName="Slot";const H=a.forwardRef((e,r)=>{const{children:n,...o}=e;return a.isValidElement(n)?a.cloneElement(n,{...De(o,n.props),ref:r?ce(r,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});H.displayName="SlotClone";const je=({children:e})=>a.createElement(a.Fragment,null,e);function ke(e){return a.isValidElement(e)&&e.type===je}function De(e,r){const n={...r};for(const o in r){const i=e[o],t=r[o];/^on[A-Z]/.test(o)?i&&t?n[o]=(...s)=>{t(...s),i(...s)}:i&&(n[o]=i):o==="style"?n[o]={...i,...t}:o==="className"&&(n[o]=[i,t].filter(Boolean).join(" "))}return{...e,...n}}function Le(e){const r=e+"CollectionProvider",[n,o]=K(r),[i,t]=n(r,{collectionRef:{current:null},itemMap:new Map}),c=f=>{const{scope:b,children:x}=f,g=a.useRef(null),_=a.useRef(new Map).current;return a.createElement(i,{scope:b,itemMap:_,collectionRef:g},x)},s=e+"CollectionSlot",l=a.forwardRef((f,b)=>{const{scope:x,children:g}=f,_=t(s,x),m=S(b,_.collectionRef);return a.createElement(j,{ref:m},g)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",p=a.forwardRef((f,b)=>{const{scope:x,children:g,..._}=f,m=a.useRef(null),v=S(b,m),C=t(u,x);return a.useEffect(()=>(C.itemMap.set(m,{ref:m,..._}),()=>void C.itemMap.delete(m))),a.createElement(j,{[d]:"",ref:v},g)});function $(f){const b=t(e+"CollectionConsumer",f);return a.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const _=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((C,I)=>_.indexOf(C.ref.current)-_.indexOf(I.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:l,ItemSlot:p},$,o]}function ie(e,r,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return r==null?void 0:r(i)}}function se(e){const r=a.useRef(e);return a.useEffect(()=>{r.current=e}),a.useMemo(()=>(...n)=>{var o;return(o=r.current)===null||o===void 0?void 0:o.call(r,...n)},[])}function Y({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,i]=qe({defaultProp:r,onChange:n}),t=e!==void 0,c=t?e:o,s=se(n),l=a.useCallback(u=>{if(t){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[t,e,i,s]);return[c,l]}function qe({defaultProp:e,onChange:r}){const n=a.useState(e),[o]=n,i=a.useRef(o),t=se(r);return a.useEffect(()=>{i.current!==o&&(t(o),i.current=o)},[o,i,t]),n}const Ve=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],R=Ve.reduce((e,r)=>{const n=a.forwardRef((o,i)=>{const{asChild:t,...c}=o,s=t?j:r;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(s,h({},c,{ref:i}))});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{}),k=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{};function Ue(e,r){return a.useReducer((n,o)=>{const i=r[n][o];return i??n},e)}const le=e=>{const{present:r,children:n}=e,o=ze(r),i=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),t=S(o.ref,i.ref);return typeof n=="function"||o.isPresent?a.cloneElement(i,{ref:t}):null};le.displayName="Presence";function ze(e){const[r,n]=a.useState(),o=a.useRef({}),i=a.useRef(e),t=a.useRef("none"),c=e?"mounted":"unmounted",[s,l]=Ue(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const u=M(o.current);t.current=s==="mounted"?u:"none"},[s]),k(()=>{const u=o.current,d=i.current;if(d!==e){const $=t.current,f=M(u);e?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&$!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),k(()=>{if(r){const u=p=>{const f=M(o.current).includes(p.animationName);p.target===r&&f&&Ie.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===r&&(t.current=M(o.current))};return r.addEventListener("animationstart",d),r.addEventListener("animationcancel",u),r.addEventListener("animationend",u),()=>{r.removeEventListener("animationstart",d),r.removeEventListener("animationcancel",u),r.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[r,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:a.useCallback(u=>{u&&(o.current=getComputedStyle(u)),n(u)},[])}}function M(e){return(e==null?void 0:e.animationName)||"none"}const Be=oe.useId||(()=>{});let He=0;function ue(e){const[r,n]=oe.useState(Be());return k(()=>{n(o=>o??String(He++))},[e]),r?`radix-${r}`:""}const pe="Collapsible",[Ge,de]=K(pe),[Fe,Z]=Ge(pe),Ke=a.forwardRef((e,r)=>{const{__scopeCollapsible:n,open:o,defaultOpen:i,disabled:t,onOpenChange:c,...s}=e,[l=!1,u]=Y({prop:o,defaultProp:i,onChange:c});return a.createElement(Fe,{scope:n,disabled:t,contentId:ue(),open:l,onOpenToggle:a.useCallback(()=>u(d=>!d),[u])},a.createElement(R.div,h({"data-state":J(l),"data-disabled":t?"":void 0},s,{ref:r})))}),Ye="CollapsibleTrigger",Ze=a.forwardRef((e,r)=>{const{__scopeCollapsible:n,...o}=e,i=Z(Ye,n);return a.createElement(R.button,h({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":J(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},o,{ref:r,onClick:ie(e.onClick,i.onOpenToggle)}))}),fe="CollapsibleContent",Je=a.forwardRef((e,r)=>{const{forceMount:n,...o}=e,i=Z(fe,e.__scopeCollapsible);return a.createElement(le,{present:n||i.open},({present:t})=>a.createElement(Xe,h({},o,{ref:r,present:t})))}),Xe=a.forwardRef((e,r)=>{const{__scopeCollapsible:n,present:o,children:i,...t}=e,c=Z(fe,n),[s,l]=a.useState(o),u=a.useRef(null),d=S(r,u),p=a.useRef(0),$=p.current,f=a.useRef(0),b=f.current,x=c.open||s,g=a.useRef(x),_=a.useRef();return a.useEffect(()=>{const m=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(m)},[]),k(()=>{const m=u.current;if(m){_.current=_.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const v=m.getBoundingClientRect();p.current=v.height,f.current=v.width,g.current||(m.style.transitionDuration=_.current.transitionDuration,m.style.animationName=_.current.animationName),l(o)}},[c.open,o]),a.createElement(R.div,h({"data-state":J(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!x},t,{ref:d,style:{"--radix-collapsible-content-height":$?`${$}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),x&&i)});function J(e){return e?"open":"closed"}const Qe=Ke,We=Ze,et=Je,tt=a.createContext(void 0);function nt(e){const r=a.useContext(tt);return e||r||"ltr"}const E="Accordion",rt=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[X,ot,at]=Le(E),[D,Ht]=K(E,[at,de]),Q=de(),be=a.forwardRef((e,r)=>{const{type:n,...o}=e,i=o,t=o;return a.createElement(X.Provider,{scope:e.__scopeAccordion},n==="multiple"?a.createElement(lt,h({},t,{ref:r})):a.createElement(st,h({},i,{ref:r})))});be.propTypes={type(e){const r=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof r=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(r)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[me,ct]=D(E),[$e,it]=D(E,{collapsible:!1}),st=a.forwardRef((e,r)=>{const{value:n,defaultValue:o,onValueChange:i=()=>{},collapsible:t=!1,...c}=e,[s,l]=Y({prop:n,defaultProp:o,onChange:i});return a.createElement(me,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:l,onItemClose:a.useCallback(()=>t&&l(""),[t,l])},a.createElement($e,{scope:e.__scopeAccordion,collapsible:t},a.createElement(_e,h({},c,{ref:r}))))}),lt=a.forwardRef((e,r)=>{const{value:n,defaultValue:o,onValueChange:i=()=>{},...t}=e,[c=[],s]=Y({prop:n,defaultProp:o,onChange:i}),l=a.useCallback(d=>s((p=[])=>[...p,d]),[s]),u=a.useCallback(d=>s((p=[])=>p.filter($=>$!==d)),[s]);return a.createElement(me,{scope:e.__scopeAccordion,value:c,onItemOpen:l,onItemClose:u},a.createElement($e,{scope:e.__scopeAccordion,collapsible:!0},a.createElement(_e,h({},t,{ref:r}))))}),[ut,L]=D(E),_e=a.forwardRef((e,r)=>{const{__scopeAccordion:n,disabled:o,dir:i,orientation:t="vertical",...c}=e,s=a.useRef(null),l=S(s,r),u=ot(n),p=nt(i)==="ltr",$=ie(e.onKeyDown,f=>{var b;if(!rt.includes(f.key))return;const x=f.target,g=u().filter(U=>{var z;return!((z=U.ref.current)!==null&&z!==void 0&&z.disabled)}),_=g.findIndex(U=>U.ref.current===x),m=g.length;if(_===-1)return;f.preventDefault();let v=_;const C=0,I=m-1,q=()=>{v=_+1,v>I&&(v=C)},V=()=>{v=_-1,v<C&&(v=I)};switch(f.key){case"Home":v=C;break;case"End":v=I;break;case"ArrowRight":t==="horizontal"&&(p?q():V());break;case"ArrowDown":t==="vertical"&&q();break;case"ArrowLeft":t==="horizontal"&&(p?V():q());break;case"ArrowUp":t==="vertical"&&V();break}const Ne=v%m;(b=g[Ne].ref.current)===null||b===void 0||b.focus()});return a.createElement(ut,{scope:n,disabled:o,direction:i,orientation:t},a.createElement(X.Slot,{scope:n},a.createElement(R.div,h({},c,{"data-orientation":t,ref:l,onKeyDown:o?void 0:$}))))}),G="AccordionItem",[pt,W]=D(G),dt=a.forwardRef((e,r)=>{const{__scopeAccordion:n,value:o,...i}=e,t=L(G,n),c=ct(G,n),s=Q(n),l=ue(),u=o&&c.value.includes(o)||!1,d=t.disabled||e.disabled;return a.createElement(pt,{scope:n,open:u,disabled:d,triggerId:l},a.createElement(Qe,h({"data-orientation":t.orientation,"data-state":he(u)},s,i,{ref:r,disabled:d,open:u,onOpenChange:p=>{p?c.onItemOpen(o):c.onItemClose(o)}})))}),ft="AccordionHeader",bt=a.forwardRef((e,r)=>{const{__scopeAccordion:n,...o}=e,i=L(E,n),t=W(ft,n);return a.createElement(R.h3,h({"data-orientation":i.orientation,"data-state":he(t.open),"data-disabled":t.disabled?"":void 0},o,{ref:r}))}),te="AccordionTrigger",mt=a.forwardRef((e,r)=>{const{__scopeAccordion:n,...o}=e,i=L(E,n),t=W(te,n),c=it(te,n),s=Q(n);return a.createElement(X.ItemSlot,{scope:n},a.createElement(We,h({"aria-disabled":t.open&&!c.collapsible||void 0,"data-orientation":i.orientation,id:t.triggerId},s,o,{ref:r})))}),$t="AccordionContent",_t=a.forwardRef((e,r)=>{const{__scopeAccordion:n,...o}=e,i=L(E,n),t=W($t,n),c=Q(n);return a.createElement(et,h({role:"region","aria-labelledby":t.triggerId,"data-orientation":i.orientation},c,o,{ref:r,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function he(e){return e?"open":"closed"}const ht=be,gt=dt,vt=bt,xt=mt,yt=_t;function Ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ge={exports:{}};/*!
|
6
6
|
Copyright (c) 2018 Jed Watson.
|
7
7
|
Licensed under the MIT License (MIT), see
|
8
8
|
http://jedwatson.github.io/classnames
|
9
|
-
*/(function(e){(function(){var r={}.hasOwnProperty;function n(){for(var t="",c=0;c<arguments.length;c++){var s=arguments[c];s&&(t=i(t,o.call(this,s)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return this&&this[t]||t;if(typeof t!="object")return"";if(Array.isArray(t))return n.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var c="";for(var s in t)r.call(t,s)&&t[s]&&(c=i(c,this&&this[s]||s));return c}function i(t,c){return c?t?t+" "+c:t+c:t}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ge);var
|
9
|
+
*/(function(e){(function(){var r={}.hasOwnProperty;function n(){for(var t="",c=0;c<arguments.length;c++){var s=arguments[c];s&&(t=i(t,o.call(this,s)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return this&&this[t]||t;if(typeof t!="object")return"";if(Array.isArray(t))return n.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var c="";for(var s in t)r.call(t,s)&&t[s]&&(c=i(c,this&&this[s]||s));return c}function i(t,c){return c?t?t+" "+c:t+c:t}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ge);var At=ge.exports;const ve=Ct(At),Et={"purpur-accordion":"_purpur-accordion_u887g_1","purpur-accordion__title":"_purpur-accordion__title_u887g_4","purpur-accordion--negative":"_purpur-accordion--negative_u887g_13"};function Nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xe={exports:{}};/*!
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
11
11
|
Licensed under the MIT License (MIT), see
|
12
12
|
http://jedwatson.github.io/classnames
|
13
|
-
*/(function(e){(function(){var r={}.hasOwnProperty;function n(){for(var t="",c=0;c<arguments.length;c++){var s=arguments[c];s&&(t=i(t,o.call(this,s)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return this&&this[t]||t;if(typeof t!="object")return"";if(Array.isArray(t))return n.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var c="";for(var s in t)r.call(t,s)&&t[s]&&(c=i(c,this&&this[s]||s));return c}function i(t,c){return c?t?t+" "+c:t+c:t}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(xe);var
|
13
|
+
*/(function(e){(function(){var r={}.hasOwnProperty;function n(){for(var t="",c=0;c<arguments.length;c++){var s=arguments[c];s&&(t=i(t,o.call(this,s)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return this&&this[t]||t;if(typeof t!="object")return"";if(Array.isArray(t))return n.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var c="";for(var s in t)r.call(t,s)&&t[s]&&(c=i(c,this&&this[s]||s));return c}function i(t,c){return c?t?t+" "+c:t+c:t}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(xe);var It=xe.exports;const Pt=Nt(It),wt={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},St={name:"chevron-down",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M20.136 7.864a.9.9 0 0 0-1.272 0L12 14.727 5.136 7.864a.9.9 0 0 0-1.272 1.272l7.5 7.5a.9.9 0 0 0 1.272 0l7.5-7.5a.9.9 0 0 0 0-1.272Z" clip-rule="evenodd"/></svg>',keywords:["chevron-down"],category:"utility"},ye=e=>y.jsx(Ce,{...e,svg:St});ye.displayName="IconChevronDown";const Rt=Pt.bind(wt),ne="purpur-icon",Ot="md",Tt=e=>e.filter(r=>Object.keys(r).length>=1).map(r=>`${r.name}="${r.value}"`).join(" "),Mt=({content:e="",title:r}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},r?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=r?`<title>${r}</title>`:"";return`<svg ${Tt(n)}>${o}${e}</svg>`},jt=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Ce=({["data-testid"]:e,svg:r,allyTitle:n,className:o,size:i=Ot,...t})=>{const c=Mt({content:jt(r.svg),title:n}),s=Rt(o,ne,`${ne}--${i}`);return y.jsx("span",{"aria-label":n,className:s,"data-testid":e,dangerouslySetInnerHTML:{__html:c},...t})};Ce.displayName="Icon";function kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ae={exports:{}};/*!
|
14
14
|
Copyright (c) 2018 Jed Watson.
|
15
15
|
Licensed under the MIT License (MIT), see
|
16
16
|
http://jedwatson.github.io/classnames
|
17
|
-
*/(function(e){(function(){var r={}.hasOwnProperty;function n(){for(var t="",c=0;c<arguments.length;c++){var s=arguments[c];s&&(t=i(t,o(s)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return t;if(typeof t!="object")return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var c="";for(var s in t)r.call(t,s)&&t[s]&&(c=i(c,s));return c}function i(t,c){return c?t?t+" "+c:t+c:t}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(
|
17
|
+
*/(function(e){(function(){var r={}.hasOwnProperty;function n(){for(var t="",c=0;c<arguments.length;c++){var s=arguments[c];s&&(t=i(t,o(s)))}return t}function o(t){if(typeof t=="string"||typeof t=="number")return t;if(typeof t!="object")return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var c="";for(var s in t)r.call(t,s)&&t[s]&&(c=i(c,s));return c}function i(t,c){return c?t?t+" "+c:t+c:t}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ae);var Dt=Ae.exports;const Lt=kt(Dt),P={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},qt={PARAGRAPH100:"paragraph-100",PARAGRAPH100MEDIUM:"paragraph-100-medium",PARAGRAPH100BOLD:"paragraph-100-bold",PARAGRAPH200:"paragraph-200",PREAMBLE100:"preamble-100",PREAMBLE200:"preamble-200",ADDITIONAL100:"additional-100",ADDITIONAL100MEDIUM:"additional-100-medium",OVERLINE100:"overline-100",OVERLINE200:"overline-200"},w="purpur-paragraph",Ee=({["data-testid"]:e,children:r,className:n,disabled:o,enableHyphenation:i=!1,negative:t=!1,variant:c=qt.PARAGRAPH100,...s})=>{const l=Lt([n,P[w],P[`${w}--${c}`],{[P[`${w}--hyphens`]]:i,[P[`${w}--disabled`]]:o,[P[`${w}--negative`]]:t}]);return y.jsx("p",{...s,className:l,"data-testid":e,children:r})};Ee.displayName="Paragraph";const Vt="_slideDown_aukzj_1",Ut="_slideUp_aukzj_1",zt={"purpur-accordion-item":"_purpur-accordion-item_aukzj_1","purpur-accordion-item__header":"_purpur-accordion-item__header_aukzj_8","purpur-accordion-item__trigger":"_purpur-accordion-item__trigger_aukzj_11","purpur-accordion-item__content":"_purpur-accordion-item__content_aukzj_41",slideDown:Vt,slideUp:Ut,"purpur-accordion-item__contentText":"_purpur-accordion-item__contentText_aukzj_50","purpur-accordion-item__icon":"_purpur-accordion-item__icon_aukzj_54","purpur-accordion-item__title":"_purpur-accordion-item__title_aukzj_67","purpur-accordion-item--negative":"_purpur-accordion-item--negative_aukzj_88"},N=ve.bind(zt),A="purpur-accordion-item",Bt=a.forwardRef(({children:e,className:r,title:n,titleTag:o="h3",negative:i,onClick:t,...c},s)=>{const l=N([r,A,{[`${A}--negative`]:i}]);return y.jsxs(gt,{className:l,value:n,...c,children:[y.jsx(vt,{className:N(`${A}__header`),asChild:!0,children:y.jsx(F,{tag:o,variant:"title-100",className:N(`${A}__title`),children:y.jsxs(xt,{ref:s,onClick:t,className:N(`${A}__trigger`,r),children:[n,y.jsx(ye,{size:"md",className:N(`${A}__icon`),"aria-hidden":!0})]})})}),y.jsx(yt,{className:N(`${A}__content`,r),children:y.jsx("div",{className:N(`${A}__contentText`),children:typeof e=="string"?y.jsx(Ee,{variant:"paragraph-200",children:e}):e})})]})}),re=ve.bind(Et),B="purpur-accordion",ee=({["data-testid"]:e,children:r,className:n,negative:o=!1,title:i,titleTag:t="h2",titleVariant:c="title-300",...s})=>{const l=re([n,B,{[`${B}--negative`]:o}]),u=()=>a.Children.map(r,d=>a.cloneElement(d,{negative:o}));return y.jsxs(ht,{className:l,type:"multiple","data-testid":e,...s,children:[i?y.jsx(F,{tag:t,variant:c,className:re(`${B}__title`),children:i}):null,u()]})};ee.Item=Bt;ee.displayName="Accordion";exports.Accordion=ee;
|
18
18
|
//# sourceMappingURL=accordion.cjs.js.map
|