@radui/ui 0.4.0 → 0.5.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.
Files changed (105) hide show
  1. package/dist/components/Accordion.js +1 -1
  2. package/dist/components/AlertDialog.d.ts +5 -3
  3. package/dist/components/AlertDialog.js +1 -1
  4. package/dist/components/AspectRatio.js +1 -1
  5. package/dist/components/Avatar.js +1 -1
  6. package/dist/components/AvatarGroup.js +1 -1
  7. package/dist/components/{AvatarPrimitiveFallback-KiY3slgV.js → AvatarPrimitiveFallback-BOYawMc9.js} +1 -1
  8. package/dist/components/Badge.js +1 -1
  9. package/dist/components/BlockQuote.js +1 -1
  10. package/dist/components/Button.js +1 -1
  11. package/dist/components/Callout.js +1 -1
  12. package/dist/components/Card.js +1 -1
  13. package/dist/components/Checkbox.js +1 -1
  14. package/dist/components/CheckboxCards.js +1 -1
  15. package/dist/components/CheckboxGroup.js +1 -1
  16. package/dist/components/{CheckboxGroupPrimitive-DgfnzMT9.js → CheckboxGroupPrimitive-Cd8ra39e.js} +1 -1
  17. package/dist/components/Code.js +1 -1
  18. package/dist/components/Collapsible.js +1 -1
  19. package/dist/components/Combobox.d.ts +3 -1
  20. package/dist/components/Combobox.js +1 -1
  21. package/dist/components/ComboboxPrimitive-BhHSrtiY.js +1 -0
  22. package/dist/components/Command.d.ts +112 -0
  23. package/dist/components/Command.js +1 -0
  24. package/dist/components/ContextMenu.d.ts +8 -4
  25. package/dist/components/ContextMenu.js +1 -1
  26. package/dist/components/DataList.d.ts +7 -2
  27. package/dist/components/DataList.js +1 -1
  28. package/dist/components/Dialog.d.ts +5 -3
  29. package/dist/components/Dialog.js +1 -1
  30. package/dist/components/Disclosure.js +1 -1
  31. package/dist/components/Drawer.d.ts +153 -0
  32. package/dist/components/Drawer.js +1 -0
  33. package/dist/components/DropdownMenu.d.ts +4 -0
  34. package/dist/components/DropdownMenu.js +1 -1
  35. package/dist/components/Em.js +1 -1
  36. package/dist/components/Heading.js +1 -1
  37. package/dist/components/HoverCard.d.ts +10 -2
  38. package/dist/components/HoverCard.js +1 -1
  39. package/dist/components/Kbd.js +1 -1
  40. package/dist/components/Link.js +1 -1
  41. package/dist/components/MenuPrimitive-wJbEC-gM.js +1 -0
  42. package/dist/components/Menubar.d.ts +4 -0
  43. package/dist/components/Menubar.js +1 -1
  44. package/dist/components/Minimap.js +1 -1
  45. package/dist/components/NavigationMenu.js +1 -1
  46. package/dist/components/NumberField.d.ts +2 -0
  47. package/dist/components/NumberField.js +1 -1
  48. package/dist/components/Progress.js +1 -1
  49. package/dist/components/Quote.d.ts +2 -0
  50. package/dist/components/Quote.js +1 -1
  51. package/dist/components/Radio.js +1 -1
  52. package/dist/components/RadioCards.js +1 -1
  53. package/dist/components/RadioGroup.js +1 -1
  54. package/dist/components/{RadioGroupPrimitive-tlWBfWJ8.js → RadioGroupPrimitive-CcvI-_wm.js} +1 -1
  55. package/dist/components/ScrollArea.js +1 -1
  56. package/dist/components/Select.d.ts +3 -1
  57. package/dist/components/Select.js +1 -1
  58. package/dist/components/Separator.js +1 -1
  59. package/dist/components/Skeleton.js +1 -1
  60. package/dist/components/Slider.d.ts +1 -1
  61. package/dist/components/Slider.js +1 -1
  62. package/dist/components/Spinner.js +1 -1
  63. package/dist/components/Splitter.js +1 -1
  64. package/dist/components/Steps.js +1 -1
  65. package/dist/components/Strong.js +1 -1
  66. package/dist/components/Switch.js +1 -1
  67. package/dist/components/TabNav.js +1 -1
  68. package/dist/components/Table.js +1 -1
  69. package/dist/components/Tabs.js +1 -1
  70. package/dist/components/Text.js +1 -1
  71. package/dist/components/TextArea.js +1 -1
  72. package/dist/components/TextField.d.ts +41 -0
  73. package/dist/components/TextField.js +1 -0
  74. package/dist/components/Theme.d.ts +2 -0
  75. package/dist/components/Theme.js +1 -1
  76. package/dist/components/Toggle.js +1 -1
  77. package/dist/components/ToggleGroup.js +1 -1
  78. package/dist/components/Toolbar.js +1 -1
  79. package/dist/components/Tooltip.d.ts +3 -0
  80. package/dist/components/Tooltip.js +1 -1
  81. package/dist/components/Tree.js +1 -1
  82. package/dist/components/VisuallyHidden.js +1 -1
  83. package/dist/components/floating-ui.react-Byzse64h.js +5 -0
  84. package/dist/components/index-BbEsAodL.js +1 -0
  85. package/dist/components/{index-TYaYKM2M.js → index-DOVR6Rd5.js} +1 -1
  86. package/dist/components/{index-BZVbVgqN.js → index-DU_6Msfu.js} +1 -1
  87. package/dist/components/index-Db-tduwt.js +1 -0
  88. package/dist/components/index-Ir5FYyWW.js +1 -0
  89. package/dist/components/index-eAZUMNef.js +1 -0
  90. package/dist/components/{index-BOy86lYu.js → index-gM8bbyw1.js} +1 -1
  91. package/dist/components/index-m6qHOeQ9.js +1 -0
  92. package/dist/components/mergeProps-B9ocQsG4.js +1 -0
  93. package/dist/components/useComponentClass-QwNivz0h.js +1 -0
  94. package/dist/themes/tailwind-presets/default.js +1 -1
  95. package/package.json +12 -1
  96. package/dist/components/ComboboxPrimitive-D5wWLl2_.js +0 -1
  97. package/dist/components/MenuPrimitive-BvxwQFGM.js +0 -1
  98. package/dist/components/floating-ui.react-gB901AP2.js +0 -5
  99. package/dist/components/index-3dZuI04X.js +0 -1
  100. package/dist/components/index-6If6D2Zi.js +0 -1
  101. package/dist/components/index-98jQ1vTr.js +0 -1
  102. package/dist/components/index-BQ2Hbb_x.js +0 -1
  103. package/dist/components/index-BoRAvltW.js +0 -1
  104. package/dist/components/index-DTYJVF-V.js +0 -1
  105. package/dist/themes/default.css +0 -1
