cortex-react-components 2.0.3 → 2.0.5

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 (176) hide show
  1. package/dist/{chunk-XI5H6WLY.mjs → chunk-2GZQYAN3.mjs} +1 -1
  2. package/dist/chunk-2VR4KIQL.mjs +4 -0
  3. package/dist/{chunk-WHDJPD5E.mjs → chunk-45DDMEV4.mjs} +1 -1
  4. package/dist/{chunk-HH3AWPYB.mjs → chunk-5KS3DITB.mjs} +1 -1
  5. package/dist/{chunk-G6ED5Z4J.mjs → chunk-66ODXUVL.mjs} +1 -1
  6. package/dist/{chunk-LAQ3QAUW.mjs → chunk-75WE6ZXB.mjs} +1 -1
  7. package/dist/{chunk-PLTKMHUH.mjs → chunk-BDNY6OKE.mjs} +1 -1
  8. package/dist/{chunk-IUT6JJHY.mjs → chunk-BGADMIWV.mjs} +1 -1
  9. package/dist/{chunk-DUEPJ3F4.mjs → chunk-BN747TQM.mjs} +1 -1
  10. package/dist/{chunk-A3SUL73A.mjs → chunk-FXTFE74U.mjs} +1 -1
  11. package/dist/{chunk-KXZFR7TI.mjs → chunk-GH3F4DKW.mjs} +1 -1
  12. package/dist/{chunk-6T4OEOJH.mjs → chunk-GIL2SMPM.mjs} +1 -1
  13. package/dist/{chunk-XBCYPOFD.mjs → chunk-GTK2SGS5.mjs} +1 -1
  14. package/dist/{chunk-U7GAPI7X.mjs → chunk-I4LKRX2X.mjs} +1 -1
  15. package/dist/{chunk-ISBVFNWD.mjs → chunk-IDG2O4B7.mjs} +1 -1
  16. package/dist/chunk-IPV2NFB6.mjs +1 -0
  17. package/dist/chunk-JHSHXYPK.mjs +4 -0
  18. package/dist/{chunk-VKJ7E6OL.mjs → chunk-JLUX7EHB.mjs} +1 -1
  19. package/dist/{chunk-436WKDWG.mjs → chunk-JT65KF7C.mjs} +1 -1
  20. package/dist/chunk-LUPNE23E.mjs +1 -0
  21. package/dist/{chunk-KJMXSFJA.mjs → chunk-M74BIPBM.mjs} +1 -1
  22. package/dist/{chunk-OJYMSL24.mjs → chunk-NBWEIVGC.mjs} +1 -1
  23. package/dist/{chunk-EVZSRWUW.mjs → chunk-NXG2Y4N4.mjs} +1 -1
  24. package/dist/chunk-PA4ZBJDO.mjs +1 -0
  25. package/dist/{chunk-QDAJ7QAD.mjs → chunk-PRK2XFAZ.mjs} +1 -1
  26. package/dist/{chunk-EG646342.mjs → chunk-RVDQVN5C.mjs} +1 -1
  27. package/dist/{chunk-LC2RBE7W.mjs → chunk-S5BLSQXV.mjs} +1 -1
  28. package/dist/chunk-SWA5TRPZ.mjs +4 -0
  29. package/dist/{chunk-S562PA5P.mjs → chunk-T36QUKC6.mjs} +1 -1
  30. package/dist/{chunk-UIMLXZPF.mjs → chunk-TCXAETN2.mjs} +1 -1
  31. package/dist/{chunk-V2KCUPP5.mjs → chunk-TRFGSHZW.mjs} +1 -1
  32. package/dist/{chunk-TO2UDP5T.mjs → chunk-UA76VX54.mjs} +1 -1
  33. package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
  34. package/dist/{chunk-OEFXIEY3.mjs → chunk-V5W32NJ4.mjs} +1 -1
  35. package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
  36. package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
  37. package/dist/{chunk-IQ3TUH7O.mjs → chunk-WDZOGIT2.mjs} +1 -1
  38. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  39. package/dist/{chunk-M4NJB4NN.mjs → chunk-Y62OBV2E.mjs} +1 -1
  40. package/dist/chunk-ZCEVYZEO.mjs +4 -0
  41. package/dist/{chunk-DY2G774J.mjs → chunk-ZZ6VZFRV.mjs} +1 -1
  42. package/dist/components/AdvancedComponents/sidebar.js +1 -1
  43. package/dist/components/AdvancedComponents/sidebar.mjs +3 -1
  44. package/dist/components/Blocks/Banner.mjs +1 -1
  45. package/dist/components/Blocks/CallToAction.mjs +1 -1
  46. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  47. package/dist/components/Blocks/Content.mjs +1 -1
  48. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  49. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  50. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  51. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  52. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  53. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  54. package/dist/components/Blocks/index.mjs +1 -1
  55. package/dist/components/Cards/ContentCard.mjs +1 -1
  56. package/dist/components/Cards/FeatureCard.mjs +1 -1
  57. package/dist/components/Cards/index.mjs +1 -1
  58. package/dist/components/Chat/CAPABILITIES_README.js +12 -5
  59. package/dist/components/Chat/CAPABILITIES_README.mjs +12 -5
  60. package/dist/components/Chat/{EnhancedChatInterface.d.ts → ChatInterface.d.ts} +4 -6
  61. package/dist/components/Chat/ChatInterface.js +5 -0
  62. package/dist/components/Chat/ChatInterface.mjs +1 -0
  63. package/dist/components/Chat/CopilotInterface.d.ts +27 -86
  64. package/dist/components/Chat/CopilotInterface.js +1 -1
  65. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  66. package/dist/components/Chat/chat-session-sidebar.d.ts +0 -2
  67. package/dist/components/Chat/chat-session-sidebar.js +1 -1
  68. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  69. package/dist/components/Chat/demo.d.ts +7 -0
  70. package/dist/components/Chat/demo.js +5 -0
  71. package/dist/components/Chat/demo.mjs +1 -0
  72. package/dist/components/Chat/example-usage.d.ts +39 -0
  73. package/dist/components/Chat/example-usage.js +5 -0
  74. package/dist/components/Chat/example-usage.mjs +1 -0
  75. package/dist/components/Chat/index.d.ts +2 -0
  76. package/dist/components/Chat/index.js +2 -2
  77. package/dist/components/Chat/index.mjs +1 -1
  78. package/dist/components/Chat/types.d.ts +16 -0
  79. package/dist/components/Chat/types.js +1 -0
  80. package/dist/components/Chat/types.mjs +1 -0
  81. package/dist/components/DigitalColleagues/DigitalColleageusLayout.d.ts +2 -1
  82. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  83. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  84. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  85. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  86. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  87. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  88. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  89. package/dist/components/DigitalColleagues/sidebar-favorites-readme.js +228 -0
  90. package/dist/components/DigitalColleagues/sidebar-favorites-readme.mjs +228 -0
  91. package/dist/components/{dc-temp/sidebar.d.ts → DigitalColleagues/sidebar-new.d.ts} +3 -2
  92. package/dist/components/DigitalColleagues/sidebar-new.js +5 -0
  93. package/dist/components/DigitalColleagues/sidebar-new.mjs +4 -0
  94. package/dist/components/DigitalColleagues/sidebar.css +1 -0
  95. package/dist/components/DigitalColleagues/sidebar.d.ts +17 -0
  96. package/dist/components/DigitalColleagues/sidebar.js +5 -0
  97. package/dist/components/DigitalColleagues/sidebar.mjs +2 -0
  98. package/dist/components/DigitalColleagues/test-data.js +1 -1
  99. package/dist/components/DigitalColleagues/test-data.mjs +1 -1
  100. package/dist/components/DigitalColleagues/types.d.ts +3 -0
  101. package/dist/components/DigitalColleagues/types.js +1 -1
  102. package/dist/components/HeaderFooter/Header.mjs +1 -1
  103. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  104. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  105. package/dist/components/HeaderFooter/enhanced-header.css +1 -0
  106. package/dist/components/HeaderFooter/index.mjs +1 -1
  107. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  108. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  109. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  110. package/dist/components/Heros/RenderHero.mjs +1 -1
  111. package/dist/components/Heros/index.mjs +1 -1
  112. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  113. package/dist/components/Holidays/index.mjs +1 -1
  114. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  115. package/dist/components/Layouts/Print.mjs +1 -1
  116. package/dist/components/Layouts/SlideShow.mjs +1 -1
  117. package/dist/components/Layouts/index.mjs +1 -1
  118. package/dist/components/Payload/Card/index.mjs +1 -1
  119. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  120. package/dist/components/Payload/Media/index.mjs +1 -1
  121. package/dist/components/Payload/RichText/index.mjs +1 -1
  122. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  123. package/dist/components/Payload/index.mjs +1 -1
  124. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  125. package/dist/components/Projects/ProjectPage.js +1 -1
  126. package/dist/components/Projects/ProjectPage.mjs +1 -1
  127. package/dist/components/Projects/ProjectView.mjs +1 -1
  128. package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
  129. package/dist/components/dc-temp/index.mjs +1 -1
  130. package/dist/components/index.d.ts +0 -1
  131. package/dist/components/index.js +10 -10
  132. package/dist/components/index.mjs +1 -1
  133. package/dist/globals.css +1 -1
  134. package/dist/index.js +15 -15
  135. package/dist/index.mjs +1 -1
  136. package/dist/metafile-cjs.json +1 -1
  137. package/dist/metafile-esm.json +1 -1
  138. package/dist/pages/Blog.mjs +1 -1
  139. package/dist/pages/Documentation.mjs +1 -1
  140. package/dist/pages/IndexPage.mjs +1 -1
  141. package/dist/pages/Intranet.mjs +1 -1
  142. package/dist/pages/LandingPage.mjs +1 -1
  143. package/dist/pages/Page.mjs +1 -1
  144. package/dist/pages/Publish.mjs +1 -1
  145. package/dist/pages/Website.mjs +1 -1
  146. package/dist/sections/AboutSection.mjs +1 -1
  147. package/dist/sections/BlogDetail.mjs +1 -1
  148. package/dist/sections/BlogList.mjs +1 -1
  149. package/dist/sections/ContactSection.mjs +1 -1
  150. package/dist/sections/PageSections.mjs +1 -1
  151. package/dist/sections/PricingSection.mjs +1 -1
  152. package/dist/sections/ServiceDetail.mjs +1 -1
  153. package/dist/sections/ServiceDetailSection.mjs +1 -1
  154. package/dist/sections/ServiceSection.mjs +1 -1
  155. package/dist/sections/index.mjs +1 -1
  156. package/package.json +6 -2
  157. package/dist/chunk-5Z5PL7N3.mjs +0 -1
  158. package/dist/chunk-DLUWDQSW.mjs +0 -4
  159. package/dist/chunk-R7LPCFUJ.mjs +0 -4
  160. package/dist/chunk-TO7KJNKC.mjs +0 -4
  161. package/dist/chunk-UNS6CTQZ.mjs +0 -4
  162. package/dist/components/.archive/ai-chat-interface.d.ts +0 -70
  163. package/dist/components/Chat/EnhancedChatInterface.js +0 -5
  164. package/dist/components/Chat/EnhancedChatInterface.mjs +0 -4
  165. package/dist/components/Chat/ai-chat-interface.d.ts +0 -70
  166. package/dist/components/Chat/ai-chat-interface.js +0 -5
  167. package/dist/components/Chat/ai-chat-interface.mjs +0 -4
  168. package/dist/components/dc-temp/sidebar.js +0 -5
  169. package/dist/components/dc-temp/sidebar.mjs +0 -4
  170. /package/dist/components/Chat/{EnhancedChatInterface.css → ChatInterface.css} +0 -0
  171. /package/dist/components/Chat/{ai-chat-interface.css → demo.css} +0 -0
  172. /package/dist/components/{dc-temp/enhanced-header.css → Chat/example-usage.css} +0 -0
  173. /package/dist/components/{dc-temp/sidebar.css → DigitalColleagues/sidebar-new.css} +0 -0
  174. /package/dist/components/{dc-temp → HeaderFooter}/enhanced-header.d.ts +0 -0
  175. /package/dist/components/{dc-temp → HeaderFooter}/enhanced-header.js +0 -0
  176. /package/dist/components/{dc-temp → HeaderFooter}/enhanced-header.mjs +0 -0
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- "use client";import{a as S}from"../../../chunk-UIMLXZPF.mjs";import{a as O}from"../../../chunk-PEQOQ7BK.mjs";import{a as p,b as B,d as I}from"../../../chunk-5OQF3MNO.mjs";import{a as T}from"../../../chunk-5RTGHMF3.mjs";import"../../../chunk-RUOYGMOR.mjs";import"../../../chunk-WN2LPOQP.mjs";import"../../../chunk-BADFWNRL.mjs";import"../../../chunk-TUI4S4GI.mjs";import"../../../chunk-OB5WMODY.mjs";import"../../../chunk-SNZ5BAQQ.mjs";import"../../../chunk-AVHFRD6D.mjs";import{a as F}from"../../../chunk-KTET6W73.mjs";import{a as j}from"../../../chunk-3U3PZBHQ.mjs";import"../../../chunk-637VXITY.mjs";import{a as i}from"../../../chunk-2NMVE5M4.mjs";import{a as P}from"../../../chunk-TO7KJNKC.mjs";import"../../../chunk-PM35MWKG.mjs";import"../../../chunk-AZKOVKSK.mjs";import"../../../chunk-M245YHYF.mjs";import"../../../chunk-3KITWLRN.mjs";import"../../../chunk-DLUWDQSW.mjs";import"../../../chunk-HNCC3AOT.mjs";import{a as w,b as k,e as A}from"../../../chunk-5Z5PL7N3.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import{b as m}from"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import{b as v}from"../../../chunk-CSBGSBEU.mjs";import{a as h,b,c as N,d as x,e as y,f as C}from"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-YEKQJ4YC.mjs";import{useState as U}from"react";import{motion as W,AnimatePresence as _}from"framer-motion";import{Bot as $}from"lucide-react";import{motion as Y}from"framer-motion";import{Star as K}from"lucide-react";import{jsx as s,jsxs as r}from"react/jsx-runtime";function g({app:a,onOpen:d,onFavorite:l,showProgress:n=!1,className:c}){return s(Y.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:c,children:r(h,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[s(b,{className:"pb-2",children:r("div",{className:"flex items-center justify-between",children:[s("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:a.icon}),a.new?s(v,{className:"rounded-xl bg-amber-500",children:"New"}):s(m,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>l?.(a),children:s(K,{className:"h-4 w-4"})})]})}),r(y,{className:"pb-2",children:[s(N,{className:"text-lg",children:a.name}),s(x,{children:a.description}),n&&a.progress<100&&r("div",{className:"mt-2",children:[r("div",{className:"flex items-center justify-between text-sm",children:[s("span",{children:"Installation"}),r("span",{children:[a.progress,"%"]})]}),s(T,{value:a.progress,className:"h-2 mt-1 rounded-xl"})]})]}),s(C,{children:s(m,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>d?.(a),children:a.progress<100?"Continue Install":"Open"})})]})})}import{jsx as e,jsxs as o}from"react/jsx-runtime";function q({title:a="Digital Colleagues",businessUnits:d}){let[l,n]=U("home"),[c,D]=U(d[0]),u=t=>{console.log("Opening app:",t.name)},f=t=>{console.log("Favoriting app:",t.name)},R=t=>{console.log("Opening file:",t.name)},J=t=>{console.log("Sharing file:",t.name)},H=t=>{console.log("Opening project:",t.name)},L=t=>{console.log("Sharing project:",t.name)},V=t=>{D(t),console.log("Business unit changed to:",t.name)},z=()=>{console.log("Copilot clicked - navigating to chat"),n("chat")},E=t=>{console.log("Notification removed:",t)},G=()=>{console.log("All notifications removed")},M=()=>{switch(l){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",c.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:"12"}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:"8"}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:"156"}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(i,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>n("chat")}})]});case"colleagues":return e(S,{});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",c.name," team members and collaborate in real-time."]})]}),e(i,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(i,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:p.filter(t=>t.new).map(t=>e(g,{app:t,showProgress:!0,onOpen:u,onFavorite:f},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:p.map(t=>e(g,{app:t,onOpen:u,onFavorite:f},t.name))})]})]});case"knowledge":return e(F,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(j,{files:B,onFileClick:R})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:()=>console.log("New project clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:A.map(t=>e(O,{project:t,onOpen:H,onShare:L},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(i,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:I.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(P,{sidebarItems:w,title:a,notifications:k,businessUnits:d,currentBusinessUnit:c,onBusinessUnitChange:V,activeTab:l,onTabChange:n,showTabs:!0,onActionClick:z,actionIcon:e($,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:E,onRemoveAll:G,children:e(_,{mode:"wait",children:e(W.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:M()},l)})})}export{q as default};
4
+ "use client";import{a as S}from"../../../chunk-TCXAETN2.mjs";import{a as O}from"../../../chunk-PEQOQ7BK.mjs";import{a as p,b as B,d as I}from"../../../chunk-5OQF3MNO.mjs";import{a as F}from"../../../chunk-5RTGHMF3.mjs";import{a as j}from"../../../chunk-KTET6W73.mjs";import{a as T}from"../../../chunk-3U3PZBHQ.mjs";import"../../../chunk-637VXITY.mjs";import"../../../chunk-OB5WMODY.mjs";import"../../../chunk-SNZ5BAQQ.mjs";import"../../../chunk-RUOYGMOR.mjs";import"../../../chunk-WN2LPOQP.mjs";import"../../../chunk-BADFWNRL.mjs";import"../../../chunk-TUI4S4GI.mjs";import"../../../chunk-AVHFRD6D.mjs";import{a as i}from"../../../chunk-2NMVE5M4.mjs";import{a as P}from"../../../chunk-JHSHXYPK.mjs";import"../../../chunk-SWA5TRPZ.mjs";import"../../../chunk-PM35MWKG.mjs";import"../../../chunk-AZKOVKSK.mjs";import"../../../chunk-M245YHYF.mjs";import"../../../chunk-3KITWLRN.mjs";import{a as w,b as k,e as A}from"../../../chunk-PA4ZBJDO.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-INCYANPB.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import{b as m}from"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import{b as v}from"../../../chunk-CSBGSBEU.mjs";import{a as h,b,c as N,d as x,e as y,f as C}from"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-YEKQJ4YC.mjs";import{useState as U}from"react";import{motion as W,AnimatePresence as _}from"framer-motion";import{Bot as $}from"lucide-react";import{motion as Y}from"framer-motion";import{Star as K}from"lucide-react";import{jsx as s,jsxs as r}from"react/jsx-runtime";function g({app:a,onOpen:d,onFavorite:l,showProgress:n=!1,className:c}){return s(Y.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:c,children:r(h,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[s(b,{className:"pb-2",children:r("div",{className:"flex items-center justify-between",children:[s("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:a.icon}),a.new?s(v,{className:"rounded-xl bg-amber-500",children:"New"}):s(m,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>l?.(a),children:s(K,{className:"h-4 w-4"})})]})}),r(y,{className:"pb-2",children:[s(N,{className:"text-lg",children:a.name}),s(x,{children:a.description}),n&&a.progress<100&&r("div",{className:"mt-2",children:[r("div",{className:"flex items-center justify-between text-sm",children:[s("span",{children:"Installation"}),r("span",{children:[a.progress,"%"]})]}),s(F,{value:a.progress,className:"h-2 mt-1 rounded-xl"})]})]}),s(C,{children:s(m,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>d?.(a),children:a.progress<100?"Continue Install":"Open"})})]})})}import{jsx as e,jsxs as o}from"react/jsx-runtime";function q({title:a="Digital Colleagues",businessUnits:d}){let[l,n]=U("home"),[c,D]=U(d[0]),u=t=>{console.log("Opening app:",t.name)},f=t=>{console.log("Favoriting app:",t.name)},R=t=>{console.log("Opening file:",t.name)},J=t=>{console.log("Sharing file:",t.name)},H=t=>{console.log("Opening project:",t.name)},L=t=>{console.log("Sharing project:",t.name)},V=t=>{D(t),console.log("Business unit changed to:",t.name)},z=()=>{console.log("Copilot clicked - navigating to chat"),n("chat")},E=t=>{console.log("Notification removed:",t)},G=()=>{console.log("All notifications removed")},M=()=>{switch(l){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",c.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:"12"}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:"8"}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:"156"}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(i,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>n("chat")}})]});case"colleagues":return e(S,{});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",c.name," team members and collaborate in real-time."]})]}),e(i,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(i,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:p.filter(t=>t.new).map(t=>e(g,{app:t,showProgress:!0,onOpen:u,onFavorite:f},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:p.map(t=>e(g,{app:t,onOpen:u,onFavorite:f},t.name))})]})]});case"knowledge":return e(j,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(T,{files:B,onFileClick:R})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:()=>console.log("New project clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:A.map(t=>e(O,{project:t,onOpen:H,onShare:L},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(i,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:I.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(P,{sidebarItems:w,title:a,notifications:k,businessUnits:d,currentBusinessUnit:c,onBusinessUnitChange:V,activeTab:l,onTabChange:n,showTabs:!0,onActionClick:z,actionIcon:e($,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:E,onRemoveAll:G,children:e(_,{mode:"wait",children:e(W.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:M()},l)})})}export{q as default};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../../chunk-UIMLXZPF.mjs";import"../../../chunk-RUOYGMOR.mjs";import"../../../chunk-WN2LPOQP.mjs";import"../../../chunk-BADFWNRL.mjs";import"../../../chunk-TUI4S4GI.mjs";import"../../../chunk-OB5WMODY.mjs";import"../../../chunk-SNZ5BAQQ.mjs";import"../../../chunk-AVHFRD6D.mjs";import"../../../chunk-2NMVE5M4.mjs";import"../../../chunk-M245YHYF.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};
2
+ "use strict";import{a}from"../../../chunk-TCXAETN2.mjs";import"../../../chunk-OB5WMODY.mjs";import"../../../chunk-SNZ5BAQQ.mjs";import"../../../chunk-RUOYGMOR.mjs";import"../../../chunk-WN2LPOQP.mjs";import"../../../chunk-BADFWNRL.mjs";import"../../../chunk-TUI4S4GI.mjs";import"../../../chunk-AVHFRD6D.mjs";import"../../../chunk-2NMVE5M4.mjs";import"../../../chunk-M245YHYF.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};
@@ -1 +1 @@
1
- import{a as f}from"../../../chunk-UIMLXZPF.mjs";import{a as r}from"../../../chunk-LC2RBE7W.mjs";import"../../../chunk-PXPSM7OQ.mjs";import"../../../chunk-NZS3XKXU.mjs";import{a as t}from"../../../chunk-2SAKLSZ4.mjs";import"../../../chunk-PEQOQ7BK.mjs";import"../../../chunk-D3B2YO7G.mjs";import"../../../chunk-6DEY5ZDD.mjs";import"../../../chunk-KOXC4RIH.mjs";import"../../../chunk-TO2UDP5T.mjs";import"../../../chunk-AMV3MECK.mjs";import"../../../chunk-FOISWNF5.mjs";import"../../../chunk-PFLESLNT.mjs";import"../../../chunk-AB43AQKL.mjs";import"../../../chunk-ORNGKQM7.mjs";import"../../../chunk-2VZWOBGP.mjs";import"../../../chunk-6YHVVP3S.mjs";import"../../../chunk-5RTGHMF3.mjs";import"../../../chunk-RUOYGMOR.mjs";import"../../../chunk-WN2LPOQP.mjs";import"../../../chunk-BADFWNRL.mjs";import"../../../chunk-ABGNIQRP.mjs";import"../../../chunk-EOXVYLPB.mjs";import"../../../chunk-TUI4S4GI.mjs";import"../../../chunk-OB5WMODY.mjs";import"../../../chunk-SNZ5BAQQ.mjs";import"../../../chunk-AVHFRD6D.mjs";import{a as e}from"../../../chunk-KTET6W73.mjs";import{a}from"../../../chunk-FV3W3WL7.mjs";import"../../../chunk-3U3PZBHQ.mjs";import"../../../chunk-637VXITY.mjs";import{a as o}from"../../../chunk-FRKGQKEM.mjs";import"../../../chunk-MNI6AM7Q.mjs";import"../../../chunk-2NMVE5M4.mjs";import"../../../chunk-DFIXTV2M.mjs";import"../../../chunk-M245YHYF.mjs";import"../../../chunk-6SWKEZN6.mjs";import"../../../chunk-E4TE4NV6.mjs";import"../../../chunk-JFFTEK6Z.mjs";import"../../../chunk-JHNVX4UB.mjs";import"../../../chunk-7BXIU4ZM.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-INCYANPB.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-ZFUP5NVF.mjs";import"../../../chunk-4UIARERB.mjs";import"../../../chunk-D4IMQTVU.mjs";import"../../../chunk-7GSXNSLD.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FRWX5YES.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{f as ColleaguesView,a as FileView,e as KnowledgeView,r as ProjectView,t as ProjectsIndexView,o as TeamsIndexView};
1
+ import{a as f}from"../../../chunk-TCXAETN2.mjs";import{a as t}from"../../../chunk-2SAKLSZ4.mjs";import"../../../chunk-PEQOQ7BK.mjs";import"../../../chunk-D3B2YO7G.mjs";import{a as r}from"../../../chunk-S5BLSQXV.mjs";import"../../../chunk-PXPSM7OQ.mjs";import"../../../chunk-KOXC4RIH.mjs";import"../../../chunk-UA76VX54.mjs";import"../../../chunk-FOISWNF5.mjs";import"../../../chunk-PFLESLNT.mjs";import"../../../chunk-AB43AQKL.mjs";import"../../../chunk-6YHVVP3S.mjs";import"../../../chunk-AMV3MECK.mjs";import"../../../chunk-NZS3XKXU.mjs";import"../../../chunk-ORNGKQM7.mjs";import"../../../chunk-6DEY5ZDD.mjs";import"../../../chunk-2VZWOBGP.mjs";import"../../../chunk-5RTGHMF3.mjs";import{a as o}from"../../../chunk-KTET6W73.mjs";import{a}from"../../../chunk-FV3W3WL7.mjs";import"../../../chunk-3U3PZBHQ.mjs";import{a as e}from"../../../chunk-FRKGQKEM.mjs";import"../../../chunk-MNI6AM7Q.mjs";import"../../../chunk-637VXITY.mjs";import"../../../chunk-OB5WMODY.mjs";import"../../../chunk-SNZ5BAQQ.mjs";import"../../../chunk-RUOYGMOR.mjs";import"../../../chunk-WN2LPOQP.mjs";import"../../../chunk-BADFWNRL.mjs";import"../../../chunk-ABGNIQRP.mjs";import"../../../chunk-EOXVYLPB.mjs";import"../../../chunk-TUI4S4GI.mjs";import"../../../chunk-AVHFRD6D.mjs";import"../../../chunk-2NMVE5M4.mjs";import"../../../chunk-DFIXTV2M.mjs";import"../../../chunk-M245YHYF.mjs";import"../../../chunk-6SWKEZN6.mjs";import"../../../chunk-E4TE4NV6.mjs";import"../../../chunk-JFFTEK6Z.mjs";import"../../../chunk-JHNVX4UB.mjs";import"../../../chunk-7BXIU4ZM.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-INCYANPB.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-ZFUP5NVF.mjs";import"../../../chunk-4UIARERB.mjs";import"../../../chunk-D4IMQTVU.mjs";import"../../../chunk-7GSXNSLD.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FRWX5YES.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{f as ColleaguesView,a as FileView,o as KnowledgeView,r as ProjectView,t as ProjectsIndexView,e as TeamsIndexView};
@@ -0,0 +1,228 @@
1
+ var t=`# Sidebar Component with Per-Item Favorites Management
2
+
3
+ ## Overview
4
+
5
+ The Sidebar component has been enhanced with per-item favorites management functionality, allowing individual sidebar sections to limit their displayed items and let users choose favorites for each section.
6
+
7
+ ## Features
8
+
9
+ ### Basic Features
10
+ - Responsive sidebar with mobile support
11
+ - Collapsible/expandable sections
12
+ - Badge support for notifications
13
+ - Active state indication
14
+ - Business unit switching
15
+ - Search functionality
16
+
17
+ ### New: Per-Item Favorites Management
18
+ - **Per-Section Limits**: Each \`SidebarItem\` can have its own \`maxItems\` limit
19
+ - **Independent Favorites**: Users manage favorites separately for each section
20
+ - **Visual Management**: Each limited section shows item counts and "Manage" button
21
+ - **Persistent Storage**: Favorites stored per-section using \`localStorage\`
22
+ - **Priority Display**: Favorite items always appear first within each section
23
+
24
+ ## Usage
25
+
26
+ ### Basic Usage
27
+ \`\`\`tsx
28
+ import { Sidebar } from "@/components/DigitalColleagues/sidebar"
29
+
30
+ <Sidebar
31
+ items={sidebarItems}
32
+ isOpen={true}
33
+ />
34
+ \`\`\`
35
+
36
+ ### With Per-Item Limits
37
+ \`\`\`tsx
38
+ const sidebarItems = [
39
+ {
40
+ id: "teams",
41
+ title: "Teams",
42
+ icon: <Users />,
43
+ maxItems: 3, // Only show 3 teams, allow favorites selection
44
+ items: [
45
+ { id: "design", title: "Design", url: "#" },
46
+ { id: "marketing", title: "Marketing", url: "#" },
47
+ { id: "engineering", title: "Engineering", url: "#" },
48
+ { id: "finance", title: "Finance", url: "#" },
49
+ { id: "sales", title: "Sales", url: "#" },
50
+ ]
51
+ }
52
+ ]
53
+
54
+ <Sidebar
55
+ items={sidebarItems}
56
+ isOpen={true}
57
+ />
58
+ \`\`\`
59
+
60
+ ## Props
61
+
62
+ | Prop | Type | Default | Description |
63
+ |------|------|---------|-------------|
64
+ | \`items\` | \`SidebarItem[]\` | Required | Array of sidebar items to display |
65
+ | \`isOpen\` | \`boolean\` | Required | Whether the sidebar is open |
66
+ | \`isMobile\` | \`boolean\` | \`false\` | Whether to use mobile layout |
67
+ | \`onClose\` | \`() => void\` | \`undefined\` | Callback when sidebar is closed (mobile) |
68
+ | \`currentBusinessUnit\` | \`BusinessUnit\` | First unit | Currently selected business unit |
69
+ | \`onBusinessUnitChange\` | \`(unit: BusinessUnit) => void\` | \`undefined\` | Callback when business unit changes |
70
+ | \`className\` | \`string\` | \`undefined\` | Additional CSS classes |
71
+ | \`logo\` | \`string\` | \`"/headerlogo.png"\` | Logo image URL |
72
+ | \`appName\` | \`string\` | \`"Nuvia"\` | Application name |
73
+ | \`tagline\` | \`string\` | \`"Collaboration Platform"\` | Application tagline |
74
+
75
+ ## Types
76
+
77
+ ### SidebarItem
78
+ \`\`\`typescript
79
+ interface SidebarItem {
80
+ id: string // Required for favorites functionality
81
+ title: string
82
+ icon: React.ReactNode
83
+ isActive?: boolean
84
+ badge?: string
85
+ url?: string
86
+ maxItems?: number // NEW: Limit subitems shown, enables favorites
87
+ items?: {
88
+ id: string // Required for subitems too
89
+ title: string
90
+ url: string
91
+ badge?: string
92
+ }[]
93
+ }
94
+ \`\`\`
95
+
96
+ ## Behavior
97
+
98
+ ### Without maxItems on a Section
99
+ - All subitems are displayed normally
100
+ - No favorites functionality for that section
101
+ - Standard collapsible behavior
102
+
103
+ ### With maxItems on a Section
104
+ 1. **Subitems \u2264 maxItems**: All subitems shown, no management needed
105
+ 2. **Subitems > maxItems**:
106
+ - Favorite subitems appear first
107
+ - Non-favorite subitems fill remaining slots
108
+ - Clickable "X more items available - click to manage favorites" text shown when section is expanded
109
+ - Click the text to open favorites management dialog
110
+
111
+ ### Per-Section Favorites Management Dialog
112
+ - **Section-Specific**: Each section manages its own favorites independently
113
+ - **Easy Access**: Click "X more items available" text to open management
114
+ - **Checkbox Interface**: Simple checkboxes for subitems in that section
115
+ - **Visual Feedback**: Badges shown for context
116
+ - **Limit Enforcement**: Cannot select more than section's maxItems
117
+ - **Immediate Updates**: Changes reflect immediately in sidebar
118
+ - **Persistent Storage**: Preferences saved per-section to localStorage
119
+
120
+ ### Local Storage
121
+ - Key: \`sidebar-favorites\`
122
+ - Value: Object with section IDs as keys, arrays of favorite subitem IDs as values
123
+ - Example: \`{"teams": ["design", "marketing"], "projects": ["active-projects"]}\`
124
+ - Automatically syncs across browser sessions
125
+ - Falls back gracefully if localStorage unavailable
126
+
127
+ ## Examples
128
+
129
+ ### Example 1: Teams with Limited Display
130
+ \`\`\`tsx
131
+ const teamsWithLimit = {
132
+ id: "teams",
133
+ title: "Teams",
134
+ icon: <Users />,
135
+ maxItems: 2, // Show only 2 teams at a time
136
+ items: [
137
+ { id: "design", title: "Design", url: "/teams/design" },
138
+ { id: "marketing", title: "Marketing", url: "/teams/marketing" },
139
+ { id: "engineering", title: "Engineering", url: "/teams/engineering" },
140
+ { id: "finance", title: "Finance", url: "/teams/finance" },
141
+ { id: "sales", title: "Sales", url: "/teams/sales" },
142
+ ]
143
+ }
144
+ \`\`\`
145
+
146
+ ### Example 2: Multiple Sections with Different Limits
147
+ \`\`\`tsx
148
+ const sidebarItems = [
149
+ {
150
+ id: "teams",
151
+ title: "Teams",
152
+ icon: <Users />,
153
+ maxItems: 3,
154
+ items: [/* 5 teams */]
155
+ },
156
+ {
157
+ id: "projects",
158
+ title: "Projects",
159
+ icon: <Layers />,
160
+ maxItems: 2,
161
+ items: [/* 4 projects */]
162
+ },
163
+ {
164
+ id: "tools",
165
+ title: "Tools",
166
+ icon: <Wrench />,
167
+ // No maxItems = show all tools
168
+ items: [/* all tools shown */]
169
+ }
170
+ ]
171
+ \`\`\`
172
+
173
+ ## Implementation Details
174
+
175
+ ### State Management
176
+ - Uses \`useLocalStorage\` hook with object structure for per-section favorites
177
+ - Internal state for dialog visibility (tracks which section is being managed)
178
+ - Automatic filtering and sorting of subitems per section
179
+
180
+ ### Visual Indicators
181
+ - Clickable "X more items available - click to manage favorites" text appears when sections are expanded and have hidden items
182
+ - No visual changes for unlimited sections or sections showing all items
183
+ - Clean section titles without item counts
184
+
185
+ ### Performance
186
+ - Efficient per-section filtering algorithms
187
+ - Minimal re-renders when toggling favorites
188
+ - Local storage operations are section-scoped
189
+
190
+ ### Accessibility
191
+ - Proper ARIA labels and roles for section-specific dialogs
192
+ - Keyboard navigation support
193
+ - Screen reader friendly section descriptions
194
+ - Focus management in per-section dialogs
195
+
196
+ ## Migration Guide
197
+
198
+ ### From Previous Version
199
+ 1. **Add IDs**: Ensure all \`SidebarItem\` and subitem objects have unique \`id\` fields
200
+ 2. **Add maxItems**: Add \`maxItems?: number\` to sections that need limits
201
+ 3. **Update Storage**: Old global favorites will be ignored; users will need to reset preferences
202
+
203
+ ### Breaking Changes
204
+ - \`SidebarItem.id\` is now required (was optional/missing)
205
+ - Subitem objects now require \`id\` field
206
+ - Global sidebar \`maxItems\` prop removed
207
+ - Favorites storage format changed from array to object
208
+
209
+ ### Example Migration
210
+ \`\`\`typescript
211
+ // Before (global limit)
212
+ <Sidebar items={items} maxItems={5} />
213
+
214
+ // After (per-section limits)
215
+ const items = [
216
+ {
217
+ id: "teams",
218
+ title: "Teams",
219
+ maxItems: 3, // Section-specific limit
220
+ items: [
221
+ { id: "design", title: "Design", url: "#" }, // IDs required
222
+ // ...
223
+ ]
224
+ }
225
+ ]
226
+ <Sidebar items={items} />
227
+ \`\`\`
228
+ `;
@@ -0,0 +1,228 @@
1
+ import"../../chunk-YEKQJ4YC.mjs";var t=`# Sidebar Component with Per-Item Favorites Management
2
+
3
+ ## Overview
4
+
5
+ The Sidebar component has been enhanced with per-item favorites management functionality, allowing individual sidebar sections to limit their displayed items and let users choose favorites for each section.
6
+
7
+ ## Features
8
+
9
+ ### Basic Features
10
+ - Responsive sidebar with mobile support
11
+ - Collapsible/expandable sections
12
+ - Badge support for notifications
13
+ - Active state indication
14
+ - Business unit switching
15
+ - Search functionality
16
+
17
+ ### New: Per-Item Favorites Management
18
+ - **Per-Section Limits**: Each \`SidebarItem\` can have its own \`maxItems\` limit
19
+ - **Independent Favorites**: Users manage favorites separately for each section
20
+ - **Visual Management**: Each limited section shows item counts and "Manage" button
21
+ - **Persistent Storage**: Favorites stored per-section using \`localStorage\`
22
+ - **Priority Display**: Favorite items always appear first within each section
23
+
24
+ ## Usage
25
+
26
+ ### Basic Usage
27
+ \`\`\`tsx
28
+ import { Sidebar } from "@/components/DigitalColleagues/sidebar"
29
+
30
+ <Sidebar
31
+ items={sidebarItems}
32
+ isOpen={true}
33
+ />
34
+ \`\`\`
35
+
36
+ ### With Per-Item Limits
37
+ \`\`\`tsx
38
+ const sidebarItems = [
39
+ {
40
+ id: "teams",
41
+ title: "Teams",
42
+ icon: <Users />,
43
+ maxItems: 3, // Only show 3 teams, allow favorites selection
44
+ items: [
45
+ { id: "design", title: "Design", url: "#" },
46
+ { id: "marketing", title: "Marketing", url: "#" },
47
+ { id: "engineering", title: "Engineering", url: "#" },
48
+ { id: "finance", title: "Finance", url: "#" },
49
+ { id: "sales", title: "Sales", url: "#" },
50
+ ]
51
+ }
52
+ ]
53
+
54
+ <Sidebar
55
+ items={sidebarItems}
56
+ isOpen={true}
57
+ />
58
+ \`\`\`
59
+
60
+ ## Props
61
+
62
+ | Prop | Type | Default | Description |
63
+ |------|------|---------|-------------|
64
+ | \`items\` | \`SidebarItem[]\` | Required | Array of sidebar items to display |
65
+ | \`isOpen\` | \`boolean\` | Required | Whether the sidebar is open |
66
+ | \`isMobile\` | \`boolean\` | \`false\` | Whether to use mobile layout |
67
+ | \`onClose\` | \`() => void\` | \`undefined\` | Callback when sidebar is closed (mobile) |
68
+ | \`currentBusinessUnit\` | \`BusinessUnit\` | First unit | Currently selected business unit |
69
+ | \`onBusinessUnitChange\` | \`(unit: BusinessUnit) => void\` | \`undefined\` | Callback when business unit changes |
70
+ | \`className\` | \`string\` | \`undefined\` | Additional CSS classes |
71
+ | \`logo\` | \`string\` | \`"/headerlogo.png"\` | Logo image URL |
72
+ | \`appName\` | \`string\` | \`"Nuvia"\` | Application name |
73
+ | \`tagline\` | \`string\` | \`"Collaboration Platform"\` | Application tagline |
74
+
75
+ ## Types
76
+
77
+ ### SidebarItem
78
+ \`\`\`typescript
79
+ interface SidebarItem {
80
+ id: string // Required for favorites functionality
81
+ title: string
82
+ icon: React.ReactNode
83
+ isActive?: boolean
84
+ badge?: string
85
+ url?: string
86
+ maxItems?: number // NEW: Limit subitems shown, enables favorites
87
+ items?: {
88
+ id: string // Required for subitems too
89
+ title: string
90
+ url: string
91
+ badge?: string
92
+ }[]
93
+ }
94
+ \`\`\`
95
+
96
+ ## Behavior
97
+
98
+ ### Without maxItems on a Section
99
+ - All subitems are displayed normally
100
+ - No favorites functionality for that section
101
+ - Standard collapsible behavior
102
+
103
+ ### With maxItems on a Section
104
+ 1. **Subitems \u2264 maxItems**: All subitems shown, no management needed
105
+ 2. **Subitems > maxItems**:
106
+ - Favorite subitems appear first
107
+ - Non-favorite subitems fill remaining slots
108
+ - Clickable "X more items available - click to manage favorites" text shown when section is expanded
109
+ - Click the text to open favorites management dialog
110
+
111
+ ### Per-Section Favorites Management Dialog
112
+ - **Section-Specific**: Each section manages its own favorites independently
113
+ - **Easy Access**: Click "X more items available" text to open management
114
+ - **Checkbox Interface**: Simple checkboxes for subitems in that section
115
+ - **Visual Feedback**: Badges shown for context
116
+ - **Limit Enforcement**: Cannot select more than section's maxItems
117
+ - **Immediate Updates**: Changes reflect immediately in sidebar
118
+ - **Persistent Storage**: Preferences saved per-section to localStorage
119
+
120
+ ### Local Storage
121
+ - Key: \`sidebar-favorites\`
122
+ - Value: Object with section IDs as keys, arrays of favorite subitem IDs as values
123
+ - Example: \`{"teams": ["design", "marketing"], "projects": ["active-projects"]}\`
124
+ - Automatically syncs across browser sessions
125
+ - Falls back gracefully if localStorage unavailable
126
+
127
+ ## Examples
128
+
129
+ ### Example 1: Teams with Limited Display
130
+ \`\`\`tsx
131
+ const teamsWithLimit = {
132
+ id: "teams",
133
+ title: "Teams",
134
+ icon: <Users />,
135
+ maxItems: 2, // Show only 2 teams at a time
136
+ items: [
137
+ { id: "design", title: "Design", url: "/teams/design" },
138
+ { id: "marketing", title: "Marketing", url: "/teams/marketing" },
139
+ { id: "engineering", title: "Engineering", url: "/teams/engineering" },
140
+ { id: "finance", title: "Finance", url: "/teams/finance" },
141
+ { id: "sales", title: "Sales", url: "/teams/sales" },
142
+ ]
143
+ }
144
+ \`\`\`
145
+
146
+ ### Example 2: Multiple Sections with Different Limits
147
+ \`\`\`tsx
148
+ const sidebarItems = [
149
+ {
150
+ id: "teams",
151
+ title: "Teams",
152
+ icon: <Users />,
153
+ maxItems: 3,
154
+ items: [/* 5 teams */]
155
+ },
156
+ {
157
+ id: "projects",
158
+ title: "Projects",
159
+ icon: <Layers />,
160
+ maxItems: 2,
161
+ items: [/* 4 projects */]
162
+ },
163
+ {
164
+ id: "tools",
165
+ title: "Tools",
166
+ icon: <Wrench />,
167
+ // No maxItems = show all tools
168
+ items: [/* all tools shown */]
169
+ }
170
+ ]
171
+ \`\`\`
172
+
173
+ ## Implementation Details
174
+
175
+ ### State Management
176
+ - Uses \`useLocalStorage\` hook with object structure for per-section favorites
177
+ - Internal state for dialog visibility (tracks which section is being managed)
178
+ - Automatic filtering and sorting of subitems per section
179
+
180
+ ### Visual Indicators
181
+ - Clickable "X more items available - click to manage favorites" text appears when sections are expanded and have hidden items
182
+ - No visual changes for unlimited sections or sections showing all items
183
+ - Clean section titles without item counts
184
+
185
+ ### Performance
186
+ - Efficient per-section filtering algorithms
187
+ - Minimal re-renders when toggling favorites
188
+ - Local storage operations are section-scoped
189
+
190
+ ### Accessibility
191
+ - Proper ARIA labels and roles for section-specific dialogs
192
+ - Keyboard navigation support
193
+ - Screen reader friendly section descriptions
194
+ - Focus management in per-section dialogs
195
+
196
+ ## Migration Guide
197
+
198
+ ### From Previous Version
199
+ 1. **Add IDs**: Ensure all \`SidebarItem\` and subitem objects have unique \`id\` fields
200
+ 2. **Add maxItems**: Add \`maxItems?: number\` to sections that need limits
201
+ 3. **Update Storage**: Old global favorites will be ignored; users will need to reset preferences
202
+
203
+ ### Breaking Changes
204
+ - \`SidebarItem.id\` is now required (was optional/missing)
205
+ - Subitem objects now require \`id\` field
206
+ - Global sidebar \`maxItems\` prop removed
207
+ - Favorites storage format changed from array to object
208
+
209
+ ### Example Migration
210
+ \`\`\`typescript
211
+ // Before (global limit)
212
+ <Sidebar items={items} maxItems={5} />
213
+
214
+ // After (per-section limits)
215
+ const items = [
216
+ {
217
+ id: "teams",
218
+ title: "Teams",
219
+ maxItems: 3, // Section-specific limit
220
+ items: [
221
+ { id: "design", title: "Design", url: "#" }, // IDs required
222
+ // ...
223
+ ]
224
+ }
225
+ ]
226
+ <Sidebar items={items} />
227
+ \`\`\`
228
+ `;export{t as default};
@@ -1,4 +1,4 @@
1
- import type { BusinessUnit, SidebarItem } from "../DigitalColleagues/types";
1
+ import type { BusinessUnit, SidebarItem } from "./types";
2
2
  interface SidebarProps {
3
3
  items: SidebarItem[];
4
4
  isOpen: boolean;
@@ -10,7 +10,8 @@ interface SidebarProps {
10
10
  logo?: string;
11
11
  appName?: string;
12
12
  tagline?: string;
13
+ maxItems?: number;
13
14
  }
14
15
  export declare function Sidebar({ items, isOpen, isMobile, onClose, currentBusinessUnit, // Default to Design unit
15
- onBusinessUnitChange, className, logo, appName, tagline, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
16
+ onBusinessUnitChange, className, logo, appName, tagline, maxItems, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
16
17
  export {};