Files
igny8/frontend/dist/assets/js/page-components.tsx-DYfg5dka.js
Gitea Deploy 961362e088 Add SEO fields to Tasks model, improve content generation response handling, and enhance progress bar animation
- Added primary_keyword, secondary_keywords, tags, and categories fields to Tasks model
- Updated generate_content function to handle full JSON response with all SEO fields
- Improved progress bar animation: smooth 1% increments every 300ms
- Enhanced step detection for content generation vs clustering vs ideas
- Fixed progress modal to show correct messages for each function type
- Added comprehensive logging to Keywords and Tasks pages for AI functions
- Fixed error handling to show meaningful error messages instead of generic failures
2025-11-09 21:22:34 +00:00

2 lines
38 KiB
JavaScript

import{r as c,j as e,a as B}from"./vendor-react-core-DjsjKnCi.js";import{B as y}from"./page-authpages-CY7hjDHU.js";import{L as $}from"./vendor-react-router-BJY_70Cr.js";import{P as I}from"./page-analytics.tsx-1KCk8AGD.js";const w=({isOpen:r,onClose:t,children:i,className:s="",anchorRef:d,placement:a="right"})=>{const g=c.useRef(null),[m,h]=c.useState({top:0,left:0}),x=c.useCallback(()=>{if(!r||!(d!=null&&d.current)||!g.current)return;const n=d.current.getBoundingClientRect(),u=g.current.getBoundingClientRect();let o=n.bottom+8,l=n.left,b=u.width;if(!b||b===0){const C=s.match(/w-(\d+)/);C?b=parseInt(C[1],10)*4:b=192}a==="right"||a==="bottom-right"?l=n.right-b:l=n.left;const v=window.innerWidth,D=window.innerHeight,N=u.height||200;l+b>v&&(l=n.left-b),n.bottom+N>D&&(o=n.top-N-8),l<0&&(l=8),h({top:o,left:l})},[r,d,a]);if(c.useEffect(()=>{if(r&&(d!=null&&d.current)){const n=()=>x();window.addEventListener("scroll",n,!0),window.addEventListener("resize",n);let u;const o=requestAnimationFrame(()=>{x(),u=requestAnimationFrame(()=>{x()})});return()=>{window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n),cancelAnimationFrame(o),u!==void 0&&cancelAnimationFrame(u)}}},[r,d,a,x]),c.useEffect(()=>{const n=u=>{g.current&&!g.current.contains(u.target)&&!u.target.closest(".dropdown-toggle")&&t()};return r&&document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[r,t]),!r)return null;const p=e.jsx("div",{ref:g,className:`fixed z-[999999] rounded-xl border border-gray-200 bg-white shadow-theme-lg dark:border-gray-800 dark:bg-gray-dark ${s}`,style:{top:`${m.top}px`,left:`${m.left}px`},children:i});return B.createPortal(p,document.body)},f=({tag:r="button",to:t,onClick:i,onItemClick:s,baseClassName:d="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900",className:a="",children:g})=>{const m=`${d} ${a}`.trim(),h=x=>{r==="button"&&x.preventDefault(),i&&i(),s&&s()};return r==="a"&&t?e.jsx($,{to:t,className:m,onClick:h,children:g}):e.jsx("button",{onClick:h,className:m,children:g})},j=({isOpen:r,onClose:t,children:i,className:s,showCloseButton:d=!0,isFullscreen:a=!1})=>{const g=c.useRef(null);if(c.useEffect(()=>{const h=x=>{x.key==="Escape"&&t()};return r&&document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[r,t]),c.useEffect(()=>(r?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[r]),!r)return null;const m=a?"w-full h-full":"relative w-full rounded-3xl bg-white dark:bg-gray-900";return e.jsxs("div",{className:"fixed inset-0 flex items-center justify-center overflow-y-auto modal z-99999",children:[!a&&e.jsx("div",{className:"fixed inset-0 h-full w-full bg-gray-400/50 backdrop-blur-[32px]",onClick:t}),e.jsxs("div",{ref:g,className:`${m} ${s}`,onClick:h=>h.stopPropagation(),children:[d&&e.jsx("button",{onClick:t,className:"absolute right-3 top-3 z-999 flex h-9.5 w-9.5 items-center justify-center rounded-full bg-gray-100 text-gray-400 transition-colors hover:bg-gray-200 hover:text-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white sm:right-6 sm:top-6 sm:h-11 sm:w-11",children:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.04289 16.5413C5.65237 16.9318 5.65237 17.565 6.04289 17.9555C6.43342 18.346 7.06658 18.346 7.45711 17.9555L11.9987 13.4139L16.5408 17.956C16.9313 18.3466 17.5645 18.3466 17.955 17.956C18.3455 17.5655 18.3455 16.9323 17.955 16.5418L13.4129 11.9997L17.955 7.4576C18.3455 7.06707 18.3455 6.43391 17.955 6.04338C17.5645 5.65286 16.9313 5.65286 16.5408 6.04338L11.9987 10.5855L7.45711 6.0439C7.06658 5.65338 6.43342 5.65338 6.04289 6.0439C5.65237 6.43442 5.65237 7.06759 6.04289 7.45811L10.5845 11.9997L6.04289 16.5413Z",fill:"currentColor"})})}),e.jsx("div",{children:i})]})]})};function A({isOpen:r,onClose:t,title:i,message:s,variant:d="info",buttonText:a="Okay, Got It",isConfirmation:g=!1,onConfirm:m,confirmText:h="Okay, Got It",cancelText:x="Cancel",isLoading:p=!1,itemsList:n=[]}){const u={success:e.jsxs("div",{className:"relative flex items-center justify-center w-24 h-24 mx-auto mb-6",children:[e.jsx("div",{className:"absolute inset-0 bg-success-100 rounded-full",style:{clipPath:"polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)",width:"80px",height:"80px"}}),e.jsx("div",{className:"relative bg-success-600 rounded-full w-16 h-16 flex items-center justify-center",children:e.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",strokeWidth:3,viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})})]}),info:e.jsxs("div",{className:"relative flex items-center justify-center w-24 h-24 mx-auto mb-6",children:[e.jsx("div",{className:"absolute inset-0 bg-blue-light-100 rounded-full blur-2xl opacity-50",style:{width:"90px",height:"90px",transform:"scale(1.1)"}}),e.jsx("div",{className:"relative bg-blue-light-500 rounded-full w-16 h-16 flex items-center justify-center shadow-lg",children:e.jsx("span",{className:"text-white text-4xl font-bold leading-none",children:"i"})})]}),warning:e.jsxs("div",{className:"relative flex items-center justify-center w-24 h-24 mx-auto mb-6",children:[e.jsx("div",{className:"absolute inset-0 bg-warning-100 rounded-full blur-2xl opacity-50",style:{width:"90px",height:"90px",transform:"scale(1.1)"}}),e.jsx("div",{className:"relative bg-white rounded-full w-14 h-14 flex items-center justify-center shadow-lg",children:e.jsx("div",{className:"bg-warning-500 rounded-full w-16 h-16 flex items-center justify-center absolute -inset-1",children:e.jsx("span",{className:"text-white text-4xl font-bold leading-none",children:"!"})})})]}),danger:e.jsxs("div",{className:"relative flex items-center justify-center w-24 h-24 mx-auto mb-6",children:[e.jsx("div",{className:"absolute inset-0 bg-error-100 rounded-full blur-2xl opacity-50",style:{width:"90px",height:"90px",transform:"scale(1.1)"}}),e.jsx("div",{className:"relative bg-error-100 rounded-full w-16 h-16 flex items-center justify-center",children:e.jsx("svg",{className:"w-10 h-10 text-error-500",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{fillRule:"evenodd",d:"M18.364 5.636a1 1 0 010 1.414L13.414 12l4.95 4.95a1 1 0 11-1.414 1.414L12 13.414l-4.95 4.95a1 1 0 01-1.414-1.414L10.586 12 5.636 7.05a1 1 0 011.414-1.414L12 10.586l4.95-4.95a1 1 0 011.414 0z",clipRule:"evenodd"})})})]})},o={success:"bg-success-500 hover:bg-success-600 text-white",info:"bg-blue-light-500 hover:bg-blue-light-600 text-white",warning:"bg-warning-500 hover:bg-warning-600 text-white",danger:"bg-error-500 hover:bg-error-600 text-white"};return e.jsx(j,{isOpen:r,onClose:t,className:"max-w-md",children:e.jsxs("div",{className:"px-8 py-10 text-center",children:[u[d],e.jsx("h2",{className:"text-2xl font-bold text-gray-800 dark:text-white mb-4",children:i}),n.length>0&&e.jsx("div",{className:"mb-6",children:e.jsxs("ul",{className:"text-left text-gray-700 dark:text-gray-300 text-sm space-y-1 max-w-md mx-auto",children:[n.slice(0,5).map((l,b)=>e.jsxs("li",{className:"italic",children:["• ",l]},b)),n.length>5&&e.jsxs("li",{className:"text-gray-500 dark:text-gray-400 italic",children:["... and ",n.length-5," more"]})]})}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-8 text-sm leading-relaxed",children:s}),g?e.jsxs("div",{className:"flex justify-center gap-3",children:[e.jsx("button",{onClick:t,disabled:p,className:"px-6 py-3 rounded-lg font-medium text-sm transition-colors shadow-sm bg-gray-200 hover:bg-gray-300 text-gray-700 dark:bg-gray-700 dark:hover:bg-gray-600 dark:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",children:x}),e.jsx("button",{onClick:m,disabled:p,className:`px-6 py-3 rounded-lg font-medium text-sm transition-colors shadow-sm ${o[d]} disabled:opacity-50 disabled:cursor-not-allowed`,children:p?"Processing...":h})]}):e.jsx("div",{className:"flex justify-center",children:e.jsx("button",{onClick:t,className:`px-6 py-3 rounded-lg font-medium text-sm transition-colors shadow-sm ${o[d]}`,children:a})})]})})}const L=()=>e.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.58203 9.99868C2.58174 10.1909 2.6549 10.3833 2.80152 10.53L7.79818 15.5301C8.09097 15.8231 8.56584 15.8233 8.85883 15.5305C9.15183 15.2377 9.152 14.7629 8.85921 14.4699L5.13911 10.7472L16.6665 10.7472C17.0807 10.7472 17.4165 10.4114 17.4165 9.99715C17.4165 9.58294 17.0807 9.24715 16.6665 9.24715L5.14456 9.24715L8.85919 5.53016C9.15199 5.23717 9.15184 4.7623 8.85885 4.4695C8.56587 4.1767 8.09099 4.17685 7.79819 4.46984L2.84069 9.43049C2.68224 9.568 2.58203 9.77087 2.58203 9.99715C2.58203 9.99766 2.58203 9.99817 2.58203 9.99868Z",fill:""})}),M=()=>e.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.4165 9.9986C17.4168 10.1909 17.3437 10.3832 17.197 10.53L12.2004 15.5301C11.9076 15.8231 11.4327 15.8233 11.1397 15.5305C10.8467 15.2377 10.8465 14.7629 11.1393 14.4699L14.8594 10.7472L3.33203 10.7472C2.91782 10.7472 2.58203 10.4114 2.58203 9.99715C2.58203 9.58294 2.91782 9.24715 3.33203 9.24715L14.854 9.24715L11.1393 5.53016C10.8465 5.23717 10.8467 4.7623 11.1397 4.4695C11.4327 4.1767 11.9075 4.17685 12.2003 4.46984L17.1578 9.43049C17.3163 9.568 17.4165 9.77087 17.4165 9.99715C17.4165 9.99763 17.4165 9.99812 17.4165 9.9986Z",fill:""})}),k=({currentPage:r,totalPages:t,onPageChange:i,variant:s="text",className:d="",showPageInfo:a=!0})=>{const m=(()=>{const o=[];if(t<=7)for(let l=1;l<=t;l++)o.push(l);else if(r<=3){for(let l=1;l<=5;l++)o.push(l);o.push("..."),o.push(t)}else if(r>=t-2){o.push(1),o.push("...");for(let l=t-4;l<=t;l++)o.push(l)}else{o.push(1),o.push("...");for(let l=r-1;l<=r+1;l++)o.push(l);o.push("..."),o.push(t)}return o})(),h=r===1,x=r===t,p="rounded-lg border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-700 shadow-theme-xs hover:bg-gray-50 hover:text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-white/[0.03] dark:hover:text-gray-200 sm:px-3.5 sm:py-2.5 disabled:opacity-50 disabled:cursor-not-allowed",n=s==="icon"?`${p} flex items-center gap-2 p-2 sm:p-2.5`:`${p} flex items-center gap-2`,u=n;return e.jsxs("div",{className:`flex items-center justify-between gap-2 px-6 py-4 sm:justify-normal ${d}`,children:[e.jsxs("button",{className:n,onClick:()=>!h&&i(r-1),disabled:h,type:"button",children:[(s==="text"||s==="text-icon")&&e.jsx("span",{className:"inline sm:hidden",children:e.jsx(L,{})}),(s==="text-icon"||s==="icon")&&e.jsx(L,{}),(s==="text"||s==="text-icon")&&e.jsx("span",{className:"hidden sm:inline",children:s==="text-icon"?" Previous ":"Previous"})]}),a&&e.jsxs("span",{className:"block text-sm font-medium text-gray-700 dark:text-gray-400 sm:hidden",children:["Page ",r," of ",t]}),e.jsx("ul",{className:"hidden items-center gap-0.5 sm:flex",children:m.map((o,l)=>{if(o==="...")return e.jsx("li",{children:e.jsx("span",{className:"flex items-center justify-center w-10 h-10 text-sm font-medium text-gray-700 dark:text-gray-400",children:"..."})},`ellipsis-${l}`);const b=o,v=b===r;return e.jsx("li",{children:e.jsx("button",{className:`flex items-center justify-center w-10 h-10 text-sm font-medium rounded-lg ${v?"text-white bg-brand-500 hover:bg-brand-600":"text-gray-700 hover:bg-brand-500 hover:text-white dark:text-gray-400 dark:hover:text-white"}`,onClick:()=>i(b),type:"button",children:b})},b)})}),e.jsxs("button",{className:u,onClick:()=>!x&&i(r+1),disabled:x,type:"button",children:[(s==="text"||s==="text-icon")&&e.jsx("span",{className:"hidden sm:inline",children:s==="text-icon"?" Next ":"Next"}),(s==="text-icon"||s==="icon")&&e.jsx(M,{}),(s==="text"||s==="text-icon")&&e.jsx("span",{className:"inline sm:hidden",children:e.jsx(M,{})})]})]})},S=({children:r,className:t="",onClick:i})=>e.jsx("div",{className:`rounded-xl border border-gray-200 bg-white p-5 dark:border-gray-800 dark:bg-white/[0.03] sm:p-6 ${t}`,onClick:i,children:r}),T=({children:r,className:t=""})=>e.jsx("h4",{className:`mb-1 font-medium text-gray-800 text-theme-xl dark:text-white/90 ${t}`,children:r}),R=({children:r,className:t=""})=>e.jsx("p",{className:`text-sm text-gray-500 dark:text-gray-400 ${t}`,children:r}),E=({children:r,href:t,onClick:i,variant:s="button",className:d=""})=>{const a=s==="button"?"inline-flex items-center gap-2 px-4 py-3 mt-4 text-sm font-medium text-white rounded-lg bg-brand-500 shadow-theme-xs hover:bg-brand-600":"inline-flex items-center gap-1 mt-4 text-sm text-brand-500 hover:text-brand-600";return t?e.jsx("a",{href:t,className:`${a} ${d}`,onClick:i,children:r}):e.jsx("button",{className:`${a} ${d}`,onClick:i,type:"button",children:r})},z=({children:r,className:t=""})=>e.jsx("div",{className:`mb-5 flex h-14 max-w-14 items-center justify-center rounded-[10.5px] bg-brand-50 text-brand-500 dark:bg-brand-500/10 ${t}`,children:r}),P=()=>{const[r,t]=c.useState("optionOne"),i=s=>r===s?"shadow-theme-xs text-gray-900 dark:text-white bg-white dark:bg-gray-800":"text-gray-500 dark:text-gray-400";return e.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg bg-gray-100 p-0.5 dark:bg-gray-900",children:[e.jsx("button",{onClick:()=>t("optionOne"),className:`px-3 py-2 font-medium w-full rounded-md text-theme-sm hover:text-gray-900 dark:hover:text-white ${i("optionOne")}`,children:"Monthly"}),e.jsx("button",{onClick:()=>t("optionTwo"),className:`px-3 py-2 font-medium w-full rounded-md text-theme-sm hover:text-gray-900 dark:hover:text-white ${i("optionTwo")}`,children:"Quarterly"}),e.jsx("button",{onClick:()=>t("optionThree"),className:`px-3 py-2 font-medium w-full rounded-md text-theme-sm hover:text-gray-900 dark:hover:text-white ${i("optionThree")}`,children:"Annually"})]})};function F(){const[r,t]=c.useState({isOpen:!1,variant:"info"}),[i,s]=c.useState(!1),[d,a]=c.useState(!1),[g,m]=c.useState(!1),[h,x]=c.useState(!1),p=u=>{t({isOpen:!0,variant:u})},n={success:{title:"Well Done!",message:"Lorem ipsum dolor sit amet consectetur. Feugiat ipsum libero tempor felis risus nisi non. Quisque eu ut tempor curabitur."},info:{title:"Information Alert!",message:"Lorem ipsum dolor sit amet consectetur. Feugiat ipsum libero tempor felis risus nisi non. Quisque eu ut tempor curabitur."},warning:{title:"Warning Alert!",message:"Lorem ipsum dolor sit amet consectetur. Feugiat ipsum libero tempor felis risus nisi non. Quisque eu ut tempor curabitur."},danger:{title:"Danger Alert!",message:"Lorem ipsum dolor sit amet consectetur. Feugiat ipsum libero tempor felis risus nisi non. Quisque eu ut tempor curabitur."}};return e.jsxs(e.Fragment,{children:[e.jsx(I,{title:"React.js Components Dashboard | TailAdmin - React.js Admin Dashboard Template",description:"This is React.js Components Dashboard page for TailAdmin - React.js Tailwind CSS Admin Dashboard Template"}),e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-5 xl:grid-cols-2 xl:gap-6",children:[e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Default Modal"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsx("div",{className:"space-y-6",children:e.jsx(y,{variant:"primary",onClick:()=>s(!0),children:"Open Modal"})})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Vertically Centered Modal"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsx("div",{className:"space-y-6",children:e.jsx(y,{variant:"primary",onClick:()=>a(!0),children:"Open Modal"})})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Form In Modal"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsx("div",{className:"space-y-6",children:e.jsx(y,{variant:"primary",onClick:()=>m(!0),children:"Open Modal"})})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Full Screen Modal"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsx("div",{className:"space-y-6",children:e.jsx(y,{variant:"primary",onClick:()=>x(!0),children:"Open Modal"})})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03] xl:col-span-2",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Modal Based Alerts"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("button",{onClick:()=>p("success"),className:"px-4 py-3 text-sm font-medium text-white rounded-lg bg-success-500 shadow-theme-xs hover:bg-success-600 transition-colors",children:"Success Alert"}),e.jsx("button",{onClick:()=>p("info"),className:"px-4 py-3 text-sm font-medium text-white rounded-lg bg-blue-light-500 shadow-theme-xs hover:bg-blue-light-600 transition-colors",children:"Info Alert"}),e.jsx("button",{onClick:()=>p("warning"),className:"px-4 py-3 text-sm font-medium text-white rounded-lg bg-warning-500 shadow-theme-xs hover:bg-warning-600 transition-colors",children:"Warning Alert"}),e.jsx("button",{onClick:()=>p("danger"),className:"px-4 py-3 text-sm font-medium text-white rounded-lg bg-error-500 shadow-theme-xs hover:bg-error-600 transition-colors",children:"Danger Alert"})]})})})]})]}),e.jsx(V,{}),e.jsx(O,{}),e.jsx(H,{}),e.jsx(q,{}),e.jsx(W,{}),e.jsx(Q,{}),e.jsx(G,{}),e.jsx(_,{}),e.jsx(A,{isOpen:r.isOpen,onClose:()=>t({...r,isOpen:!1}),title:n[r.variant].title,message:n[r.variant].message,variant:r.variant}),e.jsx(j,{isOpen:i,onClose:()=>s(!1),className:"max-w-md",children:e.jsxs("div",{className:"p-6",children:[e.jsx("h2",{className:"text-xl font-bold mb-4 text-gray-800 dark:text-white",children:"Modal Heading"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque euismod est quis mauris lacinia pharetra."}),e.jsxs("div",{className:"flex justify-end gap-4",children:[e.jsx(y,{variant:"outline",onClick:()=>s(!1),children:"Close"}),e.jsx(y,{variant:"primary",onClick:()=>s(!1),children:"Save Changes"})]})]})}),e.jsx(j,{isOpen:d,onClose:()=>a(!1),className:"max-w-md",children:e.jsxs("div",{className:"p-6",children:[e.jsx("h2",{className:"text-xl font-bold mb-4 text-gray-800 dark:text-white",children:"Vertically Centered Modal"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:"This modal is centered vertically on the screen. Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),e.jsxs("div",{className:"flex justify-end gap-4",children:[e.jsx(y,{variant:"outline",onClick:()=>a(!1),children:"Close"}),e.jsx(y,{variant:"primary",onClick:()=>a(!1),children:"Save Changes"})]})]})}),e.jsx(j,{isOpen:g,onClose:()=>m(!1),className:"max-w-2xl",children:e.jsxs("div",{className:"p-6",children:[e.jsx("h2",{className:"text-xl font-bold mb-6 text-gray-800 dark:text-white",children:"Personal Information"}),e.jsxs("form",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"First Name"}),e.jsx("input",{type:"text",className:"w-full px-3 py-2 border border-gray-300 rounded-lg dark:bg-gray-800 dark:border-gray-700 dark:text-white",defaultValue:"Emirhan"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Last Name"}),e.jsx("input",{type:"text",className:"w-full px-3 py-2 border border-gray-300 rounded-lg dark:bg-gray-800 dark:border-gray-700 dark:text-white",defaultValue:"Boruch"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Email"}),e.jsx("input",{type:"email",className:"w-full px-3 py-2 border border-gray-300 rounded-lg dark:bg-gray-800 dark:border-gray-700 dark:text-white",defaultValue:"emirhanboruch55@gmail.com"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Phone"}),e.jsx("input",{type:"tel",className:"w-full px-3 py-2 border border-gray-300 rounded-lg dark:bg-gray-800 dark:border-gray-700 dark:text-white",defaultValue:"+09 363 398 46"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Bio"}),e.jsx("textarea",{rows:4,className:"w-full px-3 py-2 border border-gray-300 rounded-lg dark:bg-gray-800 dark:border-gray-700 dark:text-white",defaultValue:"Team Manager"})]}),e.jsxs("div",{className:"flex justify-end gap-4 pt-4",children:[e.jsx(y,{variant:"outline",onClick:()=>m(!1),children:"Close"}),e.jsx(y,{variant:"primary",onClick:()=>m(!1),children:"Save Changes"})]})]})]})}),e.jsx(j,{isOpen:h,onClose:()=>x(!1),className:"max-w-4xl",isFullscreen:!1,children:e.jsxs("div",{className:"p-8",children:[e.jsx("h2",{className:"text-2xl font-bold mb-4 text-gray-800 dark:text-white",children:"Full Screen Modal"}),e.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6",children:"This is a larger modal that takes up more screen space. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque euismod est quis mauris lacinia pharetra."}),e.jsxs("div",{className:"flex justify-end gap-4",children:[e.jsx(y,{variant:"outline",onClick:()=>x(!1),children:"Close"}),e.jsx(y,{variant:"primary",onClick:()=>x(!1),children:"Save Changes"})]})]})})]})]})}function V(){const[r,t]=c.useState(!1),[i,s]=c.useState(!1),[d,a]=c.useState(!1);return e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Dropdowns"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"relative inline-block",children:[e.jsx("button",{onClick:()=>t(!r),className:"dropdown-toggle inline-flex px-4 py-3 text-sm font-medium text-white rounded-lg bg-brand-500 shadow-theme-xs hover:bg-brand-600",children:"Dropdown Default"}),e.jsxs(w,{isOpen:r,onClose:()=>t(!1),className:"w-48 p-2 mt-2",children:[e.jsx(f,{onItemClick:()=>t(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:"Edit"}),e.jsx(f,{onItemClick:()=>t(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:"Delete"})]})]}),e.jsxs("div",{className:"relative inline-block",children:[e.jsx("button",{onClick:()=>s(!i),className:"dropdown-toggle inline-flex px-4 py-3 text-sm font-medium text-white rounded-lg bg-brand-500 shadow-theme-xs hover:bg-brand-600",children:"Dropdown with Divider"}),e.jsxs(w,{isOpen:i,onClose:()=>s(!1),className:"w-48 p-2 mt-2",children:[e.jsx(f,{onItemClick:()=>s(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:"Edit"}),e.jsx(f,{onItemClick:()=>s(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:"View"}),e.jsx("div",{className:"my-2 border-t border-gray-200 dark:border-gray-800"}),e.jsx(f,{onItemClick:()=>s(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:"Delete"})]})]}),e.jsxs("div",{className:"relative inline-block",children:[e.jsx("button",{onClick:()=>a(!d),className:"dropdown-toggle inline-flex px-4 py-3 text-sm font-medium text-white rounded-lg bg-brand-500 shadow-theme-xs hover:bg-brand-600",children:"Dropdown with Icon"}),e.jsxs(w,{isOpen:d,onClose:()=>a(!1),className:"w-48 p-2 mt-2",children:[e.jsxs(f,{onItemClick:()=>a(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"})}),"Edit"]}),e.jsxs(f,{onItemClick:()=>a(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-gray-700 rounded-lg text-theme-sm hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-300",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"View"]}),e.jsx("div",{className:"my-2 border-t border-gray-200 dark:border-gray-800"}),e.jsxs(f,{onItemClick:()=>a(!1),className:"flex items-center gap-3 px-3 py-2 font-medium text-red-600 rounded-lg text-theme-sm hover:bg-red-50 hover:text-red-700 dark:text-red-400 dark:hover:bg-red-900/20 dark:hover:text-red-300",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"})}),"Delete"]})]})]})]})})]})}function O(){return e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Button Groups"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"inline-flex rounded-lg border border-gray-300 bg-white shadow-theme-xs dark:border-gray-700 dark:bg-gray-800",children:[e.jsx("button",{className:"px-4 py-2 text-sm font-medium text-gray-700 rounded-l-lg hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:"Left"}),e.jsx("button",{className:"px-4 py-2 text-sm font-medium text-gray-700 border-l border-r border-gray-300 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:border-gray-700 dark:hover:bg-white/5 dark:hover:text-white",children:"Center"}),e.jsx("button",{className:"px-4 py-2 text-sm font-medium text-gray-700 rounded-r-lg hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:"Right"})]}),e.jsxs("div",{className:"inline-flex rounded-lg border border-gray-300 bg-white shadow-theme-xs dark:border-gray-700 dark:bg-gray-800",children:[e.jsx("button",{className:"p-2 text-gray-700 rounded-l-lg hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})}),e.jsx("button",{className:"p-2 text-gray-700 border-l border-r border-gray-300 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:border-gray-700 dark:hover:bg-white/5 dark:hover:text-white",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 011 1v12a1 1 0 11-2 0V4a1 1 0 011-1z",clipRule:"evenodd"})})}),e.jsx("button",{className:"p-2 text-gray-700 rounded-r-lg hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",children:e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M3 10a1 1 0 011 1h12a1 1 0 110-2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})})]})]})})]})}function H(){return e.jsxs("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Rounded Ribbon"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-gray-200 dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("span",{className:"absolute -left-px mt-3 inline-block rounded-r-full bg-brand-500 px-4 py-1.5 text-sm font-medium text-white",children:"Popular"}),e.jsx("div",{className:"p-5 pt-16",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Lorem ipsum dolor sit amet consectetur. Eget nulla suscipit arcu rutrum amet vel nec fringilla vulputate."})})]})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Filled Ribbon"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-gray-200 dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("span",{className:"absolute -left-9 -top-7 mt-3 flex h-14 w-24 -rotate-45 items-end justify-center bg-brand-500 px-4 py-1.5 text-sm font-medium text-white shadow-theme-xs",children:"New"}),e.jsx("div",{className:"p-5 pt-16",children:e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Lorem ipsum dolor sit amet consectetur. Eget nulla suscipit arcu rutrum amet vel nec fringilla vulputate."})})]})})]})]})}function q(){return e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Spinners"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[e.jsx("div",{className:"inline-flex h-10 w-10 animate-spin items-center justify-center rounded-full border-4 border-gray-200 border-t-brand-500"}),e.jsx("div",{className:"inline-flex h-6 w-6 animate-spin items-center justify-center rounded-full border-2 border-gray-200 border-t-brand-500"}),e.jsx("div",{className:"inline-flex h-16 w-16 animate-spin items-center justify-center rounded-full border-4 border-gray-200 border-t-brand-500"}),e.jsx("div",{className:"inline-flex h-10 w-10 animate-spin items-center justify-center rounded-full border-4 border-success-200 border-t-success-500"}),e.jsx("div",{className:"inline-flex h-10 w-10 animate-spin items-center justify-center rounded-full border-4 border-error-200 border-t-error-500"})]})})]})}function W(){return e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Tabs"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsx("div",{className:"space-y-6",children:e.jsx(P,{})})})]})}function Q(){return e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Tooltips"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[e.jsxs("button",{className:"relative group inline-flex px-4 py-3 text-sm font-medium text-white rounded-lg bg-brand-500 shadow-theme-xs",title:"Tooltip Top",children:["Tooltip Top",e.jsxs("span",{className:"absolute bottom-full left-1/2 mb-2 -translate-x-1/2 px-3 py-1.5 text-xs font-medium text-white bg-gray-900 rounded-lg opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity whitespace-nowrap",children:["Tooltip Top",e.jsx("span",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-1 border-4 border-transparent border-t-gray-900"})]})]}),e.jsxs("button",{className:"relative group inline-flex px-4 py-3 text-sm font-medium text-white rounded-lg bg-brand-500 shadow-theme-xs",title:"Tooltip Right",children:["Tooltip Right",e.jsxs("span",{className:"absolute left-full top-1/2 ml-2 -translate-y-1/2 px-3 py-1.5 text-xs font-medium text-white bg-gray-900 rounded-lg opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity whitespace-nowrap",children:["Tooltip Right",e.jsx("span",{className:"absolute right-full top-1/2 -translate-y-1/2 -mr-1 border-4 border-transparent border-r-gray-900"})]})]})]})})]})}function G(){const[r,t]=c.useState(1),[i,s]=c.useState(1),[d,a]=c.useState(1);return e.jsxs("div",{className:"space-y-5 sm:space-y-6",children:[e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Pagination with Text"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsx(k,{currentPage:r,totalPages:10,onPageChange:t,variant:"text"})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Pagination with Text and Icon"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsx(k,{currentPage:i,totalPages:10,onPageChange:s,variant:"text-icon"})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Pagination with Icon"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsx(k,{currentPage:d,totalPages:10,onPageChange:a,variant:"icon"})})]})]})}function _(){return e.jsxs("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Basic Card"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs(S,{children:[e.jsx(T,{children:"Card Title"}),e.jsx(R,{children:"This is a basic card with title and description."})]})})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsx("h3",{className:"text-base font-medium text-gray-800 dark:text-white/90",children:"Card with Icon"})}),e.jsx("div",{className:"p-4 border-t border-gray-100 dark:border-gray-800 sm:p-6",children:e.jsxs(S,{children:[e.jsx(z,{children:e.jsxs("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:[e.jsx("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),e.jsx("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm3 4a1 1 0 000 2h.01a1 1 0 100-2H7zm3 0a1 1 0 000 2h3a1 1 0 100-2h-3zm-3 4a1 1 0 100 2h.01a1 1 0 100-2H7zm3 0a1 1 0 100 2h3a1 1 0 100-2h-3z",clipRule:"evenodd"})]})}),e.jsx(T,{children:"Card with Icon"}),e.jsx(R,{children:"This card includes an icon at the top."}),e.jsx(E,{children:"Learn More"})]})})]})]})}const Y=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"}));export{A,S as C,w as D,j as M,k as P,f as a,T as b,R as c,z as d,E as e,Y as f};