@@ -1 +1 @@
1
- 'use client';import o,{createContext as r,useContext as a}from"react";import{jsx as e,jsxs as s}from"react/jsx-runtime";import{R as i}from"./RadioGroupPrimitive-tlWBfWJ8.js";import{c as t}from"./clsx-BaVHROc5.js";import{c as d}from"./index-6If6D2Zi.js";import{c as l,a as n,b as c}from"./index-3dZuI04X.js";import{P as m}from"./index-98jQ1vTr.js";import"./index-TYaYKM2M.js";import"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";const p=r({rootClass:""}),u=o.forwardRef((({children:o,className:r="",customRootClass:a="",variant:m="",size:u="",color:f="",...R},N)=>{const h=d(a,"RadioGroup"),x=l("radio-group",{variant:m,size:u}),j=c(f),C=n(x,j);return e(p.Provider,{value:{rootClass:h},children:s(i.Root,{ref:N,className:t(`${h}-root`,r),...C,...R,children:[" ",o," "]})})}));u.displayName="RadioGroupRoot";const f=o.forwardRef((({children:o,className:r="",value:s,...d},l)=>{const{rootClass:n}=a(p);return e(i.Item,{ref:l,className:t(`${n}-item`,r),value:s,...d,children:o})}));f.displayName="RadioGroupItem";const R=o.forwardRef((({className:r="",children:a,...s},d)=>{const{rootClass:l}=o.useContext(p);return e(i.Indicator,{ref:d,className:t(`${l}-indicator`,r),...s,children:a})}));R.displayName="RadioGroupIndicator";const N=o.forwardRef((({className:r="",asChild:a=!1,children:e,...i},d)=>{const{rootClass:l}=o.useContext(p);return s(m.label,{ref:d,...i,className:t(`${l}-label`,r),asChild:a,children:[" ",e," "]})}));N.displayName="RadioGroupLabel";const h=o.forwardRef(((o,r)=>(console.warn("Direct usage of RadioGroup is not supported. Please use RadioGroup.Root and RadioGroup.Item instead."),null)));h.displayName="RadioGroup",h.Root=u,h.Item=f,h.Indicator=R,h.Label=N;export{h as default};
1
+ 'use client';import o,{createContext as r,useContext as a}from"react";import{jsx as e,jsxs as s}from"react/jsx-runtime";import{R as t}from"./RadioGroupPrimitive-CcvI-_wm.js";import{c as i}from"./clsx-BaVHROc5.js";import{u as l}from"./useComponentClass-QwNivz0h.js";import{c as d,a as m,b as n}from"./index-eAZUMNef.js";import{P as c}from"./index-m6qHOeQ9.js";import"./index-DOVR6Rd5.js";import"./index-gM8bbyw1.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-B9ocQsG4.js";const p=r({rootClass:""}),u=o.forwardRef((({children:o,className:r="",customRootClass:a="",variant:c="",size:u="",color:f="",...R},C)=>{const N=l(a,"RadioGroup"),h=d("radio-group",{variant:c,size:u}),j=n(f),x=m(h,j);return e(p.Provider,{value:{rootClass:N},children:s(t.Root,{ref:C,className:i(N&&`${N}-root`,r),...x,...R,children:[" ",o," "]})})}));u.displayName="RadioGroupRoot";const f=o.forwardRef((({children:o,className:r="",value:s,...l},d)=>{const{rootClass:m}=a(p);return e(t.Item,{ref:d,className:i(m&&`${m}-item`,r),value:s,...l,children:o})}));f.displayName="RadioGroupItem";const R=o.forwardRef((({className:r="",children:a,...s},l)=>{const{rootClass:d}=o.useContext(p);return e(t.Indicator,{ref:l,className:i(d&&`${d}-indicator`,r),...s,children:a})}));R.displayName="RadioGroupIndicator";const C=o.forwardRef((({className:r="",asChild:a=!1,children:e,...t},l)=>{const{rootClass:d}=o.useContext(p);return s(c.label,{ref:l,...t,className:i(d&&`${d}-label`,r),asChild:a,children:[" ",e," "]})}));C.displayName="RadioGroupLabel";const N=o.forwardRef(((o,r)=>(console.warn("Direct usage of RadioGroup is not supported. Please use RadioGroup.Root and RadioGroup.Item instead."),null)));N.displayName="RadioGroup",N.Root=u,N.Item=f,N.Indicator=R,N.Label=C;export{N as default};
@@ -1 +1 @@
1
- 'use client';import e,{useContext as i}from"react";import{jsxs as a,jsx as r,Fragment as d}from"react/jsx-runtime";import{P as o}from"./index-98jQ1vTr.js";import{R as t}from"./index-TYaYKM2M.js";import{u as l}from"./index-wRElCyvx.js";import{B as n}from"./index-BOy86lYu.js";const s=e.createContext(null),c=e.forwardRef((({value:e,defaultValue:i="",onValueChange:n,children:c,disabled:u=!1,required:m=!1,name:p="",orientation:h="horizontal",loop:f=!1,dir:R="ltr",...v},b)=>{const[C,x]=l(e,i,n),G={selectedValue:C,setSelectedValue:x,groupDisabled:u};return a(o.div,{ref:b,...v,"aria-required":m,role:"radiogroup","aria-disabled":u,"data-disabled":u?"":void 0,children:[r(t.Root,{dir:R,orientation:h,loop:f,asChild:!0,children:r(s.Provider,{value:G,children:r(t.Group,{children:c})})}),p&&a(d,{children:[r("input",{type:"hidden",name:p,value:C,disabled:u}),m&&""!==C&&r("input",{type:"radio",name:p,value:C,checked:!0,onChange:()=>{},disabled:u,required:!0,"aria-hidden":"true",tabIndex:-1,style:{position:"absolute",width:0,height:0,opacity:0,pointerEvents:"none",margin:0}})]})]})}));c.displayName="RadioGroupPrimitiveRoot";const u=e.createContext({itemSelected:!1}),m=e.forwardRef((({value:e,children:a,disabled:d,required:o=!1,className:l="",asChild:c=!1,...m},p)=>{const h=i(s);if(!h)throw new Error("RadioGroup.Item must be used within a RadioGroup.Root");const{groupDisabled:f,selectedValue:R,setSelectedValue:v}=h,b=e===R;return r(u.Provider,{value:{itemSelected:b},children:r(t.Item,{children:r(n,{ref:p,role:"radio",type:"button",disabled:f||d,onClick:()=>v(e),onFocus:()=>v(e),"aria-disabled":f||d,"aria-checked":b,"aria-selected":void 0,"data-state":b?"checked":"unchecked","data-disabled":f||d?"":void 0,"aria-required":o,asChild:c,className:l,...m,children:a})})})}));m.displayName="RadioGroupPrimitiveItem";const p=e.forwardRef((({children:i,className:a,asChild:d=!1,...t},l)=>{const{itemSelected:n}=e.useContext(u);return n?r(o.span,{ref:l,className:a,asChild:d,...t,children:i}):null}));p.displayName="RadioGroupPrimitiveIndicator";const h=e.forwardRef(((e,i)=>(console.warn("Direct usage of RadioGroup is not supported. Please use RadioGroup.Root, RadioGroup.Item, etc. instead."),null)));h.displayName="RadioGroupPrimitive",h.Root=c,h.Item=m,h.Indicator=p;export{h as R};
1
+ 'use client';import e,{useContext as i}from"react";import{jsxs as a,jsx as r,Fragment as d}from"react/jsx-runtime";import{P as o}from"./index-m6qHOeQ9.js";import{R as t}from"./index-DOVR6Rd5.js";import{u as l}from"./index-wRElCyvx.js";import{B as n}from"./index-gM8bbyw1.js";const s=e.createContext(null),c=e.forwardRef((({value:e,defaultValue:i="",onValueChange:n,children:c,disabled:u=!1,required:m=!1,name:p="",orientation:h="horizontal",loop:f=!0,dir:R="ltr",...v},b)=>{const[C,x]=l(e,i,n),G={selectedValue:C,setSelectedValue:x,groupDisabled:u};return a(o.div,{ref:b,...v,"aria-required":m,role:"radiogroup","aria-disabled":u,"data-disabled":u?"":void 0,children:[r(t.Root,{dir:R,orientation:h,loop:f,asChild:!0,children:r(s.Provider,{value:G,children:r(t.Group,{children:c})})}),p&&a(d,{children:[r("input",{type:"hidden",name:p,value:C,disabled:u}),m&&""!==C&&r("input",{type:"radio",name:p,value:C,checked:!0,onChange:()=>{},disabled:u,required:!0,"aria-hidden":"true",tabIndex:-1,style:{position:"absolute",width:0,height:0,opacity:0,pointerEvents:"none",margin:0}})]})]})}));c.displayName="RadioGroupPrimitiveRoot";const u=e.createContext({itemSelected:!1}),m=e.forwardRef((({value:e,children:a,disabled:d,required:o=!1,className:l="",asChild:c=!1,...m},p)=>{const h=i(s);if(!h)throw new Error("RadioGroup.Item must be used within a RadioGroup.Root");const{groupDisabled:f,selectedValue:R,setSelectedValue:v}=h,b=e===R;return r(u.Provider,{value:{itemSelected:b},children:r(t.Item,{children:r(n,{ref:p,role:"radio",type:"button",disabled:f||d,onClick:()=>v(e),onFocus:()=>v(e),"aria-disabled":f||d,"aria-checked":b,"aria-selected":void 0,"data-state":b?"checked":"unchecked","data-disabled":f||d?"":void 0,"aria-required":o,asChild:c,className:l,...m,children:a})})})}));m.displayName="RadioGroupPrimitiveItem";const p=e.forwardRef((({children:i,className:a,asChild:d=!1,...t},l)=>{const{itemSelected:n}=e.useContext(u);return n?r(o.span,{ref:l,className:a,asChild:d,...t,children:i}):null}));p.displayName="RadioGroupPrimitiveIndicator";const h=e.forwardRef(((e,i)=>(console.warn("Direct usage of RadioGroup is not supported. Please use RadioGroup.Root, RadioGroup.Item, etc. instead."),null)));h.displayName="RadioGroupPrimitive",h.Root=c,h.Item=m,h.Indicator=p;export{h as R};
@@ -1 +1 @@
1
- 'use client';import e,{createContext as t,forwardRef as r,useRef as n,useEffect as c,useContext as l,useCallback as o}from"react";import{jsx as i}from"react/jsx-runtime";import{c as s}from"./clsx-BaVHROc5.js";import{c as u}from"./index-6If6D2Zi.js";const a=t({rootClass:"",type:"hover"}),d="ScrollArea",f=r((({children:t,className:r="",customRootClass:l="",type:o="hover",...f},m)=>{const h=u(l,d),v=n(null),p=n(null),y=n(null),b=n(null),[g,w]=e.useState({x:!1,y:!1});c((()=>{L()}),[p,y,b]),c((()=>{const e=b.current;if(!e)return;const t=()=>{L()},r=new ResizeObserver((()=>t()));r.observe(e),Array.from(e.children).forEach((e=>r.observe(e)));const n=new MutationObserver((()=>{t()}));return n.observe(e,{childList:!0,subtree:!0}),window.addEventListener("resize",t),()=>{r.disconnect(),n.disconnect(),window.removeEventListener("resize",t)}}),[]);const L=()=>{if(!b.current)return;const e=b.current,t=e.clientHeight,r=e.scrollHeight,n=r>t;if(p.current)if(t<=0)p.current.style.height="0px";else if(n){let e=t/(r/t);e=Math.max(e,24),p.current.style.height=`${e}px`}else p.current.style.height=`${t}px`;const c=e.clientWidth,l=e.scrollWidth,o=l>c;if(y.current)if(c<=0)y.current.style.width="0px";else if(o){let e=c/(l/c);e=Math.max(e,24),y.current.style.width=`${e}px`}else y.current.style.width=`${c}px`;w({x:o,y:n})},x=e=>{if(!b.current)return;const t=b.current,r=t.scrollTop,n=t.scrollLeft,c=void 0!==e.top?e.top-r:0,l=void 0!==e.left?e.left-n:0,o=performance.now(),i=s=>{const u=s-o,a=Math.min(u/150,1),d=1-Math.pow(1-a,3);void 0!==e.top&&(t.scrollTop=r+c*d),void 0!==e.left&&(t.scrollLeft=n+l*d),a<1&&requestAnimationFrame(i)};requestAnimationFrame(i)};return i(a.Provider,{value:{rootClass:h,scrollYThumbRef:p,scrollXThumbRef:y,scrollAreaViewportRef:b,handleScroll:()=>{if(!b.current)return;const e=b.current;if(p.current){const t=e.clientHeight,r=e.scrollHeight,n=e.scrollTop,c=p.current.clientHeight;if(t<=0||r<=t)p.current.style.top="0px";else{const e=n/(r-t)*(t-c);p.current.style.top=`${e}px`}}if(y.current){const t=e.clientWidth,r=e.scrollWidth,n=e.scrollLeft,c=y.current.clientWidth;if(t<=0||r<=t)y.current.style.left="0px";else{const e=n/(r-t)*(t-c);y.current.style.left=`${e}px`}}},handleScrollbarClick:e=>{if(!b.current)return;const t=b.current;if("vertical"===e.orientation&&void 0!==e.clientY){const r=p.current;if(!r)return;if(t.clientHeight<=0||t.scrollHeight<=t.clientHeight)return;const n=r.getBoundingClientRect(),c=t.scrollHeight/t.clientHeight;e.clientY<n.top?x({top:t.scrollTop-r.clientHeight*c}):e.clientY>n.bottom&&x({top:t.scrollTop+r.clientHeight*c})}else if("horizontal"===e.orientation&&void 0!==e.clientX){const r=y.current;if(!r)return;if(t.clientWidth<=0||t.scrollWidth<=t.clientWidth)return;const n=r.getBoundingClientRect(),c=t.scrollWidth/t.clientWidth;e.clientX<n.left?x({left:t.scrollLeft-r.clientWidth*c}):e.clientX>n.right&&x({left:t.scrollLeft+r.clientWidth*c})}},type:o,rootRef:v},children:i("div",{ref:e=>{v.current=e,"function"==typeof m?m(e):m&&(m.current=e)},className:s(h,r),"data-scrollbar-x":String(g.x||"always"===o),"data-scrollbar-y":String(g.y||"always"===o),...f,children:t})})}));f.displayName=d;const m=r((({children:e,className:t="",...r},n)=>{const{rootClass:c,scrollAreaViewportRef:o,handleScroll:u}=l(a);return i("div",{ref:e=>{o&&(o.current=e),"function"==typeof n?n(e):n&&(n.current=e)},className:s(c+"-viewport",t),onScroll:u,...r,children:e})}));m.displayName="ScrollAreaViewport";const h=r((({children:t,className:r="",orientation:c="vertical",...o},u)=>{const{rootClass:d,handleScrollbarClick:f,scrollXThumbRef:m,scrollYThumbRef:h,type:v,scrollAreaViewportRef:p,rootRef:y}=l(a),b=n(null),g=n(!1),w=n(null),[L,x]=e.useState(!1),T=n(0),[E,S]=e.useState("always"===v),[R,C]=e.useState(!1),A=n(null),H=e.useCallback((()=>{"scroll"!==v&&"hover"!==v||(S(!0),A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{S(!1)}),1e3))}),[v]);e.useEffect((()=>{if("always"===v||"auto"===v)return;const e=p?.current;if(!e)return;const t=()=>H();return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t),A.current&&clearTimeout(A.current)}}),[v,p,H]),e.useEffect((()=>{if("hover"!==v)return;const e=y?.current;if(!e)return;const t=()=>{A.current&&clearTimeout(A.current),S(!0)},r=()=>{A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{S(!1)}),500)};return e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",r),()=>{e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",r)}}),[v,y]),e.useEffect((()=>{const e=p?.current;if(!e)return;const t=()=>{const t="vertical"===c?e.scrollHeight>e.clientHeight:e.scrollWidth>e.clientWidth;C(t)};t();const r=new ResizeObserver(t);return r.observe(e),Array.from(e.children).forEach((e=>r.observe(e))),()=>r.disconnect()}),[p,c]);const W=e.useCallback((e=>{const t="vertical"===c?h?.current:m?.current;if(!t)return!1;const r=t.getBoundingClientRect();return"vertical"===c?e<r.top||e>r.bottom:e<r.left||e>r.right}),[c,m,h]),N=e.useCallback((e=>{f&&(e.preventDefault(),T.current="vertical"===c?e.clientY:e.clientX,f({clientY:e.clientY,clientX:e.clientX,orientation:c}),setTimeout((()=>{g.current&&(b.current=setInterval((()=>{g.current&&W(T.current)?f({clientY:"vertical"===c?T.current:void 0,clientX:"horizontal"===c?T.current:void 0,orientation:c}):M()}),50))}),300),g.current=!0,x(!0))}),[f,c,W]),M=e.useCallback((()=>{g.current=!1,w.current?.(),w.current=null,b.current&&(clearInterval(b.current),b.current=null),x(!1)}),[]);e.useEffect((()=>{if(!g.current)return()=>{w.current?.(),M()};const e=()=>M(),t=()=>M();return document.addEventListener("mouseup",e),document.addEventListener("mouseleave",t),w.current=()=>{document.removeEventListener("mouseup",e),document.removeEventListener("mouseleave",t)},()=>{w.current?.(),w.current=null,M()}}),[L,M]);const X="always"===v||"auto"===v&&R||R&&E,Y=R||"always"===v;return i("div",{ref:u,className:s(d+"-scrollbar",r),"data-orientation":c,"data-state":X?"visible":"hidden",style:{display:Y?void 0:"none",...o.style},onMouseDown:N,onMouseUp:M,onMouseLeave:M,...o,children:t})}));h.displayName="ScrollAreaScrollbar";const v=r((({children:t,className:r="",orientation:c="vertical",...u},d)=>{const{rootClass:f,scrollXThumbRef:m,scrollYThumbRef:h,scrollAreaViewportRef:v}=l(a),p=n(!1),y=n({x:0,y:0,scrollTop:0,scrollLeft:0}),b=o((e=>{v?.current&&(e.preventDefault(),e.stopPropagation(),p.current=!0,y.current={x:e.clientX,y:e.clientY,scrollTop:v.current.scrollTop,scrollLeft:v.current.scrollLeft},document.body.style.userSelect="none",document.body.style.cursor="grabbing")}),[v]),g=o((e=>{if(!p.current||!v?.current)return;const t=v.current,r="vertical"===c?h?.current:m?.current,n=r?.parentElement?.getBoundingClientRect();if(r&&n)if("vertical"===c){const c=(e.clientY-y.current.y)/(n.height-r.clientHeight),l=t.scrollHeight-t.clientHeight,o=y.current.scrollTop+c*l;t.scrollTop=Math.max(0,Math.min(o,l))}else{const c=(e.clientX-y.current.x)/(n.width-r.clientWidth),l=t.scrollWidth-t.clientWidth,o=y.current.scrollLeft+c*l;t.scrollLeft=Math.max(0,Math.min(o,l))}}),[c,v,m,h]),w=o((()=>{p.current=!1,document.body.style.cursor="",document.body.style.userSelect=""}),[]);e.useEffect((()=>{const e=e=>g(e),t=()=>w();return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t),w()}}),[g,w]);return i("div",{ref:e=>{const t="vertical"===c?h:m;t&&(t.current=e),"function"==typeof d?d(e):d&&(d.current=e)},className:s(f+"-thumb",r),onMouseDown:b,...u,children:t})}));v.displayName="ScrollAreaThumb";const p=r((({children:e,className:t,...r},n)=>{const{rootClass:c}=l(a);return i("div",{ref:n,className:s(c+"-corner",t),...r,children:e})}));p.displayName="ScrollAreaCorner";const y=e.forwardRef(((e,t)=>(console.warn("Direct usage of ScrollArea is not supported. Please use ScrollArea.Root and ScrollArea.Viewport instead."),null)));y.Root=f,y.Viewport=m,y.Scrollbar=h,y.Thumb=v,y.Corner=p,y.displayName="ScrollArea";export{y as default};
1
+ 'use client';import e,{createContext as t,forwardRef as r,useRef as n,useEffect as c,useContext as l,useCallback as o}from"react";import{jsx as s}from"react/jsx-runtime";import{c as i}from"./clsx-BaVHROc5.js";import{u}from"./useComponentClass-QwNivz0h.js";import"./ThemeContext-Sm-iNANd.js";const a=t({rootClass:"",type:"hover"}),d="ScrollArea",f=r((({children:t,className:r="",customRootClass:l="",type:o="hover",...f},m)=>{const h=u(l,d),v=n(null),p=n(null),y=n(null),b=n(null),[g,w]=e.useState({x:!1,y:!1});c((()=>{L()}),[p,y,b]),c((()=>{const e=b.current;if(!e)return;const t=()=>{L()},r=new ResizeObserver((()=>t()));r.observe(e),Array.from(e.children).forEach((e=>r.observe(e)));const n=new MutationObserver((()=>{t()}));return n.observe(e,{childList:!0,subtree:!0}),window.addEventListener("resize",t),()=>{r.disconnect(),n.disconnect(),window.removeEventListener("resize",t)}}),[]);const L=()=>{if(!b.current)return;const e=b.current,t=e.clientHeight,r=e.scrollHeight,n=r>t;if(p.current)if(t<=0)p.current.style.height="0px";else if(n){let e=t/(r/t);e=Math.max(e,24),p.current.style.height=`${e}px`}else p.current.style.height=`${t}px`;const c=e.clientWidth,l=e.scrollWidth,o=l>c;if(y.current)if(c<=0)y.current.style.width="0px";else if(o){let e=c/(l/c);e=Math.max(e,24),y.current.style.width=`${e}px`}else y.current.style.width=`${c}px`;w({x:o,y:n})},T=e=>{if(!b.current)return;const t=b.current,r=t.scrollTop,n=t.scrollLeft,c=void 0!==e.top?e.top-r:0,l=void 0!==e.left?e.left-n:0,o=performance.now(),s=i=>{const u=i-o,a=Math.min(u/150,1),d=1-Math.pow(1-a,3);void 0!==e.top&&(t.scrollTop=r+c*d),void 0!==e.left&&(t.scrollLeft=n+l*d),a<1&&requestAnimationFrame(s)};requestAnimationFrame(s)};return s(a.Provider,{value:{rootClass:h,scrollYThumbRef:p,scrollXThumbRef:y,scrollAreaViewportRef:b,handleScroll:()=>{if(!b.current)return;const e=b.current;if(p.current){const t=e.clientHeight,r=e.scrollHeight,n=e.scrollTop,c=p.current.clientHeight;if(t<=0||r<=t)p.current.style.top="0px";else{const e=n/(r-t)*(t-c);p.current.style.top=`${e}px`}}if(y.current){const t=e.clientWidth,r=e.scrollWidth,n=e.scrollLeft,c=y.current.clientWidth;if(t<=0||r<=t)y.current.style.left="0px";else{const e=n/(r-t)*(t-c);y.current.style.left=`${e}px`}}},handleScrollbarClick:e=>{if(!b.current)return;const t=b.current;if("vertical"===e.orientation&&void 0!==e.clientY){const r=p.current;if(!r)return;if(t.clientHeight<=0||t.scrollHeight<=t.clientHeight)return;const n=r.getBoundingClientRect(),c=t.scrollHeight/t.clientHeight;e.clientY<n.top?T({top:t.scrollTop-r.clientHeight*c}):e.clientY>n.bottom&&T({top:t.scrollTop+r.clientHeight*c})}else if("horizontal"===e.orientation&&void 0!==e.clientX){const r=y.current;if(!r)return;if(t.clientWidth<=0||t.scrollWidth<=t.clientWidth)return;const n=r.getBoundingClientRect(),c=t.scrollWidth/t.clientWidth;e.clientX<n.left?T({left:t.scrollLeft-r.clientWidth*c}):e.clientX>n.right&&T({left:t.scrollLeft+r.clientWidth*c})}},type:o,rootRef:v},children:s("div",{ref:e=>{v.current=e,"function"==typeof m?m(e):m&&(m.current=e)},className:i(h,r),"data-scrollbar-x":String(g.x||"always"===o),"data-scrollbar-y":String(g.y||"always"===o),...f,children:t})})}));f.displayName=d;const m=r((({children:e,className:t="",...r},n)=>{const{rootClass:c,scrollAreaViewportRef:o,handleScroll:u}=l(a);return s("div",{ref:e=>{o&&(o.current=e),"function"==typeof n?n(e):n&&(n.current=e)},className:i(c&&`${c}-viewport`,t),onScroll:u,...r,children:e})}));m.displayName="ScrollAreaViewport";const h=r((({children:t,className:r="",orientation:c="vertical",...o},u)=>{const{rootClass:d,handleScrollbarClick:f,scrollXThumbRef:m,scrollYThumbRef:h,type:v,scrollAreaViewportRef:p,rootRef:y}=l(a),b=n(null),g=n(!1),w=n(null),[L,T]=e.useState(!1),x=n(0),[E,S]=e.useState("always"===v),[C,R]=e.useState(!1),A=n(null),H=e.useCallback((()=>{"scroll"!==v&&"hover"!==v||(S(!0),A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{S(!1)}),1e3))}),[v]);e.useEffect((()=>{if("always"===v||"auto"===v)return;const e=p?.current;if(!e)return;const t=()=>H();return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t),A.current&&clearTimeout(A.current)}}),[v,p,H]),e.useEffect((()=>{if("hover"!==v)return;const e=y?.current;if(!e)return;const t=()=>{A.current&&clearTimeout(A.current),S(!0)},r=()=>{A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{S(!1)}),500)};return e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",r),()=>{e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",r)}}),[v,y]),e.useEffect((()=>{const e=p?.current;if(!e)return;const t=()=>{const t="vertical"===c?e.scrollHeight>e.clientHeight:e.scrollWidth>e.clientWidth;R(t)};t();const r=new ResizeObserver(t);return r.observe(e),Array.from(e.children).forEach((e=>r.observe(e))),()=>r.disconnect()}),[p,c]);const W=e.useCallback((e=>{const t="vertical"===c?h?.current:m?.current;if(!t)return!1;const r=t.getBoundingClientRect();return"vertical"===c?e<r.top||e>r.bottom:e<r.left||e>r.right}),[c,m,h]),N=e.useCallback((e=>{f&&(e.preventDefault(),x.current="vertical"===c?e.clientY:e.clientX,f({clientY:e.clientY,clientX:e.clientX,orientation:c}),setTimeout((()=>{g.current&&(b.current=setInterval((()=>{g.current&&W(x.current)?f({clientY:"vertical"===c?x.current:void 0,clientX:"horizontal"===c?x.current:void 0,orientation:c}):M()}),50))}),300),g.current=!0,T(!0))}),[f,c,W]),M=e.useCallback((()=>{g.current=!1,w.current?.(),w.current=null,b.current&&(clearInterval(b.current),b.current=null),T(!1)}),[]);e.useEffect((()=>{if(!g.current)return()=>{w.current?.(),M()};const e=()=>M(),t=()=>M();return document.addEventListener("mouseup",e),document.addEventListener("mouseleave",t),w.current=()=>{document.removeEventListener("mouseup",e),document.removeEventListener("mouseleave",t)},()=>{w.current?.(),w.current=null,M()}}),[L,M]);const X="always"===v||"auto"===v&&C||C&&E,Y=C||"always"===v;return s("div",{ref:u,className:i(d&&`${d}-scrollbar`,r),"data-orientation":c,"data-state":X?"visible":"hidden",style:{display:Y?void 0:"none",...o.style},onMouseDown:N,onMouseUp:M,onMouseLeave:M,...o,children:t})}));h.displayName="ScrollAreaScrollbar";const v=r((({children:t,className:r="",orientation:c="vertical",...u},d)=>{const{rootClass:f,scrollXThumbRef:m,scrollYThumbRef:h,scrollAreaViewportRef:v}=l(a),p=n(!1),y=n({x:0,y:0,scrollTop:0,scrollLeft:0}),b=o((e=>{v?.current&&(e.preventDefault(),e.stopPropagation(),p.current=!0,y.current={x:e.clientX,y:e.clientY,scrollTop:v.current.scrollTop,scrollLeft:v.current.scrollLeft},document.body.style.userSelect="none",document.body.style.cursor="grabbing")}),[v]),g=o((e=>{if(!p.current||!v?.current)return;const t=v.current,r="vertical"===c?h?.current:m?.current,n=r?.parentElement?.getBoundingClientRect();if(r&&n)if("vertical"===c){const c=(e.clientY-y.current.y)/(n.height-r.clientHeight),l=t.scrollHeight-t.clientHeight,o=y.current.scrollTop+c*l;t.scrollTop=Math.max(0,Math.min(o,l))}else{const c=(e.clientX-y.current.x)/(n.width-r.clientWidth),l=t.scrollWidth-t.clientWidth,o=y.current.scrollLeft+c*l;t.scrollLeft=Math.max(0,Math.min(o,l))}}),[c,v,m,h]),w=o((()=>{p.current=!1,document.body.style.cursor="",document.body.style.userSelect=""}),[]);e.useEffect((()=>{const e=e=>g(e),t=()=>w();return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t),w()}}),[g,w]);return s("div",{ref:e=>{const t="vertical"===c?h:m;t&&(t.current=e),"function"==typeof d?d(e):d&&(d.current=e)},className:i(f&&`${f}-thumb`,r),onMouseDown:b,...u,children:t})}));v.displayName="ScrollAreaThumb";const p=r((({children:e,className:t,...r},n)=>{const{rootClass:c}=l(a);return s("div",{ref:n,className:i(c&&`${c}-corner`,t),...r,children:e})}));p.displayName="ScrollAreaCorner";const y=e.forwardRef(((e,t)=>(console.warn("Direct usage of ScrollArea is not supported. Please use ScrollArea.Root and ScrollArea.Viewport instead."),null)));y.Root=f,y.Viewport=m,y.Scrollbar=h,y.Thumb=v,y.Corner=p,y.displayName="ScrollArea";export{y as default};
@@ -10,6 +10,7 @@ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectContentP
10
10
  interface ComboboxPrimitiveItemProps {
11
11
  children: React.ReactNode;
12
12
  value: string;
13
+ label?: string;
13
14
  disabled?: boolean;
14
15
  className?: string;
15
16
  [key: string]: any;
@@ -30,9 +31,10 @@ declare const SelectItem: React.ForwardRefExoticComponent<(Omit<Omit<Omit<Combob
30
31
  }, "ref">) & React.RefAttributes<HTMLElement>>;
31
32
 
32
33
  type ComboboxPrimitiveTriggerProps = {
33
- children: React.ReactNode;
34
+ children?: React.ReactNode;
34
35
  className?: string;
35
36
  disabled?: boolean;
37
+ renderValue?: (value: string, label: string) => React.ReactNode;
36
38
  [key: string]: any;
37
39
  };
38
40
 
