cortex-react-components 2.4.0 → 2.5.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.
Files changed (175) hide show
  1. package/dist/chunk-2CS6P44F.mjs +4 -0
  2. package/dist/{chunk-ERJXTG6X.mjs → chunk-2GM2LPLB.mjs} +1 -1
  3. package/dist/{chunk-M7NV6EFH.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
  4. package/dist/chunk-34AVYSEY.mjs +4 -0
  5. package/dist/{chunk-MXCW6SOT.mjs → chunk-4SRUEQTP.mjs} +1 -1
  6. package/dist/{chunk-U3F45KVI.mjs → chunk-5N32XPU2.mjs} +1 -1
  7. package/dist/{chunk-A3SDGX4K.mjs → chunk-6VHK4OL7.mjs} +1 -1
  8. package/dist/{chunk-FTZRG54P.mjs → chunk-77PCUNUC.mjs} +1 -1
  9. package/dist/{chunk-7GMAMIHM.mjs → chunk-7OMPPFGG.mjs} +1 -1
  10. package/dist/chunk-A3YDFYEB.mjs +1 -0
  11. package/dist/{chunk-ECXVQZBN.mjs → chunk-ABGNIQRP.mjs} +1 -1
  12. package/dist/{chunk-GS2VFNHY.mjs → chunk-B3F6F2S4.mjs} +1 -1
  13. package/dist/{chunk-5SHZBJ5R.mjs → chunk-BQQ4V4PX.mjs} +1 -1
  14. package/dist/{chunk-ITJH72Z2.mjs → chunk-CLGBBNRB.mjs} +1 -1
  15. package/dist/{chunk-7BCUACIY.mjs → chunk-DYCG7KUN.mjs} +1 -1
  16. package/dist/{chunk-H3CJOE6S.mjs → chunk-F64CA5CH.mjs} +1 -1
  17. package/dist/{chunk-N3B3XNV3.mjs → chunk-FYQBRCQM.mjs} +1 -1
  18. package/dist/{chunk-67QPOSVV.mjs → chunk-GAZHKHGB.mjs} +1 -1
  19. package/dist/{chunk-255P6K5W.mjs → chunk-GETYSIZV.mjs} +1 -1
  20. package/dist/{chunk-XBCYPOFD.mjs → chunk-GTK2SGS5.mjs} +1 -1
  21. package/dist/{chunk-FKU4VQR6.mjs → chunk-HDKHF3EA.mjs} +1 -1
  22. package/dist/{chunk-YKG4FNS4.mjs → chunk-HKMNAXLM.mjs} +1 -1
  23. package/dist/{chunk-ISBVFNWD.mjs → chunk-IDG2O4B7.mjs} +1 -1
  24. package/dist/{chunk-SW7RYGO6.mjs → chunk-JHYWAL24.mjs} +1 -1
  25. package/dist/{chunk-I2GNNRFH.mjs → chunk-KZAYLEFB.mjs} +1 -1
  26. package/dist/chunk-LYPWYO4W.mjs +1 -0
  27. package/dist/{chunk-7EXAS7HK.mjs → chunk-MAAKU7PN.mjs} +1 -1
  28. package/dist/{chunk-FO3BUEXC.mjs → chunk-MO2B5CDW.mjs} +1 -1
  29. package/dist/{chunk-PK3OBSCB.mjs → chunk-MO4HRQEL.mjs} +1 -1
  30. package/dist/chunk-MPTT6GRI.mjs +1 -0
  31. package/dist/{chunk-2RQDJ5XT.mjs → chunk-P6OSMPUQ.mjs} +1 -1
  32. package/dist/chunk-PC6TVU7J.mjs +1 -0
  33. package/dist/{chunk-IF3425JX.mjs → chunk-PNUBVBSR.mjs} +1 -1
  34. package/dist/{chunk-LJQPLE4S.mjs → chunk-PTZT4QJW.mjs} +1 -1
  35. package/dist/{chunk-B2EJGXDG.mjs → chunk-QTILVWJA.mjs} +1 -1
  36. package/dist/{chunk-7VDNUJZC.mjs → chunk-RAGDUV7M.mjs} +1 -1
  37. package/dist/{chunk-B7AXSCTN.mjs → chunk-RRME4EHD.mjs} +1 -1
  38. package/dist/{chunk-5B6FLVPH.mjs → chunk-RVHCTANZ.mjs} +1 -1
  39. package/dist/{chunk-OTFILQXI.mjs → chunk-S4A4VHOI.mjs} +1 -1
  40. package/dist/{chunk-INPV5MBU.mjs → chunk-TK4JC5PG.mjs} +1 -1
  41. package/dist/{chunk-HKGW6JI2.mjs → chunk-U3FYDDE2.mjs} +1 -1
  42. package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
  43. package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
  44. package/dist/{chunk-5SIP7DC5.mjs → chunk-VR5WOPRD.mjs} +1 -1
  45. package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
  46. package/dist/{chunk-YOETYY5S.mjs → chunk-W7MEHF4G.mjs} +1 -1
  47. package/dist/chunk-WB2Y7HTT.mjs +1 -0
  48. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  49. package/dist/chunk-WY2CT5AT.mjs +1 -0
  50. package/dist/chunk-Z72RUYUU.mjs +1 -0
  51. package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  52. package/dist/components/Blocks/Banner.mjs +1 -1
  53. package/dist/components/Blocks/CallToAction.mjs +1 -1
  54. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  55. package/dist/components/Blocks/Content.mjs +1 -1
  56. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  57. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  58. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  59. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  60. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  61. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  62. package/dist/components/Blocks/index.mjs +1 -1
  63. package/dist/components/Cards/ContentCard.mjs +1 -1
  64. package/dist/components/Cards/FeatureCard.mjs +1 -1
  65. package/dist/components/Cards/index.mjs +1 -1
  66. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  67. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  68. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  69. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  70. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  71. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  72. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  73. package/dist/components/DigitalColleagues/Views/index.d.ts +1 -0
  74. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  75. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  76. package/dist/components/DigitalColleagues/index.js +1 -1
  77. package/dist/components/DigitalColleagues/index.mjs +1 -1
  78. package/dist/components/HeaderFooter/Header.mjs +1 -1
  79. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  80. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  81. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  82. package/dist/components/HeaderFooter/index.mjs +1 -1
  83. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  84. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  85. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  86. package/dist/components/Heros/PostHero/index.mjs +1 -1
  87. package/dist/components/Heros/RenderHero.mjs +1 -1
  88. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  89. package/dist/components/Heros/index.mjs +1 -1
  90. package/dist/components/Holidays/HolidayGrid.js +1 -1
  91. package/dist/components/Holidays/HolidayGrid.mjs +1 -1
  92. package/dist/components/Holidays/HolidayTracker.js +1 -1
  93. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  94. package/dist/components/Holidays/RequestLeave.js +1 -1
  95. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  96. package/dist/components/Holidays/index.js +1 -1
  97. package/dist/components/Holidays/index.mjs +1 -1
  98. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  99. package/dist/components/Layouts/Print.mjs +1 -1
  100. package/dist/components/Layouts/SlideShow.mjs +1 -1
  101. package/dist/components/Layouts/index.mjs +1 -1
  102. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  103. package/dist/components/Menus/SidebarRight.mjs +1 -1
  104. package/dist/components/Menus/index.mjs +1 -1
  105. package/dist/components/Other/index.mjs +1 -1
  106. package/dist/components/Payload/Card/index.mjs +1 -1
  107. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  108. package/dist/components/Payload/Media/index.mjs +1 -1
  109. package/dist/components/Payload/RichText/index.mjs +1 -1
  110. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  111. package/dist/components/Payload/index.mjs +1 -1
  112. package/dist/components/Projects/AddTaskModal.js +1 -1
  113. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  114. package/dist/components/Projects/FileView.d.ts +2 -2
  115. package/dist/components/Projects/FileView.js +2 -2
  116. package/dist/components/Projects/FileView.mjs +1 -1
  117. package/dist/components/Projects/KanbanBoardView.js +1 -1
  118. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  119. package/dist/components/Projects/PlanningView.js +1 -1
  120. package/dist/components/Projects/PlanningView.mjs +1 -1
  121. package/dist/components/Projects/ProjectPage.js +1 -1
  122. package/dist/components/Projects/ProjectPage.mjs +1 -1
  123. package/dist/components/Projects/ProjectView.d.ts +4 -4
  124. package/dist/components/Projects/ProjectView.js +1 -1
  125. package/dist/components/Projects/ProjectView.mjs +1 -1
  126. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  127. package/dist/components/Projects/TasksView.js +1 -1
  128. package/dist/components/Projects/TasksView.mjs +1 -1
  129. package/dist/components/Projects/file-list.d.ts +2 -2
  130. package/dist/components/Projects/file-list.js +1 -1
  131. package/dist/components/Projects/file-list.mjs +1 -1
  132. package/dist/components/dc-temp/index.js +1 -1
  133. package/dist/components/dc-temp/index.mjs +1 -1
  134. package/dist/components/index.js +8 -8
  135. package/dist/components/index.mjs +1 -1
  136. package/dist/components/ui/index.mjs +1 -1
  137. package/dist/components/ui/sidebar.mjs +1 -1
  138. package/dist/index.js +14 -14
  139. package/dist/index.mjs +1 -1
  140. package/dist/metafile-cjs.json +1 -1
  141. package/dist/metafile-esm.json +1 -1
  142. package/dist/pages/Blog.mjs +1 -1
  143. package/dist/pages/Documentation.mjs +1 -1
  144. package/dist/pages/IndexPage.mjs +1 -1
  145. package/dist/pages/Intranet.mjs +1 -1
  146. package/dist/pages/LandingPage.mjs +1 -1
  147. package/dist/pages/Page.mjs +1 -1
  148. package/dist/pages/Publish.mjs +1 -1
  149. package/dist/pages/Website.mjs +1 -1
  150. package/dist/sections/AboutSection.mjs +1 -1
  151. package/dist/sections/BlogDetail.mjs +1 -1
  152. package/dist/sections/BlogList.mjs +1 -1
  153. package/dist/sections/BlogListSection.mjs +1 -1
  154. package/dist/sections/ContactSection.mjs +1 -1
  155. package/dist/sections/PageSections.mjs +1 -1
  156. package/dist/sections/PricingSection.mjs +1 -1
  157. package/dist/sections/ServiceDetail.mjs +1 -1
  158. package/dist/sections/ServiceDetailSection.mjs +1 -1
  159. package/dist/sections/ServiceSection.mjs +1 -1
  160. package/dist/sections/index.mjs +1 -1
  161. package/dist/utils/BankHolidays.d.ts +1 -4
  162. package/dist/utils/BankHolidays.js +1 -1
  163. package/dist/utils/BankHolidays.mjs +1 -1
  164. package/dist/utils/DaysUtil.js +1 -1
  165. package/dist/utils/DaysUtil.mjs +1 -1
  166. package/package.json +3 -2
  167. package/dist/chunk-2VZWOBGP.mjs +0 -1
  168. package/dist/chunk-3U3PZBHQ.mjs +0 -4
  169. package/dist/chunk-5MU4KV3B.mjs +0 -1
  170. package/dist/chunk-A24EPYUY.mjs +0 -1
  171. package/dist/chunk-FV3W3WL7.mjs +0 -4
  172. package/dist/chunk-NZS3XKXU.mjs +0 -1
  173. package/dist/chunk-O4NH5Z6F.mjs +0 -1
  174. package/dist/chunk-PXPSM7OQ.mjs +0 -1
  175. package/dist/chunk-QKGEV7LG.mjs +0 -1
@@ -1 +0,0 @@
1
- import{a as u,b as v}from"./chunk-E4TE4NV6.mjs";import{a as y,c as b,d as h,g as T,i as p}from"./chunk-YFAZQYK4.mjs";import{a as x}from"./chunk-B4H6T2GP.mjs";import{a as o}from"./chunk-TVZOULLL.mjs";import{a as f,f as k,g as I,h as S,i as N}from"./chunk-3UMMMQEH.mjs";import{a as n}from"./chunk-L5JPAKPM.mjs";import{b as g}from"./chunk-ZUA4KNIR.mjs";import{useState as E,useEffect as C}from"react";import{BookOpen as B,Bug as G,Zap as V,AlertCircle as M}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";var P=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:B},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:M},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:G},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:V}],q=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],W=({isOpen:r,onClose:c,onAddTask:D,epics:A,sprints:F,defaultEpicId:d})=>{let[a,l]=E({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});C(()=>{r&&d&&l(e=>({...e,epicId:d}))},[r,d]),C(()=>{r&&l({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""})},[r]);let L=e=>{e.preventDefault(),a.title.trim()&&a.epicId&&(D({title:a.title.trim(),description:a.description.trim(),status:"todo",priority:a.priority,type:a.type,points:a.points,epicId:a.epicId,sprintId:a.sprintId==="none"?void 0:a.sprintId,assignee:a.assignee.trim()||"Unassigned"}),l({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""}),c())},s=(e,m)=>{l(w=>({...w,[e]:m}))};return t(f,{open:r,onOpenChange:c,children:i(k,{className:"sm:max-w-md",children:[t(I,{children:t(N,{children:"Add New Task"})}),i("form",{onSubmit:L,className:"space-y-4",children:[i("div",{className:"space-y-2",children:[t(o,{htmlFor:"title",children:"Task Title"}),t(n,{id:"title",value:a.title,onChange:e=>s("title",e.target.value),placeholder:"Enter task title",required:!0})]}),i("div",{className:"space-y-2",children:[t(o,{htmlFor:"description",children:"Description"}),t(x,{id:"description",value:a.description,onChange:e=>s("description",e.target.value),placeholder:"Enter task description",rows:3})]}),i("div",{className:"space-y-2",children:[t(o,{children:"Type"}),t(u,{type:"single",value:a.type,onValueChange:e=>e&&s("type",e),children:P.map(e=>{let m=e.icon;return i(v,{value:e.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[t(m,{className:"h-4 w-4"}),e.label]},e.value)})})]}),i("div",{className:"space-y-2",children:[t(o,{children:"Priority"}),t(u,{type:"single",value:a.priority,onValueChange:e=>e&&s("priority",e),children:q.map(e=>t(v,{value:e.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:e.label},e.value))})]}),i("div",{className:"space-y-2",children:[t(o,{htmlFor:"points",children:"Story Points"}),t(n,{id:"points",type:"number",min:"1",max:"100",value:a.points,onChange:e=>s("points",parseInt(e.target.value)||1),placeholder:"Enter story points",required:!0})]}),i("div",{className:"space-y-2",children:[t(o,{htmlFor:"epic",children:"Epic"}),i(y,{value:a.epicId,onValueChange:e=>s("epicId",e),children:[t(h,{children:t(b,{placeholder:"Select an epic"})}),t(T,{children:A.map(e=>t(p,{value:e.id,children:i("div",{className:"flex items-center gap-2",children:[t("div",{className:`w-3 h-3 rounded-full ${e.color}`}),e.name]})},e.id))})]})]}),i("div",{className:"space-y-2",children:[t(o,{htmlFor:"sprint",children:"Sprint (Optional)"}),i(y,{value:a.sprintId,onValueChange:e=>s("sprintId",e),children:[t(h,{children:t(b,{placeholder:"Select a sprint"})}),i(T,{children:[t(p,{value:"none",children:"No Sprint"}),F.map(e=>t(p,{value:e.id,children:i("div",{className:"flex items-center gap-2",children:[e.name,e.isActive&&t("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},e.id))]})]})]}),i("div",{className:"space-y-2",children:[t(o,{htmlFor:"assignee",children:"Assignee"}),t(n,{id:"assignee",value:a.assignee,onChange:e=>s("assignee",e.target.value),placeholder:"Enter assignee name",required:!0})]}),i(S,{children:[t(g,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),t(g,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};export{W as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{b as a}from"./chunk-ZUA4KNIR.mjs";import{motion as r}from"framer-motion";import{MoreHorizontal as v,Trash2 as p,Edit as u}from"lucide-react";import{jsx as e,jsxs as s}from"react/jsx-runtime";function x({files:t,onFileClick:d,onFileEdit:l,onFileDelete:n,showHeader:m=!0,className:c}){return s("div",{className:`rounded-3xl border overflow-hidden ${c||""}`,children:[m&&s("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[e("div",{className:"col-span-6",children:"Name"}),e("div",{className:"col-span-2",children:"Size"}),e("div",{className:"col-span-2",children:"Modified"})]}),e("div",{className:"divide-y",children:t.map(i=>s(r.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>d?.(i),children:[s("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[e("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted",children:i.icon}),e("div",{children:e("p",{className:"font-medium",children:i.name})})]}),e("div",{className:"col-span-2 text-sm md:text-base",children:i.size}),s("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[e("span",{className:"text-sm md:text-base",children:i.modified}),s("div",{className:"flex gap-1",children:[e(a,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:o=>{o.stopPropagation(),l?.(i)},children:e(u,{className:"h-4 w-4"})}),e(a,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:o=>{o.stopPropagation(),n?.(i)},children:e(p,{className:"h-4 w-4"})}),e(a,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",children:e(v,{className:"h-4 w-4"})})]})]})]},i.name))})]})}export{x as a};
@@ -1 +0,0 @@
1
- import{a as h}from"./chunk-AMV3MECK.mjs";import{a as w}from"./chunk-HHYHENVF.mjs";import{a as O}from"./chunk-ORNGKQM7.mjs";import{a as P}from"./chunk-2VZWOBGP.mjs";import{a as b}from"./chunk-6YHVVP3S.mjs";import{a as D}from"./chunk-2NMVE5M4.mjs";import{b as C}from"./chunk-CSBGSBEU.mjs";import{useState as n}from"react";import{Fragment as X,jsx as e,jsxs as d}from"react/jsx-runtime";var cs=({initialTasks:B=[],initialEpics:N=[],initialSprints:x=[],initialProjects:Y=[],onAddTask:M,onUpdateTask:k,onDeleteTask:v,onTaskClick:j,onAddEpic:I})=>{let[K,r]=n(B),[o,R]=n(N),[m,Z]=n(x),[F,E]=n(!1),[H,A]=n(!1),[c,u]=n(null),[T,S]=n(null),y=o.filter(s=>s.isSelected).map(s=>s.id),l=m.find(s=>s.isSelected),U=K.filter(s=>{let t=y.includes(s.epicId);return!l||l.id==="all-tasks"?t:l.id==="backlog"?t&&!s.sprintId:t&&s.sprintId===l.id}),V=s=>U.filter(t=>t.status===s),$=s=>{let t={};return o.forEach(i=>{t[i.id]=s.filter(a=>a.epicId===i.id)}),t},q=s=>{S(s)},z=s=>{T&&(r(t=>t.map(i=>i.id===T.id?{...i,status:s}:i)),k?.(T.id,{status:s}),S(null))},G=s=>{let t={...s,id:Date.now().toString(),createdAt:new Date};r(i=>[...i,t]),M?.(s)},J=async(s,t)=>{r(i=>i.map(a=>a.id===s?{...a,...t}:a)),k&&await k(s,t)},L=async s=>{r(t=>t.filter(i=>i.id!==s)),c?.id===s&&u(null),v&&await v(s)},Q=s=>{let t={...s,id:Date.now().toString(),isSelected:!0};R(i=>[...i,t]),I?.(s)},W=s=>{u(s),j?.(s)};return d("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>E(!0)},secondaryAction:{label:"Add epic",onClick:()=>A(!0)}}),e("div",{className:"flex-1",children:d("div",{className:"w-full",children:[e("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(s=>{let t=V(s.status),i=$(t);return e(h,{title:s.title,status:s.status,taskCount:t.length,onDrop:z,isCompact:s.status==="done",children:y.map(a=>{let f=o.find(p=>p.id===a),g=i[a]||[];return g.length===0?null:d("div",{className:"mb-6",children:[d("div",{className:"flex items-center gap-2 mb-3",children:[e("div",{className:`w-3 h-3 rounded-full ${f?.color}`}),e("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:f?.name}),e(C,{variant:"secondary",className:"text-xs",children:g.length})]})," ",e("div",{className:"space-y-3",children:g.map(p=>e(b,{task:p,epic:f,onDragStart:q,onTaskClick:W,isCompact:s.status==="done"},p.id))})]},a)})},s.id)})}),d(X,{children:[e(P,{isOpen:F,onClose:()=>E(!1),onAddTask:G,epics:o,sprints:m}),e(O,{isOpen:H,onClose:()=>A(!1),onAddEpic:Q}),c&&e(w,{isOpen:!!c,onClose:()=>u(null),task:c,epics:o,sprints:m,onUpdateTask:J,onDeleteTask:L})]})]})})]})};export{cs as a};
@@ -1 +0,0 @@
1
- import{a as i}from"./chunk-QKGEV7LG.mjs";var r=t=>{let a=t.getDay()===0,n=t.getDay()===6,e=i.some(s=>s.date.toISOString()===t.toISOString());return a||n||e},l=(t,a,n=!1)=>{let e=new Date(t),s=new Date(a),o=0;if(n&&!r(e))return .5;for(;e<=s;)r(e)||o++,e.setDate(e.getDate()+1);return o},u=(t,a)=>!t||!a?!1:t.toDateString()!==a.toDateString();export{r as a,l as b,u as c};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as p}from"./chunk-3U3PZBHQ.mjs";import{a as B}from"./chunk-2NMVE5M4.mjs";import{a as I}from"./chunk-M245YHYF.mjs";import{a as R,c as D,d as H,g as E,i as b}from"./chunk-YFAZQYK4.mjs";import{a as k}from"./chunk-L5JPAKPM.mjs";import{b as N}from"./chunk-ZUA4KNIR.mjs";import{a,b as c,c as m,e as i}from"./chunk-YO3GQYRJ.mjs";import{useState as f}from"react";import{Plus as M,Search as O,File as u,Filter as W}from"lucide-react";import{motion as J,AnimatePresence as K}from"framer-motion";import{jsx as e,jsxs as t}from"react/jsx-runtime";function Q({initialFiles:P=[],onFileAdd:X,onFileEdit:U,onFileDelete:V,onFileClick:$,compactView:g=!1,className:j}){let[n,G]=f(P),[r,y]=f(""),[o,w]=f("all"),[d,L]=f("all"),q=Array.from(new Set(n.map(l=>l.app))),s=n.filter(l=>{let h=l.name.toLowerCase().includes(r.toLowerCase()),x=o==="all"||l.app===o;return h&&x}),S=s.slice(0,10),A=s.filter(l=>l.shared),T=()=>{console.log("Add file clicked")},F=l=>{console.log("Edit file:",l.name),U?.(l)},v=l=>{G(h=>h.filter(x=>x.name!==l.name)),V?.(l.name)},C=l=>{console.log("File clicked:",l.name),$?.(l)},z=()=>{y(""),w("all")};return e("div",{className:"px-2 md:px-4 py-4 space-y-8",children:e(K,{mode:"wait",children:e(J.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:t("div",{className:`space-y-6 ${j||""}`,children:[e(B,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:T},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),t("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t(a,{children:[t(c,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e(m,{className:"text-sm font-medium",children:"Total Files"}),e(u,{className:"h-4 w-4 text-muted-foreground"})]}),t(i,{children:[e("div",{className:"text-2xl font-bold",children:n.length}),t("p",{className:"text-xs text-muted-foreground",children:[n.filter(l=>l.shared).length," shared"]})]})]}),t(a,{children:[t(c,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e(m,{className:"text-sm font-medium",children:"Storage Used"}),e(u,{className:"h-4 w-4 text-muted-foreground"})]}),t(i,{children:[e("div",{className:"text-2xl font-bold",children:"2.4 GB"}),e("p",{className:"text-xs text-muted-foreground",children:"of 10 GB used"})]})]}),t(a,{children:[t(c,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e(m,{className:"text-sm font-medium",children:"Recent Activity"}),e(u,{className:"h-4 w-4 text-muted-foreground"})]}),t(i,{children:[e("div",{className:"text-2xl font-bold",children:"12"}),e("p",{className:"text-xs text-muted-foreground",children:"files modified today"})]})]})]}),e(a,{children:e(i,{className:"pt-6",children:t("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:t("div",{className:"relative",children:[e(O,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(k,{placeholder:"Search files...",value:r,onChange:l=>y(l.target.value),className:"pl-9"})]})}),t(R,{value:o,onValueChange:w,children:[e(H,{className:"w-full md:w-[180px]",children:e(D,{placeholder:"Filter by app"})}),t(E,{children:[e(b,{value:"all",children:"All Apps"}),q.map(l=>e(b,{value:l,children:l},l))]})]}),(r||o!=="all")&&t(N,{variant:"outline",onClick:z,className:"gap-2",children:[e(W,{className:"h-4 w-4"}),"Clear"]})]})})}),t("div",{className:"space-y-4",children:[e(I,{activeTab:d,onTabChange:L,tabOptions:[{value:"all",label:`All Files (${s.length})`},{value:"recent",label:`Recent (${S.length})`},{value:"shared",label:`Shared (${A.length})`}],maxWidth:"500px",gridCols:3}),d==="all"&&e(p,{files:s,onFileClick:C,onFileEdit:F,onFileDelete:v,showHeader:!g}),d==="recent"&&e(p,{files:S,onFileClick:C,onFileEdit:F,onFileDelete:v,showHeader:!g}),d==="shared"&&e(p,{files:A,onFileClick:C,onFileEdit:F,onFileDelete:v,showHeader:!g})]}),s.length===0&&e(a,{children:e(i,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[e(u,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),e("p",{className:"text-muted-foreground mb-4",children:r||o!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),t(N,{onClick:T,className:"gap-2",children:[e(M,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}export{Q as a};
@@ -1 +0,0 @@
1
- import{a as E}from"./chunk-6DEY5ZDD.mjs";import{a as A}from"./chunk-2NMVE5M4.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{b as d}from"./chunk-CSBGSBEU.mjs";import{a as n}from"./chunk-YO3GQYRJ.mjs";import{useState as i}from"react";import{Calendar as K,Plus as Q}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";var ne=({tasks:u,epics:B,sprints:v,onUpdateTask:I,onTaskClick:P,onAddSprint:O})=>{let[l,j]=i(["2"]),[c,f]=i(null),[R,o]=i(!1),[b,m]=i(null),g=u.filter(e=>!e.sprintId),$=u.filter(e=>e.sprintId&&l.includes(e.sprintId)),h=[...v].filter(e=>e.id!=="backlog"&&e.id!=="all-tasks").sort((e,a)=>e.startDate.getTime()-a.startDate.getTime()),V=e=>B.find(a=>a.id===e),M=e=>v.find(a=>a.id===e),U=e=>{switch(e){case"high":return"bg-destructive/20 text-destructive";case"medium":return"bg-warning/20 text-warning";case"low":return"bg-success/20 text-success";default:return"bg-muted text-muted-foreground"}},z=e=>e.split(" ").map(a=>a[0]).join("").toUpperCase(),F=e=>{f(e)},x=e=>{e.preventDefault()},N=e=>{m(e)},y=()=>{m(null)},D=(e,a)=>{e.preventDefault(),m(null),c&&(I(c.id,{sprintId:a==="backlog"?void 0:a}),f(null))},L=e=>{e==="backlog"||e==="all-tasks"||j(a=>a.includes(e)?a.filter(r=>r!==e):[...a,e])},H=e=>{O(e),o(!1)},k=({task:e,showSprint:a=!1})=>{let r=V(e.epicId),w=e.sprintId?M(e.sprintId):null,[S,C]=i(!1),q=T=>{T.defaultPrevented||S||P(e)},G=T=>{C(!0),F(e)},J=()=>{C(!1)};return t(n,{className:`p-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${S?"opacity-50 shadow-lg scale-105":""} ${c?.id===e.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:G,onDragEnd:J,onClick:q,children:s("div",{className:"space-y-2",children:[s("div",{className:"flex items-start justify-between",children:[t("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:e.title}),t(d,{className:`text-xs select-none pointer-events-none ${U(e.priority)}`,children:e.priority[0].toUpperCase()})]}),s("div",{className:"flex items-center justify-between text-xs pointer-events-none",children:[s("div",{className:"flex items-center gap-1",children:[r&&t("div",{className:`w-2 h-2 rounded-full ${r.color}`}),t("span",{className:"text-muted-foreground truncate select-none",children:r?.name})]}),t("span",{className:"text-muted-foreground select-none",children:z(e.assignee)})]}),a&&w&&s("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[t(K,{className:"h-3 w-3"}),t("span",{className:"select-none",children:w.name})]})]})})};return s("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[t(A,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>o(!0)}}),t("div",{className:"flex-1",children:s("div",{className:"w-full",children:[s("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[t("div",{className:"lg:col-span-1",children:s(n,{className:"p-4 h-full bg-card shadow-sm",onDragOver:x,onDragEnter:()=>N("backlog"),onDragLeave:y,onDrop:e=>D(e,"backlog"),children:[s("div",{className:"flex items-center justify-between mb-4",children:[t("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),t(d,{variant:"secondary",className:"bg-muted text-muted-foreground",children:g.length})]}),s("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${b==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[g.map(e=>t(k,{task:e},e.id)),g.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"})]})]})}),t("div",{className:"lg:col-span-3",children:s("div",{className:"space-y-4",children:[s(n,{className:"p-4 bg-card shadow-sm",children:[s("div",{className:"flex items-center justify-between mb-3",children:[t("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),s(p,{onClick:()=>o(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[t(Q,{className:"h-4 w-4"}),"Add Sprint"]})]}),t("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:h.map(e=>s(p,{variant:l.includes(e.id)?"default":"outline",size:"sm",onClick:()=>L(e.id),className:"text-xs h-8",children:[e.name,e.isActive&&t("span",{className:"ml-1 text-success",children:"\u25CF"})]},e.id))})]}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:l.map(e=>h.find(a=>a.id===e)).filter(Boolean).sort((e,a)=>e.startDate.getTime()-a.startDate.getTime()).map(e=>{let a=$.filter(r=>r.sprintId===e.id);return s(n,{className:"p-4 bg-card shadow-sm",onDragOver:x,onDragEnter:()=>N(e.id),onDragLeave:y,onDrop:r=>D(r,e.id),children:[s("div",{className:"flex items-center justify-between mb-4",children:[s("div",{children:[t("h3",{className:"font-semibold text-foreground select-none",children:e.name}),e.isActive&&t("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),t(d,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a.length})]}),s("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${b===e.id?"border-primary bg-primary/10":"border-border"}`,children:[a.map(r=>t(k,{task:r},r.id)),a.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},e.id)})})," "]})})]}),t(E,{isOpen:R,onClose:()=>o(!1),onAddSprint:H})]})})]})};export{ne as a};
@@ -1 +0,0 @@
1
- import{a as $}from"./chunk-PXPSM7OQ.mjs";import{a as W}from"./chunk-NZS3XKXU.mjs";import{a as K}from"./chunk-KOXC4RIH.mjs";import{a as B}from"./chunk-FV3W3WL7.mjs";import{a as H}from"./chunk-5MU4KV3B.mjs";import{a as x}from"./chunk-HHYHENVF.mjs";import{a as G}from"./chunk-ORNGKQM7.mjs";import{a as N}from"./chunk-2VZWOBGP.mjs";import{a as I}from"./chunk-ECXVQZBN.mjs";import{useState as s}from"react";import{useRouter as $e}from"next/navigation";import{jsx as a,jsxs as ze}from"react/jsx-runtime";function qe({title:Je="",initialTasks:q=[],initialEpics:z=[],initialSprints:J=[],initialProjects:L=[],initialReminders:Q=[],initialColleagues:X=[],initialFiles:Y=[],onAddTask:Le,onUpdateTask:v,onDeleteTask:Qe,onTaskClick:Xe,onAddEpic:Ye,onUpdateEpic:Z,onDeleteEpic:_,onAddTaskToEpic:Ze,onAddSprint:ee,onUpdateSprint:ie,onDeleteSprint:te,onAddProject:ne,onUpdateProject:se,onDeleteProject:ae,onFileAdd:oe,onFileEdit:de,onFileDelete:le,onFileClick:re,onAddReminder:ce,onUpdateReminder:pe,onDeleteReminder:ge,onViewChange:_e,onToggleMobileMenu:me,onTeamClick:ei,onTeamChange:ii,onCopilotClick:ti}){let[c,r]=s(q),[o,k]=s(z),[d,T]=s(J),[A,u]=s(L),[ke,f]=s(Q),[Te,ni]=s(X),[ue,C]=s(Y),[fe,P]=s(!1),[he,w]=s(!1),[p,h]=s(null),[De,R]=s(null),[b,U]=s(null),[l,Se]=s("kanban"),[Ee,ve]=s(!1),F=$e(),Ae=o.filter(e=>e.isSelected).map(e=>e.id),g=d.find(e=>e.isSelected),Ce=c.filter(e=>{let i=Ae.includes(e.epicId);return!g||g.id==="all-tasks"?i:g.id==="backlog"?i&&!e.sprintId:i&&e.sprintId===g.id}),si=e=>Ce.filter(i=>i.status===e),ai=e=>{let i={};return o.forEach(t=>{i[t.id]=e.filter(n=>n.epicId===t.id)}),i},oi=e=>{U(e)},di=e=>{b&&(r(i=>i.map(t=>t.id===b.id?{...t,status:e}:t)),U(null))},M=e=>{let i={...e,id:Date.now().toString(),createdAt:new Date};r(t=>[...t,i]),v?.(i.id,i)},m=(e,i)=>{r(t=>t.map(n=>n.id===e?{...n,...i}:n)),v?.(e,i)},Pe=async(e,i)=>{m(e,i)},O=e=>{r(i=>i.filter(t=>t.id!==e)),p?.id===e&&h(null)},we=async e=>{O(e)},Re=e=>{let i={...e,id:Date.now().toString(),isSelected:!1};u(t=>[...t,i]),ne?.(e)},be=(e,i)=>{u(t=>t.map(n=>n.id===e?i.isSelected?(F.push(`/kanban/${e}`),{...n,...i}):{...n,...i}:i.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),se?.(e,i)},Ue=e=>{u(i=>i.filter(t=>t.id!==e)),ae?.(e)},Fe=e=>{let i={...e,id:Date.now().toString(),isSelected:!0};k(t=>[...t,i])},D=()=>{w(!0)},j=(e,i)=>{k(t=>t.map(n=>n.id===e?{...n,...i}:n)),Z?.(e,i)},y=e=>{k(i=>i.filter(t=>t.id!==e)),r(i=>i.filter(t=>t.epicId!==e)),_?.(e)},V=e=>{let i={...e,id:Date.now().toString(),isSelected:!1};T(t=>[...t,i]),ee?.(e)},Me=(e,i)=>{T(t=>t.map(n=>n.id===e?i.isSelected?{...n,...i}:{...n,...i}:i.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),ie?.(e,i)},Oe=e=>{e==="backlog"||e==="all-tasks"||(T(i=>i.filter(t=>t.id!==e)),r(i=>i.map(t=>t.sprintId===e?{...t,sprintId:void 0}:t)),te?.(e))},S=e=>{h(e)},je=e=>{e==="planning"&&window.innerWidth<768||Se(e)},ye=()=>{ve(e=>!e),me?.()},li=()=>{F.push("/")},ri=e=>{console.log("Switching to team:",e)},ci=e=>{console.log("Switching to team:",e)},Ve=e=>{R(e),P(!0)},Ie=()=>{P(!1),R(null)},Be=e=>{let i={...e,id:Date.now().toString(),createdAt:new Date};f(t=>[...t,i]),ce?.(e)},Ne=(e,i)=>{f(t=>t.map(n=>n.id===e?{...n,...i}:n)),pe?.(e,i)},xe=e=>{f(i=>i.filter(t=>t.id!==e)),ge?.(e)},Ge=e=>{C(i=>[...i,e]),oe?.(e)},He=e=>{de?.(e)},Ke=e=>{C(i=>i.filter(t=>t.name!==e)),le?.(e)},We=e=>{re?.(e)},pi=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],gi=()=>{switch(l){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},E=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],mi=E.sort((e,i)=>i.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ki=E.length>3,Ti=E.slice(3);return ze(I,{projects:A,epics:o,sprints:d,currentView:l,onUpdateProject:be,onDeleteProject:Ue,onAddProject:Re,onUpdateEpic:j,onDeleteEpic:y,onAddEpic:D,onAddSprint:V,onUpdateSprint:Me,onDeleteSprint:Oe,onViewChange:je,mobileMenuOpen:Ee,onToggleMobileMenu:ye,children:[l==="kanban"&&a("div",{className:"h-full",children:a(H,{initialProjects:A,initialEpics:o,initialSprints:d,initialTasks:c,onAddTask:M,onUpdateTask:m,onDeleteTask:O,onTaskClick:S,onAddEpic:D})}),l==="planning"&&a("div",{className:"hidden md:block h-full",children:a(W,{tasks:c,epics:o,sprints:d,onUpdateTask:m,onTaskClick:S,onAddSprint:V})}),l==="tasks"&&a("div",{className:"h-full",children:a($,{initialReminders:ke,initialColleagues:Te,onAddReminder:Be,onUpdateReminder:Ne,onDeleteReminder:xe})}),l==="files"&&a("div",{className:"h-full",children:a(B,{initialFiles:ue,onFileAdd:Ge,onFileEdit:He,onFileDelete:Ke,onFileClick:We,compactView:!1})}),l==="epics"&&a("div",{className:"h-full",children:a(K,{tasks:c,epics:o,sprints:d,onUpdateTask:m,onTaskClick:S,onAddTaskToEpic:Ve,onAddEpic:D,onUpdateEpic:j,onDeleteEpic:y})}),a(N,{isOpen:fe,onClose:Ie,onAddTask:M,epics:o,sprints:d,defaultEpicId:De||void 0}),a(G,{isOpen:he,onClose:()=>w(!1),onAddEpic:Fe}),p&&a(x,{isOpen:!!p,onClose:()=>h(null),task:p,onUpdateTask:Pe,onDeleteTask:we,epics:o,sprints:d})]})}export{qe as a};
@@ -1 +0,0 @@
1
- import{a as q}from"./chunk-2NMVE5M4.mjs";import{a as y,c as C,d as b,g as x,i as n}from"./chunk-YFAZQYK4.mjs";import{a as M}from"./chunk-B4H6T2GP.mjs";import{a as s}from"./chunk-TVZOULLL.mjs";import{a as E,b as B,f as L,g as F,i as P}from"./chunk-3UMMMQEH.mjs";import{a as v}from"./chunk-L5JPAKPM.mjs";import{b as R}from"./chunk-ZUA4KNIR.mjs";import{b as H}from"./chunk-CSBGSBEU.mjs";import{a as w,e as U}from"./chunk-YO3GQYRJ.mjs";import{useState as I}from"react";import{Plus as z,Clock as W,Calendar as Y,User as G,Repeat as J,Edit2 as K,Trash2 as Q,CheckCircle as X,Circle as Z,Bell as _}from"lucide-react";import{Fragment as se,jsx as e,jsxs as a}from"react/jsx-runtime";var ee=r=>{switch(r){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},te=r=>r.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),ae=r=>{let[o,g]=r.split(":"),m=new Date;return m.setHours(parseInt(o),parseInt(g)),m.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},A=(r,o)=>{let g=new Date,m=new Date(r);if(o){let[u,t]=o.split(":");m.setHours(parseInt(u),parseInt(t))}return m<g},O=r=>{let o=new Date;return r.toDateString()===o.toDateString()},ie=r=>{let o=new Date;return o.setDate(o.getDate()+1),r.toDateString()===o.toDateString()},re=({colleagues:r,onAddReminder:o,trigger:g})=>{let[m,u]=I(!1),[t,d]=I({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""});return a(E,{open:m,onOpenChange:u,children:[e(B,{asChild:!0,children:g}),a(L,{className:"max-w-2xl",children:[e(F,{children:e(P,{children:"Add New Reminder"})}),a("form",{onSubmit:i=>{i.preventDefault();let D=r.find(h=>h.id===t.colleagueId);if(!D)return;let p={title:t.title,description:t.description,dueDate:new Date(t.dueDate),dueTime:t.dueTime||void 0,colleague:D,isCompleted:!1,isRecurring:t.isRecurring,recurrencePattern:t.isRecurring?t.recurrencePattern:void 0,recurrenceInterval:t.isRecurring?t.recurrenceInterval:void 0,priority:t.priority,reminderEnabled:t.reminderEnabled,reminderMinutes:t.reminderEnabled?t.reminderMinutes:void 0,tags:t.tags?t.tags.split(",").map(h=>h.trim()):void 0};o(p),u(!1),d({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})},className:"space-y-4",children:[a("div",{className:"grid grid-cols-2 gap-4",children:[a("div",{children:[e(s,{htmlFor:"title",children:"Title"}),e(v,{id:"title",value:t.title,onChange:i=>d({...t,title:i.target.value}),placeholder:"Enter reminder title",required:!0})]}),a("div",{children:[e(s,{htmlFor:"priority",children:"Priority"}),a(y,{value:t.priority,onValueChange:i=>d({...t,priority:i}),children:[e(b,{children:e(C,{})}),a(x,{children:[e(n,{value:"low",children:"\u{1F7E2} Low"}),e(n,{value:"medium",children:"\u{1F7E1} Medium"}),e(n,{value:"high",children:"\u{1F534} High"})]})]})]})]}),a("div",{children:[e(s,{htmlFor:"description",children:"Description"}),e(M,{id:"description",value:t.description,onChange:i=>d({...t,description:i.target.value}),placeholder:"Enter reminder description",rows:3})]}),a("div",{className:"grid grid-cols-2 gap-4",children:[a("div",{children:[e(s,{htmlFor:"dueDate",children:"Due Date"}),e(v,{id:"dueDate",type:"date",value:t.dueDate,onChange:i=>d({...t,dueDate:i.target.value}),required:!0})]}),a("div",{children:[e(s,{htmlFor:"dueTime",children:"Due Time (optional)"}),e(v,{id:"dueTime",type:"time",value:t.dueTime,onChange:i=>d({...t,dueTime:i.target.value})})]})]}),a("div",{children:[e(s,{htmlFor:"colleague",children:"Assigned Colleague"}),a(y,{value:t.colleagueId,onValueChange:i=>d({...t,colleagueId:i}),children:[e(b,{children:e(C,{placeholder:"Select a digital colleague"})}),e(x,{children:r.map(i=>e(n,{value:i.id,children:i.name},i.id))})]})]}),a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"isRecurring",checked:t.isRecurring,onChange:i=>d({...t,isRecurring:i.target.checked}),className:"rounded border-border"}),e(s,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),t.isRecurring&&a("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[a("div",{children:[e(s,{htmlFor:"recurrencePattern",children:"Frequency"}),a(y,{value:t.recurrencePattern,onValueChange:i=>d({...t,recurrencePattern:i}),children:[e(b,{children:e(C,{})}),a(x,{children:[e(n,{value:"daily",children:"Daily"}),e(n,{value:"weekly",children:"Weekly"}),e(n,{value:"monthly",children:"Monthly"}),e(n,{value:"yearly",children:"Yearly"})]})]})]}),a("div",{children:[e(s,{htmlFor:"recurrenceInterval",children:"Every"}),e(v,{id:"recurrenceInterval",type:"number",min:"1",value:t.recurrenceInterval,onChange:i=>d({...t,recurrenceInterval:parseInt(i.target.value)})})]})]})]}),a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"reminderEnabled",checked:t.reminderEnabled,onChange:i=>d({...t,reminderEnabled:i.target.checked}),className:"rounded border-border"}),e(s,{htmlFor:"reminderEnabled",children:"Enable reminder notifications"})]}),t.reminderEnabled&&a("div",{className:"pl-6",children:[e(s,{htmlFor:"reminderMinutes",children:"Remind me"}),a(y,{value:t.reminderMinutes.toString(),onValueChange:i=>d({...t,reminderMinutes:parseInt(i)}),children:[e(b,{children:e(C,{})}),a(x,{children:[e(n,{value:"5",children:"5 minutes before"}),e(n,{value:"15",children:"15 minutes before"}),e(n,{value:"30",children:"30 minutes before"}),e(n,{value:"60",children:"1 hour before"}),e(n,{value:"1440",children:"1 day before"})]})]})]})]}),a("div",{children:[e(s,{htmlFor:"tags",children:"Tags (comma-separated)"}),e(v,{id:"tags",value:t.tags,onChange:i=>d({...t,tags:i.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),a("div",{className:"flex justify-end space-x-2",children:[e(R,{type:"button",variant:"outline",onClick:()=>u(!1),children:"Cancel"}),e(R,{type:"submit",children:"Add Reminder"})]})]})]})]})},le=({reminder:r,colleagues:o,onUpdateReminder:g,open:m,onClose:u})=>{let[t,d]=I({title:r.title,description:r.description,dueDate:r.dueDate.toISOString().split("T")[0],dueTime:r.dueTime||"",colleagueId:r.colleague.id,priority:r.priority,isRecurring:r.isRecurring,recurrencePattern:r.recurrencePattern||"weekly",recurrenceInterval:r.recurrenceInterval||1,reminderEnabled:r.reminderEnabled,reminderMinutes:r.reminderMinutes||15,tags:r.tags?.join(", ")||""});return e(E,{open:m,onOpenChange:u,children:a(L,{className:"max-w-2xl",children:[e(F,{children:e(P,{children:"Edit Reminder"})}),a("form",{onSubmit:i=>{i.preventDefault();let D=o.find(h=>h.id===t.colleagueId);if(!D)return;let p={title:t.title,description:t.description,dueDate:new Date(t.dueDate),dueTime:t.dueTime||void 0,colleague:D,isRecurring:t.isRecurring,recurrencePattern:t.isRecurring?t.recurrencePattern:void 0,recurrenceInterval:t.isRecurring?t.recurrenceInterval:void 0,priority:t.priority,reminderEnabled:t.reminderEnabled,reminderMinutes:t.reminderEnabled?t.reminderMinutes:void 0,tags:t.tags?t.tags.split(",").map(h=>h.trim()):void 0};g(r.id,p),u()},className:"space-y-4",children:[a("div",{className:"grid grid-cols-2 gap-4",children:[a("div",{children:[e(s,{htmlFor:"edit-title",children:"Title"}),e(v,{id:"edit-title",value:t.title,onChange:i=>d({...t,title:i.target.value}),placeholder:"Enter reminder title",required:!0})]}),a("div",{children:[e(s,{htmlFor:"edit-priority",children:"Priority"}),a(y,{value:t.priority,onValueChange:i=>d({...t,priority:i}),children:[e(b,{children:e(C,{})}),a(x,{children:[e(n,{value:"low",children:"\u{1F7E2} Low"}),e(n,{value:"medium",children:"\u{1F7E1} Medium"}),e(n,{value:"high",children:"\u{1F534} High"})]})]})]})]}),a("div",{children:[e(s,{htmlFor:"edit-description",children:"Description"}),e(M,{id:"edit-description",value:t.description,onChange:i=>d({...t,description:i.target.value}),placeholder:"Enter reminder description",rows:3})]}),a("div",{className:"grid grid-cols-2 gap-4",children:[a("div",{children:[e(s,{htmlFor:"edit-dueDate",children:"Due Date"}),e(v,{id:"edit-dueDate",type:"date",value:t.dueDate,onChange:i=>d({...t,dueDate:i.target.value}),required:!0})]}),a("div",{children:[e(s,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),e(v,{id:"edit-dueTime",type:"time",value:t.dueTime,onChange:i=>d({...t,dueTime:i.target.value})})]})]}),a("div",{children:[e(s,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),a(y,{value:t.colleagueId,onValueChange:i=>d({...t,colleagueId:i}),children:[e(b,{children:e(C,{placeholder:"Select a digital colleague"})}),e(x,{children:o.map(i=>e(n,{value:i.id,children:i.name},i.id))})]})]}),a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-isRecurring",checked:t.isRecurring,onChange:i=>d({...t,isRecurring:i.target.checked}),className:"rounded border-border"}),e(s,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),t.isRecurring&&a("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[a("div",{children:[e(s,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),a(y,{value:t.recurrencePattern,onValueChange:i=>d({...t,recurrencePattern:i}),children:[e(b,{children:e(C,{})}),a(x,{children:[e(n,{value:"daily",children:"Daily"}),e(n,{value:"weekly",children:"Weekly"}),e(n,{value:"monthly",children:"Monthly"}),e(n,{value:"yearly",children:"Yearly"})]})]})]}),a("div",{children:[e(s,{htmlFor:"edit-recurrenceInterval",children:"Every"}),e(v,{id:"edit-recurrenceInterval",type:"number",min:"1",value:t.recurrenceInterval,onChange:i=>d({...t,recurrenceInterval:parseInt(i.target.value)})})]})]})]}),a("div",{className:"space-y-2",children:[a("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-reminderEnabled",checked:t.reminderEnabled,onChange:i=>d({...t,reminderEnabled:i.target.checked}),className:"rounded border-border"}),e(s,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),t.reminderEnabled&&a("div",{className:"pl-6",children:[e(s,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),a(y,{value:t.reminderMinutes.toString(),onValueChange:i=>d({...t,reminderMinutes:parseInt(i)}),children:[e(b,{children:e(C,{})}),a(x,{children:[e(n,{value:"5",children:"5 minutes before"}),e(n,{value:"15",children:"15 minutes before"}),e(n,{value:"30",children:"30 minutes before"}),e(n,{value:"60",children:"1 hour before"}),e(n,{value:"1440",children:"1 day before"})]})]})]})]}),a("div",{children:[e(s,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),e(v,{id:"edit-tags",value:t.tags,onChange:i=>d({...t,tags:i.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),a("div",{className:"flex justify-end space-x-2",children:[e(R,{type:"button",variant:"outline",onClick:u,children:"Cancel"}),e(R,{type:"submit",children:"Save Changes"})]})]})]})})},de=({reminder:r,colleagues:o,onUpdateReminder:g,onDeleteReminder:m})=>{let[u,t]=I(!1),d=A(r.dueDate,r.dueTime),T=O(r.dueDate),i=ie(r.dueDate),D=()=>{g(r.id,{isCompleted:!r.isCompleted,completedAt:r.isCompleted?void 0:new Date})},p=()=>T?"Today":i?"Tomorrow":d&&!r.isCompleted?"Overdue":te(r.dueDate);return a(se,{children:[e(le,{reminder:r,colleagues:o,onUpdateReminder:g,open:u,onClose:()=>t(!1)}),e(w,{className:`transition-all duration-200 ${r.isCompleted?"opacity-60":""} ${d&&!r.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:e(U,{className:"p-4",children:a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex items-start space-x-3 flex-1",children:[e("button",{onClick:D,className:"mt-1 text-primary hover:text-primary/80",children:r.isCompleted?e(X,{className:"h-5 w-5"}):e(Z,{className:"h-5 w-5"})}),a("div",{className:"flex-1",children:[a("div",{className:"flex items-center space-x-2 mb-1",children:[e("h3",{className:`font-semibold ${r.isCompleted?"line-through text-muted-foreground":""}`,children:r.title}),e("span",{className:"text-sm",children:ee(r.priority)}),r.isRecurring&&e(J,{className:"h-4 w-4 text-primary"}),r.reminderEnabled&&e(_,{className:"h-4 w-4 text-success"})]}),e("p",{className:"text-sm text-muted-foreground mb-2",children:r.description}),a("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[a("div",{className:"flex items-center space-x-1",children:[e(Y,{className:"h-4 w-4"}),e("span",{className:d&&!r.isCompleted?"text-destructive font-medium":"",children:p()})]}),r.dueTime&&a("div",{className:"flex items-center space-x-1",children:[e(W,{className:"h-4 w-4"}),e("span",{children:ae(r.dueTime)})]}),a("div",{className:"flex items-center space-x-1",children:[e(G,{className:"h-4 w-4"}),e("span",{children:r.colleague.name})]})]}),r.tags&&r.tags.length>0&&e("div",{className:"flex flex-wrap gap-1 mt-2",children:r.tags.map((h,k)=>e(H,{variant:"secondary",className:"text-xs",children:h},k))})]})]}),a("div",{className:"flex items-center space-x-1",children:[e(R,{variant:"ghost",size:"sm",onClick:()=>t(!0),className:"h-8 w-8 p-0",children:e(K,{className:"h-4 w-4"})}),e(R,{variant:"ghost",size:"sm",onClick:()=>m(r.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:e(Q,{className:"h-4 w-4"})})]})]})})})]})},ne=({initialReminders:r=[],initialColleagues:o=[],onAddReminder:g,onUpdateReminder:m,onDeleteReminder:u})=>{let[t,d]=I(r),[T]=I(o),[i,D]=I("all"),[p,h]=I(""),k=l=>{let c={...l,id:Date.now().toString(),createdAt:new Date};d(N=>[...N,c]),g?.(l)},j=(l,c)=>{d(N=>N.map(S=>S.id===l?{...S,...c}:S)),m?.(l,c)},$=l=>{d(c=>c.filter(N=>N.id!==l)),u?.(l)},V=t.filter(l=>{if(p){let c=p.toLowerCase();if(!(l.title.toLowerCase().includes(c)||l.description.toLowerCase().includes(c)||l.colleague.name.toLowerCase().includes(c)||l.tags?.some(S=>S.toLowerCase().includes(c))))return!1}switch(i){case"pending":return!l.isCompleted;case"completed":return l.isCompleted;case"overdue":return!l.isCompleted&&A(l.dueDate,l.dueTime);case"today":return O(l.dueDate);default:return!0}}).sort((l,c)=>{if(l.isCompleted&&!c.isCompleted)return 1;if(!l.isCompleted&&c.isCompleted)return-1;let N={high:3,medium:2,low:1},S=N[c.priority]-N[l.priority];return S!==0?S:l.dueDate.getTime()-c.dueDate.getTime()}),f={total:t.length,pending:t.filter(l=>!l.isCompleted).length,completed:t.filter(l=>l.isCompleted).length,overdue:t.filter(l=>!l.isCompleted&&A(l.dueDate,l.dueTime)).length,today:t.filter(l=>O(l.dueDate)).length};return a("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(q,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{let l={title:"New Reminder",description:"Don't forget to complete this task",dueDate:new Date,dueTime:"09:00",colleague:T[0]||{id:"1",name:"Default Colleague",department:"General",role:"Team Member"},isCompleted:!1,isRecurring:!1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,tags:["reminder"]};k(l)}}}),e("div",{className:"h-full bg-background",children:a("div",{className:"p-6",children:[a("div",{className:"flex items-center justify-between mb-6",children:[a("div",{children:[e("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),e("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),e(re,{colleagues:T,onAddReminder:k,trigger:a(R,{className:"flex items-center space-x-2",children:[e(z,{className:"h-4 w-4"}),e("span",{children:"Add Reminder"})]})})]}),a("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[a(w,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-foreground",children:f.total}),e("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),a(w,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-primary",children:f.pending}),e("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),a(w,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-success",children:f.completed}),e("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),a(w,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-destructive",children:f.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),a(w,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-warning",children:f.today}),e("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),a("div",{className:"flex items-center space-x-4 mb-6",children:[e("div",{className:"flex-1",children:e(v,{placeholder:"Search reminders...",value:p,onChange:l=>h(l.target.value),className:"max-w-md"})}),a(y,{value:i,onValueChange:l=>D(l),children:[e(b,{className:"w-40",children:e(C,{})}),a(x,{children:[a(n,{value:"all",children:["All (",f.total,")"]}),a(n,{value:"pending",children:["Pending (",f.pending,")"]}),a(n,{value:"completed",children:["Completed (",f.completed,")"]}),a(n,{value:"overdue",children:["Overdue (",f.overdue,")"]}),a(n,{value:"today",children:["Today (",f.today,")"]})]})]})]}),e("div",{className:"space-y-4",children:V.length===0?a(w,{className:"p-8 text-center",children:[e("div",{className:"text-muted-foreground",children:p||i!=="all"?"No reminders match your filters":"No reminders yet"}),!p&&i==="all"&&e("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):V.map(l=>e(de,{reminder:l,colleagues:T,onUpdateReminder:j,onDeleteReminder:$},l.id))})]})})]})},Re=ne;export{ne as a,Re as b};
@@ -1 +0,0 @@
1
- var a=[{date:new Date(2025,3,18),name:"Good Friday"},{date:new Date(2025,3,21),name:"Easter Monday"},{date:new Date(2025,4,5),name:"Early May bank holiday"},{date:new Date(2025,5,26),name:"Spring bank holiday"},{date:new Date(2025,7,25),name:"Summer bank holiday"},{date:new Date(2025,11,25),name:"Christmas Day"},{date:new Date(2025,11,26),name:"Boxing Day"}];export{a};