looply-comp-lib 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("next/image"),a=require("next-themes");const s=["#1a1a1a","#4d4d4d","#999999","#e6e6e6"];const l=e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"5"}),e.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),o=e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"})});exports.Accordion=function({items:t}){const[a,s]=r.useState(Array(t.length).fill(!1));return e.jsx("div",{className:"border border-black dark:border-gray-700 rounded-lg overflow-hidden max-w-3xl bg-white dark:bg-gray-900 font-inter",children:t.map((r,l)=>e.jsxs("div",{className:"border-b border-gray-200 dark:border-gray-700 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-4 p-5 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors duration-200",onClick:()=>function(e){s(r=>{const a=Array(t.length).fill(!1);return a[e]=!r[e],a})}(l),children:[e.jsx("svg",{className:"w-6 h-6 transition-transform duration-200 text-gray-900 dark:text-gray-100 flex-shrink-0 "+(a[l]?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),e.jsx("h2",{className:"text-lg font-bold text-gray-800 dark:text-gray-100",children:r.title})]}),e.jsx("div",{className:"overflow-hidden transition-all duration-200 "+(a[l]?"max-h-96 opacity-100":"max-h-0 opacity-0"),children:e.jsx("p",{className:"px-5 pb-5 pl-[3.75rem] text-gray-700 dark:text-gray-300 text-sm leading-relaxed",children:r.text})})]},l))})},exports.BarChart=function({content:r}){const t=r.map((e,r)=>s[r%s.length]),a=r.reduce((e,r)=>Math.max(e,r.size),0),l=r.map(e=>e.size/a*300);return e.jsxs("div",{className:"w-[650px] flex flex-row gap-[10px] items-end pl-[25px] pr-[25px] pt-[25px] border-black dark:border-gray-700 border-1 h-[300px] rounded-md dark:bg-gray-900",children:[e.jsxs("div",{className:"border-r-2 border-black dark:border-gray-500 h-full mb-[10px] mr-[10px] flex flex-col justify-between dark:text-gray-300",children:[e.jsxs("p",{children:[Math.floor(Math.max(a))," "]}),e.jsx("p",{children:Math.floor(Math.max(a)/1.5)}),e.jsx("p",{children:Math.floor(Math.max(a)/2)}),e.jsx("p",{children:Math.floor(Math.max(a)/3)}),e.jsx("p",{children:"0"})]}),r.map((r,a)=>e.jsxs("div",{className:"flex flex-col items-center justify-end h-full w-full ",children:[e.jsx("div",{className:"w-full",style:{height:`${l[a]}px`,backgroundColor:t[a]}}),e.jsx("p",{className:"text-xs text-center m-1 dark:text-gray-300",children:r.lable})]},a))]})},exports.CardText=function({header:r,subHeader:t,mainText:a,buttonText1:s,buttonText2:l}){return e.jsx(e.Fragment,{children:e.jsx("div",{className:"",children:e.jsxs("div",{className:"lg:w-[22rem] h-[400px] border border-black dark:border-gray-700 rounded-lg px-7 py-5 flex flex-col gap-6 font-inter sm:w-full md:w-[20rem] dark:bg-gray-900 h-full",children:[e.jsxs("section",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100 mb-1",children:r}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 text-sm",children:t})]}),e.jsx("section",{children:e.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm leading-relaxed",children:a})}),e.jsxs("section",{className:"flex flex-row gap-3 mt-auto",children:[e.jsx("button",{className:"bg-black dark:bg-gray-100 text-white dark:text-black px-5 py-2 rounded-lg font-medium text-sm transition-colors duration-200 hover:bg-gray-800 dark:hover:bg-gray-200 hover:text-gray-200 dark:hover:text-black",children:s}),e.jsx("button",{className:"text-gray-900 dark:text-gray-100 px-5 py-2 rounded-lg font-medium text-sm transition-colors duration-200 hover:bg-gray-200 dark:hover:bg-gray-800 hover:text-black dark:hover:text-gray-100 border dark:border-gray-700 bg-white dark:bg-gray-900",children:l})]})]})})})},exports.Caroulse=function({card:a}){const s=r.useRef(0),l=r.useRef(null);return r.useEffect(()=>{const e=l.current;if(!e)return;const r=e.offsetWidth,t=e.scrollWidth,a=()=>{s.current+=.5,s.current>=t-r&&(s.current=0),e.style.transform=`translateX(-${s.current}px)`,requestAnimationFrame(a)},o=requestAnimationFrame(a);return()=>cancelAnimationFrame(o)},[]),e.jsx("div",{className:"border border-black dark:border-gray-700 rounded-lg max-w-5xl h-[25rem] flex flex-col gap-5 p-10 overflow-hidden bg-white dark:bg-gray-900",children:e.jsx("div",{ref:l,className:"flex flex-row gap-5 flex-1 flex-nowrap",children:a.map((r,a)=>e.jsxs("div",{className:"border border-gray-700 dark:border-gray-700 rounded-lg w-[22rem] flex-shrink-0 bg-white dark:bg-gray-900 overflow-hidden shadow-sm",children:[e.jsx(t,{src:r.image,width:352,height:200,alt:r.text,className:"w-full h-48 object-cover"}),e.jsx("p",{className:"p-5 text-gray-900 dark:text-gray-100 font-inter text-sm",children:r.text})]},a))})})},exports.Chat=function({title:a,img:s,propt:l}){const[o,d]=r.useState(""),[n,i]=r.useState([]),[c,x]=r.useState(!1);async function h(e){x(!0);const r=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}),t=(await r.json()).message;i([...n,{user:e,bot:t}]),console.log(n),x(!1)}function g(){h(o),d("")}return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"w-[37rem] border-1 border-black dark:border-gray-700 px-10 py-5 overflow-auto rounded-sm h-full dark:bg-gray-900",children:[e.jsxs("div",{className:"flex flex-row gap-5 pb-2",children:[e.jsx(t,{className:"p-2 bg-gray-50 rounded-full flex flex-row",src:s,width:40,height:40,alt:"chat-img"}),e.jsx("h1",{className:"text-xl text-gray-800 dark:text-gray-100",children:a})]}),e.jsxs("div",{className:"flex flex-col h-51 ",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("button",{className:"p-1 pl-3 pr-3 rounded-full text-sm border border-black dark:border-gray-600 dark:text-gray-300",onClick:function(){h(l)},children:l})}),e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[c?e.jsx("p",{children:"Loading..."}):null,n.map((r,t)=>e.jsxs("div",{className:"space-y-3 mb-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx("div",{className:"bg-gray-300 dark:bg-gray-700 p-3 rounded-sm",children:e.jsx("p",{className:"text-sm font-medium",children:r.user})})}),e.jsx("div",{className:"flex justify-start",children:e.jsx("div",{className:"bg-gray-100 dark:bg-gray-800 p-3 rounded-sm ",children:r.bot.startsWith("data:image/")?e.jsx("img",{src:r.bot,alt:"Generated image",className:"max-w-full h-auto rounded-sm"}):e.jsx("p",{className:"text-sm",children:r.bot})})})]},t))]}),e.jsxs("div",{className:"flex flex-row gap-2 mt-4",children:[e.jsx("input",{className:"flex-1 border border-gray-500 dark:border-gray-600 rounded-sm px-3 py-2 dark:bg-gray-800 dark:text-gray-100 dark:placeholder-gray-400",value:o,onChange:function(e){d(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&g()},type:"text",placeholder:"Type your message..."}),e.jsx("button",{onClick:g,className:"px-4 py-2 border border-black dark:border-gray-600 rounded-sm hover:bg-gray-100 dark:hover:bg-gray-800 dark:text-gray-100",children:"Send"})]})]})]})})},exports.Drawer=function({title:t,size:a,colour:s}){const[l,o]=r.useState(Array(a).fill(!1)),[d,n]=r.useState(s);return e.jsxs("div",{className:"border border-black dark:border-gray-700 border-1 w-[33rem] p-5 rounded-sm dark:bg-gray-900",children:[e.jsxs("div",{className:"flex gap-10 mb-5",children:[e.jsx("h1",{className:"text-xl font-bold mb-4 dark:text-white",children:t}),e.jsx("button",{onClick:()=>o(Array(a).fill(!1)),className:"cursor-pointer px-5 py-0.5 border dark:border-gray-600 rounded-md text-sm dark:text-gray-300 dark:hover:bg-gray-800",children:"Clear"}),e.jsx("input",{type:"color",id:"favcolor",value:d,onChange:e=>n(e.target.value),className:"w-10 h-10 rounded cursor-pointer"})]}),e.jsx("div",{className:"flex flex-wrap flex-row justify-center",children:Array.from({length:a}).map((r,t)=>e.jsx("div",{onMouseEnter:()=>function(e){const r=[...l];r[e]=!0,o(r)}(t),onMouseLeave:()=>function(e){const r=[...l];r[e]=!1,o(r)}(t),style:{backgroundColor:l[t]?d:"transparent"},className:" w-[1rem] h-[1rem] flex justify-center"},t))})]})},exports.Hero=function({header:r,subHeader:t,btn1Text:a,btn2Text:s,headerBtn:l}){return e.jsxs("div",{className:"flex flex-col items-center mt-[6rem] gap-8 w-full font-inter mb-[6rem]",children:[e.jsxs("button",{className:"bg-gray-200 dark:bg-gray-800 py-1 px-5 rounded-xl text-sm font-thin transition-colors \r\n duration-200 hover:bg-gray-300 dark:hover:bg-gray-700 hover:text-black dark:hover:text-white dark:text-gray-300",children:[l," --\x3e"]}),e.jsx("h1",{className:" text-center w-full text-5xl font-bold dark:text-white",children:r}),e.jsx("p",{className:"text-center lg:w-[69ch] sm:w-[40ch] md:w-[50ch] dark:text-gray-300",children:t}),e.jsxs("div",{className:"flex flex-row gap-4 justify-center w-full",children:[e.jsx("button",{className:"text-sm bg-black dark:bg-white cursor-pointer text-white dark:text-black py-3 px-8 rounded-xl\r\n transition-colors duration-200 hover:bg-gray-800 dark:hover:bg-gray-200 hover:text-gray-200 dark:hover:text-black",children:a}),e.jsx("button",{className:"text-sm cursor-pointer py-3 px-8 rounded-xl transition-colors \r\n duration-200 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-black dark:hover:text-white dark:text-gray-300",children:s})]})]})},exports.ThemeSwitch=function({lightIcon:t,darkIcon:s,label:d}){const{theme:n,setTheme:i}=a.useTheme(),[c,x]=r.useState(!1);if(r.useEffect(()=>{x(!0)},[]),!c)return null;const h="dark"===n;return e.jsx("button",{onClick:function(){i(h?"light":"dark")},"aria-label":null!=d?d:"Toggle theme",children:h?null!=s?s:o:null!=t?t:l})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("next/image"),a=require("next-themes");const s=["#1a1a1a","#4d4d4d","#999999","#e6e6e6"];const l=e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"5"}),e.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),o=e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"})});exports.Accordion=function({items:t}){const[a,s]=r.useState(Array(t.length).fill(!1));return e.jsx("div",{"data-looply":!0,className:"border border-black dark:border-gray-700 rounded-lg overflow-hidden max-w-3xl bg-white dark:bg-gray-900 font-inter",children:t.map((r,l)=>e.jsxs("div",{className:"border-b border-gray-200 dark:border-gray-700 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-4 p-5 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors duration-200",onClick:()=>function(e){s(r=>{const a=Array(t.length).fill(!1);return a[e]=!r[e],a})}(l),children:[e.jsx("svg",{className:"w-6 h-6 transition-transform duration-200 text-gray-900 dark:text-gray-100 flex-shrink-0 "+(a[l]?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),e.jsx("h2",{className:"text-lg font-bold text-gray-800 dark:text-gray-100",children:r.title})]}),e.jsx("div",{className:"overflow-hidden transition-all duration-200 "+(a[l]?"max-h-96 opacity-100":"max-h-0 opacity-0"),children:e.jsx("p",{className:"px-5 pb-5 pl-[3.75rem] text-gray-700 dark:text-gray-300 text-sm leading-relaxed",children:r.text})})]},l))})},exports.BarChart=function({content:r}){const t=r.map((e,r)=>s[r%s.length]),a=r.reduce((e,r)=>Math.max(e,r.size),0),l=r.map(e=>e.size/a*300);return e.jsxs("div",{"data-looply":!0,className:"w-[650px] flex flex-row gap-[10px] items-end pl-[25px] pr-[25px] pt-[25px] border-black dark:border-gray-700 border-1 h-[300px] rounded-md dark:bg-gray-900",children:[e.jsxs("div",{className:"border-r-2 border-black dark:border-gray-500 h-full mb-[10px] mr-[10px] flex flex-col justify-between dark:text-gray-300",children:[e.jsxs("p",{children:[Math.floor(Math.max(a))," "]}),e.jsx("p",{children:Math.floor(Math.max(a)/1.5)}),e.jsx("p",{children:Math.floor(Math.max(a)/2)}),e.jsx("p",{children:Math.floor(Math.max(a)/3)}),e.jsx("p",{children:"0"})]}),r.map((r,a)=>e.jsxs("div",{className:"flex flex-col items-center justify-end h-full w-full ",children:[e.jsx("div",{className:"w-full",style:{height:`${l[a]}px`,backgroundColor:t[a]}}),e.jsx("p",{className:"text-xs text-center m-1 dark:text-gray-300",children:r.lable})]},a))]})},exports.CardText=function({header:r,subHeader:t,mainText:a,buttonText1:s,buttonText2:l}){return e.jsx(e.Fragment,{children:e.jsx("div",{"data-looply":!0,children:e.jsxs("div",{className:"lg:w-[22rem] h-[400px] border border-black dark:border-gray-700 rounded-lg px-7 py-5 flex flex-col gap-6 font-inter sm:w-full md:w-[20rem] dark:bg-gray-900 h-full",children:[e.jsxs("section",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100 mb-1",children:r}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 text-sm",children:t})]}),e.jsx("section",{children:e.jsx("p",{className:"text-gray-700 dark:text-gray-300 text-sm leading-relaxed",children:a})}),e.jsxs("section",{className:"flex flex-row gap-3 mt-auto",children:[e.jsx("button",{className:"bg-black dark:bg-gray-100 text-white dark:text-black px-5 py-2 rounded-lg font-medium text-sm transition-colors duration-200 hover:bg-gray-800 dark:hover:bg-gray-200 hover:text-gray-200 dark:hover:text-black",children:s}),e.jsx("button",{className:"text-gray-900 dark:text-gray-100 px-5 py-2 rounded-lg font-medium text-sm transition-colors duration-200 hover:bg-gray-200 dark:hover:bg-gray-800 hover:text-black dark:hover:text-gray-100 border dark:border-gray-700 bg-white dark:bg-gray-900",children:l})]})]})})})},exports.Carousel=function({card:a}){const s=r.useRef(0),l=r.useRef(null);return r.useEffect(()=>{const e=l.current;if(!e)return;const r=e.offsetWidth,t=e.scrollWidth,a=()=>{s.current+=.5,s.current>=t-r&&(s.current=0),e.style.transform=`translateX(-${s.current}px)`,requestAnimationFrame(a)},o=requestAnimationFrame(a);return()=>cancelAnimationFrame(o)},[]),e.jsx("div",{"data-looply":!0,className:"border border-black dark:border-gray-700 rounded-lg max-w-5xl h-[25rem] flex flex-col gap-5 p-10 overflow-hidden bg-white dark:bg-gray-900",children:e.jsx("div",{ref:l,className:"flex flex-row gap-5 flex-1 flex-nowrap",children:a.map((r,a)=>e.jsxs("div",{className:"border border-gray-700 dark:border-gray-700 rounded-lg w-[22rem] flex-shrink-0 bg-white dark:bg-gray-900 overflow-hidden shadow-sm",children:[e.jsx(t,{src:r.image,width:352,height:200,alt:r.text,className:"w-full h-48 object-cover"}),e.jsx("p",{className:"p-5 text-gray-900 dark:text-gray-100 font-inter text-sm",children:r.text})]},a))})})},exports.Chat=function({title:a,img:s,propt:l}){const[o,d]=r.useState(""),[n,i]=r.useState([]),[c,x]=r.useState(!1);async function h(e){x(!0);const r=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}),t=(await r.json()).message;i([...n,{user:e,bot:t}]),console.log(n),x(!1)}function g(){h(o),d("")}return e.jsx(e.Fragment,{children:e.jsxs("div",{"data-looply":!0,className:"w-[37rem] border-1 border-black dark:border-gray-700 px-10 py-5 overflow-auto rounded-sm h-full dark:bg-gray-900",children:[e.jsxs("div",{className:"flex flex-row gap-5 pb-2",children:[e.jsx(t,{className:"p-2 bg-gray-50 rounded-full flex flex-row",src:s,width:40,height:40,alt:"chat-img"}),e.jsx("h1",{className:"text-xl text-gray-800 dark:text-gray-100",children:a})]}),e.jsxs("div",{className:"flex flex-col h-51 ",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("button",{className:"p-1 pl-3 pr-3 rounded-full text-sm border border-black dark:border-gray-600 dark:text-gray-300",onClick:function(){h(l)},children:l})}),e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[c?e.jsx("p",{children:"Loading..."}):null,n.map((r,t)=>e.jsxs("div",{className:"space-y-3 mb-4",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx("div",{className:"bg-gray-300 dark:bg-gray-700 p-3 rounded-sm",children:e.jsx("p",{className:"text-sm font-medium",children:r.user})})}),e.jsx("div",{className:"flex justify-start",children:e.jsx("div",{className:"bg-gray-100 dark:bg-gray-800 p-3 rounded-sm ",children:r.bot.startsWith("data:image/")?e.jsx("img",{src:r.bot,alt:"Generated image",className:"max-w-full h-auto rounded-sm"}):e.jsx("p",{className:"text-sm",children:r.bot})})})]},t))]}),e.jsxs("div",{className:"flex flex-row gap-2 mt-4",children:[e.jsx("input",{className:"flex-1 border border-gray-500 dark:border-gray-600 rounded-sm px-3 py-2 dark:bg-gray-800 dark:text-gray-100 dark:placeholder-gray-400",value:o,onChange:function(e){d(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&g()},type:"text",placeholder:"Type your message..."}),e.jsx("button",{onClick:g,className:"px-4 py-2 border border-black dark:border-gray-600 rounded-sm hover:bg-gray-100 dark:hover:bg-gray-800 dark:text-gray-100",children:"Send"})]})]})]})})},exports.Drawer=function({title:t,size:a,colour:s}){const[l,o]=r.useState(Array(a).fill(!1)),[d,n]=r.useState(s);return e.jsxs("div",{"data-looply":!0,className:"border border-black dark:border-gray-700 border-1 w-[33rem] p-5 rounded-sm dark:bg-gray-900",children:[e.jsxs("div",{className:"flex gap-10 mb-5",children:[e.jsx("h1",{className:"text-xl font-bold mb-4 dark:text-white",children:t}),e.jsx("button",{onClick:()=>o(Array(a).fill(!1)),className:"cursor-pointer px-5 py-0.5 border dark:border-gray-600 rounded-md text-sm dark:text-gray-300 dark:hover:bg-gray-800",children:"Clear"}),e.jsx("input",{type:"color",id:"favcolor",value:d,onChange:e=>n(e.target.value),className:"w-10 h-10 rounded cursor-pointer"})]}),e.jsx("div",{className:"flex flex-wrap flex-row justify-center",children:Array.from({length:a}).map((r,t)=>e.jsx("div",{onMouseEnter:()=>function(e){const r=[...l];r[e]=!0,o(r)}(t),onMouseLeave:()=>function(e){const r=[...l];r[e]=!1,o(r)}(t),style:{backgroundColor:l[t]?d:"transparent"},className:" w-[1rem] h-[1rem] flex justify-center"},t))})]})},exports.Hero=function({header:r,subHeader:t,btn1Text:a,btn2Text:s,headerBtn:l}){return e.jsxs("div",{"data-looply":!0,className:"flex flex-col items-center mt-[6rem] gap-8 w-full font-inter mb-[6rem]",children:[e.jsxs("button",{className:"bg-gray-200 dark:bg-gray-800 py-1 px-5 rounded-xl text-sm font-thin transition-colors \r\n duration-200 hover:bg-gray-300 dark:hover:bg-gray-700 hover:text-black dark:hover:text-white dark:text-gray-300",children:[l," --\x3e"]}),e.jsx("h1",{className:" text-center w-full text-5xl font-bold dark:text-white",children:r}),e.jsx("p",{className:"text-center lg:w-[69ch] sm:w-[40ch] md:w-[50ch] dark:text-gray-300",children:t}),e.jsxs("div",{className:"flex flex-row gap-4 justify-center w-full",children:[e.jsx("button",{className:"text-sm bg-black dark:bg-white cursor-pointer text-white dark:text-black py-3 px-8 rounded-xl\r\n transition-colors duration-200 hover:bg-gray-800 dark:hover:bg-gray-200 hover:text-gray-200 dark:hover:text-black",children:a}),e.jsx("button",{className:"text-sm cursor-pointer py-3 px-8 rounded-xl transition-colors \r\n duration-200 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-black dark:hover:text-white dark:text-gray-300",children:s})]})]})},exports.ThemeSwitch=function({lightIcon:t,darkIcon:s,label:d}){const{theme:n,setTheme:i}=a.useTheme(),[c,x]=r.useState(!1);if(r.useEffect(()=>{x(!0)},[]),!c)return null;const h="dark"===n;return e.jsx("button",{"data-looply":!0,onClick:function(){i(h?"light":"dark")},"aria-label":null!=d?d:"Toggle theme",children:h?null!=s?s:o:null!=t?t:l})};
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ import "./styles/looply.css";
1
2
  export { default as Accordion } from "./components/accordion";
2
3
  export { default as BarChart } from "./components/barChart";
3
4
  export { default as CardText } from "./components/cardText";
4
- export { default as Caroulse } from "./components/carousel";
5
+ export { default as Carousel } from "./components/carousel";
5
6
  export { default as Chat } from "./components/chat";
6
7
  export { default as Drawer } from "./components/drawer";
7
8
  export { default as Hero } from "./components/hero";
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r,Fragment as a}from"react/jsx-runtime";import{useState as t,useRef as l,useEffect as o}from"react";import d from"next/image";import{useTheme as n}from"next-themes";function i({items:a}){const[l,o]=t(Array(a.length).fill(!1));return e("div",{className:"border border-black dark:border-gray-700 rounded-lg overflow-hidden max-w-3xl bg-white dark:bg-gray-900 font-inter",children:a.map((t,d)=>r("div",{className:"border-b border-gray-200 dark:border-gray-700 last:border-b-0",children:[r("div",{className:"flex items-center gap-4 p-5 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors duration-200",onClick:()=>function(e){o(r=>{const t=Array(a.length).fill(!1);return t[e]=!r[e],t})}(d),children:[e("svg",{className:"w-6 h-6 transition-transform duration-200 text-gray-900 dark:text-gray-100 flex-shrink-0 "+(l[d]?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),e("h2",{className:"text-lg font-bold text-gray-800 dark:text-gray-100",children:t.title})]}),e("div",{className:"overflow-hidden transition-all duration-200 "+(l[d]?"max-h-96 opacity-100":"max-h-0 opacity-0"),children:e("p",{className:"px-5 pb-5 pl-[3.75rem] text-gray-700 dark:text-gray-300 text-sm leading-relaxed",children:t.text})})]},d))})}const c=["#1a1a1a","#4d4d4d","#999999","#e6e6e6"];function s({content:a}){const t=a.map((e,r)=>c[r%c.length]),l=a.reduce((e,r)=>Math.max(e,r.size),0),o=a.map(e=>e.size/l*300);return r("div",{className:"w-[650px] flex flex-row gap-[10px] items-end pl-[25px] pr-[25px] pt-[25px] border-black dark:border-gray-700 border-1 h-[300px] rounded-md dark:bg-gray-900",children:[r("div",{className:"border-r-2 border-black dark:border-gray-500 h-full mb-[10px] mr-[10px] flex flex-col justify-between dark:text-gray-300",children:[r("p",{children:[Math.floor(Math.max(l))," "]}),e("p",{children:Math.floor(Math.max(l)/1.5)}),e("p",{children:Math.floor(Math.max(l)/2)}),e("p",{children:Math.floor(Math.max(l)/3)}),e("p",{children:"0"})]}),a.map((a,l)=>r("div",{className:"flex flex-col items-center justify-end h-full w-full ",children:[e("div",{className:"w-full",style:{height:`${o[l]}px`,backgroundColor:t[l]}}),e("p",{className:"text-xs text-center m-1 dark:text-gray-300",children:a.lable})]},l))]})}function h({header:t,subHeader:l,mainText:o,buttonText1:d,buttonText2:n}){return e(a,{children:e("div",{className:"",children:r("div",{className:"lg:w-[22rem] h-[400px] border border-black dark:border-gray-700 rounded-lg px-7 py-5 flex flex-col gap-6 font-inter sm:w-full md:w-[20rem] dark:bg-gray-900 h-full",children:[r("section",{children:[e("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100 mb-1",children:t}),e("p",{className:"text-gray-500 dark:text-gray-400 text-sm",children:l})]}),e("section",{children:e("p",{className:"text-gray-700 dark:text-gray-300 text-sm leading-relaxed",children:o})}),r("section",{className:"flex flex-row gap-3 mt-auto",children:[e("button",{className:"bg-black dark:bg-gray-100 text-white dark:text-black px-5 py-2 rounded-lg font-medium text-sm transition-colors duration-200 hover:bg-gray-800 dark:hover:bg-gray-200 hover:text-gray-200 dark:hover:text-black",children:d}),e("button",{className:"text-gray-900 dark:text-gray-100 px-5 py-2 rounded-lg font-medium text-sm transition-colors duration-200 hover:bg-gray-200 dark:hover:bg-gray-800 hover:text-black dark:hover:text-gray-100 border dark:border-gray-700 bg-white dark:bg-gray-900",children:n})]})]})})})}function g({card:a}){const t=l(0),n=l(null);return o(()=>{const e=n.current;if(!e)return;const r=e.offsetWidth,a=e.scrollWidth,l=()=>{t.current+=.5,t.current>=a-r&&(t.current=0),e.style.transform=`translateX(-${t.current}px)`,requestAnimationFrame(l)},o=requestAnimationFrame(l);return()=>cancelAnimationFrame(o)},[]),e("div",{className:"border border-black dark:border-gray-700 rounded-lg max-w-5xl h-[25rem] flex flex-col gap-5 p-10 overflow-hidden bg-white dark:bg-gray-900",children:e("div",{ref:n,className:"flex flex-row gap-5 flex-1 flex-nowrap",children:a.map((a,t)=>r("div",{className:"border border-gray-700 dark:border-gray-700 rounded-lg w-[22rem] flex-shrink-0 bg-white dark:bg-gray-900 overflow-hidden shadow-sm",children:[e(d,{src:a.image,width:352,height:200,alt:a.text,className:"w-full h-48 object-cover"}),e("p",{className:"p-5 text-gray-900 dark:text-gray-100 font-inter text-sm",children:a.text})]},t))})})}function m({title:l,img:o,propt:n}){const[i,c]=t(""),[s,h]=t([]),[g,m]=t(!1);async function x(e){m(!0);const r=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}),a=(await r.json()).message;h([...s,{user:e,bot:a}]),console.log(s),m(!1)}function b(){x(i),c("")}return e(a,{children:r("div",{className:"w-[37rem] border-1 border-black dark:border-gray-700 px-10 py-5 overflow-auto rounded-sm h-full dark:bg-gray-900",children:[r("div",{className:"flex flex-row gap-5 pb-2",children:[e(d,{className:"p-2 bg-gray-50 rounded-full flex flex-row",src:o,width:40,height:40,alt:"chat-img"}),e("h1",{className:"text-xl text-gray-800 dark:text-gray-100",children:l})]}),r("div",{className:"flex flex-col h-51 ",children:[e("div",{className:"flex justify-center mb-4",children:e("button",{className:"p-1 pl-3 pr-3 rounded-full text-sm border border-black dark:border-gray-600 dark:text-gray-300",onClick:function(){x(n)},children:n})}),r("div",{className:"flex-1 overflow-y-auto",children:[g?e("p",{children:"Loading..."}):null,s.map((a,t)=>r("div",{className:"space-y-3 mb-4",children:[e("div",{className:"flex justify-end",children:e("div",{className:"bg-gray-300 dark:bg-gray-700 p-3 rounded-sm",children:e("p",{className:"text-sm font-medium",children:a.user})})}),e("div",{className:"flex justify-start",children:e("div",{className:"bg-gray-100 dark:bg-gray-800 p-3 rounded-sm ",children:a.bot.startsWith("data:image/")?e("img",{src:a.bot,alt:"Generated image",className:"max-w-full h-auto rounded-sm"}):e("p",{className:"text-sm",children:a.bot})})})]},t))]}),r("div",{className:"flex flex-row gap-2 mt-4",children:[e("input",{className:"flex-1 border border-gray-500 dark:border-gray-600 rounded-sm px-3 py-2 dark:bg-gray-800 dark:text-gray-100 dark:placeholder-gray-400",value:i,onChange:function(e){c(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&b()},type:"text",placeholder:"Type your message..."}),e("button",{onClick:b,className:"px-4 py-2 border border-black dark:border-gray-600 rounded-sm hover:bg-gray-100 dark:hover:bg-gray-800 dark:text-gray-100",children:"Send"})]})]})]})})}function x({title:a,size:l,colour:o}){const[d,n]=t(Array(l).fill(!1)),[i,c]=t(o);return r("div",{className:"border border-black dark:border-gray-700 border-1 w-[33rem] p-5 rounded-sm dark:bg-gray-900",children:[r("div",{className:"flex gap-10 mb-5",children:[e("h1",{className:"text-xl font-bold mb-4 dark:text-white",children:a}),e("button",{onClick:()=>n(Array(l).fill(!1)),className:"cursor-pointer px-5 py-0.5 border dark:border-gray-600 rounded-md text-sm dark:text-gray-300 dark:hover:bg-gray-800",children:"Clear"}),e("input",{type:"color",id:"favcolor",value:i,onChange:e=>c(e.target.value),className:"w-10 h-10 rounded cursor-pointer"})]}),e("div",{className:"flex flex-wrap flex-row justify-center",children:Array.from({length:l}).map((r,a)=>e("div",{onMouseEnter:()=>function(e){const r=[...d];r[e]=!0,n(r)}(a),onMouseLeave:()=>function(e){const r=[...d];r[e]=!1,n(r)}(a),style:{backgroundColor:d[a]?i:"transparent"},className:" w-[1rem] h-[1rem] flex justify-center"},a))})]})}function b({header:a,subHeader:t,btn1Text:l,btn2Text:o,headerBtn:d}){return r("div",{className:"flex flex-col items-center mt-[6rem] gap-8 w-full font-inter mb-[6rem]",children:[r("button",{className:"bg-gray-200 dark:bg-gray-800 py-1 px-5 rounded-xl text-sm font-thin transition-colors \r\n duration-200 hover:bg-gray-300 dark:hover:bg-gray-700 hover:text-black dark:hover:text-white dark:text-gray-300",children:[d," --\x3e"]}),e("h1",{className:" text-center w-full text-5xl font-bold dark:text-white",children:a}),e("p",{className:"text-center lg:w-[69ch] sm:w-[40ch] md:w-[50ch] dark:text-gray-300",children:t}),r("div",{className:"flex flex-row gap-4 justify-center w-full",children:[e("button",{className:"text-sm bg-black dark:bg-white cursor-pointer text-white dark:text-black py-3 px-8 rounded-xl\r\n transition-colors duration-200 hover:bg-gray-800 dark:hover:bg-gray-200 hover:text-gray-200 dark:hover:text-black",children:l}),e("button",{className:"text-sm cursor-pointer py-3 px-8 rounded-xl transition-colors \r\n duration-200 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-black dark:hover:text-white dark:text-gray-300",children:o})]})]})}const u=r("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("circle",{cx:"12",cy:"12",r:"5"}),e("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),f=e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e("path",{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"})});function y({lightIcon:r,darkIcon:a,label:l}){const{theme:d,setTheme:i}=n(),[c,s]=t(!1);if(o(()=>{s(!0)},[]),!c)return null;const h="dark"===d;return e("button",{onClick:function(){i(h?"light":"dark")},"aria-label":null!=l?l:"Toggle theme",children:h?null!=a?a:f:null!=r?r:u})}export{i as Accordion,s as BarChart,h as CardText,g as Caroulse,m as Chat,x as Drawer,b as Hero,y as ThemeSwitch};
1
+ import{jsx as e,jsxs as r,Fragment as a}from"react/jsx-runtime";import{useState as t,useRef as l,useEffect as o}from"react";import d from"next/image";import{useTheme as n}from"next-themes";function i({items:a}){const[l,o]=t(Array(a.length).fill(!1));return e("div",{"data-looply":!0,className:"border border-black dark:border-gray-700 rounded-lg overflow-hidden max-w-3xl bg-white dark:bg-gray-900 font-inter",children:a.map((t,d)=>r("div",{className:"border-b border-gray-200 dark:border-gray-700 last:border-b-0",children:[r("div",{className:"flex items-center gap-4 p-5 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors duration-200",onClick:()=>function(e){o(r=>{const t=Array(a.length).fill(!1);return t[e]=!r[e],t})}(d),children:[e("svg",{className:"w-6 h-6 transition-transform duration-200 text-gray-900 dark:text-gray-100 flex-shrink-0 "+(l[d]?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),e("h2",{className:"text-lg font-bold text-gray-800 dark:text-gray-100",children:t.title})]}),e("div",{className:"overflow-hidden transition-all duration-200 "+(l[d]?"max-h-96 opacity-100":"max-h-0 opacity-0"),children:e("p",{className:"px-5 pb-5 pl-[3.75rem] text-gray-700 dark:text-gray-300 text-sm leading-relaxed",children:t.text})})]},d))})}const c=["#1a1a1a","#4d4d4d","#999999","#e6e6e6"];function s({content:a}){const t=a.map((e,r)=>c[r%c.length]),l=a.reduce((e,r)=>Math.max(e,r.size),0),o=a.map(e=>e.size/l*300);return r("div",{"data-looply":!0,className:"w-[650px] flex flex-row gap-[10px] items-end pl-[25px] pr-[25px] pt-[25px] border-black dark:border-gray-700 border-1 h-[300px] rounded-md dark:bg-gray-900",children:[r("div",{className:"border-r-2 border-black dark:border-gray-500 h-full mb-[10px] mr-[10px] flex flex-col justify-between dark:text-gray-300",children:[r("p",{children:[Math.floor(Math.max(l))," "]}),e("p",{children:Math.floor(Math.max(l)/1.5)}),e("p",{children:Math.floor(Math.max(l)/2)}),e("p",{children:Math.floor(Math.max(l)/3)}),e("p",{children:"0"})]}),a.map((a,l)=>r("div",{className:"flex flex-col items-center justify-end h-full w-full ",children:[e("div",{className:"w-full",style:{height:`${o[l]}px`,backgroundColor:t[l]}}),e("p",{className:"text-xs text-center m-1 dark:text-gray-300",children:a.lable})]},l))]})}function h({header:t,subHeader:l,mainText:o,buttonText1:d,buttonText2:n}){return e(a,{children:e("div",{"data-looply":!0,children:r("div",{className:"lg:w-[22rem] h-[400px] border border-black dark:border-gray-700 rounded-lg px-7 py-5 flex flex-col gap-6 font-inter sm:w-full md:w-[20rem] dark:bg-gray-900 h-full",children:[r("section",{children:[e("h1",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100 mb-1",children:t}),e("p",{className:"text-gray-500 dark:text-gray-400 text-sm",children:l})]}),e("section",{children:e("p",{className:"text-gray-700 dark:text-gray-300 text-sm leading-relaxed",children:o})}),r("section",{className:"flex flex-row gap-3 mt-auto",children:[e("button",{className:"bg-black dark:bg-gray-100 text-white dark:text-black px-5 py-2 rounded-lg font-medium text-sm transition-colors duration-200 hover:bg-gray-800 dark:hover:bg-gray-200 hover:text-gray-200 dark:hover:text-black",children:d}),e("button",{className:"text-gray-900 dark:text-gray-100 px-5 py-2 rounded-lg font-medium text-sm transition-colors duration-200 hover:bg-gray-200 dark:hover:bg-gray-800 hover:text-black dark:hover:text-gray-100 border dark:border-gray-700 bg-white dark:bg-gray-900",children:n})]})]})})})}function g({card:a}){const t=l(0),n=l(null);return o(()=>{const e=n.current;if(!e)return;const r=e.offsetWidth,a=e.scrollWidth,l=()=>{t.current+=.5,t.current>=a-r&&(t.current=0),e.style.transform=`translateX(-${t.current}px)`,requestAnimationFrame(l)},o=requestAnimationFrame(l);return()=>cancelAnimationFrame(o)},[]),e("div",{"data-looply":!0,className:"border border-black dark:border-gray-700 rounded-lg max-w-5xl h-[25rem] flex flex-col gap-5 p-10 overflow-hidden bg-white dark:bg-gray-900",children:e("div",{ref:n,className:"flex flex-row gap-5 flex-1 flex-nowrap",children:a.map((a,t)=>r("div",{className:"border border-gray-700 dark:border-gray-700 rounded-lg w-[22rem] flex-shrink-0 bg-white dark:bg-gray-900 overflow-hidden shadow-sm",children:[e(d,{src:a.image,width:352,height:200,alt:a.text,className:"w-full h-48 object-cover"}),e("p",{className:"p-5 text-gray-900 dark:text-gray-100 font-inter text-sm",children:a.text})]},t))})})}function m({title:l,img:o,propt:n}){const[i,c]=t(""),[s,h]=t([]),[g,m]=t(!1);async function x(e){m(!0);const r=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:e})}),a=(await r.json()).message;h([...s,{user:e,bot:a}]),console.log(s),m(!1)}function b(){x(i),c("")}return e(a,{children:r("div",{"data-looply":!0,className:"w-[37rem] border-1 border-black dark:border-gray-700 px-10 py-5 overflow-auto rounded-sm h-full dark:bg-gray-900",children:[r("div",{className:"flex flex-row gap-5 pb-2",children:[e(d,{className:"p-2 bg-gray-50 rounded-full flex flex-row",src:o,width:40,height:40,alt:"chat-img"}),e("h1",{className:"text-xl text-gray-800 dark:text-gray-100",children:l})]}),r("div",{className:"flex flex-col h-51 ",children:[e("div",{className:"flex justify-center mb-4",children:e("button",{className:"p-1 pl-3 pr-3 rounded-full text-sm border border-black dark:border-gray-600 dark:text-gray-300",onClick:function(){x(n)},children:n})}),r("div",{className:"flex-1 overflow-y-auto",children:[g?e("p",{children:"Loading..."}):null,s.map((a,t)=>r("div",{className:"space-y-3 mb-4",children:[e("div",{className:"flex justify-end",children:e("div",{className:"bg-gray-300 dark:bg-gray-700 p-3 rounded-sm",children:e("p",{className:"text-sm font-medium",children:a.user})})}),e("div",{className:"flex justify-start",children:e("div",{className:"bg-gray-100 dark:bg-gray-800 p-3 rounded-sm ",children:a.bot.startsWith("data:image/")?e("img",{src:a.bot,alt:"Generated image",className:"max-w-full h-auto rounded-sm"}):e("p",{className:"text-sm",children:a.bot})})})]},t))]}),r("div",{className:"flex flex-row gap-2 mt-4",children:[e("input",{className:"flex-1 border border-gray-500 dark:border-gray-600 rounded-sm px-3 py-2 dark:bg-gray-800 dark:text-gray-100 dark:placeholder-gray-400",value:i,onChange:function(e){c(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&b()},type:"text",placeholder:"Type your message..."}),e("button",{onClick:b,className:"px-4 py-2 border border-black dark:border-gray-600 rounded-sm hover:bg-gray-100 dark:hover:bg-gray-800 dark:text-gray-100",children:"Send"})]})]})]})})}function x({title:a,size:l,colour:o}){const[d,n]=t(Array(l).fill(!1)),[i,c]=t(o);return r("div",{"data-looply":!0,className:"border border-black dark:border-gray-700 border-1 w-[33rem] p-5 rounded-sm dark:bg-gray-900",children:[r("div",{className:"flex gap-10 mb-5",children:[e("h1",{className:"text-xl font-bold mb-4 dark:text-white",children:a}),e("button",{onClick:()=>n(Array(l).fill(!1)),className:"cursor-pointer px-5 py-0.5 border dark:border-gray-600 rounded-md text-sm dark:text-gray-300 dark:hover:bg-gray-800",children:"Clear"}),e("input",{type:"color",id:"favcolor",value:i,onChange:e=>c(e.target.value),className:"w-10 h-10 rounded cursor-pointer"})]}),e("div",{className:"flex flex-wrap flex-row justify-center",children:Array.from({length:l}).map((r,a)=>e("div",{onMouseEnter:()=>function(e){const r=[...d];r[e]=!0,n(r)}(a),onMouseLeave:()=>function(e){const r=[...d];r[e]=!1,n(r)}(a),style:{backgroundColor:d[a]?i:"transparent"},className:" w-[1rem] h-[1rem] flex justify-center"},a))})]})}function b({header:a,subHeader:t,btn1Text:l,btn2Text:o,headerBtn:d}){return r("div",{"data-looply":!0,className:"flex flex-col items-center mt-[6rem] gap-8 w-full font-inter mb-[6rem]",children:[r("button",{className:"bg-gray-200 dark:bg-gray-800 py-1 px-5 rounded-xl text-sm font-thin transition-colors \r\n duration-200 hover:bg-gray-300 dark:hover:bg-gray-700 hover:text-black dark:hover:text-white dark:text-gray-300",children:[d," --\x3e"]}),e("h1",{className:" text-center w-full text-5xl font-bold dark:text-white",children:a}),e("p",{className:"text-center lg:w-[69ch] sm:w-[40ch] md:w-[50ch] dark:text-gray-300",children:t}),r("div",{className:"flex flex-row gap-4 justify-center w-full",children:[e("button",{className:"text-sm bg-black dark:bg-white cursor-pointer text-white dark:text-black py-3 px-8 rounded-xl\r\n transition-colors duration-200 hover:bg-gray-800 dark:hover:bg-gray-200 hover:text-gray-200 dark:hover:text-black",children:l}),e("button",{className:"text-sm cursor-pointer py-3 px-8 rounded-xl transition-colors \r\n duration-200 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-black dark:hover:text-white dark:text-gray-300",children:o})]})]})}const u=r("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e("circle",{cx:"12",cy:"12",r:"5"}),e("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),y=e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e("path",{d:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"})});function f({lightIcon:r,darkIcon:a,label:l}){const{theme:d,setTheme:i}=n(),[c,s]=t(!1);if(o(()=>{s(!0)},[]),!c)return null;const h="dark"===d;return e("button",{"data-looply":!0,onClick:function(){i(h?"light":"dark")},"aria-label":null!=l?l:"Toggle theme",children:h?null!=a?a:y:null!=r?r:u})}export{i as Accordion,s as BarChart,h as CardText,g as Carousel,m as Chat,x as Drawer,b as Hero,f as ThemeSwitch};
@@ -0,0 +1 @@
1
+ [data-looply]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#171717;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;line-height:1.5;margin:0;padding:0}[data-looply],[data-looply] *,[data-looply] :after,[data-looply] :before{box-sizing:border-box}:where(.dark,.dark *) [data-looply]{color:#ededed}
package/package.json CHANGED
@@ -1,10 +1,18 @@
1
1
  {
2
2
  "name": "looply-comp-lib",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./styles.css": "./dist/styles.css"
15
+ },
8
16
  "files": [
9
17
  "dist"
10
18
  ],
@@ -71,6 +79,9 @@
71
79
  },
72
80
  "peerDependencies": {
73
81
  "react": ">=18",
74
- "react-dom": ">=18"
82
+ "react-dom": ">=18",
83
+ "next": ">=14",
84
+ "tailwindcss": ">=4",
85
+ "next-themes": ">=0.4"
75
86
  }
76
87
  }