next-ui-lib 0.1.30 → 0.1.31
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/ui.cjs.js +1 -1
- package/dist/ui.es.js +4 -4
- package/dist/ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/ui.cjs.js
CHANGED
|
@@ -719,4 +719,4 @@ button {
|
|
|
719
719
|
px-4 sm:px-6 py-4 sm:py-6 rounded-xl h-full
|
|
720
720
|
flex flex-col relative
|
|
721
721
|
${s}
|
|
722
|
-
`,children:[(e||i||f&&d==="top-right")&&v.jsxs(bn,{className:"mb-4 flex items-start justify-between",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[a&&v.jsx(Je,{color:r,iconSrc:a,onClick:()=>{}}),v.jsxs("div",{children:[e&&v.jsx(wn,{className:"text-main text-xl font-gabaritoBold font-medium leading-5 sm:text-lg md:text-xl",children:e}),i&&v.jsx(pn,{className:"text-sm sm:text-base text-gray-600",children:i})]})]}),f&&d==="top-right"&&v.jsx(We,{label:o,size:m,onClick:k,color:l,variant:t})]}),n&&v.jsx(yn,{className:"flex flex-col gap-4 font-regular",children:n}),f&&d==="bottom-right"&&v.jsx(_n,{className:"flex justify-end pt-2",children:v.jsx(We,{label:o,size:m,onClick:k,color:l,variant:t})})]})},Qa=({bgIconColor:e="amber",iconSrc:i="",label:n="",percentage:a=0,showCard:s=!1,showPercentage:f=!1,loading:o=!1})=>{const d=v.jsxs("div",{className:"flex w-full items-center pt-1",children:[v.jsx(Je,{color:e,iconSrc:i,loading:o,onClick:()=>{}}),v.jsxs("div",{className:"flex flex-col ml-3 flex-1",children:[v.jsxs("div",{className:"flex justify-between mb-1 items-end",children:[n&&(o?v.jsx("p",{className:"h-4 w-16 font-gabaritoMedium my-1 rounded-sm animate-pulse",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec text-md",children:n})),f&&v.jsxs("span",{className:"text-base text-gray-500",children:[a,"%"]})]}),o?v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden animate-pulse",style:{backgroundColor:"#F1F1F1"}}):v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden",style:{backgroundColor:Fn.Gray.value},children:v.jsx("div",{className:"absolute top-0 left-0 h-full rounded-2xl transition-all duration-300",style:{width:`${a}%`,backgroundColor:"#FFC801",boxShadow:"0 1px 2px #CC9F00"}})})]})]});return s?v.jsx(Ze,{children:d}):d},ef=({color:e="lightBlue"})=>{const[i,n]=Y.useState(!1),a={lightBlue:"bg-blue-500",amber:"bg-amber-500",cyan:"bg-cyan-500"},s=f=>{n(f.target.checked)};return v.jsxs("div",{className:"inline-block relative w-12 h-6",children:[v.jsx("input",{checked:i,onChange:s,className:"absolute opacity-0 w-0 h-0",id:`react-switch-${e}`,type:"checkbox"}),v.jsx("label",{className:"block overflow-hidden h-6 rounded-full cursor-pointer bg-gray-300",htmlFor:`react-switch-${e}`,children:v.jsx("span",{className:`block h-6 w-6 rounded-full shadow transform transition-transform duration-200 ${i?`translate-x-full ${a[e]}`:"bg-white"}`})})]})},nf=({color:e="amber",completed:i,size:n=20,loading:a=!1})=>{const s=Pi[e];return a?v.jsx("div",{className:"rounded-full animate-pulse",style:{width:n,height:n,backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):i?v.jsx("div",{className:"flex items-center justify-center border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:s?.value,borderColor:s?.dark},children:v.jsx("img",{src:"src/assets/icons/check.svg",alt:"Icon",width:n*.8,height:n*.8,className:"inline select-none pointer-events-none"})}):v.jsx("div",{className:"border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:"#E5E5E5",borderColor:"#ccc"}})},af=({label:e="",color:i="amber",records:n={},emojiId:a="pancakes",loading:s=!1})=>v.jsxs("div",{className:"flex w-full rounded-lg pt-1",children:[v.jsx(Je,{emojiId:a,color:i,loading:s,onClick:()=>{}}),v.jsxs("div",{className:"w-3/4 h-12 rounded-lg ml-2 flex flex-col justify-between",children:[s?v.jsx("p",{className:"h-4 w-16 mt-1 rounded-sm",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec mb-1",children:e}),v.jsx("div",{className:"flex space-x-2",children:Object.entries(n).map(([f,o])=>v.jsx(nf,{color:i,completed:o,loading:s}))})]})]}),ff=({profiles:e,loading:i=!1,buttonColor:n="lightBlue",buttonLabel:a="more"})=>v.jsx(Ze,{title:"Leaderboard",button:!0,buttonColor:n,buttonLabel:a,buttonSize:"small",children:v.jsx("section",{className:"flex flex-col h-full",children:i?[...Array(10)].map((s,f)=>v.jsxs("article",{className:"flex w-full rounded-md h-1/3 space-x-2 animate-pulse",children:[v.jsx("div",{className:"w-12 h-12 bg-[#F0F0F1] rounded-full"}),v.jsxs("div",{className:"flex flex-col w-3/4 space-y-2 justify-center",children:[v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-1/2"}),v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-4/5"})]})]},f)):e.map((s,f)=>v.jsxs("article",{className:`flex items-center
|
|
722
|
+
`,children:[(e||i||f&&d==="top-right")&&v.jsxs(bn,{className:"mb-4 flex items-start justify-between",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[a&&v.jsx(Je,{color:r,iconSrc:a,onClick:()=>{}}),v.jsxs("div",{children:[e&&v.jsx(wn,{className:"text-main text-xl font-gabaritoBold font-medium leading-5 sm:text-lg md:text-xl",children:e}),i&&v.jsx(pn,{className:"text-sm sm:text-base text-gray-600",children:i})]})]}),f&&d==="top-right"&&v.jsx(We,{label:o,size:m,onClick:k,color:l,variant:t})]}),n&&v.jsx(yn,{className:"flex flex-col gap-4 font-regular flex-1",children:n}),f&&d==="bottom-right"&&v.jsx(_n,{className:"flex justify-end pt-2",children:v.jsx(We,{label:o,size:m,onClick:k,color:l,variant:t})})]})},Qa=({bgIconColor:e="amber",iconSrc:i="",label:n="",percentage:a=0,showCard:s=!1,showPercentage:f=!1,loading:o=!1})=>{const d=v.jsxs("div",{className:"flex w-full items-center pt-1",children:[v.jsx(Je,{color:e,iconSrc:i,loading:o,onClick:()=>{}}),v.jsxs("div",{className:"flex flex-col ml-3 flex-1",children:[v.jsxs("div",{className:"flex justify-between mb-1 items-end",children:[n&&(o?v.jsx("p",{className:"h-4 w-16 font-gabaritoMedium my-1 rounded-sm animate-pulse",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec text-md",children:n})),f&&v.jsxs("span",{className:"text-base text-gray-500",children:[a,"%"]})]}),o?v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden animate-pulse",style:{backgroundColor:"#F1F1F1"}}):v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden",style:{backgroundColor:Fn.Gray.value},children:v.jsx("div",{className:"absolute top-0 left-0 h-full rounded-2xl transition-all duration-300",style:{width:`${a}%`,backgroundColor:"#FFC801",boxShadow:"0 1px 2px #CC9F00"}})})]})]});return s?v.jsx(Ze,{children:d}):d},ef=({color:e="lightBlue"})=>{const[i,n]=Y.useState(!1),a={lightBlue:"bg-blue-500",amber:"bg-amber-500",cyan:"bg-cyan-500"},s=f=>{n(f.target.checked)};return v.jsxs("div",{className:"inline-block relative w-12 h-6",children:[v.jsx("input",{checked:i,onChange:s,className:"absolute opacity-0 w-0 h-0",id:`react-switch-${e}`,type:"checkbox"}),v.jsx("label",{className:"block overflow-hidden h-6 rounded-full cursor-pointer bg-gray-300",htmlFor:`react-switch-${e}`,children:v.jsx("span",{className:`block h-6 w-6 rounded-full shadow transform transition-transform duration-200 ${i?`translate-x-full ${a[e]}`:"bg-white"}`})})]})},nf=({color:e="amber",completed:i,size:n=20,loading:a=!1})=>{const s=Pi[e];return a?v.jsx("div",{className:"rounded-full animate-pulse",style:{width:n,height:n,backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):i?v.jsx("div",{className:"flex items-center justify-center border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:s?.value,borderColor:s?.dark},children:v.jsx("img",{src:"src/assets/icons/check.svg",alt:"Icon",width:n*.8,height:n*.8,className:"inline select-none pointer-events-none"})}):v.jsx("div",{className:"border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:"#E5E5E5",borderColor:"#ccc"}})},af=({label:e="",color:i="amber",records:n={},emojiId:a="pancakes",loading:s=!1})=>v.jsxs("div",{className:"flex w-full rounded-lg pt-1",children:[v.jsx(Je,{emojiId:a,color:i,loading:s,onClick:()=>{}}),v.jsxs("div",{className:"w-3/4 h-12 rounded-lg ml-2 flex flex-col justify-between",children:[s?v.jsx("p",{className:"h-4 w-16 mt-1 rounded-sm",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec mb-1",children:e}),v.jsx("div",{className:"flex space-x-2",children:Object.entries(n).map(([f,o])=>v.jsx(nf,{color:i,completed:o,loading:s}))})]})]}),ff=({profiles:e,loading:i=!1,buttonColor:n="lightBlue",buttonLabel:a="more"})=>v.jsx(Ze,{title:"Leaderboard",button:!0,buttonColor:n,buttonLabel:a,buttonSize:"small",children:v.jsx("section",{className:"flex flex-col space-y-2 h-full",children:i?[...Array(10)].map((s,f)=>v.jsxs("article",{className:"flex w-full rounded-md h-1/3 space-x-2 animate-pulse",children:[v.jsx("div",{className:"w-12 h-12 bg-[#F0F0F1] rounded-full"}),v.jsxs("div",{className:"flex flex-col w-3/4 space-y-2 justify-center",children:[v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-1/2"}),v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-4/5"})]})]},f)):e.map((s,f)=>v.jsxs("article",{className:`flex items-center py-1 rounded-lg cursor-pointer ${s.selected?"border-2 border-[#ffd700] bg-[#ffecb3] hover:border-[#FFC200] hover:bg-[#FFE08A]":"hover:bg-gray-100 hover:cursor-pointer"}`,children:[v.jsx("p",{className:"text-lg font-bold text-sec w-4",children:f+1}),v.jsx("div",{className:"ml-2 w-10 h-10 bg-gray-300 rounded-full overflow-hidden",children:v.jsx("img",{src:s.avatarUrl,alt:`${s.username} avatar`,className:"inline select-none pointer-events-none object-cover"})}),v.jsx("p",{className:"ml-2 flex-grow text-lg font-gabaritoMedium text-sec",children:s.username}),v.jsxs("p",{className:"text-sm font-regular text-sec",children:[s.xp," XP"]})]},f))})});exports.Button=We;exports.Card=Ze;exports.Leaderboard=ff;exports.ProgressBar=Qa;exports.Toggle=ef;exports.WeekStreak=af;
|
package/dist/ui.es.js
CHANGED
|
@@ -5936,7 +5936,7 @@ const Cn = ({
|
|
|
5936
5936
|
}
|
|
5937
5937
|
)
|
|
5938
5938
|
] }),
|
|
5939
|
-
n && /* @__PURE__ */ w(_n, { className: "flex flex-col gap-4 font-regular", children: n }),
|
|
5939
|
+
n && /* @__PURE__ */ w(_n, { className: "flex flex-col gap-4 font-regular flex-1", children: n }),
|
|
5940
5940
|
f && d === "bottom-right" && /* @__PURE__ */ w(xn, { className: "flex justify-end pt-2", children: /* @__PURE__ */ w(
|
|
5941
5941
|
si,
|
|
5942
5942
|
{
|
|
@@ -6150,7 +6150,7 @@ const Cn = ({
|
|
|
6150
6150
|
buttonColor: n,
|
|
6151
6151
|
buttonLabel: a,
|
|
6152
6152
|
buttonSize: "small",
|
|
6153
|
-
children: /* @__PURE__ */ w("section", { className: "flex flex-col h-full", children: i ? [...Array(10)].map((s, f) => /* @__PURE__ */ P(
|
|
6153
|
+
children: /* @__PURE__ */ w("section", { className: "flex flex-col space-y-2 h-full", children: i ? [...Array(10)].map((s, f) => /* @__PURE__ */ P(
|
|
6154
6154
|
"article",
|
|
6155
6155
|
{
|
|
6156
6156
|
className: "flex w-full rounded-md h-1/3 space-x-2 animate-pulse",
|
|
@@ -6166,10 +6166,10 @@ const Cn = ({
|
|
|
6166
6166
|
)) : e.map((s, f) => /* @__PURE__ */ P(
|
|
6167
6167
|
"article",
|
|
6168
6168
|
{
|
|
6169
|
-
className: `flex items-center
|
|
6169
|
+
className: `flex items-center py-1 rounded-lg cursor-pointer ${s.selected ? "border-2 border-[#ffd700] bg-[#ffecb3] hover:border-[#FFC200] hover:bg-[#FFE08A]" : "hover:bg-gray-100 hover:cursor-pointer"}`,
|
|
6170
6170
|
children: [
|
|
6171
6171
|
/* @__PURE__ */ w("p", { className: "text-lg font-bold text-sec w-4", children: f + 1 }),
|
|
6172
|
-
/* @__PURE__ */ w("div", { className: "w-10 h-10 bg-gray-300 rounded-full overflow-hidden", children: /* @__PURE__ */ w(
|
|
6172
|
+
/* @__PURE__ */ w("div", { className: "ml-2 w-10 h-10 bg-gray-300 rounded-full overflow-hidden", children: /* @__PURE__ */ w(
|
|
6173
6173
|
"img",
|
|
6174
6174
|
{
|
|
6175
6175
|
src: s.avatarUrl,
|
package/dist/ui.umd.js
CHANGED
|
@@ -719,4 +719,4 @@ button {
|
|
|
719
719
|
px-4 sm:px-6 py-4 sm:py-6 rounded-xl h-full
|
|
720
720
|
flex flex-col relative
|
|
721
721
|
${s}
|
|
722
|
-
`,children:[(e||i||f&&d==="top-right")&&v.jsxs(un,{className:"mb-4 flex items-start justify-between",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[a&&v.jsx(Ne,{color:r,iconSrc:a,onClick:()=>{}}),v.jsxs("div",{children:[e&&v.jsx(cn,{className:"text-main text-xl font-gabaritoBold font-medium leading-5 sm:text-lg md:text-xl",children:e}),i&&v.jsx(vn,{className:"text-sm sm:text-base text-gray-600",children:i})]})]}),f&&d==="top-right"&&v.jsx(Be,{label:o,size:m,onClick:k,color:l,variant:t})]}),n&&v.jsx(mn,{className:"flex flex-col gap-4 font-regular",children:n}),f&&d==="bottom-right"&&v.jsx(kn,{className:"flex justify-end pt-2",children:v.jsx(Be,{label:o,size:m,onClick:k,color:l,variant:t})})]})},Ua=({bgIconColor:e="amber",iconSrc:i="",label:n="",percentage:a=0,showCard:s=!1,showPercentage:f=!1,loading:o=!1})=>{const d=v.jsxs("div",{className:"flex w-full items-center pt-1",children:[v.jsx(Ne,{color:e,iconSrc:i,loading:o,onClick:()=>{}}),v.jsxs("div",{className:"flex flex-col ml-3 flex-1",children:[v.jsxs("div",{className:"flex justify-between mb-1 items-end",children:[n&&(o?v.jsx("p",{className:"h-4 w-16 font-gabaritoMedium my-1 rounded-sm animate-pulse",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec text-md",children:n})),f&&v.jsxs("span",{className:"text-base text-gray-500",children:[a,"%"]})]}),o?v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden animate-pulse",style:{backgroundColor:"#F1F1F1"}}):v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden",style:{backgroundColor:Sn.Gray.value},children:v.jsx("div",{className:"absolute top-0 left-0 h-full rounded-2xl transition-all duration-300",style:{width:`${a}%`,backgroundColor:"#FFC801",boxShadow:"0 1px 2px #CC9F00"}})})]})]});return s?v.jsx(Je,{children:d}):d},Ka=({color:e="lightBlue"})=>{const[i,n]=K.useState(!1),a={lightBlue:"bg-blue-500",amber:"bg-amber-500",cyan:"bg-cyan-500"},s=f=>{n(f.target.checked)};return v.jsxs("div",{className:"inline-block relative w-12 h-6",children:[v.jsx("input",{checked:i,onChange:s,className:"absolute opacity-0 w-0 h-0",id:`react-switch-${e}`,type:"checkbox"}),v.jsx("label",{className:"block overflow-hidden h-6 rounded-full cursor-pointer bg-gray-300",htmlFor:`react-switch-${e}`,children:v.jsx("span",{className:`block h-6 w-6 rounded-full shadow transform transition-transform duration-200 ${i?`translate-x-full ${a[e]}`:"bg-white"}`})})]})},Ja=({color:e="amber",completed:i,size:n=20,loading:a=!1})=>{const s=Qe[e];return a?v.jsx("div",{className:"rounded-full animate-pulse",style:{width:n,height:n,backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):i?v.jsx("div",{className:"flex items-center justify-center border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:s?.value,borderColor:s?.dark},children:v.jsx("img",{src:"src/assets/icons/check.svg",alt:"Icon",width:n*.8,height:n*.8,className:"inline select-none pointer-events-none"})}):v.jsx("div",{className:"border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:"#E5E5E5",borderColor:"#ccc"}})},Ya=({label:e="",color:i="amber",records:n={},emojiId:a="pancakes",loading:s=!1})=>v.jsxs("div",{className:"flex w-full rounded-lg pt-1",children:[v.jsx(Ne,{emojiId:a,color:i,loading:s,onClick:()=>{}}),v.jsxs("div",{className:"w-3/4 h-12 rounded-lg ml-2 flex flex-col justify-between",children:[s?v.jsx("p",{className:"h-4 w-16 mt-1 rounded-sm",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec mb-1",children:e}),v.jsx("div",{className:"flex space-x-2",children:Object.entries(n).map(([f,o])=>v.jsx(Ja,{color:i,completed:o,loading:s}))})]})]}),Za=({profiles:e,loading:i=!1,buttonColor:n="lightBlue",buttonLabel:a="more"})=>v.jsx(Je,{title:"Leaderboard",button:!0,buttonColor:n,buttonLabel:a,buttonSize:"small",children:v.jsx("section",{className:"flex flex-col h-full",children:i?[...Array(10)].map((s,f)=>v.jsxs("article",{className:"flex w-full rounded-md h-1/3 space-x-2 animate-pulse",children:[v.jsx("div",{className:"w-12 h-12 bg-[#F0F0F1] rounded-full"}),v.jsxs("div",{className:"flex flex-col w-3/4 space-y-2 justify-center",children:[v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-1/2"}),v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-4/5"})]})]},f)):e.map((s,f)=>v.jsxs("article",{className:`flex items-center
|
|
722
|
+
`,children:[(e||i||f&&d==="top-right")&&v.jsxs(un,{className:"mb-4 flex items-start justify-between",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[a&&v.jsx(Ne,{color:r,iconSrc:a,onClick:()=>{}}),v.jsxs("div",{children:[e&&v.jsx(cn,{className:"text-main text-xl font-gabaritoBold font-medium leading-5 sm:text-lg md:text-xl",children:e}),i&&v.jsx(vn,{className:"text-sm sm:text-base text-gray-600",children:i})]})]}),f&&d==="top-right"&&v.jsx(Be,{label:o,size:m,onClick:k,color:l,variant:t})]}),n&&v.jsx(mn,{className:"flex flex-col gap-4 font-regular flex-1",children:n}),f&&d==="bottom-right"&&v.jsx(kn,{className:"flex justify-end pt-2",children:v.jsx(Be,{label:o,size:m,onClick:k,color:l,variant:t})})]})},Ua=({bgIconColor:e="amber",iconSrc:i="",label:n="",percentage:a=0,showCard:s=!1,showPercentage:f=!1,loading:o=!1})=>{const d=v.jsxs("div",{className:"flex w-full items-center pt-1",children:[v.jsx(Ne,{color:e,iconSrc:i,loading:o,onClick:()=>{}}),v.jsxs("div",{className:"flex flex-col ml-3 flex-1",children:[v.jsxs("div",{className:"flex justify-between mb-1 items-end",children:[n&&(o?v.jsx("p",{className:"h-4 w-16 font-gabaritoMedium my-1 rounded-sm animate-pulse",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec text-md",children:n})),f&&v.jsxs("span",{className:"text-base text-gray-500",children:[a,"%"]})]}),o?v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden animate-pulse",style:{backgroundColor:"#F1F1F1"}}):v.jsx("div",{className:"relative w-full h-4 rounded-2xl overflow-hidden",style:{backgroundColor:Sn.Gray.value},children:v.jsx("div",{className:"absolute top-0 left-0 h-full rounded-2xl transition-all duration-300",style:{width:`${a}%`,backgroundColor:"#FFC801",boxShadow:"0 1px 2px #CC9F00"}})})]})]});return s?v.jsx(Je,{children:d}):d},Ka=({color:e="lightBlue"})=>{const[i,n]=K.useState(!1),a={lightBlue:"bg-blue-500",amber:"bg-amber-500",cyan:"bg-cyan-500"},s=f=>{n(f.target.checked)};return v.jsxs("div",{className:"inline-block relative w-12 h-6",children:[v.jsx("input",{checked:i,onChange:s,className:"absolute opacity-0 w-0 h-0",id:`react-switch-${e}`,type:"checkbox"}),v.jsx("label",{className:"block overflow-hidden h-6 rounded-full cursor-pointer bg-gray-300",htmlFor:`react-switch-${e}`,children:v.jsx("span",{className:`block h-6 w-6 rounded-full shadow transform transition-transform duration-200 ${i?`translate-x-full ${a[e]}`:"bg-white"}`})})]})},Ja=({color:e="amber",completed:i,size:n=20,loading:a=!1})=>{const s=Qe[e];return a?v.jsx("div",{className:"rounded-full animate-pulse",style:{width:n,height:n,backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):i?v.jsx("div",{className:"flex items-center justify-center border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:s?.value,borderColor:s?.dark},children:v.jsx("img",{src:"src/assets/icons/check.svg",alt:"Icon",width:n*.8,height:n*.8,className:"inline select-none pointer-events-none"})}):v.jsx("div",{className:"border-[1px] rounded-full",style:{width:n,height:n,backgroundColor:"#E5E5E5",borderColor:"#ccc"}})},Ya=({label:e="",color:i="amber",records:n={},emojiId:a="pancakes",loading:s=!1})=>v.jsxs("div",{className:"flex w-full rounded-lg pt-1",children:[v.jsx(Ne,{emojiId:a,color:i,loading:s,onClick:()=>{}}),v.jsxs("div",{className:"w-3/4 h-12 rounded-lg ml-2 flex flex-col justify-between",children:[s?v.jsx("p",{className:"h-4 w-16 mt-1 rounded-sm",style:{backgroundColor:"#F1F1F1",border:"1px solid #e9e9e9"}}):v.jsx("p",{className:"text-sec mb-1",children:e}),v.jsx("div",{className:"flex space-x-2",children:Object.entries(n).map(([f,o])=>v.jsx(Ja,{color:i,completed:o,loading:s}))})]})]}),Za=({profiles:e,loading:i=!1,buttonColor:n="lightBlue",buttonLabel:a="more"})=>v.jsx(Je,{title:"Leaderboard",button:!0,buttonColor:n,buttonLabel:a,buttonSize:"small",children:v.jsx("section",{className:"flex flex-col space-y-2 h-full",children:i?[...Array(10)].map((s,f)=>v.jsxs("article",{className:"flex w-full rounded-md h-1/3 space-x-2 animate-pulse",children:[v.jsx("div",{className:"w-12 h-12 bg-[#F0F0F1] rounded-full"}),v.jsxs("div",{className:"flex flex-col w-3/4 space-y-2 justify-center",children:[v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-1/2"}),v.jsx("span",{className:"h-4 bg-[#F0F0F1] rounded-sm w-4/5"})]})]},f)):e.map((s,f)=>v.jsxs("article",{className:`flex items-center py-1 rounded-lg cursor-pointer ${s.selected?"border-2 border-[#ffd700] bg-[#ffecb3] hover:border-[#FFC200] hover:bg-[#FFE08A]":"hover:bg-gray-100 hover:cursor-pointer"}`,children:[v.jsx("p",{className:"text-lg font-bold text-sec w-4",children:f+1}),v.jsx("div",{className:"ml-2 w-10 h-10 bg-gray-300 rounded-full overflow-hidden",children:v.jsx("img",{src:s.avatarUrl,alt:`${s.username} avatar`,className:"inline select-none pointer-events-none object-cover"})}),v.jsx("p",{className:"ml-2 flex-grow text-lg font-gabaritoMedium text-sec",children:s.username}),v.jsxs("p",{className:"text-sm font-regular text-sec",children:[s.xp," XP"]})]},f))})});T.Button=Be,T.Card=Je,T.Leaderboard=Za,T.ProgressBar=Ua,T.Toggle=Ka,T.WeekStreak=Ya,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}));
|