@purpurds/radio-card-group 5.11.0 → 5.11.2
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/radio-card-group.cjs.js +5 -5
- package/dist/radio-card-group.cjs.js.map +1 -1
- package/dist/radio-card-group.d.ts +4 -2
- package/dist/radio-card-group.d.ts.map +1 -1
- package/dist/radio-card-group.es.js +254 -261
- package/dist/radio-card-group.es.js.map +1 -1
- package/dist/radio-card-item-image.d.ts.map +1 -1
- package/dist/radio-card-item.d.ts +22 -2
- package/dist/radio-card-item.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/radio-card-group.stories.tsx +47 -42
- package/src/radio-card-group.tsx +4 -2
- package/src/radio-card-item.test.tsx +1 -1
- package/src/radio-card-item.tsx +29 -4
- package/readme.mdx +0 -178
package/dist/LICENSE.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Name: @purpurds/heading
|
|
2
|
-
Version: 5.
|
|
2
|
+
Version: 5.11.1
|
|
3
3
|
License: AGPL-3.0-only
|
|
4
4
|
Private: false
|
|
5
5
|
|
|
@@ -220,13 +220,13 @@ SOFTWARE.
|
|
|
220
220
|
---
|
|
221
221
|
|
|
222
222
|
Name: @purpurds/paragraph
|
|
223
|
-
Version: 5.
|
|
223
|
+
Version: 5.11.1
|
|
224
224
|
License: AGPL-3.0-only
|
|
225
225
|
Private: false
|
|
226
226
|
|
|
227
227
|
---
|
|
228
228
|
|
|
229
229
|
Name: @purpurds/skeleton
|
|
230
|
-
Version: 5.
|
|
230
|
+
Version: 5.11.1
|
|
231
231
|
License: AGPL-3.0-only
|
|
232
232
|
Private: false
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react/jsx-runtime"),a=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react/jsx-runtime"),a=require("react"),Se=require("react-dom");function Ie(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const te=Ie(a);function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ne={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 n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(r=i(r,o(u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var u in r)n.call(r,u)&&r[u]&&(c=i(c,u));return c}function i(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ne);var Ie=ne.exports;const Ne=Ae(Ie),k={"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"},we={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},M="purpur-heading",Pe=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,negative:i=!1,tag:r,variant:c=we.TITLE100,...u})=>{const d=r,s=Ne([t,k[M],k[`${M}--${c}`],{[k[`${M}--hyphens`]]:o,[k[`${M}--negative`]]:i}]);return $.jsx(d,{...u,className:s,"data-testid":e,children:n})};function E(){return E=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},E.apply(this,arguments)}function x(e,n,{checkForDefaultPrevented:t=!0}={}){return function(i){if(e==null||e(i),t===!1||!i.defaultPrevented)return n==null?void 0:n(i)}}function Oe(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function oe(...e){return n=>e.forEach(t=>Oe(t,n))}function N(...e){return a.useCallback(oe(...e),e)}function q(e,n=[]){let t=[];function o(r,c){const u=a.createContext(c),d=t.length;t=[...t,c];function s(f){const{scope:m,children:l,...p}=f,b=(m==null?void 0:m[e][d])||u,v=a.useMemo(()=>p,Object.values(p));return a.createElement(b.Provider,{value:v},l)}function _(f,m){const l=(m==null?void 0:m[e][d])||u,p=a.useContext(l);if(p)return p;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${r}\``)}return s.displayName=r+"Provider",[s,_]}const i=()=>{const r=t.map(c=>a.createContext(c));return function(u){const d=(u==null?void 0:u[e])||r;return a.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[o,Te(i,...n)]}function Te(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const c=o.reduce((u,{useScope:d,scopeName:s})=>{const f=d(r)[`__scope${s}`];return{...u,...f}},{});return a.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return t.scopeName=n.scopeName,t}function A(){return A=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},A.apply(this,arguments)}const L=a.forwardRef((e,n)=>{const{children:t,...o}=e,i=a.Children.toArray(t),r=i.find(Me);if(r){const c=r.props.children,u=i.map(d=>d===r?a.Children.count(c)>1?a.Children.only(null):a.isValidElement(c)?c.props.children:null:d);return a.createElement(W,A({},o,{ref:n}),a.isValidElement(c)?a.cloneElement(c,void 0,u):null)}return a.createElement(W,A({},o,{ref:n}),t)});L.displayName="Slot";const W=a.forwardRef((e,n)=>{const{children:t,...o}=e;return a.isValidElement(t)?a.cloneElement(t,{...je(o,t.props),ref:n?oe(n,t.ref):t.ref}):a.Children.count(t)>1?a.Children.only(null):null});W.displayName="SlotClone";const ke=({children:e})=>a.createElement(a.Fragment,null,e);function Me(e){return a.isValidElement(e)&&e.type===ke}function je(e,n){const t={...n};for(const o in n){const i=e[o],r=n[o];/^on[A-Z]/.test(o)?i&&r?t[o]=(...u)=>{r(...u),i(...u)}:i&&(t[o]=i):o==="style"?t[o]={...i,...r}:o==="className"&&(t[o]=[i,r].filter(Boolean).join(" "))}return{...e,...t}}const Fe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],O=Fe.reduce((e,n)=>{const t=a.forwardRef((o,i)=>{const{asChild:r,...c}=o,u=r?L:n;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(u,A({},c,{ref:i}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function De(e){const n=e+"CollectionProvider",[t,o]=q(n),[i,r]=t(n,{collectionRef:{current:null},itemMap:new Map}),c=l=>{const{scope:p,children:b}=l,v=a.useRef(null),h=a.useRef(new Map).current;return a.createElement(i,{scope:p,itemMap:h,collectionRef:v},b)},u=e+"CollectionSlot",d=a.forwardRef((l,p)=>{const{scope:b,children:v}=l,h=r(u,b),g=N(p,h.collectionRef);return a.createElement(L,{ref:g},v)}),s=e+"CollectionItemSlot",_="data-radix-collection-item",f=a.forwardRef((l,p)=>{const{scope:b,children:v,...h}=l,g=a.useRef(null),T=N(p,g),S=r(s,b);return a.useEffect(()=>(S.itemMap.set(g,{ref:g,...h}),()=>void S.itemMap.delete(g))),a.createElement(L,{[_]:"",ref:T},v)});function m(l){const p=r(e+"CollectionConsumer",l);return a.useCallback(()=>{const v=p.collectionRef.current;if(!v)return[];const h=Array.from(v.querySelectorAll(`[${_}]`));return Array.from(p.itemMap.values()).sort((S,V)=>h.indexOf(S.ref.current)-h.indexOf(V.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:c,Slot:d,ItemSlot:f},m,o]}const G=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},Le=te.useId||(()=>{});let Ge=0;function qe(e){const[n,t]=te.useState(Le());return G(()=>{t(o=>o??String(Ge++))},[e]),n?`radix-${n}`:""}function Z(e){const n=a.useRef(e);return a.useEffect(()=>{n.current=e}),a.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function ae({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,i]=Ue({defaultProp:n,onChange:t}),r=e!==void 0,c=r?e:o,u=Z(t),d=a.useCallback(s=>{if(r){const f=typeof s=="function"?s(e):s;f!==e&&u(f)}else i(s)},[r,e,i,u]);return[c,d]}function Ue({defaultProp:e,onChange:n}){const t=a.useState(e),[o]=t,i=a.useRef(o),r=Z(n);return a.useEffect(()=>{i.current!==o&&(r(o),i.current=o)},[o,i,r]),t}const Ve=a.createContext(void 0);function ce(e){const n=a.useContext(Ve);return e||n||"ltr"}const z="rovingFocusGroup.onEntryFocus",Be={bubbles:!1,cancelable:!0},J="RovingFocusGroup",[X,ie,ze]=De(J),[Ke,ue]=q(J,[ze]),[He,Ye]=Ke(J),We=a.forwardRef((e,n)=>a.createElement(X.Provider,{scope:e.__scopeRovingFocusGroup},a.createElement(X.Slot,{scope:e.__scopeRovingFocusGroup},a.createElement(Xe,A({},e,{ref:n}))))),Xe=a.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:t,orientation:o,loop:i=!1,dir:r,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:s,..._}=e,f=a.useRef(null),m=N(n,f),l=ce(r),[p=null,b]=ae({prop:c,defaultProp:u,onChange:d}),[v,h]=a.useState(!1),g=Z(s),T=ie(t),S=a.useRef(!1),[V,Q]=a.useState(0);return a.useEffect(()=>{const y=f.current;if(y)return y.addEventListener(z,g),()=>y.removeEventListener(z,g)},[g]),a.createElement(He,{scope:t,orientation:o,dir:l,loop:i,currentTabStopId:p,onItemFocus:a.useCallback(y=>b(y),[b]),onItemShiftTab:a.useCallback(()=>h(!0),[]),onFocusableItemAdd:a.useCallback(()=>Q(y=>y+1),[]),onFocusableItemRemove:a.useCallback(()=>Q(y=>y-1),[])},a.createElement(O.div,A({tabIndex:v||V===0?-1:0,"data-orientation":o},_,{ref:m,style:{outline:"none",...e.style},onMouseDown:x(e.onMouseDown,()=>{S.current=!0}),onFocus:x(e.onFocus,y=>{const ye=!S.current;if(y.target===y.currentTarget&&ye&&!v){const ee=new CustomEvent(z,Be);if(y.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const B=T().filter(I=>I.focusable),Re=B.find(I=>I.active),Ee=B.find(I=>I.id===p),Ce=[Re,Ee,...B].filter(Boolean).map(I=>I.ref.current);se(Ce)}}S.current=!1}),onBlur:x(e.onBlur,()=>h(!1))})))}),Ze="RovingFocusGroupItem",Je=a.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:t,focusable:o=!0,active:i=!1,tabStopId:r,...c}=e,u=qe(),d=r||u,s=Ye(Ze,t),_=s.currentTabStopId===d,f=ie(t),{onFocusableItemAdd:m,onFocusableItemRemove:l}=s;return a.useEffect(()=>{if(o)return m(),()=>l()},[o,m,l]),a.createElement(X.ItemSlot,{scope:t,id:d,focusable:o,active:i},a.createElement(O.span,A({tabIndex:_?0:-1,"data-orientation":s.orientation},c,{ref:n,onMouseDown:x(e.onMouseDown,p=>{o?s.onItemFocus(d):p.preventDefault()}),onFocus:x(e.onFocus,()=>s.onItemFocus(d)),onKeyDown:x(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){s.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const b=rr(p,s.orientation,s.dir);if(b!==void 0){p.preventDefault();let h=f().filter(g=>g.focusable).map(g=>g.ref.current);if(b==="last")h.reverse();else if(b==="prev"||b==="next"){b==="prev"&&h.reverse();const g=h.indexOf(p.currentTarget);h=s.loop?tr(h,g+1):h.slice(g+1)}setTimeout(()=>se(h))}})})))}),Qe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function er(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rr(e,n,t){const o=er(e.key,t);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Qe[o]}function se(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function tr(e,n){return e.map((t,o)=>e[(n+o)%e.length])}const nr=We,or=Je;function ar(e){const[n,t]=a.useState(void 0);return G(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let c,u;if("borderBoxSize"in r){const d=r.borderBoxSize,s=Array.isArray(d)?d[0]:d;c=s.inlineSize,u=s.blockSize}else c=e.offsetWidth,u=e.offsetHeight;t({width:c,height:u})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else t(void 0)},[e]),n}function cr(e){const n=a.useRef({value:e,previous:e});return a.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function ir(e,n){return a.useReducer((t,o)=>{const i=n[t][o];return i??t},e)}const de=e=>{const{present:n,children:t}=e,o=ur(n),i=typeof t=="function"?t({present:o.isPresent}):a.Children.only(t),r=N(o.ref,i.ref);return typeof t=="function"||o.isPresent?a.cloneElement(i,{ref:r}):null};de.displayName="Presence";function ur(e){const[n,t]=a.useState(),o=a.useRef({}),i=a.useRef(e),r=a.useRef("none"),c=e?"mounted":"unmounted",[u,d]=ir(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const s=j(o.current);r.current=u==="mounted"?s:"none"},[u]),G(()=>{const s=o.current,_=i.current;if(_!==e){const m=r.current,l=j(s);e?d("MOUNT"):l==="none"||(s==null?void 0:s.display)==="none"?d("UNMOUNT"):d(_&&m!==l?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),G(()=>{if(n){const s=f=>{const l=j(o.current).includes(f.animationName);f.target===n&&l&&xe.flushSync(()=>d("ANIMATION_END"))},_=f=>{f.target===n&&(r.current=j(o.current))};return n.addEventListener("animationstart",_),n.addEventListener("animationcancel",s),n.addEventListener("animationend",s),()=>{n.removeEventListener("animationstart",_),n.removeEventListener("animationcancel",s),n.removeEventListener("animationend",s)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:a.useCallback(s=>{s&&(o.current=getComputedStyle(s)),t(s)},[])}}function j(e){return(e==null?void 0:e.animationName)||"none"}const pe="Radio",[sr,le]=q(pe),[dr,pr]=sr(pe),lr=a.forwardRef((e,n)=>{const{__scopeRadio:t,name:o,checked:i=!1,required:r,disabled:c,value:u="on",onCheck:d,...s}=e,[_,f]=a.useState(null),m=N(n,b=>f(b)),l=a.useRef(!1),p=_?!!_.closest("form"):!0;return a.createElement(dr,{scope:t,checked:i,disabled:c},a.createElement(O.button,E({type:"button",role:"radio","aria-checked":i,"data-state":fe(i),"data-disabled":c?"":void 0,disabled:c,value:u},s,{ref:m,onClick:x(e.onClick,b=>{i||d==null||d(),p&&(l.current=b.isPropagationStopped(),l.current||b.stopPropagation())})})),p&&a.createElement(_r,{control:_,bubbles:!l.current,name:o,value:u,checked:i,required:r,disabled:c,style:{transform:"translateX(-100%)"}}))}),fr="RadioIndicator",mr=a.forwardRef((e,n)=>{const{__scopeRadio:t,forceMount:o,...i}=e,r=pr(fr,t);return a.createElement(de,{present:o||r.checked},a.createElement(O.span,E({"data-state":fe(r.checked),"data-disabled":r.disabled?"":void 0},i,{ref:n})))}),_r=e=>{const{control:n,checked:t,bubbles:o=!0,...i}=e,r=a.useRef(null),c=cr(t),u=ar(n);return a.useEffect(()=>{const d=r.current,s=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(s,"checked").set;if(c!==t&&f){const m=new Event("click",{bubbles:o});f.call(d,t),d.dispatchEvent(m)}},[c,t,o]),a.createElement("input",E({type:"radio","aria-hidden":!0,defaultChecked:t},i,{tabIndex:-1,ref:r,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fe(e){return e?"checked":"unchecked"}const br=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],me="RadioGroup",[$r,Kr]=q(me,[ue,le]),_e=ue(),be=le(),[hr,gr]=$r(me),vr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,name:o,defaultValue:i,value:r,required:c=!1,disabled:u=!1,orientation:d,dir:s,loop:_=!0,onValueChange:f,...m}=e,l=_e(t),p=ce(s),[b,v]=ae({prop:r,defaultProp:i,onChange:f});return a.createElement(hr,{scope:t,name:o,required:c,disabled:u,value:b,onValueChange:v},a.createElement(nr,E({asChild:!0},l,{orientation:d,dir:p,loop:_}),a.createElement(O.div,E({role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":u?"":void 0,dir:p},m,{ref:n}))))}),yr="RadioGroupItem",Rr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,disabled:o,...i}=e,r=gr(yr,t),c=r.disabled||o,u=_e(t),d=be(t),s=a.useRef(null),_=N(n,s),f=r.value===i.value,m=a.useRef(!1);return a.useEffect(()=>{const l=b=>{br.includes(b.key)&&(m.current=!0)},p=()=>m.current=!1;return document.addEventListener("keydown",l),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keyup",p)}},[]),a.createElement(or,E({asChild:!0},u,{focusable:!c,active:f}),a.createElement(lr,E({disabled:c,required:r.required,checked:f},d,i,{name:r.name,ref:_,onCheck:()=>r.onValueChange(i.value),onKeyDown:x(l=>{l.key==="Enter"&&l.preventDefault()}),onFocus:x(i.onFocus,()=>{var l;m.current&&((l=s.current)===null||l===void 0||l.click())})})))}),Er=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,...o}=e,i=be(t);return a.createElement(mr,E({},i,o,{ref:n}))}),Cr=vr,xr=Rr,Sr=Er;function Ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $e={exports:{}};/*!
|
|
5
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(r=i(r,o(u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var u in r)n.call(r,u)&&r[u]&&(c=i(c,u));return c}function i(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ne);var Ae=ne.exports;const Oe=Ne(Ae),k={"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"},Pe={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},M="purpur-heading",oe=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,negative:i=!1,tag:r,variant:c=Pe.TITLE100,...u})=>{const d=r,s=Oe([t,k[M],k[`${M}--${c}`],{[k[`${M}--hyphens`]]:o,[k[`${M}--negative`]]:i}]);return $.jsx(d,{...u,className:s,"data-testid":e,children:n})};oe.displayName="Heading";function E(){return E=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},E.apply(this,arguments)}function x(e,n,{checkForDefaultPrevented:t=!0}={}){return function(i){if(e==null||e(i),t===!1||!i.defaultPrevented)return n==null?void 0:n(i)}}function we(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function ae(...e){return n=>e.forEach(t=>we(t,n))}function A(...e){return a.useCallback(ae(...e),e)}function q(e,n=[]){let t=[];function o(r,c){const u=a.createContext(c),d=t.length;t=[...t,c];function s(l){const{scope:m,children:f,...p}=l,b=(m==null?void 0:m[e][d])||u,v=a.useMemo(()=>p,Object.values(p));return a.createElement(b.Provider,{value:v},f)}function _(l,m){const f=(m==null?void 0:m[e][d])||u,p=a.useContext(f);if(p)return p;if(c!==void 0)return c;throw new Error(`\`${l}\` must be used within \`${r}\``)}return s.displayName=r+"Provider",[s,_]}const i=()=>{const r=t.map(c=>a.createContext(c));return function(u){const d=(u==null?void 0:u[e])||r;return a.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return i.scopeName=e,[o,Te(i,...n)]}function Te(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const c=o.reduce((u,{useScope:d,scopeName:s})=>{const l=d(r)[`__scope${s}`];return{...u,...l}},{});return a.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return t.scopeName=n.scopeName,t}function I(){return I=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},I.apply(this,arguments)}const L=a.forwardRef((e,n)=>{const{children:t,...o}=e,i=a.Children.toArray(t),r=i.find(Me);if(r){const c=r.props.children,u=i.map(d=>d===r?a.Children.count(c)>1?a.Children.only(null):a.isValidElement(c)?c.props.children:null:d);return a.createElement(W,I({},o,{ref:n}),a.isValidElement(c)?a.cloneElement(c,void 0,u):null)}return a.createElement(W,I({},o,{ref:n}),t)});L.displayName="Slot";const W=a.forwardRef((e,n)=>{const{children:t,...o}=e;return a.isValidElement(t)?a.cloneElement(t,{...je(o,t.props),ref:n?ae(n,t.ref):t.ref}):a.Children.count(t)>1?a.Children.only(null):null});W.displayName="SlotClone";const ke=({children:e})=>a.createElement(a.Fragment,null,e);function Me(e){return a.isValidElement(e)&&e.type===ke}function je(e,n){const t={...n};for(const o in n){const i=e[o],r=n[o];/^on[A-Z]/.test(o)?i&&r?t[o]=(...u)=>{r(...u),i(...u)}:i&&(t[o]=i):o==="style"?t[o]={...i,...r}:o==="className"&&(t[o]=[i,r].filter(Boolean).join(" "))}return{...e,...t}}const Fe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],w=Fe.reduce((e,n)=>{const t=a.forwardRef((o,i)=>{const{asChild:r,...c}=o,u=r?L:n;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(u,I({},c,{ref:i}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function De(e){const n=e+"CollectionProvider",[t,o]=q(n),[i,r]=t(n,{collectionRef:{current:null},itemMap:new Map}),c=f=>{const{scope:p,children:b}=f,v=a.useRef(null),h=a.useRef(new Map).current;return a.createElement(i,{scope:p,itemMap:h,collectionRef:v},b)},u=e+"CollectionSlot",d=a.forwardRef((f,p)=>{const{scope:b,children:v}=f,h=r(u,b),g=A(p,h.collectionRef);return a.createElement(L,{ref:g},v)}),s=e+"CollectionItemSlot",_="data-radix-collection-item",l=a.forwardRef((f,p)=>{const{scope:b,children:v,...h}=f,g=a.useRef(null),T=A(p,g),S=r(s,b);return a.useEffect(()=>(S.itemMap.set(g,{ref:g,...h}),()=>void S.itemMap.delete(g))),a.createElement(L,{[_]:"",ref:T},v)});function m(f){const p=r(e+"CollectionConsumer",f);return a.useCallback(()=>{const v=p.collectionRef.current;if(!v)return[];const h=Array.from(v.querySelectorAll(`[${_}]`));return Array.from(p.itemMap.values()).sort((S,V)=>h.indexOf(S.ref.current)-h.indexOf(V.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:c,Slot:d,ItemSlot:l},m,o]}const G=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},Le=te.useId||(()=>{});let Ge=0;function qe(e){const[n,t]=te.useState(Le());return G(()=>{t(o=>o??String(Ge++))},[e]),n?`radix-${n}`:""}function J(e){const n=a.useRef(e);return a.useEffect(()=>{n.current=e}),a.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function ce({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,i]=Ue({defaultProp:n,onChange:t}),r=e!==void 0,c=r?e:o,u=J(t),d=a.useCallback(s=>{if(r){const l=typeof s=="function"?s(e):s;l!==e&&u(l)}else i(s)},[r,e,i,u]);return[c,d]}function Ue({defaultProp:e,onChange:n}){const t=a.useState(e),[o]=t,i=a.useRef(o),r=J(n);return a.useEffect(()=>{i.current!==o&&(r(o),i.current=o)},[o,i,r]),t}const Ve=a.createContext(void 0);function ie(e){const n=a.useContext(Ve);return e||n||"ltr"}const B="rovingFocusGroup.onEntryFocus",ze={bubbles:!1,cancelable:!0},Q="RovingFocusGroup",[X,ue,Be]=De(Q),[He,se]=q(Q,[Be]),[Ke,Ye]=He(Q),We=a.forwardRef((e,n)=>a.createElement(X.Provider,{scope:e.__scopeRovingFocusGroup},a.createElement(X.Slot,{scope:e.__scopeRovingFocusGroup},a.createElement(Xe,I({},e,{ref:n}))))),Xe=a.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:t,orientation:o,loop:i=!1,dir:r,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:s,..._}=e,l=a.useRef(null),m=A(n,l),f=ie(r),[p=null,b]=ce({prop:c,defaultProp:u,onChange:d}),[v,h]=a.useState(!1),g=J(s),T=ue(t),S=a.useRef(!1),[V,ee]=a.useState(0);return a.useEffect(()=>{const y=l.current;if(y)return y.addEventListener(B,g),()=>y.removeEventListener(B,g)},[g]),a.createElement(Ke,{scope:t,orientation:o,dir:f,loop:i,currentTabStopId:p,onItemFocus:a.useCallback(y=>b(y),[b]),onItemShiftTab:a.useCallback(()=>h(!0),[]),onFocusableItemAdd:a.useCallback(()=>ee(y=>y+1),[]),onFocusableItemRemove:a.useCallback(()=>ee(y=>y-1),[])},a.createElement(w.div,I({tabIndex:v||V===0?-1:0,"data-orientation":o},_,{ref:m,style:{outline:"none",...e.style},onMouseDown:x(e.onMouseDown,()=>{S.current=!0}),onFocus:x(e.onFocus,y=>{const Re=!S.current;if(y.target===y.currentTarget&&Re&&!v){const re=new CustomEvent(B,ze);if(y.currentTarget.dispatchEvent(re),!re.defaultPrevented){const z=T().filter(N=>N.focusable),Ee=z.find(N=>N.active),Ce=z.find(N=>N.id===p),xe=[Ee,Ce,...z].filter(Boolean).map(N=>N.ref.current);de(xe)}}S.current=!1}),onBlur:x(e.onBlur,()=>h(!1))})))}),Ze="RovingFocusGroupItem",Je=a.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:t,focusable:o=!0,active:i=!1,tabStopId:r,...c}=e,u=qe(),d=r||u,s=Ye(Ze,t),_=s.currentTabStopId===d,l=ue(t),{onFocusableItemAdd:m,onFocusableItemRemove:f}=s;return a.useEffect(()=>{if(o)return m(),()=>f()},[o,m,f]),a.createElement(X.ItemSlot,{scope:t,id:d,focusable:o,active:i},a.createElement(w.span,I({tabIndex:_?0:-1,"data-orientation":s.orientation},c,{ref:n,onMouseDown:x(e.onMouseDown,p=>{o?s.onItemFocus(d):p.preventDefault()}),onFocus:x(e.onFocus,()=>s.onItemFocus(d)),onKeyDown:x(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){s.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const b=rr(p,s.orientation,s.dir);if(b!==void 0){p.preventDefault();let h=l().filter(g=>g.focusable).map(g=>g.ref.current);if(b==="last")h.reverse();else if(b==="prev"||b==="next"){b==="prev"&&h.reverse();const g=h.indexOf(p.currentTarget);h=s.loop?tr(h,g+1):h.slice(g+1)}setTimeout(()=>de(h))}})})))}),Qe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function er(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rr(e,n,t){const o=er(e.key,t);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Qe[o]}function de(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function tr(e,n){return e.map((t,o)=>e[(n+o)%e.length])}const nr=We,or=Je;function ar(e){const[n,t]=a.useState(void 0);return G(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let c,u;if("borderBoxSize"in r){const d=r.borderBoxSize,s=Array.isArray(d)?d[0]:d;c=s.inlineSize,u=s.blockSize}else c=e.offsetWidth,u=e.offsetHeight;t({width:c,height:u})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else t(void 0)},[e]),n}function cr(e){const n=a.useRef({value:e,previous:e});return a.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function ir(e,n){return a.useReducer((t,o)=>{const i=n[t][o];return i??t},e)}const pe=e=>{const{present:n,children:t}=e,o=ur(n),i=typeof t=="function"?t({present:o.isPresent}):a.Children.only(t),r=A(o.ref,i.ref);return typeof t=="function"||o.isPresent?a.cloneElement(i,{ref:r}):null};pe.displayName="Presence";function ur(e){const[n,t]=a.useState(),o=a.useRef({}),i=a.useRef(e),r=a.useRef("none"),c=e?"mounted":"unmounted",[u,d]=ir(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const s=j(o.current);r.current=u==="mounted"?s:"none"},[u]),G(()=>{const s=o.current,_=i.current;if(_!==e){const m=r.current,f=j(s);e?d("MOUNT"):f==="none"||(s==null?void 0:s.display)==="none"?d("UNMOUNT"):d(_&&m!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,d]),G(()=>{if(n){const s=l=>{const f=j(o.current).includes(l.animationName);l.target===n&&f&&Se.flushSync(()=>d("ANIMATION_END"))},_=l=>{l.target===n&&(r.current=j(o.current))};return n.addEventListener("animationstart",_),n.addEventListener("animationcancel",s),n.addEventListener("animationend",s),()=>{n.removeEventListener("animationstart",_),n.removeEventListener("animationcancel",s),n.removeEventListener("animationend",s)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:a.useCallback(s=>{s&&(o.current=getComputedStyle(s)),t(s)},[])}}function j(e){return(e==null?void 0:e.animationName)||"none"}const le="Radio",[sr,fe]=q(le),[dr,pr]=sr(le),lr=a.forwardRef((e,n)=>{const{__scopeRadio:t,name:o,checked:i=!1,required:r,disabled:c,value:u="on",onCheck:d,...s}=e,[_,l]=a.useState(null),m=A(n,b=>l(b)),f=a.useRef(!1),p=_?!!_.closest("form"):!0;return a.createElement(dr,{scope:t,checked:i,disabled:c},a.createElement(w.button,E({type:"button",role:"radio","aria-checked":i,"data-state":me(i),"data-disabled":c?"":void 0,disabled:c,value:u},s,{ref:m,onClick:x(e.onClick,b=>{i||d==null||d(),p&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})),p&&a.createElement(_r,{control:_,bubbles:!f.current,name:o,value:u,checked:i,required:r,disabled:c,style:{transform:"translateX(-100%)"}}))}),fr="RadioIndicator",mr=a.forwardRef((e,n)=>{const{__scopeRadio:t,forceMount:o,...i}=e,r=pr(fr,t);return a.createElement(pe,{present:o||r.checked},a.createElement(w.span,E({"data-state":me(r.checked),"data-disabled":r.disabled?"":void 0},i,{ref:n})))}),_r=e=>{const{control:n,checked:t,bubbles:o=!0,...i}=e,r=a.useRef(null),c=cr(t),u=ar(n);return a.useEffect(()=>{const d=r.current,s=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(s,"checked").set;if(c!==t&&l){const m=new Event("click",{bubbles:o});l.call(d,t),d.dispatchEvent(m)}},[c,t,o]),a.createElement("input",E({type:"radio","aria-hidden":!0,defaultChecked:t},i,{tabIndex:-1,ref:r,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function me(e){return e?"checked":"unchecked"}const br=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_e="RadioGroup",[$r,Yr]=q(_e,[se,fe]),be=se(),$e=fe(),[hr,gr]=$r(_e),vr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,name:o,defaultValue:i,value:r,required:c=!1,disabled:u=!1,orientation:d,dir:s,loop:_=!0,onValueChange:l,...m}=e,f=be(t),p=ie(s),[b,v]=ce({prop:r,defaultProp:i,onChange:l});return a.createElement(hr,{scope:t,name:o,required:c,disabled:u,value:b,onValueChange:v},a.createElement(nr,E({asChild:!0},f,{orientation:d,dir:p,loop:_}),a.createElement(w.div,E({role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":u?"":void 0,dir:p},m,{ref:n}))))}),yr="RadioGroupItem",Rr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,disabled:o,...i}=e,r=gr(yr,t),c=r.disabled||o,u=be(t),d=$e(t),s=a.useRef(null),_=A(n,s),l=r.value===i.value,m=a.useRef(!1);return a.useEffect(()=>{const f=b=>{br.includes(b.key)&&(m.current=!0)},p=()=>m.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",p)}},[]),a.createElement(or,E({asChild:!0},u,{focusable:!c,active:l}),a.createElement(lr,E({disabled:c,required:r.required,checked:l},d,i,{name:r.name,ref:_,onCheck:()=>r.onValueChange(i.value),onKeyDown:x(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:x(i.onFocus,()=>{var f;m.current&&((f=s.current)===null||f===void 0||f.click())})})))}),Er=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,...o}=e,i=$e(t);return a.createElement(mr,E({},i,o,{ref:n}))}),Cr=vr,xr=Rr,Sr=Er;function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var he={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 n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(r=i(r,o.call(this,u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var u in r)n.call(r,u)&&r[u]&&(c=i(c,this&&this[u]||u));return c}function i(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(
|
|
9
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(r=i(r,o.call(this,u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var u in r)n.call(r,u)&&r[u]&&(c=i(c,this&&this[u]||u));return c}function i(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(he);var Nr=he.exports;const Ar=Ir(Nr),Or={"purpur-radio-card-group":"_purpur-radio-card-group_19msf_1","purpur-radio-card-group--vertical":"_purpur-radio-card-group--vertical_19msf_5","purpur-radio-card-group--horizontal":"_purpur-radio-card-group--horizontal_19msf_9","purpur-radio-card-group--radio-left":"_purpur-radio-card-group--radio-left_19msf_18","purpur-radio-card-group__item":"_purpur-radio-card-group__item_19msf_18","purpur-radio-card-group__item-bottom-container":"_purpur-radio-card-group__item-bottom-container_19msf_21","purpur-radio-card-group__item-top-container":"_purpur-radio-card-group__item-top-container_19msf_24","purpur-radio-card-group__container":"_purpur-radio-card-group__container_19msf_35","purpur-radio-card-group__item-container":"_purpur-radio-card-group__item-container_19msf_42","purpur-radio-card-group__item-radio":"_purpur-radio-card-group__item-radio_19msf_77","purpur-radio-card-group__item-content":"_purpur-radio-card-group__item-content_19msf_108","purpur-radio-card-group__item-title":"_purpur-radio-card-group__item-title_19msf_121","purpur-radio-card-group__item-indicator":"_purpur-radio-card-group__item-indicator_19msf_141","purpur-radio-card-group__item-image-container":"_purpur-radio-card-group__item-image-container_19msf_151","purpur-radio-card-group__item-image":"_purpur-radio-card-group__item-image_19msf_151","purpur-radio-card-group__item-image--loaded":"_purpur-radio-card-group__item-image--loaded_19msf_164","purpur-radio-card-group__item-image-placeholder":"_purpur-radio-card-group__item-image-placeholder_19msf_167","purpur-radio-card-group__item-image-placeholder--loaded":"_purpur-radio-card-group__item-image-placeholder--loaded_19msf_172","purpur-radio-card-group__item-children":"_purpur-radio-card-group__item-children_19msf_175"},R=Ar.bind(Or);function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ge={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 n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(r=i(r,o(u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var u in r)n.call(r,u)&&r[u]&&(c=i(c,u));return c}function i(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(
|
|
13
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(r=i(r,o(u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var u in r)n.call(r,u)&&r[u]&&(c=i(c,u));return c}function i(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ge);var wr=ge.exports;const Tr=Pr(wr),O={"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"},kr={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"},P="purpur-paragraph",Z=({["data-testid"]:e,children:n,className:t,disabled:o,enableHyphenation:i=!1,negative:r=!1,variant:c=kr.PARAGRAPH100,...u})=>{const d=Tr([t,O[P],O[`${P}--${c}`],{[O[`${P}--hyphens`]]:i,[O[`${P}--disabled`]]:o,[O[`${P}--negative`]]:r}]);return $.jsx("p",{...u,className:d,"data-testid":e,children:n})};Z.displayName="Paragraph";function Mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ve={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 n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(r=i(r,o(u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var u in r)n.call(r,u)&&r[u]&&(c=i(c,u));return c}function i(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(
|
|
17
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var u=arguments[c];u&&(r=i(r,o(u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var c="";for(var u in r)n.call(r,u)&&r[u]&&(c=i(c,u));return c}function i(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ve);var jr=ve.exports;const Fr=Mr(jr),Dr="_loading_cil8l_1",H={"purpur-skeleton":"_purpur-skeleton_cil8l_2",loading:Dr,"purpur-skeleton--default":"_purpur-skeleton--default_cil8l_25","purpur-skeleton--negative":"_purpur-skeleton--negative_cil8l_31","purpur-skeleton--xs":"_purpur-skeleton--xs_cil8l_37","purpur-skeleton--sm":"_purpur-skeleton--sm_cil8l_40","purpur-skeleton--md":"_purpur-skeleton--md_cil8l_43","purpur-skeleton--lg":"_purpur-skeleton--lg_cil8l_46","purpur-skeleton--full":"_purpur-skeleton--full_cil8l_49"},K="purpur-skeleton",Lr=({className:e,["data-testid"]:n,radius:t="xs",style:o,negative:i=!1,...r})=>{const c=Fr([e,H[K],H[`${K}--${i?"negative":"default"}`],H[`${K}--${t}`]]);return $.jsx("div",{className:c,style:o,"data-testid":n,...r})},F="purpur-radio-card-group__item-image",Gr=e=>!!(e!=null&&e.src)&&!!e.altText,qr=({src:e,altText:n,noPlaceholder:t,loading:o="lazy",["data-testid"]:i})=>{const[r,c]=a.useState(!1),u=()=>c(!0),d=R(F,{[`${F}--loaded`]:r}),s=R(`${F}-placeholder`,{[`${F}-placeholder--loaded`]:r});return $.jsxs($.Fragment,{children:[$.jsx("img",{"data-testid":i,className:d,src:e,alt:n,loading:o,onLoad:u}),!t&&$.jsx(Lr,{className:s})]})},C="purpur-radio-card-group__item",Y=(e,{disabled:n})=>typeof e=="function"?e({disabled:n}):e,Ur=({title:e,...n},t)=>{const{["data-testid"]:o,body:i,children:r,disabled:c,id:u,image:d,required:s,value:_}=n,l={title:e,...n};return $.jsxs("div",{className:R(`${C}-container`),ref:t,children:[$.jsxs(xr,{className:R(C),"data-testid":o,disabled:c,id:u,required:s,value:_,children:[d&&$.jsx("span",{className:R(`${C}-image-container`),children:Gr(d)?$.jsx(qr,{...d,"data-testid":o&&`${o}-image`}):Y(d,l)}),$.jsxs("span",{className:R(`${C}-content`),children:[$.jsxs("span",{className:R(`${C}-top-container`),children:[typeof e=="string"?$.jsx(Z,{className:R(`${C}-title`),"data-testid":o&&`${o}-title`,variant:"paragraph-100",disabled:c,children:e}):Y(e,l),$.jsx("span",{className:R(`${C}-radio`),children:$.jsx(Sr,{className:R(`${C}-indicator`)})})]}),i&&$.jsx("span",{className:R(`${C}-bottom-container`),children:typeof i=="string"?$.jsx(Z,{"data-testid":o&&`${o}-body`,variant:"paragraph-100",disabled:c,children:i}):Y(i,l)})]})]}),r]})},U=a.forwardRef(Ur);U.displayName="RadioCardItem";const Vr=e=>a.isValidElement(e)&&(e==null?void 0:e.type)===U,zr=["horizontal","vertical"],Br=["right","left"],D="purpur-radio-card-group",Hr=({"data-testid":e,"aria-labelledby":n,children:t,className:o,items:i,label:r,loop:c=!0,orientation:u="vertical",radioPosition:d="right",...s},_)=>{const l=a.Children.toArray(t).filter(Vr);return $.jsxs("div",{className:R(o,`${D}__container`),ref:_,children:[r&&$.jsx(oe,{"data-testid":e?`${e}-label`:void 0,id:`${s.id}-label`,tag:"h2",variant:"subsection-100",children:`${s.required?"* ":""}${r}`}),(!!(i!=null&&i.length)||l.length)&&$.jsxs(Cr,{...s,"aria-labelledby":n||(r?`${s.id}-label`:void 0),className:R(D,`${D}--${u}`,`${D}--radio-${d}`),"data-testid":e,loop:c,children:[i==null?void 0:i.map(m=>$.jsx(U,{...m,disabled:m.disabled||s.disabled,"data-testid":e?`${e}-item`:void 0},m.id)),a.Children.map(l,m=>a.cloneElement(m,{disabled:m.props.disabled||s.disabled}))]})]})},ye=a.forwardRef(Hr);ye.displayName="RadioCardGroup";exports.ORIENTATION=zr;exports.RADIO_POSITION=Br;exports.RadioCardGroup=ye;exports.RadioCardItem=U;
|
|
18
18
|
//# sourceMappingURL=radio-card-group.cjs.js.map
|