vxui-react 0.1.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/LICENSE +201 -0
- package/README.md +198 -0
- package/dist/components/Accordion.d.ts +14 -0
- package/dist/components/Alert.d.ts +10 -0
- package/dist/components/AppShell.d.ts +37 -0
- package/dist/components/Avatar.d.ts +12 -0
- package/dist/components/Badge.d.ts +7 -0
- package/dist/components/Breadcrumb.d.ts +12 -0
- package/dist/components/Button.d.ts +10 -0
- package/dist/components/Card.d.ts +6 -0
- package/dist/components/Checkbox.d.ts +7 -0
- package/dist/components/CodeBlock.d.ts +9 -0
- package/dist/components/CommandPalette.d.ts +22 -0
- package/dist/components/Dialog.d.ts +11 -0
- package/dist/components/DropdownMenu.d.ts +23 -0
- package/dist/components/Heading.d.ts +13 -0
- package/dist/components/Input.d.ts +9 -0
- package/dist/components/LanguageSwitcher.d.ts +9 -0
- package/dist/components/Pagination.d.ts +9 -0
- package/dist/components/Popover.d.ts +13 -0
- package/dist/components/Progress.d.ts +11 -0
- package/dist/components/Radio.d.ts +12 -0
- package/dist/components/Select.d.ts +7 -0
- package/dist/components/Separator.d.ts +6 -0
- package/dist/components/Skeleton.d.ts +8 -0
- package/dist/components/Slider.d.ts +7 -0
- package/dist/components/Spinner.d.ts +8 -0
- package/dist/components/Switch.d.ts +7 -0
- package/dist/components/Table.d.ts +26 -0
- package/dist/components/Tabs.d.ts +5 -0
- package/dist/components/Text.d.ts +14 -0
- package/dist/components/Textarea.d.ts +7 -0
- package/dist/components/ThemeProvider.d.ts +46 -0
- package/dist/components/Toast.d.ts +15 -0
- package/dist/components/Tooltip.d.ts +11 -0
- package/dist/components/mobile/ActionSheet.d.ts +15 -0
- package/dist/components/mobile/BottomNav.d.ts +15 -0
- package/dist/components/mobile/MobileApp.d.ts +1 -0
- package/dist/components/mobile/MobileDrawer.d.ts +27 -0
- package/dist/components/mobile/MobileList.d.ts +24 -0
- package/dist/components/mobile/MobilePreviewPage.d.ts +5 -0
- package/dist/components/mobile/MobileShell.d.ts +24 -0
- package/dist/components/pages/ErrorPage.d.ts +9 -0
- package/dist/components/pages/HomePage.d.ts +10 -0
- package/dist/components/pages/LoginPage.d.ts +12 -0
- package/dist/components/pages/PrivacyPolicyPage.d.ts +5 -0
- package/dist/components/pages/RegisterPage.d.ts +14 -0
- package/dist/components/pages/TermsOfServicePage.d.ts +5 -0
- package/dist/index.cjs +85 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3818 -0
- package/dist/lib/cx.d.ts +1 -0
- package/dist/lib/index.d.ts +61 -0
- package/dist/vxui-react.css +1 -0
- package/package.json +69 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),_=require("react"),bt=require("react-dom");function gt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=gt(_),yt=gt(bt);/**
|
|
2
|
+
* @license lucide-react v0.511.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Bn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),et=e=>{const t=Wn(e);return t.charAt(0).toUpperCase()+t.slice(1)},_t=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Un=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
7
|
+
* @license lucide-react v0.511.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var Kn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
|
+
* @license lucide-react v0.511.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Vn=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:a,iconNode:c,...i},d)=>_.createElement("svg",{ref:d,...Kn,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:_t("lucide",s),...!a&&!Un(i)&&{"aria-hidden":"true"},...i},[...c.map(([u,v])=>_.createElement(u,v)),...Array.isArray(a)?a:[a]]));/**
|
|
17
|
+
* @license lucide-react v0.511.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const ye=(e,t)=>{const n=_.forwardRef(({className:r,...s},a)=>_.createElement(Vn,{ref:a,iconNode:t,className:_t(`lucide-${Bn(et(e))}`,`lucide-${e}`,r),...s}));return n.displayName=et(e),n};/**
|
|
22
|
+
* @license lucide-react v0.511.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const Hn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zn=ye("chevron-right",Hn);/**
|
|
27
|
+
* @license lucide-react v0.511.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const Gn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],tt=ye("panel-left-close",Gn);/**
|
|
32
|
+
* @license lucide-react v0.511.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const Yn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],nt=ye("panel-left-open",Yn);/**
|
|
37
|
+
* @license lucide-react v0.511.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const Xn=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],wt=ye("x",Xn);function N(...e){return e.filter(Boolean).join(" ")}const Le=_.forwardRef(function({className:t,variant:n="solid",size:r="md",fullWidth:s=!1,type:a="button",...c},i){return o.jsx("button",{ref:i,type:a,className:N("vx-button",`vx-button--${n}`,`vx-button--${r}`,s&&"vx-button--full-width",t),...c})});function qn({brand:e="VXUI",brandCaption:t,brandIcon:n,breadcrumb:r,title:s,description:a,navItems:c,navSections:i,sidebarCollapsed:d=!1,mobileNavOpen:u=!1,onSidebarToggle:v,onMobileNavToggle:x,menuButtonLabel:h="Open navigation",sidebarCollapseLabel:g="Collapse",sidebarExpandLabel:E="Expand",sidebarCloseLabel:f="Close sidebar",headerActions:m,sidebarFooter:p,children:w}){const b=i??(c?[{items:c}]:[]),y=_.useRef(null),T=_.useRef(null),j=_.useRef(null),C=_.useRef(null);return _.useEffect(()=>{const D=[{host:y.current,scroll:T.current},{host:j.current,scroll:C.current}].flatMap(({host:R,scroll:I})=>{if(!R||!I)return[];let L;const B=()=>{const K=I.scrollHeight>I.clientHeight+1;if(R.dataset.scrollable=K?"true":"false",!K){R.dataset.scrollbarState="hidden",R.style.setProperty("--vx-scrollbar-thumb-height","0px"),R.style.setProperty("--vx-scrollbar-thumb-offset","0px");return}const V=Math.max(R.clientHeight-16,0),z=Math.max(I.clientHeight/I.scrollHeight*V,36),ie=I.scrollHeight-I.clientHeight,Ce=Math.max(V-z,0),ne=ie>0?I.scrollTop/ie*Ce:0;R.style.setProperty("--vx-scrollbar-thumb-height",`${z}px`),R.style.setProperty("--vx-scrollbar-thumb-offset",`${ne}px`),R.dataset.scrollbarState!=="active"&&(R.dataset.scrollbarState="hidden")},k=()=>{R.dataset.scrollable==="true"&&(R.dataset.scrollbarState="active",L!==void 0&&window.clearTimeout(L),L=window.setTimeout(()=>{R.dataset.scrollbarState="hidden"},640))},O=()=>{B(),k()};B(),I.addEventListener("scroll",O,{passive:!0});const A=new ResizeObserver(()=>{B()});return A.observe(R),A.observe(I),[()=>{I.removeEventListener("scroll",O),A.disconnect(),L!==void 0&&window.clearTimeout(L)}]});return()=>{D.forEach(R=>R())}},[]),o.jsxs("div",{className:"vx-shell","data-collapsed":d,"data-nav-open":u,children:[o.jsxs("aside",{ref:y,className:"vx-sidebar vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[o.jsxs("div",{ref:T,className:"vx-sidebar__scroll vx-scroll-area",children:[o.jsx("div",{className:"vx-sidebar__header",children:o.jsxs("div",{className:"vx-sidebar__brand",children:[n?o.jsx("span",{className:"vx-sidebar__brand-icon",children:n}):null,o.jsxs("div",{className:"vx-sidebar__brand-copy",children:[o.jsx("span",{className:"vx-sidebar__brand-text",children:e}),t?o.jsx("span",{className:"vx-sidebar__brand-caption",children:t}):null]})]})}),o.jsx("nav",{className:"vx-sidebar__nav","aria-label":"Primary navigation",children:b.map((S,D)=>o.jsxs("div",{className:"vx-nav-section-block",children:[S.title?o.jsx("div",{className:"vx-nav-section-block__title",children:S.title}):null,o.jsx("div",{className:"vx-nav-section-block__items",children:S.items.map(R=>o.jsxs("button",{type:"button",className:N("vx-nav-item",R.active&&"vx-nav-item--active"),onClick:R.onSelect,children:[R.icon?o.jsx("span",{className:"vx-nav-item__icon",children:R.icon}):null,o.jsx("span",{className:"vx-nav-item__label",children:R.label}),R.badge?o.jsx("span",{className:"vx-nav-item__badge",children:R.badge}):null,R.trailing?o.jsx("span",{className:"vx-nav-item__trailing",children:R.trailing}):null]},R.key))})]},S.key??S.title??D))}),o.jsxs("div",{className:"vx-sidebar__footer",children:[p?o.jsx("div",{className:"vx-sidebar__footer-content",children:p}):null,v?o.jsxs(Le,{variant:"ghost",size:"sm",className:"vx-sidebar__toggle",onClick:v,"aria-label":d?E:g,children:[d?o.jsx(nt,{size:16}):o.jsx(tt,{size:16}),o.jsx("span",{className:"vx-sidebar__toggle-label",children:d?E:g})]}):null]})]}),o.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:o.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]}),x?o.jsx("button",{type:"button",className:"vx-shell__overlay","aria-label":f,onClick:x}):null,o.jsxs("div",{className:"vx-shell__main",children:[o.jsxs("header",{className:"vx-topbar",children:[x?o.jsx(Le,{variant:"ghost",size:"sm",className:"vx-topbar__menu","aria-label":h,onClick:x,children:u?o.jsx(tt,{size:16}):o.jsx(nt,{size:16})}):null,o.jsx("div",{className:"vx-topbar__title-group",children:r||o.jsxs("div",{children:[s?o.jsx("h1",{className:"vx-topbar__title",children:s}):null,a?o.jsx("p",{className:"vx-topbar__description",children:a}):null]})}),m?o.jsx("div",{className:"vx-topbar__actions",children:m}):null]}),o.jsxs("div",{ref:j,className:"vx-shell__content-wrap vx-scroll-host","data-scrollable":"false","data-scrollbar-state":"hidden",children:[o.jsx("main",{ref:C,className:"vx-shell__content vx-scroll-area",children:w}),o.jsx("span",{className:"vx-overlay-scrollbar","aria-hidden":"true",children:o.jsx("span",{className:"vx-overlay-scrollbar__thumb"})})]})]})]})}function Zn({className:e,variant:t="neutral",...n}){return o.jsx("span",{className:N("vx-badge",`vx-badge--${t}`,e),...n})}function Qn({className:e,...t}){return o.jsx("section",{className:N("vx-card",e),...t})}function Jn({className:e,...t}){return o.jsx("header",{className:N("vx-card__header",e),...t})}function er({className:e,...t}){return o.jsx("h2",{className:N("vx-card__title",e),...t})}function tr({className:e,...t}){return o.jsx("p",{className:N("vx-card__description",e),...t})}function nr({className:e,...t}){return o.jsx("div",{className:N("vx-card__content",e),...t})}function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function rt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Et(...e){return t=>{let n=!1;const r=e.map(s=>{const a=rt(s,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let s=0;s<r.length;s++){const a=r[s];typeof a=="function"?a():rt(e[s],null)}}}}function F(...e){return l.useCallback(Et(...e),e)}function rr(e,t){const n=l.createContext(t),r=a=>{const{children:c,...i}=a,d=l.useMemo(()=>i,Object.values(i));return o.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function s(a){const c=l.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,s]}function ee(e,t=[]){let n=[];function r(a,c){const i=l.createContext(c),d=n.length;n=[...n,c];const u=x=>{var p;const{scope:h,children:g,...E}=x,f=((p=h==null?void 0:h[e])==null?void 0:p[d])||i,m=l.useMemo(()=>E,Object.values(E));return o.jsx(f.Provider,{value:m,children:g})};u.displayName=a+"Provider";function v(x,h){var f;const g=((f=h==null?void 0:h[e])==null?void 0:f[d])||i,E=l.useContext(g);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${a}\``)}return[u,v]}const s=()=>{const a=n.map(c=>l.createContext(c));return function(i){const d=(i==null?void 0:i[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return s.scopeName=e,[r,or(s,...t)]}function or(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const c=r.reduce((i,{useScope:d,scopeName:u})=>{const x=d(a)[`__scope${u}`];return{...i,...x}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var Y=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},sr=l[" useId ".trim().toString()]||(()=>{}),ar=0;function re(e){const[t,n]=l.useState(sr());return Y(()=>{n(r=>r??String(ar++))},[e]),e||(t?`radix-${t}`:"")}var ir=l[" useInsertionEffect ".trim().toString()]||Y;function oe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,a,c]=cr({defaultProp:t,onChange:n}),i=e!==void 0,d=i?e:s;{const v=l.useRef(e!==void 0);l.useEffect(()=>{const x=v.current;x!==i&&console.warn(`${r} is changing from ${x?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=i},[i,r])}const u=l.useCallback(v=>{var x;if(i){const h=lr(v)?v(e):v;h!==e&&((x=c.current)==null||x.call(c,h))}else a(v)},[i,e,a,c]);return[d,u]}function cr({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),s=l.useRef(n),a=l.useRef(t);return ir(()=>{a.current=t},[t]),l.useEffect(()=>{var c;s.current!==n&&((c=a.current)==null||c.call(a,n),s.current=n)},[n,s]),[n,r,a]}function lr(e){return typeof e=="function"}function be(e){const t=ur(e),n=l.forwardRef((r,s)=>{const{children:a,...c}=r,i=l.Children.toArray(a),d=i.find(fr);if(d){const u=d.props.children,v=i.map(x=>x===d?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:x);return o.jsx(t,{...c,ref:s,children:l.isValidElement(u)?l.cloneElement(u,void 0,v):null})}return o.jsx(t,{...c,ref:s,children:a})});return n.displayName=`${e}.Slot`,n}function ur(e){const t=l.forwardRef((n,r)=>{const{children:s,...a}=n;if(l.isValidElement(s)){const c=mr(s),i=vr(a,s.props);return s.type!==l.Fragment&&(i.ref=r?Et(r,c):c),l.cloneElement(s,i)}return l.Children.count(s)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dr=Symbol("radix.slottable");function fr(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dr}function vr(e,t){const n={...t};for(const r in t){const s=e[r],a=t[r];/^on[A-Z]/.test(r)?s&&a?n[r]=(...i)=>{const d=a(...i);return s(...i),d}:s&&(n[r]=s):r==="style"?n[r]={...s,...a}:r==="className"&&(n[r]=[s,a].filter(Boolean).join(" "))}return{...e,...n}}function mr(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],M=xr.reduce((e,t)=>{const n=be(`Primitive.${t}`),r=l.forwardRef((s,a)=>{const{asChild:c,...i}=s,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(d,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nt(e,t){e&&yt.flushSync(()=>e.dispatchEvent(t))}function U(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function hr(e,t=globalThis==null?void 0:globalThis.document){const n=U(e);l.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var pr="DismissableLayer",Oe="dismissableLayer.update",br="dismissableLayer.pointerDownOutside",gr="dismissableLayer.focusOutside",ot,jt=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ke=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:c,onDismiss:i,...d}=e,u=l.useContext(jt),[v,x]=l.useState(null),h=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=l.useState({}),E=F(t,C=>x(C)),f=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=f.indexOf(m),w=v?f.indexOf(v):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,y=w>=p,T=_r(C=>{const S=C.target,D=[...u.branches].some(R=>R.contains(S));!y||D||(s==null||s(C),c==null||c(C),C.defaultPrevented||i==null||i())},h),j=wr(C=>{const S=C.target;[...u.branches].some(R=>R.contains(S))||(a==null||a(C),c==null||c(C),C.defaultPrevented||i==null||i())},h);return hr(C=>{w===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&i&&(C.preventDefault(),i()))},h),l.useEffect(()=>{if(v)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ot=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(v)),u.layers.add(v),st(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ot)}},[v,h,n,u]),l.useEffect(()=>()=>{v&&(u.layers.delete(v),u.layersWithOutsidePointerEventsDisabled.delete(v),st())},[v,u]),l.useEffect(()=>{const C=()=>g({});return document.addEventListener(Oe,C),()=>document.removeEventListener(Oe,C)},[]),o.jsx(M.div,{...d,ref:E,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:P(e.onFocusCapture,j.onFocusCapture),onBlurCapture:P(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:P(e.onPointerDownCapture,T.onPointerDownCapture)})});Ke.displayName=pr;var yr="DismissableLayerBranch",Ct=l.forwardRef((e,t)=>{const n=l.useContext(jt),r=l.useRef(null),s=F(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),o.jsx(M.div,{...e,ref:s})});Ct.displayName=yr;function _r(e,t=globalThis==null?void 0:globalThis.document){const n=U(e),r=l.useRef(!1),s=l.useRef(()=>{});return l.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let d=function(){Tt(br,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=d,t.addEventListener("click",s.current,{once:!0})):d()}else t.removeEventListener("click",s.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function wr(e,t=globalThis==null?void 0:globalThis.document){const n=U(e),r=l.useRef(!1);return l.useEffect(()=>{const s=a=>{a.target&&!r.current&&Tt(gr,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function st(){const e=new CustomEvent(Oe);document.dispatchEvent(e)}function Tt(e,t,n,{discrete:r}){const s=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Nt(s,a):s.dispatchEvent(a)}var Er=Ke,Nr=Ct,Te="focusScope.autoFocusOnMount",Se="focusScope.autoFocusOnUnmount",at={bubbles:!1,cancelable:!0},jr="FocusScope",St=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...c}=e,[i,d]=l.useState(null),u=U(s),v=U(a),x=l.useRef(null),h=F(t,f=>d(f)),g=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let f=function(b){if(g.paused||!i)return;const y=b.target;i.contains(y)?x.current=y:H(x.current,{select:!0})},m=function(b){if(g.paused||!i)return;const y=b.relatedTarget;y!==null&&(i.contains(y)||H(x.current,{select:!0}))},p=function(b){if(document.activeElement===document.body)for(const T of b)T.removedNodes.length>0&&H(i)};document.addEventListener("focusin",f),document.addEventListener("focusout",m);const w=new MutationObserver(p);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",m),w.disconnect()}}},[r,i,g.paused]),l.useEffect(()=>{if(i){ct.add(g);const f=document.activeElement;if(!i.contains(f)){const p=new CustomEvent(Te,at);i.addEventListener(Te,u),i.dispatchEvent(p),p.defaultPrevented||(Cr(Pr(Rt(i)),{select:!0}),document.activeElement===f&&H(i))}return()=>{i.removeEventListener(Te,u),setTimeout(()=>{const p=new CustomEvent(Se,at);i.addEventListener(Se,v),i.dispatchEvent(p),p.defaultPrevented||H(f??document.body,{select:!0}),i.removeEventListener(Se,v),ct.remove(g)},0)}}},[i,u,v,g]);const E=l.useCallback(f=>{if(!n&&!r||g.paused)return;const m=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,p=document.activeElement;if(m&&p){const w=f.currentTarget,[b,y]=Tr(w);b&&y?!f.shiftKey&&p===y?(f.preventDefault(),n&&H(b,{select:!0})):f.shiftKey&&p===b&&(f.preventDefault(),n&&H(y,{select:!0})):p===w&&f.preventDefault()}},[n,r,g.paused]);return o.jsx(M.div,{tabIndex:-1,...c,ref:h,onKeyDown:E})});St.displayName=jr;function Cr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(H(r,{select:t}),document.activeElement!==n)return}function Tr(e){const t=Rt(e),n=it(t,e),r=it(t.reverse(),e);return[n,r]}function Rt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function it(e,t){for(const n of e)if(!Sr(n,{upTo:t}))return n}function Sr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Rr(e){return e instanceof HTMLInputElement&&"select"in e}function H(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Rr(e)&&t&&e.select()}}var ct=kr();function kr(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=lt(e,t),e.unshift(t)},remove(t){var n;e=lt(e,t),(n=e[0])==null||n.resume()}}}function lt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Pr(e){return e.filter(t=>t.tagName!=="A")}var Ir="Portal",Ve=l.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[s,a]=l.useState(!1);Y(()=>a(!0),[]);const c=n||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return c?bt.createPortal(o.jsx(M.div,{...r,ref:t}),c):null});Ve.displayName=Ir;function Mr(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var te=e=>{const{present:t,children:n}=e,r=Ar(t),s=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=F(r.ref,Dr(s));return typeof n=="function"||r.isPresent?l.cloneElement(s,{ref:a}):null};te.displayName="Presence";function Ar(e){const[t,n]=l.useState(),r=l.useRef(null),s=l.useRef(e),a=l.useRef("none"),c=e?"mounted":"unmounted",[i,d]=Mr(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=le(r.current);a.current=i==="mounted"?u:"none"},[i]),Y(()=>{const u=r.current,v=s.current;if(v!==e){const h=a.current,g=le(u);e?d("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?d("UNMOUNT"):d(v&&h!==g?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),Y(()=>{if(t){let u;const v=t.ownerDocument.defaultView??window,x=g=>{const f=le(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&f&&(d("ANIMATION_END"),!s.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",u=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=g=>{g.target===t&&(a.current=le(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{v.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function le(e){return(e==null?void 0:e.animationName)||"none"}function Dr(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Re=0;function Lr(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ut()),document.body.insertAdjacentElement("beforeend",e[1]??ut()),Re++,()=>{Re===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Re--}},[])}function ut(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var W=function(){return W=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},W.apply(this,arguments)};function kt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function Or(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,a;r<s;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var he="right-scroll-bar-position",pe="width-before-scroll-bar",Fr="with-scroll-bars-hidden",$r="--removed-body-scroll-bar-size";function ke(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Br(e,t){var n=_.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var Wr=typeof window<"u"?l.useLayoutEffect:l.useEffect,dt=new WeakMap;function Ur(e,t){var n=Br(null,function(r){return e.forEach(function(s){return ke(s,r)})});return Wr(function(){var r=dt.get(n);if(r){var s=new Set(r),a=new Set(e),c=n.current;s.forEach(function(i){a.has(i)||ke(i,null)}),a.forEach(function(i){s.has(i)||ke(i,c)})}dt.set(n,e)},[e]),n}function Kr(e){return e}function Vr(e,t){t===void 0&&(t=Kr);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,r);return n.push(c),function(){n=n.filter(function(i){return i!==c})}},assignSyncMedium:function(a){for(r=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var c=[];if(n.length){var i=n;n=[],i.forEach(a),c=n}var d=function(){var v=c;c=[],v.forEach(a)},u=function(){return Promise.resolve().then(d)};u(),n={push:function(v){c.push(v),u()},filter:function(v){return c=c.filter(v),n}}}};return s}function Hr(e){e===void 0&&(e={});var t=Vr(null);return t.options=W({async:!0,ssr:!1},e),t}var Pt=function(e){var t=e.sideCar,n=kt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,W({},n))};Pt.isSideCarExport=!0;function zr(e,t){return e.useMedium(t),Pt}var It=Hr(),Pe=function(){},_e=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Pe,onWheelCapture:Pe,onTouchMoveCapture:Pe}),s=r[0],a=r[1],c=e.forwardProps,i=e.children,d=e.className,u=e.removeScrollBar,v=e.enabled,x=e.shards,h=e.sideCar,g=e.noRelative,E=e.noIsolation,f=e.inert,m=e.allowPinchZoom,p=e.as,w=p===void 0?"div":p,b=e.gapMode,y=kt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,j=Ur([n,t]),C=W(W({},y),s);return l.createElement(l.Fragment,null,v&&l.createElement(T,{sideCar:It,removeScrollBar:u,shards:x,noRelative:g,noIsolation:E,inert:f,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:b}),c?l.cloneElement(l.Children.only(i),W(W({},C),{ref:j})):l.createElement(w,W({},C,{className:d,ref:j}),i))});_e.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_e.classNames={fullWidth:pe,zeroRight:he};var Gr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Yr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Gr();return t&&e.setAttribute("nonce",t),e}function Xr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Zr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Yr())&&(Xr(t,n),qr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qr=function(){var e=Zr();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mt=function(){var e=Qr(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},Jr={left:0,top:0,right:0,gap:0},Ie=function(e){return parseInt(e||"",10)||0},eo=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Ie(n),Ie(r),Ie(s)]},to=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jr;var t=eo(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},no=Mt(),J="data-scroll-locked",ro=function(e,t,n,r){var s=e.left,a=e.top,c=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
42
|
+
.`.concat(Fr,` {
|
|
43
|
+
overflow: hidden `).concat(r,`;
|
|
44
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
45
|
+
}
|
|
46
|
+
body[`).concat(J,`] {
|
|
47
|
+
overflow: hidden `).concat(r,`;
|
|
48
|
+
overscroll-behavior: contain;
|
|
49
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
50
|
+
padding-left: `.concat(s,`px;
|
|
51
|
+
padding-top: `).concat(a,`px;
|
|
52
|
+
padding-right: `).concat(c,`px;
|
|
53
|
+
margin-left:0;
|
|
54
|
+
margin-top:0;
|
|
55
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
56
|
+
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.`).concat(he,` {
|
|
60
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.`).concat(pe,` {
|
|
64
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.`).concat(he," .").concat(he,` {
|
|
68
|
+
right: 0 `).concat(r,`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.`).concat(pe," .").concat(pe,` {
|
|
72
|
+
margin-right: 0 `).concat(r,`;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
body[`).concat(J,`] {
|
|
76
|
+
`).concat($r,": ").concat(i,`px;
|
|
77
|
+
}
|
|
78
|
+
`)},ft=function(){var e=parseInt(document.body.getAttribute(J)||"0",10);return isFinite(e)?e:0},oo=function(){l.useEffect(function(){return document.body.setAttribute(J,(ft()+1).toString()),function(){var e=ft()-1;e<=0?document.body.removeAttribute(J):document.body.setAttribute(J,e.toString())}},[])},so=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;oo();var a=l.useMemo(function(){return to(s)},[s]);return l.createElement(no,{styles:ro(a,!t,s,n?"":"!important")})},Fe=!1;if(typeof window<"u")try{var ue=Object.defineProperty({},"passive",{get:function(){return Fe=!0,!0}});window.addEventListener("test",ue,ue),window.removeEventListener("test",ue,ue)}catch{Fe=!1}var q=Fe?{passive:!1}:!1,ao=function(e){return e.tagName==="TEXTAREA"},At=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ao(e)&&n[t]==="visible")},io=function(e){return At(e,"overflowY")},co=function(e){return At(e,"overflowX")},vt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Dt(e,r);if(s){var a=Lt(e,r),c=a[1],i=a[2];if(c>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lo=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},uo=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Dt=function(e,t){return e==="v"?io(t):co(t)},Lt=function(e,t){return e==="v"?lo(t):uo(t)},fo=function(e,t){return e==="h"&&t==="rtl"?-1:1},vo=function(e,t,n,r,s){var a=fo(e,window.getComputedStyle(t).direction),c=a*r,i=n.target,d=t.contains(i),u=!1,v=c>0,x=0,h=0;do{if(!i)break;var g=Lt(e,i),E=g[0],f=g[1],m=g[2],p=f-m-a*E;(E||p)&&Dt(e,i)&&(x+=p,h+=E);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!d&&i!==document.body||d&&(t.contains(i)||t===i));return(v&&Math.abs(x)<1||!v&&Math.abs(h)<1)&&(u=!0),u},de=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mt=function(e){return[e.deltaX,e.deltaY]},xt=function(e){return e&&"current"in e?e.current:e},mo=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xo=function(e){return`
|
|
79
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
80
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
81
|
+
`)},ho=0,Z=[];function po(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),s=l.useState(ho++)[0],a=l.useState(Mt)[0],c=l.useRef(e);l.useEffect(function(){c.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var f=Or([e.lockRef.current],(e.shards||[]).map(xt),!0).filter(Boolean);return f.forEach(function(m){return m.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),f.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(f,m){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!c.current.allowPinchZoom;var p=de(f),w=n.current,b="deltaX"in f?f.deltaX:w[0]-p[0],y="deltaY"in f?f.deltaY:w[1]-p[1],T,j=f.target,C=Math.abs(b)>Math.abs(y)?"h":"v";if("touches"in f&&C==="h"&&j.type==="range")return!1;var S=window.getSelection(),D=S&&S.anchorNode,R=D?D===j||D.contains(j):!1;if(R)return!1;var I=vt(C,j);if(!I)return!0;if(I?T=C:(T=C==="v"?"h":"v",I=vt(C,j)),!I)return!1;if(!r.current&&"changedTouches"in f&&(b||y)&&(r.current=T),!T)return!0;var L=r.current||T;return vo(L,m,f,L==="h"?b:y)},[]),d=l.useCallback(function(f){var m=f;if(!(!Z.length||Z[Z.length-1]!==a)){var p="deltaY"in m?mt(m):de(m),w=t.current.filter(function(T){return T.name===m.type&&(T.target===m.target||m.target===T.shadowParent)&&mo(T.delta,p)})[0];if(w&&w.should){m.cancelable&&m.preventDefault();return}if(!w){var b=(c.current.shards||[]).map(xt).filter(Boolean).filter(function(T){return T.contains(m.target)}),y=b.length>0?i(m,b[0]):!c.current.noIsolation;y&&m.cancelable&&m.preventDefault()}}},[]),u=l.useCallback(function(f,m,p,w){var b={name:f,delta:m,target:p,should:w,shadowParent:bo(p)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(y){return y!==b})},1)},[]),v=l.useCallback(function(f){n.current=de(f),r.current=void 0},[]),x=l.useCallback(function(f){u(f.type,mt(f),f.target,i(f,e.lockRef.current))},[]),h=l.useCallback(function(f){u(f.type,de(f),f.target,i(f,e.lockRef.current))},[]);l.useEffect(function(){return Z.push(a),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:h}),document.addEventListener("wheel",d,q),document.addEventListener("touchmove",d,q),document.addEventListener("touchstart",v,q),function(){Z=Z.filter(function(f){return f!==a}),document.removeEventListener("wheel",d,q),document.removeEventListener("touchmove",d,q),document.removeEventListener("touchstart",v,q)}},[]);var g=e.removeScrollBar,E=e.inert;return l.createElement(l.Fragment,null,E?l.createElement(a,{styles:xo(s)}):null,g?l.createElement(so,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const go=zr(It,po);var Ot=l.forwardRef(function(e,t){return l.createElement(_e,W({},e,{ref:t,sideCar:go}))});Ot.classNames=_e.classNames;var yo=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Q=new WeakMap,fe=new WeakMap,ve={},Me=0,Ft=function(e){return e&&(e.host||Ft(e.parentNode))},_o=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ft(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},wo=function(e,t,n,r){var s=_o(t,Array.isArray(e)?e:[e]);ve[n]||(ve[n]=new WeakMap);var a=ve[n],c=[],i=new Set,d=new Set(s),u=function(x){!x||i.has(x)||(i.add(x),u(x.parentNode))};s.forEach(u);var v=function(x){!x||d.has(x)||Array.prototype.forEach.call(x.children,function(h){if(i.has(h))v(h);else try{var g=h.getAttribute(r),E=g!==null&&g!=="false",f=(Q.get(h)||0)+1,m=(a.get(h)||0)+1;Q.set(h,f),a.set(h,m),c.push(h),f===1&&E&&fe.set(h,!0),m===1&&h.setAttribute(n,"true"),E||h.setAttribute(r,"true")}catch(p){console.error("aria-hidden: cannot operate on ",h,p)}})};return v(t),i.clear(),Me++,function(){c.forEach(function(x){var h=Q.get(x)-1,g=a.get(x)-1;Q.set(x,h),a.set(x,g),h||(fe.has(x)||x.removeAttribute(r),fe.delete(x)),g||x.removeAttribute(n)}),Me--,Me||(Q=new WeakMap,Q=new WeakMap,fe=new WeakMap,ve={})}},Eo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=yo(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),wo(r,s,n,"aria-hidden")):function(){return null}},we="Dialog",[$t]=ee(we),[No,$]=$t(we),Bt=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,i=l.useRef(null),d=l.useRef(null),[u,v]=oe({prop:r,defaultProp:s??!1,onChange:a,caller:we});return o.jsx(No,{scope:t,triggerRef:i,contentRef:d,contentId:re(),titleId:re(),descriptionId:re(),open:u,onOpenChange:v,onOpenToggle:l.useCallback(()=>v(x=>!x),[v]),modal:c,children:n})};Bt.displayName=we;var Wt="DialogTrigger",Ut=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=$(Wt,n),a=F(t,s.triggerRef);return o.jsx(M.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Ge(s.open),...r,ref:a,onClick:P(e.onClick,s.onOpenToggle)})});Ut.displayName=Wt;var He="DialogPortal",[jo,Kt]=$t(He,{forceMount:void 0}),Vt=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,a=$(He,t);return o.jsx(jo,{scope:t,forceMount:n,children:l.Children.map(r,c=>o.jsx(te,{present:n||a.open,children:o.jsx(Ve,{asChild:!0,container:s,children:c})}))})};Vt.displayName=He;var ge="DialogOverlay",Ht=l.forwardRef((e,t)=>{const n=Kt(ge,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,a=$(ge,e.__scopeDialog);return a.modal?o.jsx(te,{present:r||a.open,children:o.jsx(To,{...s,ref:t})}):null});Ht.displayName=ge;var Co=be("DialogOverlay.RemoveScroll"),To=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=$(ge,n);return o.jsx(Ot,{as:Co,allowPinchZoom:!0,shards:[s.contentRef],children:o.jsx(M.div,{"data-state":Ge(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),X="DialogContent",zt=l.forwardRef((e,t)=>{const n=Kt(X,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,a=$(X,e.__scopeDialog);return o.jsx(te,{present:r||a.open,children:a.modal?o.jsx(So,{...s,ref:t}):o.jsx(Ro,{...s,ref:t})})});zt.displayName=X;var So=l.forwardRef((e,t)=>{const n=$(X,e.__scopeDialog),r=l.useRef(null),s=F(t,n.contentRef,r);return l.useEffect(()=>{const a=r.current;if(a)return Eo(a)},[]),o.jsx(Gt,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:P(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,i=c.button===0&&c.ctrlKey===!0;(c.button===2||i)&&a.preventDefault()}),onFocusOutside:P(e.onFocusOutside,a=>a.preventDefault())})}),Ro=l.forwardRef((e,t)=>{const n=$(X,e.__scopeDialog),r=l.useRef(!1),s=l.useRef(!1);return o.jsx(Gt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),Gt=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,...c}=e,i=$(X,n),d=l.useRef(null),u=F(t,d);return Lr(),o.jsxs(o.Fragment,{children:[o.jsx(St,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:o.jsx(Ke,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Ge(i.open),...c,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(ko,{titleId:i.titleId}),o.jsx(Io,{contentRef:d,descriptionId:i.descriptionId})]})]})}),ze="DialogTitle",Yt=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=$(ze,n);return o.jsx(M.h2,{id:s.titleId,...r,ref:t})});Yt.displayName=ze;var Xt="DialogDescription",qt=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=$(Xt,n);return o.jsx(M.p,{id:s.descriptionId,...r,ref:t})});qt.displayName=Xt;var Zt="DialogClose",Qt=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=$(Zt,n);return o.jsx(M.button,{type:"button",...r,ref:t,onClick:P(e.onClick,()=>s.onOpenChange(!1))})});Qt.displayName=Zt;function Ge(e){return e?"open":"closed"}var Jt="DialogTitleWarning",[Wa,en]=rr(Jt,{contentName:X,titleName:ze,docsSlug:"dialog"}),ko=({titleId:e})=>{const t=en(Jt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
82
|
+
|
|
83
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
84
|
+
|
|
85
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Po="DialogDescriptionWarning",Io=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${en(Po).contentName}}.`;return l.useEffect(()=>{var a;const s=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Mo=Bt,Ao=Ut,Do=Vt,Lo=Ht,Oo=zt,Fo=Yt,$o=qt,Bo=Qt;function Wo({trigger:e,title:t,description:n,children:r,footer:s,className:a,...c}){return o.jsxs(Mo,{...c,children:[o.jsx(Ao,{asChild:!0,children:e}),o.jsxs(Do,{children:[o.jsx(Lo,{className:"vx-dialog__overlay"}),o.jsxs(Oo,{className:N("vx-dialog__content",a),children:[o.jsxs("div",{className:"vx-dialog__header",children:[o.jsxs("div",{children:[o.jsx(Fo,{className:"vx-dialog__title",children:t}),n?o.jsx($o,{className:"vx-dialog__description",children:n}):null]}),o.jsx(Bo,{className:"vx-dialog__close","aria-label":"Close dialog",children:o.jsx(wt,{size:16})})]}),o.jsx("div",{className:"vx-dialog__body",children:r}),s?o.jsx("div",{className:"vx-dialog__footer",children:s}):null]})]})]})}function Uo({className:e,label:t,hint:n,prefix:r,suffix:s,error:a,...c}){return o.jsxs("label",{className:"vx-field-group",children:[t?o.jsx("span",{className:"vx-field-group__label",children:t}):null,o.jsxs("span",{className:N("vx-input",a&&"vx-input--invalid",e),children:[r?o.jsx("span",{className:"vx-input__ornament",children:r}):null,o.jsx("input",{className:"vx-input__field","aria-invalid":a?"true":void 0,...c}),s?o.jsx("span",{className:"vx-input__ornament",children:s}):null]}),a?o.jsx("span",{className:"vx-field-group__error",children:a}):null,!a&&n?o.jsx("span",{className:"vx-field-group__hint",children:n}):null]})}function Ko(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Vo(e){const[t,n]=l.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let c,i;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;c=u.inlineSize,i=u.blockSize}else c=e.offsetWidth,i=e.offsetHeight;n({width:c,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ee="Switch",[Ho]=ee(Ee),[zo,Go]=Ho(Ee),tn=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:a,required:c,disabled:i,value:d="on",onCheckedChange:u,form:v,...x}=e,[h,g]=l.useState(null),E=F(t,b=>g(b)),f=l.useRef(!1),m=h?v||!!h.closest("form"):!0,[p,w]=oe({prop:s,defaultProp:a??!1,onChange:u,caller:Ee});return o.jsxs(zo,{scope:n,checked:p,disabled:i,children:[o.jsx(M.button,{type:"button",role:"switch","aria-checked":p,"aria-required":c,"data-state":sn(p),"data-disabled":i?"":void 0,disabled:i,value:d,...x,ref:E,onClick:P(e.onClick,b=>{w(y=>!y),m&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})}),m&&o.jsx(on,{control:h,bubbles:!f.current,name:r,value:d,checked:p,required:c,disabled:i,form:v,style:{transform:"translateX(-100%)"}})]})});tn.displayName=Ee;var nn="SwitchThumb",rn=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=Go(nn,n);return o.jsx(M.span,{"data-state":sn(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});rn.displayName=nn;var Yo="SwitchBubbleInput",on=l.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},a)=>{const c=l.useRef(null),i=F(c,a),d=Ko(n),u=Vo(t);return l.useEffect(()=>{const v=c.current;if(!v)return;const x=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(x,"checked").set;if(d!==n&&g){const E=new Event("click",{bubbles:r});g.call(v,n),v.dispatchEvent(E)}},[d,n,r]),o.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});on.displayName=Yo;function sn(e){return e?"checked":"unchecked"}var Xo=tn,qo=rn;function Zo({className:e,label:t,description:n,...r}){return o.jsxs("label",{className:"vx-switch",children:[o.jsxs("span",{className:"vx-switch__copy",children:[o.jsx("span",{className:"vx-switch__label",children:t}),n?o.jsx("span",{className:"vx-switch__description",children:n}):null]}),o.jsx(Xo,{className:N("vx-switch__control",e),...r,children:o.jsx(qo,{className:"vx-switch__thumb"})})]})}function an(e){const t=e+"CollectionProvider",[n,r]=ee(t),[s,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=f=>{const{scope:m,children:p}=f,w=_.useRef(null),b=_.useRef(new Map).current;return o.jsx(s,{scope:m,itemMap:b,collectionRef:w,children:p})};c.displayName=t;const i=e+"CollectionSlot",d=be(i),u=_.forwardRef((f,m)=>{const{scope:p,children:w}=f,b=a(i,p),y=F(m,b.collectionRef);return o.jsx(d,{ref:y,children:w})});u.displayName=i;const v=e+"CollectionItemSlot",x="data-radix-collection-item",h=be(v),g=_.forwardRef((f,m)=>{const{scope:p,children:w,...b}=f,y=_.useRef(null),T=F(m,y),j=a(v,p);return _.useEffect(()=>(j.itemMap.set(y,{ref:y,...b}),()=>void j.itemMap.delete(y))),o.jsx(h,{[x]:"",ref:T,children:w})});g.displayName=v;function E(f){const m=a(e+"CollectionConsumer",f);return _.useCallback(()=>{const w=m.collectionRef.current;if(!w)return[];const b=Array.from(w.querySelectorAll(`[${x}]`));return Array.from(m.itemMap.values()).sort((j,C)=>b.indexOf(j.ref.current)-b.indexOf(C.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:c,Slot:u,ItemSlot:g},E,r]}var Qo=l.createContext(void 0);function cn(e){const t=l.useContext(Qo);return e||t||"ltr"}var Ae="rovingFocusGroup.onEntryFocus",Jo={bubbles:!1,cancelable:!0},se="RovingFocusGroup",[$e,ln,es]=an(se),[ts,un]=ee(se,[es]),[ns,rs]=ts(se),dn=l.forwardRef((e,t)=>o.jsx($e.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx($e.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(os,{...e,ref:t})})}));dn.displayName=se;var os=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:v=!1,...x}=e,h=l.useRef(null),g=F(t,h),E=cn(a),[f,m]=oe({prop:c,defaultProp:i??null,onChange:d,caller:se}),[p,w]=l.useState(!1),b=U(u),y=ln(n),T=l.useRef(!1),[j,C]=l.useState(0);return l.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(Ae,b),()=>S.removeEventListener(Ae,b)},[b]),o.jsx(ns,{scope:n,orientation:r,dir:E,loop:s,currentTabStopId:f,onItemFocus:l.useCallback(S=>m(S),[m]),onItemShiftTab:l.useCallback(()=>w(!0),[]),onFocusableItemAdd:l.useCallback(()=>C(S=>S+1),[]),onFocusableItemRemove:l.useCallback(()=>C(S=>S-1),[]),children:o.jsx(M.div,{tabIndex:p||j===0?-1:0,"data-orientation":r,...x,ref:g,style:{outline:"none",...e.style},onMouseDown:P(e.onMouseDown,()=>{T.current=!0}),onFocus:P(e.onFocus,S=>{const D=!T.current;if(S.target===S.currentTarget&&D&&!p){const R=new CustomEvent(Ae,Jo);if(S.currentTarget.dispatchEvent(R),!R.defaultPrevented){const I=y().filter(A=>A.focusable),L=I.find(A=>A.active),B=I.find(A=>A.id===f),O=[L,B,...I].filter(Boolean).map(A=>A.ref.current);mn(O,v)}}T.current=!1}),onBlur:P(e.onBlur,()=>w(!1))})})}),fn="RovingFocusGroupItem",vn=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:a,children:c,...i}=e,d=re(),u=a||d,v=rs(fn,n),x=v.currentTabStopId===u,h=ln(n),{onFocusableItemAdd:g,onFocusableItemRemove:E,currentTabStopId:f}=v;return l.useEffect(()=>{if(r)return g(),()=>E()},[r,g,E]),o.jsx($e.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:o.jsx(M.span,{tabIndex:x?0:-1,"data-orientation":v.orientation,...i,ref:t,onMouseDown:P(e.onMouseDown,m=>{r?v.onItemFocus(u):m.preventDefault()}),onFocus:P(e.onFocus,()=>v.onItemFocus(u)),onKeyDown:P(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){v.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const p=is(m,v.orientation,v.dir);if(p!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let b=h().filter(y=>y.focusable).map(y=>y.ref.current);if(p==="last")b.reverse();else if(p==="prev"||p==="next"){p==="prev"&&b.reverse();const y=b.indexOf(m.currentTarget);b=v.loop?cs(b,y+1):b.slice(y+1)}setTimeout(()=>mn(b))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:f!=null}):c})})});vn.displayName=fn;var ss={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function as(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function is(e,t,n){const r=as(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ss[r]}function mn(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function cs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ls=dn,us=vn,Ne="Tabs",[ds]=ee(Ne,[un]),xn=un(),[fs,Ye]=ds(Ne),hn=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:a,orientation:c="horizontal",dir:i,activationMode:d="automatic",...u}=e,v=cn(i),[x,h]=oe({prop:r,onChange:s,defaultProp:a??"",caller:Ne});return o.jsx(fs,{scope:n,baseId:re(),value:x,onValueChange:h,orientation:c,dir:v,activationMode:d,children:o.jsx(M.div,{dir:v,"data-orientation":c,...u,ref:t})})});hn.displayName=Ne;var pn="TabsList",bn=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,a=Ye(pn,n),c=xn(n);return o.jsx(ls,{asChild:!0,...c,orientation:a.orientation,dir:a.dir,loop:r,children:o.jsx(M.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:t})})});bn.displayName=pn;var gn="TabsTrigger",yn=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...a}=e,c=Ye(gn,n),i=xn(n),d=En(c.baseId,r),u=Nn(c.baseId,r),v=r===c.value;return o.jsx(us,{asChild:!0,...i,focusable:!s,active:v,children:o.jsx(M.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":u,"data-state":v?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:d,...a,ref:t,onMouseDown:P(e.onMouseDown,x=>{!s&&x.button===0&&x.ctrlKey===!1?c.onValueChange(r):x.preventDefault()}),onKeyDown:P(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(r)}),onFocus:P(e.onFocus,()=>{const x=c.activationMode!=="manual";!v&&!s&&x&&c.onValueChange(r)})})})});yn.displayName=gn;var _n="TabsContent",wn=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:a,...c}=e,i=Ye(_n,n),d=En(i.baseId,r),u=Nn(i.baseId,r),v=r===i.value,x=l.useRef(v);return l.useEffect(()=>{const h=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(h)},[]),o.jsx(te,{present:s||v,children:({present:h})=>o.jsx(M.div,{"data-state":v?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":d,hidden:!h,id:u,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:h&&a})})});wn.displayName=_n;function En(e,t){return`${e}-trigger-${t}`}function Nn(e,t){return`${e}-content-${t}`}var vs=hn,ms=bn,xs=yn,hs=wn;const ps=vs,bs=_.forwardRef(function({className:t,...n},r){return o.jsx(ms,{ref:r,className:N("vx-tabs__list",t),...n})}),gs=_.forwardRef(function({className:t,...n},r){return o.jsx(xs,{ref:r,className:N("vx-tabs__trigger",t),...n})}),ys=_.forwardRef(function({className:t,...n},r){return o.jsx(hs,{ref:r,className:N("vx-tabs__content",t),...n})}),jn={light:{label:"Light",mode:"light"},dark:{label:"Dark",mode:"dark"}};function G(e,t={}){return{label:t.label,mode:e,tokens:t.tokens}}const _s={...jn,sunset:G("light",{label:"Sunset",tokens:{"--vx-primary":"#c2410c","--vx-primary-strong":"#9a3412","--vx-primary-soft":"rgba(194, 65, 12, 0.12)","--vx-secondary":"#9a3412","--vx-bg":"#fff7ed","--vx-bg-accent":"#ffedd5","--vx-surface-hover":"#fffaf5","--vx-border":"#fed7aa","--vx-border-strong":"#fdba74","--vx-text":"#431407","--vx-text-secondary":"#9a3412","--vx-text-muted":"#b45309","--vx-shadow-sm":"0 1px 2px rgba(124, 45, 18, 0.08)","--vx-shadow":"0 14px 32px rgba(124, 45, 18, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(124, 45, 18, 0.12)"}}),mint:G("light",{label:"Mint",tokens:{"--vx-primary":"#0f766e","--vx-primary-strong":"#115e59","--vx-primary-soft":"rgba(15, 118, 110, 0.12)","--vx-secondary":"#0f766e","--vx-bg":"#f0fdfa","--vx-bg-accent":"#ccfbf1","--vx-surface-hover":"#f6fffd","--vx-border":"#99f6e4","--vx-border-strong":"#5eead4","--vx-text":"#042f2e","--vx-text-secondary":"#115e59","--vx-text-muted":"#0f766e","--vx-shadow-sm":"0 1px 2px rgba(4, 47, 46, 0.08)","--vx-shadow":"0 14px 32px rgba(4, 47, 46, 0.08)","--vx-shadow-lg":"0 28px 64px rgba(4, 47, 46, 0.12)"}}),graphite:G("dark",{label:"Graphite",tokens:{"--vx-primary":"#f59e0b","--vx-primary-strong":"#d97706","--vx-primary-soft":"rgba(245, 158, 11, 0.16)","--vx-bg":"#111111","--vx-bg-accent":"#191919","--vx-surface":"#18181b","--vx-surface-strong":"#111111","--vx-surface-hover":"#222225","--vx-border":"rgba(244, 244, 245, 0.10)","--vx-border-strong":"rgba(244, 244, 245, 0.18)","--vx-text":"#fafafa","--vx-text-secondary":"#d4d4d8","--vx-text-muted":"#a1a1aa","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.34)","--vx-shadow":"0 20px 44px rgba(0, 0, 0, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(0, 0, 0, 0.38)"}}),"ivory-gold":G("light",{label:"Ivory Gold",tokens:{"--vx-primary":"#a0742a","--vx-primary-strong":"#7d5a1e","--vx-primary-soft":"rgba(160, 116, 42, 0.12)","--vx-bg":"#faf6ee","--vx-bg-accent":"#f2ead8","--vx-surface":"#ffffff","--vx-surface-strong":"#faf6ee","--vx-surface-hover":"#f6f0e4","--vx-border":"rgba(160, 116, 42, 0.18)","--vx-border-strong":"rgba(160, 116, 42, 0.38)","--vx-text":"#1c1409","--vx-text-secondary":"#5a4320","--vx-text-muted":"#9a7c4a","--vx-shadow-sm":"0 1px 2px rgba(90, 67, 32, 0.08)","--vx-shadow":"0 12px 32px rgba(90, 67, 32, 0.10)","--vx-shadow-lg":"0 28px 64px rgba(90, 67, 32, 0.14)","--vx-success":"#1a9e6e","--vx-warning":"#c4820a","--vx-danger":"#d63b3b"}}),"black-gold":G("dark",{label:"Black Gold",tokens:{"--vx-primary":"#c8a97c","--vx-primary-strong":"#9a7545","--vx-primary-soft":"rgba(200, 169, 124, 0.16)","--vx-bg":"#05070b","--vx-bg-accent":"#0a0d14","--vx-surface":"rgba(15, 18, 25, 0.76)","--vx-surface-strong":"rgba(18, 21, 29, 0.9)","--vx-surface-hover":"rgba(245, 233, 215, 0.1)","--vx-border":"rgba(245, 233, 215, 0.12)","--vx-border-strong":"rgba(200, 169, 124, 0.42)","--vx-text":"#f5e9d7","--vx-text-secondary":"#d7c8b2","--vx-text-muted":"#928a81","--vx-shadow-sm":"0 1px 2px rgba(0, 0, 0, 0.4)","--vx-shadow":"0 0 42px rgba(200, 169, 124, 0.16)","--vx-shadow-lg":"0 34px 120px rgba(0, 0, 0, 0.62)","--vx-success":"#32d49a","--vx-warning":"#e6ad64","--vx-danger":"#ef6a64"}}),ocean:G("dark",{label:"Ocean",tokens:{"--vx-primary":"#38bdf8","--vx-primary-strong":"#0ea5e9","--vx-primary-soft":"rgba(56, 189, 248, 0.16)","--vx-bg":"#06131f","--vx-bg-accent":"#0b1a2b","--vx-surface":"#0d2236","--vx-surface-strong":"#06131f","--vx-surface-hover":"#13314d","--vx-border":"rgba(125, 211, 252, 0.16)","--vx-border-strong":"rgba(56, 189, 248, 0.24)","--vx-text":"#e0f2fe","--vx-text-secondary":"#bae6fd","--vx-text-muted":"#7dd3fc","--vx-shadow-sm":"0 1px 2px rgba(2, 6, 23, 0.34)","--vx-shadow":"0 20px 44px rgba(2, 6, 23, 0.28)","--vx-shadow-lg":"0 30px 72px rgba(2, 6, 23, 0.4)"}})};function ws(e){return{...jn,...e}}function Es(e,t){if(e&&t[e])return e;if(t.light)return"light";const[n]=Object.keys(t);return n??"light"}function Ns(e,t){const n=window.localStorage.getItem(e);return n&&t[n]?n:null}function js(e,t,n){var s;if(((s=e[n])==null?void 0:s.mode)===t)return n;const r=Object.entries(e).find(([,a])=>a.mode===t);return r==null?void 0:r[0]}const Cn=_.createContext(null);function Cs({children:e,defaultTheme:t="light",storageKey:n="vxui-react-theme",themes:r}){const s=_.useMemo(()=>ws(r),[r]),a=_.useMemo(()=>Es(t,s),[t,s]),c=_.useRef([]),[i,d]=_.useState(()=>typeof window>"u"?a:Ns(n,s)??a),u=s[i]?i:a,v=s[u];_.useEffect(()=>{i!==u&&d(u)},[u,i]),_.useEffect(()=>{const h=document.documentElement;for(const E of c.current)h.style.removeProperty(E);h.dataset.theme=v.mode,h.dataset.themeName=u;const g=Object.entries(v.tokens??{}).filter(E=>typeof E[1]=="string"&&E[1].length>0);for(const[E,f]of g)h.style.setProperty(E,f);c.current=g.map(([E])=>E),window.localStorage.setItem(n,u)},[v,u,n]);const x=_.useMemo(()=>({theme:u,mode:v.mode,themes:s,setTheme:h=>{d(s[h]?h:a)},toggleTheme:()=>{d(h=>{const E=(s[h]??v).mode==="light"?"dark":"light";return js(s,E,E)??h})}}),[v,a,s,u]);return o.jsx(Cn.Provider,{value:x,children:e})}function Ts(){const e=_.useContext(Cn);if(!e)throw new Error("useTheme must be used within ThemeProvider.");return e}var Ss=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Rs="VisuallyHidden",Xe=l.forwardRef((e,t)=>o.jsx(M.span,{...e,ref:t,style:{...Ss,...e.style}}));Xe.displayName=Rs;var qe="ToastProvider",[Ze,ks,Ps]=an("Toast"),[Tn]=ee("Toast",[Ps]),[Is,je]=Tn(qe),Sn=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:a=50,children:c}=e,[i,d]=l.useState(null),[u,v]=l.useState(0),x=l.useRef(!1),h=l.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${qe}\`. Expected non-empty \`string\`.`),o.jsx(Ze.Provider,{scope:t,children:o.jsx(Is,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:a,toastCount:u,viewport:i,onViewportChange:d,onToastAdd:l.useCallback(()=>v(g=>g+1),[]),onToastRemove:l.useCallback(()=>v(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:x,isClosePausedRef:h,children:c})})};Sn.displayName=qe;var Rn="ToastViewport",Ms=["F8"],Be="toast.viewportPause",We="toast.viewportResume",kn=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=Ms,label:s="Notifications ({hotkey})",...a}=e,c=je(Rn,n),i=ks(n),d=l.useRef(null),u=l.useRef(null),v=l.useRef(null),x=l.useRef(null),h=F(t,x,c.onViewportChange),g=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=c.toastCount>0;l.useEffect(()=>{const m=p=>{var b;r.length!==0&&r.every(y=>p[y]||p.code===y)&&((b=x.current)==null||b.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[r]),l.useEffect(()=>{const m=d.current,p=x.current;if(E&&m&&p){const w=()=>{if(!c.isClosePausedRef.current){const j=new CustomEvent(Be);p.dispatchEvent(j),c.isClosePausedRef.current=!0}},b=()=>{if(c.isClosePausedRef.current){const j=new CustomEvent(We);p.dispatchEvent(j),c.isClosePausedRef.current=!1}},y=j=>{!m.contains(j.relatedTarget)&&b()},T=()=>{m.contains(document.activeElement)||b()};return m.addEventListener("focusin",w),m.addEventListener("focusout",y),m.addEventListener("pointermove",w),m.addEventListener("pointerleave",T),window.addEventListener("blur",w),window.addEventListener("focus",b),()=>{m.removeEventListener("focusin",w),m.removeEventListener("focusout",y),m.removeEventListener("pointermove",w),m.removeEventListener("pointerleave",T),window.removeEventListener("blur",w),window.removeEventListener("focus",b)}}},[E,c.isClosePausedRef]);const f=l.useCallback(({tabbingDirection:m})=>{const w=i().map(b=>{const y=b.ref.current,T=[y,...Gs(y)];return m==="forwards"?T:T.reverse()});return(m==="forwards"?w.reverse():w).flat()},[i]);return l.useEffect(()=>{const m=x.current;if(m){const p=w=>{var T,j,C;const b=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!b){const S=document.activeElement,D=w.shiftKey;if(w.target===m&&D){(T=u.current)==null||T.focus();return}const L=f({tabbingDirection:D?"backwards":"forwards"}),B=L.findIndex(k=>k===S);De(L.slice(B+1))?w.preventDefault():D?(j=u.current)==null||j.focus():(C=v.current)==null||C.focus()}};return m.addEventListener("keydown",p),()=>m.removeEventListener("keydown",p)}},[i,f]),o.jsxs(Nr,{ref:d,role:"region","aria-label":s.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:E?void 0:"none"},children:[E&&o.jsx(Ue,{ref:u,onFocusFromOutsideViewport:()=>{const m=f({tabbingDirection:"forwards"});De(m)}}),o.jsx(Ze.Slot,{scope:n,children:o.jsx(M.ol,{tabIndex:-1,...a,ref:h})}),E&&o.jsx(Ue,{ref:v,onFocusFromOutsideViewport:()=>{const m=f({tabbingDirection:"backwards"});De(m)}})]})});kn.displayName=Rn;var Pn="ToastFocusProxy",Ue=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,a=je(Pn,n);return o.jsx(Xe,{tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:c=>{var u;const i=c.relatedTarget;!((u=a.viewport)!=null&&u.contains(i))&&r()}})});Ue.displayName=Pn;var ae="Toast",As="toast.swipeStart",Ds="toast.swipeMove",Ls="toast.swipeCancel",Os="toast.swipeEnd",In=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:a,...c}=e,[i,d]=oe({prop:r,defaultProp:s??!0,onChange:a,caller:ae});return o.jsx(te,{present:n||i,children:o.jsx(Bs,{open:i,...c,ref:t,onClose:()=>d(!1),onPause:U(e.onPause),onResume:U(e.onResume),onSwipeStart:P(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:P(e.onSwipeMove,u=>{const{x:v,y:x}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${v}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${x}px`)}),onSwipeCancel:P(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:P(e.onSwipeEnd,u=>{const{x:v,y:x}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${v}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${x}px`),d(!1)})})})});In.displayName=ae;var[Fs,$s]=Tn(ae,{onClose(){}}),Bs=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:a,onClose:c,onEscapeKeyDown:i,onPause:d,onResume:u,onSwipeStart:v,onSwipeMove:x,onSwipeCancel:h,onSwipeEnd:g,...E}=e,f=je(ae,n),[m,p]=l.useState(null),w=F(t,k=>p(k)),b=l.useRef(null),y=l.useRef(null),T=s||f.duration,j=l.useRef(0),C=l.useRef(T),S=l.useRef(0),{onToastAdd:D,onToastRemove:R}=f,I=U(()=>{var O;(m==null?void 0:m.contains(document.activeElement))&&((O=f.viewport)==null||O.focus()),c()}),L=l.useCallback(k=>{!k||k===1/0||(window.clearTimeout(S.current),j.current=new Date().getTime(),S.current=window.setTimeout(I,k))},[I]);l.useEffect(()=>{const k=f.viewport;if(k){const O=()=>{L(C.current),u==null||u()},A=()=>{const K=new Date().getTime()-j.current;C.current=C.current-K,window.clearTimeout(S.current),d==null||d()};return k.addEventListener(Be,A),k.addEventListener(We,O),()=>{k.removeEventListener(Be,A),k.removeEventListener(We,O)}}},[f.viewport,T,d,u,L]),l.useEffect(()=>{a&&!f.isClosePausedRef.current&&L(T)},[a,T,f.isClosePausedRef,L]),l.useEffect(()=>(D(),()=>R()),[D,R]);const B=l.useMemo(()=>m?Fn(m):null,[m]);return f.viewport?o.jsxs(o.Fragment,{children:[B&&o.jsx(Ws,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:B}),o.jsx(Fs,{scope:n,onClose:I,children:yt.createPortal(o.jsx(Ze.ItemSlot,{scope:n,children:o.jsx(Er,{asChild:!0,onEscapeKeyDown:P(i,()=>{f.isFocusedToastEscapeKeyDownRef.current||I(),f.isFocusedToastEscapeKeyDownRef.current=!1}),children:o.jsx(M.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":f.swipeDirection,...E,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:P(e.onKeyDown,k=>{k.key==="Escape"&&(i==null||i(k.nativeEvent),k.nativeEvent.defaultPrevented||(f.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:P(e.onPointerDown,k=>{k.button===0&&(b.current={x:k.clientX,y:k.clientY})}),onPointerMove:P(e.onPointerMove,k=>{if(!b.current)return;const O=k.clientX-b.current.x,A=k.clientY-b.current.y,K=!!y.current,V=["left","right"].includes(f.swipeDirection),z=["left","up"].includes(f.swipeDirection)?Math.min:Math.max,ie=V?z(0,O):0,Ce=V?0:z(0,A),ne=k.pointerType==="touch"?10:2,ce={x:ie,y:Ce},Je={originalEvent:k,delta:ce};K?(y.current=ce,me(Ds,x,Je,{discrete:!1})):ht(ce,f.swipeDirection,ne)?(y.current=ce,me(As,v,Je,{discrete:!1}),k.target.setPointerCapture(k.pointerId)):(Math.abs(O)>ne||Math.abs(A)>ne)&&(b.current=null)}),onPointerUp:P(e.onPointerUp,k=>{const O=y.current,A=k.target;if(A.hasPointerCapture(k.pointerId)&&A.releasePointerCapture(k.pointerId),y.current=null,b.current=null,O){const K=k.currentTarget,V={originalEvent:k,delta:O};ht(O,f.swipeDirection,f.swipeThreshold)?me(Os,g,V,{discrete:!0}):me(Ls,h,V,{discrete:!0}),K.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),f.viewport)})]}):null}),Ws=e=>{const{__scopeToast:t,children:n,...r}=e,s=je(ae,t),[a,c]=l.useState(!1),[i,d]=l.useState(!1);return Hs(()=>c(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>d(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:o.jsx(Ve,{asChild:!0,children:o.jsx(Xe,{...r,children:a&&o.jsxs(o.Fragment,{children:[s.label," ",n]})})})},Us="ToastTitle",Mn=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return o.jsx(M.div,{...r,ref:t})});Mn.displayName=Us;var Ks="ToastDescription",An=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return o.jsx(M.div,{...r,ref:t})});An.displayName=Ks;var Dn="ToastAction",Vs=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?o.jsx(On,{altText:n,asChild:!0,children:o.jsx(Qe,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dn}\`. Expected non-empty \`string\`.`),null)});Vs.displayName=Dn;var Ln="ToastClose",Qe=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=$s(Ln,n);return o.jsx(On,{asChild:!0,children:o.jsx(M.button,{type:"button",...r,ref:t,onClick:P(e.onClick,s.onClose)})})});Qe.displayName=Ln;var On=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return o.jsx(M.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function Fn(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),zs(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!s)if(a){const c=r.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...Fn(r))}}),t}function me(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Nt(s,a):s.dispatchEvent(a)}var ht=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),a=r>s;return t==="left"||t==="right"?a&&r>n:!a&&s>n};function Hs(e=()=>{}){const t=U(e);Y(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function zs(e){return e.nodeType===e.ELEMENT_NODE}function Gs(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function De(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Ys=Sn,Xs=kn,qs=In,Zs=Mn,Qs=An,Js=Qe;const $n=_.createContext(null);let ea=1;function ta({children:e}){const[t,n]=_.useState([]),r=_.useMemo(()=>({push:s=>{n(a=>[...a,{id:ea+=1,tone:"info",...s}])}}),[]);return o.jsx($n.Provider,{value:r,children:o.jsxs(Ys,{swipeDirection:"right",children:[e,t.map(s=>o.jsxs(qs,{className:N("vx-toast",`vx-toast--${s.tone??"info"}`),duration:4500,open:!0,onOpenChange:a=>{a||n(c=>c.filter(i=>i.id!==s.id))},children:[o.jsxs("div",{className:"vx-toast__content",children:[o.jsx(Zs,{className:"vx-toast__title",children:s.title}),s.description?o.jsx(Qs,{className:"vx-toast__description",children:s.description}):null]}),o.jsx(Js,{className:"vx-toast__close","aria-label":"Dismiss notification",children:o.jsx(wt,{size:16})})]},s.id)),o.jsx(Xs,{className:"vx-toast__viewport"})]})})}function na(){const e=_.useContext($n);if(!e)throw new Error("useToast must be used within ToastProvider.");return e}function ra({as:e="p",variant:t="default",size:n="base",weight:r="normal",truncate:s=!1,className:a,...c}){return o.jsx(e,{className:N("vx-text-component",`vx-text--${t}`,`vx-text-size--${n}`,`vx-text-weight--${r}`,s&&"vx-text--truncate",a),...c})}function oa({as:e,level:t=2,variant:n="default",weight:r="bold",truncate:s=!1,className:a,...c}){const i=e||`h${t}`;return o.jsx(i,{className:N("vx-heading",`vx-heading--h${t}`,`vx-heading--${n}`,`vx-heading-weight--${r}`,s&&"vx-text--truncate",a),...c})}function sa({className:e,label:t,hint:n,placeholder:r,children:s,...a}){return o.jsxs("label",{className:"vx-field-group",children:[t?o.jsx("span",{className:"vx-field-group__label",children:t}):null,o.jsxs("span",{className:N("vx-select",e),children:[o.jsxs("select",{className:"vx-select__field",...a,children:[r?o.jsx("option",{value:"",disabled:!0,children:r}):null,s]}),o.jsx("span",{className:"vx-select__arrow","aria-hidden":"true",children:o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:o.jsx("path",{d:"M2.5 4.5L6 8L9.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),n?o.jsx("span",{className:"vx-field-group__hint",children:n}):null]})}function aa({className:e,label:t,description:n,indeterminate:r,...s}){return o.jsxs("label",{className:N("vx-checkbox",s.disabled&&"vx-checkbox--disabled"),children:[o.jsxs("span",{className:"vx-checkbox__control-wrap",children:[o.jsx("input",{type:"checkbox",className:N("vx-checkbox__input",e),ref:a=>{a&&(a.indeterminate=r??!1)},...s}),o.jsx("span",{className:"vx-checkbox__box","aria-hidden":"true",children:r?o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:o.jsx("path",{d:"M2 5h6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:o.jsx("path",{d:"M2 5l2.5 2.5L8 3",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t?o.jsxs("span",{className:"vx-checkbox__copy",children:[o.jsx("span",{className:"vx-checkbox__label",children:t}),n?o.jsx("span",{className:"vx-checkbox__description",children:n}):null]}):null]})}function ia({className:e,label:t,description:n,...r}){return o.jsxs("label",{className:N("vx-radio",r.disabled&&"vx-radio--disabled"),children:[o.jsxs("span",{className:"vx-radio__control-wrap",children:[o.jsx("input",{type:"radio",className:N("vx-radio__input",e),...r}),o.jsx("span",{className:"vx-radio__circle","aria-hidden":"true",children:o.jsx("span",{className:"vx-radio__dot"})})]}),t?o.jsxs("span",{className:"vx-radio__copy",children:[o.jsx("span",{className:"vx-radio__label",children:t}),n?o.jsx("span",{className:"vx-radio__description",children:n}):null]}):null]})}function ca({label:e,children:t,className:n}){return o.jsxs("fieldset",{className:N("vx-radio-group",n),children:[e?o.jsx("legend",{className:"vx-field-group__label",children:e}):null,o.jsx("div",{className:"vx-radio-group__items",children:t})]})}function la({className:e,label:t,hint:n,resize:r="vertical",style:s,...a}){return o.jsxs("label",{className:"vx-field-group",children:[t?o.jsx("span",{className:"vx-field-group__label",children:t}):null,o.jsx("textarea",{className:N("vx-textarea",e),style:{resize:r,...s},...a}),n?o.jsx("span",{className:"vx-field-group__hint",children:n}):null]})}function ua({className:e,label:t,showValue:n=!1,hint:r,value:s,defaultValue:a,...c}){const i=s??a??"";return o.jsxs("label",{className:"vx-field-group",children:[t||n?o.jsxs("span",{className:"vx-slider__header",children:[t?o.jsx("span",{className:"vx-field-group__label vx-slider__label",children:t}):null,n?o.jsx("span",{className:"vx-slider__value",children:i}):null]}):null,o.jsx("input",{type:"range",className:N("vx-slider",e),value:s,defaultValue:a,...c}),r?o.jsx("span",{className:"vx-field-group__hint",children:r}):null]})}const da={sm:16,md:24,lg:36};function fa({className:e,size:t="md",label:n="Loading…",...r}){const s=da[t];return o.jsx("span",{role:"status","aria-label":n,className:N("vx-spinner",`vx-spinner--${t}`,e),...r,children:o.jsx("svg",{width:s,height:s,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:"42 14"})})})}function va({className:e,value:t=0,max:n=100,label:r,showLabel:s=!1,size:a="md",variant:c="default",indeterminate:i=!1,...d}){const u=i?void 0:Math.min(100,Math.max(0,t/n*100));return o.jsxs("div",{className:N("vx-progress-wrap",e),...d,children:[r||s?o.jsxs("div",{className:"vx-progress__header",children:[r?o.jsx("span",{className:"vx-progress__label",children:r}):null,s&&!i?o.jsxs("span",{className:"vx-progress__value",children:[Math.round(u),"%"]}):null]}):null,o.jsx("div",{role:"progressbar","aria-valuenow":i?void 0:t,"aria-valuemin":0,"aria-valuemax":n,"aria-label":r,className:N("vx-progress",`vx-progress--${a}`,`vx-progress--${c}`,i&&"vx-progress--indeterminate"),children:o.jsx("div",{className:"vx-progress__bar",style:i?void 0:{width:`${u}%`}})})]})}const ma={info:o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"M8 7v4M8 5.5v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),success:o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"M5 8.5l2 2 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),warning:o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[o.jsx("path",{d:"M8 2L14.5 13.5H1.5L8 2z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),o.jsx("path",{d:"M8 6.5v3M8 11v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),danger:o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"M10 6L6 10M6 6l4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})};function xa({className:e,variant:t="info",title:n,icon:r,onClose:s,children:a,...c}){return o.jsxs("div",{role:"alert",className:N("vx-alert",`vx-alert--${t}`,e),...c,children:[o.jsx("span",{className:"vx-alert__icon",children:r??ma[t]}),o.jsxs("div",{className:"vx-alert__body",children:[n?o.jsx("p",{className:"vx-alert__title",children:n}):null,a?o.jsx("div",{className:"vx-alert__content",children:a}):null]}),s?o.jsx("button",{type:"button",className:"vx-alert__close",onClick:s,"aria-label":"关闭",children:o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):null]})}function ha({className:e,width:t,height:n,variant:r="rect",lines:s=1,style:a,...c}){return r==="text"&&s>1?o.jsx("span",{className:N("vx-skeleton-text",e),...c,children:Array.from({length:s}).map((i,d)=>o.jsx("span",{className:"vx-skeleton vx-skeleton--text",style:d===s-1?{width:"70%"}:void 0},d))}):o.jsx("span",{className:N("vx-skeleton",`vx-skeleton--${r}`,e),style:{width:typeof t=="number"?`${t}px`:t,height:typeof n=="number"?`${n}px`:n,...a},...c})}function pa({content:e,placement:t="top",delay:n=600,children:r,className:s}){const[a,c]=_.useState(!1),i=_.useRef(null),d=_.useCallback(()=>{i.current=setTimeout(()=>c(!0),n)},[n]),u=_.useCallback(()=>{i.current&&clearTimeout(i.current),c(!1)},[]);return _.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]),o.jsxs("span",{className:N("vx-tooltip-wrap",s),onMouseEnter:d,onMouseLeave:u,onFocus:d,onBlur:u,children:[r,a?o.jsx("span",{role:"tooltip",className:N("vx-tooltip",`vx-tooltip--${t}`),children:e}):null]})}function ba({content:e,placement:t="bottom",trigger:n="click",children:r,className:s,open:a,onOpenChange:c}){const[i,d]=_.useState(!1),u=a!==void 0,v=u?a:i,x=_.useRef(null),h=_.useCallback(f=>{u||d(f),c==null||c(f)},[u,c]),g=_.useCallback(()=>h(!v),[v,h]);_.useEffect(()=>{if(!v)return;const f=p=>{p.key==="Escape"&&h(!1)},m=p=>{x.current&&!x.current.contains(p.target)&&h(!1)};return document.addEventListener("keydown",f),document.addEventListener("mousedown",m),()=>{document.removeEventListener("keydown",f),document.removeEventListener("mousedown",m)}},[v,h]);const E=n==="click"?{onClick:g}:{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1)};return o.jsxs("div",{ref:x,className:N("vx-popover-wrap",s),...E,children:[r,v?o.jsx("div",{className:N("vx-popover",`vx-popover--${t}`),role:"dialog",children:e}):null]})}function ga({trigger:e,groups:t,items:n,align:r="left",className:s,open:a,onOpenChange:c}){const[i,d]=_.useState(!1),u=a!==void 0,v=u?a:i,x=_.useRef(null),h=_.useCallback(f=>{u||d(f),c==null||c(f)},[u,c]),g=_.useCallback(()=>h(!v),[v,h]);_.useEffect(()=>{if(!v)return;const f=p=>{p.key==="Escape"&&h(!1)},m=p=>{x.current&&!x.current.contains(p.target)&&h(!1)};return document.addEventListener("keydown",f),document.addEventListener("mousedown",m),()=>{document.removeEventListener("keydown",f),document.removeEventListener("mousedown",m)}},[v,h]);const E=t??(n?[{items:n}]:[]);return o.jsxs("div",{ref:x,className:N("vx-dropdown",s),children:[o.jsx("div",{className:"vx-dropdown__trigger",onClick:g,role:"button",tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&g()},children:e}),v?o.jsx("div",{className:N("vx-dropdown__menu",`vx-dropdown__menu--${r}`),role:"menu",children:E.map((f,m)=>o.jsxs("div",{className:"vx-dropdown__group",children:[f.label?o.jsx("div",{className:"vx-dropdown__group-label",children:f.label}):null,m>0&&!f.label?o.jsx("div",{className:"vx-dropdown__separator",role:"separator"}):null,f.items.map((p,w)=>o.jsxs("button",{role:"menuitem",disabled:p.disabled,className:N("vx-dropdown__item",p.danger&&"vx-dropdown__item--danger",p.disabled&&"vx-dropdown__item--disabled"),onClick:()=>{var b;p.disabled||((b=p.onClick)==null||b.call(p),h(!1))},children:[p.icon?o.jsx("span",{className:"vx-dropdown__item-icon",children:p.icon}):null,o.jsx("span",{className:"vx-dropdown__item-label",children:p.label}),p.shortcut?o.jsx("kbd",{className:"vx-dropdown__shortcut",children:p.shortcut}):null]},w))]},m))}):null]})}const ya=()=>o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M4.5 2.5L7.5 6l-3 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function _a({items:e,separator:t,className:n}){return o.jsx("nav",{"aria-label":"Breadcrumb",className:N("vx-breadcrumb",n),children:o.jsx("ol",{className:"vx-breadcrumb__list",children:e.map((r,s)=>{const a=s===e.length-1;return o.jsxs("li",{className:"vx-breadcrumb__item",children:[a?o.jsx("span",{className:"vx-breadcrumb__current","aria-current":"page",children:r.label}):r.href?o.jsx("a",{href:r.href,className:"vx-breadcrumb__link",children:r.label}):o.jsx("button",{type:"button",className:"vx-breadcrumb__link",onClick:r.onClick,children:r.label}),a?null:o.jsx("span",{className:"vx-breadcrumb__sep","aria-hidden":"true",children:t??o.jsx(ya,{})})]},s)})})})}function xe(e,t){return Array.from({length:t-e+1},(n,r)=>e+r)}function wa({page:e,total:t,pageSize:n=10,siblingCount:r=1,onChange:s,className:a}){const c=Math.max(1,Math.ceil(t/n)),i=(()=>{const d=r*2+5;if(c<=d)return xe(1,c);const u=Math.max(e-r,1),v=Math.min(e+r,c),x=u>3,h=v<c-2;return!x&&h?[...xe(1,3+r*2),"…",c]:x&&!h?[1,"…",...xe(c-(2+r*2),c)]:[1,"…",...xe(u,v),"…",c]})();return o.jsxs("nav",{role:"navigation","aria-label":"Pagination",className:N("vx-pagination",a),children:[o.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--prev",disabled:e<=1,onClick:()=>s(e-1),"aria-label":"上一页",children:o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M9 11L5 7l4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),i.map((d,u)=>d==="…"?o.jsx("span",{className:"vx-pagination__ellipsis","aria-hidden":"true",children:"…"},`e-${u}`):o.jsx("button",{type:"button","aria-current":d===e?"page":void 0,className:N("vx-pagination__btn",d===e&&"vx-pagination__btn--active"),onClick:()=>s(d),children:d},d)),o.jsx("button",{type:"button",className:"vx-pagination__btn vx-pagination__btn--next",disabled:e>=c,onClick:()=>s(e+1),"aria-label":"下一页",children:o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M5 11l4-4-4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}function Ea({items:e,multiple:t=!1,defaultOpen:n=[],className:r}){const[s,a]=_.useState(new Set(n));function c(i){a(d=>{const u=new Set(t?d:[]);return d.has(i)?u.delete(i):u.add(i),u})}return o.jsx("div",{className:N("vx-accordion",r),children:e.map(i=>{const d=s.has(i.key);return o.jsxs("div",{className:N("vx-accordion__item",d&&"vx-accordion__item--open",i.disabled&&"vx-accordion__item--disabled"),children:[o.jsxs("button",{type:"button",disabled:i.disabled,"aria-expanded":d,className:"vx-accordion__trigger",onClick:()=>!i.disabled&&c(i.key),children:[o.jsx("span",{className:"vx-accordion__title",children:i.title}),o.jsx("span",{className:"vx-accordion__chevron","aria-hidden":"true",children:o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:o.jsx("path",{d:"M3 5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),d?o.jsx("div",{className:"vx-accordion__content",children:i.content}):null]},i.key)})})}function Na({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return o.jsx("hr",{role:n?"none":"separator","aria-orientation":n?void 0:t,className:N("vx-separator",`vx-separator--${t}`,e),...r})}function ja(e){const t=e.trim().split(/\s+/);return t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}const pt=[0,30,60,120,160,200,240,270,300,340];function Ca(e){let t=0;for(let n=0;n<e.length;n++)t+=e.charCodeAt(n);return pt[t%pt.length]}function Ta({src:e,name:t,size:n="md",shape:r="circle",fallback:s,className:a,alt:c,...i}){const[d,u]=_.useState(!1),v=e&&!d,x=t??c??"",h=x?Ca(x):200;return o.jsx("span",{className:N("vx-avatar",`vx-avatar--${n}`,`vx-avatar--${r}`,a),"aria-label":x||void 0,style:v?void 0:{"--vx-avatar-hue":h},children:v?o.jsx("img",{src:e,alt:c??t??"",className:"vx-avatar__img",onError:()=>u(!0),...i}):s?o.jsx("span",{className:"vx-avatar__fallback",children:s}):x?o.jsx("span",{className:"vx-avatar__initials",children:ja(x)}):o.jsxs("svg",{className:"vx-avatar__placeholder",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"12",cy:"8",r:"4",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"M4 20c0-4 3.58-7 8-7s8 3 8 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})}function Sa({columns:e,data:t,striped:n=!1,hoverable:r=!0,bordered:s=!1,compact:a=!1,stickyHeader:c=!1,caption:i,emptyText:d="暂无数据",sortColumn:u,sortDirection:v,onSortChange:x,className:h,...g}){const[E,f]=_.useState(null),[m,p]=_.useState(null),w=u!==void 0,b=w?u:E,y=w?v??null:m,T=_.useCallback(j=>{let C;b!==j?C="asc":y==="asc"?C="desc":y==="desc"?C=null:C="asc",w||(f(C===null?null:j),p(C)),x==null||x(j,C)},[b,y,w,x]);return o.jsx("div",{className:N("vx-table-wrap",h),...g,children:o.jsxs("table",{className:N("vx-table",n&&"vx-table--striped",r&&"vx-table--hoverable",s&&"vx-table--bordered",a&&"vx-table--compact",c&&"vx-table--sticky"),children:[i?o.jsx("caption",{className:"vx-table__caption",children:i}):null,o.jsx("thead",{children:o.jsx("tr",{children:e.map(j=>o.jsx("th",{className:N("vx-table__th",j.sortable&&"vx-table__th--sortable",j.align&&`vx-table__th--${j.align}`,j.className),style:{width:j.width},onClick:j.sortable?()=>T(j.key):void 0,"aria-sort":b===j.key?y==="asc"?"ascending":y==="desc"?"descending":"none":void 0,children:o.jsxs("span",{className:"vx-table__th-inner",children:[j.header,j.sortable?o.jsx("span",{className:"vx-table__sort-icon","aria-hidden":"true",children:b===j.key&&y==="asc"?"↑":b===j.key&&y==="desc"?"↓":"↕"}):null]})},j.key))})}),o.jsx("tbody",{children:t.length===0?o.jsx("tr",{children:o.jsx("td",{colSpan:e.length,className:"vx-table__empty",children:d})}):t.map((j,C)=>o.jsx("tr",{className:"vx-table__row",children:e.map(S=>o.jsx("td",{className:N("vx-table__td",S.align&&`vx-table__td--${S.align}`,S.className),children:S.accessor(j)},S.key))},C))})]})})}function Ra({topBar:e,bottomNav:t,children:n,className:r}){return o.jsxs("div",{className:N("vxm-shell",r),children:[e&&o.jsx("div",{className:"vxm-shell__topbar",children:e}),o.jsx("main",{className:"vxm-shell__main",children:n}),t&&o.jsx("div",{className:"vxm-shell__bottomnav",children:t})]})}function ka({title:e,leading:t,trailing:n,className:r}){return o.jsxs("div",{className:N("vxm-topbar",r),children:[o.jsx("div",{className:"vxm-topbar__leading",children:t}),o.jsx("div",{className:"vxm-topbar__title",children:e}),o.jsx("div",{className:"vxm-topbar__trailing",children:n})]})}function Pa({label:e,className:t,children:n,...r}){return o.jsx("button",{type:"button",className:N("vxm-icon-btn",t),"aria-label":e,...r,children:n})}function Ia({items:e,className:t}){return o.jsx("nav",{className:N("vxm-bottomnav",t),"aria-label":"底部导航",children:e.map(n=>o.jsxs("button",{type:"button",className:N("vxm-bottomnav__item",n.active&&"vxm-bottomnav__item--active"),onClick:n.onSelect,"aria-current":n.active?"page":void 0,children:[o.jsxs("span",{className:"vxm-bottomnav__icon",children:[n.icon,n.badge!=null&&o.jsx("span",{className:"vxm-bottomnav__badge","aria-label":`${n.badge} 条未读`,children:n.badge})]}),o.jsx("span",{className:"vxm-bottomnav__label",children:n.label})]},n.key))})}function Ma({open:e,onClose:t,title:n,description:r,children:s,className:a}){const c=_.useRef(null),i=_.useRef(0),[d,u]=_.useState(!1),[v,x]=_.useState(0),h=_.useRef(0);_.useEffect(()=>{e||(x(0),h.current=0)},[e]),_.useEffect(()=>{if(!e)return;const m=p=>{p.key==="Escape"&&t()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,t]),_.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]);const g=m=>{i.current=m.touches[0].clientY,h.current=0,u(!0)},E=m=>{const p=m.touches[0].clientY-i.current;p<0||(h.current=p,x(p))},f=()=>{u(!1);const m=c.current;if(!m)return;const p=m.offsetHeight*.32;h.current>p?t():x(0)};return e?o.jsx("div",{className:"vxm-actionsheet__overlay",onClick:t,role:"presentation","aria-hidden":"true",children:o.jsxs("div",{ref:c,className:N("vxm-actionsheet",a),style:{transform:`translateY(${v}px)`,transition:d?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onClick:m=>m.stopPropagation(),onTouchStart:g,onTouchMove:E,onTouchEnd:f,role:"dialog","aria-modal":!0,"aria-label":n??"Action sheet",children:[o.jsx("div",{className:"vxm-actionsheet__handle","aria-hidden":"true"}),(n||r)&&o.jsxs("div",{className:"vxm-actionsheet__header",children:[n&&o.jsx("h3",{className:"vxm-actionsheet__title",children:n}),r&&o.jsx("p",{className:"vxm-actionsheet__description",children:r})]}),o.jsx("div",{className:"vxm-actionsheet__body",children:s})]})}):null}function Aa({icon:e,destructive:t,className:n,children:r,...s}){return o.jsxs("button",{type:"button",className:N("vxm-actionsheet-item",t&&"vxm-actionsheet-item--destructive",n),...s,children:[e&&o.jsx("span",{className:"vxm-actionsheet-item__icon",children:e}),r]})}function Da({className:e,...t}){return o.jsx("ul",{className:N("vxm-list",e),role:"list",...t})}function La({title:e,className:t,children:n,...r}){return o.jsxs("div",{className:N("vxm-list-section",t),...r,children:[e&&o.jsx("div",{className:"vxm-list-section__title",children:e}),n]})}function Oa({leading:e,trailing:t,label:n,description:r,chevron:s,destructive:a,disabled:c,onClick:i,className:d}){const u=o.jsxs(o.Fragment,{children:[e&&o.jsx("span",{className:"vxm-list-item__leading",children:e}),o.jsxs("span",{className:"vxm-list-item__content",children:[o.jsx("span",{className:"vxm-list-item__label",children:n}),r&&o.jsx("span",{className:"vxm-list-item__description",children:r})]}),t&&o.jsx("span",{className:"vxm-list-item__trailing",children:t}),s&&o.jsx(zn,{size:16,className:"vxm-list-item__chevron","aria-hidden":"true"})]});return o.jsx("li",{className:N("vxm-list-item",a&&"vxm-list-item--destructive",c&&"vxm-list-item--disabled",!i&&"vxm-list-item--static",d),children:o.jsx("button",{type:"button",className:"vxm-list-item__btn",onClick:c?void 0:i,disabled:c,tabIndex:i?0:-1,children:u})})}function Fa({open:e,onClose:t,width:n=280,header:r,footer:s,children:a,className:c}){const i=_.useRef(null),d=_.useRef(0),u=_.useRef(0),[v,x]=_.useState(!1),[h,g]=_.useState(0);_.useEffect(()=>{e||(g(0),u.current=0)},[e]),_.useEffect(()=>{if(!e)return;const b=y=>{y.key==="Escape"&&t()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[e,t]),_.useEffect(()=>(document.body.style.overflow=e?"hidden":"",()=>{document.body.style.overflow=""}),[e]);const E=b=>{d.current=b.touches[0].clientX,u.current=0,x(!0)},f=b=>{const y=b.touches[0].clientX-d.current;y>0||(u.current=y,g(y))},m=()=>{x(!1),Math.abs(u.current)>n*.3?t():g(0)};if(!e)return null;const w=.52*Math.max(0,1+h/n);return o.jsxs("div",{className:"vxm-drawer__overlay",style:{"--vxm-overlay-opacity":w},children:[o.jsx("div",{className:"vxm-drawer__scrim",onClick:t,"aria-hidden":"true"}),o.jsxs("div",{ref:i,className:N("vxm-drawer",c),style:{width:n,transform:`translateX(${h}px)`,transition:v?"none":"transform 280ms cubic-bezier(0.32, 0.72, 0, 1)"},onTouchStart:E,onTouchMove:f,onTouchEnd:m,role:"dialog","aria-modal":!0,"aria-label":"Navigation drawer",children:[r&&o.jsx("div",{className:"vxm-drawer__header",children:r}),o.jsx("div",{className:"vxm-drawer__body",children:a}),s&&o.jsx("div",{className:"vxm-drawer__footer",children:s})]})]})}function $a({icon:e,label:t,badge:n,active:r,onClick:s}){return o.jsxs("button",{type:"button",className:N("vxm-drawer-item",r&&"vxm-drawer-item--active"),onClick:s,"aria-current":r?"page":void 0,children:[e&&o.jsx("span",{className:"vxm-drawer-item__icon",children:e}),o.jsx("span",{className:"vxm-drawer-item__label",children:t}),n!=null&&o.jsx("span",{className:"vxm-drawer-item__badge",children:n})]})}function Ba({title:e,children:t}){return o.jsxs("div",{className:"vxm-drawer-section",children:[e&&o.jsx("div",{className:"vxm-drawer-section__title",children:e}),o.jsx("div",{className:"vxm-drawer-section__items",children:t})]})}exports.Accordion=Ea;exports.ActionSheet=Ma;exports.ActionSheetItem=Aa;exports.Alert=xa;exports.AppShell=qn;exports.Avatar=Ta;exports.Badge=Zn;exports.BottomNav=Ia;exports.Breadcrumb=_a;exports.Button=Le;exports.Card=Qn;exports.CardContent=nr;exports.CardDescription=tr;exports.CardHeader=Jn;exports.CardTitle=er;exports.Checkbox=aa;exports.Dialog=Wo;exports.DrawerNavItem=$a;exports.DrawerNavSection=Ba;exports.DropdownMenu=ga;exports.Heading=oa;exports.Input=Uo;exports.MobileDrawer=Fa;exports.MobileIconButton=Pa;exports.MobileList=Da;exports.MobileListItem=Oa;exports.MobileListSection=La;exports.MobileShell=Ra;exports.MobileTopBar=ka;exports.Pagination=wa;exports.Popover=ba;exports.Progress=va;exports.Radio=ia;exports.RadioGroup=ca;exports.Select=sa;exports.Separator=Na;exports.Skeleton=ha;exports.Slider=ua;exports.Spinner=fa;exports.Switch=Zo;exports.Table=Sa;exports.Tabs=ps;exports.TabsContent=ys;exports.TabsList=bs;exports.TabsTrigger=gs;exports.Text=ra;exports.Textarea=la;exports.ThemeProvider=Cs;exports.ToastProvider=ta;exports.Tooltip=pa;exports.createTheme=G;exports.themePresets=_s;exports.useTheme=Ts;exports.useToast=na;
|
package/dist/index.d.ts
ADDED