@purpurds/radio-card-group 3.7.0 → 4.0.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.es.js +227 -227
- package/dist/radio-card-group.es.js.map +1 -1
- package/package.json +10 -11
- package/dist/radio-card-group.system.js +0 -18
- package/dist/radio-card-group.system.js.map +0 -1
package/dist/LICENSE.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Name: @purpurds/heading
|
|
2
|
-
Version: 3.
|
|
2
|
+
Version: 3.7.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: 3.
|
|
223
|
+
Version: 3.7.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: 3.
|
|
230
|
+
Version: 3.7.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"),Ce=require("react-dom");function Se(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=Se(a);function Ae(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 i=arguments[c];i&&(r=u(r,o(i)))}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 i in r)n.call(r,i)&&r[i]&&(c=u(c,i));return c}function u(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ne);var Ne=ne.exports;const Ie=Ae(Ne),B={"purpur-heading":"_purpur-heading_2c2y0_1","purpur-heading--hyphens":"_purpur-heading--hyphens_2c2y0_8","purpur-heading--subsection-100":"_purpur-heading--subsection-100_2c2y0_11","purpur-heading--title-100":"_purpur-heading--title-100_2c2y0_17","purpur-heading--title-200":"_purpur-heading--title-200_2c2y0_23","purpur-heading--title-300":"_purpur-heading--title-300_2c2y0_29","purpur-heading--title-400":"_purpur-heading--title-400_2c2y0_35","purpur-heading--title-500":"_purpur-heading--title-500_2c2y0_41","purpur-heading--title-600":"_purpur-heading--title-600_2c2y0_47","purpur-heading--title-700":"_purpur-heading--title-700_2c2y0_53","purpur-heading--display-25":"_purpur-heading--display-25_2c2y0_59","purpur-heading--display-50":"_purpur-heading--display-50_2c2y0_65","purpur-heading--display-100":"_purpur-heading--display-100_2c2y0_71","purpur-heading--display-200":"_purpur-heading--display-200_2c2y0_77"},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"},z="purpur-heading",Pe=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,tag:u,variant:r=we.TITLE100,...c})=>{const i=u,d=Ie([t,B[z],B[`${z}--${r}`],{[B[`${z}--hyphens`]]:o}]);return $.jsx(i,{...c,className:d,"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(u){if(e==null||e(u),t===!1||!u.defaultPrevented)return n==null?void 0:n(u)}}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 I(...e){return a.useCallback(oe(...e),e)}function D(e,n=[]){let t=[];function o(r,c){const i=a.createContext(c),d=t.length;t=[...t,c];function s(f){const{scope:m,children:p,...l}=f,_=(m==null?void 0:m[e][d])||i,v=a.useMemo(()=>l,Object.values(l));return a.createElement(_.Provider,{value:v},p)}function b(f,m){const p=(m==null?void 0:m[e][d])||i,l=a.useContext(p);if(l)return l;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${r}\``)}return s.displayName=r+"Provider",[s,b]}const u=()=>{const r=t.map(c=>a.createContext(c));return function(i){const d=(i==null?void 0:i[e])||r;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return u.scopeName=e,[o,Te(u,...n)]}function Te(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(r){const c=o.reduce((i,{useScope:d,scopeName:s})=>{const f=d(r)[`__scope${s}`];return{...i,...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 F=a.forwardRef((e,n)=>{const{children:t,...o}=e,u=a.Children.toArray(t),r=u.find(Me);if(r){const c=r.props.children,i=u.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,i):null)}return a.createElement(W,A({},o,{ref:n}),t)});F.displayName="Slot";const W=a.forwardRef((e,n)=>{const{children:t,...o}=e;return a.isValidElement(t)?a.cloneElement(t,{...ke(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 je=({children:e})=>a.createElement(a.Fragment,null,e);function Me(e){return a.isValidElement(e)&&e.type===je}function ke(e,n){const t={...n};for(const o in n){const u=e[o],r=n[o];/^on[A-Z]/.test(o)?u&&r?t[o]=(...i)=>{r(...i),u(...i)}:u&&(t[o]=u):o==="style"?t[o]={...u,...r}:o==="className"&&(t[o]=[u,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,u)=>{const{asChild:r,...c}=o,i=r?F:n;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(i,A({},c,{ref:u}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function Le(e){const n=e+"CollectionProvider",[t,o]=D(n),[u,r]=t(n,{collectionRef:{current:null},itemMap:new Map}),c=p=>{const{scope:l,children:_}=p,v=a.useRef(null),h=a.useRef(new Map).current;return a.createElement(u,{scope:l,itemMap:h,collectionRef:v},_)},i=e+"CollectionSlot",d=a.forwardRef((p,l)=>{const{scope:_,children:v}=p,h=r(i,_),g=I(l,h.collectionRef);return a.createElement(F,{ref:g},v)}),s=e+"CollectionItemSlot",b="data-radix-collection-item",f=a.forwardRef((p,l)=>{const{scope:_,children:v,...h}=p,g=a.useRef(null),P=I(l,g),S=r(s,_);return a.useEffect(()=>(S.itemMap.set(g,{ref:g,...h}),()=>void S.itemMap.delete(g))),a.createElement(F,{[b]:"",ref:P},v)});function m(p){const l=r(e+"CollectionConsumer",p);return a.useCallback(()=>{const v=l.collectionRef.current;if(!v)return[];const h=Array.from(v.querySelectorAll(`[${b}]`));return Array.from(l.itemMap.values()).sort((S,U)=>h.indexOf(S.ref.current)-h.indexOf(U.ref.current))},[l.collectionRef,l.itemMap])}return[{Provider:c,Slot:d,ItemSlot:f},m,o]}const L=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},De=te.useId||(()=>{});let Ge=0;function Ue(e){const[n,t]=te.useState(De());return L(()=>{e||t(o=>o??String(Ge++))},[e]),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,u]=Ve({defaultProp:n,onChange:t}),r=e!==void 0,c=r?e:o,i=Z(t),d=a.useCallback(s=>{if(r){const f=typeof s=="function"?s(e):s;f!==e&&i(f)}else u(s)},[r,e,u,i]);return[c,d]}function Ve({defaultProp:e,onChange:n}){const t=a.useState(e),[o]=t,u=a.useRef(o),r=Z(n);return a.useEffect(()=>{u.current!==o&&(r(o),u.current=o)},[o,u,r]),t}const Be=a.createContext(void 0);function ce(e){const n=a.useContext(Be);return e||n||"ltr"}const q="rovingFocusGroup.onEntryFocus",ze={bubbles:!1,cancelable:!0},J="RovingFocusGroup",[X,ue,qe]=Le(J),[Ke,ie]=D(J,[qe]),[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:u=!1,dir:r,currentTabStopId:c,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:d,onEntryFocus:s,...b}=e,f=a.useRef(null),m=I(n,f),p=ce(r),[l=null,_]=ae({prop:c,defaultProp:i,onChange:d}),[v,h]=a.useState(!1),g=Z(s),P=ue(t),S=a.useRef(!1),[U,Q]=a.useState(0);return a.useEffect(()=>{const y=f.current;if(y)return y.addEventListener(q,g),()=>y.removeEventListener(q,g)},[g]),a.createElement(He,{scope:t,orientation:o,dir:p,loop:u,currentTabStopId:l,onItemFocus:a.useCallback(y=>_(y),[_]),onItemShiftTab:a.useCallback(()=>h(!0),[]),onFocusableItemAdd:a.useCallback(()=>Q(y=>y+1),[]),onFocusableItemRemove:a.useCallback(()=>Q(y=>y-1),[])},a.createElement(w.div,A({tabIndex:v||U===0?-1:0,"data-orientation":o},b,{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(q,ze);if(y.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const V=P().filter(N=>N.focusable),Re=V.find(N=>N.active),Ee=V.find(N=>N.id===l),Ce=[Re,Ee,...V].filter(Boolean).map(N=>N.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:u=!1,tabStopId:r,...c}=e,i=Ue(),d=r||i,s=Ye(Ze,t),b=s.currentTabStopId===d,f=ue(t),{onFocusableItemAdd:m,onFocusableItemRemove:p}=s;return a.useEffect(()=>{if(o)return m(),()=>p()},[o,m,p]),a.createElement(X.ItemSlot,{scope:t,id:d,focusable:o,active:u},a.createElement(w.span,A({tabIndex:b?0:-1,"data-orientation":s.orientation},c,{ref:n,onMouseDown:x(e.onMouseDown,l=>{o?s.onItemFocus(d):l.preventDefault()}),onFocus:x(e.onFocus,()=>s.onItemFocus(d)),onKeyDown:x(e.onKeyDown,l=>{if(l.key==="Tab"&&l.shiftKey){s.onItemShiftTab();return}if(l.target!==l.currentTarget)return;const _=rr(l,s.orientation,s.dir);if(_!==void 0){l.preventDefault();let h=f().filter(g=>g.focusable).map(g=>g.ref.current);if(_==="last")h.reverse();else if(_==="prev"||_==="next"){_==="prev"&&h.reverse();const g=h.indexOf(l.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 L(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const r=u[0];let c,i;if("borderBoxSize"in r){const d=r.borderBoxSize,s=Array.isArray(d)?d[0]:d;c=s.inlineSize,i=s.blockSize}else c=e.offsetWidth,i=e.offsetHeight;t({width:c,height:i})});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 ur(e,n){return a.useReducer((t,o)=>{const u=n[t][o];return u??t},e)}const de=e=>{const{present:n,children:t}=e,o=ir(n),u=typeof t=="function"?t({present:o.isPresent}):a.Children.only(t),r=I(o.ref,u.ref);return typeof t=="function"||o.isPresent?a.cloneElement(u,{ref:r}):null};de.displayName="Presence";function ir(e){const[n,t]=a.useState(),o=a.useRef({}),u=a.useRef(e),r=a.useRef("none"),c=e?"mounted":"unmounted",[i,d]=ur(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const s=O(o.current);r.current=i==="mounted"?s:"none"},[i]),L(()=>{const s=o.current,b=u.current;if(b!==e){const m=r.current,p=O(s);e?d("MOUNT"):p==="none"||(s==null?void 0:s.display)==="none"?d("UNMOUNT"):d(b&&m!==p?"ANIMATION_OUT":"UNMOUNT"),u.current=e}},[e,d]),L(()=>{if(n){const s=f=>{const p=O(o.current).includes(f.animationName);f.target===n&&p&&xe.flushSync(()=>d("ANIMATION_END"))},b=f=>{f.target===n&&(r.current=O(o.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",s),n.addEventListener("animationend",s),()=>{n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",s),n.removeEventListener("animationend",s)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(s=>{s&&(o.current=getComputedStyle(s)),t(s)},[])}}function O(e){return(e==null?void 0:e.animationName)||"none"}const le="Radio",[sr,pe]=D(le),[dr,lr]=sr(le),pr=a.forwardRef((e,n)=>{const{__scopeRadio:t,name:o,checked:u=!1,required:r,disabled:c,value:i="on",onCheck:d,...s}=e,[b,f]=a.useState(null),m=I(n,_=>f(_)),p=a.useRef(!1),l=b?!!b.closest("form"):!0;return a.createElement(dr,{scope:t,checked:u,disabled:c},a.createElement(w.button,E({type:"button",role:"radio","aria-checked":u,"data-state":fe(u),"data-disabled":c?"":void 0,disabled:c,value:i},s,{ref:m,onClick:x(e.onClick,_=>{u||d==null||d(),l&&(p.current=_.isPropagationStopped(),p.current||_.stopPropagation())})})),l&&a.createElement(br,{control:b,bubbles:!p.current,name:o,value:i,checked:u,required:r,disabled:c,style:{transform:"translateX(-100%)"}}))}),fr="RadioIndicator",mr=a.forwardRef((e,n)=>{const{__scopeRadio:t,forceMount:o,...u}=e,r=lr(fr,t);return a.createElement(de,{present:o||r.checked},a.createElement(w.span,E({"data-state":fe(r.checked),"data-disabled":r.disabled?"":void 0},u,{ref:n})))}),br=e=>{const{control:n,checked:t,bubbles:o=!0,...u}=e,r=a.useRef(null),c=cr(t),i=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},u,{tabIndex:-1,ref:r,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fe(e){return e?"checked":"unchecked"}const _r=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],me="RadioGroup",[$r,Kr]=D(me,[ie,pe]),be=ie(),_e=pe(),[hr,gr]=$r(me),vr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,name:o,defaultValue:u,value:r,required:c=!1,disabled:i=!1,orientation:d,dir:s,loop:b=!0,onValueChange:f,...m}=e,p=be(t),l=ce(s),[_,v]=ae({prop:r,defaultProp:u,onChange:f});return a.createElement(hr,{scope:t,name:o,required:c,disabled:i,value:_,onValueChange:v},a.createElement(nr,E({asChild:!0},p,{orientation:d,dir:l,loop:b}),a.createElement(w.div,E({role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":i?"":void 0,dir:l},m,{ref:n}))))}),yr="RadioGroupItem",Rr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,disabled:o,...u}=e,r=gr(yr,t),c=r.disabled||o,i=be(t),d=_e(t),s=a.useRef(null),b=I(n,s),f=r.value===u.value,m=a.useRef(!1);return a.useEffect(()=>{const p=_=>{_r.includes(_.key)&&(m.current=!0)},l=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",l),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",l)}},[]),a.createElement(or,E({asChild:!0},i,{focusable:!c,active:f}),a.createElement(pr,E({disabled:c,required:r.required,checked:f},d,u,{name:r.name,ref:b,onCheck:()=>r.onValueChange(u.value),onKeyDown:x(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:x(u.onFocus,()=>{var p;m.current&&((p=s.current)===null||p===void 0||p.click())})})))}),Er=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,...o}=e,u=_e(t);return a.createElement(mr,E({},u,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 i=arguments[c];i&&(r=u(r,o(i)))}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 i in r)n.call(r,i)&&r[i]&&(c=u(c,i));return c}function u(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),V={"purpur-heading":"_purpur-heading_1abfh_1","purpur-heading--hyphens":"_purpur-heading--hyphens_1abfh_8","purpur-heading--subsection-100":"_purpur-heading--subsection-100_1abfh_11","purpur-heading--title-100":"_purpur-heading--title-100_1abfh_17","purpur-heading--title-200":"_purpur-heading--title-200_1abfh_23","purpur-heading--title-300":"_purpur-heading--title-300_1abfh_29","purpur-heading--title-400":"_purpur-heading--title-400_1abfh_35","purpur-heading--title-500":"_purpur-heading--title-500_1abfh_41","purpur-heading--title-600":"_purpur-heading--title-600_1abfh_47","purpur-heading--title-700":"_purpur-heading--title-700_1abfh_53","purpur-heading--display-25":"_purpur-heading--display-25_1abfh_59","purpur-heading--display-50":"_purpur-heading--display-50_1abfh_65","purpur-heading--display-100":"_purpur-heading--display-100_1abfh_71","purpur-heading--display-200":"_purpur-heading--display-200_1abfh_77"},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"},B="purpur-heading",Pe=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,tag:u,variant:r=we.TITLE100,...c})=>{const i=u,d=Ne([t,V[B],V[`${B}--${r}`],{[V[`${B}--hyphens`]]:o}]);return $.jsx(i,{...c,className:d,"data-testid":e,children:n})};function R(){return R=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},R.apply(this,arguments)}function C(e,n,{checkForDefaultPrevented:t=!0}={}){return function(u){if(e==null||e(u),t===!1||!u.defaultPrevented)return n==null?void 0:n(u)}}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 L(e,n=[]){let t=[];function o(r,c){const i=a.createContext(c),d=t.length;t=[...t,c];function s(f){const{scope:m,children:p,...l}=f,_=(m==null?void 0:m[e][d])||i,v=a.useMemo(()=>l,Object.values(l));return a.createElement(_.Provider,{value:v},p)}function b(f,m){const p=(m==null?void 0:m[e][d])||i,l=a.useContext(p);if(l)return l;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${r}\``)}return s.displayName=r+"Provider",[s,b]}const u=()=>{const r=t.map(c=>a.createContext(c));return function(i){const d=(i==null?void 0:i[e])||r;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return u.scopeName=e,[o,Te(u,...n)]}function Te(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(r){const c=o.reduce((i,{useScope:d,scopeName:s})=>{const f=d(r)[`__scope${s}`];return{...i,...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 F=a.forwardRef((e,n)=>{const{children:t,...o}=e,u=a.Children.toArray(t),r=u.find(ke);if(r){const c=r.props.children,i=u.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,i):null)}return a.createElement(W,A({},o,{ref:n}),t)});F.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 Me=({children:e})=>a.createElement(a.Fragment,null,e);function ke(e){return a.isValidElement(e)&&e.type===Me}function je(e,n){const t={...n};for(const o in n){const u=e[o],r=n[o];/^on[A-Z]/.test(o)?u&&r?t[o]=(...i)=>{r(...i),u(...i)}:u&&(t[o]=u):o==="style"?t[o]={...u,...r}:o==="className"&&(t[o]=[u,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,u)=>{const{asChild:r,...c}=o,i=r?F:n;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(i,A({},c,{ref:u}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function De(e){const n=e+"CollectionProvider",[t,o]=L(n),[u,r]=t(n,{collectionRef:{current:null},itemMap:new Map}),c=p=>{const{scope:l,children:_}=p,v=a.useRef(null),h=a.useRef(new Map).current;return a.createElement(u,{scope:l,itemMap:h,collectionRef:v},_)},i=e+"CollectionSlot",d=a.forwardRef((p,l)=>{const{scope:_,children:v}=p,h=r(i,_),g=N(l,h.collectionRef);return a.createElement(F,{ref:g},v)}),s=e+"CollectionItemSlot",b="data-radix-collection-item",f=a.forwardRef((p,l)=>{const{scope:_,children:v,...h}=p,g=a.useRef(null),P=N(l,g),S=r(s,_);return a.useEffect(()=>(S.itemMap.set(g,{ref:g,...h}),()=>void S.itemMap.delete(g))),a.createElement(F,{[b]:"",ref:P},v)});function m(p){const l=r(e+"CollectionConsumer",p);return a.useCallback(()=>{const v=l.collectionRef.current;if(!v)return[];const h=Array.from(v.querySelectorAll(`[${b}]`));return Array.from(l.itemMap.values()).sort((S,z)=>h.indexOf(S.ref.current)-h.indexOf(z.ref.current))},[l.collectionRef,l.itemMap])}return[{Provider:c,Slot:d,ItemSlot:f},m,o]}const D=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},Le=te.useId||(()=>{});let Ge=0;function ze(e){const[n,t]=te.useState(Le());return D(()=>{e||t(o=>o??String(Ge++))},[e]),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,u]=Ue({defaultProp:n,onChange:t}),r=e!==void 0,c=r?e:o,i=Z(t),d=a.useCallback(s=>{if(r){const f=typeof s=="function"?s(e):s;f!==e&&i(f)}else u(s)},[r,e,u,i]);return[c,d]}function Ue({defaultProp:e,onChange:n}){const t=a.useState(e),[o]=t,u=a.useRef(o),r=Z(n);return a.useEffect(()=>{u.current!==o&&(r(o),u.current=o)},[o,u,r]),t}const Ve=a.createContext(void 0);function ce(e){const n=a.useContext(Ve);return e||n||"ltr"}const q="rovingFocusGroup.onEntryFocus",Be={bubbles:!1,cancelable:!0},J="RovingFocusGroup",[X,ue,qe]=De(J),[Ke,ie]=L(J,[qe]),[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:u=!1,dir:r,currentTabStopId:c,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:d,onEntryFocus:s,...b}=e,f=a.useRef(null),m=N(n,f),p=ce(r),[l=null,_]=ae({prop:c,defaultProp:i,onChange:d}),[v,h]=a.useState(!1),g=Z(s),P=ue(t),S=a.useRef(!1),[z,Q]=a.useState(0);return a.useEffect(()=>{const y=f.current;if(y)return y.addEventListener(q,g),()=>y.removeEventListener(q,g)},[g]),a.createElement(He,{scope:t,orientation:o,dir:p,loop:u,currentTabStopId:l,onItemFocus:a.useCallback(y=>_(y),[_]),onItemShiftTab:a.useCallback(()=>h(!0),[]),onFocusableItemAdd:a.useCallback(()=>Q(y=>y+1),[]),onFocusableItemRemove:a.useCallback(()=>Q(y=>y-1),[])},a.createElement(w.div,A({tabIndex:v||z===0?-1:0,"data-orientation":o},b,{ref:m,style:{outline:"none",...e.style},onMouseDown:C(e.onMouseDown,()=>{S.current=!0}),onFocus:C(e.onFocus,y=>{const ye=!S.current;if(y.target===y.currentTarget&&ye&&!v){const ee=new CustomEvent(q,Be);if(y.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const U=P().filter(I=>I.focusable),xe=U.find(I=>I.active),Re=U.find(I=>I.id===l),Ee=[xe,Re,...U].filter(Boolean).map(I=>I.ref.current);se(Ee)}}S.current=!1}),onBlur:C(e.onBlur,()=>h(!1))})))}),Ze="RovingFocusGroupItem",Je=a.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:t,focusable:o=!0,active:u=!1,tabStopId:r,...c}=e,i=ze(),d=r||i,s=Ye(Ze,t),b=s.currentTabStopId===d,f=ue(t),{onFocusableItemAdd:m,onFocusableItemRemove:p}=s;return a.useEffect(()=>{if(o)return m(),()=>p()},[o,m,p]),a.createElement(X.ItemSlot,{scope:t,id:d,focusable:o,active:u},a.createElement(w.span,A({tabIndex:b?0:-1,"data-orientation":s.orientation},c,{ref:n,onMouseDown:C(e.onMouseDown,l=>{o?s.onItemFocus(d):l.preventDefault()}),onFocus:C(e.onFocus,()=>s.onItemFocus(d)),onKeyDown:C(e.onKeyDown,l=>{if(l.key==="Tab"&&l.shiftKey){s.onItemShiftTab();return}if(l.target!==l.currentTarget)return;const _=rr(l,s.orientation,s.dir);if(_!==void 0){l.preventDefault();let h=f().filter(g=>g.focusable).map(g=>g.ref.current);if(_==="last")h.reverse();else if(_==="prev"||_==="next"){_==="prev"&&h.reverse();const g=h.indexOf(l.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 D(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const r=u[0];let c,i;if("borderBoxSize"in r){const d=r.borderBoxSize,s=Array.isArray(d)?d[0]:d;c=s.inlineSize,i=s.blockSize}else c=e.offsetWidth,i=e.offsetHeight;t({width:c,height:i})});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 ur(e,n){return a.useReducer((t,o)=>{const u=n[t][o];return u??t},e)}const de=e=>{const{present:n,children:t}=e,o=ir(n),u=typeof t=="function"?t({present:o.isPresent}):a.Children.only(t),r=N(o.ref,u.ref);return typeof t=="function"||o.isPresent?a.cloneElement(u,{ref:r}):null};de.displayName="Presence";function ir(e){const[n,t]=a.useState(),o=a.useRef({}),u=a.useRef(e),r=a.useRef("none"),c=e?"mounted":"unmounted",[i,d]=ur(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const s=O(o.current);r.current=i==="mounted"?s:"none"},[i]),D(()=>{const s=o.current,b=u.current;if(b!==e){const m=r.current,p=O(s);e?d("MOUNT"):p==="none"||(s==null?void 0:s.display)==="none"?d("UNMOUNT"):d(b&&m!==p?"ANIMATION_OUT":"UNMOUNT"),u.current=e}},[e,d]),D(()=>{if(n){const s=f=>{const p=O(o.current).includes(f.animationName);f.target===n&&p&&Ce.flushSync(()=>d("ANIMATION_END"))},b=f=>{f.target===n&&(r.current=O(o.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",s),n.addEventListener("animationend",s),()=>{n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",s),n.removeEventListener("animationend",s)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(s=>{s&&(o.current=getComputedStyle(s)),t(s)},[])}}function O(e){return(e==null?void 0:e.animationName)||"none"}const le="Radio",[sr,pe]=L(le),[dr,lr]=sr(le),pr=a.forwardRef((e,n)=>{const{__scopeRadio:t,name:o,checked:u=!1,required:r,disabled:c,value:i="on",onCheck:d,...s}=e,[b,f]=a.useState(null),m=N(n,_=>f(_)),p=a.useRef(!1),l=b?!!b.closest("form"):!0;return a.createElement(dr,{scope:t,checked:u,disabled:c},a.createElement(w.button,R({type:"button",role:"radio","aria-checked":u,"data-state":fe(u),"data-disabled":c?"":void 0,disabled:c,value:i},s,{ref:m,onClick:C(e.onClick,_=>{u||d==null||d(),l&&(p.current=_.isPropagationStopped(),p.current||_.stopPropagation())})})),l&&a.createElement(br,{control:b,bubbles:!p.current,name:o,value:i,checked:u,required:r,disabled:c,style:{transform:"translateX(-100%)"}}))}),fr="RadioIndicator",mr=a.forwardRef((e,n)=>{const{__scopeRadio:t,forceMount:o,...u}=e,r=lr(fr,t);return a.createElement(de,{present:o||r.checked},a.createElement(w.span,R({"data-state":fe(r.checked),"data-disabled":r.disabled?"":void 0},u,{ref:n})))}),br=e=>{const{control:n,checked:t,bubbles:o=!0,...u}=e,r=a.useRef(null),c=cr(t),i=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",R({type:"radio","aria-hidden":!0,defaultChecked:t},u,{tabIndex:-1,ref:r,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fe(e){return e?"checked":"unchecked"}const _r=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],me="RadioGroup",[$r,Kr]=L(me,[ie,pe]),be=ie(),_e=pe(),[hr,gr]=$r(me),vr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,name:o,defaultValue:u,value:r,required:c=!1,disabled:i=!1,orientation:d,dir:s,loop:b=!0,onValueChange:f,...m}=e,p=be(t),l=ce(s),[_,v]=ae({prop:r,defaultProp:u,onChange:f});return a.createElement(hr,{scope:t,name:o,required:c,disabled:i,value:_,onValueChange:v},a.createElement(nr,R({asChild:!0},p,{orientation:d,dir:l,loop:b}),a.createElement(w.div,R({role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":i?"":void 0,dir:l},m,{ref:n}))))}),yr="RadioGroupItem",xr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,disabled:o,...u}=e,r=gr(yr,t),c=r.disabled||o,i=be(t),d=_e(t),s=a.useRef(null),b=N(n,s),f=r.value===u.value,m=a.useRef(!1);return a.useEffect(()=>{const p=_=>{_r.includes(_.key)&&(m.current=!0)},l=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",l),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",l)}},[]),a.createElement(or,R({asChild:!0},i,{focusable:!c,active:f}),a.createElement(pr,R({disabled:c,required:r.required,checked:f},d,u,{name:r.name,ref:b,onCheck:()=>r.onValueChange(u.value),onKeyDown:C(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:C(u.onFocus,()=>{var p;m.current&&((p=s.current)===null||p===void 0||p.click())})})))}),Rr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,...o}=e,u=_e(t);return a.createElement(mr,R({},u,o,{ref:n}))}),Er=vr,Cr=xr,Sr=Rr;function Ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $e={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 i=arguments[c];i&&(r=u(r,o.call(this,i)))}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 i in r)n.call(r,i)&&r[i]&&(c=u(c,this&&this[i]||i));return c}function u(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})($e);var
|
|
9
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var i=arguments[c];i&&(r=u(r,o.call(this,i)))}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 i in r)n.call(r,i)&&r[i]&&(c=u(c,this&&this[i]||i));return c}function u(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})($e);var Ir=$e.exports;const Nr=Ar(Ir),wr={"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=Nr.bind(wr);function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var he={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 i=arguments[c];i&&(r=u(r,o(i)))}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 i in r)n.call(r,i)&&r[i]&&(c=u(c,i));return c}function u(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(he);var Or=he.exports;const Tr=Pr(Or),T={"purpur-paragraph":"_purpur-
|
|
13
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var i=arguments[c];i&&(r=u(r,o(i)))}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 i in r)n.call(r,i)&&r[i]&&(c=u(c,i));return c}function u(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(he);var Or=he.exports;const Tr=Pr(Or),T={"purpur-paragraph":"_purpur-paragraph_1fzxr_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1fzxr_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1fzxr_10","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1fzxr_13","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1fzxr_19","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1fzxr_26","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1fzxr_33","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1fzxr_39","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1fzxr_45","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1fzxr_51","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1fzxr_57","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1fzxr_64","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1fzxr_71"},Mr={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"},M="purpur-paragraph",re=({["data-testid"]:e,children:n,className:t="",disabled:o,enableHyphenation:u=!1,variant:r=Mr.PARAGRAPH100,...c})=>{const i=Tr([t,T[M],T[`${M}--${r}`],{[T[`${M}--hyphens`]]:u,[T[`${M}--disabled`]]:o}]);return $.jsx("p",{...c,className:i,"data-testid":e,children:n})};function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ge={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 i=arguments[c];i&&(r=u(r,o(i)))}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 i in r)n.call(r,i)&&r[i]&&(c=u(c,i));return c}function u(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ge);var
|
|
17
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",c=0;c<arguments.length;c++){var i=arguments[c];i&&(r=u(r,o(i)))}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 i in r)n.call(r,i)&&r[i]&&(c=u(c,i));return c}function u(r,c){return c?r?r+" "+c:r+c:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ge);var jr=ge.exports;const Fr=kr(jr),Dr="_loading_93tal_1",K={"purpur-skeleton":"_purpur-skeleton_93tal_1",loading:Dr,"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",Lr=({className:e,["data-testid"]:n,radius:t="xs",style:o,variant:u="default",...r})=>{const c=Fr([e,K[H],K[`${H}--${u}`],K[`${H}--${t}`]]);return $.jsx("div",{className:c,style:o,"data-testid":n,...r})},k="purpur-radio-card-group__item-image",Gr=e=>!!(e!=null&&e.src)&&!!e.altText,zr=({src:e,altText:n,noPlaceholder:t,loading:o="lazy",["data-testid"]:u})=>{const[r,c]=a.useState(!1),i=()=>c(!0),d=x(k,{[`${k}--loaded`]:r}),s=x(`${k}-placeholder`,{[`${k}-placeholder--loaded`]:r});return $.jsxs($.Fragment,{children:[$.jsx("img",{"data-testid":u,className:d,src:e,alt:n,loading:o,onLoad:i}),!t&&$.jsx(Lr,{className:s})]})},E="purpur-radio-card-group__item",Y=(e,{disabled:n})=>typeof e=="function"?e({disabled:n}):e,Ur=(e,n)=>{const{["data-testid"]:t,body:o,children:u,disabled:r,id:c,image:i,required:d,title:s,value:b}=e;return $.jsxs("div",{className:x(`${E}-container`),ref:n,children:[$.jsxs(Cr,{className:x(E),"data-testid":t,disabled:r,id:c,required:d,value:b,children:[i&&$.jsx("span",{className:x(`${E}-image-container`),children:Gr(i)?$.jsx(zr,{...i,"data-testid":t&&`${t}-image`}):Y(i,e)}),$.jsxs("span",{className:x(`${E}-content`),children:[$.jsxs("span",{className:x(`${E}-top-container`),children:[typeof s=="string"?$.jsx(re,{className:x(`${E}-title`),"data-testid":t&&`${t}-title`,variant:"paragraph-100",disabled:r,children:s}):Y(s,e),$.jsx("span",{className:x(`${E}-radio`),children:$.jsx(Sr,{className:x(`${E}-indicator`)})})]}),o&&$.jsx("span",{className:x(`${E}-bottom-container`),children:typeof o=="string"?$.jsx(re,{"data-testid":t&&`${t}-body`,variant:"paragraph-100",disabled:r,children:o}):Y(o,e)})]})]}),u]})},G=a.forwardRef(Ur);G.displayName="RadioCardItem";const Vr=e=>a.isValidElement(e)&&(e==null?void 0:e.type)===G,j="purpur-radio-card-group",Br=({"data-testid":e,"aria-labelledby":n,children:t,className:o,items:u,label:r,loop:c=!0,orientation:i="vertical",radioPosition:d="right",...s},b)=>{const f=a.Children.toArray(t).filter(Vr);return $.jsxs("div",{className:x(o,`${j}__container`),ref:b,children:[r&&$.jsx(Pe,{"data-testid":e?`${e}-label`:void 0,id:`${s.id}-label`,tag:"h2",variant:"subsection-100",children:`${s.required?"* ":""}${r}`}),(!!(u!=null&&u.length)||f.length)&&$.jsxs(Er,{...s,"aria-labelledby":n||(r?`${s.id}-label`:void 0),className:x(j,`${j}--${i}`,`${j}--radio-${d}`),"data-testid":e,loop:c,children:[u==null?void 0:u.map(m=>$.jsx(G,{...m,disabled:m.disabled||s.disabled,"data-testid":e?`${e}-item`:void 0},m.id)),a.Children.map(f,m=>a.cloneElement(m,{disabled:m.props.disabled||s.disabled}))]})]})},ve=a.forwardRef(Br);ve.displayName="RadioCardGroup";exports.RadioCardGroup=ve;exports.RadioCardItem=G;
|
|
18
18
|
//# sourceMappingURL=radio-card-group.cjs.js.map
|