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