fiboui 1.0.0 → 1.0.1
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/README.md +144 -73
- package/dist/core/StateWrapper.d.ts +3 -0
- package/dist/core/builder.d.ts +4 -1
- package/dist/core/effects.d.ts +4 -3
- package/dist/core/hooks.d.ts +5 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/state.d.ts +76 -27
- package/dist/effects-D16XdB_d.mjs +10 -0
- package/dist/index.esm.js +1181 -1026
- package/dist/index.umd.js +4 -4
- package/dist/interactive/TextField/index.d.ts +3 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/core/StateWrapper.tsx +28 -2
- package/src/core/builder.ts +48 -10
- package/src/core/effects.ts +3 -3
- package/src/core/hooks.ts +48 -0
- package/src/core/index.ts +1 -0
- package/src/core/state.ts +203 -139
- package/src/demo.tsx +5 -0
- package/src/interactive/Button/index.ts +2 -1
- package/src/interactive/TextField/index.ts +29 -6
- package/src/structure/Box/index.ts +3 -2
- package/dist/effects-Co9C_Dyx.mjs +0 -9
- package/dist/examples/ScaffoldExamples.d.ts +0 -3
- package/dist/examples/StateExamples.d.ts +0 -5
- package/src/examples/ScaffoldExamples.tsx +0 -299
- package/src/examples/StateExamples.tsx +0 -149
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(u,
|
|
2
|
-
`);for(const
|
|
1
|
+
(function(u,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react"),require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime"],s):(u=typeof globalThis<"u"?globalThis:u||self,s(u.FiboUI={},u.React,u.jsxRuntime))})(this,function(u,s,k){"use strict";var Js=Object.defineProperty;var Ks=(u,s,k)=>s in u?Js(u,s,{enumerable:!0,configurable:!0,writable:!0,value:k}):u[s]=k;var n=(u,s,k)=>Ks(u,typeof s!="symbol"?s+"":s,k);let A=null;class J{constructor(t){n(this,"dependencies",new Set);n(this,"_onDispose");this.fn=t,this.run()}run(){const t=A;A=this;try{this.cleanup(),this.fn()}finally{A=t}}track(t){this.dependencies.add(t),t.subscribeEffect(this)}trigger(){this.run()}cleanup(){this.dependencies.forEach(t=>t.unsubscribeEffect(this)),this.dependencies.clear()}dispose(){var t;this.cleanup(),(t=this._onDispose)==null||t.call(this)}}class K{constructor(t){n(this,"dependencies",new Set);this._onInvalidate=t}execute(t){const e=A;A=this;try{return this.cleanup(),t()}finally{A=e}}track(t){this.dependencies.add(t),t.subscribeEffect(this)}trigger(){this._onInvalidate()}cleanup(){this.dependencies.forEach(t=>t.unsubscribeEffect(this)),this.dependencies.clear()}dispose(){this.cleanup()}}class X{constructor(t){n(this,"listeners",new Set);n(this,"effects",new Set);this._value=t}get value(){return A&&A.track(this),this._value}set value(t){this._value!==t&&(this._value=t,this.notify())}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}subscribeEffect(t){this.effects.add(t)}unsubscribeEffect(t){this.effects.delete(t)}notify(){const t=Array.from(this.effects),e=Array.from(this.listeners);t.forEach(r=>r.trigger()),e.forEach(r=>r(this._value))}}function me(i){return new X(i)}class Q{constructor(t){n(this,"listeners",new Set);n(this,"effects",new Set);n(this,"_value");n(this,"_dirty",!0);n(this,"internalEffect");this.fn=t,this.internalEffect=new J(()=>{this._dirty||(this._dirty=!0,this.notify())})}get value(){if(A&&A.track(this),this._dirty){const t=A;A=this.internalEffect;try{this.internalEffect.cleanup(),this._value=this.fn(),this._dirty=!1}finally{A=t}}return this._value}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}subscribeEffect(t){this.effects.add(t)}unsubscribeEffect(t){this.effects.delete(t)}notify(){const t=Array.from(this.effects),e=Array.from(this.listeners);t.forEach(r=>r.trigger()),e.forEach(r=>r(this._value))}}function pe(i){return new Q(i)}class Z{constructor(t){n(this,"listeners",new Set);n(this,"effects",new Set);this._value=t}get(){return A&&A.track(this),this._value}set(t){this._value!==t&&(this._value=t,this.notify())}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}subscribeEffect(t){this.effects.add(t)}unsubscribeEffect(t){this.effects.delete(t)}notify(){Array.from(this.effects).forEach(t=>t.trigger()),Array.from(this.listeners).forEach(t=>t(this._value))}}function fe(i){return new Z(i)}class R{constructor(t){n(this,"listeners",new Set);n(this,"effects",new Set);this.state=t}getState(){return A&&A.track(this),this.state}setState(t){const e=typeof t=="function"?t(this.state):t,r={...this.state,...e};this.state!==r&&(this.state=r,this.notify())}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}subscribeEffect(t){this.effects.add(t)}unsubscribeEffect(t){this.effects.delete(t)}notify(){Array.from(this.effects).forEach(t=>t.trigger()),Array.from(this.listeners).forEach(t=>t(this.state))}}function ge(i){return new R(i)}function ee({children:i}){const[,t]=s.useState({}),e=s.useRef(null);e.current||(e.current=new K(()=>{t({})})),s.useEffect(()=>()=>{var o;(o=e.current)==null||o.dispose()},[]);let r;try{r=e.current.execute(i)}catch(o){console.error("Observer render error",o),r=null}return k.jsx(k.Fragment,{children:r})}const U=s.createContext(new Map);function be(){return s.useContext(U)}function ye({stateMap:i,children:t}){const[e]=s.useState(()=>new Map(i));return k.jsx(U.Provider,{value:e,children:t})}function _e({observables:i,children:t}){const[,e]=s.useState({});return s.useEffect(()=>{const r=Array.from(i).map(o=>o.subscribe(()=>e({})));return()=>r.forEach(o=>o())},[i]),k.jsx(k.Fragment,{children:t})}function xe({signals:i,children:t}){const[,e]=s.useState({});return s.useEffect(()=>{const r=Array.from(i).map(o=>o.subscribe(()=>e({})));return()=>r.forEach(o=>o())},[i]),k.jsx(k.Fragment,{children:t})}const Y=s.createContext(new Map);function ke(i){return s.useContext(Y).get(i)}function te({providers:i,children:t}){return k.jsx(Y.Provider,{value:i,children:t})}function se(i){var t,e,r="";if(typeof i=="string"||typeof i=="number")r+=i;else if(typeof i=="object")if(Array.isArray(i)){var o=i.length;for(t=0;t<o;t++)i[t]&&(e=se(i[t]))&&(r&&(r+=" "),r+=e)}else for(e in i)i[e]&&(r&&(r+=" "),r+=e);return r}function ve(){for(var i,t,e=0,r="",o=arguments.length;e<o;e++)(i=arguments[e])&&(t=se(i))&&(r&&(r+=" "),r+=t);return r}function we(i){const t=i.match(/oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)/);if(!t)return i;const[,e,r,o]=t,l=parseFloat(e),a=parseFloat(r),c=parseFloat(o),d=a*Math.cos(c*Math.PI/180),f=a*Math.sin(c*Math.PI/180),m=l+.3963377774*d+.2158037573*f,p=l-.1055613458*d-.0638541728*f,h=l-.0894841775*d-1.291485548*f,b=m*m*m,S=p*p*p,N=h*h*h,$=4.0767416621*b-3.3077115913*S+.2309699292*N,I=-1.2684380046*b+2.6097574011*S-.3413193965*N,w=-.0041960863*b-.7034186147*S+1.707614701*N,F=L=>L>=.0031308?1.055*L**(1/2.4)-.055:12.92*L,y=Math.max(0,Math.min(1,F($))),g=Math.max(0,Math.min(1,F(I))),z=Math.max(0,Math.min(1,F(w))),W=L=>{var B;const v=(B=Math.round(L*255).toString(16))==null?void 0:B.toUpperCase();return v.length===1?`0${v}`:v};return`#${W(y)}${W(g)}${W(z)}`}function Ne(i){const t={},e={},r=i.split(`
|
|
2
|
+
`);for(const o of r){const l=o.trim();if(!l||l.startsWith("//")||l.startsWith("*")||l==="@theme {"||l==="}")continue;const a=l.match(/^--color-([a-z0-9\-]+): (oklch\([^)]+\));?$/),c=l.match(/^--color-([a-z0-9\-]+): (#[a-fA-F0-9]{3,6});?$/);if(a){const[,d,f]=a,m=we(f);t[m.toLowerCase()]=`bg-${d}`,e[m.toLowerCase()]=`text-${d}`}else if(c){const[,d,f]=c;t[f.toLowerCase()]=`bg-${d}`,e[f.toLowerCase()]=`text-${d}`}}return{background:t,text:e}}const Ce=i=>{if(i!==void 0)return typeof i=="number"?`${i}px`:i.toString()},D=(i,t)=>{const e=Ce(t);return e===void 0?"":`${i}-[${e}]`},Se=Ne(`
|
|
3
3
|
--color-red-50: oklch(0.971 0.013 17.38);
|
|
4
4
|
--color-red-100: oklch(0.936 0.032 17.717);
|
|
5
5
|
--color-red-200: oklch(0.885 0.062 18.334);
|
|
@@ -244,8 +244,8 @@
|
|
|
244
244
|
--color-stone-950: oklch(0.147 0.004 49.25);
|
|
245
245
|
--color-black: #000;
|
|
246
246
|
--color-white: #fff;
|
|
247
|
-
`),J={borderRadius:{0:"rounded-none","0px":"rounded-none","1px":"rounded-sm","2px":"rounded-sm","3px":"rounded","4px":"rounded","5px":"rounded-md","6px":"rounded-md","7px":"rounded-lg","8px":"rounded-lg","9px":"rounded-lg","10px":"rounded-lg","11px":"rounded-xl","12px":"rounded-xl","14px":"rounded-2xl","16px":"rounded-2xl","20px":"rounded-3xl","50%":"rounded-full","9999px":"rounded-full"},fontSize:{"0.75rem":"text-xs","0.875rem":"text-sm","1rem":"text-base","1.125rem":"text-lg","1.25rem":"text-xl","1.5rem":"text-2xl","1.875rem":"text-3xl","2.25rem":"text-4xl","3rem":"text-5xl","3.75rem":"text-6xl","4.5rem":"text-7xl","6rem":"text-8xl","8rem":"text-9xl"},fontWeight:{100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},fontFamily:{"ui-serif":"font-serif","ui-monospace":"font-mono","ui-sans-serif":"font-sans",default:"font-sans"},textAlign:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},textDecoration:{underline:"underline",overline:"overline","line-through":"line-through",none:"no-underline"},fontVariantNumeric:{"tabular-nums":"tabular-nums","oldstyle-nums":"oldstyle-nums","lining-nums":"lining-nums","proportional-nums":"proportional-nums","diagonal-fractions":"diagonal-fractions","stacked-fractions":"stacked-fractions",ordinal:"ordinal","slashed-zero":"slashed-zero",normal:"normal-nums"},fontStyle:{normal:"normal",italic:"italic",oblique:"oblique"},display:{block:"block",flex:"flex","inline-flex":"inline-flex",grid:"grid",hidden:"hidden",none:"hidden"},position:{static:"static",relative:"relative",absolute:"absolute",fixed:"fixed",sticky:"sticky"}},de=(i,t)=>({backgroundColor:e=>e.backgroundColor?[i.background[e.backgroundColor.toLowerCase()]||`bg-[${e.backgroundColor}]`]:[],color:e=>e.color?[i.text[e.color.toLowerCase()]||`text-[${e.color}]`]:[],borderRadius:e=>{if(!e.borderRadius)return[];const r=J.borderRadius[e.borderRadius]||D("rounded",e.borderRadius);return r?[r]:[]},margin:e=>{const r=[];if(e.margin!==void 0){const n=D("m",e.margin);return n?[n]:[]}return[{prop:e.marginTop,dir:"mt"},{prop:e.marginRight,dir:"mr"},{prop:e.marginBottom,dir:"mb"},{prop:e.marginLeft,dir:"ml"},{prop:e.marginX,dir:"mx"},{prop:e.marginY,dir:"my"}].forEach(({prop:n,dir:a})=>{if(n!==void 0){const c=D(a,n);c&&r.push(c)}}),r},padding:e=>{const r=[];if(e.padding!==void 0){const n=D("p",e.padding);return n?[n]:[]}return[{prop:e.paddingTop,dir:"pt"},{prop:e.paddingRight,dir:"pr"},{prop:e.paddingBottom,dir:"pb"},{prop:e.paddingLeft,dir:"pl"},{prop:e.paddingX,dir:"px"},{prop:e.paddingY,dir:"py"}].forEach(({prop:n,dir:a})=>{if(n!==void 0){const c=D(a,n);c&&r.push(c)}}),r},font:e=>{const r=[];if(e.fontSize&&r.push(t.fontSize[e.fontSize.toString()]||`text-[${e.fontSize}]`),e.fontWeight){const l=t.fontWeight[e.fontWeight.toString()];l&&r.push(l)}if(e.textAlign){const l=t.textAlign[e.textAlign];l&&r.push(l)}if(e.fontFamily){const l=t.fontFamily[e.fontFamily];l&&r.push(l)}if(e.textDecoration){const l=t.textDecoration[e.textDecoration];l&&r.push(l)}if(e.fontVariantNumeric){const l=t.fontVariantNumeric[e.fontVariantNumeric];l&&r.push(l)}if(e.fontStyle){const l=t.fontStyle[e.fontStyle];l&&r.push(l)}return r},size:e=>{const r=[];if(e.width){const l=e.width.toString();r.push(`w-[${l}]`)}if(e.height){const l=e.height.toString();r.push(`h-[${l}]`)}return r},layout:e=>{const r=[];if(e.display){const l=t.display[e.display];l&&r.push(l)}if(e.flexDirection){const n={row:"flex-row",column:"flex-col","row-reverse":"flex-row-reverse","column-reverse":"flex-col-reverse"}[e.flexDirection];n&&r.push(n)}if(e.justifyContent){const n={"flex-start":"justify-start","flex-end":"justify-end",center:"justify-center","space-between":"justify-between","space-around":"justify-around","space-evenly":"justify-evenly"}[e.justifyContent];n&&r.push(n)}if(e.alignItems){const n={"flex-start":"items-start","flex-end":"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"}[e.alignItems];n&&r.push(n)}if(e.gap){const l=D("gap",e.gap);l&&r.push(l)}return r},position:e=>e.position?[t.position[e.position]||""].filter(Boolean):[],opacity:e=>{if(e.opacity===void 0)return[];const r=typeof e.opacity=="string"?parseFloat(e.opacity):e.opacity;return[`opacity-${{0:"0",.25:"25",.5:"50",.75:"75",1:"100"}[r]||Math.round(r*100)}`]},className:e=>e.className?[e.className]:[]}),ue={backgroundColor:"backgroundColor",color:"color",borderRadius:"borderRadius",margin:"margin",marginTop:"margin",marginRight:"margin",marginBottom:"margin",marginLeft:"margin",marginX:"margin",marginY:"margin",padding:"padding",paddingTop:"padding",paddingRight:"padding",paddingBottom:"padding",paddingLeft:"padding",paddingX:"padding",paddingY:"padding",fontSize:"font",fontWeight:"font",textAlign:"font",textDecoration:"font",fontVariantNumeric:"font",fontStyle:"font",width:"size",height:"size",display:"layout",flexDirection:"layout",justifyContent:"layout",alignItems:"layout",gap:"layout",position:"position",opacity:"opacity",className:"className"},me=(i,t)=>{const e=(t==null?void 0:t.colorMaps)||he,r=(t==null?void 0:t.styleMaps)||J,l=de(e,r),n=[],a=new Set;return Object.keys(i).forEach(c=>{const h=ue[c];if(h&&!a.has(h)){const f=l[h];if(f){const m=f(i);n.push(...m),a.add(h)}}}),n.filter(Boolean).join(" ")};class b{constructor(){o(this,"_props",{});o(this,"_style",{});o(this,"_cssStyles",{});o(this,"_classNames",[]);o(this,"_children",[]);o(this,"_responsive");o(this,"_state",new Map);o(this,"_providers",new Map);o(this,"_observers",new Set);o(this,"_signals",new Set);o(this,"_isObserver",!1)}id(t){return this._props.id=t,this}paddingHorizontal(t){return typeof t=="number"?this._classNames.push(`px-[${t}px]`):this._classNames.push(`px-${t}`),this}paddingVertical(t){return typeof t=="number"?this._classNames.push(`py-[${t}px]`):this._classNames.push(`py-${t}`),this}marginHorizontal(t){return typeof t=="number"?this._classNames.push(`mx-[${t}px]`):this._classNames.push(`mx-${t}`),this}marginVertical(t){return typeof t=="number"?this._classNames.push(`my-[${t}px]`):this._classNames.push(`my-${t}`),this}flexDirection(t){return this._classNames.push(`flex-${t}`),this}alignItems(t){return this._classNames.push(`items-${t}`),this}justifyContent(t){return this._classNames.push(`justify-${t}`),this}responsive(t){return this._responsive=t,this}state(t,e){return this._state.set(t,e),this}getState(t){return this._state.get(t)}setState(t,e){return this._state.set(t,e),this}provide(t,e){return this._providers.set(t,e),this}consume(t){return this._providers.get(t)}observer(){return this._isObserver=!0,this}observe(t){return this._observers.add(t),this}bindSignal(t){return this._signals.add(t),this}hasStateManagement(){return this._state.size>0||this._providers.size>0||this._observers.size>0||this._signals.size>0||this._isObserver}className(t){return this._classNames.push(t),this}classNames(t){return this._classNames.push(...t),this}css(t){return this._cssStyles={...this._cssStyles,...t},this}style(t){return this._style={...this._style,...t},this}props(t){return this._props={...this._props,...t},this}children(t){const e=Array.isArray(t)?t:[t];return this._children=e.map(r=>r&&typeof r=="object"&&"build"in r&&typeof r.build=="function"?r.build():r),this}getClassName(){if(Object.keys(this._cssStyles).length>0){const t=me(this._cssStyles);t&&this._classNames.push(t)}return le(this._classNames)}getStyle(){let t={...this._style,...this._cssStyles};return this._responsive&&this._responsive.mobile&&(t={...t,...this._responsive.mobile}),t}processChildren(){return this._children}}function y(i){return(...t)=>{const e=new i(...t);return new Proxy(e,{get(r,l,n){return Reflect.has(r,l)?Reflect.get(r,l,n):a=>(r.css({[l]:a}),n)}})}}function pe(i){return(Array.isArray(i)?i:[i]).map(e=>e&&typeof e=="object"&&"build"in e?e.build():e)}function fe(...i){return i.reduce((t,e)=>e?{...t,...e}:t,{})}function ge(i,t){if(!t)return i;let e={...i};if(typeof window<"u"){const r=window.innerWidth;r<768&&t.mobile?e={...e,...t.mobile}:r>=768&&r<1024&&t.tablet?e={...e,...t.tablet}:r>=1024&&t.desktop&&(e={...e,...t.desktop})}return e}function be(i,t="px"){return typeof i=="number"?`${i}${t}`:i}class ye{constructor(t){o(this,"_value");o(this,"subscribers",new Set);this._value=t}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this.notify())}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}notify(){this.subscribers.forEach(t=>t(this._value))}}class xe{constructor(t){o(this,"_value");o(this,"subscribers",new Set);o(this,"dependencies",new Set);o(this,"unsubscribers",[]);this.compute=t,this._value=this.recompute()}get value(){return this._value}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}recompute(){this.unsubscribers.forEach(e=>e()),this.unsubscribers=[],this.dependencies.clear();const t=this.compute();return this._value!==t&&(this._value=t,this.notify()),t}notify(){this.subscribers.forEach(t=>t(this._value))}}function _e(i){return new ye(i)}function ke(i){return new xe(i)}function ve(i){let t;return(()=>{typeof t=="function"&&t(),t=i()})(),()=>{typeof t=="function"&&t()}}class we{constructor(t){o(this,"_value");o(this,"listeners",new Set);this._value=t}get(){return this._value}set(t){this._value!==t&&(this._value=t,this.listeners.forEach(e=>e(t)))}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}}function Ne(i){return new we(i)}class Ce{constructor(t){o(this,"state");o(this,"listeners",new Set);this.state=t}getState(){return this.state}setState(t){const e=typeof t=="function"?t(this.state):t;this.state={...this.state,...e},this.listeners.forEach(r=>r(this.state))}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}}function Se(i){return new Ce(i)}const G=new Map;function Ee(i,t){G.set(i,t)}function Fe(i){return G.get(i)}function ze(){G.clear()}const X=s.createContext(new Map);function Be(){return s.useContext(X)}function $e({stateMap:i,children:t}){const[e]=s.useState(()=>new Map(i));return x.jsx(X.Provider,{value:e,children:t})}function Ae({observables:i,children:t}){const[,e]=s.useState({});return s.useEffect(()=>{const r=Array.from(i).map(l=>l.subscribe(()=>e({})));return()=>r.forEach(l=>l())},[i]),x.jsx(x.Fragment,{children:t})}function Ie({signals:i,children:t}){const[,e]=s.useState({});return s.useEffect(()=>{const r=Array.from(i).map(l=>l.subscribe(()=>e({})));return()=>r.forEach(l=>l())},[i]),x.jsx(x.Fragment,{children:t})}const Y=s.createContext(new Map);function je(i){return s.useContext(Y).get(i)}function K({providers:i,children:t}){return x.jsx(Y.Provider,{value:i,children:t})}const Q={name:"material",colors:{primary:"#6200EE",primaryVariant:"#3700B3",secondary:"#03DAC6",secondaryVariant:"#018786",background:"#FFFFFF",surface:"#FFFFFF",error:"#B00020",success:"#4CAF50",warning:"#FF9800",info:"#2196F3",onPrimary:"#FFFFFF",onSecondary:"#000000",onBackground:"#000000",onSurface:"#000000",onError:"#FFFFFF"},typography:{h1:{fontSize:"96px",fontWeight:300,letterSpacing:"-1.5px"},h2:{fontSize:"60px",fontWeight:300,letterSpacing:"-0.5px"},h3:{fontSize:"48px",fontWeight:400},h4:{fontSize:"34px",fontWeight:400,letterSpacing:"0.25px"},h5:{fontSize:"24px",fontWeight:400},h6:{fontSize:"20px",fontWeight:500,letterSpacing:"0.15px"},body:{fontSize:"16px",fontWeight:400,letterSpacing:"0.5px"},caption:{fontSize:"12px",fontWeight:400,letterSpacing:"0.4px"},label:{fontSize:"14px",fontWeight:500,letterSpacing:"1.25px"}},spacing:{xs:"4px",sm:"8px",md:"16px",lg:"24px",xl:"32px"},borderRadius:{sm:"4px",md:"8px",lg:"16px",full:"9999px"},shadows:{sm:"0 2px 4px rgba(0,0,0,0.1)",md:"0 4px 8px rgba(0,0,0,0.12)",lg:"0 8px 16px rgba(0,0,0,0.14)"},fontFamily:"Roboto, sans-serif"},Z={name:"cupertino",colors:{primary:"#007AFF",secondary:"#AF52DE",background:"#FFFFFF",surface:"#F2F2F7",error:"#FF3B30",success:"#34C759",warning:"#FF9500",info:"#5AC8FA",onPrimary:"#FFFFFF",onSecondary:"#FFFFFF",onBackground:"#000000",onSurface:"#000000",onError:"#FFFFFF"},typography:{h1:{fontSize:"34px",fontWeight:700,letterSpacing:"0.37px"},h2:{fontSize:"28px",fontWeight:700,letterSpacing:"0.36px"},h3:{fontSize:"22px",fontWeight:600,letterSpacing:"0.35px"},h4:{fontSize:"20px",fontWeight:600},h5:{fontSize:"17px",fontWeight:600,letterSpacing:"-0.41px"},h6:{fontSize:"15px",fontWeight:600,letterSpacing:"-0.24px"},body:{fontSize:"17px",fontWeight:400,letterSpacing:"-0.41px"},caption:{fontSize:"13px",fontWeight:400,letterSpacing:"-0.08px"},label:{fontSize:"15px",fontWeight:500,letterSpacing:"-0.24px"}},spacing:{xs:"4px",sm:"8px",md:"12px",lg:"20px",xl:"32px"},borderRadius:{sm:"8px",md:"12px",lg:"20px",full:"9999px"},shadows:{sm:"0 1px 3px rgba(0,0,0,0.08)",md:"0 2px 8px rgba(0,0,0,0.1)",lg:"0 4px 16px rgba(0,0,0,0.12)"},fontFamily:'-apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif'},R={name:"web",colors:{primary:"#3B82F6",secondary:"#8B5CF6",background:"#FFFFFF",surface:"#F9FAFB",error:"#EF4444",success:"#10B981",warning:"#F59E0B",info:"#06B6D4",onPrimary:"#FFFFFF",onSecondary:"#FFFFFF",onBackground:"#111827",onSurface:"#374151",onError:"#FFFFFF"},typography:{h1:{fontSize:"60px",fontWeight:800,letterSpacing:"-0.02em"},h2:{fontSize:"48px",fontWeight:700,letterSpacing:"-0.01em"},h3:{fontSize:"36px",fontWeight:700},h4:{fontSize:"30px",fontWeight:600},h5:{fontSize:"24px",fontWeight:600},h6:{fontSize:"20px",fontWeight:600},body:{fontSize:"16px",fontWeight:400,lineHeight:"1.5"},caption:{fontSize:"14px",fontWeight:400,lineHeight:"1.4"},label:{fontSize:"14px",fontWeight:500,letterSpacing:"0.01em"}},spacing:{xs:"4px",sm:"8px",md:"16px",lg:"24px",xl:"32px"},borderRadius:{sm:"6px",md:"8px",lg:"12px",full:"9999px"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px rgba(0,0,0,0.07)",lg:"0 10px 15px rgba(0,0,0,0.1)"},fontFamily:"Inter, system-ui, sans-serif"},ee=s.createContext(void 0),te={material:Q,cupertino:Z,web:R};function We({theme:i="material",children:t}){const[e,r]=s.useState(i),[l,n]=s.useState(te[i]);s.useEffect(()=>{const c=te[e];if(n(c),typeof document<"u"){const h=document.documentElement;h.classList.remove("fibo-theme-material","fibo-theme-cupertino","fibo-theme-web"),h.classList.add(`fibo-theme-${e}`),h.style.setProperty("--fibo-primary",c.colors.primary),h.style.setProperty("--fibo-secondary",c.colors.secondary),h.style.setProperty("--fibo-background",c.colors.background),h.style.setProperty("--fibo-surface",c.colors.surface),h.style.setProperty("--fibo-error",c.colors.error),h.style.setProperty("--fibo-font-family",c.fontFamily)}},[e]);const a={theme:l,themeName:e,setTheme:r};return x.jsx(ee.Provider,{value:a,children:t})}function Le(){const i=s.useContext(ee);if(!i)throw new Error("useFiboTheme must be used within a FiboThemeProvider");return i}class Me extends b{build(){const t=this.getClassName(),e=this.getStyle(),r=this.processChildren();return s.createElement("div",{className:`fibo-container ${t}`,style:e,...this._props},...r)}}const Te=y(Me);class Pe extends b{constructor(){super(...arguments);o(this,"_mainAxisAlignment","start");o(this,"_crossAxisAlignment","start");o(this,"_spacing")}mainAxisAlignment(e){return this._mainAxisAlignment=e,this}crossAxisAlignment(e){return this._crossAxisAlignment=e,this}spacing(e){return this._spacing=e,this}items(e){return this.children(e),this}build(){const e={start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around",spaceEvenly:"justify-evenly"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},l=["fibo-row","flex","flex-row",e[this._mainAxisAlignment],r[this._crossAxisAlignment],...this._classNames],n=this.getStyle();this._spacing&&(typeof this._spacing=="number"?n.gap=`${this._spacing}px`:isNaN(Number(this._spacing))?n.gap=this._spacing:n.gap=`${Number(this._spacing)*4}px`);const a=l.filter(Boolean).join(" "),c=this.processChildren();return s.createElement("div",{className:a,style:n,...this._props},...c)}}const L=y(Pe);class De extends b{constructor(){super(...arguments);o(this,"_mainAxisAlignment","start");o(this,"_crossAxisAlignment","start");o(this,"_spacing");o(this,"_size")}mainAxisAlignment(e){return this._mainAxisAlignment=e,this}crossAxisAlignment(e){return this._crossAxisAlignment=e,this}spacing(e){return this._spacing=e,this}size(e){return this._size=e,this}build(){const e={start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around",spaceEvenly:"justify-evenly"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},l={small:"flex-[0.3]",medium:"flex-1",large:"flex-[1.5]"},n=["fibo-column","flex","flex-col",e[this._mainAxisAlignment],r[this._crossAxisAlignment],this._size?l[this._size]:"",...this._classNames],a=this.getStyle();this._spacing&&(typeof this._spacing=="number"?a.gap=`${this._spacing}px`:isNaN(Number(this._spacing))?a.gap=this._spacing:a.gap=`${Number(this._spacing)*4}px`);const c=n.filter(Boolean).join(" "),h=this.processChildren();return s.createElement("div",{className:c,style:a,...this._props},...h)}}const T=y(De);class Oe extends b{constructor(){super(...arguments);o(this,"_height");o(this,"_width")}height(e){return this._height=e,this}width(e){return this._width=e,this}build(){const e=this.getStyle();this._height&&(e.height=typeof this._height=="number"?`${this._height}px`:this._height),this._width&&(e.width=typeof this._width=="number"?`${this._width}px`:this._width);const r=this.getClassName();return s.createElement("div",{className:`fibo-spacer ${r}`,style:e,...this._props})}}const P=y(Oe);class He extends b{constructor(){super(...arguments);o(this,"_sizeHeight")}sizeHeight(e){return this._sizeHeight=e,this}build(){const r=["fibo-line","flex","flex-row",...this._classNames].filter(Boolean).join(" "),l=this.getStyle();this._sizeHeight&&(l.height=this._sizeHeight);const n=this.processChildren();return s.createElement("div",{className:r,style:l,...this._props},...n)}}const Ve=y(He);class qe extends b{build(){const e=["fibo-center","flex","items-center","justify-center",...this._classNames].filter(Boolean).join(" "),r=this.getStyle(),l=this.processChildren();return s.createElement("div",{className:e,style:r,...this._props},...l)}}const Ge=y(qe);class Xe extends b{constructor(){super(...arguments);o(this,"_direction","vertical");o(this,"_scrollbar","auto")}direction(e){return this._direction=e,this}horizontal(){return this._direction="horizontal",this}vertical(){return this._direction="vertical",this}scrollbar(e){return this._scrollbar=e,this}build(){const e={overflowX:this._direction==="horizontal"||this._direction==="both"?"auto":"hidden",overflowY:this._direction==="vertical"||this._direction==="both"?"auto":"hidden",WebkitOverflowScrolling:"touch",display:"flex",flexDirection:this._direction==="horizontal"?"row":"column",...this.getStyle()},r=[...this.getClassName().split(" ")];return this._scrollbar==="hidden"&&(r.push("scrollbar-hide"),e.scrollbarWidth="none",e.msOverflowStyle="none"),s.createElement("div",{className:r.join(" "),style:e,...this._props},...this._children)}}const Ye=y(Xe),Ue=s.memo(i=>{const{height:t=64,sticky:e,className:r,style:l,children:n,...a}=i;return s.createElement("header",{className:`flex items-center px-6 border-b border-gray-200 bg-white/80 backdrop-blur-md z-10 w-full ${e?"sticky top-0":""} ${r||""}`,style:{height:t,minHeight:t,...l},...a},n)});class Je extends b{constructor(){super(...arguments);o(this,"_height",64);o(this,"_sticky",!1)}height(e){return this._height=e,this}sticky(e=!0){return this._sticky=e,this}build(){const e={height:this._height,sticky:this._sticky,className:this.getClassName(),style:this.getStyle(),children:this.processChildren(),...this._props};return s.createElement(Ue,e)}}const Ke=y(Je),Qe=s.memo(i=>{const{width:t=260,collapsed:e,className:r,style:l,children:n,...a}=i,c=e?80:t;return s.createElement("aside",{className:`flex flex-col border-r border-gray-200 bg-white transition-all duration-300 h-full ${r||""}`,style:{width:c,minWidth:c,...l},...a},n)});class Ze extends b{constructor(){super(...arguments);o(this,"_width",260);o(this,"_collapsed",!1)}width(e){return this._width=e,this}collapsible(e=!1){return this._collapsed=e,this}build(){const e={width:this._width,collapsed:this._collapsed,className:this.getClassName(),style:this.getStyle(),children:this.processChildren(),...this._props};return s.createElement(Qe,e)}}const Re=y(Ze),et=s.memo(i=>{const{sidebar:t,header:e,children:r,className:l,style:n,...a}=i,[c,h]=s.useState(!1);return s.createElement("div",{className:`h-full w-full bg-[#0B0C15] overflow-hidden relative ${l||""}`,style:n,...a},c&&s.createElement("div",{className:"fixed inset-0 z-40 bg-black/50 backdrop-blur-sm transition-opacity lg:hidden",onClick:()=>h(!1)}),s.createElement("button",{className:"lg:hidden fixed top-4 right-4 z-50 p-2 rounded-lg bg-[#1A1B23] border border-white/10 text-white shadow-lg",onClick:()=>h(!c)},s.createElement("div",{className:c?"i-heroicons-x-mark w-6 h-6":"i-heroicons-bars-3 w-6 h-6"})),s.createElement("div",{className:"grid h-full w-full lg:grid-cols-[260px_1fr] transition-all duration-300"},s.createElement("aside",{className:`
|
|
247
|
+
`),re={borderRadius:{0:"rounded-none","0px":"rounded-none","1px":"rounded-sm","2px":"rounded-sm","3px":"rounded","4px":"rounded","5px":"rounded-md","6px":"rounded-md","7px":"rounded-lg","8px":"rounded-lg","9px":"rounded-lg","10px":"rounded-lg","11px":"rounded-xl","12px":"rounded-xl","14px":"rounded-2xl","16px":"rounded-2xl","20px":"rounded-3xl","50%":"rounded-full","9999px":"rounded-full"},fontSize:{"0.75rem":"text-xs","0.875rem":"text-sm","1rem":"text-base","1.125rem":"text-lg","1.25rem":"text-xl","1.5rem":"text-2xl","1.875rem":"text-3xl","2.25rem":"text-4xl","3rem":"text-5xl","3.75rem":"text-6xl","4.5rem":"text-7xl","6rem":"text-8xl","8rem":"text-9xl"},fontWeight:{100:"font-thin",200:"font-extralight",300:"font-light",400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold",800:"font-extrabold",900:"font-black"},fontFamily:{"ui-serif":"font-serif","ui-monospace":"font-mono","ui-sans-serif":"font-sans",default:"font-sans"},textAlign:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},textDecoration:{underline:"underline",overline:"overline","line-through":"line-through",none:"no-underline"},fontVariantNumeric:{"tabular-nums":"tabular-nums","oldstyle-nums":"oldstyle-nums","lining-nums":"lining-nums","proportional-nums":"proportional-nums","diagonal-fractions":"diagonal-fractions","stacked-fractions":"stacked-fractions",ordinal:"ordinal","slashed-zero":"slashed-zero",normal:"normal-nums"},fontStyle:{normal:"normal",italic:"italic",oblique:"oblique"},display:{block:"block",flex:"flex","inline-flex":"inline-flex",grid:"grid",hidden:"hidden",none:"hidden"},position:{static:"static",relative:"relative",absolute:"absolute",fixed:"fixed",sticky:"sticky"}},Ee=(i,t)=>({backgroundColor:e=>e.backgroundColor?[i.background[e.backgroundColor.toLowerCase()]||`bg-[${e.backgroundColor}]`]:[],color:e=>e.color?[i.text[e.color.toLowerCase()]||`text-[${e.color}]`]:[],borderRadius:e=>{if(!e.borderRadius)return[];const r=re.borderRadius[e.borderRadius]||D("rounded",e.borderRadius);return r?[r]:[]},margin:e=>{const r=[];if(e.margin!==void 0){const l=D("m",e.margin);return l?[l]:[]}return[{prop:e.marginTop,dir:"mt"},{prop:e.marginRight,dir:"mr"},{prop:e.marginBottom,dir:"mb"},{prop:e.marginLeft,dir:"ml"},{prop:e.marginX,dir:"mx"},{prop:e.marginY,dir:"my"}].forEach(({prop:l,dir:a})=>{if(l!==void 0){const c=D(a,l);c&&r.push(c)}}),r},padding:e=>{const r=[];if(e.padding!==void 0){const l=D("p",e.padding);return l?[l]:[]}return[{prop:e.paddingTop,dir:"pt"},{prop:e.paddingRight,dir:"pr"},{prop:e.paddingBottom,dir:"pb"},{prop:e.paddingLeft,dir:"pl"},{prop:e.paddingX,dir:"px"},{prop:e.paddingY,dir:"py"}].forEach(({prop:l,dir:a})=>{if(l!==void 0){const c=D(a,l);c&&r.push(c)}}),r},font:e=>{const r=[];if(e.fontSize&&r.push(t.fontSize[e.fontSize.toString()]||`text-[${e.fontSize}]`),e.fontWeight){const o=t.fontWeight[e.fontWeight.toString()];o&&r.push(o)}if(e.textAlign){const o=t.textAlign[e.textAlign];o&&r.push(o)}if(e.fontFamily){const o=t.fontFamily[e.fontFamily];o&&r.push(o)}if(e.textDecoration){const o=t.textDecoration[e.textDecoration];o&&r.push(o)}if(e.fontVariantNumeric){const o=t.fontVariantNumeric[e.fontVariantNumeric];o&&r.push(o)}if(e.fontStyle){const o=t.fontStyle[e.fontStyle];o&&r.push(o)}return r},size:e=>{const r=[];if(e.width){const o=e.width.toString();r.push(`w-[${o}]`)}if(e.height){const o=e.height.toString();r.push(`h-[${o}]`)}return r},layout:e=>{const r=[];if(e.display){const o=t.display[e.display];o&&r.push(o)}if(e.flexDirection){const l={row:"flex-row",column:"flex-col","row-reverse":"flex-row-reverse","column-reverse":"flex-col-reverse"}[e.flexDirection];l&&r.push(l)}if(e.justifyContent){const l={"flex-start":"justify-start","flex-end":"justify-end",center:"justify-center","space-between":"justify-between","space-around":"justify-around","space-evenly":"justify-evenly"}[e.justifyContent];l&&r.push(l)}if(e.alignItems){const l={"flex-start":"items-start","flex-end":"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"}[e.alignItems];l&&r.push(l)}if(e.gap){const o=D("gap",e.gap);o&&r.push(o)}return r},position:e=>e.position?[t.position[e.position]||""].filter(Boolean):[],opacity:e=>{if(e.opacity===void 0)return[];const r=typeof e.opacity=="string"?parseFloat(e.opacity):e.opacity;return[`opacity-${{0:"0",.25:"25",.5:"50",.75:"75",1:"100"}[r]||Math.round(r*100)}`]},className:e=>e.className?[e.className]:[]}),Fe={backgroundColor:"backgroundColor",color:"color",borderRadius:"borderRadius",margin:"margin",marginTop:"margin",marginRight:"margin",marginBottom:"margin",marginLeft:"margin",marginX:"margin",marginY:"margin",padding:"padding",paddingTop:"padding",paddingRight:"padding",paddingBottom:"padding",paddingLeft:"padding",paddingX:"padding",paddingY:"padding",fontSize:"font",fontWeight:"font",textAlign:"font",textDecoration:"font",fontVariantNumeric:"font",fontStyle:"font",width:"size",height:"size",display:"layout",flexDirection:"layout",justifyContent:"layout",alignItems:"layout",gap:"layout",position:"position",opacity:"opacity",className:"className"},ze=(i,t)=>{const e=(t==null?void 0:t.colorMaps)||Se,r=(t==null?void 0:t.styleMaps)||re,o=Ee(e,r),l=[],a=new Set;return Object.keys(i).forEach(c=>{const d=Fe[c];if(d&&!a.has(d)){const f=o[d];if(f){const m=f(i);l.push(...m),a.add(d)}}}),l.filter(Boolean).join(" ")};class _{constructor(){n(this,"_props",{});n(this,"_style",{});n(this,"_cssStyles",{});n(this,"_classNames",[]);n(this,"_children",[]);n(this,"_responsive");n(this,"_state",new Map);n(this,"_providers",new Map);n(this,"_observers",new Set);n(this,"_signals",new Set);n(this,"_isObserver",!1);n(this,"_childFunction")}id(t){return this._props.id=t,this}key(t){return this._props.key=t,this}paddingHorizontal(t){return typeof t=="number"?this._classNames.push(`px-[${t}px]`):this._classNames.push(`px-${t}`),this}paddingVertical(t){return typeof t=="number"?this._classNames.push(`py-[${t}px]`):this._classNames.push(`py-${t}`),this}marginHorizontal(t){return typeof t=="number"?this._classNames.push(`mx-[${t}px]`):this._classNames.push(`mx-${t}`),this}marginVertical(t){return typeof t=="number"?this._classNames.push(`my-[${t}px]`):this._classNames.push(`my-${t}`),this}flexDirection(t){return this._classNames.push(`flex-${t}`),this}alignItems(t){return this._classNames.push(`items-${t}`),this}justifyContent(t){return this._classNames.push(`justify-${t}`),this}responsive(t){return this._responsive=t,this}state(t,e){return this._state.set(t,e),this}getState(t){return this._state.get(t)}setState(t,e){return this._state.set(t,e),this}provide(t,e){return this._providers.set(t,e),this}consume(t){return this._providers.get(t)}observer(){return this._isObserver=!0,this}observe(t){return this._observers.add(t),this}bindSignal(t){return this._signals.add(t),this}hasStateManagement(){return this._state.size>0||this._providers.size>0||this._observers.size>0||this._signals.size>0||this._isObserver}className(t){return this._classNames.push(t),this}classNames(t){return this._classNames.push(...t),this}css(t){return this._cssStyles={...this._cssStyles,...t},this}style(t){return this._style={...this._style,...t},this}props(t){return this._props={...this._props,...t},this}children(t){if(typeof t=="function")this._childFunction=t,this._children=[];else{const e=Array.isArray(t)?t:[t];this._children=e.map(r=>r&&typeof r=="object"&&"build"in r&&typeof r.build=="function"?r.build():r),this._childFunction=void 0}return this}getClassName(){if(Object.keys(this._cssStyles).length>0){const t=ze(this._cssStyles);t&&this._classNames.push(t)}return ve(this._classNames)}getStyle(){let t={...this._style,...this._cssStyles};return this._responsive&&this._responsive.mobile&&(t={...t,...this._responsive.mobile}),t}processChildren(){if(this._childFunction){const t=this._childFunction();return Array.isArray(t)?t:[t]}return this._children}getChildFunction(){return this._childFunction}}function x(i){return(...t)=>{const e=new i(...t);return new Proxy(e,{get(r,o,l){return o==="build"?()=>r._isObserver?s.createElement(ee,{children:()=>r.build()}):r.build():Reflect.has(r,o)?Reflect.get(r,o,l):a=>(r.css({[o]:a}),l)}})}}function Be(i){return(Array.isArray(i)?i:[i]).map(e=>e&&typeof e=="object"&&"build"in e?e.build():e)}function Ae(...i){return i.reduce((t,e)=>e?{...t,...e}:t,{})}function $e(i,t){if(!t)return i;let e={...i};if(typeof window<"u"){const r=window.innerWidth;r<768&&t.mobile?e={...e,...t.mobile}:r>=768&&r<1024&&t.tablet?e={...e,...t.tablet}:r>=1024&&t.desktop&&(e={...e,...t.desktop})}return e}function Ie(i,t="px"){return typeof i=="number"?`${i}${t}`:i}function je(i){const[t,e]=s.useState(i.value);return s.useEffect(()=>(e(i.value),i.subscribe(o=>{e(o)})),[i]),t}function We(i){const[t,e]=s.useState(i.getState());return s.useEffect(()=>(e(i.getState()),i.subscribe(o=>{e(o)})),[i]),t}function Le(i){const[t,e]=s.useState(i.get());return s.useEffect(()=>(e(i.get()),i.subscribe(o=>{e(o)})),[i]),t}const ie={name:"material",colors:{primary:"#6200EE",primaryVariant:"#3700B3",secondary:"#03DAC6",secondaryVariant:"#018786",background:"#FFFFFF",surface:"#FFFFFF",error:"#B00020",success:"#4CAF50",warning:"#FF9800",info:"#2196F3",onPrimary:"#FFFFFF",onSecondary:"#000000",onBackground:"#000000",onSurface:"#000000",onError:"#FFFFFF"},typography:{h1:{fontSize:"96px",fontWeight:300,letterSpacing:"-1.5px"},h2:{fontSize:"60px",fontWeight:300,letterSpacing:"-0.5px"},h3:{fontSize:"48px",fontWeight:400},h4:{fontSize:"34px",fontWeight:400,letterSpacing:"0.25px"},h5:{fontSize:"24px",fontWeight:400},h6:{fontSize:"20px",fontWeight:500,letterSpacing:"0.15px"},body:{fontSize:"16px",fontWeight:400,letterSpacing:"0.5px"},caption:{fontSize:"12px",fontWeight:400,letterSpacing:"0.4px"},label:{fontSize:"14px",fontWeight:500,letterSpacing:"1.25px"}},spacing:{xs:"4px",sm:"8px",md:"16px",lg:"24px",xl:"32px"},borderRadius:{sm:"4px",md:"8px",lg:"16px",full:"9999px"},shadows:{sm:"0 2px 4px rgba(0,0,0,0.1)",md:"0 4px 8px rgba(0,0,0,0.12)",lg:"0 8px 16px rgba(0,0,0,0.14)"},fontFamily:"Roboto, sans-serif"},ne={name:"cupertino",colors:{primary:"#007AFF",secondary:"#AF52DE",background:"#FFFFFF",surface:"#F2F2F7",error:"#FF3B30",success:"#34C759",warning:"#FF9500",info:"#5AC8FA",onPrimary:"#FFFFFF",onSecondary:"#FFFFFF",onBackground:"#000000",onSurface:"#000000",onError:"#FFFFFF"},typography:{h1:{fontSize:"34px",fontWeight:700,letterSpacing:"0.37px"},h2:{fontSize:"28px",fontWeight:700,letterSpacing:"0.36px"},h3:{fontSize:"22px",fontWeight:600,letterSpacing:"0.35px"},h4:{fontSize:"20px",fontWeight:600},h5:{fontSize:"17px",fontWeight:600,letterSpacing:"-0.41px"},h6:{fontSize:"15px",fontWeight:600,letterSpacing:"-0.24px"},body:{fontSize:"17px",fontWeight:400,letterSpacing:"-0.41px"},caption:{fontSize:"13px",fontWeight:400,letterSpacing:"-0.08px"},label:{fontSize:"15px",fontWeight:500,letterSpacing:"-0.24px"}},spacing:{xs:"4px",sm:"8px",md:"12px",lg:"20px",xl:"32px"},borderRadius:{sm:"8px",md:"12px",lg:"20px",full:"9999px"},shadows:{sm:"0 1px 3px rgba(0,0,0,0.08)",md:"0 2px 8px rgba(0,0,0,0.1)",lg:"0 4px 16px rgba(0,0,0,0.12)"},fontFamily:'-apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif'},oe={name:"web",colors:{primary:"#3B82F6",secondary:"#8B5CF6",background:"#FFFFFF",surface:"#F9FAFB",error:"#EF4444",success:"#10B981",warning:"#F59E0B",info:"#06B6D4",onPrimary:"#FFFFFF",onSecondary:"#FFFFFF",onBackground:"#111827",onSurface:"#374151",onError:"#FFFFFF"},typography:{h1:{fontSize:"60px",fontWeight:800,letterSpacing:"-0.02em"},h2:{fontSize:"48px",fontWeight:700,letterSpacing:"-0.01em"},h3:{fontSize:"36px",fontWeight:700},h4:{fontSize:"30px",fontWeight:600},h5:{fontSize:"24px",fontWeight:600},h6:{fontSize:"20px",fontWeight:600},body:{fontSize:"16px",fontWeight:400,lineHeight:"1.5"},caption:{fontSize:"14px",fontWeight:400,lineHeight:"1.4"},label:{fontSize:"14px",fontWeight:500,letterSpacing:"0.01em"}},spacing:{xs:"4px",sm:"8px",md:"16px",lg:"24px",xl:"32px"},borderRadius:{sm:"6px",md:"8px",lg:"12px",full:"9999px"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px rgba(0,0,0,0.07)",lg:"0 10px 15px rgba(0,0,0,0.1)"},fontFamily:"Inter, system-ui, sans-serif"},le=s.createContext(void 0),ae={material:ie,cupertino:ne,web:oe};function Te({theme:i="material",children:t}){const[e,r]=s.useState(i),[o,l]=s.useState(ae[i]);s.useEffect(()=>{const c=ae[e];if(l(c),typeof document<"u"){const d=document.documentElement;d.classList.remove("fibo-theme-material","fibo-theme-cupertino","fibo-theme-web"),d.classList.add(`fibo-theme-${e}`),d.style.setProperty("--fibo-primary",c.colors.primary),d.style.setProperty("--fibo-secondary",c.colors.secondary),d.style.setProperty("--fibo-background",c.colors.background),d.style.setProperty("--fibo-surface",c.colors.surface),d.style.setProperty("--fibo-error",c.colors.error),d.style.setProperty("--fibo-font-family",c.fontFamily)}},[e]);const a={theme:o,themeName:e,setTheme:r};return k.jsx(le.Provider,{value:a,children:t})}function Me(){const i=s.useContext(le);if(!i)throw new Error("useFiboTheme must be used within a FiboThemeProvider");return i}class Pe extends _{build(){const t=this.getClassName(),e=this.getStyle(),r=this.processChildren();return s.createElement("div",{className:`fibo-container ${t}`,style:e,...this._props},...r)}}const Oe=x(Pe);class De extends _{constructor(){super(...arguments);n(this,"_mainAxisAlignment","start");n(this,"_crossAxisAlignment","start");n(this,"_spacing")}mainAxisAlignment(e){return this._mainAxisAlignment=e,this}crossAxisAlignment(e){return this._crossAxisAlignment=e,this}spacing(e){return this._spacing=e,this}items(e){return this.children(e),this}build(){const e={start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around",spaceEvenly:"justify-evenly"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},o=["fibo-row","flex","flex-row",e[this._mainAxisAlignment],r[this._crossAxisAlignment],...this._classNames],l=this.getStyle();this._spacing&&(typeof this._spacing=="number"?l.gap=`${this._spacing}px`:isNaN(Number(this._spacing))?l.gap=this._spacing:l.gap=`${Number(this._spacing)*4}px`);const a=o.filter(Boolean).join(" "),c=this.processChildren();return s.createElement("div",{className:a,style:l,...this._props},...c)}}const T=x(De);class He extends _{constructor(){super(...arguments);n(this,"_mainAxisAlignment","start");n(this,"_crossAxisAlignment","start");n(this,"_spacing");n(this,"_size")}mainAxisAlignment(e){return this._mainAxisAlignment=e,this}crossAxisAlignment(e){return this._crossAxisAlignment=e,this}spacing(e){return this._spacing=e,this}size(e){return this._size=e,this}build(){const e={start:"justify-start",center:"justify-center",end:"justify-end",spaceBetween:"justify-between",spaceAround:"justify-around",spaceEvenly:"justify-evenly"},r={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},o={small:"flex-[0.3]",medium:"flex-1",large:"flex-[1.5]"},l=["fibo-column","flex","flex-col",e[this._mainAxisAlignment],r[this._crossAxisAlignment],this._size?o[this._size]:"",...this._classNames],a=this.getStyle();this._spacing&&(typeof this._spacing=="number"?a.gap=`${this._spacing}px`:isNaN(Number(this._spacing))?a.gap=this._spacing:a.gap=`${Number(this._spacing)*4}px`);const c=l.filter(Boolean).join(" "),d=this.processChildren();return s.createElement("div",{className:c,style:a,...this._props},...d)}}const P=x(He);class Ve extends _{constructor(){super(...arguments);n(this,"_height");n(this,"_width")}height(e){return this._height=e,this}width(e){return this._width=e,this}build(){const e=this.getStyle();this._height&&(e.height=typeof this._height=="number"?`${this._height}px`:this._height),this._width&&(e.width=typeof this._width=="number"?`${this._width}px`:this._width);const r=this.getClassName();return s.createElement("div",{className:`fibo-spacer ${r}`,style:e,...this._props})}}const O=x(Ve);class qe extends _{constructor(){super(...arguments);n(this,"_sizeHeight")}sizeHeight(e){return this._sizeHeight=e,this}build(){const r=["fibo-line","flex","flex-row",...this._classNames].filter(Boolean).join(" "),o=this.getStyle();this._sizeHeight&&(o.height=this._sizeHeight);const l=this.processChildren();return s.createElement("div",{className:r,style:o,...this._props},...l)}}const Ge=x(qe);class Xe extends _{build(){const e=["fibo-center","flex","items-center","justify-center",...this._classNames].filter(Boolean).join(" "),r=this.getStyle(),o=this.processChildren();return s.createElement("div",{className:e,style:r,...this._props},...o)}}const Ue=x(Xe);class Ye extends _{constructor(){super(...arguments);n(this,"_direction","vertical");n(this,"_scrollbar","auto")}direction(e){return this._direction=e,this}horizontal(){return this._direction="horizontal",this}vertical(){return this._direction="vertical",this}scrollbar(e){return this._scrollbar=e,this}build(){const e={overflowX:this._direction==="horizontal"||this._direction==="both"?"auto":"hidden",overflowY:this._direction==="vertical"||this._direction==="both"?"auto":"hidden",WebkitOverflowScrolling:"touch",display:"flex",flexDirection:this._direction==="horizontal"?"row":"column",...this.getStyle()},r=[...this.getClassName().split(" ")];return this._scrollbar==="hidden"&&(r.push("scrollbar-hide"),e.scrollbarWidth="none",e.msOverflowStyle="none"),s.createElement("div",{className:r.join(" "),style:e,...this._props},...this._children)}}const Je=x(Ye),Ke=s.memo(i=>{const{height:t=64,sticky:e,className:r,style:o,children:l,...a}=i;return s.createElement("header",{className:`flex items-center px-6 border-b border-gray-200 bg-white/80 backdrop-blur-md z-10 w-full ${e?"sticky top-0":""} ${r||""}`,style:{height:t,minHeight:t,...o},...a},l)});class Qe extends _{constructor(){super(...arguments);n(this,"_height",64);n(this,"_sticky",!1)}height(e){return this._height=e,this}sticky(e=!0){return this._sticky=e,this}build(){const e={height:this._height,sticky:this._sticky,className:this.getClassName(),style:this.getStyle(),children:this.processChildren(),...this._props};return s.createElement(Ke,e)}}const Ze=x(Qe),Re=s.memo(i=>{const{width:t=260,collapsed:e,className:r,style:o,children:l,...a}=i,c=e?80:t;return s.createElement("aside",{className:`flex flex-col border-r border-gray-200 bg-white transition-all duration-300 h-full ${r||""}`,style:{width:c,minWidth:c,...o},...a},l)});class et extends _{constructor(){super(...arguments);n(this,"_width",260);n(this,"_collapsed",!1)}width(e){return this._width=e,this}collapsible(e=!1){return this._collapsed=e,this}build(){const e={width:this._width,collapsed:this._collapsed,className:this.getClassName(),style:this.getStyle(),children:this.processChildren(),...this._props};return s.createElement(Re,e)}}const tt=x(et),st=s.memo(i=>{const{sidebar:t,header:e,children:r,className:o,style:l,...a}=i,[c,d]=s.useState(!1);return s.createElement("div",{className:`h-full w-full bg-[#0B0C15] overflow-hidden relative ${o||""}`,style:l,...a},c&&s.createElement("div",{className:"fixed inset-0 z-40 bg-black/50 backdrop-blur-sm transition-opacity lg:hidden",onClick:()=>d(!1)}),s.createElement("button",{className:"lg:hidden fixed top-4 right-4 z-50 p-2 rounded-lg bg-[#1A1B23] border border-white/10 text-white shadow-lg",onClick:()=>d(!c)},s.createElement("div",{className:c?"i-heroicons-x-mark w-6 h-6":"i-heroicons-bars-3 w-6 h-6"})),s.createElement("div",{className:"grid h-full w-full lg:grid-cols-[260px_1fr] transition-all duration-300"},s.createElement("aside",{className:`
|
|
248
248
|
fixed inset-y-0 left-0 z-50 w-[260px] bg-[#0B0C15] border-r border-white/5 transition-transform duration-300 transform
|
|
249
249
|
lg:relative lg:translate-x-0
|
|
250
250
|
${c?"translate-x-0 shadow-2xl":"-translate-x-full"}
|
|
251
|
-
`},t),s.createElement("main",{className:"flex flex-col min-w-0 h-full overflow-hidden relative"},e&&s.createElement("div",{className:"flex-shrink-0"},e),s.createElement("div",{className:"flex-1 overflow-y-auto scrollbar-hide p-4 lg:p-0"},r))))});class tt extends b{constructor(){super(...arguments);o(this,"_sidebar");o(this,"_header")}sidebar(e){return this._sidebar=e,this}header(e){return this._header=e,this}build(){const e={sidebar:this._sidebar,header:this._header,className:this.getClassName(),style:this.getStyle(),children:this.processChildren(),...this._props};return s.createElement(et,e)}}const st=y(tt),rt=s.memo(i=>{const{theme:t,locale:e,providers:r={},className:l,style:n,children:a}=i,c=new Map;return t&&c.set("theme",t),e&&c.set("locale",e),Object.entries(r).forEach(([h,f])=>{c.set(h,f)}),c.size>0?s.createElement(K,{providers:c,children:s.createElement("div",{className:`fibo-scaffold ${l||""}`,style:{minHeight:"100vh",display:"flex",flexDirection:"column",...n}},a)}):s.createElement("div",{className:`fibo-scaffold ${l||""}`,style:{minHeight:"100vh",display:"flex",flexDirection:"column",...n}},a)});class it extends b{constructor(){super(...arguments);o(this,"_theme");o(this,"_locale");o(this,"_customProviders",{})}theme(e){return this._theme=e,this}locale(e){return this._locale=e,this}providers(e){return this._customProviders={...this._customProviders,...e},this}provider(e,r){return this._customProviders[e]=r,this}build(){const e={theme:this._theme,locale:this._locale,providers:this._customProviders,className:this.getClassName(),style:this.getStyle(),children:this.processChildren()};return s.createElement(rt,e)}}const ot=y(it),lt=s.memo(i=>{const{className:t,style:e,children:r,...l}=i;return s.createElement("div",{className:t,style:e,...l},...r)});class nt extends b{build(){const e=["fibo-box",...this._classNames].filter(Boolean).join(" "),r=this.getStyle(),l=this.processChildren(),n={className:e,style:r,children:l,...this._props};return s.createElement(lt,n)}}const C=y(nt),at=s.memo(i=>{const{image:t,size:e,border:r,shape:l,status:n,className:a,style:c}=i,h=typeof e=="number"?`${e}px`:e,f={circle:"50%",rounded:"24%",square:"0"},m={none:"transparent",online:"#10B981",offline:"#9CA3AF",busy:"#EF4444"};return C().className(a).style({position:"relative",width:h,height:h,borderRadius:f[l],backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",border:r,boxShadow:r!=="none"?"0 2px 8px rgba(0,0,0,0.05)":"none",...c}).children(n!=="none"?C().style({position:"absolute",bottom:"-2%",right:"-2%",width:"28%",height:"28%",minWidth:"10px",minHeight:"10px",backgroundColor:m[n],borderRadius:"50%",border:"3px solid #ffffff",boxSizing:"content-box"}).build():null).build()});class ct extends b{constructor(){super(...arguments);o(this,"_image","");o(this,"_size",40);o(this,"_border","none");o(this,"_shape","circle");o(this,"_status","none")}image(e){return this._image=e,this}size(e){return this._size=e,this}border(e){return this._border=e,this}shape(e){return this._shape=e,this}status(e){return this._status=e,this}build(){const e={image:this._image,size:this._size,border:this._border,shape:this._shape,status:this._status,className:this.getClassName(),style:this.getStyle()};return s.createElement(at,e)}}const se=y(ct),ht=s.memo(i=>{const{text:t,type:e,className:r,style:l,...n}=i,a={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",body:"p",caption:"span",label:"label"};return s.createElement(a[e],{className:`fibo-text fibo-text-${e} ${r}`,style:l,...n},t)});class dt extends b{constructor(e=""){super();o(this,"_text","");o(this,"_type","body");this._text=e}text(e){return this._text=e,this}type(e){return this._type=e,this}variant(e){return this._type=e,this}build(){const e={text:this._text,type:this._type,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(ht,e)}}const S=y(dt),ut=s.memo(i=>{const{text:t,icon:e,variant:r,intent:l,shape:n,className:a,style:c}=i,h={none:{bg:"#F9FAFB",text:"#6B7280",border:"#E5E7EB"},success:{bg:"#ECFDF5",text:"#059669",border:"transparent"},warning:{bg:"#FFFBEB",text:"#D97706",border:"transparent"},error:{bg:"#FFF1F2",text:"#E11D48",border:"transparent"},info:{bg:"#EFF6FF",text:"#2563EB",border:"transparent"}};let m={...{neutral:{backgroundColor:"#F9FAFB",color:"#6B7280",border:"1px solid #E5E7EB"},accent:{backgroundColor:"#EFF6FF",color:"#3B82F6",border:"none"},outline:{backgroundColor:"transparent",color:"#FFFFFF",border:"1px solid rgba(255,255,255,0.3)"},glass:{backgroundColor:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(12px)",color:"#111827",border:"1px solid rgba(255, 255, 255, 0.4)"},solid:{backgroundColor:"#111827",color:"#FFFFFF",border:"none"},dot:{backgroundColor:"transparent",color:"#6B7280",border:"1px solid #E5E7EB",padding:"4px 10px"}}[r]};if(l!=="none"){const d=h[l];if(r==="solid"){const g={none:"#111827",success:"#059669",warning:"#D97706",error:"#E11D48",info:"#2563EB"};m.backgroundColor=g[l],m.color="#FFFFFF"}else r==="dot"?(m.color="#374151",m.borderColor="#E5E7EB"):(m.backgroundColor=d.bg,m.color=d.text,d.border?m.border=`1px solid ${d.border}`:m.border="none")}const p={pill:"9999px",rounded:"8px"};return C().className(a).style({...m,borderRadius:p[n],padding:r==="dot"?"4px 8px":"4px 10px",display:"inline-flex",alignItems:"center",justifyContent:"center",height:"fit-content",fontSize:"11px",lineHeight:"1",fontWeight:600,...c}).children(L().gap(6).alignItems("center").children([r==="dot"&&l!=="none"?C().style({width:"6px",height:"6px",borderRadius:"50%",backgroundColor:h[l].text,boxShadow:`0 0 6px ${h[l].text}66`}).build():null,e?C().classNames(["flex","items-center"]).children(e).build():null,S(t).fontSize(12).fontWeight(600).style({color:"inherit"}).build()]).build()).build()});class mt extends b{constructor(){super(...arguments);o(this,"_text","");o(this,"_icon");o(this,"_variant","neutral");o(this,"_intent","none");o(this,"_shape","rounded")}text(e){return this._text=e,this}icon(e){return this._icon=e,this}variant(e){return this._variant=e,this}intent(e){return this._intent=e,this}shape(e){return this._shape=e,this}build(){const e={text:this._text,icon:this._icon,variant:this._variant,intent:this._intent,shape:this._shape,className:this.getClassName(),style:this.getStyle()};return s.createElement(ut,e)}}const H=y(mt),pt=s.memo(i=>{const{text:t,htmlFor:e,required:r,className:l,style:n,...a}=i;return s.createElement("label",{className:`fibo-label text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${l}`,htmlFor:e,style:n,...a},t,r&&s.createElement("span",{className:"text-red-500 ml-0.5"},"*"))});class ft extends b{constructor(e=""){super();o(this,"_text","");o(this,"_htmlFor");o(this,"_required",!1);this._text=e}text(e){return this._text=e,this}htmlFor(e){return this._htmlFor=e,this}required(e=!0){return this._required=e,this}build(){const e={text:this._text,htmlFor:this._htmlFor,required:this._required,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(pt,e)}}const gt=y(ft),bt=s.memo(i=>{const{src:t,alt:e,fit:r,resizable:l,clipShape:n,frameWidth:a,frameHeight:c,className:h,style:f,...m}=i,p={...f};return p.objectFit=r,a&&(p.width=`${a}px`),c&&(p.height=`${c}px`),l&&(p.maxWidth="100%",p.height="auto"),s.createElement("img",{src:t,alt:e,className:h,style:p,...m})});class yt extends b{constructor(e=""){super();o(this,"_src","");o(this,"_alt","");o(this,"_fit","cover");o(this,"_resizable",!1);o(this,"_clipShape");o(this,"_frameWidth");o(this,"_frameHeight");this._src=e}src(e){return this._src=e,this}alt(e){return this._alt=e,this}resizable(){return this._resizable=!0,this}scaledToFit(){return this._fit="contain",this}scaledToFill(){return this._fit="cover",this}frame(e){return this._frameWidth=e.width,this._frameHeight=e.height,this}clipShape(e){return this._clipShape=e,this}foregroundStyle(e){return this}build(){const e=["fibo-image",...this._classNames];this._clipShape==="circle"?e.push("rounded-full"):this._clipShape==="rounded"&&e.push("rounded-lg");const r=e.filter(Boolean).join(" "),l={src:this._src,alt:this._alt,fit:this._fit,resizable:this._resizable,clipShape:this._clipShape,frameWidth:this._frameWidth,frameHeight:this._frameHeight,className:r,style:this.getStyle(),...this._props};return s.createElement(bt,l)}}const re=y(yt),xt=s.memo(i=>{const{size:t,color:e,variant:r="circle",className:l,style:n,...a}=i,h=typeof t=="number"?t:{sm:16,md:24,lg:32,xl:48}[t]||24,f=e||"currentColor",m={className:`fibo-spinner ${l}`,style:{width:h,height:h,...n},...a};return r==="dots"?s.createElement("div",{...m,className:`${m.className} flex items-center justify-between`},[0,1,2].map(p=>s.createElement("div",{key:p,className:"w-[25%] h-[25%] rounded-full animate-bounce",style:{backgroundColor:f,animationDelay:`${p*.1}s`}}))):r==="pulse"?s.createElement("div",{...m,className:`${m.className} relative flex items-center justify-center`},[s.createElement("div",{key:"ring",className:"absolute inset-0 rounded-full opacity-75 animate-ping",style:{backgroundColor:f}}),s.createElement("div",{key:"dot",className:"relative rounded-full h-[75%] w-[75%]",style:{backgroundColor:f}})]):r==="blocks"?s.createElement("div",{...m,className:`${m.className} grid grid-cols-2 gap-[10%] p-[10%]`},[0,1,2,3].map(p=>s.createElement("div",{key:p,className:"w-full h-full bg-current animate-pulse",style:{backgroundColor:f,animationDelay:`${p*.15}s`,opacity:.6}}))):s.createElement("div",{...m,className:`${m.className} animate-spin`},s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",style:{width:"100%",height:"100%"}},s.createElement("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:f,strokeWidth:"4"}),s.createElement("path",{className:"",fill:f,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"})))});class _t extends b{constructor(){super(...arguments);o(this,"_size","md");o(this,"_color");o(this,"_variant","circle")}size(e){return this._size=e,this}color(e){return this._color=e,this}variant(e){return this._variant=e,this}build(){const e={size:this._size,color:this._color,variant:this._variant,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(xt,e)}}const kt=y(_t),vt=s.memo(i=>{const{width:t,height:e,shape:r,className:l,style:n,...a}=i,c=["animate-pulse","bg-gray-200","loading-skeleton"];return r==="circle"?c.push("rounded-full"):r==="rounded-sm"?c.push("rounded-sm"):r==="rounded-md"?c.push("rounded-md"):r==="rounded-lg"?c.push("rounded-lg"):r==="square"?c.push("rounded-none"):c.push("rounded"),s.createElement("div",{className:[...c,l].filter(Boolean).join(" "),style:{width:t,height:e,...n},...a})});class wt extends b{constructor(){super(...arguments);o(this,"_width","100%");o(this,"_height","20px");o(this,"_shape","rounded")}width(e){return this._width=e,this}height(e){return this._height=e,this}shape(e){return this._shape=e,this}build(){const e={width:this._width,height:this._height,shape:this._shape,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(vt,e)}}const Nt=y(wt),A={Heart:x.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),Eth:x.jsx("svg",{width:"14",height:"24",viewBox:"0 0 32 32",fill:"currentColor",children:x.jsx("path",{d:"M15.925 23.96l-9.815-5.8 9.815 13.84 9.825-13.84-9.825 5.8zm0-23.96l-9.815 16.275 9.815 5.675 9.825-5.675-9.825-16.275zm0 20.3l-8.915-5.265 8.915-12.42 8.925 12.42-8.925 5.265z"})}),Verify:x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"#3B82F6",stroke:"none",children:x.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),More:x.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"1"}),x.jsx("circle",{cx:"19",cy:"12",r:"1"}),x.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),Clock:x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("polyline",{points:"12 6 12 12 16 14"})]}),Info:x.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),x.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),Check:x.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),x.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),Search:x.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("circle",{cx:"11",cy:"11",r:"8"}),x.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),Close:x.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})},Ct=s.memo(i=>{const{title:t,description:e,intent:r="info",className:l,style:n,...a}=i,c=r,h={info:"bg-blue-500 text-white",success:"bg-emerald-500 text-white",warning:"bg-orange-400 text-white",error:"bg-rose-500 text-white"},f={info:"bg-blue-600",success:"bg-emerald-600",warning:"bg-orange-500",error:"bg-rose-600"},m={info:A.Info||s.createElement("span",{},"?"),success:A.Check||s.createElement("span",{},"✔"),warning:A.Search||s.createElement("span",{},"!"),error:A.Close||s.createElement("span",{},"x")},p=`relative overflow-hidden flex items-start gap-4 p-5 rounded-3xl shadow-lg border-none ${h[c]}`;return s.createElement("div",{className:`${p} ${l}`,style:n,...a},[s.createElement("div",{key:"blob1",className:"absolute -top-6 -right-6 w-24 h-24 rounded-full bg-white opacity-10 pointer-events-none"}),s.createElement("div",{key:"blob2",className:"absolute bottom-[-10px] left-10 w-12 h-12 rounded-full bg-black opacity-5 pointer-events-none"}),s.createElement("div",{key:"blob3",className:"absolute top-10 right-20 w-8 h-8 rounded-full bg-white opacity-10 pointer-events-none"}),s.createElement("div",{key:"icon-wrapper",className:`relative z-10 shrink-0 w-10 h-10 rounded-full flex items-center justify-center shadow-sm ${f[c]}`},s.cloneElement(m[c],{width:20,height:20,strokeWidth:3})),s.createElement("div",{key:"content",className:"relative z-10 flex flex-col gap-1.5 pt-0.5"},[t&&s.createElement("h5",{key:"title",className:"font-bold text-lg leading-none tracking-tight"},t),e&&s.createElement("p",{key:"desc",className:"text-sm font-medium opacity-90 leading-relaxed"},e)])])});class St extends b{constructor(){super(...arguments);o(this,"_title","");o(this,"_description");o(this,"_intent","info")}title(e){return this._title=e,this}description(e){return this._description=e,this}intent(e){return this._intent=e,this}build(){const e={title:this._title,description:this._description,intent:this._intent,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Ct,e)}}const Et=y(St),Ft=s.memo(i=>{const{value:t,max:e,color:r,height:l,variant:n="default",label:a,subLabel:c,items:h=[],className:f,style:m,...p}=i,d=Math.min(100,Math.max(0,t/e*100)),g=r||"#3B82F6";if(n==="circular"){const w=typeof l=="number"?l:64,F=8,k=(w-F)/2,_=k*2*Math.PI,z=_-d/100*_;return s.createElement("div",{className:`relative inline-flex items-center justify-center ${f}`,style:{width:w,height:w,...m},...p},[s.createElement("svg",{key:"svg",className:"transform -rotate-90",width:w,height:w},[s.createElement("circle",{key:"track",className:"text-gray-100",stroke:"currentColor",strokeWidth:F,fill:"transparent",r:k,cx:w/2,cy:w/2}),s.createElement("circle",{key:"prog",stroke:g,strokeWidth:F,strokeDasharray:_,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",r:k,cx:w/2,cy:w/2,className:"transition-all duration-1000 ease-out"})]),s.createElement("span",{key:"label",className:"absolute text-sm font-bold text-gray-700"},a||`${Math.round(d)}%`)])}if(n==="pagination"){const F=Math.floor(d/100*5);return s.createElement("div",{className:`flex items-center gap-2 ${f}`,style:m,...p},Array.from({length:5}).map((k,_)=>{const z=_===F;return s.createElement("div",{key:_,className:`h-3 rounded-full transition-all duration-300 ${z?"w-8":"w-3"}`,style:{backgroundColor:_<=F?g:"#E5E7EB"}})}))}if(n==="timeline"){const w=h.length?h:[{title:"Order components",date:"Done"},{title:"Draft implementation",date:"In Progress"},{title:"Verify functionality",date:"Pending"}],F=Math.floor(d/100*w.length);return s.createElement("div",{className:`flex flex-col relative ${f}`,style:m,...p},w.map((k,_)=>{const z=_<F,j=_===F,W=_===w.length-1,v=z||j?g:"#E5E7EB",B=z?s.createElement("span",{},"✓"):_+1;return s.createElement("div",{key:_,className:"relative flex items-start gap-4 pb-8 last:pb-0"},[!W&&s.createElement("div",{key:"tail",className:"absolute left-[19px] top-10 bottom-0 w-0.5 transition-colors duration-500",style:{backgroundColor:z?g:"#E5E7EB"}}),s.createElement("div",{key:"dot",className:"relative z-10 w-10 h-10 rounded-full flex items-center justify-center border-2 bg-white transition-all duration-300 shrink-0 text-sm font-bold shadow-sm",style:{borderColor:v,color:z?"#fff":j?v:"#9CA3AF",backgroundColor:z?v:"#fff"}},B),s.createElement("div",{key:"content",className:"pt-2"},[s.createElement("div",{className:"text-sm font-bold text-gray-900 leading-none"},k.title),k.description&&s.createElement("div",{className:"text-xs text-gray-500 mt-1.5"},k.description),k.date&&s.createElement("div",{className:"text-xs font-mono text-gray-400 mt-1"},k.date)])])}))}if(n==="floating")return s.createElement("div",{className:`w-full bg-white rounded-xl shadow-sm border border-gray-100 p-4 relative overflow-hidden ${f}`,style:m,...p},[s.createElement("div",{key:"info",className:"flex justify-between items-center mb-3 px-1"},[s.createElement("span",{key:"l",className:"text-sm font-semibold text-gray-700"},a?s.createElement("span",{className:"text-blue-600 mr-2"},`${Math.round(d)}%`):null,a||"Update in progress..."),c&&s.createElement("span",{key:"r",className:"text-xs font-medium text-gray-400"},c)]),s.createElement("div",{key:"track",className:"w-full bg-blue-50 h-1.5 rounded-full overflow-hidden"},s.createElement("div",{className:"h-full rounded-full transition-all duration-1000 ease-out",style:{width:`${d}%`,backgroundColor:g}}))]);if(n==="chevron"){const F=Math.floor(d/100*3);return s.createElement("div",{className:`flex w-full rounded-lg overflow-hidden ${f}`,style:m,...p},Array.from({length:3}).map((k,_)=>{const z=_<=F;return s.createElement("div",{key:_,className:"flex-1 h-10 flex items-center justify-center text-sm font-bold text-white transition-colors duration-300",style:{backgroundColor:z?_===F?g:"#60A5FA":"#E5E7EB",clipPath:_===0?"polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%)":_===2?"polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 15% 50%)":"polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%, 15% 50%)",marginLeft:_===0?0:"-10px",paddingLeft:_===0?0:"10px",zIndex:3-_}},`Step ${_+1}`)}))}if(n==="steps"){const F=Math.ceil(d/100*3);return s.createElement("div",{className:`w-full flex items-center justify-between relative ${f}`,style:{marginTop:"1rem",...m},...p},[s.createElement("div",{key:"line-bg",className:"absolute top-1/2 left-0 w-full h-1.5 bg-gray-200 z-0 transform -translate-y-1/2 rounded-full"}),s.createElement("div",{key:"line-active",className:"absolute top-1/2 left-0 h-1.5 z-0 transform -translate-y-1/2 transition-all duration-500 rounded-full",style:{width:`${d}%`,backgroundColor:g}}),...Array.from({length:3}).map((k,_)=>{const z=_+1,j=z<=F,W=z<F;return s.createElement("div",{key:_,className:`relative z-10 w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold transition-all duration-300 border-4 ${j?"text-white border-white shadow-md":"bg-gray-100 text-gray-400 border-gray-50"}`,style:{backgroundColor:j?g:void 0}},W?s.createElement("span",{},"✔"):z)})])}const E=l||12;if(n==="segments"){const F=Math.round(d/100*10);return s.createElement("div",{className:`flex gap-1.5 w-full ${f}`,style:m,...p},Array.from({length:10}).map((k,_)=>s.createElement("div",{key:_,className:"h-3 flex-1 rounded-sm transition-all duration-300 first:rounded-l-full last:rounded-r-full",style:{height:l||12,backgroundColor:_<F?g:"#E5E7EB"}})))}let N=null;n==="striped"&&(N=s.createElement("div",{className:"w-full h-full opacity-30 animate-[stripes_1s_linear_infinite]",style:{backgroundImage:"linear-gradient(45deg,rgba(255,255,255,.25) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.25) 50%,rgba(255,255,255,.25) 75%,transparent 75%,transparent)",backgroundSize:"20px 20px"}}));const $=n==="labeled"?s.createElement("div",{className:"absolute -top-12 transform -translate-x-1/2 bg-slate-800 text-white text-xs font-bold py-1.5 px-3 rounded-lg shadow-xl whitespace-nowrap",style:{left:`${d}%`}},[a||`${Math.round(d)}%`,s.createElement("div",{key:"arrow",className:"absolute -bottom-1 left-1/2 transform -translate-x-1/2 w-2 h-2 bg-slate-800 rotate-45"})]):null,I=n==="knob"?s.createElement("div",{className:"absolute top-1/2 right-0 w-7 h-7 bg-white rounded-full shadow-lg border-4 transform translate-x-1/2 -translate-y-1/2 flex items-center justify-center",style:{borderColor:g}},s.createElement("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:g}})):null;return s.createElement("div",{className:`relative w-full ${n==="labeled"?"mt-8":""}`,...p},[$,s.createElement("div",{key:"track",className:`w-full bg-slate-100 rounded-full ${f}`,style:{width:"100%",height:E,...m}},s.createElement("div",{className:"h-full transition-all duration-1000 ease-out rounded-full flex items-center justify-center relative",style:{width:`${d}%`,backgroundColor:g}},[N,I]))])});class zt extends b{constructor(){super(...arguments);o(this,"_value",0);o(this,"_max",100);o(this,"_color");o(this,"_height");o(this,"_variant","default");o(this,"_label");o(this,"_subLabel");o(this,"_items")}value(e){return this._value=e,this}max(e){return this._max=e,this}color(e){return this._color=e,this}height(e){return this._height=e,this}variant(e){return this._variant=e,this}label(e){return this._label=e,this}subLabel(e){return this._subLabel=e,this}items(e){return this._items=e,this}build(){const e={value:this._value,max:this._max,color:this._color,height:this._height,variant:this._variant,label:this._label,subLabel:this._subLabel,items:this._items,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Ft,e)}}const Bt=y(zt),$t=s.memo(i=>{const{text:t,variant:e,size:r,onPress:l,disabled:n,icon:a,shape:c,shadow:h,className:f,style:m,...p}=i,d={...m};Object.assign(d,{sm:{padding:"6px 14px",fontSize:"13px",gap:"6px",height:"32px"},md:{padding:"10px 22px",fontSize:"15px",gap:"8px",height:"44px"},lg:{padding:"16px 32px",fontSize:"17px",gap:"10px",height:"56px"}}[r]),c==="pill"?d.borderRadius="9999px":c==="square"?d.borderRadius="12px":d.borderRadius="14px",h==="soft"&&(d.boxShadow="0 8px 20px -6px rgba(59, 130, 246, 0.4)"),e==="ghost"?(d.backgroundColor="transparent",d.color="#4B5563",d.boxShadow="none",d.border="1px solid transparent"):e==="text"?(d.backgroundColor="transparent",d.color="#4B5563",d.boxShadow="none",d.border="none",d.paddingLeft="8px",d.paddingRight="8px"):e==="soft"?(d.backgroundColor="#EEF2FF",d.color="#4F46E5",d.boxShadow="none",d.border="none"):e==="outline"&&(d.backgroundColor="transparent",d.border="1.5px solid #E5E7EB",d.color="#374151",d.boxShadow="none");const E=[];return a&&E.push(a),t&&E.push(t),s.createElement("button",{className:f,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:n?"not-allowed":"pointer",opacity:n?.6:1,fontWeight:600,whiteSpace:"nowrap",...d},onClick:N=>{n||(document.documentElement.classList.contains("fibo-theme-material")&&Promise.resolve().then(()=>Xs).then(({createRipple:$})=>{$(N)}),l==null||l())},disabled:n,...p},...E)});class At extends b{constructor(e=""){super();o(this,"_text","");o(this,"_variant","elevated");o(this,"_size","md");o(this,"_onPress");o(this,"_disabled",!1);o(this,"_icon");o(this,"_shape","default");o(this,"_shadow","none");this._text=e}text(e){return this._text=e,this}variant(e){return this._variant=e,this}size(e){return this._size=e,this}onPress(e){return this._onPress=e,this}disabled(e=!0){return this._disabled=e,this}icon(e){return this._icon=e,this}shape(e){return this._shape=e,this}shadow(e){return this._shadow=e,this}build(){const e=["fibo-button",`fibo-button-${this._variant}`,"active:scale-[0.96]","transform","transition-all","duration-200","ease-out",...this._classNames].filter(Boolean).join(" "),r={text:this._text,variant:this._variant,size:this._size,onPress:this._onPress,disabled:this._disabled,icon:this._icon,shape:this._shape,shadow:this._shadow,className:e,style:this.getStyle(),...this._props};return s.createElement($t,r)}}const q=y(At),It=(i,t)=>{let e=0;const r=i.replace(/\D/g,"").split("");let l="";for(let n=0;n<t.length&&!(e>=r.length);n++)t[n]==="9"?l+=r[e++]:l+=t[n];return l},jt=s.memo(i=>{const t=s.useId(),e=i.id||t,[r,l]=s.useState(!1),{containerClass:n,containerStyle:a,label:c,error:h,mask:f,type:m,onChange:p,...d}=i,g=m==="password",E=g&&r?"text":m,N=$=>{let I=$.target.value;if(f){I=It(I,f);const w={...$,target:{...$.target,value:I}};p==null||p(w)}else p==null||p($)};return s.createElement("div",{className:n,style:a},s.createElement("div",{className:"relative w-full"},[s.createElement("input",{key:"input",id:e,className:"fibo-textfield-input",type:E,onChange:N,...d}),c&&s.createElement("label",{key:"label",htmlFor:e,className:"fibo-textfield-label"},c),g&&s.createElement("button",{key:"toggle",type:"button",className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600 focus:outline-none",onClick:()=>l(!r),tabIndex:-1},r?s.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},s.createElement("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),s.createElement("line",{x1:1,y1:1,x2:23,y2:23})):s.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},s.createElement("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),s.createElement("circle",{cx:12,cy:12,r:3})))]),h&&s.createElement("span",{className:"text-[var(--fibo-error)] text-xs mt-1 ml-1"},h))});class Wt extends b{constructor(e=""){super();o(this,"_value","");o(this,"_label","");o(this,"_placeholder","");o(this,"_type","text");o(this,"_disabled",!1);o(this,"_error");o(this,"_mask");o(this,"_onChange");this._value=e}value(e){return this._value=e,this}label(e){return this._label=e,this}placeholder(e){return this._placeholder=e,this}type(e){return this._type=e,this}mask(e){return this._mask=e,this}disabled(e=!0){return this._disabled=e,this}error(e){return this._error=e,this}onChange(e){return this._onChange=e,this}build(){const r={containerClass:["fibo-textfield-container",...this._classNames].filter(Boolean).join(" "),containerStyle:this.getStyle(),label:this._label,error:this._error,value:this._value,placeholder:this._placeholder||" ",type:this._type,mask:this._mask,disabled:this._disabled,onChange:l=>{var n;(n=this._onChange)==null||n.call(this,l.target.value)},...this._props};return s.createElement(jt,r)}}const ie=y(Wt),Lt=s.memo(i=>{const{checked:t,onChange:e,label:r,disabled:l,className:n,style:a}=i,c={width:"44px",height:"24px",borderRadius:"9999px",position:"relative",transition:"background-color 0.2s ease-in-out",cursor:l?"not-allowed":"pointer",opacity:l?.5:1,backgroundColor:t?"var(--fibo-primary, #3B82F6)":"#E5E7EB",...a},h={width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"white",position:"absolute",top:"2px",left:"2px",transition:"transform 0.2s ease-in-out",transform:t?"translateX(20px)":"translateX(0)",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"};return s.createElement("label",{className:`fibo-switch flex items-center gap-3 ${n}`},s.createElement("div",{className:"fibo-switch-track",style:c,onClick:f=>{f.preventDefault(),!l&&e&&e(!t)}},s.createElement("div",{style:h})),r&&s.createElement("span",{className:"text-sm font-medium text-gray-700 select-none"},r),s.createElement("input",{type:"checkbox",checked:t,disabled:l,className:"sr-only",onChange:f=>!l&&(e==null?void 0:e(f.target.checked))}))});class Mt extends b{constructor(){super(...arguments);o(this,"_checked",!1);o(this,"_onChange");o(this,"_label");o(this,"_disabled",!1)}checked(e){return this._checked=e,this}onChange(e){return this._onChange=e,this}label(e){return this._label=e,this}disabled(e=!0){return this._disabled=e,this}build(){const e={checked:this._checked,onChange:this._onChange,label:this._label,disabled:this._disabled,className:this.getClassName(),style:this.getStyle()};return s.createElement(Lt,e)}}const oe=y(Mt),Tt=s.memo(i=>{const{checked:t,onChange:e,label:r,disabled:l,indeterminate:n,className:a,style:c}=i,h=t||n,f={width:"20px",height:"20px",borderRadius:"6px",border:h?"none":"2px solid #D1D5DB",backgroundColor:h?"var(--fibo-primary, #3B82F6)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",cursor:l?"not-allowed":"pointer",opacity:l?.5:1,...c};let m=null;return n?m=s.createElement("div",{style:{width:"10px",height:"2px",backgroundColor:"white",borderRadius:"1px"}}):t&&(m=s.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.createElement("path",{d:"M10 3L4.5 8.5L2 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),s.createElement("label",{className:`fibo-checkbox flex items-center gap-2 ${a}`},s.createElement("div",{className:"fibo-checkbox-box",style:f,onClick:p=>{p.preventDefault(),!l&&e&&e(!t)}},m),r&&s.createElement("span",{className:"text-sm text-gray-700 select-none"},r),s.createElement("input",{type:"checkbox",checked:t,disabled:l,className:"sr-only",onChange:p=>!l&&(e==null?void 0:e(p.target.checked))}))});class Pt extends b{constructor(){super(...arguments);o(this,"_checked",!1);o(this,"_onChange");o(this,"_label");o(this,"_disabled",!1);o(this,"_indeterminate",!1)}checked(e){return this._checked=e,this}indeterminate(e){return this._indeterminate=e,this}onChange(e){return this._onChange=e,this}label(e){return this._label=e,this}disabled(e=!0){return this._disabled=e,this}build(){const e={checked:this._checked,onChange:this._onChange,label:this._label,disabled:this._disabled,indeterminate:this._indeterminate,className:this.getClassName(),style:this.getStyle()};return s.createElement(Tt,e)}}const Dt=y(Pt),Ot=s.memo(i=>{const{value:t,options:e,onChange:r,name:l,direction:n,className:a,style:c}=i;return s.createElement("div",{className:`fibo-radio-group flex ${n==="vertical"?"flex-col gap-2":"flex-row gap-4"} ${a}`,style:c},e.map(h=>{const f=t===h.value,m=h.disabled;return s.createElement("label",{key:h.value,className:`flex items-center gap-2 cursor-pointer ${m?"opacity-50 cursor-not-allowed":""}`},s.createElement("div",{className:"relative flex items-center justify-center",style:{width:"18px",height:"18px",borderRadius:"50%",border:f?"5px solid var(--fibo-primary, #3B82F6)":"2px solid #D1D5DB",transition:"all 0.2s"}},s.createElement("input",{type:"radio",name:l,value:h.value,checked:f,disabled:m,className:"sr-only",onChange:()=>!m&&(r==null?void 0:r(h.value))})),s.createElement("span",{className:"text-sm text-gray-700"},h.label))}))});class Ht extends b{constructor(){super(...arguments);o(this,"_value","");o(this,"_options",[]);o(this,"_onChange");o(this,"_name",`radio-group-${Math.random().toString(36).substr(2,9)}`);o(this,"_direction","vertical")}value(e){return this._value=e,this}options(e){return this._options=e,this}onChange(e){return this._onChange=e,this}direction(e){return this._direction=e,this}name(e){return this._name=e,this}build(){const e={value:this._value,options:this._options,onChange:this._onChange,name:this._name,direction:this._direction,className:this.getClassName(),style:this.getStyle()};return s.createElement(Ot,e)}}const Vt=y(Ht),qt=s.memo(i=>{const t=s.useId(),e=i.id||t,{containerClass:r,containerStyle:l,label:n,error:a,...c}=i;return s.createElement("div",{className:r,style:l},s.createElement("textarea",{id:e,className:"fibo-textarea-input",...c}),n&&s.createElement("label",{htmlFor:e,className:"fibo-textarea-label"},n),a&&s.createElement("span",{className:"text-[var(--fibo-error)] text-xs mt-1 ml-1"},a))});class Gt extends b{constructor(){super(...arguments);o(this,"_value","");o(this,"_label","");o(this,"_placeholder","");o(this,"_disabled",!1);o(this,"_rows",4);o(this,"_error");o(this,"_resize","vertical");o(this,"_onChange")}value(e){return this._value=e,this}label(e){return this._label=e,this}placeholder(e){return this._placeholder=e,this}disabled(e=!0){return this._disabled=e,this}rows(e){return this._rows=e,this}resize(e){return this._resize=e,this}error(e){return this._error=e,this}onChange(e){return this._onChange=e,this}build(){const r={containerClass:["fibo-textarea-container",...this._classNames].filter(Boolean).join(" "),containerStyle:{width:"100%",...this.getStyle()},label:this._label,error:this._error,rows:this._rows,value:this._value,placeholder:this._placeholder||" ",disabled:this._disabled,style:{resize:this._resize},onChange:l=>{var n;(n=this._onChange)==null||n.call(this,l.target.value)},...this._props};return s.createElement(qt,r)}}const Xt=y(Gt),Yt=s.memo(i=>{const t=s.useId(),e=i.id||t,[r,l]=s.useState(!1),n=s.useRef(null),{containerClass:a,containerStyle:c,label:h,error:f,value:m,options:p=[],placeholder:d,onChange:g,disabled:E,multiple:N,...$}=i;s.useEffect(()=>{const k=_=>{n.current&&!n.current.contains(_.target)&&l(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);const I=k=>N?Array.isArray(m)&&m.includes(k):m===k;let w="";if(N)Array.isArray(m)&&m.length>0&&(w=p.filter(k=>m.includes(k.value)).map(k=>k.label).join(", "));else{const k=p.find(_=>_.value===m);w=k?k.label:""}const F=k=>{if(!E)if(N){const _=Array.isArray(m)?[...m]:[],z=_.indexOf(k);z>-1?_.splice(z,1):_.push(k),g==null||g(_)}else g==null||g(k),l(!1)};return s.createElement("div",{ref:n,className:a,style:c},s.createElement("div",{className:"relative w-full"},[s.createElement("button",{key:"trigger",id:e,type:"button",disabled:E,className:`fibo-textfield-input text-left w-full flex items-center justify-between ${w?"":"text-gray-400"}`,onClick:()=>!E&&l(!r),...$},[s.createElement("span",{key:"text",className:"truncate"},w||d||" "),s.createElement("svg",{key:"icon",className:`w-4 h-4 transition-transform ${r?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"}))]),h&&s.createElement("label",{key:"label",htmlFor:e,className:"fibo-textfield-label"},h),r&&s.createElement("div",{key:"dropdown",className:"absolute z-50 w-full mt-1 bg-[var(--fibo-surface)] border border-[var(--fibo-outline)] rounded-md shadow-lg max-h-60 overflow-auto focus:outline-none"},p.map(k=>{const _=I(k.value);return s.createElement("div",{key:k.value,className:`px-4 py-2 cursor-pointer text-sm hover:bg-[var(--fibo-primary-container)] hover:text-[var(--fibo-on-primary-container)] flex items-center justify-between ${_?"bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] font-medium":"text-[var(--fibo-on-surface)]"}`,onClick:()=>F(k.value)},[s.createElement("span",{key:"label"},k.label),_&&s.createElement("svg",{key:"check",className:"w-4 h-4 text-[var(--fibo-primary)]",viewBox:"0 0 20 20",fill:"currentColor"},s.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))])}))]),f&&s.createElement("span",{className:"text-[var(--fibo-error)] text-xs mt-1 ml-1"},f))});class Ut extends b{constructor(){super(...arguments);o(this,"_value","");o(this,"_label","");o(this,"_placeholder","");o(this,"_disabled",!1);o(this,"_error");o(this,"_multiple",!1);o(this,"_options",[]);o(this,"_onChange")}value(e){return this._value=e,this}label(e){return this._label=e,this}placeholder(e){return this._placeholder=e,this}options(e){return this._options=e,this}multiple(e=!0){return this._multiple=e,this}disabled(e=!0){return this._disabled=e,this}error(e){return this._error=e,this}onChange(e){return this._onChange=e,this}build(){const r={containerClass:["fibo-textfield-container relative",...this._classNames].filter(Boolean).join(" "),containerStyle:this.getStyle(),label:this._label,error:this._error,value:this._value,placeholder:this._placeholder,options:this._options,disabled:this._disabled,multiple:this._multiple,onChange:this._onChange,...this._props};return s.createElement(Yt,r)}}const Jt=y(Ut),Kt=s.memo(i=>{const t=s.useId(),e=i.id||t,[r,l]=s.useState(!1),[n,a]=s.useState(""),c=s.useRef(null),{containerClass:h,containerStyle:f,label:m,error:p,value:d,options:g=[],placeholder:E,onChange:N,onAdd:$,disabled:I,multiple:w,...F}=i;s.useEffect(()=>{if(!w){const v=i.options.find(B=>B.value===i.value);v&&!r&&n!==v.label&&a(v.label)}},[i.value,i.options,r,w]);const k=g.filter(v=>v.label.toLowerCase().includes(n.toLowerCase()));s.useEffect(()=>{const v=B=>{if(c.current&&!c.current.contains(B.target))if(l(!1),w)a("");else{const O=g.find(V=>V.value===d);a(O?O.label:"")}};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[d,g,w]);const _=v=>{if(w){const B=Array.isArray(d)?[...d]:[];B.includes(v.value)||(B.push(v.value),N==null||N(B)),a("")}else a(v.label),N==null||N(v.value),l(!1)},z=v=>{if(w&&Array.isArray(d)){const B=d.filter(O=>O!==v);N==null||N(B)}},j=()=>{$==null||$(n),w?a(""):l(!1)},W=v=>w?Array.isArray(d)&&d.includes(v):d===v;return s.createElement("div",{ref:c,className:h,style:f},s.createElement("div",{className:"relative w-full"},[s.createElement("div",{className:`fibo-textfield-input flex flex-wrap items-center gap-1 ${r?"ring-2 ring-[var(--fibo-primary-container)] border-[var(--fibo-primary)]":""}`,style:{minHeight:"42px",padding:"4px 8px"}},[w&&Array.isArray(d)&&d.map(v=>{const B=g.find(V=>V.value===v),O=B?B.label:v;return s.createElement("span",{key:v,className:"bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] text-xs font-medium px-2 py-1 rounded-md flex items-center"},[O,s.createElement("button",{type:"button",className:"ml-1 hover:text-[var(--fibo-primary)] focus:outline-none",onClick:V=>{V.stopPropagation(),z(v)}},"×")])}),s.createElement("input",{key:"input",id:e,className:"bg-transparent outline-none flex-1 min-w-[60px] text-sm h-8",value:n,placeholder:w&&Array.isArray(d)&&d.length>0?"":E||" ",disabled:I,onChange:v=>{a(v.target.value),r||l(!0)},onFocus:()=>l(!0),...F})]),m&&s.createElement("label",{key:"label",htmlFor:e,className:"fibo-textfield-label"},m),r&&s.createElement("div",{key:"dropdown",className:"absolute z-50 w-full mt-1 bg-[var(--fibo-surface)] border border-[var(--fibo-outline)] rounded-md shadow-lg max-h-60 overflow-auto focus:outline-none left-0"},[k.length>0?k.map(v=>{const B=W(v.value);return s.createElement("div",{key:v.value,className:`px-4 py-2 cursor-pointer text-sm hover:bg-[var(--fibo-primary-container)] hover:text-[var(--fibo-on-primary-container)] ${B?"bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] font-medium opacity-50":"text-[var(--fibo-on-surface)]"}`,onClick:()=>!B&&_(v)},v.label)}):s.createElement("div",{className:"px-4 py-2 text-sm text-gray-500"},"No results found."),n&&!k.some(v=>v.label.toLowerCase()===n.toLowerCase())&&$&&s.createElement("div",{key:"add-new",className:"border-t border-[var(--fibo-outline)] px-4 py-2 cursor-pointer text-sm text-[var(--fibo-primary)] hover:bg-[var(--fibo-primary-container)] font-medium flex items-center",onClick:j},[s.createElement("span",{className:"mr-1"},"+"),`Add "${n}"`])])]),p&&s.createElement("span",{className:"text-[var(--fibo-error)] text-xs mt-1 ml-1"},p))});class Qt extends b{constructor(){super(...arguments);o(this,"_value","");o(this,"_label","");o(this,"_placeholder","");o(this,"_disabled",!1);o(this,"_error");o(this,"_multiple",!1);o(this,"_options",[]);o(this,"_onChange");o(this,"_onAdd")}value(e){return this._value=e,this}label(e){return this._label=e,this}placeholder(e){return this._placeholder=e,this}options(e){return this._options=e,this}multiple(e=!0){return this._multiple=e,this}disabled(e=!0){return this._disabled=e,this}error(e){return this._error=e,this}onChange(e){return this._onChange=e,this}onAdd(e){return this._onAdd=e,this}build(){const r={containerClass:["fibo-textfield-container relative",...this._classNames].filter(Boolean).join(" "),containerStyle:this.getStyle(),label:this._label,error:this._error,value:this._value,placeholder:this._placeholder,options:this._options,disabled:this._disabled,multiple:this._multiple,onChange:this._onChange,onAdd:this._onAdd,...this._props};return s.createElement(Kt,r)}}const Zt=y(Qt),Rt=s.memo(i=>{const{text:t,subtitle:e,number:r,color:l,className:n,style:a,children:c,...h}=i;return s.createElement("div",{className:`rounded-[24px] shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_8px_30px_rgb(0,0,0,0.08)] transition-shadow duration-300 border-none p-4 ${n||""}`,style:{backgroundColor:"#ffffff",...a},...h},s.createElement("div",{className:"flex flex-col gap-2"},t&&s.createElement("h3",{className:"font-semibold text-[var(--fibo-on-surface-variant)] text-sm uppercase tracking-wide"},t),r&&s.createElement("p",{className:"font-bold text-[var(--fibo-on-surface)] text-3xl"},r),e&&s.createElement("p",{className:"text-[var(--fibo-on-surface-variant)] text-xs"},e),...c))});class es extends b{constructor(){super(...arguments);o(this,"_text","");o(this,"_subtitle");o(this,"_number");o(this,"_color")}text(e){return this._text=e,this}subtitle(e){return this._subtitle=e,this}number(e){return this._number=e,this}color(e){return this._color=e,this}build(){const e={green:"border-l-green-500",orange:"border-l-orange-500",red:"border-l-red-500",blue:"border-l-blue-500",purple:"border-l-purple-500"},r=["fibo-card",this._color?`border-l-4 ${e[this._color]}`:"",...this._classNames].filter(Boolean).join(" "),l={text:this._text,subtitle:this._subtitle,number:this._number,color:this._color,className:r,style:this.getStyle(),children:this.processChildren(),...this._props};return s.createElement(Rt,l)}}const M=y(es),ts=s.memo(i=>{const{items:t,renderItem:e,variant:r,separator:l,loading:n,threshold:a,onEndReached:c,className:h,style:f}=i,m=s.useRef(null);s.useEffect(()=>{if(!c||n)return;const E=new IntersectionObserver(N=>{N[0].isIntersecting&&(c==null||c())},{threshold:a});return m.current&&E.observe(m.current),()=>E.disconnect()},[n,t.length,c,a]);const p={default:{gap:"0px"},card:{gap:"12px"},floating:{gap:"8px"}},d={default:{padding:"12px 16px",borderBottom:l?"1px solid #F3F4F6":"none",backgroundColor:"transparent",transition:"background-color 0.2s"},card:{padding:"16px",backgroundColor:"#fff",borderRadius:"16px",boxShadow:"0 2px 8px -2px rgba(0,0,0,0.05)",border:"1px solid #F3F4F6",transition:"transform 0.2s, box-shadow 0.2s"},floating:{padding:"8px 12px",borderRadius:"12px",backgroundColor:"transparent",transition:"background-color 0.2s"}},g={default:["hover:bg-gray-50","first:rounded-t-xl","last:rounded-b-xl"],card:["hover:-translate-y-0.5","hover:shadow-md"],floating:["hover:bg-white","hover:shadow-sm"]};return C().className(h).classNames(["flex","flex-col","w-full"]).style({...p[r],...f}).children(s.createElement(s.Fragment,{},[...t.map((E,N)=>s.cloneElement(C().style(d[r]).classNames(g[r]).children(e?e(E,N):null).build(),{key:`item-${N}`})),c&&s.createElement("div",{ref:m,className:"py-4 flex justify-center w-full"},n?s.createElement("div",{className:"animate-spin rounded-full h-5 w-5 border-2 border-gray-300 border-b-blue-600"}):s.createElement("div",{style:{height:"20px"}}))])).build()});class ss extends b{constructor(){super(...arguments);o(this,"_items",[]);o(this,"_renderItem");o(this,"_variant","default");o(this,"_separator",!1);o(this,"_onEndReached");o(this,"_loading",!1);o(this,"_threshold",.5)}items(e){return this._items=e,this}renderItem(e){return this._renderItem=e,this}variant(e){return this._variant=e,this}separator(e=!0){return this._separator=e,this}onEndReached(e){return this._onEndReached=e,this}loading(e){return this._loading=e,this}threshold(e){return this._threshold=e,this}build(){const e={items:this._items,renderItem:this._renderItem,variant:this._variant,separator:this._separator,loading:this._loading,threshold:this._threshold,onEndReached:this._onEndReached,className:this.getClassName(),style:this.getStyle()};return s.createElement(ts,e)}}const rs=y(ss),is=s.memo(i=>{const{data:t,columns:e,variant:r,density:l,striped:n,width:a,className:c,style:h}=i,f={width:"100%",borderCollapse:"separate",borderSpacing:"0",...h};a&&(f.width=typeof a=="number"?`${a}px`:a);const m=r==="clean"?["bg-white","rounded-2xl","border","border-gray-100","overflow-hidden","shadow-sm"]:[],d={compact:"10px 16px",standard:"16px 24px",relaxed:"24px 32px"}[l];return C().className(c).classNames(m).children(s.createElement("table",{style:f},[s.createElement("thead",{key:"thead",className:"bg-gray-50/50"},s.createElement("tr",{},e.map((g,E)=>s.createElement("th",{key:E,style:{textAlign:g.align||"left",padding:d,width:g.width},className:"text-xs font-bold text-gray-400 uppercase tracking-widest"},g.header)))),s.createElement("tbody",{key:"tbody"},t.map((g,E)=>s.createElement("tr",{key:E,className:`group transition-all duration-200 border-b border-gray-50 last:border-b-0 ${n&&E%2!==0?"bg-gray-50/30":"bg-transparent"} ${r==="clean"?"hover:bg-white hover:shadow-md hover:scale-[1.002] hover:z-10 relative":"hover:bg-gray-50/50"}`},e.map((N,$)=>s.createElement("td",{key:$,style:{textAlign:N.align||"left",padding:d,borderTop:r==="default"?"1px solid #F3F4F6":"none"},className:"text-sm text-gray-900 font-medium"},N.render?N.render(g):N.accessor?g[N.accessor]:null)))))])).build()});class os extends b{constructor(){super(...arguments);o(this,"_data",[]);o(this,"_columns",[]);o(this,"_variant","clean");o(this,"_density","standard");o(this,"_striped",!1);o(this,"_width")}data(e){return this._data=e,this}columns(e){return this._columns=e,this}variant(e){return this._variant=e,this}density(e){return this._density=e,this}striped(e=!0){return this._striped=e,this}width(e){return this._width=e,this}build(){const e={data:this._data,columns:this._columns,variant:this._variant,density:this._density,striped:this._striped,width:this._width,className:this.getClassName(),style:this.getStyle()};return s.createElement(is,e)}}const ls=y(os),ns=s.memo(i=>{const{items:t,className:e,style:r,...l}=i,n=t.map((a,c)=>s.createElement("span",{key:c,className:"fibo-tag"},a.title));return s.createElement("div",{className:e,style:r,...l},...n)});class as extends b{constructor(e=[]){super();o(this,"_items",[]);this._items=e}items(e){return this._items=e,this}build(){const e=["fibo-tags","flex","gap-2","flex-wrap",...this._classNames].filter(Boolean).join(" "),r={items:this._items,className:e,style:this.getStyle(),...this._props};return s.createElement(ns,r)}}const cs=y(as),hs=s.memo(i=>{const{status:t,title:e,subtitle:r,className:l,style:n,...a}=i;return s.createElement("div",{className:l,style:n,...a},s.createElement("div",{className:"flex flex-col gap-1"},e&&s.createElement("h4",{className:"font-semibold text-sm uppercase tracking-wide opacity-90"},e),r&&s.createElement("p",{className:"opacity-80 text-sm"},r)))});class ds extends b{constructor(e=""){super();o(this,"_status","info");o(this,"_title","");o(this,"_subtitle");this._title=e}status(e){return this._status=e,this}title(e){return this._title=e,this}subtitle(e){return this._subtitle=e,this}build(){const r=["fibo-banner",`fibo-banner-${this._status}`,...this._classNames].filter(Boolean).join(" "),l={status:this._status,title:this._title,subtitle:this._subtitle,className:r,style:this.getStyle(),...this._props};return s.createElement(hs,l)}}const us=y(ds),ms=s.memo(i=>{const{image:t,title:e,price:r,likes:l,timeLeft:n,className:a,style:c,...h}=i;return M().classNames(["group","transition-all","duration-300","hover:-translate-y-1"]).style({width:"100%",borderRadius:"24px",border:"none",boxShadow:"0 10px 40px -10px rgba(0,0,0,0.05)",padding:"16px",background:"#fff",...c}).className(a).props(h).children([C().classNames(["relative","aspect-square","overflow-hidden","rounded-[20px]"]).children([C().classNames(["w-full","h-full","bg-gray-200","bg-cover","bg-center"]).style({backgroundImage:`url(${t})`}).build(),C().classNames(["absolute","top-3","right-3"]).children(H().variant("glass").shape("pill").icon(C().classNames(["text-gray-400","hover:text-red-500"]).children(A.Heart).build()).text(`${l}`).build()).build()]).build(),P().height(16).build(),L().justifyContent("between").alignItems("start").children([T().gap(4).children([S(e).fontWeight(700).fontSize(18).color("#111827").build(),H().variant("neutral").text("Not for sale x1").build()]).build(),C().classNames(["text-gray-300"]).children(A.More).build()]).build(),P().height(16).build(),L().justifyContent("between").alignItems("center").children([T().gap(4).children([S("Current Bid").fontSize(11).fontWeight(600).color("#6B7280").build(),L().gap(4).alignItems("center").children([C().classNames(["text-blue-500"]).children(A.Eth).build(),S(`${r} ETH`).fontSize(15).fontWeight(700).color("#111827").build()]).build()]).build(),q("Place a bid").variant("filled").shape("pill").shadow("soft").style({backgroundColor:"#111827",color:"#fff",padding:"10px 20px",fontSize:"13px",fontWeight:600}).build()]).build(),P().height(12).build(),n?H().variant("accent").shape("rounded").icon(C().children(A.Clock).build()).text(n).style({width:"100%"}).build():null]).build()});class ps extends b{constructor(){super(...arguments);o(this,"_image","");o(this,"_title","");o(this,"_price","");o(this,"_likes","");o(this,"_timeLeft")}image(e){return this._image=e,this}title(e){return this._title=e,this}price(e){return this._price=e,this}likes(e){return this._likes=e,this}timeLeft(e){return this._timeLeft=e,this}build(){const e={image:this._image,title:this._title,price:this._price,likes:this._likes,timeLeft:this._timeLeft,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(ms,e)}}const fs=y(ps),gs=s.memo(i=>{const{banner:t,avatar:e,name:r,handle:l,stats:n,className:a,style:c,...h}=i;return M().style({width:"100%",borderRadius:"24px",border:"none",boxShadow:"0 10px 40px -10px rgba(0,0,0,0.05)",padding:"0",overflow:"hidden",background:"#fff",...c}).className(a).props(h).children([C().style({height:"100px",backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center"}).build(),T().padding(20).alignItems("center").style({marginTop:"-50px"}).children([se().image(e).size(80).border("4px solid #fff").build(),P().height(12).build(),L().gap(6).alignItems("center").children([S(r).fontWeight(700).fontSize(18).color("#111827").build(),A.Verify]).build(),S(l).fontSize(13).color("#6B7280").style({marginTop:"4px"}).build(),P().height(16).build(),q("+ Follow").variant("filled").shape("pill").shadow("soft").style({backgroundColor:"#3B82F6",color:"#fff",padding:"8px 24px",fontSize:"13px",fontWeight:600}).build(),P().height(24).build(),L().classNames(["w-full","border-t","border-gray-100","pt-4"]).justifyContent("between").children([T().alignItems("center").gap(4).children([S(n.items).fontWeight(700).fontSize(14).build(),S("Items").fontSize(11).color("#9CA3AF").build()]).build(),T().alignItems("center").gap(4).children([S(n.owners).fontWeight(700).fontSize(14).build(),S("Owners").fontSize(11).color("#9CA3AF").build()]).build(),T().alignItems("center").gap(4).children([L().alignItems("center").gap(2).children([C().width(8).children(A.Eth).build(),S(n.floor).fontWeight(700).fontSize(14).build()]).build(),S("Floor").fontSize(11).color("#9CA3AF").build()]).build()]).build()]).build()]).build()});class bs extends b{constructor(){super(...arguments);o(this,"_banner","");o(this,"_avatar","");o(this,"_name","");o(this,"_handle","");o(this,"_stats",{items:"0",owners:"0",floor:"0"})}banner(e){return this._banner=e,this}avatar(e){return this._avatar=e,this}name(e){return this._name=e,this}handle(e){return this._handle=e,this}stats(e){return this._stats=e,this}build(){const e={banner:this._banner,avatar:this._avatar,name:this._name,handle:this._handle,stats:this._stats,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(gs,e)}}const ys=y(bs),xs=s.memo(i=>{const{image:t,title:e,author:r,items:l,className:n,style:a,...c}=i;return M().classNames(["group","cursor-pointer"]).style({width:"100%",borderRadius:"24px",height:"320px",position:"relative",overflow:"hidden",border:"none",...a}).className(n).props(c).children([C().classNames(["absolute","inset-0","bg-cover","bg-center","transition-transform","duration-500"]).style({backgroundImage:`url(${t})`}).build(),C().classNames(["absolute","inset-0","bg-gradient-to-t","from-black/80","via-black/20","to-transparent"]).build(),T().classNames(["absolute","bottom-0","left-0","p-6"]).gap(4).children([S(l).color("white").fontSize(12).classNames(["opacity-90","mb-1","uppercase","tracking-wider"]).fontWeight(600).build(),S(e).color("white").fontSize(22).fontWeight(700).build(),L().gap(6).alignItems("center").children([S("Created by").color("white").fontSize(13).classNames(["opacity-80"]).build(),S(r).color("white").fontSize(13).fontWeight(600).build(),A.Verify]).build()]).build()]).build()});class _s extends b{constructor(){super(...arguments);o(this,"_image","");o(this,"_title","");o(this,"_author","");o(this,"_items","")}image(e){return this._image=e,this}title(e){return this._title=e,this}author(e){return this._author=e,this}items(e){return this._items=e,this}build(){const e={image:this._image,title:this._title,author:this._author,items:this._items,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(xs,e)}}const ks=y(_s),vs=s.memo(i=>{const{image:t,title:e,description:r,date:l,source:n,className:a,style:c}=i;return M().className(`overflow-hidden hover:shadow-lg transition-shadow duration-300 ${a}`).style(c).children([t?re().src(t).className("w-full object-cover rounded-[20px] mb-4").style({height:"200px"}).build():null,C().className("flex flex-col gap-2").children([e?S(e).fontSize(18).fontWeight(700).color("#111827").lineHeight(1.25).build():null,r?S(r).fontSize(14).color("#4B5563").lineHeight(1.5).className("line-clamp-2").build():null,n||l?C().className("flex items-center gap-2 mt-2").children([S(`${n||""}${n&&l?" • ":""}${l||""}`).fontSize(11).fontWeight(600).color("#9CA3AF").textTransform("uppercase").letterSpacing("0.05em").build()]).build():null]).build()]).build()});class ws extends b{constructor(){super(...arguments);o(this,"_image");o(this,"_title");o(this,"_description");o(this,"_date");o(this,"_source")}image(e){return this._image=e,this}title(e){return this._title=e,this}description(e){return this._description=e,this}date(e){return this._date=e,this}source(e){return this._source=e,this}build(){const e={image:this._image,title:this._title,description:this._description,date:this._date,source:this._source,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(vs,e)}}const Ns=y(ws),Cs=s.memo(i=>{const{title:t,description:e,icon:r,footer:l,className:n,style:a}=i;return M().className(n).style(a).children([C().className("flex items-start gap-4").children([r?C().className("mt-1 text-gray-400").children(r).build():null,C().className("flex-1").children([t?S(t).fontSize(16).fontWeight(600).color("#111827").build():null,e?S(e).fontSize(14).color("#6B7280").className("mt-1").build():null,l?C().className("mt-4").children(l).build():null]).build()]).build()]).build()});class Ss extends b{constructor(){super(...arguments);o(this,"_title");o(this,"_description");o(this,"_icon");o(this,"_footer")}title(e){return this._title=e,this}description(e){return this._description=e,this}icon(e){return this._icon=e,this}footer(e){return this._footer=e,this}build(){const e={title:this._title,description:this._description,icon:this._icon,footer:this._footer,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Cs,e)}}const Es=s.memo(i=>{const{title:t,description:e,action:r,actionType:l,onAction:n,actionLabel:a,className:c,style:h}=i;let f=r;return f||(l==="button"?f=q(a||"Action").variant("soft").size("sm").onPress(n).build():l==="switch"&&(f=oe().onChange(n).build())),M().className(`flex items-center justify-between gap-4 ${c||""}`).style(h).children([C().className("flex-1").children([t?S(t).fontSize(16).fontWeight(600).color("#111827").build():null,e?S(e).fontSize(14).color("#6B7280").className("mt-1").build():null]).build(),f?C().className("flex-shrink-0").children(f).build():null]).build()});class Fs extends b{constructor(){super(...arguments);o(this,"_title");o(this,"_description");o(this,"_action");o(this,"_actionType");o(this,"_actionLabel");o(this,"_onAction")}title(e){return this._title=e,this}description(e){return this._description=e,this}action(e){return this._action=e,this}withButton(e,r){return this._actionType="button",this._actionLabel=e,this._onAction=r,this}withSwitch(e){return this._actionType="switch",this._onAction=e,this}build(){const e={title:this._title,description:this._description,action:this._action,actionType:this._actionType,actionLabel:this._actionLabel,onAction:this._onAction,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Es,e)}}const zs=y(Ss),Bs=y(Fs),$s=s.memo(i=>{const{title:t,description:e,placeholder:r,value:l,onChange:n,type:a,className:c,style:h}=i;return M().className(c).style(h).children([t?S(t).fontSize(14).fontWeight(600).color("#374151").className("mb-1").build():null,e?S(e).fontSize(12).color("#6B7280").className("mb-3").build():null,ie().placeholder(r).value(l).type(a).onChange(n).className("w-full").build()]).build()});class As extends b{constructor(){super(...arguments);o(this,"_title");o(this,"_description");o(this,"_placeholder");o(this,"_value");o(this,"_type","text");o(this,"_onChange")}title(e){return this._title=e,this}description(e){return this._description=e,this}placeholder(e){return this._placeholder=e,this}value(e){return this._value=e,this}type(e){return this._type=e,this}onChange(e){return this._onChange=e,this}build(){const e={title:this._title,description:this._description,placeholder:this._placeholder,value:this._value,type:this._type,onChange:this._onChange,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement($s,e)}}const Is=y(As),js=s.memo(i=>{const{title:t,value:e,trend:r,trendDirection:l,className:n,style:a}=i,c=l==="up"?"success":l==="down"?"error":"none",h=l==="up"?"↑":l==="down"?"↓":"•";return M().className(n).style(a).children([S(t).fontSize(14).fontWeight(600).color("#6B7280").build(),C().className("flex items-end justify-between mt-2").children([S(e).fontSize(32).fontWeight(800).color("#111827").build(),r?H().text(`${h} ${r}`).intent(c).variant("accent").build():null]).build()]).build()});class Ws extends b{constructor(){super(...arguments);o(this,"_title","");o(this,"_value","");o(this,"_trend");o(this,"_trendDirection","neutral")}title(e){return this._title=e,this}value(e){return this._value=e,this}trend(e,r="neutral"){return this._trend=e,this._trendDirection=r,this}build(){const e={title:this._title,value:this._value,trend:this._trend,trendDirection:this._trendDirection,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(js,e)}}const Ls=y(Ws);class Ms extends b{constructor(){super(...arguments);o(this,"_title","");o(this,"_content",null);o(this,"_defaultExpanded",!1);o(this,"_expanded");o(this,"_onToggle")}title(e){return this._title=e,this}content(e){return this._content=e,this}isOpen(e){return this._expanded=e,this}defaultOpen(e){return this._defaultExpanded=e,this}onToggle(e){return this._onToggle=e,this}build(){return s.createElement(Ts,{builder:this,...this._props})}}const Ts=s.memo(({builder:i})=>{const t=i,e=t._expanded!==void 0,[r,l]=s.useState(t._defaultExpanded),n=e?t._expanded:r,a=()=>{e||l(!n),t._onToggle&&t._onToggle(!n)};return C().classNames(["w-full","border","border-gray-200","rounded-xl","overflow-hidden","bg-white","transition-all","duration-300"]).className(t.getClassName()).style(t.getStyle()).children([L().justifyContent("between").alignItems("center").classNames(["p-4","cursor-pointer","hover:bg-gray-50","transition-colors","select-none"]).props({onClick:a}).children([typeof t._title=="string"?S(t._title).fontWeight(600).fontSize(15).color("#1F2937").build():t._title,C().classNames(["transition-transform","duration-300"]).style({transform:n?"rotate(180deg)":"rotate(0deg)"}).children(s.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400"},s.createElement("polyline",{points:"6 9 12 15 18 9"}))).build()]).build(),C().classNames(["transition-all","duration-300","ease-in-out","overflow-hidden"]).style({maxHeight:n?"500px":"0px",opacity:n?1:0}).children(C().classNames(["p-4","pt-0","text-gray-600","text-sm"]).children(t._content).build()).build()]).build()}),Ps=y(Ms),Ds=s.memo(i=>{const{children:t,variant:e="standard",columns:r=1,gap:l="md",className:n,style:a,...c}=i,h=p=>typeof p=="number"?"":{none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}[p]||"gap-4",f=p=>{if(typeof p=="number")return p+"px"},m=p=>{if(typeof p=="number")return`grid-cols-${p}`;let d=[];return p.sm&&d.push(`sm:grid-cols-${p.sm}`),p.md&&d.push(`md:grid-cols-${p.md}`),p.lg&&d.push(`lg:grid-cols-${p.lg}`),p.xl&&d.push(`xl:grid-cols-${p.xl}`),d.join(" ")||"grid-cols-1"};if(e==="masonry"){const p=d=>{if(typeof d=="number")return`columns-${d}`;let g=[];return d.sm&&g.push(`sm:columns-${d.sm}`),d.md&&g.push(`md:columns-${d.md}`),d.lg&&g.push(`lg:columns-${d.lg}`),d.xl&&g.push(`xl:columns-${d.xl}`),g.join(" ")||"columns-1"};return s.createElement("div",{className:`${p(r)} ${h(l)} space-y-4 ${n}`,style:{columnGap:f(l),...a},...c},s.Children.map(t,d=>s.createElement("div",{className:"break-inside-avoid mb-4"},d)))}return s.createElement("div",{className:`grid ${m(r)} ${h(l)} ${n}`,style:{gap:f(l),...a},...c},t)}),Os=s.memo(i=>{const{children:t,colSpan:e,rowSpan:r,className:l,style:n,...a}=i,c=()=>{let h=[];return e&&h.push(`col-span-${e}`),r&&h.push(`row-span-${r}`),h.join(" ")};return s.createElement("div",{className:`${c()} ${l}`,style:n,...a},t)});class Hs extends b{constructor(){super(...arguments);o(this,"_variant","standard");o(this,"_columns",1);o(this,"_gap","md");o(this,"_children",[])}variant(e){return this._variant=e,this}columns(e){return this._columns=e,this}gap(e){return this._gap=e,this}children(e){return this._children=e,this}build(){const e={variant:this._variant,columns:this._columns,gap:this._gap,children:this._children,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Ds,e)}}class Vs extends b{constructor(){super(...arguments);o(this,"_colSpan");o(this,"_rowSpan");o(this,"_children",[])}colSpan(e){return this._colSpan=e,this}rowSpan(e){return this._rowSpan=e,this}children(e){return this._children=e,this}build(){const e={colSpan:this._colSpan,rowSpan:this._rowSpan,children:this._children,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Os,e)}}const qs=y(Hs),Gs=y(Vs),Xs=Object.freeze(Object.defineProperty({__proto__:null,createRipple:(i,t="rgba(255, 255, 255, 0.3)")=>{const e=i.currentTarget,r=document.createElement("span"),l=Math.max(e.clientWidth,e.clientHeight),n=l/2,a=e.getBoundingClientRect();r.style.width=r.style.height=`${l}px`,r.style.left=`${i.clientX-a.left-n}px`,r.style.top=`${i.clientY-a.top-n}px`,r.style.position="absolute",r.style.borderRadius="50%",r.style.transform="scale(0)",r.style.animation="fibo-ripple 600ms linear",r.style.backgroundColor=t,r.style.pointerEvents="none",(e.querySelector(".fibo-ripple-container")||e).appendChild(r),setTimeout(()=>{r.remove()},600)}},Symbol.toStringTag,{value:"Module"}));u.ActionCard=Bs,u.Alert=Et,u.AssetCard=fs,u.Avatar=se,u.Badge=H,u.Banner=us,u.Box=C,u.Button=q,u.Card=M,u.Center=Ge,u.Checkbox=Dt,u.Collapse=Ps,u.CollectionCard=ks,u.Column=T,u.Combobox=Zt,u.Container=Te,u.ContentCard=Ns,u.DashboardLayout=st,u.FiboBuilder=b,u.FiboThemeProvider=We,u.Grid=qs,u.GridItem=Gs,u.Header=Ke,u.Image=re,u.InfoCard=zs,u.InputCard=Is,u.Label=gt,u.Line=Ve,u.List=rs,u.MetricCard=Ls,u.ObserverWrapper=Ae,u.ProfileCard=ys,u.Progress=Bt,u.ProviderContext=Y,u.ProviderWrapper=K,u.RadioGroup=Vt,u.Row=L,u.Scaffold=ot,u.ScrollView=Ye,u.Select=Jt,u.Sidebar=Re,u.SignalWrapper=Ie,u.Skeleton=Nt,u.Spacer=P,u.Spinner=kt,u.StateContext=X,u.StateWrapper=$e,u.Switch=oe,u.Table=ls,u.Tags=cs,u.Text=S,u.TextField=ie,u.Textarea=Xt,u.applyResponsiveStyles=ge,u.clearProviders=ze,u.computed=ke,u.createBuilder=y,u.createStore=Se,u.cupertinoTheme=Z,u.effect=ve,u.getProvider=Fe,u.materialTheme=Q,u.mergeStyles=fe,u.normalizeValue=be,u.observable=Ne,u.processChildren=pe,u.registerProvider=Ee,u.signal=_e,u.useFiboTheme=Le,u.useProvider=je,u.useStateContext=Be,u.webTheme=R,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
251
|
+
`},t),s.createElement("main",{className:"flex flex-col min-w-0 h-full overflow-hidden relative"},e&&s.createElement("div",{className:"flex-shrink-0"},e),s.createElement("div",{className:"flex-1 overflow-y-auto scrollbar-hide p-4 lg:p-0"},r))))});class rt extends _{constructor(){super(...arguments);n(this,"_sidebar");n(this,"_header")}sidebar(e){return this._sidebar=e,this}header(e){return this._header=e,this}build(){const e={sidebar:this._sidebar,header:this._header,className:this.getClassName(),style:this.getStyle(),children:this.processChildren(),...this._props};return s.createElement(st,e)}}const it=x(rt),nt=s.memo(i=>{const{theme:t,locale:e,providers:r={},className:o,style:l,children:a}=i,c=new Map;return t&&c.set("theme",t),e&&c.set("locale",e),Object.entries(r).forEach(([d,f])=>{c.set(d,f)}),c.size>0?s.createElement(te,{providers:c,children:s.createElement("div",{className:`fibo-scaffold ${o||""}`,style:{minHeight:"100vh",display:"flex",flexDirection:"column",...l}},a)}):s.createElement("div",{className:`fibo-scaffold ${o||""}`,style:{minHeight:"100vh",display:"flex",flexDirection:"column",...l}},a)});class ot extends _{constructor(){super(...arguments);n(this,"_theme");n(this,"_locale");n(this,"_customProviders",{})}theme(e){return this._theme=e,this}locale(e){return this._locale=e,this}providers(e){return this._customProviders={...this._customProviders,...e},this}provider(e,r){return this._customProviders[e]=r,this}build(){const e={theme:this._theme,locale:this._locale,providers:this._customProviders,className:this.getClassName(),style:this.getStyle(),children:this.processChildren()};return s.createElement(nt,e)}}const lt=x(ot),at=s.memo(i=>{const{className:t,style:e,children:r,...o}=i;return s.createElement("div",{className:t,style:e,...o},...r)});class ct extends _{build(){const e=["fibo-box",...this._classNames].filter(Boolean).join(" "),r=this.getStyle(),o=this.processChildren(),l={className:e,style:r,children:o,...this._props};return s.createElement(at,l)}}const C=x(ct),ht=s.memo(i=>{const{image:t,size:e,border:r,shape:o,status:l,className:a,style:c}=i,d=typeof e=="number"?`${e}px`:e,f={circle:"50%",rounded:"24%",square:"0"},m={none:"transparent",online:"#10B981",offline:"#9CA3AF",busy:"#EF4444"};return C().className(a).style({position:"relative",width:d,height:d,borderRadius:f[o],backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",border:r,boxShadow:r!=="none"?"0 2px 8px rgba(0,0,0,0.05)":"none",...c}).children(l!=="none"?C().style({position:"absolute",bottom:"-2%",right:"-2%",width:"28%",height:"28%",minWidth:"10px",minHeight:"10px",backgroundColor:m[l],borderRadius:"50%",border:"3px solid #ffffff",boxSizing:"content-box"}).build():null).build()});class dt extends _{constructor(){super(...arguments);n(this,"_image","");n(this,"_size",40);n(this,"_border","none");n(this,"_shape","circle");n(this,"_status","none")}image(e){return this._image=e,this}size(e){return this._size=e,this}border(e){return this._border=e,this}shape(e){return this._shape=e,this}status(e){return this._status=e,this}build(){const e={image:this._image,size:this._size,border:this._border,shape:this._shape,status:this._status,className:this.getClassName(),style:this.getStyle()};return s.createElement(ht,e)}}const ce=x(dt),ut=s.memo(i=>{const{text:t,type:e,className:r,style:o,...l}=i,a={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",body:"p",caption:"span",label:"label"};return s.createElement(a[e],{className:`fibo-text fibo-text-${e} ${r}`,style:o,...l},t)});class mt extends _{constructor(e=""){super();n(this,"_text","");n(this,"_type","body");this._text=e}text(e){return this._text=e,this}type(e){return this._type=e,this}variant(e){return this._type=e,this}build(){const e={text:this._text,type:this._type,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(ut,e)}}const E=x(mt),pt=s.memo(i=>{const{text:t,icon:e,variant:r,intent:o,shape:l,className:a,style:c}=i,d={none:{bg:"#F9FAFB",text:"#6B7280",border:"#E5E7EB"},success:{bg:"#ECFDF5",text:"#059669",border:"transparent"},warning:{bg:"#FFFBEB",text:"#D97706",border:"transparent"},error:{bg:"#FFF1F2",text:"#E11D48",border:"transparent"},info:{bg:"#EFF6FF",text:"#2563EB",border:"transparent"}};let m={...{neutral:{backgroundColor:"#F9FAFB",color:"#6B7280",border:"1px solid #E5E7EB"},accent:{backgroundColor:"#EFF6FF",color:"#3B82F6",border:"none"},outline:{backgroundColor:"transparent",color:"#FFFFFF",border:"1px solid rgba(255,255,255,0.3)"},glass:{backgroundColor:"rgba(255, 255, 255, 0.85)",backdropFilter:"blur(12px)",color:"#111827",border:"1px solid rgba(255, 255, 255, 0.4)"},solid:{backgroundColor:"#111827",color:"#FFFFFF",border:"none"},dot:{backgroundColor:"transparent",color:"#6B7280",border:"1px solid #E5E7EB",padding:"4px 10px"}}[r]};if(o!=="none"){const h=d[o];if(r==="solid"){const b={none:"#111827",success:"#059669",warning:"#D97706",error:"#E11D48",info:"#2563EB"};m.backgroundColor=b[o],m.color="#FFFFFF"}else r==="dot"?(m.color="#374151",m.borderColor="#E5E7EB"):(m.backgroundColor=h.bg,m.color=h.text,h.border?m.border=`1px solid ${h.border}`:m.border="none")}const p={pill:"9999px",rounded:"8px"};return C().className(a).style({...m,borderRadius:p[l],padding:r==="dot"?"4px 8px":"4px 10px",display:"inline-flex",alignItems:"center",justifyContent:"center",height:"fit-content",fontSize:"11px",lineHeight:"1",fontWeight:600,...c}).children(T().gap(6).alignItems("center").children([r==="dot"&&o!=="none"?C().style({width:"6px",height:"6px",borderRadius:"50%",backgroundColor:d[o].text,boxShadow:`0 0 6px ${d[o].text}66`}).build():null,e?C().classNames(["flex","items-center"]).children(e).build():null,E(t).fontSize(12).fontWeight(600).style({color:"inherit"}).build()]).build()).build()});class ft extends _{constructor(){super(...arguments);n(this,"_text","");n(this,"_icon");n(this,"_variant","neutral");n(this,"_intent","none");n(this,"_shape","rounded")}text(e){return this._text=e,this}icon(e){return this._icon=e,this}variant(e){return this._variant=e,this}intent(e){return this._intent=e,this}shape(e){return this._shape=e,this}build(){const e={text:this._text,icon:this._icon,variant:this._variant,intent:this._intent,shape:this._shape,className:this.getClassName(),style:this.getStyle()};return s.createElement(pt,e)}}const V=x(ft),gt=s.memo(i=>{const{text:t,htmlFor:e,required:r,className:o,style:l,...a}=i;return s.createElement("label",{className:`fibo-label text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${o}`,htmlFor:e,style:l,...a},t,r&&s.createElement("span",{className:"text-red-500 ml-0.5"},"*"))});class bt extends _{constructor(e=""){super();n(this,"_text","");n(this,"_htmlFor");n(this,"_required",!1);this._text=e}text(e){return this._text=e,this}htmlFor(e){return this._htmlFor=e,this}required(e=!0){return this._required=e,this}build(){const e={text:this._text,htmlFor:this._htmlFor,required:this._required,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(gt,e)}}const yt=x(bt),_t=s.memo(i=>{const{src:t,alt:e,fit:r,resizable:o,clipShape:l,frameWidth:a,frameHeight:c,className:d,style:f,...m}=i,p={...f};return p.objectFit=r,a&&(p.width=`${a}px`),c&&(p.height=`${c}px`),o&&(p.maxWidth="100%",p.height="auto"),s.createElement("img",{src:t,alt:e,className:d,style:p,...m})});class xt extends _{constructor(e=""){super();n(this,"_src","");n(this,"_alt","");n(this,"_fit","cover");n(this,"_resizable",!1);n(this,"_clipShape");n(this,"_frameWidth");n(this,"_frameHeight");this._src=e}src(e){return this._src=e,this}alt(e){return this._alt=e,this}resizable(){return this._resizable=!0,this}scaledToFit(){return this._fit="contain",this}scaledToFill(){return this._fit="cover",this}frame(e){return this._frameWidth=e.width,this._frameHeight=e.height,this}clipShape(e){return this._clipShape=e,this}foregroundStyle(e){return this}build(){const e=["fibo-image",...this._classNames];this._clipShape==="circle"?e.push("rounded-full"):this._clipShape==="rounded"&&e.push("rounded-lg");const r=e.filter(Boolean).join(" "),o={src:this._src,alt:this._alt,fit:this._fit,resizable:this._resizable,clipShape:this._clipShape,frameWidth:this._frameWidth,frameHeight:this._frameHeight,className:r,style:this.getStyle(),...this._props};return s.createElement(_t,o)}}const he=x(xt),kt=s.memo(i=>{const{size:t,color:e,variant:r="circle",className:o,style:l,...a}=i,d=typeof t=="number"?t:{sm:16,md:24,lg:32,xl:48}[t]||24,f=e||"currentColor",m={className:`fibo-spinner ${o}`,style:{width:d,height:d,...l},...a};return r==="dots"?s.createElement("div",{...m,className:`${m.className} flex items-center justify-between`},[0,1,2].map(p=>s.createElement("div",{key:p,className:"w-[25%] h-[25%] rounded-full animate-bounce",style:{backgroundColor:f,animationDelay:`${p*.1}s`}}))):r==="pulse"?s.createElement("div",{...m,className:`${m.className} relative flex items-center justify-center`},[s.createElement("div",{key:"ring",className:"absolute inset-0 rounded-full opacity-75 animate-ping",style:{backgroundColor:f}}),s.createElement("div",{key:"dot",className:"relative rounded-full h-[75%] w-[75%]",style:{backgroundColor:f}})]):r==="blocks"?s.createElement("div",{...m,className:`${m.className} grid grid-cols-2 gap-[10%] p-[10%]`},[0,1,2,3].map(p=>s.createElement("div",{key:p,className:"w-full h-full bg-current animate-pulse",style:{backgroundColor:f,animationDelay:`${p*.15}s`,opacity:.6}}))):s.createElement("div",{...m,className:`${m.className} animate-spin`},s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",style:{width:"100%",height:"100%"}},s.createElement("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:f,strokeWidth:"4"}),s.createElement("path",{className:"",fill:f,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"})))});class vt extends _{constructor(){super(...arguments);n(this,"_size","md");n(this,"_color");n(this,"_variant","circle")}size(e){return this._size=e,this}color(e){return this._color=e,this}variant(e){return this._variant=e,this}build(){const e={size:this._size,color:this._color,variant:this._variant,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(kt,e)}}const wt=x(vt),Nt=s.memo(i=>{const{width:t,height:e,shape:r,className:o,style:l,...a}=i,c=["animate-pulse","bg-gray-200","loading-skeleton"];return r==="circle"?c.push("rounded-full"):r==="rounded-sm"?c.push("rounded-sm"):r==="rounded-md"?c.push("rounded-md"):r==="rounded-lg"?c.push("rounded-lg"):r==="square"?c.push("rounded-none"):c.push("rounded"),s.createElement("div",{className:[...c,o].filter(Boolean).join(" "),style:{width:t,height:e,...l},...a})});class Ct extends _{constructor(){super(...arguments);n(this,"_width","100%");n(this,"_height","20px");n(this,"_shape","rounded")}width(e){return this._width=e,this}height(e){return this._height=e,this}shape(e){return this._shape=e,this}build(){const e={width:this._width,height:this._height,shape:this._shape,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Nt,e)}}const St=x(Ct),j={Heart:k.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:k.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),Eth:k.jsx("svg",{width:"14",height:"24",viewBox:"0 0 32 32",fill:"currentColor",children:k.jsx("path",{d:"M15.925 23.96l-9.815-5.8 9.815 13.84 9.825-13.84-9.825 5.8zm0-23.96l-9.815 16.275 9.815 5.675 9.825-5.675-9.825-16.275zm0 20.3l-8.915-5.265 8.915-12.42 8.925 12.42-8.925 5.265z"})}),Verify:k.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"#3B82F6",stroke:"none",children:k.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),More:k.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[k.jsx("circle",{cx:"12",cy:"12",r:"1"}),k.jsx("circle",{cx:"19",cy:"12",r:"1"}),k.jsx("circle",{cx:"5",cy:"12",r:"1"})]}),Clock:k.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[k.jsx("circle",{cx:"12",cy:"12",r:"10"}),k.jsx("polyline",{points:"12 6 12 12 16 14"})]}),Info:k.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[k.jsx("circle",{cx:"12",cy:"12",r:"10"}),k.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),k.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),Check:k.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[k.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),k.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),Search:k.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[k.jsx("circle",{cx:"11",cy:"11",r:"8"}),k.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),Close:k.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[k.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),k.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})},Et=s.memo(i=>{const{title:t,description:e,intent:r="info",className:o,style:l,...a}=i,c=r,d={info:"bg-blue-500 text-white",success:"bg-emerald-500 text-white",warning:"bg-orange-400 text-white",error:"bg-rose-500 text-white"},f={info:"bg-blue-600",success:"bg-emerald-600",warning:"bg-orange-500",error:"bg-rose-600"},m={info:j.Info||s.createElement("span",{},"?"),success:j.Check||s.createElement("span",{},"✔"),warning:j.Search||s.createElement("span",{},"!"),error:j.Close||s.createElement("span",{},"x")},p=`relative overflow-hidden flex items-start gap-4 p-5 rounded-3xl shadow-lg border-none ${d[c]}`;return s.createElement("div",{className:`${p} ${o}`,style:l,...a},[s.createElement("div",{key:"blob1",className:"absolute -top-6 -right-6 w-24 h-24 rounded-full bg-white opacity-10 pointer-events-none"}),s.createElement("div",{key:"blob2",className:"absolute bottom-[-10px] left-10 w-12 h-12 rounded-full bg-black opacity-5 pointer-events-none"}),s.createElement("div",{key:"blob3",className:"absolute top-10 right-20 w-8 h-8 rounded-full bg-white opacity-10 pointer-events-none"}),s.createElement("div",{key:"icon-wrapper",className:`relative z-10 shrink-0 w-10 h-10 rounded-full flex items-center justify-center shadow-sm ${f[c]}`},s.cloneElement(m[c],{width:20,height:20,strokeWidth:3})),s.createElement("div",{key:"content",className:"relative z-10 flex flex-col gap-1.5 pt-0.5"},[t&&s.createElement("h5",{key:"title",className:"font-bold text-lg leading-none tracking-tight"},t),e&&s.createElement("p",{key:"desc",className:"text-sm font-medium opacity-90 leading-relaxed"},e)])])});class Ft extends _{constructor(){super(...arguments);n(this,"_title","");n(this,"_description");n(this,"_intent","info")}title(e){return this._title=e,this}description(e){return this._description=e,this}intent(e){return this._intent=e,this}build(){const e={title:this._title,description:this._description,intent:this._intent,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Et,e)}}const zt=x(Ft),Bt=s.memo(i=>{const{value:t,max:e,color:r,height:o,variant:l="default",label:a,subLabel:c,items:d=[],className:f,style:m,...p}=i,h=Math.min(100,Math.max(0,t/e*100)),b=r||"#3B82F6";if(l==="circular"){const w=typeof o=="number"?o:64,F=8,y=(w-F)/2,g=y*2*Math.PI,z=g-h/100*g;return s.createElement("div",{className:`relative inline-flex items-center justify-center ${f}`,style:{width:w,height:w,...m},...p},[s.createElement("svg",{key:"svg",className:"transform -rotate-90",width:w,height:w},[s.createElement("circle",{key:"track",className:"text-gray-100",stroke:"currentColor",strokeWidth:F,fill:"transparent",r:y,cx:w/2,cy:w/2}),s.createElement("circle",{key:"prog",stroke:b,strokeWidth:F,strokeDasharray:g,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",r:y,cx:w/2,cy:w/2,className:"transition-all duration-1000 ease-out"})]),s.createElement("span",{key:"label",className:"absolute text-sm font-bold text-gray-700"},a||`${Math.round(h)}%`)])}if(l==="pagination"){const F=Math.floor(h/100*5);return s.createElement("div",{className:`flex items-center gap-2 ${f}`,style:m,...p},Array.from({length:5}).map((y,g)=>{const z=g===F;return s.createElement("div",{key:g,className:`h-3 rounded-full transition-all duration-300 ${z?"w-8":"w-3"}`,style:{backgroundColor:g<=F?b:"#E5E7EB"}})}))}if(l==="timeline"){const w=d.length?d:[{title:"Order components",date:"Done"},{title:"Draft implementation",date:"In Progress"},{title:"Verify functionality",date:"Pending"}],F=Math.floor(h/100*w.length);return s.createElement("div",{className:`flex flex-col relative ${f}`,style:m,...p},w.map((y,g)=>{const z=g<F,W=g===F,L=g===w.length-1,v=z||W?b:"#E5E7EB",B=z?s.createElement("span",{},"✓"):g+1;return s.createElement("div",{key:g,className:"relative flex items-start gap-4 pb-8 last:pb-0"},[!L&&s.createElement("div",{key:"tail",className:"absolute left-[19px] top-10 bottom-0 w-0.5 transition-colors duration-500",style:{backgroundColor:z?b:"#E5E7EB"}}),s.createElement("div",{key:"dot",className:"relative z-10 w-10 h-10 rounded-full flex items-center justify-center border-2 bg-white transition-all duration-300 shrink-0 text-sm font-bold shadow-sm",style:{borderColor:v,color:z?"#fff":W?v:"#9CA3AF",backgroundColor:z?v:"#fff"}},B),s.createElement("div",{key:"content",className:"pt-2"},[s.createElement("div",{className:"text-sm font-bold text-gray-900 leading-none"},y.title),y.description&&s.createElement("div",{className:"text-xs text-gray-500 mt-1.5"},y.description),y.date&&s.createElement("div",{className:"text-xs font-mono text-gray-400 mt-1"},y.date)])])}))}if(l==="floating")return s.createElement("div",{className:`w-full bg-white rounded-xl shadow-sm border border-gray-100 p-4 relative overflow-hidden ${f}`,style:m,...p},[s.createElement("div",{key:"info",className:"flex justify-between items-center mb-3 px-1"},[s.createElement("span",{key:"l",className:"text-sm font-semibold text-gray-700"},a?s.createElement("span",{className:"text-blue-600 mr-2"},`${Math.round(h)}%`):null,a||"Update in progress..."),c&&s.createElement("span",{key:"r",className:"text-xs font-medium text-gray-400"},c)]),s.createElement("div",{key:"track",className:"w-full bg-blue-50 h-1.5 rounded-full overflow-hidden"},s.createElement("div",{className:"h-full rounded-full transition-all duration-1000 ease-out",style:{width:`${h}%`,backgroundColor:b}}))]);if(l==="chevron"){const F=Math.floor(h/100*3);return s.createElement("div",{className:`flex w-full rounded-lg overflow-hidden ${f}`,style:m,...p},Array.from({length:3}).map((y,g)=>{const z=g<=F;return s.createElement("div",{key:g,className:"flex-1 h-10 flex items-center justify-center text-sm font-bold text-white transition-colors duration-300",style:{backgroundColor:z?g===F?b:"#60A5FA":"#E5E7EB",clipPath:g===0?"polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%)":g===2?"polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 15% 50%)":"polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%, 15% 50%)",marginLeft:g===0?0:"-10px",paddingLeft:g===0?0:"10px",zIndex:3-g}},`Step ${g+1}`)}))}if(l==="steps"){const F=Math.ceil(h/100*3);return s.createElement("div",{className:`w-full flex items-center justify-between relative ${f}`,style:{marginTop:"1rem",...m},...p},[s.createElement("div",{key:"line-bg",className:"absolute top-1/2 left-0 w-full h-1.5 bg-gray-200 z-0 transform -translate-y-1/2 rounded-full"}),s.createElement("div",{key:"line-active",className:"absolute top-1/2 left-0 h-1.5 z-0 transform -translate-y-1/2 transition-all duration-500 rounded-full",style:{width:`${h}%`,backgroundColor:b}}),...Array.from({length:3}).map((y,g)=>{const z=g+1,W=z<=F,L=z<F;return s.createElement("div",{key:g,className:`relative z-10 w-10 h-10 rounded-full flex items-center justify-center text-sm font-bold transition-all duration-300 border-4 ${W?"text-white border-white shadow-md":"bg-gray-100 text-gray-400 border-gray-50"}`,style:{backgroundColor:W?b:void 0}},L?s.createElement("span",{},"✔"):z)})])}const S=o||12;if(l==="segments"){const F=Math.round(h/100*10);return s.createElement("div",{className:`flex gap-1.5 w-full ${f}`,style:m,...p},Array.from({length:10}).map((y,g)=>s.createElement("div",{key:g,className:"h-3 flex-1 rounded-sm transition-all duration-300 first:rounded-l-full last:rounded-r-full",style:{height:o||12,backgroundColor:g<F?b:"#E5E7EB"}})))}let N=null;l==="striped"&&(N=s.createElement("div",{className:"w-full h-full opacity-30 animate-[stripes_1s_linear_infinite]",style:{backgroundImage:"linear-gradient(45deg,rgba(255,255,255,.25) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.25) 50%,rgba(255,255,255,.25) 75%,transparent 75%,transparent)",backgroundSize:"20px 20px"}}));const $=l==="labeled"?s.createElement("div",{className:"absolute -top-12 transform -translate-x-1/2 bg-slate-800 text-white text-xs font-bold py-1.5 px-3 rounded-lg shadow-xl whitespace-nowrap",style:{left:`${h}%`}},[a||`${Math.round(h)}%`,s.createElement("div",{key:"arrow",className:"absolute -bottom-1 left-1/2 transform -translate-x-1/2 w-2 h-2 bg-slate-800 rotate-45"})]):null,I=l==="knob"?s.createElement("div",{className:"absolute top-1/2 right-0 w-7 h-7 bg-white rounded-full shadow-lg border-4 transform translate-x-1/2 -translate-y-1/2 flex items-center justify-center",style:{borderColor:b}},s.createElement("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:b}})):null;return s.createElement("div",{className:`relative w-full ${l==="labeled"?"mt-8":""}`,...p},[$,s.createElement("div",{key:"track",className:`w-full bg-slate-100 rounded-full ${f}`,style:{width:"100%",height:S,...m}},s.createElement("div",{className:"h-full transition-all duration-1000 ease-out rounded-full flex items-center justify-center relative",style:{width:`${h}%`,backgroundColor:b}},[N,I]))])});class At extends _{constructor(){super(...arguments);n(this,"_value",0);n(this,"_max",100);n(this,"_color");n(this,"_height");n(this,"_variant","default");n(this,"_label");n(this,"_subLabel");n(this,"_items")}value(e){return this._value=e,this}max(e){return this._max=e,this}color(e){return this._color=e,this}height(e){return this._height=e,this}variant(e){return this._variant=e,this}label(e){return this._label=e,this}subLabel(e){return this._subLabel=e,this}items(e){return this._items=e,this}build(){const e={value:this._value,max:this._max,color:this._color,height:this._height,variant:this._variant,label:this._label,subLabel:this._subLabel,items:this._items,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Bt,e)}}const $t=x(At),It=s.memo(i=>{const{text:t,variant:e,size:r,onPress:o,disabled:l,icon:a,shape:c,shadow:d,className:f,style:m,...p}=i,h={...m};Object.assign(h,{sm:{padding:"6px 14px",fontSize:"13px",gap:"6px",height:"32px"},md:{padding:"10px 22px",fontSize:"15px",gap:"8px",height:"44px"},lg:{padding:"16px 32px",fontSize:"17px",gap:"10px",height:"56px"}}[r]),c==="pill"?h.borderRadius="9999px":c==="square"?h.borderRadius="12px":h.borderRadius="14px",d==="soft"&&(h.boxShadow="0 8px 20px -6px rgba(59, 130, 246, 0.4)"),e==="ghost"?(h.backgroundColor="transparent",h.color="#4B5563",h.boxShadow="none",h.border="1px solid transparent"):e==="text"?(h.backgroundColor="transparent",h.color="#4B5563",h.boxShadow="none",h.border="none",h.paddingLeft="8px",h.paddingRight="8px"):e==="soft"?(h.backgroundColor="#EEF2FF",h.color="#4F46E5",h.boxShadow="none",h.border="none"):e==="outline"&&(h.backgroundColor="transparent",h.border="1.5px solid #E5E7EB",h.color="#374151",h.boxShadow="none");const S=[];return a&&S.push(a),t&&S.push(t),s.createElement("button",{className:f,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:l?"not-allowed":"pointer",opacity:l?.6:1,fontWeight:600,whiteSpace:"nowrap",...h},onClick:N=>{if(!l){if(document.documentElement.classList.contains("fibo-theme-material")){const $=N.currentTarget;Promise.resolve().then(()=>Ys).then(({createRipple:I})=>{I(N,$)})}o==null||o()}},disabled:l,...p},...S)});class jt extends _{constructor(e=""){super();n(this,"_text","");n(this,"_variant","elevated");n(this,"_size","md");n(this,"_onPress");n(this,"_disabled",!1);n(this,"_icon");n(this,"_shape","default");n(this,"_shadow","none");this._text=e}text(e){return this._text=e,this}variant(e){return this._variant=e,this}size(e){return this._size=e,this}onPress(e){return this._onPress=e,this}disabled(e=!0){return this._disabled=e,this}icon(e){return this._icon=e,this}shape(e){return this._shape=e,this}shadow(e){return this._shadow=e,this}build(){const e=["fibo-button",`fibo-button-${this._variant}`,"active:scale-[0.96]","transform","transition-all","duration-200","ease-out",...this._classNames].filter(Boolean).join(" "),r={text:this._text,variant:this._variant,size:this._size,onPress:this._onPress,disabled:this._disabled,icon:this._icon,shape:this._shape,shadow:this._shadow,className:e,style:this.getStyle(),...this._props};return s.createElement(It,r)}}const G=x(jt),Wt=(i,t)=>{let e=0;const r=i.replace(/\D/g,"").split("");let o="";for(let l=0;l<t.length&&!(e>=r.length);l++)t[l]==="9"?o+=r[e++]:o+=t[l];return o},Lt=s.memo(i=>{const t=s.useId(),e=i.id||t,[r,o]=s.useState(!1),{containerClass:l,containerStyle:a,label:c,error:d,mask:f,type:m,value:p,onChange:h,...b}=i,S=p instanceof X,[N,$]=s.useState(S?p.value:p);s.useEffect(()=>{if(S)return p.subscribe(g=>{$(g)});$(p)},[p,S]);const I=m==="password",w=I&&r?"text":m,F=y=>{let g=y.target.value;if(f){g=Wt(g,f);const z={...y,target:{...y.target,value:g}};S&&(p.value=g),h==null||h(z)}else S&&(p.value=g),h==null||h(y)};return s.createElement("div",{className:l,style:a},s.createElement("div",{className:"relative w-full"},[s.createElement("input",{key:"input",id:e,className:"fibo-textfield-input",type:w,onChange:F,value:N,...b}),c&&s.createElement("label",{key:"label",htmlFor:e,className:"fibo-textfield-label"},c),I&&s.createElement("button",{key:"toggle",type:"button",className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600 focus:outline-none",onClick:()=>o(!r),tabIndex:-1},r?s.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},s.createElement("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),s.createElement("line",{x1:1,y1:1,x2:23,y2:23})):s.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},s.createElement("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),s.createElement("circle",{cx:12,cy:12,r:3})))]),d&&s.createElement("span",{className:"text-[var(--fibo-error)] text-xs mt-1 ml-1"},d))});class Tt extends _{constructor(e=""){super();n(this,"_value","");n(this,"_label","");n(this,"_placeholder","");n(this,"_type","text");n(this,"_disabled",!1);n(this,"_error");n(this,"_mask");n(this,"_onChange");this._value=e}value(e){return this._value=e,this}label(e){return this._label=e,this}placeholder(e){return this._placeholder=e,this}type(e){return this._type=e,this}mask(e){return this._mask=e,this}disabled(e=!0){return this._disabled=e,this}error(e){return this._error=e,this}onChange(e){return this._onChange=e,this}build(){const r={containerClass:["fibo-textfield-container",...this._classNames].filter(Boolean).join(" "),containerStyle:this.getStyle(),label:this._label,error:this._error,value:this._value,placeholder:this._placeholder||" ",type:this._type,mask:this._mask,disabled:this._disabled,onChange:o=>{var l;(l=this._onChange)==null||l.call(this,o.target.value)},...this._props};return s.createElement(Lt,r)}}const de=x(Tt),Mt=s.memo(i=>{const{checked:t,onChange:e,label:r,disabled:o,className:l,style:a}=i,c={width:"44px",height:"24px",borderRadius:"9999px",position:"relative",transition:"background-color 0.2s ease-in-out",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,backgroundColor:t?"var(--fibo-primary, #3B82F6)":"#E5E7EB",...a},d={width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"white",position:"absolute",top:"2px",left:"2px",transition:"transform 0.2s ease-in-out",transform:t?"translateX(20px)":"translateX(0)",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"};return s.createElement("label",{className:`fibo-switch flex items-center gap-3 ${l}`},s.createElement("div",{className:"fibo-switch-track",style:c,onClick:f=>{f.preventDefault(),!o&&e&&e(!t)}},s.createElement("div",{style:d})),r&&s.createElement("span",{className:"text-sm font-medium text-gray-700 select-none"},r),s.createElement("input",{type:"checkbox",checked:t,disabled:o,className:"sr-only",onChange:f=>!o&&(e==null?void 0:e(f.target.checked))}))});class Pt extends _{constructor(){super(...arguments);n(this,"_checked",!1);n(this,"_onChange");n(this,"_label");n(this,"_disabled",!1)}checked(e){return this._checked=e,this}onChange(e){return this._onChange=e,this}label(e){return this._label=e,this}disabled(e=!0){return this._disabled=e,this}build(){const e={checked:this._checked,onChange:this._onChange,label:this._label,disabled:this._disabled,className:this.getClassName(),style:this.getStyle()};return s.createElement(Mt,e)}}const ue=x(Pt),Ot=s.memo(i=>{const{checked:t,onChange:e,label:r,disabled:o,indeterminate:l,className:a,style:c}=i,d=t||l,f={width:"20px",height:"20px",borderRadius:"6px",border:d?"none":"2px solid #D1D5DB",backgroundColor:d?"var(--fibo-primary, #3B82F6)":"transparent",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,...c};let m=null;return l?m=s.createElement("div",{style:{width:"10px",height:"2px",backgroundColor:"white",borderRadius:"1px"}}):t&&(m=s.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.createElement("path",{d:"M10 3L4.5 8.5L2 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),s.createElement("label",{className:`fibo-checkbox flex items-center gap-2 ${a}`},s.createElement("div",{className:"fibo-checkbox-box",style:f,onClick:p=>{p.preventDefault(),!o&&e&&e(!t)}},m),r&&s.createElement("span",{className:"text-sm text-gray-700 select-none"},r),s.createElement("input",{type:"checkbox",checked:t,disabled:o,className:"sr-only",onChange:p=>!o&&(e==null?void 0:e(p.target.checked))}))});class Dt extends _{constructor(){super(...arguments);n(this,"_checked",!1);n(this,"_onChange");n(this,"_label");n(this,"_disabled",!1);n(this,"_indeterminate",!1)}checked(e){return this._checked=e,this}indeterminate(e){return this._indeterminate=e,this}onChange(e){return this._onChange=e,this}label(e){return this._label=e,this}disabled(e=!0){return this._disabled=e,this}build(){const e={checked:this._checked,onChange:this._onChange,label:this._label,disabled:this._disabled,indeterminate:this._indeterminate,className:this.getClassName(),style:this.getStyle()};return s.createElement(Ot,e)}}const Ht=x(Dt),Vt=s.memo(i=>{const{value:t,options:e,onChange:r,name:o,direction:l,className:a,style:c}=i;return s.createElement("div",{className:`fibo-radio-group flex ${l==="vertical"?"flex-col gap-2":"flex-row gap-4"} ${a}`,style:c},e.map(d=>{const f=t===d.value,m=d.disabled;return s.createElement("label",{key:d.value,className:`flex items-center gap-2 cursor-pointer ${m?"opacity-50 cursor-not-allowed":""}`},s.createElement("div",{className:"relative flex items-center justify-center",style:{width:"18px",height:"18px",borderRadius:"50%",border:f?"5px solid var(--fibo-primary, #3B82F6)":"2px solid #D1D5DB",transition:"all 0.2s"}},s.createElement("input",{type:"radio",name:o,value:d.value,checked:f,disabled:m,className:"sr-only",onChange:()=>!m&&(r==null?void 0:r(d.value))})),s.createElement("span",{className:"text-sm text-gray-700"},d.label))}))});class qt extends _{constructor(){super(...arguments);n(this,"_value","");n(this,"_options",[]);n(this,"_onChange");n(this,"_name",`radio-group-${Math.random().toString(36).substr(2,9)}`);n(this,"_direction","vertical")}value(e){return this._value=e,this}options(e){return this._options=e,this}onChange(e){return this._onChange=e,this}direction(e){return this._direction=e,this}name(e){return this._name=e,this}build(){const e={value:this._value,options:this._options,onChange:this._onChange,name:this._name,direction:this._direction,className:this.getClassName(),style:this.getStyle()};return s.createElement(Vt,e)}}const Gt=x(qt),Xt=s.memo(i=>{const t=s.useId(),e=i.id||t,{containerClass:r,containerStyle:o,label:l,error:a,...c}=i;return s.createElement("div",{className:r,style:o},s.createElement("textarea",{id:e,className:"fibo-textarea-input",...c}),l&&s.createElement("label",{htmlFor:e,className:"fibo-textarea-label"},l),a&&s.createElement("span",{className:"text-[var(--fibo-error)] text-xs mt-1 ml-1"},a))});class Ut extends _{constructor(){super(...arguments);n(this,"_value","");n(this,"_label","");n(this,"_placeholder","");n(this,"_disabled",!1);n(this,"_rows",4);n(this,"_error");n(this,"_resize","vertical");n(this,"_onChange")}value(e){return this._value=e,this}label(e){return this._label=e,this}placeholder(e){return this._placeholder=e,this}disabled(e=!0){return this._disabled=e,this}rows(e){return this._rows=e,this}resize(e){return this._resize=e,this}error(e){return this._error=e,this}onChange(e){return this._onChange=e,this}build(){const r={containerClass:["fibo-textarea-container",...this._classNames].filter(Boolean).join(" "),containerStyle:{width:"100%",...this.getStyle()},label:this._label,error:this._error,rows:this._rows,value:this._value,placeholder:this._placeholder||" ",disabled:this._disabled,style:{resize:this._resize},onChange:o=>{var l;(l=this._onChange)==null||l.call(this,o.target.value)},...this._props};return s.createElement(Xt,r)}}const Yt=x(Ut),Jt=s.memo(i=>{const t=s.useId(),e=i.id||t,[r,o]=s.useState(!1),l=s.useRef(null),{containerClass:a,containerStyle:c,label:d,error:f,value:m,options:p=[],placeholder:h,onChange:b,disabled:S,multiple:N,...$}=i;s.useEffect(()=>{const y=g=>{l.current&&!l.current.contains(g.target)&&o(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]);const I=y=>N?Array.isArray(m)&&m.includes(y):m===y;let w="";if(N)Array.isArray(m)&&m.length>0&&(w=p.filter(y=>m.includes(y.value)).map(y=>y.label).join(", "));else{const y=p.find(g=>g.value===m);w=y?y.label:""}const F=y=>{if(!S)if(N){const g=Array.isArray(m)?[...m]:[],z=g.indexOf(y);z>-1?g.splice(z,1):g.push(y),b==null||b(g)}else b==null||b(y),o(!1)};return s.createElement("div",{ref:l,className:a,style:c},s.createElement("div",{className:"relative w-full"},[s.createElement("button",{key:"trigger",id:e,type:"button",disabled:S,className:`fibo-textfield-input text-left w-full flex items-center justify-between ${w?"":"text-gray-400"}`,onClick:()=>!S&&o(!r),...$},[s.createElement("span",{key:"text",className:"truncate"},w||h||" "),s.createElement("svg",{key:"icon",className:`w-4 h-4 transition-transform ${r?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"}))]),d&&s.createElement("label",{key:"label",htmlFor:e,className:"fibo-textfield-label"},d),r&&s.createElement("div",{key:"dropdown",className:"absolute z-50 w-full mt-1 bg-[var(--fibo-surface)] border border-[var(--fibo-outline)] rounded-md shadow-lg max-h-60 overflow-auto focus:outline-none"},p.map(y=>{const g=I(y.value);return s.createElement("div",{key:y.value,className:`px-4 py-2 cursor-pointer text-sm hover:bg-[var(--fibo-primary-container)] hover:text-[var(--fibo-on-primary-container)] flex items-center justify-between ${g?"bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] font-medium":"text-[var(--fibo-on-surface)]"}`,onClick:()=>F(y.value)},[s.createElement("span",{key:"label"},y.label),g&&s.createElement("svg",{key:"check",className:"w-4 h-4 text-[var(--fibo-primary)]",viewBox:"0 0 20 20",fill:"currentColor"},s.createElement("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))])}))]),f&&s.createElement("span",{className:"text-[var(--fibo-error)] text-xs mt-1 ml-1"},f))});class Kt extends _{constructor(){super(...arguments);n(this,"_value","");n(this,"_label","");n(this,"_placeholder","");n(this,"_disabled",!1);n(this,"_error");n(this,"_multiple",!1);n(this,"_options",[]);n(this,"_onChange")}value(e){return this._value=e,this}label(e){return this._label=e,this}placeholder(e){return this._placeholder=e,this}options(e){return this._options=e,this}multiple(e=!0){return this._multiple=e,this}disabled(e=!0){return this._disabled=e,this}error(e){return this._error=e,this}onChange(e){return this._onChange=e,this}build(){const r={containerClass:["fibo-textfield-container relative",...this._classNames].filter(Boolean).join(" "),containerStyle:this.getStyle(),label:this._label,error:this._error,value:this._value,placeholder:this._placeholder,options:this._options,disabled:this._disabled,multiple:this._multiple,onChange:this._onChange,...this._props};return s.createElement(Jt,r)}}const Qt=x(Kt),Zt=s.memo(i=>{const t=s.useId(),e=i.id||t,[r,o]=s.useState(!1),[l,a]=s.useState(""),c=s.useRef(null),{containerClass:d,containerStyle:f,label:m,error:p,value:h,options:b=[],placeholder:S,onChange:N,onAdd:$,disabled:I,multiple:w,...F}=i;s.useEffect(()=>{if(!w){const v=i.options.find(B=>B.value===i.value);v&&!r&&l!==v.label&&a(v.label)}},[i.value,i.options,r,w]);const y=b.filter(v=>v.label.toLowerCase().includes(l.toLowerCase()));s.useEffect(()=>{const v=B=>{if(c.current&&!c.current.contains(B.target))if(o(!1),w)a("");else{const H=b.find(q=>q.value===h);a(H?H.label:"")}};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[h,b,w]);const g=v=>{if(w){const B=Array.isArray(h)?[...h]:[];B.includes(v.value)||(B.push(v.value),N==null||N(B)),a("")}else a(v.label),N==null||N(v.value),o(!1)},z=v=>{if(w&&Array.isArray(h)){const B=h.filter(H=>H!==v);N==null||N(B)}},W=()=>{$==null||$(l),w?a(""):o(!1)},L=v=>w?Array.isArray(h)&&h.includes(v):h===v;return s.createElement("div",{ref:c,className:d,style:f},s.createElement("div",{className:"relative w-full"},[s.createElement("div",{className:`fibo-textfield-input flex flex-wrap items-center gap-1 ${r?"ring-2 ring-[var(--fibo-primary-container)] border-[var(--fibo-primary)]":""}`,style:{minHeight:"42px",padding:"4px 8px"}},[w&&Array.isArray(h)&&h.map(v=>{const B=b.find(q=>q.value===v),H=B?B.label:v;return s.createElement("span",{key:v,className:"bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] text-xs font-medium px-2 py-1 rounded-md flex items-center"},[H,s.createElement("button",{type:"button",className:"ml-1 hover:text-[var(--fibo-primary)] focus:outline-none",onClick:q=>{q.stopPropagation(),z(v)}},"×")])}),s.createElement("input",{key:"input",id:e,className:"bg-transparent outline-none flex-1 min-w-[60px] text-sm h-8",value:l,placeholder:w&&Array.isArray(h)&&h.length>0?"":S||" ",disabled:I,onChange:v=>{a(v.target.value),r||o(!0)},onFocus:()=>o(!0),...F})]),m&&s.createElement("label",{key:"label",htmlFor:e,className:"fibo-textfield-label"},m),r&&s.createElement("div",{key:"dropdown",className:"absolute z-50 w-full mt-1 bg-[var(--fibo-surface)] border border-[var(--fibo-outline)] rounded-md shadow-lg max-h-60 overflow-auto focus:outline-none left-0"},[y.length>0?y.map(v=>{const B=L(v.value);return s.createElement("div",{key:v.value,className:`px-4 py-2 cursor-pointer text-sm hover:bg-[var(--fibo-primary-container)] hover:text-[var(--fibo-on-primary-container)] ${B?"bg-[var(--fibo-primary-container)] text-[var(--fibo-on-primary-container)] font-medium opacity-50":"text-[var(--fibo-on-surface)]"}`,onClick:()=>!B&&g(v)},v.label)}):s.createElement("div",{className:"px-4 py-2 text-sm text-gray-500"},"No results found."),l&&!y.some(v=>v.label.toLowerCase()===l.toLowerCase())&&$&&s.createElement("div",{key:"add-new",className:"border-t border-[var(--fibo-outline)] px-4 py-2 cursor-pointer text-sm text-[var(--fibo-primary)] hover:bg-[var(--fibo-primary-container)] font-medium flex items-center",onClick:W},[s.createElement("span",{className:"mr-1"},"+"),`Add "${l}"`])])]),p&&s.createElement("span",{className:"text-[var(--fibo-error)] text-xs mt-1 ml-1"},p))});class Rt extends _{constructor(){super(...arguments);n(this,"_value","");n(this,"_label","");n(this,"_placeholder","");n(this,"_disabled",!1);n(this,"_error");n(this,"_multiple",!1);n(this,"_options",[]);n(this,"_onChange");n(this,"_onAdd")}value(e){return this._value=e,this}label(e){return this._label=e,this}placeholder(e){return this._placeholder=e,this}options(e){return this._options=e,this}multiple(e=!0){return this._multiple=e,this}disabled(e=!0){return this._disabled=e,this}error(e){return this._error=e,this}onChange(e){return this._onChange=e,this}onAdd(e){return this._onAdd=e,this}build(){const r={containerClass:["fibo-textfield-container relative",...this._classNames].filter(Boolean).join(" "),containerStyle:this.getStyle(),label:this._label,error:this._error,value:this._value,placeholder:this._placeholder,options:this._options,disabled:this._disabled,multiple:this._multiple,onChange:this._onChange,onAdd:this._onAdd,...this._props};return s.createElement(Zt,r)}}const es=x(Rt),ts=s.memo(i=>{const{text:t,subtitle:e,number:r,color:o,className:l,style:a,children:c,...d}=i;return s.createElement("div",{className:`rounded-[24px] shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_8px_30px_rgb(0,0,0,0.08)] transition-shadow duration-300 border-none p-4 ${l||""}`,style:{backgroundColor:"#ffffff",...a},...d},s.createElement("div",{className:"flex flex-col gap-2"},t&&s.createElement("h3",{className:"font-semibold text-[var(--fibo-on-surface-variant)] text-sm uppercase tracking-wide"},t),r&&s.createElement("p",{className:"font-bold text-[var(--fibo-on-surface)] text-3xl"},r),e&&s.createElement("p",{className:"text-[var(--fibo-on-surface-variant)] text-xs"},e),...c))});class ss extends _{constructor(){super(...arguments);n(this,"_text","");n(this,"_subtitle");n(this,"_number");n(this,"_color")}text(e){return this._text=e,this}subtitle(e){return this._subtitle=e,this}number(e){return this._number=e,this}color(e){return this._color=e,this}build(){const e={green:"border-l-green-500",orange:"border-l-orange-500",red:"border-l-red-500",blue:"border-l-blue-500",purple:"border-l-purple-500"},r=["fibo-card",this._color?`border-l-4 ${e[this._color]}`:"",...this._classNames].filter(Boolean).join(" "),o={text:this._text,subtitle:this._subtitle,number:this._number,color:this._color,className:r,style:this.getStyle(),children:this.processChildren(),...this._props};return s.createElement(ts,o)}}const M=x(ss),rs=s.memo(i=>{const{items:t,renderItem:e,variant:r,separator:o,loading:l,threshold:a,onEndReached:c,className:d,style:f}=i,m=s.useRef(null);s.useEffect(()=>{if(!c||l)return;const S=new IntersectionObserver(N=>{N[0].isIntersecting&&(c==null||c())},{threshold:a});return m.current&&S.observe(m.current),()=>S.disconnect()},[l,t.length,c,a]);const p={default:{gap:"0px"},card:{gap:"12px"},floating:{gap:"8px"}},h={default:{padding:"12px 16px",borderBottom:o?"1px solid #F3F4F6":"none",backgroundColor:"transparent",transition:"background-color 0.2s"},card:{padding:"16px",backgroundColor:"#fff",borderRadius:"16px",boxShadow:"0 2px 8px -2px rgba(0,0,0,0.05)",border:"1px solid #F3F4F6",transition:"transform 0.2s, box-shadow 0.2s"},floating:{padding:"8px 12px",borderRadius:"12px",backgroundColor:"transparent",transition:"background-color 0.2s"}},b={default:["hover:bg-gray-50","first:rounded-t-xl","last:rounded-b-xl"],card:["hover:-translate-y-0.5","hover:shadow-md"],floating:["hover:bg-white","hover:shadow-sm"]};return C().className(d).classNames(["flex","flex-col","w-full"]).style({...p[r],...f}).children(s.createElement(s.Fragment,{},[...t.map((S,N)=>s.cloneElement(C().style(h[r]).classNames(b[r]).children(e?e(S,N):null).build(),{key:`item-${N}`})),c&&s.createElement("div",{ref:m,className:"py-4 flex justify-center w-full"},l?s.createElement("div",{className:"animate-spin rounded-full h-5 w-5 border-2 border-gray-300 border-b-blue-600"}):s.createElement("div",{style:{height:"20px"}}))])).build()});class is extends _{constructor(){super(...arguments);n(this,"_items",[]);n(this,"_renderItem");n(this,"_variant","default");n(this,"_separator",!1);n(this,"_onEndReached");n(this,"_loading",!1);n(this,"_threshold",.5)}items(e){return this._items=e,this}renderItem(e){return this._renderItem=e,this}variant(e){return this._variant=e,this}separator(e=!0){return this._separator=e,this}onEndReached(e){return this._onEndReached=e,this}loading(e){return this._loading=e,this}threshold(e){return this._threshold=e,this}build(){const e={items:this._items,renderItem:this._renderItem,variant:this._variant,separator:this._separator,loading:this._loading,threshold:this._threshold,onEndReached:this._onEndReached,className:this.getClassName(),style:this.getStyle()};return s.createElement(rs,e)}}const ns=x(is),os=s.memo(i=>{const{data:t,columns:e,variant:r,density:o,striped:l,width:a,className:c,style:d}=i,f={width:"100%",borderCollapse:"separate",borderSpacing:"0",...d};a&&(f.width=typeof a=="number"?`${a}px`:a);const m=r==="clean"?["bg-white","rounded-2xl","border","border-gray-100","overflow-hidden","shadow-sm"]:[],h={compact:"10px 16px",standard:"16px 24px",relaxed:"24px 32px"}[o];return C().className(c).classNames(m).children(s.createElement("table",{style:f},[s.createElement("thead",{key:"thead",className:"bg-gray-50/50"},s.createElement("tr",{},e.map((b,S)=>s.createElement("th",{key:S,style:{textAlign:b.align||"left",padding:h,width:b.width},className:"text-xs font-bold text-gray-400 uppercase tracking-widest"},b.header)))),s.createElement("tbody",{key:"tbody"},t.map((b,S)=>s.createElement("tr",{key:S,className:`group transition-all duration-200 border-b border-gray-50 last:border-b-0 ${l&&S%2!==0?"bg-gray-50/30":"bg-transparent"} ${r==="clean"?"hover:bg-white hover:shadow-md hover:scale-[1.002] hover:z-10 relative":"hover:bg-gray-50/50"}`},e.map((N,$)=>s.createElement("td",{key:$,style:{textAlign:N.align||"left",padding:h,borderTop:r==="default"?"1px solid #F3F4F6":"none"},className:"text-sm text-gray-900 font-medium"},N.render?N.render(b):N.accessor?b[N.accessor]:null)))))])).build()});class ls extends _{constructor(){super(...arguments);n(this,"_data",[]);n(this,"_columns",[]);n(this,"_variant","clean");n(this,"_density","standard");n(this,"_striped",!1);n(this,"_width")}data(e){return this._data=e,this}columns(e){return this._columns=e,this}variant(e){return this._variant=e,this}density(e){return this._density=e,this}striped(e=!0){return this._striped=e,this}width(e){return this._width=e,this}build(){const e={data:this._data,columns:this._columns,variant:this._variant,density:this._density,striped:this._striped,width:this._width,className:this.getClassName(),style:this.getStyle()};return s.createElement(os,e)}}const as=x(ls),cs=s.memo(i=>{const{items:t,className:e,style:r,...o}=i,l=t.map((a,c)=>s.createElement("span",{key:c,className:"fibo-tag"},a.title));return s.createElement("div",{className:e,style:r,...o},...l)});class hs extends _{constructor(e=[]){super();n(this,"_items",[]);this._items=e}items(e){return this._items=e,this}build(){const e=["fibo-tags","flex","gap-2","flex-wrap",...this._classNames].filter(Boolean).join(" "),r={items:this._items,className:e,style:this.getStyle(),...this._props};return s.createElement(cs,r)}}const ds=x(hs),us=s.memo(i=>{const{status:t,title:e,subtitle:r,className:o,style:l,...a}=i;return s.createElement("div",{className:o,style:l,...a},s.createElement("div",{className:"flex flex-col gap-1"},e&&s.createElement("h4",{className:"font-semibold text-sm uppercase tracking-wide opacity-90"},e),r&&s.createElement("p",{className:"opacity-80 text-sm"},r)))});class ms extends _{constructor(e=""){super();n(this,"_status","info");n(this,"_title","");n(this,"_subtitle");this._title=e}status(e){return this._status=e,this}title(e){return this._title=e,this}subtitle(e){return this._subtitle=e,this}build(){const r=["fibo-banner",`fibo-banner-${this._status}`,...this._classNames].filter(Boolean).join(" "),o={status:this._status,title:this._title,subtitle:this._subtitle,className:r,style:this.getStyle(),...this._props};return s.createElement(us,o)}}const ps=x(ms),fs=s.memo(i=>{const{image:t,title:e,price:r,likes:o,timeLeft:l,className:a,style:c,...d}=i;return M().classNames(["group","transition-all","duration-300","hover:-translate-y-1"]).style({width:"100%",borderRadius:"24px",border:"none",boxShadow:"0 10px 40px -10px rgba(0,0,0,0.05)",padding:"16px",background:"#fff",...c}).className(a).props(d).children([C().classNames(["relative","aspect-square","overflow-hidden","rounded-[20px]"]).children([C().classNames(["w-full","h-full","bg-gray-200","bg-cover","bg-center"]).style({backgroundImage:`url(${t})`}).build(),C().classNames(["absolute","top-3","right-3"]).children(V().variant("glass").shape("pill").icon(C().classNames(["text-gray-400","hover:text-red-500"]).children(j.Heart).build()).text(`${o}`).build()).build()]).build(),O().height(16).build(),T().justifyContent("between").alignItems("start").children([P().gap(4).children([E(e).fontWeight(700).fontSize(18).color("#111827").build(),V().variant("neutral").text("Not for sale x1").build()]).build(),C().classNames(["text-gray-300"]).children(j.More).build()]).build(),O().height(16).build(),T().justifyContent("between").alignItems("center").children([P().gap(4).children([E("Current Bid").fontSize(11).fontWeight(600).color("#6B7280").build(),T().gap(4).alignItems("center").children([C().classNames(["text-blue-500"]).children(j.Eth).build(),E(`${r} ETH`).fontSize(15).fontWeight(700).color("#111827").build()]).build()]).build(),G("Place a bid").variant("filled").shape("pill").shadow("soft").style({backgroundColor:"#111827",color:"#fff",padding:"10px 20px",fontSize:"13px",fontWeight:600}).build()]).build(),O().height(12).build(),l?V().variant("accent").shape("rounded").icon(C().children(j.Clock).build()).text(l).style({width:"100%"}).build():null]).build()});class gs extends _{constructor(){super(...arguments);n(this,"_image","");n(this,"_title","");n(this,"_price","");n(this,"_likes","");n(this,"_timeLeft")}image(e){return this._image=e,this}title(e){return this._title=e,this}price(e){return this._price=e,this}likes(e){return this._likes=e,this}timeLeft(e){return this._timeLeft=e,this}build(){const e={image:this._image,title:this._title,price:this._price,likes:this._likes,timeLeft:this._timeLeft,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(fs,e)}}const bs=x(gs),ys=s.memo(i=>{const{banner:t,avatar:e,name:r,handle:o,stats:l,className:a,style:c,...d}=i;return M().style({width:"100%",borderRadius:"24px",border:"none",boxShadow:"0 10px 40px -10px rgba(0,0,0,0.05)",padding:"0",overflow:"hidden",background:"#fff",...c}).className(a).props(d).children([C().style({height:"100px",backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center"}).build(),P().padding(20).alignItems("center").style({marginTop:"-50px"}).children([ce().image(e).size(80).border("4px solid #fff").build(),O().height(12).build(),T().gap(6).alignItems("center").children([E(r).fontWeight(700).fontSize(18).color("#111827").build(),j.Verify]).build(),E(o).fontSize(13).color("#6B7280").style({marginTop:"4px"}).build(),O().height(16).build(),G("+ Follow").variant("filled").shape("pill").shadow("soft").style({backgroundColor:"#3B82F6",color:"#fff",padding:"8px 24px",fontSize:"13px",fontWeight:600}).build(),O().height(24).build(),T().classNames(["w-full","border-t","border-gray-100","pt-4"]).justifyContent("between").children([P().alignItems("center").gap(4).children([E(l.items).fontWeight(700).fontSize(14).build(),E("Items").fontSize(11).color("#9CA3AF").build()]).build(),P().alignItems("center").gap(4).children([E(l.owners).fontWeight(700).fontSize(14).build(),E("Owners").fontSize(11).color("#9CA3AF").build()]).build(),P().alignItems("center").gap(4).children([T().alignItems("center").gap(2).children([C().width(8).children(j.Eth).build(),E(l.floor).fontWeight(700).fontSize(14).build()]).build(),E("Floor").fontSize(11).color("#9CA3AF").build()]).build()]).build()]).build()]).build()});class _s extends _{constructor(){super(...arguments);n(this,"_banner","");n(this,"_avatar","");n(this,"_name","");n(this,"_handle","");n(this,"_stats",{items:"0",owners:"0",floor:"0"})}banner(e){return this._banner=e,this}avatar(e){return this._avatar=e,this}name(e){return this._name=e,this}handle(e){return this._handle=e,this}stats(e){return this._stats=e,this}build(){const e={banner:this._banner,avatar:this._avatar,name:this._name,handle:this._handle,stats:this._stats,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(ys,e)}}const xs=x(_s),ks=s.memo(i=>{const{image:t,title:e,author:r,items:o,className:l,style:a,...c}=i;return M().classNames(["group","cursor-pointer"]).style({width:"100%",borderRadius:"24px",height:"320px",position:"relative",overflow:"hidden",border:"none",...a}).className(l).props(c).children([C().classNames(["absolute","inset-0","bg-cover","bg-center","transition-transform","duration-500"]).style({backgroundImage:`url(${t})`}).build(),C().classNames(["absolute","inset-0","bg-gradient-to-t","from-black/80","via-black/20","to-transparent"]).build(),P().classNames(["absolute","bottom-0","left-0","p-6"]).gap(4).children([E(o).color("white").fontSize(12).classNames(["opacity-90","mb-1","uppercase","tracking-wider"]).fontWeight(600).build(),E(e).color("white").fontSize(22).fontWeight(700).build(),T().gap(6).alignItems("center").children([E("Created by").color("white").fontSize(13).classNames(["opacity-80"]).build(),E(r).color("white").fontSize(13).fontWeight(600).build(),j.Verify]).build()]).build()]).build()});class vs extends _{constructor(){super(...arguments);n(this,"_image","");n(this,"_title","");n(this,"_author","");n(this,"_items","")}image(e){return this._image=e,this}title(e){return this._title=e,this}author(e){return this._author=e,this}items(e){return this._items=e,this}build(){const e={image:this._image,title:this._title,author:this._author,items:this._items,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(ks,e)}}const ws=x(vs),Ns=s.memo(i=>{const{image:t,title:e,description:r,date:o,source:l,className:a,style:c}=i;return M().className(`overflow-hidden hover:shadow-lg transition-shadow duration-300 ${a}`).style(c).children([t?he().src(t).className("w-full object-cover rounded-[20px] mb-4").style({height:"200px"}).build():null,C().className("flex flex-col gap-2").children([e?E(e).fontSize(18).fontWeight(700).color("#111827").lineHeight(1.25).build():null,r?E(r).fontSize(14).color("#4B5563").lineHeight(1.5).className("line-clamp-2").build():null,l||o?C().className("flex items-center gap-2 mt-2").children([E(`${l||""}${l&&o?" • ":""}${o||""}`).fontSize(11).fontWeight(600).color("#9CA3AF").textTransform("uppercase").letterSpacing("0.05em").build()]).build():null]).build()]).build()});class Cs extends _{constructor(){super(...arguments);n(this,"_image");n(this,"_title");n(this,"_description");n(this,"_date");n(this,"_source")}image(e){return this._image=e,this}title(e){return this._title=e,this}description(e){return this._description=e,this}date(e){return this._date=e,this}source(e){return this._source=e,this}build(){const e={image:this._image,title:this._title,description:this._description,date:this._date,source:this._source,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Ns,e)}}const Ss=x(Cs),Es=s.memo(i=>{const{title:t,description:e,icon:r,footer:o,className:l,style:a}=i;return M().className(l).style(a).children([C().className("flex items-start gap-4").children([r?C().className("mt-1 text-gray-400").children(r).build():null,C().className("flex-1").children([t?E(t).fontSize(16).fontWeight(600).color("#111827").build():null,e?E(e).fontSize(14).color("#6B7280").className("mt-1").build():null,o?C().className("mt-4").children(o).build():null]).build()]).build()]).build()});class Fs extends _{constructor(){super(...arguments);n(this,"_title");n(this,"_description");n(this,"_icon");n(this,"_footer")}title(e){return this._title=e,this}description(e){return this._description=e,this}icon(e){return this._icon=e,this}footer(e){return this._footer=e,this}build(){const e={title:this._title,description:this._description,icon:this._icon,footer:this._footer,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Es,e)}}const zs=s.memo(i=>{const{title:t,description:e,action:r,actionType:o,onAction:l,actionLabel:a,className:c,style:d}=i;let f=r;return f||(o==="button"?f=G(a||"Action").variant("soft").size("sm").onPress(l).build():o==="switch"&&(f=ue().onChange(l).build())),M().className(`flex items-center justify-between gap-4 ${c||""}`).style(d).children([C().className("flex-1").children([t?E(t).fontSize(16).fontWeight(600).color("#111827").build():null,e?E(e).fontSize(14).color("#6B7280").className("mt-1").build():null]).build(),f?C().className("flex-shrink-0").children(f).build():null]).build()});class Bs extends _{constructor(){super(...arguments);n(this,"_title");n(this,"_description");n(this,"_action");n(this,"_actionType");n(this,"_actionLabel");n(this,"_onAction")}title(e){return this._title=e,this}description(e){return this._description=e,this}action(e){return this._action=e,this}withButton(e,r){return this._actionType="button",this._actionLabel=e,this._onAction=r,this}withSwitch(e){return this._actionType="switch",this._onAction=e,this}build(){const e={title:this._title,description:this._description,action:this._action,actionType:this._actionType,actionLabel:this._actionLabel,onAction:this._onAction,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(zs,e)}}const As=x(Fs),$s=x(Bs),Is=s.memo(i=>{const{title:t,description:e,placeholder:r,value:o,onChange:l,type:a,className:c,style:d}=i;return M().className(c).style(d).children([t?E(t).fontSize(14).fontWeight(600).color("#374151").className("mb-1").build():null,e?E(e).fontSize(12).color("#6B7280").className("mb-3").build():null,de().placeholder(r).value(o).type(a).onChange(l).className("w-full").build()]).build()});class js extends _{constructor(){super(...arguments);n(this,"_title");n(this,"_description");n(this,"_placeholder");n(this,"_value");n(this,"_type","text");n(this,"_onChange")}title(e){return this._title=e,this}description(e){return this._description=e,this}placeholder(e){return this._placeholder=e,this}value(e){return this._value=e,this}type(e){return this._type=e,this}onChange(e){return this._onChange=e,this}build(){const e={title:this._title,description:this._description,placeholder:this._placeholder,value:this._value,type:this._type,onChange:this._onChange,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Is,e)}}const Ws=x(js),Ls=s.memo(i=>{const{title:t,value:e,trend:r,trendDirection:o,className:l,style:a}=i,c=o==="up"?"success":o==="down"?"error":"none",d=o==="up"?"↑":o==="down"?"↓":"•";return M().className(l).style(a).children([E(t).fontSize(14).fontWeight(600).color("#6B7280").build(),C().className("flex items-end justify-between mt-2").children([E(e).fontSize(32).fontWeight(800).color("#111827").build(),r?V().text(`${d} ${r}`).intent(c).variant("accent").build():null]).build()]).build()});class Ts extends _{constructor(){super(...arguments);n(this,"_title","");n(this,"_value","");n(this,"_trend");n(this,"_trendDirection","neutral")}title(e){return this._title=e,this}value(e){return this._value=e,this}trend(e,r="neutral"){return this._trend=e,this._trendDirection=r,this}build(){const e={title:this._title,value:this._value,trend:this._trend,trendDirection:this._trendDirection,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Ls,e)}}const Ms=x(Ts);class Ps extends _{constructor(){super(...arguments);n(this,"_title","");n(this,"_content",null);n(this,"_defaultExpanded",!1);n(this,"_expanded");n(this,"_onToggle")}title(e){return this._title=e,this}content(e){return this._content=e,this}isOpen(e){return this._expanded=e,this}defaultOpen(e){return this._defaultExpanded=e,this}onToggle(e){return this._onToggle=e,this}build(){return s.createElement(Os,{builder:this,...this._props})}}const Os=s.memo(({builder:i})=>{const t=i,e=t._expanded!==void 0,[r,o]=s.useState(t._defaultExpanded),l=e?t._expanded:r,a=()=>{e||o(!l),t._onToggle&&t._onToggle(!l)};return C().classNames(["w-full","border","border-gray-200","rounded-xl","overflow-hidden","bg-white","transition-all","duration-300"]).className(t.getClassName()).style(t.getStyle()).children([T().justifyContent("between").alignItems("center").classNames(["p-4","cursor-pointer","hover:bg-gray-50","transition-colors","select-none"]).props({onClick:a}).children([typeof t._title=="string"?E(t._title).fontWeight(600).fontSize(15).color("#1F2937").build():t._title,C().classNames(["transition-transform","duration-300"]).style({transform:l?"rotate(180deg)":"rotate(0deg)"}).children(s.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-400"},s.createElement("polyline",{points:"6 9 12 15 18 9"}))).build()]).build(),C().classNames(["transition-all","duration-300","ease-in-out","overflow-hidden"]).style({maxHeight:l?"500px":"0px",opacity:l?1:0}).children(C().classNames(["p-4","pt-0","text-gray-600","text-sm"]).children(t._content).build()).build()]).build()}),Ds=x(Ps),Hs=s.memo(i=>{const{children:t,variant:e="standard",columns:r=1,gap:o="md",className:l,style:a,...c}=i,d=p=>typeof p=="number"?"":{none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}[p]||"gap-4",f=p=>{if(typeof p=="number")return p+"px"},m=p=>{if(typeof p=="number")return`grid-cols-${p}`;let h=[];return p.sm&&h.push(`sm:grid-cols-${p.sm}`),p.md&&h.push(`md:grid-cols-${p.md}`),p.lg&&h.push(`lg:grid-cols-${p.lg}`),p.xl&&h.push(`xl:grid-cols-${p.xl}`),h.join(" ")||"grid-cols-1"};if(e==="masonry"){const p=h=>{if(typeof h=="number")return`columns-${h}`;let b=[];return h.sm&&b.push(`sm:columns-${h.sm}`),h.md&&b.push(`md:columns-${h.md}`),h.lg&&b.push(`lg:columns-${h.lg}`),h.xl&&b.push(`xl:columns-${h.xl}`),b.join(" ")||"columns-1"};return s.createElement("div",{className:`${p(r)} ${d(o)} space-y-4 ${l}`,style:{columnGap:f(o),...a},...c},s.Children.map(t,h=>s.createElement("div",{className:"break-inside-avoid mb-4"},h)))}return s.createElement("div",{className:`grid ${m(r)} ${d(o)} ${l}`,style:{gap:f(o),...a},...c},t)}),Vs=s.memo(i=>{const{children:t,colSpan:e,rowSpan:r,className:o,style:l,...a}=i,c=()=>{let d=[];return e&&d.push(`col-span-${e}`),r&&d.push(`row-span-${r}`),d.join(" ")};return s.createElement("div",{className:`${c()} ${o}`,style:l,...a},t)});class qs extends _{constructor(){super(...arguments);n(this,"_variant","standard");n(this,"_columns",1);n(this,"_gap","md");n(this,"_children",[])}variant(e){return this._variant=e,this}columns(e){return this._columns=e,this}gap(e){return this._gap=e,this}children(e){return this._children=e,this}build(){const e={variant:this._variant,columns:this._columns,gap:this._gap,children:this._children,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Hs,e)}}class Gs extends _{constructor(){super(...arguments);n(this,"_colSpan");n(this,"_rowSpan");n(this,"_children",[])}colSpan(e){return this._colSpan=e,this}rowSpan(e){return this._rowSpan=e,this}children(e){return this._children=e,this}build(){const e={colSpan:this._colSpan,rowSpan:this._rowSpan,children:this._children,className:this.getClassName(),style:this.getStyle(),...this._props};return s.createElement(Vs,e)}}const Xs=x(qs),Us=x(Gs),Ys=Object.freeze(Object.defineProperty({__proto__:null,createRipple:(i,t,e="rgba(255, 255, 255, 0.3)")=>{if(!t)return;const r=document.createElement("span"),o=Math.max(t.clientWidth,t.clientHeight),l=o/2,a=t.getBoundingClientRect();r.style.width=r.style.height=`${o}px`,r.style.left=`${i.clientX-a.left-l}px`,r.style.top=`${i.clientY-a.top-l}px`,r.style.position="absolute",r.style.borderRadius="50%",r.style.transform="scale(0)",r.style.animation="fibo-ripple 600ms linear",r.style.backgroundColor=e,r.style.pointerEvents="none",(t.querySelector(".fibo-ripple-container")||t).appendChild(r),setTimeout(()=>{r.remove()},600)}},Symbol.toStringTag,{value:"Module"}));u.ActionCard=$s,u.Alert=zt,u.AssetCard=bs,u.Avatar=ce,u.Badge=V,u.Banner=ps,u.Box=C,u.Button=G,u.Card=M,u.Center=Ue,u.Checkbox=Ht,u.Collapse=Ds,u.CollectionCard=ws,u.Column=P,u.Combobox=es,u.ComputedSignal=Q,u.Container=Oe,u.ContentCard=Ss,u.DashboardLayout=it,u.Effect=J,u.FiboBuilder=_,u.FiboThemeProvider=Te,u.Grid=Xs,u.GridItem=Us,u.Header=Ze,u.Image=he,u.InfoCard=As,u.InputCard=Ws,u.Label=yt,u.Line=Ge,u.List=ns,u.MetricCard=Ms,u.Observable=Z,u.Observer=ee,u.ObserverWrapper=_e,u.ProfileCard=xs,u.Progress=$t,u.ProviderContext=Y,u.ProviderWrapper=te,u.RadioGroup=Gt,u.Row=T,u.Scaffold=lt,u.ScrollView=Je,u.Select=Qt,u.Sidebar=tt,u.Signal=X,u.SignalWrapper=xe,u.Skeleton=St,u.Spacer=O,u.Spinner=wt,u.StateContext=U,u.StateWrapper=ye,u.StoreImpl=R,u.Switch=ue,u.Table=as,u.Tags=ds,u.Text=E,u.TextField=de,u.Textarea=Yt,u.Tracker=K,u.applyResponsiveStyles=$e,u.computed=pe,u.createBuilder=x,u.createStore=ge,u.cupertinoTheme=ne,u.materialTheme=ie,u.mergeStyles=Ae,u.normalizeValue=Ie,u.observable=fe,u.processChildren=Be,u.signal=me,u.useFiboTheme=Me,u.useObservable=Le,u.useProvider=ke,u.useSignal=je,u.useStateContext=be,u.useStore=We,u.webTheme=oe,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { FiboBuilder } from '../../core/builder';
|
|
3
3
|
import { BaseProps } from '../../core/types';
|
|
4
|
+
import { Signal } from '../../core/state';
|
|
4
5
|
|
|
5
6
|
declare class TextFieldBuilder extends FiboBuilder {
|
|
6
7
|
private _value;
|
|
@@ -12,7 +13,7 @@ declare class TextFieldBuilder extends FiboBuilder {
|
|
|
12
13
|
private _mask?;
|
|
13
14
|
private _onChange?;
|
|
14
15
|
constructor(value?: string);
|
|
15
|
-
value(val: string): this;
|
|
16
|
+
value(val: string | Signal<string>): this;
|
|
16
17
|
label(val: string): this;
|
|
17
18
|
placeholder(val: string): this;
|
|
18
19
|
type(val: 'text' | 'password' | 'email' | 'number' | 'tel'): this;
|
|
@@ -882,7 +883,7 @@ export declare const TextField: (value?: string | undefined) => TextFieldBuilder
|
|
|
882
883
|
glyphOrientationVertical: (value: import("csstype").Property.GlyphOrientationVertical | undefined) => TextFieldBuilder & /*elided*/ any;
|
|
883
884
|
};
|
|
884
885
|
export interface TextFieldProps extends BaseProps {
|
|
885
|
-
value: string
|
|
886
|
+
value: string | Signal<string>;
|
|
886
887
|
label?: string;
|
|
887
888
|
placeholder?: string;
|
|
888
889
|
onChange?: (value: string) => void;
|