@@ -1 +1 @@
1
- 'use client';import e,{useContext as o}from"react";import{jsx as t}from"react/jsx-runtime";import{C as r}from"./ComboboxPrimitive-D5wWLl2_.js";import{c as a}from"./index-6If6D2Zi.js";import{C as s}from"./check-DujVUWP-.js";import"./index-BQ2Hbb_x.js";import"./floating-ui.react-gB901AP2.js";import"react-dom";import"./index-98jQ1vTr.js";import"./index-CXzybYmm.js";import"./index-wRElCyvx.js";const i=e.createContext({rootClass:""}),l=e.forwardRef((({customRootClass:e,children:a,position:s="popper",...l},n)=>{const{rootClass:c}=o(i);return t(r.Content,{className:`${c}-content`,position:s,"data-position":s,ref:n,...l,children:a})}));l.displayName="SelectContent";const n=e.forwardRef((({customRootClass:e,children:a,value:s,disabled:l,...n},c)=>{const{rootClass:d}=o(i);return t(r.Item,{className:`${d}-item`,value:s,disabled:l,"data-disabled":l?"":void 0,role:"option","aria-disabled":l?"true":void 0,ref:c,...n,children:t("span",{className:`${d}-text`,children:a})})}));n.displayName="SelectItem";const c=e.forwardRef((({customRootClass:e,children:a,disabled:s,placeholder:l,...n},c)=>{const{rootClass:d}=o(i);return t(r.Trigger,{className:`${d}-trigger`,"aria-disabled":s?"true":void 0,"data-placeholder":l?"":void 0,disabled:s,ref:c,...n,children:a})}));c.displayName="SelectTrigger";const d=e.forwardRef((({customRootClass:e,children:o,defaultValue:s,value:l,onValueChange:n,shift:c,...d},m)=>{const f=a(e,"Select");return t(i.Provider,{value:{rootClass:f},children:t(r.Root,{className:`${f}-root`,defaultValue:s,value:l,onValueChange:n,shift:c,ref:m,...d,children:o})})}));d.displayName="SelectRoot";const m=e.forwardRef(((e,r)=>{const{rootClass:a}=o(i);return t("div",{className:`${a}-item-indicator`,ref:r,...e,children:t(s,{width:16,height:16})})}));m.displayName="SelectIndicator";const f=e.forwardRef((({children:e,container:o,...a},s)=>t(r.Portal,{ref:s,container:o,...a,children:e})));f.displayName="SelectPortal";const p=e.forwardRef((({children:e,...a},s)=>{const{rootClass:l}=o(i);return t(r.Group,{className:`${l}-group`,ref:s,...a,children:e})}));p.displayName="SelectGroup";const u=e.forwardRef(((e,o)=>(console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null)));u.displayName="Select";const h=u;h.Root=d,h.Content=l,h.Item=n,h.Trigger=c,h.Portal=f,h.Group=p,h.Indicator=m;export{h as default};
1
+ 'use client';import e,{useContext as o}from"react";import{jsx as t}from"react/jsx-runtime";import{C as r}from"./ComboboxPrimitive-BhHSrtiY.js";import{u as a}from"./useComponentClass-QwNivz0h.js";import{C as s}from"./check-DujVUWP-.js";import{T as i}from"./ThemeContext-Sm-iNANd.js";import{c as l}from"./clsx-BaVHROc5.js";import"./index-Db-tduwt.js";import"./floating-ui.react-Byzse64h.js";import"react-dom";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";import"./index-CXzybYmm.js";import"./index-wRElCyvx.js";const n=e.createContext({rootClass:""}),d=e.forwardRef((({customRootClass:e,children:a,position:s="popper",...i},l)=>{const{rootClass:d}=o(n);return t(r.Content,{className:d?`${d}-content`:void 0,position:s,"data-position":s,ref:l,...i,children:a})}));function c(o){return"string"==typeof o||"number"==typeof o?String(o):Array.isArray(o)?o.map(c).join(""):e.isValidElement(o)?c(o.props.children):""}d.displayName="SelectContent";const m=e.forwardRef((({customRootClass:e,children:a,value:s,label:i,disabled:l,...d},m)=>{const{rootClass:p}=o(n),f=i||c(a).trim()||s;return t(r.Item,{className:p?`${p}-item`:void 0,value:s,label:f,disabled:l,"data-disabled":l?"":void 0,role:"option","aria-disabled":l?"true":void 0,ref:m,...d,children:t("span",{className:p?`${p}-text`:void 0,children:a})})}));m.displayName="SelectItem";const p=e.forwardRef((({customRootClass:e,children:a,disabled:s,placeholder:i,...l},d)=>{const{rootClass:c}=o(n);return t(r.Trigger,{className:c?`${c}-trigger`:void 0,"aria-disabled":s?"true":void 0,"data-placeholder":i?"":void 0,disabled:s,ref:d,...l,children:a})}));p.displayName="SelectTrigger";const f=e.forwardRef((({customRootClass:e,children:o,defaultValue:s,value:i,onValueChange:l,sideOffset:d=4,...c},m)=>{const p=a(e,"Select");return t(n.Provider,{value:{rootClass:p},children:t(r.Root,{className:p?`${p}-root`:void 0,defaultValue:s,value:i,onValueChange:l,sideOffset:d,ref:m,...c,children:o})})}));f.displayName="SelectRoot";const u=e.forwardRef(((e,r)=>{const{rootClass:a}=o(n);return t("div",{className:a?`${a}-item-indicator`:void 0,ref:r,...e,children:t(s,{width:16,height:16})})}));u.displayName="SelectIndicator";const h=e.forwardRef((({children:e,container:a,...s},l)=>{const n=o(i),d=a??n?.portalRootRef.current;return t(r.Portal,{ref:l,container:d,...s,children:e})}));h.displayName="SelectPortal";const C=e.forwardRef((({children:e,className:a,...s},i)=>{const{rootClass:d}=o(n),c=l(d?`${d}-group`:void 0,a)||void 0;return t(r.Group,{className:c,ref:i,...s,children:e})}));C.displayName="SelectGroup";const v=e.forwardRef(((e,o)=>(console.warn("Direct usage of Select is not supported. Please use Select.Root, Select.Content, etc. instead."),null)));v.displayName="Select";const g=v;g.Root=f,g.Content=d,g.Item=m,g.Trigger=p,g.Portal=h,g.Group=C,g.Indicator=u;export{g as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as r}from"react/jsx-runtime";import a from"react";import{c as o}from"./index-6If6D2Zi.js";import{c as t}from"./clsx-BaVHROc5.js";import{P as e}from"./index-98jQ1vTr.js";const i="Separator",s=a.forwardRef((({orientation:a="horizontal",className:s,customRootClass:c,color:m="",decorative:n=!1,...l},d)=>{const f=o(c,i),p="vertical"===a?`${f}-vertical`:`${f}-horizontal`,u={};return u["data-orientation"]=a,m&&(u["data-rad-ui-accent-color"]=m),n&&(u.role="separator",u["aria-hidden"]="true"),r(e.div,{ref:d,className:t(f,p,s),...u,...l})}));s.displayName=i;export{s as default};
1
+ 'use client';import{jsx as o}from"react/jsx-runtime";import r from"react";import{u as a}from"./useComponentClass-QwNivz0h.js";import{c as t}from"./clsx-BaVHROc5.js";import{P as e}from"./index-m6qHOeQ9.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-B9ocQsG4.js";const s="Separator",i=r.forwardRef((({orientation:r="horizontal",className:i,customRootClass:m,color:n="",decorative:p=!1,...c},d)=>{const l=a(m,s),f=l?`${l}-${r}`:void 0,u={};return u["data-orientation"]=r,n&&(u["data-color"]=n),p&&(u.role="separator",u["aria-hidden"]="true"),o(e.div,{ref:d,className:t(l,f,i),...u,...c})}));i.displayName=s;export{i as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e,Fragment as t}from"react/jsx-runtime";import s from"react";import{c as r}from"./index-6If6D2Zi.js";import{c as o}from"./clsx-BaVHROc5.js";const i="Skeleton",a=s.forwardRef((({loading:s=!0,className:a="",customRootClass:l="",children:m,height:n,width:c,radius:d,style:f,...h},u)=>{if(!s)return e(t,{children:m});const p=r(l,i);return e("div",{ref:u,className:o(p,a),style:{...f,"--skeleton-height":n,"--skeleton-width":c,"--skeleton-radius":d},...h})}));a.displayName=i;export{a as default};
1
+ 'use client';import{jsx as e,Fragment as s}from"react/jsx-runtime";import t from"react";import{u as o}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import"./ThemeContext-Sm-iNANd.js";const a="Skeleton",i=t.forwardRef((({loading:t=!0,className:i="",customRootClass:l="",children:m,height:n,width:c,radius:d,style:h,...f},p)=>{const u=o(l,a);return t?e("div",{ref:p,className:r(u,i),style:{...h,"--skeleton-height":n,"--skeleton-width":c,"--skeleton-radius":d},...f}):e(s,{children:m})}));i.displayName=a;export{i as default};
@@ -35,7 +35,7 @@ declare const SliderRoot: React.ForwardRefExoticComponent<{
35
35
  pageStepMultiplier?: number;
36
36
  showStepMarks?: boolean;
37
37
  formatValue?: (value: number) => string;
38
- } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue" | "value" | "onValueChange"> & React.RefAttributes<HTMLDivElement>>;
38
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "value" | "defaultValue" | "onValueChange"> & React.RefAttributes<HTMLDivElement>>;
39
39
 
