@purpurds/modal 5.11.2 → 5.13.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 +5 -12
- package/dist/modal-content.d.ts +3 -1
- package/dist/modal-content.d.ts.map +1 -1
- package/dist/modal.cjs.js +21 -21
- package/dist/modal.cjs.js.map +1 -1
- package/dist/modal.es.js +551 -553
- package/dist/modal.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -9
- package/src/modal-content.module.scss +3 -13
- package/src/modal-content.tsx +22 -33
- package/src/modal.stories.tsx +53 -10
package/dist/LICENSE.txt
CHANGED
|
@@ -398,42 +398,35 @@ Homepage: https://radix-ui.com/primitives
|
|
|
398
398
|
---
|
|
399
399
|
|
|
400
400
|
Name: @purpurds/button
|
|
401
|
-
Version: 5.
|
|
401
|
+
Version: 5.12.0
|
|
402
402
|
License: AGPL-3.0-only
|
|
403
403
|
Private: false
|
|
404
404
|
|
|
405
405
|
---
|
|
406
406
|
|
|
407
407
|
Name: @purpurds/heading
|
|
408
|
-
Version: 5.
|
|
408
|
+
Version: 5.12.0
|
|
409
409
|
License: AGPL-3.0-only
|
|
410
410
|
Private: false
|
|
411
411
|
|
|
412
412
|
---
|
|
413
413
|
|
|
414
414
|
Name: @purpurds/icon
|
|
415
|
-
Version: 5.
|
|
415
|
+
Version: 5.12.0
|
|
416
416
|
License: AGPL-3.0-only
|
|
417
417
|
Private: false
|
|
418
418
|
|
|
419
419
|
---
|
|
420
420
|
|
|
421
421
|
Name: @purpurds/paragraph
|
|
422
|
-
Version: 5.
|
|
423
|
-
License: AGPL-3.0-only
|
|
424
|
-
Private: false
|
|
425
|
-
|
|
426
|
-
---
|
|
427
|
-
|
|
428
|
-
Name: @purpurds/tokens
|
|
429
|
-
Version: 5.11.1
|
|
422
|
+
Version: 5.12.0
|
|
430
423
|
License: AGPL-3.0-only
|
|
431
424
|
Private: false
|
|
432
425
|
|
|
433
426
|
---
|
|
434
427
|
|
|
435
428
|
Name: @purpurds/visually-hidden
|
|
436
|
-
Version: 5.
|
|
429
|
+
Version: 5.12.0
|
|
437
430
|
License: AGPL-3.0-only
|
|
438
431
|
Private: false
|
|
439
432
|
|
package/dist/modal-content.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export type DefaultProps = {
|
|
|
10
10
|
actions?: Array<{
|
|
11
11
|
label: string;
|
|
12
12
|
onClick: () => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
13
15
|
}>;
|
|
14
16
|
children: ReactNode;
|
|
15
17
|
className?: string;
|
|
@@ -77,7 +79,7 @@ export declare const ModalContent: React.ForwardRefExoticComponent<(ModalContent
|
|
|
77
79
|
}) & React.RefAttributes<HTMLDivElement>>;
|
|
78
80
|
export declare const MAX_NUMBER_OF_ACTIONS = 3;
|
|
79
81
|
export declare const ModalActions: ({ actions, primaryActionVariant, notification, }: Pick<ModalContentProps, "actions" | "notification"> & {
|
|
80
|
-
primaryActionVariant?:
|
|
82
|
+
primaryActionVariant?: PrimaryActionVariant;
|
|
81
83
|
}) => React.JSX.Element | null;
|
|
82
84
|
export {};
|
|
83
85
|
//# sourceMappingURL=modal-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../src/modal-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAA+D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"modal-content.d.ts","sourceRoot":"","sources":["../src/modal-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAA+D,MAAM,OAAO,CAAC;AASpF,OAAO,+BAA+B,CAAC;AAGvC,eAAO,MAAM,qBAAqB,mDAAoD,CAAC;AACvF,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB;;SAEK;IACL,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC/F,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;SAEK;IACL,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;SAEK;IACL,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;SAEK;IACL,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;SAEK;IACL,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;SAEK;IACL,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;SAGK;IACL,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C;;SAEK;IACL,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;SAEK;IACL,KAAK,EAAE,MAAM,CAAC;IACd;;SAEK;IACL,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB;;SAEK;IACL,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B;;SAEK;IACL,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB;;SAEK;IACL,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;SAEK;IACL,eAAe,EAAE,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,CAAC;AASvF,eAAO,MAAM,YAAY;2BAiB2B,SAAS,GAAG,YAAY,GAAG,aAAa;yCAgJ3F,CAAC;AA0BF,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,eAAO,MAAM,YAAY,qDAItB,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,cAAc,CAAC,GAAG;IACvD,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C,6BAqCA,CAAC"}
|
package/dist/modal.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),u=require("react"),xe=require("react-dom");function $t(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 _=$t(u);function O(){return O=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},O.apply(this,arguments)}function L(e,n,{checkForDefaultPrevented:t=!0}={}){return function(a){if(e==null||e(a),t===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function yt(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function qe(...e){return n=>e.forEach(t=>yt(t,n))}function H(...e){return u.useCallback(qe(...e),e)}function Et(e,n=[]){let t=[];function o(r,c){const i=u.createContext(c),l=t.length;t=[...t,c];function p(d){const{scope:m,children:v,...E}=d,s=(m==null?void 0:m[e][l])||i,h=u.useMemo(()=>E,Object.values(E));return u.createElement(s.Provider,{value:h},v)}function f(d,m){const v=(m==null?void 0:m[e][l])||i,E=u.useContext(v);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${d}\` must be used within \`${r}\``)}return p.displayName=r+"Provider",[p,f]}const a=()=>{const r=t.map(c=>u.createContext(c));return function(i){const l=(i==null?void 0:i[e])||r;return u.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[o,xt(a,...n)]}function xt(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(r){const c=o.reduce((i,{useScope:l,scopeName:p})=>{const d=l(r)[`__scope${p}`];return{...i,...d}},{});return u.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return t.scopeName=n.scopeName,t}const ge=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},wt=_.useId||(()=>{});let Ct=0;function le(e){const[n,t]=_.useState(wt());return ge(()=>{e||t(o=>o??String(Ct++))},[e]),e||(n?`radix-${n}`:"")}function B(e){const n=u.useRef(e);return u.useEffect(()=>{n.current=e}),u.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function St({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,a]=Ot({defaultProp:n,onChange:t}),r=e!==void 0,c=r?e:o,i=B(t),l=u.useCallback(p=>{if(r){const d=typeof p=="function"?p(e):p;d!==e&&i(d)}else a(p)},[r,e,a,i]);return[c,l]}function Ot({defaultProp:e,onChange:n}){const t=u.useState(e),[o]=t,a=u.useRef(o),r=B(n);return u.useEffect(()=>{a.current!==o&&(r(o),a.current=o)},[o,a,r]),t}const we=u.forwardRef((e,n)=>{const{children:t,...o}=e,a=u.Children.toArray(t),r=a.find(Nt);if(r){const c=r.props.children,i=a.map(l=>l===r?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:l);return u.createElement(_e,O({},o,{ref:n}),u.isValidElement(c)?u.cloneElement(c,void 0,i):null)}return u.createElement(_e,O({},o,{ref:n}),t)});we.displayName="Slot";const _e=u.forwardRef((e,n)=>{const{children:t,...o}=e;return u.isValidElement(t)?u.cloneElement(t,{...Rt(o,t.props),ref:n?qe(n,t.ref):t.ref}):u.Children.count(t)>1?u.Children.only(null):null});_e.displayName="SlotClone";const Pt=({children:e})=>u.createElement(u.Fragment,null,e);function Nt(e){return u.isValidElement(e)&&e.type===Pt}function Rt(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...i)=>{r(...i),a(...i)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const At=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],k=At.reduce((e,n)=>{const t=u.forwardRef((o,a)=>{const{asChild:r,...c}=o,i=r?we:n;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(i,O({},c,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function Tt(e,n){e&&xe.flushSync(()=>e.dispatchEvent(n))}function Dt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e);u.useEffect(()=>{const o=a=>{a.key==="Escape"&&t(a)};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[t,n])}const be="dismissableLayer.update",jt="dismissableLayer.pointerDownOutside",Mt="dismissableLayer.focusOutside";let Oe;const It=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lt=u.forwardRef((e,n)=>{var t;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:c,onInteractOutside:i,onDismiss:l,...p}=e,f=u.useContext(It),[d,m]=u.useState(null),v=(t=d==null?void 0:d.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,E]=u.useState({}),s=H(n,x=>m(x)),h=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),C=h.indexOf(b),y=d?h.indexOf(d):-1,$=f.layersWithOutsidePointerEventsDisabled.size>0,w=y>=C,j=kt(x=>{const N=x.target,Z=[...f.branches].some(T=>T.contains(N));!w||Z||(r==null||r(x),i==null||i(x),x.defaultPrevented||l==null||l())},v),R=Ft(x=>{const N=x.target;[...f.branches].some(T=>T.contains(N))||(c==null||c(x),i==null||i(x),x.defaultPrevented||l==null||l())},v);return Dt(x=>{y===f.layers.size-1&&(a==null||a(x),!x.defaultPrevented&&l&&(x.preventDefault(),l()))},v),u.useEffect(()=>{if(d)return o&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Oe=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Pe(),()=>{o&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Oe)}},[d,v,o,f]),u.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Pe())},[d,f]),u.useEffect(()=>{const x=()=>E({});return document.addEventListener(be,x),()=>document.removeEventListener(be,x)},[]),u.createElement(k.div,O({},p,{ref:s,style:{pointerEvents:$?w?"auto":"none":void 0,...e.style},onFocusCapture:L(e.onFocusCapture,R.onFocusCapture),onBlurCapture:L(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:L(e.onPointerDownCapture,j.onPointerDownCapture)}))});function kt(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=u.useRef(!1),a=u.useRef(()=>{});return u.useEffect(()=>{const r=i=>{if(i.target&&!o.current){let p=function(){ze(jt,t,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=p,n.addEventListener("click",a.current,{once:!0})):p()}else n.removeEventListener("click",a.current);o.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",r),n.removeEventListener("click",a.current)}},[n,t]),{onPointerDownCapture:()=>o.current=!0}}function Ft(e,n=globalThis==null?void 0:globalThis.document){const t=B(e),o=u.useRef(!1);return u.useEffect(()=>{const a=r=>{r.target&&!o.current&&ze(Mt,t,{originalEvent:r},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Pe(){const e=new CustomEvent(be);document.dispatchEvent(e)}function ze(e,n,t,{discrete:o}){const a=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&a.addEventListener(e,n,{once:!0}),o?Tt(a,r):a.dispatchEvent(r)}const de="focusScope.autoFocusOnMount",pe="focusScope.autoFocusOnUnmount",Ne={bubbles:!1,cancelable:!0},Bt=u.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:r,...c}=e,[i,l]=u.useState(null),p=B(a),f=B(r),d=u.useRef(null),m=H(n,s=>l(s)),v=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(o){let s=function(y){if(v.paused||!i)return;const $=y.target;i.contains($)?d.current=$:I(d.current,{select:!0})},h=function(y){if(v.paused||!i)return;const $=y.relatedTarget;$!==null&&(i.contains($)||I(d.current,{select:!0}))},b=function(y){if(document.activeElement===document.body)for(const w of y)w.removedNodes.length>0&&I(i)};document.addEventListener("focusin",s),document.addEventListener("focusout",h);const C=new MutationObserver(b);return i&&C.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",h),C.disconnect()}}},[o,i,v.paused]),u.useEffect(()=>{if(i){Ae.add(v);const s=document.activeElement;if(!i.contains(s)){const b=new CustomEvent(de,Ne);i.addEventListener(de,p),i.dispatchEvent(b),b.defaultPrevented||(Ut(Vt(He(i)),{select:!0}),document.activeElement===s&&I(i))}return()=>{i.removeEventListener(de,p),setTimeout(()=>{const b=new CustomEvent(pe,Ne);i.addEventListener(pe,f),i.dispatchEvent(b),b.defaultPrevented||I(s??document.body,{select:!0}),i.removeEventListener(pe,f),Ae.remove(v)},0)}}},[i,p,f,v]);const E=u.useCallback(s=>{if(!t&&!o||v.paused)return;const h=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,b=document.activeElement;if(h&&b){const C=s.currentTarget,[y,$]=Wt(C);y&&$?!s.shiftKey&&b===$?(s.preventDefault(),t&&I(y,{select:!0})):s.shiftKey&&b===y&&(s.preventDefault(),t&&I($,{select:!0})):b===C&&s.preventDefault()}},[t,o,v.paused]);return u.createElement(k.div,O({tabIndex:-1},c,{ref:m,onKeyDown:E}))});function Ut(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(I(o,{select:n}),document.activeElement!==t)return}function Wt(e){const n=He(e),t=Re(n,e),o=Re(n.reverse(),e);return[t,o]}function He(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function Re(e,n){for(const t of e)if(!qt(t,{upTo:n}))return t}function qt(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function zt(e){return e instanceof HTMLInputElement&&"select"in e}function I(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&zt(e)&&n&&e.select()}}const Ae=Ht();function Ht(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=Te(e,n),e.unshift(n)},remove(n){var t;e=Te(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function Te(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function Vt(e){return e.filter(n=>n.tagName!=="A")}const Kt=u.forwardRef((e,n)=>{var t;const{container:o=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...a}=e;return o?xe.createPortal(u.createElement(k.div,O({},a,{ref:n})),o):null});function Gt(e,n){return u.useReducer((t,o)=>{const a=n[t][o];return a??t},e)}const ie=e=>{const{present:n,children:t}=e,o=Xt(n),a=typeof t=="function"?t({present:o.isPresent}):u.Children.only(t),r=H(o.ref,a.ref);return typeof t=="function"||o.isPresent?u.cloneElement(a,{ref:r}):null};ie.displayName="Presence";function Xt(e){const[n,t]=u.useState(),o=u.useRef({}),a=u.useRef(e),r=u.useRef("none"),c=e?"mounted":"unmounted",[i,l]=Gt(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const p=Q(o.current);r.current=i==="mounted"?p:"none"},[i]),ge(()=>{const p=o.current,f=a.current;if(f!==e){const m=r.current,v=Q(p);e?l("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?l("UNMOUNT"):l(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),ge(()=>{if(n){const p=d=>{const v=Q(o.current).includes(d.animationName);d.target===n&&v&&xe.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===n&&(r.current=Q(o.current))};return n.addEventListener("animationstart",f),n.addEventListener("animationcancel",p),n.addEventListener("animationend",p),()=>{n.removeEventListener("animationstart",f),n.removeEventListener("animationcancel",p),n.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[n,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:u.useCallback(p=>{p&&(o.current=getComputedStyle(p)),t(p)},[])}}function Q(e){return(e==null?void 0:e.animationName)||"none"}let fe=0;function Yt(){u.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:De()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:De()),fe++,()=>{fe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),fe--}},[])}function De(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var D=function(){return D=Object.assign||function(n){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},D.apply(this,arguments)};function Ve(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)n.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]]);return t}function Zt(e,n,t){if(t||arguments.length===2)for(var o=0,a=n.length,r;o<a;o++)(r||!(o in n))&&(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var ae="right-scroll-bar-position",ce="width-before-scroll-bar",Qt="with-scroll-bars-hidden",Jt="--removed-body-scroll-bar-size";function en(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function tn(e,n){var t=u.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(o){var a=t.value;a!==o&&(t.value=o,t.callback(o,a))}}}})[0];return t.callback=n,t.facade}function nn(e,n){return tn(null,function(t){return e.forEach(function(o){return en(o,t)})})}function rn(e){return e}function on(e,n){n===void 0&&(n=rn);var t=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(r){var c=n(r,o);return t.push(c),function(){t=t.filter(function(i){return i!==c})}},assignSyncMedium:function(r){for(o=!0;t.length;){var c=t;t=[],c.forEach(r)}t={push:function(i){return r(i)},filter:function(){return t}}},assignMedium:function(r){o=!0;var c=[];if(t.length){var i=t;t=[],i.forEach(r),c=t}var l=function(){var f=c;c=[],f.forEach(r)},p=function(){return Promise.resolve().then(l)};p(),t={push:function(f){c.push(f),p()},filter:function(f){return c=c.filter(f),t}}}};return a}function an(e){e===void 0&&(e={});var n=on(null);return n.options=D({async:!0,ssr:!1},e),n}var Ke=function(e){var n=e.sideCar,t=Ve(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return _.createElement(o,D({},t))};Ke.isSideCarExport=!0;function cn(e,n){return e.useMedium(n),Ke}var Ge=an(),ve=function(){},ue=_.forwardRef(function(e,n){var t=_.useRef(null),o=_.useState({onScrollCapture:ve,onWheelCapture:ve,onTouchMoveCapture:ve}),a=o[0],r=o[1],c=e.forwardProps,i=e.children,l=e.className,p=e.removeScrollBar,f=e.enabled,d=e.shards,m=e.sideCar,v=e.noIsolation,E=e.inert,s=e.allowPinchZoom,h=e.as,b=h===void 0?"div":h,C=Ve(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=m,$=nn([t,n]),w=D(D({},C),a);return _.createElement(_.Fragment,null,f&&_.createElement(y,{sideCar:Ge,removeScrollBar:p,shards:d,noIsolation:v,inert:E,setCallbacks:r,allowPinchZoom:!!s,lockRef:t}),c?_.cloneElement(_.Children.only(i),D(D({},w),{ref:$})):_.createElement(b,D({},w,{className:l,ref:$}),i))});ue.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ue.classNames={fullWidth:ce,zeroRight:ae};var un=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=un();return n&&e.setAttribute("nonce",n),e}function ln(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function dn(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var pn=function(){var e=0,n=null;return{add:function(t){e==0&&(n=sn())&&(ln(n,t),dn(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},fn=function(){var e=pn();return function(n,t){_.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},Xe=function(){var e=fn(),n=function(t){var o=t.styles,a=t.dynamic;return e(o,a),null};return n},vn={left:0,top:0,right:0,gap:0},he=function(e){return parseInt(e||"",10)||0},hn=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],a=n[e==="padding"?"paddingRight":"marginRight"];return[he(t),he(o),he(a)]},mn=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vn;var n=hn(e),t=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-t+n[2]-n[0])}},gn=Xe(),_n=function(e,n,t,o){var a=e.left,r=e.top,c=e.right,i=e.gap;return t===void 0&&(t="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),u=require("react"),Ee=require("react-dom");function gt(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 _=gt(u);function O(){return O=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},O.apply(this,arguments)}function M(e,n,{checkForDefaultPrevented:t=!0}={}){return function(a){if(e==null||e(a),t===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function _t(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function We(...e){return n=>e.forEach(t=>_t(t,n))}function z(...e){return u.useCallback(We(...e),e)}function bt(e,n=[]){let t=[];function o(r,i){const c=u.createContext(i),l=t.length;t=[...t,i];function f(d){const{scope:m,children:v,...E}=d,s=(m==null?void 0:m[e][l])||c,h=u.useMemo(()=>E,Object.values(E));return u.createElement(s.Provider,{value:h},v)}function p(d,m){const v=(m==null?void 0:m[e][l])||c,E=u.useContext(v);if(E)return E;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${r}\``)}return f.displayName=r+"Provider",[f,p]}const a=()=>{const r=t.map(i=>u.createContext(i));return function(c){const l=(c==null?void 0:c[e])||r;return u.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return a.scopeName=e,[o,$t(a,...n)]}function $t(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(r){const i=o.reduce((c,{useScope:l,scopeName:f})=>{const d=l(r)[`__scope${f}`];return{...c,...d}},{});return u.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return t.scopeName=n.scopeName,t}const me=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},yt=_.useId||(()=>{});let Et=0;function se(e){const[n,t]=_.useState(yt());return me(()=>{e||t(o=>o??String(Et++))},[e]),e||(n?`radix-${n}`:"")}function F(e){const n=u.useRef(e);return u.useEffect(()=>{n.current=e}),u.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function xt({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,a]=wt({defaultProp:n,onChange:t}),r=e!==void 0,i=r?e:o,c=F(t),l=u.useCallback(f=>{if(r){const d=typeof f=="function"?f(e):f;d!==e&&c(d)}else a(f)},[r,e,a,c]);return[i,l]}function wt({defaultProp:e,onChange:n}){const t=u.useState(e),[o]=t,a=u.useRef(o),r=F(n);return u.useEffect(()=>{a.current!==o&&(r(o),a.current=o)},[o,a,r]),t}const xe=u.forwardRef((e,n)=>{const{children:t,...o}=e,a=u.Children.toArray(t),r=a.find(St);if(r){const i=r.props.children,c=a.map(l=>l===r?u.Children.count(i)>1?u.Children.only(null):u.isValidElement(i)?i.props.children:null:l);return u.createElement(ge,O({},o,{ref:n}),u.isValidElement(i)?u.cloneElement(i,void 0,c):null)}return u.createElement(ge,O({},o,{ref:n}),t)});xe.displayName="Slot";const ge=u.forwardRef((e,n)=>{const{children:t,...o}=e;return u.isValidElement(t)?u.cloneElement(t,{...Ot(o,t.props),ref:n?We(n,t.ref):t.ref}):u.Children.count(t)>1?u.Children.only(null):null});ge.displayName="SlotClone";const Ct=({children:e})=>u.createElement(u.Fragment,null,e);function St(e){return u.isValidElement(e)&&e.type===Ct}function Ot(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...c)=>{r(...c),a(...c)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Pt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],I=Pt.reduce((e,n)=>{const t=u.forwardRef((o,a)=>{const{asChild:r,...i}=o,c=r?xe:n;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(c,O({},i,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function Nt(e,n){e&&Ee.flushSync(()=>e.dispatchEvent(n))}function Rt(e,n=globalThis==null?void 0:globalThis.document){const t=F(e);u.useEffect(()=>{const o=a=>{a.key==="Escape"&&t(a)};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[t,n])}const _e="dismissableLayer.update",At="dismissableLayer.pointerDownOutside",Tt="dismissableLayer.focusOutside";let Se;const Dt=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jt=u.forwardRef((e,n)=>{var t;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:c,onDismiss:l,...f}=e,p=u.useContext(Dt),[d,m]=u.useState(null),v=(t=d==null?void 0:d.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,E]=u.useState({}),s=z(n,x=>m(x)),h=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),C=h.indexOf(b),y=d?h.indexOf(d):-1,$=p.layersWithOutsidePointerEventsDisabled.size>0,w=y>=C,L=Mt(x=>{const R=x.target,Y=[...p.branches].some(A=>A.contains(R));!w||Y||(r==null||r(x),c==null||c(x),x.defaultPrevented||l==null||l())},v),N=It(x=>{const R=x.target;[...p.branches].some(A=>A.contains(R))||(i==null||i(x),c==null||c(x),x.defaultPrevented||l==null||l())},v);return Rt(x=>{y===p.layers.size-1&&(a==null||a(x),!x.defaultPrevented&&l&&(x.preventDefault(),l()))},v),u.useEffect(()=>{if(d)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Se=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(d)),p.layers.add(d),Oe(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Se)}},[d,v,o,p]),u.useEffect(()=>()=>{d&&(p.layers.delete(d),p.layersWithOutsidePointerEventsDisabled.delete(d),Oe())},[d,p]),u.useEffect(()=>{const x=()=>E({});return document.addEventListener(_e,x),()=>document.removeEventListener(_e,x)},[]),u.createElement(I.div,O({},f,{ref:s,style:{pointerEvents:$?w?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,N.onFocusCapture),onBlurCapture:M(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,L.onPointerDownCapture)}))});function Mt(e,n=globalThis==null?void 0:globalThis.document){const t=F(e),o=u.useRef(!1),a=u.useRef(()=>{});return u.useEffect(()=>{const r=c=>{if(c.target&&!o.current){let f=function(){qe(At,t,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=f,n.addEventListener("click",a.current,{once:!0})):f()}else n.removeEventListener("click",a.current);o.current=!1},i=window.setTimeout(()=>{n.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(i),n.removeEventListener("pointerdown",r),n.removeEventListener("click",a.current)}},[n,t]),{onPointerDownCapture:()=>o.current=!0}}function It(e,n=globalThis==null?void 0:globalThis.document){const t=F(e),o=u.useRef(!1);return u.useEffect(()=>{const a=r=>{r.target&&!o.current&&qe(Tt,t,{originalEvent:r},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Oe(){const e=new CustomEvent(_e);document.dispatchEvent(e)}function qe(e,n,t,{discrete:o}){const a=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&a.addEventListener(e,n,{once:!0}),o?Nt(a,r):a.dispatchEvent(r)}const le="focusScope.autoFocusOnMount",de="focusScope.autoFocusOnUnmount",Pe={bubbles:!1,cancelable:!0},Lt=u.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:r,...i}=e,[c,l]=u.useState(null),f=F(a),p=F(r),d=u.useRef(null),m=z(n,s=>l(s)),v=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(o){let s=function(y){if(v.paused||!c)return;const $=y.target;c.contains($)?d.current=$:j(d.current,{select:!0})},h=function(y){if(v.paused||!c)return;const $=y.relatedTarget;$!==null&&(c.contains($)||j(d.current,{select:!0}))},b=function(y){if(document.activeElement===document.body)for(const w of y)w.removedNodes.length>0&&j(c)};document.addEventListener("focusin",s),document.addEventListener("focusout",h);const C=new MutationObserver(b);return c&&C.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",s),document.removeEventListener("focusout",h),C.disconnect()}}},[o,c,v.paused]),u.useEffect(()=>{if(c){Re.add(v);const s=document.activeElement;if(!c.contains(s)){const b=new CustomEvent(le,Pe);c.addEventListener(le,f),c.dispatchEvent(b),b.defaultPrevented||(kt(qt(ze(c)),{select:!0}),document.activeElement===s&&j(c))}return()=>{c.removeEventListener(le,f),setTimeout(()=>{const b=new CustomEvent(de,Pe);c.addEventListener(de,p),c.dispatchEvent(b),b.defaultPrevented||j(s??document.body,{select:!0}),c.removeEventListener(de,p),Re.remove(v)},0)}}},[c,f,p,v]);const E=u.useCallback(s=>{if(!t&&!o||v.paused)return;const h=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,b=document.activeElement;if(h&&b){const C=s.currentTarget,[y,$]=Ft(C);y&&$?!s.shiftKey&&b===$?(s.preventDefault(),t&&j(y,{select:!0})):s.shiftKey&&b===y&&(s.preventDefault(),t&&j($,{select:!0})):b===C&&s.preventDefault()}},[t,o,v.paused]);return u.createElement(I.div,O({tabIndex:-1},i,{ref:m,onKeyDown:E}))});function kt(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(j(o,{select:n}),document.activeElement!==t)return}function Ft(e){const n=ze(e),t=Ne(n,e),o=Ne(n.reverse(),e);return[t,o]}function ze(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function Ne(e,n){for(const t of e)if(!Bt(t,{upTo:n}))return t}function Bt(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ut(e){return e instanceof HTMLInputElement&&"select"in e}function j(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Ut(e)&&n&&e.select()}}const Re=Wt();function Wt(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=Ae(e,n),e.unshift(n)},remove(n){var t;e=Ae(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function Ae(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function qt(e){return e.filter(n=>n.tagName!=="A")}const zt=u.forwardRef((e,n)=>{var t;const{container:o=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...a}=e;return o?Ee.createPortal(u.createElement(I.div,O({},a,{ref:n})),o):null});function Ht(e,n){return u.useReducer((t,o)=>{const a=n[t][o];return a??t},e)}const ie=e=>{const{present:n,children:t}=e,o=Vt(n),a=typeof t=="function"?t({present:o.isPresent}):u.Children.only(t),r=z(o.ref,a.ref);return typeof t=="function"||o.isPresent?u.cloneElement(a,{ref:r}):null};ie.displayName="Presence";function Vt(e){const[n,t]=u.useState(),o=u.useRef({}),a=u.useRef(e),r=u.useRef("none"),i=e?"mounted":"unmounted",[c,l]=Ht(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const f=Z(o.current);r.current=c==="mounted"?f:"none"},[c]),me(()=>{const f=o.current,p=a.current;if(p!==e){const m=r.current,v=Z(f);e?l("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?l("UNMOUNT"):l(p&&m!==v?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),me(()=>{if(n){const f=d=>{const v=Z(o.current).includes(d.animationName);d.target===n&&v&&Ee.flushSync(()=>l("ANIMATION_END"))},p=d=>{d.target===n&&(r.current=Z(o.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[n,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:u.useCallback(f=>{f&&(o.current=getComputedStyle(f)),t(f)},[])}}function Z(e){return(e==null?void 0:e.animationName)||"none"}let fe=0;function Kt(){u.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:Te()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:Te()),fe++,()=>{fe===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),fe--}},[])}function Te(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var D=function(){return D=Object.assign||function(n){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},D.apply(this,arguments)};function He(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)n.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]]);return t}function Gt(e,n,t){if(t||arguments.length===2)for(var o=0,a=n.length,r;o<a;o++)(r||!(o in n))&&(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}var oe="right-scroll-bar-position",ae="width-before-scroll-bar",Xt="with-scroll-bars-hidden",Yt="--removed-body-scroll-bar-size";function Zt(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function Qt(e,n){var t=u.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(o){var a=t.value;a!==o&&(t.value=o,t.callback(o,a))}}}})[0];return t.callback=n,t.facade}function Jt(e,n){return Qt(null,function(t){return e.forEach(function(o){return Zt(o,t)})})}function en(e){return e}function tn(e,n){n===void 0&&(n=en);var t=[],o=!1,a={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(r){var i=n(r,o);return t.push(i),function(){t=t.filter(function(c){return c!==i})}},assignSyncMedium:function(r){for(o=!0;t.length;){var i=t;t=[],i.forEach(r)}t={push:function(c){return r(c)},filter:function(){return t}}},assignMedium:function(r){o=!0;var i=[];if(t.length){var c=t;t=[],c.forEach(r),i=t}var l=function(){var p=i;i=[],p.forEach(r)},f=function(){return Promise.resolve().then(l)};f(),t={push:function(p){i.push(p),f()},filter:function(p){return i=i.filter(p),t}}}};return a}function nn(e){e===void 0&&(e={});var n=tn(null);return n.options=D({async:!0,ssr:!1},e),n}var Ve=function(e){var n=e.sideCar,t=He(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return _.createElement(o,D({},t))};Ve.isSideCarExport=!0;function rn(e,n){return e.useMedium(n),Ve}var Ke=nn(),pe=function(){},ce=_.forwardRef(function(e,n){var t=_.useRef(null),o=_.useState({onScrollCapture:pe,onWheelCapture:pe,onTouchMoveCapture:pe}),a=o[0],r=o[1],i=e.forwardProps,c=e.children,l=e.className,f=e.removeScrollBar,p=e.enabled,d=e.shards,m=e.sideCar,v=e.noIsolation,E=e.inert,s=e.allowPinchZoom,h=e.as,b=h===void 0?"div":h,C=He(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=m,$=Jt([t,n]),w=D(D({},C),a);return _.createElement(_.Fragment,null,p&&_.createElement(y,{sideCar:Ke,removeScrollBar:f,shards:d,noIsolation:v,inert:E,setCallbacks:r,allowPinchZoom:!!s,lockRef:t}),i?_.cloneElement(_.Children.only(c),D(D({},w),{ref:$})):_.createElement(b,D({},w,{className:l,ref:$}),c))});ce.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ce.classNames={fullWidth:ae,zeroRight:oe};var on=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function an(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=on();return n&&e.setAttribute("nonce",n),e}function cn(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function un(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var sn=function(){var e=0,n=null;return{add:function(t){e==0&&(n=an())&&(cn(n,t),un(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},ln=function(){var e=sn();return function(n,t){_.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},Ge=function(){var e=ln(),n=function(t){var o=t.styles,a=t.dynamic;return e(o,a),null};return n},dn={left:0,top:0,right:0,gap:0},ve=function(e){return parseInt(e||"",10)||0},fn=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],a=n[e==="padding"?"paddingRight":"marginRight"];return[ve(t),ve(o),ve(a)]},pn=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dn;var n=fn(e),t=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-t+n[2]-n[0])}},vn=Ge(),hn=function(e,n,t,o){var a=e.left,r=e.top,i=e.right,c=e.gap;return t===void 0&&(t="margin"),`
|
|
2
|
+
.`.concat(Xt,` {
|
|
3
3
|
overflow: hidden `).concat(o,`;
|
|
4
|
-
padding-right: `).concat(
|
|
4
|
+
padding-right: `).concat(c,"px ").concat(o,`;
|
|
5
5
|
}
|
|
6
6
|
body {
|
|
7
7
|
overflow: hidden `).concat(o,`;
|
|
@@ -9,58 +9,58 @@
|
|
|
9
9
|
`).concat([n&&"position: relative ".concat(o,";"),t==="margin"&&`
|
|
10
10
|
padding-left: `.concat(a,`px;
|
|
11
11
|
padding-top: `).concat(r,`px;
|
|
12
|
-
padding-right: `).concat(
|
|
12
|
+
padding-right: `).concat(i,`px;
|
|
13
13
|
margin-left:0;
|
|
14
14
|
margin-top:0;
|
|
15
|
-
margin-right: `).concat(
|
|
16
|
-
`),t==="padding"&&"padding-right: ".concat(
|
|
15
|
+
margin-right: `).concat(c,"px ").concat(o,`;
|
|
16
|
+
`),t==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
20
|
-
right: `).concat(
|
|
19
|
+
.`).concat(oe,` {
|
|
20
|
+
right: `).concat(c,"px ").concat(o,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
24
|
-
margin-right: `).concat(
|
|
23
|
+
.`).concat(ae,` {
|
|
24
|
+
margin-right: `).concat(c,"px ").concat(o,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(oe," .").concat(oe,` {
|
|
28
28
|
right: 0 `).concat(o,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
31
|
+
.`).concat(ae," .").concat(ae,` {
|
|
32
32
|
margin-right: 0 `).concat(o,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(Yt,": ").concat(c,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},mn=function(e){var n=e.noRelative,t=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o,r=_.useMemo(function(){return pn(a)},[a]);return _.createElement(vn,{styles:hn(r,!n,a,t?"":"!important")})},be=!1;if(typeof window<"u")try{var Q=Object.defineProperty({},"passive",{get:function(){return be=!0,!0}});window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{be=!1}var B=be?{passive:!1}:!1,gn=function(e){return e.tagName==="TEXTAREA"},Xe=function(e,n){var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!gn(e)&&t[n]==="visible")},_n=function(e){return Xe(e,"overflowY")},bn=function(e){return Xe(e,"overflowX")},De=function(e,n){var t=n;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var o=Ye(e,t);if(o){var a=Ze(e,t),r=a[1],i=a[2];if(r>i)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},$n=function(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;return[n,t,o]},yn=function(e){var n=e.scrollLeft,t=e.scrollWidth,o=e.clientWidth;return[n,t,o]},Ye=function(e,n){return e==="v"?_n(n):bn(n)},Ze=function(e,n){return e==="v"?$n(n):yn(n)},En=function(e,n){return e==="h"&&n==="rtl"?-1:1},xn=function(e,n,t,o,a){var r=En(e,window.getComputedStyle(n).direction),i=r*o,c=t.target,l=n.contains(c),f=!1,p=i>0,d=0,m=0;do{var v=Ze(e,c),E=v[0],s=v[1],h=v[2],b=s-h-r*E;(E||b)&&Ye(e,c)&&(d+=b,m+=E),c=c.parentNode}while(!l&&c!==document.body||l&&(n.contains(c)||n===c));return(p&&(d===0||!a)||!p&&(m===0||!a))&&(f=!0),f},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},je=function(e){return[e.deltaX,e.deltaY]},Me=function(e){return e&&"current"in e?e.current:e},wn=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Cn=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},
|
|
41
|
+
`)},Sn=0,U=[];function On(e){var n=_.useRef([]),t=_.useRef([0,0]),o=_.useRef(),a=_.useState(Sn++)[0],r=_.useState(function(){return Ge()})[0],i=_.useRef(e);_.useEffect(function(){i.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var s=Gt([e.lockRef.current],(e.shards||[]).map(Me),!0).filter(Boolean);return s.forEach(function(h){return h.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),s.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=_.useCallback(function(s,h){if("touches"in s&&s.touches.length===2)return!i.current.allowPinchZoom;var b=J(s),C=t.current,y="deltaX"in s?s.deltaX:C[0]-b[0],$="deltaY"in s?s.deltaY:C[1]-b[1],w,L=s.target,N=Math.abs(y)>Math.abs($)?"h":"v";if("touches"in s&&N==="h"&&L.type==="range")return!1;var x=De(N,L);if(!x)return!0;if(x?w=N:(w=N==="v"?"h":"v",x=De(N,L)),!x)return!1;if(!o.current&&"changedTouches"in s&&(y||$)&&(o.current=w),!w)return!0;var R=o.current||w;return xn(R,h,s,R==="h"?y:$,!0)},[]),l=_.useCallback(function(s){var h=s;if(!(!U.length||U[U.length-1]!==r)){var b="deltaY"in h?je(h):J(h),C=n.current.filter(function(w){return w.name===h.type&&w.target===h.target&&wn(w.delta,b)})[0];if(C&&C.should){h.cancelable&&h.preventDefault();return}if(!C){var y=(i.current.shards||[]).map(Me).filter(Boolean).filter(function(w){return w.contains(h.target)}),$=y.length>0?c(h,y[0]):!i.current.noIsolation;$&&h.cancelable&&h.preventDefault()}}},[]),f=_.useCallback(function(s,h,b,C){var y={name:s,delta:h,target:b,should:C};n.current.push(y),setTimeout(function(){n.current=n.current.filter(function($){return $!==y})},1)},[]),p=_.useCallback(function(s){t.current=J(s),o.current=void 0},[]),d=_.useCallback(function(s){f(s.type,je(s),s.target,c(s,e.lockRef.current))},[]),m=_.useCallback(function(s){f(s.type,J(s),s.target,c(s,e.lockRef.current))},[]);_.useEffect(function(){return U.push(r),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",l,B),document.addEventListener("touchmove",l,B),document.addEventListener("touchstart",p,B),function(){U=U.filter(function(s){return s!==r}),document.removeEventListener("wheel",l,B),document.removeEventListener("touchmove",l,B),document.removeEventListener("touchstart",p,B)}},[]);var v=e.removeScrollBar,E=e.inert;return _.createElement(_.Fragment,null,E?_.createElement(r,{styles:Cn(a)}):null,v?_.createElement(mn,{gapMode:"margin"}):null)}const Pn=rn(Ke,On);var Qe=_.forwardRef(function(e,n){return _.createElement(ce,D({},e,{ref:n,sideCar:Pn}))});Qe.classNames=ce.classNames;var Nn=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},W=new WeakMap,ee=new WeakMap,te={},he=0,Je=function(e){return e&&(e.host||Je(e.parentNode))},Rn=function(e,n){return n.map(function(t){if(e.contains(t))return t;var o=Je(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},An=function(e,n,t,o){var a=Rn(n,Array.isArray(e)?e:[e]);te[t]||(te[t]=new WeakMap);var r=te[t],i=[],c=new Set,l=new Set(a),f=function(d){!d||c.has(d)||(c.add(d),f(d.parentNode))};a.forEach(f);var p=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(m){if(c.has(m))p(m);else{var v=m.getAttribute(o),E=v!==null&&v!=="false",s=(W.get(m)||0)+1,h=(r.get(m)||0)+1;W.set(m,s),r.set(m,h),i.push(m),s===1&&E&&ee.set(m,!0),h===1&&m.setAttribute(t,"true"),E||m.setAttribute(o,"true")}})};return p(n),c.clear(),he++,function(){i.forEach(function(d){var m=W.get(d)-1,v=r.get(d)-1;W.set(d,m),r.set(d,v),m||(ee.has(d)||d.removeAttribute(o),ee.delete(d)),v||d.removeAttribute(t)}),he--,he||(W=new WeakMap,W=new WeakMap,ee=new WeakMap,te={})}},Tn=function(e,n,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),a=Nn(e);return a?(o.push.apply(o,Array.from(a.querySelectorAll("[aria-live]"))),An(o,a,t,"aria-hidden")):function(){return null}};const et="Dialog",[tt,Jr]=bt(et),[Dn,T]=tt(et),jn=e=>{const{__scopeDialog:n,children:t,open:o,defaultOpen:a,onOpenChange:r,modal:i=!0}=e,c=u.useRef(null),l=u.useRef(null),[f=!1,p]=xt({prop:o,defaultProp:a,onChange:r});return u.createElement(Dn,{scope:n,triggerRef:c,contentRef:l,contentId:se(),titleId:se(),descriptionId:se(),open:f,onOpenChange:p,onOpenToggle:u.useCallback(()=>p(d=>!d),[p]),modal:i},t)},Mn="DialogTrigger",In=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Mn,t),r=z(n,a.triggerRef);return u.createElement(I.button,O({type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":we(a.open)},o,{ref:r,onClick:M(e.onClick,a.onOpenToggle)}))}),nt="DialogPortal",[Ln,rt]=tt(nt,{forceMount:void 0}),kn=e=>{const{__scopeDialog:n,forceMount:t,children:o,container:a}=e,r=T(nt,n);return u.createElement(Ln,{scope:n,forceMount:t},u.Children.map(o,i=>u.createElement(ie,{present:t||r.open},u.createElement(zt,{asChild:!0,container:a},i))))},$e="DialogOverlay",Fn=u.forwardRef((e,n)=>{const t=rt($e,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T($e,e.__scopeDialog);return r.modal?u.createElement(ie,{present:o||r.open},u.createElement(Bn,O({},a,{ref:n}))):null}),Bn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T($e,t);return u.createElement(Qe,{as:xe,allowPinchZoom:!0,shards:[a.contentRef]},u.createElement(I.div,O({"data-state":we(a.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))}),X="DialogContent",Un=u.forwardRef((e,n)=>{const t=rt(X,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,r=T(X,e.__scopeDialog);return u.createElement(ie,{present:o||r.open},r.modal?u.createElement(Wn,O({},a,{ref:n})):u.createElement(qn,O({},a,{ref:n})))}),Wn=u.forwardRef((e,n)=>{const t=T(X,e.__scopeDialog),o=u.useRef(null),a=z(n,t.contentRef,o);return u.useEffect(()=>{const r=o.current;if(r)return Tn(r)},[]),u.createElement(ot,O({},e,{ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:M(e.onCloseAutoFocus,r=>{var i;r.preventDefault(),(i=t.triggerRef.current)===null||i===void 0||i.focus()}),onPointerDownOutside:M(e.onPointerDownOutside,r=>{const i=r.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&r.preventDefault()}),onFocusOutside:M(e.onFocusOutside,r=>r.preventDefault())}))}),qn=u.forwardRef((e,n)=>{const t=T(X,e.__scopeDialog),o=u.useRef(!1),a=u.useRef(!1);return u.createElement(ot,O({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,r),!r.defaultPrevented){var c;o.current||(c=t.triggerRef.current)===null||c===void 0||c.focus(),r.preventDefault()}o.current=!1,a.current=!1},onInteractOutside:r=>{var i,c;(i=e.onInteractOutside)===null||i===void 0||i.call(e,r),r.defaultPrevented||(o.current=!0,r.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=r.target;((c=t.triggerRef.current)===null||c===void 0?void 0:c.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&a.current&&r.preventDefault()}}))}),ot=u.forwardRef((e,n)=>{const{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:r,...i}=e,c=T(X,t),l=u.useRef(null),f=z(n,l);return Kt(),u.createElement(u.Fragment,null,u.createElement(Lt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:r},u.createElement(jt,O({role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":we(c.open)},i,{ref:f,onDismiss:()=>c.onOpenChange(!1)}))),!1)}),zn="DialogTitle",Hn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(zn,t);return u.createElement(I.h2,O({id:a.titleId},o,{ref:n}))}),Vn="DialogDescription",Kn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Vn,t);return u.createElement(I.p,O({id:a.descriptionId},o,{ref:n}))}),Gn="DialogClose",Xn=u.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=T(Gn,t);return u.createElement(I.button,O({type:"button"},o,{ref:n,onClick:M(e.onClick,()=>a.onOpenChange(!1))}))});function we(e){return e?"open":"closed"}const Yn=jn,Zn=In,Qn=kn,Jn=Fn,er=Un,tr=Hn,Ie=Kn,nr=Xn,rr={SM:"sm",MD:"md",LG:"lg"};function or(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var at={exports:{}};/*!
|
|
42
42
|
Copyright (c) 2018 Jed Watson.
|
|
43
43
|
Licensed under the MIT License (MIT), see
|
|
44
44
|
http://jedwatson.github.io/classnames
|
|
45
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",
|
|
45
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o(c)))}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 i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(at);var ar=at.exports;const Le=or(ar),ir="_rotate_1xozj_1",cr="_dash_1xozj_1",H={"purpur-spinner":"_purpur-spinner_1xozj_1",rotate:ir,"purpur-spinner--xxs":"_purpur-spinner--xxs_1xozj_4","purpur-spinner--xs":"_purpur-spinner--xs_1xozj_8","purpur-spinner--sm":"_purpur-spinner--sm_1xozj_12","purpur-spinner--md":"_purpur-spinner--md_1xozj_16","purpur-spinner--lg":"_purpur-spinner--lg_1xozj_20","purpur-spinner__circle":"_purpur-spinner__circle_1xozj_24",dash:cr,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_1xozj_33","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_1xozj_36"},V="purpur-spinner",ur={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg"},sr=({["data-testid"]:e,disabled:n=!1,negative:t=!1,size:o=ur.SM,...a})=>g.jsx("div",{className:Le([H[V],H[`${V}--${o}`]]),"data-testid":e,...a,children:g.jsx("svg",{viewBox:"0 0 50 50",children:g.jsx("circle",{className:Le(H[`${V}__circle`],{[H[`${V}__circle--disabled`]]:n,[H[`${V}__circle--negative`]]:t}),cx:"25",cy:"25",r:"20"})})});function lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var it={exports:{}};/*!
|
|
46
46
|
Copyright (c) 2018 Jed Watson.
|
|
47
47
|
Licensed under the MIT License (MIT), see
|
|
48
48
|
http://jedwatson.github.io/classnames
|
|
49
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",
|
|
49
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o.call(this,c)))}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 i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,this&&this[c]||c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(it);var dr=it.exports;const fr=lr(dr),pr={"purpur-button":"_purpur-button_1acxn_1","purpur-button--sm":"_purpur-button--sm_1acxn_33","purpur-button--icon-only":"_purpur-button--icon-only_1acxn_36","purpur-button--md":"_purpur-button--md_1acxn_39","purpur-button--lg":"_purpur-button--lg_1acxn_45","purpur-button--full-width":"_purpur-button--full-width_1acxn_51","purpur-button--primary":"_purpur-button--primary_1acxn_54","purpur-button--disabled":"_purpur-button--disabled_1acxn_58","purpur-button--primary-negative":"_purpur-button--primary-negative_1acxn_64","purpur-button--secondary":"_purpur-button--secondary_1acxn_76","purpur-button--secondary-negative":"_purpur-button--secondary-negative_1acxn_87","purpur-button--expressive":"_purpur-button--expressive_1acxn_98","purpur-button--expressive-negative":"_purpur-button--expressive-negative_1acxn_108","purpur-button--negative":"_purpur-button--negative_1acxn_120","purpur-button--destructive":"_purpur-button--destructive_1acxn_127","purpur-button--destructive-negative":"_purpur-button--destructive-negative_1acxn_137","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_1acxn_147","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_1acxn_160","purpur-button--text-negative":"_purpur-button--text-negative_1acxn_175","purpur-button--text":"_purpur-button--text_1acxn_175"},vr=fr.bind(pr),k="purpur-button",hr=({children:e,className:n,["data-testid"]:t,disabled:o=!1,fullWidth:a=!1,iconOnly:r,loading:i=!1,negative:c=!1,onClick:l,size:f="md",variant:p,type:d="button",...m},v)=>{if(r&&p==="destructive")return null;const E=vr([k,`${k}--${c?`${p}-negative`:p}`,`${k}--${f}`],{[`${k}--icon-only`]:r,[`${k}--negative`]:c,[`${k}--full-width`]:a,[`${k}--disabled`]:o||i},n),s=b=>{o||i?b.preventDefault():l&&l(b)},h=!!m["aria-disabled"]||o||i;return g.jsxs("button",{className:E,"data-testid":t,type:d,ref:v,"aria-disabled":h,onClick:s,...m,children:[i&&g.jsx(sr,{size:f===rr.LG?"xs":"xxs",negative:c,disabled:h})," ",e]})},Ce=u.forwardRef(hr);Ce.displayName="Button";function mr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct={exports:{}};/*!
|
|
50
50
|
Copyright (c) 2018 Jed Watson.
|
|
51
51
|
Licensed under the MIT License (MIT), see
|
|
52
52
|
http://jedwatson.github.io/classnames
|
|
53
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",
|
|
53
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o(c)))}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 i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(ct);var gr=ct.exports;const _r=mr(gr),ne={"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"},br={TITLE100:"title-100",TITLE200:"title-200",TITLE300:"title-300",TITLE400:"title-400",TITLE500:"title-500",TITLE600:"title-600",TITLE700:"title-700",SUBSECTION100:"subsection-100"},re="purpur-heading",ut=({["data-testid"]:e,children:n,className:t="",enableHyphenation:o=!1,negative:a=!1,tag:r,variant:i=br.TITLE100,...c})=>{const l=r,f=_r([t,ne[re],ne[`${re}--${i}`],{[ne[`${re}--hyphens`]]:o,[ne[`${re}--negative`]]:a}]);return g.jsx(l,{...c,className:f,"data-testid":e,children:n})};ut.displayName="Heading";function $r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}};/*!
|
|
54
54
|
Copyright (c) 2018 Jed Watson.
|
|
55
55
|
Licensed under the MIT License (MIT), see
|
|
56
56
|
http://jedwatson.github.io/classnames
|
|
57
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",
|
|
57
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o.call(this,c)))}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 i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,this&&this[c]||c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(st);var yr=st.exports;const Er=$r(yr),xr={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},wr={name:"close",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',keywords:["close"],category:"utility"},lt=e=>g.jsx(Rr,{...e,svg:wr});lt.displayName="IconClose";const Cr=Er.bind(xr),ke="purpur-icon",Sr="md",Or=e=>e.filter(n=>Object.keys(n).length>=1).map(n=>`${n.name}="${n.value}"`).join(" "),Pr=({content:e="",title:n}={})=>{const t=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},n?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=n?`<title>${n}</title>`:"";return`<svg ${Or(t)}>${o}${e}</svg>`},Nr=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Rr=({["data-testid"]:e,svg:n,allyTitle:t,className:o,size:a=Sr,...r})=>{const i=Pr({content:Nr(n.svg),title:t}),c=Cr(o,ke,`${ke}--${a}`);return g.jsx("span",{"aria-label":t,className:c,"data-testid":e,dangerouslySetInnerHTML:{__html:i},...r})};function Ar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dt={exports:{}};/*!
|
|
58
58
|
Copyright (c) 2018 Jed Watson.
|
|
59
59
|
Licensed under the MIT License (MIT), see
|
|
60
60
|
http://jedwatson.github.io/classnames
|
|
61
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",
|
|
61
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o(c)))}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 i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(dt);var Tr=dt.exports;const Dr=Ar(Tr),K={"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"},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"},G="purpur-paragraph",ft=({["data-testid"]:e,children:n,className:t,disabled:o,enableHyphenation:a=!1,negative:r=!1,variant:i=jr.PARAGRAPH100,...c})=>{const l=Dr([t,K[G],K[`${G}--${i}`],{[K[`${G}--hyphens`]]:a,[K[`${G}--disabled`]]:o,[K[`${G}--negative`]]:r}]);return g.jsx("p",{...c,className:l,"data-testid":e,children:n})};ft.displayName="Paragraph";function q(){return q=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},q.apply(this,arguments)}function Mr(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function Ir(...e){return n=>e.forEach(t=>Mr(t,n))}const pt=u.forwardRef((e,n)=>{const{children:t,...o}=e,a=u.Children.toArray(t),r=a.find(kr);if(r){const i=r.props.children,c=a.map(l=>l===r?u.Children.count(i)>1?u.Children.only(null):u.isValidElement(i)?i.props.children:null:l);return u.createElement(ye,q({},o,{ref:n}),u.isValidElement(i)?u.cloneElement(i,void 0,c):null)}return u.createElement(ye,q({},o,{ref:n}),t)});pt.displayName="Slot";const ye=u.forwardRef((e,n)=>{const{children:t,...o}=e;return u.isValidElement(t)?u.cloneElement(t,{...Fr(o,t.props),ref:n?Ir(n,t.ref):t.ref}):u.Children.count(t)>1?u.Children.only(null):null});ye.displayName="SlotClone";const Lr=({children:e})=>u.createElement(u.Fragment,null,e);function kr(e){return u.isValidElement(e)&&e.type===Lr}function Fr(e,n){const t={...n};for(const o in n){const a=e[o],r=n[o];/^on[A-Z]/.test(o)?a&&r?t[o]=(...i)=>{r(...i),a(...i)}:a&&(t[o]=a):o==="style"?t[o]={...a,...r}:o==="className"&&(t[o]=[a,r].filter(Boolean).join(" "))}return{...e,...t}}const Br=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ur=Br.reduce((e,n)=>{const t=u.forwardRef((o,a)=>{const{asChild:r,...i}=o,c=r?pt:n;return u.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),u.createElement(c,q({},i,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{}),Wr=u.forwardRef((e,n)=>u.createElement(Ur.span,q({},e,{ref:n,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),qr=Wr,zr=({asChild:e,children:n,className:t="",["data-testid"]:o})=>g.jsx(qr,{asChild:e,"data-testid":o,className:t,children:n});function Hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vt={exports:{}};/*!
|
|
62
62
|
Copyright (c) 2018 Jed Watson.
|
|
63
63
|
Licensed under the MIT License (MIT), see
|
|
64
64
|
http://jedwatson.github.io/classnames
|
|
65
|
-
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",
|
|
65
|
+
*/(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(r=a(r,o.call(this,c)))}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 i="";for(var c in r)n.call(r,c)&&r[c]&&(i=a(i,this&&this[c]||c));return i}function a(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(vt);var Vr=vt.exports;const Kr=Hr(Vr),Gr="_fadeIn_1ifm3_1",Xr={"purpur-modal-content":"_purpur-modal-content_1ifm3_1",fadeIn:Gr,"purpur-modal-content__overlay":"_purpur-modal-content__overlay_1ifm3_30","purpur-modal-content__close-button":"_purpur-modal-content__close-button_1ifm3_37","purpur-modal-content__wrapper":"_purpur-modal-content__wrapper_1ifm3_48","purpur-modal-content__wrapper-inner":"_purpur-modal-content__wrapper-inner_1ifm3_58","purpur-modal-content__image-wrapper":"_purpur-modal-content__image-wrapper_1ifm3_62","purpur-modal-content__header":"_purpur-modal-content__header_1ifm3_85","purpur-modal-content__title":"_purpur-modal-content__title_1ifm3_98","purpur-modal-content__description":"_purpur-modal-content__description_1ifm3_101","purpur-modal-content__body":"_purpur-modal-content__body_1ifm3_104","purpur-modal-content__body-inner":"_purpur-modal-content__body-inner_1ifm3_112","purpur-modal-content__actions-buttons":"_purpur-modal-content__actions-buttons_1ifm3_124","purpur-modal-content__actions-button":"_purpur-modal-content__actions-button_1ifm3_124","purpur-modal-content__notification":"_purpur-modal-content__notification_1ifm3_147","purpur-modal-content--with-image":"_purpur-modal-content--with-image_1ifm3_150","purpur-modal-content--overflow":"_purpur-modal-content--overflow_1ifm3_150","purpur-modal-content__actions":"_purpur-modal-content__actions_1ifm3_124","purpur-modal-content__actions-separator":"_purpur-modal-content__actions-separator_1ifm3_181","purpur-modal-content--sticky-footer":"_purpur-modal-content--sticky-footer_1ifm3_191"},Fe=e=>e.showCloseButton===!0,P=Kr.bind(Xr),S="purpur-modal-content",Yr=u.forwardRef(({["data-testid"]:e,actions:n,children:t,className:o,description:a,disableCloseOnClickOutside:r,hideDescription:i,image:c,primaryActionVariant:l="primary",stickyButtons:f=!0,title:p,notification:d=void 0,zIndex:m,...v},E)=>{const{closeButtonAllyLabel:s,showCloseButton:h,...b}=v,[C,y]=u.useState(!1),$=u.useRef(null),w=u.useRef(null),L=P([S,{[`${S}--with-image`]:!!c},{[`${S}--overflow`]:C},{[`${S}--sticky-footer`]:f},o]),N=A=>e?`${e} ${A}`:void 0,x=A=>{r&&A.preventDefault()},R=u.useCallback(()=>{if(!$.current||!w.current)return;const A=window.getComputedStyle($.current,null),ht=parseFloat(A.getPropertyValue("height")),mt=w.current.offsetHeight;y(ht<mt)},[]),Y=A=>{r&&!h&&A.preventDefault()};return u.useEffect(()=>(window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}),[R]),u.useEffect(()=>{R()},[d,R]),g.jsxs(Qn,{children:[g.jsx(Jn,{className:P(`${S}__overlay`),style:{zIndex:m}}),g.jsxs(er,{...b,className:L,"data-testid":e,ref:E,...!a&&{"aria-describedby":void 0},onPointerDownOutside:x,onOpenAutoFocus:R,onEscapeKeyDown:Y,style:{zIndex:`calc(${m} + 1)`},children:[g.jsxs("div",{ref:$,className:P(`${S}__wrapper`),children:[Fe(v)&&s&&c&&g.jsx(Be,{allyLabel:s,hasImage:!0,"data-testid":N("close-button")}),g.jsxs("div",{ref:w,className:P(`${S}__wrapper-inner`),children:[g.jsxs("div",{className:P(`${S}__header`),children:[Fe(v)&&s&&!c&&g.jsx(Be,{allyLabel:s,"data-testid":N("close-button")}),g.jsx(tr,{asChild:!0,className:P(`${S}__title`),"data-testid":N("title"),children:g.jsx(ut,{tag:"h2",variant:"title-200",children:p})})]}),c&&g.jsx("div",{className:P(`${S}__image-wrapper`),"data-testid":N("image"),children:c}),g.jsx("div",{className:P(`${S}__body`),children:g.jsxs("div",{className:P(`${S}__body-inner`),children:[a&&i&&g.jsx(zr,{asChild:!0,children:g.jsx(Ie,{"data-testid":N("description"),children:a})}),a&&!i&&g.jsx(Ie,{asChild:!0,className:P(`${S}__description`),"data-testid":N("description"),children:g.jsx(ft,{variant:"paragraph-100",children:a})}),g.jsx("div",{children:t}),!f&&g.jsx(Ue,{actions:n,primaryActionVariant:l,notification:d})]})})]})]}),f&&g.jsx(Ue,{actions:n,primaryActionVariant:l,notification:d})]})]})}),Be=({allyLabel:e,hasImage:n,["data-testid"]:t})=>g.jsx(nr,{asChild:!0,children:g.jsx(Ce,{variant:n?"primary":"tertiary-purple",negative:n,size:"sm",iconOnly:!0,"aria-label":e,className:P(`${S}__close-button`),"data-testid":t,children:g.jsx(lt,{})})}),Zr=3,Ue=({actions:e,primaryActionVariant:n,notification:t})=>{const o=u.useRef(null),a=[n,"secondary","text"];return u.useEffect(()=>{var r,i;t&&((i=(r=o==null?void 0:o.current)==null?void 0:r.scrollIntoView)==null||i.call(r,!1))},[t]),e&&e.length>0?g.jsxs("div",{className:P(`${S}__actions`),children:[g.jsx("div",{className:P(`${S}__actions-buttons`),"data-testid":"modal actions",children:e.slice(0,Zr).map(({label:r,onClick:i,disabled:c,loading:l},f)=>g.jsx(Ce,{"data-testid":"modal actions button",variant:a[f]||"",onClick:i,disabled:c,loading:l,className:P(`${S}__actions-button`),children:r},r))}),t&&g.jsx("div",{className:P(`${S}__notification`),ref:o,children:t}),g.jsx("span",{className:P(`${S}__actions-separator`)})]}):null},Qr=u.forwardRef(({["data-testid"]:e,children:n,className:t,...o},a)=>g.jsx(Zn,{asChild:!0,ref:a,"data-testid":e,className:t,...o,children:n})),ue=({["data-testid"]:e,children:n,open:t,onOpenChange:o})=>g.jsx(Yn,{open:t,onOpenChange:o,"data-testid":e,children:n});ue.Trigger=Qr;ue.Content=Yr;ue.displayName="Modal";exports.Modal=ue;
|
|
66
66
|
//# sourceMappingURL=modal.cjs.js.map
|