@vellira-ui/react 2.29.0 → 2.30.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/README.md CHANGED
@@ -52,7 +52,7 @@ export function Example() {
52
52
  <Input
53
53
  label='Email'
54
54
  value={email}
55
- onChange={(event) => setEmail(event.target.value)}
55
+ onValueChange={setEmail}
56
56
  placeholder='name@example.com'
57
57
  />
58
58
  <Checkbox
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react"),l=require("clsx");l=s(l,1);let u=require("react-dom"),d=require("react/jsx-runtime"),f=require("@floating-ui/react"),p=require("@vellira-ui/core"),m=require("@vellira-ui/icons"),h=require("focus-trap-react");h=s(h,1);var g=(...e)=>(0,l.default)(e),_=({children:e})=>{let[t,n]=(0,c.useState)(!1);if((0,c.useEffect)(()=>{n(!0)},[]),!t)return null;let r=document.getElementById(`overlay-root`)??document.body;return r?(0,u.createPortal)(e,r):null},v={dropdown:`_dropdown_1rvx9_1`,"dropdown-in":`_dropdown-in_1rvx9_1`},y=(0,c.forwardRef)(({children:e,floatingStyles:t,menuId:n,labelledById:r,label:i,activeDescendantId:a,onKeyDown:o,className:s},c)=>(0,d.jsx)(_,{children:(0,d.jsx)(`ul`,{ref:c,id:n,role:`menu`,tabIndex:-1,"aria-labelledby":r,"aria-label":r?void 0:i,"aria-activedescendant":a,onKeyDown:o,style:t,className:g(v.dropdown,s),children:e})}));y.displayName=`DropdownContent`;var b=e=>{let[t,n]=(0,c.useState)(()=>typeof window>`u`||typeof window.matchMedia!=`function`||!e?!1:window.matchMedia(`(max-width: ${e}px)`).matches);return(0,c.useEffect)(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`||!e)return;let t=window.matchMedia(`(max-width: ${e}px)`),r=()=>n(t.matches);return r(),t.addEventListener(`change`,r),()=>{t.removeEventListener(`change`,r)}},[e]),t},x=({open:e,onOpenChange:t,placement:n=`bottom-start`,strategy:r=`fixed`,matchTriggerWidth:i=!1,mobileSheetBreakpoint:a,middleware:o=[]}={})=>{let s=b(a),{refs:l,floatingStyles:u,update:d,context:p,middlewareData:m,placement:h}=(0,f.useFloating)({open:e,onOpenChange:t,placement:n,strategy:r,transform:!1,middleware:(0,c.useMemo)(()=>[(0,f.offset)(2),(0,f.flip)(),(0,f.size)({apply({rects:e,elements:t}){!i||s||Object.assign(t.floating.style,{width:`${e.reference.width}px`})}}),(0,f.shift)({padding:8}),...o],[o,s,i]),whileElementsMounted:f.autoUpdate});return(0,c.useEffect)(()=>{s&&l.floating.current?.style.removeProperty(`width`)},[s,l.floating]),{context:p,placement:h,middlewareData:m,floatingStyles:s?{}:u,isMobileSheet:s,setRef:l.setReference,setFloatingRef:l.setFloating,updatePosition:d}},S=(e,t,n=!0)=>{let r=(0,c.useRef)(e);r.current=e;let i=(0,c.useRef)(t);i.current=t,(0,c.useEffect)(()=>{if(!n)return;let e=e=>{let t=e.target;r.current.every(e=>e.current&&!e.current.contains(t))&&i.current()};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[n])},C={group:`_group_aviwv_1`},w=({label:e})=>(0,d.jsx)(`li`,{role:`presentation`,className:C.group,children:e}),T={item:`_item_re11y_1`,disabled:`_disabled_re11y_21`,active:`_active_re11y_34`,danger:`_danger_re11y_40`,itemIcon:`_itemIcon_re11y_62`,itemShortcut:`_itemShortcut_re11y_63`,itemText:`_itemText_re11y_82`,"itemText--truncate":`_itemText--truncate_re11y_88`,"itemText--wrap":`_itemText--wrap_re11y_93`,"itemText--nowrap":`_itemText--nowrap_re11y_97`},E=({id:e,children:t,label:n,icon:r,danger:i,disabled:a,active:o,onClick:s,onMouseEnter:c,shortcut:l,textWrap:u=`truncate`,className:f})=>{let p=t||n;return(0,d.jsxs)(`li`,{id:e,role:`menuitem`,tabIndex:-1,"aria-disabled":a||void 0,"data-active":o||void 0,"data-danger":i||void 0,onClick:a?void 0:s,onMouseEnter:a?void 0:c,className:g(T.item,{[T.active]:o,[T.disabled]:a,[T.danger]:i},f),children:[r&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:T.itemIcon,children:r}),p&&(0,d.jsx)(`span`,{className:g(T.itemText,T[`itemText--${u}`]),children:p}),l&&(0,d.jsx)(`span`,{className:T.itemShortcut,children:l})]})},D={separator:`_separator_1v11r_1`},O=()=>(0,d.jsx)(`li`,{role:`separator`,className:D.separator,"aria-hidden":`true`}),k={button:`_button_18ucr_1`,disabled:`_disabled_18ucr_20`,iconLeft:`_iconLeft_18ucr_32`,arrow:`_arrow_18ucr_44`,iconOnly:`_iconOnly_18ucr_47`,sm:`_sm_18ucr_60`,md:`_md_18ucr_72`,lg:`_lg_18ucr_84`,open:`_open_18ucr_123`},A=(0,c.forwardRef)(({children:e,isOpen:t,icon:n,arrowIcon:r,showArrow:i=!0,rotateAngle:a=90,size:o=`md`,label:s,ariaLabel:c,className:l,...u},f)=>{let p=!!n,h=!!e,_=p&&!h,v=i&&h,y=r??(0,d.jsx)(m.ChevronDown,{}),b=c??(_?typeof s==`string`?s:`Open menu`:void 0);return(0,d.jsxs)(`button`,{...u,ref:f,type:`button`,className:g(k.button,k[o],{[k.disabled]:u.disabled,[k.iconOnly]:_},l),"aria-label":b,"aria-expanded":t,"aria-haspopup":`menu`,style:{"--dropdown-rotate-angle":`${a}deg`},children:[p&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:k.iconLeft,children:n}),e,v&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:g(k.arrow,{[k.open]:t}),children:y})]})});A.displayName=`DropdownTrigger`;var j=e=>e.type===void 0||e.type===`item`,M=e=>e.type===`group`,N=e=>e.type===`separator`,P={wrapper:`_wrapper_14ue8_1`},F=({label:e,ariaLabel:t,icon:n,trigger:r,items:i=[],onSelect:a,open:o,defaultOpen:s=!1,onOpenChange:l,size:u=`md`,className:f,triggerClassName:m,contentClassName:h,itemClassName:_,disabled:v,rotateAngle:b=90,placement:C,matchTriggerWidth:T,textWrap:D,showArrow:k=!0,arrowIcon:F})=>{let I=(0,c.useRef)(null),L=(0,c.useRef)(null),R=(0,c.useId)(),z=`${R}-trigger`,{floatingStyles:B,setRef:V,setFloatingRef:H}=x({placement:C,matchTriggerWidth:T,mobileSheetBreakpoint:640}),U=(0,c.useMemo)(()=>i.flatMap((e,t)=>j(e)?[{item:e,itemIndex:t}]:[]),[i]),W=(0,c.useMemo)(()=>U.map(({item:e})=>e),[U]),G=(0,c.useMemo)(()=>new Map(U.map(({itemIndex:e},t)=>[e,t])),[U]),{activeIndex:ee,setActiveIndex:te,isOpen:K,closeDropdown:ne,toggleDropdown:re,selectItem:ie,onKeyDown:ae}=(0,p.useDropdown)({items:W,open:o,defaultOpen:s,disabled:v,onOpenChange:l,onSelect:(0,c.useCallback)(e=>{a?.(e),I.current?.focus()},[a]),getItemValue:e=>e.value,getItemText:e=>typeof e.label==`string`?e.label:e.value}),oe=K&&ee>=0?`${R}-item-${ee}`:void 0;S([I,L],ne,K);let se=(0,c.useCallback)(e=>{ae(e),K&&e.key===`Escape`&&I.current?.focus()},[K,ae]),ce=(0,c.useCallback)(e=>{I.current=e,V(e)},[V]),q=(0,c.useCallback)(e=>{L.current=e,H(e),e?.focus()},[H]);return(0,d.jsxs)(`div`,{className:g(P.wrapper,f),children:[(0,d.jsx)(A,{ref:ce,id:z,isOpen:K,disabled:v,size:u,icon:n,label:e,ariaLabel:t,showArrow:k,arrowIcon:F,rotateAngle:b,className:m,onClick:re,onKeyDown:se,"aria-expanded":K,"aria-haspopup":`menu`,...K&&{"aria-controls":R},children:r}),K&&(0,d.jsx)(y,{ref:q,floatingStyles:B,menuId:R,labelledById:r?z:void 0,label:t??(!r&&typeof e==`string`?e:void 0),activeDescendantId:oe,onKeyDown:se,className:h,children:i.map((e,t)=>{if(M(e))return(0,d.jsx)(w,{label:e.label},`group-${e.label}`);if(N(e))return(0,d.jsx)(O,{},`separator-${t}`);if(j(e)){let n=G.get(t)??-1;return(0,d.jsx)(E,{id:`${R}-item-${n}`,...e,active:ee===n,textWrap:e.textWrap||D,className:_,onClick:()=>{ie(e),I.current?.focus()},onMouseEnter:()=>{n<0||e.disabled||te(n)},children:e.label},`${e.value}-${t}`)}})})]})},I=(0,c.createContext)(void 0),L=()=>{let e=(0,c.useContext)(I);if(e===void 0)throw Error(`Modal compound components must be used inside Modal`);return e};I.displayName=`ModalContext`;var R={modalBody:`_modalBody_iv33a_1`},z=({children:e})=>{let{descriptionId:t}=L();return(0,d.jsx)(`div`,{id:t,className:R.modalBody,children:e})};z.displayName=`ModalBody`;var B={content:`_content_k44g7_1`},V=({children:e})=>(0,d.jsx)(`div`,{className:B.content,children:e});V.displayName=`ModalContent`;var H={modalFooter:`_modalFooter_ezys6_1`},U=({children:e})=>(0,d.jsx)(`div`,{className:H.modalFooter,children:e});U.displayName=`ModalFooter`;var W={modalHeader:`_modalHeader_p8xf1_1`,modalHeaderTitle:`_modalHeaderTitle_p8xf1_7`,modalHeaderCloseButton:`_modalHeaderCloseButton_p8xf1_14`},G=({children:e})=>{let{onClose:t,titleId:n}=L();return(0,d.jsxs)(`div`,{className:W.modalHeader,children:[(0,d.jsx)(`h2`,{id:n,className:W.modalHeaderTitle,children:e}),t&&(0,d.jsx)(`button`,{type:`button`,className:W.modalHeaderCloseButton,onClick:t,"aria-label":`Close modal`,children:(0,d.jsx)(m.Close,{size:16})})]})};G.displayName=`ModalHeader`;var ee=({isOpen:e,onClose:t})=>{let n=(0,c.useCallback)(n=>{e&&n.key===`Escape`&&(n.preventDefault(),t?.())},[e,t]);(0,c.useEffect)(()=>(document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)),[n])},te={overlay:`_overlay_dcudn_1`,"overlay--open":`_overlay--open_dcudn_14`,modal:`_modal_dcudn_20`,"overlay--animated":`_overlay--animated_dcudn_28`},K=0,ne=``,re=({children:e,onClose:t,isOpen:n,className:r,closeOnBackdrop:i,closeOnClick:a,closeOnEsc:o=!0,zIndex:s=1e3,animated:l=!0})=>{let u=i??a??!0,f=(0,c.useRef)(null),{titleId:p,descriptionId:m}=L(),v=(0,c.useCallback)(e=>{u&&e.target===e.currentTarget&&t?.()},[u,t]);return ee({isOpen:n,onClose:o?t:void 0}),(0,c.useEffect)(()=>{if(n)return K===0&&(ne=document.body.style.overflow),K+=1,document.body.style.overflow=`hidden`,()=>{K=Math.max(0,K-1),K===0&&(document.body.style.overflow=ne)}},[n]),!n&&!l?null:(0,d.jsx)(_,{children:(0,d.jsx)(`div`,{className:g(te.overlay,n&&te[`overlay--open`],l&&te[`overlay--animated`],r),onClick:v,tabIndex:-1,role:`presentation`,"aria-hidden":!n,style:{zIndex:s},children:(0,d.jsx)(h.default,{active:n,focusTrapOptions:{fallbackFocus:()=>f.current,returnFocusOnDeactivate:!0,allowOutsideClick:!0},children:(0,d.jsx)(`div`,{ref:f,tabIndex:-1,className:te.modal,role:`dialog`,"aria-modal":`true`,"aria-labelledby":p,"aria-describedby":m,children:e})})})})};re.displayName=`ModalOverlay`;var ie=({isOpen:e,children:t,onClose:n,closeOnBackdrop:r,closeOnClick:i,closeOnEsc:a=!0})=>{let o=(0,p.useModal)({isOpen:e,onClose:n,closeOnBackdrop:r,closeOnClick:i,closeOnEsc:a});return o.shouldRender?(0,d.jsx)(I.Provider,{value:{onClose:o.onClose,titleId:o.titleId,descriptionId:o.descriptionId},children:(0,d.jsx)(re,{isOpen:o.isOpen,onClose:o.onClose,closeOnBackdrop:o.closeOnBackdrop,closeOnEsc:o.closeOnEsc,children:(0,d.jsx)(V,{children:t})})}):null};ie.displayName=`Modal`;var ae=Object.assign(ie,{Header:G,Body:z,Content:V,Footer:U}),oe=(0,c.createContext)(null),se=oe.Provider;function ce(){return(0,c.useContext)(oe)}var q={root:`_root_1n02e_1`,label:`_label_1n02e_9`,required:`_required_1n02e_21`,description:`_description_1n02e_26`,items:`_items_1n02e_34`,vertical:`_vertical_1n02e_39`,horizontal:`_horizontal_1n02e_45`,error:`_error_1n02e_51`,disabled:`_disabled_1n02e_59`,invalid:`_invalid_1n02e_75`},le=(0,c.forwardRef)(({value:e,defaultValue:t=``,onValueChange:n,disabled:r=!1,required:i=!1,size:a=`md`,color:o=`primary`,name:s,label:l,description:u,error:f,orientation:m=`vertical`,children:h,className:_,id:v,...y},b)=>{let x=(0,c.useId)(),S=v??x,C=l?`${S}-label`:void 0,w=u?`${S}-description`:void 0,T=f?`${S}-error`:void 0,E=[w,T].filter(Boolean).join(` `)||void 0,D=s??`${S}-radio`,[O,k]=(0,p.useControllableState)({value:e,defaultValue:t,onChange:n}),A=!!f;return(0,d.jsxs)(`div`,{...y,ref:b,id:S,role:`radiogroup`,"aria-labelledby":C,"aria-describedby":E,"aria-disabled":r||void 0,"aria-required":i||void 0,"aria-invalid":A||void 0,className:g(q.root,A&&q.invalid,r&&q.disabled,_),children:[l&&(0,d.jsxs)(`div`,{id:C,className:q.label,children:[l,i&&(0,d.jsx)(`span`,{className:q.required,"aria-hidden":`true`,children:`*`})]}),u&&(0,d.jsx)(`div`,{id:w,className:q.description,children:u}),(0,d.jsx)(se,{value:{name:D,value:O,disabled:r,required:i,invalid:A,size:a,color:o,describedBy:E,onValueChange:k},children:(0,d.jsx)(`div`,{className:g(q.items,q[m]),children:h})}),f&&(0,d.jsx)(`div`,{id:T,className:q.error,children:f})]})});le.displayName=`RadioGroup`;var J={wrapper:`_wrapper_byl2d_1`,label:`_label_byl2d_9`,required:`_required_byl2d_20`,description:`_description_byl2d_25`,control:`_control_byl2d_32`,errorText:`_errorText_byl2d_40`,disabled:`_disabled_byl2d_54`},ue=({id:e,label:t,description:n,error:r,required:i=!1,disabled:a=!1,children:o,className:s,controlClassName:c,labelClassName:l,descriptionClassName:u,errorClassName:f,...p})=>{let m=n&&e?`${e}-description`:void 0,h=r&&e?`${e}-error`:void 0;return(0,d.jsxs)(`div`,{...p,"aria-disabled":a||void 0,className:g(J.wrapper,a&&J.disabled,s),"data-disabled":a||void 0,"data-invalid":!!r||void 0,children:[t&&(0,d.jsxs)(`label`,{htmlFor:e,className:g(J.label,l),children:[t,i&&(0,d.jsx)(`span`,{className:J.required,"aria-hidden":`true`,children:`*`})]}),n&&(0,d.jsx)(`div`,{id:m,className:g(J.description,u),children:n}),(0,d.jsx)(`div`,{className:g(J.control,c),children:o}),r&&(0,d.jsx)(`div`,{id:h,className:g(J.errorText,f),role:`alert`,children:r})]})},de={option:`_option_l6qjj_1`,selected:`_selected_l6qjj_18`,disabled:`_disabled_l6qjj_18`,active:`_active_l6qjj_34`,label:`_label_l6qjj_46`,check:`_check_l6qjj_54`},fe=({option:e,isSelected:t,isActive:n,optionId:r,onSelect:i,onMouseEnter:a})=>{let o=!!e.disabled;return(0,d.jsxs)(`li`,{id:r,role:`option`,"aria-selected":t,"aria-disabled":o||void 0,className:g(de.option,{[de.selected]:t,[de.active]:n,[de.disabled]:o}),onClick:()=>{o||i(e.value)},onMouseEnter:()=>{o||a()},children:[(0,d.jsx)(`span`,{className:de.label,children:e.label}),(0,d.jsx)(`span`,{className:de.check,"aria-hidden":`true`,children:t&&(0,d.jsx)(m.Check,{})})]})};fe.displayName=`SelectOption`;var pe={dropdown:`_dropdown_qznlq_1`,dropdownIn:`_dropdownIn_qznlq_1`,empty:`_empty_qznlq_17`},me=({isOpen:e,listboxId:t,labelledById:n,setDropdownRef:r,style:i,options:a,noOptionsText:o,selectedValue:s,activeIndex:c,className:l,onSelect:u,onMouseEnter:f})=>e?(0,d.jsx)(_,{children:(0,d.jsx)(`ul`,{ref:r,id:t,role:`listbox`,"aria-labelledby":n,className:[pe.dropdown,l].filter(Boolean).join(` `),style:i,children:a.length?a.map((e,n)=>(0,d.jsx)(fe,{option:e,isSelected:e.value===s,isActive:n===c,optionId:`${t}-option-${n}`,onSelect:u,onMouseEnter:()=>f(n)},e.value)):(0,d.jsx)(`li`,{role:`option`,"aria-disabled":`true`,"aria-selected":`false`,className:pe.empty,children:o})})}):null;me.displayName=`SelectDropdown`;var Y={control:`_control_1xma1_1`,disabled:`_disabled_1xma1_18`,arrow:`_arrow_1xma1_23`,sm:`_sm_1xma1_34`,md:`_md_1xma1_41`,lg:`_lg_1xma1_48`,value:`_value_1xma1_55`,placeholder:`_placeholder_1xma1_63`,error:`_error_1xma1_67`,open:`_open_1xma1_109`},he=({id:e,errorId:t,isOpen:n,disabled:r,required:i,listboxId:a,activeIndex:o,ariaLabel:s,error:c,displayText:l,isPlaceholder:u,size:f=`md`,className:p,buttonRef:h,onClick:_,onKeyDown:v,onBlur:y,onFocus:b})=>(0,d.jsxs)(`button`,{id:e,ref:h,type:`button`,role:`combobox`,disabled:r,"aria-disabled":r||void 0,"aria-required":i||void 0,"aria-expanded":n,"aria-haspopup":`listbox`,"aria-label":s,"aria-invalid":c||void 0,"aria-controls":n?a:void 0,"aria-describedby":t,"aria-activedescendant":n&&o>=0?`${a}-option-${o}`:void 0,className:g(Y.control,Y[f],{[Y.error]:!!c,[Y.disabled]:r},p),onClick:_,onKeyDown:v,onBlur:y,onFocus:b,children:[(0,d.jsx)(`span`,{className:g(Y.value,{[Y.placeholder]:u}),children:l}),(0,d.jsx)(`span`,{className:g(Y.arrow,{[Y.open]:n}),"aria-hidden":`true`,children:(0,d.jsx)(m.ChevronDown,{})})]});he.displayName=`SelectTrigger`;var ge=({label:e,description:t,id:n,name:r,"aria-label":i,value:a,defaultValue:o,onChange:s,options:l,placeholder:u=`Select...`,noOptionsText:f=`No options available`,size:m=`md`,required:h=!1,disabled:g=!1,error:_,placement:v=`bottom-start`,matchTriggerWidth:y=!0,open:b,defaultOpen:C=!1,onOpenChange:w,onBlur:T,onFocus:E,className:D,triggerClassName:O,dropdownClassName:k})=>{let A=(0,c.useId)(),j=n??A,M=`${j}-listbox`,N=!!_,P=N?`${j}-error`:void 0,F=(0,c.useRef)(null),I=(0,c.useRef)(null),{selectedValue:L,selectedOption:R,isOpen:z,setIsOpen:B,activeIndex:V,setActiveIndex:H,closeDropdown:U,toggleDropdown:W,selectValue:G,onKeyDown:ee}=(0,p.useSelect)({value:a,defaultValue:o,onChange:s,options:l,disabled:g,open:b,defaultOpen:C,onOpenChange:w}),te=!!R,{floatingStyles:K,setRef:ne,setFloatingRef:re}=x({open:z,onOpenChange:B,placement:v,matchTriggerWidth:y,mobileSheetBreakpoint:640}),ie=(0,c.useCallback)(e=>{G(e),F.current?.focus()},[G]);S([F,I],U,z);let ae=(0,c.useCallback)(e=>{F.current=e,ne(e)},[ne]),oe=(0,c.useCallback)(e=>{I.current=e,re(e)},[re]);return(0,d.jsxs)(ue,{id:j,label:e,description:t,error:_,required:h,disabled:g,className:D,children:[(0,d.jsx)(he,{id:j,errorId:P,isOpen:z,disabled:g,required:h,listboxId:M,activeIndex:V,ariaLabel:i??(e?void 0:R?.label||u),error:N,displayText:R?.label??u,isPlaceholder:!te,size:m,className:O,buttonRef:ae,onClick:W,onKeyDown:ee,onBlur:T,onFocus:E}),r&&(0,d.jsx)(`input`,{type:`hidden`,name:r,value:L,disabled:g}),(0,d.jsx)(me,{isOpen:z,listboxId:M,labelledById:j,style:K,options:l,noOptionsText:f,selectedValue:L,activeIndex:V,className:k,setDropdownRef:oe,onSelect:ie,onMouseEnter:H})]})};ge.displayName=`Select`;var _e=(0,c.createContext)(null),ve=()=>{let e=(0,c.useContext)(_e);if(!e)throw Error(`Tabs components must be used inside Tabs`);return e},ye={list:`_list_13hkl_1`,vertical:`_vertical_13hkl_8`},be=({children:e,className:t,...n})=>{let{orientation:r,appearance:i}=ve();return(0,d.jsx)(`div`,{...n,role:`tablist`,"aria-orientation":r,className:g(ye.list,r===`vertical`&&ye.vertical,i===`underline`&&ye.underline,i===`pills`&&ye.pills,t),children:e})};be.displayName=`TabsList`;var xe={panel:`_panel_1v1a9_1`,visible:`_visible_1v1a9_10`,vertical:`_vertical_1v1a9_14`},Se=({index:e,children:t,className:n})=>{let{activeIndex:r,orientation:i}=ve(),[a,o]=(0,c.useState)(!1),s=r===e;return(0,c.useEffect)(()=>{if(!s){o(!1);return}let e=setTimeout(()=>o(!0),10);return()=>clearTimeout(e)},[s]),(0,d.jsx)(`div`,{role:`tabpanel`,id:`tab-panel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!s,tabIndex:0,className:g(xe.panel,a&&xe.visible,i===`vertical`&&xe.vertical,n),children:t})};Se.displayName=`TabsPanel`;var Ce={tab:`_tab_qe8xc_1`,iconOnly:`_iconOnly_qe8xc_27`,tabIcon:`_tabIcon_qe8xc_31`,label:`_label_qe8xc_45`,default:`_default_qe8xc_51`,underline:`_underline_qe8xc_60`,pills:`_pills_qe8xc_92`,vertical:`_vertical_qe8xc_106`},we=(0,c.forwardRef)(({index:e,children:t,className:n,disabled:r=!1,icon:i,onClick:a,onKeyDown:o,...s},l)=>{let{activeIndex:u,setActiveIndex:f,orientation:p,appearance:m=`default`,registerTab:h,onTabKeyDown:_}=ve(),v=u===e,y=!!i,b=y&&t==null;return(0,d.jsxs)(`button`,{type:`button`,ref:(0,c.useCallback)(t=>{h(e,t),typeof l==`function`?l(t):l&&(l.current=t)},[h,e,l]),role:`tab`,"aria-selected":v,"aria-controls":`tab-panel-${e}`,id:`tab-${e}`,disabled:r,tabIndex:v?0:-1,className:g(Ce.tab,Ce[m],p===`vertical`&&Ce.vertical,y&&Ce.withIcon,b&&Ce.iconOnly,n),onClick:t=>{r||(f(e),a?.(t))},onKeyDown:e=>{_(e),o?.(e)},...s,children:[y&&(0,d.jsx)(`span`,{className:Ce.tabIcon,"aria-hidden":`true`,children:i}),t!=null&&(0,d.jsx)(`span`,{className:Ce.label,children:t})]})});we.displayName=`Tab`;var Te={tabs:`_tabs_uqy7q_1`,vertical:`_vertical_uqy7q_5`},Ee=({children:e,activeIndex:t,defaultActiveIndex:n=0,onChange:r,orientation:i=`horizontal`,appearance:a=`default`,className:o})=>{let{activeIndex:s,setActiveIndex:l}=(0,p.useTabs)({activeIndex:t,defaultActiveIndex:n,onChange:r}),u=(0,c.useRef)([]),f=(0,c.useCallback)((e,t)=>{u.current[e]=t},[]),{onKeyDown:m}=(0,p.useTabsKeyboard)({activeIndex:s,setActiveIndex:l,tabRefs:u,orientation:i,onNavigate:e=>{u.current[e]?.focus()}}),h={activeIndex:s,setActiveIndex:l,orientation:i,appearance:a,registerTab:f,onTabKeyDown:m};return(0,d.jsx)(_e.Provider,{value:h,children:(0,d.jsx)(`div`,{className:g(Te.tabs,i===`vertical`&&Te.vertical,o),children:e})})};Ee.displayName=`Tabs`;var De=Object.assign(Ee,{List:be,Tab:we,Panel:Se}),Oe={tooltip:`_tooltip_10opu_1`,arrow:`_arrow_10opu_25`},ke=(0,c.forwardRef)(({content:e,placement:t=`top`,arrowRef:n,arrowX:r,arrowY:i,className:a,style:o,...s},c)=>{let l={top:`bottom`,right:`left`,bottom:`top`,left:`right`}[t.split(`-`)[0]],u={position:`absolute`,pointerEvents:`none`,left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[l]:`-5px`};return(0,d.jsxs)(`div`,{ref:c,className:g(Oe.tooltip,a),"data-placement":t,"data-state":`open`,style:o,...s,children:[e,(0,d.jsx)(`div`,{ref:n,className:Oe.arrow,style:u})]})});ke.displayName=`TooltipContent`;var Ae=({children:e,placement:t=`top`,content:n,disabled:r=!1,delay:i={open:300,close:100},maxWidth:a=250,className:o,onOpenChange:s})=>{let[l,u]=(0,c.useState)(!1),p=(0,c.useRef)(null),m=(0,c.useId)(),{context:h,floatingStyles:g,middlewareData:_,setRef:v,setFloatingRef:y,placement:b}=x({open:l,onOpenChange:e=>{r||(u(e),s?.(e))},placement:t,middleware:[(0,f.arrow)({element:p})]}),S=_.arrow?.x,C=_.arrow?.y,{getReferenceProps:w,getFloatingProps:T}=(0,f.useInteractions)([(0,f.useHover)(h,{delay:{open:i.open,close:i.close}}),(0,f.useFocus)(h)]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`div`,{ref:v,style:{display:`inline-flex`},"aria-describedby":l?m:void 0,...w(),children:e}),(0,d.jsx)(f.FloatingPortal,{children:l&&n&&(0,d.jsx)(ke,{id:m,ref:y,content:n,arrowRef:p,arrowX:S,arrowY:C,role:`tooltip`,style:{...g,maxWidth:typeof a==`number`?`${a}px`:a},placement:b,className:o,...T()})})]})};Ae.displayName=`Tooltip`;var je=(e,t)=>{process.env.NODE_ENV!==`production`&&!e&&console.warn(t)},X={button:`_button_2nghu_1`,solid:`_solid_2nghu_22`,primary:`_primary_2nghu_22`,loading:`_loading_2nghu_22`,neutral:`_neutral_2nghu_48`,success:`_success_2nghu_74`,warning:`_warning_2nghu_100`,danger:`_danger_2nghu_126`,outline:`_outline_2nghu_152`,ghost:`_ghost_2nghu_282`,soft:`_soft_2nghu_412`,link:`_link_2nghu_542`,square:`_square_2nghu_685`,rounded:`_rounded_2nghu_689`,pill:`_pill_2nghu_693`,sm:`_sm_2nghu_697`,md:`_md_2nghu_703`,lg:`_lg_2nghu_709`,fullWidth:`_fullWidth_2nghu_715`,iconOnly:`_iconOnly_2nghu_719`,label:`_label_2nghu_723`,labelText:`_labelText_2nghu_745`,icon:`_icon_2nghu_719`,spinner:`_spinner_2nghu_764`,"button-spin":`_button-spin_2nghu_1`,badge:`_badge_2nghu_786`,shortcut:`_shortcut_2nghu_800`},Me=(0,c.forwardRef)(({children:e,color:t=`primary`,appearance:n=`solid`,size:r=`md`,shape:i=`pill`,type:a=`button`,disabled:o=!1,loading:s=!1,loadingText:l,iconStart:u,iconEnd:f,spinner:p,badge:m,shortcut:h,tooltip:_,fullWidth:v=!1,iconOnly:y=!1,asChild:b=!1,className:x,onClick:S,"aria-label":C,"aria-labelledby":w,href:T,target:E,rel:D,download:O,id:k,role:A,tabIndex:j,...M},N)=>{let P=b&&(0,c.isValidElement)(e)?e:void 0,F=P?P.props.children:e,I=y||!F&&!!(u||f),L=!!(C||w||P?.props[`aria-label`]||P?.props[`aria-labelledby`]),R=o||s,z=s&&l?l:F,B=l&&F&&!I&&(typeof F==`string`||typeof F==`number`)&&(typeof l==`string`||typeof l==`number`)?String(s?F:l):void 0,V=E===`_blank`&&!D?`noreferrer noopener`:D,H=g(X.button,X[t],X[n],X[r],X[i],x,{[X.disabled]:R,[X.loading]:s,[X.fullWidth]:v,[X.iconOnly]:I});je(!b||!T,`Button: pass href to the child element when using asChild.`),je(!b||!!P,`Button: asChild requires a single valid React element child.`),je(!I||L,`Button: icon-only buttons must provide aria-label or aria-labelledby.`);let U=e=>{e.preventDefault(),e.stopPropagation()},W=e=>{if(R){U(e);return}P?.props.onClick?.(e),e.defaultPrevented||S?.(e)},G=(0,d.jsxs)(d.Fragment,{children:[s&&(p?(0,d.jsx)(`span`,{className:X.icon,"aria-hidden":`true`,children:p}):(0,d.jsx)(`span`,{className:X.spinner,"aria-hidden":`true`})),!s&&u&&(0,d.jsx)(`span`,{className:X.icon,children:u}),z&&!I&&(0,d.jsx)(`span`,{className:X.label,"data-measure":B,children:(0,d.jsx)(`span`,{className:X.labelText,children:z})}),m&&!I&&(0,d.jsx)(`span`,{className:X.badge,children:m}),h&&!I&&(0,d.jsx)(`span`,{className:X.shortcut,children:h}),!s&&f&&(0,d.jsx)(`span`,{className:X.icon,children:f})]});return P?(0,c.cloneElement)(P,{...M,ref:N,"aria-busy":s||void 0,"aria-disabled":R||void 0,"aria-label":C||P.props[`aria-label`]||void 0,"aria-labelledby":w||P.props[`aria-labelledby`]||void 0,className:g(P.props.className,H),href:R?void 0:P.props.href,onClick:W,tabIndex:R?-1:P.props.tabIndex,title:_||P.props.title,children:G}):T?(0,d.jsx)(`a`,{ref:N,href:R?void 0:T,id:k,role:A,tabIndex:R?-1:j,target:E,rel:V,download:O,onClick:R?U:S,"aria-disabled":R||void 0,"aria-label":C||void 0,"aria-labelledby":w||void 0,"aria-busy":s||void 0,className:H,title:_,children:G}):(0,d.jsx)(`button`,{...M,ref:N,id:k,role:A,tabIndex:j,type:a,disabled:R,onClick:R?void 0:S,"aria-label":C||void 0,"aria-labelledby":w||void 0,"aria-busy":s||void 0,className:H,title:_,children:G})});Me.displayName=`Button`;var Z={wrapper:`_wrapper_wpr9s_1`,colorPrimary:`_colorPrimary_wpr9s_27`,colorNeutral:`_colorNeutral_wpr9s_45`,colorSuccess:`_colorSuccess_wpr9s_63`,colorWarning:`_colorWarning_wpr9s_81`,colorDanger:`_colorDanger_wpr9s_99`,labelStart:`_labelStart_wpr9s_115`,wrapperSm:`_wrapperSm_wpr9s_119`,wrapperMd:`_wrapperMd_wpr9s_125`,wrapperLg:`_wrapperLg_wpr9s_131`,iconOnly:`_iconOnly_wpr9s_137`,container:`_container_wpr9s_143`,containerSm:`_containerSm_wpr9s_150`,containerMd:`_containerMd_wpr9s_154`,containerLg:`_containerLg_wpr9s_158`,containerLabelStart:`_containerLabelStart_wpr9s_162`,descriptionText:`_descriptionText_wpr9s_162`,errorText:`_errorText_wpr9s_163`,input:`_input_wpr9s_167`,customCheckbox:`_customCheckbox_wpr9s_179`,requiredMark:`_requiredMark_wpr9s_194`,error:`_error_wpr9s_163`,checkmark:`_checkmark_wpr9s_210`,indeterminateMark:`_indeterminateMark_wpr9s_226`,customMark:`_customMark_wpr9s_239`,label:`_label_wpr9s_115`,labelSm:`_labelSm_wpr9s_270`,labelMd:`_labelMd_wpr9s_274`,labelLg:`_labelLg_wpr9s_278`,indeterminate:`_indeterminate_wpr9s_226`,"checkbox-pop":`_checkbox-pop_wpr9s_1`,disabled:`_disabled_wpr9s_354`},Ne={sm:Z.labelSm,md:Z.labelMd,lg:Z.labelLg},Pe={sm:Z.wrapperSm,md:Z.wrapperMd,lg:Z.wrapperLg},Fe={sm:Z.containerSm,md:Z.containerMd,lg:Z.containerLg},Ie={primary:Z.colorPrimary,neutral:Z.colorNeutral,success:Z.colorSuccess,warning:Z.colorWarning,danger:Z.colorDanger},Le=(0,c.forwardRef)(({id:e,label:t,description:n,icon:r,indeterminateIcon:i,checked:a,size:o=`md`,color:s=`primary`,labelPosition:l=`end`,defaultChecked:u=!1,disabled:f=!1,required:h=!1,indeterminate:_=!1,className:v,wrapperClassName:y,onCheckedChange:b,error:x,"aria-label":S,"aria-labelledby":C,"aria-describedby":w,...T},E)=>{let D=(0,c.useId)(),O=e??D,k=(0,c.useRef)(null),A=!!x,j=n?`${O}-description`:void 0,M=A?`${O}-error`:void 0,N=[w,j,M].filter(Boolean).join(` `),[P,F]=(0,p.useControllableState)({value:a,defaultValue:u,onChange:b}),I=(0,c.useCallback)(e=>{if(k.current=e,typeof E==`function`){E(e);return}E&&(E.current=e)},[E]);(0,c.useEffect)(()=>{k.current&&(k.current.indeterminate=_)},[_]);let L=e=>{F(e.target.checked)};return je(!!(t||S||C),`Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby.`),(0,d.jsxs)(`div`,{className:g(Z.container,Fe[o],l===`start`&&Z.containerLabelStart,v),children:[(0,d.jsxs)(`label`,{htmlFor:O,className:g(Z.wrapper,Pe[o],Ie[s],l===`start`&&Z.labelStart,!t&&Z.iconOnly,f&&Z.disabled,y),children:[(0,d.jsx)(`input`,{...T,ref:I,id:O,type:`checkbox`,checked:P,disabled:f,required:h,onChange:L,className:Z.input,"aria-label":S,"aria-labelledby":C,"aria-checked":_?`mixed`:T[`aria-checked`],"aria-invalid":A?!0:T[`aria-invalid`],"aria-describedby":N||void 0}),(0,d.jsx)(`span`,{className:g(Z.customCheckbox,A&&Z.error,_&&Z.indeterminate),"aria-hidden":`true`,children:_?(0,d.jsx)(`span`,{className:g(Z.indeterminateMark,i&&Z.customMark),children:i}):P&&(0,d.jsx)(`span`,{className:Z.checkmark,children:r??(0,d.jsx)(m.Check,{})})}),t&&(0,d.jsxs)(`span`,{className:g(Z.label,Ne[o]),children:[t,h&&(0,d.jsx)(`span`,{className:Z.requiredMark,"aria-hidden":`true`,children:`*`})]})]}),n&&(0,d.jsx)(`span`,{id:j,className:Z.descriptionText,children:n}),A&&(0,d.jsx)(`span`,{id:M,className:Z.errorText,children:x})]})});Le.displayName=`Checkbox`;var Q={inputWrapper:`_inputWrapper_13w4m_1`,input:`_input_13w4m_1`,error:`_error_13w4m_47`,sm:`_sm_13w4m_55`,md:`_md_13w4m_59`,lg:`_lg_13w4m_63`,hasLeftAdornment:`_hasLeftAdornment_13w4m_98`,hasRightAdornment:`_hasRightAdornment_13w4m_102`,leftAdornment:`_leftAdornment_13w4m_106`,rightAdornment:`_rightAdornment_13w4m_107`,clearButton:`_clearButton_13w4m_149`,toneDefault:`_toneDefault_13w4m_189`,tonePrimary:`_tonePrimary_13w4m_193`,toneSecondary:`_toneSecondary_13w4m_197`,toneSuccess:`_toneSuccess_13w4m_201`,toneDanger:`_toneDanger_13w4m_205`,toneMuted:`_toneMuted_13w4m_209`,toneInverse:`_toneInverse_13w4m_213`},Re={default:Q.toneDefault,primary:Q.tonePrimary,secondary:Q.toneSecondary,success:Q.toneSuccess,danger:Q.toneDanger,muted:Q.toneMuted,inverse:Q.toneInverse},ze=(e=`text`,t)=>{if(t)return t;switch(e){case`email`:return`email`;case`password`:return`current-password`;case`tel`:return`tel`;case`url`:return`url`;case`search`:return`off`;default:return}},Be=(0,c.forwardRef)(({id:e,label:t,name:n,description:r,placeholder:i,value:a,defaultValue:o,onChange:s,type:l=`text`,size:u=`md`,error:f,disabled:p=!1,required:m=!1,className:h,autoComplete:_,readOnly:v=!1,clearable:y=!1,onClear:b,leftAdornment:x,rightAdornment:S,clearIcon:C,leftAdornmentTone:w=`default`,rightAdornmentTone:T=`default`,clearIconTone:E=`danger`,autoFocus:D,maxLength:O,onMouseEnter:k,onMouseLeave:A,"aria-describedby":j,"aria-invalid":M,...N},P)=>{let F=(0,c.useId)(),I=e??F,L=(0,c.useRef)(null),[R,z]=(0,c.useState)(o??``),B=a!==void 0,V=B?a:R,H=V!==``,U=ze(l,_),W=y&&H&&!p&&!v,G=[j,r?`${I}-description`:void 0,f?`${I}-error`:void 0].filter(Boolean).join(` `),ee=C??`×`,te=(0,c.useCallback)(e=>{if(L.current=e,typeof P==`function`){P(e);return}P&&(P.current=e)},[P]),K=(0,c.useCallback)(e=>{let t=e.target.value;B||z(t),s?.(e)},[B,s]),ne=(0,c.useCallback)(()=>{B||z(``),b?.(),L.current?.focus()},[B,b]),re=!W&&!!S;return(0,d.jsx)(ue,{id:I,label:t,description:r,error:f,required:m,disabled:p,children:(0,d.jsxs)(`div`,{className:g(Q.inputWrapper,{[Q.hasLeftAdornment]:!!x,[Q.hasRightAdornment]:!!S||W}),children:[x&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:g(Q.leftAdornment,Re[w]),children:x}),(0,d.jsx)(`input`,{...N,ref:te,id:I,name:n,type:l,autoComplete:U,className:g(Q.input,Q[u],{[Q.error]:!!f},h),value:V,onChange:K,placeholder:i,disabled:p,readOnly:v,required:m,autoFocus:D,maxLength:O,"aria-invalid":f?!0:M,"aria-describedby":G||void 0,onMouseEnter:k,onMouseLeave:A}),W&&(0,d.jsx)(`button`,{type:`button`,className:g(Q.clearButton,Re[E]),onClick:ne,"aria-label":`Clear input`,children:ee}),re&&(0,d.jsx)(`div`,{className:g(Q.rightAdornment,Re[T]),children:S})]})})});Be.displayName=`Input`;var $={root:`_root_qb9nm_1`,invalid:`_invalid_qb9nm_27`,control:`_control_qb9nm_27`,label:`_label_qb9nm_30`,wrapper:`_wrapper_qb9nm_33`,input:`_input_qb9nm_34`,disabled:`_disabled_qb9nm_37`,description:`_description_qb9nm_45`,colorPrimary:`_colorPrimary_qb9nm_49`,colorNeutral:`_colorNeutral_qb9nm_65`,colorSuccess:`_colorSuccess_qb9nm_81`,colorWarning:`_colorWarning_qb9nm_97`,colorDanger:`_colorDanger_qb9nm_113`,sm:`_sm_qb9nm_129`,md:`_md_qb9nm_138`,lg:`_lg_qb9nm_147`,indicator:`_indicator_qb9nm_202`,customIcon:`_customIcon_qb9nm_216`,content:`_content_qb9nm_335`,error:`_error_qb9nm_352`},Ve={primary:$.colorPrimary,neutral:$.colorNeutral,success:$.colorSuccess,warning:$.colorWarning,danger:$.colorDanger},He=(0,c.forwardRef)(({value:e,checked:t,defaultChecked:n=!1,disabled:r=!1,required:i=!1,size:a,color:o,error:s,onCheckedChange:l,label:u,description:f,icon:m,wrapperClassName:h,className:_,id:v,name:y,"aria-describedby":b,...x},S)=>{let C=ce(),w=(0,c.useId)(),T=v??w,E=f?`${T}-description`:void 0,D=s?`${T}-error`:void 0,O=[E,D,C?.describedBy,b].filter(Boolean).join(` `)||void 0,k=C!==null,[A,j]=(0,p.useControllableState)({value:t,defaultValue:n,onChange:l}),M=k?C.value===e:A,N=!!C?.disabled||r,P=!!C?.required||i,F=C?.name??y,I=!!(s||C?.invalid),L=a??C?.size??`md`,R=o??C?.color??`primary`,z=t=>{if(!N){if(k){C.onValueChange(e);return}j(t.currentTarget.checked)}};return(0,d.jsxs)(`div`,{className:g($.root,$[L],I&&$.invalid,N&&$.disabled,Ve[R],_),children:[(0,d.jsxs)(`label`,{htmlFor:T,className:g($.wrapper,h),children:[(0,d.jsx)(`input`,{...x,ref:S,id:T,type:`radio`,name:F,value:e,checked:M,disabled:N,required:P,"aria-invalid":I||void 0,"aria-describedby":O,className:$.input,onChange:z}),(0,d.jsx)(`span`,{className:$.control,"aria-hidden":`true`,children:(0,d.jsx)(`span`,{className:g($.indicator,m&&$.customIcon),children:m})}),(u||f)&&(0,d.jsxs)(`span`,{className:$.content,children:[u&&(0,d.jsx)(`span`,{className:$.label,children:u}),f&&(0,d.jsx)(`span`,{id:E,className:$.description,children:f})]})]}),s&&(0,d.jsx)(`div`,{id:D,className:$.error,children:s})]})});He.displayName=`Radio`;var Ue=(0,c.createContext)(null),We=e=>e===`highContrast`?`high-contrast`:e,Ge=({theme:e,defaultTheme:t=`light`,onThemeChange:n,children:r})=>{let[i,a]=(0,p.useControllableState)({value:e,defaultValue:t,onChange:n}),o=We(i);(0,c.useEffect)(()=>{if(typeof document>`u`)return;let{documentElement:e}=document,t=e.dataset.velliraTheme;return e.dataset.velliraTheme=o,()=>{if(t===void 0){delete e.dataset.velliraTheme;return}e.dataset.velliraTheme=t}},[o]);let s=(0,c.useMemo)(()=>({theme:i,setTheme:a}),[i,a]);return(0,d.jsx)(Ue.Provider,{value:s,children:(0,d.jsx)(`div`,{"data-vellira-theme":o,children:r})})};Ge.displayName=`ThemeProvider`;function Ke(){let e=(0,c.useContext)(Ue);if(!e)throw Error(`useTheme must be used within ThemeProvider.`);return e}exports.Button=Me,exports.Checkbox=Le,exports.Dropdown=F,exports.FormField=ue,exports.Input=Be,exports.Modal=ae,exports.Radio=He,exports.RadioGroup=le,exports.Select=ge,exports.Tabs=De,exports.ThemeProvider=Ge,exports.Tooltip=Ae,exports.useTheme=Ke;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react"),l=require("clsx");l=s(l,1);let u=require("react-dom"),d=require("react/jsx-runtime"),f=require("@floating-ui/react"),p=require("@vellira-ui/core"),m=require("@vellira-ui/icons"),h=require("focus-trap-react");h=s(h,1);var g=(...e)=>(0,l.default)(e),_=({children:e})=>{let[t,n]=(0,c.useState)(!1);if((0,c.useEffect)(()=>{n(!0)},[]),!t)return null;let r=document.getElementById(`overlay-root`)??document.body;return r?(0,u.createPortal)(e,r):null},v={dropdown:`_dropdown_1rvx9_1`,"dropdown-in":`_dropdown-in_1rvx9_1`},y=(0,c.forwardRef)(({children:e,floatingStyles:t,menuId:n,labelledById:r,label:i,activeDescendantId:a,onKeyDown:o,className:s},c)=>(0,d.jsx)(_,{children:(0,d.jsx)(`ul`,{ref:c,id:n,role:`menu`,tabIndex:-1,"aria-labelledby":r,"aria-label":r?void 0:i,"aria-activedescendant":a,onKeyDown:o,style:t,className:g(v.dropdown,s),children:e})}));y.displayName=`DropdownContent`;var b=e=>{let[t,n]=(0,c.useState)(()=>typeof window>`u`||typeof window.matchMedia!=`function`||!e?!1:window.matchMedia(`(max-width: ${e}px)`).matches);return(0,c.useEffect)(()=>{if(typeof window>`u`||typeof window.matchMedia!=`function`||!e)return;let t=window.matchMedia(`(max-width: ${e}px)`),r=()=>n(t.matches);return r(),t.addEventListener(`change`,r),()=>{t.removeEventListener(`change`,r)}},[e]),t},x=({open:e,onOpenChange:t,placement:n=`bottom-start`,strategy:r=`fixed`,matchTriggerWidth:i=!1,mobileSheetBreakpoint:a,middleware:o=[]}={})=>{let s=b(a),{refs:l,floatingStyles:u,update:d,context:p,middlewareData:m,placement:h}=(0,f.useFloating)({open:e,onOpenChange:t,placement:n,strategy:r,transform:!1,middleware:(0,c.useMemo)(()=>[(0,f.offset)(2),(0,f.flip)(),(0,f.size)({apply({rects:e,elements:t}){!i||s||Object.assign(t.floating.style,{width:`${e.reference.width}px`})}}),(0,f.shift)({padding:8}),...o],[o,s,i]),whileElementsMounted:f.autoUpdate});return(0,c.useEffect)(()=>{s&&l.floating.current?.style.removeProperty(`width`)},[s,l.floating]),{context:p,placement:h,middlewareData:m,floatingStyles:s?{}:u,isMobileSheet:s,setRef:l.setReference,setFloatingRef:l.setFloating,updatePosition:d}},S=(e,t,n=!0)=>{let r=(0,c.useRef)(e);r.current=e;let i=(0,c.useRef)(t);i.current=t,(0,c.useEffect)(()=>{if(!n)return;let e=e=>{let t=e.target;r.current.every(e=>e.current&&!e.current.contains(t))&&i.current()};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[n])},C={group:`_group_aviwv_1`},w=({label:e})=>(0,d.jsx)(`li`,{role:`presentation`,className:C.group,children:e}),T={item:`_item_re11y_1`,disabled:`_disabled_re11y_21`,active:`_active_re11y_34`,danger:`_danger_re11y_40`,itemIcon:`_itemIcon_re11y_62`,itemShortcut:`_itemShortcut_re11y_63`,itemText:`_itemText_re11y_82`,"itemText--truncate":`_itemText--truncate_re11y_88`,"itemText--wrap":`_itemText--wrap_re11y_93`,"itemText--nowrap":`_itemText--nowrap_re11y_97`},E=({id:e,children:t,label:n,icon:r,danger:i,disabled:a,active:o,onClick:s,onMouseEnter:c,shortcut:l,textWrap:u=`truncate`,className:f})=>{let p=t||n;return(0,d.jsxs)(`li`,{id:e,role:`menuitem`,tabIndex:-1,"aria-disabled":a||void 0,"data-active":o||void 0,"data-danger":i||void 0,onClick:a?void 0:s,onMouseEnter:a?void 0:c,className:g(T.item,{[T.active]:o,[T.disabled]:a,[T.danger]:i},f),children:[r&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:T.itemIcon,children:r}),p&&(0,d.jsx)(`span`,{className:g(T.itemText,T[`itemText--${u}`]),children:p}),l&&(0,d.jsx)(`span`,{className:T.itemShortcut,children:l})]})},D={separator:`_separator_1v11r_1`},O=()=>(0,d.jsx)(`li`,{role:`separator`,className:D.separator,"aria-hidden":`true`}),k={button:`_button_18ucr_1`,disabled:`_disabled_18ucr_20`,iconLeft:`_iconLeft_18ucr_32`,arrow:`_arrow_18ucr_44`,iconOnly:`_iconOnly_18ucr_47`,sm:`_sm_18ucr_60`,md:`_md_18ucr_72`,lg:`_lg_18ucr_84`,open:`_open_18ucr_123`},A=(0,c.forwardRef)(({children:e,isOpen:t,icon:n,arrowIcon:r,showArrow:i=!0,rotateAngle:a=90,size:o=`md`,label:s,ariaLabel:c,className:l,...u},f)=>{let p=!!n,h=!!e,_=p&&!h,v=i&&h,y=r??(0,d.jsx)(m.ChevronDown,{}),b=c??(_?typeof s==`string`?s:`Open menu`:void 0);return(0,d.jsxs)(`button`,{...u,ref:f,type:`button`,className:g(k.button,k[o],{[k.disabled]:u.disabled,[k.iconOnly]:_},l),"aria-label":b,"aria-expanded":t,"aria-haspopup":`menu`,style:{"--dropdown-rotate-angle":`${a}deg`},children:[p&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:k.iconLeft,children:n}),e,v&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:g(k.arrow,{[k.open]:t}),children:y})]})});A.displayName=`DropdownTrigger`;var j=e=>e.type===void 0||e.type===`item`,M=e=>e.type===`group`,N=e=>e.type===`separator`,P={wrapper:`_wrapper_14ue8_1`},F=({label:e,ariaLabel:t,icon:n,trigger:r,items:i=[],onSelect:a,open:o,defaultOpen:s=!1,onOpenChange:l,size:u=`md`,className:f,triggerClassName:m,contentClassName:h,itemClassName:_,disabled:v,rotateAngle:b=90,placement:C,matchTriggerWidth:T,textWrap:D,showArrow:k=!0,arrowIcon:F})=>{let I=(0,c.useRef)(null),L=(0,c.useRef)(null),R=(0,c.useId)(),z=`${R}-trigger`,{floatingStyles:ee,setRef:te,setFloatingRef:ne}=x({placement:C,matchTriggerWidth:T,mobileSheetBreakpoint:640}),B=(0,c.useMemo)(()=>i.flatMap((e,t)=>j(e)?[{item:e,itemIndex:t}]:[]),[i]),re=(0,c.useMemo)(()=>B.map(({item:e})=>e),[B]),ie=(0,c.useMemo)(()=>new Map(B.map(({itemIndex:e},t)=>[e,t])),[B]),{activeIndex:ae,setActiveIndex:oe,isOpen:V,closeDropdown:se,toggleDropdown:H,selectItem:ce,onKeyDown:U}=(0,p.useDropdown)({items:re,open:o,defaultOpen:s,disabled:v,onOpenChange:l,onSelect:(0,c.useCallback)(e=>{a?.(e),I.current?.focus()},[a]),getItemValue:e=>e.value,getItemText:e=>typeof e.label==`string`?e.label:e.value}),W=V&&ae>=0?`${R}-item-${ae}`:void 0;S([I,L],se,V);let le=(0,c.useCallback)(e=>{U(e),V&&e.key===`Escape`&&I.current?.focus()},[V,U]),ue=(0,c.useCallback)(e=>{I.current=e,te(e)},[te]),G=(0,c.useCallback)(e=>{L.current=e,ne(e),e?.focus()},[ne]);return(0,d.jsxs)(`div`,{className:g(P.wrapper,f),children:[(0,d.jsx)(A,{ref:ue,id:z,isOpen:V,disabled:v,size:u,icon:n,label:e,ariaLabel:t,showArrow:k,arrowIcon:F,rotateAngle:b,className:m,onClick:H,onKeyDown:le,"aria-expanded":V,"aria-haspopup":`menu`,...V&&{"aria-controls":R},children:r}),V&&(0,d.jsx)(y,{ref:G,floatingStyles:ee,menuId:R,labelledById:r?z:void 0,label:t??(!r&&typeof e==`string`?e:void 0),activeDescendantId:W,onKeyDown:le,className:h,children:i.map((e,t)=>{if(M(e))return(0,d.jsx)(w,{label:e.label},`group-${e.label}`);if(N(e))return(0,d.jsx)(O,{},`separator-${t}`);if(j(e)){let n=ie.get(t)??-1;return(0,d.jsx)(E,{id:`${R}-item-${n}`,...e,active:ae===n,textWrap:e.textWrap||D,className:_,onClick:()=>{ce(e),I.current?.focus()},onMouseEnter:()=>{n<0||e.disabled||oe(n)},children:e.label},`${e.value}-${t}`)}})})]})},I=(0,c.createContext)(void 0),L=()=>{let e=(0,c.useContext)(I);if(e===void 0)throw Error(`Modal compound components must be used inside Modal`);return e};I.displayName=`ModalContext`;var R={modalBody:`_modalBody_iv33a_1`},z=({children:e})=>{let{descriptionId:t}=L();return(0,d.jsx)(`div`,{id:t,className:R.modalBody,children:e})};z.displayName=`ModalBody`;var ee={content:`_content_k44g7_1`},te=({children:e})=>(0,d.jsx)(`div`,{className:ee.content,children:e});te.displayName=`ModalContent`;var ne={modalFooter:`_modalFooter_ezys6_1`},B=({children:e})=>(0,d.jsx)(`div`,{className:ne.modalFooter,children:e});B.displayName=`ModalFooter`;var re={modalHeader:`_modalHeader_p8xf1_1`,modalHeaderTitle:`_modalHeaderTitle_p8xf1_7`,modalHeaderCloseButton:`_modalHeaderCloseButton_p8xf1_14`},ie=({children:e})=>{let{onClose:t,titleId:n}=L();return(0,d.jsxs)(`div`,{className:re.modalHeader,children:[(0,d.jsx)(`h2`,{id:n,className:re.modalHeaderTitle,children:e}),t&&(0,d.jsx)(`button`,{type:`button`,className:re.modalHeaderCloseButton,onClick:t,"aria-label":`Close modal`,children:(0,d.jsx)(m.Close,{size:16})})]})};ie.displayName=`ModalHeader`;var ae=({isOpen:e,onClose:t})=>{let n=(0,c.useCallback)(n=>{e&&n.key===`Escape`&&(n.preventDefault(),t?.())},[e,t]);(0,c.useEffect)(()=>(document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)),[n])},oe={overlay:`_overlay_dcudn_1`,"overlay--open":`_overlay--open_dcudn_14`,modal:`_modal_dcudn_20`,"overlay--animated":`_overlay--animated_dcudn_28`},V=0,se=``,H=({children:e,onClose:t,isOpen:n,className:r,closeOnBackdrop:i,closeOnClick:a,closeOnEsc:o=!0,zIndex:s=1e3,animated:l=!0})=>{let u=i??a??!0,f=(0,c.useRef)(null),{titleId:p,descriptionId:m}=L(),v=(0,c.useCallback)(e=>{u&&e.target===e.currentTarget&&t?.()},[u,t]);return ae({isOpen:n,onClose:o?t:void 0}),(0,c.useEffect)(()=>{if(n)return V===0&&(se=document.body.style.overflow),V+=1,document.body.style.overflow=`hidden`,()=>{V=Math.max(0,V-1),V===0&&(document.body.style.overflow=se)}},[n]),!n&&!l?null:(0,d.jsx)(_,{children:(0,d.jsx)(`div`,{className:g(oe.overlay,n&&oe[`overlay--open`],l&&oe[`overlay--animated`],r),onClick:v,tabIndex:-1,role:`presentation`,"aria-hidden":!n,style:{zIndex:s},children:(0,d.jsx)(h.default,{active:n,focusTrapOptions:{fallbackFocus:()=>f.current,returnFocusOnDeactivate:!0,allowOutsideClick:!0},children:(0,d.jsx)(`div`,{ref:f,tabIndex:-1,className:oe.modal,role:`dialog`,"aria-modal":`true`,"aria-labelledby":p,"aria-describedby":m,children:e})})})})};H.displayName=`ModalOverlay`;var ce=({isOpen:e,children:t,onClose:n,closeOnBackdrop:r,closeOnClick:i,closeOnEsc:a=!0})=>{let o=(0,p.useModal)({isOpen:e,onClose:n,closeOnBackdrop:r,closeOnClick:i,closeOnEsc:a});return o.shouldRender?(0,d.jsx)(I.Provider,{value:{onClose:o.onClose,titleId:o.titleId,descriptionId:o.descriptionId},children:(0,d.jsx)(H,{isOpen:o.isOpen,onClose:o.onClose,closeOnBackdrop:o.closeOnBackdrop,closeOnEsc:o.closeOnEsc,children:(0,d.jsx)(te,{children:t})})}):null};ce.displayName=`Modal`;var U=Object.assign(ce,{Header:ie,Body:z,Content:te,Footer:B}),W=(0,c.createContext)(null),le=W.Provider;function ue(){return(0,c.useContext)(W)}var G={root:`_root_1n02e_1`,label:`_label_1n02e_9`,required:`_required_1n02e_21`,description:`_description_1n02e_26`,items:`_items_1n02e_34`,vertical:`_vertical_1n02e_39`,horizontal:`_horizontal_1n02e_45`,error:`_error_1n02e_51`,disabled:`_disabled_1n02e_59`,invalid:`_invalid_1n02e_75`},de=(0,c.forwardRef)(({value:e,defaultValue:t=``,onValueChange:n,disabled:r=!1,required:i=!1,size:a=`md`,color:o=`primary`,name:s,label:l,description:u,error:f,orientation:m=`vertical`,children:h,className:_,id:v,...y},b)=>{let x=(0,c.useId)(),S=v??x,C=l?`${S}-label`:void 0,w=u?`${S}-description`:void 0,T=f?`${S}-error`:void 0,E=[w,T].filter(Boolean).join(` `)||void 0,D=s??`${S}-radio`,[O,k]=(0,p.useControllableState)({value:e,defaultValue:t,onChange:n}),A=!!f;return(0,d.jsxs)(`div`,{...y,ref:b,id:S,role:`radiogroup`,"aria-labelledby":C,"aria-describedby":E,"aria-disabled":r||void 0,"aria-required":i||void 0,"aria-invalid":A||void 0,className:g(G.root,A&&G.invalid,r&&G.disabled,_),children:[l&&(0,d.jsxs)(`div`,{id:C,className:G.label,children:[l,i&&(0,d.jsx)(`span`,{className:G.required,"aria-hidden":`true`,children:`*`})]}),u&&(0,d.jsx)(`div`,{id:w,className:G.description,children:u}),(0,d.jsx)(le,{value:{name:D,value:O,disabled:r,required:i,invalid:A,size:a,color:o,describedBy:E,onValueChange:k},children:(0,d.jsx)(`div`,{className:g(G.items,G[m]),children:h})}),f&&(0,d.jsx)(`div`,{id:T,className:G.error,children:f})]})});de.displayName=`RadioGroup`;var fe=(0,c.createContext)(null),pe=()=>(0,c.useContext)(fe),K={wrapper:`_wrapper_143kr_1`,sm:`_sm_143kr_41`,md:`_md_143kr_78`,lg:`_lg_143kr_115`,horizontal:`_horizontal_143kr_152`,start:`_start_143kr_153`,description:`_description_143kr_160`,control:`_control_143kr_161`,errorText:`_errorText_143kr_162`,label:`_label_143kr_169`,labelText:`_labelText_143kr_186`,required:`_required_143kr_190`,optional:`_optional_143kr_194`,labelInfo:`_labelInfo_143kr_201`,disabled:`_disabled_143kr_243`},me=(...e)=>e.filter(Boolean).join(` `)||void 0,he=({id:e,label:t,description:n,error:r,required:i=!1,disabled:a=!1,invalid:o=!1,orientation:s=`vertical`,labelPosition:l=`top`,size:u=`md`,labelInfo:f,optionalText:p,children:m,bindControl:h=!0,className:_,controlClassName:v,labelClassName:y,descriptionClassName:b,errorClassName:x,...S})=>{let C=(0,c.useId)(),w=e??C,T=t?`${w}-label`:void 0,E=n&&w?`${w}-description`:void 0,D=r&&w?`${w}-error`:void 0,O=o||!!r,k=me(T),A=me(E,D),j={controlId:w,labelId:T,descriptionId:E,errorId:D,required:i,disabled:a,invalid:O,size:u,ariaLabelledBy:k,ariaDescribedBy:A},M=(0,c.isValidElement)(m)?m:void 0,N=h&&M?(0,c.cloneElement)(M,{id:M.props.id??w,required:M.props.required??i,disabled:M.props.disabled??a,"aria-invalid":M.props[`aria-invalid`]??(O||void 0),"aria-labelledby":me(M.props[`aria-labelledby`],k),"aria-describedby":me(M.props[`aria-describedby`],A)}):m;return(0,d.jsxs)(`div`,{...S,"aria-disabled":a||void 0,className:g(K.wrapper,K[s],K[l],K[u],a&&K.disabled,_),"data-disabled":a||void 0,"data-invalid":O||void 0,"data-orientation":s,"data-size":u,children:[t&&(0,d.jsxs)(`label`,{id:T,htmlFor:w,className:g(K.label,y),children:[(0,d.jsx)(`span`,{className:K.labelText,children:t}),i&&(0,d.jsx)(`span`,{className:K.required,"aria-hidden":`true`,children:`*`}),!i&&p&&(0,d.jsx)(`span`,{className:K.optional,children:p}),f&&(0,d.jsx)(`span`,{className:K.labelInfo,children:f})]}),n&&(0,d.jsx)(`div`,{id:E,className:g(K.description,b),children:n}),(0,d.jsx)(fe.Provider,{value:j,children:(0,d.jsx)(`div`,{className:g(K.control,v),children:N})}),r&&(0,d.jsx)(`div`,{id:D,className:g(K.errorText,x),role:`alert`,children:r})]})},q={option:`_option_l6qjj_1`,selected:`_selected_l6qjj_18`,disabled:`_disabled_l6qjj_18`,active:`_active_l6qjj_34`,label:`_label_l6qjj_46`,check:`_check_l6qjj_54`},ge=({option:e,isSelected:t,isActive:n,optionId:r,onSelect:i,onMouseEnter:a})=>{let o=!!e.disabled;return(0,d.jsxs)(`li`,{id:r,role:`option`,"aria-selected":t,"aria-disabled":o||void 0,className:g(q.option,{[q.selected]:t,[q.active]:n,[q.disabled]:o}),onClick:()=>{o||i(e.value)},onMouseEnter:()=>{o||a()},children:[(0,d.jsx)(`span`,{className:q.label,children:e.label}),(0,d.jsx)(`span`,{className:q.check,"aria-hidden":`true`,children:t&&(0,d.jsx)(m.Check,{})})]})};ge.displayName=`SelectOption`;var _e={dropdown:`_dropdown_qznlq_1`,dropdownIn:`_dropdownIn_qznlq_1`,empty:`_empty_qznlq_17`},ve=({isOpen:e,listboxId:t,labelledById:n,setDropdownRef:r,style:i,options:a,noOptionsText:o,selectedValue:s,activeIndex:c,className:l,onSelect:u,onMouseEnter:f})=>e?(0,d.jsx)(_,{children:(0,d.jsx)(`ul`,{ref:r,id:t,role:`listbox`,"aria-labelledby":n,className:[_e.dropdown,l].filter(Boolean).join(` `),style:i,children:a.length?a.map((e,n)=>(0,d.jsx)(ge,{option:e,isSelected:e.value===s,isActive:n===c,optionId:`${t}-option-${n}`,onSelect:u,onMouseEnter:()=>f(n)},e.value)):(0,d.jsx)(`li`,{role:`option`,"aria-disabled":`true`,"aria-selected":`false`,className:_e.empty,children:o})})}):null;ve.displayName=`SelectDropdown`;var J={control:`_control_1xma1_1`,disabled:`_disabled_1xma1_18`,arrow:`_arrow_1xma1_23`,sm:`_sm_1xma1_34`,md:`_md_1xma1_41`,lg:`_lg_1xma1_48`,value:`_value_1xma1_55`,placeholder:`_placeholder_1xma1_63`,error:`_error_1xma1_67`,open:`_open_1xma1_109`},ye=({id:e,errorId:t,isOpen:n,disabled:r,required:i,listboxId:a,activeIndex:o,ariaLabel:s,error:c,displayText:l,isPlaceholder:u,size:f=`md`,className:p,buttonRef:h,onClick:_,onKeyDown:v,onBlur:y,onFocus:b})=>(0,d.jsxs)(`button`,{id:e,ref:h,type:`button`,role:`combobox`,disabled:r,"aria-disabled":r||void 0,"aria-required":i||void 0,"aria-expanded":n,"aria-haspopup":`listbox`,"aria-label":s,"aria-invalid":c||void 0,"aria-controls":n?a:void 0,"aria-describedby":t,"aria-activedescendant":n&&o>=0?`${a}-option-${o}`:void 0,className:g(J.control,J[f],{[J.error]:!!c,[J.disabled]:r},p),onClick:_,onKeyDown:v,onBlur:y,onFocus:b,children:[(0,d.jsx)(`span`,{className:g(J.value,{[J.placeholder]:u}),children:l}),(0,d.jsx)(`span`,{className:g(J.arrow,{[J.open]:n}),"aria-hidden":`true`,children:(0,d.jsx)(m.ChevronDown,{})})]});ye.displayName=`SelectTrigger`;var be=({label:e,description:t,id:n,name:r,"aria-label":i,value:a,defaultValue:o,onChange:s,options:l,placeholder:u=`Select...`,noOptionsText:f=`No options available`,size:m=`md`,required:h=!1,disabled:g=!1,error:_,placement:v=`bottom-start`,matchTriggerWidth:y=!0,open:b,defaultOpen:C=!1,onOpenChange:w,onBlur:T,onFocus:E,className:D,triggerClassName:O,dropdownClassName:k})=>{let A=(0,c.useId)(),j=n??A,M=`${j}-listbox`,N=!!_,P=N?`${j}-error`:void 0,F=(0,c.useRef)(null),I=(0,c.useRef)(null),{selectedValue:L,selectedOption:R,isOpen:z,setIsOpen:ee,activeIndex:te,setActiveIndex:ne,closeDropdown:B,toggleDropdown:re,selectValue:ie,onKeyDown:ae}=(0,p.useSelect)({value:a,defaultValue:o,onChange:s,options:l,disabled:g,open:b,defaultOpen:C,onOpenChange:w}),oe=!!R,{floatingStyles:V,setRef:se,setFloatingRef:H}=x({open:z,onOpenChange:ee,placement:v,matchTriggerWidth:y,mobileSheetBreakpoint:640}),ce=(0,c.useCallback)(e=>{ie(e),F.current?.focus()},[ie]);S([F,I],B,z);let U=(0,c.useCallback)(e=>{F.current=e,se(e)},[se]),W=(0,c.useCallback)(e=>{I.current=e,H(e)},[H]);return(0,d.jsxs)(he,{id:j,label:e,description:t,error:_,required:h,disabled:g,className:D,children:[(0,d.jsx)(ye,{id:j,errorId:P,isOpen:z,disabled:g,required:h,listboxId:M,activeIndex:te,ariaLabel:i??(e?void 0:R?.label||u),error:N,displayText:R?.label??u,isPlaceholder:!oe,size:m,className:O,buttonRef:U,onClick:re,onKeyDown:ae,onBlur:T,onFocus:E}),r&&(0,d.jsx)(`input`,{type:`hidden`,name:r,value:L,disabled:g}),(0,d.jsx)(ve,{isOpen:z,listboxId:M,labelledById:j,style:V,options:l,noOptionsText:f,selectedValue:L,activeIndex:te,className:k,setDropdownRef:W,onSelect:ce,onMouseEnter:ne})]})};be.displayName=`Select`;var xe=(0,c.createContext)(null),Se=()=>{let e=(0,c.useContext)(xe);if(!e)throw Error(`Tabs components must be used inside Tabs`);return e},Ce={list:`_list_13hkl_1`,vertical:`_vertical_13hkl_8`},we=({children:e,className:t,...n})=>{let{orientation:r,appearance:i}=Se();return(0,d.jsx)(`div`,{...n,role:`tablist`,"aria-orientation":r,className:g(Ce.list,r===`vertical`&&Ce.vertical,i===`underline`&&Ce.underline,i===`pills`&&Ce.pills,t),children:e})};we.displayName=`TabsList`;var Te={panel:`_panel_1v1a9_1`,visible:`_visible_1v1a9_10`,vertical:`_vertical_1v1a9_14`},Ee=({index:e,children:t,className:n})=>{let{activeIndex:r,orientation:i}=Se(),[a,o]=(0,c.useState)(!1),s=r===e;return(0,c.useEffect)(()=>{if(!s){o(!1);return}let e=setTimeout(()=>o(!0),10);return()=>clearTimeout(e)},[s]),(0,d.jsx)(`div`,{role:`tabpanel`,id:`tab-panel-${e}`,"aria-labelledby":`tab-${e}`,hidden:!s,tabIndex:0,className:g(Te.panel,a&&Te.visible,i===`vertical`&&Te.vertical,n),children:t})};Ee.displayName=`TabsPanel`;var Y={tab:`_tab_qe8xc_1`,iconOnly:`_iconOnly_qe8xc_27`,tabIcon:`_tabIcon_qe8xc_31`,label:`_label_qe8xc_45`,default:`_default_qe8xc_51`,underline:`_underline_qe8xc_60`,pills:`_pills_qe8xc_92`,vertical:`_vertical_qe8xc_106`},De=(0,c.forwardRef)(({index:e,children:t,className:n,disabled:r=!1,icon:i,onClick:a,onKeyDown:o,...s},l)=>{let{activeIndex:u,setActiveIndex:f,orientation:p,appearance:m=`default`,registerTab:h,onTabKeyDown:_}=Se(),v=u===e,y=!!i,b=y&&t==null;return(0,d.jsxs)(`button`,{type:`button`,ref:(0,c.useCallback)(t=>{h(e,t),typeof l==`function`?l(t):l&&(l.current=t)},[h,e,l]),role:`tab`,"aria-selected":v,"aria-controls":`tab-panel-${e}`,id:`tab-${e}`,disabled:r,tabIndex:v?0:-1,className:g(Y.tab,Y[m],p===`vertical`&&Y.vertical,y&&Y.withIcon,b&&Y.iconOnly,n),onClick:t=>{r||(f(e),a?.(t))},onKeyDown:e=>{_(e),o?.(e)},...s,children:[y&&(0,d.jsx)(`span`,{className:Y.tabIcon,"aria-hidden":`true`,children:i}),t!=null&&(0,d.jsx)(`span`,{className:Y.label,children:t})]})});De.displayName=`Tab`;var Oe={tabs:`_tabs_uqy7q_1`,vertical:`_vertical_uqy7q_5`},ke=({children:e,activeIndex:t,defaultActiveIndex:n=0,onChange:r,orientation:i=`horizontal`,appearance:a=`default`,className:o})=>{let{activeIndex:s,setActiveIndex:l}=(0,p.useTabs)({activeIndex:t,defaultActiveIndex:n,onChange:r}),u=(0,c.useRef)([]),f=(0,c.useCallback)((e,t)=>{u.current[e]=t},[]),{onKeyDown:m}=(0,p.useTabsKeyboard)({activeIndex:s,setActiveIndex:l,tabRefs:u,orientation:i,onNavigate:e=>{u.current[e]?.focus()}}),h={activeIndex:s,setActiveIndex:l,orientation:i,appearance:a,registerTab:f,onTabKeyDown:m};return(0,d.jsx)(xe.Provider,{value:h,children:(0,d.jsx)(`div`,{className:g(Oe.tabs,i===`vertical`&&Oe.vertical,o),children:e})})};ke.displayName=`Tabs`;var Ae=Object.assign(ke,{List:we,Tab:De,Panel:Ee}),je={tooltip:`_tooltip_10opu_1`,arrow:`_arrow_10opu_25`},Me=(0,c.forwardRef)(({content:e,placement:t=`top`,arrowRef:n,arrowX:r,arrowY:i,className:a,style:o,...s},c)=>{let l={top:`bottom`,right:`left`,bottom:`top`,left:`right`}[t.split(`-`)[0]],u={position:`absolute`,pointerEvents:`none`,left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[l]:`-5px`};return(0,d.jsxs)(`div`,{ref:c,className:g(je.tooltip,a),"data-placement":t,"data-state":`open`,style:o,...s,children:[e,(0,d.jsx)(`div`,{ref:n,className:je.arrow,style:u})]})});Me.displayName=`TooltipContent`;var Ne=({children:e,placement:t=`top`,content:n,disabled:r=!1,delay:i={open:300,close:100},maxWidth:a=250,className:o,onOpenChange:s})=>{let[l,u]=(0,c.useState)(!1),p=(0,c.useRef)(null),m=(0,c.useId)(),{context:h,floatingStyles:g,middlewareData:_,setRef:v,setFloatingRef:y,placement:b}=x({open:l,onOpenChange:e=>{r||(u(e),s?.(e))},placement:t,middleware:[(0,f.arrow)({element:p})]}),S=_.arrow?.x,C=_.arrow?.y,{getReferenceProps:w,getFloatingProps:T}=(0,f.useInteractions)([(0,f.useHover)(h,{delay:{open:i.open,close:i.close}}),(0,f.useFocus)(h)]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`div`,{ref:v,style:{display:`inline-flex`},"aria-describedby":l?m:void 0,...w(),children:e}),(0,d.jsx)(f.FloatingPortal,{children:l&&n&&(0,d.jsx)(Me,{id:m,ref:y,content:n,arrowRef:p,arrowX:S,arrowY:C,role:`tooltip`,style:{...g,maxWidth:typeof a==`number`?`${a}px`:a},placement:b,className:o,...T()})})]})};Ne.displayName=`Tooltip`;var Pe=(e,t)=>{process.env.NODE_ENV!==`production`&&!e&&console.warn(t)},X={button:`_button_2nghu_1`,solid:`_solid_2nghu_22`,primary:`_primary_2nghu_22`,loading:`_loading_2nghu_22`,neutral:`_neutral_2nghu_48`,success:`_success_2nghu_74`,warning:`_warning_2nghu_100`,danger:`_danger_2nghu_126`,outline:`_outline_2nghu_152`,ghost:`_ghost_2nghu_282`,soft:`_soft_2nghu_412`,link:`_link_2nghu_542`,square:`_square_2nghu_685`,rounded:`_rounded_2nghu_689`,pill:`_pill_2nghu_693`,sm:`_sm_2nghu_697`,md:`_md_2nghu_703`,lg:`_lg_2nghu_709`,fullWidth:`_fullWidth_2nghu_715`,iconOnly:`_iconOnly_2nghu_719`,label:`_label_2nghu_723`,labelText:`_labelText_2nghu_745`,icon:`_icon_2nghu_719`,spinner:`_spinner_2nghu_764`,"button-spin":`_button-spin_2nghu_1`,badge:`_badge_2nghu_786`,shortcut:`_shortcut_2nghu_800`},Fe=(0,c.forwardRef)(({children:e,color:t=`primary`,appearance:n=`solid`,size:r=`md`,shape:i=`pill`,type:a=`button`,disabled:o=!1,loading:s=!1,loadingText:l,iconStart:u,iconEnd:f,spinner:p,badge:m,shortcut:h,tooltip:_,fullWidth:v=!1,iconOnly:y=!1,asChild:b=!1,className:x,onClick:S,"aria-label":C,"aria-labelledby":w,href:T,target:E,rel:D,download:O,id:k,role:A,tabIndex:j,...M},N)=>{let P=b&&(0,c.isValidElement)(e)?e:void 0,F=P?P.props.children:e,I=y||!F&&!!(u||f),L=!!(C||w||P?.props[`aria-label`]||P?.props[`aria-labelledby`]),R=o||s,z=s&&l?l:F,ee=l&&F&&!I&&(typeof F==`string`||typeof F==`number`)&&(typeof l==`string`||typeof l==`number`)?String(s?F:l):void 0,te=E===`_blank`&&!D?`noreferrer noopener`:D,ne=g(X.button,X[t],X[n],X[r],X[i],x,{[X.disabled]:R,[X.loading]:s,[X.fullWidth]:v,[X.iconOnly]:I});Pe(!b||!T,`Button: pass href to the child element when using asChild.`),Pe(!b||!!P,`Button: asChild requires a single valid React element child.`),Pe(!I||L,`Button: icon-only buttons must provide aria-label or aria-labelledby.`);let B=e=>{e.preventDefault(),e.stopPropagation()},re=e=>{if(R){B(e);return}P?.props.onClick?.(e),e.defaultPrevented||S?.(e)},ie=(0,d.jsxs)(d.Fragment,{children:[s&&(p?(0,d.jsx)(`span`,{className:X.icon,"aria-hidden":`true`,children:p}):(0,d.jsx)(`span`,{className:X.spinner,"aria-hidden":`true`})),!s&&u&&(0,d.jsx)(`span`,{className:X.icon,children:u}),z&&!I&&(0,d.jsx)(`span`,{className:X.label,"data-measure":ee,children:(0,d.jsx)(`span`,{className:X.labelText,children:z})}),m&&!I&&(0,d.jsx)(`span`,{className:X.badge,children:m}),h&&!I&&(0,d.jsx)(`span`,{className:X.shortcut,children:h}),!s&&f&&(0,d.jsx)(`span`,{className:X.icon,children:f})]});return P?(0,c.cloneElement)(P,{...M,ref:N,"aria-busy":s||void 0,"aria-disabled":R||void 0,"aria-label":C||P.props[`aria-label`]||void 0,"aria-labelledby":w||P.props[`aria-labelledby`]||void 0,className:g(P.props.className,ne),href:R?void 0:P.props.href,onClick:re,tabIndex:R?-1:P.props.tabIndex,title:_||P.props.title,children:ie}):T?(0,d.jsx)(`a`,{ref:N,href:R?void 0:T,id:k,role:A,tabIndex:R?-1:j,target:E,rel:te,download:O,onClick:R?B:S,"aria-disabled":R||void 0,"aria-label":C||void 0,"aria-labelledby":w||void 0,"aria-busy":s||void 0,className:ne,title:_,children:ie}):(0,d.jsx)(`button`,{...M,ref:N,id:k,role:A,tabIndex:j,type:a,disabled:R,onClick:R?void 0:S,"aria-label":C||void 0,"aria-labelledby":w||void 0,"aria-busy":s||void 0,className:ne,title:_,children:ie})});Fe.displayName=`Button`;var Z={wrapper:`_wrapper_877rr_1`,colorPrimary:`_colorPrimary_877rr_27`,colorNeutral:`_colorNeutral_877rr_45`,colorSuccess:`_colorSuccess_877rr_63`,colorWarning:`_colorWarning_877rr_81`,colorDanger:`_colorDanger_877rr_99`,labelStart:`_labelStart_877rr_115`,wrapperSm:`_wrapperSm_877rr_119`,wrapperMd:`_wrapperMd_877rr_125`,wrapperLg:`_wrapperLg_877rr_131`,iconOnly:`_iconOnly_877rr_137`,container:`_container_877rr_143`,containerSm:`_containerSm_877rr_150`,containerMd:`_containerMd_877rr_154`,containerLg:`_containerLg_877rr_158`,containerLabelStart:`_containerLabelStart_877rr_162`,descriptionText:`_descriptionText_877rr_162`,errorText:`_errorText_877rr_163`,input:`_input_877rr_167`,customCheckbox:`_customCheckbox_877rr_179`,requiredMark:`_requiredMark_877rr_194`,error:`_error_877rr_163`,checkmark:`_checkmark_877rr_210`,indeterminateMark:`_indeterminateMark_877rr_226`,customMark:`_customMark_877rr_239`,label:`_label_877rr_115`,labelSm:`_labelSm_877rr_270`,labelMd:`_labelMd_877rr_274`,labelLg:`_labelLg_877rr_278`,indeterminate:`_indeterminate_877rr_226`,"checkbox-pop":`_checkbox-pop_877rr_1`,disabled:`_disabled_877rr_354`},Ie={sm:Z.labelSm,md:Z.labelMd,lg:Z.labelLg},Le={sm:Z.wrapperSm,md:Z.wrapperMd,lg:Z.wrapperLg},Re={sm:Z.containerSm,md:Z.containerMd,lg:Z.containerLg},ze={primary:Z.colorPrimary,neutral:Z.colorNeutral,success:Z.colorSuccess,warning:Z.colorWarning,danger:Z.colorDanger},Be=(0,c.forwardRef)(({id:e,label:t,description:n,icon:r,indeterminateIcon:i,checked:a,size:o=`md`,color:s=`primary`,labelPosition:l=`end`,defaultChecked:u=!1,disabled:f=!1,required:h=!1,indeterminate:_=!1,className:v,wrapperClassName:y,onCheckedChange:b,error:x,"aria-label":S,"aria-labelledby":C,"aria-describedby":w,...T},E)=>{let D=(0,c.useId)(),O=e??D,k=(0,c.useRef)(null),A=!!x,j=n?`${O}-description`:void 0,M=A?`${O}-error`:void 0,N=[w,j,M].filter(Boolean).join(` `),[P,F]=(0,p.useControllableState)({value:a,defaultValue:u,onChange:b}),I=(0,c.useCallback)(e=>{if(k.current=e,typeof E==`function`){E(e);return}E&&(E.current=e)},[E]);(0,c.useEffect)(()=>{k.current&&(k.current.indeterminate=_)},[_]);let L=e=>{F(e.target.checked)};return Pe(!!(t||S||C),`Checkbox: an accessible label must be provided through label, aria-label, or aria-labelledby.`),(0,d.jsxs)(`div`,{className:g(Z.container,Re[o],l===`start`&&Z.containerLabelStart,v),children:[(0,d.jsxs)(`label`,{htmlFor:O,className:g(Z.wrapper,Le[o],ze[s],l===`start`&&Z.labelStart,!t&&Z.iconOnly,f&&Z.disabled,y),children:[(0,d.jsx)(`input`,{...T,ref:I,id:O,type:`checkbox`,checked:P,disabled:f,required:h,onChange:L,className:Z.input,"aria-label":S,"aria-labelledby":C,"aria-checked":_?`mixed`:T[`aria-checked`],"aria-invalid":A?!0:T[`aria-invalid`],"aria-describedby":N||void 0}),(0,d.jsx)(`span`,{className:g(Z.customCheckbox,A&&Z.error,_&&Z.indeterminate),"aria-hidden":`true`,children:_?(0,d.jsx)(`span`,{className:g(Z.indeterminateMark,i&&Z.customMark),children:i}):P&&(0,d.jsx)(`span`,{className:Z.checkmark,children:r??(0,d.jsx)(m.Check,{})})}),t&&(0,d.jsxs)(`span`,{className:g(Z.label,Ie[o]),children:[t,h&&(0,d.jsx)(`span`,{className:Z.requiredMark,"aria-hidden":`true`,children:`*`})]})]}),n&&(0,d.jsx)(`span`,{id:j,className:Z.descriptionText,children:n}),A&&(0,d.jsx)(`span`,{id:M,className:Z.errorText,children:x})]})});Be.displayName=`Checkbox`;var Q={inputGroup:`_inputGroup_151bq_1`,primary:`_primary_151bq_29`,outline:`_outline_151bq_29`,filled:`_filled_151bq_62`,soft:`_soft_151bq_95`,neutral:`_neutral_151bq_128`,success:`_success_151bq_227`,warning:`_warning_151bq_326`,danger:`_danger_151bq_425`,inputWrapper:`_inputWrapper_151bq_524`,input:`_input_151bq_1`,error:`_error_151bq_575`,sm:`_sm_151bq_583`,md:`_md_151bq_587`,lg:`_lg_151bq_591`,isInvalid:`_isInvalid_151bq_607`,hasLeftAdornment:`_hasLeftAdornment_151bq_635`,hasRightAdornment:`_hasRightAdornment_151bq_639`,hasStartIconAndPrefix:`_hasStartIconAndPrefix_151bq_643`,hasEndIconAndSuffix:`_hasEndIconAndSuffix_151bq_647`,startAdornment:`_startAdornment_151bq_651`,endAdornment:`_endAdornment_151bq_652`,prefix:`_prefix_151bq_670`,suffix:`_suffix_151bq_671`,endSlot:`_endSlot_151bq_698`,isLoading:`_isLoading_151bq_709`,clearButton:`_clearButton_151bq_744`,iconButton:`_iconButton_151bq_759`,spinner:`_spinner_151bq_785`,"input-spin":`_input-spin_151bq_1`,addon:`_addon_151bq_794`,hasAddons:`_hasAddons_151bq_815`,counter:`_counter_151bq_829`,toneDefault:`_toneDefault_151bq_857`,tonePrimary:`_tonePrimary_151bq_861`,toneSecondary:`_toneSecondary_151bq_865`,toneSuccess:`_toneSuccess_151bq_869`,toneDanger:`_toneDanger_151bq_873`,toneMuted:`_toneMuted_151bq_877`,toneInverse:`_toneInverse_151bq_881`},Ve={default:Q.toneDefault,primary:Q.tonePrimary,secondary:Q.toneSecondary,success:Q.toneSuccess,danger:Q.toneDanger,muted:Q.toneMuted,inverse:Q.toneInverse},He=(e=`text`,t)=>{if(t)return t;switch(e){case`email`:return`email`;case`password`:return`current-password`;case`tel`:return`tel`;case`url`:return`url`;case`search`:return`off`;default:return}},Ue=(e,t)=>{let n=e.replace(/\D/g,``),r=0,i=``;for(let e of t){if(e===`#`){let e=n[r];if(!e)break;i+=e,r+=1;continue}r<n.length&&(i+=e)}return i},We=(e,t)=>t?typeof t==`function`?t(e):Ue(e,t):e,Ge=(0,c.forwardRef)(({id:e,label:t,name:n,description:r,placeholder:i,value:a,defaultValue:o,type:s=`text`,size:l,color:u=`primary`,variant:f=`outline`,error:p,invalid:h=!1,disabled:_=!1,required:v=!1,loading:y=!1,className:b,wrapperClassName:x,autoComplete:S,readOnly:C=!1,clearable:w=!1,onClear:T,onValueChange:E,revealPassword:D=!1,showCounter:O=!1,startIcon:k,endIcon:A,startAddon:j,endAddon:M,prefix:N,suffix:P,clearIcon:F,mask:I,format:L,parse:R,startIconTone:z=`default`,endIconTone:ee=`default`,clearIconTone:te=`danger`,autoFocus:ne,maxLength:B,onMouseEnter:re,onMouseLeave:ie,"aria-describedby":ae,"aria-invalid":oe,"aria-labelledby":V,...se},H)=>{let ce=(0,c.useId)(),U=pe(),W=!!(t||r||p),le=e??(W?void 0:U?.controlId)??ce,ue=(0,c.useRef)(null),[G,de]=(0,c.useState)(!1),[fe,K]=(0,c.useState)(o??``),me=a!==void 0,q=String((me?a:fe)??``),ge=L?L(q):q,_e=q.length>0,ve=l??U?.size??`md`,J=h||!!p||!W&&!!U?.invalid,ye=_||!W&&!!U?.disabled,be=v||!W&&!!U?.required,xe=C||y,Se=s===`password`,Ce=Se&&D&&G?`text`:s,we=k??(s===`search`?(0,d.jsx)(m.Search,{}):null),Te=A,Ee=He(s,S),Y=y&&!ye,De=w&&_e&&!ye&&!xe&&!Y,Oe=D&&Se&&!ye&&!Y&&!De,ke=!Y&&!De&&!Oe&&!!Te,Ae=!!(O&&B),je=r?`${le}-description`:void 0,Me=p?`${le}-error`:void 0,Ne=Ae?`${le}-counter`:void 0,Pe=[ae,!W&&!ae?U?.ariaDescribedBy:void 0,je,Me,Ne].filter(Boolean).join(` `),X=F??`×`,Fe=!!(we||N),Z=!!(Te||P||De||Oe||Y),Ie=!!(we&&N),Le=!!(Te&&P),Re=!!(j||M),ze=(0,c.useCallback)(e=>{if(ue.current=e,typeof H==`function`){H(e);return}H&&(H.current=e)},[H]),Be=(0,c.useCallback)(e=>{let t=We(R?R(e.target.value):e.target.value,I);me||K(t),E?.(t)},[me,I,E,R]),Ue=(0,c.useCallback)(()=>{me||K(``),E?.(``),T?.(),ue.current?.focus()},[me,T,E]),Ge=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:g(Q.inputGroup,Q[f],Q[u],{[Q.hasAddons]:Re,[Q.isDisabled]:ye,[Q.isInvalid]:J,[Q.isLoading]:Y}),children:[j&&(0,d.jsx)(`span`,{className:Q.addon,children:j}),(0,d.jsxs)(`div`,{className:g(Q.inputWrapper,{[Q.hasLeftAdornment]:Fe,[Q.hasRightAdornment]:Z,[Q.hasStartIconAndPrefix]:Ie,[Q.hasEndIconAndSuffix]:Le}),children:[we&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:g(Q.startAdornment,Ve[z]),children:we}),N&&(0,d.jsx)(`span`,{className:Q.prefix,children:N}),(0,d.jsx)(`input`,{...se,ref:ze,id:le,name:n,type:Ce,autoComplete:Ee,className:g(Q.input,Q[ve],{[Q.error]:J},b),value:ge,onChange:Be,placeholder:i,disabled:ye,readOnly:xe,required:be,autoFocus:ne,maxLength:B,"aria-invalid":J?!0:oe,"aria-labelledby":V??(W?void 0:U?.ariaLabelledBy),"aria-describedby":Pe||void 0,"aria-busy":y||void 0,onMouseEnter:re,onMouseLeave:ie}),P&&(0,d.jsx)(`span`,{className:Q.suffix,children:P}),(0,d.jsxs)(`div`,{className:Q.endSlot,children:[Y&&(0,d.jsx)(`span`,{className:Q.spinner,"aria-hidden":`true`,"data-testid":`input-spinner`}),Oe&&(0,d.jsx)(`button`,{type:`button`,className:Q.iconButton,onClick:()=>de(e=>!e),"aria-label":G?`Hide password`:`Show password`,children:G?`Hide`:`Show`}),De&&(0,d.jsx)(`button`,{type:`button`,className:g(Q.clearButton,Ve[te]),onClick:Ue,"aria-label":`Clear input`,children:X}),ke&&Te&&(0,d.jsx)(`span`,{"aria-hidden":`true`,className:g(Q.endAdornment,Ve[ee]),children:Te})]})]}),M&&(0,d.jsx)(`span`,{className:Q.addon,children:M})]}),Ae&&(0,d.jsxs)(`div`,{id:Ne,className:Q.counter,children:[q.length,` / `,B]})]});return!W&&U?Ge:(0,d.jsx)(he,{id:le,label:t,description:r,error:p,required:be,disabled:ye,invalid:J,size:ve,className:x,bindControl:!1,children:Ge})});Ge.displayName=`Input`;var $={root:`_root_qb9nm_1`,invalid:`_invalid_qb9nm_27`,control:`_control_qb9nm_27`,label:`_label_qb9nm_30`,wrapper:`_wrapper_qb9nm_33`,input:`_input_qb9nm_34`,disabled:`_disabled_qb9nm_37`,description:`_description_qb9nm_45`,colorPrimary:`_colorPrimary_qb9nm_49`,colorNeutral:`_colorNeutral_qb9nm_65`,colorSuccess:`_colorSuccess_qb9nm_81`,colorWarning:`_colorWarning_qb9nm_97`,colorDanger:`_colorDanger_qb9nm_113`,sm:`_sm_qb9nm_129`,md:`_md_qb9nm_138`,lg:`_lg_qb9nm_147`,indicator:`_indicator_qb9nm_202`,customIcon:`_customIcon_qb9nm_216`,content:`_content_qb9nm_335`,error:`_error_qb9nm_352`},Ke={primary:$.colorPrimary,neutral:$.colorNeutral,success:$.colorSuccess,warning:$.colorWarning,danger:$.colorDanger},qe=(0,c.forwardRef)(({value:e,checked:t,defaultChecked:n=!1,disabled:r=!1,required:i=!1,size:a,color:o,error:s,onCheckedChange:l,label:u,description:f,icon:m,wrapperClassName:h,className:_,id:v,name:y,"aria-describedby":b,...x},S)=>{let C=ue(),w=(0,c.useId)(),T=v??w,E=f?`${T}-description`:void 0,D=s?`${T}-error`:void 0,O=[E,D,C?.describedBy,b].filter(Boolean).join(` `)||void 0,k=C!==null,[A,j]=(0,p.useControllableState)({value:t,defaultValue:n,onChange:l}),M=k?C.value===e:A,N=!!C?.disabled||r,P=!!C?.required||i,F=C?.name??y,I=!!(s||C?.invalid),L=a??C?.size??`md`,R=o??C?.color??`primary`,z=t=>{if(!N){if(k){C.onValueChange(e);return}j(t.currentTarget.checked)}};return(0,d.jsxs)(`div`,{className:g($.root,$[L],I&&$.invalid,N&&$.disabled,Ke[R],_),children:[(0,d.jsxs)(`label`,{htmlFor:T,className:g($.wrapper,h),children:[(0,d.jsx)(`input`,{...x,ref:S,id:T,type:`radio`,name:F,value:e,checked:M,disabled:N,required:P,"aria-invalid":I||void 0,"aria-describedby":O,className:$.input,onChange:z}),(0,d.jsx)(`span`,{className:$.control,"aria-hidden":`true`,children:(0,d.jsx)(`span`,{className:g($.indicator,m&&$.customIcon),children:m})}),(u||f)&&(0,d.jsxs)(`span`,{className:$.content,children:[u&&(0,d.jsx)(`span`,{className:$.label,children:u}),f&&(0,d.jsx)(`span`,{id:E,className:$.description,children:f})]})]}),s&&(0,d.jsx)(`div`,{id:D,className:$.error,children:s})]})});qe.displayName=`Radio`;var Je=(0,c.createContext)(null),Ye=e=>e===`highContrast`?`high-contrast`:e,Xe=({theme:e,defaultTheme:t=`light`,onThemeChange:n,children:r})=>{let[i,a]=(0,p.useControllableState)({value:e,defaultValue:t,onChange:n}),o=Ye(i);(0,c.useEffect)(()=>{if(typeof document>`u`)return;let{documentElement:e}=document,t=e.dataset.velliraTheme;return e.dataset.velliraTheme=o,()=>{if(t===void 0){delete e.dataset.velliraTheme;return}e.dataset.velliraTheme=t}},[o]);let s=(0,c.useMemo)(()=>({theme:i,setTheme:a}),[i,a]);return(0,d.jsx)(Je.Provider,{value:s,children:(0,d.jsx)(`div`,{"data-vellira-theme":o,children:r})})};Xe.displayName=`ThemeProvider`;function Ze(){let e=(0,c.useContext)(Je);if(!e)throw Error(`useTheme must be used within ThemeProvider.`);return e}exports.Button=Fe,exports.Checkbox=Be,exports.Dropdown=F,exports.FormField=he,exports.Input=Ge,exports.Modal=U,exports.Radio=qe,exports.RadioGroup=de,exports.Select=be,exports.Tabs=Ae,exports.ThemeProvider=Xe,exports.Tooltip=Ne,exports.useTheme=Ze;