aravint-ui-form-controls 1.0.39 → 1.0.40
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.
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
scrollbar-color: #D1D5DB transparent;
|
|
69
69
|
}
|
|
70
70
|
`}),k.jsxs(Dd,{open:y,onOpenChange:i?void 0:_,children:[k.jsx(kd,{asChild:!0,children:k.jsxs("button",{type:"button",disabled:i,className:`flex w-full items-center justify-between rounded-lg border text-sm transition
|
|
71
|
-
${i?"bg-gray-100 cursor-not-allowed":"bg-white cursor-pointer"}`,style:{minHeight:f,height:"auto",
|
|
71
|
+
${i?"bg-gray-100 cursor-not-allowed":"bg-white cursor-pointer"}`,style:{minHeight:f,height:"auto",borderColor:o?"#ef4444":h,paddingLeft:"12px",paddingRight:"12px",paddingTop:"4px",paddingBottom:"4px"},children:[j.length===0?k.jsx("span",{className:"truncate text-left text-[12px] text-gray-400",children:e}):k.jsx("div",{className:"flex flex-1 flex-wrap items-center gap-1.5",children:j.map(R=>k.jsxs("span",{className:"flex items-center gap-1 rounded-md px-2 py-0.5 text-[11px] whitespace-nowrap",style:{backgroundColor:m,color:v},children:[R.label,k.jsx(gr.X,{size:12,className:"shrink-0 cursor-pointer opacity-60 hover:opacity-100",onClick:B=>E(B,R.value)})]},R.value))}),k.jsx(gr.ChevronDown,{size:16,className:`ml-2 shrink-0 text-gray-500 transition-transform ${y?"rotate-180":""}`})]})}),k.jsx(Cd,{children:k.jsxs(Sd,{ref:w,align:"start",side:"bottom",sideOffset:8,avoidCollisions:!0,collisionPadding:8,className:"rounded-xl p-2 box-border",style:{width:"var(--radix-popover-trigger-width)",backgroundColor:"#ffffff",border:`1px solid ${h}`,borderRadius:"12px",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",zIndex:9999,overflow:"hidden"},onInteractOutside:()=>{_(!1)},onOpenAutoFocus:R=>{R.preventDefault()},children:[k.jsx("div",{className:"flex items-center justify-center w-full sticky top-0 z-10 px-2 pt-2 pb-1.5",style:{backgroundColor:"#ffffff"},children:k.jsxs("div",{className:"flex items-center gap-2 rounded-md border-[#eaebee] border-[1.5px] bg-[#f9f9f9] px-2 py-1 w-full mx-auto",children:[k.jsx(gr.Search,{size:14,className:"text-gray-400 shrink-0"}),k.jsx("input",{autoFocus:!0,value:D,onChange:R=>C(R.target.value),placeholder:a,className:"w-full bg-transparent text-xs outline-none placeholder:text-[#1f2937] text-[12px] placeholder:text-[12px]"})]})}),k.jsxs("div",{className:"multiselect-options-scroll overflow-y-auto flex flex-col gap-1 px-2",style:{height:"180px"},children:[k.jsx("div",{className:"flex items-center justify-center",children:I.length===0&&k.jsx("div",{className:"px-3 py-2 text-[12px] text-gray-400",children:"No results found"})}),I.map(R=>{const B=n.includes(R.value),A=S===R.value;let N="transparent";return B?N=s:A&&(N=l),k.jsxs("div",{onClick:()=>W(R.value),onMouseEnter:()=>P(R.value),onMouseLeave:()=>P(null),className:"flex w-full items-center gap-3 rounded-md px-3 py-2 cursor-pointer text-sm box-border",style:{backgroundColor:N,borderLeft:B?`4px solid ${c}`:"4px solid transparent",color:B?"#ffffff":"#1f2937",fontSize:"12px"},children:[k.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center rounded border",style:B?{backgroundColor:"#059669",borderColor:"#059669"}:{borderColor:"#D1D5DB"},children:B&&k.jsx(gr.Check,{size:11,strokeWidth:3,color:u})}),k.jsx("span",{className:"truncate",children:R.label})]},R.value)})]})]})})]})]})}const Pd=({onFilesChange:r,onDrop:n,onDragOver:t,onDragLeave:e,onClick:a,inputRef:o,isDragging:i=!1,isUploading:s=!1,disabled:c=!1,accept:l="*",multiple:u=!0,title:d="Drag & Drop Files Here",subtitle:f="or",buttonText:p="Browse",uploadingText:h="Uploading files...",footerText:m="(File Size Max 10MB)",icon:v,containerClassName:y="",dropZoneClassName:x="",buttonClassName:D="",inputId:C="file-upload"})=>{const S=c||s,P=O=>{r(O.target.files),o&&o.current&&(o.current.value="")};return k.jsxs("div",{className:`
|
|
72
72
|
rounded text-center relative p-3 transition-all
|
|
73
73
|
${S?"opacity-60 pointer-events-none":""}
|
|
74
74
|
${i?"bg-blue-50 border-2 border-blue-400":""}
|
package/dist/form-controls.es.js
CHANGED