@orbit_ui_toolkit/orbitui-kit 0.1.28 → 0.1.29

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.
@@ -7,6 +7,7 @@ interface CardProps {
7
7
  className?: string;
8
8
  variant?: 'default' | 'glass' | 'transparent';
9
9
  noPadding?: boolean;
10
+ onClick?: () => void;
10
11
  }
11
12
  export declare const Card: React.FC<CardProps>;
12
13
  export {};
@@ -52,7 +52,7 @@ React keys must be passed directly to JSX without using spread:
52
52
  flex items-center justify-between px-3 py-2.5 cursor-pointer text-sm
53
53
  ${o==="default"?"hover:bg-gray-50":"hover:bg-white/5"}
54
54
  ${x?o==="default"?"bg-blue-50 text-blue-700":"bg-purple-500/20 text-purple-200":""}
55
- `,children:[h.jsx("span",{children:y.label}),x&&h.jsx(Ud,{size:16})]},y.value)}),r.length===0&&h.jsx("div",{className:"px-3 py-2.5 text-sm text-gray-500 text-center",children:"No options available"})]})]}),t&&h.jsx("span",{className:"text-xs text-red-500",children:t})]})},Tj=({title:e,subtitle:t,children:r,footer:n,className:a="",variant:i="default",noPadding:o=!1})=>{const s={default:"bg-white border-gray-200 shadow-sm",glass:"bg-black/40 backdrop-blur-lg border-gray-800 shadow-lg",transparent:"bg-transparent border-none shadow-none"};return h.jsxs("div",{className:`rounded-xl border overflow-hidden transition-all duration-300 ${s[i]} ${a}`,children:[(e||t)&&h.jsxs("div",{className:`px-6 py-4 border-b ${i==="glass"?"border-gray-800":"border-gray-100"}`,children:[e&&h.jsx("h3",{className:`text-lg font-semibold ${i==="glass"?"text-white":"text-gray-900"}`,children:e}),t&&h.jsx("p",{className:`text-sm mt-1 ${i==="glass"?"text-gray-400":"text-gray-500"}`,children:t})]}),h.jsx("div",{className:o?"":"px-6 py-4",children:r}),n&&h.jsx("div",{className:`px-6 py-4 border-t ${i==="glass"?"bg-black/20 border-gray-800":"bg-gray-50 border-gray-100"}`,children:n})]})},Dj=({username:e,profilePic:t,postImage:r,likesCount:n=0,caption:a,location:i,isLiked:o=!1,isBookmarked:s=!1,onLike:l,onComment:c,onShare:d,onBookmark:u,variant:f="social",title:p,tags:m,rating:v,voteCount:g,actionLabel:y,onAction:x})=>f==="media"?h.jsxs("div",{className:"group relative max-w-[300px] mx-auto bg-white rounded-xl overflow-hidden shadow-lg border border-gray-200 font-sans transition-all duration-300 hover:shadow-xl",children:[h.jsxs("div",{className:"relative aspect-[2/3] w-full",children:[h.jsx("img",{src:r,alt:p||"Media content",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),h.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-4 pt-12",children:[p&&h.jsx("h3",{className:"text-white font-bold text-xl leading-tight",children:p}),m&&h.jsx("p",{className:"text-gray-300 text-xs mt-1",children:m.join(" • ")})]})]}),h.jsxs("div",{className:"p-4 space-y-4",children:[(v||g)&&h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center gap-1 text-yellow-500",children:[v&&h.jsx("span",{className:"text-lg font-bold",children:v}),h.jsx("svg",{className:"w-4 h-4 fill-current",viewBox:"0 0 24 24",children:h.jsx("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}),g&&h.jsxs("span",{className:"text-gray-400 text-xs ml-1",children:["(",g,")"]})]})}),a&&h.jsx("p",{className:"text-gray-600 text-sm line-clamp-3",children:a}),y&&h.jsx(Ne,{fullWidth:!0,className:"!bg-[#f84464] hover:!bg-[#d63a56] text-white font-medium py-2 rounded-md transition-colors",onClick:x,children:y})]})]}):h.jsxs("div",{className:"group relative max-w-[420px] mx-auto bg-white rounded-3xl overflow-hidden shadow-sm hover:shadow-xl transition-all duration-300 border border-gray-100/50",children:[h.jsxs("div",{className:"relative w-full aspect-4/5 bg-gray-100 overflow-hidden",children:[h.jsx("img",{src:r,alt:"Post content",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),h.jsx("div",{className:"absolute top-4 right-4 opacity-0 group-hover:opacity-100 transition-opacity",children:h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",className:"bg-black/20 backdrop-blur-md text-white hover:bg-black/40 border-none",children:h.jsxs("svg",{"aria-label":"More options",fill:"currentColor",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:[h.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),h.jsx("circle",{cx:"6",cy:"12",r:"1.5"}),h.jsx("circle",{cx:"18",cy:"12",r:"1.5"})]})})})]}),h.jsxs("div",{className:"p-5",children:[h.jsxs("div",{className:"flex items-center justify-between mb-4",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"relative",children:h.jsx("img",{src:t||"",alt:e||"",className:"w-10 h-10 rounded-full object-cover ring-2 ring-offset-2 ring-indigo-500"})}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"font-bold text-gray-900 text-sm leading-tight hover:text-indigo-600 cursor-pointer transition-colors",children:e}),i&&h.jsx("span",{className:"text-[11px] font-medium text-gray-400 uppercase tracking-wide",children:i})]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",onClick:l,className:`transition-colors ${o?"text-rose-500 hover:bg-rose-50":"text-gray-400 hover:text-rose-500"}`,children:o?h.jsx("svg",{"aria-label":"Unlike",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 48 48",width:"26",children:h.jsx("path",{d:"M34.6 3.1c-4.5 0-7.9 1.8-10.6 5.6-2.7-3.7-6.1-5.5-10.6-5.5C6 3.1 0 9.6 0 17.6c0 14.9 17.8 29.1 23.9 30.2h.2c6.1-1.1 23.9-15.3 23.9-30.2 0-8-6-14.5-13.4-14.5z"})}):h.jsx("svg",{"aria-label":"Like",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:h.jsx("path",{d:"M16.792 3.904A4.989 4.989 0 0 1 21.5 9.122c0 3.072-2.652 4.959-5.197 7.222-2.512 2.243-3.865 3.469-4.303 3.752-.477-.309-2.143-1.823-4.303-3.752C5.141 14.072 2.5 12.194 2.5 9.122a4.989 4.989 0 0 1 4.708-5.218 4.21 4.21 0 0 1 3.675 1.941c.252.342.392.545.517.545s.265-.203.517-.545a4.21 4.21 0 0 1 3.675-1.941m0-2a6.21 6.21 0 0 0-5.292 2.768 6.21 6.21 0 0 0-5.292-2.768 6.989 6.989 0 0 0-6.708 7.218c0 4.19 2.923 6.64 5.642 9.066 2.057 1.838 4.19 3.744 5.358 5.485.474-.707 2.112-2.298 5.358-5.188 2.308-2.053 5.358-4.706 5.358-9.363a6.989 6.989 0 0 0-6.708-7.218Z"})})}),h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",onClick:c,className:"text-gray-400 hover:text-indigo-500",children:h.jsx("svg",{"aria-label":"Comment",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:h.jsx("path",{d:"M20.656 17.008a9.993 9.993 0 1 0-3.59 3.615L22 22Z",fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"})})}),h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",onClick:d,className:"text-gray-400 hover:text-indigo-500",children:h.jsxs("svg",{"aria-label":"Share Post",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:[h.jsx("line",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2",x1:"22",x2:"9.218",y1:"3",y2:"10.083"}),h.jsx("polygon",{fill:"none",points:"11.698 20.334 22 3.001 2 3.001 9.218 10.084 11.698 20.334",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"})]})})]})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsx("p",{className:"text-gray-800 text-sm leading-relaxed",children:a}),h.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-gray-50",children:[h.jsxs("span",{className:"font-semibold text-xs text-gray-500",children:[n.toLocaleString()," Likes"]}),h.jsx("div",{className:"flex items-center gap-3",children:h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",onClick:u,className:`transition-colors ${s?"text-gray-900":"text-gray-400 hover:text-gray-900"}`,children:s?h.jsx("svg",{"aria-label":"Remove",fill:"currentColor",height:"22",role:"img",viewBox:"0 0 24 24",width:"22",children:h.jsx("path",{d:"M20 22a.999.999 0 0 1-.687-.273L12 14.89l-7.313 6.837A1 1 0 0 1 3 21V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1Z"})}):h.jsx("svg",{"aria-label":"Save",fill:"currentColor",height:"22",role:"img",viewBox:"0 0 24 24",width:"22",children:h.jsx("path",{d:"M20 22a.999.999 0 0 1-.687-.273L12 14.89l-7.313 6.837A1 1 0 0 1 3 21V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1Z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})})})]}),h.jsxs("div",{className:"relative mt-2",children:[h.jsx("input",{type:"text",placeholder:"Add a comment...",className:"w-full text-xs text-gray-600 bg-gray-50 rounded-full px-3 py-2 outline-none focus:ring-1 focus:ring-indigo-200 transition-all"}),h.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:h.jsx(Ne,{variant:"ghost",size:"sm",className:"text-indigo-500 font-bold px-2 py-0 h-auto hover:bg-transparent hover:text-indigo-700 min-w-0",children:"Post"})})]})]})]})]}),Mj=({variant:e="spinner",size:t="md",className:r="",color:n,colors:a})=>{const i={sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"},o={sm:"w-1 h-1",md:"w-2 h-2",lg:"w-3 h-3",xl:"w-4 h-4"},s=i[t],l="bg-gradient-to-tr from-yellow-400 via-red-500 to-purple-600";if(e==="dots"){const c=o[t],d=!!n||!!a?.length,u=p=>{if(!d)return{};const m=a?.[p]||n;return m?{backgroundColor:m}:{}},f=()=>d?"":l;return h.jsx("div",{className:`flex items-center justify-center gap-1 ${r}`,children:[0,1,2].map(p=>h.jsx("div",{className:`${c} rounded-full animate-bounce ${f()}`,style:{...u(p),animationDelay:p===0?"-0.3s":p===1?"-0.15s":"0s"}},p))})}if(e==="pulse"){const c=n?"":l;return h.jsxs("div",{className:`relative flex items-center justify-center ${s} ${r}`,children:[h.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full opacity-75 animate-ping ${c}`,style:n?{backgroundColor:n}:{}}),h.jsx("span",{className:`relative inline-flex rounded-full h-3/4 w-3/4 ${c}`,style:n?{backgroundColor:n}:{}})]})}return e==="multicolor"?h.jsx("div",{className:`${s} relative ${r}`,children:h.jsx("div",{className:`absolute inset-0 rounded-full ${l} animate-spin`,children:h.jsx("div",{className:"absolute inset-[3px] bg-white rounded-full"})})}):e==="orbit"?n?h.jsxs("div",{className:`relative ${s} ${r}`,children:[h.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-t-transparent border-b-transparent animate-spin",style:{borderColor:n,borderTopColor:"transparent",borderBottomColor:"transparent"}}),h.jsx("div",{className:"absolute inset-1 rounded-full border-2 border-l-transparent border-r-transparent animate-spin-reverse opacity-75",style:{borderColor:n,borderLeftColor:"transparent",borderRightColor:"transparent",animationDirection:"reverse",animationDuration:"1.5s"}})]}):h.jsxs("div",{className:`relative ${s} ${r}`,children:[h.jsx("div",{className:`absolute inset-0 rounded-full ${l} animate-spin`,children:h.jsx("div",{className:"absolute inset-[2px] bg-white rounded-full"})}),h.jsx("div",{className:`absolute inset-1 rounded-full ${l} animate-spin-reverse opacity-75`,style:{animationDirection:"reverse",animationDuration:"1.5s"},children:h.jsx("div",{className:"absolute inset-[2px] bg-white rounded-full"})})]}):null},$j=({variant:e="info",title:t,children:r,onClose:n,className:a=""})=>{const o={success:{container:"bg-green-50 text-green-900 border-green-200",iconColor:"text-green-600",closeHover:"hover:bg-green-100 text-green-600",Icon:()=>h.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})},error:{container:"bg-red-50 text-red-900 border-red-200",iconColor:"text-red-600",closeHover:"hover:bg-red-100 text-red-600",Icon:()=>h.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})},warning:{container:"bg-yellow-50 text-yellow-900 border-yellow-200",iconColor:"text-yellow-600",closeHover:"hover:bg-yellow-100 text-yellow-600",Icon:()=>h.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})},info:{container:"bg-blue-50 text-blue-900 border-blue-200",iconColor:"text-blue-600",closeHover:"hover:bg-blue-100 text-blue-600",Icon:()=>h.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}}[e],s=o.Icon;return h.jsxs("div",{role:"alert",className:`flex p-4 rounded-lg border ${o.container} ${a}`,children:[h.jsx("div",{className:`shrink-0 ${o.iconColor}`,children:h.jsx(s,{})}),h.jsxs("div",{className:"ml-3 text-sm flex-1",children:[t&&h.jsx("span",{className:"font-semibold block mb-1",children:t}),h.jsx("div",{className:"leading-relaxed",children:r})]}),n&&h.jsx("button",{onClick:n,className:`ml-auto -mx-1.5 -my-1.5 rounded-lg p-1.5 inline-flex h-8 w-8 items-center justify-center transition-colors ${o.closeHover}`,"aria-label":"Close",children:h.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},On=(e,t,r)=>t===void 0?"":typeof t!="object"?r?r[t]||"":`${e}-${t}`:Object.entries(t).map(([n,a])=>{const i=n==="sm"?"":`${n}:`,o=r?r[a]||"":`${e}-${a}`;return o?`${i}${o}`:""}).filter(Boolean).join(" "),Rj=({children:e,colSpan:t,rowSpan:r,colStart:n,className:a=""})=>{const i={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},o={1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6"},s=[On("col-span",t,i),On("row-span",r,o),On("col-start",n),a].filter(Boolean).join(" ");return h.jsx("div",{className:s,children:e})},Pb=({children:e,cols:t=1,gap:r=4,gapX:n,gapY:a,flow:i="row",align:o,justify:s,className:l=""})=>{const c={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",8:"grid-cols-8",10:"grid-cols-10",12:"grid-cols-12"},d={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},u=["grid",On("grid-cols",t,c),n===void 0&&a===void 0?On("gap",r,d):"",On("gap-x",n),On("gap-y",a),i?`grid-flow-${i}`:"",o?`items-${o}`:"",s?`justify-${s}`:"",l].filter(Boolean).join(" ");return h.jsx("div",{className:u,children:e})};Pb.Item=Rj;const ee=({variant:e="body1",component:t,children:r,weight:n,align:a="left",color:i,className:o="",noWrap:s=!1,gradient:l})=>{const d=t||{h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",body1:"p",body2:"p",caption:"span",overline:"span"}[e]||"p",u={h1:"text-5xl md:text-6xl tracking-tight leading-tight",h2:"text-4xl md:text-5xl tracking-tight leading-tight",h3:"text-3xl md:text-4xl tracking-tight",h4:"text-2xl md:text-3xl tracking-tight",h5:"text-xl md:text-2xl tracking-normal",h6:"text-lg md:text-xl tracking-normal",body1:"text-base md:text-lg leading-relaxed",body2:"text-sm md:text-base leading-relaxed",caption:"text-xs md:text-sm text-gray-500",overline:"text-xs uppercase tracking-widest font-semibold"},f={h1:"font-extrabold",h2:"font-bold",h3:"font-bold",h4:"font-bold",h5:"font-semibold",h6:"font-semibold",body1:"font-normal",body2:"font-normal",caption:"font-normal",overline:"font-bold"},p={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},m={left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},v=u[e],g=n?p[n]:f[e],y=m[a];let x=i||(e==="caption"?"text-gray-500 dark:text-gray-400":"text-gray-900 dark:text-white");l&&(x=`${typeof l=="string"?l:"bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500"} text-transparent bg-clip-text`);const O=[v,g,y,x,s?"truncate":"",o].filter(Boolean).join(" ");return h.jsx(d,{className:O,children:r})},Ob=k.forwardRef(({as:e,className:t="",children:r,center:n,fullScreen:a,bgImage:i,overlay:o,glass:s,style:l,...c},d)=>{const u=e||"div",f=[n?"flex items-center justify-center":"",a?"min-h-screen w-full":"",s?"backdrop-blur-lg bg-black/40":"",t].filter(Boolean).join(" "),p={...i?{backgroundImage:`url(${i})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{},...l};return h.jsxs(u,{ref:d,className:`relative ${f}`,style:p,...c,children:[o&&h.jsx("div",{className:`absolute inset-0 z-0 ${typeof o=="string"?"":"bg-black/70"}`,style:typeof o=="string"?{backgroundColor:o}:{}}),h.jsx("div",{className:"relative z-10 w-full h-full flex flex-col items-center justify-center",children:r})]})});Ob.displayName="Box";const kb=({label:e,error:t,autoResize:r,className:n="",rows:a=4,...i})=>{const o=s=>{const l=s.target;r&&(l.style.height="auto",l.style.height=`${l.scrollHeight}px`)};return h.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[e&&h.jsx("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:e}),h.jsx("textarea",{className:`
55
+ `,children:[h.jsx("span",{children:y.label}),x&&h.jsx(Ud,{size:16})]},y.value)}),r.length===0&&h.jsx("div",{className:"px-3 py-2.5 text-sm text-gray-500 text-center",children:"No options available"})]})]}),t&&h.jsx("span",{className:"text-xs text-red-500",children:t})]})},Tj=({title:e,subtitle:t,children:r,footer:n,className:a="",variant:i="default",noPadding:o=!1,onClick:s})=>{const l={default:"bg-white border-gray-200 shadow-sm",glass:"bg-black/40 backdrop-blur-lg border-gray-800 shadow-lg",transparent:"bg-transparent border-none shadow-none"};return h.jsxs("div",{className:`rounded-xl border overflow-hidden transition-all duration-300 ${l[i]} ${a}`,onClick:s,children:[(e||t)&&h.jsxs("div",{className:`px-6 py-4 border-b ${i==="glass"?"border-gray-800":"border-gray-100"}`,children:[e&&h.jsx("h3",{className:`text-lg font-semibold ${i==="glass"?"text-white":"text-gray-900"}`,children:e}),t&&h.jsx("p",{className:`text-sm mt-1 ${i==="glass"?"text-gray-400":"text-gray-500"}`,children:t})]}),h.jsx("div",{className:o?"":"px-6 py-4",children:r}),n&&h.jsx("div",{className:`px-6 py-4 border-t ${i==="glass"?"bg-black/20 border-gray-800":"bg-gray-50 border-gray-100"}`,children:n})]})},Dj=({username:e,profilePic:t,postImage:r,likesCount:n=0,caption:a,location:i,isLiked:o=!1,isBookmarked:s=!1,onLike:l,onComment:c,onShare:d,onBookmark:u,variant:f="social",title:p,tags:m,rating:v,voteCount:g,actionLabel:y,onAction:x})=>f==="media"?h.jsxs("div",{className:"group relative max-w-[300px] mx-auto bg-white rounded-xl overflow-hidden shadow-lg border border-gray-200 font-sans transition-all duration-300 hover:shadow-xl",children:[h.jsxs("div",{className:"relative aspect-[2/3] w-full",children:[h.jsx("img",{src:r,alt:p||"Media content",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),h.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 to-transparent p-4 pt-12",children:[p&&h.jsx("h3",{className:"text-white font-bold text-xl leading-tight",children:p}),m&&h.jsx("p",{className:"text-gray-300 text-xs mt-1",children:m.join(" • ")})]})]}),h.jsxs("div",{className:"p-4 space-y-4",children:[(v||g)&&h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center gap-1 text-yellow-500",children:[v&&h.jsx("span",{className:"text-lg font-bold",children:v}),h.jsx("svg",{className:"w-4 h-4 fill-current",viewBox:"0 0 24 24",children:h.jsx("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}),g&&h.jsxs("span",{className:"text-gray-400 text-xs ml-1",children:["(",g,")"]})]})}),a&&h.jsx("p",{className:"text-gray-600 text-sm line-clamp-3",children:a}),y&&h.jsx(Ne,{fullWidth:!0,className:"!bg-[#f84464] hover:!bg-[#d63a56] text-white font-medium py-2 rounded-md transition-colors",onClick:x,children:y})]})]}):h.jsxs("div",{className:"group relative max-w-[420px] mx-auto bg-white rounded-3xl overflow-hidden shadow-sm hover:shadow-xl transition-all duration-300 border border-gray-100/50",children:[h.jsxs("div",{className:"relative w-full aspect-4/5 bg-gray-100 overflow-hidden",children:[h.jsx("img",{src:r,alt:"Post content",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),h.jsx("div",{className:"absolute top-4 right-4 opacity-0 group-hover:opacity-100 transition-opacity",children:h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",className:"bg-black/20 backdrop-blur-md text-white hover:bg-black/40 border-none",children:h.jsxs("svg",{"aria-label":"More options",fill:"currentColor",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:[h.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),h.jsx("circle",{cx:"6",cy:"12",r:"1.5"}),h.jsx("circle",{cx:"18",cy:"12",r:"1.5"})]})})})]}),h.jsxs("div",{className:"p-5",children:[h.jsxs("div",{className:"flex items-center justify-between mb-4",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"relative",children:h.jsx("img",{src:t||"",alt:e||"",className:"w-10 h-10 rounded-full object-cover ring-2 ring-offset-2 ring-indigo-500"})}),h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"font-bold text-gray-900 text-sm leading-tight hover:text-indigo-600 cursor-pointer transition-colors",children:e}),i&&h.jsx("span",{className:"text-[11px] font-medium text-gray-400 uppercase tracking-wide",children:i})]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",onClick:l,className:`transition-colors ${o?"text-rose-500 hover:bg-rose-50":"text-gray-400 hover:text-rose-500"}`,children:o?h.jsx("svg",{"aria-label":"Unlike",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 48 48",width:"26",children:h.jsx("path",{d:"M34.6 3.1c-4.5 0-7.9 1.8-10.6 5.6-2.7-3.7-6.1-5.5-10.6-5.5C6 3.1 0 9.6 0 17.6c0 14.9 17.8 29.1 23.9 30.2h.2c6.1-1.1 23.9-15.3 23.9-30.2 0-8-6-14.5-13.4-14.5z"})}):h.jsx("svg",{"aria-label":"Like",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:h.jsx("path",{d:"M16.792 3.904A4.989 4.989 0 0 1 21.5 9.122c0 3.072-2.652 4.959-5.197 7.222-2.512 2.243-3.865 3.469-4.303 3.752-.477-.309-2.143-1.823-4.303-3.752C5.141 14.072 2.5 12.194 2.5 9.122a4.989 4.989 0 0 1 4.708-5.218 4.21 4.21 0 0 1 3.675 1.941c.252.342.392.545.517.545s.265-.203.517-.545a4.21 4.21 0 0 1 3.675-1.941m0-2a6.21 6.21 0 0 0-5.292 2.768 6.21 6.21 0 0 0-5.292-2.768 6.989 6.989 0 0 0-6.708 7.218c0 4.19 2.923 6.64 5.642 9.066 2.057 1.838 4.19 3.744 5.358 5.485.474-.707 2.112-2.298 5.358-5.188 2.308-2.053 5.358-4.706 5.358-9.363a6.989 6.989 0 0 0-6.708-7.218Z"})})}),h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",onClick:c,className:"text-gray-400 hover:text-indigo-500",children:h.jsx("svg",{"aria-label":"Comment",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:h.jsx("path",{d:"M20.656 17.008a9.993 9.993 0 1 0-3.59 3.615L22 22Z",fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"})})}),h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",onClick:d,className:"text-gray-400 hover:text-indigo-500",children:h.jsxs("svg",{"aria-label":"Share Post",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:[h.jsx("line",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2",x1:"22",x2:"9.218",y1:"3",y2:"10.083"}),h.jsx("polygon",{fill:"none",points:"11.698 20.334 22 3.001 2 3.001 9.218 10.084 11.698 20.334",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2"})]})})]})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsx("p",{className:"text-gray-800 text-sm leading-relaxed",children:a}),h.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-gray-50",children:[h.jsxs("span",{className:"font-semibold text-xs text-gray-500",children:[n.toLocaleString()," Likes"]}),h.jsx("div",{className:"flex items-center gap-3",children:h.jsx(Ne,{variant:"ghost",size:"icon",rounded:"full",onClick:u,className:`transition-colors ${s?"text-gray-900":"text-gray-400 hover:text-gray-900"}`,children:s?h.jsx("svg",{"aria-label":"Remove",fill:"currentColor",height:"22",role:"img",viewBox:"0 0 24 24",width:"22",children:h.jsx("path",{d:"M20 22a.999.999 0 0 1-.687-.273L12 14.89l-7.313 6.837A1 1 0 0 1 3 21V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1Z"})}):h.jsx("svg",{"aria-label":"Save",fill:"currentColor",height:"22",role:"img",viewBox:"0 0 24 24",width:"22",children:h.jsx("path",{d:"M20 22a.999.999 0 0 1-.687-.273L12 14.89l-7.313 6.837A1 1 0 0 1 3 21V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1Z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})})})]}),h.jsxs("div",{className:"relative mt-2",children:[h.jsx("input",{type:"text",placeholder:"Add a comment...",className:"w-full text-xs text-gray-600 bg-gray-50 rounded-full px-3 py-2 outline-none focus:ring-1 focus:ring-indigo-200 transition-all"}),h.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:h.jsx(Ne,{variant:"ghost",size:"sm",className:"text-indigo-500 font-bold px-2 py-0 h-auto hover:bg-transparent hover:text-indigo-700 min-w-0",children:"Post"})})]})]})]})]}),Mj=({variant:e="spinner",size:t="md",className:r="",color:n,colors:a})=>{const i={sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"},o={sm:"w-1 h-1",md:"w-2 h-2",lg:"w-3 h-3",xl:"w-4 h-4"},s=i[t],l="bg-gradient-to-tr from-yellow-400 via-red-500 to-purple-600";if(e==="dots"){const c=o[t],d=!!n||!!a?.length,u=p=>{if(!d)return{};const m=a?.[p]||n;return m?{backgroundColor:m}:{}},f=()=>d?"":l;return h.jsx("div",{className:`flex items-center justify-center gap-1 ${r}`,children:[0,1,2].map(p=>h.jsx("div",{className:`${c} rounded-full animate-bounce ${f()}`,style:{...u(p),animationDelay:p===0?"-0.3s":p===1?"-0.15s":"0s"}},p))})}if(e==="pulse"){const c=n?"":l;return h.jsxs("div",{className:`relative flex items-center justify-center ${s} ${r}`,children:[h.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full opacity-75 animate-ping ${c}`,style:n?{backgroundColor:n}:{}}),h.jsx("span",{className:`relative inline-flex rounded-full h-3/4 w-3/4 ${c}`,style:n?{backgroundColor:n}:{}})]})}return e==="multicolor"?h.jsx("div",{className:`${s} relative ${r}`,children:h.jsx("div",{className:`absolute inset-0 rounded-full ${l} animate-spin`,children:h.jsx("div",{className:"absolute inset-[3px] bg-white rounded-full"})})}):e==="orbit"?n?h.jsxs("div",{className:`relative ${s} ${r}`,children:[h.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-t-transparent border-b-transparent animate-spin",style:{borderColor:n,borderTopColor:"transparent",borderBottomColor:"transparent"}}),h.jsx("div",{className:"absolute inset-1 rounded-full border-2 border-l-transparent border-r-transparent animate-spin-reverse opacity-75",style:{borderColor:n,borderLeftColor:"transparent",borderRightColor:"transparent",animationDirection:"reverse",animationDuration:"1.5s"}})]}):h.jsxs("div",{className:`relative ${s} ${r}`,children:[h.jsx("div",{className:`absolute inset-0 rounded-full ${l} animate-spin`,children:h.jsx("div",{className:"absolute inset-[2px] bg-white rounded-full"})}),h.jsx("div",{className:`absolute inset-1 rounded-full ${l} animate-spin-reverse opacity-75`,style:{animationDirection:"reverse",animationDuration:"1.5s"},children:h.jsx("div",{className:"absolute inset-[2px] bg-white rounded-full"})})]}):null},$j=({variant:e="info",title:t,children:r,onClose:n,className:a=""})=>{const o={success:{container:"bg-green-50 text-green-900 border-green-200",iconColor:"text-green-600",closeHover:"hover:bg-green-100 text-green-600",Icon:()=>h.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})},error:{container:"bg-red-50 text-red-900 border-red-200",iconColor:"text-red-600",closeHover:"hover:bg-red-100 text-red-600",Icon:()=>h.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})},warning:{container:"bg-yellow-50 text-yellow-900 border-yellow-200",iconColor:"text-yellow-600",closeHover:"hover:bg-yellow-100 text-yellow-600",Icon:()=>h.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})},info:{container:"bg-blue-50 text-blue-900 border-blue-200",iconColor:"text-blue-600",closeHover:"hover:bg-blue-100 text-blue-600",Icon:()=>h.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}}[e],s=o.Icon;return h.jsxs("div",{role:"alert",className:`flex p-4 rounded-lg border ${o.container} ${a}`,children:[h.jsx("div",{className:`shrink-0 ${o.iconColor}`,children:h.jsx(s,{})}),h.jsxs("div",{className:"ml-3 text-sm flex-1",children:[t&&h.jsx("span",{className:"font-semibold block mb-1",children:t}),h.jsx("div",{className:"leading-relaxed",children:r})]}),n&&h.jsx("button",{onClick:n,className:`ml-auto -mx-1.5 -my-1.5 rounded-lg p-1.5 inline-flex h-8 w-8 items-center justify-center transition-colors ${o.closeHover}`,"aria-label":"Close",children:h.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},On=(e,t,r)=>t===void 0?"":typeof t!="object"?r?r[t]||"":`${e}-${t}`:Object.entries(t).map(([n,a])=>{const i=n==="sm"?"":`${n}:`,o=r?r[a]||"":`${e}-${a}`;return o?`${i}${o}`:""}).filter(Boolean).join(" "),Rj=({children:e,colSpan:t,rowSpan:r,colStart:n,className:a=""})=>{const i={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},o={1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6"},s=[On("col-span",t,i),On("row-span",r,o),On("col-start",n),a].filter(Boolean).join(" ");return h.jsx("div",{className:s,children:e})},Pb=({children:e,cols:t=1,gap:r=4,gapX:n,gapY:a,flow:i="row",align:o,justify:s,className:l=""})=>{const c={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",8:"grid-cols-8",10:"grid-cols-10",12:"grid-cols-12"},d={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},u=["grid",On("grid-cols",t,c),n===void 0&&a===void 0?On("gap",r,d):"",On("gap-x",n),On("gap-y",a),i?`grid-flow-${i}`:"",o?`items-${o}`:"",s?`justify-${s}`:"",l].filter(Boolean).join(" ");return h.jsx("div",{className:u,children:e})};Pb.Item=Rj;const ee=({variant:e="body1",component:t,children:r,weight:n,align:a="left",color:i,className:o="",noWrap:s=!1,gradient:l})=>{const d=t||{h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",body1:"p",body2:"p",caption:"span",overline:"span"}[e]||"p",u={h1:"text-5xl md:text-6xl tracking-tight leading-tight",h2:"text-4xl md:text-5xl tracking-tight leading-tight",h3:"text-3xl md:text-4xl tracking-tight",h4:"text-2xl md:text-3xl tracking-tight",h5:"text-xl md:text-2xl tracking-normal",h6:"text-lg md:text-xl tracking-normal",body1:"text-base md:text-lg leading-relaxed",body2:"text-sm md:text-base leading-relaxed",caption:"text-xs md:text-sm text-gray-500",overline:"text-xs uppercase tracking-widest font-semibold"},f={h1:"font-extrabold",h2:"font-bold",h3:"font-bold",h4:"font-bold",h5:"font-semibold",h6:"font-semibold",body1:"font-normal",body2:"font-normal",caption:"font-normal",overline:"font-bold"},p={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},m={left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},v=u[e],g=n?p[n]:f[e],y=m[a];let x=i||(e==="caption"?"text-gray-500 dark:text-gray-400":"text-gray-900 dark:text-white");l&&(x=`${typeof l=="string"?l:"bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500"} text-transparent bg-clip-text`);const O=[v,g,y,x,s?"truncate":"",o].filter(Boolean).join(" ");return h.jsx(d,{className:O,children:r})},Ob=k.forwardRef(({as:e,className:t="",children:r,center:n,fullScreen:a,bgImage:i,overlay:o,glass:s,style:l,...c},d)=>{const u=e||"div",f=[n?"flex items-center justify-center":"",a?"min-h-screen w-full":"",s?"backdrop-blur-lg bg-black/40":"",t].filter(Boolean).join(" "),p={...i?{backgroundImage:`url(${i})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{},...l};return h.jsxs(u,{ref:d,className:`relative ${f}`,style:p,...c,children:[o&&h.jsx("div",{className:`absolute inset-0 z-0 ${typeof o=="string"?"":"bg-black/70"}`,style:typeof o=="string"?{backgroundColor:o}:{}}),h.jsx("div",{className:"relative z-10 w-full h-full flex flex-col items-center justify-center",children:r})]})});Ob.displayName="Box";const kb=({label:e,error:t,autoResize:r,className:n="",rows:a=4,...i})=>{const o=s=>{const l=s.target;r&&(l.style.height="auto",l.style.height=`${l.scrollHeight}px`)};return h.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[e&&h.jsx("label",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:e}),h.jsx("textarea",{className:`
56
56
  w-full
57
57
  px-3
58
58
  py-2
@@ -824,21 +824,29 @@ const Nq = ({
824
824
  footer: n,
825
825
  className: a = "",
826
826
  variant: i = "default",
827
- noPadding: o = !1
827
+ noPadding: o = !1,
828
+ onClick: s
828
829
  }) => {
829
- const s = {
830
+ const l = {
830
831
  default: "bg-white border-gray-200 shadow-sm",
831
832
  glass: "bg-black/40 backdrop-blur-lg border-gray-800 shadow-lg",
832
833
  transparent: "bg-transparent border-none shadow-none"
833
834
  };
834
- return /* @__PURE__ */ h.jsxs("div", { className: `rounded-xl border overflow-hidden transition-all duration-300 ${s[i]} ${a}`, children: [
835
- (e || t) && /* @__PURE__ */ h.jsxs("div", { className: `px-6 py-4 border-b ${i === "glass" ? "border-gray-800" : "border-gray-100"}`, children: [
836
- e && /* @__PURE__ */ h.jsx("h3", { className: `text-lg font-semibold ${i === "glass" ? "text-white" : "text-gray-900"}`, children: e }),
837
- t && /* @__PURE__ */ h.jsx("p", { className: `text-sm mt-1 ${i === "glass" ? "text-gray-400" : "text-gray-500"}`, children: t })
838
- ] }),
839
- /* @__PURE__ */ h.jsx("div", { className: o ? "" : "px-6 py-4", children: r }),
840
- n && /* @__PURE__ */ h.jsx("div", { className: `px-6 py-4 border-t ${i === "glass" ? "bg-black/20 border-gray-800" : "bg-gray-50 border-gray-100"}`, children: n })
841
- ] });
835
+ return /* @__PURE__ */ h.jsxs(
836
+ "div",
837
+ {
838
+ className: `rounded-xl border overflow-hidden transition-all duration-300 ${l[i]} ${a}`,
839
+ onClick: s,
840
+ children: [
841
+ (e || t) && /* @__PURE__ */ h.jsxs("div", { className: `px-6 py-4 border-b ${i === "glass" ? "border-gray-800" : "border-gray-100"}`, children: [
842
+ e && /* @__PURE__ */ h.jsx("h3", { className: `text-lg font-semibold ${i === "glass" ? "text-white" : "text-gray-900"}`, children: e }),
843
+ t && /* @__PURE__ */ h.jsx("p", { className: `text-sm mt-1 ${i === "glass" ? "text-gray-400" : "text-gray-500"}`, children: t })
844
+ ] }),
845
+ /* @__PURE__ */ h.jsx("div", { className: o ? "" : "px-6 py-4", children: r }),
846
+ n && /* @__PURE__ */ h.jsx("div", { className: `px-6 py-4 border-t ${i === "glass" ? "bg-black/20 border-gray-800" : "bg-gray-50 border-gray-100"}`, children: n })
847
+ ]
848
+ }
849
+ );
842
850
  }, Iq = ({
843
851
  username: e,
844
852
  profilePic: t,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orbit_ui_toolkit/orbitui-kit",
3
3
  "private": false,
4
- "version": "0.1.28",
4
+ "version": "0.1.29",
5
5
  "type": "module",
6
6
  "main": "./dist/orbitui.cjs.js",
7
7
  "module": "./dist/orbitui.es.js",