@kushagradhawan/kookie-ui 0.1.33 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.css +684 -205
- package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.js +1 -1
- package/dist/cjs/components/_internal/base-button.js.map +3 -3
- package/dist/cjs/components/chatbar.d.ts +205 -0
- package/dist/cjs/components/chatbar.d.ts.map +1 -0
- package/dist/cjs/components/chatbar.js +2 -0
- package/dist/cjs/components/chatbar.js.map +7 -0
- package/dist/cjs/components/icon-button.d.ts.map +1 -1
- package/dist/cjs/components/icon-button.js +2 -2
- package/dist/cjs/components/icon-button.js.map +3 -3
- package/dist/cjs/components/icons.d.ts +6 -1
- package/dist/cjs/components/icons.d.ts.map +1 -1
- package/dist/cjs/components/icons.js +1 -1
- package/dist/cjs/components/icons.js.map +3 -3
- package/dist/cjs/components/index.d.ts +3 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/popover.d.ts +13 -1
- package/dist/cjs/components/popover.d.ts.map +1 -1
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +3 -3
- package/dist/cjs/components/sheet.d.ts +82 -0
- package/dist/cjs/components/sheet.d.ts.map +1 -0
- package/dist/cjs/components/sheet.js +2 -0
- package/dist/cjs/components/sheet.js.map +7 -0
- package/dist/cjs/components/shell.d.ts +180 -0
- package/dist/cjs/components/shell.d.ts.map +1 -0
- package/dist/cjs/components/shell.js +2 -0
- package/dist/cjs/components/shell.js.map +7 -0
- package/dist/cjs/components/sidebar.d.ts +4 -33
- package/dist/cjs/components/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/components/skeleton.d.ts.map +1 -1
- package/dist/cjs/components/skeleton.js +1 -1
- package/dist/cjs/components/skeleton.js.map +2 -2
- package/dist/cjs/helpers/inert.d.ts +1 -1
- package/dist/cjs/helpers/inert.d.ts.map +1 -1
- package/dist/cjs/helpers/inert.js +1 -1
- package/dist/cjs/helpers/inert.js.map +2 -2
- package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-button.js.map +3 -3
- package/dist/esm/components/chatbar.d.ts +205 -0
- package/dist/esm/components/chatbar.d.ts.map +1 -0
- package/dist/esm/components/chatbar.js +2 -0
- package/dist/esm/components/chatbar.js.map +7 -0
- package/dist/esm/components/icon-button.d.ts.map +1 -1
- package/dist/esm/components/icon-button.js +2 -2
- package/dist/esm/components/icon-button.js.map +3 -3
- package/dist/esm/components/icons.d.ts +6 -1
- package/dist/esm/components/icons.d.ts.map +1 -1
- package/dist/esm/components/icons.js +1 -1
- package/dist/esm/components/icons.js.map +3 -3
- package/dist/esm/components/index.d.ts +3 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +3 -3
- package/dist/esm/components/popover.d.ts +13 -1
- package/dist/esm/components/popover.d.ts.map +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/popover.js.map +3 -3
- package/dist/esm/components/sheet.d.ts +82 -0
- package/dist/esm/components/sheet.d.ts.map +1 -0
- package/dist/esm/components/sheet.js +2 -0
- package/dist/esm/components/sheet.js.map +7 -0
- package/dist/esm/components/shell.d.ts +180 -0
- package/dist/esm/components/shell.d.ts.map +1 -0
- package/dist/esm/components/shell.js +2 -0
- package/dist/esm/components/shell.js.map +7 -0
- package/dist/esm/components/sidebar.d.ts +4 -33
- package/dist/esm/components/sidebar.d.ts.map +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/sidebar.js.map +3 -3
- package/dist/esm/components/skeleton.d.ts.map +1 -1
- package/dist/esm/components/skeleton.js.map +2 -2
- package/dist/esm/helpers/inert.d.ts +1 -1
- package/dist/esm/helpers/inert.d.ts.map +1 -1
- package/dist/esm/helpers/inert.js +1 -1
- package/dist/esm/helpers/inert.js.map +2 -2
- package/package.json +2 -1
- package/src/components/_internal/base-button.tsx +8 -0
- package/src/components/_internal/base-card.css +4 -4
- package/src/components/_internal/base-dialog.css +3 -41
- package/src/components/_internal/base-menu.css +2 -2
- package/src/components/_internal/base-sidebar-menu.css +3 -3
- package/src/components/accordion.css +2 -2
- package/src/components/animations.css +65 -81
- package/src/components/chatbar.css +214 -0
- package/src/components/chatbar.tsx +1195 -0
- package/src/components/icon-button.tsx +11 -0
- package/src/components/icons.tsx +97 -2
- package/src/components/image.css +2 -2
- package/src/components/index.css +3 -0
- package/src/components/index.tsx +3 -0
- package/src/components/popover.css +45 -0
- package/src/components/popover.tsx +180 -2
- package/src/components/scroll-area.css +3 -3
- package/src/components/segmented-control.css +3 -3
- package/src/components/sheet.css +90 -0
- package/src/components/sheet.tsx +247 -0
- package/src/components/shell.css +137 -0
- package/src/components/shell.tsx +1032 -0
- package/src/components/sidebar.css +55 -268
- package/src/components/sidebar.tsx +40 -262
- package/src/components/skeleton.tsx +1 -2
- package/src/components/text-area.css +1 -0
- package/src/components/tooltip.css +2 -2
- package/src/helpers/inert.ts +3 -3
- package/src/styles/tokens/constants.css +6 -3
- package/src/styles/tokens/index.css +1 -0
- package/src/styles/tokens/transition.css +91 -46
- package/styles.css +743 -241
- package/tokens/base.css +55 -33
- package/tokens.css +59 -36
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from"react";import M from"classnames";import{IconButton as ge}from"./icon-button.js";import{CloseIcon as We,FileTextIcon as Ve}from"./icons.js";import{Flex as re}from"./flex.js";import{ScrollArea as Be}from"./scroll-area.js";import{Slot as D}from"./slot.js";import{Card as ve}from"./card.js";import{Text as fe}from"./text.js";import{useDropzone as Ue}from"react-dropzone";const xe=typeof window<"u"?e.useLayoutEffect:e.useEffect,Ae=e.createContext(null),k=()=>{const l=e.useContext(Ae);if(!l)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return l},Re=e.forwardRef((l,r)=>{const{className:s,style:c,children:d,value:u,defaultValue:y="",onValueChange:p,open:m,defaultOpen:a=!1,onOpenChange:x,expandOn:T="both",minLines:A=1,maxLines:R=6,sendMode:P="whenDirty",disabled:j,readOnly:Y,onSubmit:H,size:O="2",variant:W,width:U,maxWidth:K,asChild:N,attachments:F,defaultAttachments:ae=[],onAttachmentsChange:$,accept:G,multiple:_=!0,maxAttachments:V,maxFileSize:S,paste:oe=!0,pasteAccept:B,clearOnSubmit:L=!0,onAttachmentReject:h,dropzone:z=!0,...ie}=l,J=u!=null,[le,ce]=e.useState(y),t=J?u:le,i=m!=null,[g,v]=e.useState(a),E=i?m:g,Q=e.useRef(null),me=e.useRef(null),q=F!=null,[X,Z]=e.useState(ae),I=q?F:X,ee=e.useRef(new Set),de=n=>Array.isArray(n)?n:typeof n=="string"?n.split(",").map(o=>o.trim()):[],te=de(G),Ce=de(B).length>0?de(B):te,ue=(n,o)=>{if(o.length===0)return!0;const f=n.type.toLowerCase(),w=n.name.toLowerCase();for(const b of o){const C=b.toLowerCase();if(C.includes("/")){const[se,he]=C.split("/"),[ne,je]=f.split("/");if(se==="*"||se===ne&&(he==="*"||he===je))return!0}else if(C.startsWith(".")&&w.endsWith(C))return!0}return!1},He=n=>{const o=[],f=[],w=typeof V=="number"?Math.max(V-I.length,0):1/0;for(const b of n){if(o.length>=w){f.push({file:b,reason:"count"});continue}if(typeof S=="number"&&b.size>S){f.push({file:b,reason:"size"});continue}if(!ue(b,te)){f.push({file:b,reason:"type"});continue}const C=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`,se=/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(b.name),ne=(b.type||"").toLowerCase().startsWith("image/")||se?URL.createObjectURL(b):void 0;ne&&ee.current.add(ne),o.push({id:C,name:b.name,size:b.size,type:b.type,file:b,url:ne,status:"idle"})}return{accepted:o,rejected:f}},pe=n=>{const{accepted:o,rejected:f}=He(n);if(o.length>0){const w=I.concat(o);q||Z(w),$?.(w)}f.length>0&&h?.(f)},Fe=n=>{const o=C=>Ce.length===0?ue(C,te):ue(C,Ce),f=[],w=[],b=typeof V=="number"?Math.max(V-I.length,0):1/0;for(const C of n){if(f.length>=b){w.push({file:C,reason:"count"});continue}if(typeof S=="number"&&C.size>S){w.push({file:C,reason:"size"});continue}if(!o(C)){w.push({file:C,reason:"type"});continue}f.push(C)}f.length>0&&pe(f),w.length>0&&h?.(w)};e.useEffect(()=>{const n=new Set(I.map(o=>o.url).filter(Boolean));for(const o of Array.from(ee.current))n.has(o)||(URL.revokeObjectURL(o),ee.current.delete(o))},[I]),e.useEffect(()=>()=>{for(const n of Array.from(ee.current))URL.revokeObjectURL(n);ee.current.clear()},[]);const ze=N?D:"div",Ie=e.useCallback(n=>{const o=n.relatedTarget,f=Q.current;f&&(o&&f.contains(o)||(t?.trim?.()??"").length===0&&(i||v(!1),x?.(!1)))},[i,x,t]),{getRootProps:De,getInputProps:ke,isDragActive:ye}=Ue({onDrop:(n,o)=>{if(n.length>0&&pe(n),o.length>0&&h){const f=o.map(({file:w,errors:b})=>{const C=b[0]?.code==="file-too-large"?"size":b[0]?.code==="file-invalid-type"?"type":"count";return{file:w,reason:C}});h(f)}},accept:te.length>0?te.reduce((n,o)=>(o.includes("/")?n[o]=[]:o.startsWith(".")&&(n[o]=[]),n),{}):void 0,multiple:_,maxSize:S,noClick:!0,noKeyboard:!0,disabled:!z||j});return e.createElement(Ae.Provider,{value:{open:E,setOpen:n=>{i||v(n),x?.(n)},isOpenControlled:i,value:t,setValue:n=>{J||ce(n),p?.(n)},isValueControlled:J,size:O,expandOn:T,minLines:A,maxLines:R,sendMode:P,disabled:j,readOnly:Y,onSubmit:H,rootRef:Q,textareaRef:me,attachments:I,setAttachments:n=>{q||Z(n),$?.(n)},isAttachmentsControlled:q,accept:G,multiple:_,maxAttachments:V,maxFileSize:S,paste:oe,pasteAccept:B,clearOnSubmit:L,onAttachmentReject:h,dropzone:z,appendFiles:pe,appendFilesFromPaste:Fe}},e.createElement(ze,{...ie,ref:n=>{typeof r=="function"?r(n):r&&(r.current=n),Q.current=n},className:M("rt-ChatbarRoot",`rt-r-size-${O}`,s),style:{position:"relative",width:U,maxWidth:K,...c},"data-state":E?"open":"closed","data-disabled":j?"":void 0,"data-readonly":Y?"":void 0,"data-drop-active":z&&ye?"":void 0,"aria-expanded":E,onBlurCapture:Ie},z&&e.createElement("input",{...ke()}),e.createElement("div",{...z?De():{},style:{width:"100%",height:"100%"}},e.createElement(ve,{className:"rt-ChatbarCard",size:Math.min(3,Number(O)+1).toString(),variant:W,style:{position:"relative"}},e.createElement("div",{className:"rt-ChatbarGrid"},d),z&&ye&&e.createElement("div",{className:"rt-ChatbarDropOverlay"},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(fe,{color:"gray",size:O,weight:"medium"},"Drop files here to attach")))))))});Re.displayName="Chatbar.Root";const Pe=e.forwardRef((l,r)=>{const{className:s,style:c,asChild:d,onFocus:u,onInput:y,onChange:p,onPaste:m,onKeyDown:a,submitOnEnter:x=!1,rows:T,...A}=l,R=k(),{open:P,minLines:j,maxLines:Y,expandOn:H,disabled:O,readOnly:W,setOpen:U,setValue:K,textareaRef:N,value:F,isValueControlled:ae,sendMode:$,paste:G,appendFilesFromPaste:_,size:V}=R,S=e.useRef(0),oe=e.useRef(0),B=e.useRef(0),L=e.useCallback(()=>{const t=N.current;if(!t)return;const i=window.getComputedStyle(t),g=parseFloat(i.lineHeight)||20,v=parseFloat(i.paddingTop)||0,E=parseFloat(i.paddingBottom)||0;S.current=g,oe.current=v+E,B.current=Math.ceil(1*g)+v+E},[N]),h=e.useCallback(t=>{const i=N.current;if(!i)return;i.style.height="auto",S.current===0&&L();const g=S.current,v=oe.current,E=t??P,Q=E?j:1,me=E?Y:1,q=Math.ceil(Q*g)+v,X=Math.ceil(me*g)+v,Z=Math.max(i.scrollHeight,q),I=Math.min(Z,X);i.style.height=`${I}px`,Z>X?(i.style.overflowY="auto",i.style.maxHeight=`${X}px`):(i.style.overflowY="hidden",i.style.maxHeight="none")},[P,j,Y,N,L]);xe(()=>{h()},[h,F,P]),xe(()=>{L(),h()},[L,h,V]),e.useEffect(()=>{const t=N.current;if(!t||typeof ResizeObserver>"u")return;let i=S.current;const g=new ResizeObserver(()=>{const v=window.getComputedStyle(t),E=parseFloat(v.lineHeight)||20;E!==i&&(i=E,L(),requestAnimationFrame(()=>h()))});return g.observe(t),()=>g.disconnect()},[N,L,h]),e.useEffect(()=>{},[]);const z=e.useCallback(t=>{O||W||((H==="focus"||H==="both")&&!P&&U(!0),u?.(t))},[O,W,H,P,U,u]),ie=e.useCallback(t=>{const i=t.currentTarget,g=i.value;K(g),(H==="overflow"||H==="both")&&!P&&(i.style.height="auto",B.current===0&&L(),i.scrollHeight>B.current+1&&(U(!0),h(!0),requestAnimationFrame(()=>h(!0)))),requestAnimationFrame(()=>h()),p?.(t)},[H,P,U,K,p,h,L]),J=e.useCallback(t=>{if(G){const g=Array.from(t.clipboardData?.items??[]).filter(v=>v.kind==="file").map(v=>v.getAsFile()).filter(v=>!!v);g.length>0&&_(g)}setTimeout(()=>{P?h():h(!0)},0),m?.(t)},[G,P,h,m,_]),le=e.useCallback(t=>{if(!x){a?.(t);return}if(t.key==="Enter"&&!t.shiftKey&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.nativeEvent.isComposing){if(O||W){a?.(t);return}if($==="never"){a?.(t);return}const g=F.trim().length>0||R.attachments.length>0;if($==="whenDirty"&&!g){a?.(t);return}t.preventDefault(),R.onSubmit?.({value:F,attachments:R.attachments}),R.clearOnSubmit&&(ae||K(""),R.setAttachments([]))}a?.(t)},[x,O,W,$,F,ae,K,R,a]),ce=d?D:"textarea";return e.createElement("div",{className:M("rt-ChatbarField","rt-ChatbarTextarea",s)},e.createElement(ce,{...A,ref:t=>{typeof r=="function"?r(t):r&&(r.current=t),N.current=t},className:"rt-ChatbarInput",value:F,onInput:y,onChange:ie,onFocus:z,onPaste:J,onKeyDown:le,disabled:O,readOnly:W,rows:P?j:1,spellCheck:A.spellCheck??!0,autoCorrect:A.autoCorrect??"on",style:c}))});Pe.displayName="Chatbar.Textarea";const we=e.forwardRef((l,r)=>{const{children:s,asChild:c,style:d,className:u,...y}=l;return k().open?null:e.createElement(c?D:"div",{...y,ref:r,className:M("rt-ChatbarInlineStart",u),style:d},s)});we.displayName="Chatbar.InlineStart";const Te=e.forwardRef((l,r)=>{const{children:s,asChild:c,style:d,className:u,...y}=l;return k().open?null:e.createElement(c?D:"div",{...y,ref:r,className:M("rt-ChatbarInlineEnd",u),style:d},s)});Te.displayName="Chatbar.InlineEnd";const Ee=e.forwardRef((l,r)=>{const{asChild:s,forceMount:c,renderAttachment:d,className:u,style:y,...p}=l,m=k();return!(m.attachments.length>0)&&!c?null:e.createElement(s?D:"div",{...p,ref:r,className:M("rt-ChatbarAttachmentsRow",u),style:y,role:"list","aria-label":p["aria-label"]??"Attachments"},e.createElement(Be,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(re,{align:"center",gap:"2",style:{minWidth:"fit-content"}},m.attachments.map(T=>e.createElement(be,{key:T.id,attachment:T,asChild:!!d},d?.(T))))))});Ee.displayName="Chatbar.AttachmentsRow";const be=e.forwardRef((l,r)=>{const{attachment:s,asChild:c,className:d,style:u,children:y,...p}=l,m=k(),a=c?D:"div",x=!!s.url&&s.type.startsWith("image/");return e.createElement(a,{...p,ref:r,className:M("rt-ChatbarAttachment",d),style:u,role:"listitem","data-kind":x?"image":"file",title:s.name},y??e.createElement(ve,{size:m.size,variant:"soft"},e.createElement(re,{align:"center",gap:"3",pr:x?void 0:"6"},e.createElement("div",{className:"rt-ChatbarAttachmentPreview","aria-hidden":!0},x?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:s.url,alt:""}):e.createElement(Ve,null)),!x&&e.createElement(re,{direction:"column",gap:"0",style:{minWidth:0}},e.createElement(fe,{size:m.size,weight:"medium",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},s.name),e.createElement(fe,{size:"1",color:"gray"},Math.ceil(s.size/1024)," KB")),e.createElement(ge,{className:"rt-ChatbarAttachmentRemove","aria-label":`Remove ${s.name}`,size:"1",variant:"classic",highContrast:!0,color:"gray",onClick:()=>m.setAttachments(m.attachments.filter(T=>T.id!==s.id))},e.createElement(We,null)))))});be.displayName="Chatbar.Attachment";const Se=e.forwardRef((l,r)=>{const{asChild:s,accept:c,multiple:d,className:u,style:y,...p}=l,m=k(),a=e.useRef(null),x=s?D:"button",T=(Array.isArray(c)?c:c?.split(",")??[]).join(",");return e.createElement(e.Fragment,null,e.createElement(x,{...p,ref:r,className:M("rt-ChatbarAttachTrigger",u),style:y,type:p.type??"button","aria-label":p["aria-label"]??"Add attachments",onClick:A=>{a.current&&a.current.click(),p.onClick?.(A)}}),e.createElement("input",{ref:a,type:"file",accept:T,multiple:d??m.multiple,tabIndex:-1,style:{display:"none"},onChange:A=>{const R=Array.from(A.currentTarget.files??[]);R.length>0&&m.appendFiles(R),A.currentTarget.value=""}}))});Se.displayName="Chatbar.AttachTrigger";const Me=e.forwardRef((l,r)=>{const{asChild:s,children:c,className:d,style:u,...y}=l;return k().open?e.createElement(s?D:"div",{...y,ref:r,className:M("rt-ChatbarRow",d),style:u},e.createElement(re,{align:"center",justify:"between",width:"100%"},c)):null});Me.displayName="Chatbar.Row";const Oe=e.forwardRef((l,r)=>{const{className:s,style:c,...d}=l;return e.createElement("div",{...d,ref:r,className:M("rt-ChatbarRowStart",s),style:c})});Oe.displayName="Chatbar.RowStart";const Le=e.forwardRef((l,r)=>{const{className:s,style:c,...d}=l;return e.createElement("div",{...d,ref:r,className:M("rt-ChatbarRowEnd",s),style:c})});Le.displayName="Chatbar.RowEnd";const Ne=e.forwardRef((l,r)=>{const{asChild:s,clearOnSend:c=!0,disabled:d,children:u,className:y,style:p,...m}=l,a=k(),T=a.value.trim().length>0||a.attachments.length>0,A=a.sendMode==="always"||a.sendMode==="whenDirty"&&T;if(a.sendMode==="never")return null;const R=P=>{a.disabled||a.readOnly||(a.onSubmit?.({value:a.value,attachments:a.attachments}),c&&(a.isValueControlled||a.setValue(""),a.clearOnSubmit&&a.setAttachments([])),m.onClick?.(P))};return e.createElement(ge,{...m,ref:r,size:a.size,variant:a.open?"solid":"ghost",disabled:d||a.disabled||a.readOnly,className:M("rt-ChatbarSend",y),style:{opacity:A?1:0,pointerEvents:A?"auto":"none",...p},asChild:s,onClick:R,"aria-label":m["aria-label"]??"Send"},u??"Send")});Ne.displayName="Chatbar.Send";export{Se as AttachTrigger,be as Attachment,Ee as AttachmentsRow,Te as InlineEnd,we as InlineStart,Re as Root,Me as Row,Le as RowEnd,Oe as RowStart,Ne as Send,Pe as Textarea};
|
|
2
|
+
//# sourceMappingURL=chatbar.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/chatbar.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { IconButton, type IconButtonProps } from './icon-button.js';\nimport { CloseIcon, FileTextIcon } from './icons.js';\nimport { Flex } from './flex.js';\n\nimport { ScrollArea } from './scroll-area.js';\nimport { Slot } from './slot.js';\nimport { Card } from './card.js';\nimport { Text } from './text.js';\nimport { useDropzone } from 'react-dropzone';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// Avoid SSR warnings by using an isomorphic layout effect\nconst useIsomorphicLayoutEffect =\n typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\ntype ExpandOn = 'none' | 'focus' | 'overflow' | 'both';\ntype SendMode = 'always' | 'whenDirty' | 'never';\n\n// Attachments\n/** Status flag for attachment lifecycle. */\ntype AttachmentStatus = 'idle' | 'uploading' | 'error' | 'done';\n/**\n * Attachment data model used by Chatbar.\n * - `file` exposes the original File object for uploads and processing.\n * - `url` is an object URL used for image previews and is revoked on removal.\n */\ninterface ChatbarAttachment {\n id: string;\n name: string;\n size: number;\n type: string;\n /** Original File object for uploads and processing */\n file: File;\n url?: string;\n status?: AttachmentStatus;\n progress?: number;\n meta?: Record<string, unknown>;\n}\n\ninterface ChatbarContextValue {\n open: boolean;\n setOpen(next: boolean): void;\n isOpenControlled: boolean;\n\n value: string;\n setValue(next: string): void;\n isValueControlled: boolean;\n\n size: '1' | '2' | '3';\n expandOn: ExpandOn;\n minLines: number;\n maxLines: number;\n sendMode: SendMode;\n disabled?: boolean;\n readOnly?: boolean;\n\n // Submit returns both message and attachments\n onSubmit?: (payload: { value: string; attachments: ChatbarAttachment[] }) => void;\n\n rootRef: React.RefObject<HTMLDivElement | null>;\n textareaRef: React.RefObject<HTMLTextAreaElement | null>;\n\n // Attachments state\n attachments: ChatbarAttachment[];\n setAttachments(next: ChatbarAttachment[]): void;\n isAttachmentsControlled: boolean;\n\n // Config\n accept?: string | string[];\n multiple: boolean;\n maxAttachments?: number;\n maxFileSize?: number;\n paste: boolean;\n pasteAccept?: string | string[];\n clearOnSubmit: boolean;\n\n // Dropzone\n dropzone: boolean;\n\n // Events\n onAttachmentReject?: (rejections: { file: File; reason: 'type' | 'size' | 'count' }[]) => void;\n\n // Helpers\n appendFiles(files: File[]): void;\n appendFilesFromPaste(files: File[]): void;\n}\n\nconst ChatbarContext = React.createContext<ChatbarContextValue | null>(null);\nconst useChatbarContext = () => {\n const ctx = React.useContext(ChatbarContext);\n if (!ctx) throw new Error('Chatbar context not found. Wrap parts in <Chatbar.Root>.');\n return ctx;\n};\n\n/**\n * Chatbar container and state provider.\n *\n * Value & Open\n * - Supports controlled/uncontrolled `value` and `open`.\n *\n * Attachments\n * - Controlled/uncontrolled attachments with client-side filtering.\n * - Filters by `accept`/`pasteAccept`, `maxAttachments`, and `maxFileSize`.\n * - Rejections are reported via `onAttachmentReject`.\n *\n * Submit\n * - `onSubmit({ value, attachments })` emits both message and attachments.\n * - `clearOnSubmit` clears message and attachments by default.\n */\ninterface ChatbarRootBaseProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n\n expandOn?: ExpandOn;\n\n /** Minimum number of lines in compact state (default: 1) */\n minLines?: number;\n /** Maximum number of lines before scrolling (default: 6) */\n maxLines?: number;\n\n sendMode?: SendMode;\n\n disabled?: boolean;\n readOnly?: boolean;\n\n /** Combined submit payload */\n onSubmit?: (payload: { value: string; attachments: ChatbarAttachment[] }) => void;\n\n size?: '1' | '2' | '3';\n variant?: 'surface' | 'outline' | 'classic' | 'ghost' | 'soft';\n\n width?: React.CSSProperties['width'];\n maxWidth?: React.CSSProperties['maxWidth'];\n asChild?: boolean;\n\n // Attachments API\n attachments?: ChatbarAttachment[];\n defaultAttachments?: ChatbarAttachment[];\n onAttachmentsChange?: (attachments: ChatbarAttachment[]) => void;\n accept?: string | string[];\n multiple?: boolean;\n maxAttachments?: number;\n maxFileSize?: number;\n paste?: boolean;\n pasteAccept?: string | string[];\n clearOnSubmit?: boolean;\n onAttachmentReject?: (rejections: { file: File; reason: 'type' | 'size' | 'count' }[]) => void;\n\n /**\n * Enables drag-and-drop file uploads when true.\n *\n * When enabled:\n * - Files can be dropped anywhere on the chatbar\n * - Same validation rules apply (accept, maxFileSize, maxAttachments)\n * - Visual feedback shows during drag operations\n * - Rejected files trigger onAttachmentReject\n *\n * @default true\n */\n dropzone?: boolean;\n}\n\ntype RootElement = React.ElementRef<'div'>;\n/**\n * Chatbar container and state provider.\n *\n * Behavior\n * - Supports controlled and uncontrolled `value` and `open` states via props.\n * - Provides context to subcomponents like `Textarea`, `Row`, and `Send`.\n * - Exposes `data-state`, `data-disabled`, and `data-readonly` attributes for styling.\n * - Sets `aria-expanded` to reflect open/closed state for assistive technologies.\n *\n * Attachments\n * - Controlled/uncontrolled attachments with client-side filtering.\n * - Filters by `accept`/`pasteAccept`, `maxAttachments`, and `maxFileSize`.\n * - Rejections are reported via `onAttachmentReject`.\n * - Paste-to-attach: when `paste` is enabled, pasting files adds attachments.\n *\n * Dropzone\n * - When `dropzone` is true, enables drag-and-drop file uploads.\n * - Files are validated using the same rules as paste and file picker.\n * - Visual feedback via `data-drop-active` attribute during drag operations.\n * - Rejected files trigger `onAttachmentReject` with appropriate reasons.\n *\n * Submit\n * - `onSubmit` receives both message text and attachments array.\n * - `clearOnSubmit` controls whether attachments are cleared after submission.\n *\n * Accessibility\n * - Consumers should label the `Textarea` via `aria-label`/`aria-labelledby`.\n * - `aria-expanded` on the root reflects the disclosure state of the input area.\n * - Dropzone provides proper ARIA attributes for drag and drop operations.\n */\ninterface RootProps\n extends ComponentPropsWithout<'div', RemovedProps | 'onSubmit'>,\n ChatbarRootBaseProps {}\n\nconst Root = React.forwardRef<RootElement, RootProps>((props, forwardedRef) => {\n const {\n className,\n style,\n children,\n value: valueProp,\n defaultValue = '',\n onValueChange: onValueChangeProp,\n open: openProp,\n defaultOpen = false,\n onOpenChange: onOpenChangeProp,\n expandOn = 'both',\n minLines = 1,\n maxLines = 6,\n sendMode = 'whenDirty',\n disabled,\n readOnly,\n onSubmit,\n size = '2',\n variant,\n width,\n maxWidth,\n asChild,\n attachments: attachmentsProp,\n defaultAttachments = [],\n onAttachmentsChange,\n accept,\n multiple = true,\n maxAttachments,\n maxFileSize,\n paste = true,\n pasteAccept,\n clearOnSubmit = true,\n onAttachmentReject,\n dropzone = true,\n ...divProps\n } = props;\n\n const isValueControlled = valueProp != null;\n const [valueUncontrolled, setValueUncontrolled] = React.useState<string>(defaultValue);\n const value = isValueControlled ? (valueProp as string) : valueUncontrolled;\n\n const isOpenControlled = openProp != null;\n const [openUncontrolled, setOpenUncontrolled] = React.useState<boolean>(defaultOpen);\n const open = isOpenControlled ? (openProp as boolean) : openUncontrolled;\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const textareaRef = React.useRef<HTMLTextAreaElement>(null);\n\n // Attachments state\n const isAttachmentsControlled = attachmentsProp != null;\n const [attachmentsUncontrolled, setAttachmentsUncontrolled] =\n React.useState<ChatbarAttachment[]>(defaultAttachments);\n const attachments = isAttachmentsControlled\n ? (attachmentsProp as ChatbarAttachment[])\n : attachmentsUncontrolled;\n\n // Track generated object URLs for cleanup\n const generatedUrlSetRef = React.useRef<Set<string>>(new Set());\n\n const toArray = (val: string | string[] | undefined) =>\n Array.isArray(val) ? val : typeof val === 'string' ? val.split(',').map((s) => s.trim()) : [];\n\n const accepts = toArray(accept);\n const pasteAccepts = toArray(pasteAccept).length > 0 ? toArray(pasteAccept) : accepts;\n\n const matchesAccept = (file: File, patterns: string[]) => {\n if (patterns.length === 0) return true;\n const mime = file.type.toLowerCase();\n const name = file.name.toLowerCase();\n for (const patRaw of patterns) {\n const pat = patRaw.toLowerCase();\n if (pat.includes('/')) {\n // MIME pattern\n const [type, subtype] = pat.split('/');\n const [fmType, fmSubtype] = mime.split('/');\n if (type === '*' || (type === fmType && (subtype === '*' || subtype === fmSubtype)))\n return true;\n } else if (pat.startsWith('.')) {\n if (name.endsWith(pat)) return true;\n }\n }\n return false;\n };\n\n /**\n * Maps File objects to attachments with validation and preview URL generation.\n */\n const mapFilesToAttachments = (\n files: File[],\n ): {\n accepted: ChatbarAttachment[];\n rejected: { file: File; reason: 'type' | 'size' | 'count' }[];\n } => {\n const next: ChatbarAttachment[] = [];\n const rejected: { file: File; reason: 'type' | 'size' | 'count' }[] = [];\n\n const remainingSlots =\n typeof maxAttachments === 'number'\n ? Math.max(maxAttachments - attachments.length, 0)\n : Infinity;\n\n for (const file of files) {\n if (next.length >= remainingSlots) {\n rejected.push({ file, reason: 'count' });\n continue;\n }\n if (typeof maxFileSize === 'number' && file.size > maxFileSize) {\n rejected.push({ file, reason: 'size' });\n continue;\n }\n if (!matchesAccept(file, accepts)) {\n rejected.push({ file, reason: 'type' });\n continue;\n }\n const id = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;\n const looksLikeImageByExt = /\\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(file.name);\n const isImageType = (file.type || '').toLowerCase().startsWith('image/');\n const url = isImageType || looksLikeImageByExt ? URL.createObjectURL(file) : undefined;\n if (url) generatedUrlSetRef.current.add(url);\n next.push({\n id,\n name: file.name,\n size: file.size,\n type: file.type,\n file,\n url,\n status: 'idle',\n });\n }\n return { accepted: next, rejected };\n };\n\n const appendFiles = (files: File[]) => {\n const { accepted, rejected } = mapFilesToAttachments(files);\n if (accepted.length > 0) {\n const merged = attachments.concat(accepted);\n if (!isAttachmentsControlled) setAttachmentsUncontrolled(merged);\n onAttachmentsChange?.(merged);\n }\n if (rejected.length > 0) onAttachmentReject?.(rejected);\n };\n\n const appendFilesFromPaste = (files: File[]) => {\n // Use pasteAccepts for type filtering\n const matches = (file: File) => {\n if (pasteAccepts.length === 0) return matchesAccept(file, accepts);\n return matchesAccept(file, pasteAccepts);\n };\n const acceptedFiles: File[] = [];\n const rejected: { file: File; reason: 'type' | 'size' | 'count' }[] = [];\n\n // Enforce maxAttachments and maxFileSize\n const remainingSlots =\n typeof maxAttachments === 'number'\n ? Math.max(maxAttachments - attachments.length, 0)\n : Infinity;\n for (const file of files) {\n if (acceptedFiles.length >= remainingSlots) {\n rejected.push({ file, reason: 'count' });\n continue;\n }\n if (typeof maxFileSize === 'number' && file.size > maxFileSize) {\n rejected.push({ file, reason: 'size' });\n continue;\n }\n if (!matches(file)) {\n rejected.push({ file, reason: 'type' });\n continue;\n }\n acceptedFiles.push(file);\n }\n if (acceptedFiles.length > 0) appendFiles(acceptedFiles);\n if (rejected.length > 0) onAttachmentReject?.(rejected);\n };\n\n // Revoke object URLs that are no longer referenced by current attachments\n React.useEffect(() => {\n const currentUrls = new Set(attachments.map((a) => a.url).filter(Boolean) as string[]);\n for (const url of Array.from(generatedUrlSetRef.current)) {\n if (!currentUrls.has(url)) {\n URL.revokeObjectURL(url);\n generatedUrlSetRef.current.delete(url);\n }\n }\n }, [attachments]);\n\n // Revoke any remaining generated URLs on unmount\n React.useEffect(() => {\n return () => {\n for (const url of Array.from(generatedUrlSetRef.current)) {\n URL.revokeObjectURL(url);\n }\n generatedUrlSetRef.current.clear();\n };\n }, []);\n\n const Comp = asChild ? Slot : ('div' as any);\n\n const handleBlurCapture = React.useCallback(\n (event: React.FocusEvent) => {\n const nextTarget = event.relatedTarget as Node | null;\n const rootEl = rootRef.current;\n if (!rootEl) return;\n // If focus remains within root, ignore\n if (nextTarget && rootEl.contains(nextTarget)) return;\n // Collapse when leaving the root if the value is empty\n if ((value?.trim?.() ?? '').length === 0) {\n if (!isOpenControlled) setOpenUncontrolled(false);\n onOpenChangeProp?.(false);\n }\n },\n [isOpenControlled, onOpenChangeProp, value],\n );\n\n // Dropzone functionality\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n onDrop: (acceptedFiles, rejectedFiles) => {\n if (acceptedFiles.length > 0) {\n appendFiles(acceptedFiles);\n }\n if (rejectedFiles.length > 0 && onAttachmentReject) {\n const rejections = rejectedFiles.map(({ file, errors }) => {\n const reason =\n errors[0]?.code === 'file-too-large'\n ? 'size'\n : errors[0]?.code === 'file-invalid-type'\n ? 'type'\n : 'count';\n return { file, reason: reason as 'type' | 'size' | 'count' };\n });\n onAttachmentReject(rejections);\n }\n },\n accept:\n accepts.length > 0\n ? accepts.reduce(\n (acc, pattern) => {\n if (pattern.includes('/')) {\n // MIME type pattern\n acc[pattern] = [];\n } else if (pattern.startsWith('.')) {\n // File extension pattern\n acc[pattern] = [];\n }\n return acc;\n },\n {} as Record<string, string[]>,\n )\n : undefined,\n multiple,\n maxSize: maxFileSize,\n noClick: true,\n noKeyboard: true,\n disabled: !dropzone || disabled,\n });\n\n return (\n <ChatbarContext.Provider\n value={{\n open,\n setOpen: (next) => {\n if (!isOpenControlled) setOpenUncontrolled(next);\n onOpenChangeProp?.(next);\n },\n isOpenControlled,\n value,\n setValue: (next) => {\n if (!isValueControlled) setValueUncontrolled(next);\n onValueChangeProp?.(next);\n },\n isValueControlled,\n size,\n expandOn,\n minLines,\n maxLines,\n sendMode,\n disabled,\n readOnly,\n onSubmit,\n rootRef,\n textareaRef,\n attachments,\n setAttachments: (next) => {\n if (!isAttachmentsControlled) setAttachmentsUncontrolled(next);\n onAttachmentsChange?.(next);\n },\n isAttachmentsControlled,\n accept,\n multiple,\n maxAttachments,\n maxFileSize,\n paste,\n pasteAccept,\n clearOnSubmit,\n onAttachmentReject,\n dropzone,\n appendFiles,\n appendFilesFromPaste,\n }}\n >\n <Comp\n {...divProps}\n ref={(node: HTMLDivElement) => {\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef)\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n (rootRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }}\n className={classNames('rt-ChatbarRoot', `rt-r-size-${size}`, className)}\n style={{ position: 'relative', width, maxWidth, ...style }}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n data-readonly={readOnly ? '' : undefined}\n data-drop-active={dropzone && isDragActive ? '' : undefined}\n aria-expanded={open}\n onBlurCapture={handleBlurCapture}\n >\n {dropzone && <input {...getInputProps()} />}\n <div {...(dropzone ? getRootProps() : {})} style={{ width: '100%', height: '100%' }}>\n <Card\n className=\"rt-ChatbarCard\"\n size={Math.min(3, Number(size) + 1).toString() as '1' | '2' | '3'}\n variant={variant as any}\n style={{ position: 'relative' }}\n >\n <div className=\"rt-ChatbarGrid\">{children}</div>\n {dropzone && isDragActive && (\n <div className=\"rt-ChatbarDropOverlay\">\n <div className=\"rt-ChatbarDropContent\">\n <Text color=\"gray\" size={size} weight=\"medium\">\n Drop files here to attach\n </Text>\n </div>\n </div>\n )}\n </Card>\n </div>\n </Comp>\n </ChatbarContext.Provider>\n );\n});\nRoot.displayName = 'Chatbar.Root';\n\n/**\n * Multi-line text input for Chatbar.\n * - Uses onChange to control value and avoid duplicate updates.\n * - Auto-resizes between minLines and maxLines.\n * - Expands on focus/overflow per `expandOn`.\n * - Paste-to-attach: when `paste` is enabled on Root, pasting files adds attachments.\n * - Provide `aria-label` or `aria-labelledby` for an accessible name.\n */\ninterface TextareaProps extends Omit<React.ComponentPropsWithoutRef<'textarea'>, 'size'> {\n asChild?: boolean;\n /**\n * Handler for paste events. This is forwarded to the underlying <textarea>.\n */\n onPaste?: React.ClipboardEventHandler<HTMLTextAreaElement>;\n /**\n * When true, pressing Enter submits via onSend (Shift+Enter inserts newline).\n * Defaults to false.\n */\n submitOnEnter?: boolean;\n}\n\n/**\n * Chatbar multi-line text input.\n *\n * Behavior\n * - Controls the Chatbar value via React onChange. We intentionally do not\n * update state in onInput to avoid duplicate updates per keystroke.\n * - Auto-resizes between minLines and maxLines using layout measurements.\n * - When expandOn is `overflow` or `both`, the Chatbar opens as soon as the\n * content exceeds the compact height.\n * - Height recalculations occur on change, paste, and whenever `value` or `open`\n * changes via an isomorphic layout effect to avoid SSR warnings.\n *\n * Accessibility\n * - Consumers should provide labeling via aria-label or aria-labelledby\n * on this component, as no implicit label is rendered.\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>((props, forwardedRef) => {\n const {\n className,\n style,\n asChild,\n onFocus,\n onInput,\n onChange,\n onPaste,\n onKeyDown,\n submitOnEnter = false,\n rows,\n ...textareaProps\n } = props;\n const ctx = useChatbarContext();\n const {\n open,\n minLines,\n maxLines,\n expandOn,\n disabled,\n readOnly,\n setOpen,\n setValue,\n textareaRef,\n value,\n isValueControlled,\n sendMode,\n paste,\n appendFilesFromPaste,\n size,\n } = ctx;\n\n // Cached metrics to avoid repeated getComputedStyle calls\n const lineHeightRef = React.useRef<number>(0);\n const paddingRef = React.useRef<number>(0);\n const compactHeightRef = React.useRef<number>(0);\n\n const recomputeMetrics = React.useCallback(() => {\n const el = textareaRef.current;\n if (!el) return;\n const computedStyle = window.getComputedStyle(el);\n const lineHeight = parseFloat(computedStyle.lineHeight) || 20;\n const paddingTop = parseFloat(computedStyle.paddingTop) || 0;\n const paddingBottom = parseFloat(computedStyle.paddingBottom) || 0;\n lineHeightRef.current = lineHeight;\n paddingRef.current = paddingTop + paddingBottom;\n compactHeightRef.current = Math.ceil(1 * lineHeight) + paddingTop + paddingBottom;\n }, [textareaRef]);\n\n // Auto-resize logic - optimized for fixed widths\n const updateHeight = React.useCallback(\n (forceOpen?: boolean) => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n textarea.style.height = 'auto';\n\n if (lineHeightRef.current === 0) {\n recomputeMetrics();\n }\n const lineHeight = lineHeightRef.current;\n const padding = paddingRef.current;\n\n const isOpen = forceOpen ?? open;\n const effectiveMinLines = isOpen ? minLines : 1;\n const effectiveMaxLines = isOpen ? maxLines : 1;\n\n const minHeight = Math.ceil(effectiveMinLines * lineHeight) + padding;\n const maxHeight = Math.ceil(effectiveMaxLines * lineHeight) + padding;\n\n const contentHeight = Math.max(textarea.scrollHeight, minHeight);\n const finalHeight = Math.min(contentHeight, maxHeight);\n\n textarea.style.height = `${finalHeight}px`;\n\n if (contentHeight > maxHeight) {\n textarea.style.overflowY = 'auto';\n textarea.style.maxHeight = `${maxHeight}px`;\n } else {\n textarea.style.overflowY = 'hidden';\n textarea.style.maxHeight = 'none';\n }\n },\n [open, minLines, maxLines, textareaRef, recomputeMetrics],\n );\n\n // Update height when value or open state changes\n useIsomorphicLayoutEffect(() => {\n updateHeight();\n }, [updateHeight, value, open]);\n\n // Recompute metrics on mount and when size changes may affect typography\n useIsomorphicLayoutEffect(() => {\n recomputeMetrics();\n updateHeight();\n }, [recomputeMetrics, updateHeight, size]);\n\n // Observe responsive changes that alter line-height\n React.useEffect(() => {\n const el = textareaRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return;\n let prevLineHeight = lineHeightRef.current;\n const ro = new ResizeObserver(() => {\n const computedStyle = window.getComputedStyle(el);\n const lh = parseFloat(computedStyle.lineHeight) || 20;\n if (lh !== prevLineHeight) {\n prevLineHeight = lh;\n recomputeMetrics();\n requestAnimationFrame(() => updateHeight());\n }\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, [textareaRef, recomputeMetrics, updateHeight]);\n\n // Dev-only warning if no accessible name is provided\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n const hasLabel =\n textareaProps['aria-label'] != null || textareaProps['aria-labelledby'] != null;\n if (!hasLabel) {\n // eslint-disable-next-line no-console\n console.warn(\n '[Chatbar.Textarea] Provide aria-label or aria-labelledby to ensure the control has an accessible name.',\n );\n }\n // warn only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Note: No MutationObserver is used because <textarea> value changes are not\n // reflected in DOM text nodes. Height updates are handled by effects and events.\n\n const handleFocus = React.useCallback<React.FocusEventHandler<HTMLTextAreaElement>>(\n (event) => {\n if (disabled || readOnly) return;\n if ((expandOn === 'focus' || expandOn === 'both') && !open) setOpen(true);\n onFocus?.(event);\n },\n [disabled, readOnly, expandOn, open, setOpen, onFocus],\n );\n\n const handleChange = React.useCallback<React.ChangeEventHandler<HTMLTextAreaElement>>(\n (event) => {\n const el = event.currentTarget;\n const nextValue = el.value;\n setValue(nextValue);\n\n if ((expandOn === 'overflow' || expandOn === 'both') && !open) {\n el.style.height = 'auto';\n\n if (compactHeightRef.current === 0) {\n recomputeMetrics();\n }\n const shouldExpand = el.scrollHeight > compactHeightRef.current + 1;\n if (shouldExpand) {\n setOpen(true);\n // Immediately size for open state to avoid 1-line + scrollbar flash\n updateHeight(true);\n requestAnimationFrame(() => updateHeight(true));\n }\n }\n\n // Always recalc after any input\n requestAnimationFrame(() => updateHeight());\n onChange?.(event);\n },\n [expandOn, open, setOpen, setValue, onChange, updateHeight, recomputeMetrics],\n );\n\n const handlePaste = React.useCallback<React.ClipboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n // Attach files from clipboard if enabled\n if (paste) {\n const items = Array.from(event.clipboardData?.items ?? []);\n const files = items\n .filter((i) => i.kind === 'file')\n .map((i) => i.getAsFile())\n .filter((f): f is File => !!f);\n if (files.length > 0) {\n appendFilesFromPaste(files);\n }\n }\n setTimeout(() => {\n // If pasting in compact mode, force sizing as open if content overflowed\n if (!open) {\n updateHeight(true);\n } else {\n updateHeight();\n }\n }, 0);\n onPaste?.(event);\n },\n [paste, open, updateHeight, onPaste, appendFilesFromPaste],\n );\n\n const handleKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n if (!submitOnEnter) {\n onKeyDown?.(event);\n return;\n }\n if (\n event.key === 'Enter' &&\n !event.shiftKey &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.nativeEvent.isComposing\n ) {\n if (disabled || readOnly) {\n onKeyDown?.(event);\n return;\n }\n if (sendMode === 'never') {\n onKeyDown?.(event);\n return;\n }\n const trimmed = value.trim();\n const hasContent = trimmed.length > 0 || ctx.attachments.length > 0;\n if (sendMode === 'whenDirty' && !hasContent) {\n onKeyDown?.(event);\n return;\n }\n event.preventDefault();\n ctx.onSubmit?.({ value, attachments: ctx.attachments });\n if (ctx.clearOnSubmit) {\n if (!isValueControlled) setValue('');\n ctx.setAttachments([]);\n }\n }\n onKeyDown?.(event);\n },\n [\n submitOnEnter,\n disabled,\n readOnly,\n sendMode,\n value,\n isValueControlled,\n setValue,\n ctx,\n onKeyDown,\n ],\n );\n\n const Comp = asChild ? Slot : ('textarea' as any);\n return (\n <div className={classNames('rt-ChatbarField', 'rt-ChatbarTextarea', className)}>\n <Comp\n {...textareaProps}\n ref={(node: HTMLTextAreaElement) => {\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef)\n (forwardedRef as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n (textareaRef as React.MutableRefObject<HTMLTextAreaElement | null>).current = node;\n }}\n className=\"rt-ChatbarInput\"\n value={value}\n onInput={onInput}\n onChange={handleChange}\n onFocus={handleFocus}\n onPaste={handlePaste}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n readOnly={readOnly}\n rows={open ? minLines : 1}\n spellCheck={textareaProps.spellCheck ?? true}\n autoCorrect={textareaProps.autoCorrect ?? 'on'}\n style={style}\n />\n </div>\n );\n});\nTextarea.displayName = 'Chatbar.Textarea';\n\ninterface InlineSlotProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst InlineStart = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, style, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : ('div' as any);\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarInlineStart', className)}\n style={style}\n >\n {children}\n </Comp>\n );\n});\nInlineStart.displayName = 'Chatbar.InlineStart';\n\nconst InlineEnd = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, style, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : ('div' as any);\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarInlineEnd', className)}\n style={style}\n >\n {children}\n </Comp>\n );\n});\nInlineEnd.displayName = 'Chatbar.InlineEnd';\n\n/**\n * Renders a horizontally scrollable list of attachments above the inline row.\n * Hidden when empty unless `forceMount`. Override per-item with `renderAttachment`.\n */\ninterface AttachmentsRowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n forceMount?: boolean;\n /** If provided, custom-render a tile; otherwise default tile is used */\n renderAttachment?: (attachment: ChatbarAttachment) => React.ReactNode;\n}\n\nconst AttachmentsRow = React.forwardRef<HTMLDivElement, AttachmentsRowProps>(\n (props, forwardedRef) => {\n const { asChild, forceMount, renderAttachment, className, style, ...divProps } = props;\n const ctx = useChatbarContext();\n const hasItems = ctx.attachments.length > 0;\n if (!hasItems && !forceMount) return null;\n const Comp = asChild ? Slot : ('div' as any);\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachmentsRow', className)}\n style={style}\n role=\"list\"\n aria-label={divProps['aria-label'] ?? 'Attachments'}\n >\n <ScrollArea className=\"rt-ChatbarScrollArea\" scrollbars=\"horizontal\" size=\"1\">\n <Flex align=\"center\" gap=\"2\" style={{ minWidth: 'fit-content' }}>\n {ctx.attachments.map((att) => (\n <Attachment key={att.id} attachment={att} asChild={!!renderAttachment}>\n {renderAttachment?.(att)}\n </Attachment>\n ))}\n </Flex>\n </ScrollArea>\n </Comp>\n );\n },\n);\nAttachmentsRow.displayName = 'Chatbar.AttachmentsRow';\n\n/** Default tile renderer for a single attachment. */\ninterface AttachmentProps extends React.ComponentPropsWithoutRef<'div'> {\n attachment: ChatbarAttachment;\n asChild?: boolean;\n}\n\nconst Attachment = React.forwardRef<HTMLDivElement, AttachmentProps>((props, forwardedRef) => {\n const { attachment, asChild, className, style, children, ...divProps } = props;\n const ctx = useChatbarContext();\n const Comp = asChild ? Slot : ('div' as any);\n const isImage = !!attachment.url && attachment.type.startsWith('image/');\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachment', className)}\n style={style}\n role=\"listitem\"\n data-kind={isImage ? 'image' : 'file'}\n title={attachment.name}\n >\n {children ?? (\n <Card size={ctx.size} variant=\"soft\">\n <Flex align=\"center\" gap=\"3\" pr={!isImage ? '6' : undefined}>\n <div className=\"rt-ChatbarAttachmentPreview\" aria-hidden>\n {isImage ? (\n <img className=\"rt-ChatbarAttachmentImage\" src={attachment.url} alt=\"\" />\n ) : (\n <FileTextIcon />\n )}\n </div>\n {!isImage && (\n <Flex direction=\"column\" gap=\"0\" style={{ minWidth: 0 }}>\n <Text\n size={ctx.size}\n weight=\"medium\"\n style={{ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}\n >\n {attachment.name}\n </Text>\n <Text size=\"1\" color=\"gray\">\n {Math.ceil(attachment.size / 1024)} KB\n </Text>\n </Flex>\n )}\n <IconButton\n className=\"rt-ChatbarAttachmentRemove\"\n aria-label={`Remove ${attachment.name}`}\n size=\"1\"\n // size={ctx.size}\n variant=\"classic\"\n highContrast\n color=\"gray\"\n onClick={() =>\n ctx.setAttachments(ctx.attachments.filter((a) => a.id !== attachment.id))\n }\n >\n <CloseIcon />\n </IconButton>\n </Flex>\n </Card>\n )}\n </Comp>\n );\n});\nAttachment.displayName = 'Chatbar.Attachment';\n\ninterface AttachTriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n accept?: string | string[];\n multiple?: boolean;\n}\n\nconst AttachTrigger = React.forwardRef<HTMLButtonElement, AttachTriggerProps>(\n (props, forwardedRef) => {\n const { asChild, accept, multiple, className, style, ...buttonProps } = props;\n const ctx = useChatbarContext();\n const inputRef = React.useRef<HTMLInputElement | null>(null);\n const Comp = asChild ? Slot : ('button' as any);\n const actualAccept = (Array.isArray(accept) ? accept : (accept?.split(',') ?? [])).join(',');\n return (\n <>\n <Comp\n {...(buttonProps as any)}\n ref={forwardedRef as any}\n className={classNames('rt-ChatbarAttachTrigger', className)}\n style={style}\n type={buttonProps.type ?? 'button'}\n aria-label={buttonProps['aria-label'] ?? 'Add attachments'}\n onClick={(e: any) => {\n // Ensure file input opens reliably by clicking it first\n if (inputRef.current) {\n inputRef.current.click();\n }\n // Then call user's onClick if provided\n buttonProps.onClick?.(e);\n }}\n />\n <input\n ref={inputRef}\n type=\"file\"\n accept={actualAccept}\n multiple={multiple ?? ctx.multiple}\n tabIndex={-1}\n style={{ display: 'none' }}\n onChange={(e) => {\n const files = Array.from(e.currentTarget.files ?? []);\n if (files.length > 0) {\n ctx.appendFiles(files);\n }\n // Reset input value to allow selecting the same file again\n e.currentTarget.value = '';\n }}\n />\n </>\n );\n },\n);\nAttachTrigger.displayName = 'Chatbar.AttachTrigger';\ninterface RowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst Row = React.forwardRef<HTMLDivElement, RowProps>((props, forwardedRef) => {\n const { asChild, children, className, style, ...divProps } = props;\n const ctx = useChatbarContext();\n if (!ctx.open) return null;\n const Comp = asChild ? Slot : ('div' as any);\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarRow', className)}\n style={style}\n >\n <Flex align=\"center\" justify=\"between\" width=\"100%\">\n {children}\n </Flex>\n </Comp>\n );\n});\nRow.displayName = 'Chatbar.Row';\n\nconst RowStart = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(\n (props, forwardedRef) => {\n const { className, style, ...divProps } = props;\n return (\n <div\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarRowStart', className)}\n style={style}\n />\n );\n },\n);\nRowStart.displayName = 'Chatbar.RowStart';\n\nconst RowEnd = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(\n (props, forwardedRef) => {\n const { className, style, ...divProps } = props;\n return (\n <div\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarRowEnd', className)}\n style={style}\n />\n );\n },\n);\nRowEnd.displayName = 'Chatbar.RowEnd';\n\ninterface SendProps extends Omit<IconButtonProps, 'size'> {\n asChild?: boolean;\n clearOnSend?: boolean;\n}\n\nconst Send = React.forwardRef<HTMLButtonElement, SendProps>((props, forwardedRef) => {\n const {\n asChild,\n clearOnSend = true,\n disabled,\n children,\n className,\n style,\n ...buttonProps\n } = props;\n const ctx = useChatbarContext();\n\n const trimmed = ctx.value.trim();\n const hasContent = trimmed.length > 0 || ctx.attachments.length > 0;\n const visible = ctx.sendMode === 'always' || (ctx.sendMode === 'whenDirty' && hasContent);\n if (ctx.sendMode === 'never') return null;\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (ctx.disabled || ctx.readOnly) return;\n ctx.onSubmit?.({ value: ctx.value, attachments: ctx.attachments });\n if (clearOnSend) {\n if (!ctx.isValueControlled) ctx.setValue('');\n if (ctx.clearOnSubmit) ctx.setAttachments([]);\n }\n buttonProps.onClick?.(event);\n };\n\n return (\n <IconButton\n {...(buttonProps as any)}\n ref={forwardedRef as any}\n size={ctx.size}\n variant={ctx.open ? 'solid' : 'ghost'}\n disabled={disabled || ctx.disabled || ctx.readOnly}\n className={classNames('rt-ChatbarSend', className)}\n style={{\n opacity: visible ? 1 : 0,\n pointerEvents: visible ? 'auto' : 'none',\n ...style,\n }}\n asChild={asChild}\n onClick={handleClick}\n aria-label={buttonProps['aria-label'] ?? 'Send'}\n >\n {children ?? 'Send'}\n </IconButton>\n );\n});\nSend.displayName = 'Chatbar.Send';\n\nexport {\n Root,\n Textarea,\n InlineStart,\n InlineEnd,\n AttachmentsRow,\n Attachment,\n AttachTrigger,\n Row,\n RowStart,\n RowEnd,\n Send,\n};\nexport type {\n RootProps as ChatbarRootProps,\n TextareaProps as ChatbarTextareaProps,\n RowProps as ChatbarRowProps,\n SendProps as ChatbarSendProps,\n ChatbarAttachment,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,cAAAC,OAAwC,mBACjD,OAAS,aAAAC,GAAW,gBAAAC,OAAoB,aACxC,OAAS,QAAAC,OAAY,YAErB,OAAS,cAAAC,OAAkB,mBAC3B,OAAS,QAAAC,MAAY,YACrB,OAAS,QAAAC,OAAY,YACrB,OAAS,QAAAC,OAAY,YACrB,OAAS,eAAAC,OAAmB,iBAI5B,MAAMC,GACJ,OAAO,OAAW,IAAcX,EAAM,gBAAkBA,EAAM,UA0E1DY,GAAiBZ,EAAM,cAA0C,IAAI,EACrEa,EAAoB,IAAM,CAC9B,MAAMC,EAAMd,EAAM,WAAWY,EAAc,EAC3C,GAAI,CAACE,EAAK,MAAM,IAAI,MAAM,0DAA0D,EACpF,OAAOA,CACT,EA8GMC,GAAOf,EAAM,WAAmC,CAACgB,EAAOC,IAAiB,CAC7E,KAAM,CACJ,UAAAC,EACA,MAAAC,EACA,SAAAC,EAC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I,SAC1C,UAAWb,EAAW,iBAAkBiB,CAAS,EACjD,MAAO,CACL,QAAS6J,EAAU,EAAI,EACvB,cAAeA,EAAU,OAAS,OAClC,GAAG5J,CACL,EACA,QAASmB,EACT,QAAS0I,EACT,aAAYV,EAAY,YAAY,GAAK,QAExClJ,GAAY,MACf,CAEJ,CAAC,EACDyJ,GAAK,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "IconButton", "CloseIcon", "FileTextIcon", "Flex", "ScrollArea", "Slot", "Card", "Text", "useDropzone", "useIsomorphicLayoutEffect", "ChatbarContext", "useChatbarContext", "ctx", "Root", "props", "forwardedRef", "className", "style", "children", "valueProp", "defaultValue", "onValueChangeProp", "openProp", "defaultOpen", "onOpenChangeProp", "expandOn", "minLines", "maxLines", "sendMode", "disabled", "readOnly", "onSubmit", "size", "variant", "width", "maxWidth", "asChild", "attachmentsProp", "defaultAttachments", "onAttachmentsChange", "accept", "multiple", "maxAttachments", "maxFileSize", "paste", "pasteAccept", "clearOnSubmit", "onAttachmentReject", "dropzone", "divProps", "isValueControlled", "valueUncontrolled", "setValueUncontrolled", "value", "isOpenControlled", "openUncontrolled", "setOpenUncontrolled", "open", "rootRef", "textareaRef", "isAttachmentsControlled", "attachmentsUncontrolled", "setAttachmentsUncontrolled", "attachments", "generatedUrlSetRef", "toArray", "val", "s", "accepts", "pasteAccepts", "matchesAccept", "file", "patterns", "mime", "name", "patRaw", "pat", "type", "subtype", "fmType", "fmSubtype", "mapFilesToAttachments", "files", "next", "rejected", "remainingSlots", "id", "looksLikeImageByExt", "url", "appendFiles", "accepted", "merged", "appendFilesFromPaste", "matches", "acceptedFiles", "currentUrls", "a", "Comp", "handleBlurCapture", "event", "nextTarget", "rootEl", "getRootProps", "getInputProps", "isDragActive", "rejectedFiles", "rejections", "errors", "reason", "acc", "pattern", "node", "Textarea", "onFocus", "onInput", "onChange", "onPaste", "onKeyDown", "submitOnEnter", "rows", "textareaProps", "setOpen", "setValue", "lineHeightRef", "paddingRef", "compactHeightRef", "recomputeMetrics", "el", "computedStyle", "lineHeight", "paddingTop", "paddingBottom", "updateHeight", "forceOpen", "textarea", "padding", "isOpen", "effectiveMinLines", "effectiveMaxLines", "minHeight", "maxHeight", "contentHeight", "finalHeight", "prevLineHeight", "ro", "lh", "handleFocus", "handleChange", "nextValue", "handlePaste", "i", "f", "handleKeyDown", "hasContent", "InlineStart", "InlineEnd", "AttachmentsRow", "forceMount", "renderAttachment", "att", "Attachment", "attachment", "isImage", "AttachTrigger", "buttonProps", "inputRef", "actualAccept", "e", "Row", "RowStart", "RowEnd", "Send", "clearOnSend", "visible", "handleClick"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,KAAK,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAE7D;;;;;;;;GAQG;AACH,KAAK,kBAAkB,GACnB;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAAE,GACnD;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC;AAEnF;;;GAGG;AACH,UAAU,sBAAsB;IAC9B,uDAAuD;IACvD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yDAAyD;IACzD,WAAW,CAAC,EAAE,KAAK,GAAG,OAAO,GAA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AAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAA;CAAE,KACxE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,QAAA,MAAM,UAAU,EAoEX,mBAAmB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAIpD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import*as e from"react";import
|
|
1
|
+
import*as e from"react";import I from"classnames";import{BaseButton as f}from"./_internal/base-button.js";import{Tooltip as P}from"./tooltip.js";const l=e.forwardRef(({className:i,tooltip:o,tooltipSide:s="top",tooltipAlign:c="center",tooltipDelayDuration:p,tooltipDisableHoverableContent:b,...t},u)=>{const n=e.useId(),d="aria-label"in t&&t["aria-label"],m="aria-labelledby"in t&&t["aria-labelledby"],B="children"in t&&t.children;if(!d&&!m&&!B)throw new 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
|
-
- or visible text children`);const n=e.createElement(
|
|
4
|
+
- or visible text children`);const a=!!o,y=e.useMemo(()=>a?{"aria-describedby":n}:{},[a,n]),r=e.createElement(f,{...t,...y,ref:u,className:I("rt-IconButton",i)});return o?e.createElement(P,{content:o,side:s,align:c,delayDuration:p,disableHoverableContent:b,id:n},r):r});l.displayName="IconButton";export{l as IconButton};
|
|
5
5
|
//# sourceMappingURL=icon-button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/icon-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 type { BaseButtonProps } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Required accessibility props for icon buttons\n * Icon buttons must have an accessible name to meet WCAG guidelines\n *\n * Three ways to provide accessibility:\n * 1. aria-label: Direct descriptive text\n * 2. aria-labelledby: Reference to a label element\n * 3. children: Visible text content (fallback)\n */\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n/**\n * Tooltip configuration props that can be passed to IconButton\n * These props are forwarded to the underlying Tooltip component\n */\ninterface IconButtonTooltipProps {\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 IconButton props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with accessibility requirements and tooltip functionality\n */\ntype IconButtonOwnProps = Omit<BaseButtonProps, 'as'> & AccessibilityProps & IconButtonTooltipProps;\n\n/**\n * Polymorphic IconButton props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;\n\n/**\n * IconButton component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(\n props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> },\n) => React.ReactElement | null;\n\n/**\n * IconButton component for compact, accessible icon-only interactions\n *\n * The IconButton component extends Button with specialized behavior for visual symbols.\n * It enforces accessibility requirements, provides automatic square sizing, and includes\n * built-in tooltip integration. Icon buttons are essential for space-efficient interfaces\n * while maintaining accessibility compliance.\n *\n * Key features:\n * - Enforced accessibility requirements (aria-label, aria-labelledby, or children)\n * - Automatic square aspect ratios for consistent visual alignment\n * - Built-in tooltip support for context and guidance\n * - Same variant and size system as Button for consistency\n * - Runtime validation for accessibility compliance\n *\n * @example\n * ```tsx\n * // Basic icon button with aria-label\n * <IconButton aria-label=\"Settings\">\n * <Settings />\n * </IconButton>\n *\n * // Icon button with tooltip\n * <IconButton aria-label=\"Save\" tooltip=\"Save your progress\">\n * <Save />\n * </IconButton>\n *\n * // Icon button with aria-labelledby\n * <IconButton aria-labelledby=\"settings-label\">\n * <Settings />\n * </IconButton>\n * <span id=\"settings-label\">Open settings panel</span>\n *\n * // Icon button with visible text (fallback)\n * <IconButton>\n * <Settings />\n * Settings\n * </IconButton>\n * ```\n */\nconst IconButton = React.forwardRef(\n (\n {\n className,\n tooltip,\n tooltipSide = 'top',\n tooltipAlign = 'center',\n tooltipDelayDuration,\n tooltipDisableHoverableContent,\n ...props\n }: IconButtonProps,\n forwardedRef: React.ForwardedRef<IconButtonElement>,\n ) => {\n // Runtime accessibility validation to ensure WCAG compliance\n // This helps catch accessibility issues during development\n const hasAriaLabel = 'aria-label' in props && props['aria-label'];\n const hasAriaLabelledBy = 'aria-labelledby' in props && props['aria-labelledby'];\n const hasChildren = 'children' in props && props.children;\n\n // Throw descriptive error if no accessible name is provided\n if (!hasAriaLabel && !hasAriaLabelledBy && !hasChildren) {\n throw new Error(\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 );\n }\n\n // Create the base icon button element with accessibility props\n const iconButton = (\n <BaseButton\n {...props}\n ref={forwardedRef}\n className={classNames('rt-IconButton', className)}\n />\n );\n\n // If no tooltip is provided, return the icon button as-is for better performance\n if (!tooltip) {\n return iconButton;\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\n content={tooltip}\n side={tooltipSide}\n align={tooltipAlign}\n delayDuration={tooltipDelayDuration}\n disableHoverableContent={tooltipDisableHoverableContent}\n >\n {iconButton}\n </Tooltip>\n );\n },\n) as IconButtonComponent & { displayName?: string };\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton };\nexport type { IconButtonProps };\n"],
|
|
5
|
-
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,cAAAC,MAAkB,6BAC3B,OAAS,WAAAC,MAAe,eAmGxB,MAAMC,EAAaJ,EAAM,WACvB,CACE,CACE,UAAAK,EACA,QAAAC,EACA,YAAAC,EAAc,MACd,aAAAC,EAAe,SACf,qBAAAC,EACA,+BAAAC,EACA,GAAGC,CACL,EACAC,IACG,
|
|
6
|
-
"names": ["React", "classNames", "BaseButton", "Tooltip", "IconButton", "className", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "props", "forwardedRef", "hasAriaLabel", "hasAriaLabelledBy", "hasChildren", "iconButton"]
|
|
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 type { BaseButtonProps } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Required accessibility props for icon buttons\n * Icon buttons must have an accessible name to meet WCAG guidelines\n *\n * Three ways to provide accessibility:\n * 1. aria-label: Direct descriptive text\n * 2. aria-labelledby: Reference to a label element\n * 3. children: Visible text content (fallback)\n */\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n/**\n * Tooltip configuration props that can be passed to IconButton\n * These props are forwarded to the underlying Tooltip component\n */\ninterface IconButtonTooltipProps {\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 IconButton props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with accessibility requirements and tooltip functionality\n */\ntype IconButtonOwnProps = Omit<BaseButtonProps, 'as'> & AccessibilityProps & IconButtonTooltipProps;\n\n/**\n * Polymorphic IconButton props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;\n\n/**\n * IconButton component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(\n props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> },\n) => React.ReactElement | null;\n\n/**\n * IconButton component for compact, accessible icon-only interactions\n *\n * The IconButton component extends Button with specialized behavior for visual symbols.\n * It enforces accessibility requirements, provides automatic square sizing, and includes\n * built-in tooltip integration. Icon buttons are essential for space-efficient interfaces\n * while maintaining accessibility compliance.\n *\n * Key features:\n * - Enforced accessibility requirements (aria-label, aria-labelledby, or children)\n * - Automatic square aspect ratios for consistent visual alignment\n * - Built-in tooltip support for context and guidance\n * - Same variant and size system as Button for consistency\n * - Runtime validation for accessibility compliance\n *\n * @example\n * ```tsx\n * // Basic icon button with aria-label\n * <IconButton aria-label=\"Settings\">\n * <Settings />\n * </IconButton>\n *\n * // Icon button with tooltip\n * <IconButton aria-label=\"Save\" tooltip=\"Save your progress\">\n * <Save />\n * </IconButton>\n *\n * // Icon button with aria-labelledby\n * <IconButton aria-labelledby=\"settings-label\">\n * <Settings />\n * </IconButton>\n * <span id=\"settings-label\">Open settings panel</span>\n *\n * // Icon button with visible text (fallback)\n * <IconButton>\n * <Settings />\n * Settings\n * </IconButton>\n * ```\n */\nconst IconButton = React.forwardRef(\n (\n {\n className,\n tooltip,\n tooltipSide = 'top',\n tooltipAlign = 'center',\n tooltipDelayDuration,\n tooltipDisableHoverableContent,\n ...props\n }: IconButtonProps,\n forwardedRef: React.ForwardedRef<IconButtonElement>,\n ) => {\n // Generate unique ID for tooltip accessibility\n const tooltipId = React.useId();\n // Runtime accessibility validation to ensure WCAG compliance\n // This helps catch accessibility issues during development\n const hasAriaLabel = 'aria-label' in props && props['aria-label'];\n const hasAriaLabelledBy = 'aria-labelledby' in props && props['aria-labelledby'];\n const hasChildren = 'children' in props && props.children;\n\n // Throw descriptive error if no accessible name is provided\n if (!hasAriaLabel && !hasAriaLabelledBy && !hasChildren) {\n throw new Error(\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 );\n }\n\n // Prepare accessibility props for tooltip integration\n const hasTooltip = Boolean(tooltip);\n const tooltipAccessibilityProps = React.useMemo(\n () => (hasTooltip ? { 'aria-describedby': tooltipId } : {}),\n [hasTooltip, tooltipId],\n );\n\n // Create the base icon button element with accessibility props\n const iconButton = (\n <BaseButton\n {...props}\n {...tooltipAccessibilityProps}\n ref={forwardedRef}\n className={classNames('rt-IconButton', className)}\n />\n );\n\n // If no tooltip is provided, return the icon button as-is for better performance\n if (!tooltip) {\n return iconButton;\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\n content={tooltip}\n side={tooltipSide}\n align={tooltipAlign}\n delayDuration={tooltipDelayDuration}\n disableHoverableContent={tooltipDisableHoverableContent}\n id={tooltipId}\n >\n {iconButton}\n </Tooltip>\n );\n },\n) as IconButtonComponent & { displayName?: string };\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton };\nexport type { IconButtonProps };\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAEvB,OAAS,cAAAC,MAAkB,6BAC3B,OAAS,WAAAC,MAAe,eAmGxB,MAAMC,EAAaJ,EAAM,WACvB,CACE,CACE,UAAAK,EACA,QAAAC,EACA,YAAAC,EAAc,MACd,aAAAC,EAAe,SACf,qBAAAC,EACA,+BAAAC,EACA,GAAGC,CACL,EACAC,IACG,CAEH,MAAMC,EAAYb,EAAM,MAAM,EAGxBc,EAAe,eAAgBH,GAASA,EAAM,YAAY,EAC1DI,EAAoB,oBAAqBJ,GAASA,EAAM,iBAAiB,EACzEK,EAAc,aAAcL,GAASA,EAAM,SAGjD,GAAI,CAACG,GAAgB,CAACC,GAAqB,CAACC,EAC1C,MAAM,IAAI,MACR;AAAA;AAAA;AAAA,2BAIF,EAIF,MAAMC,EAAa,EAAQX,EACrBY,EAA4BlB,EAAM,QACtC,IAAOiB,EAAa,CAAE,mBAAoBJ,CAAU,EAAI,CAAC,EACzD,CAACI,EAAYJ,CAAS,CACxB,EAGMM,EACJnB,EAAA,cAACE,EAAA,CACE,GAAGS,EACH,GAAGO,EACJ,IAAKN,EACL,UAAWX,EAAW,gBAAiBI,CAAS,EAClD,EAIF,OAAKC,EAOHN,EAAA,cAACG,EAAA,CACC,QAASG,EACT,KAAMC,EACN,MAAOC,EACP,cAAeC,EACf,wBAAyBC,EACzB,GAAIG,GAEHM,CACH,EAfOA,CAiBX,CACF,EAEAf,EAAW,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "BaseButton", "Tooltip", "IconButton", "className", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "props", "forwardedRef", "tooltipId", "hasAriaLabel", "hasAriaLabelledBy", "hasChildren", "hasTooltip", "tooltipAccessibilityProps", "iconButton"]
|
|
7
7
|
}
|
|
@@ -7,6 +7,11 @@ declare const ThickCheckIcon: React.ForwardRefExoticComponent<IconProps & React.
|
|
|
7
7
|
declare const ChevronDownIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
8
8
|
declare const ThickChevronRightIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
9
9
|
declare const ThickDotIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
10
|
-
export { ChevronDownIcon, ThickCheckIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };
|
|
10
|
+
export { ChevronDownIcon, ThickCheckIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon, };
|
|
11
11
|
export type { IconProps };
|
|
12
|
+
declare const CloseIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
13
|
+
declare const PaperclipIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
14
|
+
declare const FileIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
15
|
+
declare const FileTextIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
16
|
+
export { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon };
|
|
12
17
|
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGzF,UAAU,SAAU,SAAQ,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,CAAC;CAAG;AAEtF,QAAA,MAAM,0BAA0B,iFAoB/B,CAAC;AAIF,QAAA,MAAM,cAAc,iFAkBlB,CAAC;AAGH,QAAA,MAAM,eAAe,iFAcnB,CAAC;AAGH,QAAA,MAAM,qBAAqB,iFAkBzB,CAAC;AAGH,QAAA,MAAM,YAAY,iFAchB,CAAC;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGzF,UAAU,SAAU,SAAQ,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,UAAU,CAAC;CAAG;AAEtF,QAAA,MAAM,0BAA0B,iFAoB/B,CAAC;AAIF,QAAA,MAAM,cAAc,iFAkBlB,CAAC;AAGH,QAAA,MAAM,eAAe,iFAcnB,CAAC;AAGH,QAAA,MAAM,qBAAqB,iFAkBzB,CAAC;AAGH,QAAA,MAAM,YAAY,iFAchB,CAAC;AAGH,OAAO,EACL,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,YAAY,GACb,CAAC;AACF,YAAY,EAAE,SAAS,EAAE,CAAC;AAG1B,QAAA,MAAM,SAAS,iFAmBb,CAAC;AAGH,QAAA,MAAM,aAAa,iFAkBjB,CAAC;AAGH,QAAA,MAAM,QAAQ,iFAiBZ,CAAC;AAGH,QAAA,MAAM,YAAY,iFAoBhB,CAAC;AAGH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";const n=o.forwardRef((e,r)=>o.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));n.displayName="ThickDividerHorizontalIcon";const t=o.forwardRef((e,r)=>o.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));t.displayName="ThickCheckIcon";const i=o.forwardRef((e,r)=>o.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));i.displayName="ChevronDownIcon";const
|
|
1
|
+
import o from"react";const n=o.forwardRef((e,r)=>o.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));n.displayName="ThickDividerHorizontalIcon";const t=o.forwardRef((e,r)=>o.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));t.displayName="ThickCheckIcon";const i=o.forwardRef((e,r)=>o.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));i.displayName="ChevronDownIcon";const s=o.forwardRef((e,r)=>o.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));s.displayName="ThickChevronRightIcon";const l=o.forwardRef((e,r)=>o.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...e,ref:r},o.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));l.displayName="ThickDotIcon";const h=o.forwardRef((e,r)=>o.createElement("svg",{...e,ref:r,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"},o.createElement("path",{d:"M18 6 6 18"}),o.createElement("path",{d:"m6 6 12 12"})));h.displayName="CloseIcon";const p=o.forwardRef((e,r)=>o.createElement("svg",{...e,ref:r,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"},o.createElement("path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"})));p.displayName="PaperclipIcon";const d=o.forwardRef((e,r)=>o.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"},o.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),o.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));d.displayName="FileIcon";const w=o.forwardRef((e,r)=>o.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"},o.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),o.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),o.createElement("path",{d:"M10 9H8"}),o.createElement("path",{d:"M16 13H8"}),o.createElement("path",{d:"M16 17H8"})));w.displayName="FileTextIcon";export{i as ChevronDownIcon,h as CloseIcon,d as FileIcon,w as FileTextIcon,p as PaperclipIcon,t as ThickCheckIcon,s as ThickChevronRightIcon,n as ThickDividerHorizontalIcon,l as ThickDotIcon};
|
|
2
2
|
//# sourceMappingURL=icons.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/icons.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>(\n (props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n }
|
|
5
|
-
"mappings": "AAAA,OAAOA,MAAW,QAOlB,MAAMC,EAA6BD,EAAM,WACvC,CAACE,EAAOC,IAEJH,EAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGE,EACJ,IAAKC,GAELH,EAAA,cAAC,QACC,SAAS,UACT,SAAS,UACT,EAAE,iKACJ,CACF,CAGN,EAEAC,EAA2B,YAAc,6BAEzC,MAAMG,EAAiBJ,EAAM,WAAmC,CAACE,EAAOC,IAEpEH,EAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGE,EACJ,IAAKC,GAELH,EAAA,cAAC,QACC,SAAS,UACT,SAAS,UACT,EAAE,sXACJ,CACF,CAEH,EACDI,EAAe,YAAc,iBAE7B,MAAMC,EAAkBL,EAAM,WAAmC,CAACE,EAAOC,IAErEH,EAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGE,EACJ,IAAKC,GAELH,EAAA,cAAC,QAAK,EAAE,+TAA+T,CACzU,CAEH,EACDK,EAAgB,YAAc,kBAE9B,MAAMC,EAAwBN,EAAM,WAAmC,CAACE,EAAOC,IAE3EH,EAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGE,EACJ,IAAKC,GAELH,EAAA,cAAC,QACC,SAAS,UACT,SAAS,UACT,EAAE,2UACJ,CACF,CAEH,EACDM,EAAsB,YAAc,wBAEpC,MAAMC,EAAeP,EAAM,WAAmC,CAACE,EAAOC,IAElEH,EAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGE,EACJ,IAAKC,GAELH,EAAA,cAAC,UAAO,GAAG,MAAM,GAAG,MAAM,EAAE,IAAI,CAClC,CAEH,EACDO,EAAa,YAAc",
|
|
6
|
-
"names": ["React", "ThickDividerHorizontalIcon", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickDotIcon"]
|
|
4
|
+
"sourcesContent": ["import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>(\n (props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n },\n);\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 9 9\"\n fill=\"currentcolor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n ref={forwardedRef}\n >\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport {\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n ThickDotIcon,\n};\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon };\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAW,QAOlB,MAAMC,EAA6BD,EAAM,WACvC,CAACE,EAAOC,IAEJH,EAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGE,EACJ,IAAKC,GAELH,EAAA,cAAC,QACC,SAAS,UACT,SAAS,UACT,EAAE,iKACJ,CACF,CAGN,EAEAC,EAA2B,YAAc,6BAEzC,MAAMG,EAAiBJ,EAAM,WAAmC,CAACE,EAAOC,IAEpEH,EAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGE,EACJ,IAAKC,GAELH,EAAA,cAAC,QACC,SAAS,UACT,SAAS,UACT,EAAE,sXACJ,CACF,CAEH,EACDI,EAAe,YAAc,iBAE7B,MAAMC,EAAkBL,EAAM,WAAmC,CAACE,EAAOC,IAErEH,EAAA,cAAC,OACC,MAAM,IACN,OAAO,IACP,QAAQ,UACR,KAAK,eACL,MAAM,6BACL,GAAGE,EACJ,IAAKC,GAELH,EAAA,cAAC,QA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O,eACP,YAAY,IACZ,cAAc,QACd,eAAe,SAEfA,EAAA,cAAC,QAAK,EAAE,6DAA6D,EACrEA,EAAA,cAAC,QAAK,EAAE,0BAA0B,CACpC,CAEH,EACDY,EAAS,YAAc,WAEvB,MAAMC,EAAeb,EAAM,WAAmC,CAACS,EAAQC,IAEnEV,EAAA,cAAC,OACC,MAAM,6BACN,MAAM,KACN,OAAO,KACP,QAAQ,YACR,KAAK,OACL,OAAO,eACP,YAAY,IACZ,cAAc,QACd,eAAe,SAEfA,EAAA,cAAC,QAAK,EAAE,6DAA6D,EACrEA,EAAA,cAAC,QAAK,EAAE,0BAA0B,EAClCA,EAAA,cAAC,QAAK,EAAE,UAAU,EAClBA,EAAA,cAAC,QAAK,EAAE,WAAW,EACnBA,EAAA,cAAC,QAAK,EAAE,WAAW,CACrB,CAEH,EACDa,EAAa,YAAc",
|
|
6
|
+
"names": ["React", "ThickDividerHorizontalIcon", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickDotIcon", "CloseIcon", "_props", "_forwardedRef", "PaperclipIcon", "FileIcon", "FileTextIcon"]
|
|
7
7
|
}
|
|
@@ -62,4 +62,7 @@ export { Tooltip, type TooltipProps } from './tooltip.js';
|
|
|
62
62
|
export { UserCard, type UserCardProps } from './user-card.js';
|
|
63
63
|
export { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';
|
|
64
64
|
export * as Sidebar from './sidebar.js';
|
|
65
|
+
export * as Shell from './shell.js';
|
|
66
|
+
export * as Sheet from './sheet.js';
|
|
67
|
+
export * as Chatbar from './chatbar.js';
|
|
65
68
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,SAAS,M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,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{AccessibleIcon as e}from"./accessible-icon.js";import*as t from"./accordion.js";import*as p from"./alert-dialog.js";import{AspectRatio as x}from"./aspect-ratio.js";import{Avatar as a}from"./avatar.js";import{Badge as n}from"./badge.js";import{Blockquote as y}from"./blockquote.js";import{Box as l}from"./box.js";import{Button as d}from"./button.js";import*as C from"./callout.js";import{Card as
|
|
1
|
+
import{AccessibleIcon as e}from"./accessible-icon.js";import*as t from"./accordion.js";import*as p from"./alert-dialog.js";import{AspectRatio as x}from"./aspect-ratio.js";import{Avatar as a}from"./avatar.js";import{Badge as n}from"./badge.js";import{Blockquote as y}from"./blockquote.js";import{Box as l}from"./box.js";import{Button as d}from"./button.js";import*as C from"./callout.js";import{Card as T}from"./card.js";import*as g from"./checkbox-cards.js";import*as h from"./checkbox-group.js";import{Checkbox as I}from"./checkbox.js";import{Code as k}from"./code.js";import{Container as A}from"./container.js";import*as R from"./context-menu.js";import*as v from"./data-list.js";import*as D from"./dialog.js";import*as H from"./dropdown-menu.js";import{Em as G}from"./em.js";import{Flex as L}from"./flex.js";import{Grid as E}from"./grid.js";import{Heading as M}from"./heading.js";import*as Q from"./hover-card.js";import{IconButton as V}from"./icon-button.js";import{ChevronDownIcon as N,ThickCheckIcon as j,ThickChevronRightIcon as J,ThickDividerHorizontalIcon as O}from"./icons.js";import{Image as X}from"./image.js";import{Inset as Z}from"./inset.js";import{Kbd as $}from"./kbd.js";import{Link as ro}from"./link.js";import*as eo from"./popover.js";import{Portal as po}from"./portal.js";import{Progress as xo}from"./progress.js";import{Quote as ao}from"./quote.js";import*as fo from"./radio-cards.js";import*as no from"./radio-group.js";import{Radio as yo}from"./radio.js";import{Reset as lo}from"./reset.js";import{ScrollArea as Co}from"./scroll-area.js";import*as So from"./segmented-control.js";import{Section as go}from"./section.js";import*as ho from"./select.js";import{Separator as Io}from"./separator.js";import{Skeleton as ko}from"./skeleton.js";import{Slider as Ao}from"./slider.js";import{Slot as vo,Slottable as Do}from"./slot.js";import{Spinner as wo}from"./spinner.js";import{Strong as Fo}from"./strong.js";import{Switch as qo}from"./switch.js";import*as Eo from"./tab-nav.js";import*as Ko from"./table.js";import*as Mo from"./tabs.js";import{TextArea as Uo}from"./text-area.js";import*as Vo from"./text-field.js";import{Text as No}from"./text.js";import{ThemePanel as Jo}from"./theme-panel.js";import{Theme as Wo,ThemeContext as Xo,useThemeContext as Yo}from"./theme.js";import{ToggleButton as _o}from"./toggle-button.js";import{ToggleIconButton as or}from"./toggle-icon-button.js";import{Tooltip as er}from"./tooltip.js";import{UserCard as pr}from"./user-card.js";import{VisuallyHidden as xr}from"./visually-hidden.js";import*as mr from"./sidebar.js";import*as ar from"./shell.js";import*as fr from"./sheet.js";import*as nr from"./chatbar.js";export{e as AccessibleIcon,t as Accordion,p as AlertDialog,x as AspectRatio,a as Avatar,n as Badge,y as Blockquote,l as Box,d as Button,C as Callout,T as Card,nr as Chatbar,I as Checkbox,g as CheckboxCards,h as CheckboxGroup,N as ChevronDownIcon,k as Code,A as Container,R as ContextMenu,v as DataList,D as Dialog,H as DropdownMenu,G as Em,L as Flex,E as Grid,M as Heading,Q as HoverCard,V as IconButton,X as Image,Z as Inset,$ as Kbd,ro as Link,eo as Popover,po as Portal,xo as Progress,ao as Quote,yo as Radio,fo as RadioCards,no as RadioGroup,lo as Reset,Co as ScrollArea,go as Section,So as SegmentedControl,ho as Select,Io as Separator,fr as Sheet,ar as Shell,mr as Sidebar,ko as Skeleton,Ao as Slider,vo as Slot,Do as Slottable,wo as Spinner,Fo as Strong,qo as Switch,Eo as TabNav,Ko as Table,Mo as Tabs,No as Text,Uo as TextArea,Vo as TextField,Wo as Theme,Xo as ThemeContext,Jo as ThemePanel,j as ThickCheckIcon,J as ThickChevronRightIcon,O as ThickDividerHorizontalIcon,_o as ToggleButton,or as ToggleIconButton,er as Tooltip,pr as UserCard,xr as VisuallyHidden,Yo as useThemeContext};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as Accordion from './accordion.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Image, type ImageProps } from './image.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { ToggleButton, type ToggleButtonProps } from './toggle-button.js';\nexport { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { UserCard, type UserCardProps } from './user-card.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\nexport * as Sidebar from './sidebar.js';\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,kBAAAA,MAAgD,uBACzD,UAAYC,MAAe,iBAC3B,UAAYC,MAAiB,oBAC7B,OAAS,eAAAC,MAA0C,oBACnD,OAAS,UAAAC,MAAgC,cACzC,OAAS,SAAAC,MAA8B,aACvC,OAAS,cAAAC,MAAwC,kBACjD,OAAS,OAAAC,MAA0B,WACnC,OAAS,UAAAC,MAAgC,cACzC,UAAYC,MAAa,eACzB,OAAS,QAAAC,MAA4B,YACrC,UAAYC,MAAmB,sBAC/B,UAAYC,MAAmB,sBAC/B,OAAS,YAAAC,MAAoC,gBAC7C,OAAS,QAAAC,MAA4B,YACrC,OAAS,aAAAC,MAAsC,iBAC/C,UAAYC,MAAiB,oBAC7B,UAAYC,MAAc,iBAC1B,UAAYC,MAAY,cACxB,UAAYC,MAAkB,qBAC9B,OAAS,MAAAC,MAAwB,UACjC,OAAS,QAAAC,MAA4B,YACrC,OAAS,QAAAC,MAA4B,YACrC,OAAS,WAAAC,MAAkC,eAC3C,UAAYC,MAAe,kBAC3B,OAAS,cAAAC,MAAwC,mBACjD,OAEE,mBAAAC,EACA,kBAAAC,EACA,yBAAAC,EACA,8BAAAC,MACK,aACP,OAAS,SAAAC,MAA8B,aACvC,OAAS,SAAAC,MAA8B,aACvC,OAAS,OAAAC,MAA0B,WACnC,OAAS,QAAAC,OAA4B,YACrC,UAAYC,OAAa,eACzB,OAAS,UAAAC,OAAgC,cACzC,OAAS,YAAAC,OAAoC,gBAC7C,OAAS,SAAAC,OAA8B,aACvC,UAAYC,OAAgB,mBAC5B,UAAYC,OAAgB,mBAC5B,OAAS,SAAAC,OAA8B,aACvC,OAAS,SAAAC,OAA8B,aACvC,OAAS,cAAAC,OAAwC,mBACjD,UAAYC,OAAsB,yBAClC,OAAS,WAAAC,OAAkC,eAC3C,UAAYC,OAAY,cACxB,OAAS,aAAAC,OAAsC,iBAC/C,OAAS,YAAAC,OAAoC,gBAC7C,OAAS,UAAAC,OAAgC,cACzC,OAAS,QAAAC,GAAM,aAAAC,OAAiB,YAChC,OAAS,WAAAC,OAAkC,eAC3C,OAAS,UAAAC,OAAgC,cACzC,OAAS,UAAAC,OAAgC,cACzC,UAAYC,OAAY,eACxB,UAAYC,OAAW,aACvB,UAAYC,OAAU,YACtB,OAAS,YAAAC,OAAoC,iBAC7C,UAAYC,OAAe,kBAC3B,OAAS,QAAAC,OAA4B,YACrC,OAAS,cAAAC,OAAwC,mBACjD,OAAS,SAAAC,GAAO,gBAAAC,GAA+B,mBAAAC,OAAuB,aACtE,OAAS,gBAAAC,OAA4C,qBACrD,OAAS,oBAAAC,OAAoD,0BAC7D,OAAS,WAAAC,OAAkC,eAC3C,OAAS,YAAAC,OAAoC,iBAC7C,OAAS,kBAAAC,OAAgD,uBACzD,UAAYC,OAAa",
|
|
6
|
-
"names": ["AccessibleIcon", "Accordion", "AlertDialog", "AspectRatio", "Avatar", "Badge", "Blockquote", "Box", "Button", "Callout", "Card", "CheckboxCards", "CheckboxGroup", "Checkbox", "Code", "Container", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "Em", "Flex", "Grid", "Heading", "HoverCard", "IconButton", "ChevronDownIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDividerHorizontalIcon", "Image", "Inset", "Kbd", "Link", "Popover", "Portal", "Progress", "Quote", "RadioCards", "RadioGroup", "Radio", "Reset", "ScrollArea", "SegmentedControl", "Section", "Select", "Separator", "Skeleton", "Slider", "Slot", "Slottable", "Spinner", "Strong", "Switch", "TabNav", "Table", "Tabs", "TextArea", "TextField", "Text", "ThemePanel", "Theme", "ThemeContext", "useThemeContext", "ToggleButton", "ToggleIconButton", "Tooltip", "UserCard", "VisuallyHidden", "Sidebar"]
|
|
4
|
+
"sourcesContent": ["export { AccessibleIcon, type AccessibleIconProps } from './accessible-icon.js';\nexport * as Accordion from './accordion.js';\nexport * as AlertDialog from './alert-dialog.js';\nexport { AspectRatio, type AspectRatioProps } from './aspect-ratio.js';\nexport { Avatar, type AvatarProps } from './avatar.js';\nexport { Badge, type BadgeProps } from './badge.js';\nexport { Blockquote, type BlockquoteProps } from './blockquote.js';\nexport { Box, type BoxProps } from './box.js';\nexport { Button, type ButtonProps } from './button.js';\nexport * as Callout from './callout.js';\nexport { Card, type CardProps } from './card.js';\nexport * as CheckboxCards from './checkbox-cards.js';\nexport * as CheckboxGroup from './checkbox-group.js';\nexport { Checkbox, type CheckboxProps } from './checkbox.js';\nexport { Code, type CodeProps } from './code.js';\nexport { Container, type ContainerProps } from './container.js';\nexport * as ContextMenu from './context-menu.js';\nexport * as DataList from './data-list.js';\nexport * as Dialog from './dialog.js';\nexport * as DropdownMenu from './dropdown-menu.js';\nexport { Em, type EmProps } from './em.js';\nexport { Flex, type FlexProps } from './flex.js';\nexport { Grid, type GridProps } from './grid.js';\nexport { Heading, type HeadingProps } from './heading.js';\nexport * as HoverCard from './hover-card.js';\nexport { IconButton, type IconButtonProps } from './icon-button.js';\nexport {\n type IconProps,\n ChevronDownIcon,\n ThickCheckIcon,\n ThickChevronRightIcon,\n ThickDividerHorizontalIcon,\n} from './icons.js';\nexport { Image, type ImageProps } from './image.js';\nexport { Inset, type InsetProps } from './inset.js';\nexport { Kbd, type KbdProps } from './kbd.js';\nexport { Link, type LinkProps } from './link.js';\nexport * as Popover from './popover.js';\nexport { Portal, type PortalProps } from './portal.js';\nexport { Progress, type ProgressProps } from './progress.js';\nexport { Quote, type QuoteProps } from './quote.js';\nexport * as RadioCards from './radio-cards.js';\nexport * as RadioGroup from './radio-group.js';\nexport { Radio, type RadioProps } from './radio.js';\nexport { Reset, type ResetProps } from './reset.js';\nexport { ScrollArea, type ScrollAreaProps } from './scroll-area.js';\nexport * as SegmentedControl from './segmented-control.js';\nexport { Section, type SectionProps } from './section.js';\nexport * as Select from './select.js';\nexport { Separator, type SeparatorProps } from './separator.js';\nexport { Skeleton, type SkeletonProps } from './skeleton.js';\nexport { Slider, type SliderProps } from './slider.js';\nexport { Slot, Slottable } from './slot.js';\nexport { Spinner, type SpinnerProps } from './spinner.js';\nexport { Strong, type StrongProps } from './strong.js';\nexport { Switch, type SwitchProps } from './switch.js';\nexport * as TabNav from './tab-nav.js';\nexport * as Table from './table.js';\nexport * as Tabs from './tabs.js';\nexport { TextArea, type TextAreaProps } from './text-area.js';\nexport * as TextField from './text-field.js';\nexport { Text, type TextProps } from './text.js';\nexport { ThemePanel, type ThemePanelProps } from './theme-panel.js';\nexport { Theme, ThemeContext, type ThemeProps, useThemeContext } from './theme.js';\nexport { ToggleButton, type ToggleButtonProps } from './toggle-button.js';\nexport { ToggleIconButton, type ToggleIconButtonProps } from './toggle-icon-button.js';\nexport { Tooltip, type TooltipProps } from './tooltip.js';\nexport { UserCard, type UserCardProps } from './user-card.js';\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden.js';\nexport * as Sidebar from './sidebar.js';\nexport * as Shell from './shell.js';\nexport * as Sheet from './sheet.js';\nexport * as Chatbar from './chatbar.js';\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,kBAAAA,MAAgD,uBACzD,UAAYC,MAAe,iBAC3B,UAAYC,MAAiB,oBAC7B,OAAS,eAAAC,MAA0C,oBACnD,OAAS,UAAAC,MAAgC,cACzC,OAAS,SAAAC,MAA8B,aACvC,OAAS,cAAAC,MAAwC,kBACjD,OAAS,OAAAC,MAA0B,WACnC,OAAS,UAAAC,MAAgC,cACzC,UAAYC,MAAa,eACzB,OAAS,QAAAC,MAA4B,YACrC,UAAYC,MAAmB,sBAC/B,UAAYC,MAAmB,sBAC/B,OAAS,YAAAC,MAAoC,gBAC7C,OAAS,QAAAC,MAA4B,YACrC,OAAS,aAAAC,MAAsC,iBAC/C,UAAYC,MAAiB,oBAC7B,UAAYC,MAAc,iBAC1B,UAAYC,MAAY,cACxB,UAAYC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,OAAW,aACvB,UAAYC,OAAW,aACvB,UAAYC,OAAa",
|
|
6
|
+
"names": ["AccessibleIcon", "Accordion", "AlertDialog", "AspectRatio", "Avatar", "Badge", "Blockquote", "Box", "Button", "Callout", "Card", "CheckboxCards", "CheckboxGroup", "Checkbox", "Code", "Container", "ContextMenu", "DataList", "Dialog", "DropdownMenu", "Em", "Flex", "Grid", "Heading", "HoverCard", "IconButton", "ChevronDownIcon", "ThickCheckIcon", "ThickChevronRightIcon", "ThickDividerHorizontalIcon", "Image", "Inset", "Kbd", "Link", "Popover", "Portal", "Progress", "Quote", "RadioCards", "RadioGroup", "Radio", "Reset", "ScrollArea", "SegmentedControl", "Section", "Select", "Separator", "Skeleton", "Slider", "Slot", "Slottable", "Spinner", "Strong", "Switch", "TabNav", "Table", "Tabs", "TextArea", "TextField", "Text", "ThemePanel", "Theme", "ThemeContext", "useThemeContext", "ToggleButton", "ToggleIconButton", "Tooltip", "UserCard", "VisuallyHidden", "Sidebar", "Shell", "Sheet", "Chatbar"]
|
|
7
7
|
}
|
|
@@ -18,6 +18,18 @@ declare const PopoverClose: React.ForwardRefExoticComponent<PopoverCloseProps &
|
|
|
18
18
|
interface PopoverAnchorProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {
|
|
19
19
|
}
|
|
20
20
|
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
|
|
21
|
+
type PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;
|
|
22
|
+
declare const PopoverToolbarLeft: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const PopoverToolbarCenter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const PopoverToolbarRight: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const PopoverToolbarTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
26
|
+
type PopoverToolbarComponent = React.ForwardRefExoticComponent<React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>> & {
|
|
27
|
+
Left: typeof PopoverToolbarLeft;
|
|
28
|
+
Center: typeof PopoverToolbarCenter;
|
|
29
|
+
Right: typeof PopoverToolbarRight;
|
|
30
|
+
Title: typeof PopoverToolbarTitle;
|
|
31
|
+
};
|
|
32
|
+
declare const PopoverToolbar: PopoverToolbarComponent;
|
|
33
|
+
export { PopoverRoot as Root, PopoverContent as Content, PopoverTrigger as Trigger, PopoverClose as Close, PopoverAnchor as Anchor, PopoverToolbar as Toolbar, };
|
|
22
34
|
export type { PopoverRootProps as RootProps, PopoverContentProps as ContentProps, PopoverTriggerProps as TriggerProps, PopoverCloseProps as CloseProps, PopoverAnchorProps as AnchorProps, };
|
|
23
35
|
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAQvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover.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,MAAM,mBAAmB,mKAQxB,CAAC;AAIF,QAAA,MAAM,mBAAmB,sKAkBxB,CAAC;AAGF,KAAK,uBAAuB,GAAG,KAAK,CAAC,yBAAyB,CAC5D,KAAK,CAAC,eAAe,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CACjF,GAAG;IACF,IAAI,EAAE,OAAO,kBAAkB,CAAC;IAChC,MAAM,EAAE,OAAO,oBAAoB,CAAC;IACpC,KAAK,EAAE,OAAO,mBAAmB,CAAC;IAClC,KAAK,EAAE,OAAO,mBAAmB,CAAC;CACnC,CAAC;AAEF,QAAA,MAAM,cAAc,EAKd,uBAAuB,CAAC;AAE9B,OAAO,EACL,WAAW,IAAI,IAAI,EACnB,cAAc,IAAI,OAAO,EACzB,cAAc,IAAI,OAAO,EACzB,YAAY,IAAI,KAAK,EACrB,aAAa,IAAI,MAAM,EACvB,cAAc,IAAI,OAAO,GAC1B,CAAC;AACF,YAAY,EACV,gBAAgB,IAAI,SAAS,EAC7B,mBAAmB,IAAI,YAAY,EACnC,mBAAmB,IAAI,YAAY,EACnC,iBAAiB,IAAI,UAAU,EAC/B,kBAAkB,IAAI,WAAW,GAClC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as o from"react";import
|
|
1
|
+
import*as o from"react";import v from"classnames";import{Popover as c}from"radix-ui";import{extractProps as O}from"../helpers/extract-props.js";import{requireReactElement as T}from"../helpers/require-react-element.js";import{popoverContentPropDefs as W}from"./popover.props.js";import{Theme as S}from"./theme.js";import{useThemeContext as k}from"./theme.js";const C=o.createContext(null),b=t=>{const e=o.useContext(C);return e},d=t=>o.createElement(c.Root,{...t});d.displayName="Popover.Root";const R=o.forwardRef(({children:t,...e},r)=>o.createElement(c.Trigger,{...e,ref:r,asChild:!0},T(t)));R.displayName="Popover.Trigger";const g=o.forwardRef((t,e)=>{const r=k(),p=t.panelBackground??r.panelBackground,{className:n,forceMount:s,container:i,panelBackground:l,...f}=O(t,W),a=o.useRef(null),u=o.useCallback(P=>{a.current=P,typeof e=="function"?e(P):e&&(e.current=P)},[e]),[A,D]=o.useState(void 0),H=o.useCallback(P=>{const m=a.current;m&&(P>0?(m.style.setProperty("--popover-toolbar-offset",`${P}px`),m.setAttribute("data-has-toolbar","true")):(m.style.removeProperty("--popover-toolbar-offset"),m.removeAttribute("data-has-toolbar")))},[]);return o.createElement(c.Portal,{container:i,forceMount:s},o.createElement(S,{asChild:!0},o.createElement(c.Content,{align:"start",sideOffset:8,collisionPadding:10,...f,ref:u,"aria-labelledby":A,"data-panel-background":p,className:v("rt-PopperContent","rt-PopoverContent",n)},o.createElement(C.Provider,{value:{contentRef:a,setToolbarOffset:H,setLabelId:D}},t.children))))});g.displayName="Popover.Content";const h=o.forwardRef(({children:t,...e},r)=>o.createElement(c.Close,{...e,ref:r,asChild:!0},T(t)));h.displayName="Popover.Close";const y=o.forwardRef(({children:t,...e},r)=>o.createElement(c.Anchor,{...e,ref:r}));y.displayName="Popover.Anchor";const E=o.forwardRef(({className:t,children:e,...r},p)=>{const n=b("Popover.Toolbar"),s=o.useRef(null),i=o.useCallback(l=>{s.current=l,typeof p=="function"?p(l):p&&(p.current=l)},[p]);return o.useEffect(()=>{if(!n||!s.current)return;const l=s.current,f=()=>{const u=l.getBoundingClientRect().height;n.setToolbarOffset(u)};f();const a=new ResizeObserver(f);return a.observe(l),()=>{a.disconnect(),n.setToolbarOffset(0)}},[n]),o.createElement("div",{...r,ref:i,className:v("rt-PopoverToolbar",t)},e)});E.displayName="Popover.Toolbar";const L=o.forwardRef(({className:t,...e},r)=>o.createElement("div",{...e,ref:r,className:v("rt-PopoverToolbarSection","rt-PopoverToolbarLeft",t)}));L.displayName="Popover.Toolbar.Left";const x=o.forwardRef(({className:t,...e},r)=>o.createElement("div",{...e,ref:r,className:v("rt-PopoverToolbarSection","rt-PopoverToolbarCenter",t)}));x.displayName="Popover.Toolbar.Center";const N=o.forwardRef(({className:t,...e},r)=>o.createElement("div",{...e,ref:r,className:v("rt-PopoverToolbarSection","rt-PopoverToolbarRight",t)}));N.displayName="Popover.Toolbar.Right";const M=o.forwardRef(({className:t,id:e,...r},p)=>{const n=b("Popover.Toolbar.Title"),s=o.useId(),i=e??`rt-popover-toolbar-title-${s}`;return o.useEffect(()=>(n?.setLabelId(i),()=>n?.setLabelId(void 0)),[n,i]),o.createElement("span",{...r,id:i,ref:p,className:v("rt-PopoverToolbarTitle",t)})});M.displayName="Popover.Toolbar.Title";const w=Object.assign(E,{Left:L,Center:x,Right:N,Title:M});export{y as Anchor,h as Close,g as Content,d as Root,w as Toolbar,R as Trigger};
|
|
2
2
|
//# sourceMappingURL=popover.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/popover.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={forwardedRef}\n data-panel-background={panelBackground}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n />\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n ),\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n"],
|
|
5
|
-
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,WAE5C,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,uBAAAC,MAA2B,sCACpC,OAAS,0BAAAC,MAA8B,qBACvC,OAAS,SAAAC,MAAa,aACtB,OAAS,mBAAAC,MAAuB,
|
|
6
|
-
"names": ["React", "classNames", "PopoverPrimitive", "extractProps", "requireReactElement", "popoverContentPropDefs", "Theme", "useThemeContext", "PopoverRoot", "props", "PopoverTrigger", "children", "forwardedRef", "PopoverContent", "themeContext", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "PopoverClose", "PopoverAnchor"]
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// ---------------------------------------------\n// Popover Content Context\n// ---------------------------------------------\ntype PopoverContentContextValue = {\n /** Ref to the Popover.Content DOM node */\n contentRef: React.MutableRefObject<HTMLDivElement | null>;\n /** Update content's toolbar offset variable and presence flag */\n setToolbarOffset: (offsetPx: number) => void;\n /** Wire up aria-labelledby for toolbar title */\n setLabelId: (id: string | undefined) => void;\n};\n\nconst PopoverContentContext = React.createContext<PopoverContentContextValue | null>(null);\nconst usePopoverContentContext = (caller: string) => {\n const ctx = React.useContext(PopoverContentContext);\n if (!ctx) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`${caller} must be used within Popover.Content`);\n }\n }\n return ctx;\n};\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n\n // Manage refs (we need the DOM node to apply CSS variables)\n const contentRef = React.useRef<HTMLDivElement>(null);\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n contentRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [forwardedRef],\n );\n\n const [labelId, setLabelId] = React.useState<string | undefined>(undefined);\n\n const setToolbarOffset = React.useCallback((offsetPx: number) => {\n const el = contentRef.current;\n if (!el) return;\n if (offsetPx > 0) {\n el.style.setProperty('--popover-toolbar-offset', `${offsetPx}px`);\n el.setAttribute('data-has-toolbar', 'true');\n } else {\n el.style.removeProperty('--popover-toolbar-offset');\n el.removeAttribute('data-has-toolbar');\n }\n }, []);\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={combinedRef}\n aria-labelledby={labelId}\n data-panel-background={panelBackground}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n >\n <PopoverContentContext.Provider value={{ contentRef, setToolbarOffset, setLabelId }}>\n {props.children}\n </PopoverContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n ),\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\n// ---------------------------------------------\n// Toolbar (Popover-only)\n// ---------------------------------------------\n\ntype PopoverToolbarElement = HTMLDivElement;\ntype PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarBase = React.forwardRef<PopoverToolbarElement, PopoverToolbarProps>(\n ({ className, children, ...props }, forwardedRef) => {\n const ctx = usePopoverContentContext('Popover.Toolbar');\n\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRefs = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef)\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [forwardedRef],\n );\n\n React.useEffect(() => {\n if (!ctx || !localRef.current) return;\n const el = localRef.current;\n const update = () => {\n const height = el.getBoundingClientRect().height;\n ctx.setToolbarOffset(height);\n };\n update();\n const ro = new ResizeObserver(update);\n ro.observe(el);\n return () => {\n ro.disconnect();\n ctx.setToolbarOffset(0);\n };\n }, [ctx]);\n\n return (\n <div {...props} ref={setRefs} className={classNames('rt-PopoverToolbar', className)}>\n {children}\n </div>\n );\n },\n);\n(PopoverToolbarBase as any).displayName = 'Popover.Toolbar';\n\ntype SectionProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarLeft = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarLeft', className)}\n />\n ),\n);\nPopoverToolbarLeft.displayName = 'Popover.Toolbar.Left';\n\nconst PopoverToolbarCenter = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarCenter', className)}\n />\n ),\n);\nPopoverToolbarCenter.displayName = 'Popover.Toolbar.Center';\n\nconst PopoverToolbarRight = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarRight', className)}\n />\n ),\n);\nPopoverToolbarRight.displayName = 'Popover.Toolbar.Right';\n\ntype TitleProps = React.ComponentPropsWithoutRef<'span'>;\nconst PopoverToolbarTitle = React.forwardRef<HTMLSpanElement, TitleProps>(\n ({ className, id: idProp, ...props }, ref) => {\n const ctx = usePopoverContentContext('Popover.Toolbar.Title');\n const reactId = React.useId();\n const id = idProp ?? `rt-popover-toolbar-title-${reactId}`;\n React.useEffect(() => {\n ctx?.setLabelId(id);\n return () => ctx?.setLabelId(undefined);\n }, [ctx, id]);\n return (\n <span\n {...props}\n id={id}\n ref={ref}\n className={classNames('rt-PopoverToolbarTitle', className)}\n />\n );\n },\n);\nPopoverToolbarTitle.displayName = 'Popover.Toolbar.Title';\n\ntype PopoverToolbarComponent = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>\n> & {\n Left: typeof PopoverToolbarLeft;\n Center: typeof PopoverToolbarCenter;\n Right: typeof PopoverToolbarRight;\n Title: typeof PopoverToolbarTitle;\n};\n\nconst PopoverToolbar = Object.assign(PopoverToolbarBase, {\n Left: PopoverToolbarLeft,\n Center: PopoverToolbarCenter,\n Right: PopoverToolbarRight,\n Title: PopoverToolbarTitle,\n}) as PopoverToolbarComponent;\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n PopoverToolbar as Toolbar,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,WAE5C,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AQ,GAAGjC,CAAM,EAAG6B,IAAQ,CAC5C,MAAM/B,EAAMF,EAAyB,uBAAuB,EACtDsC,EAAU/C,EAAM,MAAM,EACtBgD,EAAKF,GAAU,4BAA4BC,CAAO,GACxD,OAAA/C,EAAM,UAAU,KACdW,GAAK,WAAWqC,CAAE,EACX,IAAMrC,GAAK,WAAW,MAAS,GACrC,CAACA,EAAKqC,CAAE,CAAC,EAEVhD,EAAA,cAAC,QACE,GAAGa,EACJ,GAAImC,EACJ,IAAKN,EACL,UAAWzC,EAAW,yBAA0BmB,CAAS,EAC3D,CAEJ,CACF,EACAyB,EAAoB,YAAc,wBAWlC,MAAMI,EAAiB,OAAO,OAAOd,EAAoB,CACvD,KAAMM,EACN,OAAQE,EACR,MAAOC,EACP,MAAOC,CACT,CAAC",
|
|
6
|
+
"names": ["React", "classNames", "PopoverPrimitive", "extractProps", "requireReactElement", "popoverContentPropDefs", "Theme", "useThemeContext", "PopoverContentContext", "usePopoverContentContext", "caller", "ctx", "PopoverRoot", "props", "PopoverTrigger", "children", "forwardedRef", "PopoverContent", "themeContext", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "contentRef", "combinedRef", "node", "labelId", "setLabelId", "setToolbarOffset", "offsetPx", "el", "PopoverClose", "PopoverAnchor", "PopoverToolbarBase", "localRef", "setRefs", "update", "height", "ro", "PopoverToolbarLeft", "ref", "PopoverToolbarCenter", "PopoverToolbarRight", "PopoverToolbarTitle", "idProp", "reactId", "id", "PopoverToolbar"]
|
|
7
7
|
}
|