@purpurds/radio-card-group 3.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.
@@ -0,0 +1,234 @@
1
+ Name: @purpurds/heading
2
+ Version: 2.8.0
3
+ License: AGPL-3.0-only
4
+ Private: false
5
+
6
+ ---
7
+
8
+ Name: @babel/runtime
9
+ Version: 7.22.15
10
+ License: MIT
11
+ Private: false
12
+ Description: babel's modular runtime helpers
13
+ Repository: https://github.com/babel/babel.git
14
+ Homepage: https://babel.dev/docs/en/next/babel-runtime
15
+ Author: The Babel Team (https://babel.dev/team)
16
+ License Copyright:
17
+ ===
18
+
19
+ MIT License
20
+
21
+ Copyright (c) 2014-present Sebastian McKenzie and other contributors
22
+
23
+ Permission is hereby granted, free of charge, to any person obtaining
24
+ a copy of this software and associated documentation files (the
25
+ "Software"), to deal in the Software without restriction, including
26
+ without limitation the rights to use, copy, modify, merge, publish,
27
+ distribute, sublicense, and/or sell copies of the Software, and to
28
+ permit persons to whom the Software is furnished to do so, subject to
29
+ the following conditions:
30
+
31
+ The above copyright notice and this permission notice shall be
32
+ included in all copies or substantial portions of the Software.
33
+
34
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
38
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
40
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41
+
42
+
43
+ ---
44
+
45
+ Name: @radix-ui/primitive
46
+ Version: 1.0.1
47
+ License: MIT
48
+ Private: false
49
+ Repository: git+https://github.com/radix-ui/primitives.git
50
+ Homepage: https://radix-ui.com/primitives
51
+
52
+ ---
53
+
54
+ Name: @radix-ui/react-compose-refs
55
+ Version: 1.0.1
56
+ License: MIT
57
+ Private: false
58
+ Repository: git+https://github.com/radix-ui/primitives.git
59
+ Homepage: https://radix-ui.com/primitives
60
+
61
+ ---
62
+
63
+ Name: @radix-ui/react-context
64
+ Version: 1.0.1
65
+ License: MIT
66
+ Private: false
67
+ Repository: git+https://github.com/radix-ui/primitives.git
68
+ Homepage: https://radix-ui.com/primitives
69
+
70
+ ---
71
+
72
+ Name: @radix-ui/react-slot
73
+ Version: 1.0.2
74
+ License: MIT
75
+ Private: false
76
+ Repository: git+https://github.com/radix-ui/primitives.git
77
+ Homepage: https://radix-ui.com/primitives
78
+
79
+ ---
80
+
81
+ Name: @radix-ui/react-primitive
82
+ Version: 1.0.3
83
+ License: MIT
84
+ Private: false
85
+ Repository: git+https://github.com/radix-ui/primitives.git
86
+ Homepage: https://radix-ui.com/primitives
87
+
88
+ ---
89
+
90
+ Name: @radix-ui/react-collection
91
+ Version: 1.0.3
92
+ License: MIT
93
+ Private: false
94
+ Repository: git+https://github.com/radix-ui/primitives.git
95
+ Homepage: https://radix-ui.com/primitives
96
+
97
+ ---
98
+
99
+ Name: @radix-ui/react-use-layout-effect
100
+ Version: 1.0.1
101
+ License: MIT
102
+ Private: false
103
+ Repository: git+https://github.com/radix-ui/primitives.git
104
+ Homepage: https://radix-ui.com/primitives
105
+
106
+ ---
107
+
108
+ Name: @radix-ui/react-id
109
+ Version: 1.0.1
110
+ License: MIT
111
+ Private: false
112
+ Repository: git+https://github.com/radix-ui/primitives.git
113
+ Homepage: https://radix-ui.com/primitives
114
+
115
+ ---
116
+
117
+ Name: @radix-ui/react-use-callback-ref
118
+ Version: 1.0.1
119
+ License: MIT
120
+ Private: false
121
+ Repository: git+https://github.com/radix-ui/primitives.git
122
+ Homepage: https://radix-ui.com/primitives
123
+
124
+ ---
125
+
126
+ Name: @radix-ui/react-use-controllable-state
127
+ Version: 1.0.1
128
+ License: MIT
129
+ Private: false
130
+ Repository: git+https://github.com/radix-ui/primitives.git
131
+ Homepage: https://radix-ui.com/primitives
132
+
133
+ ---
134
+
135
+ Name: @radix-ui/react-direction
136
+ Version: 1.0.1
137
+ License: MIT
138
+ Private: false
139
+ Repository: git+https://github.com/radix-ui/primitives.git
140
+ Homepage: https://radix-ui.com/primitives
141
+
142
+ ---
143
+
144
+ Name: @radix-ui/react-roving-focus
145
+ Version: 1.0.4
146
+ License: MIT
147
+ Private: false
148
+ Repository: git+https://github.com/radix-ui/primitives.git
149
+ Homepage: https://radix-ui.com/primitives
150
+
151
+ ---
152
+
153
+ Name: @radix-ui/react-use-size
154
+ Version: 1.0.1
155
+ License: MIT
156
+ Private: false
157
+ Repository: git+https://github.com/radix-ui/primitives.git
158
+ Homepage: https://radix-ui.com/primitives
159
+
160
+ ---
161
+
162
+ Name: @radix-ui/react-use-previous
163
+ Version: 1.0.1
164
+ License: MIT
165
+ Private: false
166
+ Repository: git+https://github.com/radix-ui/primitives.git
167
+ Homepage: https://radix-ui.com/primitives
168
+
169
+ ---
170
+
171
+ Name: @radix-ui/react-presence
172
+ Version: 1.0.1
173
+ License: MIT
174
+ Private: false
175
+ Repository: git+https://github.com/radix-ui/primitives.git
176
+ Homepage: https://radix-ui.com/primitives
177
+
178
+ ---
179
+
180
+ Name: @radix-ui/react-radio-group
181
+ Version: 1.1.3
182
+ License: MIT
183
+ Private: false
184
+ Repository: git+https://github.com/radix-ui/primitives.git
185
+ Homepage: https://radix-ui.com/primitives
186
+
187
+ ---
188
+
189
+ Name: classnames
190
+ Version: 2.5.1
191
+ License: MIT
192
+ Private: false
193
+ Description: A simple utility for conditionally joining classNames together
194
+ Repository: git+https://github.com/JedWatson/classnames.git
195
+ Author: Jed Watson
196
+ License Copyright:
197
+ ===
198
+
199
+ The MIT License (MIT)
200
+
201
+ Copyright (c) 2018 Jed Watson
202
+
203
+ Permission is hereby granted, free of charge, to any person obtaining a copy
204
+ of this software and associated documentation files (the "Software"), to deal
205
+ in the Software without restriction, including without limitation the rights
206
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
207
+ copies of the Software, and to permit persons to whom the Software is
208
+ furnished to do so, subject to the following conditions:
209
+
210
+ The above copyright notice and this permission notice shall be included in all
211
+ copies or substantial portions of the Software.
212
+
213
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
214
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
215
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
216
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
217
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
218
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
219
+ SOFTWARE.
220
+
221
+
222
+ ---
223
+
224
+ Name: @purpurds/paragraph
225
+ Version: 2.8.0
226
+ License: AGPL-3.0-only
227
+ Private: false
228
+
229
+ ---
230
+
231
+ Name: @purpurds/skeleton
232
+ Version: 2.8.0
233
+ License: AGPL-3.0-only
234
+ Private: false
@@ -0,0 +1,2 @@
1
+ export declare const cx: (...args: import("classnames").ArgumentArray) => string;
2
+ //# sourceMappingURL=classnames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classnames.d.ts","sourceRoot":"","sources":["../src/classnames.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,EAAE,yDAAiB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react/jsx-runtime"),a=require("react"),xe=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
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
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:{}};/*!
6
+ Copyright (c) 2018 Jed Watson.
7
+ Licensed under the MIT License (MIT), see
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 Nr=$e.exports;const Ir=Ar(Nr),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"},R=Ir.bind(wr);function Pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var he={exports:{}};/*!
10
+ Copyright (c) 2018 Jed Watson.
11
+ Licensed under the MIT License (MIT), see
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-paragraph_hwaj6_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_hwaj6_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_hwaj6_10","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_hwaj6_13","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_hwaj6_19","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_hwaj6_26","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_hwaj6_33","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_hwaj6_39","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_hwaj6_45","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_hwaj6_51","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_hwaj6_57","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_hwaj6_64","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_hwaj6_71"},jr={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"},j="purpur-paragraph",re=({["data-testid"]:e,children:n,className:t="",disabled:o,enableHyphenation:u=!1,variant:r=jr.PARAGRAPH100,...c})=>{const i=Tr([t,T[j],T[`${j}--${r}`],{[T[`${j}--hyphens`]]:u,[T[`${j}--disabled`]]:o}]);return $.jsx("p",{...c,className:i,"data-testid":e,children:n})};function Mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ge={exports:{}};/*!
14
+ Copyright (c) 2018 Jed Watson.
15
+ Licensed under the MIT License (MIT), see
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 kr=ge.exports;const Fr=Mr(kr),Lr="_loading_93tal_1",K={"purpur-skeleton":"_purpur-skeleton_93tal_1",loading:Lr,"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",Dr=({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})},M="purpur-radio-card-group__item-image",Gr=e=>!!(e!=null&&e.src)&&!!e.altText,Ur=({src:e,altText:n,noPlaceholder:t,loading:o="lazy",["data-testid"]:u})=>{const[r,c]=a.useState(!1),i=()=>c(!0),d=R(M,{[`${M}--loaded`]:r}),s=R(`${M}-placeholder`,{[`${M}-placeholder--loaded`]:r});return $.jsxs($.Fragment,{children:[$.jsx("img",{"data-testid":u,className:d,src:e,alt:n,loading:o,onLoad:i}),!t&&$.jsx(Dr,{className:s})]})},C="purpur-radio-card-group__item",Y=(e,{disabled:n})=>typeof e=="function"?e({disabled:n}):e,Vr=(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:R(`${C}-container`),ref:n,children:[$.jsxs(xr,{className:R(C),"data-testid":t,disabled:r,id:c,required:d,value:b,children:[i&&$.jsx("span",{className:R(`${C}-image-container`),children:Gr(i)?$.jsx(Ur,{...i,"data-testid":t&&`${t}-image`}):Y(i,e)}),$.jsxs("span",{className:R(`${C}-content`),children:[$.jsxs("span",{className:R(`${C}-top-container`),children:[typeof s=="string"?$.jsx(re,{className:R(`${C}-title`),"data-testid":t&&`${t}-title`,variant:"paragraph-100",disabled:r,children:s}):Y(s,e),$.jsx("span",{className:R(`${C}-radio`),children:$.jsx(Sr,{className:R(`${C}-indicator`)})})]}),o&&$.jsx("span",{className:R(`${C}-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(Vr);G.displayName="RadioCardItem";const Br=e=>a.isValidElement(e)&&(e==null?void 0:e.type)===G,k="purpur-radio-card-group",zr=({"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(Br);return $.jsxs("div",{className:R(o,`${k}__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(Cr,{...s,"aria-labelledby":n||(r?`${s.id}-label`:void 0),className:R(k,`${k}--${i}`,`${k}--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(zr);ve.displayName="RadioCardGroup";exports.RadioCardGroup=ve;exports.RadioCardItem=G;
18
+ //# sourceMappingURL=radio-card-group.cjs.js.map