dara-ui 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PageLoader/PageLoader.d.ts +83 -0
- package/dist/components/PageLoader/PageLoaderProvider.d.ts +80 -0
- package/dist/components/PageLoader/index.d.ts +5 -0
- package/dist/components/ScrollReveal/ScrollReveal.d.ts +59 -0
- package/dist/components/ScrollReveal/index.d.ts +5 -0
- package/dist/components/ScrollReveal/useScrollReveal.d.ts +36 -0
- package/dist/dara-ui.cjs.js +352 -332
- package/dist/dara-ui.es.js +2786 -2237
- package/dist/index.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/translations/en.d.ts +30 -0
- package/dist/translations/fa.d.ts +30 -0
- package/dist/translations/fr.d.ts +30 -0
- package/dist/translations/index.d.ts +90 -0
- package/package.json +4 -7
package/dist/dara-ui.cjs.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),$e=require("react-dom"),xe=t.forwardRef(({children:r,variant:m="primary",size:s="md",fullWidth:p=!1,loading:l=!1,glow:n,leftIcon:M,rightIcon:h,className:D="",disabled:L,...S},o)=>{const $="inline-flex items-center justify-center gap-2 font-heading font-semibold tracking-wide transition-all duration-180 rounded-full active:scale-95 disabled:opacity-45 disabled:cursor-not-allowed disabled:pointer-events-none relative overflow-hidden hover:-translate-y-0.5",u={primary:"bg-[var(--color-primary-solid)] text-white shadow-[var(--shadow-btn-primary)] hover:bg-[var(--color-primary-hover)] hover:shadow-[var(--shadow-btn-primary-hover)] hover:brightness-105",secondary:"bg-[var(--color-secondary-solid)] text-white shadow-[var(--shadow-btn-secondary)] hover:bg-[var(--color-secondary-hover)] hover:shadow-[var(--shadow-btn-secondary-hover)] hover:brightness-105",accent:"bg-[var(--color-accent-solid)] text-white shadow-[var(--shadow-btn-accent)] hover:bg-[var(--color-accent-hover)] hover:shadow-[var(--shadow-btn-accent-hover)] hover:brightness-105",glass:"glass text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/40 hover:border-[var(--color-border-secondary)] hover:shadow-[var(--shadow-float)]",danger:"bg-[var(--color-danger-solid)] text-white shadow-[var(--shadow-btn-danger)] hover:bg-[var(--color-danger-hover)] hover:shadow-[var(--shadow-btn-danger-hover)] hover:brightness-105",success:"bg-[var(--color-success-solid)] text-white shadow-[var(--shadow-btn-success)] hover:bg-[var(--color-success-hover)] hover:shadow-[var(--shadow-btn-success-hover)] hover:brightness-105",outline:"bg-transparent text-[var(--color-text-primary)] border-2 border-[var(--color-border-primary)] hover:bg-[var(--color-primary-light)] hover:border-[var(--color-primary)] hover:text-[var(--color-primary)] hover:shadow-[var(--shadow-btn-primary)]"},b={sm:"px-4 py-1.5 text-sm min-h-[32px]",md:"px-6 py-2.5 text-base min-h-[40px]",lg:"px-8 py-3.5 text-lg min-h-[48px]"},x={primary:"hover:shadow-[0_0_50px_color-mix(in_srgb,_var(--color-primary-solid)_50%,_transparent)]",secondary:"hover:shadow-[0_0_50px_color-mix(in_srgb,_var(--color-secondary-solid)_50%,_transparent)]",accent:"hover:shadow-[0_0_50px_color-mix(in_srgb,_var(--color-accent-solid)_50%,_transparent)]"},T=[$,u[m],b[s],p?"w-full":"",l?"opacity-80 pointer-events-none":"",n?x[n]:"",D].filter(Boolean).join(" ");return e.jsxs("button",{ref:o,className:T,disabled:L||l,...S,children:[l&&e.jsx("span",{className:"spinner inline-block w-4 h-4 border-2 border-transparent border-t-current rounded-full animate-spin"}),M&&e.jsx("span",{className:"flex-shrink-0",children:M}),r,h&&e.jsx("span",{className:"flex-shrink-0",children:h})]})});xe.displayName="Button";const de=t.forwardRef(({variant:r="primary",size:m="md",glow:s=!1,outline:p=!1,className:l="",children:n,...M},h)=>{const D="inline-flex items-center justify-center font-accent font-medium transition-all duration-180 rounded-full",L={sm:"px-2.5 py-0.5 text-xs",md:"px-3.5 py-1 text-sm",lg:"px-5 py-1.5 text-base"},S={primary:"bg-[var(--color-primary-solid)] text-white",secondary:"bg-[var(--color-secondary-solid)] text-white",success:"bg-[var(--color-success-solid)] text-white",danger:"bg-[var(--color-danger-solid)] text-white",warning:"bg-[var(--color-warning-solid)] text-white"},o={primary:"border-2 border-[var(--color-primary)] text-[var(--color-primary)] bg-transparent",secondary:"border-2 border-[var(--color-secondary)] text-[var(--color-secondary)] bg-transparent",success:"border-2 border-[var(--color-success)] text-[var(--color-success)] bg-transparent",danger:"border-2 border-[var(--color-danger)] text-[var(--color-danger)] bg-transparent",warning:"border-2 border-[var(--color-warning)] text-[var(--color-warning)] bg-transparent"},$={primary:"shadow-[var(--shadow-glow-primary)]",secondary:"shadow-[var(--shadow-glow-secondary)]",success:"shadow-[var(--shadow-glow-success)]",danger:"shadow-[var(--shadow-glow-danger)]",warning:"shadow-[var(--shadow-glow-warning)]"},u=p?o[r]:S[r],b=s?$[r]:"",x=[D,u,L[m],b,l].filter(Boolean).join(" ");return e.jsx("span",{ref:h,className:x,dir:"auto",...M,children:n})});de.displayName="Badge";const xt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),ft=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),Pe=({className:r="h-5 w-5"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),ze=({className:r="h-5 w-5"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),gt=({className:r="h-5 w-5"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),vt=({className:r="h-5 w-5"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Be=({className:r="w-1/2 h-1/2"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),bt=({className:r="w-10 h-10"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A2.25 2.25 0 0022.5 18.75V5.25A2.25 2.25 0 0020.25 3H3.75A2.25 2.25 0 001.5 5.25v13.5A2.25 2.25 0 003.75 21z"})}),yt=({className:r="w-10 h-10"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5"})}),De=({className:r="h-4 w-4"})=>e.jsxs("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M4 21V3"}),e.jsx("path",{d:"M4 3L20 7L4 11Z"})]}),wt=({className:r="h-4 w-4"})=>e.jsxs("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 6v6l4 2"})]}),jt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})}),kt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),St=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})}),Nt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M19.812 5.418c.861.23 1.538.907 1.768 1.768C21.998 8.746 22 12 22 12s0 3.255-.418 4.814a2.504 2.504 0 01-1.768 1.768c-1.56.419-7.814.419-7.814.419s-6.255 0-7.814-.419a2.505 2.505 0 01-1.768-1.768C2 15.255 2 12 2 12s0-3.255.417-4.814a2.507 2.507 0 011.768-1.768C5.744 5 11.998 5 11.998 5s6.255 0 7.814.418zM15.194 12L10.001 15.002V8.998L15.194 12z",clipRule:"evenodd"})}),Ct=({className:r="h-4 w-4"})=>e.jsxs("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:[e.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"5",ry:"5"}),e.jsx("path",{d:"M16 11.37A4 4 0 1112.63 8 4 4 0 0116 11.37z"}),e.jsx("line",{x1:"17.5",y1:"6.5",x2:"17.51",y2:"6.5",strokeLinecap:"round"})]}),Lt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})}),$t=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{d:"M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.815 2.736 3.713 3.66 6.383 3.364.136-.02.275-.039.415-.056-.138.022-.276.04-.415.056-3.912.58-7.387 2.005-2.83 7.078 5.013 5.19 6.87-1.113 7.823-4.308.953 3.195 2.05 9.271 7.733 4.308 4.267-4.308 1.172-6.498-2.74-7.078a8.741 8.741 0 01-.415-.056c.14.017.279.036.415.056 2.67.297 5.568-.628 6.383-3.364.246-.828.624-5.79.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8z"})}),he=t.forwardRef(({type:r="text",size:m="md",validation:s,errorMessage:p,successMessage:l,leftIcon:n,rightIcon:M,glowFocus:h=!0,label:D,helperText:L,fullWidth:S=!1,disabled:o=!1,className:$="",placeholder:u,value:b,onChange:x,onFocus:T,onBlur:j,id:c,...f},g)=>{const[A,y]=t.useState(!1),[I,R]=t.useState(!1),v=t.useId(),a=c||v,w="w-full font-sans transition-all duration-180 outline-none disabled:opacity-60 disabled:cursor-not-allowed placeholder:text-[var(--color-text-tertiary)]",k="bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-elevated)] focus:bg-[var(--color-bg-elevated)]",N={default:"border border-[var(--color-border-primary)] focus:border-[var(--color-primary)]",success:"border border-[var(--color-success)] focus:border-[var(--color-success)]",error:"border border-[var(--color-danger)] focus:border-[var(--color-danger)]",warning:"border border-[var(--color-warning)] focus:border-[var(--color-warning)]"},d=h?{default:"focus:shadow-[var(--shadow-glow-primary)] focus:ring-2 focus:ring-[var(--color-primary)]/20",success:"focus:shadow-[var(--shadow-glow-success)]",error:"focus:shadow-[var(--shadow-glow-danger)]",warning:"focus:shadow-[var(--shadow-glow-warning)]"}[s||"default"]:"",i="rounded-[14px]",z={sm:"px-3 py-1.5 text-sm",md:"px-4 py-3 text-base",lg:"px-5 py-3.5 text-lg"},G={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},q=[w,k,N[s||"default"],d,i,z[m],S?"w-full":"",n?m==="sm"?"pl-9":m==="md"?"pl-11":"pl-14":"",M||r==="password"?m==="sm"?"pr-9":m==="md"?"pr-11":"pr-14":"",o?"opacity-60 cursor-not-allowed":"",$].filter(Boolean).join(" "),B=U=>{R(!0),T==null||T(U)},F=U=>{R(!1),j==null||j(U)},P=()=>o?"text-[var(--color-text-tertiary)]":s==="error"?"text-[var(--color-danger)]":s==="success"?"text-[var(--color-success)]":s==="warning"?"text-[var(--color-warning)]":I?"text-[var(--color-primary)]":"text-[var(--color-text-secondary)]",X=()=>o?"text-[var(--color-text-tertiary)]":s==="error"?"text-[var(--color-danger)]":s==="success"?"text-[var(--color-success)]":s==="warning"?"text-[var(--color-warning)]":I?"text-[var(--color-primary)]":"text-[var(--color-text-tertiary)]";return e.jsxs("div",{className:`${S?"w-full":""} flex flex-col gap-1.5`,children:[D&&e.jsx("label",{htmlFor:a,className:`text-sm font-medium font-sans transition-colors duration-180 ${P()}`,children:D}),e.jsxs("div",{className:"relative group w-full",children:[n&&e.jsx("span",{className:`absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none transition-colors duration-180 ${X()}`,children:e.jsx("span",{className:G[m],children:n})}),e.jsx("input",{ref:g,id:a,type:r==="password"&&A?"text":r,className:q,placeholder:u,value:b,onChange:x,onFocus:B,onBlur:F,disabled:o,"aria-label":D?void 0:u||"Input",...f}),r==="password"&&e.jsx("button",{type:"button",onClick:()=>y(!A),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)] transition-colors cursor-pointer",tabIndex:-1,"aria-label":A?"Hide password":"Show password",children:A?e.jsxs("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}):e.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.542-7a10.05 10.05 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.542 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})})]}),(L||p||l)&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s==="error"&&p&&e.jsxs("span",{className:"text-[var(--color-danger)] flex items-center",children:[e.jsx(ze,{})," ",p]}),s==="success"&&l&&e.jsxs("span",{className:"text-[var(--color-success)] flex items-center",children:[e.jsx(Pe,{})," ",l]}),!s&&L&&e.jsx("span",{className:"text-[var(--color-text-tertiary)]",children:L})]})]})});he.displayName="Input";const Oe=t.forwardRef(({variant:r="glass",padding:m="md",radius:s="standard",float:p=!1,glow:l,className:n="",children:M,style:h,...D},L)=>{const[S,o]=t.useState({x:0,y:0}),[$,u]=t.useState(!1),b=t.useRef(null),x=v=>{if(!b.current||!p)return;const a=b.current.getBoundingClientRect(),w=v.clientX-a.left,k=v.clientY-a.top,N=a.width/2,d=a.height/2,i=(k-d)/d*-6,z=(w-N)/N*6;o({x:i,y:z})},T=()=>{p&&u(!0)},j=()=>{u(!1),o({x:0,y:0})},c={glass:"glass",solid:"glass-solid",outline:"glass-outline"},f={sm:"p-4",md:"p-6",lg:"p-8",none:"p-0"},g={sm:"var(--radius-sm)",md:"var(--radius-md)",standard:"var(--radius-standard)",large:"var(--radius-large)",xl:"var(--radius-xl)",full:"var(--radius-full)"},A={primary:"glow-primary",secondary:"glow-secondary",accent:"glow-accent"},y=p?"float-card":"",I=l?A[l]:"",R=[c[r],f[m],y,I,n].filter(Boolean).join(" ");return e.jsx("div",{ref:v=>{typeof L=="function"?L(v):L&&(L.current=v),b.current=v},className:R,style:{borderRadius:g[s],transform:p&&$?`perspective(800px) rotateX(${S.x}deg) rotateY(${S.y}deg) scale(1.02)`:"perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",transformStyle:p?"preserve-3d":"flat",transition:p?"transform 0.2s ease-out, box-shadow 0.4s ease, border-radius 0.2s ease":"border-radius 0.2s ease",...h},onMouseMove:x,onMouseEnter:T,onMouseLeave:j,...D,children:M})});Oe.displayName="Card";const Ge=({items:r,activeValue:m,defaultValue:s,onChange:p,align:l="left",size:n="md",glowColor:M="primary",fullWidth:h=!1,className:D=""})=>{var w,k;const L=m!==void 0,[S,o]=t.useState(s||((w=r[0])==null?void 0:w.value)||((k=r[0])==null?void 0:k.label)||""),$=L?m:S,[u,b]=t.useState({}),x=t.useRef(null),T=t.useRef(null),j=t.useRef(null),c=t.useRef(null),f=t.useRef(!0),g=(N,d)=>N.value||N.label||`tab-${d}`,A=t.useCallback(N=>{L||o(N),p==null||p(N)},[L,p]),y=t.useCallback(()=>{j.current&&(clearTimeout(j.current),j.current=null),requestAnimationFrame(()=>{if(T.current&&x.current){const N=T.current.getBoundingClientRect(),d=x.current.getBoundingClientRect(),i=N.left-d.left,z=N.width;b(G=>G.left===i&&G.width===z?G:{left:i,width:z})}})},[]);t.useEffect(()=>{if(f.current){f.current=!1,setTimeout(y,100);return}return j.current=setTimeout(()=>{y()},30),()=>{j.current&&(clearTimeout(j.current),j.current=null)}},[$,r,y]),t.useEffect(()=>{const N=()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{y()},150)};return window.addEventListener("resize",N),window.addEventListener("orientationchange",N),()=>{window.removeEventListener("resize",N),window.removeEventListener("orientationchange",N),c.current&&(clearTimeout(c.current),c.current=null)}},[y]);const I=t.useMemo(()=>({sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-2.5 text-lg"}),[]),R=t.useMemo(()=>({primary:"bg-[var(--color-primary)] shadow-[var(--shadow-glow-primary)]",secondary:"bg-[var(--color-secondary)] shadow-[var(--shadow-glow-secondary)]",accent:"bg-[var(--color-accent)] shadow-[var(--shadow-glow-accent)]",success:"bg-[var(--color-success)] shadow-[var(--shadow-glow-success)]",danger:"bg-[var(--color-danger)] shadow-[var(--shadow-glow-danger)]",none:"bg-[var(--color-border-primary)]"}),[]),v=t.useMemo(()=>({left:"justify-start",center:"justify-center",right:"justify-end"}),[]),a=t.useMemo(()=>{var N;return(N=r.find((d,i)=>g(d,i)===$))==null?void 0:N.content},[r,$]);return e.jsxs("div",{className:`w-full ${D}`,children:[e.jsxs("div",{ref:x,className:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),$e=require("react-dom"),fe=t.forwardRef(({children:r,variant:m="primary",size:o="md",fullWidth:u=!1,loading:i=!1,glow:n,leftIcon:L,rightIcon:f,className:M="",disabled:N,...j},a)=>{const $="inline-flex items-center justify-center gap-2 font-heading font-semibold tracking-wide transition-all duration-180 rounded-full active:scale-95 disabled:opacity-45 disabled:cursor-not-allowed disabled:pointer-events-none relative overflow-hidden hover:-translate-y-0.5",c={primary:"bg-[var(--color-primary-solid)] text-white shadow-[var(--shadow-btn-primary)] hover:bg-[var(--color-primary-hover)] hover:shadow-[var(--shadow-btn-primary-hover)] hover:brightness-105",secondary:"bg-[var(--color-secondary-solid)] text-white shadow-[var(--shadow-btn-secondary)] hover:bg-[var(--color-secondary-hover)] hover:shadow-[var(--shadow-btn-secondary-hover)] hover:brightness-105",accent:"bg-[var(--color-accent-solid)] text-white shadow-[var(--shadow-btn-accent)] hover:bg-[var(--color-accent-hover)] hover:shadow-[var(--shadow-btn-accent-hover)] hover:brightness-105",glass:"glass text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/40 hover:border-[var(--color-border-secondary)] hover:shadow-[var(--shadow-float)]",danger:"bg-[var(--color-danger-solid)] text-white shadow-[var(--shadow-btn-danger)] hover:bg-[var(--color-danger-hover)] hover:shadow-[var(--shadow-btn-danger-hover)] hover:brightness-105",success:"bg-[var(--color-success-solid)] text-white shadow-[var(--shadow-btn-success)] hover:bg-[var(--color-success-hover)] hover:shadow-[var(--shadow-btn-success-hover)] hover:brightness-105",outline:"bg-transparent text-[var(--color-text-primary)] border-2 border-[var(--color-border-primary)] hover:bg-[var(--color-primary-light)] hover:border-[var(--color-primary)] hover:text-[var(--color-primary)] hover:shadow-[var(--shadow-btn-primary)]"},x={sm:"px-4 py-1.5 text-sm min-h-[32px]",md:"px-6 py-2.5 text-base min-h-[40px]",lg:"px-8 py-3.5 text-lg min-h-[48px]"},g={primary:"hover:shadow-[0_0_50px_color-mix(in_srgb,_var(--color-primary-solid)_50%,_transparent)]",secondary:"hover:shadow-[0_0_50px_color-mix(in_srgb,_var(--color-secondary-solid)_50%,_transparent)]",accent:"hover:shadow-[0_0_50px_color-mix(in_srgb,_var(--color-accent-solid)_50%,_transparent)]"},R=[$,c[m],x[o],u?"w-full":"",i?"opacity-80 pointer-events-none":"",n?g[n]:"",M].filter(Boolean).join(" ");return e.jsxs("button",{ref:a,className:R,disabled:N||i,...j,children:[i&&e.jsx("span",{className:"spinner inline-block w-4 h-4 border-2 border-transparent border-t-current rounded-full animate-spin"}),L&&e.jsx("span",{className:"flex-shrink-0",children:L}),r,f&&e.jsx("span",{className:"flex-shrink-0",children:f})]})});fe.displayName="Button";const de=t.forwardRef(({variant:r="primary",size:m="md",glow:o=!1,outline:u=!1,className:i="",children:n,...L},f)=>{const M="inline-flex items-center justify-center font-accent font-medium transition-all duration-180 rounded-full",N={sm:"px-2.5 py-0.5 text-xs",md:"px-3.5 py-1 text-sm",lg:"px-5 py-1.5 text-base"},j={primary:"bg-[var(--color-primary-solid)] text-white",secondary:"bg-[var(--color-secondary-solid)] text-white",success:"bg-[var(--color-success-solid)] text-white",danger:"bg-[var(--color-danger-solid)] text-white",warning:"bg-[var(--color-warning-solid)] text-white"},a={primary:"border-2 border-[var(--color-primary)] text-[var(--color-primary)] bg-transparent",secondary:"border-2 border-[var(--color-secondary)] text-[var(--color-secondary)] bg-transparent",success:"border-2 border-[var(--color-success)] text-[var(--color-success)] bg-transparent",danger:"border-2 border-[var(--color-danger)] text-[var(--color-danger)] bg-transparent",warning:"border-2 border-[var(--color-warning)] text-[var(--color-warning)] bg-transparent"},$={primary:"shadow-[var(--shadow-glow-primary)]",secondary:"shadow-[var(--shadow-glow-secondary)]",success:"shadow-[var(--shadow-glow-success)]",danger:"shadow-[var(--shadow-glow-danger)]",warning:"shadow-[var(--shadow-glow-warning)]"},c=u?a[r]:j[r],x=o?$[r]:"",g=[M,c,N[m],x,i].filter(Boolean).join(" ");return e.jsx("span",{ref:f,className:g,dir:"auto",...L,children:n})});de.displayName="Badge";const vt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),bt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),ze=({className:r="h-5 w-5"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),Be=({className:r="h-5 w-5"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),yt=({className:r="h-5 w-5"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),wt=({className:r="h-5 w-5"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Oe=({className:r="w-1/2 h-1/2"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),jt=({className:r="w-10 h-10"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A2.25 2.25 0 0022.5 18.75V5.25A2.25 2.25 0 0020.25 3H3.75A2.25 2.25 0 001.5 5.25v13.5A2.25 2.25 0 003.75 21z"})}),kt=({className:r="w-10 h-10"})=>e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5"})}),Ae=({className:r="h-4 w-4"})=>e.jsxs("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M4 21V3"}),e.jsx("path",{d:"M4 3L20 7L4 11Z"})]}),St=({className:r="h-4 w-4"})=>e.jsxs("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("path",{d:"M12 6v6l4 2"})]}),Nt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})}),Ct=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),Lt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})}),$t=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M19.812 5.418c.861.23 1.538.907 1.768 1.768C21.998 8.746 22 12 22 12s0 3.255-.418 4.814a2.504 2.504 0 01-1.768 1.768c-1.56.419-7.814.419-7.814.419s-6.255 0-7.814-.419a2.505 2.505 0 01-1.768-1.768C2 15.255 2 12 2 12s0-3.255.417-4.814a2.507 2.507 0 011.768-1.768C5.744 5 11.998 5 11.998 5s6.255 0 7.814.418zM15.194 12L10.001 15.002V8.998L15.194 12z",clipRule:"evenodd"})}),Mt=({className:r="h-4 w-4"})=>e.jsxs("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:[e.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"5",ry:"5"}),e.jsx("path",{d:"M16 11.37A4 4 0 1112.63 8 4 4 0 0116 11.37z"}),e.jsx("line",{x1:"17.5",y1:"6.5",x2:"17.51",y2:"6.5",strokeLinecap:"round"})]}),Tt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})}),Rt=({className:r="h-4 w-4"})=>e.jsx("svg",{className:r,fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:e.jsx("path",{d:"M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.815 2.736 3.713 3.66 6.383 3.364.136-.02.275-.039.415-.056-.138.022-.276.04-.415.056-3.912.58-7.387 2.005-2.83 7.078 5.013 5.19 6.87-1.113 7.823-4.308.953 3.195 2.05 9.271 7.733 4.308 4.267-4.308 1.172-6.498-2.74-7.078a8.741 8.741 0 01-.415-.056c.14.017.279.036.415.056 2.67.297 5.568-.628 6.383-3.364.246-.828.624-5.79.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8z"})}),he=t.forwardRef(({type:r="text",size:m="md",validation:o,errorMessage:u,successMessage:i,leftIcon:n,rightIcon:L,glowFocus:f=!0,label:M,helperText:N,fullWidth:j=!1,disabled:a=!1,className:$="",placeholder:c,value:x,onChange:g,onFocus:R,onBlur:S,id:l,...v},h)=>{const[I,b]=t.useState(!1),[D,E]=t.useState(!1),k=t.useId(),s=l||k,w="w-full font-sans transition-all duration-180 outline-none disabled:opacity-60 disabled:cursor-not-allowed placeholder:text-[var(--color-text-tertiary)]",C="bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-elevated)] focus:bg-[var(--color-bg-elevated)]",y={default:"border border-[var(--color-border-primary)] focus:border-[var(--color-primary)]",success:"border border-[var(--color-success)] focus:border-[var(--color-success)]",error:"border border-[var(--color-danger)] focus:border-[var(--color-danger)]",warning:"border border-[var(--color-warning)] focus:border-[var(--color-warning)]"},p=f?{default:"focus:shadow-[var(--shadow-glow-primary)] focus:ring-2 focus:ring-[var(--color-primary)]/20",success:"focus:shadow-[var(--shadow-glow-success)]",error:"focus:shadow-[var(--shadow-glow-danger)]",warning:"focus:shadow-[var(--shadow-glow-warning)]"}[o||"default"]:"",d="rounded-[14px]",z={sm:"px-3 py-1.5 text-sm",md:"px-4 py-3 text-base",lg:"px-5 py-3.5 text-lg"},W={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},q=[w,C,y[o||"default"],p,d,z[m],j?"w-full":"",n?m==="sm"?"pl-9":m==="md"?"pl-11":"pl-14":"",L||r==="password"?m==="sm"?"pr-9":m==="md"?"pr-11":"pr-14":"",a?"opacity-60 cursor-not-allowed":"",$].filter(Boolean).join(" "),B=U=>{E(!0),R==null||R(U)},F=U=>{E(!1),S==null||S(U)},P=()=>a?"text-[var(--color-text-tertiary)]":o==="error"?"text-[var(--color-danger)]":o==="success"?"text-[var(--color-success)]":o==="warning"?"text-[var(--color-warning)]":D?"text-[var(--color-primary)]":"text-[var(--color-text-secondary)]",X=()=>a?"text-[var(--color-text-tertiary)]":o==="error"?"text-[var(--color-danger)]":o==="success"?"text-[var(--color-success)]":o==="warning"?"text-[var(--color-warning)]":D?"text-[var(--color-primary)]":"text-[var(--color-text-tertiary)]";return e.jsxs("div",{className:`${j?"w-full":""} flex flex-col gap-1.5`,children:[M&&e.jsx("label",{htmlFor:s,className:`text-sm font-medium font-sans transition-colors duration-180 ${P()}`,children:M}),e.jsxs("div",{className:"relative group w-full",children:[n&&e.jsx("span",{className:`absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none transition-colors duration-180 ${X()}`,children:e.jsx("span",{className:W[m],children:n})}),e.jsx("input",{ref:h,id:s,type:r==="password"&&I?"text":r,className:q,placeholder:c,value:x,onChange:g,onFocus:B,onBlur:F,disabled:a,"aria-label":M?void 0:c||"Input",...v}),r==="password"&&e.jsx("button",{type:"button",onClick:()=>b(!I),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)] transition-colors cursor-pointer",tabIndex:-1,"aria-label":I?"Hide password":"Show password",children:I?e.jsxs("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}):e.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.542-7a10.05 10.05 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.542 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})})]}),(N||u||i)&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[o==="error"&&u&&e.jsxs("span",{className:"text-[var(--color-danger)] flex items-center",children:[e.jsx(Be,{})," ",u]}),o==="success"&&i&&e.jsxs("span",{className:"text-[var(--color-success)] flex items-center",children:[e.jsx(ze,{})," ",i]}),!o&&N&&e.jsx("span",{className:"text-[var(--color-text-tertiary)]",children:N})]})]})});he.displayName="Input";const We=t.forwardRef(({variant:r="glass",padding:m="md",radius:o="standard",float:u=!1,glow:i,className:n="",children:L,style:f,...M},N)=>{const[j,a]=t.useState({x:0,y:0}),[$,c]=t.useState(!1),x=t.useRef(null),g=k=>{if(!x.current||!u)return;const s=x.current.getBoundingClientRect(),w=k.clientX-s.left,C=k.clientY-s.top,y=s.width/2,p=s.height/2,d=(C-p)/p*-6,z=(w-y)/y*6;a({x:d,y:z})},R=()=>{u&&c(!0)},S=()=>{c(!1),a({x:0,y:0})},l={glass:"glass",solid:"glass-solid",outline:"glass-outline"},v={sm:"p-4",md:"p-6",lg:"p-8",none:"p-0"},h={sm:"var(--radius-sm)",md:"var(--radius-md)",standard:"var(--radius-standard)",large:"var(--radius-large)",xl:"var(--radius-xl)",full:"var(--radius-full)"},I={primary:"glow-primary",secondary:"glow-secondary",accent:"glow-accent"},b=u?"float-card":"",D=i?I[i]:"",E=[l[r],v[m],b,D,n].filter(Boolean).join(" ");return e.jsx("div",{ref:k=>{typeof N=="function"?N(k):N&&(N.current=k),x.current=k},className:E,style:{borderRadius:h[o],transform:u&&$?`perspective(800px) rotateX(${j.x}deg) rotateY(${j.y}deg) scale(1.02)`:"perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",transformStyle:u?"preserve-3d":"flat",transition:u?"transform 0.2s ease-out, box-shadow 0.4s ease, border-radius 0.2s ease":"border-radius 0.2s ease",...f},onMouseMove:g,onMouseEnter:R,onMouseLeave:S,...M,children:L})});We.displayName="Card";const Ge=({items:r,activeValue:m,defaultValue:o,onChange:u,align:i="left",size:n="md",glowColor:L="primary",fullWidth:f=!1,className:M=""})=>{var w,C;const N=m!==void 0,[j,a]=t.useState(o||((w=r[0])==null?void 0:w.value)||((C=r[0])==null?void 0:C.label)||""),$=N?m:j,[c,x]=t.useState({}),g=t.useRef(null),R=t.useRef(null),S=t.useRef(null),l=t.useRef(null),v=t.useRef(!0),h=(y,p)=>y.value||y.label||`tab-${p}`,I=t.useCallback(y=>{N||a(y),u==null||u(y)},[N,u]),b=t.useCallback(()=>{S.current&&(clearTimeout(S.current),S.current=null),requestAnimationFrame(()=>{if(R.current&&g.current){const y=R.current.getBoundingClientRect(),p=g.current.getBoundingClientRect(),d=y.left-p.left,z=y.width;x(W=>W.left===d&&W.width===z?W:{left:d,width:z})}})},[]);t.useEffect(()=>{if(v.current){v.current=!1,setTimeout(b,100);return}return S.current=setTimeout(()=>{b()},30),()=>{S.current&&(clearTimeout(S.current),S.current=null)}},[$,r,b]),t.useEffect(()=>{const y=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{b()},150)};return window.addEventListener("resize",y),window.addEventListener("orientationchange",y),()=>{window.removeEventListener("resize",y),window.removeEventListener("orientationchange",y),l.current&&(clearTimeout(l.current),l.current=null)}},[b]);const D=t.useMemo(()=>({sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-2.5 text-lg"}),[]),E=t.useMemo(()=>({primary:"bg-[var(--color-primary)] shadow-[var(--shadow-glow-primary)]",secondary:"bg-[var(--color-secondary)] shadow-[var(--shadow-glow-secondary)]",accent:"bg-[var(--color-accent)] shadow-[var(--shadow-glow-accent)]",success:"bg-[var(--color-success)] shadow-[var(--shadow-glow-success)]",danger:"bg-[var(--color-danger)] shadow-[var(--shadow-glow-danger)]",none:"bg-[var(--color-border-primary)]"}),[]),k=t.useMemo(()=>({left:"justify-start",center:"justify-center",right:"justify-end"}),[]),s=t.useMemo(()=>{var y;return(y=r.find((p,d)=>h(p,d)===$))==null?void 0:y.content},[r,$]);return e.jsxs("div",{className:`w-full ${M}`,children:[e.jsxs("div",{ref:g,className:`
|
|
2
2
|
relative flex border-b border-[var(--color-border-secondary)]
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
`,role:"tablist",children:[r.map((
|
|
3
|
+
${k[i]}
|
|
4
|
+
${f?"w-full":""}
|
|
5
|
+
`,role:"tablist",children:[r.map((y,p)=>{const d=h(y,p),z=d===$;return e.jsxs("button",{ref:z?R:null,className:`
|
|
6
6
|
relative flex items-center gap-2 font-medium font-sans
|
|
7
7
|
transition-all duration-150
|
|
8
8
|
rounded-t-[--radius-md]
|
|
9
|
-
${
|
|
10
|
-
${
|
|
9
|
+
${D[n]}
|
|
10
|
+
${f?"flex-1 justify-center":""}
|
|
11
11
|
${z?"text-[var(--color-text-primary)]":"text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]"}
|
|
12
|
-
${
|
|
12
|
+
${y.disabled?"opacity-40 cursor-not-allowed pointer-events-none":"cursor-pointer"}
|
|
13
13
|
focus:outline-none focus-visible:ring-2 focus-visible:ring-[#7c5cff]
|
|
14
14
|
hover:bg-[var(--color-bg-elevated)]/20
|
|
15
15
|
select-none
|
|
16
|
-
`,onClick:()=>!
|
|
16
|
+
`,onClick:()=>!y.disabled&&I(d),role:"tab","aria-selected":z,"aria-disabled":y.disabled,tabIndex:z?0:-1,disabled:y.disabled,children:[y.icon&&e.jsx("span",{className:"flex-shrink-0",children:y.icon}),e.jsx("span",{children:y.label})]},d)}),e.jsx("div",{className:`
|
|
17
17
|
absolute bottom-0 h-0.5 rounded-full
|
|
18
18
|
transition-all duration-300 ease-[var(--ease-in-out)]
|
|
19
|
-
${
|
|
19
|
+
${E[L]}
|
|
20
20
|
will-change-transform
|
|
21
|
-
`,style:{...
|
|
21
|
+
`,style:{...c,opacity:c.width?1:0}})]}),e.jsx("div",{className:"pt-4 relative min-h-[60px] overflow-hidden",children:e.jsx("div",{className:`\r
|
|
22
22
|
transition-all duration-300 ease-[var(--ease-in-out)]\r
|
|
23
23
|
animate-fade-slide-in\r
|
|
24
24
|
will-change-transform\r
|
|
25
|
-
`,children:
|
|
25
|
+
`,children:s},$)}),e.jsx("style",{children:`
|
|
26
26
|
@keyframes fadeSlideIn {
|
|
27
27
|
0% {
|
|
28
28
|
opacity: 0;
|
|
@@ -37,54 +37,54 @@
|
|
|
37
37
|
.animate-fade-slide-in {
|
|
38
38
|
animation: fadeSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
|
|
39
39
|
}
|
|
40
|
-
`})]})};Ge.displayName="Tabs";const
|
|
40
|
+
`})]})};Ge.displayName="Tabs";const qe=({items:r,openItems:m,defaultOpenItems:o=[],onOpenChange:u,multiple:i=!1,glass:n=!0,className:L="",size:f="md"})=>{const M=m!==void 0,[N,j]=t.useState(o),a=M?m:N,$=t.useRef(new Map),[c,x]=t.useState({}),g=t.useCallback(l=>{let v;i?a.includes(l)?v=a.filter(h=>h!==l):v=[...a,l]:a.includes(l)&&a.length===1?v=[]:v=[l],M||j(v),u==null||u(v)},[a,i,M,u]);t.useEffect(()=>{const l={};r.forEach(v=>{const h=$.current.get(v.id);h&&(h.style.maxHeight="none",l[v.id]=h.scrollHeight,h.style.maxHeight="0px")}),x(l)},[r]);const R={sm:"px-3 py-2 text-sm",md:"px-4 py-3 text-base",lg:"px-6 py-4 text-lg"},S={sm:"px-5 py-3 text-sm",md:"px-6 py-4 text-base",lg:"px-8 py-6 text-lg"};return e.jsx("div",{className:`${n?"glass":""} overflow-hidden ${L}`,children:r.map((l,v)=>{const h=a.includes(l.id),I=v===0,b=v===r.length-1,D=r.length===1,E=c[l.id]||0;let k="";return D?k="rounded-[--radius-md]":I?k="rounded-t-[--radius-md]":b&&(k="rounded-b-[--radius-md]"),e.jsxs("div",{className:`
|
|
41
41
|
border-b border-[var(--color-border-secondary)] last:border-b-0
|
|
42
42
|
transition-colors duration-180
|
|
43
|
-
${
|
|
44
|
-
`,children:[e.jsxs("button",{onClick:()=>
|
|
43
|
+
${k}
|
|
44
|
+
`,children:[e.jsxs("button",{onClick:()=>g(l.id),disabled:l.disabled,className:`
|
|
45
45
|
w-full flex items-center justify-between
|
|
46
46
|
font-heading font-semibold
|
|
47
47
|
transition-colors duration-180
|
|
48
|
-
${
|
|
49
|
-
${
|
|
50
|
-
${
|
|
48
|
+
${R[f]}
|
|
49
|
+
${l.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
|
50
|
+
${h?"text-[var(--color-primary)]":"text-[var(--color-text-primary)]"}
|
|
51
51
|
hover:bg-[var(--color-bg-elevated)]/30
|
|
52
52
|
focus:outline-none
|
|
53
|
-
`,"aria-expanded":
|
|
53
|
+
`,"aria-expanded":h,"aria-disabled":l.disabled,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[l.icon&&e.jsx("span",{className:"flex-shrink-0",children:l.icon}),l.title]}),e.jsx("span",{className:`
|
|
54
54
|
transition-transform duration-250 text-[var(--color-text-secondary)]
|
|
55
|
-
${
|
|
56
|
-
`,"aria-hidden":"true",children:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{ref:
|
|
55
|
+
${h?"rotate-180":"rotate-0"}
|
|
56
|
+
`,"aria-hidden":"true",children:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{ref:s=>{s?$.current.set(l.id,s):$.current.delete(l.id)},className:`
|
|
57
57
|
overflow-hidden
|
|
58
58
|
transition-[max-height,padding] duration-350 ease-[var(--ease-in-out)]
|
|
59
|
-
${
|
|
60
|
-
`,style:{maxHeight:
|
|
59
|
+
${h?"border-t border-[var(--color-border-secondary)]":""}
|
|
60
|
+
`,style:{maxHeight:h?`${E}px`:"0px",paddingTop:"0",paddingBottom:"0"},children:e.jsx("div",{className:`${S[f]} text-[var(--color-text-secondary)]`,children:l.content})})]},l.id)})})};qe.displayName="Accordion";const Ve=t.forwardRef(({options:r,value:m,defaultValue:o,onChange:u,placeholder:i="Select an option...",searchable:n=!1,searchPlaceholder:L="Search...",disabled:f=!1,fullWidth:M=!1,size:N="md",className:j="",label:a,helperText:$,error:c=!1,errorMessage:x},g)=>{const R=m!==void 0,[S,l]=t.useState(o),[v,h]=t.useState(!1),[I,b]=t.useState(""),D=t.useRef(null),E=t.useRef(null),k=R?m:S,s=r.find(B=>B.value===k),w=n?r.filter(B=>B.label.toLowerCase().includes(I.toLowerCase())):r,C=t.useId(),y=t.useCallback(()=>{f||(h(B=>!B),v||b(""))},[f,v]),p=t.useCallback(B=>{R||l(B),u==null||u(B),h(!1),b("")},[R,u]);t.useEffect(()=>{const B=F=>{D.current&&!D.current.contains(F.target)&&(h(!1),b(""))};return v&&document.addEventListener("mousedown",B),()=>{document.removeEventListener("mousedown",B)}},[v]),t.useEffect(()=>{v&&n&&E.current&&E.current.focus()},[v,n]);const d={sm:{trigger:"px-3 py-1.5 text-sm",option:"px-3 py-1.5 text-sm",search:"px-3 py-1.5 text-sm"},md:{trigger:"px-4 py-2.5 text-base",option:"px-4 py-2.5 text-base",search:"px-4 py-2.5 text-base"},lg:{trigger:"px-5 py-3.5 text-lg",option:"px-5 py-3.5 text-lg",search:"px-5 py-3.5 text-lg"}},z={sm:"w-36",md:"w-44",lg:"w-52"},W={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},q=(s==null?void 0:s.label)||i;return e.jsxs("div",{ref:g,className:`
|
|
61
61
|
flex flex-col gap-1.5
|
|
62
|
-
${
|
|
63
|
-
${
|
|
64
|
-
`,children:[
|
|
62
|
+
${M?"w-full":z[N]}
|
|
63
|
+
${j}
|
|
64
|
+
`,children:[a&&e.jsx("label",{className:"text-sm font-medium text-[var(--color-text-secondary)] font-sans",children:a}),e.jsxs("div",{ref:D,className:"relative w-full",children:[e.jsxs("button",{type:"button",onClick:y,disabled:f,className:`
|
|
65
65
|
w-full flex items-center justify-between gap-2
|
|
66
66
|
font-sans text-[var(--color-text-primary)]
|
|
67
67
|
transition-all duration-[var(--transition-fast)]
|
|
68
68
|
rounded-[var(--radius-md)]
|
|
69
|
-
${
|
|
70
|
-
${
|
|
71
|
-
${
|
|
69
|
+
${d[N].trigger}
|
|
70
|
+
${f?"opacity-60 cursor-not-allowed bg-[var(--color-bg-tertiary)]":"cursor-pointer bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-elevated)]"}
|
|
71
|
+
${c?"border border-[var(--color-danger)] focus:border-[var(--color-danger)]":"border border-[var(--color-border-primary)] focus:border-[var(--color-primary)]"}
|
|
72
72
|
focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]/20
|
|
73
|
-
${
|
|
74
|
-
`,"aria-haspopup":"listbox","aria-expanded":
|
|
73
|
+
${v?"border-[var(--color-primary)]":""}
|
|
74
|
+
`,"aria-haspopup":"listbox","aria-expanded":v,"aria-disabled":f,children:[e.jsxs("span",{className:`
|
|
75
75
|
flex items-center gap-2 min-w-0 truncate
|
|
76
|
-
${
|
|
77
|
-
`,children:[(
|
|
76
|
+
${s?"":"text-[var(--color-text-tertiary)]"}
|
|
77
|
+
`,children:[(s==null?void 0:s.icon)&&e.jsx("span",{className:"flex-shrink-0 inline-flex",children:s.icon}),e.jsx("span",{className:"truncate",dir:"auto",children:q})]}),e.jsx("span",{className:`
|
|
78
78
|
transition-transform duration-[var(--transition-med)] ease-[var(--ease-in-out)]
|
|
79
|
-
${
|
|
79
|
+
${v?"rotate-180":"rotate-0"}
|
|
80
80
|
text-[var(--color-text-tertiary)]
|
|
81
81
|
flex-shrink-0
|
|
82
|
-
`,children:e.jsx("svg",{className:
|
|
82
|
+
`,children:e.jsx("svg",{className:W[N],fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})})]}),e.jsxs("div",{className:`
|
|
83
83
|
z-50 w-full mt-1.5 glass max-h-60 overflow-auto
|
|
84
84
|
rounded-[var(--radius-md)] py-1 shadow-[var(--shadow-float)]
|
|
85
85
|
transition-all duration-[var(--transition-fast)] ease-[var(--ease-in-out)]
|
|
86
|
-
${
|
|
87
|
-
`,style:{position:"absolute"},children:[n&&e.jsxs("div",{className:"px-2 pb-1.5 border-b border-[var(--color-border-secondary)]",children:[e.jsx("label",{htmlFor:`${
|
|
86
|
+
${v?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 -translate-y-2 pointer-events-none"}
|
|
87
|
+
`,style:{position:"absolute"},children:[n&&e.jsxs("div",{className:"px-2 pb-1.5 border-b border-[var(--color-border-secondary)]",children:[e.jsx("label",{htmlFor:`${C}-search`,className:"sr-only",children:L}),e.jsx("input",{ref:E,id:`${C}-search`,type:"text",value:I,onChange:B=>b(B.target.value),placeholder:L,className:`
|
|
88
88
|
w-full font-sans
|
|
89
89
|
bg-[var(--color-bg-secondary)]
|
|
90
90
|
text-[var(--color-text-primary)]
|
|
@@ -92,51 +92,51 @@
|
|
|
92
92
|
rounded-[var(--radius-sm)]
|
|
93
93
|
outline-none
|
|
94
94
|
focus:border-[var(--color-primary)]
|
|
95
|
-
${
|
|
96
|
-
`,onClick:B=>B.stopPropagation()})]}),e.jsx("div",{className:"py-1",role:"listbox","aria-label":
|
|
95
|
+
${d[N].search}
|
|
96
|
+
`,onClick:B=>B.stopPropagation()})]}),e.jsx("div",{className:"py-1",role:"listbox","aria-label":a||"Dropdown options",children:w.length===0?e.jsx("div",{className:`${d[N].option} text-[var(--color-text-tertiary)] text-center`,children:"No options found"}):w.map(B=>{const F=B.value===k;return e.jsxs("div",{role:"option","aria-selected":F,"aria-disabled":B.disabled||void 0,tabIndex:B.disabled?-1:0,onClick:()=>{B.disabled||p(B.value)},onKeyDown:P=>{!B.disabled&&(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),p(B.value))},className:`
|
|
97
97
|
w-full flex items-center gap-2 text-left
|
|
98
|
-
${
|
|
98
|
+
${d[N].option}
|
|
99
99
|
${B.disabled?"opacity-40 cursor-not-allowed":"cursor-pointer hover:bg-[var(--color-bg-elevated)]/50"}
|
|
100
100
|
${F?"bg-[var(--color-primary-light)] text-[var(--color-primary)]":"text-[var(--color-text-primary)]"}
|
|
101
101
|
focus:outline-none focus:bg-[var(--color-bg-elevated)]/30
|
|
102
|
-
`,children:[B.icon&&e.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:B.icon}),e.jsx("span",{className:"truncate",dir:"auto",children:B.label}),F&&e.jsx("span",{className:"ml-auto text-[var(--color-primary)] flex-shrink-0","aria-hidden":"true",children:e.jsx("svg",{className:`${
|
|
102
|
+
`,children:[B.icon&&e.jsx("span",{className:"flex-shrink-0","aria-hidden":"true",children:B.icon}),e.jsx("span",{className:"truncate",dir:"auto",children:B.label}),F&&e.jsx("span",{className:"ml-auto text-[var(--color-primary)] flex-shrink-0","aria-hidden":"true",children:e.jsx("svg",{className:`${W[N]} opacity-80`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})})]},B.value)})})]})]}),($||x)&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-sans",children:[c&&x&&e.jsxs(e.Fragment,{children:[e.jsx("svg",{className:"h-3.5 w-3.5 text-[var(--color-danger)] flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"})}),e.jsx("span",{className:"text-[var(--color-danger)]",children:x})]}),!c&&$&&e.jsx("span",{className:"text-[var(--color-text-tertiary)]",children:$})]})]})});Ve.displayName="Dropdown";const It=300,Me=({isOpen:r,onClose:m,title:o,children:u,size:i="md",closeOnBackdropClick:n=!0,closeOnEscape:L=!0,confirmText:f,cancelText:M,onConfirm:N,className:j=""})=>{const a=t.useRef(null),$=t.useRef(null),[c,x]=t.useState(!1),[g,R]=t.useState(!1),S={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"};t.useEffect(()=>{let h;return r?(x(!0),R(!1),h=setTimeout(()=>{R(!0)},20)):(R(!1),h=setTimeout(()=>{x(!1)},It)),()=>clearTimeout(h)},[r]),t.useEffect(()=>{if(!r||!L)return;const h=I=>{I.key==="Escape"&&m()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r,L,m]),t.useEffect(()=>{var b;if(!r){(b=$.current)==null||b.focus();return}$.current=document.activeElement;const h=setTimeout(()=>{var D;return(D=a.current)==null?void 0:D.focus()},30),I=D=>{if(D.key!=="Tab"||!a.current)return;const E=a.current.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])');if(E.length===0)return;const k=E[0],s=E[E.length-1],w=document.activeElement;D.shiftKey&&w===k?(D.preventDefault(),s.focus()):!D.shiftKey&&w===s&&(D.preventDefault(),k.focus())};return document.addEventListener("keydown",I),()=>{clearTimeout(h),document.removeEventListener("keydown",I)}},[r]);const l=t.useCallback(h=>{n&&h.target===h.currentTarget&&m()},[n,m]),v=t.useCallback(()=>{N==null||N(),m()},[N,m]);return c?$e.createPortal(e.jsx("div",{ref:a,className:`
|
|
103
103
|
fixed inset-0 z-[10001]
|
|
104
104
|
flex items-center justify-center
|
|
105
105
|
bg-[var(--color-bg-primary)]/60 backdrop-blur-[6px]
|
|
106
106
|
transition-all duration-300 ease-[var(--ease-in-out,cubic-bezier(0.4,0,0.2,1))]
|
|
107
|
-
${
|
|
108
|
-
`,onClick:
|
|
107
|
+
${g?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}
|
|
108
|
+
`,onClick:l,role:"dialog","aria-modal":"true","aria-labelledby":o?"modal-title":void 0,tabIndex:-1,children:e.jsxs("div",{className:`
|
|
109
109
|
glass-heavy p-8
|
|
110
|
-
w-[90%] ${
|
|
110
|
+
w-[90%] ${S[i]}
|
|
111
111
|
transition-all duration-300 ease-[var(--ease-in-out,cubic-bezier(0.4,0,0.2,1))]
|
|
112
|
-
${
|
|
113
|
-
${
|
|
114
|
-
`,onClick:
|
|
112
|
+
${g?"scale-100 opacity-100":"scale-90 opacity-0"}
|
|
113
|
+
${j}
|
|
114
|
+
`,onClick:h=>h.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o&&e.jsxs("h3",{id:"modal-title",className:"font-heading text-xl font-bold text-[var(--color-text-primary)] flex items-center gap-2",children:[e.jsx(bt,{className:"h-5 w-5 flex-shrink-0 text-[var(--color-primary)]"}),o]}),e.jsx("button",{onClick:m,className:"text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)] text-2xl leading-none transition-colors duration-180","aria-label":"Close modal",title:"Close",children:"×"})]}),e.jsx("div",{className:"text-[var(--color-text-secondary)] mb-4 font-sans text-sm leading-relaxed",children:u}),(f||M)&&e.jsxs("div",{className:"flex gap-3 mt-6",children:[f&&e.jsx(fe,{variant:"primary",onClick:v,children:f}),M&&e.jsx(fe,{variant:"glass",onClick:m,children:M})]})]})}),document.body):null};Me.displayName="Modal";const He=t.forwardRef(({checked:r,defaultChecked:m=!1,onCheckedChange:o,label:u,size:i="md",glow:n=!1,error:L=!1,disabled:f=!1,className:M="",id:N,...j},a)=>{const $=r!==void 0,[c,x]=t.useState(m),[g,R]=t.useState(!1),S=t.useRef(null),l=$?r:c,v=t.useId(),h=N||v,I=C=>{const y=C.target.checked;$||x(y),o==null||o(y),y&&(R(!0),setTimeout(()=>R(!1),800))},b={sm:{box:"w-4 h-4",icon:"h-2.5 w-2.5",label:"text-sm",gap:"gap-2"},md:{box:"w-5 h-5",icon:"h-3 w-3",label:"text-base",gap:"gap-2.5"},lg:{box:"w-6 h-6",icon:"h-3.5 w-3.5",label:"text-lg",gap:"gap-3"}},D=b[i]||b.md,E=n&&l?"shadow-[var(--shadow-glow-primary)] ring-2 ring-[var(--color-primary)]/30":"",k=L?"border-[var(--color-danger)]":"border-[var(--color-border-primary)]",s=()=>e.jsx("svg",{className:`${D.icon} text-[var(--color-text-inverse)]`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})}),w=()=>{const C=["var(--color-primary)","var(--color-secondary)","var(--color-accent)","var(--color-success)","#ffffff"];return e.jsx("div",{className:"absolute inset-0 pointer-events-none overflow-visible",children:Array.from({length:12}).map((p,d)=>{const z=d/12*360+Math.random()*30,W=12+Math.random()*20,q=2+Math.random()*3,B=C[Math.floor(Math.random()*C.length)],F=Math.random()*.15;return e.jsx("div",{className:"sparkle-particle",style:{left:"50%",top:"50%",width:`${q}px`,height:`${q}px`,backgroundColor:B,borderRadius:"50%",position:"absolute",transform:"translate(-50%, -50%)","--angle":`${z}deg`,"--distance":`${W}px`,animationDelay:`${F}s`}},d)})})};return e.jsxs("label",{htmlFor:h,className:`
|
|
115
115
|
inline-flex items-center
|
|
116
|
-
${
|
|
116
|
+
${D.gap}
|
|
117
117
|
cursor-pointer
|
|
118
|
-
${
|
|
119
|
-
${
|
|
118
|
+
${f?"opacity-50 cursor-not-allowed":""}
|
|
119
|
+
${M}
|
|
120
120
|
align-middle
|
|
121
121
|
w-fit
|
|
122
|
-
`,children:[e.jsx("input",{ref:
|
|
122
|
+
`,children:[e.jsx("input",{ref:C=>{typeof a=="function"?a(C):a&&(a.current=C),S.current=C},id:h,type:"checkbox",checked:l,onChange:I,disabled:f,className:"sr-only","aria-invalid":L,...j}),e.jsxs("div",{className:`
|
|
123
123
|
relative flex-shrink-0
|
|
124
|
-
${
|
|
124
|
+
${D.box}
|
|
125
125
|
rounded-[var(--radius-sm)]
|
|
126
126
|
transition-all duration-[var(--transition-med)]
|
|
127
|
-
${
|
|
128
|
-
${
|
|
129
|
-
${
|
|
127
|
+
${k}
|
|
128
|
+
${f?"bg-[var(--color-bg-tertiary)]":""}
|
|
129
|
+
${l?`bg-[var(--color-primary-solid)] ${E}`:"bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-elevated)]"}
|
|
130
130
|
flex items-center justify-center
|
|
131
131
|
border
|
|
132
|
-
`,style:{boxShadow:
|
|
133
|
-
${
|
|
132
|
+
`,style:{boxShadow:l&&n?"var(--shadow-glow-primary)":"none",alignSelf:"center"},children:[l&&e.jsx("div",{className:"flex items-center justify-center w-full h-full",style:{animation:"checkScale 0.25s ease-out"},children:e.jsx(s,{})}),l&&g&&e.jsx(w,{})]}),u&&e.jsx("span",{className:`
|
|
133
|
+
${D.label}
|
|
134
134
|
text-[var(--color-text-primary)]
|
|
135
135
|
font-sans font-medium
|
|
136
|
-
${
|
|
136
|
+
${f?"text-[var(--color-text-tertiary)]":""}
|
|
137
137
|
select-none
|
|
138
138
|
align-middle
|
|
139
|
-
`,children:
|
|
139
|
+
`,children:u}),e.jsx("style",{children:`
|
|
140
140
|
.sparkle-particle {
|
|
141
141
|
animation: sparkleBurst 0.7s ease-out forwards;
|
|
142
142
|
}
|
|
@@ -168,30 +168,30 @@
|
|
|
168
168
|
transform: scale(1);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
`})]})});
|
|
171
|
+
`})]})});He.displayName="Checkbox";const Fe=t.forwardRef(({checked:r,defaultChecked:m=!1,onCheckedChange:o,label:u,size:i="md",glow:n=!1,disabled:L=!1,onIcon:f,offIcon:M,className:N="",id:j,...a},$)=>{const c=r!==void 0,[x,g]=t.useState(m),[R,S]=t.useState(!1),l=t.useRef(null),[v,h]=t.useState(!1);t.useEffect(()=>{const C=()=>{h(document.documentElement.dir==="rtl")};C();const y=new MutationObserver(C);return y.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),()=>y.disconnect()},[]);const I=c?r:x,b=t.useId(),D=j||b,E=C=>{const y=C.target.checked;c||g(y),o==null||o(y),y&&(S(!0),setTimeout(()=>S(!1),700))},k={sm:{track:"w-10 h-5",thumb:"w-5 h-5",travel:20,label:"text-xs",icon:"text-[10px]",gap:"gap-1.5",thumbOffset:0},md:{track:"w-12 h-6",thumb:"w-6 h-6",travel:24,label:"text-sm",icon:"text-xs",gap:"gap-2",thumbOffset:0},lg:{track:"w-16 h-8",thumb:"w-8 h-8",travel:32,label:"text-base",icon:"text-sm",gap:"gap-2.5",thumbOffset:0}},s=k[i]||k.md;let w=0;return I?w=v?-s.travel:s.travel:w=0,e.jsxs("label",{htmlFor:D,className:`
|
|
172
172
|
inline-flex flex-col items-start
|
|
173
|
-
${
|
|
174
|
-
${
|
|
175
|
-
${
|
|
173
|
+
${s.gap}
|
|
174
|
+
${L?"opacity-50 pointer-events-none":"cursor-pointer"}
|
|
175
|
+
${N}
|
|
176
176
|
w-fit
|
|
177
|
-
`,children:[
|
|
178
|
-
${
|
|
177
|
+
`,children:[u&&e.jsx("span",{className:`
|
|
178
|
+
${s.label}
|
|
179
179
|
font-sans font-medium
|
|
180
180
|
text-[var(--color-text-primary)]
|
|
181
181
|
select-none
|
|
182
|
-
`,children:
|
|
182
|
+
`,children:u}),e.jsxs("div",{className:`
|
|
183
183
|
relative inline-flex items-center
|
|
184
184
|
cursor-pointer
|
|
185
|
-
${
|
|
185
|
+
${L?"cursor-not-allowed":""}
|
|
186
186
|
align-middle
|
|
187
|
-
`,children:[e.jsx("input",{ref:
|
|
187
|
+
`,children:[e.jsx("input",{ref:C=>{typeof $=="function"?$(C):$&&($.current=C),l.current=C},id:D,type:"checkbox",role:"switch",checked:I,onChange:E,disabled:L,className:"sr-only","aria-checked":I,...a}),e.jsxs("div",{className:`
|
|
188
188
|
relative flex-shrink-0
|
|
189
|
-
${
|
|
189
|
+
${s.track}
|
|
190
190
|
rounded-full
|
|
191
191
|
overflow-visible
|
|
192
192
|
transition-all duration-300 ease-[var(--ease-in-out)]
|
|
193
193
|
border-2
|
|
194
|
-
${
|
|
194
|
+
${I?`
|
|
195
195
|
bg-[var(--color-primary)]
|
|
196
196
|
border-[var(--color-primary)]
|
|
197
197
|
backdrop-blur-[12px]
|
|
@@ -200,34 +200,34 @@
|
|
|
200
200
|
border-[var(--color-border-primary)]
|
|
201
201
|
backdrop-blur-[10px]
|
|
202
202
|
`}
|
|
203
|
-
${n&&
|
|
204
|
-
`,style:{boxShadow:n&&
|
|
203
|
+
${n&&I?"shadow-[var(--shadow-glow-primary)] ring-2 ring-[var(--color-primary)]/25":"shadow-[var(--shadow-float)]"}
|
|
204
|
+
`,style:{boxShadow:n&&I?"var(--shadow-glow-primary)":void 0},children:[e.jsx("div",{className:`
|
|
205
205
|
absolute inset-0 rounded-full pointer-events-none
|
|
206
206
|
transition-opacity duration-300
|
|
207
|
-
${
|
|
207
|
+
${I?"opacity-100":"opacity-40"}
|
|
208
208
|
`,style:{background:"linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 55%)"}}),e.jsxs("div",{className:`
|
|
209
209
|
absolute
|
|
210
|
-
${
|
|
210
|
+
${s.thumb}
|
|
211
211
|
rounded-full
|
|
212
212
|
flex items-center justify-center
|
|
213
213
|
transition-transform duration-350
|
|
214
214
|
ease-[cubic-bezier(0.34,1.56,0.64,1)]
|
|
215
|
-
${
|
|
215
|
+
${I?`
|
|
216
216
|
bg-white
|
|
217
217
|
shadow-[0_2px_12px_rgba(0,0,0,0.25),0_0_0_1px_rgba(255,255,255,0.4)]
|
|
218
218
|
`:`
|
|
219
219
|
bg-[var(--color-bg-secondary)]
|
|
220
220
|
shadow-[0_2px_8px_rgba(0,0,0,0.2),0_0_0_1px_var(--color-border-primary)]
|
|
221
221
|
`}
|
|
222
|
-
`,style:{top:"50%",[
|
|
223
|
-
${
|
|
222
|
+
`,style:{top:"50%",[v?"right":"left"]:0,transform:`translateY(-50%) translateX(${w}px)`},children:[I&&f&&e.jsx("span",{className:`
|
|
223
|
+
${s.icon}
|
|
224
224
|
flex items-center justify-center leading-none
|
|
225
225
|
text-[var(--color-primary)]
|
|
226
|
-
`,children:
|
|
227
|
-
${
|
|
226
|
+
`,children:f}),!I&&M&&e.jsx("span",{className:`
|
|
227
|
+
${s.icon}
|
|
228
228
|
flex items-center justify-center leading-none
|
|
229
229
|
text-[var(--color-text-tertiary)]
|
|
230
|
-
`,children:
|
|
230
|
+
`,children:M})]}),I&&R&&e.jsx("div",{className:"absolute inset-0 pointer-events-none overflow-visible",children:Array.from({length:10}).map((C,y)=>{const p=y/10*360+Math.random()*24,d=14+Math.random()*18,z=2+Math.random()*2.5,W=["var(--color-primary)","var(--color-secondary)","var(--color-accent)","#ffffff"],q=W[Math.floor(Math.random()*W.length)],B=Math.random()*.12;return e.jsx("div",{className:"switch-sparkle",style:{position:"absolute",left:v?"20%":"80%",top:"50%",width:`${z}px`,height:`${z}px`,backgroundColor:q,borderRadius:"50%","--angle":`${p}deg`,"--distance":`${d}px`,animationDelay:`${B}s`}},y)})})]})]}),e.jsx("style",{children:`
|
|
231
231
|
.switch-sparkle {
|
|
232
232
|
animation: switchSparkleBurst 0.65s ease-out forwards;
|
|
233
233
|
}
|
|
@@ -244,40 +244,40 @@
|
|
|
244
244
|
opacity: 0;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
`})]})});
|
|
247
|
+
`})]})});Fe.displayName="Switch";const Ye=t.forwardRef(({checked:r,defaultChecked:m=!1,onCheckedChange:o,onChange:u,label:i,size:n="md",glow:L=!1,error:f=!1,disabled:M=!1,value:N,name:j,className:a="",id:$,...c},x)=>{const g=r!==void 0,[R,S]=t.useState(m),[l,v]=t.useState(g?!!r:m),h=t.useRef(null);t.useEffect(()=>{g&&v(!!r)},[r,g]);const I=t.useId(),b=$||I,D=w=>{const C=w.target.checked;v(C),g||S(C),o==null||o(C),u==null||u(w)};t.useEffect(()=>{if(g||!j)return;const w=()=>{const C=h.current;C&&v(C.checked)};return document.addEventListener("change",w,!0),()=>document.removeEventListener("change",w,!0)},[g,j]);const E={sm:{ring:"w-4 h-4",dot:"w-1.5 h-1.5",label:"text-sm",gap:"gap-2"},md:{ring:"w-5 h-5",dot:"w-2 h-2",label:"text-base",gap:"gap-2.5"},lg:{ring:"w-6 h-6",dot:"w-2.5 h-2.5",label:"text-lg",gap:"gap-3"}},k=E[n]||E.md,s=l;return e.jsxs("label",{htmlFor:b,className:`
|
|
248
248
|
inline-flex items-center
|
|
249
|
-
${
|
|
249
|
+
${k.gap}
|
|
250
250
|
cursor-pointer
|
|
251
|
-
${
|
|
252
|
-
${
|
|
251
|
+
${M?"opacity-50 cursor-not-allowed":""}
|
|
252
|
+
${a}
|
|
253
253
|
align-middle
|
|
254
254
|
w-fit
|
|
255
|
-
`,children:[e.jsx("input",{ref:w=>{typeof
|
|
255
|
+
`,children:[e.jsx("input",{ref:w=>{typeof x=="function"?x(w):x&&(x.current=w),h.current=w},id:b,type:"radio",checked:g?r:R,onChange:D,disabled:M,value:N,name:j,className:"sr-only","aria-invalid":f,...c}),e.jsxs("span",{className:`
|
|
256
256
|
relative flex-shrink-0
|
|
257
|
-
${
|
|
257
|
+
${k.ring}
|
|
258
258
|
rounded-full
|
|
259
259
|
flex items-center justify-center
|
|
260
260
|
border-2
|
|
261
261
|
transition-[border-color,box-shadow,background-color] duration-100 ease-out
|
|
262
|
-
${
|
|
263
|
-
${
|
|
262
|
+
${f?"border-[var(--color-danger)]":s?"border-[var(--color-primary)]":"border-[var(--color-border-primary)]"}
|
|
263
|
+
${s?"bg-[var(--color-primary)]/10":"bg-[var(--color-bg-elevated)]/40 hover:bg-[var(--color-bg-elevated)]/60"}
|
|
264
264
|
backdrop-blur-[8px]
|
|
265
|
-
${
|
|
265
|
+
${L&&s?"shadow-[var(--shadow-glow-primary)] ring-2 ring-[var(--color-primary)]/25":""}
|
|
266
266
|
`,style:{alignSelf:"center"},children:[e.jsx("span",{className:`
|
|
267
|
-
${
|
|
267
|
+
${k.dot}
|
|
268
268
|
rounded-full
|
|
269
269
|
bg-[var(--color-primary)]
|
|
270
270
|
transition-transform duration-100
|
|
271
271
|
ease-[cubic-bezier(0.34,1.4,0.64,1)]
|
|
272
|
-
${
|
|
273
|
-
`}),
|
|
274
|
-
${
|
|
272
|
+
${s?"scale-100":"scale-0"}
|
|
273
|
+
`}),s&&e.jsx("span",{className:"absolute inset-0 rounded-full pointer-events-none radio-pulse-ring","aria-hidden":!0},String(s)+b)]}),i&&e.jsx("span",{className:`
|
|
274
|
+
${k.label}
|
|
275
275
|
font-sans font-medium
|
|
276
276
|
text-[var(--color-text-primary)]
|
|
277
277
|
select-none
|
|
278
|
-
${
|
|
278
|
+
${M?"text-[var(--color-text-tertiary)]":""}
|
|
279
279
|
align-middle
|
|
280
|
-
`,children:
|
|
280
|
+
`,children:i}),e.jsx("style",{children:`
|
|
281
281
|
.radio-pulse-ring {
|
|
282
282
|
animation: radioPulse 0.35s ease-out forwards;
|
|
283
283
|
}
|
|
@@ -291,48 +291,48 @@
|
|
|
291
291
|
opacity: 0;
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
`})]})});
|
|
295
|
-
${
|
|
296
|
-
${ie[
|
|
294
|
+
`})]})});Ye.displayName="Radio";const Xe=t.forwardRef(({value:r,defaultValue:m=0,min:o=0,max:u=100,step:i=1,onChange:n,onChangeComplete:L,label:f,suffix:M="%",prefix:N="",showValue:j=!0,valuePosition:a="right",size:$="md",color:c="primary",glow:x=!0,disabled:g=!1,fullWidth:R=!0,className:S=""},l)=>{const v=r!==void 0,[h,I]=t.useState(m),[b,D]=t.useState(!1),[E,k]=t.useState(null),[s,w]=t.useState(!1),C=t.useRef(null),y=t.useRef(null),p=t.useRef(null),d=t.useRef(0),W=Math.max(o,Math.min(u,v?r:h)),q=E!==null?Math.max(o,Math.min(u,E)):W,B=(q-o)/(u-o)*100,F=q>=u,[P,X]=t.useState(!1);t.useEffect(()=>{const _=()=>{X(document.documentElement.dir==="rtl")};_();const te=new MutationObserver(_);return te.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),()=>te.disconnect()},[]),t.useEffect(()=>{const _=d.current;if(F&&_<u&&q>o){w(!0);const te=setTimeout(()=>w(!1),800);return()=>clearTimeout(te)}d.current=q},[F,q,u,o]);const H={primary:{track:"bg-[var(--color-primary)]",glow:"shadow-[var(--shadow-glow-primary)]",thumb:"border-[var(--color-primary)]",text:"text-[var(--color-primary)]"},secondary:{track:"bg-[var(--color-secondary)]",glow:"shadow-[var(--shadow-glow-secondary)]",thumb:"border-[var(--color-secondary)]",text:"text-[var(--color-secondary)]"},accent:{track:"bg-[var(--color-accent)]",glow:"shadow-[var(--shadow-glow-accent)]",thumb:"border-[var(--color-accent)]",text:"text-[var(--color-accent)]"},success:{track:"bg-[var(--color-success)]",glow:"shadow-[var(--shadow-glow-success)]",thumb:"border-[var(--color-success)]",text:"text-[var(--color-success)]"},danger:{track:"bg-[var(--color-danger)]",glow:"shadow-[var(--shadow-glow-danger)]",thumb:"border-[var(--color-danger)]",text:"text-[var(--color-danger)]"},warning:{track:"bg-[var(--color-warning)]",glow:"shadow-[var(--shadow-glow-warning)]",thumb:"border-[var(--color-warning)]",text:"text-[var(--color-warning)]"}}[c],T={sm:{track:"h-1",thumb:"w-4 h-4",thumbInner:"w-2 h-2",value:"text-xs",label:"text-sm",gap:"gap-2",minHeight:"56px"},md:{track:"h-1.5",thumb:"w-5 h-5",thumbInner:"w-2.5 h-2.5",value:"text-sm",label:"text-base",gap:"gap-2.5",minHeight:"64px"},lg:{track:"h-2",thumb:"w-6 h-6",thumbInner:"w-3 h-3",value:"text-base",label:"text-lg",gap:"gap-3",minHeight:"76px"}}[$],V=t.useCallback(_=>{if(!C.current)return q;const te=C.current.getBoundingClientRect();let re=(_-te.left)/te.width;P&&(re=1-re);const A=re*(u-o)+o,G=Math.round(A/i)*i;return Math.max(o,Math.min(u,G))},[o,u,i,q,P]),J=t.useCallback(_=>{p.current!==_&&(p.current=_,v||I(_),n==null||n(_))},[v,n]),K=t.useCallback(_=>{if(g)return;D(!0);const te=V(_);k(te),J(te)},[g,V,J]),Z=t.useCallback(_=>{if(!b||g)return;const te=V(_);k(te),J(te)},[b,g,V,J]),oe=t.useCallback(()=>{if(!b)return;D(!1);const _=E!==null?E:W;k(null),L==null||L(_)},[b,E,W,L]),se=_=>{K(_.clientX),_.preventDefault()};t.useEffect(()=>{if(!b)return;const _=re=>Z(re.clientX),te=()=>oe();return document.addEventListener("mousemove",_),document.addEventListener("mouseup",te),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",te)}},[b,Z,oe]);const ce=_=>{K(_.touches[0].clientX)};t.useEffect(()=>{if(!b)return;const _=re=>Z(re.touches[0].clientX),te=()=>oe();return document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",te),()=>{document.removeEventListener("touchmove",_),document.removeEventListener("touchend",te)}},[b,Z,oe]);const Q=()=>`${N}${q}${M}`,ee={left:"flex-row items-center gap-3",right:"flex-row items-center gap-3",top:"flex-col items-start gap-1.5",bottom:"flex-col items-start gap-1.5"},ie={left:"order-first",right:"order-last",top:"order-first",bottom:"order-last"},me=t.useMemo(()=>{if(!s)return[];const _=["var(--color-primary)","var(--color-secondary)","var(--color-accent)","#ffffff"];return Array.from({length:12},(te,re)=>({id:re,angle:re/12*360+re*7%30,distance:16+re%5*5,size:2+re%3,color:_[re%_.length],delay:re%4*.04}))},[s]),pe={top:"50%",transform:"translateY(-50%)"},Se=b?"none":"width 120ms ease-out",Ee=b?"none":"transform 120ms ease-out",le=a==="top"||a==="bottom",xe=le?T.minHeight:"auto",ge=le?"32px":"auto";return e.jsxs("div",{ref:l,className:`${R?"w-full":"inline-block"} ${S}`,style:{minWidth:le?"140px":"120px",minHeight:xe},children:[f&&e.jsx("label",{className:`block ${T.label} font-medium text-[var(--color-text-secondary)] font-sans mb-1.5`,children:f}),e.jsxs("div",{className:`flex ${ee[a]||ee.right}`,style:{minHeight:le?T.minHeight:"auto"},children:[j&&(a==="left"||a==="top")&&e.jsx("span",{className:`
|
|
295
|
+
${T.value}
|
|
296
|
+
${ie[a]}
|
|
297
297
|
font-mono font-medium
|
|
298
298
|
${H.text}
|
|
299
299
|
min-w-[2.5rem]
|
|
300
300
|
${le?"mb-0.5":""}
|
|
301
|
-
`,children:Q()}),e.jsxs("div",{ref:
|
|
301
|
+
`,children:Q()}),e.jsxs("div",{ref:C,className:`
|
|
302
302
|
relative flex-1
|
|
303
|
-
${
|
|
303
|
+
${T.gap}
|
|
304
304
|
cursor-pointer
|
|
305
|
-
${
|
|
305
|
+
${g?"opacity-50 cursor-not-allowed":""}
|
|
306
306
|
py-2
|
|
307
307
|
`,style:{minHeight:ge},onMouseDown:se,onTouchStart:ce,children:[e.jsx("div",{className:`
|
|
308
308
|
absolute left-0 right-0 w-full
|
|
309
|
-
${
|
|
309
|
+
${T.track}
|
|
310
310
|
rounded-full
|
|
311
311
|
bg-[var(--color-bg-tertiary)]
|
|
312
312
|
`,style:pe}),e.jsx("div",{className:`
|
|
313
313
|
absolute
|
|
314
|
-
${
|
|
314
|
+
${T.track}
|
|
315
315
|
rounded-full
|
|
316
316
|
${H.track}
|
|
317
|
-
${
|
|
318
|
-
`,style:{...pe,width:`${B}%`,[P?"right":"left"]:0,transition:Se}}),e.jsxs("div",{ref:
|
|
317
|
+
${x?H.glow:""}
|
|
318
|
+
`,style:{...pe,width:`${B}%`,[P?"right":"left"]:0,transition:Se}}),e.jsxs("div",{ref:y,className:`
|
|
319
319
|
absolute
|
|
320
|
-
${
|
|
320
|
+
${T.thumb}
|
|
321
321
|
rounded-full
|
|
322
322
|
bg-[var(--color-bg-secondary)]
|
|
323
323
|
border-2
|
|
324
324
|
${H.thumb}
|
|
325
325
|
flex items-center justify-center
|
|
326
326
|
shadow-[var(--shadow-float)]
|
|
327
|
-
${
|
|
328
|
-
`,style:{top:"50%",[P?"right":"left"]:`${B}%`,transform:`translate(${P?"50%":"-50%"}, -50%) scale(${
|
|
329
|
-
${
|
|
327
|
+
${g?"cursor-not-allowed":"cursor-grab active:cursor-grabbing"}
|
|
328
|
+
`,style:{top:"50%",[P?"right":"left"]:`${B}%`,transform:`translate(${P?"50%":"-50%"}, -50%) scale(${b?1.1:1})`,transition:Ee,willChange:b?"transform, left, right":"auto"},children:[e.jsx("div",{className:`
|
|
329
|
+
${T.thumbInner}
|
|
330
330
|
rounded-full
|
|
331
331
|
${H.track}
|
|
332
|
-
${
|
|
333
|
-
`}),
|
|
334
|
-
${
|
|
335
|
-
${ie[
|
|
332
|
+
${x?H.glow:""}
|
|
333
|
+
`}),s&&me.length>0&&e.jsx("div",{className:"absolute inset-0 pointer-events-none overflow-visible",children:me.map(_=>e.jsx("div",{className:"range-sparkle",style:{left:"50%",top:"50%",width:`${_.size}px`,height:`${_.size}px`,backgroundColor:_.color,borderRadius:"50%",position:"absolute",transform:"translate(-50%, -50%)","--angle":`${_.angle}deg`,"--distance":`${_.distance}px`,animationDelay:`${_.delay}s`}},_.id))})]})]}),j&&(a==="right"||a==="bottom")&&e.jsx("span",{className:`
|
|
334
|
+
${T.value}
|
|
335
|
+
${ie[a]}
|
|
336
336
|
font-mono font-medium
|
|
337
337
|
${H.text}
|
|
338
338
|
min-w-[2.5rem]
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
opacity: 0;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
`})]})});
|
|
357
|
+
`})]})});Xe.displayName="Range";const be=[{value:"en",label:"English",dir:"ltr"},{value:"fa",label:"فارسی",dir:"rtl"},{value:"fr",label:"Français",dir:"ltr"}],Te=t.createContext(void 0),Dt=({defaultLanguage:r,translations:m,languages:o,children:u})=>{var c;const i="dara-ui-language",n=o||be,L=()=>{var g;const x=localStorage.getItem(i);return x&&n.some(R=>R.value===x)?x:r||((g=n[0])==null?void 0:g.value)||"en"},[f,M]=t.useState(L),N=t.useCallback((x,g)=>{const R=m[f]||m.en||{},S=x.split(".");let l=R;for(const v of S)if(l&&typeof l=="object"&&v in l)l=l[v];else{let I=m.en||{};for(const b of S)if(I&&typeof I=="object"&&b in I)I=I[b];else return x;l=I;break}return typeof l!="string"?x:g?l.replace(/\{\{(\w+)\}\}/g,(v,h)=>String(g[h]??`{{${h}}}`)):l},[f,m]),j=t.useCallback(x=>{const g=n.find(R=>R.value===x);g&&(M(x),document.documentElement.lang=x,document.documentElement.dir=g.dir||"ltr",localStorage.setItem(i,x),window.dispatchEvent(new CustomEvent("dara-language-change",{detail:{lang:x}})))},[n]);t.useEffect(()=>{const x=L(),g=n.find(R=>R.value===x);g&&(document.documentElement.lang=x,document.documentElement.dir=g.dir||"ltr")},[n]),t.useEffect(()=>{const x=g=>{const{lang:R}=g.detail;R&&R!==f&&M(R)};return window.addEventListener("dara-language-change",x),()=>{window.removeEventListener("dara-language-change",x)}},[f]);const a=((c=n.find(x=>x.value===f))==null?void 0:c.dir)||"ltr",$=t.useMemo(()=>({language:f,setLanguage:j,t:N,languages:n,dir:a}),[f,j,N,n,a]);return e.jsx(Te.Provider,{value:$,children:u})},ue=()=>{const r=t.useContext(Te);if(!r)throw new Error("useI18n must be used within an I18nProvider");return r},_e=r=>`https://flagcdn.com/${{en:"gb",fa:"ir",fr:"fr",de:"de",es:"es",ar:"sa",it:"it",pt:"pt",ru:"ru",ja:"jp",ko:"kr",zh:"cn",nl:"nl",pl:"pl",tr:"tr",vi:"vn",th:"th",id:"id",ms:"my",hi:"in",ur:"pk",he:"il",el:"gr",cs:"cz",hu:"hu",sv:"se",no:"no",da:"dk",fi:"fi",ro:"ro",bg:"bg",hr:"hr",sk:"sk",sl:"si",lt:"lt",lv:"lv",et:"ee",uk:"ua",be:"by",ka:"ge",hy:"am",az:"az"}[r]||r}.svg`,Et=({code:r,className:m=""})=>{const[o,u]=t.useState(!1),i=_e(r);return o?e.jsx("span",{className:`text-xs font-mono text-[var(--color-text-tertiary)] ${m}`,children:r.toUpperCase()}):e.jsx("img",{src:i,alt:`${r} flag`,className:`flex-shrink-0 object-cover rounded-sm ${m}`,style:{width:"20px",height:"15px",minWidth:"20px",minHeight:"15px"},onError:()=>u(!0),loading:"lazy"})},Ue=({value:r,defaultValue:m,onChange:o,availableLanguages:u,size:i="md",iconOnly:n=!1,fixedWidth:L,className:f="",placement:M="bottom",openUpward:N=!1,useContext:j=!0})=>{const[a,$]=t.useState(!1),[c,x]=t.useState(be),g=t.useRef(null),R="dara-ui-language",S=t.useContext(Te),l=j&&S!==void 0,v=r!==void 0,[h,I]=t.useState(()=>{var z;const d=localStorage.getItem(R);return d&&be.find(q=>q.value===d)?d:m||((z=be[0])==null?void 0:z.value)||"en"});let b;v?b=r:l?b=S.language:b=h,t.useEffect(()=>{u&&x(u)},[u]);const D=t.useCallback(d=>{const z=c.find(W=>W.value===d);document.documentElement.lang=d,document.documentElement.dir=(z==null?void 0:z.dir)||"ltr",localStorage.setItem(R,d),window.dispatchEvent(new CustomEvent("dara-language-change",{detail:{lang:d}}))},[c]);t.useEffect(()=>{D(b)},[b,D]),t.useEffect(()=>{const d=z=>{g.current&&!g.current.contains(z.target)&&$(!1)};return a&&document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[a]);const E=t.useCallback(d=>{l?S.setLanguage(d):v||I(d),D(d),o==null||o(d),$(!1)},[l,S,v,o,D]),k=t.useMemo(()=>c.map(d=>({...d,icon:d.icon||e.jsx(Et,{code:d.value})})),[c]),s={sm:{trigger:"px-3 py-1.5 text-xs",option:"px-3 py-1.5 text-xs",icon:"h-3 w-3",iconOnlySize:"w-8 h-8",chevronSize:"h-3 w-3",iconOnlyWidth:"32px",flagSize:"w-4 h-3"},md:{trigger:"px-4 py-2 text-sm",option:"px-4 py-2 text-sm",icon:"h-4 w-4",iconOnlySize:"w-10 h-10",chevronSize:"h-4 w-4",iconOnlyWidth:"40px",flagSize:"w-5 h-3.5"},lg:{trigger:"px-5 py-2.5 text-base",option:"px-5 py-2.5 text-base",icon:"h-5 w-5",iconOnlySize:"w-12 h-12",chevronSize:"h-5 w-5",iconOnlyWidth:"48px",flagSize:"w-6 h-4.5"}},w=k.find(d=>d.value===b),C=n?s[i].iconOnlyWidth:L||"140px",y=()=>N||M==="top"?"bottom-full mb-1.5":"top-full mt-1.5",p=(d,z)=>{const W=_e(d);return e.jsx("img",{src:W,alt:`${d} flag`,className:`flex-shrink-0 object-cover rounded-sm ${z}`,style:{width:i==="sm"?"16px":i==="lg"?"24px":"20px",height:i==="sm"?"12px":i==="lg"?"18px":"15px",minWidth:i==="sm"?"16px":i==="lg"?"24px":"20px",minHeight:i==="sm"?"12px":i==="lg"?"18px":"15px"},onError:q=>{var F;q.currentTarget.style.display="none";const B=document.createElement("span");B.className="text-xs font-mono text-[var(--color-text-tertiary)]",B.textContent=d.toUpperCase(),(F=q.currentTarget.parentNode)==null||F.appendChild(B)},loading:"lazy"})};return n?e.jsxs("div",{ref:g,className:`relative inline-flex ${f}`,children:[e.jsx("button",{type:"button",onClick:()=>$(!a),className:`
|
|
358
358
|
inline-flex items-center justify-center
|
|
359
359
|
bg-[var(--color-bg-tertiary)]
|
|
360
360
|
text-[var(--color-text-primary)]
|
|
@@ -364,25 +364,25 @@
|
|
|
364
364
|
hover:border-[var(--color-border-secondary)]
|
|
365
365
|
transition-all duration-180
|
|
366
366
|
active:scale-95
|
|
367
|
-
${
|
|
367
|
+
${s[i].trigger}
|
|
368
368
|
flex-shrink-0
|
|
369
|
-
`,style:{width:
|
|
369
|
+
`,style:{width:L||s[i].iconOnlyWidth,minWidth:L||s[i].iconOnlyWidth,height:L||s[i].iconOnlyWidth,minHeight:L||s[i].iconOnlyWidth},"aria-expanded":a,"aria-haspopup":"listbox","aria-label":`Current language: ${(w==null?void 0:w.label)||"Language"}`,children:(w==null?void 0:w.icon)||p(b,"w-4 h-3")}),e.jsx("div",{className:`
|
|
370
370
|
absolute z-50
|
|
371
371
|
left-1/2 -translate-x-1/2
|
|
372
|
-
${
|
|
372
|
+
${y()}
|
|
373
373
|
glass
|
|
374
374
|
rounded-[var(--radius-md)]
|
|
375
375
|
py-1
|
|
376
376
|
shadow-[var(--shadow-float)]
|
|
377
377
|
transition-all duration-[var(--transition-fast)] ease-[var(--ease-in-out)]
|
|
378
378
|
overflow-hidden
|
|
379
|
-
${
|
|
380
|
-
`,style:{width:
|
|
379
|
+
${a?"opacity-100 translate-y-0 pointer-events-auto":N?"opacity-0 translate-y-2 pointer-events-none":"opacity-0 -translate-y-2 pointer-events-none"}
|
|
380
|
+
`,style:{width:C,minWidth:C,position:"absolute",top:N?"auto":"100%",bottom:N?"100%":"auto",marginTop:N?"0":"6px",marginBottom:N?"6px":"0"},role:"listbox",children:k.map(d=>{const z=d.value===b;return e.jsx("button",{type:"button",onClick:()=>E(d.value),className:`
|
|
381
381
|
w-full flex items-center justify-center gap-2
|
|
382
|
-
${
|
|
382
|
+
${s[i].option}
|
|
383
383
|
${z?"bg-[var(--color-primary-light)] text-[var(--color-primary)]":"text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/50"}
|
|
384
384
|
transition-colors duration-150
|
|
385
|
-
`,role:"option","aria-selected":z,title:
|
|
385
|
+
`,role:"option","aria-selected":z,title:d.label,children:typeof d.icon=="string"?e.jsx("img",{src:d.icon,alt:`${d.value} flag`,className:"flex-shrink-0 object-cover rounded-sm w-4 h-3",onError:W=>{W.currentTarget.style.display="none"},loading:"lazy"}):d.icon||p(d.value,"w-4 h-3")},d.value)})})]}):e.jsxs("div",{ref:g,className:`relative ${f}`,children:[e.jsxs("button",{type:"button",onClick:()=>$(!a),className:`
|
|
386
386
|
inline-flex items-center
|
|
387
387
|
bg-[var(--color-bg-tertiary)]
|
|
388
388
|
text-[var(--color-text-primary)]
|
|
@@ -392,57 +392,57 @@
|
|
|
392
392
|
hover:border-[var(--color-border-secondary)]
|
|
393
393
|
transition-all duration-180
|
|
394
394
|
active:scale-95
|
|
395
|
-
${
|
|
396
|
-
`,style:{width:
|
|
395
|
+
${s[i].trigger}
|
|
396
|
+
`,style:{width:L||"auto",minWidth:L||"auto"},"aria-expanded":a,"aria-haspopup":"listbox",children:[e.jsxs("span",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(w==null?void 0:w.icon)||p(b,"w-4 h-3"),e.jsx("span",{className:"font-mono tracking-wide truncate",children:(w==null?void 0:w.label)||"Language"})]}),e.jsx("svg",{className:`
|
|
397
397
|
flex-shrink-0 ml-2
|
|
398
398
|
transition-transform duration-[var(--transition-med)] ease-[var(--ease-in-out)]
|
|
399
|
-
${
|
|
400
|
-
${
|
|
399
|
+
${a?"rotate-180":"rotate-0"}
|
|
400
|
+
${s[i].chevronSize}
|
|
401
401
|
`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),e.jsx("div",{className:`
|
|
402
402
|
absolute z-50
|
|
403
403
|
left-1/2 -translate-x-1/2
|
|
404
|
-
${
|
|
404
|
+
${y()}
|
|
405
405
|
pointer-events-none
|
|
406
|
-
`,style:{width:
|
|
406
|
+
`,style:{width:C,minWidth:C,top:"100%",marginTop:"6px"},children:e.jsx("div",{className:`
|
|
407
407
|
glass
|
|
408
408
|
rounded-[var(--radius-md)]
|
|
409
409
|
py-1
|
|
410
410
|
shadow-[var(--shadow-float)]
|
|
411
411
|
transition-all duration-[var(--transition-fast)] ease-[var(--ease-in-out)]
|
|
412
412
|
overflow-hidden
|
|
413
|
-
${
|
|
414
|
-
`,children:
|
|
413
|
+
${a?"opacity-100 translate-y-0 pointer-events-auto":"opacity-0 -translate-y-2 pointer-events-none"}
|
|
414
|
+
`,children:k.map(d=>{const z=d.value===b;return e.jsxs("button",{type:"button",onClick:()=>E(d.value),className:`
|
|
415
415
|
w-full flex items-center gap-2 text-left
|
|
416
|
-
${
|
|
416
|
+
${s[i].option}
|
|
417
417
|
${z?"bg-[var(--color-primary-light)] text-[var(--color-primary)]":"text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/50"}
|
|
418
418
|
transition-colors duration-150
|
|
419
|
-
`,role:"option","aria-selected":z,children:[typeof
|
|
419
|
+
`,role:"option","aria-selected":z,children:[typeof d.icon=="string"?e.jsx("img",{src:d.icon,alt:`${d.value} flag`,className:"flex-shrink-0 object-cover rounded-sm w-4 h-3",onError:W=>{W.currentTarget.style.display="none"},loading:"lazy"}):d.icon||p(d.value,"w-4 h-3"),e.jsx("span",{className:"truncate",children:d.label}),z&&e.jsx("svg",{className:"ml-auto h-4 w-4 flex-shrink-0 text-[var(--color-primary)]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]},d.value)})})})]})};Ue.displayName="LanguageChanger";const Qe=({brand:r,links:m=[],showSecondaryNav:o=!1,secondaryLinks:u=[],showSearch:i=!0,searchPlaceholder:n="Search...",onSearch:L,showLanguageChanger:f=!1,showThemeChanger:M=!1,languageChanger:N,themeChanger:j,languageChangerMobile:a,themeChangerMobile:$,rightContent:c,className:x=""})=>{const{t:g}=ue(),[R,S]=t.useState(!1),[l,v]=t.useState(!1),[h,I]=t.useState(!1),[b,D]=t.useState(""),[E,k]=t.useState(!1),[s,w]=t.useState(!1),C=t.useRef(null),y=t.useRef(null),p=t.useRef(null),d=t.useRef(null),z=typeof document<"u"&&document.documentElement.dir==="rtl";t.useEffect(()=>{const T=()=>w(window.innerWidth<768);return T(),window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[]),t.useEffect(()=>{const T=()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{S(window.scrollY>20)},50)};return window.addEventListener("scroll",T,{passive:!0}),()=>{window.removeEventListener("scroll",T),d.current&&clearTimeout(d.current)}},[]),t.useEffect(()=>{const T=V=>{V.key==="Escape"&&l&&v(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[l]),t.useEffect(()=>(l?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[l]),t.useEffect(()=>{h&&y.current&&y.current.focus()},[h]);const W=t.useCallback(T=>{T.preventDefault(),b.trim()&&L&&L(b)},[b,L]),q=t.useCallback(()=>{v(T=>!T)},[]),B=t.useCallback(()=>{I(T=>!T),h||setTimeout(()=>{var T;return(T=y.current)==null?void 0:T.focus()},100)},[h]),F=t.useCallback(()=>{s&&!b&&I(!1)},[s,b]),P=t.useCallback(()=>{v(!1)},[]),X=t.useCallback(()=>{k(!0)},[]),U=t.useCallback(()=>{k(!1)},[]),H=e.jsx("span",{className:"font-heading font-bold text-lg tracking-tight",style:{background:"var(--gradient-primary)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"DARA UI"}),O=t.useCallback(()=>r?typeof r=="string"?e.jsx("span",{className:"font-heading font-bold text-lg tracking-tight text-[var(--color-text-primary)]",children:r}):r:H,[r]);return e.jsxs(e.Fragment,{children:[e.jsx("nav",{ref:C,className:`
|
|
420
420
|
fixed top-0 left-0 right-0 z-50
|
|
421
421
|
transition-all duration-300 ease-[var(--ease-in-out)]
|
|
422
|
-
${
|
|
423
|
-
${
|
|
424
|
-
`,style:{paddingTop:
|
|
422
|
+
${R?"px-3 md:px-4":""}
|
|
423
|
+
${x}
|
|
424
|
+
`,style:{paddingTop:R?"12px":"0",paddingBottom:R?"12px":"0"},children:e.jsxs("div",{className:`
|
|
425
425
|
mx-auto
|
|
426
426
|
transition-all duration-300 ease-[var(--ease-in-out)]
|
|
427
|
-
${
|
|
428
|
-
`,children:[e.jsxs("div",{className:"grid grid-cols-[auto_1fr_auto] items-center md:gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("a",{href:"/",className:"block",onClick:P,children:O()})}),e.jsx("div",{className:"hidden md:flex items-center justify-center gap-1",children:m.map((
|
|
427
|
+
${R?"glass-heavy rounded-full shadow-[var(--shadow-float)] py-2 px-5 md:px-8":"bg-[var(--color-bg-secondary)]/80 backdrop-blur-[20px] border-b border-[var(--color-border-primary)] py-3 px-5 md:px-8 rounded-none"}
|
|
428
|
+
`,children:[e.jsxs("div",{className:"grid grid-cols-[auto_1fr_auto] items-center md:gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("a",{href:"/",className:"block",onClick:P,children:O()})}),e.jsx("div",{className:"hidden md:flex items-center justify-center gap-1",children:m.map((T,V)=>e.jsxs("a",{href:T.href,className:`
|
|
429
429
|
px-4 py-1.5 rounded-full text-sm font-medium
|
|
430
430
|
transition-all duration-180
|
|
431
431
|
flex items-center gap-2
|
|
432
|
-
${
|
|
433
|
-
`,onClick:P,children:[
|
|
432
|
+
${T.active?"bg-[var(--color-primary-solid)] !text-white shadow-[var(--shadow-glow-primary)] hover:bg-[var(--color-primary-hover)]":"!text-[var(--color-text-secondary)] hover:!text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/30"}
|
|
433
|
+
`,onClick:P,children:[T.icon&&e.jsx("span",{className:"flex-shrink-0",children:T.icon}),T.label]},V))}),e.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[i&&!s&&e.jsx("form",{onSubmit:W,className:"relative",children:e.jsx(he,{ref:y,type:"search",placeholder:n,value:b,onChange:T=>D(T.target.value),size:"sm",className:"w-44 lg:w-56",leftIcon:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})}),i&&s&&e.jsxs("div",{className:`
|
|
434
434
|
flex items-center transition-all duration-300 ease-[var(--ease-in-out)]
|
|
435
|
-
${
|
|
436
|
-
`,children:[
|
|
435
|
+
${h?"w-40":"w-8"}
|
|
436
|
+
`,children:[h&&e.jsx("form",{onSubmit:W,className:"w-full mr-1",children:e.jsx(he,{ref:y,type:"search",placeholder:n,value:b,onChange:T=>D(T.target.value),onBlur:F,size:"sm",className:"w-full"})}),e.jsx("button",{onClick:B,className:"flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/30 transition-all duration-180","aria-label":h?"Close search":"Open search",children:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:h?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})]}),!s&&f&&N,!s&&M&&j,c,e.jsxs("button",{onClick:q,className:"md:hidden relative w-10 h-10 rounded-full bg-[var(--color-bg-tertiary)] hover:bg-[var(--color-bg-elevated)] transition-all duration-180 flex items-center justify-center flex-shrink-0","aria-label":"Toggle menu","aria-expanded":l,children:[e.jsx("span",{className:`absolute block w-5 h-0.5 rounded-full bg-[var(--color-text-primary)] transition-all duration-300 ease-[var(--ease-in-out)] ${l?"rotate-45":"-translate-y-1.5"}`}),e.jsx("span",{className:`absolute block w-5 h-0.5 rounded-full bg-[var(--color-text-primary)] transition-all duration-300 ease-[var(--ease-in-out)] ${l?"opacity-0 scale-0":"opacity-100"}`}),e.jsx("span",{className:`absolute block w-5 h-0.5 rounded-full bg-[var(--color-text-primary)] transition-all duration-300 ease-[var(--ease-in-out)] ${l?"-rotate-45":"translate-y-1.5"}`})]})]})]}),o&&!s&&e.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-[var(--ease-in-out)] ${E?"max-h-20 opacity-100 mt-2":"max-h-0 opacity-0"}`,onMouseEnter:X,onMouseLeave:U,children:e.jsx("div",{className:"flex items-center justify-center gap-1 pt-2 border-t border-[var(--color-border-primary)]",children:u.map((T,V)=>e.jsxs("a",{href:T.href,className:`
|
|
437
437
|
px-3 py-1 rounded-full text-xs font-medium transition-all duration-180 flex items-center gap-1.5
|
|
438
|
-
${
|
|
439
|
-
`,onClick:P,children:[
|
|
438
|
+
${T.active?"bg-[var(--color-primary-solid)] !text-white shadow-[var(--shadow-glow-primary)]":"!text-[var(--color-text-tertiary)] hover:!text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/30"}
|
|
439
|
+
`,onClick:P,children:[T.icon&&e.jsx("span",{className:"flex-shrink-0",children:T.icon}),T.label]},V))})})]})}),e.jsx("div",{className:`
|
|
440
440
|
fixed inset-0 z-[55]
|
|
441
441
|
bg-black/60 backdrop-blur-[6px]
|
|
442
442
|
transition-all duration-300 ease-[var(--ease-in-out)]
|
|
443
443
|
md:hidden
|
|
444
|
-
${
|
|
445
|
-
`,onClick:q,"aria-hidden":"true"}),e.jsxs("div",{ref:
|
|
444
|
+
${l?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}
|
|
445
|
+
`,onClick:q,"aria-hidden":"true"}),e.jsxs("div",{ref:p,className:`
|
|
446
446
|
fixed top-0 z-[60]
|
|
447
447
|
${z?"left-0 rounded-r-[var(--radius-large)]":"right-0 rounded-l-[var(--radius-large)]"}
|
|
448
448
|
w-80 max-w-[85vw] h-full
|
|
@@ -453,61 +453,61 @@
|
|
|
453
453
|
transition-all duration-400 ease-[var(--ease-in-out)]
|
|
454
454
|
md:hidden
|
|
455
455
|
flex flex-col
|
|
456
|
-
${
|
|
457
|
-
`,style:{transform:
|
|
456
|
+
${l?"translate-x-0 opacity-100":z?"-translate-x-full opacity-0":"translate-x-full opacity-0"}
|
|
457
|
+
`,style:{transform:l?"translateX(0)":z?"translateX(-100%)":"translateX(100%)",transition:"transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease"},role:"dialog","aria-modal":"true","aria-label":"Navigation menu",children:[e.jsxs("div",{className:"flex items-center justify-between p-5 border-b border-[var(--color-border-primary)]",children:[e.jsx("a",{href:"/",className:"block",onClick:P,children:O()}),e.jsx("button",{onClick:q,className:"w-9 h-9 rounded-full flex items-center justify-center text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/40 transition-all duration-180","aria-label":"Close menu",children:e.jsx("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-1",children:[m.map((T,V)=>e.jsxs("a",{href:T.href,className:`
|
|
458
458
|
flex items-center gap-3 px-4 py-3.5 rounded-[var(--radius-md)]
|
|
459
459
|
transition-all duration-180
|
|
460
|
-
${
|
|
461
|
-
`,onClick:P,children:[
|
|
460
|
+
${T.active?"bg-[var(--color-primary-solid)] !text-white shadow-[var(--shadow-glow-primary)]":"!text-[var(--color-text-secondary)] hover:!text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/30"}
|
|
461
|
+
`,onClick:P,children:[T.icon&&e.jsx("span",{className:"flex-shrink-0",children:T.icon}),e.jsx("span",{className:"font-medium",children:T.label})]},V)),o&&u.length>0&&e.jsxs("div",{className:"mt-6 pt-4 border-t border-[var(--color-border-primary)] space-y-1",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-tertiary)] font-mono px-4 mb-2",dir:"auto",children:g("navbar.more")}),u.map((T,V)=>e.jsxs("a",{href:T.href,className:`
|
|
462
462
|
flex items-center gap-3 px-4 py-3 rounded-[var(--radius-md)]
|
|
463
463
|
transition-all duration-180
|
|
464
|
-
${
|
|
465
|
-
`,onClick:P,children:[
|
|
464
|
+
${T.active?"bg-[var(--color-primary-solid)] !text-white":"!text-[var(--color-text-secondary)] hover:!text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/30"}
|
|
465
|
+
`,onClick:P,children:[T.icon&&e.jsx("span",{className:"flex-shrink-0",children:T.icon}),e.jsx("span",{className:"font-medium",children:T.label})]},V))]})]}),e.jsxs("div",{className:"p-5 border-t border-[var(--color-border-primary)] space-y-4",children:[i&&e.jsx("form",{onSubmit:W,children:e.jsx(he,{type:"search",placeholder:n,value:b,onChange:T=>D(T.target.value),size:"sm",className:"w-full",leftIcon:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})}),e.jsxs("div",{className:"flex items-center gap-3",children:[f&&(a||N),M&&($||j)]}),c&&e.jsx("div",{className:"pt-1",children:c})]})]})]})};Qe.displayName="Navbar";const Je=({brand:r,groups:m=[],collapsible:o=!0,defaultCollapsed:u=!1,collapsed:i,onCollapseChange:n,iconOnly:L=!1,showGroupLabels:f=!0,activeItemId:M,defaultActiveItemId:N,onItemClick:j,expandedWidth:a="260px",collapsedWidth:$="64px",className:c="",footer:x,fixed:g=!1,height:R="100%",mobileBreakpoint:S=768,forceMobile:l=!1})=>{var te,re;const[v,h]=t.useState(!1);t.useEffect(()=>{if(l){h(!0);return}const A=()=>h(window.innerWidth<S);return A(),window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[S,l]);const I=i!==void 0,[b,D]=t.useState(u),E=I?i:b,k=L||E,s=M!==void 0,[w,C]=t.useState(N||((re=(te=m[0])==null?void 0:te.items[0])==null?void 0:re.id)),y=s?M:w,[p,d]=t.useState(!1);t.useEffect(()=>{const A=()=>d(document.documentElement.dir==="rtl");A();const G=new MutationObserver(A);return G.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),()=>G.disconnect()},[]);const{activeItem:z,activeParent:W}=t.useMemo(()=>{for(const A of m)for(const G of A.items){if(G.id===y)return{activeItem:G,activeParent:null};if(G.subItems){for(const Y of G.subItems)if(Y.id===y)return{activeItem:Y,activeParent:G}}}return{activeItem:null,activeParent:null}},[m,y]),[q,B]=t.useState(()=>{const A=new Set;return m.forEach((G,Y)=>{G.defaultExpanded!==!1&&A.add(`group-${Y}`)}),A}),[F,P]=t.useState(new Set),X=t.useRef(null),[U,H]=t.useState(!1),[O,T]=t.useState(!1),V=(z==null?void 0:z.content)??(W==null?void 0:W.content)??null,[J,K]=t.useState(V),[Z,oe]=t.useState(!0),se=t.useCallback(()=>{const A=X.current;if(!A)return;const{scrollLeft:G,scrollWidth:Y,clientWidth:ae}=A;if(Y-ae<=1){H(!1),T(!1);return}p?(H(G<-1),T(G>-(Y-ae)+1)):(H(G>1),T(G<Y-ae-1))},[p]),ce=t.useCallback(A=>{const G=X.current;if(!G)return;const Y=Math.max(G.clientWidth*.7,200),ae=A==="start"?p?Y:-Y:p?-Y:Y;G.scrollBy({left:ae,behavior:"smooth"})},[p]),Q=t.useCallback((A,G)=>{s||C(A),j==null||j(A),G==null||G()},[s,j]),ee=t.useCallback(()=>{if(!o)return;const A=!E;I||D(A),n==null||n(A)},[o,E,I,n]),ie=t.useCallback(A=>{B(G=>{const Y=new Set(G);return Y.has(A)?Y.delete(A):Y.add(A),Y})},[]),me=t.useCallback(A=>{P(G=>{const Y=new Set(G);return Y.has(A)?Y.delete(A):Y.add(A),Y})},[]);t.useEffect(()=>{if(!v)return;const A=X.current;if(!A)return;se(),A.addEventListener("scroll",se,{passive:!0}),window.addEventListener("resize",se);let G;return typeof ResizeObserver<"u"&&(G=new ResizeObserver(()=>se()),G.observe(A)),()=>{A.removeEventListener("scroll",se),window.removeEventListener("resize",se),G==null||G.disconnect()}},[v,se,m]),t.useEffect(()=>{var G;if(!v)return;const A=(G=X.current)==null?void 0:G.querySelector(`[data-sidebar-id="${y}"]`);A==null||A.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[y,v]),t.useEffect(()=>{if(V===J)return;oe(!1);const A=setTimeout(()=>{K(V),requestAnimationFrame(()=>oe(!0))},160);return()=>clearTimeout(A)},[V,J]),t.useEffect(()=>{if(v)return;const A=G=>{(G.ctrlKey||G.metaKey)&&G.key==="b"&&(G.preventDefault(),ee())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[v,ee]);const pe=(A,G=0,Y)=>{const ae=y===A.id,ne=!!(A.subItems&&A.subItems.length>0),ve=`${Y||A.id}-sub`,Ne=F.has(ve),xt=k?0:G*16;return k?e.jsx("div",{className:"relative",children:e.jsxs("button",{onClick:()=>Q(A.id,A.onClick),disabled:A.disabled,className:`
|
|
466
466
|
w-full flex items-center justify-center
|
|
467
467
|
px-2 py-3 rounded-[var(--radius-md)]
|
|
468
468
|
transition-all duration-180 relative
|
|
469
|
-
${
|
|
470
|
-
${
|
|
469
|
+
${A.disabled?"opacity-40 cursor-not-allowed":"hover:bg-[var(--color-bg-elevated)]/40 cursor-pointer"}
|
|
470
|
+
${ae?"text-[var(--color-primary)] bg-[var(--color-primary-light)]":"text-[var(--color-text-secondary)]"}
|
|
471
471
|
group
|
|
472
|
-
`,title:
|
|
473
|
-
absolute -top-0.5 ${
|
|
472
|
+
`,title:A.label,"aria-current":ae?"page":void 0,"aria-disabled":A.disabled,children:[A.icon&&e.jsx("span",{className:"flex-shrink-0 text-current w-5 h-5 flex items-center justify-center",children:A.icon}),A.badge&&e.jsx("span",{className:`
|
|
473
|
+
absolute -top-0.5 ${p?"-left-0.5":"-right-0.5"}
|
|
474
474
|
flex items-center justify-center
|
|
475
475
|
min-w-[18px] h-[18px] px-1
|
|
476
476
|
text-[9px] font-bold rounded-full
|
|
477
477
|
bg-[var(--color-danger)] text-white
|
|
478
|
-
`,children:
|
|
479
|
-
absolute ${
|
|
478
|
+
`,children:A.badge}),ae&&e.jsx("span",{className:`
|
|
479
|
+
absolute ${p?"right-0":"left-0"}
|
|
480
480
|
top-1/2 -translate-y-1/2
|
|
481
481
|
w-0.5 h-6 rounded-full
|
|
482
482
|
bg-[var(--color-primary)] shadow-[var(--shadow-glow-primary)]
|
|
483
|
-
`})]})},
|
|
483
|
+
`})]})},A.id):e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>{ne?me(ve):Q(A.id,A.onClick)},disabled:A.disabled,className:`
|
|
484
484
|
w-full flex items-center gap-3
|
|
485
|
-
${
|
|
485
|
+
${p?"flex-row-reverse":""}
|
|
486
486
|
px-3 py-2.5 rounded-[var(--radius-md)]
|
|
487
487
|
transition-all duration-180
|
|
488
488
|
text-sm font-medium relative
|
|
489
|
-
${
|
|
490
|
-
${
|
|
489
|
+
${A.disabled?"opacity-40 cursor-not-allowed":"hover:bg-[var(--color-bg-elevated)]/40 cursor-pointer"}
|
|
490
|
+
${ae?"text-[var(--color-primary)] bg-[var(--color-primary-light)]":"text-[var(--color-text-secondary)]"}
|
|
491
491
|
group
|
|
492
|
-
`,style:{paddingInlineStart:`${16+
|
|
492
|
+
`,style:{paddingInlineStart:`${16+xt}px`,paddingInlineEnd:"12px"},"aria-current":ae?"page":void 0,"aria-disabled":A.disabled,"aria-expanded":ne?Ne:void 0,children:[A.icon&&e.jsx("span",{className:"flex-shrink-0 text-current w-5 h-5 flex items-center justify-center",children:A.icon}),e.jsx("span",{className:`flex-1 truncate ${p?"text-right":"text-left"}`,children:A.label}),A.badge&&e.jsx("span",{className:`
|
|
493
493
|
flex-shrink-0 text-[10px] font-bold px-2 py-0.5 rounded-full
|
|
494
|
-
${
|
|
495
|
-
`,children:
|
|
494
|
+
${ae?"bg-[var(--color-primary-solid)] text-white":"bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]"}
|
|
495
|
+
`,children:A.badge}),ne&&e.jsx("span",{className:`
|
|
496
496
|
flex-shrink-0 transition-transform duration-250
|
|
497
497
|
text-[var(--color-text-tertiary)]
|
|
498
|
-
${Ne?"rotate-90":
|
|
499
|
-
`,children:e.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}),
|
|
500
|
-
absolute ${
|
|
498
|
+
${Ne?"rotate-90":p?"rotate-180":"rotate-0"}
|
|
499
|
+
`,children:e.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}),ae&&e.jsx("span",{className:`
|
|
500
|
+
absolute ${p?"right-0":"left-0"}
|
|
501
501
|
top-1/2 -translate-y-1/2
|
|
502
502
|
w-0.5 h-6 rounded-full
|
|
503
503
|
bg-[var(--color-primary)] shadow-[var(--shadow-glow-primary)]
|
|
504
|
-
`})]}),ne&&!
|
|
504
|
+
`})]}),ne&&!k&&e.jsx("div",{className:`
|
|
505
505
|
overflow-hidden transition-all duration-300 ease-[var(--ease-in-out)]
|
|
506
506
|
${Ne?"max-h-[9999px] opacity-100":"max-h-0 opacity-0"}
|
|
507
507
|
`,children:e.jsx("div",{className:`
|
|
508
508
|
relative space-y-0.5 py-1
|
|
509
|
-
${
|
|
510
|
-
`,children:
|
|
509
|
+
${p?"mr-4 pr-4 border-r border-[var(--color-border-secondary)]":"ml-4 pl-4 border-l border-[var(--color-border-secondary)]"}
|
|
510
|
+
`,children:A.subItems.map(gt=>pe(gt,G+1,A.id))})})]},A.id)},Se=(A,G)=>{const Y=`group-${G}`,ae=q.has(Y);return k?e.jsx("div",{className:"space-y-1",children:A.items.map(ne=>pe(ne))},Y):e.jsxs("div",{className:"mb-2",children:[f&&e.jsxs("button",{onClick:()=>ie(Y),className:`
|
|
511
511
|
w-full flex items-center gap-2 px-3 py-2
|
|
512
512
|
text-xs font-mono uppercase tracking-wider
|
|
513
513
|
text-[var(--color-text-tertiary)]
|
|
@@ -515,11 +515,11 @@
|
|
|
515
515
|
transition-colors duration-180
|
|
516
516
|
rounded-[var(--radius-sm)]
|
|
517
517
|
hover:bg-[var(--color-bg-elevated)]/20
|
|
518
|
-
${
|
|
519
|
-
`,children:[
|
|
518
|
+
${p?"flex-row-reverse":""}
|
|
519
|
+
`,children:[A.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4",children:A.icon}),e.jsx("span",{className:`flex-1 ${p?"text-right":"text-left"}`,children:A.label}),e.jsx("span",{className:`transition-transform duration-250 ${ae?"rotate-180":"rotate-0"}`,children:e.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})})]}),e.jsx("div",{className:`
|
|
520
520
|
overflow-hidden transition-all duration-300 ease-[var(--ease-in-out)]
|
|
521
|
-
${
|
|
522
|
-
`,children:e.jsx("div",{className:"space-y-1 py-1",children:
|
|
521
|
+
${ae?"max-h-[9999px] opacity-100":"max-h-0 opacity-0"}
|
|
522
|
+
`,children:e.jsx("div",{className:"space-y-1 py-1",children:A.items.map(ne=>pe(ne))})})]},Y)};if(v)return e.jsxs("div",{className:`flex flex-col w-full h-full min-h-0 ${c}`,children:[e.jsxs("div",{className:"relative flex items-stretch gap-2 px-4 pt-4 flex-shrink-0",children:[e.jsx("button",{type:"button",onClick:()=>ce("start"),disabled:!U,"aria-label":"Scroll left",hidden:!U,tabIndex:U?0:-1,className:`\r
|
|
523
523
|
flex-shrink-0 w-8 self-stretch\r
|
|
524
524
|
flex items-center justify-center\r
|
|
525
525
|
rounded-[var(--radius-md)]\r
|
|
@@ -537,13 +537,13 @@
|
|
|
537
537
|
flex items-center gap-1\r
|
|
538
538
|
overflow-x-auto scroll-smooth\r
|
|
539
539
|
pb-1 sidebar-horizontal-scroll\r
|
|
540
|
-
`,style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:[r&&e.jsx("div",{className:"flex-shrink-0 me-3 flex items-center",children:r}),m.map((
|
|
540
|
+
`,style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:[r&&e.jsx("div",{className:"flex-shrink-0 me-3 flex items-center",children:r}),m.map((A,G)=>e.jsxs(t.Fragment,{children:[f&&e.jsx("span",{className:`\r
|
|
541
541
|
flex-shrink-0 px-3 py-1\r
|
|
542
542
|
text-[10px] font-mono uppercase tracking-wider\r
|
|
543
543
|
text-[var(--color-text-tertiary)]\r
|
|
544
544
|
border-e border-[var(--color-border-secondary)]\r
|
|
545
545
|
me-1\r
|
|
546
|
-
`,dir:"auto",children:
|
|
546
|
+
`,dir:"auto",children:A.label}),A.items.map(Y=>{const ae=!!(Y.subItems&&Y.subItems.length>0),ne=y===Y.id||ae&&Y.subItems.some(ve=>ve.id===y);return e.jsxs("button",{type:"button","data-sidebar-id":Y.id,onClick:()=>Q(Y.id,Y.onClick),disabled:Y.disabled,className:`
|
|
547
547
|
flex-shrink-0
|
|
548
548
|
flex items-center gap-2
|
|
549
549
|
px-4 py-2 rounded-full
|
|
@@ -554,7 +554,7 @@
|
|
|
554
554
|
`,style:ne?{boxShadow:"none"}:void 0,"aria-current":ne?"page":void 0,"aria-disabled":Y.disabled,children:[Y.icon&&e.jsx("span",{className:"flex-shrink-0 w-4 h-4 flex items-center justify-center",children:Y.icon}),e.jsx("span",{children:Y.label}),Y.badge!==void 0&&e.jsx("span",{className:`
|
|
555
555
|
flex-shrink-0 text-[10px] font-bold px-1.5 py-0.5 rounded-full
|
|
556
556
|
${ne?"bg-white/25 text-white":"bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]"}
|
|
557
|
-
`,children:Y.badge})]},Y.id)})]},`group-${
|
|
557
|
+
`,children:Y.badge})]},Y.id)})]},`group-${G}`))]}),e.jsx("button",{type:"button",onClick:()=>ce("end"),disabled:!O,"aria-label":"Scroll right",hidden:!O,tabIndex:O?0:-1,className:`\r
|
|
558
558
|
flex-shrink-0 w-8 self-stretch\r
|
|
559
559
|
flex items-center justify-center\r
|
|
560
560
|
rounded-[var(--radius-md)]\r
|
|
@@ -567,17 +567,17 @@
|
|
|
567
567
|
outline-none focus:outline-none focus-visible:outline-none\r
|
|
568
568
|
shadow-none hover:shadow-none focus:shadow-none\r
|
|
569
569
|
disabled:opacity-0 disabled:pointer-events-none\r
|
|
570
|
-
`,style:{boxShadow:"none",filter:"none"},children:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})]}),
|
|
570
|
+
`,style:{boxShadow:"none",filter:"none"},children:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})})]}),W&&W.subItems&&e.jsxs("div",{className:"flex flex-wrap items-center gap-1 mt-2 px-4 flex-shrink-0",children:[e.jsxs("span",{className:"text-[10px] font-mono uppercase tracking-wider text-[var(--color-text-tertiary)] me-1",children:[W.label,":"]}),W.subItems.map(A=>{const G=y===A.id;return e.jsxs("button",{type:"button",onClick:()=>Q(A.id,A.onClick),disabled:A.disabled,className:`
|
|
571
571
|
flex items-center gap-1.5
|
|
572
572
|
px-3 py-1 rounded-full
|
|
573
573
|
text-xs font-medium whitespace-nowrap
|
|
574
574
|
transition-all duration-180
|
|
575
|
-
${
|
|
576
|
-
${
|
|
577
|
-
`,"aria-current":
|
|
575
|
+
${A.disabled?"opacity-40 cursor-not-allowed":"cursor-pointer"}
|
|
576
|
+
${G?"bg-[var(--color-primary-light)] text-[var(--color-primary)] border border-[var(--color-primary)]/40":"text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/40"}
|
|
577
|
+
`,"aria-current":G?"page":void 0,children:[A.icon&&e.jsx("span",{className:"flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center",children:A.icon}),e.jsx("span",{children:A.label}),A.badge!==void 0&&e.jsx("span",{className:`
|
|
578
578
|
flex-shrink-0 text-[9px] font-bold px-1.5 py-0.5 rounded-full
|
|
579
|
-
${
|
|
580
|
-
`,children:
|
|
579
|
+
${G?"bg-[var(--color-primary)]/20 text-[var(--color-primary)]":"bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]"}
|
|
580
|
+
`,children:A.badge})]},A.id)})]}),J!=null&&e.jsx("div",{className:"flex-1 min-h-0 mt-4 px-4 pb-4 overflow-y-auto sidebar-content-scroll",style:{opacity:Z?1:0,transform:Z?"translateY(0)":"translateY(6px)",transition:"opacity 160ms cubic-bezier(0.4, 0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0, 0.2, 1)"},children:J}),e.jsx("style",{children:`
|
|
581
581
|
.sidebar-horizontal-scroll::-webkit-scrollbar { display: none; }
|
|
582
582
|
.sidebar-content-scroll::-webkit-scrollbar { width: 4px; }
|
|
583
583
|
.sidebar-content-scroll::-webkit-scrollbar-track { background: transparent; }
|
|
@@ -585,11 +585,11 @@
|
|
|
585
585
|
background: var(--color-border-primary);
|
|
586
586
|
border-radius: 4px;
|
|
587
587
|
}
|
|
588
|
-
`})]});const le=
|
|
589
|
-
flex ${
|
|
590
|
-
${
|
|
591
|
-
${
|
|
592
|
-
`,style:{height:
|
|
588
|
+
`})]});const le=g?"fixed top-0 z-40":`relative overflow-hidden ${g?"":p?"rounded-l-[var(--radius-large)]":"rounded-r-[var(--radius-large)]"}`,xe=p&&!E?{direction:"rtl"}:{direction:"ltr"},ge=p?"ltr":"rtl",_=p?"rtl":"ltr";return e.jsxs("div",{className:`
|
|
589
|
+
flex ${p?"flex-row-reverse":""} transition-all duration-300 ease-[var(--ease-in-out)]
|
|
590
|
+
${g?"min-h-screen":""}
|
|
591
|
+
${c}
|
|
592
|
+
`,style:{height:g?"100%":R,maxHeight:g?"100%":R},children:[e.jsx("style",{children:`
|
|
593
593
|
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
|
|
594
594
|
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
|
|
595
595
|
.sidebar-scroll::-webkit-scrollbar-thumb {
|
|
@@ -606,17 +606,17 @@
|
|
|
606
606
|
backdrop-blur-[20px]
|
|
607
607
|
transition-all duration-300 ease-[var(--ease-in-out)]
|
|
608
608
|
flex flex-col
|
|
609
|
-
${
|
|
609
|
+
${p?"border-l":"border-r"}
|
|
610
610
|
border-[var(--color-border-primary)]
|
|
611
|
-
${
|
|
612
|
-
`,style:{width:
|
|
611
|
+
${g?"":"shadow-[var(--shadow-float)]"}
|
|
612
|
+
`,style:{width:E?$:a,[p?"right":"left"]:g?0:"auto",flexShrink:0,height:"100%",maxHeight:"100%"},role:"navigation","aria-label":"Sidebar navigation",children:[r&&e.jsx("div",{className:`
|
|
613
613
|
flex items-center gap-3 px-4 py-4
|
|
614
614
|
border-b border-[var(--color-border-primary)]
|
|
615
615
|
min-h-[64px] flex-shrink-0
|
|
616
|
-
${
|
|
617
|
-
`,style:
|
|
616
|
+
${E?"justify-center px-2":""}
|
|
617
|
+
`,style:xe,dir:p&&!E?"rtl":"ltr",children:r}),e.jsx("nav",{className:"flex-1 overflow-y-auto min-h-0 sidebar-scroll",style:{scrollbarWidth:"thin",scrollbarColor:"var(--color-border-primary) transparent",direction:ge},dir:ge,children:e.jsx("div",{className:"p-3 space-y-2",style:{direction:_},dir:_,children:m.map((A,G)=>Se(A,G))})}),e.jsxs("div",{className:"border-t border-[var(--color-border-primary)] flex-shrink-0",children:[x&&e.jsx("div",{className:`p-3 ${E?"flex justify-center":""}`,children:e.jsx("div",{className:`
|
|
618
618
|
w-full
|
|
619
|
-
${
|
|
619
|
+
${E?`
|
|
620
620
|
flex justify-center
|
|
621
621
|
[&>button]:!w-10 [&>button]:!h-10 [&>button]:!px-0 [&>button]:!gap-0 [&>button]:justify-center
|
|
622
622
|
[&>button>span:not(:first-child)]:hidden
|
|
@@ -624,29 +624,29 @@
|
|
|
624
624
|
[&>a]:!w-10 [&>a]:!h-10 [&>a]:!px-0 [&>a]:!gap-0 [&>a]:justify-center
|
|
625
625
|
[&>a>span:not(:first-child)]:hidden
|
|
626
626
|
`:""}
|
|
627
|
-
`,style:
|
|
627
|
+
`,style:xe,dir:p&&!E?"rtl":"ltr",children:x})}),o&&e.jsx("div",{className:`px-3 pb-3 ${E?"flex justify-center":""}`,children:e.jsxs("button",{onClick:ee,className:`
|
|
628
628
|
flex items-center justify-center
|
|
629
629
|
rounded-[var(--radius-md)] glass
|
|
630
630
|
text-[var(--color-text-secondary)]
|
|
631
631
|
hover:text-[var(--color-text-primary)]
|
|
632
632
|
hover:bg-[var(--color-bg-elevated)]/40
|
|
633
633
|
transition-all duration-180 text-sm gap-2
|
|
634
|
-
${
|
|
635
|
-
${!
|
|
636
|
-
`,"aria-label":
|
|
634
|
+
${E?"w-10 h-10 px-0":"w-full px-3 py-2"}
|
|
635
|
+
${!E&&p?"flex-row-reverse":""}
|
|
636
|
+
`,"aria-label":E?"Expand sidebar":"Collapse sidebar",title:`${E?"Expand":"Collapse"} (Ctrl+B)`,children:[e.jsx("svg",{className:`
|
|
637
637
|
h-4 w-4 flex-shrink-0 transition-transform duration-300
|
|
638
|
-
${
|
|
639
|
-
`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),!
|
|
638
|
+
${E?p?"rotate-180":"rotate-0":p?"rotate-0":"rotate-180"}
|
|
639
|
+
`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),!E&&e.jsx("span",{className:"text-xs font-mono text-[var(--color-text-tertiary)]",children:"Ctrl+B"})]})})]})]}),J!=null&&e.jsx("div",{className:"flex-1 p-6 overflow-y-auto transition-all duration-300 ease-[var(--ease-in-out)]",style:{height:"100%",maxHeight:"100%",minHeight:0,opacity:Z?1:0,transform:Z?"translateY(0)":"translateY(6px)",transition:"opacity 160ms cubic-bezier(0.4, 0, 0.2, 1), transform 160ms cubic-bezier(0.4, 0, 0.2, 1)"},children:J})]})};Je.displayName="Sidebar";const Pe={github:{icon:e.jsx(Nt,{className:"h-4 w-4"}),color:"#f0f6fc"},twitter:{icon:e.jsx(Ct,{className:"h-4 w-4"}),color:"#1DA1F2"},discord:{icon:e.jsx(Lt,{className:"h-4 w-4"}),color:"#5865F2"},youtube:{icon:e.jsx($t,{className:"h-4 w-4"}),color:"#FF0000"},instagram:{icon:e.jsx(Mt,{className:"h-4 w-4"}),color:"#E4405F"},linkedin:{icon:e.jsx(Tt,{className:"h-4 w-4"}),color:"#0A66C2"},bluesky:{icon:e.jsx(Rt,{className:"h-4 w-4"}),color:"#1185FE"}},Ze=({links:r,position:m="right",offset:o=5,verticalOffset:u="50%",size:i="md",showLabels:n=!1,className:L=""})=>{const[f,M]=t.useState(!1),[N,j]=t.useState(!1),a=t.useRef(null),$=k=>{const s=k.toLowerCase();return s.includes("github.com")?"github":s.includes("twitter.com")||s.includes("x.com")?"twitter":s.includes("discord.com")||s.includes("discord.gg")?"discord":s.includes("youtube.com")||s.includes("youtu.be")?"youtube":s.includes("instagram.com")?"instagram":s.includes("linkedin.com")?"linkedin":s.includes("bsky.app")||s.includes("bluesky")?"bluesky":"github"},c=k=>{const s=k.toLowerCase();return Pe[s]||Pe.github},x={sm:{button:"w-9 h-9 text-sm",icon:"h-3.5 w-3.5",chevron:"w-8 h-8",gap:"gap-2",buttonPx:36,chevronPx:32},md:{button:"w-11 h-11 text-base",icon:"h-4.5 w-4.5",chevron:"w-10 h-10",gap:"gap-2.5",buttonPx:44,chevronPx:40},lg:{button:"w-13 h-13 text-lg",icon:"h-5.5 w-5.5",chevron:"w-12 h-12",gap:"gap-3",buttonPx:52,chevronPx:48}},g=()=>{f?(j(!0),setTimeout(()=>{M(!1),j(!1)},300)):(M(!0),j(!1))};t.useEffect(()=>{const k=s=>{a.current&&!a.current.contains(s.target)&&f&&!N&&g()};return f&&document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[f,N]);const R=()=>typeof u=="number"?`${u}px`:u,S=m==="left",l=x[i]||x.md,h={left:{container:"left-0",chevron:`left-[${o}px]`,menu:`left-[${o}px]`,transform:"translateX(0)"},right:{container:"right-0",chevron:`right-[${o}px]`,menu:`right-[${o}px]`,transform:"translateX(0)"}}[m],I=l.buttonPx,b=8,D=(k,s)=>{const w=$(k.url),C=c(w);if(k.icon&&t.isValidElement(k.icon)){const p=k.icon;return t.cloneElement(p,{className:`${s} flex-shrink-0`})}const y=C.icon;if(t.isValidElement(y)){const p=y;return t.cloneElement(p,{className:`${s} flex-shrink-0`})}return y},E=k=>k.color?k.color:c($(k.url)).color;return e.jsx("div",{ref:a,className:`fixed z-40 ${h.container} ${L}`,style:{top:R(),transform:"translateY(-50%)",...S?{left:`${o+5}px`}:{right:`${o}px`}},children:e.jsxs("div",{className:"relative flex items-center",children:[e.jsx("div",{className:`
|
|
640
640
|
absolute top-1/2 -translate-y-1/2
|
|
641
641
|
flex items-center
|
|
642
|
-
${
|
|
642
|
+
${l.gap}
|
|
643
643
|
transition-opacity duration-300 ease-[var(--ease-in-out)]
|
|
644
|
-
${
|
|
645
|
-
${
|
|
646
|
-
${
|
|
647
|
-
`,style:{paddingRight:
|
|
644
|
+
${f?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}
|
|
645
|
+
${N?"opacity-0":""}
|
|
646
|
+
${S?"left-0":"right-0"}
|
|
647
|
+
`,style:{paddingRight:S?"0":`${I+b}px`,paddingLeft:S?`${I+b}px`:"0"},children:r.map((k,s)=>{const w=k.label||$(k.url).charAt(0).toUpperCase()+$(k.url).slice(1),C=E(k);return e.jsxs("a",{href:k.url,target:"_blank",rel:"noopener noreferrer","aria-label":`${w} (opens in new tab)`,className:`
|
|
648
648
|
flex items-center justify-center
|
|
649
|
-
${
|
|
649
|
+
${l.button}
|
|
650
650
|
rounded-full
|
|
651
651
|
flex-shrink-0
|
|
652
652
|
shadow-lg
|
|
@@ -657,8 +657,8 @@
|
|
|
657
657
|
${n?"px-4":""}
|
|
658
658
|
group
|
|
659
659
|
relative
|
|
660
|
-
`,style:{width:
|
|
661
|
-
${
|
|
660
|
+
`,style:{width:i==="sm"?"36px":i==="lg"?"52px":"44px",height:i==="sm"?"36px":i==="lg"?"52px":"44px",minWidth:i==="sm"?"36px":i==="lg"?"52px":"44px",minHeight:i==="sm"?"36px":i==="lg"?"52px":"44px",background:"var(--glass-bg, rgba(255,255,255,0.05))",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",border:`1px solid ${C}44`,borderRadius:"50%",transition:"border-color 0.25s ease, box-shadow 0.25s ease, scale 0.25s ease"},onMouseEnter:y=>{y.currentTarget.style.borderColor=C,y.currentTarget.style.boxShadow=`0 0 24px ${C}44`},onMouseLeave:y=>{y.currentTarget.style.borderColor=`${C}44`,y.currentTarget.style.boxShadow="none"},children:[e.jsx("span",{className:`${l.icon} flex-shrink-0 flex items-center justify-center`,style:{color:C},children:D(k,l.icon)}),n&&e.jsx("span",{className:"text-xs font-medium truncate max-w-[80px] text-[var(--color-text-primary)]",children:w})]},s)})}),e.jsx("button",{onClick:g,className:`
|
|
661
|
+
${l.chevron}
|
|
662
662
|
rounded-full
|
|
663
663
|
flex items-center justify-center
|
|
664
664
|
transition-all duration-300
|
|
@@ -667,12 +667,12 @@
|
|
|
667
667
|
relative
|
|
668
668
|
z-10
|
|
669
669
|
flex-shrink-0
|
|
670
|
-
`,style:{width:
|
|
670
|
+
`,style:{width:i==="sm"?"32px":i==="lg"?"48px":"40px",height:i==="sm"?"32px":i==="lg"?"48px":"40px",background:"var(--glass-bg, rgba(255,255,255,0.05))",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",border:"1px solid var(--color-border-primary)",borderRadius:"50%"},"aria-label":f?"Close social menu":"Open social menu",children:e.jsx("svg",{className:`
|
|
671
671
|
w-4 h-4
|
|
672
672
|
text-[var(--color-text-primary)]
|
|
673
673
|
transition-transform duration-300
|
|
674
|
-
${
|
|
675
|
-
`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:
|
|
674
|
+
${f?"rotate-180":"rotate-0"}
|
|
675
|
+
`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:S?"M9 5l7 7-7 7":"M15 19l-7-7 7-7"})})})]})})};Ze.displayName="SocialMedia";const At=({type:r})=>{switch(r){case"success":return e.jsx(ze,{});case"error":return e.jsx(Be,{});case"warning":return e.jsx(yt,{});default:return e.jsx(wt,{})}},Re=({message:r,type:m="info",duration:o=3e3,onDismiss:u})=>{const[i,n]=t.useState(!1),[L,f]=t.useState(!1),M={success:{bg:"bg-[var(--color-success-light)]",border:"border-[var(--color-success)]",text:"text-[var(--color-success)]"},error:{bg:"bg-[var(--color-danger-light)]",border:"border-[var(--color-danger)]",text:"text-[var(--color-danger)]"},warning:{bg:"bg-[var(--color-warning-light)]",border:"border-[var(--color-warning)]",text:"text-[var(--color-warning)]"},info:{bg:"bg-[var(--color-info-light)]",border:"border-[var(--color-info)]",text:"text-[var(--color-info)]"}};t.useEffect(()=>{const a=setTimeout(()=>{n(!0)},10);return()=>clearTimeout(a)},[]),t.useEffect(()=>{if(o<=0)return;const a=setTimeout(()=>{N()},o);return()=>clearTimeout(a)},[o]);const N=t.useCallback(()=>{f(!0),n(!1),setTimeout(()=>{u==null||u()},300)},[u]),j=M[m];return e.jsxs("div",{className:`
|
|
676
676
|
glass-heavy
|
|
677
677
|
px-5 py-3.5
|
|
678
678
|
rounded-[14px]
|
|
@@ -682,159 +682,159 @@
|
|
|
682
682
|
flex items-center gap-3
|
|
683
683
|
w-[360px] max-w-[90vw]
|
|
684
684
|
transition-all duration-[var(--transition-med)] ease-[var(--ease-in-out)]
|
|
685
|
-
${
|
|
686
|
-
${
|
|
687
|
-
${
|
|
688
|
-
${
|
|
689
|
-
`,role:"alert","aria-live":"polite",children:[e.jsx("span",{className:`${
|
|
685
|
+
${j.bg}
|
|
686
|
+
${j.border}
|
|
687
|
+
${i?"translate-x-0 opacity-100":"translate-x-[calc(100%+24px)] opacity-0"}
|
|
688
|
+
${L?"scale-95 opacity-0":""}
|
|
689
|
+
`,role:"alert","aria-live":"polite",children:[e.jsx("span",{className:`${j.text} flex-shrink-0`,children:e.jsx(At,{type:m})}),e.jsx("span",{className:"text-[var(--color-text-primary)] flex-1",children:r}),e.jsx("button",{onClick:N,className:"text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)] transition-colors duration-180 flex-shrink-0 ml-2","aria-label":"Dismiss toast",children:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})};Re.displayName="Toast";const Ie=({toasts:r,onRemove:m})=>r.length===0?null:$e.createPortal(e.jsx("div",{className:"fixed top-6 right-6 z-[10000] flex flex-col-reverse gap-3 pointer-events-none",children:r.map(o=>e.jsx("div",{className:"pointer-events-auto",children:e.jsx(Re,{...o,onDismiss:()=>m(o.id)})},o.id))}),document.body);Ie.displayName="ToastContainer";const Ke=t.createContext(void 0),Pt=({children:r})=>{const[o,u]=t.useState([]),i=t.useCallback($=>{u(c=>c.filter(x=>x.id!==$))},[]),n=t.useCallback($=>{const c=`toast-${Date.now()}-${Math.random().toString(36).substring(2,6)}`;u(g=>{const R=[...g,{...$,id:c}];return R.length>5?R.slice(1):R});const x=$.duration||3e3;setTimeout(()=>{i(c)},x+350)},[i]),L=t.useCallback(($,c)=>{n({message:$,type:"success",duration:c})},[n]),f=t.useCallback(($,c)=>{n({message:$,type:"error",duration:c})},[n]),M=t.useCallback(($,c)=>{n({message:$,type:"warning",duration:c})},[n]),N=t.useCallback(($,c)=>{n({message:$,type:"info",duration:c})},[n]),j=t.useCallback(()=>{u([])},[]),a={showToast:n,success:L,error:f,warning:M,info:N,clearAll:j};return e.jsxs(Ke.Provider,{value:a,children:[r,e.jsx(Ie,{toasts:o,onRemove:i})]})},zt=()=>{const r=t.useContext(Ke);if(!r)throw new Error("useToast must be used within a ToastProvider");return r},ke=t.forwardRef(({src:r,alt:m="",size:o="md",fallback:u=!1,fallbackText:i,shape:n="circle",bordered:L=!1,glow:f,status:M,group:N=!1,onClick:j,className:a="",children:$,...c},x)=>{const[g,R]=t.useState(!1),S={xs:"w-6 h-6 text-[10px]",sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base",xl:"w-16 h-16 text-lg"},l={circle:"rounded-full",rounded:"rounded-[var(--radius-md)]",square:"rounded-none"},v={primary:"shadow-[var(--shadow-glow-primary)]",secondary:"shadow-[var(--shadow-glow-secondary)]",accent:"shadow-[var(--shadow-glow-accent)]"},h={online:"bg-[var(--color-success)]",offline:"bg-[var(--color-text-tertiary)]",away:"bg-[var(--color-warning)]",busy:"bg-[var(--color-danger)]"},I={xs:"w-1.5 h-1.5",sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3",xl:"w-3.5 h-3.5"},b=L?"border-2 border-[var(--color-border-secondary)]":"",D=f?v[f]:"",E=()=>{j&&j()},k=()=>{if(!i)return"";const C=i.trim().split(" ");return C.length===1?C[0].charAt(0).toUpperCase():(C[0].charAt(0)+C[C.length-1].charAt(0)).toUpperCase()},s=r&&!u&&!g,w=()=>s?e.jsx("img",{src:r,alt:m,className:"w-full h-full object-cover",onError:()=>R(!0)}):i?e.jsx("span",{className:"font-heading font-semibold text-inherit",children:k()}):e.jsx(Oe,{});return N?e.jsx("div",{ref:x,className:`flex -space-x-2 ${a}`,...c,children:t.Children.map($,C=>t.isValidElement(C)?t.cloneElement(C,{size:o,shape:n,bordered:!0,className:`${l[n]} ring-2 ring-[var(--color-bg-primary)] ${C.props.className||""}`}):C)}):e.jsxs("div",{ref:x,className:`
|
|
690
690
|
relative inline-flex items-center justify-center
|
|
691
691
|
flex-shrink-0
|
|
692
|
-
${
|
|
693
|
-
${
|
|
694
|
-
`,onClick:
|
|
692
|
+
${j?"cursor-pointer hover:opacity-80":""}
|
|
693
|
+
${a}
|
|
694
|
+
`,onClick:E,...c,children:[e.jsx("div",{className:`
|
|
695
695
|
flex items-center justify-center
|
|
696
696
|
bg-[var(--color-bg-tertiary)]
|
|
697
697
|
text-[var(--color-text-secondary)]
|
|
698
698
|
transition-all duration-[var(--transition-fast)]
|
|
699
|
-
${
|
|
700
|
-
${
|
|
701
|
-
${
|
|
702
|
-
${
|
|
699
|
+
${S[o]}
|
|
700
|
+
${l[n]}
|
|
701
|
+
${b}
|
|
702
|
+
${D}
|
|
703
703
|
overflow-hidden
|
|
704
|
-
`,children:w()}),
|
|
704
|
+
`,children:w()}),M&&e.jsx("span",{className:`
|
|
705
705
|
absolute bottom-0 right-0
|
|
706
706
|
rounded-full
|
|
707
707
|
ring-2 ring-[var(--color-bg-primary)]
|
|
708
|
-
${
|
|
709
|
-
${
|
|
710
|
-
`})]})});ke.displayName="Avatar";const
|
|
708
|
+
${h[M]}
|
|
709
|
+
${I[o]}
|
|
710
|
+
`})]})});ke.displayName="Avatar";const et=({content:r,children:m,placement:o="top",delay:u=300,hideDelay:i=0,maxWidth:n="240px",arrow:L=!0,variant:f="glass",size:M="md",disabled:N=!1,open:j,onOpen:a,onClose:$,className:c=""})=>{const[x,g]=t.useState(!1),[R,S]=t.useState(!1),[l,v]=t.useState(!1),[h,I]=t.useState({top:-9999,left:-9999}),[b,D]=t.useState(!1),E=t.useId(),k=t.useRef(null),s=t.useRef(null),w=t.useRef(null),C=t.useRef(null),y=j!==void 0,p=y?j:x;t.useEffect(()=>{const U=()=>{D(document.documentElement.dir==="rtl")};U();const H=new MutationObserver(U);return H.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),()=>H.disconnect()},[]);const d={sm:"px-2.5 py-1.5 text-xs",md:"px-3.5 py-2 text-sm",lg:"px-[18px] py-2.5 text-base"},z=f==="solid"?"glass-solid":f==="outline"?"glass-outline":"glass",W=150,q=t.useCallback(()=>{const U=k.current,H=s.current;if(!U||!H)return!1;const O=U.getBoundingClientRect(),T=H.offsetWidth,V=H.offsetHeight;if(T===0||V===0)return!1;const J=8;let K=0,Z=0;const oe=O.left+O.width/2,se=O.top+O.height/2;switch((()=>{if(b){if(o==="left")return"right";if(o==="right")return"left";if(o==="top-left")return"top-right";if(o==="top-right")return"top-left";if(o==="bottom-left")return"bottom-right";if(o==="bottom-right")return"bottom-left"}return o})()){case"top":K=O.top-V-J,Z=oe-T/2;break;case"bottom":K=O.bottom+J,Z=oe-T/2;break;case"left":K=se-V/2,Z=O.left-T-J;break;case"right":K=se-V/2,Z=O.right+J;break;case"top-left":K=O.top-V-J,Z=O.left;break;case"top-right":K=O.top-V-J,Z=O.right-T;break;case"bottom-left":K=O.bottom+J,Z=O.left;break;case"bottom-right":K=O.bottom+J,Z=O.right-T;break;default:K=O.top-V-J,Z=oe-T/2}const ee=window.innerWidth,ie=window.innerHeight;return Z<8&&(Z=8),Z+T>ee-8&&(Z=ee-T-8),K<8&&(K=8),K+V>ie-8&&(K=ie-V-8),I({top:K,left:Z}),!0},[o,b]);t.useLayoutEffect(()=>{if(!p){v(!1);const T=setTimeout(()=>{S(!1),I({top:-9999,left:-9999})},W);return()=>clearTimeout(T)}S(!0),v(!1);let U=0,H=0;const O=()=>{if(U+=1,q()){v(!0);return}U<8?H=requestAnimationFrame(O):v(!0)};return H=requestAnimationFrame(O),()=>cancelAnimationFrame(H)},[p,q]),t.useEffect(()=>{p&&R&&q()},[b,p,R,q]),t.useEffect(()=>{if(!p)return;const U=()=>q();return window.addEventListener("resize",U),window.addEventListener("scroll",U,!0),()=>{window.removeEventListener("resize",U),window.removeEventListener("scroll",U,!0)}},[p,q]);const B=t.useCallback(()=>{N||(w.current&&(clearTimeout(w.current),w.current=null),C.current&&(clearTimeout(C.current),C.current=null),w.current=setTimeout(()=>{y||g(!0),a==null||a()},u))},[N,u,y,a]),F=t.useCallback(()=>{w.current&&(clearTimeout(w.current),w.current=null),C.current=setTimeout(()=>{y||g(!1),$==null||$()},i)},[i,y,$]);t.useEffect(()=>()=>{w.current&&clearTimeout(w.current),C.current&&clearTimeout(C.current)},[]);const P={top:"bottom-[-5px] left-1/2 -translate-x-1/2",bottom:"top-[-5px] left-1/2 -translate-x-1/2",left:"right-[-5px] top-1/2 -translate-y-1/2",right:"left-[-5px] top-1/2 -translate-y-1/2","top-left":"bottom-[-5px] left-3","top-right":"bottom-[-5px] right-3","bottom-left":"top-[-5px] left-3","bottom-right":"top-[-5px] right-3"},X=()=>{if(b){if(o==="left")return P.right;if(o==="right")return P.left;if(o==="top-left")return P["top-right"];if(o==="top-right")return P["top-left"];if(o==="bottom-left")return P["bottom-right"];if(o==="bottom-right")return P["bottom-left"]}return P[o]||P.top};return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:k,className:"inline-flex",onMouseEnter:B,onMouseLeave:F,onFocus:B,onBlur:F,"aria-describedby":p?E:void 0,children:m}),R&&$e.createPortal(e.jsxs("div",{ref:s,className:`
|
|
711
711
|
z-[10002]
|
|
712
712
|
font-sans text-[var(--color-text-primary)]
|
|
713
713
|
transition-opacity duration-150 ease-out
|
|
714
714
|
pointer-events-none
|
|
715
|
-
${
|
|
715
|
+
${l?"opacity-100":"opacity-0"}
|
|
716
716
|
${z}
|
|
717
|
-
${
|
|
718
|
-
${
|
|
719
|
-
${
|
|
720
|
-
`,style:{position:"fixed",top:
|
|
717
|
+
${d[M]}
|
|
718
|
+
${c}
|
|
719
|
+
${b?"text-right":"text-left"}
|
|
720
|
+
`,style:{position:"fixed",top:h.top,left:h.left,maxWidth:n,direction:b?"rtl":"ltr"},id:E,role:"tooltip",dir:b?"rtl":"ltr",children:[r,L&&e.jsx("div",{className:`absolute w-2.5 h-2.5 rotate-45 ${X()}`,style:{background:"inherit",border:"1px solid var(--glass-border, rgba(255,255,255,0.12))"},"aria-hidden":"true"})]}),document.body)]})};et.displayName="Tooltip";const we=t.forwardRef(({value:r=0,max:m=100,variant:o="horizontal",size:u="md",color:i="primary",showLabel:n=!1,labelFormat:L,label:f,labelPosition:M="inside",animated:N=!0,thickness:j=8,radialSize:a=80,displayType:$="percentage",glow:c=!1,className:x="",...g},R)=>{const S=Math.max(0,Math.min(r,m)),l=S/m*100,v={sm:"h-1.5",md:"h-2.5",lg:"h-4"},h={sm:64,md:80,lg:100},I={primary:"bg-[var(--color-primary)]",secondary:"bg-[var(--color-secondary)]",accent:"bg-[var(--color-accent)]",success:"bg-[var(--color-success)]",danger:"bg-[var(--color-danger)]",warning:"bg-[var(--color-warning)]",gradient:"bg-gradient-to-r from-[var(--color-primary)] to-[var(--color-secondary)]"},b={primary:"color-mix(in srgb, var(--color-primary) 35%, transparent)",secondary:"color-mix(in srgb, var(--color-secondary) 35%, transparent)",accent:"color-mix(in srgb, var(--color-accent) 35%, transparent)",success:"color-mix(in srgb, var(--color-success) 35%, transparent)",danger:"color-mix(in srgb, var(--color-danger) 35%, transparent)",warning:"color-mix(in srgb, var(--color-warning) 35%, transparent)",gradient:"color-mix(in srgb, var(--color-primary) 35%, transparent)"},E=(()=>{if(f)return f;if(L)return L(S,m);switch($){case"ratio":return`${Math.round(S)} / ${m}`;case"custom":return f||`${Math.round(S)}`;case"percentage":default:return`${Math.round(l)}%`}})();if(o==="horizontal"){const W=N?"transition-all duration-[var(--transition-base)] ease-[var(--ease-in-out)]":"",q=j||8,B={left:"flex-row items-center gap-3",right:"flex-row items-center gap-3",top:"flex-col items-start gap-1.5",bottom:"flex-col items-start gap-1.5",inside:"flex-row items-center gap-3"},F={left:"order-first",right:"order-last",top:"order-first",bottom:"order-last",inside:"order-last"},P=B[M]||B.right,X=F[M]||F.right,U=M==="left"||M==="top",H=M==="inside",O=v[u]||v.md,T=b[i]||b.primary;return e.jsxs("div",{className:`w-full ${P} ${x}`,style:{minWidth:"100px"},...g,children:[n&&U&&e.jsx("span",{className:`
|
|
721
721
|
font-mono text-xs font-medium text-[var(--color-text-secondary)]
|
|
722
722
|
flex-shrink-0
|
|
723
723
|
${X}
|
|
724
|
-
`,children:
|
|
724
|
+
`,children:E}),e.jsxs("div",{className:"flex-1 w-full relative",children:[c&&l>0&&e.jsx("div",{className:"absolute inset-0 rounded-full pointer-events-none z-0",style:{width:`${l}%`,height:`${q}px`,boxShadow:`0 0 20px ${T}, 0 0 40px ${T}`,opacity:.7}}),e.jsx("div",{className:`
|
|
725
725
|
w-full rounded-full
|
|
726
726
|
bg-[var(--color-bg-tertiary)]
|
|
727
727
|
${O}
|
|
728
728
|
overflow-hidden
|
|
729
729
|
relative z-10
|
|
730
|
-
`,style:{height:`${H?Math.max(q,
|
|
730
|
+
`,style:{height:`${H?Math.max(q,u==="lg"?22:u==="sm"?16:18):q}px`},role:"progressbar","aria-label":`${f||"Progress"}: ${Math.round(l)}%`,"aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":m,children:e.jsx("div",{className:`h-full rounded-full ${I[i]} ${W} relative flex items-center justify-end`,style:{width:`${l}%`,transition:N?"width 0.4s ease":"none"},children:n&&H&&l>15&&e.jsx("span",{className:`
|
|
731
731
|
font-mono font-semibold text-[var(--color-text-inverse)]
|
|
732
732
|
truncate
|
|
733
733
|
ml-auto
|
|
734
734
|
px-2.5
|
|
735
|
-
`,style:{fontSize:
|
|
735
|
+
`,style:{fontSize:u==="lg"?"0.8rem":u==="sm"?"0.65rem":"0.7rem",lineHeight:1,textShadow:"0 1px 2px rgba(0,0,0,0.25)",maxWidth:"100%",position:"relative",zIndex:1},children:E})})}),n&&H&&l<=15&&e.jsx("span",{className:`
|
|
736
736
|
absolute top-1/2 -translate-y-1/2
|
|
737
737
|
font-mono font-medium text-[var(--color-text-secondary)]
|
|
738
738
|
text-[10px] sm:text-xs
|
|
739
739
|
truncate
|
|
740
740
|
pointer-events-none
|
|
741
741
|
z-20
|
|
742
|
-
`,style:{left:`${Math.max(
|
|
742
|
+
`,style:{left:`${Math.max(l,2)}%`},children:E})]}),n&&!U&&!H&&e.jsx("span",{className:`
|
|
743
743
|
font-mono text-xs font-medium text-[var(--color-text-secondary)]
|
|
744
744
|
flex-shrink-0
|
|
745
745
|
${X}
|
|
746
|
-
`,children:
|
|
746
|
+
`,children:E})]})}const k=a||h[u]||80,s=k/2,w=(k-j)/2,C=2*Math.PI*w,y=C-l/100*C,p=n?E:"",d=()=>i==="gradient"?"url(#radialGradient)":`var(--color-${i})`,z=()=>i==="gradient"?"url(#glowGradient)":`var(--color-${i})`;return e.jsx("div",{ref:R,className:`relative inline-flex flex-col items-center justify-center ${x}`,...g,children:e.jsxs("div",{className:"relative",style:{width:k,height:k},role:"progressbar","aria-label":`${f||"Progress"}: ${Math.round(l)}%`,"aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":m,children:[e.jsxs("svg",{className:"relative w-full h-full",viewBox:`0 0 ${k} ${k}`,"aria-hidden":"true",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"radialGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-primary)"}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-secondary)"})]}),e.jsxs("linearGradient",{id:"glowGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[e.jsx("stop",{offset:"0%",stopColor:"var(--color-primary)"}),e.jsx("stop",{offset:"100%",stopColor:"var(--color-secondary)"})]})]}),c&&l>0&&e.jsx("circle",{cx:s,cy:s,r:w+j/2,fill:"none",stroke:z(),strokeWidth:j+6,strokeDasharray:C,strokeDashoffset:y,strokeLinecap:"round",transform:`rotate(-90 ${s} ${s})`,style:{filter:"blur(10px)",opacity:.35,transition:N?"stroke-dashoffset 0.6s ease":"none"}}),e.jsx("circle",{cx:s,cy:s,r:w,fill:"none",stroke:"var(--color-bg-tertiary)",strokeWidth:j}),e.jsx("circle",{cx:s,cy:s,r:w,fill:"none",stroke:d(),strokeWidth:j,strokeDasharray:C,strokeDashoffset:y,strokeLinecap:"round",transform:`rotate(-90 ${s} ${s})`,style:{transition:N?"stroke-dashoffset 0.6s ease":"none"}})]}),n&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-10 pointer-events-none",children:e.jsx("span",{className:"font-heading font-bold leading-none",style:{fontSize:k<60?"0.65rem":k<80?"0.75rem":"0.9rem",color:"var(--color-text-primary)",textShadow:"0 0 30px var(--color-bg-primary), 0 0 60px var(--color-bg-primary)"},children:p})})]})})});we.displayName="Progress";const tt=({title:r,price:m,currency:o="$",image:u,description:i,rating:n=0,reviewCount:L=0,category:f,tags:M=[],onSale:N=!1,originalPrice:j,inStock:a=!0,badge:$,badgeVariant:c="primary",link:x,onAddToCart:g,onClick:R,layout:S="vertical",glow:l="none",showQuickActions:v=!0,className:h="",fullWidthMobile:I=!1})=>{const{t:b}=ue(),[D,E]=t.useState({x:0,y:0}),[k,s]=t.useState(!1),[w,C]=t.useState(!1),y=t.useRef(null),p=S==="horizontal",d=S==="compact",z=S==="vertical",[W,q]=t.useState(!1);t.useEffect(()=>{const Q=()=>{q(document.documentElement.dir==="rtl")};Q();const ee=new MutationObserver(Q);return ee.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),()=>ee.disconnect()},[]);const B=Q=>{if(!y.current||d)return;const ee=y.current.getBoundingClientRect(),ie=Q.clientX-ee.left,me=Q.clientY-ee.top;E({x:(me-ee.height/2)/(ee.height/2)*-6,y:(ie-ee.width/2)/(ee.width/2)*6})},F=()=>s(!0),P=()=>{s(!1),E({x:0,y:0})},X={primary:"glow-primary",secondary:"glow-secondary",accent:"glow-accent",none:""},U={primary:"0 0 28px color-mix(in srgb, var(--color-primary) 45%, transparent)",secondary:"0 0 28px color-mix(in srgb, var(--color-secondary) 45%, transparent)",accent:"0 0 28px color-mix(in srgb, var(--color-accent) 45%, transparent)",none:"0 0 24px color-mix(in srgb, var(--color-primary) 28%, transparent)"}[l],H="var(--shadow-float, 0 8px 24px rgba(0,0,0,0.18))",O=`0 16px 40px rgba(0,0,0,0.28), ${U}`,T=Q=>typeof Q=="string"?Q:`${o}${Q.toFixed(2)}`,V=()=>Array.from({length:5},(Q,ee)=>e.jsx("span",{className:ee<Math.round(n)?"text-[var(--color-warning)]":"text-[var(--color-text-tertiary)]","aria-hidden":"true",children:ee<Math.round(n)?"★":"☆"},ee)),J=()=>e.jsx("div",{className:"w-full h-full flex items-center justify-center bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]",children:e.jsx(jt,{})}),K=d?"w-14 h-14 flex-shrink-0":p?"w-28 h-28 sm:w-36 sm:h-36 flex-shrink-0":"w-full aspect-square",Z=d?k?"translateY(-4px) scale(1.03)":"translateY(0) scale(1)":k?`perspective(900px) rotateX(${D.x}deg) rotateY(${D.y}deg) translateY(-6px) scale(1.02)`:"perspective(900px) rotateX(0) rotateY(0) translateY(0) scale(1)",oe=!v&&R,se=!!x,ce=N&&d&&e.jsx("div",{className:`
|
|
747
747
|
absolute top-0 z-20 w-[4.5rem] h-[4.5rem]
|
|
748
748
|
overflow-hidden pointer-events-none
|
|
749
|
-
${
|
|
749
|
+
${W?"left-0":"right-0"}
|
|
750
750
|
`,"aria-hidden":"true",children:e.jsx("span",{className:`
|
|
751
751
|
absolute top-[0.35rem] w-[7rem]
|
|
752
752
|
bg-[var(--color-danger)] text-white
|
|
753
753
|
text-[10px] font-bold uppercase tracking-wider
|
|
754
754
|
py-0.5 text-center shadow-sm
|
|
755
|
-
${
|
|
756
|
-
`,children:
|
|
755
|
+
${W?"left-[-2.35rem] -rotate-45 origin-center":"right-[-2.35rem] rotate-45 origin-center"}
|
|
756
|
+
`,children:b("productLabels.sale")})});return e.jsxs("div",{ref:y,className:`
|
|
757
757
|
glass relative overflow-hidden
|
|
758
|
-
${
|
|
759
|
-
${X[
|
|
760
|
-
${
|
|
758
|
+
${d?"p-3":"p-4"}
|
|
759
|
+
${X[l]}
|
|
760
|
+
${I?"w-full sm:w-auto":""}
|
|
761
761
|
${z?"flex flex-col h-full":""}
|
|
762
|
-
${
|
|
763
|
-
${
|
|
764
|
-
${
|
|
765
|
-
${
|
|
766
|
-
`,style:{transform:Z,transformStyle:"preserve-3d",boxShadow:
|
|
762
|
+
${p?"flex flex-row gap-4 items-stretch":""}
|
|
763
|
+
${d?"flex flex-row items-center gap-3":""}
|
|
764
|
+
${h}
|
|
765
|
+
${oe?"cursor-pointer":""}
|
|
766
|
+
`,style:{transform:Z,transformStyle:"preserve-3d",boxShadow:k?O:H,transition:"transform 0.22s ease-out, box-shadow 0.3s ease, border-color 0.25s ease",borderColor:k?"color-mix(in srgb, var(--color-primary) 35%, var(--color-border-primary))":void 0,overflow:"hidden",borderRadius:"var(--radius-standard)"},onMouseMove:B,onMouseEnter:F,onMouseLeave:P,onClick:R,role:oe?"button":void 0,tabIndex:oe?0:void 0,"aria-label":oe?`Product: ${r}`:void 0,onKeyDown:oe?Q=>{(Q.key==="Enter"||Q.key===" ")&&(R==null||R())}:void 0,children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-[inherit] transition-opacity duration-300",style:{opacity:k?1:0,background:"radial-gradient(ellipse at 30% 0%, color-mix(in srgb, var(--color-primary) 14%, transparent), transparent 55%)"}}),ce,d&&!a&&e.jsx("div",{className:"absolute inset-0 z-30 flex items-center justify-center rounded-[inherit] bg-black/60 backdrop-blur-[2px]",children:e.jsx("span",{className:"font-heading font-bold text-white text-[11px] uppercase tracking-widest px-2 text-center",children:b("productLabels.outOfStock")})}),e.jsxs("div",{className:`
|
|
767
767
|
${K}
|
|
768
768
|
rounded-[var(--radius-md)] overflow-hidden
|
|
769
769
|
bg-[var(--color-bg-tertiary)] relative
|
|
770
770
|
transition-transform duration-300
|
|
771
|
-
${
|
|
772
|
-
`,children:[
|
|
771
|
+
${k&&d?"scale-105":""}
|
|
772
|
+
`,children:[u&&!w?e.jsx("img",{src:u,alt:r,className:`
|
|
773
773
|
w-full h-full object-cover transition-transform duration-500
|
|
774
|
-
${
|
|
775
|
-
`,onError:()=>
|
|
774
|
+
${k&&!d?"scale-105":"scale-100"}
|
|
775
|
+
`,onError:()=>C(!0),loading:"lazy"}):e.jsx(J,{}),e.jsxs("div",{className:"absolute top-2 start-2 z-10 flex flex-col gap-1 items-start",children:[$&&!d&&e.jsx(de,{variant:c,size:"sm",glow:!0,children:$}),N&&!d&&!$&&e.jsx(de,{variant:"danger",size:"sm",glow:!0,children:"Sale"}),N&&!d&&$&&e.jsx(de,{variant:"danger",size:"sm",glow:!0,children:$})]}),!a&&!d&&e.jsx("div",{className:"absolute inset-0 bg-black/55 flex items-center justify-center z-10",children:e.jsx("span",{className:"font-heading font-bold text-white text-xs uppercase tracking-wider",children:b("productLabels.outOfStock")})})]}),e.jsxs("div",{className:`
|
|
776
776
|
flex flex-col min-w-0 relative z-[1]
|
|
777
777
|
${z?"flex-1 mt-3":"flex-1"}
|
|
778
|
-
`,children:[
|
|
778
|
+
`,children:[f&&!d&&e.jsx("span",{className:"text-[10px] font-mono uppercase tracking-wider text-[var(--color-text-tertiary)] mb-1",children:f}),e.jsx("h3",{className:`
|
|
779
779
|
font-heading font-bold text-[var(--color-text-primary)]
|
|
780
|
-
${
|
|
780
|
+
${d?"text-sm":"text-base"}
|
|
781
781
|
line-clamp-2 leading-snug
|
|
782
|
-
${se||
|
|
782
|
+
${se||k?"hover:text-[var(--color-primary)]":""}
|
|
783
783
|
transition-colors duration-180
|
|
784
|
-
${
|
|
785
|
-
`,onClick:Q=>{
|
|
784
|
+
${k?"text-[var(--color-primary)]":""}
|
|
785
|
+
`,onClick:Q=>{x&&(Q.stopPropagation(),window.open(x,"_blank"))},children:r}),i&&!d&&e.jsx("p",{className:"text-[var(--color-text-secondary)] text-sm mt-1.5 line-clamp-2",children:i}),M.length>0&&!d&&e.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[M.slice(0,3).map(Q=>e.jsxs("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded-full bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]",children:["#",Q]},Q)),M.length>3&&e.jsxs("span",{className:"text-[10px] font-mono text-[var(--color-text-tertiary)]",children:["+",M.length-3]})]}),e.jsxs("div",{className:`
|
|
786
786
|
flex items-center justify-between gap-3
|
|
787
787
|
${z?"mt-auto pt-3":"mt-2"}
|
|
788
|
-
${
|
|
788
|
+
${d?"mt-1":""}
|
|
789
789
|
`,children:[e.jsxs("div",{className:"relative inline-flex items-baseline min-w-0",children:[e.jsx("span",{className:`
|
|
790
790
|
font-heading font-bold
|
|
791
|
-
${
|
|
792
|
-
${
|
|
793
|
-
`,children:
|
|
791
|
+
${d?"text-sm":"text-lg"}
|
|
792
|
+
${N?"text-[var(--color-danger)]":"text-[var(--color-text-primary)]"}
|
|
793
|
+
`,children:T(m)}),N&&j&&e.jsx("span",{className:`
|
|
794
794
|
absolute line-through text-[var(--color-text-tertiary)] font-mono
|
|
795
795
|
pointer-events-none whitespace-nowrap
|
|
796
|
-
${
|
|
797
|
-
`,children:
|
|
796
|
+
${d?"text-[8px] -top-2.5 start-0":"text-[10px] -top-3 start-0.5"}
|
|
797
|
+
`,children:T(j)})]}),n>0&&!d&&e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[e.jsx("span",{className:"flex text-xs leading-none","aria-hidden":"true",children:V()}),L>0&&e.jsxs("span",{className:"text-[10px] text-[var(--color-text-tertiary)]",children:["(",L,")"]})]})]}),v&&!d&&e.jsx("div",{className:"mt-3 pt-3 border-t border-[var(--color-border-secondary)]",children:e.jsx(fe,{variant:"primary",size:"sm",fullWidth:!0,disabled:!a,onClick:Q=>{Q.stopPropagation(),g==null||g()},children:b(a?"productLabels.addToCart":"productLabels.outOfStock")})})]}),d&&v&&e.jsx("button",{type:"button",onClick:Q=>{Q.stopPropagation(),a&&(g==null||g())},disabled:!a,className:`
|
|
798
798
|
flex-shrink-0 w-9 h-9 rounded-full
|
|
799
799
|
flex items-center justify-center relative z-10
|
|
800
800
|
transition-all duration-200
|
|
801
|
-
${
|
|
802
|
-
${
|
|
803
|
-
`,"aria-label":
|
|
801
|
+
${a?"bg-[var(--color-primary-solid)] text-white hover:bg-[var(--color-primary-hover)]":"bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)] cursor-not-allowed"}
|
|
802
|
+
${k&&a?"scale-110 shadow-[var(--shadow-glow-primary)]":"scale-100"}
|
|
803
|
+
`,"aria-label":b(a?"productLabels.addToCart":"productLabels.outOfStock"),children:e.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})})})]})};tt.displayName="ProductCard";const rt=({title:r,excerpt:m,coverImage:o,author:u,authorAvatar:i,date:n,readTime:L,category:f,tags:M=[],link:N,onClick:j,featured:a=!1,layout:$="vertical",glow:c="none",showCategory:x=!0,showAuthor:g=!0,showReadTime:R=!0,className:S="",fullWidthMobile:l=!1})=>{const{t:v,language:h}=ue(),[I,b]=t.useState({x:0,y:0}),[D,E]=t.useState(!1),[k,s]=t.useState(!1),w=t.useRef(null),C=$==="horizontal",y=T=>{if(!w.current)return;const V=w.current.getBoundingClientRect(),J=T.clientX-V.left,K=T.clientY-V.top;b({x:(K-V.height/2)/(V.height/2)*-6,y:(J-V.width/2)/(V.width/2)*6})},p=()=>E(!0),d=()=>{E(!1),b({x:0,y:0})},z={primary:"glow-primary",secondary:"glow-secondary",accent:"glow-accent",none:""},W={primary:"0 0 28px color-mix(in srgb, var(--color-primary) 45%, transparent)",secondary:"0 0 28px color-mix(in srgb, var(--color-secondary) 45%, transparent)",accent:"0 0 28px color-mix(in srgb, var(--color-accent) 45%, transparent)",none:"0 0 24px color-mix(in srgb, var(--color-primary) 28%, transparent)"}[c],q="var(--shadow-float, 0 8px 24px rgba(0,0,0,0.18))",B=`0 16px 40px rgba(0,0,0,0.28), ${W}`,F=T=>{try{const V=T instanceof Date?T:new Date(T);if(isNaN(V.getTime()))return"";const K={en:"en-US",fa:"fa-IR",fr:"fr-FR"}[h]||"en-US";return V.toLocaleDateString(K,{year:"numeric",month:"short",day:"numeric"})}catch{return console.warn("Invalid date provided to BlogCard:",T),""}},P=T=>{try{if(T instanceof Date)return isNaN(T.getTime())?void 0:T.toISOString();const V=new Date(T);return isNaN(V.getTime())?void 0:T}catch{return}},X=()=>e.jsx("div",{className:"w-full h-full flex items-center justify-center bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]",children:e.jsx(kt,{})}),U=C?"w-full sm:w-44 sm:h-44 md:w-52 md:h-52 flex-shrink-0 aspect-video sm:aspect-square":a?"w-full aspect-[16/9]":"w-full aspect-video",H=a?4:3,O=!!j;return e.jsxs("div",{ref:w,className:`
|
|
804
804
|
glass relative overflow-hidden
|
|
805
|
-
${
|
|
806
|
-
${z[
|
|
807
|
-
${
|
|
808
|
-
${
|
|
809
|
-
${
|
|
805
|
+
${a?"p-5":"p-4"}
|
|
806
|
+
${z[c]}
|
|
807
|
+
${l?"w-full sm:w-auto":""}
|
|
808
|
+
${C?"flex flex-col sm:flex-row gap-4":"flex flex-col h-full"}
|
|
809
|
+
${S}
|
|
810
810
|
${O?"cursor-pointer":""}
|
|
811
|
-
`,style:{transform:
|
|
811
|
+
`,style:{transform:D?`perspective(900px) rotateX(${I.x}deg) rotateY(${I.y}deg) translateY(-6px) scale(1.02)`:"perspective(900px) rotateX(0) rotateY(0) translateY(0) scale(1)",transformStyle:"preserve-3d",boxShadow:D?B:q,transition:"transform 0.22s ease-out, box-shadow 0.3s ease, border-color 0.25s ease",borderColor:D?"color-mix(in srgb, var(--color-primary) 35%, var(--color-border-primary))":void 0},onMouseMove:y,onMouseEnter:p,onMouseLeave:d,onClick:j,role:O?"button":void 0,tabIndex:O?0:void 0,"aria-label":O?`Blog post: ${r}`:void 0,onKeyDown:O?T=>{(T.key==="Enter"||T.key===" ")&&(j==null||j())}:void 0,children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-[inherit] transition-opacity duration-300 z-0",style:{opacity:D?1:0,background:"radial-gradient(ellipse at 30% 0%, color-mix(in srgb, var(--color-primary) 14%, transparent), transparent 55%)"}}),e.jsxs("div",{className:`
|
|
812
812
|
${U}
|
|
813
813
|
rounded-[var(--radius-md)] overflow-hidden
|
|
814
814
|
bg-[var(--color-bg-tertiary)] relative z-[1]
|
|
815
|
-
`,children:[
|
|
815
|
+
`,children:[o&&!k?e.jsx("img",{src:o,alt:r,className:`
|
|
816
816
|
w-full h-full object-cover transition-transform duration-500
|
|
817
|
-
${
|
|
818
|
-
`,onError:()=>
|
|
817
|
+
${D?"scale-105":"scale-100"}
|
|
818
|
+
`,onError:()=>s(!0),loading:"lazy"}):e.jsx(X,{}),f&&x&&e.jsx("span",{className:"absolute top-2.5 start-2.5 z-10",children:e.jsx(de,{variant:"primary",size:"sm",glow:!0,children:f})})]}),e.jsxs("div",{className:`
|
|
819
819
|
flex flex-col flex-1 min-w-0 relative z-[1]
|
|
820
|
-
${
|
|
820
|
+
${C?"":"mt-3"}
|
|
821
821
|
`,children:[e.jsx("h3",{className:`
|
|
822
822
|
font-heading font-bold leading-snug line-clamp-2
|
|
823
|
-
${
|
|
823
|
+
${a?"text-2xl":C?"text-lg":"text-xl"}
|
|
824
824
|
transition-colors duration-180
|
|
825
|
-
${
|
|
826
|
-
`,onClick:
|
|
825
|
+
${D?"text-[var(--color-primary)]":"text-[var(--color-text-primary)]"}
|
|
826
|
+
`,onClick:T=>{N&&(T.stopPropagation(),window.open(N,"_blank"))},children:r}),e.jsx("p",{className:`
|
|
827
827
|
text-[var(--color-text-secondary)] mt-2 flex-1
|
|
828
|
-
${
|
|
829
|
-
`,children:m}),
|
|
828
|
+
${a?"text-base line-clamp-3":"text-sm line-clamp-2"}
|
|
829
|
+
`,children:m}),M.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-3",children:[M.slice(0,H).map(T=>e.jsxs("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded-full bg-[var(--color-bg-tertiary)] text-[var(--color-text-tertiary)]",children:["#",T]},T)),M.length>H&&e.jsxs("span",{className:"text-[10px] font-mono text-[var(--color-text-tertiary)]",children:["+",M.length-H]})]}),e.jsxs("div",{className:"flex flex-col gap-3 mt-4 pt-3 border-t border-[var(--color-border-secondary)]",children:[g&&u&&e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(ke,{src:i,fallbackText:u,size:"sm"}),e.jsx("span",{className:"text-sm font-medium text-[var(--color-text-primary)] truncate",children:u})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-[var(--color-text-tertiary)]",children:[n&&e.jsx("time",{dateTime:P(n),children:F(n)}),R&&L!=null&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),v("blogLabels.minRead",{count:L})]})]}),N&&e.jsx("div",{children:e.jsxs("span",{className:`
|
|
830
830
|
text-sm font-medium text-[var(--color-primary)]
|
|
831
831
|
inline-flex items-center gap-1
|
|
832
832
|
transition-all duration-200
|
|
833
|
-
${
|
|
834
|
-
`,children:[
|
|
833
|
+
${D?"opacity-100 translate-x-0.5":"opacity-70"}
|
|
834
|
+
`,children:[v("blogLabels.readMore"),e.jsx("svg",{className:`
|
|
835
835
|
h-4 w-4 transition-transform duration-200 rtl:-scale-x-100
|
|
836
|
-
${
|
|
837
|
-
`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})})]})]})]})};
|
|
836
|
+
${D?"translate-x-0.5 rtl:-translate-x-0.5":""}
|
|
837
|
+
`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"})})]})})]})]})]})};rt.displayName="BlogCard";const ye=()=>e.jsx("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),Ce=()=>e.jsxs("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"5"}),e.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),e.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),e.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),e.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),e.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),e.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),e.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),e.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}),at=()=>e.jsx("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 2C12 2 5 9 5 15C5 18.866 8.134 22 12 22C15.866 22 19 18.866 19 15C19 9 12 2 12 2Z"})}),je=[{value:"nightfall",label:"Nightfall",icon:e.jsx(ye,{})},{value:"daylight",label:"Daylight",icon:e.jsx(Ce,{})},{value:"dracula",label:"Dracula",icon:e.jsx(at,{})}],ot=t.createContext(void 0),Le=r=>({nightfall:e.jsx(ye,{}),daylight:e.jsx(Ce,{}),dracula:e.jsx(at,{}),dark:e.jsx(ye,{}),light:e.jsx(Ce,{})})[r]||e.jsx(ye,{}),Bt=({defaultTheme:r,themes:m,autoDetect:o=!0,children:u})=>{const i="dara-ui-theme",n=()=>{var x;const c=localStorage.getItem(i);return c||r||((x=je[0])==null?void 0:x.value)||"nightfall"},[L,f]=t.useState(je),[M,N]=t.useState(n);t.useEffect(()=>{var g,R;if(!o&&m){f(m);return}if(m){f(m);return}const c=[],x=document.styleSheets;try{for(const S of x)try{const l=S.cssRules||S.rules;for(const v of l)if(v instanceof CSSStyleRule){const h=(g=v.selectorText)==null?void 0:g.match(/\[data-theme="([^"]+)"\]/);if(h&&h[1]){const I=h[1],b=I.split("-").map(D=>D.charAt(0).toUpperCase()+D.slice(1)).join(" ");c.some(D=>D.value===I)||c.push({value:I,label:b,icon:Le(I)})}}}catch{continue}}catch{}if(c.length>0){if(f(c),!c.some(S=>S.value===M)){const S=((R=c[0])==null?void 0:R.value)||"nightfall";N(S),j(S)}}else m&&f(m)},[o,m]);const j=t.useCallback(c=>{document.documentElement.setAttribute("data-theme",c)},[]);t.useEffect(()=>{j(M)},[M,j]);const a=t.useCallback(c=>{L.find(g=>g.value===c)&&(N(c),j(c),localStorage.setItem(i,c),window.dispatchEvent(new CustomEvent("dara-theme-change",{detail:{theme:c}})))},[L,j]);t.useEffect(()=>{const c=n();L.find(g=>g.value===c)&&j(c)},[L,j]),t.useEffect(()=>{const c=x=>{const{theme:g}=x.detail;g&&g!==M&&N(g)};return window.addEventListener("dara-theme-change",c),()=>{window.removeEventListener("dara-theme-change",c)}},[M]);const $=t.useMemo(()=>({theme:M,setTheme:a,themes:L}),[M,a,L]);return e.jsx(ot.Provider,{value:$,children:u})},Ot=()=>{const r=t.useContext(ot);if(!r)throw new Error("useTheme must be used within a ThemeProvider");return r},st=({value:r,defaultValue:m,onChange:o,availableThemes:u,autoDetect:i=!0,size:n="md",iconOnly:L=!1,fixedWidth:f,className:M="",useContext:N=!0,openUpward:j=!1})=>{const[a,$]=t.useState(!1),[c,x]=t.useState(je),g=t.useRef(null),R="dara-ui-theme";let S=null,l=!1;try{S=Ot(),l=N&&!0}catch{l=!1,S=null}const v=r!==void 0,[h,I]=t.useState(()=>{var d;const p=localStorage.getItem(R);return p||m||((d=je[0])==null?void 0:d.value)||"nightfall"});let b;v?b=r:l&&S?b=S.theme:b=h,t.useEffect(()=>{var z,W;if(!i&&u){x(u);return}if(u){x(u);return}const p=[],d=document.styleSheets;try{for(const q of d)try{const B=q.cssRules||q.rules;for(const F of B)if(F instanceof CSSStyleRule){const P=(z=F.selectorText)==null?void 0:z.match(/\[data-theme="([^"]+)"\]/);if(P&&P[1]){const X=P[1],U=X.split("-").map(H=>H.charAt(0).toUpperCase()+H.slice(1)).join(" ");p.some(H=>H.value===X)||p.push({value:X,label:U,icon:Le(X)})}}}catch{continue}}catch{}if(p.length>0){if(x(p),!p.some(q=>q.value===b)){const q=((W=p[0])==null?void 0:W.value)||"nightfall";!v&&!l&&I(q),D(q)}}else u&&x(u)},[i,u]);const D=t.useCallback(p=>{document.documentElement.setAttribute("data-theme",p)},[]);t.useEffect(()=>{D(b)},[b,D]),t.useEffect(()=>{const p=d=>{g.current&&!g.current.contains(d.target)&&$(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);const E=t.useCallback(p=>{l&&S?S.setTheme(p):v||I(p),D(p),o==null||o(p),$(!1),window.dispatchEvent(new CustomEvent("dara-theme-change",{detail:{theme:p}}))},[l,S,v,o,D]),k=t.useMemo(()=>c.map(p=>({...p,icon:p.icon||Le(p.value)})),[c]),s={sm:{trigger:"px-3 py-1.5 text-xs",option:"px-3 py-1.5 text-xs",icon:"h-3 w-3",iconOnlySize:"w-8 h-8",chevronSize:"h-3 w-3",iconOnlyWidth:"32px"},md:{trigger:"px-4 py-2 text-sm",option:"px-4 py-2 text-sm",icon:"h-4 w-4",iconOnlySize:"w-10 h-10",chevronSize:"h-4 w-4",iconOnlyWidth:"40px"},lg:{trigger:"px-5 py-2.5 text-base",option:"px-5 py-2.5 text-base",icon:"h-5 w-5",iconOnlySize:"w-12 h-12",chevronSize:"h-5 w-5",iconOnlyWidth:"48px"}},w=k.find(p=>p.value===b),C=L?s[n].iconOnlyWidth:f||"140px",y=p=>{if(t.isValidElement(p)){const d=p;return t.cloneElement(d,{className:`flex-shrink-0 ${n==="sm"?"w-4 h-4":n==="lg"?"w-6 h-6":"w-5 h-5"} ${d.props.className||""}`,width:n==="sm"?"16":n==="lg"?"24":"20",height:n==="sm"?"16":n==="lg"?"24":"20",viewBox:d.props.viewBox||"0 0 24 24"})}return p};return L?e.jsxs("div",{ref:g,className:`relative inline-flex ${M}`,children:[e.jsx("button",{type:"button",onClick:()=>$(!a),className:`
|
|
838
838
|
inline-flex items-center justify-center
|
|
839
839
|
bg-[var(--color-bg-tertiary)]
|
|
840
840
|
text-[var(--color-text-primary)]
|
|
@@ -844,25 +844,25 @@
|
|
|
844
844
|
hover:border-[var(--color-border-secondary)]
|
|
845
845
|
transition-all duration-180
|
|
846
846
|
active:scale-95
|
|
847
|
-
${
|
|
847
|
+
${s[n].trigger}
|
|
848
848
|
flex-shrink-0
|
|
849
|
-
`,style:{width:
|
|
849
|
+
`,style:{width:f||s[n].iconOnlyWidth,minWidth:f||s[n].iconOnlyWidth,height:f||s[n].iconOnlyWidth,minHeight:f||s[n].iconOnlyWidth},"aria-expanded":a,"aria-haspopup":"listbox","aria-label":`Current theme: ${(w==null?void 0:w.label)||"Theme"}`,children:(w==null?void 0:w.icon)&&y(w.icon)}),e.jsx("div",{className:`
|
|
850
850
|
absolute z-50
|
|
851
851
|
left-1/2 -translate-x-1/2
|
|
852
|
-
${
|
|
852
|
+
${j?"bottom-full mb-1.5":"top-full mt-1.5"}
|
|
853
853
|
glass
|
|
854
854
|
rounded-[var(--radius-md)]
|
|
855
855
|
py-1
|
|
856
856
|
shadow-[var(--shadow-float)]
|
|
857
857
|
transition-all duration-[var(--transition-fast)] ease-[var(--ease-in-out)]
|
|
858
858
|
overflow-hidden
|
|
859
|
-
${
|
|
860
|
-
`,style:{width:
|
|
859
|
+
${a?"opacity-100 translate-y-0 pointer-events-auto":j?"opacity-0 translate-y-2 pointer-events-none":"opacity-0 -translate-y-2 pointer-events-none"}
|
|
860
|
+
`,style:{width:C,minWidth:C,position:"absolute",top:j?"auto":"100%",bottom:j?"100%":"auto",marginTop:j?"0":"6px",marginBottom:j?"6px":"0"},role:"listbox",children:k.map(p=>{const d=p.value===b;return e.jsx("button",{type:"button",onClick:()=>E(p.value),className:`
|
|
861
861
|
w-full flex items-center justify-center gap-2
|
|
862
|
-
${
|
|
863
|
-
${
|
|
862
|
+
${s[n].option}
|
|
863
|
+
${d?"bg-[var(--color-primary-light)] text-[var(--color-primary)]":"text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/50"}
|
|
864
864
|
transition-colors duration-150
|
|
865
|
-
`,role:"option","aria-selected":
|
|
865
|
+
`,role:"option","aria-selected":d,title:p.label,children:p.icon&&y(p.icon)},p.value)})})]}):e.jsxs("div",{ref:g,className:`relative ${M}`,children:[e.jsxs("button",{type:"button",onClick:()=>$(!a),className:`
|
|
866
866
|
inline-flex items-center
|
|
867
867
|
bg-[var(--color-bg-tertiary)]
|
|
868
868
|
text-[var(--color-text-primary)]
|
|
@@ -872,72 +872,72 @@
|
|
|
872
872
|
hover:border-[var(--color-border-secondary)]
|
|
873
873
|
transition-all duration-180
|
|
874
874
|
active:scale-95
|
|
875
|
-
${
|
|
876
|
-
`,style:{width:
|
|
875
|
+
${s[n].trigger}
|
|
876
|
+
`,style:{width:f||"auto",minWidth:f||"auto"},"aria-expanded":a,"aria-haspopup":"listbox",children:[e.jsxs("span",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(w==null?void 0:w.icon)&&y(w.icon),e.jsx("span",{className:"font-mono tracking-wide truncate",children:(w==null?void 0:w.label)||"Theme"})]}),e.jsx("svg",{className:`
|
|
877
877
|
flex-shrink-0 ml-2
|
|
878
878
|
transition-transform duration-[var(--transition-med)] ease-[var(--ease-in-out)]
|
|
879
|
-
${
|
|
880
|
-
${
|
|
879
|
+
${a?"rotate-180":"rotate-0"}
|
|
880
|
+
${s[n].chevronSize}
|
|
881
881
|
`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),e.jsx("div",{className:`
|
|
882
882
|
absolute z-50
|
|
883
883
|
left-1/2 -translate-x-1/2
|
|
884
|
-
${
|
|
884
|
+
${j?"bottom-full mb-1.5":"top-full mt-1.5"}
|
|
885
885
|
pointer-events-none
|
|
886
|
-
`,style:{width:
|
|
886
|
+
`,style:{width:C,minWidth:C,top:j?"auto":"100%",bottom:j?"100%":"auto",marginTop:j?"0":"6px",marginBottom:j?"6px":"0"},children:e.jsx("div",{className:`
|
|
887
887
|
glass
|
|
888
888
|
rounded-[var(--radius-md)]
|
|
889
889
|
py-1
|
|
890
890
|
shadow-[var(--shadow-float)]
|
|
891
891
|
transition-all duration-[var(--transition-fast)] ease-[var(--ease-in-out)]
|
|
892
892
|
overflow-hidden
|
|
893
|
-
${
|
|
894
|
-
`,children:
|
|
893
|
+
${a?"opacity-100 translate-y-0 pointer-events-auto":j?"opacity-0 translate-y-2 pointer-events-none":"opacity-0 -translate-y-2 pointer-events-none"}
|
|
894
|
+
`,children:k.map(p=>{const d=p.value===b;return e.jsxs("button",{type:"button",onClick:()=>E(p.value),className:`
|
|
895
895
|
w-full flex items-center gap-2 text-left
|
|
896
|
-
${
|
|
897
|
-
${
|
|
896
|
+
${s[n].option}
|
|
897
|
+
${d?"bg-[var(--color-primary-light)] text-[var(--color-primary)]":"text-[var(--color-text-primary)] hover:bg-[var(--color-bg-elevated)]/50"}
|
|
898
898
|
transition-colors duration-150
|
|
899
|
-
`,role:"option","aria-selected":i,children:[d.icon&&N(d.icon),e.jsx("span",{className:"truncate",children:d.label}),i&&e.jsx("svg",{className:"ml-auto h-4 w-4 flex-shrink-0 text-[var(--color-primary)]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]},d.value)})})})]})};at.displayName="ThemeChanger";const zt={app:{title:"Dara UI Components"},hero:{version:"v1.0 - The Digital Archives",title:"DARA UI",subtitle:"A design system discovered inside a futuristic archive hidden beneath during a snowstorm."},navbar:{home:"Home",explore:"Explore",settings:"Settings",dashboard:"Dashboard",projects:"Projects",team:"Team",analytics:"Analytics",more:"More"},common:{thenImport:"Then import components:",hoverToFloat:"Hover to float",mission:"MISSION",requirements:"Requirements:",complete:"Complete",completeMission:"Complete Mission",areYouSureComplete:"Are you sure you want to complete the mission:",youWillEarn:"You will earn",uponCompletion:"upon completion."},codeBlock:{install:"npm install dara-ui",or:"or",yarnAdd:"yarn add dara-ui",thenImport:"Then import components:",importExample:"import { Button, Card, Input } from 'dara-ui';"},characterLabels:{mbti:"MBTI",species:"Species",affiliation:"Affiliation"},productLabels:{addToCart:"Add to Cart",outOfStock:"Out of Stock",sale:"Sale",new:"New",limited:"Limited"},blogLabels:{readMore:"Read more",minRead:"{{count}} min"},sidebar:{title:"Sidebar",hint:"Collapsible · Groups · Sub-menus · RTL ready",logout:"Logout",main:"Main",management:"Management",dashboard:"Dashboard",projects:"Projects",team:"Team",documents:"Documents",messages:"Messages",settings:"Settings",invoices:"Invoices",reports:"Reports",archive:"Archive",inbox:"Inbox",sent:"Sent",drafts:"Drafts",collapse:"Collapse",expand:"Expand",subtitle:"Collapsible navigation with groups, sub-menus, and RTL support",tip1:"Click the collapse button or press Ctrl+B to toggle",tip2:"Items with sub-menus expand on click",tip3:"Active items are highlighted with a purple accent",activeProjects:"Active Projects",completedTasks:"Completed Tasks",teamMembers:"Team Members",notifications:"Notifications",darkMode:"Dark Mode",language:"Language",dashboardContent:"Welcome to your dashboard. Here you can see an overview of your projects and team activity.",projectsContent:"Manage all your projects in one place. You have 12 active projects.",teamContent:"Your team members and their roles. 5 members online.",invoicesContent:"View and manage all your invoices.",reportsContent:"Generate and view detailed reports.",archiveContent:"Access archived documents and records.",inboxContent:"Your unread messages and conversations.",sentContent:"Messages you have sent to others.",draftsContent:"Your saved drafts and pending messages.",settingsContent:"Configure your application preferences and account settings.",activeProjectsLabel:"Active Projects",completedTasksLabel:"Completed Tasks",teamMembersLabel:"Team Members",notificationsLabel:"Notifications",storageLabel:"Storage",quickActionsLabel:"Quick Actions",recentActivityLabel:"Recent Activity",deployAction:"Deploy",reviewAction:"Review",inviteAction:"Invite",upgradeAction:"Upgrade",projectAlpha:"Project Alpha",projectBeta:"Project Beta",projectGamma:"Project Gamma",projectDelta:"Project Delta",inProgress:"In Progress",completed:"Completed",onHold:"On Hold",review:"In Review",memberRole1:"Lead Developer",memberRole2:"Designer",memberRole3:"Product Manager",memberRole4:"QA Engineer",activityUpload:"Uploaded new archive files",activityComment:"Commented on Project Alpha",activityMerge:"Merged pull request #42",activityDeploy:"Deployed to production",minutesAgo:"{{count}} min ago",hoursAgo:"{{count}} hours ago",invoiceNumber:"Invoice #{{num}}",invoicePaid:"Paid",invoicePending:"Pending",invoiceOverdue:"Overdue",reportWeekly:"Weekly Report",reportMonthly:"Monthly Report",reportQuarterly:"Quarterly Report",mobileSidebarHint:"Swipe or tap the menu to open navigation",openMenu:"Open menu",closeMenu:"Close menu"},badges:{title:"Badges",variants:"Variants",sizes:"Sizes",outline:"Outline Variants",withGlow:"With Glow",withIcons:"With Icons",primary:"Primary",secondary:"Secondary",success:"Success",danger:"Danger",warning:"Warning",small:"Small",medium:"Medium",large:"Large",glowPrimary:"Glow Primary",glowSuccess:"Glow Success",glowDanger:"Glow Danger",package:"Package",done:"Done",pending:"Pending",failed:"Failed"},buttons:{title:"Button Variants",withGlow:"With Glow",withIcons:"With Icons",states:"Button States",sizesTitle:"Button Sizes",primary:"Primary",secondary:"Secondary",accent:"Accent",glass:"Glass",danger:"Danger",success:"Success",outline:"Outline",normal:"Normal",hover:"Hover",pressed:"Pressed",disabled:"Disabled",loading:"Loading",small:"Small",medium:"Medium",large:"Large",glowPrimary:"Primary Glow",glowSecondary:"Secondary Glow",glowAccent:"Accent Glow",launch:"Launch",next:"Next",confirm:"Confirm"},avatar:{title:"Avatar",sizes:"Sizes",shapes:"Shapes",status:"Status Indicators",glowEffects:"Glow Effects",withImage:"With Image",group:"Group",clickable:"Clickable"},tooltip:{title:"Tooltip",placements:"Placements",variants:"Variants",withBadge:"With Badge",longContent:"Long Content",solidLabel:"Solid",outlineLabel:"Outline",glassLabel:"Glass",top:"Top",bottom:"Bottom",left:"Left",right:"Right",topLeft:"Top Left",topRight:"Top Right",bottomLeft:"Bottom Left",bottomRight:"Bottom Right",glassTooltip:"Glass tooltip",solidTooltip:"Solid tooltip",outlineTooltip:"Outline tooltip",unreadMessages:"You have {{count}} unread messages",longTooltip:"This is a longer tooltip with more detailed information about the element you're hovering over.",hoverDetails:"Hover for details",disabledTooltip:"This tooltip is disabled",noArrow:"No arrow on this tooltip",interactive:"Interactive tooltip",demoTitle:"Tooltip Demo",demoDescription:"Hover over the buttons below to see tooltips in action",placementDemo:"Placement Demo",variantDemo:"Variant Demo",sizeDemo:"Size Demo",longContentDemo:"Long Content Demo",badgeDemo:"Badge Demo",disabledDemo:"Disabled Tooltip Demo",noArrowDemo:"No Arrow Demo"},tabs:{title:"Tabs",archive:"Archive",quests:"Quests",stats:"Stats",settings:"Settings",archiveContent:"Browse encrypted Jedi records, holocrons, and mission logs from the archive.",questsContent:"Active missions, bounties, and side-quests await your attention, Padawan.",statsContent:"Track your Force alignment, XP gains, and cybernetic enhancement levels.",settingsContent:"Configure your HUD, theme mode, and archive encryption preferences."},accordion:{title:"Accordion",mode:"Mode",single:"Single",multiple:"Multiple",singleDesc:"Only one item can be open at a time",multipleDesc:"Multiple items can be open simultaneously",controlled:"Controlled - Open items:",withIcons:"With Icons",q1:"What is Dara UI?",a1:"Dara UI is a design system that feels like an interface discovered inside a futuristic archive hidden beneath during a snowstorm. It blends glassmorphism, cyberpunk, gothic aesthetics, Apple minimalism, and anime HUD elements.",q2:"What themes are available?",a2:"Nightfall (default), Daylight (light) and Dracula (purple).",q3:"How do I install it?",a3:"npm install dara-ui, then import { Button, Card, Input } from 'dara-ui'. Works with Vite, Next.js, and CRA out of the box.",dashboard:"Dashboard",projects:"Projects",settingsAccordion:"Settings",dashboardContent:"Dashboard overview with key metrics and recent activity.",projectsContent:"Active projects and their current status.",settingsContentAccordion:"Configure your application preferences."},dropdown:{title:"Dropdown",basic:"Basic",withIcons:"With Icons",searchable:"Searchable",controlled:"Controlled - Selected:",selectFramework:"Select a framework...",withPlaceholder:"With placeholder",selectWithIcons:"Select with icons...",searchWithIcons:"Search with icons...",searchOptions:"Search options...",searchFrameworks:"Search frameworks...",typeToFilter:"Type to filter options",framework:"Framework",chooseFramework:"Choose your preferred framework",setVue:"Set Vue",setSvelte:"Set Svelte",setSolid:"Set Solid"},cards:{title:"Cards",variants:"Variants",floatGlow:"Float + Glow",featureCards:"Feature Cards",glassCard:"Glass Card",solidCard:"Solid Card",outlineCard:"Outline Card",primaryGlow:"Primary Glow",secondaryGlow:"Secondary Glow",accentGlow:"Accent Glow",launch:"Launch",analytics:"Analytics",deployProject:"Deploy your project with one click.",trackPerformance:"Track your performance metrics."},inputs:{title:"Inputs",basic:"Basic Inputs",withLabels:"With Labels",withIconsTitle:"With Icons",validation:"Validation States",textInput:"Text input",password:"Password",search:"Search",email:"Email",username:"Username",enterUsername:"Enter username",enterEmail:"Enter email",emailHelper:"We'll never share your email.",success:"Success",error:"Error",validInput:"Valid input!",somethingWrong:"Something went wrong"},modal:{title:"Modal",openModal:"Open Modal",viewContent:"View Content",archiveAccess:"Archive Access",acceptMission:"Accept Mission",decline:"Decline",modalDescription:"You've discovered a sealed Jedi archive fragment. This modal uses glass-heavy styling with blur(30px) backdrop, scale-in animation, and is rendered via React Portal outside the DOM tree."},toast:{title:"Toast Notifications",subtitle:"Top-right · Minimal · 220ms slide-in · Auto-dismiss",successToast:"Success Toast",errorToast:"Error Toast",warningToast:"Warning Toast",infoToast:"Info Toast",successMsg:"Mission complete! +300 XP earned.",errorMsg:"Connection lost. Retrying...",warningMsg:"Please check your connection",infoMsg:"Archives are being indexed"},progress:{title:"Progress",horizontal:"Horizontal",labelInside:"Label Inside Bar",displayTypes:"Display Types",sizes:"Sizes",radial:"Radial",radialCustom:"Radial with Custom Label",radialSizes:"Radial Sizes",almostDone:"Almost done!",loading:"Loading...",done:"Done!"},xpbar:{title:"XPBar, RankTier",rankProgress:"RANK PROGRESS",missionProgress:"MISSION PROGRESS",tier:"Tier",rank:"Rank",points:"Points",exp:"EXP",score:"Score",prestige:"Prestige"},rank:{common:"Common",uncommon:"Uncommon",rare:"Rare",epic:"Epic",legendary:"Legendary",recruit:"Recruit",soldier:"Soldier",veteran:"Veteran",elite:"Elite",commander:"Commander"},glow:{title:"Glow Effects",glowPrimary:"Glow Primary",glowSecondary:"Glow Secondary",glowAccent:"Glow Accent"},quest:{title:"Quest Cards",buildCMS:"Build CMS",buildCMSDesc:"Deploy the encrypted Jedi archive interface before the snow melts.",secureArchives:"Secure Archives",secureArchivesDesc:"Implement end-to-end encryption for all stored data in the archive.",legendaryQuest:"Legendary Quest: The Lost Archive",legendaryQuestDesc:"Journey into the depths of the forgotten vault and retrieve the ancient holocron.",mapNightCity:"Map Night City",mapNightCityDesc:"Create a comprehensive map of the cyberpunk district before the data purge.",requirements:"Requirements",completeReviews:"Complete 3 code reviews",writeTests:"Write 5 unit tests",deployStaging:"Deploy to staging",reachLevel:"Reach level 25",defeatGuardian:"Defeat the Shadow Guardian",collectArtifacts:"Collect 3 ancient artifacts",solveRiddle:"Solve the sphinx riddle",scanLocations:"Scan 10 locations",interviewNPCs:"Interview 5 NPCs",uploadArchive:"Upload to the archive",deadline:"Deadline",deadlineToday:"Deadline: Today",deadlineTomorrow:"Deadline: Tomorrow",deadlineTonight:"Deadline: Tonight",deadlineYesterday:"Deadline: Yesterday",daysAgo:"days ago",days:"days",week:"week",weeks:"weeks",month:"month",months:"months",years:"years"},character:{title:"Character Cards",vertical:"Vertical Layout (default)",horizontal:"Horizontal Layout",daraName:"Dara",daraSubtitle:"Jedi Archivist",daraQuote:"The dark is not to be feared - it is to be archived.",cipherName:"Cipher",cipherSubtitle:"Netrunner",cipherQuote:"The code is the key to everything.",shadowName:"Shadow",shadowSubtitle:"Night Hunter",shadowQuote:"I move in the darkness where they cannot see.",force:"Force",combat:"Combat",intelligence:"Intelligence",wisdom:"Wisdom",hacking:"Hacking",stealth:"Stealth",agility:"Agility",strength:"Strength",speciesHumanCyborg:"Human/Cyborg",speciesCyborg:"Cyborg",speciesVampire:"Vampire",affiliationJedi:"Jedi Order",affiliationNetwatch:"Netwatch",affiliationNightCouncil:"Night Council",traitMbtiIntj:"MBTI: INTJ",traitMbtiIntp:"MBTI: INTP",traitMbtiIstp:"MBTI: ISTP",traitHumanCyborg:"Human/Cyborg",traitCyborg:"Cyborg",traitVampire:"Vampire"},statsWidget:{title:"Stats Widget",radialVariant:"Radial Variant",barVariant:"Bar Variant",horizontalLayout:"Horizontal Layout",forceStats:"FORCE STATS",characterStats:"CHARACTER STATS",progress:"PROGRESS",skills:"SKILLS",battleStats:"BATTLE STATS",skillProgress:"SKILL PROGRESS",health:"Health",mana:"Mana",stamina:"Stamina",level:"Level",endurance:"Endurance",luck:"Luck",statsSuffix:"stats"},themeChanger:{title:"Theme Changer",default:"Default",iconOnly:"Icon Only",fixedWidth:"Fixed Width (160px)",small:"Small",smallIconOnly:"Small Icon Only",customThemes:"Custom Themes",demo:"Demo",themeChangerDesc:"Theme changer with auto-detection, icon-only mode, and fixed width support. Pass iconOnly for compact navbar usage, or fixedWidth for consistent sizing."},languageChanger:{title:"Language Changer",default:"Default",iconOnly:"Icon Only",fixedWidth:"Fixed Width (160px)",small:"Small",smallIconOnly:"Small Icon Only",customLanguages:"Custom Languages",demo:"Demo",languageChangerDesc:"Language changer with localStorage persistence, icon-only mode, and fixed width support. Pass iconOnly for compact navbar usage, or fixedWidth for consistent sizing. The language is persisted via localStorage and updates the lang and dir attributes on the html element."},gradients:{title:"Gradients",primary:"Primary",accent:"Accent",success:"Success",danger:"Danger"},effects:{title:"Effects",glassEffect:"Glass Effect",glowPrimary:"Glow Primary",glowAccent:"Glow Accent"},typography:{title:"Typography",textSecondary:"Text Secondary",regularBody:"Regular body text with Inter font",gradientHeading:"Gradient Heading",accentText:"Accent colored text",codeExample:'console.log("Code with JetBrains Mono");'},persian:{title:"Persian Support",persianText:"این متن با فونت وزیرمتن نمایش داده میشود",persianHeading:"عنوان فارسی با قلم Kook",persianDesc:"متن فارسی با اندازه کوچک و رنگ ثانویه"},checkbox:{title:"Checkbox",basic:"Basic Checkboxes",sizes:"Sizes",states:"States",rtlSupport:"RTL Support",controlled:"Controlled",group:"Group Example",unchecked:"Unchecked",checked:"Checked",glowChecked:"Glow when checked",small:"Small",medium:"Medium",large:"Large",normal:"Normal",error:"Error State",disabled:"Disabled",disabledChecked:"Disabled Checked",rtlLabel1:"پذیرش شرایط",rtlLabel2:"تایید اطلاعات",rtlLabel3:"فعال سازی حالت شب",rtlNote:"RTL mode - label appears on the right",controlledLabel:"Controlled checkbox",status:"Status",check:"Check",uncheck:"Uncheck",groupLabel:"Select your preferences:",groupOption1:"Enable notifications",groupOption2:"Dark mode",groupOption3:"Auto-save",selectedCount:"Selected"},switch:{title:"Switch",basic:"Basic Switches",sizes:"Sizes",states:"States",rtlSupport:"RTL Support",controlled:"Controlled",group:"Group Example",off:"Off",on:"On",glowOn:"Glow when on",small:"Small",medium:"Medium",large:"Large",normal:"Normal",disabledOff:"Disabled Off",disabledOn:"Disabled On",rtlLabel1:"فعال سازی حالت شب",rtlLabel2:"فعال کردن اعلانها",rtlLabel3:"حالت خودکار",rtlNote:"RTL mode - label stays above, switch mirrors direction",controlledLabel:"Controlled switch",status:"Status",turnOn:"Turn On",turnOff:"Turn Off",groupLabel:"Settings:",groupOption1:"Enable notifications",groupOption2:"Dark mode",groupOption3:"Auto-save",enabledCount:"Enabled",withIcons:"With Icons",notifications:"Notifications",darkMode:"Dark mode",sound:"Sound"},radio:{title:"Radio",basic:"Basic Radios",sizes:"Sizes",states:"States",rtlSupport:"RTL Support",controlled:"Controlled",group:"Group Example",unselected:"Unselected",selected:"Selected",glowSelected:"Glow when selected",small:"Small",medium:"Medium",large:"Large",normal:"Normal",error:"Error State",disabled:"Disabled",disabledChecked:"Disabled Checked",rtlLabel1:"پذیرش شرایط",rtlLabel2:"تایید اطلاعات",rtlLabel3:"فعال سازی حالت شب",rtlNote:"RTL mode - label appears on the right",controlledLabel:"Controlled radio",status:"Status",select:"Select",deselect:"Deselect",groupLabel:"Select your preference:",groupOption1:"Enable notifications",groupOption2:"Dark mode",groupOption3:"Auto-save",horizontalGroup:"Horizontal group",nightfall:"Nightfall",daylight:"Daylight",dracula:"Dracula"},range:{title:"Range Slider",basic:"Basic Ranges",colors:"Color Variants",sizes:"Sizes",customUnits:"Custom Units",valuePositions:"Value Positions",sparkleAtMax:"Sparkle at Max",withoutGlow:"Without Glow",controlled:"Controlled Mode",volume:"Volume",brightness:"Brightness",contrast:"Contrast",primary:"Primary",secondary:"Secondary",accent:"Accent",success:"Success",danger:"Danger",warning:"Warning",small:"Small",medium:"Medium (default)",large:"Large",pixels:"Pixels",price:"Price",rial:"Rial (تومان)",temperature:"Temperature",left:"Left",right:"Right (default)",top:"Top",bottom:"Bottom",almostMax:"Almost at max",atMax:"At max (sparkle!)",sparkleNote:"Sparkle burst animation when reaching maximum value",noGlow:"No glow effect",noGlow2:"Secondary without glow",liveValue:"Live value",finalValue:"Final value",controlledLabel:"Controlled range",set25:"Set 25%",set75:"Set 75%",set100:"Set 100%",reset:"Reset"},productCard:{title:"Product Cards",variants:"Variants",layouts:"Layouts",glows:"Glow Effects",withActions:"With Quick Actions",responsive:"Responsive (Full width on mobile)",addToCart:"Add to Cart",outOfStock:"Out of Stock",sale:"Sale",new:"New",limited:"Limited",reviews:"reviews",vertical:"Vertical",horizontal:"Horizontal",compact:"Compact",primaryGlow:"Primary Glow",secondaryGlow:"Secondary Glow",accentGlow:"Accent Glow",product1:"Cyberpunk 2077 - Collector's Edition",product2:"Jedi Holocron - Limited Run",product3:"Neon Samurai Controller",product4:"Data Shard - Encrypted",desc1:"Limited edition collector's set with art book, steelbook case, and exclusive digital content.",desc2:"Authentic Jedi holocron replica with light and sound effects. Limited to 500 units worldwide.",desc3:"Wireless controller with RGB lighting, programmable back buttons, and low-latency connection.",desc4:"Encrypted data shard containing classified archive fragments. Requires Level 5 clearance.",category1:"Gaming",category2:"Collectibles",category3:"Accessories",category4:"Data",tag1:"limited",tag2:"collector",tag3:"exclusive",tag4:"encrypted"},blogCard:{title:"Blog Cards",variants:"Variants",layouts:"Layouts",glows:"Glow Effects",responsive:"Responsive (Full width on mobile)",readMore:"Read More",featured:"Featured Post",vertical:"Vertical",horizontal:"Horizontal",primaryGlow:"Primary Glow",secondaryGlow:"Secondary Glow",accentGlow:"Accent Glow",post1:"The Future of Glassmorphism in UI Design",post2:"Building a Design System from Scratch",post3:"Mastering 3D Hover Effects in React",post4:"The Art of Cyberpunk Aesthetics",excerpt1:"Explore how glassmorphism is evolving and why it's becoming the go-to aesthetic for modern interfaces in 2024.",excerpt2:"A comprehensive guide to building a design system that scales, from tokens to components.",excerpt3:"Learn how to create smooth 3D tilt effects for cards, images, and interactive elements.",excerpt4:"Dive into the cyberpunk aesthetic and how it influences modern UI design.",author1:"Jane Doe",author2:"John Smith",author3:"Alex Rivers",author4:"Taylor Night",category1:"Design",category2:"Development",category3:"React",category4:"Aesthetics",tag1:"design",tag2:"tutorial",tag3:"react",tag4:"aesthetic"}},Bt={app:{title:"کامپوننتهای دارا UI"},hero:{version:"نسخه ۱.۰ - آرشیو دیجیتال",title:"دارا UI",subtitle:"یک سیستم طراحی کشفشده در آرشیوی آیندهنگرانه که در زیر برف پنهان شده بود."},navbar:{home:"خانه",explore:"کاوش",settings:"تنظیمات",dashboard:"داشبورد",projects:"پروژهها",team:"تیم",analytics:"تحلیل",more:"بیشتر"},common:{thenImport:"سپس کامپوننتها را ایمپورت کنید:",hoverToFloat:"برای شناوری هاور کنید",mission:"ماموریت",requirements:"نیازمندیها:",complete:"تکمیل",completeMission:"تکمیل ماموریت",areYouSureComplete:"آیا مطمئن هستید که میخواهید ماموریت را تکمیل کنید:",youWillEarn:"شما دریافت خواهید کرد",uponCompletion:"پس از تکمیل."},codeBlock:{install:"npm install dara-ui",or:"یا",yarnAdd:"yarn add dara-ui",thenImport:"سپس کامپوننتها را ایمپورت کنید:",importExample:"import { Button, Card, Input } from 'dara-ui';"},characterLabels:{mbti:"MBTI",species:"گونه",affiliation:"وابستگی"},productLabels:{addToCart:"افزودن به سبد",outOfStock:"ناموجود",sale:"تخفیف",new:"جدید",limited:"محدود"},blogLabels:{readMore:"ادامه مطلب",minRead:"{{count}} دقیقه"},sidebar:{title:"سایدبار",hint:"جمعشونده · گروهها · زیرمنوها · آماده RTL",logout:"خروج",main:"اصلی",management:"مدیریت",dashboard:"داشبورد",projects:"پروژهها",team:"تیم",documents:"اسناد",messages:"پیامها",settings:"تنظیمات",invoices:"فاکتورها",reports:"گزارشها",archive:"آرشیو",inbox:"صندوق ورودی",sent:"ارسالشده",drafts:"پیشنویسها",collapse:"جمع کردن",expand:"باز کردن",subtitle:"ناوبری جمعشونده با گروهها، زیرمنوها و پشتیبانی از RTL",tip1:"برای جمع کردن یا باز کردن، دکمه را کلیک کنید یا Ctrl+B را فشار دهید",tip2:"آیتمهای دارای زیرمنو با کلیک باز میشوند",tip3:"آیتمهای فعال با رنگ بنفش مشخص شدهاند",activeProjects:"پروژههای فعال",completedTasks:"وظایف انجام شده",teamMembers:"اعضای تیم",notifications:"اعلانها",darkMode:"حالت تاریک",language:"زبان",dashboardContent:"به داشبورد خود خوش آمدید. در اینجا میتوانید نمای کلی از پروژهها و فعالیت تیم خود را مشاهده کنید.",projectsContent:"همه پروژههای خود را در یک مکان مدیریت کنید. شما ۱۲ پروژه فعال دارید.",teamContent:"اعضای تیم و نقشهای آنها. ۵ عضو آنلاین هستند.",invoicesContent:"مشاهده و مدیریت تمام فاکتورهای شما.",reportsContent:"ایجاد و مشاهده گزارشهای دقیق.",archiveContent:"دسترسی به اسناد و مدارک بایگانی شده.",inboxContent:"پیامهای خوانده نشده و مکالمات شما.",sentContent:"پیامهایی که به دیگران ارسال کردهاید.",draftsContent:"پیشنویسهای ذخیره شده و پیامهای در انتظار شما.",settingsContent:"تنظیمات برنامه و حساب کاربری خود را پیکربندی کنید.",activeProjectsLabel:"پروژههای فعال",completedTasksLabel:"وظایف انجام شده",teamMembersLabel:"اعضای تیم",notificationsLabel:"اعلانها",storageLabel:"فضای ذخیرهسازی",quickActionsLabel:"اقدامات سریع",recentActivityLabel:"فعالیتهای اخیر",deployAction:"استقرار",reviewAction:"بررسی",inviteAction:"دعوت",upgradeAction:"ارتقا",projectAlpha:"پروژه آلفا",projectBeta:"پروژه بتا",projectGamma:"پروژه گاما",projectDelta:"پروژه دلتا",inProgress:"در حال انجام",completed:"تکمیل شده",onHold:"متوقف شده",review:"در بررسی",memberRole1:"توسعهدهنده ارشد",memberRole2:"طراح",memberRole3:"مدیر محصول",memberRole4:"مهندس تست",activityUpload:"فایلهای آرشیو جدید را آپلود کرد",activityComment:"در پروژه آلفا نظر داد",activityMerge:"درخواست ادغام #۴۲ را ادغام کرد",activityDeploy:"به محیط عملیاتی مستقر کرد",minutesAgo:"{{count}} دقیقه پیش",hoursAgo:"{{count}} ساعت پیش",invoiceNumber:"فاکتور #{{num}}",invoicePaid:"پرداخت شده",invoicePending:"در انتظار",invoiceOverdue:"معوق",reportWeekly:"گزارش هفتگی",reportMonthly:"گزارش ماهانه",reportQuarterly:"گزارش فصلی",mobileSidebarHint:"برای باز کردن منو، بکشید یا روی آن ضربه بزنید",openMenu:"باز کردن منو",closeMenu:"بستن منو"},badges:{title:"نشانها",variants:"واریانتها",sizes:"اندازهها",outline:"واریانتهای خطی",withGlow:"با درخشش",withIcons:"با آیکونها",primary:"اصلی",secondary:"ثانویه",success:"موفق",danger:"خطر",warning:"اخطار",small:"کوچک",medium:"متوسط",large:"بزرگ",glowPrimary:"درخشش اصلی",glowSuccess:"درخشش موفق",glowDanger:"درخشش خطر",package:"بسته",done:"انجام شد",pending:"در انتظار",failed:"ناموفق"},buttons:{title:"واریانتهای دکمه",withGlow:"با درخشش",withIcons:"با آیکونها",states:"وضعیتهای دکمه",sizesTitle:"اندازههای دکمه",primary:"اصلی",secondary:"ثانویه",accent:"متضاد",glass:"شیشهای",danger:"خطر",success:"موفق",outline:"خطی",normal:"عادی",hover:"هاور",pressed:"فشرده",disabled:"غیرفعال",loading:"در حال بارگذاری",small:"کوچک",medium:"متوسط",large:"بزرگ",glowPrimary:"درخشش اصلی",glowSecondary:"درخشش ثانویه",glowAccent:"درخشش متضاد",launch:"اجرا",next:"بعدی",confirm:"تأیید"},avatar:{title:"آواتار",sizes:"اندازهها",shapes:"اشکال",status:"وضعیتها",glowEffects:"جلوههای درخشش",withImage:"با تصویر",group:"گروه",clickable:"قابل کلیک"},tooltip:{title:"راهنما",placements:"موقعیتها",variants:"واریانتها",withBadge:"با نشان",longContent:"متن بلند",solidLabel:"توپر",outlineLabel:"خطی",glassLabel:"شیشهای",top:"بالا",bottom:"پایین",left:"چپ",right:"راست",topLeft:"بالا چپ",topRight:"بالا راست",bottomLeft:"پایین چپ",bottomRight:"پایین راست",glassTooltip:"راهنمای شیشهای",solidTooltip:"راهنمای توپر",outlineTooltip:"راهنمای خطی",unreadMessages:"شما {{count}} پیام خواندهنشده دارید",longTooltip:"این یک راهنمای بلندتر با اطلاعات دقیقتر درباره المان مورد نظر است.",hoverDetails:"برای جزئیات هاور کن",disabledTooltip:"این راهنما غیرفعال است",noArrow:"بدون پیکان در این راهنما",interactive:"راهنمای تعاملی",demoTitle:"نمایش راهنما",demoDescription:"برای مشاهده راهنماها، روی دکمههای زیر هاور کنید",placementDemo:"نمایش موقعیتها",variantDemo:"نمایش واریانتها",sizeDemo:"نمایش اندازهها",longContentDemo:"نمایش متن بلند",badgeDemo:"نمایش با نشان",disabledDemo:"نمایش راهنمای غیرفعال",noArrowDemo:"نمایش بدون پیکان"},tabs:{title:"تبها",archive:"آرشیو",quests:"ماموریتها",stats:"آمار",settings:"تنظیمات",archiveContent:"مرور سوابق رمزنگاریشده جدای، هولوکرونها و گزارش ماموریتها از آرشیو کلگری.",questsContent:"ماموریتهای فعال، جایزهها و ماموریتهای جانبی منتظر توجه شما هستند، پادوان.",statsContent:"همترازی نیرو، افزایش XP و سطوح ارتقای سایبرنتیک خود را پیگیری کنید.",settingsContent:"هاد، تم و تنظیمات رمزنگاری آرشیو را پیکربندی کنید."},accordion:{title:"آکاردئون",mode:"حالت",single:"تکی",multiple:"چندگانه",singleDesc:"فقط یک آیتم میتواند در هر زمان باز باشد",multipleDesc:"چندین آیتم میتوانند همزمان باز باشند",controlled:"کنترلشده - آیتمهای باز:",withIcons:"با آیکونها",q1:"دارا UI چیست؟",a1:"دارا UI یک سیستم طراحی است که حس یک رابط کشفشده در آرشیوی آیندهنگرانه در زیر کلگری در طوفان برف را دارد. ترکیبی از شیشهای، سایبرپانک، گوتیک، مینیمالیسم اپل و عناصر هاد انیمهای.",q2:"چه تمهایی موجود است؟",a2:"آرشیو شب (پیشفرض)، کلگری برفی (روشن)، حالت سیت (سیاه + قرمز)، معبد جدای (سفید + آبی)، دراکولا (بنفش) و شراب (قرمز تیره).",q3:"چگونه نصب کنم؟",a3:"npm install dara-ui, بعدش import { Button, Card, Input } from 'dara-ui' رو اول کدت اضافه کن. این کتابخونه با Vite، Next.js، و CRA قابل استفادست.",dashboard:"داشبورد",projects:"پروژهها",settingsAccordion:"تنظیمات",dashboardContent:"نمای کلی داشبورد با معیارهای کلیدی و فعالیتهای اخیر.",projectsContent:"پروژههای فعال و وضعیت فعلی آنها.",settingsContentAccordion:"تنظیمات برنامه خود را پیکربندی کنید."},dropdown:{title:"دراپداون",basic:"پایه",withIcons:"با آیکونها",searchable:"قابل جستجو",controlled:"کنترلشده - انتخابشده:",selectFramework:"یک فریمورک انتخاب کنید...",withPlaceholder:"با جایگذاری",selectWithIcons:"با آیکون انتخاب کنید...",searchWithIcons:"با آیکون جستجو کنید...",searchOptions:"جستجوی گزینهها...",searchFrameworks:"جستجوی فریمورکها...",typeToFilter:"برای فیلتر کردن تایپ کنید",framework:"فریمورک",chooseFramework:"فریمورک مورد نظر خود را انتخاب کنید",setVue:"تنظیم Vue",setSvelte:"تنظیم Svelte",setSolid:"تنظیم Solid"},cards:{title:"کارتها",variants:"واریانتها",floatGlow:"شناور + درخشش",featureCards:"کارتهای ویژه",glassCard:"کارت شیشهای",solidCard:"کارت توپر",outlineCard:"کارت خطی",primaryGlow:"درخشش با رنگ اولیه",secondaryGlow:"درخشش با رنگ دوم",accentGlow:"درخشش با رنگ اکسنت",launch:"اجرا",analytics:"تحلیل",deployProject:"پروژه خود را با یک کلیک مستقر کنید.",trackPerformance:"معیارهای عملکرد خود را پیگیری کنید."},inputs:{title:"ورودیها",basic:"ورودیهای پایه",withLabels:"با برچسبها",withIconsTitle:"با آیکونها",validation:"وضعیتهای اعتبارسنجی",textInput:"ورودی متن",password:"رمز عبور",search:"جستجو",email:"ایمیل",username:"نام کاربری",enterUsername:"نام کاربری را وارد کنید",enterEmail:"ایمیل را وارد کنید",emailHelper:"ما هرگز ایمیل شما را به اشتراک نمیگذاریم.",success:"موفق",error:"خطا",validInput:"ورودی معتبر!",somethingWrong:"مشکلی پیش آمده است"},modal:{title:"مودال",openModal:"باز کردن مودال",viewContent:"مشاهده محتوا",archiveAccess:"دسترسی به آرشیو",acceptMission:"پذیرش ماموریت",decline:"رد کردن",modalDescription:"شما یک قطعه آرشیو جدای مهر و موم شده را کشف کردید. این مودال از استایل glass-heavy با blur(30px) استفاده میکند."},toast:{title:"اعلانهای توست",subtitle:"بالا-راست · مینیمال · اسلاید ۲۲۰ms · خودکار حذف",successToast:"توست موفق",errorToast:"توست خطا",warningToast:"توست اخطار",infoToast:"توست اطلاعات",successMsg:"ماموریت انجام شد! +۳۰۰ XP دریافت شد.",errorMsg:"اتصال قطع شد. تلاش مجدد...",warningMsg:"لطفا اتصال خود را بررسی کنید",infoMsg:"آرشیوها در حال ایندکس شدن هستند"},progress:{title:"پیشرفت",horizontal:"افقی",labelInside:"برچسب داخل نوار",displayTypes:"انواع نمایش",sizes:"اندازهها",radial:"دایرهای",radialCustom:"دایرهای با برچسب سفارشی",radialSizes:"اندازههای دایرهای",almostDone:"تقریبا تمام شد!",loading:"لودینگ...",done:"انجام شد!"},xpbar:{title:"نوار تجربه، سطح",rankProgress:"پیشرفت رتبه",missionProgress:"پیشرفت ماموریت",tier:"سطح",rank:"رتبه",points:"امتیاز",exp:"تجربه",score:"امتیاز",prestige:"اعتبار"},rank:{common:"معمولی",uncommon:"غیرمعمول",rare:"کمیاب",epic:"حماسی",legendary:"افسانهای",recruit:"تازهکار",soldier:"سرباز",veteran:"کهنهکار",elite:"نخبه",commander:"فرمانده"},glow:{title:"جلوههای درخشش",glowPrimary:"درخشش بنفش",glowSecondary:"درخشش فیروزهای",glowAccent:"درخشش صورتی"},quest:{title:"کارتهای ماموریت",buildCMS:"ساخت CMS",buildCMSDesc:"رابط آرشیو جدای را پیش از آب شدن برفها مستقر کنید.",secureArchives:"ایمنسازی آرشیو",secureArchivesDesc:"رمزنگاری سرتاسری برای تمام دادههای ذخیرهشده در آرشیو پیادهسازی کنید.",legendaryQuest:"ماموریت افسانهای: آرشیو گمشده",legendaryQuestDesc:"به اعماق طاق فراموششده سفر کنید و هولوکرون باستانی را بازیابی کنید.",mapNightCity:"نقشهبرداری شبشهر",mapNightCityDesc:"نقشه جامعی از منطقه سایبرپانکی قبل از پاکسازی داده ایجاد کنید.",requirements:"نیازمندیها",completeReviews:"تکمیل ۳ بازبینی کد",writeTests:"نوشتن ۵ تست واحد",deployStaging:"استقرار در محیط تست",reachLevel:"رسیدن به سطح ۲۵",defeatGuardian:"شکست دادن نگهبان سایه",collectArtifacts:"جمعآوری ۳ اثر باستانی",solveRiddle:"حل معما",scanLocations:"اسکن ۱۰ مکان",interviewNPCs:"مصاحبه با ۵ شخصیت",uploadArchive:"آپلود در آرشیو",deadline:"مهلت",deadlineToday:"مهلت: امروز",deadlineTomorrow:"مهلت: فردا",deadlineTonight:"مهلت: امشب",deadlineYesterday:"مهلت: دیروز",daysAgo:"روز پیش",days:"روز",week:"هفته",weeks:"هفته",month:"ماه",months:"ماه",years:"سال"},character:{title:"کارتهای شخصیت",vertical:"چیدمان عمودی (پیشفرض)",horizontal:"چیدمان افقی",daraName:"دارا",daraSubtitle:"بایگان جدای",daraQuote:"تاریکی ترسناک نیست - باید بایگانی شود.",cipherName:"سایفر",cipherSubtitle:"نترانر",cipherQuote:"کد کلید همه چیز است.",shadowName:"سایه",shadowSubtitle:"شکارچی شب",shadowQuote:"من در تاریکی حرکت میکنم جایی که آنها نمیتوانند ببینند.",force:"نیرو",combat:"رزمی",intelligence:"هوش",wisdom:"خرد",hacking:"هک",stealth:"مخفیکاری",agility:"چابکی",strength:"قدرت",speciesHumanCyborg:"انسان/سایبورگ",speciesCyborg:"سایبورگ",speciesVampire:"خونآشام",affiliationJedi:"فرقه جدای",affiliationNetwatch:"نتواچ",affiliationNightCouncil:"شورای شب",traitMbtiIntj:"MBTI: INTJ",traitMbtiIntp:"MBTI: INTP",traitMbtiIstp:"MBTI: ISTP",traitHumanCyborg:"انسان/سایبورگ",traitCyborg:"سایبورگ",traitVampire:"خونآشام"},statsWidget:{title:"ویجت آمار",radialVariant:"واریانت دایرهای",barVariant:"واریانت نواری",horizontalLayout:"چیدمان افقی",forceStats:"آمار نیرو",characterStats:"آمار شخصیت",progress:"پیشرفت",skills:"مهارتها",battleStats:"آمار نبرد",skillProgress:"پیشرفت مهارت",health:"سلامت",mana:"مانا",stamina:"استقامت",level:"سطح",endurance:"استقامت",luck:"شانس",statsSuffix:"آمار"},themeChanger:{title:"تغییر دهنده تم",default:"پیشفرض",iconOnly:"فقط آیکون",fixedWidth:"عرض ثابت (۱۶۰px)",small:"کوچک",smallIconOnly:"کوچک فقط آیکون",customThemes:"تمهای سفارشی",demo:"نمایش",themeChangerDesc:"تغییر دهنده تم با تشخیص خودکار، حالت فقط آیکون و پشتیبانی از عرض ثابت. برای استفاده فشرده در نوار ناوبری از iconOnly استفاده کنید، یا برای اندازهگیری ثابت از fixedWidth استفاده کنید."},languageChanger:{title:"تغییر دهنده زبان",default:"پیشفرض",iconOnly:"فقط آیکون",fixedWidth:"عرض ثابت (۱۶۰px)",small:"کوچک",smallIconOnly:"کوچک فقط آیکون",customLanguages:"زبانهای سفارشی",demo:"نمایش",languageChangerDesc:"تغییر دهنده زبان با ذخیرهسازی در localStorage، حالت فقط آیکون و پشتیبانی از عرض ثابت. برای استفاده فشرده در نوار ناوبری از iconOnly استفاده کنید، یا برای اندازهگیری ثابت از fixedWidth استفاده کنید. زبان در localStorage ذخیره شده و ویژگیهای lang و dir روی عنصر html بهروز میشوند."},gradients:{title:"گرادیانها",primary:"اصلی",accent:"متضاد",success:"موفق",danger:"خطر"},effects:{title:"جلوهها",glassEffect:"جلوه شیشهای",glowPrimary:"درخشش بنفش",glowAccent:"درخشش صورتی"},typography:{title:"تایپوگرافی",textSecondary:"متن ثانویه",regularBody:"متن معمولی با فونت Inter",gradientHeading:"عنوان گرادیان",accentText:"متن با رنگ متضاد",codeExample:'console.log("کد با فونت JetBrains Mono");'},persian:{title:"پشتیبانی از فارسی",persianText:"این متن با فونت وزیرمتن نمایش داده میشود",persianHeading:"عنوان فارسی با قلم Kook",persianDesc:"متن فارسی با اندازه کوچک و رنگ ثانویه"},checkbox:{title:"چکباکس",basic:"چکباکسهای پایه",sizes:"اندازهها",states:"وضعیتها",rtlSupport:"پشتیبانی از RTL",controlled:"کنترلشده",group:"مثال گروهی",unchecked:"تیک نخورده",checked:"تیک خورده",glowChecked:"درخشش هنگام تیک خوردن",small:"کوچک",medium:"متوسط",large:"بزرگ",normal:"عادی",error:"حالت خطا",disabled:"غیرفعال",disabledChecked:"غیرفعال تیک خورده",rtlLabel1:"پذیرش شرایط",rtlLabel2:"تایید اطلاعات",rtlLabel3:"فعال سازی حالت شب",rtlNote:"حالت RTL - برچسب در سمت راست قرار میگیرد",controlledLabel:"چکباکس کنترلشده",status:"وضعیت",check:"تیک بزن",uncheck:"تیک بردار",groupLabel:"تنظیمات خود را انتخاب کنید:",groupOption1:"فعال کردن اعلانها",groupOption2:"حالت شب",groupOption3:"ذخیره خودکار",selectedCount:"انتخاب شده"},switch:{title:"سوئیچ",basic:"سوئیچهای پایه",sizes:"اندازهها",states:"وضعیتها",rtlSupport:"پشتیبانی از RTL",controlled:"کنترلشده",group:"مثال گروهی",off:"خاموش",on:"روشن",glowOn:"درخشش هنگام روشن بودن",small:"کوچک",medium:"متوسط",large:"بزرگ",normal:"عادی",disabledOff:"غیرفعال خاموش",disabledOn:"غیرفعال روشن",rtlLabel1:"فعال سازی حالت شب",rtlLabel2:"فعال کردن اعلانها",rtlLabel3:"حالت خودکار",rtlNote:"حالت RTL - برچسب در بالا، سوئیچ جهت خود را تغییر میدهد",controlledLabel:"سوئیچ کنترلشده",status:"وضعیت",turnOn:"روشن کن",turnOff:"خاموش کن",groupLabel:"تنظیمات:",groupOption1:"فعال کردن اعلانها",groupOption2:"حالت شب",groupOption3:"ذخیره خودکار",enabledCount:"فعال",withIcons:"با آیکونها",notifications:"اعلانها",darkMode:"حالت شب",sound:"صدا"},radio:{title:"رادیو",basic:"رادیوهای پایه",sizes:"اندازهها",states:"وضعیتها",rtlSupport:"پشتیبانی از RTL",controlled:"کنترلشده",group:"مثال گروهی",unselected:"انتخاب نشده",selected:"انتخاب شده",glowSelected:"درخشش هنگام انتخاب",small:"کوچک",medium:"متوسط",large:"بزرگ",normal:"عادی",error:"حالت خطا",disabled:"غیرفعال",disabledChecked:"غیرفعال انتخاب شده",rtlLabel1:"پذیرش شرایط",rtlLabel2:"تایید اطلاعات",rtlLabel3:"فعال سازی حالت شب",rtlNote:"حالت RTL - برچسب در سمت راست قرار میگیرد",controlledLabel:"رادیو کنترلشده",status:"وضعیت",select:"انتخاب",deselect:"لغو انتخاب",groupLabel:"تنظیمات خود را انتخاب کنید:",groupOption1:"فعال کردن اعلانها",groupOption2:"حالت شب",groupOption3:"ذخیره خودکار",horizontalGroup:"گروه افقی",nightfall:"شب",daylight:"روز",dracula:"دراکولا"},range:{title:"لغزنده محدوده",basic:"لغزندههای پایه",colors:"واریانتهای رنگی",sizes:"اندازهها",customUnits:"واحدهای سفارشی",valuePositions:"موقعیتهای مقدار",sparkleAtMax:"جرقه در حداکثر",withoutGlow:"بدون درخشش",controlled:"حالت کنترلشده",volume:"صدا",brightness:"روشنایی",contrast:"کنتراست",primary:"اصلی",secondary:"ثانویه",accent:"متضاد",success:"موفق",danger:"خطر",warning:"اخطار",small:"کوچک",medium:"متوسط (پیشفرض)",large:"بزرگ",pixels:"پیکسل",price:"قیمت",rial:"ریال (تومان)",temperature:"دما",left:"چپ",right:"راست (پیشفرض)",top:"بالا",bottom:"پایین",almostMax:"نزدیک به حداکثر",atMax:"در حداکثر (جرقه!)",sparkleNote:"انفجار جرقه هنگام رسیدن به حداکثر مقدار",noGlow:"بدون جلوه درخشش",noGlow2:"ثانویه بدون درخشش",liveValue:"مقدار زنده",finalValue:"مقدار نهایی",controlledLabel:"لغزنده کنترلشده",set25:"تنظیم ۲۵٪",set75:"تنظیم ۷۵٪",set100:"تنظیم ۱۰۰٪",reset:"بازنشانی"},productCard:{title:"کارتهای محصول",variants:"واریانتها",layouts:"چیدمانها",glows:"جلوههای درخشش",withActions:"با اقدامات سریع",responsive:"واکنشگرا (عرض کامل در موبایل)",addToCart:"افزودن به سبد خرید",outOfStock:"ناموجود",sale:"تخفیف",new:"جدید",limited:"محدود",reviews:"نظرات",vertical:"عمودی",horizontal:"افقی",compact:"فشرده",primaryGlow:"درخشش با رنگ اولیه",secondaryGlow:"درخشش با رنگ دوم",accentGlow:"درخشش با رنگ اکسنت",product1:"سایبرپانک ۲۰۷۷ - نسخه کلکسیونی",product2:"هولوکرون جدای - نسخه محدود",product3:"کنترلر سامورایی نئون",product4:"شاخه داده - رمزنگاریشده",desc1:"مجموعه کلکسیونی نسخه محدود با کتاب هنری، قاب فلزی و محتوای دیجیتال اختصاصی.",desc2:"کپی معتبر هولوکرون جدای با جلوههای نور و صدا. محدود به ۵۰۰ دستگاه در سراسر جهان.",desc3:"کنترلر بیسیم با نورپردازی RGB، دکمههای پشتی قابل برنامهریزی و اتصال با تأخیر کم.",desc4:"شاخه داده رمزنگاریشده حاوی قطعات طبقهبندیشده آرشیو. نیاز به سطح ۵ دسترسی دارد.",category1:"بازی",category2:"کلکسیونی",category3:"لوازم جانبی",category4:"داده",tag1:"محدود",tag2:"کلکسیونی",tag3:"اختصاصی",tag4:"رمزنگاریشده"},blogCard:{title:"کارتهای وبلاگ",variants:"واریانتها",layouts:"چیدمانها",glows:"جلوههای درخشش",responsive:"واکنشگرا (عرض کامل در موبایل)",readMore:"ادامه مطلب",featured:"نوشته ویژه",vertical:"عمودی",horizontal:"افقی",primaryGlow:"درخشش با رنگ اولیه",secondaryGlow:"درخشش با رنگ دوم",accentGlow:"درخشش با رنگ اکسنت",post1:"آینده شیشهمورفیسم در طراحی رابط کاربری",post2:"ساخت یک سیستم طراحی از صفر",post3:"تسلط بر جلوههای هاور سهبعدی در React",post4:"هنر زیباییشناسی سایبرپانک",excerpt1:"بررسی تکامل شیشهمورفیسم و اینکه چرا به زیباییشناسی اصلی رابطهای مدرن در ۲۰۲۴ تبدیل میشود.",excerpt2:"راهنمای جامع ساخت یک سیستم طراحی که مقیاسپذیر باشد، از توکنها تا کامپوننتها.",excerpt3:"یادگیری ساخت جلوههای چرخش سهبعدی نرم برای کارتها، تصاویر و عناصر تعاملی.",excerpt4:"غواصی در زیباییشناسی سایبرپانک و تأثیر آن بر طراحی رابط کاربری مدرن.",author1:"جین دو",author2:"جان اسمیت",author3:"الکس ریورز",author4:"تیلور نایت",category1:"طراحی",category2:"توسعه",category3:"ریاکت",category4:"زیباییشناسی",tag1:"طراحی",tag2:"آموزشی",tag3:"ریاکت",tag4:"زیباییشناسی"}},Ot={app:{title:"Composants Dara UI"},hero:{version:"v1.0 - Les Archives Numériques",title:"DARA UI",subtitle:"Un système de design découvert dans une archive futuriste cachée sous la neige."},navbar:{home:"Accueil",explore:"Explorer",settings:"Paramètres",dashboard:"Tableau de bord",projects:"Projets",team:"Équipe",analytics:"Analyses",more:"Plus"},common:{thenImport:"Ensuite, importez les composants :",hoverToFloat:"Survolez pour flotter",mission:"MISSION",requirements:"Prérequis :",complete:"Terminer",completeMission:"Terminer la mission",areYouSureComplete:"Êtes-vous sûr de vouloir terminer la mission :",youWillEarn:"Vous gagnerez",uponCompletion:"à la fin."},codeBlock:{install:"npm install dara-ui",or:"ou",yarnAdd:"yarn add dara-ui",thenImport:"Ensuite, importez les composants :",importExample:"import { Button, Card, Input } from 'dara-ui';"},characterLabels:{mbti:"MBTI",species:"Espèce",affiliation:"Affiliation"},productLabels:{addToCart:"Ajouter au panier",outOfStock:"En rupture de stock",sale:"Soldes",new:"Nouveau",limited:"Édition limitée"},blogLabels:{readMore:"Lire la suite",minRead:"{{count}} min"},sidebar:{title:"Barre latérale",hint:"Réductible · Groupes · Sous-menus · Prêt RTL",logout:"Déconnexion",main:"Principal",management:"Gestion",dashboard:"Tableau de bord",projects:"Projets",team:"Équipe",documents:"Documents",messages:"Messages",settings:"Paramètres",invoices:"Factures",reports:"Rapports",archive:"Archives",inbox:"Boîte de réception",sent:"Envoyés",drafts:"Brouillons",collapse:"Réduire",expand:"Développer",subtitle:"Navigation réductible avec groupes, sous-menus et support RTL",tip1:"Cliquez sur le bouton de réduction ou appuyez sur Ctrl+B pour basculer",tip2:"Les éléments avec sous-menus se développent au clic",tip3:"Les éléments actifs sont surlignés en violet",activeProjects:"Projets actifs",completedTasks:"Tâches terminées",teamMembers:"Membres de l'équipe",notifications:"Notifications",darkMode:"Mode sombre",language:"Langue",dashboardContent:"Bienvenue sur votre tableau de bord. Vous pouvez voir un aperçu de vos projets et de l'activité de votre équipe.",projectsContent:"Gérez tous vos projets au même endroit. Vous avez 12 projets actifs.",teamContent:"Les membres de votre équipe et leurs rôles. 5 membres en ligne.",invoicesContent:"Consultez et gérez toutes vos factures.",reportsContent:"Générez et consultez des rapports détaillés.",archiveContent:"Accédez aux documents et dossiers archivés.",inboxContent:"Vos messages non lus et vos conversations.",sentContent:"Messages que vous avez envoyés à d'autres.",draftsContent:"Vos brouillons enregistrés et messages en attente.",settingsContent:"Configurez les préférences de votre application et les paramètres de votre compte.",activeProjectsLabel:"Projets actifs",completedTasksLabel:"Tâches terminées",teamMembersLabel:"Membres de l'équipe",notificationsLabel:"Notifications",storageLabel:"Stockage",quickActionsLabel:"Actions rapides",recentActivityLabel:"Activité récente",deployAction:"Déployer",reviewAction:"Réviser",inviteAction:"Inviter",upgradeAction:"Mettre à niveau",projectAlpha:"Projet Alpha",projectBeta:"Projet Beta",projectGamma:"Projet Gamma",projectDelta:"Projet Delta",inProgress:"En cours",completed:"Terminé",onHold:"En pause",review:"En révision",memberRole1:"Développeur principal",memberRole2:"Designer",memberRole3:"Chef de produit",memberRole4:"Ingénieur QA",activityUpload:"A téléversé de nouveaux fichiers d'archive",activityComment:"A commenté le Projet Alpha",activityMerge:"A fusionné la pull request #42",activityDeploy:"A déployé en production",minutesAgo:"il y a {{count}} min",hoursAgo:"il y a {{count}} heures",invoiceNumber:"Facture #{{num}}",invoicePaid:"Payée",invoicePending:"En attente",invoiceOverdue:"En retard",reportWeekly:"Rapport hebdomadaire",reportMonthly:"Rapport mensuel",reportQuarterly:"Rapport trimestriel",mobileSidebarHint:"Glissez ou touchez le menu pour ouvrir la navigation",openMenu:"Ouvrir le menu",closeMenu:"Fermer le menu"},badges:{title:"Badges",variants:"Variantes",sizes:"Tailles",outline:"Variantes contour",withGlow:"Avec lueur",withIcons:"Avec icônes",primary:"Primaire",secondary:"Secondaire",success:"Succès",danger:"Danger",warning:"Avertissement",small:"Petit",medium:"Moyen",large:"Grand",glowPrimary:"Lueur Primaire",glowSuccess:"Lueur Succès",glowDanger:"Lueur Danger",package:"Paquet",done:"Terminé",pending:"En attente",failed:"Échoué"},buttons:{title:"Variantes de boutons",withGlow:"Avec lueur",withIcons:"Avec icônes",states:"États des boutons",sizesTitle:"Tailles des boutons",primary:"Primaire",secondary:"Secondaire",accent:"Accent",glass:"Verre",danger:"Danger",success:"Succès",outline:"Contour",normal:"Normal",hover:"Survol",pressed:"Appuyé",disabled:"Désactivé",loading:"Chargement",small:"Petit",medium:"Moyen",large:"Grand",glowPrimary:"Lueur Primaire",glowSecondary:"Lueur Secondaire",glowAccent:"Lueur Accent",launch:"Lancer",next:"Suivant",confirm:"Confirmer"},avatar:{title:"Avatar",sizes:"Tailles",shapes:"Formes",status:"Indicateurs de statut",glowEffects:"Effets de lueur",withImage:"Avec image",group:"Groupe",clickable:"Cliquable"},tooltip:{title:"Infobulle",placements:"Placements",variants:"Variantes",withBadge:"Avec badge",longContent:"Contenu long",solidLabel:"Solide",outlineLabel:"Contour",glassLabel:"Verre",top:"Haut",bottom:"Bas",left:"Gauche",right:"Droite",topLeft:"Haut gauche",topRight:"Haut droite",bottomLeft:"Bas gauche",bottomRight:"Bas droite",glassTooltip:"Infobulle en verre",solidTooltip:"Infobulle solide",outlineTooltip:"Infobulle contour",unreadMessages:"Vous avez {{count}} messages non lus",longTooltip:"Ceci est une infobulle plus longue avec des informations plus détaillées sur l'élément que vous survolez.",hoverDetails:"Survolez pour plus de détails",disabledTooltip:"Cette infobulle est désactivée",noArrow:"Pas de flèche sur cette infobulle",interactive:"Infobulle interactive",demoTitle:"Démo d'infobulle",demoDescription:"Survolez les boutons ci-dessous pour voir les infobulles en action",placementDemo:"Démo de placement",variantDemo:"Démo de variantes",sizeDemo:"Démo de tailles",longContentDemo:"Démo de contenu long",badgeDemo:"Démo avec badge",disabledDemo:"Démo d'infobulle désactivée",noArrowDemo:"Démo sans flèche"},tabs:{title:"Onglets",archive:"Archives",quests:"Quêtes",stats:"Statistiques",settings:"Paramètres",archiveContent:"Parcourez les enregistrements Jedi cryptés, les holocrons et les journaux de mission des archives.",questsContent:"Des missions actives, des primes et des quêtes secondaires vous attendent, Padawan.",statsContent:"Suivez votre alignement de la Force, vos gains d'XP et vos niveaux d'amélioration cybernétique.",settingsContent:"Configurez votre HUD, votre mode thème et vos préférences de cryptage d'archives."},accordion:{title:"Accordéon",mode:"Mode",single:"Unique",multiple:"Multiple",singleDesc:"Un seul élément peut être ouvert à la fois",multipleDesc:"Plusieurs éléments peuvent être ouverts simultanément",controlled:"Contrôlé - Éléments ouverts :",withIcons:"Avec icônes",q1:"Qu'est-ce que Dara UI ?",a1:"Dara UI est un système de design qui ressemble à une interface découverte dans une archive futuriste cachée sous lors d'une tempête de neige. Il mélange le glassmorphisme, le cyberpunk, l'esthétique gothique, le minimalisme d'Apple et des éléments d'interface anime.",q2:"Quels thèmes sont disponibles ?",a2:"Archive Nocturne (défaut), Enneigée (clair), Mode Sith (noir + rouge), Temple Jedi (blanc + bleu), Dracula (violet) et Vin (rouges profonds).",q3:"Comment l'installer ?",a3:"npm install dara-ui, puis import { Button, Card, Input } from 'dara-ui'. Fonctionne avec Vite, Next.js et CRA.",dashboard:"Tableau de bord",projects:"Projets",settingsAccordion:"Paramètres",dashboardContent:"Aperçu du tableau de bord avec les indicateurs clés et l'activité récente.",projectsContent:"Projets actifs et leur statut actuel.",settingsContentAccordion:"Configurez les préférences de votre application."},dropdown:{title:"Liste déroulante",basic:"Basique",withIcons:"Avec icônes",searchable:"Recherchable",controlled:"Contrôlé - Sélectionné :",selectFramework:"Sélectionnez un framework...",withPlaceholder:"Avec espace réservé",selectWithIcons:"Sélectionnez avec icônes...",searchWithIcons:"Recherchez avec icônes...",searchOptions:"Rechercher des options...",searchFrameworks:"Rechercher des frameworks...",typeToFilter:"Tapez pour filtrer les options",framework:"Framework",chooseFramework:"Choisissez votre framework préféré",setVue:"Définir Vue",setSvelte:"Définir Svelte",setSolid:"Définir Solid"},cards:{title:"Cartes",variants:"Variantes",floatGlow:"Flottant + Lueur",featureCards:"Cartes de fonctionnalités",glassCard:"Carte en verre",solidCard:"Carte solide",outlineCard:"Carte contour",primaryGlow:"Lueur Primaire",secondaryGlow:"Lueur Secondaire",launch:"Lancer",analytics:"Analyses",deployProject:"Déployez votre projet en un clic.",trackPerformance:"Suivez vos métriques de performance."},inputs:{title:"Champs de saisie",basic:"Champs de saisie basiques",withLabels:"Avec étiquettes",withIconsTitle:"Avec icônes",validation:"États de validation",textInput:"Saisie de texte",password:"Mot de passe",search:"Recherche",email:"Email",username:"Nom d'utilisateur",enterUsername:"Entrez le nom d'utilisateur",enterEmail:"Entrez l'email",emailHelper:"Nous ne partagerons jamais votre email.",success:"Succès",error:"Erreur",validInput:"Saisie valide !",somethingWrong:"Une erreur s'est produite"},modal:{title:"Modale",openModal:"Ouvrir la modale",viewContent:"Voir le contenu",archiveAccess:"Accès aux archives",acceptMission:"Accepter la mission",decline:"Refuser",modalDescription:"Vous avez découvert un fragment d'archive Jedi scellé. Cette modale utilise un style glass-heavy avec un arrière-plan flou à 30px."},toast:{title:"Notifications Toast",subtitle:"En haut à droite · Minimal · Glissement 220ms · Auto-fermeture",successToast:"Toast Succès",errorToast:"Toast Erreur",warningToast:"Toast Avertissement",infoToast:"Toast Info",successMsg:"Mission terminée ! +300 XP gagnés.",errorMsg:"Connexion perdue. Nouvel essai...",warningMsg:"Veuillez vérifier votre connexion",infoMsg:"Les archives sont en cours d'indexation"},progress:{title:"Progression",horizontal:"Horizontal",labelInside:"Étiquette à l'intérieur",displayTypes:"Types d'affichage",sizes:"Tailles",radial:"Radial",radialCustom:"Radial avec étiquette personnalisée",radialSizes:"Tailles radiales",almostDone:"Presque terminé !",loading:"Chargement...",done:"Terminé !"},xpbar:{title:"Barre d'XP, Niveau",rankProgress:"PROGRESSION DE RANG",missionProgress:"PROGRESSION DE MISSION",tier:"Niveau",rank:"Rang",points:"Points",exp:"EXP",score:"Score",prestige:"Prestige"},rank:{common:"Commun",uncommon:"Peu commun",rare:"Rare",epic:"Épique",legendary:"Légendaire",recruit:"Recrue",soldier:"Soldat",veteran:"Vétéran",elite:"Élite",commander:"Commandant"},glow:{title:"Effets de lueur",glowPrimary:"Lueur violette",glowSecondary:"Lueur Secondary",glowAccent:"Lueur rose"},quest:{title:"Cartes de quêtes",buildCMS:"Construire CMS",buildCMSDesc:"Déployez l'interface d'archives Jedi cryptée avant que la neige ne fonde.",secureArchives:"Sécuriser les archives",secureArchivesDesc:"Implémentez le chiffrement de bout en bout pour toutes les données stockées dans les archives.",legendaryQuest:"Quête légendaire : Les archives perdues",legendaryQuestDesc:"Voyagez dans les profondeurs du caveau oublié et récupérez l'ancien holocron.",mapNightCity:"Cartographier Night City",mapNightCityDesc:"Créez une carte complète du quartier cyberpunk avant la purge des données.",requirements:"Prérequis",completeReviews:"Compléter 3 revues de code",writeTests:"Écrire 5 tests unitaires",deployStaging:"Déployer en pré-production",reachLevel:"Atteindre le niveau 25",defeatGuardian:"Vaincre le Gardien de l'Ombre",collectArtifacts:"Collecter 3 artefacts anciens",solveRiddle:"Résoudre l'énigme du sphinx",scanLocations:"Scanner 10 emplacements",interviewNPCs:"Interviewer 5 PNJ",uploadArchive:"Téléverser vers l'archive",deadline:"Échéance",deadlineToday:"Échéance : Aujourd'hui",deadlineTomorrow:"Échéance : Demain",deadlineTonight:"Échéance : Ce soir",deadlineYesterday:"Échéance : Hier",daysAgo:"jours",days:"jours",week:"semaine",weeks:"semaines",month:"mois",months:"mois",years:"ans"},character:{title:"Cartes de personnage",vertical:"Disposition verticale (défaut)",horizontal:"Disposition horizontale",daraName:"Dara",daraSubtitle:"Archiviste Jedi",daraQuote:"L'obscurité n'est pas à craindre - elle doit être archivée.",cipherName:"Cipher",cipherSubtitle:"Netrunner",cipherQuote:"Le code est la clé de tout.",shadowName:"Ombre",shadowSubtitle:"Chasseur nocturne",shadowQuote:"Je me déplace dans l'obscurité là où ils ne peuvent pas voir.",force:"Force",combat:"Combat",intelligence:"Intelligence",wisdom:"Sagesse",hacking:"Piratage",stealth:"Furtivité",agility:"Agilité",strength:"Force",speciesHumanCyborg:"Humain/Cyborg",speciesCyborg:"Cyborg",speciesVampire:"Vampire",affiliationJedi:"Ordre Jedi",affiliationNetwatch:"Netwatch",affiliationNightCouncil:"Conseil de la Nuit",traitMbtiIntj:"MBTI : INTJ",traitMbtiIntp:"MBTI : INTP",traitMbtiIstp:"MBTI : ISTP",traitHumanCyborg:"Humain/Cyborg",traitCyborg:"Cyborg",traitVampire:"Vampire"},statsWidget:{title:"Widget de statistiques",radialVariant:"Variante radiale",barVariant:"Variante à barres",horizontalLayout:"Disposition horizontale",forceStats:"STATS DE LA FORCE",characterStats:"STATS DU PERSONNAGE",progress:"PROGRÈS",skills:"COMPÉTENCES",battleStats:"STATS DE COMBAT",skillProgress:"PROGRÈS DES COMPÉTENCES",health:"Santé",mana:"Mana",stamina:"Endurance",level:"Niveau",endurance:"Endurance",luck:"Chance",statsSuffix:"stats"},themeChanger:{title:"Changeur de thème",default:"Défaut",iconOnly:"Icône uniquement",fixedWidth:"Largeur fixe (160px)",small:"Petit",smallIconOnly:"Petit icône uniquement",customThemes:"Thèmes personnalisés",demo:"Démo",themeChangerDesc:"Changeur de thème avec détection automatique, mode icône uniquement et support de largeur fixe. Passez iconOnly pour une utilisation compacte dans la barre de navigation, ou fixedWidth pour une taille cohérente."},languageChanger:{title:"Changeur de langue",default:"Défaut",iconOnly:"Icône uniquement",fixedWidth:"Largeur fixe (160px)",small:"Petit",smallIconOnly:"Petit icône uniquement",customLanguages:"Langues personnalisées",demo:"Démo",languageChangerDesc:"Changeur de langue avec persistance localStorage, mode icône uniquement et support de largeur fixe. Passez iconOnly pour une utilisation compacte dans la barre de navigation, ou fixedWidth pour une taille cohérente. La langue est persistée via localStorage et met à jour les attributs lang et dir sur l'élément html."},gradients:{title:"Dégradés",primary:"Primaire",accent:"Accent",success:"Succès",danger:"Danger"},effects:{title:"Effets",glassEffect:"Effet verre",glowPrimary:"Lueur violette",glowAccent:"Lueur rose"},typography:{title:"Typographie",textSecondary:"Texte secondaire",regularBody:"Texte corporel régulier avec la police Inter",gradientHeading:"Titre dégradé",accentText:"Texte coloré accentué",codeExample:'console.log("Code avec JetBrains Mono");'},persian:{title:"Support persan",persianText:"Ce texte est affiché avec la police Vazirmatn",persianHeading:"Titre persan avec la police Kook",persianDesc:"Texte persan en petit format et couleur secondaire"},checkbox:{title:"Case à cocher",basic:"Cases à cocher de base",sizes:"Tailles",states:"États",rtlSupport:"Support RTL",controlled:"Contrôlée",group:"Exemple de groupe",unchecked:"Décoché",checked:"Coché",glowChecked:"Lueur lorsqu'elle est cochée",small:"Petit",medium:"Moyen",large:"Grand",normal:"Normal",error:"État d'erreur",disabled:"Désactivé",disabledChecked:"Désactivé coché",rtlLabel1:"Accepter les conditions",rtlLabel2:"Confirmer les informations",rtlLabel3:"Activer le mode nuit",rtlNote:"Mode RTL - l'étiquette apparaît à droite",controlledLabel:"Case à cocher contrôlée",status:"Statut",check:"Cocher",uncheck:"Décocher",groupLabel:"Sélectionnez vos préférences :",groupOption1:"Activer les notifications",groupOption2:"Mode sombre",groupOption3:"Sauvegarde automatique",selectedCount:"Sélectionné"},switch:{title:"Interrupteur",basic:"Interrupteurs de base",sizes:"Tailles",states:"États",rtlSupport:"Support RTL",controlled:"Contrôlé",group:"Exemple de groupe",off:"Désactivé",on:"Activé",glowOn:"Lueur lorsqu'activé",small:"Petit",medium:"Moyen",large:"Grand",normal:"Normal",disabledOff:"Désactivé éteint",disabledOn:"Désactivé allumé",rtlLabel1:"Activer le mode nuit",rtlLabel2:"Activer les notifications",rtlLabel3:"Mode automatique",rtlNote:"Mode RTL - l'étiquette reste en haut, l'interrupteur s'adapte",controlledLabel:"Interrupteur contrôlé",status:"Statut",turnOn:"Allumer",turnOff:"Éteindre",groupLabel:"Paramètres :",groupOption1:"Activer les notifications",groupOption2:"Mode sombre",groupOption3:"Sauvegarde automatique",enabledCount:"Activé",withIcons:"Avec icônes",notifications:"Notifications",darkMode:"Mode sombre",sound:"Son"},radio:{title:"Radio",basic:"Radios de base",sizes:"Tailles",states:"États",rtlSupport:"Support RTL",controlled:"Contrôlé",group:"Exemple de groupe",unselected:"Désélectionné",selected:"Sélectionné",glowSelected:"Lueur lorsqu'elle est sélectionnée",small:"Petit",medium:"Moyen",large:"Grand",normal:"Normal",error:"État d'erreur",disabled:"Désactivé",disabledChecked:"Désactivé sélectionné",rtlLabel1:"Accepter les conditions",rtlLabel2:"Confirmer les informations",rtlLabel3:"Activer le mode nuit",rtlNote:"Mode RTL - l'étiquette apparaît à droite",controlledLabel:"Radio contrôlée",status:"Statut",select:"Sélectionner",deselect:"Désélectionner",groupLabel:"Sélectionnez votre préférence :",groupOption1:"Activer les notifications",groupOption2:"Mode sombre",groupOption3:"Sauvegarde automatique",horizontalGroup:"Groupe horizontal",nightfall:"Nuit",daylight:"Jour",dracula:"Dracula"},range:{title:"Curseur de plage",basic:"Curseurs de base",colors:"Variantes de couleurs",sizes:"Tailles",customUnits:"Unités personnalisées",valuePositions:"Positions des valeurs",sparkleAtMax:"Étincelle au maximum",withoutGlow:"Sans lueur",controlled:"Mode contrôlé",volume:"Volume",brightness:"Luminosité",contrast:"Contraste",primary:"Primaire",secondary:"Secondaire",accent:"Accent",success:"Succès",danger:"Danger",warning:"Avertissement",small:"Petit",medium:"Moyen (défaut)",large:"Grand",pixels:"Pixels",price:"Prix",rial:"Rial (تومان)",temperature:"Température",left:"Gauche",right:"Droite (défaut)",top:"Haut",bottom:"Bas",almostMax:"Presque au maximum",atMax:"Au maximum (étincelle!)",sparkleNote:"Animation d'étincelles lors de l'atteinte de la valeur maximale",noGlow:"Sans effet de lueur",noGlow2:"Secondaire sans lueur",liveValue:"Valeur en direct",finalValue:"Valeur finale",controlledLabel:"Curseur contrôlé",set25:"Définir 25%",set75:"Définir 75%",set100:"Définir 100%",reset:"Réinitialiser"},productCard:{title:"Cartes de produit",variants:"Variantes",layouts:"Dispositions",glows:"Effets de lueur",withActions:"Avec actions rapides",responsive:"Responsive (pleine largeur sur mobile)",addToCart:"Ajouter au panier",outOfStock:"En rupture de stock",sale:"Soldes",new:"Nouveau",limited:"Édition limitée",reviews:"avis",vertical:"Vertical",horizontal:"Horizontal",compact:"Compact",primaryGlow:"Lueur Primaire",secondaryGlow:"Lueur Secondaire",accentGlow:"Lueur Accent",product1:"Cyberpunk 2077 - Édition Collector",product2:"Holocron Jedi - Édition Limitée",product3:"Manette Samouraï Neon",product4:"Fragment de données - Crypté",desc1:"Ensemble collector en édition limitée avec livre d'art, boîtier steelbook et contenu numérique exclusif.",desc2:"Réplique authentique d'holocron Jedi avec effets de lumière et son. Limité à 500 unités dans le monde.",desc3:"Manette sans fil avec éclairage RGB, boutons arrière programmables et connexion à faible latence.",desc4:"Fragment de données crypté contenant des fragments d'archives classifiés. Nécessite un niveau d'accès 5.",category1:"Jeux",category2:"Objets de collection",category3:"Accessoires",category4:"Données",tag1:"édition limitée",tag2:"collection",tag3:"exclusif",tag4:"crypté"},blogCard:{title:"Cartes de blog",variants:"Variantes",layouts:"Dispositions",glows:"Effets de lueur",responsive:"Responsive (pleine largeur sur mobile)",readMore:"Lire la suite",featured:"Article en vedette",vertical:"Vertical",horizontal:"Horizontal",primaryGlow:"Lueur Primaire",secondaryGlow:"Lueur Secondaire",accentGlow:"Lueur Accent",post1:"L'avenir du glassmorphisme dans le design UI",post2:"Construire un système de design à partir de zéro",post3:"Maîtriser les effets 3D au survol dans React",post4:"L'art de l'esthétique cyberpunk",excerpt1:"Découvrez comment le glassmorphisme évolue et pourquoi il devient l'esthétique de référence pour les interfaces modernes en 2024.",excerpt2:"Un guide complet pour construire un système de design qui s'adapte, des tokens aux composants.",excerpt3:"Apprenez à créer des effets de rotation 3D fluides pour les cartes, images et éléments interactifs.",excerpt4:"Plongez dans l'esthétique cyberpunk et son influence sur le design UI moderne.",author1:"Jane Doe",author2:"John Smith",author3:"Alex Rivers",author4:"Taylor Night",category1:"Design",category2:"Développement",category3:"React",category4:"Esthétique",tag1:"design",tag2:"tutoriel",tag3:"react",tag4:"esthétique"}},Gt={en:zt,fa:Bt,fr:Ot},st=({name:r,subtitle:m,quote:s,portrait:p,icon:l,mbti:n,species:M,affiliation:h,traits:D=[],stats:L=[],glow:S="primary",layout:o="vertical",className:$=""})=>{const[u,b]=t.useState({x:0,y:0}),[x,T]=t.useState(!1),j=t.useRef(null),{t:c}=ue(),f=a=>{if(!j.current)return;const w=j.current.getBoundingClientRect(),k=a.clientX-w.left,N=a.clientY-w.top,d=w.width/2,i=w.height/2,z=(N-i)/i*-8,G=(k-d)/d*8;b({x:z,y:G})},g=()=>T(!0),A=()=>{T(!1),b({x:0,y:0})},I={primary:"glow-primary",secondary:"glow-secondary",accent:"glow-accent",none:""}[S]||"",R=o==="horizontal",v=a=>{const w=Math.min(100,Math.max(0,a.value)),k=R?48:56,N=3.5,d=k/2-N/2,i=2*Math.PI*d,z=i-w/100*i,G=R?60:68,B=k+8*2,F=B/2,P=a.color==="secondary"?"var(--color-secondary)":a.color==="accent"?"var(--color-accent)":a.color==="success"?"var(--color-success)":a.color==="danger"?"var(--color-danger)":a.color==="warning"?"var(--color-warning)":"var(--color-primary)";return e.jsxs("div",{className:"flex flex-col items-center flex-shrink-0",style:{width:G},children:[e.jsx("div",{className:"relative",style:{width:k,height:k},role:"img","aria-label":`${a.label}: ${a.value}%`,children:e.jsxs("svg",{width:k,height:k,viewBox:`0 0 ${B} ${B}`,className:"block overflow-visible","aria-hidden":"true",style:{overflow:"visible"},children:[w>0&&e.jsx("circle",{cx:F,cy:F,r:d,fill:"none",stroke:P,strokeWidth:N+3,strokeDasharray:i,strokeDashoffset:z,strokeLinecap:"round",transform:`rotate(-90 ${F} ${F})`,style:{filter:"blur(4px)",opacity:.45}}),e.jsx("circle",{cx:F,cy:F,r:d,fill:"none",stroke:"var(--color-border-secondary)",strokeWidth:N}),e.jsx("circle",{cx:F,cy:F,r:d,fill:"none",stroke:P,strokeWidth:N,strokeDasharray:i,strokeDashoffset:z,strokeLinecap:"round",transform:`rotate(-90 ${F} ${F})`,style:{transition:"stroke-dashoffset 0.8s ease"}}),e.jsxs("text",{x:F,y:F,textAnchor:"middle",dominantBaseline:"central",className:"font-heading font-bold",style:{fontSize:k<52?"11px":"13px",fill:"var(--color-text-primary)"},children:[a.value,e.jsx("tspan",{style:{fontSize:k<52?"8px":"9px",fill:"var(--color-text-secondary)"},children:"%"})]})]})}),e.jsx("p",{className:"text-[9px] uppercase tracking-wider text-[var(--color-text-secondary)] font-mono mt-1.5 text-center leading-tight max-w-full",children:a.label})]})};return e.jsxs("div",{ref:j,className:`
|
|
899
|
+
`,role:"option","aria-selected":d,children:[p.icon&&y(p.icon),e.jsx("span",{className:"truncate",children:p.label}),d&&e.jsx("svg",{className:"ml-auto h-4 w-4 flex-shrink-0 text-[var(--color-primary)]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]},p.value)})})})]})};st.displayName="ThemeChanger";const Wt={app:{title:"Dara UI Components"},hero:{version:"v1.0 - The Digital Archives",title:"DARA UI",subtitle:"A design system discovered inside a futuristic archive hidden beneath during a snowstorm."},navbar:{home:"Home",explore:"Explore",settings:"Settings",dashboard:"Dashboard",projects:"Projects",team:"Team",analytics:"Analytics",more:"More"},common:{thenImport:"Then import components:",hoverToFloat:"Hover to float",mission:"MISSION",requirements:"Requirements:",complete:"Complete",completeMission:"Complete Mission",areYouSureComplete:"Are you sure you want to complete the mission:",youWillEarn:"You will earn",uponCompletion:"upon completion."},codeBlock:{install:"npm install dara-ui",or:"or",yarnAdd:"yarn add dara-ui",thenImport:"Then import components:",importExample:"import { Button, Card, Input } from 'dara-ui';"},characterLabels:{mbti:"MBTI",species:"Species",affiliation:"Affiliation"},productLabels:{addToCart:"Add to Cart",outOfStock:"Out of Stock",sale:"Sale",new:"New",limited:"Limited"},blogLabels:{readMore:"Read more",minRead:"{{count}} min"},sidebar:{title:"Sidebar",hint:"Collapsible · Groups · Sub-menus · RTL ready",logout:"Logout",main:"Main",management:"Management",dashboard:"Dashboard",projects:"Projects",team:"Team",documents:"Documents",messages:"Messages",settings:"Settings",invoices:"Invoices",reports:"Reports",archive:"Archive",inbox:"Inbox",sent:"Sent",drafts:"Drafts",collapse:"Collapse",expand:"Expand",subtitle:"Collapsible navigation with groups, sub-menus, and RTL support",tip1:"Click the collapse button or press Ctrl+B to toggle",tip2:"Items with sub-menus expand on click",tip3:"Active items are highlighted with a purple accent",activeProjects:"Active Projects",completedTasks:"Completed Tasks",teamMembers:"Team Members",notifications:"Notifications",darkMode:"Dark Mode",language:"Language",dashboardContent:"Welcome to your dashboard. Here you can see an overview of your projects and team activity.",projectsContent:"Manage all your projects in one place. You have 12 active projects.",teamContent:"Your team members and their roles. 5 members online.",invoicesContent:"View and manage all your invoices.",reportsContent:"Generate and view detailed reports.",archiveContent:"Access archived documents and records.",inboxContent:"Your unread messages and conversations.",sentContent:"Messages you have sent to others.",draftsContent:"Your saved drafts and pending messages.",settingsContent:"Configure your application preferences and account settings.",activeProjectsLabel:"Active Projects",completedTasksLabel:"Completed Tasks",teamMembersLabel:"Team Members",notificationsLabel:"Notifications",storageLabel:"Storage",quickActionsLabel:"Quick Actions",recentActivityLabel:"Recent Activity",deployAction:"Deploy",reviewAction:"Review",inviteAction:"Invite",upgradeAction:"Upgrade",projectAlpha:"Project Alpha",projectBeta:"Project Beta",projectGamma:"Project Gamma",projectDelta:"Project Delta",inProgress:"In Progress",completed:"Completed",onHold:"On Hold",review:"In Review",memberRole1:"Lead Developer",memberRole2:"Designer",memberRole3:"Product Manager",memberRole4:"QA Engineer",activityUpload:"Uploaded new archive files",activityComment:"Commented on Project Alpha",activityMerge:"Merged pull request #42",activityDeploy:"Deployed to production",minutesAgo:"{{count}} min ago",hoursAgo:"{{count}} hours ago",invoiceNumber:"Invoice #{{num}}",invoicePaid:"Paid",invoicePending:"Pending",invoiceOverdue:"Overdue",reportWeekly:"Weekly Report",reportMonthly:"Monthly Report",reportQuarterly:"Quarterly Report",mobileSidebarHint:"Swipe or tap the menu to open navigation",openMenu:"Open menu",closeMenu:"Close menu"},badges:{title:"Badges",variants:"Variants",sizes:"Sizes",outline:"Outline Variants",withGlow:"With Glow",withIcons:"With Icons",primary:"Primary",secondary:"Secondary",success:"Success",danger:"Danger",warning:"Warning",small:"Small",medium:"Medium",large:"Large",glowPrimary:"Glow Primary",glowSuccess:"Glow Success",glowDanger:"Glow Danger",package:"Package",done:"Done",pending:"Pending",failed:"Failed"},buttons:{title:"Button Variants",withGlow:"With Glow",withIcons:"With Icons",states:"Button States",sizesTitle:"Button Sizes",primary:"Primary",secondary:"Secondary",accent:"Accent",glass:"Glass",danger:"Danger",success:"Success",outline:"Outline",normal:"Normal",hover:"Hover",pressed:"Pressed",disabled:"Disabled",loading:"Loading",small:"Small",medium:"Medium",large:"Large",glowPrimary:"Primary Glow",glowSecondary:"Secondary Glow",glowAccent:"Accent Glow",launch:"Launch",next:"Next",confirm:"Confirm"},avatar:{title:"Avatar",sizes:"Sizes",shapes:"Shapes",status:"Status Indicators",glowEffects:"Glow Effects",withImage:"With Image",group:"Group",clickable:"Clickable"},tooltip:{title:"Tooltip",placements:"Placements",variants:"Variants",withBadge:"With Badge",longContent:"Long Content",solidLabel:"Solid",outlineLabel:"Outline",glassLabel:"Glass",top:"Top",bottom:"Bottom",left:"Left",right:"Right",topLeft:"Top Left",topRight:"Top Right",bottomLeft:"Bottom Left",bottomRight:"Bottom Right",glassTooltip:"Glass tooltip",solidTooltip:"Solid tooltip",outlineTooltip:"Outline tooltip",unreadMessages:"You have {{count}} unread messages",longTooltip:"This is a longer tooltip with more detailed information about the element you're hovering over.",hoverDetails:"Hover for details",disabledTooltip:"This tooltip is disabled",noArrow:"No arrow on this tooltip",interactive:"Interactive tooltip",demoTitle:"Tooltip Demo",demoDescription:"Hover over the buttons below to see tooltips in action",placementDemo:"Placement Demo",variantDemo:"Variant Demo",sizeDemo:"Size Demo",longContentDemo:"Long Content Demo",badgeDemo:"Badge Demo",disabledDemo:"Disabled Tooltip Demo",noArrowDemo:"No Arrow Demo"},tabs:{title:"Tabs",archive:"Archive",quests:"Quests",stats:"Stats",settings:"Settings",archiveContent:"Browse encrypted Jedi records, holocrons, and mission logs from the archive.",questsContent:"Active missions, bounties, and side-quests await your attention, Padawan.",statsContent:"Track your Force alignment, XP gains, and cybernetic enhancement levels.",settingsContent:"Configure your HUD, theme mode, and archive encryption preferences."},accordion:{title:"Accordion",mode:"Mode",single:"Single",multiple:"Multiple",singleDesc:"Only one item can be open at a time",multipleDesc:"Multiple items can be open simultaneously",controlled:"Controlled - Open items:",withIcons:"With Icons",q1:"What is Dara UI?",a1:"Dara UI is a design system that feels like an interface discovered inside a futuristic archive hidden beneath during a snowstorm. It blends glassmorphism, cyberpunk, gothic aesthetics, Apple minimalism, and anime HUD elements.",q2:"What themes are available?",a2:"Nightfall (default), Daylight (light) and Dracula (purple).",q3:"How do I install it?",a3:"npm install dara-ui, then import { Button, Card, Input } from 'dara-ui'. Works with Vite, Next.js, and CRA out of the box.",dashboard:"Dashboard",projects:"Projects",settingsAccordion:"Settings",dashboardContent:"Dashboard overview with key metrics and recent activity.",projectsContent:"Active projects and their current status.",settingsContentAccordion:"Configure your application preferences."},dropdown:{title:"Dropdown",basic:"Basic",withIcons:"With Icons",searchable:"Searchable",controlled:"Controlled - Selected:",selectFramework:"Select a framework...",withPlaceholder:"With placeholder",selectWithIcons:"Select with icons...",searchWithIcons:"Search with icons...",searchOptions:"Search options...",searchFrameworks:"Search frameworks...",typeToFilter:"Type to filter options",framework:"Framework",chooseFramework:"Choose your preferred framework",setVue:"Set Vue",setSvelte:"Set Svelte",setSolid:"Set Solid"},cards:{title:"Cards",variants:"Variants",floatGlow:"Float + Glow",featureCards:"Feature Cards",glassCard:"Glass Card",solidCard:"Solid Card",outlineCard:"Outline Card",primaryGlow:"Primary Glow",secondaryGlow:"Secondary Glow",accentGlow:"Accent Glow",launch:"Launch",analytics:"Analytics",deployProject:"Deploy your project with one click.",trackPerformance:"Track your performance metrics."},inputs:{title:"Inputs",basic:"Basic Inputs",withLabels:"With Labels",withIconsTitle:"With Icons",validation:"Validation States",textInput:"Text input",password:"Password",search:"Search",email:"Email",username:"Username",enterUsername:"Enter username",enterEmail:"Enter email",emailHelper:"We'll never share your email.",success:"Success",error:"Error",validInput:"Valid input!",somethingWrong:"Something went wrong"},modal:{title:"Modal",openModal:"Open Modal",viewContent:"View Content",archiveAccess:"Archive Access",acceptMission:"Accept Mission",decline:"Decline",modalDescription:"You've discovered a sealed Jedi archive fragment. This modal uses glass-heavy styling with blur(30px) backdrop, scale-in animation, and is rendered via React Portal outside the DOM tree."},toast:{title:"Toast Notifications",subtitle:"Top-right · Minimal · 220ms slide-in · Auto-dismiss",successToast:"Success Toast",errorToast:"Error Toast",warningToast:"Warning Toast",infoToast:"Info Toast",successMsg:"Mission complete! +300 XP earned.",errorMsg:"Connection lost. Retrying...",warningMsg:"Please check your connection",infoMsg:"Archives are being indexed"},progress:{title:"Progress",horizontal:"Horizontal",labelInside:"Label Inside Bar",displayTypes:"Display Types",sizes:"Sizes",radial:"Radial",radialCustom:"Radial with Custom Label",radialSizes:"Radial Sizes",almostDone:"Almost done!",loading:"Loading...",done:"Done!"},xpbar:{title:"XPBar, RankTier",rankProgress:"RANK PROGRESS",missionProgress:"MISSION PROGRESS",tier:"Tier",rank:"Rank",points:"Points",exp:"EXP",score:"Score",prestige:"Prestige"},rank:{common:"Common",uncommon:"Uncommon",rare:"Rare",epic:"Epic",legendary:"Legendary",recruit:"Recruit",soldier:"Soldier",veteran:"Veteran",elite:"Elite",commander:"Commander"},glow:{title:"Glow Effects",glowPrimary:"Glow Primary",glowSecondary:"Glow Secondary",glowAccent:"Glow Accent"},quest:{title:"Quest Cards",buildCMS:"Build CMS",buildCMSDesc:"Deploy the encrypted Jedi archive interface before the snow melts.",secureArchives:"Secure Archives",secureArchivesDesc:"Implement end-to-end encryption for all stored data in the archive.",legendaryQuest:"Legendary Quest: The Lost Archive",legendaryQuestDesc:"Journey into the depths of the forgotten vault and retrieve the ancient holocron.",mapNightCity:"Map Night City",mapNightCityDesc:"Create a comprehensive map of the cyberpunk district before the data purge.",requirements:"Requirements",completeReviews:"Complete 3 code reviews",writeTests:"Write 5 unit tests",deployStaging:"Deploy to staging",reachLevel:"Reach level 25",defeatGuardian:"Defeat the Shadow Guardian",collectArtifacts:"Collect 3 ancient artifacts",solveRiddle:"Solve the sphinx riddle",scanLocations:"Scan 10 locations",interviewNPCs:"Interview 5 NPCs",uploadArchive:"Upload to the archive",deadline:"Deadline",deadlineToday:"Deadline: Today",deadlineTomorrow:"Deadline: Tomorrow",deadlineTonight:"Deadline: Tonight",deadlineYesterday:"Deadline: Yesterday",daysAgo:"days ago",days:"days",week:"week",weeks:"weeks",month:"month",months:"months",years:"years"},character:{title:"Character Cards",vertical:"Vertical Layout (default)",horizontal:"Horizontal Layout",daraName:"Dara",daraSubtitle:"Jedi Archivist",daraQuote:"The dark is not to be feared - it is to be archived.",cipherName:"Cipher",cipherSubtitle:"Netrunner",cipherQuote:"The code is the key to everything.",shadowName:"Shadow",shadowSubtitle:"Night Hunter",shadowQuote:"I move in the darkness where they cannot see.",force:"Force",combat:"Combat",intelligence:"Intelligence",wisdom:"Wisdom",hacking:"Hacking",stealth:"Stealth",agility:"Agility",strength:"Strength",speciesHumanCyborg:"Human/Cyborg",speciesCyborg:"Cyborg",speciesVampire:"Vampire",affiliationJedi:"Jedi Order",affiliationNetwatch:"Netwatch",affiliationNightCouncil:"Night Council",traitMbtiIntj:"MBTI: INTJ",traitMbtiIntp:"MBTI: INTP",traitMbtiIstp:"MBTI: ISTP",traitHumanCyborg:"Human/Cyborg",traitCyborg:"Cyborg",traitVampire:"Vampire"},statsWidget:{title:"Stats Widget",radialVariant:"Radial Variant",barVariant:"Bar Variant",horizontalLayout:"Horizontal Layout",forceStats:"FORCE STATS",characterStats:"CHARACTER STATS",progress:"PROGRESS",skills:"SKILLS",battleStats:"BATTLE STATS",skillProgress:"SKILL PROGRESS",health:"Health",mana:"Mana",stamina:"Stamina",level:"Level",endurance:"Endurance",luck:"Luck",statsSuffix:"stats"},themeChanger:{title:"Theme Changer",default:"Default",iconOnly:"Icon Only",fixedWidth:"Fixed Width (160px)",small:"Small",smallIconOnly:"Small Icon Only",customThemes:"Custom Themes",demo:"Demo",themeChangerDesc:"Theme changer with auto-detection, icon-only mode, and fixed width support. Pass iconOnly for compact navbar usage, or fixedWidth for consistent sizing."},languageChanger:{title:"Language Changer",default:"Default",iconOnly:"Icon Only",fixedWidth:"Fixed Width (160px)",small:"Small",smallIconOnly:"Small Icon Only",customLanguages:"Custom Languages",demo:"Demo",languageChangerDesc:"Language changer with localStorage persistence, icon-only mode, and fixed width support. Pass iconOnly for compact navbar usage, or fixedWidth for consistent sizing. The language is persisted via localStorage and updates the lang and dir attributes on the html element."},gradients:{title:"Gradients",primary:"Primary",accent:"Accent",success:"Success",danger:"Danger"},effects:{title:"Effects",glassEffect:"Glass Effect",glowPrimary:"Glow Primary",glowAccent:"Glow Accent"},typography:{title:"Typography",textSecondary:"Text Secondary",regularBody:"Regular body text with Inter font",gradientHeading:"Gradient Heading",accentText:"Accent colored text",codeExample:'console.log("Code with JetBrains Mono");'},persian:{title:"Persian Support",persianText:"این متن با فونت وزیرمتن نمایش داده میشود",persianHeading:"عنوان فارسی با قلم Kook",persianDesc:"متن فارسی با اندازه کوچک و رنگ ثانویه"},checkbox:{title:"Checkbox",basic:"Basic Checkboxes",sizes:"Sizes",states:"States",rtlSupport:"RTL Support",controlled:"Controlled",group:"Group Example",unchecked:"Unchecked",checked:"Checked",glowChecked:"Glow when checked",small:"Small",medium:"Medium",large:"Large",normal:"Normal",error:"Error State",disabled:"Disabled",disabledChecked:"Disabled Checked",rtlLabel1:"پذیرش شرایط",rtlLabel2:"تایید اطلاعات",rtlLabel3:"فعال سازی حالت شب",rtlNote:"RTL mode - label appears on the right",controlledLabel:"Controlled checkbox",status:"Status",check:"Check",uncheck:"Uncheck",groupLabel:"Select your preferences:",groupOption1:"Enable notifications",groupOption2:"Dark mode",groupOption3:"Auto-save",selectedCount:"Selected"},switch:{title:"Switch",basic:"Basic Switches",sizes:"Sizes",states:"States",rtlSupport:"RTL Support",controlled:"Controlled",group:"Group Example",off:"Off",on:"On",glowOn:"Glow when on",small:"Small",medium:"Medium",large:"Large",normal:"Normal",disabledOff:"Disabled Off",disabledOn:"Disabled On",rtlLabel1:"فعال سازی حالت شب",rtlLabel2:"فعال کردن اعلانها",rtlLabel3:"حالت خودکار",rtlNote:"RTL mode - label stays above, switch mirrors direction",controlledLabel:"Controlled switch",status:"Status",turnOn:"Turn On",turnOff:"Turn Off",groupLabel:"Settings:",groupOption1:"Enable notifications",groupOption2:"Dark mode",groupOption3:"Auto-save",enabledCount:"Enabled",withIcons:"With Icons",notifications:"Notifications",darkMode:"Dark mode",sound:"Sound"},radio:{title:"Radio",basic:"Basic Radios",sizes:"Sizes",states:"States",rtlSupport:"RTL Support",controlled:"Controlled",group:"Group Example",unselected:"Unselected",selected:"Selected",glowSelected:"Glow when selected",small:"Small",medium:"Medium",large:"Large",normal:"Normal",error:"Error State",disabled:"Disabled",disabledChecked:"Disabled Checked",rtlLabel1:"پذیرش شرایط",rtlLabel2:"تایید اطلاعات",rtlLabel3:"فعال سازی حالت شب",rtlNote:"RTL mode - label appears on the right",controlledLabel:"Controlled radio",status:"Status",select:"Select",deselect:"Deselect",groupLabel:"Select your preference:",groupOption1:"Enable notifications",groupOption2:"Dark mode",groupOption3:"Auto-save",horizontalGroup:"Horizontal group",nightfall:"Nightfall",daylight:"Daylight",dracula:"Dracula"},range:{title:"Range Slider",basic:"Basic Ranges",colors:"Color Variants",sizes:"Sizes",customUnits:"Custom Units",valuePositions:"Value Positions",sparkleAtMax:"Sparkle at Max",withoutGlow:"Without Glow",controlled:"Controlled Mode",volume:"Volume",brightness:"Brightness",contrast:"Contrast",primary:"Primary",secondary:"Secondary",accent:"Accent",success:"Success",danger:"Danger",warning:"Warning",small:"Small",medium:"Medium (default)",large:"Large",pixels:"Pixels",price:"Price",rial:"Rial (تومان)",temperature:"Temperature",left:"Left",right:"Right (default)",top:"Top",bottom:"Bottom",almostMax:"Almost at max",atMax:"At max (sparkle!)",sparkleNote:"Sparkle burst animation when reaching maximum value",noGlow:"No glow effect",noGlow2:"Secondary without glow",liveValue:"Live value",finalValue:"Final value",controlledLabel:"Controlled range",set25:"Set 25%",set75:"Set 75%",set100:"Set 100%",reset:"Reset"},productCard:{title:"Product Cards",variants:"Variants",layouts:"Layouts",glows:"Glow Effects",withActions:"With Quick Actions",responsive:"Responsive (Full width on mobile)",addToCart:"Add to Cart",outOfStock:"Out of Stock",sale:"Sale",new:"New",limited:"Limited",reviews:"reviews",vertical:"Vertical",horizontal:"Horizontal",compact:"Compact",primaryGlow:"Primary Glow",secondaryGlow:"Secondary Glow",accentGlow:"Accent Glow",product1:"Cyberpunk 2077 - Collector's Edition",product2:"Jedi Holocron - Limited Run",product3:"Neon Samurai Controller",product4:"Data Shard - Encrypted",desc1:"Limited edition collector's set with art book, steelbook case, and exclusive digital content.",desc2:"Authentic Jedi holocron replica with light and sound effects. Limited to 500 units worldwide.",desc3:"Wireless controller with RGB lighting, programmable back buttons, and low-latency connection.",desc4:"Encrypted data shard containing classified archive fragments. Requires Level 5 clearance.",category1:"Gaming",category2:"Collectibles",category3:"Accessories",category4:"Data",tag1:"limited",tag2:"collector",tag3:"exclusive",tag4:"encrypted"},blogCard:{title:"Blog Cards",variants:"Variants",layouts:"Layouts",glows:"Glow Effects",responsive:"Responsive (Full width on mobile)",readMore:"Read More",featured:"Featured Post",vertical:"Vertical",horizontal:"Horizontal",primaryGlow:"Primary Glow",secondaryGlow:"Secondary Glow",accentGlow:"Accent Glow",post1:"The Future of Glassmorphism in UI Design",post2:"Building a Design System from Scratch",post3:"Mastering 3D Hover Effects in React",post4:"The Art of Cyberpunk Aesthetics",excerpt1:"Explore how glassmorphism is evolving and why it's becoming the go-to aesthetic for modern interfaces in 2024.",excerpt2:"A comprehensive guide to building a design system that scales, from tokens to components.",excerpt3:"Learn how to create smooth 3D tilt effects for cards, images, and interactive elements.",excerpt4:"Dive into the cyberpunk aesthetic and how it influences modern UI design.",author1:"Jane Doe",author2:"John Smith",author3:"Alex Rivers",author4:"Taylor Night",category1:"Design",category2:"Development",category3:"React",category4:"Aesthetics",tag1:"design",tag2:"tutorial",tag3:"react",tag4:"aesthetic"},scrollReveal:{title:"Scroll Reveal",subtitle:"Animate elements into view as you scroll",animation:"Animation",stagger:"Staggered Reveal",allPresets:"All Animation Presets",triggerAgain:"Re-trigger on Scroll Back",demoTip:"Scroll down to see elements animate in"},pageLoader:{title:"Page Loader",subtitle:"Full-screen loading overlay with multiple shapes",shapes:"Loader Shapes",spinner:"Spinner",ring:"Ring",dots:"Dots",pulse:"Pulse",bars:"Bars",withBrand:"With Brand Mark",withProgress:"With Progress Bar",provider:"Provider Demo",loadingArchives:"Loading archives...",downloading:"Downloading data...",navigating:"Navigating...",fetchingData:"Fetching data...",uploading:"Uploading...",simulateRoute:"Simulate Route Change",simulateFetch:"Simulate Data Fetch",simulateUpload:"Simulate Upload with Progress"}},Gt={app:{title:"کامپوننتهای دارا UI"},hero:{version:"نسخه ۱.۰ - آرشیو دیجیتال",title:"دارا UI",subtitle:"یک سیستم طراحی کشفشده در آرشیوی آیندهنگرانه که در زیر برف پنهان شده بود."},navbar:{home:"خانه",explore:"کاوش",settings:"تنظیمات",dashboard:"داشبورد",projects:"پروژهها",team:"تیم",analytics:"تحلیل",more:"بیشتر"},common:{thenImport:"سپس کامپوننتها را ایمپورت کنید:",hoverToFloat:"برای شناوری هاور کنید",mission:"ماموریت",requirements:"نیازمندیها:",complete:"تکمیل",completeMission:"تکمیل ماموریت",areYouSureComplete:"آیا مطمئن هستید که میخواهید ماموریت را تکمیل کنید:",youWillEarn:"شما دریافت خواهید کرد",uponCompletion:"پس از تکمیل."},codeBlock:{install:"npm install dara-ui",or:"یا",yarnAdd:"yarn add dara-ui",thenImport:"سپس کامپوننتها را ایمپورت کنید:",importExample:"import { Button, Card, Input } from 'dara-ui';"},characterLabels:{mbti:"MBTI",species:"گونه",affiliation:"وابستگی"},productLabels:{addToCart:"افزودن به سبد",outOfStock:"ناموجود",sale:"تخفیف",new:"جدید",limited:"محدود"},blogLabels:{readMore:"ادامه مطلب",minRead:"{{count}} دقیقه"},sidebar:{title:"سایدبار",hint:"جمعشونده · گروهها · زیرمنوها · آماده RTL",logout:"خروج",main:"اصلی",management:"مدیریت",dashboard:"داشبورد",projects:"پروژهها",team:"تیم",documents:"اسناد",messages:"پیامها",settings:"تنظیمات",invoices:"فاکتورها",reports:"گزارشها",archive:"آرشیو",inbox:"صندوق ورودی",sent:"ارسالشده",drafts:"پیشنویسها",collapse:"جمع کردن",expand:"باز کردن",subtitle:"ناوبری جمعشونده با گروهها، زیرمنوها و پشتیبانی از RTL",tip1:"برای جمع کردن یا باز کردن، دکمه را کلیک کنید یا Ctrl+B را فشار دهید",tip2:"آیتمهای دارای زیرمنو با کلیک باز میشوند",tip3:"آیتمهای فعال با رنگ بنفش مشخص شدهاند",activeProjects:"پروژههای فعال",completedTasks:"وظایف انجام شده",teamMembers:"اعضای تیم",notifications:"اعلانها",darkMode:"حالت تاریک",language:"زبان",dashboardContent:"به داشبورد خود خوش آمدید. در اینجا میتوانید نمای کلی از پروژهها و فعالیت تیم خود را مشاهده کنید.",projectsContent:"همه پروژههای خود را در یک مکان مدیریت کنید. شما ۱۲ پروژه فعال دارید.",teamContent:"اعضای تیم و نقشهای آنها. ۵ عضو آنلاین هستند.",invoicesContent:"مشاهده و مدیریت تمام فاکتورهای شما.",reportsContent:"ایجاد و مشاهده گزارشهای دقیق.",archiveContent:"دسترسی به اسناد و مدارک بایگانی شده.",inboxContent:"پیامهای خوانده نشده و مکالمات شما.",sentContent:"پیامهایی که به دیگران ارسال کردهاید.",draftsContent:"پیشنویسهای ذخیره شده و پیامهای در انتظار شما.",settingsContent:"تنظیمات برنامه و حساب کاربری خود را پیکربندی کنید.",activeProjectsLabel:"پروژههای فعال",completedTasksLabel:"وظایف انجام شده",teamMembersLabel:"اعضای تیم",notificationsLabel:"اعلانها",storageLabel:"فضای ذخیرهسازی",quickActionsLabel:"اقدامات سریع",recentActivityLabel:"فعالیتهای اخیر",deployAction:"استقرار",reviewAction:"بررسی",inviteAction:"دعوت",upgradeAction:"ارتقا",projectAlpha:"پروژه آلفا",projectBeta:"پروژه بتا",projectGamma:"پروژه گاما",projectDelta:"پروژه دلتا",inProgress:"در حال انجام",completed:"تکمیل شده",onHold:"متوقف شده",review:"در بررسی",memberRole1:"توسعهدهنده ارشد",memberRole2:"طراح",memberRole3:"مدیر محصول",memberRole4:"مهندس تست",activityUpload:"فایلهای آرشیو جدید را آپلود کرد",activityComment:"در پروژه آلفا نظر داد",activityMerge:"درخواست ادغام #۴۲ را ادغام کرد",activityDeploy:"به محیط عملیاتی مستقر کرد",minutesAgo:"{{count}} دقیقه پیش",hoursAgo:"{{count}} ساعت پیش",invoiceNumber:"فاکتور #{{num}}",invoicePaid:"پرداخت شده",invoicePending:"در انتظار",invoiceOverdue:"معوق",reportWeekly:"گزارش هفتگی",reportMonthly:"گزارش ماهانه",reportQuarterly:"گزارش فصلی",mobileSidebarHint:"برای باز کردن منو، بکشید یا روی آن ضربه بزنید",openMenu:"باز کردن منو",closeMenu:"بستن منو"},badges:{title:"نشانها",variants:"واریانتها",sizes:"اندازهها",outline:"واریانتهای خطی",withGlow:"با درخشش",withIcons:"با آیکونها",primary:"اصلی",secondary:"ثانویه",success:"موفق",danger:"خطر",warning:"اخطار",small:"کوچک",medium:"متوسط",large:"بزرگ",glowPrimary:"درخشش اصلی",glowSuccess:"درخشش موفق",glowDanger:"درخشش خطر",package:"بسته",done:"انجام شد",pending:"در انتظار",failed:"ناموفق"},buttons:{title:"واریانتهای دکمه",withGlow:"با درخشش",withIcons:"با آیکونها",states:"وضعیتهای دکمه",sizesTitle:"اندازههای دکمه",primary:"اصلی",secondary:"ثانویه",accent:"متضاد",glass:"شیشهای",danger:"خطر",success:"موفق",outline:"خطی",normal:"عادی",hover:"هاور",pressed:"فشرده",disabled:"غیرفعال",loading:"در حال بارگذاری",small:"کوچک",medium:"متوسط",large:"بزرگ",glowPrimary:"درخشش اصلی",glowSecondary:"درخشش ثانویه",glowAccent:"درخشش متضاد",launch:"اجرا",next:"بعدی",confirm:"تأیید"},avatar:{title:"آواتار",sizes:"اندازهها",shapes:"اشکال",status:"وضعیتها",glowEffects:"جلوههای درخشش",withImage:"با تصویر",group:"گروه",clickable:"قابل کلیک"},tooltip:{title:"راهنما",placements:"موقعیتها",variants:"واریانتها",withBadge:"با نشان",longContent:"متن بلند",solidLabel:"توپر",outlineLabel:"خطی",glassLabel:"شیشهای",top:"بالا",bottom:"پایین",left:"چپ",right:"راست",topLeft:"بالا چپ",topRight:"بالا راست",bottomLeft:"پایین چپ",bottomRight:"پایین راست",glassTooltip:"راهنمای شیشهای",solidTooltip:"راهنمای توپر",outlineTooltip:"راهنمای خطی",unreadMessages:"شما {{count}} پیام خواندهنشده دارید",longTooltip:"این یک راهنمای بلندتر با اطلاعات دقیقتر درباره المان مورد نظر است.",hoverDetails:"برای جزئیات هاور کن",disabledTooltip:"این راهنما غیرفعال است",noArrow:"بدون پیکان در این راهنما",interactive:"راهنمای تعاملی",demoTitle:"نمایش راهنما",demoDescription:"برای مشاهده راهنماها، روی دکمههای زیر هاور کنید",placementDemo:"نمایش موقعیتها",variantDemo:"نمایش واریانتها",sizeDemo:"نمایش اندازهها",longContentDemo:"نمایش متن بلند",badgeDemo:"نمایش با نشان",disabledDemo:"نمایش راهنمای غیرفعال",noArrowDemo:"نمایش بدون پیکان"},tabs:{title:"تبها",archive:"آرشیو",quests:"ماموریتها",stats:"آمار",settings:"تنظیمات",archiveContent:"مرور سوابق رمزنگاریشده جدای، هولوکرونها و گزارش ماموریتها از آرشیو کلگری.",questsContent:"ماموریتهای فعال، جایزهها و ماموریتهای جانبی منتظر توجه شما هستند، پادوان.",statsContent:"همترازی نیرو، افزایش XP و سطوح ارتقای سایبرنتیک خود را پیگیری کنید.",settingsContent:"هاد، تم و تنظیمات رمزنگاری آرشیو را پیکربندی کنید."},accordion:{title:"آکاردئون",mode:"حالت",single:"تکی",multiple:"چندگانه",singleDesc:"فقط یک آیتم میتواند در هر زمان باز باشد",multipleDesc:"چندین آیتم میتوانند همزمان باز باشند",controlled:"کنترلشده - آیتمهای باز:",withIcons:"با آیکونها",q1:"دارا UI چیست؟",a1:"دارا UI یک سیستم طراحی است که حس یک رابط کشفشده در آرشیوی آیندهنگرانه در زیر کلگری در طوفان برف را دارد. ترکیبی از شیشهای، سایبرپانک، گوتیک، مینیمالیسم اپل و عناصر هاد انیمهای.",q2:"چه تمهایی موجود است؟",a2:"آرشیو شب (پیشفرض)، کلگری برفی (روشن)، حالت سیت (سیاه + قرمز)، معبد جدای (سفید + آبی)، دراکولا (بنفش) و شراب (قرمز تیره).",q3:"چگونه نصب کنم؟",a3:"npm install dara-ui, بعدش import { Button, Card, Input } from 'dara-ui' رو اول کدت اضافه کن. این کتابخونه با Vite، Next.js، و CRA قابل استفادست.",dashboard:"داشبورد",projects:"پروژهها",settingsAccordion:"تنظیمات",dashboardContent:"نمای کلی داشبورد با معیارهای کلیدی و فعالیتهای اخیر.",projectsContent:"پروژههای فعال و وضعیت فعلی آنها.",settingsContentAccordion:"تنظیمات برنامه خود را پیکربندی کنید."},dropdown:{title:"دراپداون",basic:"پایه",withIcons:"با آیکونها",searchable:"قابل جستجو",controlled:"کنترلشده - انتخابشده:",selectFramework:"یک فریمورک انتخاب کنید...",withPlaceholder:"با جایگذاری",selectWithIcons:"با آیکون انتخاب کنید...",searchWithIcons:"با آیکون جستجو کنید...",searchOptions:"جستجوی گزینهها...",searchFrameworks:"جستجوی فریمورکها...",typeToFilter:"برای فیلتر کردن تایپ کنید",framework:"فریمورک",chooseFramework:"فریمورک مورد نظر خود را انتخاب کنید",setVue:"تنظیم Vue",setSvelte:"تنظیم Svelte",setSolid:"تنظیم Solid"},cards:{title:"کارتها",variants:"واریانتها",floatGlow:"شناور + درخشش",featureCards:"کارتهای ویژه",glassCard:"کارت شیشهای",solidCard:"کارت توپر",outlineCard:"کارت خطی",primaryGlow:"درخشش با رنگ اولیه",secondaryGlow:"درخشش با رنگ دوم",accentGlow:"درخشش با رنگ اکسنت",launch:"اجرا",analytics:"تحلیل",deployProject:"پروژه خود را با یک کلیک مستقر کنید.",trackPerformance:"معیارهای عملکرد خود را پیگیری کنید."},inputs:{title:"ورودیها",basic:"ورودیهای پایه",withLabels:"با برچسبها",withIconsTitle:"با آیکونها",validation:"وضعیتهای اعتبارسنجی",textInput:"ورودی متن",password:"رمز عبور",search:"جستجو",email:"ایمیل",username:"نام کاربری",enterUsername:"نام کاربری را وارد کنید",enterEmail:"ایمیل را وارد کنید",emailHelper:"ما هرگز ایمیل شما را به اشتراک نمیگذاریم.",success:"موفق",error:"خطا",validInput:"ورودی معتبر!",somethingWrong:"مشکلی پیش آمده است"},modal:{title:"مودال",openModal:"باز کردن مودال",viewContent:"مشاهده محتوا",archiveAccess:"دسترسی به آرشیو",acceptMission:"پذیرش ماموریت",decline:"رد کردن",modalDescription:"شما یک قطعه آرشیو جدای مهر و موم شده را کشف کردید. این مودال از استایل glass-heavy با blur(30px) استفاده میکند."},toast:{title:"اعلانهای توست",subtitle:"بالا-راست · مینیمال · اسلاید ۲۲۰ms · خودکار حذف",successToast:"توست موفق",errorToast:"توست خطا",warningToast:"توست اخطار",infoToast:"توست اطلاعات",successMsg:"ماموریت انجام شد! +۳۰۰ XP دریافت شد.",errorMsg:"اتصال قطع شد. تلاش مجدد...",warningMsg:"لطفا اتصال خود را بررسی کنید",infoMsg:"آرشیوها در حال ایندکس شدن هستند"},progress:{title:"پیشرفت",horizontal:"افقی",labelInside:"برچسب داخل نوار",displayTypes:"انواع نمایش",sizes:"اندازهها",radial:"دایرهای",radialCustom:"دایرهای با برچسب سفارشی",radialSizes:"اندازههای دایرهای",almostDone:"تقریبا تمام شد!",loading:"لودینگ...",done:"انجام شد!"},xpbar:{title:"نوار تجربه، سطح",rankProgress:"پیشرفت رتبه",missionProgress:"پیشرفت ماموریت",tier:"سطح",rank:"رتبه",points:"امتیاز",exp:"تجربه",score:"امتیاز",prestige:"اعتبار"},rank:{common:"معمولی",uncommon:"غیرمعمول",rare:"کمیاب",epic:"حماسی",legendary:"افسانهای",recruit:"تازهکار",soldier:"سرباز",veteran:"کهنهکار",elite:"نخبه",commander:"فرمانده"},glow:{title:"جلوههای درخشش",glowPrimary:"درخشش بنفش",glowSecondary:"درخشش فیروزهای",glowAccent:"درخشش صورتی"},quest:{title:"کارتهای ماموریت",buildCMS:"ساخت CMS",buildCMSDesc:"رابط آرشیو جدای را پیش از آب شدن برفها مستقر کنید.",secureArchives:"ایمنسازی آرشیو",secureArchivesDesc:"رمزنگاری سرتاسری برای تمام دادههای ذخیرهشده در آرشیو پیادهسازی کنید.",legendaryQuest:"ماموریت افسانهای: آرشیو گمشده",legendaryQuestDesc:"به اعماق طاق فراموششده سفر کنید و هولوکرون باستانی را بازیابی کنید.",mapNightCity:"نقشهبرداری شبشهر",mapNightCityDesc:"نقشه جامعی از منطقه سایبرپانکی قبل از پاکسازی داده ایجاد کنید.",requirements:"نیازمندیها",completeReviews:"تکمیل ۳ بازبینی کد",writeTests:"نوشتن ۵ تست واحد",deployStaging:"استقرار در محیط تست",reachLevel:"رسیدن به سطح ۲۵",defeatGuardian:"شکست دادن نگهبان سایه",collectArtifacts:"جمعآوری ۳ اثر باستانی",solveRiddle:"حل معما",scanLocations:"اسکن ۱۰ مکان",interviewNPCs:"مصاحبه با ۵ شخصیت",uploadArchive:"آپلود در آرشیو",deadline:"مهلت",deadlineToday:"مهلت: امروز",deadlineTomorrow:"مهلت: فردا",deadlineTonight:"مهلت: امشب",deadlineYesterday:"مهلت: دیروز",daysAgo:"روز پیش",days:"روز",week:"هفته",weeks:"هفته",month:"ماه",months:"ماه",years:"سال"},character:{title:"کارتهای شخصیت",vertical:"چیدمان عمودی (پیشفرض)",horizontal:"چیدمان افقی",daraName:"دارا",daraSubtitle:"بایگان جدای",daraQuote:"تاریکی ترسناک نیست - باید بایگانی شود.",cipherName:"سایفر",cipherSubtitle:"نترانر",cipherQuote:"کد کلید همه چیز است.",shadowName:"سایه",shadowSubtitle:"شکارچی شب",shadowQuote:"من در تاریکی حرکت میکنم جایی که آنها نمیتوانند ببینند.",force:"نیرو",combat:"رزمی",intelligence:"هوش",wisdom:"خرد",hacking:"هک",stealth:"مخفیکاری",agility:"چابکی",strength:"قدرت",speciesHumanCyborg:"انسان/سایبورگ",speciesCyborg:"سایبورگ",speciesVampire:"خونآشام",affiliationJedi:"فرقه جدای",affiliationNetwatch:"نتواچ",affiliationNightCouncil:"شورای شب",traitMbtiIntj:"MBTI: INTJ",traitMbtiIntp:"MBTI: INTP",traitMbtiIstp:"MBTI: ISTP",traitHumanCyborg:"انسان/سایبورگ",traitCyborg:"سایبورگ",traitVampire:"خونآشام"},statsWidget:{title:"ویجت آمار",radialVariant:"واریانت دایرهای",barVariant:"واریانت نواری",horizontalLayout:"چیدمان افقی",forceStats:"آمار نیرو",characterStats:"آمار شخصیت",progress:"پیشرفت",skills:"مهارتها",battleStats:"آمار نبرد",skillProgress:"پیشرفت مهارت",health:"سلامت",mana:"مانا",stamina:"استقامت",level:"سطح",endurance:"استقامت",luck:"شانس",statsSuffix:"آمار"},themeChanger:{title:"تغییر دهنده تم",default:"پیشفرض",iconOnly:"فقط آیکون",fixedWidth:"عرض ثابت (۱۶۰px)",small:"کوچک",smallIconOnly:"کوچک فقط آیکون",customThemes:"تمهای سفارشی",demo:"نمایش",themeChangerDesc:"تغییر دهنده تم با تشخیص خودکار، حالت فقط آیکون و پشتیبانی از عرض ثابت. برای استفاده فشرده در نوار ناوبری از iconOnly استفاده کنید، یا برای اندازهگیری ثابت از fixedWidth استفاده کنید."},languageChanger:{title:"تغییر دهنده زبان",default:"پیشفرض",iconOnly:"فقط آیکون",fixedWidth:"عرض ثابت (۱۶۰px)",small:"کوچک",smallIconOnly:"کوچک فقط آیکون",customLanguages:"زبانهای سفارشی",demo:"نمایش",languageChangerDesc:"تغییر دهنده زبان با ذخیرهسازی در localStorage، حالت فقط آیکون و پشتیبانی از عرض ثابت. برای استفاده فشرده در نوار ناوبری از iconOnly استفاده کنید، یا برای اندازهگیری ثابت از fixedWidth استفاده کنید. زبان در localStorage ذخیره شده و ویژگیهای lang و dir روی عنصر html بهروز میشوند."},gradients:{title:"گرادیانها",primary:"اصلی",accent:"متضاد",success:"موفق",danger:"خطر"},effects:{title:"جلوهها",glassEffect:"جلوه شیشهای",glowPrimary:"درخشش بنفش",glowAccent:"درخشش صورتی"},typography:{title:"تایپوگرافی",textSecondary:"متن ثانویه",regularBody:"متن معمولی با فونت Inter",gradientHeading:"عنوان گرادیان",accentText:"متن با رنگ متضاد",codeExample:'console.log("کد با فونت JetBrains Mono");'},persian:{title:"پشتیبانی از فارسی",persianText:"این متن با فونت وزیرمتن نمایش داده میشود",persianHeading:"عنوان فارسی با قلم Kook",persianDesc:"متن فارسی با اندازه کوچک و رنگ ثانویه"},checkbox:{title:"چکباکس",basic:"چکباکسهای پایه",sizes:"اندازهها",states:"وضعیتها",rtlSupport:"پشتیبانی از RTL",controlled:"کنترلشده",group:"مثال گروهی",unchecked:"تیک نخورده",checked:"تیک خورده",glowChecked:"درخشش هنگام تیک خوردن",small:"کوچک",medium:"متوسط",large:"بزرگ",normal:"عادی",error:"حالت خطا",disabled:"غیرفعال",disabledChecked:"غیرفعال تیک خورده",rtlLabel1:"پذیرش شرایط",rtlLabel2:"تایید اطلاعات",rtlLabel3:"فعال سازی حالت شب",rtlNote:"حالت RTL - برچسب در سمت راست قرار میگیرد",controlledLabel:"چکباکس کنترلشده",status:"وضعیت",check:"تیک بزن",uncheck:"تیک بردار",groupLabel:"تنظیمات خود را انتخاب کنید:",groupOption1:"فعال کردن اعلانها",groupOption2:"حالت شب",groupOption3:"ذخیره خودکار",selectedCount:"انتخاب شده"},switch:{title:"سوئیچ",basic:"سوئیچهای پایه",sizes:"اندازهها",states:"وضعیتها",rtlSupport:"پشتیبانی از RTL",controlled:"کنترلشده",group:"مثال گروهی",off:"خاموش",on:"روشن",glowOn:"درخشش هنگام روشن بودن",small:"کوچک",medium:"متوسط",large:"بزرگ",normal:"عادی",disabledOff:"غیرفعال خاموش",disabledOn:"غیرفعال روشن",rtlLabel1:"فعال سازی حالت شب",rtlLabel2:"فعال کردن اعلانها",rtlLabel3:"حالت خودکار",rtlNote:"حالت RTL - برچسب در بالا، سوئیچ جهت خود را تغییر میدهد",controlledLabel:"سوئیچ کنترلشده",status:"وضعیت",turnOn:"روشن کن",turnOff:"خاموش کن",groupLabel:"تنظیمات:",groupOption1:"فعال کردن اعلانها",groupOption2:"حالت شب",groupOption3:"ذخیره خودکار",enabledCount:"فعال",withIcons:"با آیکونها",notifications:"اعلانها",darkMode:"حالت شب",sound:"صدا"},radio:{title:"رادیو",basic:"رادیوهای پایه",sizes:"اندازهها",states:"وضعیتها",rtlSupport:"پشتیبانی از RTL",controlled:"کنترلشده",group:"مثال گروهی",unselected:"انتخاب نشده",selected:"انتخاب شده",glowSelected:"درخشش هنگام انتخاب",small:"کوچک",medium:"متوسط",large:"بزرگ",normal:"عادی",error:"حالت خطا",disabled:"غیرفعال",disabledChecked:"غیرفعال انتخاب شده",rtlLabel1:"پذیرش شرایط",rtlLabel2:"تایید اطلاعات",rtlLabel3:"فعال سازی حالت شب",rtlNote:"حالت RTL - برچسب در سمت راست قرار میگیرد",controlledLabel:"رادیو کنترلشده",status:"وضعیت",select:"انتخاب",deselect:"لغو انتخاب",groupLabel:"تنظیمات خود را انتخاب کنید:",groupOption1:"فعال کردن اعلانها",groupOption2:"حالت شب",groupOption3:"ذخیره خودکار",horizontalGroup:"گروه افقی",nightfall:"شب",daylight:"روز",dracula:"دراکولا"},range:{title:"لغزنده محدوده",basic:"لغزندههای پایه",colors:"واریانتهای رنگی",sizes:"اندازهها",customUnits:"واحدهای سفارشی",valuePositions:"موقعیتهای مقدار",sparkleAtMax:"جرقه در حداکثر",withoutGlow:"بدون درخشش",controlled:"حالت کنترلشده",volume:"صدا",brightness:"روشنایی",contrast:"کنتراست",primary:"اصلی",secondary:"ثانویه",accent:"متضاد",success:"موفق",danger:"خطر",warning:"اخطار",small:"کوچک",medium:"متوسط (پیشفرض)",large:"بزرگ",pixels:"پیکسل",price:"قیمت",rial:"ریال (تومان)",temperature:"دما",left:"چپ",right:"راست (پیشفرض)",top:"بالا",bottom:"پایین",almostMax:"نزدیک به حداکثر",atMax:"در حداکثر (جرقه!)",sparkleNote:"انفجار جرقه هنگام رسیدن به حداکثر مقدار",noGlow:"بدون جلوه درخشش",noGlow2:"ثانویه بدون درخشش",liveValue:"مقدار زنده",finalValue:"مقدار نهایی",controlledLabel:"لغزنده کنترلشده",set25:"تنظیم ۲۵٪",set75:"تنظیم ۷۵٪",set100:"تنظیم ۱۰۰٪",reset:"بازنشانی"},productCard:{title:"کارتهای محصول",variants:"واریانتها",layouts:"چیدمانها",glows:"جلوههای درخشش",withActions:"با اقدامات سریع",responsive:"واکنشگرا (عرض کامل در موبایل)",addToCart:"افزودن به سبد خرید",outOfStock:"ناموجود",sale:"تخفیف",new:"جدید",limited:"محدود",reviews:"نظرات",vertical:"عمودی",horizontal:"افقی",compact:"فشرده",primaryGlow:"درخشش با رنگ اولیه",secondaryGlow:"درخشش با رنگ دوم",accentGlow:"درخشش با رنگ اکسنت",product1:"سایبرپانک ۲۰۷۷ - نسخه کلکسیونی",product2:"هولوکرون جدای - نسخه محدود",product3:"کنترلر سامورایی نئون",product4:"شاخه داده - رمزنگاریشده",desc1:"مجموعه کلکسیونی نسخه محدود با کتاب هنری، قاب فلزی و محتوای دیجیتال اختصاصی.",desc2:"کپی معتبر هولوکرون جدای با جلوههای نور و صدا. محدود به ۵۰۰ دستگاه در سراسر جهان.",desc3:"کنترلر بیسیم با نورپردازی RGB، دکمههای پشتی قابل برنامهریزی و اتصال با تأخیر کم.",desc4:"شاخه داده رمزنگاریشده حاوی قطعات طبقهبندیشده آرشیو. نیاز به سطح ۵ دسترسی دارد.",category1:"بازی",category2:"کلکسیونی",category3:"لوازم جانبی",category4:"داده",tag1:"محدود",tag2:"کلکسیونی",tag3:"اختصاصی",tag4:"رمزنگاریشده"},blogCard:{title:"کارتهای وبلاگ",variants:"واریانتها",layouts:"چیدمانها",glows:"جلوههای درخشش",responsive:"واکنشگرا (عرض کامل در موبایل)",readMore:"ادامه مطلب",featured:"نوشته ویژه",vertical:"عمودی",horizontal:"افقی",primaryGlow:"درخشش با رنگ اولیه",secondaryGlow:"درخشش با رنگ دوم",accentGlow:"درخشش با رنگ اکسنت",post1:"آینده شیشهمورفیسم در طراحی رابط کاربری",post2:"ساخت یک سیستم طراحی از صفر",post3:"تسلط بر جلوههای هاور سهبعدی در React",post4:"هنر زیباییشناسی سایبرپانک",excerpt1:"بررسی تکامل شیشهمورفیسم و اینکه چرا به زیباییشناسی اصلی رابطهای مدرن در ۲۰۲۴ تبدیل میشود.",excerpt2:"راهنمای جامع ساخت یک سیستم طراحی که مقیاسپذیر باشد، از توکنها تا کامپوننتها.",excerpt3:"یادگیری ساخت جلوههای چرخش سهبعدی نرم برای کارتها، تصاویر و عناصر تعاملی.",excerpt4:"غواصی در زیباییشناسی سایبرپانک و تأثیر آن بر طراحی رابط کاربری مدرن.",author1:"جین دو",author2:"جان اسمیت",author3:"الکس ریورز",author4:"تیلور نایت",category1:"طراحی",category2:"توسعه",category3:"ریاکت",category4:"زیباییشناسی",tag1:"طراحی",tag2:"آموزشی",tag3:"ریاکت",tag4:"زیباییشناسی"},scrollReveal:{title:"نمایش با اسکرول",subtitle:"انیمیشن عناصر هنگام ورود به دید",animation:"انیمیشن",stagger:"نمایش پلکانی",allPresets:"همه پیشتنظیمهای انیمیشن",triggerAgain:"اجرای مجدد در اسکرول برگشتی",demoTip:"برای دیدن انیمیشن عناصر، به پایین اسکرول کنید"},pageLoader:{title:"لودر صفحه",subtitle:"پوشش تمامصفحه بارگذاری با اشکال مختلف",shapes:"اشکال لودر",spinner:"چرخان",ring:"حلقهای",dots:"نقطهای",pulse:"ضربان",bars:"میلهای",withBrand:"با نشان برند",withProgress:"با نوار پیشرفت",provider:"نمایش پرووایدر",loadingArchives:"در حال بارگذاری آرشیو...",downloading:"در حال دانلود داده...",navigating:"در حال انتقال...",fetchingData:"در حال دریافت داده...",uploading:"در حال آپلود...",simulateRoute:"شبیهسازی تغییر مسیر",simulateFetch:"شبیهسازی دریافت داده",simulateUpload:"شبیهسازی آپلود با پیشرفت"}},qt={app:{title:"Composants Dara UI"},hero:{version:"v1.0 - Les Archives Numériques",title:"DARA UI",subtitle:"Un système de design découvert dans une archive futuriste cachée sous la neige."},navbar:{home:"Accueil",explore:"Explorer",settings:"Paramètres",dashboard:"Tableau de bord",projects:"Projets",team:"Équipe",analytics:"Analyses",more:"Plus"},common:{thenImport:"Ensuite, importez les composants :",hoverToFloat:"Survolez pour flotter",mission:"MISSION",requirements:"Prérequis :",complete:"Terminer",completeMission:"Terminer la mission",areYouSureComplete:"Êtes-vous sûr de vouloir terminer la mission :",youWillEarn:"Vous gagnerez",uponCompletion:"à la fin."},codeBlock:{install:"npm install dara-ui",or:"ou",yarnAdd:"yarn add dara-ui",thenImport:"Ensuite, importez les composants :",importExample:"import { Button, Card, Input } from 'dara-ui';"},characterLabels:{mbti:"MBTI",species:"Espèce",affiliation:"Affiliation"},productLabels:{addToCart:"Ajouter au panier",outOfStock:"En rupture de stock",sale:"Soldes",new:"Nouveau",limited:"Édition limitée"},blogLabels:{readMore:"Lire la suite",minRead:"{{count}} min"},sidebar:{title:"Barre latérale",hint:"Réductible · Groupes · Sous-menus · Prêt RTL",logout:"Déconnexion",main:"Principal",management:"Gestion",dashboard:"Tableau de bord",projects:"Projets",team:"Équipe",documents:"Documents",messages:"Messages",settings:"Paramètres",invoices:"Factures",reports:"Rapports",archive:"Archives",inbox:"Boîte de réception",sent:"Envoyés",drafts:"Brouillons",collapse:"Réduire",expand:"Développer",subtitle:"Navigation réductible avec groupes, sous-menus et support RTL",tip1:"Cliquez sur le bouton de réduction ou appuyez sur Ctrl+B pour basculer",tip2:"Les éléments avec sous-menus se développent au clic",tip3:"Les éléments actifs sont surlignés en violet",activeProjects:"Projets actifs",completedTasks:"Tâches terminées",teamMembers:"Membres de l'équipe",notifications:"Notifications",darkMode:"Mode sombre",language:"Langue",dashboardContent:"Bienvenue sur votre tableau de bord. Vous pouvez voir un aperçu de vos projets et de l'activité de votre équipe.",projectsContent:"Gérez tous vos projets au même endroit. Vous avez 12 projets actifs.",teamContent:"Les membres de votre équipe et leurs rôles. 5 membres en ligne.",invoicesContent:"Consultez et gérez toutes vos factures.",reportsContent:"Générez et consultez des rapports détaillés.",archiveContent:"Accédez aux documents et dossiers archivés.",inboxContent:"Vos messages non lus et vos conversations.",sentContent:"Messages que vous avez envoyés à d'autres.",draftsContent:"Vos brouillons enregistrés et messages en attente.",settingsContent:"Configurez les préférences de votre application et les paramètres de votre compte.",activeProjectsLabel:"Projets actifs",completedTasksLabel:"Tâches terminées",teamMembersLabel:"Membres de l'équipe",notificationsLabel:"Notifications",storageLabel:"Stockage",quickActionsLabel:"Actions rapides",recentActivityLabel:"Activité récente",deployAction:"Déployer",reviewAction:"Réviser",inviteAction:"Inviter",upgradeAction:"Mettre à niveau",projectAlpha:"Projet Alpha",projectBeta:"Projet Beta",projectGamma:"Projet Gamma",projectDelta:"Projet Delta",inProgress:"En cours",completed:"Terminé",onHold:"En pause",review:"En révision",memberRole1:"Développeur principal",memberRole2:"Designer",memberRole3:"Chef de produit",memberRole4:"Ingénieur QA",activityUpload:"A téléversé de nouveaux fichiers d'archive",activityComment:"A commenté le Projet Alpha",activityMerge:"A fusionné la pull request #42",activityDeploy:"A déployé en production",minutesAgo:"il y a {{count}} min",hoursAgo:"il y a {{count}} heures",invoiceNumber:"Facture #{{num}}",invoicePaid:"Payée",invoicePending:"En attente",invoiceOverdue:"En retard",reportWeekly:"Rapport hebdomadaire",reportMonthly:"Rapport mensuel",reportQuarterly:"Rapport trimestriel",mobileSidebarHint:"Glissez ou touchez le menu pour ouvrir la navigation",openMenu:"Ouvrir le menu",closeMenu:"Fermer le menu"},badges:{title:"Badges",variants:"Variantes",sizes:"Tailles",outline:"Variantes contour",withGlow:"Avec lueur",withIcons:"Avec icônes",primary:"Primaire",secondary:"Secondaire",success:"Succès",danger:"Danger",warning:"Avertissement",small:"Petit",medium:"Moyen",large:"Grand",glowPrimary:"Lueur Primaire",glowSuccess:"Lueur Succès",glowDanger:"Lueur Danger",package:"Paquet",done:"Terminé",pending:"En attente",failed:"Échoué"},buttons:{title:"Variantes de boutons",withGlow:"Avec lueur",withIcons:"Avec icônes",states:"États des boutons",sizesTitle:"Tailles des boutons",primary:"Primaire",secondary:"Secondaire",accent:"Accent",glass:"Verre",danger:"Danger",success:"Succès",outline:"Contour",normal:"Normal",hover:"Survol",pressed:"Appuyé",disabled:"Désactivé",loading:"Chargement",small:"Petit",medium:"Moyen",large:"Grand",glowPrimary:"Lueur Primaire",glowSecondary:"Lueur Secondaire",glowAccent:"Lueur Accent",launch:"Lancer",next:"Suivant",confirm:"Confirmer"},avatar:{title:"Avatar",sizes:"Tailles",shapes:"Formes",status:"Indicateurs de statut",glowEffects:"Effets de lueur",withImage:"Avec image",group:"Groupe",clickable:"Cliquable"},tooltip:{title:"Infobulle",placements:"Placements",variants:"Variantes",withBadge:"Avec badge",longContent:"Contenu long",solidLabel:"Solide",outlineLabel:"Contour",glassLabel:"Verre",top:"Haut",bottom:"Bas",left:"Gauche",right:"Droite",topLeft:"Haut gauche",topRight:"Haut droite",bottomLeft:"Bas gauche",bottomRight:"Bas droite",glassTooltip:"Infobulle en verre",solidTooltip:"Infobulle solide",outlineTooltip:"Infobulle contour",unreadMessages:"Vous avez {{count}} messages non lus",longTooltip:"Ceci est une infobulle plus longue avec des informations plus détaillées sur l'élément que vous survolez.",hoverDetails:"Survolez pour plus de détails",disabledTooltip:"Cette infobulle est désactivée",noArrow:"Pas de flèche sur cette infobulle",interactive:"Infobulle interactive",demoTitle:"Démo d'infobulle",demoDescription:"Survolez les boutons ci-dessous pour voir les infobulles en action",placementDemo:"Démo de placement",variantDemo:"Démo de variantes",sizeDemo:"Démo de tailles",longContentDemo:"Démo de contenu long",badgeDemo:"Démo avec badge",disabledDemo:"Démo d'infobulle désactivée",noArrowDemo:"Démo sans flèche"},tabs:{title:"Onglets",archive:"Archives",quests:"Quêtes",stats:"Statistiques",settings:"Paramètres",archiveContent:"Parcourez les enregistrements Jedi cryptés, les holocrons et les journaux de mission des archives.",questsContent:"Des missions actives, des primes et des quêtes secondaires vous attendent, Padawan.",statsContent:"Suivez votre alignement de la Force, vos gains d'XP et vos niveaux d'amélioration cybernétique.",settingsContent:"Configurez votre HUD, votre mode thème et vos préférences de cryptage d'archives."},accordion:{title:"Accordéon",mode:"Mode",single:"Unique",multiple:"Multiple",singleDesc:"Un seul élément peut être ouvert à la fois",multipleDesc:"Plusieurs éléments peuvent être ouverts simultanément",controlled:"Contrôlé - Éléments ouverts :",withIcons:"Avec icônes",q1:"Qu'est-ce que Dara UI ?",a1:"Dara UI est un système de design qui ressemble à une interface découverte dans une archive futuriste cachée sous lors d'une tempête de neige. Il mélange le glassmorphisme, le cyberpunk, l'esthétique gothique, le minimalisme d'Apple et des éléments d'interface anime.",q2:"Quels thèmes sont disponibles ?",a2:"Archive Nocturne (défaut), Enneigée (clair), Mode Sith (noir + rouge), Temple Jedi (blanc + bleu), Dracula (violet) et Vin (rouges profonds).",q3:"Comment l'installer ?",a3:"npm install dara-ui, puis import { Button, Card, Input } from 'dara-ui'. Fonctionne avec Vite, Next.js et CRA.",dashboard:"Tableau de bord",projects:"Projets",settingsAccordion:"Paramètres",dashboardContent:"Aperçu du tableau de bord avec les indicateurs clés et l'activité récente.",projectsContent:"Projets actifs et leur statut actuel.",settingsContentAccordion:"Configurez les préférences de votre application."},dropdown:{title:"Liste déroulante",basic:"Basique",withIcons:"Avec icônes",searchable:"Recherchable",controlled:"Contrôlé - Sélectionné :",selectFramework:"Sélectionnez un framework...",withPlaceholder:"Avec espace réservé",selectWithIcons:"Sélectionnez avec icônes...",searchWithIcons:"Recherchez avec icônes...",searchOptions:"Rechercher des options...",searchFrameworks:"Rechercher des frameworks...",typeToFilter:"Tapez pour filtrer les options",framework:"Framework",chooseFramework:"Choisissez votre framework préféré",setVue:"Définir Vue",setSvelte:"Définir Svelte",setSolid:"Définir Solid"},cards:{title:"Cartes",variants:"Variantes",floatGlow:"Flottant + Lueur",featureCards:"Cartes de fonctionnalités",glassCard:"Carte en verre",solidCard:"Carte solide",outlineCard:"Carte contour",primaryGlow:"Lueur Primaire",secondaryGlow:"Lueur Secondaire",launch:"Lancer",analytics:"Analyses",deployProject:"Déployez votre projet en un clic.",trackPerformance:"Suivez vos métriques de performance."},inputs:{title:"Champs de saisie",basic:"Champs de saisie basiques",withLabels:"Avec étiquettes",withIconsTitle:"Avec icônes",validation:"États de validation",textInput:"Saisie de texte",password:"Mot de passe",search:"Recherche",email:"Email",username:"Nom d'utilisateur",enterUsername:"Entrez le nom d'utilisateur",enterEmail:"Entrez l'email",emailHelper:"Nous ne partagerons jamais votre email.",success:"Succès",error:"Erreur",validInput:"Saisie valide !",somethingWrong:"Une erreur s'est produite"},modal:{title:"Modale",openModal:"Ouvrir la modale",viewContent:"Voir le contenu",archiveAccess:"Accès aux archives",acceptMission:"Accepter la mission",decline:"Refuser",modalDescription:"Vous avez découvert un fragment d'archive Jedi scellé. Cette modale utilise un style glass-heavy avec un arrière-plan flou à 30px."},toast:{title:"Notifications Toast",subtitle:"En haut à droite · Minimal · Glissement 220ms · Auto-fermeture",successToast:"Toast Succès",errorToast:"Toast Erreur",warningToast:"Toast Avertissement",infoToast:"Toast Info",successMsg:"Mission terminée ! +300 XP gagnés.",errorMsg:"Connexion perdue. Nouvel essai...",warningMsg:"Veuillez vérifier votre connexion",infoMsg:"Les archives sont en cours d'indexation"},progress:{title:"Progression",horizontal:"Horizontal",labelInside:"Étiquette à l'intérieur",displayTypes:"Types d'affichage",sizes:"Tailles",radial:"Radial",radialCustom:"Radial avec étiquette personnalisée",radialSizes:"Tailles radiales",almostDone:"Presque terminé !",loading:"Chargement...",done:"Terminé !"},xpbar:{title:"Barre d'XP, Niveau",rankProgress:"PROGRESSION DE RANG",missionProgress:"PROGRESSION DE MISSION",tier:"Niveau",rank:"Rang",points:"Points",exp:"EXP",score:"Score",prestige:"Prestige"},rank:{common:"Commun",uncommon:"Peu commun",rare:"Rare",epic:"Épique",legendary:"Légendaire",recruit:"Recrue",soldier:"Soldat",veteran:"Vétéran",elite:"Élite",commander:"Commandant"},glow:{title:"Effets de lueur",glowPrimary:"Lueur violette",glowSecondary:"Lueur Secondary",glowAccent:"Lueur rose"},quest:{title:"Cartes de quêtes",buildCMS:"Construire CMS",buildCMSDesc:"Déployez l'interface d'archives Jedi cryptée avant que la neige ne fonde.",secureArchives:"Sécuriser les archives",secureArchivesDesc:"Implémentez le chiffrement de bout en bout pour toutes les données stockées dans les archives.",legendaryQuest:"Quête légendaire : Les archives perdues",legendaryQuestDesc:"Voyagez dans les profondeurs du caveau oublié et récupérez l'ancien holocron.",mapNightCity:"Cartographier Night City",mapNightCityDesc:"Créez une carte complète du quartier cyberpunk avant la purge des données.",requirements:"Prérequis",completeReviews:"Compléter 3 revues de code",writeTests:"Écrire 5 tests unitaires",deployStaging:"Déployer en pré-production",reachLevel:"Atteindre le niveau 25",defeatGuardian:"Vaincre le Gardien de l'Ombre",collectArtifacts:"Collecter 3 artefacts anciens",solveRiddle:"Résoudre l'énigme du sphinx",scanLocations:"Scanner 10 emplacements",interviewNPCs:"Interviewer 5 PNJ",uploadArchive:"Téléverser vers l'archive",deadline:"Échéance",deadlineToday:"Échéance : Aujourd'hui",deadlineTomorrow:"Échéance : Demain",deadlineTonight:"Échéance : Ce soir",deadlineYesterday:"Échéance : Hier",daysAgo:"jours",days:"jours",week:"semaine",weeks:"semaines",month:"mois",months:"mois",years:"ans"},character:{title:"Cartes de personnage",vertical:"Disposition verticale (défaut)",horizontal:"Disposition horizontale",daraName:"Dara",daraSubtitle:"Archiviste Jedi",daraQuote:"L'obscurité n'est pas à craindre - elle doit être archivée.",cipherName:"Cipher",cipherSubtitle:"Netrunner",cipherQuote:"Le code est la clé de tout.",shadowName:"Ombre",shadowSubtitle:"Chasseur nocturne",shadowQuote:"Je me déplace dans l'obscurité là où ils ne peuvent pas voir.",force:"Force",combat:"Combat",intelligence:"Intelligence",wisdom:"Sagesse",hacking:"Piratage",stealth:"Furtivité",agility:"Agilité",strength:"Force",speciesHumanCyborg:"Humain/Cyborg",speciesCyborg:"Cyborg",speciesVampire:"Vampire",affiliationJedi:"Ordre Jedi",affiliationNetwatch:"Netwatch",affiliationNightCouncil:"Conseil de la Nuit",traitMbtiIntj:"MBTI : INTJ",traitMbtiIntp:"MBTI : INTP",traitMbtiIstp:"MBTI : ISTP",traitHumanCyborg:"Humain/Cyborg",traitCyborg:"Cyborg",traitVampire:"Vampire"},statsWidget:{title:"Widget de statistiques",radialVariant:"Variante radiale",barVariant:"Variante à barres",horizontalLayout:"Disposition horizontale",forceStats:"STATS DE LA FORCE",characterStats:"STATS DU PERSONNAGE",progress:"PROGRÈS",skills:"COMPÉTENCES",battleStats:"STATS DE COMBAT",skillProgress:"PROGRÈS DES COMPÉTENCES",health:"Santé",mana:"Mana",stamina:"Endurance",level:"Niveau",endurance:"Endurance",luck:"Chance",statsSuffix:"stats"},themeChanger:{title:"Changeur de thème",default:"Défaut",iconOnly:"Icône uniquement",fixedWidth:"Largeur fixe (160px)",small:"Petit",smallIconOnly:"Petit icône uniquement",customThemes:"Thèmes personnalisés",demo:"Démo",themeChangerDesc:"Changeur de thème avec détection automatique, mode icône uniquement et support de largeur fixe. Passez iconOnly pour une utilisation compacte dans la barre de navigation, ou fixedWidth pour une taille cohérente."},languageChanger:{title:"Changeur de langue",default:"Défaut",iconOnly:"Icône uniquement",fixedWidth:"Largeur fixe (160px)",small:"Petit",smallIconOnly:"Petit icône uniquement",customLanguages:"Langues personnalisées",demo:"Démo",languageChangerDesc:"Changeur de langue avec persistance localStorage, mode icône uniquement et support de largeur fixe. Passez iconOnly pour une utilisation compacte dans la barre de navigation, ou fixedWidth pour une taille cohérente. La langue est persistée via localStorage et met à jour les attributs lang et dir sur l'élément html."},gradients:{title:"Dégradés",primary:"Primaire",accent:"Accent",success:"Succès",danger:"Danger"},effects:{title:"Effets",glassEffect:"Effet verre",glowPrimary:"Lueur violette",glowAccent:"Lueur rose"},typography:{title:"Typographie",textSecondary:"Texte secondaire",regularBody:"Texte corporel régulier avec la police Inter",gradientHeading:"Titre dégradé",accentText:"Texte coloré accentué",codeExample:'console.log("Code avec JetBrains Mono");'},persian:{title:"Support persan",persianText:"Ce texte est affiché avec la police Vazirmatn",persianHeading:"Titre persan avec la police Kook",persianDesc:"Texte persan en petit format et couleur secondaire"},checkbox:{title:"Case à cocher",basic:"Cases à cocher de base",sizes:"Tailles",states:"États",rtlSupport:"Support RTL",controlled:"Contrôlée",group:"Exemple de groupe",unchecked:"Décoché",checked:"Coché",glowChecked:"Lueur lorsqu'elle est cochée",small:"Petit",medium:"Moyen",large:"Grand",normal:"Normal",error:"État d'erreur",disabled:"Désactivé",disabledChecked:"Désactivé coché",rtlLabel1:"Accepter les conditions",rtlLabel2:"Confirmer les informations",rtlLabel3:"Activer le mode nuit",rtlNote:"Mode RTL - l'étiquette apparaît à droite",controlledLabel:"Case à cocher contrôlée",status:"Statut",check:"Cocher",uncheck:"Décocher",groupLabel:"Sélectionnez vos préférences :",groupOption1:"Activer les notifications",groupOption2:"Mode sombre",groupOption3:"Sauvegarde automatique",selectedCount:"Sélectionné"},switch:{title:"Interrupteur",basic:"Interrupteurs de base",sizes:"Tailles",states:"États",rtlSupport:"Support RTL",controlled:"Contrôlé",group:"Exemple de groupe",off:"Désactivé",on:"Activé",glowOn:"Lueur lorsqu'activé",small:"Petit",medium:"Moyen",large:"Grand",normal:"Normal",disabledOff:"Désactivé éteint",disabledOn:"Désactivé allumé",rtlLabel1:"Activer le mode nuit",rtlLabel2:"Activer les notifications",rtlLabel3:"Mode automatique",rtlNote:"Mode RTL - l'étiquette reste en haut, l'interrupteur s'adapte",controlledLabel:"Interrupteur contrôlé",status:"Statut",turnOn:"Allumer",turnOff:"Éteindre",groupLabel:"Paramètres :",groupOption1:"Activer les notifications",groupOption2:"Mode sombre",groupOption3:"Sauvegarde automatique",enabledCount:"Activé",withIcons:"Avec icônes",notifications:"Notifications",darkMode:"Mode sombre",sound:"Son"},radio:{title:"Radio",basic:"Radios de base",sizes:"Tailles",states:"États",rtlSupport:"Support RTL",controlled:"Contrôlé",group:"Exemple de groupe",unselected:"Désélectionné",selected:"Sélectionné",glowSelected:"Lueur lorsqu'elle est sélectionnée",small:"Petit",medium:"Moyen",large:"Grand",normal:"Normal",error:"État d'erreur",disabled:"Désactivé",disabledChecked:"Désactivé sélectionné",rtlLabel1:"Accepter les conditions",rtlLabel2:"Confirmer les informations",rtlLabel3:"Activer le mode nuit",rtlNote:"Mode RTL - l'étiquette apparaît à droite",controlledLabel:"Radio contrôlée",status:"Statut",select:"Sélectionner",deselect:"Désélectionner",groupLabel:"Sélectionnez votre préférence :",groupOption1:"Activer les notifications",groupOption2:"Mode sombre",groupOption3:"Sauvegarde automatique",horizontalGroup:"Groupe horizontal",nightfall:"Nuit",daylight:"Jour",dracula:"Dracula"},range:{title:"Curseur de plage",basic:"Curseurs de base",colors:"Variantes de couleurs",sizes:"Tailles",customUnits:"Unités personnalisées",valuePositions:"Positions des valeurs",sparkleAtMax:"Étincelle au maximum",withoutGlow:"Sans lueur",controlled:"Mode contrôlé",volume:"Volume",brightness:"Luminosité",contrast:"Contraste",primary:"Primaire",secondary:"Secondaire",accent:"Accent",success:"Succès",danger:"Danger",warning:"Avertissement",small:"Petit",medium:"Moyen (défaut)",large:"Grand",pixels:"Pixels",price:"Prix",rial:"Rial (تومان)",temperature:"Température",left:"Gauche",right:"Droite (défaut)",top:"Haut",bottom:"Bas",almostMax:"Presque au maximum",atMax:"Au maximum (étincelle!)",sparkleNote:"Animation d'étincelles lors de l'atteinte de la valeur maximale",noGlow:"Sans effet de lueur",noGlow2:"Secondaire sans lueur",liveValue:"Valeur en direct",finalValue:"Valeur finale",controlledLabel:"Curseur contrôlé",set25:"Définir 25%",set75:"Définir 75%",set100:"Définir 100%",reset:"Réinitialiser"},productCard:{title:"Cartes de produit",variants:"Variantes",layouts:"Dispositions",glows:"Effets de lueur",withActions:"Avec actions rapides",responsive:"Responsive (pleine largeur sur mobile)",addToCart:"Ajouter au panier",outOfStock:"En rupture de stock",sale:"Soldes",new:"Nouveau",limited:"Édition limitée",reviews:"avis",vertical:"Vertical",horizontal:"Horizontal",compact:"Compact",primaryGlow:"Lueur Primaire",secondaryGlow:"Lueur Secondaire",accentGlow:"Lueur Accent",product1:"Cyberpunk 2077 - Édition Collector",product2:"Holocron Jedi - Édition Limitée",product3:"Manette Samouraï Neon",product4:"Fragment de données - Crypté",desc1:"Ensemble collector en édition limitée avec livre d'art, boîtier steelbook et contenu numérique exclusif.",desc2:"Réplique authentique d'holocron Jedi avec effets de lumière et son. Limité à 500 unités dans le monde.",desc3:"Manette sans fil avec éclairage RGB, boutons arrière programmables et connexion à faible latence.",desc4:"Fragment de données crypté contenant des fragments d'archives classifiés. Nécessite un niveau d'accès 5.",category1:"Jeux",category2:"Objets de collection",category3:"Accessoires",category4:"Données",tag1:"édition limitée",tag2:"collection",tag3:"exclusif",tag4:"crypté"},blogCard:{title:"Cartes de blog",variants:"Variantes",layouts:"Dispositions",glows:"Effets de lueur",responsive:"Responsive (pleine largeur sur mobile)",readMore:"Lire la suite",featured:"Article en vedette",vertical:"Vertical",horizontal:"Horizontal",primaryGlow:"Lueur Primaire",secondaryGlow:"Lueur Secondaire",accentGlow:"Lueur Accent",post1:"L'avenir du glassmorphisme dans le design UI",post2:"Construire un système de design à partir de zéro",post3:"Maîtriser les effets 3D au survol dans React",post4:"L'art de l'esthétique cyberpunk",excerpt1:"Découvrez comment le glassmorphisme évolue et pourquoi il devient l'esthétique de référence pour les interfaces modernes en 2024.",excerpt2:"Un guide complet pour construire un système de design qui s'adapte, des tokens aux composants.",excerpt3:"Apprenez à créer des effets de rotation 3D fluides pour les cartes, images et éléments interactifs.",excerpt4:"Plongez dans l'esthétique cyberpunk et son influence sur le design UI moderne.",author1:"Jane Doe",author2:"John Smith",author3:"Alex Rivers",author4:"Taylor Night",category1:"Design",category2:"Développement",category3:"React",category4:"Esthétique",tag1:"design",tag2:"tutoriel",tag3:"react",tag4:"esthétique"},scrollReveal:{title:"Révélation au défilement",subtitle:"Animez les éléments à l'entrée dans la vue",animation:"Animation",stagger:"Révélation échelonnée",allPresets:"Tous les préréglages d'animation",triggerAgain:"Re-déclencher au retour",demoTip:"Défilez vers le bas pour voir les éléments s'animer"},pageLoader:{title:"Chargeur de page",subtitle:"Superposition de chargement plein écran avec plusieurs formes",shapes:"Formes du chargeur",spinner:"Rotation",ring:"Anneau",dots:"Points",pulse:"Pulsation",bars:"Barres",withBrand:"Avec marque",withProgress:"Avec barre de progression",provider:"Démo du fournisseur",loadingArchives:"Chargement des archives...",downloading:"Téléchargement des données...",navigating:"Navigation...",fetchingData:"Récupération des données...",uploading:"Téléversement...",simulateRoute:"Simuler un changement de route",simulateFetch:"Simuler une récupération",simulateUpload:"Simuler un téléversement"}},Vt={en:Wt,fa:Gt,fr:qt},nt=({name:r,subtitle:m,quote:o,portrait:u,icon:i,mbti:n,species:L,affiliation:f,traits:M=[],stats:N=[],glow:j="primary",layout:a="vertical",className:$=""})=>{const[c,x]=t.useState({x:0,y:0}),[g,R]=t.useState(!1),S=t.useRef(null),{t:l}=ue(),v=s=>{if(!S.current)return;const w=S.current.getBoundingClientRect(),C=s.clientX-w.left,y=s.clientY-w.top,p=w.width/2,d=w.height/2,z=(y-d)/d*-8,W=(C-p)/p*8;x({x:z,y:W})},h=()=>R(!0),I=()=>{R(!1),x({x:0,y:0})},D={primary:"glow-primary",secondary:"glow-secondary",accent:"glow-accent",none:""}[j]||"",E=a==="horizontal",k=s=>{const w=Math.min(100,Math.max(0,s.value)),C=E?48:56,y=3.5,p=C/2-y/2,d=2*Math.PI*p,z=d-w/100*d,W=E?60:68,B=C+8*2,F=B/2,P=s.color==="secondary"?"var(--color-secondary)":s.color==="accent"?"var(--color-accent)":s.color==="success"?"var(--color-success)":s.color==="danger"?"var(--color-danger)":s.color==="warning"?"var(--color-warning)":"var(--color-primary)";return e.jsxs("div",{className:"flex flex-col items-center flex-shrink-0",style:{width:W},children:[e.jsx("div",{className:"relative",style:{width:C,height:C},role:"img","aria-label":`${s.label}: ${s.value}%`,children:e.jsxs("svg",{width:C,height:C,viewBox:`0 0 ${B} ${B}`,className:"block overflow-visible","aria-hidden":"true",style:{overflow:"visible"},children:[w>0&&e.jsx("circle",{cx:F,cy:F,r:p,fill:"none",stroke:P,strokeWidth:y+3,strokeDasharray:d,strokeDashoffset:z,strokeLinecap:"round",transform:`rotate(-90 ${F} ${F})`,style:{filter:"blur(4px)",opacity:.45}}),e.jsx("circle",{cx:F,cy:F,r:p,fill:"none",stroke:"var(--color-border-secondary)",strokeWidth:y}),e.jsx("circle",{cx:F,cy:F,r:p,fill:"none",stroke:P,strokeWidth:y,strokeDasharray:d,strokeDashoffset:z,strokeLinecap:"round",transform:`rotate(-90 ${F} ${F})`,style:{transition:"stroke-dashoffset 0.8s ease"}}),e.jsxs("text",{x:F,y:F,textAnchor:"middle",dominantBaseline:"central",className:"font-heading font-bold",style:{fontSize:C<52?"11px":"13px",fill:"var(--color-text-primary)"},children:[s.value,e.jsx("tspan",{style:{fontSize:C<52?"8px":"9px",fill:"var(--color-text-secondary)"},children:"%"})]})]})}),e.jsx("p",{className:"text-[9px] uppercase tracking-wider text-[var(--color-text-secondary)] font-mono mt-1.5 text-center leading-tight max-w-full",children:s.label})]})};return e.jsxs("div",{ref:S,className:`
|
|
900
900
|
glass p-6 float-card
|
|
901
901
|
relative
|
|
902
902
|
transition-all duration-300
|
|
903
|
-
${
|
|
904
|
-
${
|
|
903
|
+
${D}
|
|
904
|
+
${E?"flex flex-col md:flex-row gap-6":"flex flex-col"}
|
|
905
905
|
${$}
|
|
906
|
-
`,style:{transform:
|
|
907
|
-
${
|
|
906
|
+
`,style:{transform:g?`perspective(800px) rotateX(${c.x}deg) rotateY(${c.y}deg) scale(1.02)`:"perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",transformStyle:"preserve-3d",transition:"transform 0.2s ease-out, box-shadow 0.4s ease"},onMouseMove:v,onMouseEnter:h,onMouseLeave:I,children:[e.jsxs("div",{className:`
|
|
907
|
+
${E?"flex-shrink-0 md:w-48":"w-full"}
|
|
908
908
|
flex flex-col
|
|
909
|
-
`,style:{transform:"translateZ(20px)"},children:[e.jsxs("div",{className:"flex items-center gap-4",children:[
|
|
909
|
+
`,style:{transform:"translateZ(20px)"},children:[e.jsxs("div",{className:"flex items-center gap-4",children:[u?e.jsx(ke,{src:u,fallbackText:r,size:"lg",glow:j!=="none"?"primary":void 0,bordered:!0}):e.jsx("div",{className:`
|
|
910
910
|
flex items-center justify-center
|
|
911
911
|
w-12 h-12 rounded-full flex-shrink-0
|
|
912
912
|
bg-[var(--color-bg-tertiary)]
|
|
913
913
|
text-[var(--color-primary)]
|
|
914
914
|
border-2 border-[var(--color-border-secondary)]
|
|
915
|
-
${
|
|
916
|
-
`,"aria-hidden":"true",children:
|
|
917
|
-
${
|
|
915
|
+
${j!=="none"?"shadow-[var(--shadow-glow-primary)]":""}
|
|
916
|
+
`,"aria-hidden":"true",children:i||e.jsx(Oe,{className:"h-6 w-6"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h4",{className:"font-heading font-bold text-lg text-[var(--color-text-primary)] truncate",children:r}),m&&e.jsx("p",{className:"text-[var(--color-text-tertiary)] text-xs font-mono truncate",children:m})]})]}),o&&!E&&e.jsxs("p",{className:"text-[var(--color-text-secondary)] text-sm italic mt-4 leading-relaxed",style:{transform:"translateZ(10px)"},children:['"',o,'"']})]}),e.jsxs("div",{className:`
|
|
917
|
+
${E?"flex-1 min-w-0":"w-full mt-5"}
|
|
918
918
|
flex flex-col
|
|
919
|
-
`,style:{transform:"translateZ(15px)"},children:[
|
|
920
|
-
${
|
|
921
|
-
`,style:{transform:"translateZ(8px)"},children:[n&&e.jsxs("div",{className:`flex items-center gap-0.5 min-w-0 ${
|
|
919
|
+
`,style:{transform:"translateZ(15px)"},children:[o&&E&&e.jsxs("p",{className:"text-[var(--color-text-secondary)] text-sm italic mb-4 leading-relaxed line-clamp-2",style:{transform:"translateZ(10px)"},children:['"',o,'"']}),e.jsxs("div",{className:`
|
|
920
|
+
${E?"flex flex-wrap gap-x-2 gap-y-1.5 mb-4":"grid grid-cols-2 gap-y-2.5 mb-5"}
|
|
921
|
+
`,style:{transform:"translateZ(8px)"},children:[n&&e.jsxs("div",{className:`flex items-center gap-0.5 min-w-0 ${E?"max-w-[calc(50%-0.5rem)]":""}`,children:[e.jsxs("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-tertiary)] font-mono flex-shrink-0",children:[l("characterLabels.mbti"),":"]}),e.jsx("span",{className:"text-xs font-medium text-[var(--color-text-secondary)] truncate min-w-0",children:n})]}),L&&e.jsxs("div",{className:`flex items-center gap-0.5 min-w-0 ${E?"max-w-[calc(50%-0.5rem)]":""}`,children:[e.jsxs("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-tertiary)] font-mono flex-shrink-0",children:[l("characterLabels.species"),":"]}),e.jsx("span",{className:"text-xs font-medium text-[var(--color-text-secondary)] truncate min-w-0",children:L})]}),f&&e.jsxs("div",{className:`
|
|
922
922
|
flex items-center gap-1.5 min-w-0
|
|
923
|
-
${
|
|
924
|
-
`,children:[e.jsxs("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-tertiary)] font-mono flex-shrink-0",children:[
|
|
925
|
-
${
|
|
923
|
+
${E?"max-w-full":"col-span-2"}
|
|
924
|
+
`,children:[e.jsxs("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-tertiary)] font-mono flex-shrink-0",children:[l("characterLabels.affiliation"),":"]}),e.jsx("span",{className:"text-sm font-medium text-[var(--color-text-secondary)] truncate min-w-0",children:f})]})]}),M.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-4",style:{transform:"translateZ(5px)"},children:M.map((s,w)=>e.jsx(de,{variant:"secondary",size:"sm",outline:!0,children:s},w))}),N.length>0&&e.jsx("div",{className:`
|
|
925
|
+
${E?"flex flex-wrap gap-3 justify-start":"flex flex-wrap gap-3 justify-center"}
|
|
926
926
|
pt-4 border-t border-[var(--color-border-secondary)]
|
|
927
|
-
`,style:{transform:"translateZ(5px)"},children:
|
|
927
|
+
`,style:{transform:"translateZ(5px)"},children:N.map((s,w)=>e.jsx(t.Fragment,{children:k(s)},`${s.label}-${w}`))})]})]})};nt.displayName="CharacterCard";const it=({title:r,description:m,xp:o=0,xpLabel:u="XP",deadline:i,rank:n,requirements:L=[],glow:f="none",done:M,onComplete:N,className:j=""})=>{const{t:a}=ue(),[$,c]=t.useState(!1),[x,g]=t.useState(!1),[R,S]=t.useState(!1),[l,v]=t.useState({x:0,y:0}),[h,I]=t.useState(!1),b=t.useRef(null),[D,E]=t.useState(!1);t.useEffect(()=>{const P=()=>E(document.documentElement.dir==="rtl");P();const X=new MutationObserver(P);return X.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),()=>X.disconnect()},[]);const k=M!==void 0,s=k?M:$,w=P=>{if(!b.current)return;const X=b.current.getBoundingClientRect(),U=P.clientX-X.left,H=P.clientY-X.top,O=X.width/2,T=X.height/2,V=(H-T)/T*-8,J=(U-O)/O*8;v({x:V,y:J})},C=()=>{I(!0)},y=()=>{I(!1),v({x:0,y:0})},p=()=>{if(!i)return"";const P=new Date,X=new Date(i),U=i.toLowerCase();if(U==="tomorrow")return a("quest.deadlineTomorrow")||"Deadline: Tomorrow";if(U==="tonight")return a("quest.deadlineTonight")||"Deadline: Tonight";if(isNaN(X.getTime()))return i;const H=X.getTime()-P.getTime(),O=Math.ceil(H/(1e3*60*60*24));return O===0?a("quest.deadlineToday")||"Deadline: Today":O===1?a("quest.deadlineTomorrow")||"Deadline: Tomorrow":O===-1?a("quest.deadlineYesterday")||"Deadline: Yesterday":O<0?`${Math.abs(O)} ${a("quest.daysAgo")||"days ago"}`:O<7?`${a("quest.deadline")||"Deadline"}: ${O} ${a("quest.days")||"days"}`:O<14?`${a("quest.deadline")||"Deadline"}: 1 ${a("quest.week")||"week"}`:O<30?`${a("quest.deadline")||"Deadline"}: ${Math.floor(O/7)} ${a("quest.weeks")||"weeks"}`:O<60?`${a("quest.deadline")||"Deadline"}: 1 ${a("quest.month")||"month"}`:O<365?`${a("quest.deadline")||"Deadline"}: ${Math.floor(O/30)} ${a("quest.months")||"months"}`:`${a("quest.deadline")||"Deadline"}: ${Math.floor(O/365)} ${a("quest.years")||"years"}`},d=()=>{if(!n)return"";const P=n.toUpperCase();return P==="S"||P==="S+"?"text-[var(--color-secondary)]":P==="A"||P==="A+"?"text-[var(--color-primary)]":P==="B"||P==="B+"?"text-[var(--color-accent)]":P==="C"||P==="C+"?"text-[var(--color-warning)]":"text-[var(--color-text-secondary)]"},z=()=>{s||g(!0)},W=()=>{g(!1),k||c(!0),N==null||N(),S(!0),setTimeout(()=>{S(!1)},1500)},B={primary:"glow-primary",secondary:"glow-secondary",accent:"glow-accent",none:""}[f]||"",F=()=>{const P=[],X=["var(--color-warning)","var(--color-accent)","var(--color-accent)","var(--color-primary)","var(--color-secondary)","var(--color-success)","#ffffff"];for(let H=0;H<20;H++){const O=Math.random()*360,T=40+Math.random()*120,V=3+Math.random()*5,J=Math.random()*.3,K=.6+Math.random()*.6,Z=X[Math.floor(Math.random()*X.length)];P.push(e.jsx("div",{className:"sparkle-drop",style:{left:`${30+Math.random()*40}%`,top:`${30+Math.random()*40}%`,width:`${V}px`,height:`${V}px`,backgroundColor:Z,boxShadow:`0 0 ${V*2}px ${Z}`,animationDelay:`${J}s`,animationDuration:`${K}s`,"--tx":`${Math.cos(O*Math.PI/180)*T}px`,"--ty":`${Math.sin(O*Math.PI/180)*T}px`}},H))}return P};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{ref:b,className:`
|
|
928
928
|
glass p-6 float-card cursor-pointer relative
|
|
929
929
|
h-full flex flex-col
|
|
930
930
|
${B}
|
|
931
|
-
${
|
|
931
|
+
${s?"opacity-80":""}
|
|
932
932
|
transition-all duration-300
|
|
933
|
-
${
|
|
934
|
-
`,style:{transform:
|
|
933
|
+
${j}
|
|
934
|
+
`,style:{transform:h?`perspective(800px) rotateX(${l.x}deg) rotateY(${l.y}deg) scale(1.02)`:"perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",transformStyle:"preserve-3d",transition:"transform 0.2s ease-out"},onMouseMove:w,onMouseEnter:C,onMouseLeave:y,onClick:z,role:"button",tabIndex:0,"aria-label":`Quest: ${r}`,onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),z())},children:[R&&e.jsx("div",{className:"absolute inset-0 pointer-events-none overflow-visible z-10",children:F()}),e.jsxs("p",{className:"font-mono text-xs text-[var(--color-secondary)] uppercase tracking-wider me-7 mb-3 flex items-center gap-1",style:{transform:"translateZ(20px)"},dir:"auto",children:[e.jsx(Ae,{className:"h-3 w-3 flex-shrink-0"}),a("common.mission")]}),e.jsx("h4",{className:"font-heading text-xl font-bold mb-2 text-[var(--color-text-primary)]",style:{transform:"translateZ(25px)"},dir:"auto",children:r}),e.jsx("p",{className:"text-[var(--color-text-secondary)] text-sm mb-3 flex-grow",style:{transform:"translateZ(15px)"},dir:"auto",children:m}),e.jsxs("div",{className:"flex items-center gap-4 flex-wrap flex-row-reverse",style:{transform:"translateZ(10px)"},children:[e.jsxs("span",{className:"font-accent text-sm text-[var(--color-success)]",dir:"auto",children:["+",o," ",u]}),i&&e.jsxs("span",{className:"font-mono text-xs text-[var(--color-danger)] flex items-center gap-1",dir:"auto",children:[e.jsx(St,{className:"h-3 w-3 flex-shrink-0"}),p()]})]}),L.length>0&&e.jsxs("div",{className:"mt-3 pt-3 border-t border-[var(--color-border-secondary)]",style:{transform:"translateZ(5px)"},children:[e.jsx("p",{className:"text-xs text-[var(--color-text-tertiary)] font-mono mb-1.5",dir:"auto",children:a("common.requirements")}),e.jsx("ul",{className:"space-y-1",children:L.map((P,X)=>e.jsxs("li",{className:"text-xs text-[var(--color-text-secondary)] flex items-center gap-1.5",dir:"auto",children:[e.jsx("span",{className:"text-[var(--color-primary)]",children:"•"}),P]},X))})]}),n&&e.jsx("div",{className:`absolute top-4 ${D?"left-4":"right-4"}`,style:{transform:"translateZ(30px)"},children:e.jsx("span",{className:`
|
|
935
935
|
font-accent text-xs font-bold tracking-wider
|
|
936
936
|
px-2.5 py-1 rounded-full
|
|
937
937
|
bg-[var(--color-bg-tertiary)]/50
|
|
938
938
|
border border-[var(--color-border-primary)]
|
|
939
|
-
${
|
|
940
|
-
`,children:n.toUpperCase()})}),
|
|
939
|
+
${d()}
|
|
940
|
+
`,children:n.toUpperCase()})}),s&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-[var(--color-bg-primary)]/60 backdrop-blur-sm rounded-[var(--radius-standard)] z-20",children:e.jsxs("span",{className:"font-heading text-2xl font-bold text-[var(--color-success)] flex items-center gap-2",dir:"auto",children:[e.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),a("common.complete").toUpperCase()]})})]}),e.jsxs(Me,{isOpen:x,onClose:()=>g(!1),title:a("common.completeMission"),confirmText:a("common.complete"),cancelText:a("modal.decline"),onConfirm:W,children:[e.jsxs("p",{className:"text-[var(--color-text-secondary)] mb-2 flex items-center gap-2",dir:"auto",children:[e.jsx(Ae,{className:"h-4 w-4 text-[var(--color-primary)] flex-shrink-0"}),a("common.areYouSureComplete")]}),e.jsxs("p",{className:"font-heading font-bold text-lg text-[var(--color-text-primary)] mb-3",dir:"auto",children:['"',r,'"']}),e.jsxs("p",{className:"text-[var(--color-text-secondary)] text-sm",dir:"auto",children:[a("common.youWillEarn")," ",e.jsxs("span",{className:"text-[var(--color-success)] font-bold",children:["+",o," ",u]})," ",a("common.uponCompletion")]}),L.length>0&&e.jsxs("div",{className:"mt-3 p-3 rounded-[var(--radius-md)] bg-[var(--color-bg-tertiary)]",children:[e.jsx("p",{className:"text-xs text-[var(--color-text-tertiary)] font-mono mb-1",dir:"auto",children:a("common.requirements")}),e.jsx("ul",{className:"space-y-1",children:L.map((P,X)=>e.jsxs("li",{className:"text-xs text-[var(--color-text-secondary)] flex items-center gap-1.5",dir:"auto",children:[e.jsx(vt,{className:"h-3 w-3 text-[var(--color-success)] flex-shrink-0"}),P]},X))})]})]}),e.jsx("style",{children:`
|
|
941
941
|
.sparkle-drop {
|
|
942
942
|
position: absolute;
|
|
943
943
|
border-radius: 50%;
|
|
@@ -956,18 +956,38 @@
|
|
|
956
956
|
opacity: 0;
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
|
-
`})]})};
|
|
959
|
+
`})]})};it.displayName="QuestCard";const lt=({stats:r,variant:m="radial",title:o,glow:u="none",layout:i="vertical",className:n=""})=>{const{t:L}=ue(),[f,M]=t.useState({x:0,y:0}),[N,j]=t.useState(!1),a=t.useRef(null),$=h=>{if(!a.current)return;const I=a.current.getBoundingClientRect(),b=h.clientX-I.left,D=h.clientY-I.top,E=I.width/2,k=I.height/2,s=(D-k)/k*-6,w=(b-E)/E*6;M({x:s,y:w})},c=()=>{j(!0)},x=()=>{j(!1),M({x:0,y:0})},R={primary:"glow-primary",secondary:"glow-secondary",accent:"glow-accent",none:""}[u]||"",S=i==="horizontal",l=h=>{if(h===void 0||h===0)return null;const I=h>0,b=I?"var(--color-success)":"var(--color-danger)",D=I?"▲":"▼";return e.jsxs("span",{className:"text-xs font-mono font-medium flex-shrink-0",style:{color:b},children:[D," ",Math.abs(h),"%"]})},v=(h,I)=>{const b=h.max?h.value/h.max*100:h.value,D=h.max?`${Math.round(h.value)} / ${h.max}`:`${Math.round(h.value)}`,E=h.unit||"%";if(m==="radial"){const s=S?56:64,w=h.color||"primary";return e.jsxs("div",{className:"flex flex-col items-center flex-shrink-0",style:{width:S?80:84},children:[e.jsx(we,{variant:"radial",value:b,color:w,size:s<=56?"sm":s<=64?"md":"lg",radialSize:s,showLabel:!0}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 max-w-full",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-tertiary)] font-mono text-center leading-tight truncate min-w-0",children:h.label}),l(h.trend)]})]},I)}const k=h.color||"primary";return e.jsxs("div",{className:"flex flex-col gap-0.5 w-full",style:{transform:"translateZ(5px)"},children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-mono text-[var(--color-text-secondary)] truncate",children:h.label}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsxs("span",{className:"text-xs font-mono font-medium text-[var(--color-text-primary)]",children:[D,e.jsx("span",{className:"text-[10px] text-[var(--color-text-tertiary)]",children:E})]}),l(h.trend)]})]}),e.jsx(we,{variant:"horizontal",value:b,color:k,size:"sm",showLabel:!1,animated:!0})]},I)};return e.jsxs("div",{ref:a,className:`
|
|
960
960
|
glass p-6 float-card
|
|
961
961
|
relative
|
|
962
962
|
transition-all duration-300
|
|
963
|
-
${
|
|
964
|
-
${
|
|
963
|
+
${R}
|
|
964
|
+
${S?"flex flex-col md:flex-row gap-6":"flex flex-col"}
|
|
965
965
|
${n}
|
|
966
|
-
`,style:{transform:
|
|
967
|
-
${
|
|
966
|
+
`,style:{transform:N?`perspective(800px) rotateX(${f.x}deg) rotateY(${f.y}deg) scale(1.02)`:"perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",transformStyle:"preserve-3d",transition:"transform 0.2s ease-out, box-shadow 0.4s ease"},onMouseMove:$,onMouseEnter:c,onMouseLeave:x,children:[o&&e.jsxs("div",{className:`
|
|
967
|
+
${S?"flex-shrink-0 md:w-48":"w-full"}
|
|
968
968
|
flex items-center justify-between
|
|
969
|
-
${
|
|
970
|
-
`,style:{transform:"translateZ(20px)"},children:[e.jsx("p",{className:"font-mono text-xs text-[var(--color-primary)] uppercase tracking-wider",children:
|
|
971
|
-
${
|
|
972
|
-
${m==="radial"?
|
|
973
|
-
`,style:{transform:"translateZ(10px)"},children:r.map((g,A)=>f(g,A))})]})};it.displayName="StatsWidget";const lt=({value:r=0,max:m=5e3,level:s=1,showLabel:p=!0,customLabel:l,levelLabel:n="Level",xpLabel:M="XP",ranks:h,className:D=""})=>{const[L,S]=t.useState({x:0,y:0}),[o,$]=t.useState(!1),u=t.useRef(null),b=w=>{if(!u.current)return;const k=u.current.getBoundingClientRect(),N=w.clientX-k.left,d=w.clientY-k.top,i=k.width/2,z=k.height/2,G=(d-z)/z*-6,q=(N-i)/i*6;S({x:G,y:q})},x=()=>{$(!0)},T=()=>{$(!1),S({x:0,y:0})},j=Math.max(0,Math.min(r,m)),c=j/m*100,f=m-j,A=(()=>{if(!h||h.length===0)return null;let w=h[0];for(const k of h)j>=k.requiredXP&&(w=k);return w})(),I=(()=>{if(!h||h.length===0)return null;for(const w of h)if(j<w.requiredXP)return w;return null})(),R=I?I.requiredXP-j:null,v=w=>w.toLocaleString(),a=()=>h&&I?`${v(R||0)} ${M} to ${I.label}`:`${v(f)} ${M} to next ${n}`;return e.jsxs("div",{ref:u,className:`glass p-6 float-card ${D}`,style:{transform:o?`perspective(800px) rotateX(${L.x}deg) rotateY(${L.y}deg) scale(1.02)`:"perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",transformStyle:"preserve-3d",transition:"transform 0.2s ease-out, box-shadow 0.4s ease"},onMouseMove:b,onMouseEnter:x,onMouseLeave:T,children:[e.jsx("p",{className:"font-mono text-xs text-[var(--color-primary)] uppercase tracking-wider mb-4",style:{transform:"translateZ(20px)"},children:l||"XP Progress"}),e.jsxs("div",{className:"flex items-center justify-between mb-2",style:{transform:"translateZ(15px)"},children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"font-accent text-sm text-[var(--color-text-secondary)]",children:h&&A?e.jsxs(e.Fragment,{children:[n," ",s," · ",A.label]}):e.jsxs(e.Fragment,{children:[n," ",s]})})}),e.jsxs("span",{className:"font-mono text-xs text-[var(--color-text-tertiary)]",children:[v(j)," /"," ",v(h&&I?I.requiredXP:m)," ",M]})]}),e.jsx("div",{className:"xp-bar-track",dir:"ltr",style:{transform:"translateZ(10px)"},children:e.jsx("div",{className:"xp-bar-fill",style:{width:h&&I?`${j/I.requiredXP*100}%`:`${c}%`},role:"progressbar","aria-label":l||`${n} ${s}: ${v(j)} of ${v(h&&I?I.requiredXP:m)} ${M}`,"aria-valuenow":j,"aria-valuemin":0,"aria-valuemax":h&&I?I.requiredXP:m})}),p&&e.jsx("p",{className:"font-mono text-xs text-[var(--color-text-tertiary)] mt-2",style:{transform:"translateZ(5px)"},children:a()})]})};lt.displayName="XPBar";const Wt=["var(--color-primary)","var(--color-secondary)","var(--color-accent)","#ffffff"],qt=[.15,.5],Vt=[.5,2.5],Ht=[.1,.4],ct=t.memo(({count:r=60,colors:m=Wt,opacityRange:s=qt,sizeRange:p=Vt,speedRange:l=Ht,className:n=""})=>{const M=t.useRef(null),h=t.useRef([]),D=t.useRef(0),L=t.useRef({count:r,colors:m,opacityRange:s,sizeRange:p,speedRange:l});L.current={count:r,colors:m,opacityRange:s,sizeRange:p,speedRange:l};const S=t.useCallback(()=>{const u=M.current;u&&(u.width=window.innerWidth,u.height=window.innerHeight)},[]),o=t.useCallback(()=>{if(typeof window>"u")return L.current.colors;const u=document.documentElement;return L.current.colors.map(b=>{const x=b.trim();if(x.startsWith("var(")){const T=x.slice(4,-1).trim();return getComputedStyle(u).getPropertyValue(T).trim()||"#ffffff"}return x})},[]),$=t.useCallback(()=>{const u=M.current;if(!u)return;const{count:b,opacityRange:x,sizeRange:T,speedRange:j}=L.current,c=o(),f=[];for(let g=0;g<b;g++)f.push({x:Math.random()*u.width,y:Math.random()*u.height,size:Math.random()*(T[1]-T[0])+T[0],speedY:Math.random()*(j[1]-j[0])+j[0],speedX:(Math.random()-.5)*.2,opacity:Math.random()*(x[1]-x[0])+x[0],color:c[Math.floor(Math.random()*c.length)]});h.current=f},[o]);return t.useEffect(()=>{const u=M.current;if(!u)return;const b=u.getContext("2d");if(!b)return;S(),$();const x=()=>$(),T=new MutationObserver(x);T.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const j=()=>{b.clearRect(0,0,u.width,u.height),h.current.forEach(f=>{f.y+=f.speedY,f.x+=f.speedX,f.y>u.height+10&&(f.y=-10,f.x=Math.random()*u.width),f.x<-10&&(f.x=u.width+10),f.x>u.width+10&&(f.x=-10),b.beginPath(),b.arc(f.x,f.y,f.size,0,Math.PI*2),b.fillStyle=f.color,b.globalAlpha=f.opacity,b.fill(),b.globalAlpha=1}),D.current=requestAnimationFrame(j)};j();const c=()=>{S(),$()};return window.addEventListener("resize",c),()=>{cancelAnimationFrame(D.current),window.removeEventListener("resize",c),T.disconnect()}},[r,S,$]),e.jsx("canvas",{ref:M,className:`fixed inset-0 z-0 pointer-events-none ${n}`})});ct.displayName="Particles";const dt=({colors:r=["color-mix(in srgb, var(--color-primary) 25%, transparent)","color-mix(in srgb, var(--color-secondary) 20%, transparent)","color-mix(in srgb, var(--color-accent) 18%, transparent)"],sizes:m=[500,400,350],className:s=""})=>{const p=[{top:"-150px",left:"-100px",animDuration:"20s"},{top:"50%",right:"-120px",animDuration:"25s",animDirection:"reverse"},{bottom:"-100px",left:"30%",animDuration:"22s"}];return e.jsx("div",{className:`fixed inset-0 z-0 pointer-events-none overflow-hidden ${s}`,children:p.map((l,n)=>e.jsx("div",{className:"aurora-blob absolute rounded-full blur-[120px] opacity-35",style:{width:m[n],height:m[n],background:r[n],top:l.top,left:l.left,right:l.right,bottom:l.bottom,animationDuration:l.animDuration,animationDirection:l.animDirection,animationName:"drift",animationIterationCount:"infinite",animationTimingFunction:"ease-in-out"}},n))})};dt.displayName="AuroraBlobs";const ut=({size:r=280,colors:m=["var(--color-primary)","var(--color-secondary)","var(--color-accent)","var(--color-primary)"],blur:s=60,opacity:p=.5,duration:l=15,className:n=""})=>{const M=`conic-gradient(from 0deg, ${m.join(", ")})`;return e.jsx("div",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none ${n}`,style:{width:r,height:r,borderRadius:"50%",background:M,filter:`blur(${s}px)`,opacity:p,animation:`spin ${l}s linear infinite`,zIndex:-1}})};ut.displayName="GradientRing";const mt=({opacity:r=.035,className:m=""})=>e.jsx("div",{className:`fixed inset-0 pointer-events-none z-[9998] ${m}`,style:{opacity:r,backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`,backgroundSize:"200px 200px"}});mt.displayName="NoiseOverlay";function Ft(r="ltr"){const[m,s]=t.useState(r);t.useEffect(()=>{document.documentElement.dir=m,document.documentElement.lang=m==="rtl"?"fa":"en"},[m]);const p=t.useCallback(()=>{s(n=>n==="ltr"?"rtl":"ltr")},[]),l=t.useCallback(n=>{s(n)},[]);return{direction:m,setDirection:l,toggleDirection:p}}const Yt="0.1.0";exports.Accordion=We;exports.AuroraBlobs=dt;exports.Avatar=ke;exports.Badge=de;exports.BlogCard=tt;exports.Button=xe;exports.Card=Oe;exports.CharacterCard=st;exports.Checkbox=Ve;exports.Dropdown=qe;exports.GradientRing=ut;exports.I18nProvider=Tt;exports.Input=he;exports.LanguageChanger=_e;exports.Modal=Me;exports.Navbar=Ue;exports.NoiseOverlay=mt;exports.Particles=ct;exports.ProductCard=et;exports.Progress=we;exports.QuestCard=nt;exports.Radio=Fe;exports.Range=Ye;exports.Sidebar=Qe;exports.SocialMedia=Je;exports.StatsWidget=it;exports.Switch=He;exports.Tabs=Ge;exports.ThemeChanger=at;exports.ThemeProvider=At;exports.Toast=Ie;exports.ToastContainer=Ee;exports.ToastProvider=Rt;exports.Tooltip=Ke;exports.XPBar=lt;exports.translations=Gt;exports.useDirection=Ft;exports.useI18n=ue;exports.useToast=Dt;exports.version=Yt;
|
|
969
|
+
${S?"md:flex-col md:items-start md:justify-start":"mb-4"}
|
|
970
|
+
`,style:{transform:"translateZ(20px)"},children:[e.jsx("p",{className:"font-mono text-xs text-[var(--color-primary)] uppercase tracking-wider",children:o}),S&&e.jsxs("span",{className:"text-[10px] text-[var(--color-text-tertiary)] font-mono md:mt-1",dir:"auto",children:[r.length," ",L("statsWidget.statsSuffix")]})]}),e.jsx("div",{className:`
|
|
971
|
+
${S?"flex-1 min-w-0":"w-full"}
|
|
972
|
+
${m==="radial"?S?"flex flex-wrap gap-4 justify-start":"flex flex-wrap gap-4 justify-center":"flex flex-col gap-4"}
|
|
973
|
+
`,style:{transform:"translateZ(10px)"},children:r.map((h,I)=>v(h,I))})]})};lt.displayName="StatsWidget";const ct=({value:r=0,max:m=5e3,level:o=1,showLabel:u=!0,customLabel:i,levelLabel:n="Level",xpLabel:L="XP",ranks:f,className:M=""})=>{const[N,j]=t.useState({x:0,y:0}),[a,$]=t.useState(!1),c=t.useRef(null),x=w=>{if(!c.current)return;const C=c.current.getBoundingClientRect(),y=w.clientX-C.left,p=w.clientY-C.top,d=C.width/2,z=C.height/2,W=(p-z)/z*-6,q=(y-d)/d*6;j({x:W,y:q})},g=()=>{$(!0)},R=()=>{$(!1),j({x:0,y:0})},S=Math.max(0,Math.min(r,m)),l=S/m*100,v=m-S,I=(()=>{if(!f||f.length===0)return null;let w=f[0];for(const C of f)S>=C.requiredXP&&(w=C);return w})(),D=(()=>{if(!f||f.length===0)return null;for(const w of f)if(S<w.requiredXP)return w;return null})(),E=D?D.requiredXP-S:null,k=w=>w.toLocaleString(),s=()=>f&&D?`${k(E||0)} ${L} to ${D.label}`:`${k(v)} ${L} to next ${n}`;return e.jsxs("div",{ref:c,className:`glass p-6 float-card ${M}`,style:{transform:a?`perspective(800px) rotateX(${N.x}deg) rotateY(${N.y}deg) scale(1.02)`:"perspective(800px) rotateX(0deg) rotateY(0deg) scale(1)",transformStyle:"preserve-3d",transition:"transform 0.2s ease-out, box-shadow 0.4s ease"},onMouseMove:x,onMouseEnter:g,onMouseLeave:R,children:[e.jsx("p",{className:"font-mono text-xs text-[var(--color-primary)] uppercase tracking-wider mb-4",style:{transform:"translateZ(20px)"},children:i||"XP Progress"}),e.jsxs("div",{className:"flex items-center justify-between mb-2",style:{transform:"translateZ(15px)"},children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"font-accent text-sm text-[var(--color-text-secondary)]",children:f&&I?e.jsxs(e.Fragment,{children:[n," ",o," · ",I.label]}):e.jsxs(e.Fragment,{children:[n," ",o]})})}),e.jsxs("span",{className:"font-mono text-xs text-[var(--color-text-tertiary)]",children:[k(S)," /"," ",k(f&&D?D.requiredXP:m)," ",L]})]}),e.jsx("div",{className:"xp-bar-track",dir:"ltr",style:{transform:"translateZ(10px)"},children:e.jsx("div",{className:"xp-bar-fill",style:{width:f&&D?`${S/D.requiredXP*100}%`:`${l}%`},role:"progressbar","aria-label":i||`${n} ${o}: ${k(S)} of ${k(f&&D?D.requiredXP:m)} ${L}`,"aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":f&&D?D.requiredXP:m})}),u&&e.jsx("p",{className:"font-mono text-xs text-[var(--color-text-tertiary)] mt-2",style:{transform:"translateZ(5px)"},children:s()})]})};ct.displayName="XPBar";const Ht=["var(--color-primary)","var(--color-secondary)","var(--color-accent)","#ffffff"],Ft=[.15,.5],Yt=[.5,2.5],Xt=[.1,.4],dt=t.memo(({count:r=60,colors:m=Ht,opacityRange:o=Ft,sizeRange:u=Yt,speedRange:i=Xt,className:n=""})=>{const L=t.useRef(null),f=t.useRef([]),M=t.useRef(0),N=t.useRef({count:r,colors:m,opacityRange:o,sizeRange:u,speedRange:i});N.current={count:r,colors:m,opacityRange:o,sizeRange:u,speedRange:i};const j=t.useCallback(()=>{const c=L.current;c&&(c.width=window.innerWidth,c.height=window.innerHeight)},[]),a=t.useCallback(()=>{if(typeof window>"u")return N.current.colors;const c=document.documentElement;return N.current.colors.map(x=>{const g=x.trim();if(g.startsWith("var(")){const R=g.slice(4,-1).trim();return getComputedStyle(c).getPropertyValue(R).trim()||"#ffffff"}return g})},[]),$=t.useCallback(()=>{const c=L.current;if(!c)return;const{count:x,opacityRange:g,sizeRange:R,speedRange:S}=N.current,l=a(),v=[];for(let h=0;h<x;h++)v.push({x:Math.random()*c.width,y:Math.random()*c.height,size:Math.random()*(R[1]-R[0])+R[0],speedY:Math.random()*(S[1]-S[0])+S[0],speedX:(Math.random()-.5)*.2,opacity:Math.random()*(g[1]-g[0])+g[0],color:l[Math.floor(Math.random()*l.length)]});f.current=v},[a]);return t.useEffect(()=>{const c=L.current;if(!c)return;const x=c.getContext("2d");if(!x)return;j(),$();const g=()=>$(),R=new MutationObserver(g);R.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const S=()=>{x.clearRect(0,0,c.width,c.height),f.current.forEach(v=>{v.y+=v.speedY,v.x+=v.speedX,v.y>c.height+10&&(v.y=-10,v.x=Math.random()*c.width),v.x<-10&&(v.x=c.width+10),v.x>c.width+10&&(v.x=-10),x.beginPath(),x.arc(v.x,v.y,v.size,0,Math.PI*2),x.fillStyle=v.color,x.globalAlpha=v.opacity,x.fill(),x.globalAlpha=1}),M.current=requestAnimationFrame(S)};S();const l=()=>{j(),$()};return window.addEventListener("resize",l),()=>{cancelAnimationFrame(M.current),window.removeEventListener("resize",l),R.disconnect()}},[r,j,$]),e.jsx("canvas",{ref:L,className:`fixed inset-0 z-0 pointer-events-none ${n}`})});dt.displayName="Particles";const ut=({colors:r=["color-mix(in srgb, var(--color-primary) 25%, transparent)","color-mix(in srgb, var(--color-secondary) 20%, transparent)","color-mix(in srgb, var(--color-accent) 18%, transparent)"],sizes:m=[500,400,350],className:o=""})=>{const u=[{top:"-150px",left:"-100px",animDuration:"20s"},{top:"50%",right:"-120px",animDuration:"25s",animDirection:"reverse"},{bottom:"-100px",left:"30%",animDuration:"22s"}];return e.jsx("div",{className:`fixed inset-0 z-0 pointer-events-none overflow-hidden ${o}`,children:u.map((i,n)=>e.jsx("div",{className:"aurora-blob absolute rounded-full blur-[120px] opacity-35",style:{width:m[n],height:m[n],background:r[n],top:i.top,left:i.left,right:i.right,bottom:i.bottom,animationDuration:i.animDuration,animationDirection:i.animDirection,animationName:"drift",animationIterationCount:"infinite",animationTimingFunction:"ease-in-out"}},n))})};ut.displayName="AuroraBlobs";const mt=({size:r=280,colors:m=["var(--color-primary)","var(--color-secondary)","var(--color-accent)","var(--color-primary)"],blur:o=60,opacity:u=.5,duration:i=15,className:n=""})=>{const L=`conic-gradient(from 0deg, ${m.join(", ")})`;return e.jsx("div",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none ${n}`,style:{width:r,height:r,borderRadius:"50%",background:L,filter:`blur(${o}px)`,opacity:u,animation:`spin ${i}s linear infinite`,zIndex:-1}})};mt.displayName="GradientRing";const pt=({opacity:r=.035,className:m=""})=>e.jsx("div",{className:`fixed inset-0 pointer-events-none z-[9998] ${m}`,style:{opacity:r,backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`,backgroundSize:"200px 200px"}});pt.displayName="NoiseOverlay";const ht=({children:r,animation:m="fade-up",delay:o=0,duration:u=600,distance:i=40,threshold:n=.15,once:L=!0,rootMargin:f="0px 0px -10% 0px",className:M=""})=>{const N=t.useRef(null),[j,a]=t.useState(!1),[$,c]=t.useState(!1),x=typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;t.useEffect(()=>{const l=N.current;if(!l)return;if(x){a(!0),c(!0);return}const v=new IntersectionObserver(h=>{h.forEach(I=>{I.isIntersecting?(a(!0),c(!0),L&&v.unobserve(I.target)):L||a(!1)})},{threshold:n,rootMargin:f});return v.observe(l),()=>v.disconnect()},[n,f,L,x]);const g=()=>{if(x)return"none";switch(m){case"fade":return"none";case"fade-up":case"slide-up":return`translateY(${i}px)`;case"fade-down":case"slide-down":return`translateY(-${i}px)`;case"fade-left":return`translateX(${i}px)`;case"fade-right":return`translateX(-${i}px)`;case"zoom-in":return"scale(0.92)";case"zoom-out":return"scale(1.08)";case"flip-up":return"perspective(1000px) rotateX(-25deg)";case"flip-down":return"perspective(1000px) rotateX(25deg)";default:return`translateY(${i}px)`}},R=j||$,S=x?{}:{opacity:R?1:0,transform:R?"none":g(),transition:`opacity ${u}ms cubic-bezier(0.4, 0, 0.2, 1) ${o}ms, transform ${u}ms cubic-bezier(0.4, 0, 0.2, 1) ${o}ms`,willChange:R?"auto":"opacity, transform"};return e.jsx("div",{ref:N,className:M,style:S,"data-scroll-reveal":m,"data-scroll-reveal-visible":R?"true":"false",children:r})};ht.displayName="ScrollReveal";function _t(r={}){const{threshold:m=.15,once:o=!0,rootMargin:u="0px 0px -10% 0px"}=r,i=t.useRef(null),[n,L]=t.useState(!1);return t.useEffect(()=>{const f=i.current;if(!f)return;if(typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){L(!0);return}const M=new IntersectionObserver(N=>{N.forEach(j=>{j.isIntersecting?(L(!0),o&&M.unobserve(j.target)):o||L(!1)})},{threshold:m,rootMargin:u});return M.observe(f),()=>M.disconnect()},[m,o,u]),{ref:i,isVisible:n}}const De=({isLoading:r=!0,shape:m="spinner",color:o="primary",customColor:u,label:i,progress:n,showProgress:L=!1,size:f="md",blur:M=!0,showBrand:N=!1,minDuration:j=0,inline:a=!1,className:$=""})=>{const[c,x]=t.useState(r),[g,R]=t.useState(!1),[S]=t.useState(Date.now()),l=u||`var(--color-${o})`;if(t.useEffect(()=>{if(a){x(r),R(r);return}let y;if(r)x(!0),y=setTimeout(()=>R(!0),20);else{const p=Date.now()-S,d=Math.max(0,j-p);y=setTimeout(()=>{R(!1),setTimeout(()=>x(!1),300)},d)}return()=>clearTimeout(y)},[r,j,S,a]),t.useEffect(()=>{if(!a)return c?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}},[c,a]),!c)return null;const h={sm:{box:32,stroke:3,dots:6,bars:20},md:{box:48,stroke:4,dots:8,bars:28},lg:{box:64,stroke:5,dots:10,bars:36}}[f],I=`drop-shadow(0 0 6px ${l}) drop-shadow(0 0 12px color-mix(in srgb, ${l} 45%, transparent))`,b=`drop-shadow(0 0 5px ${l}) drop-shadow(0 0 10px color-mix(in srgb, ${l} 40%, transparent))`,D=()=>e.jsxs("svg",{className:"animate-spin",width:h.box,height:h.box,viewBox:"0 0 50 50","aria-hidden":"true",style:{filter:I,overflow:"visible"},children:[e.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:"var(--color-border-primary)",strokeWidth:h.stroke}),e.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:l,strokeWidth:h.stroke,strokeLinecap:"round",strokeDasharray:"90 150"})]}),E=()=>e.jsx("svg",{className:"animate-spin",width:h.box,height:h.box,viewBox:"0 0 50 50","aria-hidden":"true",style:{animationDuration:"1.2s",filter:b,overflow:"visible"},children:Array.from({length:12}).map((y,p)=>{const d=p/12*360;return e.jsx("rect",{x:"24",y:"4",width:"2",height:"8",rx:"1",fill:l,opacity:.15+p/12*.85,transform:`rotate(${d} 25 25)`},p)})}),k=()=>e.jsx("div",{className:"flex items-center gap-2",style:{filter:b},children:[0,1,2].map(y=>e.jsx("span",{className:"rounded-full",style:{width:h.dots,height:h.dots,backgroundColor:l,animation:`pageLoaderDot 1.2s ease-in-out ${y*.15}s infinite`}},y))}),s=()=>e.jsxs("div",{className:"relative",style:{width:h.box,height:h.box,filter:b},children:[e.jsx("span",{className:"absolute inset-0 rounded-full",style:{backgroundColor:l,animation:"pageLoaderPulse 1.5s ease-out infinite"}}),e.jsx("span",{className:"absolute inset-0 rounded-full",style:{backgroundColor:l,animation:"pageLoaderPulse 1.5s ease-out 0.5s infinite"}}),e.jsx("span",{className:"absolute rounded-full",style:{top:"50%",left:"50%",width:h.dots*1.5,height:h.dots*1.5,backgroundColor:l,transform:"translate(-50%, -50%)"}})]}),w=()=>e.jsx("div",{className:"flex items-end gap-1.5",style:{height:h.bars,filter:b},children:[0,1,2,3,4].map(y=>e.jsx("span",{className:"rounded-full",style:{width:3,height:"100%",backgroundColor:l,animation:`pageLoaderBar 1s ease-in-out ${y*.1}s infinite`,transformOrigin:"bottom"}},y))}),C={spinner:e.jsx(D,{}),ring:e.jsx(E,{}),dots:e.jsx(k,{}),pulse:e.jsx(s,{}),bars:e.jsx(w,{})};if(a){const y=h.box+24;return e.jsxs("div",{className:`flex flex-col items-center justify-center gap-3 ${$}`,role:"status","aria-live":"polite","aria-busy":r,children:[N&&e.jsx("span",{className:"font-heading font-bold text-xl tracking-tight",style:{background:"var(--gradient-primary)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"DARA UI"}),e.jsx("div",{className:"relative flex items-center justify-center",style:{width:y,height:y},children:e.jsx("div",{className:"flex items-center justify-center",style:{opacity:r?1:0,transition:"opacity 220ms cubic-bezier(0.4, 0, 0.2, 1)",pointerEvents:r?"auto":"none"},children:C[m]})}),i&&e.jsx("p",{className:"text-xs text-[var(--color-text-secondary)] font-mono tracking-wide",children:i})]})}return e.jsxs("div",{className:`
|
|
974
|
+
fixed inset-0 z-[10000]
|
|
975
|
+
flex items-center justify-center
|
|
976
|
+
transition-opacity duration-300
|
|
977
|
+
${g?"opacity-100":"opacity-0"}
|
|
978
|
+
${M?"backdrop-blur-[12px]":""}
|
|
979
|
+
${$}
|
|
980
|
+
`,style:{background:M?"color-mix(in srgb, var(--color-bg-primary) 75%, transparent)":"var(--color-bg-primary)"},role:"status","aria-live":"polite","aria-busy":"true",children:[e.jsxs("div",{className:"flex flex-col items-center gap-5",children:[N&&e.jsx("span",{className:"font-heading font-bold text-2xl tracking-tight mb-2",style:{background:"var(--gradient-primary)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"DARA UI"}),C[m],i&&e.jsx("p",{className:"text-sm text-[var(--color-text-secondary)] font-mono tracking-wide",children:i}),L&&n!==void 0&&e.jsxs("div",{className:"w-56 flex flex-col items-center gap-2",children:[e.jsx("div",{className:"w-full h-1.5 rounded-full bg-[var(--color-bg-tertiary)] overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${Math.max(0,Math.min(100,n))}%`,backgroundColor:l,filter:b}})}),e.jsxs("span",{className:"font-mono text-xs text-[var(--color-text-tertiary)]",children:[Math.round(n),"%"]})]})]}),e.jsx("style",{children:`
|
|
981
|
+
@keyframes pageLoaderDot {
|
|
982
|
+
0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
|
|
983
|
+
40% { transform: scale(1); opacity: 1; }
|
|
984
|
+
}
|
|
985
|
+
@keyframes pageLoaderPulse {
|
|
986
|
+
0% { transform: scale(0.4); opacity: 0.7; }
|
|
987
|
+
100% { transform: scale(1.4); opacity: 0; }
|
|
988
|
+
}
|
|
989
|
+
@keyframes pageLoaderBar {
|
|
990
|
+
0%, 100% { transform: scaleY(0.3); opacity: 0.5; }
|
|
991
|
+
50% { transform: scaleY(1); opacity: 1; }
|
|
992
|
+
}
|
|
993
|
+
`})]})};De.displayName="PageLoader";const ft=t.createContext(void 0),Ut=({children:r})=>{const[m,o]=t.useState(!1),[u,i]=t.useState({}),[n,L]=t.useState(void 0),f=t.useRef(null),M=t.useCallback(c=>{f.current&&(clearTimeout(f.current),f.current=null),i(c||{}),L(c!=null&&c.showProgress?0:void 0),o(!0)},[]),N=t.useCallback(()=>{o(!1)},[]),j=t.useCallback(c=>{L(Math.max(0,Math.min(100,c)))},[]),a=t.useCallback(async(c,x)=>{M({minDuration:400,...x});try{return await c()}finally{N()}},[M,N]),$={show:M,hide:N,isLoading:m,setProgress:j,wrap:a};return e.jsxs(ft.Provider,{value:$,children:[r,e.jsx(De,{isLoading:m,shape:u.shape,label:u.label,progress:n,showProgress:u.showProgress,showBrand:u.showBrand,minDuration:u.minDuration})]})},Qt=()=>{const r=t.useContext(ft);if(!r)throw new Error("usePageLoader must be used within a PageLoaderProvider");return r};function Jt(r="ltr"){const[m,o]=t.useState(r);t.useEffect(()=>{document.documentElement.dir=m,document.documentElement.lang=m==="rtl"?"fa":"en"},[m]);const u=t.useCallback(()=>{o(n=>n==="ltr"?"rtl":"ltr")},[]),i=t.useCallback(n=>{o(n)},[]);return{direction:m,setDirection:i,toggleDirection:u}}const Zt="0.1.0";exports.Accordion=qe;exports.AuroraBlobs=ut;exports.Avatar=ke;exports.Badge=de;exports.BlogCard=rt;exports.Button=fe;exports.Card=We;exports.CharacterCard=nt;exports.Checkbox=He;exports.Dropdown=Ve;exports.GradientRing=mt;exports.I18nProvider=Dt;exports.Input=he;exports.LanguageChanger=Ue;exports.Modal=Me;exports.Navbar=Qe;exports.NoiseOverlay=pt;exports.PageLoader=De;exports.PageLoaderProvider=Ut;exports.Particles=dt;exports.ProductCard=tt;exports.Progress=we;exports.QuestCard=it;exports.Radio=Ye;exports.Range=Xe;exports.ScrollReveal=ht;exports.Sidebar=Je;exports.SocialMedia=Ze;exports.StatsWidget=lt;exports.Switch=Fe;exports.Tabs=Ge;exports.ThemeChanger=st;exports.ThemeProvider=Bt;exports.Toast=Re;exports.ToastContainer=Ie;exports.ToastProvider=Pt;exports.Tooltip=et;exports.XPBar=ct;exports.translations=Vt;exports.useDirection=Jt;exports.useI18n=ue;exports.usePageLoader=Qt;exports.useScrollReveal=_t;exports.useToast=zt;exports.version=Zt;
|