40
40
  type SliderTrackProps = {
41
41
  children: React.ReactNode;
@@ -1 +1 @@
1
- 'use client';import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import r,{createContext as n,forwardRef as o,useRef as l,useCallback as i}from"react";import{c as s}from"./clsx-BaVHROc5.js";import{c as u}from"./index-6If6D2Zi.js";import{u as c}from"./index-wRElCyvx.js";import{P as m}from"./index-98jQ1vTr.js";import{m as d}from"./mergeRefs-B8eZ_q-T.js";const p=n({rootClass:"",value:0,setValue:()=>{},minValue:0,maxValue:100,step:1,name:void 0,isDragging:!1,setDragging:()=>{},disabled:!1,orientation:"horizontal",pageStepMultiplier:10,showStepMarks:!1,formatValue:void 0,rootRef:{current:null},thumbRefs:void 0,registerThumbRef:void 0}),h="Slider",f=o((({children:t,className:a="",customRootClass:n="",defaultValue:o,value:m,onValueChange:d,onValueCommit:f,min:v=0,max:b=100,step:g=1,disabled:w=!1,name:x,orientation:y="horizontal",pageStepMultiplier:M=10,showStepMarks:$=!1,formatValue:k,...V},R)=>{const A=u(n,h),[S,N]=c(m,o??(Array.isArray(m)?m:0),d),[D,C]=r.useState(!1),P=r.useRef(null),E=r.useRef(S);r.useEffect((()=>{E.current=S}),[S]);const T=r.useRef(null),X=l([]),L=r.useMemo((()=>e=>{T.current=e,"function"==typeof R?R(e):R&&(R.current=e)}),[R]),B=i(((e,t)=>{X.current[e]=t}),[]),I=e=>{const t=T.current;if(!t)return;const a=t.getBoundingClientRect();let r;r="vertical"===y?(a.bottom-e.clientY)/a.height:(e.clientX-a.left)/a.width;const n=v+r*(b-v),o=Math.round(n/g)*g,l=(i=o,Math.min(b,Math.max(v,i)));var i;if(Array.isArray(S)){let e=P.current;if(null===e){const t=S.map((e=>Math.abs(e-l)));e=t.indexOf(Math.min(...t)),P.current=e}const t=S.map(((e,t)=>({value:e,origIndex:t})));t[e].value=l,t.sort(((e,t)=>e.value-t.value)),P.current=t.findIndex((t=>t.origIndex===e)),N(t.map((e=>e.value)))}else N(l)},U={rootClass:A,value:S,setValue:N,minValue:v,maxValue:b,step:g,name:x,isDragging:D,setDragging:C,disabled:w,orientation:y,pageStepMultiplier:M,showStepMarks:$,formatValue:k,rootRef:T,thumbRefs:X.current,registerThumbRef:B};return e(p.Provider,{value:U,children:e("div",{ref:L,className:s(A,a),"data-slider-root":A,"data-disabled":w,"data-orientation":y,onPointerDown:e=>{if(w)return;e.stopPropagation();const t=e.target.closest(`.${A}-thumb`);if(t&&Array.isArray(S)){const e=parseInt(t.getAttribute("data-index")||"0",10);P.current=e,t.focus()}else if(P.current=null,Array.isArray(S))T.current?.focus();else{const e=X.current[0];e?.current?.focus()}C(!0),I(e);const a=e=>{e.preventDefault(),I(e)},r=()=>{C(!1),P.current=null,document.removeEventListener("pointermove",a),document.removeEventListener("pointerup",r),f?.(E.current)};document.addEventListener("pointermove",a),document.addEventListener("pointerup",r)},onPointerMove:e=>{D&&(e.preventDefault(),I(e))},onPointerUp:()=>{C(!1),P.current=null},...V,children:t})})}));f.displayName=h;const v=o((({children:t,...a},n)=>{const{rootClass:o,orientation:l}=r.useContext(p);return e("div",{ref:n,className:`${o}-track`,style:"vertical"===l?{rotate:"180deg",position:"relative"}:{position:"relative"},...a,children:t})}));v.displayName="SliderTrack";const b=r.memo(o((({children:n,asChild:o=!1,index:l=0,"aria-label":i,"aria-labelledby":s,...u},c)=>{const{rootClass:h,value:f,minValue:v,maxValue:b,step:g,setValue:w,name:x,isDragging:y,setDragging:M,disabled:$,orientation:k,pageStepMultiplier:V,formatValue:R,registerThumbRef:A}=r.useContext(p),S=r.useRef(null);r.useEffect((()=>{A&&S.current&&A(l,S)}),[l,A]);const N=Array.isArray(f)&&l>=0&&l<f.length?f[l]:"number"==typeof f?f:v,D=Number.isFinite(N)?N:v,C=Math.min(b,Math.max(v,D)),P=b===v?0:(C-v)/(b-v)*100,[E,T]=r.useState(!1),X=y?"dragging":E?"active":"inactive",L=e(m.div,{ref:d(S,c),asChild:o,className:`${h}-thumb`,role:"slider",tabIndex:$?-1:0,"aria-valuemin":v,"aria-valuemax":b,"aria-valuenow":C,"aria-valuetext":R?R(C):void 0,"aria-orientation":k,"aria-label":i,"aria-labelledby":s,"data-state":X,"data-disabled":$,"data-index":l,onKeyDown:e=>{if($)return;let t=C;const a=Boolean(e.currentTarget.closest('[dir="rtl"]'));switch(e.key){case"ArrowRight":t=a?C-g:C+g;break;case"ArrowLeft":t=a?C+g:C-g;break;case"ArrowUp":t=C+g;break;case"ArrowDown":t=C-g;break;case"Home":t=v;break;case"End":t=b;break;case"PageUp":t=C+g*V;break;case"PageDown":t=C-g*V;break;default:return}e.preventDefault();const r=(n=t,Math.min(b,Math.max(v,n)));var n;if(Array.isArray(f)){const e=[...f];e[l]=r,w(e)}else w(r)},onPointerDown:e=>{$||(e.currentTarget.focus(),M(!0))},onPointerUp:()=>{M(!1)},onFocus:()=>T(!0),onBlur:()=>T(!1),style:"vertical"===k?{top:`calc(${P}% - 10px)`}:{left:`calc(${P}% - 10px)`},...u,children:n});return t(a,{children:[L,e("input",{type:"hidden",value:C,name:Array.isArray(f)?`${x}[${l}]`:x})]})})));b.displayName="SliderThumb";const g=o((({children:t,...a},n)=>{const{rootClass:o,value:l,minValue:i,maxValue:s,orientation:u}=r.useContext(p);let c=0,m=0;if(Array.isArray(l))if(0===l.length)c=0,m=0;else{const e=[...l].sort(((e,t)=>e-t)),t=e[0],a=e[e.length-1];c=s===i?0:(t-i)/(s-i)*100,m=s===i?0:(a-i)/(s-i)*100,1===l.length&&(c=0)}else c=0,m=s===i?0:(l-i)/(s-i)*100;const d=m-c;return e("div",{ref:n,className:`${o}-range`,style:"vertical"===u?{height:`${d}%`,marginTop:100-m+"%"}:{marginLeft:`${c}%`,width:`${d}%`},...a,children:t})}));g.displayName="SliderRange";const w=o((({children:a,customMarks:n,...o},l)=>{const{rootClass:i,minValue:s,maxValue:u,step:c,orientation:m,showStepMarks:d}=r.useContext(p);if(!d&&!n)return null;const h=[];if(n)n.forEach((({value:a,label:r})=>{const n=u===s?0:(a-s)/(u-s)*100;h.push(t("div",{className:`${i}-mark ${i}-mark-custom`,"data-testid":`mark-${a}`,style:"vertical"===m?{bottom:`${n}%`,left:"50%",transform:"translateX(-50%)"}:{left:`${n}%`,top:0,transform:"translateX(-50%)"},"data-value":a,children:[e("div",{className:`${i}-mark-line`,style:"vertical"===m?{width:"2px",height:"12px",position:"absolute",bottom:"-6px",left:"50%",transform:"translateX(-50%)"}:{width:"1px",height:"6px",position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)"}}),r&&e("span",{className:`${i}-mark-label`,style:"vertical"===m?{right:"16px",top:"50%",transform:"translateY(-50%)",whiteSpace:"nowrap"}:{top:"8px",left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap"},children:r})]},a))}));else for(let t=s;t<=u;t+=c){const a=u===s?0:(t-s)/(u-s)*100;h.push(e("div",{className:`${i}-mark`,"data-testid":`mark-${t}`,style:"vertical"===m?{bottom:`${a}%`,left:"50%",transform:"translateX(-50%)"}:{left:`${a}%`,top:0,transform:"translateX(-50%)"},"data-value":t,children:e("div",{className:`${i}-mark-line`,style:"vertical"===m?{width:"2px",height:"8px",position:"absolute",bottom:"-4px",left:"50%",transform:"translateX(-50%)"}:{width:"1px",height:"4px",position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)"}})},t))}return t("div",{ref:l,className:`${i}-marks`,style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",zIndex:1},...o,children:[h,a]})}));w.displayName="SliderMarks";const x=o((({children:a,"aria-label":n,"aria-labelledby":o,defaultValue:l=[25,75],value:i,onValueChange:s,...u},c)=>{const{rootClass:d,minValue:h,maxValue:f,step:v,disabled:b,orientation:g,rootRef:w}=r.useContext(p),[x,y]=r.useState(i||l),[M,$]=r.useState(null),[k,V]=r.useState(null),R=r.useRef(0),A=e=>Math.min(f,Math.max(h,e)),S=e=>{y(e),s?.(e)},N=f===h?0:(x[0]-h)/(f-h)*100,D=f===h?0:(x[1]-h)/(f-h)*100,C=(e,t)=>{const a=e.currentTarget.getBoundingClientRect();let r;r="vertical"===g?(a.bottom-e.clientY)/a.height:(e.clientX-a.left)/a.width;const n=h+r*(f-h),o=Math.round(n/v)*v,l=A(o),i=[...x];i["lower"===t?0:1]=l,"lower"===t?i[0]=Math.min(i[0],x[1]):i[1]=Math.max(i[1],x[0]),S(i)},P=(e,t)=>{if(b)return;e.stopPropagation(),$(t),C(e,t);const a=e=>{e.preventDefault();const a=w.current;if(!a)return;const r=a.getBoundingClientRect();let n;n="vertical"===g?(r.bottom-e.clientY)/r.height:(e.clientX-r.left)/r.width;const o=h+n*(f-h),l=Math.round(o/v)*v,i=A(l),s=[...x];s["lower"===t?0:1]=i,"lower"===t?s[0]=Math.min(s[0],x[1]):s[1]=Math.max(s[1],x[0]);const u=performance.now();u-R.current>16&&(S(s),R.current=u)},r=()=>{$(null),document.removeEventListener("pointermove",a),document.removeEventListener("pointerup",r)};document.addEventListener("pointermove",a),document.addEventListener("pointerup",r)},E=(e,t)=>{M&&M===t&&(e.preventDefault(),C(e,t))},T=()=>{$(null)},X=(e,t)=>{if(b)return;const a=[...x],r=Boolean(e.currentTarget.closest('[dir="rtl"]'));switch(e.key){case"ArrowRight":a["lower"===t?0:1]=r?x["lower"===t?0:1]-v:x["lower"===t?0:1]+v;break;case"ArrowLeft":a["lower"===t?0:1]=r?x["lower"===t?0:1]+v:x["lower"===t?0:1]-v;break;case"ArrowUp":a["lower"===t?0:1]=x["lower"===t?0:1]+v;break;case"ArrowDown":a["lower"===t?0:1]=x["lower"===t?0:1]-v;break;case"Home":a["lower"===t?0:1]=h;break;case"End":a["lower"===t?0:1]=f;break;default:return}e.preventDefault(),"lower"===t?a[0]=Math.min(a[0],x[1]):a[1]=Math.max(a[1],x[0]),a[0]=A(a[0]),a[1]=A(a[1]),S(a)};return t("div",{ref:c,className:`${d}-range-slider`,...u,children:[e(m.div,{className:`${d}-thumb ${d}-thumb-lower`,role:"slider",tabIndex:b?-1:0,"aria-valuemin":h,"aria-valuemax":f,"aria-valuenow":x[0],"aria-orientation":g,"aria-label":n?`${n} minimum`:"Minimum value","aria-labelledby":o,"data-state":"lower"===M?"dragging":"lower"===k?"active":"inactive","data-disabled":b,onKeyDown:e=>X(e,"lower"),onFocus:()=>V("lower"),onBlur:()=>V(null),onPointerDown:e=>P(e,"lower"),onPointerMove:e=>E(e,"lower"),onPointerUp:T,style:"vertical"===g?{bottom:`calc(${N}% - 8px)`}:{left:`calc(${N}% - 8px)`}}),e(m.div,{className:`${d}-thumb ${d}-thumb-upper`,role:"slider",tabIndex:b?-1:0,"aria-valuemin":h,"aria-valuemax":f,"aria-valuenow":x[1],"aria-orientation":g,"aria-label":n?`${n} maximum`:"Maximum value","aria-labelledby":o,"data-state":"upper"===M?"dragging":"upper"===k?"active":"inactive","data-disabled":b,onKeyDown:e=>X(e,"upper"),onFocus:()=>V("upper"),onBlur:()=>V(null),onPointerDown:e=>P(e,"upper"),onPointerMove:e=>E(e,"upper"),onPointerUp:T,style:"vertical"===g?{bottom:`calc(${D}% - 8px)`}:{left:`calc(${D}% - 8px)`}}),e("div",{className:`${d}-range-fill`,style:"vertical"===g?{bottom:`${Math.min(N,D)}%`,height:`${Math.abs(D-N)}%`,left:0,right:0}:{left:`${Math.min(N,D)}%`,width:`${Math.abs(D-N)}%`,top:0,bottom:0}}),a]})}));x.displayName="SliderRangeSlider";const y=o(((t,a)=>{const{defaultValue:r,min:n=0,max:o=100,step:l=1,orientation:i="horizontal",formatValue:s,"aria-label":u,"aria-labelledby":c,...m}=t;return e(y.Root,{ref:a,defaultValue:r,min:n,max:o,step:l,orientation:i,formatValue:s,...m,children:e(y.Track,{children:e(y.Range,{children:e(y.Thumb,{"aria-label":u,"aria-labelledby":c})})})})}));y.displayName="Slider",y.Root=f,y.Track=v,y.Range=g,y.Thumb=b,y.Marks=w,y.RangeSlider=x;export{y as default};
1
+ 'use client';import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import r,{createContext as o,forwardRef as n,useRef as l,useCallback as i}from"react";import{c as s}from"./clsx-BaVHROc5.js";import{u}from"./useComponentClass-QwNivz0h.js";import{u as c}from"./index-wRElCyvx.js";import{P as m}from"./index-m6qHOeQ9.js";import{m as d}from"./mergeRefs-B8eZ_q-T.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-B9ocQsG4.js";const p=o({rootClass:"",value:0,setValue:()=>{},minValue:0,maxValue:100,step:1,name:void 0,isDragging:!1,setDragging:()=>{},disabled:!1,orientation:"horizontal",pageStepMultiplier:10,showStepMarks:!1,formatValue:void 0,rootRef:{current:null},thumbRefs:void 0,registerThumbRef:void 0}),h="Slider",v=n((({children:t,className:a="",customRootClass:o="",defaultValue:n,value:m,onValueChange:d,onValueCommit:v,min:f=0,max:b=100,step:g=1,disabled:w=!1,name:x,orientation:y="horizontal",pageStepMultiplier:M=10,showStepMarks:$=!1,formatValue:k,...V},R)=>{const A=u(o,h),[N,C]=c(m,n??(Array.isArray(m)?m:0),d),[S,D]=r.useState(!1),P=r.useRef(null),T=r.useRef(N);r.useEffect((()=>{T.current=N}),[N]);const E=r.useRef(null),X=l([]),L=r.useMemo((()=>e=>{E.current=e,"function"==typeof R?R(e):R&&(R.current=e)}),[R]),j=i(((e,t)=>{X.current[e]=t}),[]),B=e=>{const t=E.current;if(!t)return;const a=t.getBoundingClientRect();let r;r="vertical"===y?(a.bottom-e.clientY)/a.height:(e.clientX-a.left)/a.width;const o=f+r*(b-f),n=Math.round(o/g)*g,l=(i=n,Math.min(b,Math.max(f,i)));var i;if(Array.isArray(N)){let e=P.current;if(null===e){const t=N.map((e=>Math.abs(e-l)));e=t.indexOf(Math.min(...t)),P.current=e}const t=N.map(((e,t)=>({value:e,origIndex:t})));t[e].value=l,t.sort(((e,t)=>e.value-t.value)),P.current=t.findIndex((t=>t.origIndex===e)),C(t.map((e=>e.value)))}else C(l)},I={rootClass:A,value:N,setValue:C,minValue:f,maxValue:b,step:g,name:x,isDragging:S,setDragging:D,disabled:w,orientation:y,pageStepMultiplier:M,showStepMarks:$,formatValue:k,rootRef:E,thumbRefs:X.current,registerThumbRef:j};return e(p.Provider,{value:I,children:e("div",{ref:L,className:s(A,a),"data-slider-root":A,"data-disabled":w,"data-orientation":y,onPointerDown:e=>{if(w)return;e.stopPropagation();const t=e.target,a=A?t.closest(`.${A}-thumb`):t.closest('[role="slider"]');if(a&&Array.isArray(N)){const e=parseInt(a.getAttribute("data-index")||"0",10);P.current=e,a.focus()}else if(P.current=null,Array.isArray(N))E.current?.focus();else{const e=X.current[0];e?.current?.focus()}D(!0),B(e);const r=e=>{e.preventDefault(),B(e)},o=()=>{D(!1),P.current=null,document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",o),v?.(T.current)};document.addEventListener("pointermove",r),document.addEventListener("pointerup",o)},onPointerMove:e=>{S&&(e.preventDefault(),B(e))},onPointerUp:()=>{D(!1),P.current=null},...V,children:t})})}));v.displayName=h;const f=n((({children:t,className:a,style:o,...n},l)=>{const{rootClass:i,orientation:u}=r.useContext(p),c="vertical"===u?{rotate:"180deg",position:"relative"}:{position:"relative"},m=s(i?`${i}-track`:void 0,a)||void 0;return e("div",{ref:l,className:m,style:{...o,...c},...n,children:t})}));f.displayName="SliderTrack";const b=r.memo(n((({children:o,asChild:n=!1,index:l=0,"aria-label":i,"aria-labelledby":s,...u},c)=>{const{rootClass:h,value:v,minValue:f,maxValue:b,step:g,setValue:w,name:x,isDragging:y,setDragging:M,disabled:$,orientation:k,pageStepMultiplier:V,formatValue:R,registerThumbRef:A}=r.useContext(p),N=r.useRef(null);r.useEffect((()=>{A&&N.current&&A(l,N)}),[l,A]);const C=Array.isArray(v)&&l>=0&&l<v.length?v[l]:"number"==typeof v?v:f,S=Number.isFinite(C)?C:f,D=Math.min(b,Math.max(f,S)),P=b===f?0:(D-f)/(b-f)*100,[T,E]=r.useState(!1),X=y?"dragging":T?"active":"inactive",L=e(m.div,{ref:d(N,c),asChild:n,className:h?`${h}-thumb`:void 0,role:"slider",tabIndex:$?-1:0,"aria-valuemin":f,"aria-valuemax":b,"aria-valuenow":D,"aria-valuetext":R?R(D):void 0,"aria-orientation":k,"aria-label":i,"aria-labelledby":s,"data-state":X,"data-disabled":$,"data-index":l,onKeyDown:e=>{if($)return;let t=D;const a=Boolean(e.currentTarget.closest('[dir="rtl"]'));switch(e.key){case"ArrowRight":t=a?D-g:D+g;break;case"ArrowLeft":t=a?D+g:D-g;break;case"ArrowUp":t=D+g;break;case"ArrowDown":t=D-g;break;case"Home":t=f;break;case"End":t=b;break;case"PageUp":t=D+g*V;break;case"PageDown":t=D-g*V;break;default:return}e.preventDefault();const r=(o=t,Math.min(b,Math.max(f,o)));var o;if(Array.isArray(v)){const e=[...v];e[l]=r,w(e)}else w(r)},onPointerDown:e=>{$||(e.currentTarget.focus(),M(!0))},onPointerUp:()=>{M(!1)},onFocus:()=>E(!0),onBlur:()=>E(!1),style:"vertical"===k?{top:`calc(${P}% - 10px)`}:{left:`calc(${P}% - 10px)`},...u,children:o});return t(a,{children:[L,e("input",{type:"hidden",value:D,name:Array.isArray(v)?`${x}[${l}]`:x})]})})));b.displayName="SliderThumb";const g=n((({children:t,className:a,style:o,...n},l)=>{const{rootClass:i,value:u,minValue:c,maxValue:m,orientation:d}=r.useContext(p);let h=0,v=0;if(Array.isArray(u))if(0===u.length)h=0,v=0;else{const e=[...u].sort(((e,t)=>e-t)),t=e[0],a=e[e.length-1];h=m===c?0:(t-c)/(m-c)*100,v=m===c?0:(a-c)/(m-c)*100,1===u.length&&(h=0)}else h=0,v=m===c?0:(u-c)/(m-c)*100;const f=v-h,b=s(i?`${i}-range`:void 0,a)||void 0;return e("div",{ref:l,className:b,style:{...o,..."vertical"===d?{height:`${f}%`,marginTop:100-v+"%"}:{marginLeft:`${h}%`,width:`${f}%`}},...n,children:t})}));g.displayName="SliderRange";const w=n((({children:a,customMarks:o,...n},l)=>{const{rootClass:i,minValue:s,maxValue:u,step:c,orientation:m,showStepMarks:d}=r.useContext(p);if(!d&&!o)return null;const h=[];if(o)o.forEach((({value:a,label:r})=>{const o=u===s?0:(a-s)/(u-s)*100;h.push(t("div",{className:i?`${i}-mark ${i}-mark-custom`:void 0,"data-testid":`mark-${a}`,style:"vertical"===m?{bottom:`${o}%`,left:"50%",transform:"translateX(-50%)"}:{left:`${o}%`,top:0,transform:"translateX(-50%)"},"data-value":a,children:[e("div",{className:i?`${i}-mark-line`:void 0,style:"vertical"===m?{width:"2px",height:"12px",position:"absolute",bottom:"-6px",left:"50%",transform:"translateX(-50%)"}:{width:"1px",height:"6px",position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)"}}),r&&e("span",{className:i?`${i}-mark-label`:void 0,style:"vertical"===m?{right:"16px",top:"50%",transform:"translateY(-50%)",whiteSpace:"nowrap"}:{top:"8px",left:"50%",transform:"translateX(-50%)",whiteSpace:"nowrap"},children:r})]},a))}));else for(let t=s;t<=u;t+=c){const a=u===s?0:(t-s)/(u-s)*100;h.push(e("div",{className:i?`${i}-mark`:void 0,"data-testid":`mark-${t}`,style:"vertical"===m?{bottom:`${a}%`,left:"50%",transform:"translateX(-50%)"}:{left:`${a}%`,top:0,transform:"translateX(-50%)"},"data-value":t,children:e("div",{className:i?`${i}-mark-line`:void 0,style:"vertical"===m?{width:"2px",height:"8px",position:"absolute",bottom:"-4px",left:"50%",transform:"translateX(-50%)"}:{width:"1px",height:"4px",position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)"}})},t))}return t("div",{ref:l,className:i?`${i}-marks`:void 0,style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",zIndex:1},...n,children:[h,a]})}));w.displayName="SliderMarks";const x=n((({children:a,"aria-label":o,"aria-labelledby":n,defaultValue:l=[25,75],value:i,onValueChange:s,...u},c)=>{const{rootClass:d,minValue:h,maxValue:v,step:f,disabled:b,orientation:g,rootRef:w}=r.useContext(p),[x,y]=r.useState(i||l),[M,$]=r.useState(null),[k,V]=r.useState(null),R=r.useRef(0),A=e=>Math.min(v,Math.max(h,e)),N=e=>{y(e),s?.(e)},C=v===h?0:(x[0]-h)/(v-h)*100,S=v===h?0:(x[1]-h)/(v-h)*100,D=(e,t)=>{const a=e.currentTarget.getBoundingClientRect();let r;r="vertical"===g?(a.bottom-e.clientY)/a.height:(e.clientX-a.left)/a.width;const o=h+r*(v-h),n=Math.round(o/f)*f,l=A(n),i=[...x];i["lower"===t?0:1]=l,"lower"===t?i[0]=Math.min(i[0],x[1]):i[1]=Math.max(i[1],x[0]),N(i)},P=(e,t)=>{if(b)return;e.stopPropagation(),$(t),D(e,t);const a=e=>{e.preventDefault();const a=w.current;if(!a)return;const r=a.getBoundingClientRect();let o;o="vertical"===g?(r.bottom-e.clientY)/r.height:(e.clientX-r.left)/r.width;const n=h+o*(v-h),l=Math.round(n/f)*f,i=A(l),s=[...x];s["lower"===t?0:1]=i,"lower"===t?s[0]=Math.min(s[0],x[1]):s[1]=Math.max(s[1],x[0]);const u=performance.now();u-R.current>16&&(N(s),R.current=u)},r=()=>{$(null),document.removeEventListener("pointermove",a),document.removeEventListener("pointerup",r)};document.addEventListener("pointermove",a),document.addEventListener("pointerup",r)},T=(e,t)=>{M&&M===t&&(e.preventDefault(),D(e,t))},E=()=>{$(null)},X=(e,t)=>{if(b)return;const a=[...x],r=Boolean(e.currentTarget.closest('[dir="rtl"]'));switch(e.key){case"ArrowRight":a["lower"===t?0:1]=r?x["lower"===t?0:1]-f:x["lower"===t?0:1]+f;break;case"ArrowLeft":a["lower"===t?0:1]=r?x["lower"===t?0:1]+f:x["lower"===t?0:1]-f;break;case"ArrowUp":a["lower"===t?0:1]=x["lower"===t?0:1]+f;break;case"ArrowDown":a["lower"===t?0:1]=x["lower"===t?0:1]-f;break;case"Home":a["lower"===t?0:1]=h;break;case"End":a["lower"===t?0:1]=v;break;default:return}e.preventDefault(),"lower"===t?a[0]=Math.min(a[0],x[1]):a[1]=Math.max(a[1],x[0]),a[0]=A(a[0]),a[1]=A(a[1]),N(a)};return t("div",{ref:c,className:d?`${d}-range-slider`:void 0,...u,children:[e(m.div,{className:d?`${d}-thumb ${d}-thumb-lower`:void 0,role:"slider",tabIndex:b?-1:0,"aria-valuemin":h,"aria-valuemax":v,"aria-valuenow":x[0],"aria-orientation":g,"aria-label":o?`${o} minimum`:"Minimum value","aria-labelledby":n,"data-state":"lower"===M?"dragging":"lower"===k?"active":"inactive","data-disabled":b,onKeyDown:e=>X(e,"lower"),onFocus:()=>V("lower"),onBlur:()=>V(null),onPointerDown:e=>P(e,"lower"),onPointerMove:e=>T(e,"lower"),onPointerUp:E,style:"vertical"===g?{bottom:`calc(${C}% - 8px)`}:{left:`calc(${C}% - 8px)`}}),e(m.div,{className:d?`${d}-thumb ${d}-thumb-upper`:void 0,role:"slider",tabIndex:b?-1:0,"aria-valuemin":h,"aria-valuemax":v,"aria-valuenow":x[1],"aria-orientation":g,"aria-label":o?`${o} maximum`:"Maximum value","aria-labelledby":n,"data-state":"upper"===M?"dragging":"upper"===k?"active":"inactive","data-disabled":b,onKeyDown:e=>X(e,"upper"),onFocus:()=>V("upper"),onBlur:()=>V(null),onPointerDown:e=>P(e,"upper"),onPointerMove:e=>T(e,"upper"),onPointerUp:E,style:"vertical"===g?{bottom:`calc(${S}% - 8px)`}:{left:`calc(${S}% - 8px)`}}),e("div",{className:d?`${d}-range-fill`:void 0,style:"vertical"===g?{bottom:`${Math.min(C,S)}%`,height:`${Math.abs(S-C)}%`,left:0,right:0}:{left:`${Math.min(C,S)}%`,width:`${Math.abs(S-C)}%`,top:0,bottom:0}}),a]})}));x.displayName="SliderRangeSlider";const y=n(((t,a)=>{const{defaultValue:r,min:o=0,max:n=100,step:l=1,orientation:i="horizontal",formatValue:s,"aria-label":u,"aria-labelledby":c,...m}=t;return e(y.Root,{ref:a,defaultValue:r,min:o,max:n,step:l,orientation:i,formatValue:s,...m,children:e(y.Track,{children:e(y.Range,{children:e(y.Thumb,{"aria-label":u,"aria-labelledby":c})})})})}));y.displayName="Slider",y.Root=v,y.Track=f,y.Range=g,y.Thumb=b,y.Marks=w,y.RangeSlider=x;export{y as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as s}from"react/jsx-runtime";import r from"react";import{c as e}from"./index-6If6D2Zi.js";import{c as a}from"./index-3dZuI04X.js";import{c as o}from"./clsx-BaVHROc5.js";const i="Spinner",m=r.forwardRef((({className:r,customRootClass:m="",size:t="",...c},n)=>{const p=e(m,i),f=a("spinner",{size:t});return s("div",{className:`${p}-container`,children:s("span",{className:o(p,r),...c,...f})})}));m.displayName=i;export{m as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import e from"react";import{u as o}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./index-eAZUMNef.js";import{c as a}from"./clsx-BaVHROc5.js";import"./ThemeContext-Sm-iNANd.js";const t="Spinner",m=e.forwardRef((({className:e,customRootClass:m="",size:i="",...n},c)=>{const p=o(m,t),f=r("spinner",{size:i}),l=a(p,e)||void 0;return s("div",{className:p?`${p}-container`:void 0,children:s("span",{ref:c,className:l,...n,...f})})}));m.displayName=t;export{m as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import t,{createContext as n,useRef as r,useState as i,useCallback as o,useMemo as a,useEffect as s}from"react";import{c as l}from"./index-6If6D2Zi.js";import{c}from"./clsx-BaVHROc5.js";const m=n(null),u=()=>{const e=t.useContext(m);if(!e)throw new Error("Splitter components must be used within a Splitter.Root");return e},d=t.forwardRef((({orientation:t="horizontal",children:n,className:u,customRootClass:d="",defaultSizes:h=[50,50],minSizes:f=[0,0],maxSizes:p=[100,100],onSizesChange:v,style:x,...S},w)=>{const y=l(d,"Splitter"),M=r(null),[z,g]=i(h),[D,N]=i(!1),[R,E]=i(null),[L,A]=i(null),b=o((e=>{M.current=e,"function"==typeof w?w(e):w&&(w.current=e)}),[w]),C=a((()=>({minSizes:f||[],maxSizes:p||[]})),[f,p]),H=r(null);s((()=>()=>{H.current&&(clearTimeout(H.current),H.current=null)}),[]);const X=r(z),Y=r(C);X.current=z,Y.current=C;const k="horizontal"===t,P=o(((e,t=!1)=>{g(e),H.current&&clearTimeout(H.current),v&&(t?v(e):H.current=setTimeout((()=>{v(e)}),16))}),[v]),K=o(((e,t)=>{t.preventDefault();const n=k?"clientX"in t?t.clientX:t.touches[0].clientX:"clientY"in t?t.clientY:t.touches[0].clientY,r=[...X.current];A({position:n,sizes:r}),N(!0),E(e);let i=null,o=0;const a=t=>{if(!M.current)return;const a=Date.now();a-o<16||(i&&cancelAnimationFrame(i),i=requestAnimationFrame((()=>{const i=((k?"clientX"in t?t.clientX:t.touches[0].clientX:"clientY"in t?t.clientY:t.touches[0].clientY)-n)/(k?M.current.offsetWidth:M.current.offsetHeight)*100,s=[...r],{minSizes:l,maxSizes:c}=Y.current,m=e,u=e+1;s.length;const d=s[m],h=s[u],f=Math.max(l[m]||0,Math.min(c[m]||100,d+i)),p=Math.max(l[u]||0,Math.min(c[u]||100,h-i)),v=f+p,x=100-(d+h);if(Math.abs(i)>.1)if(v<=100)s[m]=f,s[u]=p;else{const e=d/(d+h),t=100-x;s[m]=Math.max(l[m]||0,Math.min(c[m]||100,t*e)),s[u]=Math.max(l[u]||0,Math.min(c[u]||100,t*(1-e)))}g(s),o=a})))},s=()=>{i&&cancelAnimationFrame(i),N(!1),E(null),A(null);const e=X.current;v&&v(e),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),document.removeEventListener("touchmove",a),document.removeEventListener("touchend",s)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",s),document.addEventListener("touchmove",a),document.addEventListener("touchend",s)}),[k,v]),T=o(((e,t)=>{const n=t.shiftKey?10:1,r=[...X.current],{minSizes:i,maxSizes:o}=Y.current;let a=0;if(k?("ArrowLeft"===t.key&&(a=-n),"ArrowRight"===t.key&&(a=n)):("ArrowUp"===t.key&&(a=-n),"ArrowDown"===t.key&&(a=n)),0!==a){t.preventDefault();const n=e,s=e+1,l=r[n],c=r[s],m=Math.max(i[n]||0,Math.min(o[n]||100,l+a)),u=Math.max(i[s]||0,Math.min(o[s]||100,c-a)),d=m+u,h=100-(l+c);if(Math.abs(a)>.1)if(d<=100)r[n]=m,r[s]=u;else{const e=l/(l+c),t=100-h;r[n]=Math.max(i[n]||0,Math.min(o[n]||100,t*e)),r[s]=Math.max(i[s]||0,Math.min(o[s]||100,t*(1-e)))}P(r,!0)}}),[k,P]),$={orientation:t,sizes:z,setSizes:P,startDrag:K,handleKeyDown:T,isDragging:D,activeHandleIndex:R,rootClass:y};return e(m.Provider,{value:$,children:e("div",{...S,ref:b,className:c(y,u),style:{display:"flex",flexDirection:k?"row":"column",width:"100%",height:"100%",...x},children:n})})}));d.displayName="SplitterRoot";const h=t.forwardRef((({index:t,children:n,className:r,style:i,...o},a)=>{const{sizes:s,orientation:l,rootClass:m}=u(),d={flexBasis:`${s[t]}%`,flexGrow:0,flexShrink:0,overflow:"auto",minWidth:"horizontal"===l?0:void 0,minHeight:"vertical"===l?0:void 0,...i};return e("div",{...o,ref:a,className:c(`${m}-panel`,r),style:d,children:n})}));h.displayName="SplitterPanel";const f=t.forwardRef((({index:t,className:n,"aria-label":r,style:i,...o},a)=>{const{startDrag:s,orientation:l,isDragging:m,activeHandleIndex:d,handleKeyDown:h,rootClass:f}=u();return e("div",{...o,ref:a,className:c(`${f}-handle`,{active:m&&d===t},n),role:"separator","aria-orientation":l,"aria-label":r||`${l} resize handle`,tabIndex:0,onMouseDown:e=>s(t,e),onTouchStart:e=>s(t,e),onKeyDown:e=>h(t,e),style:i})}));f.displayName="SplitterHandle";const p=t.forwardRef(((t,n)=>(console.warn("Direct usage of Splitter is not supported. Please use Splitter.Root, Splitter.Panel, etc. instead."),e("div",{ref:n,...t}))));p.displayName="Splitter",p.Root=d,p.Panel=h,p.Handle=f;export{p as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import t,{createContext as n,useRef as r,useState as i,useCallback as o,useMemo as a,useEffect as s}from"react";import{u as l}from"./useComponentClass-QwNivz0h.js";import{c}from"./clsx-BaVHROc5.js";import"./ThemeContext-Sm-iNANd.js";const m=n(null),u=()=>{const e=t.useContext(m);if(!e)throw new Error("Splitter components must be used within a Splitter.Root");return e},d=t.forwardRef((({orientation:t="horizontal",children:n,className:u,customRootClass:d="",defaultSizes:h=[50,50],minSizes:f=[0,0],maxSizes:p=[100,100],onSizesChange:v,style:x,...S},w)=>{const y=l(d,"Splitter"),M=r(null),[z,g]=i(h),[D,N]=i(!1),[R,C]=i(null),[E,L]=i(null),A=o((e=>{M.current=e,"function"==typeof w?w(e):w&&(w.current=e)}),[w]),b=a((()=>({minSizes:f||[],maxSizes:p||[]})),[f,p]),H=r(null);s((()=>()=>{H.current&&(clearTimeout(H.current),H.current=null)}),[]);const X=r(z),Y=r(b);X.current=z,Y.current=b;const k="horizontal"===t,P=o(((e,t=!1)=>{g(e),H.current&&clearTimeout(H.current),v&&(t?v(e):H.current=setTimeout((()=>{v(e)}),16))}),[v]),T=o(((e,t)=>{t.preventDefault();const n=k?"clientX"in t?t.clientX:t.touches[0].clientX:"clientY"in t?t.clientY:t.touches[0].clientY,r=[...X.current];L({position:n,sizes:r}),N(!0),C(e);let i=null,o=0;const a=t=>{if(!M.current)return;const a=Date.now();a-o<16||(i&&cancelAnimationFrame(i),i=requestAnimationFrame((()=>{const i=((k?"clientX"in t?t.clientX:t.touches[0].clientX:"clientY"in t?t.clientY:t.touches[0].clientY)-n)/(k?M.current.offsetWidth:M.current.offsetHeight)*100,s=[...r],{minSizes:l,maxSizes:c}=Y.current,m=e,u=e+1;s.length;const d=s[m],h=s[u],f=Math.max(l[m]||0,Math.min(c[m]||100,d+i)),p=Math.max(l[u]||0,Math.min(c[u]||100,h-i)),v=f+p,x=100-(d+h);if(Math.abs(i)>.1)if(v<=100)s[m]=f,s[u]=p;else{const e=d/(d+h),t=100-x;s[m]=Math.max(l[m]||0,Math.min(c[m]||100,t*e)),s[u]=Math.max(l[u]||0,Math.min(c[u]||100,t*(1-e)))}g(s),o=a})))},s=()=>{i&&cancelAnimationFrame(i),N(!1),C(null),L(null);const e=X.current;v&&v(e),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),document.removeEventListener("touchmove",a),document.removeEventListener("touchend",s)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",s),document.addEventListener("touchmove",a),document.addEventListener("touchend",s)}),[k,v]),j=o(((e,t)=>{const n=t.shiftKey?10:1,r=[...X.current],{minSizes:i,maxSizes:o}=Y.current;let a=0;if(k?("ArrowLeft"===t.key&&(a=-n),"ArrowRight"===t.key&&(a=n)):("ArrowUp"===t.key&&(a=-n),"ArrowDown"===t.key&&(a=n)),0!==a){t.preventDefault();const n=e,s=e+1,l=r[n],c=r[s],m=Math.max(i[n]||0,Math.min(o[n]||100,l+a)),u=Math.max(i[s]||0,Math.min(o[s]||100,c-a)),d=m+u,h=100-(l+c);if(Math.abs(a)>.1)if(d<=100)r[n]=m,r[s]=u;else{const e=l/(l+c),t=100-h;r[n]=Math.max(i[n]||0,Math.min(o[n]||100,t*e)),r[s]=Math.max(i[s]||0,Math.min(o[s]||100,t*(1-e)))}P(r,!0)}}),[k,P]),K={orientation:t,sizes:z,setSizes:P,startDrag:T,handleKeyDown:j,isDragging:D,activeHandleIndex:R,rootClass:y};return e(m.Provider,{value:K,children:e("div",{...S,ref:A,className:c(y,u),style:{display:"flex",flexDirection:k?"row":"column",width:"100%",height:"100%",...x},children:n})})}));d.displayName="SplitterRoot";const h=t.forwardRef((({index:t,children:n,className:r,style:i,...o},a)=>{const{sizes:s,orientation:l,rootClass:m}=u(),d={flexBasis:`${s[t]}%`,flexGrow:0,flexShrink:0,overflow:"auto",minWidth:"horizontal"===l?0:void 0,minHeight:"vertical"===l?0:void 0,...i};return e("div",{...o,ref:a,className:c(m&&`${m}-panel`,r),style:d,children:n})}));h.displayName="SplitterPanel";const f=t.forwardRef((({index:t,className:n,"aria-label":r,style:i,...o},a)=>{const{startDrag:s,orientation:l,isDragging:m,activeHandleIndex:d,handleKeyDown:h,rootClass:f}=u();return e("div",{...o,ref:a,className:c(f&&`${f}-handle`,{active:m&&d===t},n),role:"separator","aria-orientation":l,"aria-label":r||`${l} resize handle`,tabIndex:0,onMouseDown:e=>s(t,e),onTouchStart:e=>s(t,e),onKeyDown:e=>h(t,e),style:i})}));f.displayName="SplitterHandle";const p=t.forwardRef(((t,n)=>(console.warn("Direct usage of Splitter is not supported. Please use Splitter.Root, Splitter.Panel, etc. instead."),e("div",{ref:n,...t}))));p.displayName="Splitter",p.Root=d,p.Panel=h,p.Handle=f;export{p as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{c as s}from"./index-6If6D2Zi.js";import{P as r}from"./index-98jQ1vTr.js";import{createContext as a,useContext as n}from"react";import{u as o}from"./index-wRElCyvx.js";const l=a(null),c=()=>{const e=n(l);if(!e)throw new Error("useStepsContext must be used within a StepsContext.Provider");return e},i=Object.assign((()=>(console.warn("Direct usage of Steps is not supported. Please use Steps.Root, Steps.Item, etc. instead."),null)),{Root:({children:a,className:n,customRootClass:c,orientation:i="horizontal",value:d,defaultValue:m,onValueChange:u,...p})=>{const[h,v]=o(d,m??0,u),N=s(c,"Steps");return e(l.Provider,{value:{currentStep:h,setCurrentStep:v,rootClass:N,orientation:i},children:e(r.div,{className:t(N,n,`${N}-${i}`),"data-orientation":i,...p,children:a})})},Item:({children:s,value:r=0,className:a="",...n})=>{const{rootClass:o,currentStep:l}=c(),i="number"==typeof r&&l>r?"completed":"number"==typeof r&&l===r?"active":"inactive";return e("div",{className:t(`${o}-item`,a),"data-state":i,"data-value":r,...n,children:s})},Track:({children:s,className:r="",...a})=>{const{rootClass:n}=c();return e("div",{className:t(`${n}-track`,r),...a,children:s})},Bubble:({children:s,className:r="",...a})=>{const{rootClass:n}=c();return e("div",{className:t(`${n}-bubble`,r),...a,children:s})},Line:({children:s,className:r="",...a})=>{const{rootClass:n}=c();return e("div",{className:t(`${n}-line`,r),...a,children:s})},Content:({children:s,className:r="",...a})=>{const{rootClass:n}=c();return e("div",{className:t(`${n}-content`,r),...a,children:s})},Title:({children:s,className:r="",...a})=>{const{rootClass:n}=c();return e("div",{className:t(`${n}-title`,r),...a,children:s})},Description:({children:s,className:r="",...a})=>{const{rootClass:n}=c();return e("div",{className:t(`${n}-description`,r),...a,children:s})}});export{i as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{u as s}from"./useComponentClass-QwNivz0h.js";import{P as r}from"./index-m6qHOeQ9.js";import{createContext as a,useContext as o}from"react";import{u as n}from"./index-wRElCyvx.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-B9ocQsG4.js";const l=a(null),i=()=>{const e=o(l);if(!e)throw new Error("useStepsContext must be used within a StepsContext.Provider");return e},c=Object.assign((()=>(console.warn("Direct usage of Steps is not supported. Please use Steps.Root, Steps.Item, etc. instead."),null)),{Root:({children:a,className:o,customRootClass:i,orientation:c="horizontal",value:m,defaultValue:d,onValueChange:u,...p})=>{const[h,C]=n(m,d??0,u),v=s(i,"Steps");return e(l.Provider,{value:{currentStep:h,setCurrentStep:C,rootClass:v,orientation:c},children:e(r.div,{className:t(v,o,v&&`${v}-${c}`),"data-orientation":c,...p,children:a})})},Item:({children:s,value:r=0,className:a="",...o})=>{const{rootClass:n,currentStep:l}=i(),c="number"==typeof r&&l>r?"completed":"number"==typeof r&&l===r?"active":"inactive";return e("div",{className:t(n&&`${n}-item`,a),"data-state":c,"data-value":r,...o,children:s})},Track:({children:s,className:r="",...a})=>{const{rootClass:o}=i();return e("div",{className:t(o&&`${o}-track`,r),...a,children:s})},Bubble:({children:s,className:r="",...a})=>{const{rootClass:o}=i();return e("div",{className:t(o&&`${o}-bubble`,r),...a,children:s})},Line:({children:s,className:r="",...a})=>{const{rootClass:o}=i();return e("div",{className:t(o&&`${o}-line`,r),...a,children:s})},Content:({children:s,className:r="",...a})=>{const{rootClass:o}=i();return e("div",{className:t(o&&`${o}-content`,r),...a,children:s})},Title:({children:s,className:r="",...a})=>{const{rootClass:o}=i();return e("div",{className:t(o&&`${o}-title`,r),...a,children:s})},Description:({children:s,className:r="",...a})=>{const{rootClass:o}=i();return e("div",{className:t(o&&`${o}-description`,r),...a,children:s})}});export{c as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as r}from"react/jsx-runtime";import s from"react";import{c as o}from"./clsx-BaVHROc5.js";import{c as t}from"./index-6If6D2Zi.js";const a="Strong",e=s.forwardRef((({children:s,className:e,customRootClass:m,...c},i)=>{const n=t(m,a);return r("strong",{ref:i,className:o(n,e),...c,children:s})}));e.displayName=a;export{e as default};
1
+ 'use client';import{jsx as r}from"react/jsx-runtime";import s from"react";import{c as o}from"./clsx-BaVHROc5.js";import{u as t}from"./useComponentClass-QwNivz0h.js";import"./ThemeContext-Sm-iNANd.js";const e="Strong",a=s.forwardRef((({children:s,className:a,customRootClass:m,...c},n)=>{const i=t(m,e);return r("strong",{ref:n,className:o(i,a),...c,children:s})}));a.displayName=e;export{a as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import{createContext as a,forwardRef as s,useContext as d}from"react";import{B as i}from"./index-BOy86lYu.js";import{c}from"./index-6If6D2Zi.js";import{c as t,a as r,b as o}from"./index-3dZuI04X.js";import{u as l}from"./index-wRElCyvx.js";import{P as h}from"./index-98jQ1vTr.js";const n=a({checked:!1,setChecked:()=>{},rootClass:"",disabled:!1}),m="Switch",u=s((({children:a,customRootClass:s,color:d="",variant:h,size:u,defaultChecked:k=!1,checked:C,onCheckedChange:p,disabled:f=!1,required:b=!1,name:w,value:v,asChild:x=!1,...j},N)=>{const[S,P]=l(C,k,p),R=c(s,m),T=t("switch",{variant:h,size:u}),g=o(d),q=r(T,g),y={checked:S,setChecked:P,rootClass:R,disabled:f},z={...q,"data-state":S?"checked":"unchecked","data-disabled":f?"":void 0,role:"switch","aria-checked":S,"aria-required":b,disabled:f,...j};return w&&(z.name=w),v&&(z.value=v),e(n.Provider,{value:y,children:e(i,{ref:N,onClick:()=>{f||P(!S)},className:R,asChild:x,...z,children:a})})}));u.displayName=m;const k=s((({asChild:a=!1,className:s,children:i,...c},t)=>{const{checked:r,rootClass:o,disabled:l}=d(n),m={};return m["data-state"]=r?"checked":"unchecked",l&&(m["data-disabled"]=""),e(h.span,{ref:t,role:"switch",className:`${o}-indicator ${s||""}`,asChild:a,...m,...c,children:i})}));k.displayName="SwitchThumb";const C=()=>(console.warn("Direct usage of Switch is not supported. Please use Switch.Root, Switch.Thumb, etc. instead."),null);C.Root=u,C.Thumb=k;export{C as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{createContext as s,forwardRef as a,useContext as t}from"react";import{B as i}from"./index-gM8bbyw1.js";import{u as c}from"./useComponentClass-QwNivz0h.js";import{c as d,a as o,b as r}from"./index-eAZUMNef.js";import{u as l}from"./index-wRElCyvx.js";import{c as n}from"./clsx-BaVHROc5.js";import{P as h}from"./index-m6qHOeQ9.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-B9ocQsG4.js";const m=s({checked:!1,setChecked:()=>{},rootClass:"",disabled:!1}),u="Switch",p=a((({children:s,customRootClass:a,color:t="",variant:n,size:h,defaultChecked:p=!1,checked:C,onCheckedChange:f,disabled:k=!1,required:b=!1,name:j,value:w,asChild:x=!1,...v},N)=>{const[S,P]=l(C,p,f),T=c(a,u),g=d("switch",{variant:n,size:h}),R=r(t),q=o(g,R),y={checked:S,setChecked:P,rootClass:T,disabled:k},z={...q,"data-state":S?"checked":"unchecked","data-disabled":k?"":void 0,role:"switch","aria-checked":S,"aria-required":b,disabled:k,...v};return j&&(z.name=j),w&&(z.value=w),e(m.Provider,{value:y,children:e(i,{ref:N,onClick:()=>{k||P(!S)},className:T,asChild:x,...z,children:s})})}));p.displayName=u;const C=a((({asChild:s=!1,className:a,children:i,...c},d)=>{const{checked:o,rootClass:r,disabled:l}=t(m),u={};return u["data-state"]=o?"checked":"unchecked",l&&(u["data-disabled"]=""),e(h.span,{ref:d,role:"switch",className:n(r&&`${r}-indicator`,a),asChild:s,...u,...c,children:i})}));C.displayName="SwitchThumb";const f=()=>(console.warn("Direct usage of Switch is not supported. Please use Switch.Root, Switch.Thumb, etc. instead."),null);f.Root=p,f.Thumb=C;export{f as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as a}from"react/jsx-runtime";import{createContext as e,forwardRef as o,useContext as r,useRef as s,useCallback as n,useEffect as t}from"react";import{c as l}from"./clsx-BaVHROc5.js";import{R as i}from"./index-TYaYKM2M.js";import{P as c}from"./index-98jQ1vTr.js";import{c as d}from"./index-6If6D2Zi.js";import{u}from"./index-wRElCyvx.js";import"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";const m=e({rootClass:"",tabValue:"",handleTabChange:()=>{}}),h=o((({value:e,className:o="",href:t="#",children:d,disabled:u,asChild:h,...f},p)=>{const{rootClass:b,tabValue:v,handleTabChange:N}=r(m);h&&(u=!1);const C=s(null),T=n((a=>{C.current=a,"function"==typeof p?p(a):p&&(p.current=a)}),[p]),j=e===v;return a(i.Item,{onFocus:()=>e&&!u&&(a=>{u||(C.current&&C.current?.focus(),N(a))})(e),children:a(c.a,{ref:T,className:l(`${b}-link`,o),asChild:h,"aria-disabled":u,"aria-selected":j,disabled:u,...u?{}:{href:t},...f,children:d})})}));h.displayName="TabNavLink";const f=o((({className:e,loop:o=!0,orientation:r="horizontal",children:s,color:n,customRootClass:c="",defaultValue:h="",onValueChange:f=()=>{},value:p,...b},v)=>{const N=d(c,"TabNav"),[C,T]=u(p,h||"",f),j=a=>{T(a)};t((()=>{void 0===p&&h&&j(h)}),[h,p]);const x={rootClass:N,tabValue:C,handleTabChange:j};return a(m.Provider,{value:x,children:a(i.Root,{loop:o,orientation:r,children:a(i.Group,{asChild:!0,children:a("div",{ref:v,className:l(N,e),...b,children:s})})})})}));f.displayName="TabNavRoot";const p=()=>(console.warn("Direct usage of TabNav is not supported. Please use TabNav.Root, TabNav.Link instead."),null);p.Root=f,p.Link=h;export{p as default};
1
+ 'use client';import{jsx as a}from"react/jsx-runtime";import{createContext as e,forwardRef as o,useContext as r,useRef as s,useCallback as t,useEffect as n}from"react";import{c as l}from"./clsx-BaVHROc5.js";import{R as i}from"./index-DOVR6Rd5.js";import{P as c}from"./index-m6qHOeQ9.js";import{u as d}from"./useComponentClass-QwNivz0h.js";import{u as m}from"./index-wRElCyvx.js";import"./index-gM8bbyw1.js";import"./mergeRefs-B8eZ_q-T.js";import"./mergeProps-B9ocQsG4.js";import"./ThemeContext-Sm-iNANd.js";const u=e({rootClass:"",tabValue:"",handleTabChange:()=>{}}),h=o((({value:e,className:o="",href:n="#",children:d,disabled:m,asChild:h,...p},f)=>{const{rootClass:b,tabValue:C,handleTabChange:v}=r(u);h&&(m=!1);const N=s(null),j=t((a=>{N.current=a,"function"==typeof f?f(a):f&&(f.current=a)}),[f]),T=e===C;return a(i.Item,{onFocus:()=>e&&!m&&(a=>{m||(N.current&&N.current?.focus(),v(a))})(e),children:a(c.a,{ref:j,className:l(b&&`${b}-link`,o),asChild:h,"aria-disabled":m,"aria-selected":T,disabled:m,...m?{}:{href:n},...p,children:d})})}));h.displayName="TabNavLink";const p=o((({className:e,loop:o=!0,orientation:r="horizontal",children:s,color:t,customRootClass:c="",defaultValue:h="",onValueChange:p=()=>{},value:f,...b},C)=>{const v=d(c,"TabNav"),[N,j]=m(f,h||"",p),T=a=>{j(a)};n((()=>{void 0===f&&h&&T(h)}),[h,f]);const x={rootClass:v,tabValue:N,handleTabChange:T};return a(u.Provider,{value:x,children:a(i.Root,{loop:o,orientation:r,children:a(i.Group,{asChild:!0,children:a("div",{ref:C,className:l(v,e),...b,children:s})})})})}));p.displayName="TabNavRoot";const f=()=>(console.warn("Direct usage of TabNav is not supported. Please use TabNav.Root, TabNav.Link instead."),null);f.Root=p,f.Link=h;export{f as default};
@@ -1 +1 @@
1
- 'use client';import e from"react";import{jsx as a}from"react/jsx-runtime";import{c as l}from"./clsx-BaVHROc5.js";import{c as r}from"./index-6If6D2Zi.js";const s="Table",c=e.forwardRef((({children:e,className:c="",customRootClass:o="",...d},t)=>{const n=r(o,s);return a("div",{ref:t,className:l(`${n}-wrapper`,c),...d,children:a("table",{className:l(n),children:e})})}));c.displayName=s;const o=e.forwardRef((({children:e,className:r="header",...s},c)=>a("thead",{ref:c,className:l(r),...s,children:e})));o.displayName="TableHead";const d=e.forwardRef((({children:e,className:r="",...s},c)=>a("tbody",{ref:c,className:l(r),...s,children:e})));d.displayName="TableBody";const t=e.forwardRef((({children:e,className:r="row",...s},c)=>a("tr",{ref:c,className:l(r),...s,children:e})));t.displayName="TableRow";const n=e.forwardRef((({children:e,className:r="cell-header",...s},c)=>a("th",{ref:c,className:l(r),...s,children:e})));n.displayName="TableColumnCellHeader";const m=e.forwardRef((({children:e,className:r="cell",...s},c)=>a("td",{ref:c,className:l(r),...s,children:e})));m.displayName="TableCell";const i=e.forwardRef((function(e,a){return console.warn("Direct usage of Table is not supported. Please use Table.Root, Table.Head, etc. instead."),null}));i.displayName="Table",i.Root=c,i.Body=d,i.Head=o,i.Row=t,i.Cell=m,i.ColumnCellHeader=n;export{i as default};
1
+ 'use client';import e from"react";import{jsx as a}from"react/jsx-runtime";import{c as l}from"./clsx-BaVHROc5.js";import{u as s}from"./useComponentClass-QwNivz0h.js";import"./ThemeContext-Sm-iNANd.js";const r="Table",o=e.forwardRef((({children:e,className:o="",customRootClass:c="",...d},t)=>{const n=s(c,r);return a("div",{ref:t,className:l(n&&`${n}-wrapper`,o),...d,children:a("table",{className:l(n),children:e})})}));o.displayName=r;const c=e.forwardRef((({children:e,className:s="header",...r},o)=>a("thead",{ref:o,className:l(s),...r,children:e})));c.displayName="TableHead";const d=e.forwardRef((({children:e,className:s="",...r},o)=>a("tbody",{ref:o,className:l(s),...r,children:e})));d.displayName="TableBody";const t=e.forwardRef((({children:e,className:s="row",...r},o)=>a("tr",{ref:o,className:l(s),...r,children:e})));t.displayName="TableRow";const n=e.forwardRef((({children:e,className:s="cell-header",...r},o)=>a("th",{ref:o,className:l(s),...r,children:e})));n.displayName="TableColumnCellHeader";const m=e.forwardRef((({children:e,className:s="cell",...r},o)=>a("td",{ref:o,className:l(s),...r,children:e})));m.displayName="TableCell";const i=e.forwardRef((function(e,a){return console.warn("Direct usage of Table is not supported. Please use Table.Root, Table.Head, etc. instead."),null}));i.displayName="Table",i.Root=o,i.Body=d,i.Head=c,i.Row=t,i.Cell=m,i.ColumnCellHeader=n;export{i as default};
@@ -1 +1 @@
1
- 'use client';import a,{createContext as t,useContext as e,useRef as o,useCallback as r,useEffect as i}from"react";import{jsx as s}from"react/jsx-runtime";import{c as n}from"./clsx-BaVHROc5.js";import{R as l}from"./index-TYaYKM2M.js";import{P as d}from"./index-98jQ1vTr.js";import{c}from"./index-6If6D2Zi.js";import{u}from"./index-wRElCyvx.js";import"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";const m=t(null),h=a.forwardRef((({className:a="",children:t,asChild:o=!1,...r},i)=>{const c=e(m);if(!c)throw new Error("TabList must be used within a TabRoot");const{rootClass:u,orientation:h}=c;return s(l.Group,{children:s(d.div,{ref:i,role:"tablist","aria-orientation":h,"aria-label":"todo",className:n(`${u}-list`,a),asChild:o,...r,children:t})})}));h.displayName="TabList";const f=a.forwardRef((({value:a,children:t,className:i="",disabled:c,asChild:u=!1,...h},f)=>{const b=e(m);if(!b)throw new Error("TabTrigger must be used within a TabRoot");const{tabValue:p,handleTabChange:C,rootClass:v,orientation:T,activationMode:w}=b,R=o(null),g=r((a=>{R.current=a,"function"==typeof f?f(a):f&&(f.current=a)}),[f]),N=a===p,j={};return j["data-state"]=N?"active":"inactive",j["data-orientation"]=T||"horizontal",c&&(j["data-disabled"]=""),s(l.Item,{onFocus:()=>{return a&&!c&&(t=a,void(c||(R.current&&R.current?.focus(),"automatic"===w&&C(t))));var t},children:s(d.button,{ref:g,onClick:t=>{c||a&&C(a)},className:n(`${v}-trigger`,N?"active":"",c?"disabled":"",i),role:"tab","aria-selected":N,"aria-disabled":c,disabled:c,asChild:u,...j,...h,children:t})})}));f.displayName="TabTrigger";const b="TabContent",p=a.forwardRef((({className:a="",value:t,children:o,customRootClass:r,asChild:i=!1,forceMount:l=!1,...u},h)=>{const f=c(r,b),p=e(m);if(!p)throw new Error("TabContent must be used within a TabRoot");const{tabValue:C,orientation:v}=p,T=C===t;if(!(l||T))return null;const w={};return w["data-state"]=T?"active":"inactive",w["data-orientation"]=v||"horizontal",s(d.div,{ref:h,className:n(f,a),role:"tabpanel","aria-hidden":!T,asChild:i,...w,...u,children:o})}));p.displayName=b;const C="Tabs",v=a.forwardRef((({children:a,defaultValue:t="",onValueChange:e=()=>{},customRootClass:o="",value:r,className:h,color:f,orientation:b="horizontal",dir:p="ltr",activationMode:v="automatic",asChild:T=!1,...w},R)=>{const g=c(o,C),[N,j]=u(r,t||"",e),x=a=>{j(a)};i((()=>{void 0===r&&t&&x(t)}),[t,r]);const y={rootClass:g,tabValue:N,handleTabChange:x,orientation:b,activationMode:v},V={};return V["data-orientation"]=b,s(m.Provider,{value:y,children:s(l.Root,{orientation:b,loop:!0,dir:p,asChild:!0,children:s(d.div,{ref:R,className:n(g,h),"data-rad-ui-accent-color":f,asChild:T,...V,...w,children:a})})})}));v.displayName=C;const T=a.forwardRef(((a,t)=>(console.warn("Direct usage of Tabs is not supported. Please use Tabs.Root, Tabs.List, etc. instead."),null)));T.displayName="Tabs",T.List=h,T.Content=p,T.Root=v,T.Trigger=f;export{T as default};
1
+ 'use client';import a,{createContext as t,useContext as e,useRef as o,useCallback as r,useEffect as i}from"react";import{jsx as s}from"react/jsx-runtime";import{c as n}from"./clsx-BaVHROc5.js";import{R as l}from"./index-DOVR6Rd5.js";import{P as d}from"./index-m6qHOeQ9.js";import{u as c}from"./useComponentClass-QwNivz0h.js";import{u}from"./index-wRElCyvx.js";import"./index-gM8bbyw1.js";import"./mergeRefs-B8eZ_q-T.js";import"./mergeProps-B9ocQsG4.js";import"./ThemeContext-Sm-iNANd.js";const m=t(null),h=a.forwardRef((({className:a="",children:t,asChild:o=!1,...r},i)=>{const c=e(m);if(!c)throw new Error("TabList must be used within a TabRoot");const{rootClass:u,orientation:h}=c;return s(l.Group,{children:s(d.div,{ref:i,role:"tablist","aria-orientation":h,"aria-label":"todo",className:n(u&&`${u}-list`,a),asChild:o,...r,children:t})})}));h.displayName="TabList";const f=a.forwardRef((({value:a,children:t,className:i="",disabled:c,asChild:u=!1,...h},f)=>{const b=e(m);if(!b)throw new Error("TabTrigger must be used within a TabRoot");const{tabValue:p,handleTabChange:C,rootClass:T,orientation:v,activationMode:w}=b,R=o(null),g=r((a=>{R.current=a,"function"==typeof f?f(a):f&&(f.current=a)}),[f]),N=a===p,j={};return j["data-state"]=N?"active":"inactive",j["data-orientation"]=v||"horizontal",c&&(j["data-disabled"]=""),s(l.Item,{onFocus:()=>{return a&&!c&&(t=a,void(c||(R.current&&R.current?.focus(),"automatic"===w&&C(t))));var t},children:s(d.button,{ref:g,onClick:t=>{c||a&&C(a)},className:n(T&&`${T}-trigger`,N?"active":"",c?"disabled":"",i),role:"tab","aria-selected":N,"aria-disabled":c,disabled:c,asChild:u,...j,...h,children:t})})}));f.displayName="TabTrigger";const b="TabContent",p=a.forwardRef((({className:a="",value:t,children:o,customRootClass:r,asChild:i=!1,forceMount:l=!1,...u},h)=>{const f=c(r,b),p=e(m);if(!p)throw new Error("TabContent must be used within a TabRoot");const{tabValue:C,orientation:T}=p,v=C===t;if(!(l||v))return null;const w={};return w["data-state"]=v?"active":"inactive",w["data-orientation"]=T||"horizontal",s(d.div,{ref:h,className:n(f,a),role:"tabpanel","aria-hidden":!v,asChild:i,...w,...u,children:o})}));p.displayName=b;const C="Tabs",T=a.forwardRef((({children:a,defaultValue:t="",onValueChange:e=()=>{},customRootClass:o="",value:r,className:h,color:f,orientation:b="horizontal",dir:p="ltr",activationMode:T="automatic",asChild:v=!1,...w},R)=>{const g=c(o,C),[N,j]=u(r,t||"",e),x=a=>{j(a)};i((()=>{void 0===r&&t&&x(t)}),[t,r]);const y={rootClass:g,tabValue:N,handleTabChange:x,orientation:b,activationMode:T},V={};return V["data-orientation"]=b,s(m.Provider,{value:y,children:s(l.Root,{orientation:b,loop:!0,dir:p,asChild:!0,children:s(d.div,{ref:R,className:n(g,h),"data-color":f,asChild:v,...V,...w,children:a})})})}));T.displayName=C;const v=a.forwardRef(((a,t)=>(console.warn("Direct usage of Tabs is not supported. Please use Tabs.Root, Tabs.List, etc. instead."),null)));v.displayName="Tabs",v.List=h,v.Content=p,v.Root=T,v.Trigger=f;export{v as default};
@@ -1 +1 @@
1
- 'use client';import s,{forwardRef as e}from"react";import{c as a}from"./index-6If6D2Zi.js";import{c as t}from"./clsx-BaVHROc5.js";const r="Text",c=["div","span","p","label"],o=e((({children:e,customRootClass:o="",className:l="",as:m="p",...p},i)=>{const n=a(o,r);return c.includes(m)||(m="p"),s.createElement(m,{ref:i,className:t(n,l),...p},e)}));o.displayName=r;export{o as default};
1
+ 'use client';import s,{forwardRef as e}from"react";import{u as a}from"./useComponentClass-QwNivz0h.js";import{c as t}from"./clsx-BaVHROc5.js";import"./ThemeContext-Sm-iNANd.js";const o="Text",m=["div","span","p","label"],r=e((({children:e,customRootClass:r="",className:l="",as:c="p",...p},n)=>{const i=a(r,o);return m.includes(c)||(c="p"),s.createElement(c,{ref:n,className:t(i,l),...p},e)}));r.displayName=o;export{r as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e,jsxs as a}from"react/jsx-runtime";import r from"react";import{c as s}from"./clsx-BaVHROc5.js";import{c as o}from"./index-6If6D2Zi.js";import{c as t,a as l,b as d}from"./index-3dZuI04X.js";const i="TextArea",c=r.forwardRef((({children:a,customRootClass:r="",className:c="",variant:m="",size:n="",resize:f="both",color:p="",radius:u="",...h},x)=>{const N=o(r,i),R=t("textarea",{variant:m,size:n,resize:f,radius:u}),y=d(p),b=l(R,y);return e("div",{ref:x,className:s(N,c),...h,...b,children:a})}));c.displayName=i;const m=r.forwardRef((({children:a,placeholder:r="",...s},o)=>e("textarea",{ref:o,placeholder:r,defaultValue:"string"==typeof a?a:void 0,...s})));m.displayName="TextAreaInput";const n=r.forwardRef((({customRootClass:r="",placeholder:o="",className:t="",disabled:l=!1,readonly:d=!1,children:i,...n},f)=>a(c,{ref:f,customRootClass:r,className:s(t),...n,children:[e(m,{placeholder:o,disabled:l,readOnly:d,children:i}),i]})));n.displayName="TextArea",n.Input=m,n.Root=c;export{n as default};
1
+ 'use client';import{jsx as e,jsxs as a}from"react/jsx-runtime";import r from"react";import{c as s}from"./clsx-BaVHROc5.js";import{u as o}from"./useComponentClass-QwNivz0h.js";import{c as t,a as l,b as i}from"./index-eAZUMNef.js";import"./ThemeContext-Sm-iNANd.js";const d="TextArea",c=r.forwardRef((({children:a,customRootClass:r="",className:c="",variant:m="",size:n="",resize:f="both",color:p="",radius:u="",...h},x)=>{const N=o(r,d),R=t("textarea",{variant:m,size:n,resize:f,radius:u}),y=i(p),C=l(R,y);return e("div",{ref:x,className:s(N,c),...h,...C,children:a})}));c.displayName=d;const m=r.forwardRef((({children:a,placeholder:r="",...s},o)=>e("textarea",{ref:o,placeholder:r,defaultValue:"string"==typeof a?a:void 0,...s})));m.displayName="TextAreaInput";const n=r.forwardRef((({customRootClass:r="",placeholder:o="",className:t="",disabled:l=!1,readonly:i=!1,children:d,...n},f)=>a(c,{ref:f,customRootClass:r,className:s(t),...n,children:[e(m,{placeholder:o,disabled:l,readOnly:i,children:d}),d]})));n.displayName="TextArea",n.Input=m,n.Root=c;export{n as default};
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+
3
+ type TextFieldRootProps = React.ComponentPropsWithoutRef<'div'> & {
4
+ className?: string;
5
+ customRootClass?: string;
6
+ };
7
+ declare const TextFieldRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
+ className?: string;
9
+ customRootClass?: string;
10
+ } & React.RefAttributes<HTMLDivElement>>;
11
+
12
+ type TextFieldInputProps = React.ComponentPropsWithoutRef<'input'>;
13
+ declare const TextFieldInput: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
14
+
15
+ type TextFieldSlotProps = React.ComponentPropsWithoutRef<'div'> & {
16
+ side?: 'start' | 'end';
17
+ };
18
+ declare const TextFieldSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
19
+ side?: "start" | "end";
20
+ } & React.RefAttributes<HTMLDivElement>>;
21
+
22
+ type TextFieldResetProps = React.ComponentPropsWithoutRef<'button'>;
23
+ declare const TextFieldReset: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
24
+
25
+ type TextFieldProps = React.ComponentPropsWithoutRef<'input'> & {
26
+ className?: string;
27
+ customRootClass?: string;
28
+ inputClassName?: string;
29
+ startSlot?: React.ReactNode;
30
+ endSlot?: React.ReactNode;
31
+ };
32
+ type TextFieldComponent = React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>> & {
33
+ Root: typeof TextFieldRoot;
34
+ Input: typeof TextFieldInput;
35
+ Slot: typeof TextFieldSlot;
36
+ Reset: typeof TextFieldReset;
37
+ };
38
+ declare const TextField: TextFieldComponent;
39
+
40
+ export { TextField as default };
41
+ export type { TextFieldInputProps, TextFieldProps, TextFieldResetProps, TextFieldRootProps, TextFieldSlotProps };
@@ -0,0 +1 @@
1
+ 'use client';import{jsx as e,jsxs as t}from"react/jsx-runtime";import s from"react";import{c as a}from"./clsx-BaVHROc5.js";import{u as l}from"./useComponentClass-QwNivz0h.js";import{c as n}from"./mergeProps-B9ocQsG4.js";import"./ThemeContext-Sm-iNANd.js";const r=s.createContext({rootClass:"",inputRef:{current:null},clearInput:()=>{},hasValue:!1,setHasValue:()=>!1}),o="TextField",u=s.forwardRef((({className:t="",customRootClass:n="",children:u,...c},i)=>{const d=l(n,o),p=s.useRef(null),[f,m]=s.useState(!1),h=s.useCallback((()=>{const e=p.current;if(!e)return;const t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set;t?.call(e,""),e.dispatchEvent(new Event("input",{bubbles:!0})),m(!1),e.focus()}),[]);return e(r.Provider,{value:{rootClass:d,inputRef:p,clearInput:h,hasValue:f,setHasValue:m},children:e("div",{ref:i,className:a(d,t),...c,children:u})})}));u.displayName=o;const c=s.forwardRef((({className:t="",type:l="text",onChange:o,onInput:u,value:c,defaultValue:i,...d},p)=>{const{rootClass:f,inputRef:m,setHasValue:h}=s.useContext(r);s.useEffect((()=>{void 0===c?void 0!==i&&h(String(i).length>0):h(String(c).length>0)}),[i,h,c]);return e("input",{ref:n(p,m),type:l,className:a(f&&`${f}-input`,t),value:c,defaultValue:i,onInput:e=>{h(e.currentTarget.value.length>0),u?.(e)},onChange:e=>{h(e.currentTarget.value.length>0),o?.(e)},...d})}));c.displayName="TextFieldInput";const i=s.forwardRef((({children:t,className:l="",side:n,...o},u)=>{const{rootClass:c,inputRef:i}=s.useContext(r);return e("div",{ref:u,role:"presentation",className:a(c&&`${c}-slot`,l),"data-text-field-slot":n,...o,onMouseDown:e=>{o.onMouseDown?.(e),e.defaultPrevented||(e.preventDefault(),i.current?.focus())},children:t})}));i.displayName="TextFieldSlot";const d=s.forwardRef((({className:t="",type:l="button",onClick:n,children:o,...u},c)=>{const{rootClass:i,clearInput:d,inputRef:p,hasValue:f}=s.useContext(r);return f?e("button",{ref:c,type:l,className:a(i&&`${i}-reset`,t),onClick:e=>{n?.(e),e.defaultPrevented||p.current?.disabled||p.current?.readOnly||d()},...u,children:o}):null}));d.displayName="TextFieldReset";const p=s.forwardRef((({className:s="",customRootClass:l="",inputClassName:n="",startSlot:r,endSlot:o,type:d="text",...p},f)=>t(u,{customRootClass:l,className:a(s),children:[r?e(i,{side:"start",children:r}):null,e(c,{ref:f,type:d,className:a(n),...p}),o?e(i,{side:"end",children:o}):null]})));p.displayName="TextField",p.Root=u,p.Input=c,p.Slot=i,p.Reset=d;export{p as default};
@@ -5,12 +5,14 @@ type ThemeProps = ComponentPropsWithoutRef<'div'> & {
5
5
  accentColor?: string;
6
6
  radius?: string;
7
7
  scaling?: string;
8
+ classNamespace?: string;
8
9
  };
9
10
  declare const Theme: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
11
  appearance?: "light" | "dark" | "system";
11
12
  accentColor?: string;
12
13
  radius?: string;
13
14
  scaling?: string;
15
+ classNamespace?: string;
14
16
  } & React.RefAttributes<HTMLDivElement>>;
15
17
 
16
18
  export { Theme as default };
@@ -1 +1 @@
1
- 'use client';import{jsx as e,jsxs as r}from"react/jsx-runtime";import{forwardRef as t,useRef as a,useState as n,useEffect as i,useCallback as c}from"react";import{T as o}from"./ThemeContext-Sm-iNANd.js";const d=t((function({appearance:t="system",id:d="rad-ui-theme-container",accentColor:s="",radius:u="",scaling:m="",children:l,...h},f){const p=a(null),v=a(null),[g,y]=n(t),[k,x]=n(s),[R,T]=n(u),[j,w]=n(m),C=a(f);i((()=>{C.current=f}),[f]);const E=c((e=>{p.current=e,((e,r)=>{"function"!=typeof e?e&&(e.current=r):e(r)})(C.current,e)}),[]);return i((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)"),r=e=>{"system"===t&&y(e.matches?"dark":"light")};return"system"===t?(y(e.matches?"dark":"light"),e.addEventListener("change",r)):y(t),()=>e.removeEventListener("change",r)}),[t]),i((()=>{s&&x(s)}),[s]),i((()=>{u&&T(u)}),[u]),i((()=>{m&&w(m)}),[m]),e(o.Provider,{value:{containerRef:p,portalRootRef:v},children:r("div",{ref:E,id:d,"data-rad-ui-theme":g,"data-rad-ui-accent-color":k,"data-rad-ui-radius":R,"data-rad-ui-scaling":j,...h,children:[l,e("div",{ref:v,"data-rad-ui-portal-root":""})]})})}));d.displayName="Theme";export{d as default};
1
+ 'use client';import{jsx as e,jsxs as a}from"react/jsx-runtime";import{forwardRef as r,useRef as t,useState as n,useEffect as c,useCallback as i}from"react";import{T as o}from"./ThemeContext-Sm-iNANd.js";const s=r((function({appearance:r="system",id:s="rad-ui-theme-container",accentColor:d="",radius:m="",scaling:l="",classNamespace:u,children:h,...p},f){const v=t(null),g=t(null),[y,k]=n(r),[x,N]=n(d),[R,T]=n(m),[j,w]=n(l),C=t(f);c((()=>{C.current=f}),[f]);const E=i((e=>{v.current=e,((e,a)=>{"function"!=typeof e?e&&(e.current=a):e(a)})(C.current,e)}),[]);return c((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)"),a=e=>{"system"===r&&k(e.matches?"dark":"light")};return"system"===r?(k(e.matches?"dark":"light"),e.addEventListener("change",a)):k(r),()=>e.removeEventListener("change",a)}),[r]),c((()=>{d&&N(d)}),[d]),c((()=>{m&&T(m)}),[m]),c((()=>{l&&w(l)}),[l]),e(o.Provider,{value:{containerRef:v,portalRootRef:g,classNamespace:u},children:a("div",{ref:E,id:s,"data-rad-ui-theme":y,"data-rad-ui-accent-color":x,"data-rad-ui-radius":R,"data-rad-ui-scaling":j,...p,children:[h,e("div",{ref:g,"data-rad-ui-portal-root":""})]})})}));s.displayName="Theme";export{s as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as s}from"react/jsx-runtime";import{forwardRef as e}from"react";import{c as r}from"./clsx-BaVHROc5.js";import{c as a}from"./index-6If6D2Zi.js";import{u as o}from"./index-wRElCyvx.js";import{T as d}from"./index-BZVbVgqN.js";import"./index-BOy86lYu.js";import"./index-98jQ1vTr.js";import"./index-CXzybYmm.js";const i="Toggle",t=e((({defaultPressed:e=!1,customRootClass:t="",children:m,className:n="",color:l="",pressed:c,onPressedChange:p,asChild:f=!1,...x},j)=>{const[u,h]=o(c,e,p),C=a(t,i),g={};return l&&(g["data-rad-ui-accent-color"]=l),s(d,{ref:j,className:r(C,n),pressed:u,onPressedChange:h,"data-state":u?"on":"off","data-disabled":x.disabled?"":void 0,asChild:f,...x,...g,children:m})}));t.displayName=i;export{t as default};
1
+ 'use client';import{jsx as s}from"react/jsx-runtime";import{forwardRef as e}from"react";import{c as o}from"./clsx-BaVHROc5.js";import{u as r}from"./useComponentClass-QwNivz0h.js";import{u as a}from"./index-wRElCyvx.js";import{T as t}from"./index-DU_6Msfu.js";import"./ThemeContext-Sm-iNANd.js";import"./index-gM8bbyw1.js";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";import"./index-CXzybYmm.js";const m="Toggle",d=e((({defaultPressed:e=!1,customRootClass:d="",children:i,className:n="",color:l="",pressed:p,onPressedChange:c,asChild:f=!1,...j},x)=>{const[u,C]=a(p,e,c),h=r(d,m),g={};return l&&(g["data-color"]=l),s(t,{ref:x,className:o(h,n),pressed:u,onPressedChange:C,"data-state":u?"on":"off","data-disabled":j.disabled?"":void 0,asChild:f,...j,...g,children:i})}));d.displayName=m;export{d as default};
@@ -1 +1 @@
1
- 'use client';import e,{createContext as o,useContext as i}from"react";import{jsx as a}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{c as r}from"./index-6If6D2Zi.js";import{u as s}from"./index-wRElCyvx.js";import{R as l}from"./index-TYaYKM2M.js";import{T as d}from"./index-BZVbVgqN.js";import"./index-98jQ1vTr.js";import"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-CXzybYmm.js";const n=o({type:"single",activeToggles:[],setActiveToggles:()=>{},rootClass:"",disabled:!1,orientation:"horizontal"}),c="ToggleGroup",m=e.forwardRef((({type:e="single",className:o="",loop:i=!0,orientation:d="horizontal",customRootClass:m="",value:p,defaultValue:g=[],onValueChange:u,color:f="",disabled:h=!1,dir:v="ltr",rovingFocus:T=!0,asChild:j=!1,children:x,...y},C)=>{const R=r(m,c),[b,N]=s(p,g,u),G={activeToggles:b,setActiveToggles:N,type:e,rootClass:R,disabled:h,orientation:d},w={};return f&&(w["data-rad-ui-accent-color"]=f),h&&(w["data-disabled"]=""),w["data-orientation"]=d,a(n.Provider,T?{value:G,children:a(l.Root,{loop:i,orientation:d,dir:v,children:a(l.Group,{...w,...y,children:a("div",{ref:C,className:t(R,o),children:x})})})}:{value:G,children:a("div",{ref:C,className:t(R,o),...w,dir:v,...y,children:x})})}));m.displayName=c;const p=e.forwardRef((({children:e,className:o="",value:t=null,disabled:r=!1,asChild:s=!1,iconOnly:c=!1,...m},p)=>{const{type:g,activeToggles:u,setActiveToggles:f,rootClass:h,disabled:v}=i(n),T=u?.includes(t),j=r||v,x={},y={};return T?(x["aria-pressed"]="true",y["data-state"]="on"):(x["aria-pressed"]="false",y["data-state"]="off"),j&&(y["data-disabled"]=""),a(l.Item,{children:a(d,{ref:p,onClick:()=>{if(j)return;let e=u||[];if("single"===g)return T?void f([]):void f([t]);"multiple"===g&&(e=T?e.filter((e=>e!==t)):[...e,t]),f(e)},className:`${h}-item ${o}`,disabled:j,asChild:s,...c?{"data-icon-only":""}:{},...x,...y,...m,children:e})})}));p.displayName="ToggleItem";const g=e.forwardRef(((e,o)=>(console.warn("Direct usage of ToggleGroup is not supported. Please use ToggleGroup.Root, ToggleGroup.Item, etc. instead."),null)));g.displayName="ToggleGroup",g.Root=m,g.Item=p;export{g as default};
1
+ 'use client';import e,{createContext as o,useContext as s}from"react";import{jsx as t}from"react/jsx-runtime";import{c as a}from"./clsx-BaVHROc5.js";import{u as i}from"./useComponentClass-QwNivz0h.js";import{u as r}from"./index-wRElCyvx.js";import{R as l}from"./index-DOVR6Rd5.js";import{T as d}from"./index-DU_6Msfu.js";import"./ThemeContext-Sm-iNANd.js";import"./index-m6qHOeQ9.js";import"./mergeProps-B9ocQsG4.js";import"./index-gM8bbyw1.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-CXzybYmm.js";const n=o({type:"single",activeToggles:[],setActiveToggles:()=>{},rootClass:"",disabled:!1,orientation:"horizontal"}),c="ToggleGroup",m=e.forwardRef((({type:e="single",className:o="",loop:s=!0,orientation:d="horizontal",customRootClass:m="",value:p,defaultValue:g=[],onValueChange:u,color:f="",disabled:h=!1,dir:v="ltr",rovingFocus:T=!0,asChild:j=!1,children:C,...x},y)=>{const R=i(m,c),[b,N]=r(p,g,u),G={activeToggles:b,setActiveToggles:N,type:e,rootClass:R,disabled:h,orientation:d},w={};return f&&(w["data-color"]=f),h&&(w["data-disabled"]=""),w["data-orientation"]=d,t(n.Provider,T?{value:G,children:t(l.Root,{loop:s,orientation:d,dir:v,children:t(l.Group,{...w,...x,children:t("div",{ref:y,className:a(R,o),children:C})})})}:{value:G,children:t("div",{ref:y,className:a(R,o),...w,dir:v,...x,children:C})})}));m.displayName=c;const p=e.forwardRef((({children:e,className:o="",value:i=null,disabled:r=!1,asChild:c=!1,iconOnly:m=!1,...p},g)=>{const{type:u,activeToggles:f,setActiveToggles:h,rootClass:v,disabled:T}=s(n),j=f?.includes(i),C=r||T,x={},y={};return j?(x["aria-pressed"]="true",y["data-state"]="on"):(x["aria-pressed"]="false",y["data-state"]="off"),C&&(y["data-disabled"]=""),t(l.Item,{children:t(d,{ref:g,onClick:()=>{if(C)return;let e=f||[];if("single"===u)return j?void h([]):void h([i]);"multiple"===u&&(e=j?e.filter((e=>e!==i)):[...e,i]),h(e)},className:a(v&&`${v}-item`,o),disabled:C,asChild:c,...m?{"data-icon-only":""}:{},...x,...y,...p,children:e})})}));p.displayName="ToggleItem";const g=e.forwardRef(((e,o)=>(console.warn("Direct usage of ToggleGroup is not supported. Please use ToggleGroup.Root, ToggleGroup.Item, etc. instead."),null)));g.displayName="ToggleGroup",g.Root=m,g.Item=p;export{g as default};
@@ -1 +1 @@
1
- 'use client';import o,{createContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{c as a}from"./index-6If6D2Zi.js";import{P as s}from"./index-98jQ1vTr.js";import{R as l}from"./index-TYaYKM2M.js";import{B as i}from"./index-BOy86lYu.js";import n from"./Separator.js";import d from"./Link.js";import{u}from"./index-wRElCyvx.js";import{T as m}from"./index-BZVbVgqN.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-3dZuI04X.js";import"./index-CXzybYmm.js";const c=e(null),p="Toolbar",f=o.forwardRef((({orientation:e="horizontal",loop:i=!1,dir:n="ltr",className:d="",customRootClass:u="",asChild:m=!1,children:f,...h},b)=>{const T=a(u,p),g=o.useMemo((()=>({rootClass:T,orientation:e,dir:n})),[T,e,n]),w={"data-orientation":e};return r(c.Provider,{value:g,children:r(l.Root,{orientation:e,loop:i,dir:n,children:r(l.Group,{children:r(s.div,{asChild:m,ref:b,role:"toolbar","aria-orientation":"vertical"===e?"vertical":void 0,dir:n,className:t(T,d),...w,...h,children:f})})})})}));f.displayName=p;const h=o.forwardRef((({className:e="",asChild:a=!1,type:s="button",...n},d)=>{const u=o.useContext(c);if(!u)throw new Error("Toolbar.Button must be used within Toolbar.Root");const{rootClass:m}=u;return r(l.Item,{children:r(i,{ref:d,className:t(`${m}-button`,e),asChild:a,type:a?void 0:s,...n})})}));h.displayName="ToolbarButton";const b=o.forwardRef((({className:e="",orientation:a,...s},l)=>{const i=o.useContext(c);if(!i)throw new Error("Toolbar.Separator must be used within Toolbar.Root");const{rootClass:d,orientation:u}=i;return r(n,{ref:l,...s,decorative:!0,orientation:a??("horizontal"===u?"vertical":"horizontal"),className:t(`${d}-separator`,e)})}));b.displayName="ToolbarSeparator";const T=o.forwardRef((({className:e="",asChild:a=!1,href:s="#",...i},n)=>{const u=o.useContext(c);if(!u)throw new Error("Toolbar.Link must be used within Toolbar.Root");const{rootClass:m}=u;return r(l.Item,{role:"link",children:r(d,{ref:n,asChild:a,href:s,className:t(`${m}-link`,e),...i})})}));T.displayName="ToolbarLink";const g=e(null),w=o.forwardRef((({type:e="single",value:a,defaultValue:s=[],onValueChange:l,disabled:i=!1,className:n="",children:d,...m},p)=>{const f=o.useContext(c);if(!f)throw new Error("Toolbar.ToggleGroup must be used within Toolbar.Root");const[h,b]=u(a,s,l),T=o.useMemo((()=>Array.isArray(h)?h:h?[h]:[]),[h]),w=o.useMemo((()=>({type:e,value:T,setValue:b,rootClass:f.rootClass,disabled:i})),[e,T,b,f.rootClass,i]);return r(g.Provider,{value:w,children:r("div",{ref:p,...m,role:"group",className:t(`${f.rootClass}-toggle-group`,n),children:d})})}));w.displayName="ToolbarToggleGroup";const C=o.forwardRef((({value:e,disabled:a=!1,className:s="",...i},n)=>{const d=o.useContext(g);if(!d)throw new Error("Toolbar.ToggleItem must be used within Toolbar.ToggleGroup");const u=d.value.includes(e),c=a||d.disabled;return r(l.Item,{children:r(m,{ref:n,pressed:u,disabled:c,onPressedChange:o=>{c||("single"!==d.type?o?d.setValue([...d.value,e]):d.setValue(d.value.filter((o=>o!==e))):d.setValue(o?[e]:[]))},className:t(`${d.rootClass}-toggle-item`,s),...i})})}));C.displayName="ToolbarToggleItem";const N=o.forwardRef(((o,e)=>("production"!==process.env.NODE_ENV&&console.warn("Direct usage of Toolbar is not supported. Please use Toolbar.Root, Toolbar.Button, etc. instead."),null)));N.displayName="Toolbar",N.Root=f,N.Button=h,N.Separator=b,N.Link=T,N.ToggleGroup=w,N.ToggleItem=C;export{N as default};
1
+ 'use client';import o,{createContext as e}from"react";import{jsx as r}from"react/jsx-runtime";import{c as t}from"./clsx-BaVHROc5.js";import{u as a}from"./useComponentClass-QwNivz0h.js";import{P as s}from"./index-m6qHOeQ9.js";import{R as l}from"./index-DOVR6Rd5.js";import{B as i}from"./index-gM8bbyw1.js";import n from"./Separator.js";import d from"./Link.js";import{u as m}from"./index-wRElCyvx.js";import{T as u}from"./index-DU_6Msfu.js";import"./ThemeContext-Sm-iNANd.js";import"./mergeProps-B9ocQsG4.js";import"./mergeRefs-B8eZ_q-T.js";import"./index-eAZUMNef.js";import"./index-CXzybYmm.js";const c=e(null),p="Toolbar",f=o.forwardRef((({orientation:e="horizontal",loop:i=!1,dir:n="ltr",className:d="",customRootClass:m="",asChild:u=!1,children:f,...h},b)=>{const T=a(m,p),C=o.useMemo((()=>({rootClass:T,orientation:e,dir:n})),[T,e,n]),g={"data-orientation":e};return r(c.Provider,{value:C,children:r(l.Root,{orientation:e,loop:i,dir:n,children:r(l.Group,{children:r(s.div,{asChild:u,ref:b,role:"toolbar","aria-orientation":"vertical"===e?"vertical":void 0,dir:n,className:t(T,d),...g,...h,children:f})})})})}));f.displayName=p;const h=o.forwardRef((({className:e="",asChild:a=!1,type:s="button",...n},d)=>{const m=o.useContext(c);if(!m)throw new Error("Toolbar.Button must be used within Toolbar.Root");const{rootClass:u}=m;return r(l.Item,{children:r(i,{ref:d,className:t(u&&`${u}-button`,e),asChild:a,type:a?void 0:s,...n})})}));h.displayName="ToolbarButton";const b=o.forwardRef((({className:e="",orientation:a,...s},l)=>{const i=o.useContext(c);if(!i)throw new Error("Toolbar.Separator must be used within Toolbar.Root");const{rootClass:d,orientation:m}=i;return r(n,{ref:l,...s,decorative:!0,orientation:a??("horizontal"===m?"vertical":"horizontal"),className:t(d&&`${d}-separator`,e)})}));b.displayName="ToolbarSeparator";const T=o.forwardRef((({className:e="",asChild:a=!1,href:s="#",...i},n)=>{const m=o.useContext(c);if(!m)throw new Error("Toolbar.Link must be used within Toolbar.Root");const{rootClass:u}=m;return r(l.Item,{role:"link",children:r(d,{ref:n,asChild:a,href:s,className:t(u&&`${u}-link`,e),...i})})}));T.displayName="ToolbarLink";const C=e(null),g=o.forwardRef((({type:e="single",value:a,defaultValue:s=[],onValueChange:l,disabled:i=!1,className:n="",children:d,...u},p)=>{const f=o.useContext(c);if(!f)throw new Error("Toolbar.ToggleGroup must be used within Toolbar.Root");const[h,b]=m(a,s,l),T=o.useMemo((()=>Array.isArray(h)?h:h?[h]:[]),[h]),g=o.useMemo((()=>({type:e,value:T,setValue:b,rootClass:f.rootClass,disabled:i})),[e,T,b,f.rootClass,i]);return r(C.Provider,{value:g,children:r("div",{ref:p,...u,role:"group",className:t(f.rootClass&&`${f.rootClass}-toggle-group`,n),children:d})})}));g.displayName="ToolbarToggleGroup";const w=o.forwardRef((({value:e,disabled:a=!1,className:s="",...i},n)=>{const d=o.useContext(C);if(!d)throw new Error("Toolbar.ToggleItem must be used within Toolbar.ToggleGroup");const m=d.value.includes(e),c=a||d.disabled;return r(l.Item,{children:r(u,{ref:n,pressed:m,disabled:c,onPressedChange:o=>{c||("single"!==d.type?o?d.setValue([...d.value,e]):d.setValue(d.value.filter((o=>o!==e))):d.setValue(o?[e]:[]))},className:t(d.rootClass&&`${d.rootClass}-toggle-item`,s),...i})})}));w.displayName="ToolbarToggleItem";const N=o.forwardRef(((o,e)=>("production"!==process.env.NODE_ENV&&console.warn("Direct usage of Toolbar is not supported. Please use Toolbar.Root, Toolbar.Button, etc. instead."),null)));N.displayName="Toolbar",N.Root=f,N.Button=h,N.Separator=b,N.Link=T,N.ToggleGroup=g,N.ToggleItem=w;export{N as default};
@@ -6,6 +6,8 @@ type Placement = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' |
6
6
  interface TooltipRootProps extends React.ComponentPropsWithoutRef<'div'> {
7
7
  children: React.ReactNode;
8
8
  placement?: Placement;
9
+ collisionBoundary?: Element | null | Array<Element | null>;
10
+ collisionPadding?: number;
9
11
  }
10
12
  declare const TooltipRoot: React.ForwardRefExoticComponent<TooltipRootProps & React.RefAttributes<HTMLDivElement>>;
11
13
 
@@ -26,6 +28,7 @@ declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<{
26
28
 
27
29
  type TooltipContentProps = React.ComponentPropsWithoutRef<typeof Primitive.div> & {
28
30
  showArrow?: boolean;
31
+ container?: HTMLElement | null;
29
32
  children: React.ReactNode;
30
33
  };
31
34
  declare const TooltipContent: React.ForwardRefExoticComponent<TooltipContentProps & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- 'use client';import e,{createContext as t,useRef as o,useState as r,useContext as n}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";import{a as s,m as l,o as c,f as d,e as p,g as f,k as m,i as u,l as g,j as h,u as w,G as T,v as R}from"./floating-ui.react-gB901AP2.js";import{B as x}from"./index-BOy86lYu.js";import{c as y}from"./clsx-BaVHROc5.js";import{P as v}from"./index-98jQ1vTr.js";import{T as j}from"./ThemeContext-Sm-iNANd.js";import"react-dom";const C=t(null),N=e.forwardRef((({children:e,placement:t="top",...n},i)=>{const w=o(null),[T,R]=r(!1),x=s({placement:t,strategy:"fixed",onOpenChange:R,middleware:[l({element:w,padding:4}),c(5),d({crossAxis:!0,fallbackAxisSideDirection:"start",padding:5}),p({padding:5})]}),y=x.context,v=f(y,{move:!1}),j=m(y,{}),N=u(y),O=g(y,{role:"tooltip"}),P=h([v,j,N,O]);return a(C.Provider,{value:{isOpen:T,setIsOpen:R,data:x,interactions:P,context:y,arrowRef:w},children:a("div",{ref:i,...n,children:e})})}));N.displayName="Tooltip";const O=e.forwardRef((({children:e,asChild:t,...o},r)=>{const i=n(C);if(!i)throw new Error("TooltipTrigger must be used within a TooltipRoot component");const{isOpen:s,interactions:l,context:c}=i,{getReferenceProps:d}=l,p=e.ref,f=w([c.refs.setReference,r,p]);return a(x,{asChild:t,ref:f,"data-state":s?"open":"closed",...d(o),children:e})}));O.displayName="TooltipTrigger";const P=e.forwardRef((({children:e,showArrow:t=!0,...o},r)=>{const s=n(C),l=n(j);if(!s)throw new Error("TooltipContent must be used within a TooltipRoot component");const{isOpen:c,data:d,interactions:p,context:f}=s,m=s.arrowRef,u=w([f.refs.setFloating,r]);if(!c)return null;const{getFloatingProps:g}=p,h=l?.portalRootRef.current||document.querySelector("[data-rad-ui-portal-root]")||l?.containerRef.current||document.querySelector("#rad-ui-theme-container")||void 0;return a(T,{root:h,children:a(v.div,{className:"rad-ui-tooltip-floating-element",ref:u,"data-state":c?"open":"closed",style:{...d.floatingStyles},...g(o),children:i("div",{className:"rad-ui-tooltip-content-inner",children:[t&&a(R,{className:y("rad-ui-arrow"),ref:m,context:f}),e]})})})}));P.displayName="TooltipContent";const b=e.forwardRef(((e,t)=>(console.warn("Direct usage of Tooltip is not supported. Please use Tooltip.Root, Tooltip.Trigger, etc. instead."),null)));b.displayName="Tooltip",b.Root=N,b.Trigger=O,b.Content=P;export{b as default};
1
+ 'use client';import e,{createContext as o,useRef as t,useState as r,useContext as n}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";import{D as s,B as l,n as c,o as d,f as p,e as m,g as f,k as u,i as g,m as h,j as w,u as T,H as R,v as x}from"./floating-ui.react-Byzse64h.js";import{B as y}from"./index-gM8bbyw1.js";import{c as j}from"./clsx-BaVHROc5.js";import{P as v}from"./index-m6qHOeQ9.js";import{T as C}from"./ThemeContext-Sm-iNANd.js";import"react-dom";import"./mergeProps-B9ocQsG4.js";const N=o(null),P=e.forwardRef((({children:e,placement:o="top",collisionBoundary:n=null,collisionPadding:i=5,...T},R)=>{const x=t(null),[y,j]=r(!1),v=(Array.isArray(n)?n:[n]).filter((e=>null!=e)),C={padding:i,boundary:v,altBoundary:v.length>0},P=s({placement:o,strategy:"fixed",onOpenChange:j,middleware:[c({element:x,padding:4}),d(5),p({crossAxis:!0,fallbackAxisSideDirection:"start",...C}),m(C)],whileElementsMounted:l}),A=P.context,O=f(A,{move:!1}),b=u(A,{}),B=g(A),S=h(A,{role:"tooltip"}),D=w([O,b,B,S]);return a(N.Provider,{value:{isOpen:y,setIsOpen:j,data:P,interactions:D,context:A,arrowRef:x},children:a("div",{ref:R,...T,children:e})})}));P.displayName="Tooltip";const A=e.forwardRef((({children:e,asChild:o,...t},r)=>{const i=n(N);if(!i)throw new Error("TooltipTrigger must be used within a TooltipRoot component");const{isOpen:s,interactions:l,context:c}=i,{getReferenceProps:d}=l,p=e.ref,m=T([c.refs.setReference,r,p]);return a(y,{asChild:o,ref:m,"data-state":s?"open":"closed",...d(t),children:e})}));A.displayName="TooltipTrigger";const O=e.forwardRef((({children:e,showArrow:o=!0,container:t,...r},s)=>{const l=n(N),c=n(C);if(!l)throw new Error("TooltipContent must be used within a TooltipRoot component");const{isOpen:d,data:p,interactions:m,context:f}=l,u=l.arrowRef,g=T([f.refs.setFloating,s]);if(!d)return null;const{getFloatingProps:h}=m,w=t||c?.portalRootRef.current||document.querySelector("[data-rad-ui-portal-root]")||c?.containerRef.current||document.querySelector("#rad-ui-theme-container")||void 0;return a(R,{root:w,children:a(v.div,{className:"rad-ui-tooltip-floating-element",ref:g,"data-state":d?"open":"closed",style:{...p.floatingStyles},...h(r),children:i("div",{className:"rad-ui-tooltip-content-inner",children:[o&&a(x,{className:j("rad-ui-arrow"),ref:u,context:f}),e]})})})}));O.displayName="TooltipContent";const b=e.forwardRef(((e,o)=>(console.warn("Direct usage of Tooltip is not supported. Please use Tooltip.Root, Tooltip.Trigger, etc. instead."),null)));b.displayName="Tooltip",b.Root=P,b.Trigger=A,b.Content=O;export{b as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{createContext as n,forwardRef as l,useRef as a,useImperativeHandle as o,useCallback as s,useId as i,useState as d,useContext as c,useEffect as m}from"react";import{R as u}from"./index-TYaYKM2M.js";import{P as f}from"./index-98jQ1vTr.js";import{c as p}from"./index-6If6D2Zi.js";import{c as h}from"./clsx-BaVHROc5.js";import{B as g}from"./index-BOy86lYu.js";import"./mergeRefs-B8eZ_q-T.js";const R=n({rootClass:"",treeRef:{current:null},itemRefs:new Map,registerItemRef:()=>{},unregisterItemRef:()=>{}}),v="Tree",I=l((({children:r,className:t="",customRootClass:n="","aria-label":l,"aria-labelledby":i,...d},c)=>{const m=a(null);o(c,(()=>m.current));const g=p(n,v),I=a(new Map),b=s(((e,r)=>{I.current.set(e,r)}),[]),w=s((e=>{I.current.delete(e)}),[]),y={rootClass:g,treeRef:m,itemRefs:I.current,registerItemRef:b,unregisterItemRef:w};return e(R.Provider,{value:y,children:e(u.Root,{orientation:"vertical",mode:"tree",children:e(u.Group,{children:e(f.div,{className:h(g,t),ref:m,role:"tree","aria-label":l,"aria-labelledby":i,...d,children:r})})})})}));I.displayName=v;const b=l((({children:n,item:l,level:s=0,className:f="",parentId:p=null,isSelected:v=!1,onToggleSelect:I,getIsSelected:w,onChildRefReady:y,...x},N)=>{const C=i(),j=a(null);o(N,(()=>j.current));const T=Boolean(l?.items?.length),[k,S]=d((()=>Boolean(l?.expanded))),{rootClass:D,itemRefs:L,registerItemRef:B,unregisterItemRef:P}=c(R),$=a(null);m((()=>(B(C,j),()=>{P(C)})),[C,B,P]),m((()=>{y&&j.current&&y(j)}),[y]);const K=e=>{$.current=e.current};return r(t,{children:[e(u.Item,{handleRightKeyDown:()=>{T&&(k?$.current?.focus():S(!0))},handleLeftKeyDown:()=>{if(k)return void S(!1);if(!p)return;const e=L.get(p);e?.current&&e.current.focus(),S(!1)},role:"treeitem",children:r(g,{ref:j,className:h(`${D}-item`,f),onClick:()=>{I&&I(C,l),T&&S((e=>!e))},onKeyDownCapture:e=>{"Enter"===e.key&&(I&&I(C,l),e.preventDefault(),e.stopPropagation())},type:"button","data-selected":v,"aria-selected":v,"aria-expanded":T?k:void 0,"data-toggled":k,"data-has-children":T,"data-id":C,"data-parent-id":p,"data-level":s,...x,children:[e("span",{className:`${D}-item-chevron`,"aria-hidden":!0,children:T?e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",children:e("path",{d:"M4.5 2.5L7.5 6L4.5 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),e("span",{className:`${D}-item-label`,children:n})]})}),k&&l.items&&e("div",{className:`${D}-branch`,role:"group",children:l.items.map(((r,t)=>{const n=s+1,l=!!w&&w(r);return e(b,{parentId:C,level:n,item:r,isSelected:l,onToggleSelect:I,getIsSelected:w,onChildRefReady:0===t?K:void 0,children:r.label},r.label)}))})]})}));b.displayName="TreeItem";const w=l((({children:r,...t},n)=>(console.warn("Direct usage of Tree is not supported. Please use Tree.Root and Tree.Item instead."),e("div",{ref:n,...t,children:r}))));w.displayName="Tree",w.Root=I,w.Item=b;export{w as default};
1
+ 'use client';import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{createContext as n,forwardRef as o,useRef as a,useImperativeHandle as l,useCallback as s,useId as i,useState as d,useContext as c,useEffect as m}from"react";import{R as u}from"./index-DOVR6Rd5.js";import{P as p}from"./index-m6qHOeQ9.js";import{u as f}from"./useComponentClass-QwNivz0h.js";import{c as h}from"./clsx-BaVHROc5.js";import{B as g}from"./index-gM8bbyw1.js";import"./mergeRefs-B8eZ_q-T.js";import"./mergeProps-B9ocQsG4.js";import"./ThemeContext-Sm-iNANd.js";const R=n({rootClass:"",treeRef:{current:null},itemRefs:new Map,registerItemRef:()=>{},unregisterItemRef:()=>{}}),v="Tree",I=o((({children:r,className:t="",customRootClass:n="","aria-label":o,"aria-labelledby":i,...d},c)=>{const m=a(null);l(c,(()=>m.current));const g=f(n,v),I=a(new Map),b=s(((e,r)=>{I.current.set(e,r)}),[]),w=s((e=>{I.current.delete(e)}),[]),y={rootClass:g,treeRef:m,itemRefs:I.current,registerItemRef:b,unregisterItemRef:w};return e(R.Provider,{value:y,children:e(u.Root,{orientation:"vertical",mode:"tree",children:e(u.Group,{children:e(p.div,{className:h(g,t),ref:m,role:"tree","aria-label":o,"aria-labelledby":i,...d,children:r})})})})}));I.displayName=v;const b=o((({children:n,item:o,level:s=0,className:p="",parentId:f=null,isSelected:v=!1,onToggleSelect:I,getIsSelected:w,onChildRefReady:y,...C},x)=>{const j=i(),N=a(null);l(x,(()=>N.current));const T=Boolean(o?.items?.length),[k,S]=d((()=>Boolean(o?.expanded))),{rootClass:D,itemRefs:L,registerItemRef:P,unregisterItemRef:B}=c(R),$=a(null);m((()=>(P(j,N),()=>{B(j)})),[j,P,B]),m((()=>{y&&N.current&&y(N)}),[y]);const K=e=>{$.current=e.current};return r(t,{children:[e(u.Item,{handleRightKeyDown:()=>{T&&(k?$.current?.focus():S(!0))},handleLeftKeyDown:()=>{if(k)return void S(!1);if(!f)return;const e=L.get(f);e?.current&&e.current.focus(),S(!1)},role:"treeitem",children:r(g,{ref:N,className:h(D&&`${D}-item`,p),onClick:()=>{I&&I(j,o),T&&S((e=>!e))},onKeyDownCapture:e=>{"Enter"===e.key&&(I&&I(j,o),e.preventDefault(),e.stopPropagation())},type:"button","data-selected":v,"aria-selected":v,"aria-expanded":T?k:void 0,"data-toggled":k,"data-has-children":T,"data-id":j,"data-parent-id":f,"data-level":s,...C,children:[e("span",{className:D?`${D}-item-chevron`:void 0,"aria-hidden":!0,children:T?e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",children:e("path",{d:"M4.5 2.5L7.5 6L4.5 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),e("span",{className:D?`${D}-item-label`:void 0,children:n})]})}),k&&o.items&&e("div",{className:D?`${D}-branch`:void 0,role:"group",children:o.items.map(((r,t)=>{const n=s+1,o=!!w&&w(r);return e(b,{parentId:j,level:n,item:r,isSelected:o,onToggleSelect:I,getIsSelected:w,onChildRefReady:0===t?K:void 0,children:r.label},r.label)}))})]})}));b.displayName="TreeItem";const w=o((({children:r,...t},n)=>(console.warn("Direct usage of Tree is not supported. Please use Tree.Root and Tree.Item instead."),e("div",{ref:n,...t,children:r}))));w.displayName="Tree",w.Root=I,w.Item=b;export{w as default};
@@ -1 +1 @@
1
- 'use client';import{jsx as e}from"react/jsx-runtime";import{forwardRef as t}from"react";import{P as r}from"./index-98jQ1vTr.js";import{c as s}from"./index-6If6D2Zi.js";import{c as i}from"./clsx-BaVHROc5.js";const o="VisuallyHidden",a={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",pointerEvents:"none",userSelect:"none"},n=t((({children:t,customRootClass:n,className:c,style:l={},...p},m)=>{const d=s(n,o);return e(r.div,{ref:m,className:i(d,c),style:{...a,...l},...p,children:t})}));n.displayName=o;export{n as default};
1
+ 'use client';import{jsx as e}from"react/jsx-runtime";import{forwardRef as s}from"react";import{P as t}from"./index-m6qHOeQ9.js";import{u as o}from"./useComponentClass-QwNivz0h.js";import{c as r}from"./clsx-BaVHROc5.js";import"./mergeProps-B9ocQsG4.js";import"./ThemeContext-Sm-iNANd.js";const i="VisuallyHidden",a={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",overflow:"hidden",pointerEvents:"none",userSelect:"none"},n=s((({children:s,customRootClass:n,className:m,style:p={},...l},c)=>{const d=o(n,i);return e(t.div,{ref:c,className:r(d,m),style:{...a,...p},...l,children:s})}));n.displayName=i;export{n as default};