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