@purpurds/radio-card-group 6.0.1 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +19 -55
- 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 +763 -815
- package/dist/radio-card-group.es.js.map +1 -1
- package/package.json +10 -10
package/dist/LICENSE.txt
CHANGED
|
@@ -1,48 +1,12 @@
|
|
|
1
1
|
Name: @purpurds/heading
|
|
2
|
-
Version: 6.0.
|
|
2
|
+
Version: 6.0.1
|
|
3
3
|
License: AGPL-3.0-only
|
|
4
4
|
Private: false
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Name: @babel/runtime
|
|
9
|
-
Version: 7.26.0
|
|
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
8
|
Name: @radix-ui/primitive
|
|
45
|
-
Version: 1.
|
|
9
|
+
Version: 1.1.1
|
|
46
10
|
License: MIT
|
|
47
11
|
Private: false
|
|
48
12
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -51,7 +15,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
51
15
|
---
|
|
52
16
|
|
|
53
17
|
Name: @radix-ui/react-compose-refs
|
|
54
|
-
Version: 1.
|
|
18
|
+
Version: 1.1.1
|
|
55
19
|
License: MIT
|
|
56
20
|
Private: false
|
|
57
21
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -60,7 +24,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
60
24
|
---
|
|
61
25
|
|
|
62
26
|
Name: @radix-ui/react-context
|
|
63
|
-
Version: 1.
|
|
27
|
+
Version: 1.1.1
|
|
64
28
|
License: MIT
|
|
65
29
|
Private: false
|
|
66
30
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -69,7 +33,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
69
33
|
---
|
|
70
34
|
|
|
71
35
|
Name: @radix-ui/react-slot
|
|
72
|
-
Version: 1.
|
|
36
|
+
Version: 1.1.2
|
|
73
37
|
License: MIT
|
|
74
38
|
Private: false
|
|
75
39
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -78,7 +42,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
78
42
|
---
|
|
79
43
|
|
|
80
44
|
Name: @radix-ui/react-primitive
|
|
81
|
-
Version:
|
|
45
|
+
Version: 2.0.2
|
|
82
46
|
License: MIT
|
|
83
47
|
Private: false
|
|
84
48
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -87,7 +51,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
87
51
|
---
|
|
88
52
|
|
|
89
53
|
Name: @radix-ui/react-collection
|
|
90
|
-
Version: 1.
|
|
54
|
+
Version: 1.1.2
|
|
91
55
|
License: MIT
|
|
92
56
|
Private: false
|
|
93
57
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -96,7 +60,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
96
60
|
---
|
|
97
61
|
|
|
98
62
|
Name: @radix-ui/react-use-layout-effect
|
|
99
|
-
Version: 1.0
|
|
63
|
+
Version: 1.1.0
|
|
100
64
|
License: MIT
|
|
101
65
|
Private: false
|
|
102
66
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -105,7 +69,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
105
69
|
---
|
|
106
70
|
|
|
107
71
|
Name: @radix-ui/react-id
|
|
108
|
-
Version: 1.0
|
|
72
|
+
Version: 1.1.0
|
|
109
73
|
License: MIT
|
|
110
74
|
Private: false
|
|
111
75
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -114,7 +78,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
114
78
|
---
|
|
115
79
|
|
|
116
80
|
Name: @radix-ui/react-use-callback-ref
|
|
117
|
-
Version: 1.0
|
|
81
|
+
Version: 1.1.0
|
|
118
82
|
License: MIT
|
|
119
83
|
Private: false
|
|
120
84
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -123,7 +87,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
123
87
|
---
|
|
124
88
|
|
|
125
89
|
Name: @radix-ui/react-use-controllable-state
|
|
126
|
-
Version: 1.0
|
|
90
|
+
Version: 1.1.0
|
|
127
91
|
License: MIT
|
|
128
92
|
Private: false
|
|
129
93
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -132,7 +96,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
132
96
|
---
|
|
133
97
|
|
|
134
98
|
Name: @radix-ui/react-direction
|
|
135
|
-
Version: 1.0
|
|
99
|
+
Version: 1.1.0
|
|
136
100
|
License: MIT
|
|
137
101
|
Private: false
|
|
138
102
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -141,7 +105,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
141
105
|
---
|
|
142
106
|
|
|
143
107
|
Name: @radix-ui/react-roving-focus
|
|
144
|
-
Version: 1.
|
|
108
|
+
Version: 1.1.2
|
|
145
109
|
License: MIT
|
|
146
110
|
Private: false
|
|
147
111
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -150,7 +114,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
150
114
|
---
|
|
151
115
|
|
|
152
116
|
Name: @radix-ui/react-use-size
|
|
153
|
-
Version: 1.0
|
|
117
|
+
Version: 1.1.0
|
|
154
118
|
License: MIT
|
|
155
119
|
Private: false
|
|
156
120
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -159,7 +123,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
159
123
|
---
|
|
160
124
|
|
|
161
125
|
Name: @radix-ui/react-use-previous
|
|
162
|
-
Version: 1.0
|
|
126
|
+
Version: 1.1.0
|
|
163
127
|
License: MIT
|
|
164
128
|
Private: false
|
|
165
129
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -168,7 +132,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
168
132
|
---
|
|
169
133
|
|
|
170
134
|
Name: @radix-ui/react-presence
|
|
171
|
-
Version: 1.
|
|
135
|
+
Version: 1.1.2
|
|
172
136
|
License: MIT
|
|
173
137
|
Private: false
|
|
174
138
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -177,7 +141,7 @@ Homepage: https://radix-ui.com/primitives
|
|
|
177
141
|
---
|
|
178
142
|
|
|
179
143
|
Name: @radix-ui/react-radio-group
|
|
180
|
-
Version: 1.
|
|
144
|
+
Version: 1.2.3
|
|
181
145
|
License: MIT
|
|
182
146
|
Private: false
|
|
183
147
|
Repository: git+https://github.com/radix-ui/primitives.git
|
|
@@ -220,13 +184,13 @@ SOFTWARE.
|
|
|
220
184
|
---
|
|
221
185
|
|
|
222
186
|
Name: @purpurds/paragraph
|
|
223
|
-
Version: 6.0.
|
|
187
|
+
Version: 6.0.1
|
|
224
188
|
License: AGPL-3.0-only
|
|
225
189
|
Private: false
|
|
226
190
|
|
|
227
191
|
---
|
|
228
192
|
|
|
229
193
|
Name: @purpurds/skeleton
|
|
230
|
-
Version: 6.0.
|
|
194
|
+
Version: 6.0.1
|
|
231
195
|
License: AGPL-3.0-only
|
|
232
196
|
Private: false
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),b=require("react");require("react-dom");function De(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=De(b);function Fe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oe={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/(function(e){(function(){var 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})()})(te);var Ne=te.exports;const Oe=Ae(Ne),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"},Pe={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},k="purpur-heading",ne=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,negative:u=!1,tag:r,variant:c=Pe.TITLE100,...i})=>{const d=r,s=Oe([t,T[k],T[`${k}--${c}`],{[T[`${k}--hyphens`]]:o,[T[`${k}--negative`]]:u}]);return $.jsx(d,{...i,className:s,"data-testid":e,children:n})};ne.displayName="Heading";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)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},R.apply(null,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 we(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function oe(...e){return n=>e.forEach(t=>we(t,n))}function A(...e){return a.useCallback(oe(...e),e)}function G(e,n=[]){let t=[];function o(r,c){const i=a.createContext(c),d=t.length;t=[...t,c];function s(l){const{scope:m,children:f,...p}=l,b=(m==null?void 0:m[e][d])||i,v=a.useMemo(()=>p,Object.values(p));return a.createElement(b.Provider,{value:v},f)}function _(l,m){const f=(m==null?void 0:m[e][d])||i,p=a.useContext(f);if(p)return p;if(c!==void 0)return c;throw new Error(`\`${l}\` must be used within \`${r}\``)}return s.displayName=r+"Provider",[s,_]}const 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 l=d(r)[`__scope${s}`];return{...i,...l}},{});return a.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return t.scopeName=n.scopeName,t}const j=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(Y,R({},o,{ref:n}),a.isValidElement(c)?a.cloneElement(c,void 0,i):null)}return a.createElement(Y,R({},o,{ref:n}),t)});j.displayName="Slot";const Y=a.forwardRef((e,n)=>{const{children:t,...o}=e;return a.isValidElement(t)?a.cloneElement(t,{...De(o,t.props),ref:n?oe(n,t.ref):t.ref}):a.Children.count(t)>1?a.Children.only(null):null});Y.displayName="SlotClone";const ke=({children:e})=>a.createElement(a.Fragment,null,e);function Me(e){return a.isValidElement(e)&&e.type===ke}function De(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"],P=Fe.reduce((e,n)=>{const t=a.forwardRef((o,u)=>{const{asChild:r,...c}=o,i=r?j:n;return a.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),a.createElement(i,R({},c,{ref:u}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function je(e){const n=e+"CollectionProvider",[t,o]=G(n),[u,r]=t(n,{collectionRef:{current:null},itemMap:new Map}),c=f=>{const{scope:p,children:b}=f,v=a.useRef(null),h=a.useRef(new Map).current;return a.createElement(u,{scope:p,itemMap:h,collectionRef:v},b)},i=e+"CollectionSlot",d=a.forwardRef((f,p)=>{const{scope:b,children:v}=f,h=r(i,b),g=A(p,h.collectionRef);return a.createElement(j,{ref:g},v)}),s=e+"CollectionItemSlot",_="data-radix-collection-item",l=a.forwardRef((f,p)=>{const{scope:b,children:v,...h}=f,g=a.useRef(null),w=A(p,g),S=r(s,b);return a.useEffect(()=>(S.itemMap.set(g,{ref:g,...h}),()=>void S.itemMap.delete(g))),a.createElement(j,{[_]:"",ref:w},v)});function m(f){const p=r(e+"CollectionConsumer",f);return a.useCallback(()=>{const v=p.collectionRef.current;if(!v)return[];const h=Array.from(v.querySelectorAll(`[${_}]`));return Array.from(p.itemMap.values()).sort((S,q)=>h.indexOf(S.ref.current)-h.indexOf(q.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:c,Slot:d,ItemSlot:l},m,o]}const L=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},Le=re.useId||(()=>{});let Ge=0;function Ue(e){const[n,t]=re.useState(Le());return L(()=>{t(o=>o??String(Ge++))},[e]),n?`radix-${n}`:""}function Z(e){const n=a.useRef(e);return a.useEffect(()=>{n.current=e}),a.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function ae({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,u]=qe({defaultProp:n,onChange:t}),r=e!==void 0,c=r?e:o,i=Z(t),d=a.useCallback(s=>{if(r){const l=typeof s=="function"?s(e):s;l!==e&&i(l)}else u(s)},[r,e,u,i]);return[c,d]}function qe({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 z="rovingFocusGroup.onEntryFocus",ze={bubbles:!1,cancelable:!0},J="RovingFocusGroup",[W,ue,Be]=je(J),[He,ie]=G(J,[Be]),[Ke,Ye]=He(J),We=a.forwardRef((e,n)=>a.createElement(W.Provider,{scope:e.__scopeRovingFocusGroup},a.createElement(W.Slot,{scope:e.__scopeRovingFocusGroup},a.createElement(Xe,R({},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,..._}=e,l=a.useRef(null),m=A(n,l),f=ce(r),[p=null,b]=ae({prop:c,defaultProp:i,onChange:d}),[v,h]=a.useState(!1),g=Z(s),w=ue(t),S=a.useRef(!1),[q,Q]=a.useState(0);return a.useEffect(()=>{const y=l.current;if(y)return y.addEventListener(z,g),()=>y.removeEventListener(z,g)},[g]),a.createElement(Ke,{scope:t,orientation:o,dir:f,loop:u,currentTabStopId:p,onItemFocus:a.useCallback(y=>b(y),[b]),onItemShiftTab:a.useCallback(()=>h(!0),[]),onFocusableItemAdd:a.useCallback(()=>Q(y=>y+1),[]),onFocusableItemRemove:a.useCallback(()=>Q(y=>y-1),[])},a.createElement(P.div,R({tabIndex:v||q===0?-1:0,"data-orientation":o},_,{ref:m,style:{outline:"none",...e.style},onMouseDown:x(e.onMouseDown,()=>{S.current=!0}),onFocus:x(e.onFocus,y=>{const ye=!S.current;if(y.target===y.currentTarget&&ye&&!v){const ee=new CustomEvent(z,ze);if(y.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const V=w().filter(I=>I.focusable),Ee=V.find(I=>I.active),Ce=V.find(I=>I.id===p),xe=[Ee,Ce,...V].filter(Boolean).map(I=>I.ref.current);se(xe)}}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),_=s.currentTabStopId===d,l=ue(t),{onFocusableItemAdd:m,onFocusableItemRemove:f}=s;return a.useEffect(()=>{if(o)return m(),()=>f()},[o,m,f]),a.createElement(W.ItemSlot,{scope:t,id:d,focusable:o,active:u},a.createElement(P.span,R({tabIndex:_?0:-1,"data-orientation":s.orientation},c,{ref:n,onMouseDown:x(e.onMouseDown,p=>{o?s.onItemFocus(d):p.preventDefault()}),onFocus:x(e.onFocus,()=>s.onItemFocus(d)),onKeyDown:x(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){s.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const b=rr(p,s.orientation,s.dir);if(b!==void 0){p.preventDefault();let h=l().filter(g=>g.focusable).map(g=>g.ref.current);if(b==="last")h.reverse();else if(b==="prev"||b==="next"){b==="prev"&&h.reverse();const g=h.indexOf(p.currentTarget);h=s.loop?tr(h,g+1):h.slice(g+1)}setTimeout(()=>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=A(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=M(o.current);r.current=i==="mounted"?s:"none"},[i]),L(()=>{const s=o.current,_=u.current;if(_!==e){const m=r.current,f=M(s);e?d("MOUNT"):f==="none"||(s==null?void 0:s.display)==="none"?d("UNMOUNT"):d(_&&m!==f?"ANIMATION_OUT":"UNMOUNT"),u.current=e}},[e,d]),L(()=>{if(n){const s=l=>{const f=M(o.current).includes(l.animationName);l.target===n&&f&&Se.flushSync(()=>d("ANIMATION_END"))},_=l=>{l.target===n&&(r.current=M(o.current))};return n.addEventListener("animationstart",_),n.addEventListener("animationcancel",s),n.addEventListener("animationend",s),()=>{n.removeEventListener("animationstart",_),n.removeEventListener("animationcancel",s),n.removeEventListener("animationend",s)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(s=>{s&&(o.current=getComputedStyle(s)),t(s)},[])}}function M(e){return(e==null?void 0:e.animationName)||"none"}const pe="Radio",[sr,le]=G(pe),[dr,pr]=sr(pe),lr=a.forwardRef((e,n)=>{const{__scopeRadio:t,name:o,checked:u=!1,required:r,disabled:c,value:i="on",onCheck:d,...s}=e,[_,l]=a.useState(null),m=A(n,b=>l(b)),f=a.useRef(!1),p=_?!!_.closest("form"):!0;return a.createElement(dr,{scope:t,checked:u,disabled:c},a.createElement(P.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:x(e.onClick,b=>{u||d==null||d(),p&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})),p&&a.createElement(_r,{control:_,bubbles:!f.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=pr(fr,t);return a.createElement(de,{present:o||r.checked},a.createElement(P.span,R({"data-state":fe(r.checked),"data-disabled":r.disabled?"":void 0},u,{ref:n})))}),_r=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,l=Object.getOwnPropertyDescriptor(s,"checked").set;if(c!==t&&l){const m=new Event("click",{bubbles:o});l.call(d,t),d.dispatchEvent(m)}},[c,t,o]),a.createElement("input",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 br=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],me="RadioGroup",[$r,Kr]=G(me,[ie,le]),_e=ie(),be=le(),[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:_=!0,onValueChange:l,...m}=e,f=_e(t),p=ce(s),[b,v]=ae({prop:r,defaultProp:u,onChange:l});return a.createElement(hr,{scope:t,name:o,required:c,disabled:i,value:b,onValueChange:v},a.createElement(nr,R({asChild:!0},f,{orientation:d,dir:p,loop:_}),a.createElement(P.div,R({role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":i?"":void 0,dir:p},m,{ref:n}))))}),Rr="RadioGroupItem",yr=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,disabled:o,...u}=e,r=gr(Rr,t),c=r.disabled||o,i=_e(t),d=be(t),s=a.useRef(null),_=A(n,s),l=r.value===u.value,m=a.useRef(!1);return a.useEffect(()=>{const f=b=>{br.includes(b.key)&&(m.current=!0)},p=()=>m.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",p)}},[]),a.createElement(or,R({asChild:!0},i,{focusable:!c,active:l}),a.createElement(lr,R({disabled:c,required:r.required,checked:l},d,u,{name:r.name,ref:_,onCheck:()=>r.onValueChange(u.value),onKeyDown:x(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:x(u.onFocus,()=>{var f;m.current&&((f=s.current)===null||f===void 0||f.click())})})))}),Er=a.forwardRef((e,n)=>{const{__scopeRadioGroup:t,...o}=e,u=be(t);return a.createElement(mr,R({},u,o,{ref:n}))}),Cr=vr,xr=yr,Sr=Er;function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $e={exports:{}};/*!
|
|
5
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(r=a(r,o(u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var u in r)t.call(r,u)&&r[u]&&(i=a(i,u));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(oe);var Le=oe.exports;const Ge=Fe(Le),k={"purpur-heading":"_purpur-heading_k9fhq_1","purpur-heading--hyphens":"_purpur-heading--hyphens_k9fhq_8","purpur-heading--negative":"_purpur-heading--negative_k9fhq_11","purpur-heading--subsection-100":"_purpur-heading--subsection-100_k9fhq_14","purpur-heading--title-100":"_purpur-heading--title-100_k9fhq_20","purpur-heading--title-200":"_purpur-heading--title-200_k9fhq_26","purpur-heading--title-300":"_purpur-heading--title-300_k9fhq_32","purpur-heading--title-400":"_purpur-heading--title-400_k9fhq_38","purpur-heading--title-500":"_purpur-heading--title-500_k9fhq_44","purpur-heading--title-600":"_purpur-heading--title-600_k9fhq_50","purpur-heading--title-700":"_purpur-heading--title-700_k9fhq_56","purpur-heading--display-25":"_purpur-heading--display-25_k9fhq_62","purpur-heading--display-50":"_purpur-heading--display-50_k9fhq_68","purpur-heading--display-100":"_purpur-heading--display-100_k9fhq_74","purpur-heading--display-200":"_purpur-heading--display-200_k9fhq_80"},Ue={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},M="purpur-heading",ae=({["data-testid"]:e,children:t,className:n="",enableHyphenation:o=!1,negative:a=!1,tag:r,variant:i=Ue.TITLE100,...u})=>{const d=r,c=Ge([n,k[M],k[`${M}--${i}`],{[k[`${M}--hyphens`]]:o,[k[`${M}--negative`]]:a}]);return p.jsx(d,{...u,className:c,"data-testid":e,children:t})};ae.displayName="Heading";function S(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function ne(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ie(...e){return t=>{let n=!1;const o=e.map(a=>{const r=ne(a,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let a=0;a<o.length;a++){const r=o[a];typeof r=="function"?r():ne(e[a],null)}}}}function O(...e){return s.useCallback(ie(...e),e)}function U(e,t=[]){let n=[];function o(r,i){const u=s.createContext(i),d=n.length;n=[...n,i];const c=f=>{var y;const{scope:m,children:_,...l}=f,g=((y=m==null?void 0:m[e])==null?void 0:y[d])||u,v=s.useMemo(()=>l,Object.values(l));return p.jsx(g.Provider,{value:v,children:_})};c.displayName=r+"Provider";function h(f,m){var g;const _=((g=m==null?void 0:m[e])==null?void 0:g[d])||u,l=s.useContext(_);if(l)return l;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${r}\``)}return[c,h]}const a=()=>{const r=n.map(i=>s.createContext(i));return function(u){const d=(u==null?void 0:u[e])||r;return s.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[o,qe(a,...t)]}function qe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(r){const i=o.reduce((u,{useScope:d,scopeName:c})=>{const f=d(r)[`__scope${c}`];return{...u,...f}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var L=s.forwardRef((e,t)=>{const{children:n,...o}=e,a=s.Children.toArray(n),r=a.find(Ve);if(r){const i=r.props.children,u=a.map(d=>d===r?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:d);return p.jsx(Y,{...o,ref:t,children:s.isValidElement(i)?s.cloneElement(i,void 0,u):null})}return p.jsx(Y,{...o,ref:t,children:n})});L.displayName="Slot";var Y=s.forwardRef((e,t)=>{const{children:n,...o}=e;if(s.isValidElement(n)){const a=Ke(n),r=Be(o,n.props);return n.type!==s.Fragment&&(r.ref=t?ie(t,a):a),s.cloneElement(n,r)}return s.Children.count(n)>1?s.Children.only(null):null});Y.displayName="SlotClone";var ze=({children:e})=>p.jsx(p.Fragment,{children:e});function Ve(e){return s.isValidElement(e)&&e.type===ze}function Be(e,t){const n={...t};for(const o in t){const a=e[o],r=t[o];/^on[A-Z]/.test(o)?a&&r?n[o]=(...u)=>{r(...u),a(...u)}:a&&(n[o]=a):o==="style"?n[o]={...a,...r}:o==="className"&&(n[o]=[a,r].filter(Boolean).join(" "))}return{...e,...n}}function Ke(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var We=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],j=We.reduce((e,t)=>{const n=s.forwardRef((o,a)=>{const{asChild:r,...i}=o,u=r?L:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(u,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function He(e){const t=e+"CollectionProvider",[n,o]=U(t),[a,r]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=_=>{const{scope:l,children:g}=_,v=b.useRef(null),y=b.useRef(new Map).current;return p.jsx(a,{scope:l,itemMap:y,collectionRef:v,children:g})};i.displayName=t;const u=e+"CollectionSlot",d=b.forwardRef((_,l)=>{const{scope:g,children:v}=_,y=r(u,g),R=O(l,y.collectionRef);return p.jsx(L,{ref:R,children:v})});d.displayName=u;const c=e+"CollectionItemSlot",h="data-radix-collection-item",f=b.forwardRef((_,l)=>{const{scope:g,children:v,...y}=_,R=b.useRef(null),A=O(l,R),E=r(c,g);return b.useEffect(()=>(E.itemMap.set(R,{ref:R,...y}),()=>void E.itemMap.delete(R))),p.jsx(L,{[h]:"",ref:A,children:v})});f.displayName=c;function m(_){const l=r(e+"CollectionConsumer",_);return b.useCallback(()=>{const v=l.collectionRef.current;if(!v)return[];const y=Array.from(v.querySelectorAll(`[${h}]`));return Array.from(l.itemMap.values()).sort((E,w)=>y.indexOf(E.ref.current)-y.indexOf(w.ref.current))},[l.collectionRef,l.itemMap])}return[{Provider:i,Slot:d,ItemSlot:f},m,o]}var G=globalThis!=null&&globalThis.document?s.useLayoutEffect:()=>{},Ye=s.useId||(()=>{}),Xe=0;function Ze(e){const[t,n]=s.useState(Ye());return G(()=>{n(o=>o??String(Xe++))},[e]),t?`radix-${t}`:""}function J(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function ue({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,a]=Je({defaultProp:t,onChange:n}),r=e!==void 0,i=r?e:o,u=J(n),d=s.useCallback(c=>{if(r){const f=typeof c=="function"?c(e):c;f!==e&&u(f)}else a(c)},[r,e,a,u]);return[i,d]}function Je({defaultProp:e,onChange:t}){const n=s.useState(e),[o]=n,a=s.useRef(o),r=J(t);return s.useEffect(()=>{a.current!==o&&(r(o),a.current=o)},[o,a,r]),n}var Qe=s.createContext(void 0);function se(e){const t=s.useContext(Qe);return e||t||"ltr"}var B="rovingFocusGroup.onEntryFocus",er={bubbles:!1,cancelable:!0},q="RovingFocusGroup",[X,ce,rr]=He(q),[tr,de]=U(q,[rr]),[nr,or]=tr(q),pe=s.forwardRef((e,t)=>p.jsx(X.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(X.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(ar,{...e,ref:t})})}));pe.displayName=q;var ar=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:a=!1,dir:r,currentTabStopId:i,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:c,preventScrollOnEntryFocus:h=!1,...f}=e,m=s.useRef(null),_=O(t,m),l=se(r),[g=null,v]=ue({prop:i,defaultProp:u,onChange:d}),[y,R]=s.useState(!1),A=J(c),E=ce(n),w=s.useRef(!1),[Te,re]=s.useState(0);return s.useEffect(()=>{const C=m.current;if(C)return C.addEventListener(B,A),()=>C.removeEventListener(B,A)},[A]),p.jsx(nr,{scope:n,orientation:o,dir:l,loop:a,currentTabStopId:g,onItemFocus:s.useCallback(C=>v(C),[v]),onItemShiftTab:s.useCallback(()=>R(!0),[]),onFocusableItemAdd:s.useCallback(()=>re(C=>C+1),[]),onFocusableItemRemove:s.useCallback(()=>re(C=>C-1),[]),children:p.jsx(j.div,{tabIndex:y||Te===0?-1:0,"data-orientation":o,...f,ref:_,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{w.current=!0}),onFocus:S(e.onFocus,C=>{const je=!w.current;if(C.target===C.currentTarget&&je&&!y){const te=new CustomEvent(B,er);if(C.currentTarget.dispatchEvent(te),!te.defaultPrevented){const V=E().filter(x=>x.focusable),ke=V.find(x=>x.active),Me=V.find(x=>x.id===g),$e=[ke,Me,...V].filter(Boolean).map(x=>x.ref.current);me($e,h)}}w.current=!1}),onBlur:S(e.onBlur,()=>R(!1))})})}),le="RovingFocusGroupItem",fe=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:a=!1,tabStopId:r,...i}=e,u=Ze(),d=r||u,c=or(le,n),h=c.currentTabStopId===d,f=ce(n),{onFocusableItemAdd:m,onFocusableItemRemove:_}=c;return s.useEffect(()=>{if(o)return m(),()=>_()},[o,m,_]),p.jsx(X.ItemSlot,{scope:n,id:d,focusable:o,active:a,children:p.jsx(j.span,{tabIndex:h?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:S(e.onMouseDown,l=>{o?c.onItemFocus(d):l.preventDefault()}),onFocus:S(e.onFocus,()=>c.onItemFocus(d)),onKeyDown:S(e.onKeyDown,l=>{if(l.key==="Tab"&&l.shiftKey){c.onItemShiftTab();return}if(l.target!==l.currentTarget)return;const g=sr(l,c.orientation,c.dir);if(g!==void 0){if(l.metaKey||l.ctrlKey||l.altKey||l.shiftKey)return;l.preventDefault();let y=f().filter(R=>R.focusable).map(R=>R.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const R=y.indexOf(l.currentTarget);y=c.loop?cr(y,R+1):y.slice(R+1)}setTimeout(()=>me(y))}})})})});fe.displayName=le;var ir={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ur(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function sr(e,t,n){const o=ur(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return ir[o]}function me(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function cr(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var dr=pe,pr=fe;function lr(e){const[t,n]=s.useState(void 0);return G(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const r=a[0];let i,u;if("borderBoxSize"in r){const d=r.borderBoxSize,c=Array.isArray(d)?d[0]:d;i=c.inlineSize,u=c.blockSize}else i=e.offsetWidth,u=e.offsetHeight;n({width:i,height:u})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function fr(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function mr(e,t){return s.useReducer((n,o)=>t[n][o]??n,e)}var _e=e=>{const{present:t,children:n}=e,o=_r(t),a=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),r=O(o.ref,gr(a));return typeof n=="function"||o.isPresent?s.cloneElement(a,{ref:r}):null};_e.displayName="Presence";function _r(e){const[t,n]=s.useState(),o=s.useRef({}),a=s.useRef(e),r=s.useRef("none"),i=e?"mounted":"unmounted",[u,d]=mr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const c=$(o.current);r.current=u==="mounted"?c:"none"},[u]),G(()=>{const c=o.current,h=a.current;if(h!==e){const m=r.current,_=$(c);e?d("MOUNT"):_==="none"||(c==null?void 0:c.display)==="none"?d("UNMOUNT"):d(h&&m!==_?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),G(()=>{if(t){let c;const h=t.ownerDocument.defaultView??window,f=_=>{const g=$(o.current).includes(_.animationName);if(_.target===t&&g&&(d("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=_=>{_.target===t&&(r.current=$(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{h.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(c=>{c&&(o.current=getComputedStyle(c)),n(c)},[])}}function $(e){return(e==null?void 0:e.animationName)||"none"}function gr(e){var o,a;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Q="Radio",[hr,ge]=U(Q),[vr,yr]=hr(Q),he=s.forwardRef((e,t)=>{const{__scopeRadio:n,name:o,checked:a=!1,required:r,disabled:i,value:u="on",onCheck:d,form:c,...h}=e,[f,m]=s.useState(null),_=O(t,v=>m(v)),l=s.useRef(!1),g=f?c||!!f.closest("form"):!0;return p.jsxs(vr,{scope:n,checked:a,disabled:i,children:[p.jsx(j.button,{type:"button",role:"radio","aria-checked":a,"data-state":Re(a),"data-disabled":i?"":void 0,disabled:i,value:u,...h,ref:_,onClick:S(e.onClick,v=>{a||d==null||d(),g&&(l.current=v.isPropagationStopped(),l.current||v.stopPropagation())})}),g&&p.jsx(Rr,{control:f,bubbles:!l.current,name:o,value:u,checked:a,required:r,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});he.displayName=Q;var ve="RadioIndicator",ye=s.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:o,...a}=e,r=yr(ve,n);return p.jsx(_e,{present:o||r.checked,children:p.jsx(j.span,{"data-state":Re(r.checked),"data-disabled":r.disabled?"":void 0,...a,ref:t})})});ye.displayName=ve;var Rr=e=>{const{control:t,checked:n,bubbles:o=!0,...a}=e,r=s.useRef(null),i=fr(n),u=lr(t);return s.useEffect(()=>{const d=r.current,c=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==n&&f){const m=new Event("click",{bubbles:o});f.call(d,n),d.dispatchEvent(m)}},[i,n,o]),p.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:r,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Re(e){return e?"checked":"unchecked"}var br=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ee="RadioGroup",[Cr,Yr]=U(ee,[de,ge]),be=de(),Ce=ge(),[Ir,Nr]=Cr(ee),Ie=s.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:o,defaultValue:a,value:r,required:i=!1,disabled:u=!1,orientation:d,dir:c,loop:h=!0,onValueChange:f,...m}=e,_=be(n),l=se(c),[g,v]=ue({prop:r,defaultProp:a,onChange:f});return p.jsx(Ir,{scope:n,name:o,required:i,disabled:u,value:g,onValueChange:v,children:p.jsx(dr,{asChild:!0,..._,orientation:d,dir:l,loop:h,children:p.jsx(j.div,{role:"radiogroup","aria-required":i,"aria-orientation":d,"data-disabled":u?"":void 0,dir:l,...m,ref:t})})})});Ie.displayName=ee;var Ne="RadioGroupItem",Se=s.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:o,...a}=e,r=Nr(Ne,n),i=r.disabled||o,u=be(n),d=Ce(n),c=s.useRef(null),h=O(t,c),f=r.value===a.value,m=s.useRef(!1);return s.useEffect(()=>{const _=g=>{br.includes(g.key)&&(m.current=!0)},l=()=>m.current=!1;return document.addEventListener("keydown",_),document.addEventListener("keyup",l),()=>{document.removeEventListener("keydown",_),document.removeEventListener("keyup",l)}},[]),p.jsx(pr,{asChild:!0,...u,focusable:!i,active:f,children:p.jsx(he,{disabled:i,required:r.required,checked:f,...d,...a,name:r.name,ref:h,onCheck:()=>r.onValueChange(a.value),onKeyDown:S(_=>{_.key==="Enter"&&_.preventDefault()}),onFocus:S(a.onFocus,()=>{var _;m.current&&((_=c.current)==null||_.click())})})})});Se.displayName=Ne;var Sr="RadioGroupIndicator",xe=s.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...o}=e,a=Ce(n);return p.jsx(ye,{...a,...o,ref:t})});xe.displayName=Sr;var xr=Ie,Ar=Se,Er=xe;function Or(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ae={exports:{}};/*!
|
|
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
|
|
9
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(r=a(r,o.call(this,u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var u in r)t.call(r,u)&&r[u]&&(i=a(i,this&&this[u]||u));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ae);var wr=Ae.exports;const Pr=Or(wr),Tr={"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"},I=Pr.bind(Tr);function jr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ee={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
|
|
13
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(r=a(r,o(u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var u in r)t.call(r,u)&&r[u]&&(i=a(i,u));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ee);var kr=Ee.exports;const Mr=jr(kr),P={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},$r={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"},T="purpur-paragraph",Z=({["data-testid"]:e,children:t,className:n,disabled:o,enableHyphenation:a=!1,negative:r=!1,variant:i=$r.PARAGRAPH100,...u})=>{const d=Mr([n,P[T],P[`${T}--${i}`],{[P[`${T}--hyphens`]]:a,[P[`${T}--disabled`]]:o,[P[`${T}--negative`]]:r}]);return p.jsx("p",{...u,className:d,"data-testid":e,children:t})};Z.displayName="Paragraph";function Dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oe={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
|
|
17
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",i=0;i<arguments.length;i++){var u=arguments[i];u&&(r=a(r,o(u)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var u in r)t.call(r,u)&&r[u]&&(i=a(i,u));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Oe);var Fr=Oe.exports;const Lr=Dr(Fr),Gr="_loading_93tal_1",K={"purpur-skeleton":"_purpur-skeleton_93tal_1",loading:Gr,"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"},W="purpur-skeleton",we=({className:e,["data-testid"]:t,radius:n="xs",style:o,negative:a=!1,...r})=>{const i=Lr([e,K[W],K[`${W}--${a?"negative":"default"}`],K[`${W}--${n}`]]);return p.jsx("div",{className:i,style:o,"data-testid":t,...r})};we.displayName="Skeleton";const D="purpur-radio-card-group__item-image",Ur=e=>!!(e!=null&&e.src)&&!!e.altText,qr=({src:e,altText:t,noPlaceholder:n,loading:o="lazy",["data-testid"]:a})=>{const[r,i]=b.useState(!1),u=()=>i(!0),d=I(D,{[`${D}--loaded`]:r}),c=I(`${D}-placeholder`,{[`${D}-placeholder--loaded`]:r});return p.jsxs(p.Fragment,{children:[p.jsx("img",{"data-testid":a,className:d,src:e,alt:t,loading:o,onLoad:u}),!n&&p.jsx(we,{className:c})]})},N="purpur-radio-card-group__item",H=(e,{disabled:t})=>typeof e=="function"?e({disabled:t}):e,zr=({title:e,...t},n)=>{const{["data-testid"]:o,body:a,children:r,disabled:i,id:u,image:d,required:c,value:h}=t,f={title:e,...t};return p.jsxs("div",{className:I(`${N}-container`),ref:n,children:[p.jsxs(Ar,{className:I(N),"data-testid":o,disabled:i,id:u,required:c,value:h,children:[d&&p.jsx("span",{className:I(`${N}-image-container`),children:Ur(d)?p.jsx(qr,{...d,"data-testid":o&&`${o}-image`}):H(d,f)}),p.jsxs("span",{className:I(`${N}-content`),children:[p.jsxs("span",{className:I(`${N}-top-container`),children:[typeof e=="string"?p.jsx(Z,{className:I(`${N}-title`),"data-testid":o&&`${o}-title`,variant:"paragraph-100",disabled:i,children:e}):H(e,f),p.jsx("span",{className:I(`${N}-radio`),children:p.jsx(Er,{className:I(`${N}-indicator`)})})]}),a&&p.jsx("span",{className:I(`${N}-bottom-container`),children:typeof a=="string"?p.jsx(Z,{"data-testid":o&&`${o}-body`,variant:"paragraph-100",disabled:i,children:a}):H(a,f)})]})]}),r]})},z=b.forwardRef(zr);z.displayName="RadioCardItem";const Vr=e=>b.isValidElement(e)&&(e==null?void 0:e.type)===z,Br=["horizontal","vertical"],Kr=["right","left"],F="purpur-radio-card-group",Wr=({"data-testid":e,"aria-labelledby":t,children:n,className:o,items:a,label:r,loop:i=!0,orientation:u="vertical",radioPosition:d="right",...c},h)=>{const f=b.Children.toArray(n).filter(Vr);return p.jsxs("div",{className:I(o,`${F}__container`),ref:h,children:[r&&p.jsx(ae,{"data-testid":e?`${e}-label`:void 0,id:`${c.id}-label`,tag:"h2",variant:"subsection-100",children:`${c.required?"* ":""}${r}`}),(!!(a!=null&&a.length)||f.length)&&p.jsxs(xr,{...c,"aria-labelledby":t||(r?`${c.id}-label`:void 0),className:I(F,`${F}--${u}`,`${F}--radio-${d}`),"data-testid":e,loop:i,children:[a==null?void 0:a.map(m=>p.jsx(z,{...m,disabled:m.disabled||c.disabled,"data-testid":e?`${e}-item`:void 0},m.id)),b.Children.map(f,m=>b.cloneElement(m,{disabled:m.props.disabled||c.disabled}))]})]})},Pe=b.forwardRef(Wr);Pe.displayName="RadioCardGroup";exports.RADIO_CARD_GROUP_ORIENTATION=Br;exports.RADIO_POSITION=Kr;exports.RadioCardGroup=Pe;exports.RadioCardItem=z;
|
|
18
18
|
//# sourceMappingURL=radio-card-group.cjs.js.map
|