@womp/kookie-ui 0.14.4 → 0.14.5

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 (114) hide show
  1. package/dist/cjs/components/_internal/base-button.js +1 -1
  2. package/dist/cjs/components/_internal/base-button.js.map +2 -2
  3. package/dist/cjs/components/_internal/base-button.props.d.ts +1 -1
  4. package/dist/cjs/components/_internal/base-button.props.js +1 -1
  5. package/dist/cjs/components/_internal/base-button.props.js.map +2 -2
  6. package/dist/cjs/components/button.d.ts +1 -1
  7. package/dist/cjs/components/button.js +1 -1
  8. package/dist/cjs/components/button.js.map +2 -2
  9. package/dist/cjs/components/button.props.js +1 -1
  10. package/dist/cjs/components/button.props.js.map +2 -2
  11. package/dist/cjs/components/chatbar.js +1 -1
  12. package/dist/cjs/components/chatbar.js.map +2 -2
  13. package/dist/cjs/components/icon-button.js +1 -1
  14. package/dist/cjs/components/icon-button.js.map +2 -2
  15. package/dist/cjs/components/icon-button.props.js +1 -1
  16. package/dist/cjs/components/icon-button.props.js.map +2 -2
  17. package/dist/cjs/components/index.js +1 -1
  18. package/dist/cjs/components/index.js.map +2 -2
  19. package/dist/cjs/components/message-scroller.js +1 -1
  20. package/dist/cjs/components/message-scroller.js.map +2 -2
  21. package/dist/cjs/components/notice.js +1 -1
  22. package/dist/cjs/components/notice.js.map +2 -2
  23. package/dist/cjs/components/schemas/base-button.schema.js +1 -1
  24. package/dist/cjs/components/schemas/base-button.schema.js.map +2 -2
  25. package/dist/cjs/components/schemas/button.schema.js +1 -1
  26. package/dist/cjs/components/schemas/button.schema.js.map +2 -2
  27. package/dist/cjs/components/schemas/icon-button.schema.js +1 -1
  28. package/dist/cjs/components/schemas/icon-button.schema.js.map +2 -2
  29. package/dist/cjs/components/schemas/index.js +1 -1
  30. package/dist/cjs/components/schemas/index.js.map +2 -2
  31. package/dist/cjs/components/schemas/toggle-button.schema.js +1 -1
  32. package/dist/cjs/components/schemas/toggle-button.schema.js.map +2 -2
  33. package/dist/cjs/components/schemas/toggle-icon-button.schema.js +1 -1
  34. package/dist/cjs/components/schemas/toggle-icon-button.schema.js.map +2 -2
  35. package/dist/cjs/components/theme-panel.js +1 -1
  36. package/dist/cjs/components/theme-panel.js.map +2 -2
  37. package/dist/cjs/components/toggle-button.js +1 -1
  38. package/dist/cjs/components/toggle-button.js.map +2 -2
  39. package/dist/cjs/components/toggle-icon-button.js +1 -1
  40. package/dist/cjs/components/toggle-icon-button.js.map +2 -2
  41. package/dist/cjs/components/toolbar.js +1 -1
  42. package/dist/cjs/components/toolbar.js.map +2 -2
  43. package/dist/cjs/index.js +1 -1
  44. package/dist/cjs/index.js.map +2 -2
  45. package/dist/cjs/props/index.js +1 -1
  46. package/dist/cjs/props/index.js.map +2 -2
  47. package/dist/esm/{chunk-57XCVY6J.js → chunk-5NARBZRI.js} +2 -2
  48. package/dist/esm/{chunk-T7Q6DQRD.js → chunk-ADFUYK3U.js} +2 -2
  49. package/dist/esm/{chunk-7ZCQAMHZ.js → chunk-ALG6R3ZX.js} +2 -2
  50. package/dist/esm/{chunk-RA2XCS3M.js → chunk-ARDKQL7Q.js} +2 -2
  51. package/dist/esm/{chunk-F7TOKXKZ.js → chunk-BBMENJM3.js} +2 -2
  52. package/dist/esm/{chunk-E7LJHM3S.js → chunk-BGVGSALM.js} +2 -2
  53. package/dist/esm/{chunk-E7LJHM3S.js.map → chunk-BGVGSALM.js.map} +2 -2
  54. package/dist/esm/{chunk-T6Z4JUH6.js → chunk-BWVYB64R.js} +2 -2
  55. package/dist/esm/{chunk-6SVNBGZ6.js → chunk-BXX2NVQD.js} +2 -2
  56. package/dist/esm/{chunk-6SVNBGZ6.js.map → chunk-BXX2NVQD.js.map} +1 -1
  57. package/dist/esm/{chunk-3OQM7SLQ.js → chunk-EUH5MK4Q.js} +2 -2
  58. package/dist/esm/{chunk-TCEQ5VVE.js → chunk-JGR3L4SN.js} +2 -2
  59. package/dist/esm/{chunk-CYSDGVKF.js → chunk-LHGT24A5.js} +2 -2
  60. package/dist/esm/{chunk-VJXHEDCE.js → chunk-LOLLL7AV.js} +2 -2
  61. package/dist/esm/chunk-P3KYZBOB.js +2 -0
  62. package/dist/esm/chunk-P3KYZBOB.js.map +7 -0
  63. package/dist/esm/{chunk-77TGP2LO.js → chunk-QXEQ2C6A.js} +2 -2
  64. package/dist/esm/{chunk-FMMKOOS7.js → chunk-TUKX2BRO.js} +2 -2
  65. package/dist/esm/{chunk-BKES3M4Y.js → chunk-UGGAAL4V.js} +2 -2
  66. package/dist/esm/components/_internal/base-button.js +1 -1
  67. package/dist/esm/components/_internal/base-button.props.d.ts +1 -1
  68. package/dist/esm/components/_internal/base-button.props.js +1 -1
  69. package/dist/esm/components/button.d.ts +1 -1
  70. package/dist/esm/components/button.js +1 -1
  71. package/dist/esm/components/button.props.js +1 -1
  72. package/dist/esm/components/chatbar.js +1 -1
  73. package/dist/esm/components/icon-button.js +1 -1
  74. package/dist/esm/components/icon-button.props.js +1 -1
  75. package/dist/esm/components/index.js +1 -1
  76. package/dist/esm/components/message-scroller.js +1 -1
  77. package/dist/esm/components/notice.js +1 -1
  78. package/dist/esm/components/schemas/base-button.schema.js +1 -1
  79. package/dist/esm/components/schemas/button.schema.js +1 -1
  80. package/dist/esm/components/schemas/icon-button.schema.js +1 -1
  81. package/dist/esm/components/schemas/index.js +1 -1
  82. package/dist/esm/components/schemas/toggle-button.schema.js +1 -1
  83. package/dist/esm/components/schemas/toggle-icon-button.schema.js +1 -1
  84. package/dist/esm/components/theme-panel.js +1 -1
  85. package/dist/esm/components/toggle-button.js +1 -1
  86. package/dist/esm/components/toggle-icon-button.js +1 -1
  87. package/dist/esm/components/toolbar.js +1 -1
  88. package/dist/esm/index.js +1 -1
  89. package/dist/esm/props/index.js +1 -1
  90. package/package.json +1 -1
  91. package/schemas/base-button.json +1 -1
  92. package/schemas/button.json +1 -1
  93. package/schemas/icon-button.json +1 -1
  94. package/schemas/index.json +5 -5
  95. package/schemas/toggle-button.json +1 -1
  96. package/schemas/toggle-icon-button.json +1 -1
  97. package/src/components/_internal/base-button.props.ts +3 -3
  98. package/src/components/button.tsx +1 -1
  99. package/src/components/schemas/base-button.schema.ts +2 -2
  100. package/dist/esm/chunk-2D5QJ6MX.js +0 -2
  101. package/dist/esm/chunk-2D5QJ6MX.js.map +0 -7
  102. /package/dist/esm/{chunk-57XCVY6J.js.map → chunk-5NARBZRI.js.map} +0 -0
  103. /package/dist/esm/{chunk-T7Q6DQRD.js.map → chunk-ADFUYK3U.js.map} +0 -0
  104. /package/dist/esm/{chunk-7ZCQAMHZ.js.map → chunk-ALG6R3ZX.js.map} +0 -0
  105. /package/dist/esm/{chunk-RA2XCS3M.js.map → chunk-ARDKQL7Q.js.map} +0 -0
  106. /package/dist/esm/{chunk-F7TOKXKZ.js.map → chunk-BBMENJM3.js.map} +0 -0
  107. /package/dist/esm/{chunk-T6Z4JUH6.js.map → chunk-BWVYB64R.js.map} +0 -0
  108. /package/dist/esm/{chunk-3OQM7SLQ.js.map → chunk-EUH5MK4Q.js.map} +0 -0
  109. /package/dist/esm/{chunk-TCEQ5VVE.js.map → chunk-JGR3L4SN.js.map} +0 -0
  110. /package/dist/esm/{chunk-CYSDGVKF.js.map → chunk-LHGT24A5.js.map} +0 -0
  111. /package/dist/esm/{chunk-VJXHEDCE.js.map → chunk-LOLLL7AV.js.map} +0 -0
  112. /package/dist/esm/{chunk-77TGP2LO.js.map → chunk-QXEQ2C6A.js.map} +0 -0
  113. /package/dist/esm/{chunk-FMMKOOS7.js.map → chunk-TUKX2BRO.js.map} +0 -0
  114. /package/dist/esm/{chunk-BKES3M4Y.js.map → chunk-UGGAAL4V.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-VK7RNXUO.js";import{a as l}from"./chunk-6SVNBGZ6.js";import*as e from"react";import{Toggle as B}from"radix-ui";var d=e.forwardRef(({pressed:a,onPressedChange:g,defaultPressed:p,children:t,...s},f)=>{let{"aria-label":r,"aria-labelledby":o,iconOnly:i}=s,n=e.useRef(null);e.useEffect(()=>{n.current=null},[o]);let c=e.useCallback(()=>r||(o?(n.current===null&&(n.current=document.getElementById(o)?.textContent||"Toggle button"),n.current):typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"Toggle button"),[r,o,t]),{handlePressedChange:m}=u({pressed:a,onPressedChange:g,getAccessibleName:c,componentName:i?"ToggleIconButton":"ToggleButton"});return e.createElement(B.Root,{pressed:a,onPressedChange:m,defaultPressed:p,asChild:!0},e.createElement(l,{...s,ref:f},t))});d.displayName="ToggleButton";export{d as a};
2
- //# sourceMappingURL=chunk-57XCVY6J.js.map
1
+ import{a as u}from"./chunk-VK7RNXUO.js";import{a as l}from"./chunk-BXX2NVQD.js";import*as e from"react";import{Toggle as B}from"radix-ui";var d=e.forwardRef(({pressed:a,onPressedChange:g,defaultPressed:p,children:t,...s},f)=>{let{"aria-label":r,"aria-labelledby":o,iconOnly:i}=s,n=e.useRef(null);e.useEffect(()=>{n.current=null},[o]);let c=e.useCallback(()=>r||(o?(n.current===null&&(n.current=document.getElementById(o)?.textContent||"Toggle button"),n.current):typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"Toggle button"),[r,o,t]),{handlePressedChange:m}=u({pressed:a,onPressedChange:g,getAccessibleName:c,componentName:i?"ToggleIconButton":"ToggleButton"});return e.createElement(B.Root,{pressed:a,onPressedChange:m,defaultPressed:p,asChild:!0},e.createElement(l,{...s,ref:f},t))});d.displayName="ToggleButton";export{d as a};
2
+ //# sourceMappingURL=chunk-5NARBZRI.js.map
@@ -1,2 +1,2 @@
1
- import{a as o}from"./chunk-6SVNBGZ6.js";import*as t from"react";var a=t.forwardRef((e,n)=>t.createElement(o,{...e,iconOnly:!0,ref:n}));a.displayName="IconButton";export{a};
2
- //# sourceMappingURL=chunk-T7Q6DQRD.js.map
1
+ import{a as o}from"./chunk-BXX2NVQD.js";import*as t from"react";var a=t.forwardRef((e,n)=>t.createElement(o,{...e,iconOnly:!0,ref:n}));a.displayName="IconButton";export{a};
2
+ //# sourceMappingURL=chunk-ADFUYK3U.js.map
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-T7Q6DQRD.js";import{a as m}from"./chunk-5BWLY27A.js";import{a as y}from"./chunk-OS3FCYZY.js";var I={};y(I,{Button:()=>P,Content:()=>f,Item:()=>g,Root:()=>d,Viewport:()=>S,useMessageScroller:()=>B,useMessageScrollerScrollable:()=>w,useMessageScrollerVisibility:()=>h});import*as e from"react";import c from"classnames";import{MessageScroller as a,useMessageScroller as B,useMessageScrollerScrollable as w,useMessageScrollerVisibility as h}from"@shadcn/react/message-scroller";import{useComposedRefs as C}from"radix-ui/internal";var d=e.forwardRef(({autoScroll:o=!0,defaultScrollPosition:t="end",scrollEdgeThreshold:r,scrollMargin:s,className:n,children:i,...l},p)=>e.createElement(a.Provider,{autoScroll:o,defaultScrollPosition:t,...r!=null?{scrollEdgeThreshold:r}:{},...s!=null?{scrollMargin:s}:{}},e.createElement(a.Root,{...l,ref:p,className:c("rt-MessageScrollerRoot",n)},i)));d.displayName="MessageScroller.Root";var S=e.forwardRef(({className:o,"aria-label":t,fade:r=!0,...s},n)=>{let i=m(r),l=C(n,i);return e.createElement(a.Viewport,{"aria-label":t??"",...s,ref:l,"data-fade":r?"":void 0,className:c("rt-MessageScrollerViewport",o)})});S.displayName="MessageScroller.Viewport";var f=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Content,{...t,ref:r,className:c("rt-MessageScrollerContent",o)}));f.displayName="MessageScroller.Content";var g=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Item,{...t,ref:r,className:c("rt-MessageScrollerItem",o)}));g.displayName="MessageScroller.Item";var P=e.forwardRef(({direction:o="end",behavior:t,className:r,children:s,size:n="2",variant:i="surface",emphasis:l,color:p="gray",radius:M="full","aria-label":R,...b},v)=>e.createElement(a.Button,{direction:o,...t?{behavior:t}:{},render:e.createElement(u,{...b,ref:v,size:n,...l?{emphasis:l}:{variant:i},color:p,radius:M,"aria-label":R??(o==="end"?"Jump to the latest":"Jump to the first"),className:c("rt-MessageScrollerButton",r),"data-direction":o},s??e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0,style:o==="start"?{transform:"rotate(180deg)"}:void 0},e.createElement("path",{d:"M7.5 2.5v10M3.5 8.5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})))}));P.displayName="MessageScroller.Button";export{B as a,w as b,h as c,d,S as e,f,g,P as h,I as i};
2
- //# sourceMappingURL=chunk-7ZCQAMHZ.js.map
1
+ import{a as u}from"./chunk-ADFUYK3U.js";import{a as m}from"./chunk-5BWLY27A.js";import{a as y}from"./chunk-OS3FCYZY.js";var I={};y(I,{Button:()=>P,Content:()=>f,Item:()=>g,Root:()=>d,Viewport:()=>S,useMessageScroller:()=>B,useMessageScrollerScrollable:()=>w,useMessageScrollerVisibility:()=>h});import*as e from"react";import c from"classnames";import{MessageScroller as a,useMessageScroller as B,useMessageScrollerScrollable as w,useMessageScrollerVisibility as h}from"@shadcn/react/message-scroller";import{useComposedRefs as C}from"radix-ui/internal";var d=e.forwardRef(({autoScroll:o=!0,defaultScrollPosition:t="end",scrollEdgeThreshold:r,scrollMargin:s,className:n,children:i,...l},p)=>e.createElement(a.Provider,{autoScroll:o,defaultScrollPosition:t,...r!=null?{scrollEdgeThreshold:r}:{},...s!=null?{scrollMargin:s}:{}},e.createElement(a.Root,{...l,ref:p,className:c("rt-MessageScrollerRoot",n)},i)));d.displayName="MessageScroller.Root";var S=e.forwardRef(({className:o,"aria-label":t,fade:r=!0,...s},n)=>{let i=m(r),l=C(n,i);return e.createElement(a.Viewport,{"aria-label":t??"",...s,ref:l,"data-fade":r?"":void 0,className:c("rt-MessageScrollerViewport",o)})});S.displayName="MessageScroller.Viewport";var f=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Content,{...t,ref:r,className:c("rt-MessageScrollerContent",o)}));f.displayName="MessageScroller.Content";var g=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Item,{...t,ref:r,className:c("rt-MessageScrollerItem",o)}));g.displayName="MessageScroller.Item";var P=e.forwardRef(({direction:o="end",behavior:t,className:r,children:s,size:n="2",variant:i="surface",emphasis:l,color:p="gray",radius:M="full","aria-label":R,...b},v)=>e.createElement(a.Button,{direction:o,...t?{behavior:t}:{},render:e.createElement(u,{...b,ref:v,size:n,...l?{emphasis:l}:{variant:i},color:p,radius:M,"aria-label":R??(o==="end"?"Jump to the latest":"Jump to the first"),className:c("rt-MessageScrollerButton",r),"data-direction":o},s??e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0,style:o==="start"?{transform:"rotate(180deg)"}:void 0},e.createElement("path",{d:"M7.5 2.5v10M3.5 8.5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})))}));P.displayName="MessageScroller.Button";export{B as a,w as b,h as c,d,S as e,f,g,P as h,I as i};
2
+ //# sourceMappingURL=chunk-ALG6R3ZX.js.map
@@ -1,2 +1,2 @@
1
- import{a as rt}from"./chunk-3OQM7SLQ.js";import{a as Ve}from"./chunk-T7Q6DQRD.js";import{g as nt,j as ot}from"./chunk-IX5HIHVI.js";import{a as we}from"./chunk-KJTEZVOF.js";import{a as at}from"./chunk-GONBMSRL.js";import{a as Be}from"./chunk-PAEHH3WS.js";import{a as je}from"./chunk-AGAQC4HH.js";import{a as De}from"./chunk-PXUQEA77.js";import{b as U}from"./chunk-FWB47YCH.js";import{a as tt}from"./chunk-AVFGMLL4.js";import{a as zt}from"./chunk-OS3FCYZY.js";var Gt={};zt(Gt,{AttachTrigger:()=>gt,Attachment:()=>Ue,AttachmentsRow:()=>ft,InlineEnd:()=>ht,InlineStart:()=>pt,Item:()=>Ct,Root:()=>ut,Row:()=>vt,RowEnd:()=>xt,RowStart:()=>yt,Send:()=>Pt,Textarea:()=>mt});import*as e from"react";import T from"classnames";import{LazyMotion as Dt,MotionConfig as Bt,domAnimation as jt,m as pe}from"motion/react";import{useComposedRefs as ct}from"radix-ui/internal";import{useDropzone as Vt}from"react-dropzone";var We=typeof window<"u"?e.useLayoutEffect:e.useEffect;function st(a,r){let{placeholder:n}=a;if(!n){r();return}a.placeholder="";try{r()}finally{a.placeholder=n}}var he={layout:{type:"spring",visualDuration:.15,bounce:.1}},lt=e.createContext(null),Ke=e.createContext(""),H=()=>{let a=e.useContext(lt);if(!a)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return a},me=a=>Array.isArray(a)?a:typeof a=="string"?a.split(",").map(r=>r.trim()).filter(Boolean):[],Wt=(a,r)=>{if(r.length===0)return!0;let n=a.type.toLowerCase(),i=a.name.toLowerCase();for(let c of r){let l=c.toLowerCase();if(l.includes("/")){let[d,u]=l.split("/"),[f,b]=n.split("/");if(d==="*"||d===f&&(u==="*"||u===b))return!0}else if(l.startsWith(".")&&i.endsWith(l))return!0}return!1},$t=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,dt=(a,r)=>(r||"").toLowerCase().startsWith("image/")||$t.test(a),$e=a=>a.trim().length>0,it=(a,r)=>`${a} ${r}${a===1?"":"s"}`,Kt=0,Ut=()=>`chatbar-attachment-${Date.now()}-${++Kt}`,ut=e.forwardRef((a,r)=>{let{className:n,style:i,children:c,value:l,defaultValue:d="",onValueChange:u,open:f,defaultOpen:b=!1,onOpenChange:C,expandOn:y="both",minLines:g=3,maxLines:w=6,sendMode:I="whenDirty",disabled:R,readOnly:E,onSubmit:B,size:A="2",variant:F,color:M,radius:N,panelBackground:X,material:h,width:J,maxWidth:j,attachments:Q,defaultAttachments:P,onAttachmentsChange:z,accept:Z,multiple:D=!0,maxAttachments:_,maxFileSize:G,paste:V=!0,pasteAccept:k,clearOnSubmit:O=!0,onAttachmentReject:Se,dropzone:se=!0,apiRef:Ee,onBlurCapture:fe,notices:be,context:Re,...Te}=a,t=h||X,v=l!=null,[S,ie]=e.useState(d),W=v?l:S,q=f!=null,[Le,ce]=e.useState(b),ee=q?f:Le,te="attachments"in a,[_e,At]=e.useState(()=>P??[]),le=e.useMemo(()=>te?Q??[]:_e,[te,Q,_e]),[Ge,wt]=e.useState({text:"",id:0}),de=e.useCallback(o=>wt(s=>({text:o,id:s.id+1})),[]),qe=e.useRef(null),St=ct(r,qe),ke=e.useRef(null),Me=e.useRef(null),ue=e.useRef(!1),Ce=e.useRef(!1),ge=e.useRef(void 0),Ne=e.useRef(null),Ye=me(Z).join(","),Oe=me(k).join(","),He=e.useMemo(()=>me(Ye),[Ye]),Et=e.useMemo(()=>Oe?me(Oe):He,[Oe,He]),Xe={value:W,attachments:le,accepts:He,pasteAccepts:Et,multiple:D,maxAttachments:_,maxFileSize:G,disabled:R,readOnly:E,expandOn:y,isValueControlled:v,isOpenControlled:q,isAttachmentsControlled:te,onValueChange:u,onOpenChange:C,onAttachmentsChange:z,onAttachmentReject:Se,onSubmit:B},x=e.useRef(Xe);x.current=Xe;let Ie=e.useRef(null),$=e.useCallback(()=>Ie.current??x.current.attachments,[]),ae=e.useCallback(o=>{x.current.isOpenControlled||ce(o),x.current.onOpenChange?.(o)},[]),ve=e.useCallback(o=>{x.current.isValueControlled||ie(o),x.current.onValueChange?.(o)},[]),ne=e.useCallback(o=>{Ie.current=o,queueMicrotask(()=>{Ie.current=null}),x.current.isAttachmentsControlled||At(o),x.current.onAttachmentsChange?.(o)},[]),ye=e.useRef(new Set),oe=e.useCallback((o,s,m=x.current.multiple)=>{let p=x.current;if(p.disabled||p.readOnly||o.length===0)return 0;let K=$(),Y=[],re=[],It=typeof p.maxAttachments=="number"?Math.max(p.maxAttachments-K.length,0):1/0,Ft=m?1/0:1;for(let L of o){if(Y.length>=It||Y.length>=Ft){re.push({file:L,reason:"count"});continue}if(typeof p.maxFileSize=="number"&&L.size>p.maxFileSize){re.push({file:L,reason:"size"});continue}if(!Wt(L,s)){re.push({file:L,reason:"type"});continue}let ze=dt(L.name,L.type)?URL.createObjectURL(L):void 0;ze&&ye.current.add(ze),Y.push({id:Ut(),name:L.name,size:L.size,type:L.type,file:L,url:ze,status:"idle"})}let Ae=[];return Y.length>0&&(ne(K.concat(Y)),p.expandOn!=="none"&&ae(!0),Ae.push(`${it(Y.length,"file")} attached.`)),re.length>0&&(p.onAttachmentReject?.(re),Ae.push(`${it(re.length,"file")} could not be attached.`)),Ae.length>0&&de(Ae.join(" ")),Y.length},[$,ne,ae,de]),xe=e.useCallback(o=>oe(o,x.current.accepts),[oe]),Je=e.useCallback(o=>oe(o,x.current.pasteAccepts),[oe]),Qe=e.useCallback(o=>{let s=$(),m=s.find(p=>p.id===o);m&&(ne(s.filter(p=>p.id!==o)),de(`Removed ${m.name}.`))},[$,ne,de]),Ze=e.useCallback(o=>{let s=x.current;if(s.disabled||s.readOnly)return!1;let m=$();if(!$e(s.value)&&m.length===0)return!1;let p={value:s.value,attachments:m};if(o&&s.onSubmit)for(let K of m)K.url&&ye.current.delete(K.url);return s.onSubmit?.(p),o&&(ve(""),ne([])),!0},[$,ve,ne]);e.useEffect(()=>{let o=ye.current;if(o.size===0)return;let s=new Set(le.map(m=>m.url));for(let m of Array.from(o))s.has(m)||(URL.revokeObjectURL(m),o.delete(m))},[le]),e.useEffect(()=>{let o=ye.current;return()=>{if(!x.current.isAttachmentsControlled){for(let s of Array.from(o))URL.revokeObjectURL(s);o.clear()}}},[]);let Pe=e.useCallback(o=>{let s=x.current,m=Me.current;if(clearTimeout(ge.current),Ce.current=!1,!m||s.disabled||s.readOnly)return;let p=o?.accept!=null?me(o.accept):s.accepts,K=o?.multiple??s.multiple;Ne.current={patterns:p,multiple:K},m.accept=p.join(","),m.multiple=K,ue.current=!0,m.click(),setTimeout(()=>{document.hasFocus()&&(ue.current=!1)},1e3)},[]),et=e.useCallback(()=>{Ce.current=!0,clearTimeout(ge.current),ge.current=setTimeout(()=>{Ce.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ge.current),[]),e.useEffect(()=>{let o=Me.current,s=()=>{ue.current=!1};return window.addEventListener("focus",s),o?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),o?.removeEventListener("cancel",s)}},[]);let Tt=e.useCallback(o=>{let s=o.currentTarget,m=Array.from(s.files??[]),p=Ne.current;oe(m,p?.patterns??x.current.accepts,p?.multiple),ue.current=!1,Ne.current=null,s.value=""},[oe]),Lt=e.useCallback(o=>{fe?.(o);let s=x.current,m=qe.current;if(!m||s.expandOn==="none")return;let p=o.relatedTarget;p&&m.contains(p)||ue.current||Ce.current||!$e(s.value)&&$().length===0&&ae(!1)},[fe,ae,$]),kt=e.useCallback(o=>{xe(o)},[xe]),{getRootProps:Mt,isDragActive:Nt}=Vt({onDrop:kt,onDragEnter:()=>de(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!se||R||E}),Fe=se&&Nt;e.useImperativeHandle(Ee,()=>({focusTextarea:()=>ke.current?.focus({preventScroll:!0}),openFilePicker:()=>Pe()}),[Pe]);let Ot=e.useCallback(o=>{if(R||o.pointerType==="mouse"&&o.button!==0)return;let s=o.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(o.preventDefault(),ke.current?.focus({preventScroll:!0}))},[R]),Ht=e.useMemo(()=>({open:ee,setOpen:ae,setValue:ve,size:A,expandOn:y,minLines:g,maxLines:w,sendMode:I,disabled:R,readOnly:E,paste:V,clearOnSubmit:O,multiple:D,textareaRef:ke,attachments:le,removeAttachment:Qe,submit:Ze,appendFiles:xe,appendFilesFromPaste:Je,openFilePicker:Pe,beginFilePickerPress:et}),[ee,ae,ve,A,y,g,w,I,R,E,V,O,D,le,Qe,Ze,xe,Je,Pe,et]);return e.createElement(lt.Provider,{value:Ht},e.createElement(Ke.Provider,{value:W},e.createElement(Dt,{features:jt},e.createElement(Bt,{reducedMotion:"user"},e.createElement("div",{...Te,ref:St,className:T("rt-ChatbarRoot",`rt-r-size-${A}`,n),style:{position:"relative",width:J,maxWidth:j,...i},"data-state":ee?"open":"closed","data-disabled":R?"":void 0,"data-readonly":E?"":void 0,"data-drop-active":Fe?"":void 0,"data-accent-color":M,"data-radius":N,"data-panel-background":t,"data-material":t,onBlurCapture:Lt},e.createElement("input",{ref:Me,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:Tt}),be?e.createElement("div",{className:"rt-ChatbarNotices"},e.createElement(rt.Provider,{value:A},be)):null,e.createElement("div",{...se?Mt():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Ot},e.createElement(pe.div,{className:T("rt-ChatbarBox",`rt-variant-${tt(F??"raised")}`),style:{position:"relative"},"data-accent-color":M,"data-radius":N,"data-panel-background":t,"data-material":t,layout:!0,transition:he},e.createElement(pe.div,{className:"rt-ChatbarGrid",layout:"position",transition:he},c),Fe&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(we,{emphasis:"medium",size:A,weight:"medium"},"Drop files here to attach"))))),Re?e.createElement(we,{as:"div",size:A==="3"?"2":"1",emphasis:"medium",className:"rt-ChatbarContext"},Re):null,e.createElement(je,{role:"status","aria-live":"polite"},Fe?"Drop files here to attach.":e.createElement("span",{key:Ge.id},Ge.text)))))))});ut.displayName="Chatbar.Root";var mt=e.forwardRef((a,r)=>{let{className:n,style:i,asChild:c,onFocus:l,onChange:d,onPaste:u,onKeyDown:f,onCompositionStart:b,onCompositionEnd:C,submitOnEnter:y=!1,...g}=a,w=H(),I=e.useContext(Ke),{open:R,minLines:E,maxLines:B,expandOn:A,disabled:F,readOnly:M,setOpen:N,setValue:X,textareaRef:h,paste:J,appendFilesFromPaste:j,size:Q,submit:P,clearOnSubmit:z}=w,Z=ct(r,h),D=e.useRef(0),_=e.useRef(0),G=e.useRef(!1),V=e.useRef({open:R,minLines:E,maxLines:B});We(()=>{V.current={open:R,minLines:E,maxLines:B}},[R,E,B]);let k=e.useCallback(()=>{let t=h.current;if(!t)return;let v=window.getComputedStyle(t);D.current=parseFloat(v.lineHeight)||20,_.current=(parseFloat(v.paddingTop)||0)+(parseFloat(v.paddingBottom)||0)},[h]),O=e.useCallback((t,v)=>{let{minLines:S,maxLines:ie}=V.current,W=D.current,q=_.current,Le=Math.ceil((v?S:1)*W)+q,ce=Math.ceil((v?ie:1)*W)+q,ee=Math.max(t.scrollHeight,Le);t.style.height=`${Math.min(ee,ce)}px`;let te=ee>ce;t.style.overflowY=te?"auto":"hidden",t.style.maxHeight=te?`${ce}px`:"none"},[]);We(()=>{k()},[k,Q]),We(()=>{let t=h.current;t&&(D.current===0&&k(),st(t,()=>{t.style.height="auto";let v=R;if(!R&&(A==="overflow"||A==="both")){let S=Math.ceil(D.current)+_.current;t.scrollHeight>S+1&&(v=!0,N(!0))}O(t,v)}))},[I,R,A,E,B,Q,N,h,k,O]),e.useEffect(()=>{let t=h.current;if(!t||typeof ResizeObserver>"u")return;let v=-1,S=new ResizeObserver(ie=>{let W=ie[0]?.contentRect.width??0;if(W===v)return;let q=v===-1;v=W,!q&&(k(),st(t,()=>{t.style.height="auto",O(t,V.current.open)}))});return S.observe(t),()=>S.disconnect()},[h,k,O]),e.useEffect(()=>{},[]);let Se=e.useCallback(t=>{l?.(t),!(F||M)&&(A==="focus"||A==="both")&&!R&&N(!0)},[F,M,A,R,N,l]),se=e.useCallback(t=>{X(t.currentTarget.value),d?.(t)},[X,d]),Ee=e.useCallback(t=>{if(u?.(t),t.defaultPrevented||!J||F||M)return;let v=Array.from(t.clipboardData?.items??[]).filter(S=>S.kind==="file").map(S=>S.getAsFile()).filter(S=>!!S);v.length!==0&&j(v)>0&&t.preventDefault()},[J,F,M,u,j]),fe=e.useCallback(t=>{G.current=!0,b?.(t)},[b]),be=e.useCallback(t=>{G.current=!1,C?.(t)},[C]),Re=e.useCallback(t=>{f?.(t),!(t.defaultPrevented||!y)&&(t.key!=="Enter"||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey||G.current||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||(t.preventDefault(),P(z)))},[y,f,P,z]),Te=c?U:"textarea";return e.createElement(pe.div,{className:T("rt-ChatbarField","rt-ChatbarTextarea",n),layout:"position",transition:he},e.createElement(Te,{...g,ref:Z,className:"rt-ChatbarInput",value:I,onChange:se,onFocus:Se,onPaste:Ee,onKeyDown:Re,onCompositionStart:fe,onCompositionEnd:be,disabled:F,readOnly:M,rows:R?E:1,spellCheck:g.spellCheck??!0,autoCorrect:g.autoCorrect??"on",style:i}))});mt.displayName="Chatbar.Textarea";var pt=e.forwardRef((a,r)=>{let{children:n,asChild:i,className:c,...l}=a;return H().open?null:e.createElement(i?U:"div",{...l,ref:r,className:T("rt-ChatbarInlineStart",c)},n)});pt.displayName="Chatbar.InlineStart";var ht=e.forwardRef((a,r)=>{let{children:n,asChild:i,className:c,...l}=a;return H().open?null:e.createElement(i?U:"div",{...l,ref:r,className:T("rt-ChatbarInlineEnd",c)},n)});ht.displayName="Chatbar.InlineEnd";var ft=e.forwardRef((a,r)=>{let{asChild:n,forceMount:i,renderAttachment:c,className:l,children:d,...u}=a,f=H(),b=e.Children.toArray(d).length>0;if(f.attachments.length===0&&!b&&!i)return null;let C=n?U:"div";return e.createElement(pe.div,{layout:"position",transition:he},e.createElement(C,{...u,ref:r,className:T("rt-ChatbarAttachmentsRow",l),role:"list","aria-label":u["aria-label"]??"Attachments"},e.createElement(at,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(De,{align:"center",gap:"2",minWidth:"fit-content"},f.attachments.map(y=>e.createElement(Ue,{key:y.id,attachment:y,asChild:!!c},c?.(y))),d))))});ft.displayName="Chatbar.AttachmentsRow";function bt(a,r){let n=a.closest('[role="listitem"]'),i=n?.parentElement?Array.from(n.parentElement.children):[],c=n?i.indexOf(n):-1,d=(i[c+1]??i[c-1])?.querySelector(".rt-ChatbarItemRemove");d?d.focus():r.current?.focus({preventScroll:!0})}var Rt=({lead:a,leadKind:r,label:n,detail:i,removeLabel:c,onRemove:l})=>{let d=H();return e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-ChatbarItemLead","data-kind":r,"aria-hidden":!0},a),e.createElement(we,{className:"rt-ChatbarItemLabel",size:d.size,truncate:!0},n,i?e.createElement(je,null,", ",i):null),l&&e.createElement(Ve,{className:"rt-ChatbarItemRemove","aria-label":c,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(nt,null)))},_t={uploading:"uploading",error:"failed to upload"},Ue=e.forwardRef((a,r)=>{let{attachment:n,asChild:i,className:c,children:l,...d}=a,u=H(),f=i?U:"div",b=!!n.url&&dt(n.name,n.type),C=`${Math.ceil(n.size/1024)} KB`,y=n.status?_t[n.status]:void 0,g=u.disabled||u.readOnly,w=R=>{bt(R.currentTarget,u.textareaRef),u.removeAttachment(n.id)},I=n.status==="uploading"?e.createElement(Be,{size:"1"}):b?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:n.url,alt:""}):e.createElement(ot,null);return e.createElement(f,{...d,ref:r,className:T(l?"rt-ChatbarAttachment":"rt-ChatbarAttachment rt-ChatbarItem",c),role:"listitem","data-kind":b?"image":"file","data-status":n.status,title:n.name},l??e.createElement(Rt,{lead:I,leadKind:b&&n.status!=="uploading"?"image":"icon",label:n.name,detail:y?`${C}, ${y}`:C,removeLabel:`Remove ${n.name}`,onRemove:g?void 0:w}))});Ue.displayName="Chatbar.Attachment";var Ct=e.forwardRef((a,r)=>{let{children:n,icon:i,image:c,color:l,onRemove:d,removeLabel:u,className:f,...b}=a,C=H(),y=C.disabled||C.readOnly,g=d?w=>{bt(w.currentTarget,C.textareaRef),d()}:void 0;return e.createElement("div",{...b,ref:r,className:T("rt-ChatbarItem",f),role:"listitem","data-accent-color":c?void 0:l??"gray",title:n},e.createElement(Rt,{lead:c?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:c,alt:""}):i,leadKind:c?"image":"icon",label:n,removeLabel:u??`Remove ${n}`,onRemove:y?void 0:g}))});Ct.displayName="Chatbar.Item";var gt=e.forwardRef((a,r)=>{let{asChild:n,accept:i,multiple:c,disabled:l,onPointerDown:d,onClick:u,...f}=a,b=H(),C=l||b.disabled||b.readOnly;return e.createElement(n?U:"button",{...f,ref:r,className:T("rt-ChatbarAttachTrigger",f.className),type:f.type??"button","aria-label":f["aria-label"]??"Add attachments",disabled:C,onPointerDown:g=>{d?.(g),!C&&!g.defaultPrevented&&b.beginFilePickerPress()},onClick:g=>{u?.(g),!(C||g.defaultPrevented)&&b.openFilePicker({accept:i,multiple:c})}})});gt.displayName="Chatbar.AttachTrigger";var vt=e.forwardRef((a,r)=>{let{asChild:n,children:i,className:c,...l}=a;if(!H().open)return null;let u=n?U:"div";return e.createElement(pe.div,{layout:"position",transition:he},e.createElement(u,{...l,ref:r,className:T("rt-ChatbarRow",c)},e.createElement(De,{align:"center",justify:"between",width:"100%"},i)))});vt.displayName="Chatbar.Row";var yt=e.forwardRef((a,r)=>{let{className:n,...i}=a;return e.createElement("div",{...i,ref:r,className:T("rt-ChatbarRowStart",n)})});yt.displayName="Chatbar.RowStart";var xt=e.forwardRef((a,r)=>{let{className:n,...i}=a;return e.createElement("div",{...i,ref:r,className:T("rt-ChatbarRowEnd",n)})});xt.displayName="Chatbar.RowEnd";var Pt=e.forwardRef((a,r)=>{let{asChild:n,clearOnSend:i,disabled:c,children:l,style:d,className:u,size:f,variant:b,emphasis:C,tabIndex:y,onClick:g,status:w="ready",onStop:I,onRetry:R,stopLabel:E="Stop",retryLabel:B="Retry",stopIcon:A,retryIcon:F,"aria-label":M,"aria-labelledby":N,...X}=a,h=H(),J=e.useContext(Ke),j=$e(J)||h.attachments.length>0,P=j?"send":w==="submitted"||w==="streaming"?"stop":w==="error"?"retry":"send";if(h.sendMode==="never"&&P==="send")return null;let z=P!=="send"||h.sendMode==="always"||j,Z=P==="send"?c||h.disabled||h.readOnly||!j:c||h.disabled,_=P==="stop"?{"aria-label":E}:P==="retry"?{"aria-label":B}:N?{"aria-labelledby":N}:{"aria-label":M??"Send"},G=k=>{if(g?.(k),k.defaultPrevented||Z)return;if(P==="stop"){I?.();return}if(P==="retry"){R?.();return}let O=i??h.clearOnSubmit;h.submit(O)&&O&&h.textareaRef.current?.focus({preventScroll:!0})},V=P==="stop"?A??(w==="submitted"?e.createElement(Be,{size:h.size}):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):P==="retry"?F??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(Ve,{...X,ref:r,size:f??h.size,...C?{emphasis:C}:{variant:b??(h.open||P!=="send"?"solid":"ghost")},disabled:Z,className:T("rt-ChatbarSend",u),style:{opacity:z?1:0,pointerEvents:z?void 0:"none",...d},"aria-hidden":z?void 0:!0,tabIndex:z?y:-1,asChild:n,onClick:G,"data-status":w,"data-mode":P,..._},V)});Pt.displayName="Chatbar.Send";export{ut as a,mt as b,pt as c,ht as d,ft as e,Ue as f,Ct as g,gt as h,vt as i,yt as j,xt as k,Pt as l,Gt as m};
2
- //# sourceMappingURL=chunk-RA2XCS3M.js.map
1
+ import{a as rt}from"./chunk-EUH5MK4Q.js";import{a as Ve}from"./chunk-ADFUYK3U.js";import{g as nt,j as ot}from"./chunk-IX5HIHVI.js";import{a as we}from"./chunk-KJTEZVOF.js";import{a as at}from"./chunk-GONBMSRL.js";import{a as Be}from"./chunk-PAEHH3WS.js";import{a as je}from"./chunk-AGAQC4HH.js";import{a as De}from"./chunk-PXUQEA77.js";import{b as U}from"./chunk-FWB47YCH.js";import{a as tt}from"./chunk-AVFGMLL4.js";import{a as zt}from"./chunk-OS3FCYZY.js";var Gt={};zt(Gt,{AttachTrigger:()=>gt,Attachment:()=>Ue,AttachmentsRow:()=>ft,InlineEnd:()=>ht,InlineStart:()=>pt,Item:()=>Ct,Root:()=>ut,Row:()=>vt,RowEnd:()=>xt,RowStart:()=>yt,Send:()=>Pt,Textarea:()=>mt});import*as e from"react";import T from"classnames";import{LazyMotion as Dt,MotionConfig as Bt,domAnimation as jt,m as pe}from"motion/react";import{useComposedRefs as ct}from"radix-ui/internal";import{useDropzone as Vt}from"react-dropzone";var We=typeof window<"u"?e.useLayoutEffect:e.useEffect;function st(a,r){let{placeholder:n}=a;if(!n){r();return}a.placeholder="";try{r()}finally{a.placeholder=n}}var he={layout:{type:"spring",visualDuration:.15,bounce:.1}},lt=e.createContext(null),Ke=e.createContext(""),H=()=>{let a=e.useContext(lt);if(!a)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return a},me=a=>Array.isArray(a)?a:typeof a=="string"?a.split(",").map(r=>r.trim()).filter(Boolean):[],Wt=(a,r)=>{if(r.length===0)return!0;let n=a.type.toLowerCase(),i=a.name.toLowerCase();for(let c of r){let l=c.toLowerCase();if(l.includes("/")){let[d,u]=l.split("/"),[f,b]=n.split("/");if(d==="*"||d===f&&(u==="*"||u===b))return!0}else if(l.startsWith(".")&&i.endsWith(l))return!0}return!1},$t=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,dt=(a,r)=>(r||"").toLowerCase().startsWith("image/")||$t.test(a),$e=a=>a.trim().length>0,it=(a,r)=>`${a} ${r}${a===1?"":"s"}`,Kt=0,Ut=()=>`chatbar-attachment-${Date.now()}-${++Kt}`,ut=e.forwardRef((a,r)=>{let{className:n,style:i,children:c,value:l,defaultValue:d="",onValueChange:u,open:f,defaultOpen:b=!1,onOpenChange:C,expandOn:y="both",minLines:g=3,maxLines:w=6,sendMode:I="whenDirty",disabled:R,readOnly:E,onSubmit:B,size:A="2",variant:F,color:M,radius:N,panelBackground:X,material:h,width:J,maxWidth:j,attachments:Q,defaultAttachments:P,onAttachmentsChange:z,accept:Z,multiple:D=!0,maxAttachments:_,maxFileSize:G,paste:V=!0,pasteAccept:k,clearOnSubmit:O=!0,onAttachmentReject:Se,dropzone:se=!0,apiRef:Ee,onBlurCapture:fe,notices:be,context:Re,...Te}=a,t=h||X,v=l!=null,[S,ie]=e.useState(d),W=v?l:S,q=f!=null,[Le,ce]=e.useState(b),ee=q?f:Le,te="attachments"in a,[_e,At]=e.useState(()=>P??[]),le=e.useMemo(()=>te?Q??[]:_e,[te,Q,_e]),[Ge,wt]=e.useState({text:"",id:0}),de=e.useCallback(o=>wt(s=>({text:o,id:s.id+1})),[]),qe=e.useRef(null),St=ct(r,qe),ke=e.useRef(null),Me=e.useRef(null),ue=e.useRef(!1),Ce=e.useRef(!1),ge=e.useRef(void 0),Ne=e.useRef(null),Ye=me(Z).join(","),Oe=me(k).join(","),He=e.useMemo(()=>me(Ye),[Ye]),Et=e.useMemo(()=>Oe?me(Oe):He,[Oe,He]),Xe={value:W,attachments:le,accepts:He,pasteAccepts:Et,multiple:D,maxAttachments:_,maxFileSize:G,disabled:R,readOnly:E,expandOn:y,isValueControlled:v,isOpenControlled:q,isAttachmentsControlled:te,onValueChange:u,onOpenChange:C,onAttachmentsChange:z,onAttachmentReject:Se,onSubmit:B},x=e.useRef(Xe);x.current=Xe;let Ie=e.useRef(null),$=e.useCallback(()=>Ie.current??x.current.attachments,[]),ae=e.useCallback(o=>{x.current.isOpenControlled||ce(o),x.current.onOpenChange?.(o)},[]),ve=e.useCallback(o=>{x.current.isValueControlled||ie(o),x.current.onValueChange?.(o)},[]),ne=e.useCallback(o=>{Ie.current=o,queueMicrotask(()=>{Ie.current=null}),x.current.isAttachmentsControlled||At(o),x.current.onAttachmentsChange?.(o)},[]),ye=e.useRef(new Set),oe=e.useCallback((o,s,m=x.current.multiple)=>{let p=x.current;if(p.disabled||p.readOnly||o.length===0)return 0;let K=$(),Y=[],re=[],It=typeof p.maxAttachments=="number"?Math.max(p.maxAttachments-K.length,0):1/0,Ft=m?1/0:1;for(let L of o){if(Y.length>=It||Y.length>=Ft){re.push({file:L,reason:"count"});continue}if(typeof p.maxFileSize=="number"&&L.size>p.maxFileSize){re.push({file:L,reason:"size"});continue}if(!Wt(L,s)){re.push({file:L,reason:"type"});continue}let ze=dt(L.name,L.type)?URL.createObjectURL(L):void 0;ze&&ye.current.add(ze),Y.push({id:Ut(),name:L.name,size:L.size,type:L.type,file:L,url:ze,status:"idle"})}let Ae=[];return Y.length>0&&(ne(K.concat(Y)),p.expandOn!=="none"&&ae(!0),Ae.push(`${it(Y.length,"file")} attached.`)),re.length>0&&(p.onAttachmentReject?.(re),Ae.push(`${it(re.length,"file")} could not be attached.`)),Ae.length>0&&de(Ae.join(" ")),Y.length},[$,ne,ae,de]),xe=e.useCallback(o=>oe(o,x.current.accepts),[oe]),Je=e.useCallback(o=>oe(o,x.current.pasteAccepts),[oe]),Qe=e.useCallback(o=>{let s=$(),m=s.find(p=>p.id===o);m&&(ne(s.filter(p=>p.id!==o)),de(`Removed ${m.name}.`))},[$,ne,de]),Ze=e.useCallback(o=>{let s=x.current;if(s.disabled||s.readOnly)return!1;let m=$();if(!$e(s.value)&&m.length===0)return!1;let p={value:s.value,attachments:m};if(o&&s.onSubmit)for(let K of m)K.url&&ye.current.delete(K.url);return s.onSubmit?.(p),o&&(ve(""),ne([])),!0},[$,ve,ne]);e.useEffect(()=>{let o=ye.current;if(o.size===0)return;let s=new Set(le.map(m=>m.url));for(let m of Array.from(o))s.has(m)||(URL.revokeObjectURL(m),o.delete(m))},[le]),e.useEffect(()=>{let o=ye.current;return()=>{if(!x.current.isAttachmentsControlled){for(let s of Array.from(o))URL.revokeObjectURL(s);o.clear()}}},[]);let Pe=e.useCallback(o=>{let s=x.current,m=Me.current;if(clearTimeout(ge.current),Ce.current=!1,!m||s.disabled||s.readOnly)return;let p=o?.accept!=null?me(o.accept):s.accepts,K=o?.multiple??s.multiple;Ne.current={patterns:p,multiple:K},m.accept=p.join(","),m.multiple=K,ue.current=!0,m.click(),setTimeout(()=>{document.hasFocus()&&(ue.current=!1)},1e3)},[]),et=e.useCallback(()=>{Ce.current=!0,clearTimeout(ge.current),ge.current=setTimeout(()=>{Ce.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ge.current),[]),e.useEffect(()=>{let o=Me.current,s=()=>{ue.current=!1};return window.addEventListener("focus",s),o?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),o?.removeEventListener("cancel",s)}},[]);let Tt=e.useCallback(o=>{let s=o.currentTarget,m=Array.from(s.files??[]),p=Ne.current;oe(m,p?.patterns??x.current.accepts,p?.multiple),ue.current=!1,Ne.current=null,s.value=""},[oe]),Lt=e.useCallback(o=>{fe?.(o);let s=x.current,m=qe.current;if(!m||s.expandOn==="none")return;let p=o.relatedTarget;p&&m.contains(p)||ue.current||Ce.current||!$e(s.value)&&$().length===0&&ae(!1)},[fe,ae,$]),kt=e.useCallback(o=>{xe(o)},[xe]),{getRootProps:Mt,isDragActive:Nt}=Vt({onDrop:kt,onDragEnter:()=>de(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!se||R||E}),Fe=se&&Nt;e.useImperativeHandle(Ee,()=>({focusTextarea:()=>ke.current?.focus({preventScroll:!0}),openFilePicker:()=>Pe()}),[Pe]);let Ot=e.useCallback(o=>{if(R||o.pointerType==="mouse"&&o.button!==0)return;let s=o.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(o.preventDefault(),ke.current?.focus({preventScroll:!0}))},[R]),Ht=e.useMemo(()=>({open:ee,setOpen:ae,setValue:ve,size:A,expandOn:y,minLines:g,maxLines:w,sendMode:I,disabled:R,readOnly:E,paste:V,clearOnSubmit:O,multiple:D,textareaRef:ke,attachments:le,removeAttachment:Qe,submit:Ze,appendFiles:xe,appendFilesFromPaste:Je,openFilePicker:Pe,beginFilePickerPress:et}),[ee,ae,ve,A,y,g,w,I,R,E,V,O,D,le,Qe,Ze,xe,Je,Pe,et]);return e.createElement(lt.Provider,{value:Ht},e.createElement(Ke.Provider,{value:W},e.createElement(Dt,{features:jt},e.createElement(Bt,{reducedMotion:"user"},e.createElement("div",{...Te,ref:St,className:T("rt-ChatbarRoot",`rt-r-size-${A}`,n),style:{position:"relative",width:J,maxWidth:j,...i},"data-state":ee?"open":"closed","data-disabled":R?"":void 0,"data-readonly":E?"":void 0,"data-drop-active":Fe?"":void 0,"data-accent-color":M,"data-radius":N,"data-panel-background":t,"data-material":t,onBlurCapture:Lt},e.createElement("input",{ref:Me,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:Tt}),be?e.createElement("div",{className:"rt-ChatbarNotices"},e.createElement(rt.Provider,{value:A},be)):null,e.createElement("div",{...se?Mt():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Ot},e.createElement(pe.div,{className:T("rt-ChatbarBox",`rt-variant-${tt(F??"raised")}`),style:{position:"relative"},"data-accent-color":M,"data-radius":N,"data-panel-background":t,"data-material":t,layout:!0,transition:he},e.createElement(pe.div,{className:"rt-ChatbarGrid",layout:"position",transition:he},c),Fe&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(we,{emphasis:"medium",size:A,weight:"medium"},"Drop files here to attach"))))),Re?e.createElement(we,{as:"div",size:A==="3"?"2":"1",emphasis:"medium",className:"rt-ChatbarContext"},Re):null,e.createElement(je,{role:"status","aria-live":"polite"},Fe?"Drop files here to attach.":e.createElement("span",{key:Ge.id},Ge.text)))))))});ut.displayName="Chatbar.Root";var mt=e.forwardRef((a,r)=>{let{className:n,style:i,asChild:c,onFocus:l,onChange:d,onPaste:u,onKeyDown:f,onCompositionStart:b,onCompositionEnd:C,submitOnEnter:y=!1,...g}=a,w=H(),I=e.useContext(Ke),{open:R,minLines:E,maxLines:B,expandOn:A,disabled:F,readOnly:M,setOpen:N,setValue:X,textareaRef:h,paste:J,appendFilesFromPaste:j,size:Q,submit:P,clearOnSubmit:z}=w,Z=ct(r,h),D=e.useRef(0),_=e.useRef(0),G=e.useRef(!1),V=e.useRef({open:R,minLines:E,maxLines:B});We(()=>{V.current={open:R,minLines:E,maxLines:B}},[R,E,B]);let k=e.useCallback(()=>{let t=h.current;if(!t)return;let v=window.getComputedStyle(t);D.current=parseFloat(v.lineHeight)||20,_.current=(parseFloat(v.paddingTop)||0)+(parseFloat(v.paddingBottom)||0)},[h]),O=e.useCallback((t,v)=>{let{minLines:S,maxLines:ie}=V.current,W=D.current,q=_.current,Le=Math.ceil((v?S:1)*W)+q,ce=Math.ceil((v?ie:1)*W)+q,ee=Math.max(t.scrollHeight,Le);t.style.height=`${Math.min(ee,ce)}px`;let te=ee>ce;t.style.overflowY=te?"auto":"hidden",t.style.maxHeight=te?`${ce}px`:"none"},[]);We(()=>{k()},[k,Q]),We(()=>{let t=h.current;t&&(D.current===0&&k(),st(t,()=>{t.style.height="auto";let v=R;if(!R&&(A==="overflow"||A==="both")){let S=Math.ceil(D.current)+_.current;t.scrollHeight>S+1&&(v=!0,N(!0))}O(t,v)}))},[I,R,A,E,B,Q,N,h,k,O]),e.useEffect(()=>{let t=h.current;if(!t||typeof ResizeObserver>"u")return;let v=-1,S=new ResizeObserver(ie=>{let W=ie[0]?.contentRect.width??0;if(W===v)return;let q=v===-1;v=W,!q&&(k(),st(t,()=>{t.style.height="auto",O(t,V.current.open)}))});return S.observe(t),()=>S.disconnect()},[h,k,O]),e.useEffect(()=>{},[]);let Se=e.useCallback(t=>{l?.(t),!(F||M)&&(A==="focus"||A==="both")&&!R&&N(!0)},[F,M,A,R,N,l]),se=e.useCallback(t=>{X(t.currentTarget.value),d?.(t)},[X,d]),Ee=e.useCallback(t=>{if(u?.(t),t.defaultPrevented||!J||F||M)return;let v=Array.from(t.clipboardData?.items??[]).filter(S=>S.kind==="file").map(S=>S.getAsFile()).filter(S=>!!S);v.length!==0&&j(v)>0&&t.preventDefault()},[J,F,M,u,j]),fe=e.useCallback(t=>{G.current=!0,b?.(t)},[b]),be=e.useCallback(t=>{G.current=!1,C?.(t)},[C]),Re=e.useCallback(t=>{f?.(t),!(t.defaultPrevented||!y)&&(t.key!=="Enter"||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey||G.current||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||(t.preventDefault(),P(z)))},[y,f,P,z]),Te=c?U:"textarea";return e.createElement(pe.div,{className:T("rt-ChatbarField","rt-ChatbarTextarea",n),layout:"position",transition:he},e.createElement(Te,{...g,ref:Z,className:"rt-ChatbarInput",value:I,onChange:se,onFocus:Se,onPaste:Ee,onKeyDown:Re,onCompositionStart:fe,onCompositionEnd:be,disabled:F,readOnly:M,rows:R?E:1,spellCheck:g.spellCheck??!0,autoCorrect:g.autoCorrect??"on",style:i}))});mt.displayName="Chatbar.Textarea";var pt=e.forwardRef((a,r)=>{let{children:n,asChild:i,className:c,...l}=a;return H().open?null:e.createElement(i?U:"div",{...l,ref:r,className:T("rt-ChatbarInlineStart",c)},n)});pt.displayName="Chatbar.InlineStart";var ht=e.forwardRef((a,r)=>{let{children:n,asChild:i,className:c,...l}=a;return H().open?null:e.createElement(i?U:"div",{...l,ref:r,className:T("rt-ChatbarInlineEnd",c)},n)});ht.displayName="Chatbar.InlineEnd";var ft=e.forwardRef((a,r)=>{let{asChild:n,forceMount:i,renderAttachment:c,className:l,children:d,...u}=a,f=H(),b=e.Children.toArray(d).length>0;if(f.attachments.length===0&&!b&&!i)return null;let C=n?U:"div";return e.createElement(pe.div,{layout:"position",transition:he},e.createElement(C,{...u,ref:r,className:T("rt-ChatbarAttachmentsRow",l),role:"list","aria-label":u["aria-label"]??"Attachments"},e.createElement(at,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(De,{align:"center",gap:"2",minWidth:"fit-content"},f.attachments.map(y=>e.createElement(Ue,{key:y.id,attachment:y,asChild:!!c},c?.(y))),d))))});ft.displayName="Chatbar.AttachmentsRow";function bt(a,r){let n=a.closest('[role="listitem"]'),i=n?.parentElement?Array.from(n.parentElement.children):[],c=n?i.indexOf(n):-1,d=(i[c+1]??i[c-1])?.querySelector(".rt-ChatbarItemRemove");d?d.focus():r.current?.focus({preventScroll:!0})}var Rt=({lead:a,leadKind:r,label:n,detail:i,removeLabel:c,onRemove:l})=>{let d=H();return e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-ChatbarItemLead","data-kind":r,"aria-hidden":!0},a),e.createElement(we,{className:"rt-ChatbarItemLabel",size:d.size,truncate:!0},n,i?e.createElement(je,null,", ",i):null),l&&e.createElement(Ve,{className:"rt-ChatbarItemRemove","aria-label":c,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(nt,null)))},_t={uploading:"uploading",error:"failed to upload"},Ue=e.forwardRef((a,r)=>{let{attachment:n,asChild:i,className:c,children:l,...d}=a,u=H(),f=i?U:"div",b=!!n.url&&dt(n.name,n.type),C=`${Math.ceil(n.size/1024)} KB`,y=n.status?_t[n.status]:void 0,g=u.disabled||u.readOnly,w=R=>{bt(R.currentTarget,u.textareaRef),u.removeAttachment(n.id)},I=n.status==="uploading"?e.createElement(Be,{size:"1"}):b?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:n.url,alt:""}):e.createElement(ot,null);return e.createElement(f,{...d,ref:r,className:T(l?"rt-ChatbarAttachment":"rt-ChatbarAttachment rt-ChatbarItem",c),role:"listitem","data-kind":b?"image":"file","data-status":n.status,title:n.name},l??e.createElement(Rt,{lead:I,leadKind:b&&n.status!=="uploading"?"image":"icon",label:n.name,detail:y?`${C}, ${y}`:C,removeLabel:`Remove ${n.name}`,onRemove:g?void 0:w}))});Ue.displayName="Chatbar.Attachment";var Ct=e.forwardRef((a,r)=>{let{children:n,icon:i,image:c,color:l,onRemove:d,removeLabel:u,className:f,...b}=a,C=H(),y=C.disabled||C.readOnly,g=d?w=>{bt(w.currentTarget,C.textareaRef),d()}:void 0;return e.createElement("div",{...b,ref:r,className:T("rt-ChatbarItem",f),role:"listitem","data-accent-color":c?void 0:l??"gray",title:n},e.createElement(Rt,{lead:c?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:c,alt:""}):i,leadKind:c?"image":"icon",label:n,removeLabel:u??`Remove ${n}`,onRemove:y?void 0:g}))});Ct.displayName="Chatbar.Item";var gt=e.forwardRef((a,r)=>{let{asChild:n,accept:i,multiple:c,disabled:l,onPointerDown:d,onClick:u,...f}=a,b=H(),C=l||b.disabled||b.readOnly;return e.createElement(n?U:"button",{...f,ref:r,className:T("rt-ChatbarAttachTrigger",f.className),type:f.type??"button","aria-label":f["aria-label"]??"Add attachments",disabled:C,onPointerDown:g=>{d?.(g),!C&&!g.defaultPrevented&&b.beginFilePickerPress()},onClick:g=>{u?.(g),!(C||g.defaultPrevented)&&b.openFilePicker({accept:i,multiple:c})}})});gt.displayName="Chatbar.AttachTrigger";var vt=e.forwardRef((a,r)=>{let{asChild:n,children:i,className:c,...l}=a;if(!H().open)return null;let u=n?U:"div";return e.createElement(pe.div,{layout:"position",transition:he},e.createElement(u,{...l,ref:r,className:T("rt-ChatbarRow",c)},e.createElement(De,{align:"center",justify:"between",width:"100%"},i)))});vt.displayName="Chatbar.Row";var yt=e.forwardRef((a,r)=>{let{className:n,...i}=a;return e.createElement("div",{...i,ref:r,className:T("rt-ChatbarRowStart",n)})});yt.displayName="Chatbar.RowStart";var xt=e.forwardRef((a,r)=>{let{className:n,...i}=a;return e.createElement("div",{...i,ref:r,className:T("rt-ChatbarRowEnd",n)})});xt.displayName="Chatbar.RowEnd";var Pt=e.forwardRef((a,r)=>{let{asChild:n,clearOnSend:i,disabled:c,children:l,style:d,className:u,size:f,variant:b,emphasis:C,tabIndex:y,onClick:g,status:w="ready",onStop:I,onRetry:R,stopLabel:E="Stop",retryLabel:B="Retry",stopIcon:A,retryIcon:F,"aria-label":M,"aria-labelledby":N,...X}=a,h=H(),J=e.useContext(Ke),j=$e(J)||h.attachments.length>0,P=j?"send":w==="submitted"||w==="streaming"?"stop":w==="error"?"retry":"send";if(h.sendMode==="never"&&P==="send")return null;let z=P!=="send"||h.sendMode==="always"||j,Z=P==="send"?c||h.disabled||h.readOnly||!j:c||h.disabled,_=P==="stop"?{"aria-label":E}:P==="retry"?{"aria-label":B}:N?{"aria-labelledby":N}:{"aria-label":M??"Send"},G=k=>{if(g?.(k),k.defaultPrevented||Z)return;if(P==="stop"){I?.();return}if(P==="retry"){R?.();return}let O=i??h.clearOnSubmit;h.submit(O)&&O&&h.textareaRef.current?.focus({preventScroll:!0})},V=P==="stop"?A??(w==="submitted"?e.createElement(Be,{size:h.size}):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):P==="retry"?F??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(Ve,{...X,ref:r,size:f??h.size,...C?{emphasis:C}:{variant:b??(h.open||P!=="send"?"solid":"ghost")},disabled:Z,className:T("rt-ChatbarSend",u),style:{opacity:z?1:0,pointerEvents:z?void 0:"none",...d},"aria-hidden":z?void 0:!0,tabIndex:z?y:-1,asChild:n,onClick:G,"data-status":w,"data-mode":P,..._},V)});Pt.displayName="Chatbar.Send";export{ut as a,mt as b,pt as c,ht as d,ft as e,Ue as f,Ct as g,gt as h,vt as i,yt as j,xt as k,Pt as l,Gt as m};
2
+ //# sourceMappingURL=chunk-ARDKQL7Q.js.map
@@ -1,4 +1,4 @@
1
- import{a as Q}from"./chunk-IBF5U4QW.js";import{a as X,b as q,c as J}from"./chunk-3TIO3EMN.js";import{a as U}from"./chunk-T7Q6DQRD.js";import{a as w}from"./chunk-C7UXUTUF.js";import{a as T}from"./chunk-EUSMN3K7.js";import{a as W}from"./chunk-6SVNBGZ6.js";import{a as R}from"./chunk-HIBX2EXV.js";import{a as j}from"./chunk-ERNM3KVF.js";import{a as F}from"./chunk-HFVD7W6R.js";import{a as v}from"./chunk-KJTEZVOF.js";import{b as V,c as x}from"./chunk-FISGGGPC.js";import{a as O}from"./chunk-F22ZRNWL.js";import{a as s}from"./chunk-7YIQV7VO.js";import{a as D}from"./chunk-GONBMSRL.js";import{a as i}from"./chunk-PXUQEA77.js";import{a as G}from"./chunk-IPHKKZYE.js";import*as e from"react";import{useCallbackRef as ie}from"radix-ui/internal";import{flushSync as re}from"react-dom";var Y=`
1
+ import{a as Q}from"./chunk-IBF5U4QW.js";import{a as X,b as q,c as J}from"./chunk-3TIO3EMN.js";import{a as U}from"./chunk-ADFUYK3U.js";import{a as w}from"./chunk-C7UXUTUF.js";import{a as T}from"./chunk-EUSMN3K7.js";import{a as W}from"./chunk-BXX2NVQD.js";import{a as R}from"./chunk-HIBX2EXV.js";import{a as j}from"./chunk-ERNM3KVF.js";import{a as F}from"./chunk-HFVD7W6R.js";import{a as v}from"./chunk-KJTEZVOF.js";import{b as V,c as x}from"./chunk-FISGGGPC.js";import{a as O}from"./chunk-F22ZRNWL.js";import{a as s}from"./chunk-7YIQV7VO.js";import{a as D}from"./chunk-GONBMSRL.js";import{a as i}from"./chunk-PXUQEA77.js";import{a as G}from"./chunk-IPHKKZYE.js";import*as e from"react";import{useCallbackRef as ie}from"radix-ui/internal";import{flushSync as re}from"react-dom";var Y=`
2
2
  [contenteditable],
3
3
  [role="combobox"],
4
4
  [role="listbox"],
@@ -7,4 +7,4 @@ import{a as Q}from"./chunk-IBF5U4QW.js";import{a as X,b as q,c as J}from"./chunk
7
7
  select,
8
8
  textarea
9
9
  `,se=e.forwardRef(({defaultOpen:n=!0,...o},r)=>{let[u,d]=e.useState(n),h=e.useRef(null),l=e.useRef(null);return e.useEffect(()=>{function C(c){let k=c.altKey||c.ctrlKey||c.shiftKey||c.metaKey,g=document.activeElement?.closest(Y);if(c.key?.toUpperCase()==="T"&&!k&&!g){let f=!1;re(()=>{d(H=>(f=!H,f))}),f?(l.current=document.activeElement,h.current?.focus()):l.current?.focus()}}return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[]),e.createElement(_,{...o,ref:r,triggerRef:h,open:u,shortcut:e.createElement(R,{content:"Press T to show/hide the Theme Panel",side:"bottom",sideOffset:6},e.createElement(G,{asChild:!0,size:"3",tabIndex:0,className:"rt-ThemePanelShortcut"},e.createElement("button",{type:"button",onClick:()=>d(C=>!C),ref:h,"aria-label":"Toggle the Theme Panel"},"T")))})});se.displayName="ThemePanel";var _=e.forwardRef((n,o)=>{let{open:r,onAppearanceChange:u,shortcut:d,triggerRef:h,...l}=n,C=V();return e.createElement(x,{asChild:!0,radius:"medium",scaling:"100%"},e.createElement(i,{direction:"column",position:"fixed",top:"0",right:"0",mr:{initial:"2",sm:"4"},mt:{initial:"2",sm:"4"},width:{initial:"360px"},maxHeight:{initial:"calc(100svh - var(--space-2) - var(--space-2))",sm:"calc(100svh - var(--space-4) - var(--space-4))"},maxWidth:{initial:"calc(100svw - var(--space-2) - var(--space-2))",sm:"calc(100svw - var(--space-4) - var(--space-4))"},inert:r?void 0:Q,...l,ref:o,style:{zIndex:999999999,overflow:"hidden",borderRadius:"var(--radius-4)",backgroundColor:"var(--color-panel-solid)",transformOrigin:"top center",transitionProperty:"transform, box-shadow",transitionDuration:"200ms",transitionTimingFunction:r?"ease-out":"ease-in",transform:r?"none":"translateX(105%)",boxShadow:r?"var(--shadow-5)":"var(--shadow-2)",...n.style}},e.createElement(D,null,e.createElement(T,{flexGrow:"1",p:{initial:"4",xs:"5"},position:"relative"},!!d&&e.createElement(T,{position:"absolute",top:"0",right:"0",m:"2"},d),e.createElement(ee,{onAppearanceChange:u,context:C})))))});_.displayName="ThemePanelImpl";var ee=e.forwardRef((n,o)=>{let{onAppearanceChange:r,context:u,...d}=n,h=V(),{appearance:l,onAppearanceChange:C,accentColor:c,onAccentColorChange:k,grayColor:g,onGrayColorChange:K,panelBackground:f,onPanelBackgroundChange:H,radius:M,onRadiusChange:te,scaling:Z,onScalingChange:ae}=u??h,[E,S]=e.useState(l==="inherit"?null:l),N=r!==void 0,$=ie(r),A=e.useCallback(t=>{let a=ce();if(l!=="inherit"){C(t);return}N?$(t):(S(t),de(t)),a()},[l,C,N,$]),I=O(c),z=g==="auto"?I:g,[ne,B]=e.useState("idle");async function oe(){let t={appearance:l===s.appearance.default?void 0:l,accentColor:c===s.accentColor.default?void 0:c,grayColor:g===s.grayColor.default?void 0:g,panelBackground:f===s.panelBackground.default?void 0:f,radius:M===s.radius.default?void 0:M,scaling:Z===s.scaling.default?void 0:Z},a=Object.keys(t).filter(p=>t[p]!==void 0).map(p=>`${p}="${t[p]}"`).join(" "),y=a?`<Theme ${a}>`:"<Theme>";B("copying"),await navigator.clipboard.writeText(y),B("copied"),setTimeout(()=>B("idle"),2e3)}return e.useEffect(()=>{function t(a){let y=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey,p=document.activeElement?.closest(Y);a.key?.toUpperCase()==="D"&&!y&&!p&&A(E==="light"?"dark":"light")}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[A,E]),e.useEffect(()=>{let t=document.documentElement,a=document.body;function y(){let L=t.classList.contains("dark")||t.classList.contains("dark-theme")||a.classList.contains("dark")||a.classList.contains("dark-theme");S(l==="inherit"?L?"dark":"light":l)}let p=new MutationObserver(function(L){L.forEach(function(le){le.attributeName==="class"&&y()})});return y(),l==="inherit"&&(p.observe(t,{attributes:!0}),p.observe(a,{attributes:!0})),()=>p.disconnect()},[l]),e.createElement(i,{direction:"column",gap:"5",...d,ref:o},e.createElement(F,{size:{initial:"3",sm:"5"},trim:"both",as:"h2"},"Theme"),e.createElement(i,{direction:"column",gap:"5"},e.createElement(P,null,e.createElement(b,{id:"accent-color-title"},"Accent color"),e.createElement(i,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"accent-color-title"},s.accentColor.values.map(t=>e.createElement(T,{asChild:!0,key:t},e.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":m(t),style:{backgroundColor:`var(--${t}-9)`}},e.createElement(R,{content:`${m(t)}${c==="gray"&&z!=="gray"?` (${m(z)})`:""}`},e.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"accentColor",value:t,checked:c===t,onChange:a=>k(a.target.value)}))))))),e.createElement(P,null,e.createElement(b,{id:"gray-color-title"},"Gray color"),e.createElement(i,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"gray-color-title"},s.grayColor.values.map(t=>e.createElement(i,{key:t,asChild:!0,align:"center",justify:"center"},e.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":m(t),style:{backgroundColor:t==="auto"?`var(--${I}-9)`:t==="gray"?"var(--gray-9)":`var(--${t}-9)`,filter:t==="gray"?"saturate(0)":void 0}},e.createElement(R,{content:`${m(t)}${t==="auto"?` (${m(I)})`:""}`},e.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"grayColor",value:t,checked:g===t,onChange:a=>K(a.target.value)}))))))),e.createElement(P,null,e.createElement(b,{id:"appearance-title"},"Appearance"),e.createElement(w,{columns:"2",gap:"2",role:"group","aria-labelledby":"appearance-title"},["light","dark"].map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"appearance",value:t,checked:E===t,onChange:a=>A(a.target.value)}),e.createElement(i,{align:"center",justify:"center",height:"32px",gap:"2"},t==="light"?e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},e.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},e.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),e.createElement(v,{size:"1",weight:"medium"},m(t))))))),e.createElement(P,null,e.createElement(b,{id:"radius-title"},"Radius"),e.createElement(i,{gap:"2",role:"group","aria-labelledby":"radius-title",wrap:"wrap"},s.radius.values.map(t=>e.createElement(i,{key:t,direction:"column",align:"center"},e.createElement("label",{className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"radius",id:`theme-panel-radius-${t}`,value:t,checked:M===t,onChange:a=>te(a.target.value)}),e.createElement(x,{asChild:!0,radius:t},e.createElement(T,{m:"3",width:{initial:"24px",sm:"32px"},height:{initial:"24px",sm:"32px"},style:{borderTopLeftRadius:t==="full"?"80%":"var(--radius-5)",backgroundImage:"linear-gradient(to bottom right, var(--accent-3), var(--accent-4))",borderTop:"2px solid var(--accent-a8)",borderLeft:"2px solid var(--accent-a8)"}}))),e.createElement(T,{asChild:!0,pt:"2"},e.createElement(v,{asChild:!0,size:"1",emphasis:"medium"},e.createElement("label",{htmlFor:`theme-panel-radius-${t}`},m(t)))))))),e.createElement(P,null,e.createElement(b,{id:"scaling-title"},"Scaling"),e.createElement(w,{columns:{initial:"repeat(3, 1fr)",sm:"5"},gap:"2",role:"group","aria-labelledby":"scaling-title"},s.scaling.values.map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard","aria-label":`Scaling ${t}`},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"scaling",value:t,checked:Z===t,onChange:a=>ae(a.target.value)}),e.createElement(i,{align:"center",justify:"center",height:"32px"},e.createElement(x,{asChild:!0,scaling:t},e.createElement(i,{align:"center",justify:"center"},e.createElement(v,{size:"1",weight:"medium"},m(t))))))))),e.createElement(P,null,e.createElement(i,{align:"center",gap:"2"},e.createElement(b,{id:"panel-background-title"},"Panel background"),e.createElement(X,null,e.createElement(q,null,e.createElement(U,{size:"1",variant:"ghost",color:"gray"},e.createElement(j,{label:"Learn more about panel background options"},e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fillRule:"evenodd",clipRule:"evenodd"}))))),e.createElement(J,{size:"1",width:"220px",maxWidth:"90svw",minWidth:"0",side:"top",align:"center"},e.createElement(v,{as:"p",size:"1"},"Whether Card and Table panels are translucent, showing some of the background behind them.")))),e.createElement(w,{columns:{initial:"1",sm:"2"},rows:{initial:"2",sm:"1"},gap:"2",role:"group","aria-labelledby":"panel-background-title"},s.panelBackground.values.map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"panelBackground",value:t,checked:f===t,onChange:a=>H(a.target.value)}),e.createElement(i,{align:"center",justify:"center",height:"32px",gap:"2"},t==="solid"?e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},e.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},e.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),e.createElement(v,{size:"1",weight:"medium"},m(t)))))))),e.createElement(W,{style:{width:"100%"},onClick:oe},ne==="copied"?"Copied":"Copy Theme"))});ee.displayName="ThemePanelContent";function P(n){return e.createElement(i,{direction:"column",gap:"3",asChild:!0,...n},e.createElement("section",null,n.children))}function b(n){return e.createElement(F,{as:"h3",size:{initial:"1",sm:"2"},...n})}function ce(){let n=document.createElement("style");return n.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}}function m(n){return n.charAt(0).toUpperCase()+n.slice(1)}function de(n){let o=document.documentElement,r=o.classList.contains("light-theme"),u=o.classList.contains("dark-theme"),d=o.classList.contains("light"),h=o.classList.contains("dark");(r||u)&&(o.classList.remove("light-theme","dark-theme"),o.style.colorScheme=n,o.classList.add(`${n}-theme`)),(d||h)&&(o.classList.remove("light","dark"),o.style.colorScheme=n,o.classList.add(n)),!r&&!u&&!d&&!h&&(o.style.colorScheme=n,o.classList.add(n))}export{se as a,ee as b};
10
- //# sourceMappingURL=chunk-F7TOKXKZ.js.map
10
+ //# sourceMappingURL=chunk-BBMENJM3.js.map
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-KRJTW535.js";import{a}from"./chunk-NZJGC6ZW.js";import{a as e}from"./chunk-AVFGMLL4.js";import{d as o}from"./chunk-Z4DTHR2S.js";var t=["1","2","3","4"],r=["raised","solid","soft","surface","outline","ghost","override","classic"],n=["solid","translucent"],l=["solid","translucent"],d={...a,size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"raised",parseValue:e},...o,...s,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:l,default:void 0},panelBackground:{type:"enum",values:n,default:void 0},flush:{type:"boolean",default:!1}};export{d as a};
2
- //# sourceMappingURL=chunk-E7LJHM3S.js.map
1
+ import{b as s}from"./chunk-KRJTW535.js";import{a}from"./chunk-NZJGC6ZW.js";import{a as e}from"./chunk-AVFGMLL4.js";import{d as o}from"./chunk-Z4DTHR2S.js";var t=["1","2","3","4"],r=["raised","solid","soft","surface","outline","ghost","override","classic"],n=["solid","translucent"],l=["solid","translucent"],d={...a,size:{type:"enum",className:"rt-r-size",values:t,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:r,default:"solid",parseValue:e},...o,...s,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:l,default:void 0},panelBackground:{type:"enum",values:n,default:void 0},flush:{type:"boolean",default:!1}};export{d as a};
2
+ //# sourceMappingURL=chunk-BGVGSALM.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/_internal/base-button.props.ts"],
4
- "sourcesContent": ["import { parseVariant } from '../../helpers/parse-variant.js';\nimport { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - raised: lifted off its ground, with an edge and a shadow (the default)\n * - solid: Primary actions that should be noticed first\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['raised', 'solid', 'soft', 'surface', 'outline', 'ghost', 'override', 'classic'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with translucent material\n * <BaseButton material=\"translucent\">Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'raised', parseValue: parseVariant },\n ...accentColorPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
5
- "mappings": "2JAcA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAW3BC,EAAW,CAAC,SAAU,QAAS,OAAQ,UAAW,UAAW,QAAS,WAAY,SAAS,EAM3FC,EAAmB,CAAC,QAAS,aAAa,EAO1CC,EAAY,CAAC,QAAS,aAAa,EA+BnCC,EAAqB,CACzB,GAAGC,EAKH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQL,EAAO,QAAS,IAAK,WAAY,EAAK,EAI5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,WAAYK,CAAa,EAChH,GAAGC,EACH,GAAGC,EAKH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EAKpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,EAKzE,SAAU,CAAE,KAAM,OAAQ,OAAQL,EAAW,QAAS,MAAU,EAKhE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,MAAU,EAK9E,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
4
+ "sourcesContent": ["import { parseVariant } from '../../helpers/parse-variant.js';\nimport { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - raised: lifted off its ground, with an edge and a shadow\n * - solid: Primary actions that should be noticed first (the default)\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['raised', 'solid', 'soft', 'surface', 'outline', 'ghost', 'override', 'classic'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with translucent material\n * <BaseButton material=\"translucent\">Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid', parseValue: parseVariant },\n ...accentColorPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n"],
5
+ "mappings": "2JAcA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAW3BC,EAAW,CAAC,SAAU,QAAS,OAAQ,UAAW,UAAW,QAAS,WAAY,SAAS,EAM3FC,EAAmB,CAAC,QAAS,aAAa,EAO1CC,EAAY,CAAC,QAAS,aAAa,EA+BnCC,EAAqB,CACzB,GAAGC,EAKH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQL,EAAO,QAAS,IAAK,WAAY,EAAK,EAI5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,QAAS,WAAYK,CAAa,EAC/G,GAAGC,EACH,GAAGC,EAKH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EAKpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,EAKzE,SAAU,CAAE,KAAM,OAAQ,OAAQL,EAAW,QAAS,MAAU,EAKhE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,MAAU,EAK9E,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
6
6
  "names": ["sizes", "variants", "panelBackgrounds", "materials", "baseButtonPropDefs", "asChildPropDef", "parseVariant", "accentColorPropDef", "radiusPropDef"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-77TGP2LO.js";import{z as o}from"zod";var t=s.extend({pressed:o.boolean().optional().describe("Controlled pressed state"),onPressedChange:o.function().optional().describe("Callback when pressed state changes"),defaultPressed:o.boolean().optional().describe("Default pressed state for uncontrolled usage")}).refine(e=>!(e.pressed!==void 0&&e.onPressedChange===void 0),{message:"When using controlled mode (pressed prop), onPressedChange must also be provided",path:["onPressedChange"]}).refine(e=>!(e.pressed!==void 0&&e.defaultPressed!==void 0),{message:"Cannot use both controlled (pressed) and uncontrolled (defaultPressed) props together",path:["pressed","defaultPressed"]});function d(e){return e}export{t as a,d as b};
2
- //# sourceMappingURL=chunk-T6Z4JUH6.js.map
1
+ import{a as s}from"./chunk-QXEQ2C6A.js";import{z as o}from"zod";var t=s.extend({pressed:o.boolean().optional().describe("Controlled pressed state"),onPressedChange:o.function().optional().describe("Callback when pressed state changes"),defaultPressed:o.boolean().optional().describe("Default pressed state for uncontrolled usage")}).refine(e=>!(e.pressed!==void 0&&e.onPressedChange===void 0),{message:"When using controlled mode (pressed prop), onPressedChange must also be provided",path:["onPressedChange"]}).refine(e=>!(e.pressed!==void 0&&e.defaultPressed!==void 0),{message:"Cannot use both controlled (pressed) and uncontrolled (defaultPressed) props together",path:["pressed","defaultPressed"]});function d(e){return e}export{t as a,d as b};
2
+ //# sourceMappingURL=chunk-BWVYB64R.js.map
@@ -1,5 +1,5 @@
1
- import{a as g}from"./chunk-2N2AQNJH.js";import{a as v}from"./chunk-HIBX2EXV.js";import{a as B}from"./chunk-BKES3M4Y.js";import*as r from"react";import T from"classnames";var N={loud:"solid",medium:"raised",quiet:"ghost"};function $(a){if(a["aria-label"]||a["aria-labelledby"]||a.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
1
+ import{a as g}from"./chunk-2N2AQNJH.js";import{a as v}from"./chunk-HIBX2EXV.js";import{a as B}from"./chunk-UGGAAL4V.js";import*as r from"react";import T from"classnames";var N={loud:"solid",medium:"raised",quiet:"ghost"};function $(a){if(a["aria-label"]||a["aria-labelledby"]||a.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
2
2
  - aria-label prop with descriptive text
3
3
  - aria-labelledby prop referencing a label element
4
4
  - or visible text children`)}var I=r.forwardRef(({className:a,style:s,tooltip:c,tooltipSide:y="top",tooltipAlign:h="center",tooltipDelayDuration:R,tooltipDisableHoverableContent:O,overrideStyles:e,iconOnly:p=!1,emphasis:u,variant:f,...l},P)=>{let{tooltipId:S,hasTooltip:w,accessibilityProps:E}=g(c),d=r.useMemo(()=>{if(!e)return;let m={},o=(n,t)=>{t!==void 0&&(m[n]=t)},i=(n,t)=>{t&&(o(`--button-override-${n}color`,t.color),o(`--button-override-${n}background`,t.background),o(`--button-override-${n}background-color`,t.backgroundColor),o(`--button-override-${n}box-shadow`,t.boxShadow),o(`--button-override-${n}filter`,t.filter),o(`--button-override-${n}outline`,t.outline),o(`--button-override-${n}outline-offset`,t.outlineOffset),o(`--button-override-${n}opacity`,t.opacity))};return i("",e.normal),i("hover-",e.hover),i("active-",e.active),i("pressed-",e.pressed),i("open-",e.open),i("disabled-",e.disabled),e.focus&&(o("--button-override-focus-outline",e.focus.outline),o("--button-override-focus-outline-offset",e.focus.outlineOffset)),m},[e]),C=r.useMemo(()=>d?{...d,...s}:s,[d,s]);if(p&&($(l),l.fullWidth&&void 0),u!==void 0&&f!==void 0)throw new Error("Button: pass `emphasis` or `variant`, not both. They set the same thing.");let k=u!==void 0?N[u]:f,b=r.createElement(B,{...l,variant:k,...E,ref:P,className:T(p?"rt-IconButton":"rt-Button",a),style:C});return w?r.createElement(v,{content:c,side:y,align:h,delayDuration:R,disableHoverableContent:O,id:S},b):b});I.displayName="Button";export{I as a};
5
- //# sourceMappingURL=chunk-6SVNBGZ6.js.map
5
+ //# sourceMappingURL=chunk-BXX2NVQD.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/button.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport { warnDeprecated } from '../helpers/warn-deprecated.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\n/**\n * Styles that can be overridden for a particular interaction state\n */\ninterface ButtonOverrideStateStyles {\n color?: string;\n background?: string;\n backgroundColor?: string;\n boxShadow?: string;\n filter?: string;\n outline?: string;\n outlineOffset?: string;\n opacity?: string | number;\n}\n\n/**\n * Full set of override styles keyed by interaction state\n */\ninterface ButtonOverrideStyles {\n /** Default/idle state styles */\n normal?: ButtonOverrideStateStyles;\n /** Hover state styles */\n hover?: ButtonOverrideStateStyles;\n /** Active (mouse down) state styles */\n active?: ButtonOverrideStateStyles;\n /** Toggle pressed state styles (data-state=\"on\") */\n pressed?: ButtonOverrideStateStyles;\n /** Open state styles (e.g., when used as a trigger) */\n open?: ButtonOverrideStateStyles;\n /** Disabled state styles */\n disabled?: ButtonOverrideStateStyles;\n /** Focus-visible outline styles */\n focus?: Pick<ButtonOverrideStateStyles, 'outline' | 'outlineOffset'>;\n}\n\ntype ButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Tooltip configuration props that can be passed to Button\n * These props are forwarded to the underlying Tooltip component\n */\nexport interface ButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core Button props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with tooltip functionality\n */\ntype ButtonEmphasis = 'loud' | 'medium' | 'quiet';\n\n/** `emphasis` is a button's rank: loud is `solid`, medium is `raised`, quiet is `ghost`. */\nconst EMPHASIS_VARIANT = { loud: 'solid', medium: 'raised', quiet: 'ghost' } as const;\n\n/**\n * A button states its rank with `emphasis` or its look with `variant`, never both.\n */\ntype ButtonRankProps =\n | {\n /** The button's look. `outline` and `surface` have no emphasis of their own. */\n variant?: BaseButtonProps['variant'];\n emphasis?: never;\n }\n | {\n /** The button's rank: `loud` (solid), `medium` (raised, the default) or `quiet` (ghost). */\n emphasis?: ButtonEmphasis;\n variant?: never;\n };\n\ntype ButtonOwnProps = Omit<BaseButtonProps, 'as' | 'variant'> &\n ButtonRankProps &\n ButtonTooltipProps & {\n /**\n * When using variant=\"override\", provide token-based styles per state.\n * We propagate these into CSS variables consumed by the override variant.\n */\n overrideStyles?: ButtonOverrideStyles;\n /**\n * A square button holding only an icon. It needs an accessible name: `aria-label`,\n * `aria-labelledby`, or visible text. `IconButton` is this button with `iconOnly` set.\n */\n iconOnly?: boolean;\n };\n\n/**\n * Polymorphic Button props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;\n\n/**\n * Button component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype ButtonComponent = <C extends React.ElementType = 'button'>(props: ButtonProps<C> & { ref?: React.ForwardedRef<ButtonElement> }) => React.ReactElement | null;\n\n/**\n * An icon-only button must have an accessible name. Throws in development, logs otherwise.\n */\nfunction validateIconButtonName(props: Record<string, unknown>) {\n if (props['aria-label'] || props['aria-labelledby'] || props.children) return;\n const errorMessage =\n 'IconButton: Icon buttons must have an accessible name. Please provide either:' +\n '\\n- aria-label prop with descriptive text' +\n '\\n- aria-labelledby prop referencing a label element' +\n '\\n- or visible text children';\n if (process.env.NODE_ENV === 'development') throw new Error(errorMessage);\n console.error(errorMessage);\n}\n\n/**\n * Button component for triggering actions throughout your interface\n *\n * The Button component is the primary interactive element in the Kookie User Interface.\n * It provides six visual variants, four sizes, comprehensive color options, and built-in\n * tooltip support. The component automatically handles icon sizing, supports responsive\n * layouts, and provides accessibility compliance out of the box.\n *\n * @example\n * ```tsx\n * // Basic button\n * <Button>Click me</Button>\n *\n * // Button with variant and size\n * <Button variant=\"solid\" size=\"3\">Primary Action</Button>\n *\n * // Button with tooltip\n * <Button tooltip=\"Save your progress\">Save</Button>\n *\n * // Polymorphic button as link\n * <Button as=\"a\" href=\"/dashboard\">Go to Dashboard</Button>\n * ```\n */\nconst Button = React.forwardRef(\n (\n {\n className,\n style,\n tooltip,\n tooltipSide = 'top',\n tooltipAlign = 'center',\n tooltipDelayDuration,\n tooltipDisableHoverableContent,\n overrideStyles,\n iconOnly = false,\n emphasis,\n variant,\n ...props\n }: ButtonProps,\n forwardedRef: React.ForwardedRef<ButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // Create the base button element with tooltip accessibility props\n // Map overrideStyles to CSS variables consumed by the override variant rules\n const overrideVars = React.useMemo(() => {\n if (!overrideStyles) return undefined;\n const vars: Record<string, string | number> = {};\n const setVar = (key: string, value: string | number | undefined) => {\n if (value !== undefined) vars[key] = value;\n };\n const apply = (prefix: string, s?: ButtonOverrideStateStyles) => {\n if (!s) return;\n setVar(`--button-override-${prefix}color`, s.color);\n setVar(`--button-override-${prefix}background`, s.background);\n setVar(`--button-override-${prefix}background-color`, s.backgroundColor);\n setVar(`--button-override-${prefix}box-shadow`, s.boxShadow);\n setVar(`--button-override-${prefix}filter`, s.filter);\n setVar(`--button-override-${prefix}outline`, s.outline);\n setVar(`--button-override-${prefix}outline-offset`, s.outlineOffset);\n setVar(`--button-override-${prefix}opacity`, s.opacity);\n };\n\n apply('', overrideStyles.normal);\n apply('hover-', overrideStyles.hover);\n apply('active-', overrideStyles.active);\n apply('pressed-', overrideStyles.pressed);\n apply('open-', overrideStyles.open);\n apply('disabled-', overrideStyles.disabled);\n\n if (overrideStyles.focus) {\n setVar('--button-override-focus-outline', overrideStyles.focus.outline);\n setVar('--button-override-focus-outline-offset', overrideStyles.focus.outlineOffset);\n }\n\n return vars as React.CSSProperties;\n }, [overrideStyles]);\n\n // Combine override styles with user-provided styles\n const combinedStyle = React.useMemo(() => (overrideVars ? { ...overrideVars, ...style } : style), [overrideVars, style]);\n\n if (iconOnly) {\n validateIconButtonName(props);\n if (props.fullWidth) {\n warnDeprecated('`fullWidth` on an icon-only button is deprecated and will be removed in 0.15.0. An icon button is square.');\n }\n }\n\n if (emphasis !== undefined && variant !== undefined) {\n throw new Error('Button: pass `emphasis` or `variant`, not both. They set the same thing.');\n }\n const resolvedVariant = emphasis !== undefined ? EMPHASIS_VARIANT[emphasis] : variant;\n\n const button = (\n <BaseButton\n {...props}\n variant={resolvedVariant}\n {...tooltipAccessibilityProps}\n ref={forwardedRef}\n className={classNames(iconOnly ? 'rt-IconButton' : 'rt-Button', className)}\n style={combinedStyle}\n />\n );\n\n // If no tooltip is provided, return the button as-is for better performance\n if (!hasTooltip) {\n return button;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {button}\n </Tooltip>\n );\n },\n) as ButtonComponent & { displayName?: string };\n\nButton.displayName = 'Button';\n\nexport { Button };\nexport type { ButtonProps, ButtonEmphasis, ButtonRankProps, ButtonOverrideStyles, ButtonOverrideStateStyles };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport { warnDeprecated } from '../helpers/warn-deprecated.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\n/**\n * Styles that can be overridden for a particular interaction state\n */\ninterface ButtonOverrideStateStyles {\n color?: string;\n background?: string;\n backgroundColor?: string;\n boxShadow?: string;\n filter?: string;\n outline?: string;\n outlineOffset?: string;\n opacity?: string | number;\n}\n\n/**\n * Full set of override styles keyed by interaction state\n */\ninterface ButtonOverrideStyles {\n /** Default/idle state styles */\n normal?: ButtonOverrideStateStyles;\n /** Hover state styles */\n hover?: ButtonOverrideStateStyles;\n /** Active (mouse down) state styles */\n active?: ButtonOverrideStateStyles;\n /** Toggle pressed state styles (data-state=\"on\") */\n pressed?: ButtonOverrideStateStyles;\n /** Open state styles (e.g., when used as a trigger) */\n open?: ButtonOverrideStateStyles;\n /** Disabled state styles */\n disabled?: ButtonOverrideStateStyles;\n /** Focus-visible outline styles */\n focus?: Pick<ButtonOverrideStateStyles, 'outline' | 'outlineOffset'>;\n}\n\ntype ButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Tooltip configuration props that can be passed to Button\n * These props are forwarded to the underlying Tooltip component\n */\nexport interface ButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core Button props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with tooltip functionality\n */\ntype ButtonEmphasis = 'loud' | 'medium' | 'quiet';\n\n/** `emphasis` is a button's rank: loud is `solid`, medium is `raised`, quiet is `ghost`. */\nconst EMPHASIS_VARIANT = { loud: 'solid', medium: 'raised', quiet: 'ghost' } as const;\n\n/**\n * A button states its rank with `emphasis` or its look with `variant`, never both.\n */\ntype ButtonRankProps =\n | {\n /** The button's look. `outline` and `surface` have no emphasis of their own. */\n variant?: BaseButtonProps['variant'];\n emphasis?: never;\n }\n | {\n /** The button's rank: `loud` (solid, the default), `medium` (raised) or `quiet` (ghost). */\n emphasis?: ButtonEmphasis;\n variant?: never;\n };\n\ntype ButtonOwnProps = Omit<BaseButtonProps, 'as' | 'variant'> &\n ButtonRankProps &\n ButtonTooltipProps & {\n /**\n * When using variant=\"override\", provide token-based styles per state.\n * We propagate these into CSS variables consumed by the override variant.\n */\n overrideStyles?: ButtonOverrideStyles;\n /**\n * A square button holding only an icon. It needs an accessible name: `aria-label`,\n * `aria-labelledby`, or visible text. `IconButton` is this button with `iconOnly` set.\n */\n iconOnly?: boolean;\n };\n\n/**\n * Polymorphic Button props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;\n\n/**\n * Button component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype ButtonComponent = <C extends React.ElementType = 'button'>(props: ButtonProps<C> & { ref?: React.ForwardedRef<ButtonElement> }) => React.ReactElement | null;\n\n/**\n * An icon-only button must have an accessible name. Throws in development, logs otherwise.\n */\nfunction validateIconButtonName(props: Record<string, unknown>) {\n if (props['aria-label'] || props['aria-labelledby'] || props.children) return;\n const errorMessage =\n 'IconButton: Icon buttons must have an accessible name. Please provide either:' +\n '\\n- aria-label prop with descriptive text' +\n '\\n- aria-labelledby prop referencing a label element' +\n '\\n- or visible text children';\n if (process.env.NODE_ENV === 'development') throw new Error(errorMessage);\n console.error(errorMessage);\n}\n\n/**\n * Button component for triggering actions throughout your interface\n *\n * The Button component is the primary interactive element in the Kookie User Interface.\n * It provides six visual variants, four sizes, comprehensive color options, and built-in\n * tooltip support. The component automatically handles icon sizing, supports responsive\n * layouts, and provides accessibility compliance out of the box.\n *\n * @example\n * ```tsx\n * // Basic button\n * <Button>Click me</Button>\n *\n * // Button with variant and size\n * <Button variant=\"solid\" size=\"3\">Primary Action</Button>\n *\n * // Button with tooltip\n * <Button tooltip=\"Save your progress\">Save</Button>\n *\n * // Polymorphic button as link\n * <Button as=\"a\" href=\"/dashboard\">Go to Dashboard</Button>\n * ```\n */\nconst Button = React.forwardRef(\n (\n {\n className,\n style,\n tooltip,\n tooltipSide = 'top',\n tooltipAlign = 'center',\n tooltipDelayDuration,\n tooltipDisableHoverableContent,\n overrideStyles,\n iconOnly = false,\n emphasis,\n variant,\n ...props\n }: ButtonProps,\n forwardedRef: React.ForwardedRef<ButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // Create the base button element with tooltip accessibility props\n // Map overrideStyles to CSS variables consumed by the override variant rules\n const overrideVars = React.useMemo(() => {\n if (!overrideStyles) return undefined;\n const vars: Record<string, string | number> = {};\n const setVar = (key: string, value: string | number | undefined) => {\n if (value !== undefined) vars[key] = value;\n };\n const apply = (prefix: string, s?: ButtonOverrideStateStyles) => {\n if (!s) return;\n setVar(`--button-override-${prefix}color`, s.color);\n setVar(`--button-override-${prefix}background`, s.background);\n setVar(`--button-override-${prefix}background-color`, s.backgroundColor);\n setVar(`--button-override-${prefix}box-shadow`, s.boxShadow);\n setVar(`--button-override-${prefix}filter`, s.filter);\n setVar(`--button-override-${prefix}outline`, s.outline);\n setVar(`--button-override-${prefix}outline-offset`, s.outlineOffset);\n setVar(`--button-override-${prefix}opacity`, s.opacity);\n };\n\n apply('', overrideStyles.normal);\n apply('hover-', overrideStyles.hover);\n apply('active-', overrideStyles.active);\n apply('pressed-', overrideStyles.pressed);\n apply('open-', overrideStyles.open);\n apply('disabled-', overrideStyles.disabled);\n\n if (overrideStyles.focus) {\n setVar('--button-override-focus-outline', overrideStyles.focus.outline);\n setVar('--button-override-focus-outline-offset', overrideStyles.focus.outlineOffset);\n }\n\n return vars as React.CSSProperties;\n }, [overrideStyles]);\n\n // Combine override styles with user-provided styles\n const combinedStyle = React.useMemo(() => (overrideVars ? { ...overrideVars, ...style } : style), [overrideVars, style]);\n\n if (iconOnly) {\n validateIconButtonName(props);\n if (props.fullWidth) {\n warnDeprecated('`fullWidth` on an icon-only button is deprecated and will be removed in 0.15.0. An icon button is square.');\n }\n }\n\n if (emphasis !== undefined && variant !== undefined) {\n throw new Error('Button: pass `emphasis` or `variant`, not both. They set the same thing.');\n }\n const resolvedVariant = emphasis !== undefined ? EMPHASIS_VARIANT[emphasis] : variant;\n\n const button = (\n <BaseButton\n {...props}\n variant={resolvedVariant}\n {...tooltipAccessibilityProps}\n ref={forwardedRef}\n className={classNames(iconOnly ? 'rt-IconButton' : 'rt-Button', className)}\n style={combinedStyle}\n />\n );\n\n // If no tooltip is provided, return the button as-is for better performance\n if (!hasTooltip) {\n return button;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {button}\n </Tooltip>\n );\n },\n) as ButtonComponent & { displayName?: string };\n\nButton.displayName = 'Button';\n\nexport { Button };\nexport type { ButtonProps, ButtonEmphasis, ButtonRankProps, ButtonOverrideStyles, ButtonOverrideStateStyles };\n"],
5
5
  "mappings": "wHAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAoEvB,IAAMC,EAAmB,CAAE,KAAM,QAAS,OAAQ,SAAU,MAAO,OAAQ,EAkD3E,SAASC,EAAuBC,EAAgC,CAC9D,GAAIA,EAAM,YAAY,GAAKA,EAAM,iBAAiB,GAAKA,EAAM,SAAU,OAOvE,QAAQ,MALN;AAAA;AAAA;AAAA,2BAKwB,CAC5B,CAyBA,IAAMC,EAAe,aACnB,CACE,CACE,UAAAC,EACA,MAAAC,EACA,QAAAC,EACA,YAAAC,EAAc,MACd,aAAAC,EAAe,SACf,qBAAAC,EACA,+BAAAC,EACA,eAAAC,EACA,SAAAC,EAAW,GACX,SAAAC,EACA,QAAAC,EACA,GAAGZ,CACL,EACAa,IACG,CAEH,GAAM,CAAE,UAAAC,EAAW,WAAAC,EAAY,mBAAoBC,CAA0B,EAAIC,EAAkBb,CAAO,EAIpGc,EAAqB,UAAQ,IAAM,CACvC,GAAI,CAACT,EAAgB,OACrB,IAAMU,EAAwC,CAAC,EACzCC,EAAS,CAACC,EAAaC,IAAuC,CAC9DA,IAAU,SAAWH,EAAKE,CAAG,EAAIC,EACvC,EACMC,EAAQ,CAACC,EAAgBC,IAAkC,CAC1DA,IACLL,EAAO,qBAAqBI,CAAM,QAASC,EAAE,KAAK,EAClDL,EAAO,qBAAqBI,CAAM,aAAcC,EAAE,UAAU,EAC5DL,EAAO,qBAAqBI,CAAM,mBAAoBC,EAAE,eAAe,EACvEL,EAAO,qBAAqBI,CAAM,aAAcC,EAAE,SAAS,EAC3DL,EAAO,qBAAqBI,CAAM,SAAUC,EAAE,MAAM,EACpDL,EAAO,qBAAqBI,CAAM,UAAWC,EAAE,OAAO,EACtDL,EAAO,qBAAqBI,CAAM,iBAAkBC,EAAE,aAAa,EACnEL,EAAO,qBAAqBI,CAAM,UAAWC,EAAE,OAAO,EACxD,EAEA,OAAAF,EAAM,GAAId,EAAe,MAAM,EAC/Bc,EAAM,SAAUd,EAAe,KAAK,EACpCc,EAAM,UAAWd,EAAe,MAAM,EACtCc,EAAM,WAAYd,EAAe,OAAO,EACxCc,EAAM,QAASd,EAAe,IAAI,EAClCc,EAAM,YAAad,EAAe,QAAQ,EAEtCA,EAAe,QACjBW,EAAO,kCAAmCX,EAAe,MAAM,OAAO,EACtEW,EAAO,yCAA0CX,EAAe,MAAM,aAAa,GAG9EU,CACT,EAAG,CAACV,CAAc,CAAC,EAGbiB,EAAsB,UAAQ,IAAOR,EAAe,CAAE,GAAGA,EAAc,GAAGf,CAAM,EAAIA,EAAQ,CAACe,EAAcf,CAAK,CAAC,EASvH,GAPIO,IACFX,EAAuBC,CAAK,EACxBA,EAAM,WACR,QAIAW,IAAa,QAAaC,IAAY,OACxC,MAAM,IAAI,MAAM,0EAA0E,EAE5F,IAAMe,EAAkBhB,IAAa,OAAYb,EAAiBa,CAAQ,EAAIC,EAExEgB,EACJ,gBAACC,EAAA,CACE,GAAG7B,EACJ,QAAS2B,EACR,GAAGX,EACJ,IAAKH,EACL,UAAWiB,EAAWpB,EAAW,gBAAkB,YAAaR,CAAS,EACzE,MAAOwB,EACT,EAIF,OAAKX,EAOH,gBAACgB,EAAA,CAAQ,QAAS3B,EAAS,KAAMC,EAAa,MAAOC,EAAc,cAAeC,EAAsB,wBAAyBC,EAAgC,GAAIM,GAClKc,CACH,EAROA,CAUX,CACF,EAEA3B,EAAO,YAAc",
6
6
  "names": ["React", "classNames", "EMPHASIS_VARIANT", "validateIconButtonName", "props", "Button", "className", "style", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "overrideStyles", "iconOnly", "emphasis", "variant", "forwardedRef", "tooltipId", "hasTooltip", "tooltipAccessibilityProps", "useTooltipWrapper", "overrideVars", "vars", "setVar", "key", "value", "apply", "prefix", "s", "combinedStyle", "resolvedVariant", "button", "BaseButton", "classNames", "Tooltip"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{a as R}from"./chunk-T7Q6DQRD.js";import{a as m}from"./chunk-6SVNBGZ6.js";import{a as N}from"./chunk-KJTEZVOF.js";import*as t from"react";import C from"classnames";var u=t.createContext(void 0),f=t.forwardRef(({kind:c,size:e="2",color:o="gray",material:s,className:i,children:l,trailing:a,leading:n,...r},d)=>t.createElement("div",{role:"status","aria-live":"polite",...r,ref:d,className:C("rt-NoticeRoot",`rt-r-size-${e}`,i),"data-kind":c,"data-accent-color":o,"data-material":s},n?t.createElement("span",{className:"rt-NoticeIcon","aria-hidden":!0},n):null,t.createElement(N,{as:"div",size:e,className:"rt-NoticeText"},l),a));f.displayName="Strip";var g=t.forwardRef(({icon:c,action:e,onDismiss:o,dismissLabel:s="Dismiss",size:i,...l},a)=>{let n=t.useContext(u),r=i??n??"2";return t.createElement(f,{...l,size:r,ref:a,kind:"notice",leading:c,trailing:e||o?t.createElement("span",{className:"rt-NoticeActions"},e,o?t.createElement(R,{size:r,variant:"ghost",color:"gray","aria-label":s,className:"rt-NoticeDismiss",onClick:o},t.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0},t.createElement("path",{d:"M4 4l7 7M11 4l-7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))):null):null})});g.displayName="Notice";var v=t.forwardRef(({confirmLabel:c,cancelLabel:e="Not now",onConfirm:o,onCancel:s,busy:i=!1,size:l,color:a="gray",...n},r)=>{let d=t.useContext(u),p=l??d??"2";return t.createElement(f,{...n,size:p,color:a,ref:r,kind:"confirmation",trailing:t.createElement("span",{className:"rt-NoticeActions"},t.createElement(m,{size:p,variant:"ghost",color:"gray",disabled:i,onClick:s},e),t.createElement(m,{size:p,variant:"solid",color:a,loading:i,onClick:o},c))})});v.displayName="Confirmation";export{u as a,g as b,v as c};
2
- //# sourceMappingURL=chunk-3OQM7SLQ.js.map
1
+ import{a as R}from"./chunk-ADFUYK3U.js";import{a as m}from"./chunk-BXX2NVQD.js";import{a as N}from"./chunk-KJTEZVOF.js";import*as t from"react";import C from"classnames";var u=t.createContext(void 0),f=t.forwardRef(({kind:c,size:e="2",color:o="gray",material:s,className:i,children:l,trailing:a,leading:n,...r},d)=>t.createElement("div",{role:"status","aria-live":"polite",...r,ref:d,className:C("rt-NoticeRoot",`rt-r-size-${e}`,i),"data-kind":c,"data-accent-color":o,"data-material":s},n?t.createElement("span",{className:"rt-NoticeIcon","aria-hidden":!0},n):null,t.createElement(N,{as:"div",size:e,className:"rt-NoticeText"},l),a));f.displayName="Strip";var g=t.forwardRef(({icon:c,action:e,onDismiss:o,dismissLabel:s="Dismiss",size:i,...l},a)=>{let n=t.useContext(u),r=i??n??"2";return t.createElement(f,{...l,size:r,ref:a,kind:"notice",leading:c,trailing:e||o?t.createElement("span",{className:"rt-NoticeActions"},e,o?t.createElement(R,{size:r,variant:"ghost",color:"gray","aria-label":s,className:"rt-NoticeDismiss",onClick:o},t.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0},t.createElement("path",{d:"M4 4l7 7M11 4l-7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))):null):null})});g.displayName="Notice";var v=t.forwardRef(({confirmLabel:c,cancelLabel:e="Not now",onConfirm:o,onCancel:s,busy:i=!1,size:l,color:a="gray",...n},r)=>{let d=t.useContext(u),p=l??d??"2";return t.createElement(f,{...n,size:p,color:a,ref:r,kind:"confirmation",trailing:t.createElement("span",{className:"rt-NoticeActions"},t.createElement(m,{size:p,variant:"ghost",color:"gray",disabled:i,onClick:s},e),t.createElement(m,{size:p,variant:"solid",color:a,loading:i,onClick:o},c))})});v.displayName="Confirmation";export{u as a,g as b,v as c};
2
+ //# sourceMappingURL=chunk-EUH5MK4Q.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-2D5QJ6MX.js";import{z as o}from"zod";var l=t.extend({tooltip:o.string().optional().describe("Content to display in the tooltip on hover/focus"),tooltipSide:o.enum(["top","right","bottom","left"]).optional().default("top").describe("Side of the button where the tooltip should appear"),tooltipAlign:o.enum(["start","center","end"]).optional().default("center").describe("Alignment of the tooltip relative to the button"),tooltipDelayDuration:o.number().optional().describe("Delay before showing the tooltip (in milliseconds)"),tooltipDisableHoverableContent:o.boolean().optional().default(!1).describe("Whether to disable hoverable content behavior"),"aria-label":o.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":o.string().optional().describe("ARIA labelled by reference"),children:o.any().optional().describe("Children elements (required for accessibility if no aria-label)"),pressed:o.boolean().optional().describe("Controlled pressed state"),onPressedChange:o.function().optional().describe("Callback when pressed state changes"),defaultPressed:o.boolean().optional().describe("Default pressed state for uncontrolled usage")}).refine(e=>e["aria-label"]||e["aria-labelledby"]||e.children,{message:"ToggleIconButton must have either 'aria-label', 'aria-labelledby', or 'children' for accessibility",path:["aria-label","aria-labelledby","children"]}).refine(e=>!(e.pressed!==void 0&&e.onPressedChange===void 0),{message:"When using controlled mode (pressed prop), onPressedChange must also be provided",path:["onPressedChange"]}).refine(e=>!(e.pressed!==void 0&&e.defaultPressed!==void 0),{message:"Cannot use both controlled (pressed) and uncontrolled (defaultPressed) props together",path:["pressed","defaultPressed"]});function s(e){return e}export{l as a,s as b};
2
- //# sourceMappingURL=chunk-TCEQ5VVE.js.map
1
+ import{a as t}from"./chunk-P3KYZBOB.js";import{z as o}from"zod";var l=t.extend({tooltip:o.string().optional().describe("Content to display in the tooltip on hover/focus"),tooltipSide:o.enum(["top","right","bottom","left"]).optional().default("top").describe("Side of the button where the tooltip should appear"),tooltipAlign:o.enum(["start","center","end"]).optional().default("center").describe("Alignment of the tooltip relative to the button"),tooltipDelayDuration:o.number().optional().describe("Delay before showing the tooltip (in milliseconds)"),tooltipDisableHoverableContent:o.boolean().optional().default(!1).describe("Whether to disable hoverable content behavior"),"aria-label":o.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":o.string().optional().describe("ARIA labelled by reference"),children:o.any().optional().describe("Children elements (required for accessibility if no aria-label)"),pressed:o.boolean().optional().describe("Controlled pressed state"),onPressedChange:o.function().optional().describe("Callback when pressed state changes"),defaultPressed:o.boolean().optional().describe("Default pressed state for uncontrolled usage")}).refine(e=>e["aria-label"]||e["aria-labelledby"]||e.children,{message:"ToggleIconButton must have either 'aria-label', 'aria-labelledby', or 'children' for accessibility",path:["aria-label","aria-labelledby","children"]}).refine(e=>!(e.pressed!==void 0&&e.onPressedChange===void 0),{message:"When using controlled mode (pressed prop), onPressedChange must also be provided",path:["onPressedChange"]}).refine(e=>!(e.pressed!==void 0&&e.defaultPressed!==void 0),{message:"Cannot use both controlled (pressed) and uncontrolled (defaultPressed) props together",path:["pressed","defaultPressed"]});function s(e){return e}export{l as a,s as b};
2
+ //# sourceMappingURL=chunk-JGR3L4SN.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-57XCVY6J.js";import*as o from"react";import"radix-ui";var r=o.forwardRef((t,n)=>o.createElement(e,{...t,iconOnly:!0,ref:n}));r.displayName="ToggleIconButton";export{r as a};
2
- //# sourceMappingURL=chunk-CYSDGVKF.js.map
1
+ import{a as e}from"./chunk-5NARBZRI.js";import*as o from"react";import"radix-ui";var r=o.forwardRef((t,n)=>o.createElement(e,{...t,iconOnly:!0,ref:n}));r.displayName="ToggleIconButton";export{r as a};
2
+ //# sourceMappingURL=chunk-LHGT24A5.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-2D5QJ6MX.js";import{z as e}from"zod";var l=t.extend({tooltip:e.string().optional().describe("Content to display in the tooltip on hover/focus"),tooltipSide:e.enum(["top","right","bottom","left"]).optional().default("top").describe("Side of the button where the tooltip should appear"),tooltipAlign:e.enum(["start","center","end"]).optional().default("center").describe("Alignment of the tooltip relative to the button"),tooltipDelayDuration:e.number().optional().describe("Delay before showing the tooltip (in milliseconds)"),tooltipDisableHoverableContent:e.boolean().optional().default(!1).describe("Whether to disable hoverable content behavior"),"aria-label":e.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":e.string().optional().describe("ARIA labelled by reference"),children:e.any().optional().describe("Children elements (required for accessibility if no aria-label)")}).refine(o=>o["aria-label"]||o["aria-labelledby"]||o.children,{message:"IconButton must have either 'aria-label', 'aria-labelledby', or 'children' for accessibility",path:["aria-label","aria-labelledby","children"]});function r(o){return o}export{l as a,r as b};
2
- //# sourceMappingURL=chunk-VJXHEDCE.js.map
1
+ import{a as t}from"./chunk-P3KYZBOB.js";import{z as e}from"zod";var l=t.extend({tooltip:e.string().optional().describe("Content to display in the tooltip on hover/focus"),tooltipSide:e.enum(["top","right","bottom","left"]).optional().default("top").describe("Side of the button where the tooltip should appear"),tooltipAlign:e.enum(["start","center","end"]).optional().default("center").describe("Alignment of the tooltip relative to the button"),tooltipDelayDuration:e.number().optional().describe("Delay before showing the tooltip (in milliseconds)"),tooltipDisableHoverableContent:e.boolean().optional().default(!1).describe("Whether to disable hoverable content behavior"),"aria-label":e.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":e.string().optional().describe("ARIA labelled by reference"),children:e.any().optional().describe("Children elements (required for accessibility if no aria-label)")}).refine(o=>o["aria-label"]||o["aria-labelledby"]||o.children,{message:"IconButton must have either 'aria-label', 'aria-labelledby', or 'children' for accessibility",path:["aria-label","aria-labelledby","children"]});function r(o){return o}export{l as a,r as b};
2
+ //# sourceMappingURL=chunk-LOLLL7AV.js.map
@@ -0,0 +1,2 @@
1
+ import{z as e}from"zod";var t=e.object({as:e.string().optional().describe("HTML element type to render as"),asChild:e.boolean().optional().describe("Merge props with child element instead of rendering wrapper"),size:e.union([e.enum(["1","2","3","4"]),e.object({initial:e.enum(["1","2","3","4"]).optional(),sm:e.enum(["1","2","3","4"]).optional(),md:e.enum(["1","2","3","4"]).optional(),lg:e.enum(["1","2","3","4"]).optional(),xl:e.enum(["1","2","3","4"]).optional()})]).default("2").describe("Button size for responsive design and interface density"),variant:e.enum(["raised","solid","soft","surface","outline","ghost","override","classic"]).default("solid").describe("Visual variant that determines the button's appearance and context"),color:e.enum(["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]).optional().describe("Accent color for the button"),radius:e.enum(["none","small","medium","large","full"]).optional().describe("Border radius for the button"),loading:e.boolean().optional().default(!1).describe("Loading state that shows a spinner and disables interaction"),fullWidth:e.boolean().optional().default(!1).describe("Full width mode that expands the button to fill its container"),material:e.enum(["solid","translucent"]).optional().describe("Material type for visual rendering and depth effects"),panelBackground:e.enum(["solid","translucent"]).optional().describe("Panel background type (deprecated - use material instead)"),flush:e.boolean().optional().default(!1).describe("Flush mode that removes visual padding for seamless text integration"),disabled:e.boolean().optional().default(!1).describe("Disabled state"),type:e.enum(["button","submit","reset"]).optional().describe("Type attribute for form buttons"),className:e.string().optional().describe("Additional CSS class name"),style:e.record(e.string(),e.union([e.string(),e.number()])).optional().describe("Inline styles"),onClick:e.function().optional().describe("Click handler"),onFocus:e.function().optional().describe("Focus handler"),onBlur:e.function().optional().describe("Blur handler"),onMouseEnter:e.function().optional().describe("Mouse enter handler"),onMouseLeave:e.function().optional().describe("Mouse leave handler"),onKeyDown:e.function().optional().describe("Key down handler"),onKeyUp:e.function().optional().describe("Key up handler"),onSubmit:e.function().optional().describe("Form submission handler"),tabIndex:e.number().optional().describe("Tab index for keyboard navigation"),"aria-label":e.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":e.string().optional().describe("ARIA labelled by reference"),"aria-describedby":e.string().optional().describe("ARIA described by reference"),"aria-expanded":e.boolean().optional().describe("ARIA expanded state"),"aria-pressed":e.boolean().optional().describe("ARIA pressed state"),"aria-current":e.union([e.boolean(),e.enum(["page","step","location","date","time"])]).optional().describe("ARIA current state"),"aria-controls":e.string().optional().describe("ARIA controls reference"),"aria-owns":e.string().optional().describe("ARIA owns reference"),"data-*":e.record(e.string(),e.string()).optional().describe("Data attributes"),id:e.string().optional().describe("ID attribute"),title:e.string().optional().describe("Title attribute for tooltip"),role:e.string().optional().describe("Role attribute"),children:e.any().optional().describe("Children elements")}).strict();function i(n){return n}export{t as a,i as b};
2
+ //# sourceMappingURL=chunk-P3KYZBOB.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/schemas/base-button.schema.ts"],
4
+ "sourcesContent": ["import { z } from 'zod';\n\n/**\n * BaseButton Zod schema - Single source of truth for all button component props\n *\n * This schema defines the core button functionality used by Button, IconButton,\n * ToggleButton, and ToggleIconButton components. It ensures consistency across\n * the design system and provides machine-readable validation.\n *\n * @example\n * ```tsx\n * // Basic validation\n * const props = BaseButtonSchema.parse({ size: '2', variant: 'solid' });\n *\n * // With responsive props\n * const responsiveProps = BaseButtonSchema.parse({\n * size: { initial: '1', sm: '2', md: '3' },\n * variant: 'solid'\n * });\n * ```\n */\nexport const BaseButtonSchema = z\n .object({\n /**\n * Polymorphic rendering - render as different HTML elements\n * @default 'button'\n */\n as: z.string().optional().describe('HTML element type to render as'),\n\n /**\n * Use asChild to merge props with child element\n * @default false\n */\n asChild: z\n .boolean()\n .optional()\n .describe('Merge props with child element instead of rendering wrapper'),\n\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n * @default '2'\n */\n size: z\n .union([\n z.enum(['1', '2', '3', '4']),\n z.object({\n initial: z.enum(['1', '2', '3', '4']).optional(),\n sm: z.enum(['1', '2', '3', '4']).optional(),\n md: z.enum(['1', '2', '3', '4']).optional(),\n lg: z.enum(['1', '2', '3', '4']).optional(),\n xl: z.enum(['1', '2', '3', '4']).optional(),\n }),\n ])\n .default('2')\n .describe('Button size for responsive design and interface density'),\n\n /**\n * Visual variant that determines the button's appearance and context\n * @default 'solid'\n */\n variant: z\n .enum(['raised', 'solid', 'soft', 'surface', 'outline', 'ghost', 'override', 'classic'])\n .default('solid')\n .describe(\"Visual variant that determines the button's appearance and context\"),\n\n /**\n * Accent color for the button\n */\n color: z\n .enum([\n 'tomato',\n 'red',\n 'ruby',\n 'crimson',\n 'pink',\n 'plum',\n 'purple',\n 'violet',\n 'iris',\n 'indigo',\n 'blue',\n 'cyan',\n 'teal',\n 'jade',\n 'green',\n 'grass',\n 'brown',\n 'orange',\n 'sky',\n 'mint',\n 'lime',\n 'yellow',\n 'amber',\n 'gold',\n 'bronze',\n 'gray',\n ])\n .optional()\n .describe('Accent color for the button'),\n\n /**\n * Border radius for the button\n */\n radius: z\n .enum(['none', 'small', 'medium', 'large', 'full'])\n .optional()\n .describe('Border radius for the button'),\n\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n * @default false\n */\n loading: z\n .boolean()\n .optional()\n .default(false)\n .describe('Loading state that shows a spinner and disables interaction'),\n\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n * @default false\n */\n fullWidth: z\n .boolean()\n .optional()\n .default(false)\n .describe('Full width mode that expands the button to fill its container'),\n\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: z\n .enum(['solid', 'translucent'])\n .optional()\n .describe('Material type for visual rendering and depth effects'),\n\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: z\n .enum(['solid', 'translucent'])\n .optional()\n .describe('Panel background type (deprecated - use material instead)'),\n\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n * @default false\n */\n flush: z\n .boolean()\n .optional()\n .default(false)\n .describe('Flush mode that removes visual padding for seamless text integration'),\n\n /**\n * Disabled state\n * @default false\n */\n disabled: z.boolean().optional().default(false).describe('Disabled state'),\n\n /**\n * Type attribute for form buttons\n * @default 'button'\n */\n type: z\n .enum(['button', 'submit', 'reset'])\n .optional()\n .describe('Type attribute for form buttons'),\n\n /**\n * Additional CSS class name\n */\n className: z.string().optional().describe('Additional CSS class name'),\n\n /**\n * Inline styles\n */\n style: z\n .record(z.string(), z.union([z.string(), z.number()]))\n .optional()\n .describe('Inline styles'),\n\n /**\n * Click handler\n */\n onClick: z.function().optional().describe('Click handler'),\n\n /**\n * Focus handler\n */\n onFocus: z.function().optional().describe('Focus handler'),\n\n /**\n * Blur handler\n */\n onBlur: z.function().optional().describe('Blur handler'),\n\n /**\n * Mouse enter handler\n */\n onMouseEnter: z.function().optional().describe('Mouse enter handler'),\n\n /**\n * Mouse leave handler\n */\n onMouseLeave: z.function().optional().describe('Mouse leave handler'),\n\n /**\n * Key down handler\n */\n onKeyDown: z.function().optional().describe('Key down handler'),\n\n /**\n * Key up handler\n */\n onKeyUp: z.function().optional().describe('Key up handler'),\n\n /**\n * Form submission handler\n */\n onSubmit: z.function().optional().describe('Form submission handler'),\n\n /**\n * Tab index for keyboard navigation\n */\n tabIndex: z.number().optional().describe('Tab index for keyboard navigation'),\n\n /**\n * ARIA label for accessibility\n */\n 'aria-label': z.string().optional().describe('ARIA label for accessibility'),\n\n /**\n * ARIA labelled by reference\n */\n 'aria-labelledby': z.string().optional().describe('ARIA labelled by reference'),\n\n /**\n * ARIA described by reference\n */\n 'aria-describedby': z.string().optional().describe('ARIA described by reference'),\n\n /**\n * ARIA expanded state\n */\n 'aria-expanded': z.boolean().optional().describe('ARIA expanded state'),\n\n /**\n * ARIA pressed state\n */\n 'aria-pressed': z.boolean().optional().describe('ARIA pressed state'),\n\n /**\n * ARIA current state\n */\n 'aria-current': z\n .union([z.boolean(), z.enum(['page', 'step', 'location', 'date', 'time'])])\n .optional()\n .describe('ARIA current state'),\n\n /**\n * ARIA controls reference\n */\n 'aria-controls': z.string().optional().describe('ARIA controls reference'),\n\n /**\n * ARIA owns reference\n */\n 'aria-owns': z.string().optional().describe('ARIA owns reference'),\n\n /**\n * Data attributes\n */\n 'data-*': z.record(z.string(), z.string()).optional().describe('Data attributes'),\n\n /**\n * ID attribute\n */\n id: z.string().optional().describe('ID attribute'),\n\n /**\n * Title attribute for tooltip\n */\n title: z.string().optional().describe('Title attribute for tooltip'),\n\n /**\n * Role attribute\n */\n role: z.string().optional().describe('Role attribute'),\n\n /**\n * Children elements\n */\n children: z.any().optional().describe('Children elements'),\n })\n .strict();\n\n/**\n * Type derived from BaseButton Zod schema\n * This ensures type safety and consistency with the schema\n */\nexport type BaseButtonProps = z.infer<typeof BaseButtonSchema>;\n\n/**\n * Development-only helper to validate and normalize props\n * This function should only be used in development mode\n *\n * @param props - Props to validate and normalize\n * @returns Validated and normalized props\n *\n * @example\n * ```tsx\n * // In development, this will validate props and show helpful errors\n * const validatedProps = parseBaseButtonProps({ size: 'invalid', variant: 'solid' });\n * // Throws: \"Invalid enum value. Expected '1' | '2' | '3' | '4', received 'invalid'\"\n * ```\n */\nexport function parseBaseButtonProps(props: unknown): BaseButtonProps {\n if (process.env.NODE_ENV === 'development') {\n return BaseButtonSchema.parse(props);\n }\n return props as BaseButtonProps;\n}\n"],
5
+ "mappings": "AAAA,OAAS,KAAAA,MAAS,MAqBX,IAAMC,EAAmBD,EAC7B,OAAO,CAKN,GAAIA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,gCAAgC,EAMnE,QAASA,EACN,QAAQ,EACR,SAAS,EACT,SAAS,6DAA6D,EAOzE,KAAMA,EACH,MAAM,CACLA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAC3BA,EAAE,OAAO,CACP,QAASA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,EAC/C,GAAIA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,EAC1C,GAAIA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,EAC1C,GAAIA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,EAC1C,GAAIA,EAAE,KAAK,CAAC,IAAK,IAAK,IAAK,GAAG,CAAC,EAAE,SAAS,CAC5C,CAAC,CACH,CAAC,EACA,QAAQ,GAAG,EACX,SAAS,yDAAyD,EAMrE,QAASA,EACN,KAAK,CAAC,SAAU,QAAS,OAAQ,UAAW,UAAW,QAAS,WAAY,SAAS,CAAC,EACtF,QAAQ,OAAO,EACf,SAAS,oEAAoE,EAKhF,MAAOA,EACJ,KAAK,CACJ,SACA,MACA,OACA,UACA,OACA,OACA,SACA,SACA,OACA,SACA,OACA,OACA,OACA,OACA,QACA,QACA,QACA,SACA,MACA,OACA,OACA,SACA,QACA,OACA,SACA,MACF,CAAC,EACA,SAAS,EACT,SAAS,6BAA6B,EAKzC,OAAQA,EACL,KAAK,CAAC,OAAQ,QAAS,SAAU,QAAS,MAAM,CAAC,EACjD,SAAS,EACT,SAAS,8BAA8B,EAO1C,QAASA,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EAAK,EACb,SAAS,6DAA6D,EAOzE,UAAWA,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EAAK,EACb,SAAS,+DAA+D,EAM3E,SAAUA,EACP,KAAK,CAAC,QAAS,aAAa,CAAC,EAC7B,SAAS,EACT,SAAS,sDAAsD,EAMlE,gBAAiBA,EACd,KAAK,CAAC,QAAS,aAAa,CAAC,EAC7B,SAAS,EACT,SAAS,2DAA2D,EAOvE,MAAOA,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,EAAK,EACb,SAAS,sEAAsE,EAMlF,SAAUA,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAK,EAAE,SAAS,gBAAgB,EAMzE,KAAMA,EACH,KAAK,CAAC,SAAU,SAAU,OAAO,CAAC,EAClC,SAAS,EACT,SAAS,iCAAiC,EAK7C,UAAWA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,2BAA2B,EAKrE,MAAOA,EACJ,OAAOA,EAAE,OAAO,EAAGA,EAAE,MAAM,CAACA,EAAE,OAAO,EAAGA,EAAE,OAAO,CAAC,CAAC,CAAC,EACpD,SAAS,EACT,SAAS,eAAe,EAK3B,QAASA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,eAAe,EAKzD,QAASA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,eAAe,EAKzD,OAAQA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,cAAc,EAKvD,aAAcA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,qBAAqB,EAKpE,aAAcA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,qBAAqB,EAKpE,UAAWA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,kBAAkB,EAK9D,QAASA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,gBAAgB,EAK1D,SAAUA,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,yBAAyB,EAKpE,SAAUA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,mCAAmC,EAK5E,aAAcA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,8BAA8B,EAK3E,kBAAmBA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,4BAA4B,EAK9E,mBAAoBA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,6BAA6B,EAKhF,gBAAiBA,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,qBAAqB,EAKtE,eAAgBA,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,oBAAoB,EAKpE,eAAgBA,EACb,MAAM,CAACA,EAAE,QAAQ,EAAGA,EAAE,KAAK,CAAC,OAAQ,OAAQ,WAAY,OAAQ,MAAM,CAAC,CAAC,CAAC,EACzE,SAAS,EACT,SAAS,oBAAoB,EAKhC,gBAAiBA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,yBAAyB,EAKzE,YAAaA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,qBAAqB,EAKjE,SAAUA,EAAE,OAAOA,EAAE,OAAO,EAAGA,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,SAAS,iBAAiB,EAKhF,GAAIA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,cAAc,EAKjD,MAAOA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,6BAA6B,EAKnE,KAAMA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,gBAAgB,EAKrD,SAAUA,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,mBAAmB,CAC3D,CAAC,EACA,OAAO,EAsBH,SAASE,EAAqBC,EAAiC,CAIpE,OAAOA,CACT",
6
+ "names": ["z", "BaseButtonSchema", "parseBaseButtonProps", "props"]
7
+ }
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-2D5QJ6MX.js";import{z as o}from"zod";var e=t.extend({tooltip:o.string().optional().describe("Content to display in the tooltip on hover/focus"),tooltipSide:o.enum(["top","right","bottom","left"]).optional().default("top").describe("Side of the button where the tooltip should appear"),tooltipAlign:o.enum(["start","center","end"]).optional().default("center").describe("Alignment of the tooltip relative to the button"),tooltipDelayDuration:o.number().optional().describe("Delay before showing the tooltip (in milliseconds)"),tooltipDisableHoverableContent:o.boolean().optional().default(!1).describe("Whether to disable hoverable content behavior"),overrideStyles:o.object({normal:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),hover:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),active:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),pressed:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),open:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),disabled:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),focus:o.object({outline:o.string().optional(),outlineOffset:o.string().optional()}).optional()}).optional().describe("Override styles for different interaction states")}).strict();function l(n){return n}export{e as a,l as b};
2
- //# sourceMappingURL=chunk-77TGP2LO.js.map
1
+ import{a as t}from"./chunk-P3KYZBOB.js";import{z as o}from"zod";var e=t.extend({tooltip:o.string().optional().describe("Content to display in the tooltip on hover/focus"),tooltipSide:o.enum(["top","right","bottom","left"]).optional().default("top").describe("Side of the button where the tooltip should appear"),tooltipAlign:o.enum(["start","center","end"]).optional().default("center").describe("Alignment of the tooltip relative to the button"),tooltipDelayDuration:o.number().optional().describe("Delay before showing the tooltip (in milliseconds)"),tooltipDisableHoverableContent:o.boolean().optional().default(!1).describe("Whether to disable hoverable content behavior"),overrideStyles:o.object({normal:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),hover:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),active:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),pressed:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),open:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),disabled:o.object({color:o.string().optional(),background:o.string().optional(),backgroundColor:o.string().optional(),boxShadow:o.string().optional(),filter:o.string().optional(),outline:o.string().optional(),outlineOffset:o.string().optional(),opacity:o.union([o.string(),o.number()]).optional()}).optional(),focus:o.object({outline:o.string().optional(),outlineOffset:o.string().optional()}).optional()}).optional().describe("Override styles for different interaction states")}).strict();function l(n){return n}export{e as a,l as b};
2
+ //# sourceMappingURL=chunk-QXEQ2C6A.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-ZUOK3KFY.js";import{a as x}from"./chunk-T7Q6DQRD.js";import{a as B}from"./chunk-6SVNBGZ6.js";import{a as y}from"./chunk-KJTEZVOF.js";import{a as d}from"./chunk-6FLLFCBU.js";import{a as R}from"./chunk-GSTOGDAJ.js";import*as o from"react";import T from"classnames";import{Toolbar as P}from"radix-ui";var v=o.createContext(null),S=o.createContext(null);function b(t){let r=o.useContext(v);if(!r)throw new Error(`${t} must be rendered inside a Toolbar.`);return r}var m=o.forwardRef((t,r)=>{let e=t.size??p.size.default,a=t.orientation??p.orientation.default,{className:s,orientation:n,children:i,...l}=d(t,p,R),u=o.useMemo(()=>({size:e,orientation:a}),[e,a]);return o.createElement(P.Root,{...l,ref:r,orientation:a,className:T("rt-Toolbar",s)},o.createElement(v.Provider,{value:u},i))});m.displayName="Toolbar";var C=o.forwardRef(({className:t,disabled:r=!1,children:e,...a},s)=>{let{orientation:n}=b("ToolbarGroup"),i=o.useMemo(()=>({disabled:r}),[r]);return o.createElement("div",{role:"group","data-orientation":n,"data-disabled":r||void 0,...a,ref:s,className:T("rt-ToolbarGroup",t)},o.createElement(S.Provider,{value:i},e))});C.displayName="Toolbar.Group";function D(t){return t===!0||t==="true"}var G=o.forwardRef((t,r)=>{let e=b("ToolbarButton"),a=o.useContext(S),{iconOnly:s,size:n,variant:i,emphasis:l,color:u,disabled:z,...c}=t,O=D(t["aria-pressed"]),h="data-state"in t||t["aria-pressed"]===void 0?{}:{"data-state":O?"on":"off"},f={size:n??e.size,...l!==void 0?{emphasis:l}:{variant:i??(a?"ghost":"soft")},color:u??(i||l?void 0:"gray"),...h};return o.createElement(P.Button,{asChild:!0,ref:r,disabled:z||a?.disabled||void 0},s?o.createElement(x,{...c,...f}):o.createElement(B,{...c,...f}))});G.displayName="Toolbar.Button";var N=o.forwardRef(({className:t,...r},e)=>(b("ToolbarSeparator"),o.createElement(P.Separator,{...r,ref:e,className:T("rt-ToolbarSeparator",t)})));N.displayName="Toolbar.Separator";var w={1:"2",2:"3",3:"4",4:"5"},g=o.forwardRef(({className:t,children:r,style:e,id:a},s)=>{let{size:n}=b("ToolbarTitle");return r==null||r===!1?null:o.createElement(y,{ref:s,as:"span",size:w[n],weight:"medium",truncate:!0,id:a,style:e,className:T("rt-ToolbarTitle",t)},r)});g.displayName="Toolbar.Title";var V=Object.assign(m,{Root:m,Group:C,Button:G,Separator:N,Title:g});export{m as a,C as b,G as c,N as d,g as e,V as f};
2
- //# sourceMappingURL=chunk-FMMKOOS7.js.map
1
+ import{a as p}from"./chunk-ZUOK3KFY.js";import{a as x}from"./chunk-ADFUYK3U.js";import{a as B}from"./chunk-BXX2NVQD.js";import{a as y}from"./chunk-KJTEZVOF.js";import{a as d}from"./chunk-6FLLFCBU.js";import{a as R}from"./chunk-GSTOGDAJ.js";import*as o from"react";import T from"classnames";import{Toolbar as P}from"radix-ui";var v=o.createContext(null),S=o.createContext(null);function b(t){let r=o.useContext(v);if(!r)throw new Error(`${t} must be rendered inside a Toolbar.`);return r}var m=o.forwardRef((t,r)=>{let e=t.size??p.size.default,a=t.orientation??p.orientation.default,{className:s,orientation:n,children:i,...l}=d(t,p,R),u=o.useMemo(()=>({size:e,orientation:a}),[e,a]);return o.createElement(P.Root,{...l,ref:r,orientation:a,className:T("rt-Toolbar",s)},o.createElement(v.Provider,{value:u},i))});m.displayName="Toolbar";var C=o.forwardRef(({className:t,disabled:r=!1,children:e,...a},s)=>{let{orientation:n}=b("ToolbarGroup"),i=o.useMemo(()=>({disabled:r}),[r]);return o.createElement("div",{role:"group","data-orientation":n,"data-disabled":r||void 0,...a,ref:s,className:T("rt-ToolbarGroup",t)},o.createElement(S.Provider,{value:i},e))});C.displayName="Toolbar.Group";function D(t){return t===!0||t==="true"}var G=o.forwardRef((t,r)=>{let e=b("ToolbarButton"),a=o.useContext(S),{iconOnly:s,size:n,variant:i,emphasis:l,color:u,disabled:z,...c}=t,O=D(t["aria-pressed"]),h="data-state"in t||t["aria-pressed"]===void 0?{}:{"data-state":O?"on":"off"},f={size:n??e.size,...l!==void 0?{emphasis:l}:{variant:i??(a?"ghost":"soft")},color:u??(i||l?void 0:"gray"),...h};return o.createElement(P.Button,{asChild:!0,ref:r,disabled:z||a?.disabled||void 0},s?o.createElement(x,{...c,...f}):o.createElement(B,{...c,...f}))});G.displayName="Toolbar.Button";var N=o.forwardRef(({className:t,...r},e)=>(b("ToolbarSeparator"),o.createElement(P.Separator,{...r,ref:e,className:T("rt-ToolbarSeparator",t)})));N.displayName="Toolbar.Separator";var w={1:"2",2:"3",3:"4",4:"5"},g=o.forwardRef(({className:t,children:r,style:e,id:a},s)=>{let{size:n}=b("ToolbarTitle");return r==null||r===!1?null:o.createElement(y,{ref:s,as:"span",size:w[n],weight:"medium",truncate:!0,id:a,style:e,className:T("rt-ToolbarTitle",t)},r)});g.displayName="Toolbar.Title";var V=Object.assign(m,{Root:m,Group:C,Button:G,Separator:N,Title:g});export{m as a,C as b,G as c,N as d,g as e,V as f};
2
+ //# sourceMappingURL=chunk-TUKX2BRO.js.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-PAEHH3WS.js";import{a as B}from"./chunk-AGAQC4HH.js";import{a as b,c as P}from"./chunk-5T6K7VPP.js";import{a as c}from"./chunk-PXUQEA77.js";import{a as y}from"./chunk-5TXQLK4G.js";import{a as i}from"./chunk-E7LJHM3S.js";import{a as u}from"./chunk-6FLLFCBU.js";import{a as m}from"./chunk-GSTOGDAJ.js";import*as e from"react";import S from"classnames";import{Slot as j}from"radix-ui";var I=e.forwardRef((o,g)=>{let{size:h=i.size.default}=o,{className:R,children:t,asChild:n,as:a,color:x,radius:C,material:k,panelBackground:w,flush:D,disabled:p=o.loading,...d}=u(o,i,m);y(o.panelBackground);let l=k??w,E=n?j.Root:a||"button",T=n||!a||["button","input","textarea","select"].includes(a),v=!n&&(!a||a==="button"),M="type"in d,z=e.useId(),s=o.loading?`${z}-loading`:void 0,r=e.useMemo(()=>typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"button",[t]),N=e.useMemo(()=>o.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":s,"aria-label":`${r} (loading)`}:{},[o.loading,s,r]);return e.createElement(E,{"data-disabled":p||void 0,"data-accent-color":x,"data-radius":C,"data-material":l,"data-panel-background":l,"data-flush":D?"true":void 0,...d,...N,ref:g,className:S("rt-reset","rt-BaseButton",R),...T&&{disabled:p},...v&&!M?{type:"button"}:{}},o.loading?e.createElement(e.Fragment,null,e.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},t),e.createElement(B,null,e.createElement("span",{id:s},r," is loading, please wait..."),t),e.createElement(c,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(f,{size:b(h,P),"aria-hidden":"true"})))):t)});I.displayName="BaseButton";export{I as a};
2
- //# sourceMappingURL=chunk-BKES3M4Y.js.map
1
+ import{a as f}from"./chunk-PAEHH3WS.js";import{a as B}from"./chunk-AGAQC4HH.js";import{a as b,c as P}from"./chunk-5T6K7VPP.js";import{a as c}from"./chunk-PXUQEA77.js";import{a as y}from"./chunk-5TXQLK4G.js";import{a as i}from"./chunk-BGVGSALM.js";import{a as u}from"./chunk-6FLLFCBU.js";import{a as m}from"./chunk-GSTOGDAJ.js";import*as e from"react";import S from"classnames";import{Slot as j}from"radix-ui";var I=e.forwardRef((o,g)=>{let{size:h=i.size.default}=o,{className:R,children:t,asChild:n,as:a,color:x,radius:C,material:k,panelBackground:w,flush:D,disabled:p=o.loading,...d}=u(o,i,m);y(o.panelBackground);let l=k??w,E=n?j.Root:a||"button",T=n||!a||["button","input","textarea","select"].includes(a),v=!n&&(!a||a==="button"),M="type"in d,z=e.useId(),s=o.loading?`${z}-loading`:void 0,r=e.useMemo(()=>typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"button",[t]),N=e.useMemo(()=>o.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":s,"aria-label":`${r} (loading)`}:{},[o.loading,s,r]);return e.createElement(E,{"data-disabled":p||void 0,"data-accent-color":x,"data-radius":C,"data-material":l,"data-panel-background":l,"data-flush":D?"true":void 0,...d,...N,ref:g,className:S("rt-reset","rt-BaseButton",R),...T&&{disabled:p},...v&&!M?{type:"button"}:{}},o.loading?e.createElement(e.Fragment,null,e.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},t),e.createElement(B,null,e.createElement("span",{id:s},r," is loading, please wait..."),t),e.createElement(c,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(f,{size:b(h,P),"aria-hidden":"true"})))):t)});I.displayName="BaseButton";export{I as a};
2
+ //# sourceMappingURL=chunk-UGGAAL4V.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-BKES3M4Y.js";import"../../chunk-PAEHH3WS.js";import"../../chunk-3KB2XWBE.js";import"../../chunk-AGAQC4HH.js";import"../../chunk-5T6K7VPP.js";import"../../chunk-PXUQEA77.js";import"../../chunk-SMGDH54W.js";import"../../chunk-SNR5VFWG.js";import"../../chunk-FWB47YCH.js";import"../../chunk-K53W3ELO.js";import"../../chunk-TTFUM47A.js";import"../../chunk-VX44UTQ5.js";import"../../chunk-ERGJN7FJ.js";import"../../chunk-5TXQLK4G.js";import"../../chunk-E7LJHM3S.js";import"../../chunk-KRJTW535.js";import"../../chunk-6FLLFCBU.js";import"../../chunk-AX5S56DS.js";import"../../chunk-GSTOGDAJ.js";import"../../chunk-E23RKOQJ.js";import"../../chunk-JUY7CBSL.js";import"../../chunk-WRWNN2NW.js";import"../../chunk-QM3RCK5P.js";import"../../chunk-RZCX6IBE.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-AVFGMLL4.js";import"../../chunk-YIK4ACXS.js";import"../../chunk-Z4DTHR2S.js";import"../../chunk-OS3FCYZY.js";export{a as BaseButton};
1
+ import{a}from"../../chunk-UGGAAL4V.js";import"../../chunk-PAEHH3WS.js";import"../../chunk-3KB2XWBE.js";import"../../chunk-AGAQC4HH.js";import"../../chunk-5T6K7VPP.js";import"../../chunk-PXUQEA77.js";import"../../chunk-SMGDH54W.js";import"../../chunk-SNR5VFWG.js";import"../../chunk-FWB47YCH.js";import"../../chunk-K53W3ELO.js";import"../../chunk-TTFUM47A.js";import"../../chunk-VX44UTQ5.js";import"../../chunk-ERGJN7FJ.js";import"../../chunk-5TXQLK4G.js";import"../../chunk-BGVGSALM.js";import"../../chunk-KRJTW535.js";import"../../chunk-6FLLFCBU.js";import"../../chunk-AX5S56DS.js";import"../../chunk-GSTOGDAJ.js";import"../../chunk-E23RKOQJ.js";import"../../chunk-JUY7CBSL.js";import"../../chunk-WRWNN2NW.js";import"../../chunk-QM3RCK5P.js";import"../../chunk-RZCX6IBE.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-AVFGMLL4.js";import"../../chunk-YIK4ACXS.js";import"../../chunk-Z4DTHR2S.js";import"../../chunk-OS3FCYZY.js";export{a as BaseButton};
2
2
  //# sourceMappingURL=base-button.js.map
@@ -101,7 +101,7 @@ declare const baseButtonPropDefs: {
101
101
  type: "enum";
102
102
  className: string;
103
103
  values: readonly ["raised", "solid", "soft", "surface", "outline", "ghost", "override", "classic"];
104
- default: "raised";
104
+ default: "solid";
105
105
  parseValue: typeof parseVariant;
106
106
  };
107
107
  asChild: {
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-E7LJHM3S.js";import"../../chunk-KRJTW535.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-AVFGMLL4.js";import"../../chunk-YIK4ACXS.js";import"../../chunk-Z4DTHR2S.js";import"../../chunk-OS3FCYZY.js";export{a as baseButtonPropDefs};
1
+ import{a}from"../../chunk-BGVGSALM.js";import"../../chunk-KRJTW535.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-AVFGMLL4.js";import"../../chunk-YIK4ACXS.js";import"../../chunk-Z4DTHR2S.js";import"../../chunk-OS3FCYZY.js";export{a as baseButtonPropDefs};
2
2
  //# sourceMappingURL=base-button.props.js.map
@@ -63,7 +63,7 @@ type ButtonRankProps = {
63
63
  variant?: BaseButtonProps['variant'];
64
64
  emphasis?: never;
65
65
  } | {
66
- /** The button's rank: `loud` (solid), `medium` (raised, the default) or `quiet` (ghost). */
66
+ /** The button's rank: `loud` (solid, the default), `medium` (raised) or `quiet` (ghost). */
67
67
  emphasis?: ButtonEmphasis;
68
68
  variant?: never;
69
69
  };
@@ -1,2 +1,2 @@
1
- import{a}from"../chunk-6SVNBGZ6.js";import"../chunk-2N2AQNJH.js";import"../chunk-HIBX2EXV.js";import"../chunk-BPVVFHYD.js";import"../chunk-KJTEZVOF.js";import"../chunk-3HGHPAH4.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-ZWZGUBL4.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-FISGGGPC.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-7YIQV7VO.js";import"../chunk-BKES3M4Y.js";import"../chunk-PAEHH3WS.js";import"../chunk-3KB2XWBE.js";import"../chunk-AGAQC4HH.js";import"../chunk-5T6K7VPP.js";import"../chunk-PXUQEA77.js";import"../chunk-SMGDH54W.js";import"../chunk-SNR5VFWG.js";import"../chunk-FWB47YCH.js";import"../chunk-K53W3ELO.js";import"../chunk-TTFUM47A.js";import"../chunk-VX44UTQ5.js";import"../chunk-ERGJN7FJ.js";import"../chunk-5TXQLK4G.js";import"../chunk-E7LJHM3S.js";import"../chunk-KRJTW535.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-GSTOGDAJ.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-AVFGMLL4.js";import"../chunk-YIK4ACXS.js";import"../chunk-Z4DTHR2S.js";import"../chunk-OS3FCYZY.js";export{a as Button};
1
+ import{a}from"../chunk-BXX2NVQD.js";import"../chunk-2N2AQNJH.js";import"../chunk-HIBX2EXV.js";import"../chunk-BPVVFHYD.js";import"../chunk-KJTEZVOF.js";import"../chunk-3HGHPAH4.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-ZWZGUBL4.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-FISGGGPC.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-7YIQV7VO.js";import"../chunk-UGGAAL4V.js";import"../chunk-PAEHH3WS.js";import"../chunk-3KB2XWBE.js";import"../chunk-AGAQC4HH.js";import"../chunk-5T6K7VPP.js";import"../chunk-PXUQEA77.js";import"../chunk-SMGDH54W.js";import"../chunk-SNR5VFWG.js";import"../chunk-FWB47YCH.js";import"../chunk-K53W3ELO.js";import"../chunk-TTFUM47A.js";import"../chunk-VX44UTQ5.js";import"../chunk-ERGJN7FJ.js";import"../chunk-5TXQLK4G.js";import"../chunk-BGVGSALM.js";import"../chunk-KRJTW535.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-GSTOGDAJ.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-AVFGMLL4.js";import"../chunk-YIK4ACXS.js";import"../chunk-Z4DTHR2S.js";import"../chunk-OS3FCYZY.js";export{a as Button};
2
2
  //# sourceMappingURL=button.js.map
@@ -1,2 +1,2 @@
1
- import"../chunk-6DWDNKLS.js";import{a}from"../chunk-E7LJHM3S.js";import"../chunk-KRJTW535.js";import"../chunk-NZJGC6ZW.js";import"../chunk-AVFGMLL4.js";import"../chunk-YIK4ACXS.js";import"../chunk-Z4DTHR2S.js";import"../chunk-OS3FCYZY.js";export{a as buttonPropDefs};
1
+ import"../chunk-6DWDNKLS.js";import{a}from"../chunk-BGVGSALM.js";import"../chunk-KRJTW535.js";import"../chunk-NZJGC6ZW.js";import"../chunk-AVFGMLL4.js";import"../chunk-YIK4ACXS.js";import"../chunk-Z4DTHR2S.js";import"../chunk-OS3FCYZY.js";export{a as buttonPropDefs};
2
2
  //# sourceMappingURL=button.props.js.map