@orbit_ui_toolkit/orbitui-kit 0.1.1 → 0.1.2
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/dist/components/Box/Box.d.ts +5 -0
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Card/Card.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +2 -1
- package/dist/components/Typography/Typography.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/orbitui.cjs.js +35 -21
- package/dist/orbitui.es.js +465 -340
- package/package.json +1 -1
|
@@ -8,5 +8,10 @@ export type BoxProps<T extends React.ElementType = 'div'> = {
|
|
|
8
8
|
as?: T;
|
|
9
9
|
className?: string;
|
|
10
10
|
children?: React.ReactNode;
|
|
11
|
+
center?: boolean;
|
|
12
|
+
fullScreen?: boolean;
|
|
13
|
+
bgImage?: string;
|
|
14
|
+
overlay?: boolean | string;
|
|
15
|
+
glass?: boolean;
|
|
11
16
|
} & React.ComponentPropsWithoutRef<T>;
|
|
12
17
|
export declare const Box: React.ForwardRefExoticComponent<Omit<BoxProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<any>>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'link' | 'ghost';
|
|
3
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'link' | 'ghost' | 'gradient';
|
|
4
4
|
size?: 'sm' | 'md' | 'lg' | 'icon';
|
|
5
5
|
rounded?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
6
6
|
isLoading?: boolean;
|
|
7
7
|
fullWidth?: boolean;
|
|
8
8
|
leftIcon?: React.ReactNode;
|
|
9
9
|
rightIcon?: React.ReactNode;
|
|
10
|
+
gradient?: string;
|
|
10
11
|
}
|
|
11
12
|
export declare const Button: React.FC<ButtonProps>;
|
|
@@ -4,5 +4,6 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
4
4
|
error?: string;
|
|
5
5
|
leftIcon?: React.ReactNode;
|
|
6
6
|
rightIcon?: React.ReactNode;
|
|
7
|
+
variant?: 'default' | 'glass' | 'dark';
|
|
7
8
|
}
|
|
8
|
-
export declare const Input: React.
|
|
9
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -14,5 +14,7 @@ export interface TypographyProps {
|
|
|
14
14
|
className?: string;
|
|
15
15
|
/** Truncate text with ellipsis if it overflows */
|
|
16
16
|
noWrap?: boolean;
|
|
17
|
+
/** Use a gradient for the text */
|
|
18
|
+
gradient?: boolean | string;
|
|
17
19
|
}
|
|
18
20
|
export declare const Typography: React.FC<TypographyProps>;
|
package/dist/index.d.ts
CHANGED
package/dist/orbitui.cjs.js
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react");var R={exports:{}},C={};var V;function oe(){if(V)return C;V=1;var s=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function i(t,a,n){var l=null;if(n!==void 0&&(l=""+n),a.key!==void 0&&(l=""+a.key),"key"in a){n={};for(var c in a)c!=="key"&&(n[c]=a[c])}else n=a;return a=n.ref,{$$typeof:s,type:t,key:l,ref:a!==void 0?a:null,props:n}}return C.Fragment=o,C.jsx=i,C.jsxs=i,C}var $={};var H;function ae(){return H||(H=1,process.env.NODE_ENV!=="production"&&(function(){function s(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===te?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case j:return"Fragment";case _:return"Profiler";case S:return"StrictMode";case Q:return"Suspense";case K:return"SuspenseList";case re:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case N:return"Portal";case A:return r.displayName||"Context";case I:return(r._context.displayName||"Context")+".Consumer";case B:var d=r.render;return r=r.displayName,r||(r=d.displayName||d.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ee:return d=r.displayName||null,d!==null?d:s(r.type)||"Memo";case O:d=r._payload,r=r._init;try{return s(r(d))}catch{}}return null}function o(r){return""+r}function i(r){try{o(r);var d=!1}catch{d=!0}if(d){d=console;var x=d.error,h=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return x.call(d,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",h),o(r)}}function t(r){if(r===j)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===O)return"<...>";try{var d=s(r);return d?"<"+d+">":"<...>"}catch{return"<...>"}}function a(){var r=L.A;return r===null?null:r.getOwner()}function n(){return Error("react-stack-top-frame")}function l(r){if(W.call(r,"key")){var d=Object.getOwnPropertyDescriptor(r,"key").get;if(d&&d.isReactWarning)return!1}return r.key!==void 0}function c(r,d){function x(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",d))}x.isReactWarning=!0,Object.defineProperty(r,"key",{get:x,configurable:!0})}function u(){var r=s(this.type);return Y[r]||(Y[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function m(r,d,x,h,E,M){var f=x.ref;return r={$$typeof:y,type:r,key:d,props:x,_owner:h},(f!==void 0?f:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:u}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:E}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function b(r,d,x,h,E,M){var f=d.children;if(f!==void 0)if(h)if(se(f)){for(h=0;h<f.length;h++)p(f[h]);Object.freeze&&Object.freeze(f)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(f);if(W.call(d,"key")){f=s(r);var k=Object.keys(d).filter(function(ne){return ne!=="key"});h=0<k.length?"{key: someKey, "+k.join(": ..., ")+": ...}":"{key: someKey}",G[f+h]||(k=0<k.length?"{"+k.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
2
|
let props = %s;
|
|
3
3
|
<%s {...props} />
|
|
4
4
|
React keys must be passed directly to JSX without using spread:
|
|
5
5
|
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,
|
|
6
|
+
<%s key={someKey} {...props} />`,h,f,k,f),G[f+h]=!0)}if(f=null,x!==void 0&&(i(x),f=""+x),l(d)&&(i(d.key),f=""+d.key),"key"in d){x={};for(var z in d)z!=="key"&&(x[z]=d[z])}else x=d;return f&&c(x,typeof r=="function"?r.displayName||r.name||"Unknown":r),m(r,f,x,a(),E,M)}function p(r){v(r)?r._store&&(r._store.validated=1):typeof r=="object"&&r!==null&&r.$$typeof===O&&(r._payload.status==="fulfilled"?v(r._payload.value)&&r._payload.value._store&&(r._payload.value._store.validated=1):r._store&&(r._store.validated=1))}function v(r){return typeof r=="object"&&r!==null&&r.$$typeof===y}var g=T,y=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),A=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),L=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,se=Array.isArray,P=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(r){return r()}};var D,Y={},F=g.react_stack_bottom_frame.bind(g,n)(),U=P(t(n)),G={};$.Fragment=j,$.jsx=function(r,d,x){var h=1e4>L.recentlyCreatedOwnerStacks++;return b(r,d,x,!1,h?Error("react-stack-top-frame"):F,h?P(t(r)):U)},$.jsxs=function(r,d,x){var h=1e4>L.recentlyCreatedOwnerStacks++;return b(r,d,x,!0,h?Error("react-stack-top-frame"):F,h?P(t(r)):U)}})()),$}var q;function le(){return q||(q=1,process.env.NODE_ENV==="production"?R.exports=oe():R.exports=ae()),R.exports}var e=le();const w=({variant:s="primary",size:o="md",rounded:i="full",isLoading:t=!1,fullWidth:a=!1,leftIcon:n,rightIcon:l,className:c="",children:u,disabled:m,gradient:b,...p})=>{const v="inline-flex items-center justify-center font-medium disabled:opacity-50 disabled:pointer-events-none transition-colors duration-150",g={primary:"bg-[#0070f3] text-white hover:bg-[#0060df] border border-transparent",secondary:"bg-transparent text-[#0070f3] border border-[#0070f3] hover:bg-blue-50",tertiary:"bg-transparent text-[#0070f3] border border-gray-300 hover:border-gray-400 hover:bg-gray-50",danger:"bg-[#c23b22] text-white hover:bg-[#a0301b] border border-transparent",link:"bg-transparent text-[#0070f3] hover:underline px-0 py-0 h-auto border-none",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 border-transparent",gradient:`text-white border-none hover:opacity-90 active:scale-95 ${b||"bg-gradient-to-r from-red-500 to-pink-500"}`},y={sm:"px-4 py-1.5 text-xs gap-1.5 min-w-[80px]",md:"px-6 py-2.5 text-sm gap-2 min-w-[100px]",lg:"px-8 py-3.5 text-lg gap-2 min-w-[120px]",icon:"w-10 h-10 p-0 min-w-0"},N={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},j=a?"w-full":"";return e.jsxs("button",{className:`${v} ${g[s]} ${y[o]} ${N[i]} ${j} ${c}`,disabled:m||t,...p,children:[t&&e.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),!t&&n&&e.jsx("span",{className:"shrink-0",children:n}),e.jsx("span",{className:"truncate",children:t?"Loading...":u}),!t&&l&&e.jsx("span",{className:"shrink-0",children:l})]})},J=T.forwardRef(({label:s,error:o,leftIcon:i,rightIcon:t,variant:a="default",className:n="",...l},c)=>{const u={default:"bg-white border-gray-300 text-gray-900 focus:ring-blue-500",glass:"bg-black/30 border-gray-600 text-white placeholder-gray-400 focus:ring-pink-500 focus:border-pink-500",dark:"bg-gray-900 border-gray-800 text-white focus:ring-blue-500"};return e.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[s&&e.jsx("label",{className:`text-sm font-medium ${a==="default"?"text-gray-700":"text-gray-300"}`,children:s}),e.jsxs("div",{className:"relative",children:[i&&e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-gray-400",children:i}),e.jsx("input",{ref:c,className:`
|
|
7
7
|
w-full
|
|
8
|
-
${
|
|
8
|
+
${i?"pl-10":"px-3"}
|
|
9
9
|
${t?"pr-10":"px-3"}
|
|
10
|
-
py-
|
|
11
|
-
bg-white
|
|
10
|
+
py-3
|
|
12
11
|
border
|
|
13
|
-
${
|
|
14
|
-
rounded-
|
|
12
|
+
${o?"border-red-500":""}
|
|
13
|
+
rounded-lg
|
|
15
14
|
shadow-sm
|
|
16
15
|
focus:outline-none
|
|
17
16
|
focus:ring-2
|
|
18
|
-
${
|
|
17
|
+
${o?"focus:ring-red-500":""}
|
|
19
18
|
focus:border-transparent
|
|
20
19
|
transition-all
|
|
21
20
|
duration-200
|
|
22
|
-
|
|
23
|
-
${
|
|
24
|
-
`,...a}),t&&e.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400",children:t})]}),n&&e.jsx("span",{className:"text-xs text-red-500",children:n})]}),ie=({title:s,subtitle:n,children:l,footer:t,className:o=""})=>e.jsxs("div",{className:`bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden ${o}`,children:[(s||n)&&e.jsxs("div",{className:"px-6 py-4 border-b border-gray-100",children:[s&&e.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:s}),n&&e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:n})]}),e.jsx("div",{className:"px-6 py-4",children:l}),t&&e.jsx("div",{className:"px-6 py-4 bg-gray-50 border-t border-gray-100",children:t})]}),ce=({username:s,profilePic:n,postImage:l,likesCount:t,caption:o,location:a,isLiked:d=!1,isBookmarked:c=!1,onLike:f,onComment:g,onShare:p,onBookmark:b})=>e.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:[e.jsxs("div",{className:"relative w-full aspect-4/5 bg-gray-100 overflow-hidden",children:[e.jsx("img",{src:l,alt:"Post content",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),e.jsx("div",{className:"absolute top-4 right-4 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(y,{variant:"ghost",size:"icon",rounded:"full",className:"bg-black/20 backdrop-blur-md text-white hover:bg-black/40 border-none",children:e.jsxs("svg",{"aria-label":"More options",fill:"currentColor",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:[e.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),e.jsx("circle",{cx:"6",cy:"12",r:"1.5"}),e.jsx("circle",{cx:"18",cy:"12",r:"1.5"})]})})})]}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"relative",children:e.jsx("img",{src:n,alt:s,className:"w-10 h-10 rounded-full object-cover ring-2 ring-offset-2 ring-indigo-500"})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"font-bold text-gray-900 text-sm leading-tight hover:text-indigo-600 cursor-pointer transition-colors",children:s}),a&&e.jsx("span",{className:"text-[11px] font-medium text-gray-400 uppercase tracking-wide",children:a})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{variant:"ghost",size:"icon",rounded:"full",onClick:f,className:`transition-colors ${d?"text-rose-500 hover:bg-rose-50":"text-gray-400 hover:text-rose-500"}`,children:d?e.jsx("svg",{"aria-label":"Unlike",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 48 48",width:"26",children:e.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"})}):e.jsx("svg",{"aria-label":"Like",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:e.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"})})}),e.jsx(y,{variant:"ghost",size:"icon",rounded:"full",onClick:g,className:"text-gray-400 hover:text-indigo-500",children:e.jsx("svg",{"aria-label":"Comment",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:e.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"})})}),e.jsx(y,{variant:"ghost",size:"icon",rounded:"full",onClick:p,className:"text-gray-400 hover:text-indigo-500",children:e.jsxs("svg",{"aria-label":"Share Post",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:[e.jsx("line",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2",x1:"22",x2:"9.218",y1:"3",y2:"10.083"}),e.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"})]})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-gray-800 text-sm leading-relaxed",children:o}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-gray-50",children:[e.jsxs("span",{className:"font-semibold text-xs text-gray-500",children:[t.toLocaleString()," Likes"]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(y,{variant:"ghost",size:"icon",rounded:"full",onClick:b,className:`transition-colors ${c?"text-gray-900":"text-gray-400 hover:text-gray-900"}`,children:c?e.jsx("svg",{"aria-label":"Remove",fill:"currentColor",height:"22",role:"img",viewBox:"0 0 24 24",width:"22",children:e.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"})}):e.jsx("svg",{"aria-label":"Save",fill:"currentColor",height:"22",role:"img",viewBox:"0 0 24 24",width:"22",children:e.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"})})})})]}),e.jsxs("div",{className:"relative mt-2",children:[e.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"}),e.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:e.jsx(y,{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"})})]})]})]})]}),de=({variant:s="spinner",size:n="md",className:l="",color:t,colors:o})=>{const a={sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"},d={sm:"w-1 h-1",md:"w-2 h-2",lg:"w-3 h-3",xl:"w-4 h-4"},c=a[n],f="bg-gradient-to-tr from-yellow-400 via-red-500 to-purple-600";if(s==="dots"){const g=d[n],p=!!t||!!o?.length,b=h=>{if(!p)return{};const v=o?.[h]||t;return v?{backgroundColor:v}:{}},j=()=>p?"":f;return e.jsx("div",{className:`flex items-center justify-center gap-1 ${l}`,children:[0,1,2].map(h=>e.jsx("div",{className:`${g} rounded-full animate-bounce ${j()}`,style:{...b(h),animationDelay:h===0?"-0.3s":h===1?"-0.15s":"0s"}},h))})}if(s==="pulse"){const g=t?"":f;return e.jsxs("div",{className:`relative flex items-center justify-center ${c} ${l}`,children:[e.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full opacity-75 animate-ping ${g}`,style:t?{backgroundColor:t}:{}}),e.jsx("span",{className:`relative inline-flex rounded-full h-3/4 w-3/4 ${g}`,style:t?{backgroundColor:t}:{}})]})}return s==="multicolor"?e.jsx("div",{className:`${c} relative ${l}`,children:e.jsx("div",{className:`absolute inset-0 rounded-full ${f} animate-spin`,children:e.jsx("div",{className:"absolute inset-[3px] bg-white rounded-full"})})}):s==="orbit"?t?e.jsxs("div",{className:`relative ${c} ${l}`,children:[e.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-t-transparent border-b-transparent animate-spin",style:{borderColor:t,borderTopColor:"transparent",borderBottomColor:"transparent"}}),e.jsx("div",{className:"absolute inset-1 rounded-full border-2 border-l-transparent border-r-transparent animate-spin-reverse opacity-75",style:{borderColor:t,borderLeftColor:"transparent",borderRightColor:"transparent",animationDirection:"reverse",animationDuration:"1.5s"}})]}):e.jsxs("div",{className:`relative ${c} ${l}`,children:[e.jsx("div",{className:`absolute inset-0 rounded-full ${f} animate-spin`,children:e.jsx("div",{className:"absolute inset-[2px] bg-white rounded-full"})}),e.jsx("div",{className:`absolute inset-1 rounded-full ${f} animate-spin-reverse opacity-75`,style:{animationDirection:"reverse",animationDuration:"1.5s"},children:e.jsx("div",{className:"absolute inset-[2px] bg-white rounded-full"})})]}):null},ue=({variant:s="info",title:n,children:l,onClose:t,className:o=""})=>{const d={success:{container:"bg-green-50 text-green-900 border-green-200",iconColor:"text-green-600",closeHover:"hover:bg-green-100 text-green-600",Icon:()=>e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.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:()=>e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.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:()=>e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.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:()=>e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.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"})})}}[s],c=d.Icon;return e.jsxs("div",{role:"alert",className:`flex p-4 rounded-lg border ${d.container} ${o}`,children:[e.jsx("div",{className:`shrink-0 ${d.iconColor}`,children:e.jsx(c,{})}),e.jsxs("div",{className:"ml-3 text-sm flex-1",children:[n&&e.jsx("span",{className:"font-semibold block mb-1",children:n}),e.jsx("div",{className:"leading-relaxed",children:l})]}),t&&e.jsx("button",{onClick:t,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 ${d.closeHover}`,"aria-label":"Close",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},xe=({children:s,colSpan:n,rowSpan:l,colStart:t,className:o=""})=>{const a={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"},d={1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6"},c=[n?a[n]:"",l?d[l]:"",t?`col-start-${t}`:"",o].filter(Boolean).join(" ");return e.jsx("div",{className:c,children:s})},q=({children:s,cols:n=1,gap:l=4,gapX:t,gapY:o,flow:a="row",align:d,justify:c,className:f=""})=>{const g={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"},p={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"},b=["grid",g[n],t===void 0&&o===void 0?p[l]:"",t?`gap-x-${t}`:"",o?`gap-y-${o}`:"",a?`grid-flow-${a}`:"",d?`items-${d}`:"",c?`justify-${c}`:"",f].filter(Boolean).join(" ");return e.jsx("div",{className:b,children:s})};q.Item=xe;const me=({variant:s="body1",component:n,children:l,weight:t,align:o="left",color:a,className:d="",noWrap:c=!1})=>{const g=n||{h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",body1:"p",body2:"p",caption:"span",overline:"span"}[s]||"p",p={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"},b={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"},j={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},h={left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},v=p[s],N=t?j[t]:b[s],k=h[o],$=[v,N,k,a||"text-gray-900",c?"truncate":"",d].filter(Boolean).join(" ");return e.jsx(g,{className:$,children:l})},H=P.forwardRef(({as:s,className:n="",children:l,...t},o)=>{const a=s||"div";return e.jsx(a,{ref:o,className:n,...t,children:l})});H.displayName="Box";const he=({label:s,error:n,autoResize:l,className:t="",rows:o=4,...a})=>{const d=c=>{l&&(c.target.style.height="auto",c.target.style.height=`${c.target.scrollHeight}px`),a.onChange?.(c)};return e.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[s&&e.jsx("label",{className:"text-sm font-medium text-gray-700",children:s}),e.jsx("textarea",{className:`
|
|
21
|
+
${u[a]}
|
|
22
|
+
${n}
|
|
23
|
+
`,...l}),t&&e.jsx("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400",children:t})]}),o&&e.jsx("span",{className:"text-xs text-red-500",children:o})]})});J.displayName="Input";const ie=({title:s,subtitle:o,children:i,footer:t,className:a="",variant:n="default",noPadding:l=!1})=>{const c={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 e.jsxs("div",{className:`rounded-xl border overflow-hidden transition-all duration-300 ${c[n]} ${a}`,children:[(s||o)&&e.jsxs("div",{className:`px-6 py-4 border-b ${n==="glass"?"border-gray-800":"border-gray-100"}`,children:[s&&e.jsx("h3",{className:`text-lg font-semibold ${n==="glass"?"text-white":"text-gray-900"}`,children:s}),o&&e.jsx("p",{className:`text-sm mt-1 ${n==="glass"?"text-gray-400":"text-gray-500"}`,children:o})]}),e.jsx("div",{className:l?"":"px-6 py-4",children:i}),t&&e.jsx("div",{className:`px-6 py-4 border-t ${n==="glass"?"bg-black/20 border-gray-800":"bg-gray-50 border-gray-100"}`,children:t})]})},ce=({username:s,profilePic:o,postImage:i,likesCount:t,caption:a,location:n,isLiked:l=!1,isBookmarked:c=!1,onLike:u,onComment:m,onShare:b,onBookmark:p})=>e.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:[e.jsxs("div",{className:"relative w-full aspect-4/5 bg-gray-100 overflow-hidden",children:[e.jsx("img",{src:i,alt:"Post content",className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),e.jsx("div",{className:"absolute top-4 right-4 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(w,{variant:"ghost",size:"icon",rounded:"full",className:"bg-black/20 backdrop-blur-md text-white hover:bg-black/40 border-none",children:e.jsxs("svg",{"aria-label":"More options",fill:"currentColor",height:"24",role:"img",viewBox:"0 0 24 24",width:"24",children:[e.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),e.jsx("circle",{cx:"6",cy:"12",r:"1.5"}),e.jsx("circle",{cx:"18",cy:"12",r:"1.5"})]})})})]}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"relative",children:e.jsx("img",{src:o,alt:s,className:"w-10 h-10 rounded-full object-cover ring-2 ring-offset-2 ring-indigo-500"})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"font-bold text-gray-900 text-sm leading-tight hover:text-indigo-600 cursor-pointer transition-colors",children:s}),n&&e.jsx("span",{className:"text-[11px] font-medium text-gray-400 uppercase tracking-wide",children:n})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{variant:"ghost",size:"icon",rounded:"full",onClick:u,className:`transition-colors ${l?"text-rose-500 hover:bg-rose-50":"text-gray-400 hover:text-rose-500"}`,children:l?e.jsx("svg",{"aria-label":"Unlike",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 48 48",width:"26",children:e.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"})}):e.jsx("svg",{"aria-label":"Like",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:e.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"})})}),e.jsx(w,{variant:"ghost",size:"icon",rounded:"full",onClick:m,className:"text-gray-400 hover:text-indigo-500",children:e.jsx("svg",{"aria-label":"Comment",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:e.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"})})}),e.jsx(w,{variant:"ghost",size:"icon",rounded:"full",onClick:b,className:"text-gray-400 hover:text-indigo-500",children:e.jsxs("svg",{"aria-label":"Share Post",fill:"currentColor",height:"26",role:"img",viewBox:"0 0 24 24",width:"26",children:[e.jsx("line",{fill:"none",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"2",x1:"22",x2:"9.218",y1:"3",y2:"10.083"}),e.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"})]})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-gray-800 text-sm leading-relaxed",children:a}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-gray-50",children:[e.jsxs("span",{className:"font-semibold text-xs text-gray-500",children:[t.toLocaleString()," Likes"]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(w,{variant:"ghost",size:"icon",rounded:"full",onClick:p,className:`transition-colors ${c?"text-gray-900":"text-gray-400 hover:text-gray-900"}`,children:c?e.jsx("svg",{"aria-label":"Remove",fill:"currentColor",height:"22",role:"img",viewBox:"0 0 24 24",width:"22",children:e.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"})}):e.jsx("svg",{"aria-label":"Save",fill:"currentColor",height:"22",role:"img",viewBox:"0 0 24 24",width:"22",children:e.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"})})})})]}),e.jsxs("div",{className:"relative mt-2",children:[e.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"}),e.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2",children:e.jsx(w,{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"})})]})]})]})]}),de=({variant:s="spinner",size:o="md",className:i="",color:t,colors:a})=>{const n={sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"},l={sm:"w-1 h-1",md:"w-2 h-2",lg:"w-3 h-3",xl:"w-4 h-4"},c=n[o],u="bg-gradient-to-tr from-yellow-400 via-red-500 to-purple-600";if(s==="dots"){const m=l[o],b=!!t||!!a?.length,p=g=>{if(!b)return{};const y=a?.[g]||t;return y?{backgroundColor:y}:{}},v=()=>b?"":u;return e.jsx("div",{className:`flex items-center justify-center gap-1 ${i}`,children:[0,1,2].map(g=>e.jsx("div",{className:`${m} rounded-full animate-bounce ${v()}`,style:{...p(g),animationDelay:g===0?"-0.3s":g===1?"-0.15s":"0s"}},g))})}if(s==="pulse"){const m=t?"":u;return e.jsxs("div",{className:`relative flex items-center justify-center ${c} ${i}`,children:[e.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full opacity-75 animate-ping ${m}`,style:t?{backgroundColor:t}:{}}),e.jsx("span",{className:`relative inline-flex rounded-full h-3/4 w-3/4 ${m}`,style:t?{backgroundColor:t}:{}})]})}return s==="multicolor"?e.jsx("div",{className:`${c} relative ${i}`,children:e.jsx("div",{className:`absolute inset-0 rounded-full ${u} animate-spin`,children:e.jsx("div",{className:"absolute inset-[3px] bg-white rounded-full"})})}):s==="orbit"?t?e.jsxs("div",{className:`relative ${c} ${i}`,children:[e.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-t-transparent border-b-transparent animate-spin",style:{borderColor:t,borderTopColor:"transparent",borderBottomColor:"transparent"}}),e.jsx("div",{className:"absolute inset-1 rounded-full border-2 border-l-transparent border-r-transparent animate-spin-reverse opacity-75",style:{borderColor:t,borderLeftColor:"transparent",borderRightColor:"transparent",animationDirection:"reverse",animationDuration:"1.5s"}})]}):e.jsxs("div",{className:`relative ${c} ${i}`,children:[e.jsx("div",{className:`absolute inset-0 rounded-full ${u} animate-spin`,children:e.jsx("div",{className:"absolute inset-[2px] bg-white rounded-full"})}),e.jsx("div",{className:`absolute inset-1 rounded-full ${u} animate-spin-reverse opacity-75`,style:{animationDirection:"reverse",animationDuration:"1.5s"},children:e.jsx("div",{className:"absolute inset-[2px] bg-white rounded-full"})})]}):null},ue=({variant:s="info",title:o,children:i,onClose:t,className:a=""})=>{const l={success:{container:"bg-green-50 text-green-900 border-green-200",iconColor:"text-green-600",closeHover:"hover:bg-green-100 text-green-600",Icon:()=>e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.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:()=>e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.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:()=>e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.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:()=>e.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.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"})})}}[s],c=l.Icon;return e.jsxs("div",{role:"alert",className:`flex p-4 rounded-lg border ${l.container} ${a}`,children:[e.jsx("div",{className:`shrink-0 ${l.iconColor}`,children:e.jsx(c,{})}),e.jsxs("div",{className:"ml-3 text-sm flex-1",children:[o&&e.jsx("span",{className:"font-semibold block mb-1",children:o}),e.jsx("div",{className:"leading-relaxed",children:i})]}),t&&e.jsx("button",{onClick:t,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 ${l.closeHover}`,"aria-label":"Close",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},xe=({children:s,colSpan:o,rowSpan:i,colStart:t,className:a=""})=>{const n={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"},l={1:"row-span-1",2:"row-span-2",3:"row-span-3",4:"row-span-4",5:"row-span-5",6:"row-span-6"},c=[o?n[o]:"",i?l[i]:"",t?`col-start-${t}`:"",a].filter(Boolean).join(" ");return e.jsx("div",{className:c,children:s})},Z=({children:s,cols:o=1,gap:i=4,gapX:t,gapY:a,flow:n="row",align:l,justify:c,className:u=""})=>{const m={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"},b={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"},p=["grid",m[o],t===void 0&&a===void 0?b[i]:"",t?`gap-x-${t}`:"",a?`gap-y-${a}`:"",n?`grid-flow-${n}`:"",l?`items-${l}`:"",c?`justify-${c}`:"",u].filter(Boolean).join(" ");return e.jsx("div",{className:p,children:s})};Z.Item=xe;const he=({variant:s="body1",component:o,children:i,weight:t,align:a="left",color:n,className:l="",noWrap:c=!1,gradient:u})=>{const b=o||{h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",body1:"p",body2:"p",caption:"span",overline:"span"}[s]||"p",p={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"},v={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"},g={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},y={left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},N=p[s],j=t?g[t]:v[s],S=y[a];let _=n||(s==="caption"?"text-gray-500":"text-gray-900");u&&(_=`${typeof u=="string"?u:"bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500"} text-transparent bg-clip-text`);const A=[N,j,S,_,c?"truncate":"",l].filter(Boolean).join(" ");return e.jsx(b,{className:A,children:i})},X=T.forwardRef(({as:s,className:o="",children:i,center:t,fullScreen:a,bgImage:n,overlay:l,glass:c,style:u,...m},b)=>{const p=s||"div",v=[t?"flex items-center justify-center":"",a?"min-h-screen w-full":"",c?"backdrop-blur-lg bg-black/40":"",o].filter(Boolean).join(" "),g={...n?{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{},...u};return e.jsxs(p,{ref:b,className:`relative ${v}`,style:g,...m,children:[l&&e.jsx("div",{className:`absolute inset-0 z-0 ${typeof l=="string"?"":"bg-black/70"}`,style:typeof l=="string"?{backgroundColor:l}:{}}),e.jsx("div",{className:"relative z-10 w-full h-full flex flex-col items-center justify-center",children:i})]})});X.displayName="Box";const fe=({label:s,error:o,autoResize:i,className:t="",rows:a=4,...n})=>{const l=c=>{i&&(c.target.style.height="auto",c.target.style.height=`${c.target.scrollHeight}px`),n.onChange?.(c)};return e.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[s&&e.jsx("label",{className:"text-sm font-medium text-gray-700",children:s}),e.jsx("textarea",{className:`
|
|
25
24
|
w-full
|
|
26
25
|
px-3
|
|
27
26
|
py-2
|
|
28
27
|
bg-white
|
|
29
28
|
border
|
|
30
|
-
${
|
|
29
|
+
${o?"border-red-500":"border-gray-300"}
|
|
31
30
|
rounded-md
|
|
32
31
|
shadow-sm
|
|
33
32
|
focus:outline-none
|
|
34
33
|
focus:ring-2
|
|
35
|
-
${
|
|
34
|
+
${o?"focus:ring-red-500":"focus:ring-blue-500"}
|
|
36
35
|
focus:border-transparent
|
|
37
36
|
transition-all
|
|
38
37
|
duration-200
|
|
@@ -40,16 +39,31 @@ React keys must be passed directly to JSX without using spread:
|
|
|
40
39
|
min-h-[100px]
|
|
41
40
|
resize-y
|
|
42
41
|
${t}
|
|
43
|
-
`,rows:
|
|
42
|
+
`,rows:a,onInput:l,...n}),o&&e.jsx("span",{className:"text-xs text-red-500",children:o})]})},me=({sidebar:s,header:o,children:i,footer:t,sidebarWidth:a="260px",className:n=""})=>{const[l,c]=T.useState(!1);return e.jsxs("div",{className:`flex h-screen bg-gray-50 overflow-hidden ${n}`,children:[s&&e.jsx("div",{className:"hidden md:flex flex-col h-full bg-white border-r border-gray-200",style:{width:a},children:s}),s&&l&&e.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>c(!1)}),s&&e.jsx("div",{className:`
|
|
44
43
|
fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-xl transition-transform duration-300 md:hidden
|
|
45
|
-
${
|
|
46
|
-
`,children:s}),e.jsxs("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[e.jsxs("header",{className:"flex h-16 items-center border-b border-gray-200 bg-white px-4 shrink-0",children:[s&&e.jsx("button",{className:"mr-4 p-2 md:hidden text-gray-500 hover:bg-gray-100 rounded-md",onClick:()=>c(!0),children:e.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16m-7 6h7"})})}),e.jsx("div",{className:"flex-1 flex items-center justify-between",children:
|
|
44
|
+
${l?"translate-x-0":"-translate-x-full"}
|
|
45
|
+
`,children:s}),e.jsxs("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[e.jsxs("header",{className:"flex h-16 items-center border-b border-gray-200 bg-white px-4 shrink-0",children:[s&&e.jsx("button",{className:"mr-4 p-2 md:hidden text-gray-500 hover:bg-gray-100 rounded-md",onClick:()=>c(!0),children:e.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16m-7 6h7"})})}),e.jsx("div",{className:"flex-1 flex items-center justify-between",children:o||e.jsx("div",{className:"font-bold text-xl text-indigo-600",children:"OrbitUI"})})]}),e.jsx("main",{className:"flex-1 overflow-y-auto p-4 md:p-6 lg:p-8",children:i}),t&&e.jsx("footer",{className:"h-14 border-t border-gray-200 bg-white px-4 flex items-center shrink-0",children:t})]})]})},ge=({sidebar:s,header:o,children:i,footer:t,maxWidth:a="935px",className:n=""})=>e.jsxs("div",{className:`flex flex-col md:flex-row h-screen bg-white ${n}`,children:[s&&e.jsx("aside",{className:"hidden md:flex flex-col fixed left-0 h-screen border-r border-gray-200 transition-all duration-300 xl:w-64 w-20 z-50 bg-white",children:s}),e.jsxs("main",{className:`
|
|
47
46
|
flex-1 bg-white overflow-y-auto min-w-0
|
|
48
47
|
${s?"md:ml-20 xl:ml-64":""}
|
|
49
|
-
`,children:[
|
|
48
|
+
`,children:[o&&e.jsx("header",{className:"sticky top-0 z-40 bg-white/80 backdrop-blur-md border-b border-gray-100 md:hidden",children:o}),e.jsx("div",{className:"mx-auto px-4 md:px-8 py-8",style:{maxWidth:a},children:i})]}),t&&e.jsx("nav",{className:"md:hidden fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 z-50",children:t})]}),be=({list:s,header:o,children:i,footer:t,isChatActive:a=!1,onBack:n,listWidth:l="350px",className:c=""})=>e.jsxs("div",{className:`flex h-screen bg-white overflow-hidden ${c}`,children:[e.jsx("aside",{className:`
|
|
50
49
|
flex-shrink-0 border-r border-gray-200 bg-white transition-all duration-300
|
|
51
|
-
${
|
|
52
|
-
`,style:{width:
|
|
50
|
+
${a?"hidden md:flex":"flex w-full md:w-auto"}
|
|
51
|
+
`,style:{width:a?l:window.innerWidth<768?"100%":l},children:e.jsx("div",{className:"flex flex-col w-full h-full",children:s})}),e.jsxs("main",{className:`
|
|
53
52
|
flex-1 flex flex-col min-w-0 bg-white transition-all duration-300
|
|
54
|
-
${
|
|
55
|
-
`,children:[(n
|
|
53
|
+
${a?"flex w-full":"hidden md:flex"}
|
|
54
|
+
`,children:[(o||n)&&e.jsxs("header",{className:"flex h-16 items-center px-4 border-b border-gray-100 shrink-0 bg-white/80 backdrop-blur-md sticky top-0 z-10",children:[n&&e.jsx("button",{onClick:n,className:"mr-3 p-2 md:hidden text-gray-500 hover:bg-gray-100 rounded-full transition-colors","aria-label":"Go back",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsx("div",{className:"flex-1 min-w-0",children:o})]}),e.jsx("div",{className:"flex-1 overflow-y-auto bg-gray-50",children:i}),t&&e.jsx("footer",{className:"p-4 bg-white border-t border-gray-100 shrink-0",children:t})]})]}),pe=({src:s,alt:o="User",initials:i,size:t="md",status:a,className:n="",isBordered:l=!1})=>{const c={xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base",xl:"w-16 h-16 text-lg","2xl":"w-24 h-24 text-xl"},u={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-yellow-500"},m={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3",xl:"w-4 h-4","2xl":"w-5 h-5"};return e.jsxs("div",{className:`relative inline-block ${n}`,children:[e.jsx("div",{className:`
|
|
55
|
+
${c[t]}
|
|
56
|
+
rounded-full
|
|
57
|
+
flex items-center justify-center
|
|
58
|
+
overflow-hidden
|
|
59
|
+
bg-gray-100
|
|
60
|
+
text-gray-600
|
|
61
|
+
font-bold
|
|
62
|
+
${l?"ring-2 ring-white":""}
|
|
63
|
+
`,children:s?e.jsx("img",{src:s,alt:o,className:"w-full h-full object-cover"}):e.jsx("span",{children:i||o.charAt(0).toUpperCase()})}),a&&e.jsx("span",{className:`
|
|
64
|
+
absolute bottom-0 right-0
|
|
65
|
+
block rounded-full
|
|
66
|
+
ring-2 ring-white
|
|
67
|
+
${u[a]}
|
|
68
|
+
${m[t]}
|
|
69
|
+
`})]})};exports.Alert=ue;exports.AppLayout=me;exports.Avatar=pe;exports.Box=X;exports.Button=w;exports.Card=ie;exports.Grid=Z;exports.InboxLayout=be;exports.Input=J;exports.Loader=de;exports.Post=ce;exports.SocialLayout=ge;exports.TextArea=fe;exports.Typography=he;
|