cortex-react-components 3.3.0 → 4.0.2

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 (364) hide show
  1. package/dist/{chunk-SSDRUPMS.mjs → chunk-2BKXIIFJ.mjs} +183 -36
  2. package/dist/{chunk-XFJPL6FS.mjs → chunk-3DWDGYDG.mjs} +1 -1
  3. package/dist/{chunk-WX5QYPGU.mjs → chunk-3K6EVFOW.mjs} +1 -1
  4. package/dist/{chunk-HLEMFDTD.mjs → chunk-3R2LCGLI.mjs} +1 -1
  5. package/dist/{chunk-JFXWP3RQ.mjs → chunk-3RYHYKVQ.mjs} +1 -1
  6. package/dist/{chunk-VMYEV3FG.mjs → chunk-4YRR74Y4.mjs} +1 -1
  7. package/dist/{chunk-PJZ5PWKP.mjs → chunk-5OGDBGXG.mjs} +1 -1
  8. package/dist/{chunk-I4MTJN23.mjs → chunk-6A7T3O6T.mjs} +6 -5
  9. package/dist/{chunk-KIZUBPPQ.mjs → chunk-6GO5N6ZP.mjs} +1 -1
  10. package/dist/{chunk-EJJITIA3.mjs → chunk-6LF4K7ER.mjs} +4 -4
  11. package/dist/{chunk-URC56DLC.mjs → chunk-6S7EQDLL.mjs} +1 -1
  12. package/dist/{chunk-EC5I4CIO.mjs → chunk-7HHLKQE4.mjs} +2 -2
  13. package/dist/{chunk-RFQKQLNT.mjs → chunk-7LM2P6N3.mjs} +4 -4
  14. package/dist/{chunk-IJ3E6ZXF.mjs → chunk-AZ5MV7NO.mjs} +1 -1
  15. package/dist/{chunk-V6YEUAIH.mjs → chunk-CV7GOXGO.mjs} +2 -2
  16. package/dist/{chunk-L4SNPNYU.mjs → chunk-D3AHBPI5.mjs} +2 -2
  17. package/dist/{chunk-FABRRO2B.mjs → chunk-DRLNETNN.mjs} +1 -1
  18. package/dist/{chunk-OXP3LJ53.mjs → chunk-DVWMM7AI.mjs} +4 -4
  19. package/dist/{chunk-HUZCVQP7.mjs → chunk-EEVXIKNB.mjs} +1 -1
  20. package/dist/{chunk-Z54HOXSV.mjs → chunk-ETV6EEYB.mjs} +1 -1
  21. package/dist/{chunk-EDYFH3EJ.mjs → chunk-F6SQTC6R.mjs} +4 -4
  22. package/dist/{chunk-IVOPNDSN.mjs → chunk-G5N5MCLS.mjs} +5 -5
  23. package/dist/{chunk-NVSA5BFC.mjs → chunk-GR45UN4U.mjs} +2 -2
  24. package/dist/{chunk-QETXXFRW.mjs → chunk-HNVHGBNE.mjs} +1 -1
  25. package/dist/{chunk-QPO45D6F.mjs → chunk-I2MVZVXE.mjs} +1 -1
  26. package/dist/chunk-IC4N2KYF.mjs +401 -0
  27. package/dist/{chunk-MZVEK6A5.mjs → chunk-IM5B557Z.mjs} +16 -16
  28. package/dist/{chunk-Q6CUUDUR.mjs → chunk-IQ67MHAY.mjs} +1 -1
  29. package/dist/{chunk-OCVHSV6Z.mjs → chunk-IWQEM5KO.mjs} +2 -2
  30. package/dist/{chunk-TDOOQIMQ.mjs → chunk-J5GM5CJK.mjs} +2 -2
  31. package/dist/chunk-JCSRFM37.mjs +595 -0
  32. package/dist/{chunk-QMFGV3M5.mjs → chunk-JOGVCBYP.mjs} +1 -1
  33. package/dist/{chunk-4P5Q6UXF.mjs → chunk-JWMQOARK.mjs} +1 -1
  34. package/dist/{chunk-DSVXGGGV.mjs → chunk-K5ZNBHQO.mjs} +1 -1
  35. package/dist/{chunk-YY4VLYYH.mjs → chunk-KJVAS4I7.mjs} +26 -11
  36. package/dist/{chunk-XZFMQXYJ.mjs → chunk-KMGTUNRZ.mjs} +1 -1
  37. package/dist/{chunk-ETG5N2OG.mjs → chunk-KYY7BMXI.mjs} +1 -1
  38. package/dist/{chunk-SSE3MQDP.mjs → chunk-LRMDRQRJ.mjs} +2 -2
  39. package/dist/{chunk-LGGOEYDB.mjs → chunk-LRTEGIZ7.mjs} +10 -10
  40. package/dist/{chunk-XGHUG2WQ.mjs → chunk-MDG2I4PB.mjs} +1 -1
  41. package/dist/{chunk-HMVIQFLN.mjs → chunk-N5HTSJLI.mjs} +1 -1
  42. package/dist/{chunk-IDMTHUC4.mjs → chunk-N5Q2DYUR.mjs} +1 -1
  43. package/dist/{chunk-7ZCW4XMR.mjs → chunk-NSYYRG6A.mjs} +1 -1
  44. package/dist/{chunk-CONYNX7Y.mjs → chunk-NUAJQK4H.mjs} +1 -1
  45. package/dist/{chunk-LM4J7254.mjs → chunk-OR3XMMEK.mjs} +9 -9
  46. package/dist/{chunk-EGZL4DVZ.mjs → chunk-PAXCURFR.mjs} +1 -1
  47. package/dist/{chunk-RC6YHGVV.mjs → chunk-PE7KJR4A.mjs} +1 -1
  48. package/dist/{chunk-LTDXFLCW.mjs → chunk-QDO6BAAN.mjs} +12 -4
  49. package/dist/{chunk-NQMJXY3N.mjs → chunk-QJGBUBSB.mjs} +1 -1
  50. package/dist/{chunk-YD7Q7IZX.mjs → chunk-QJQ66DYZ.mjs} +1 -1
  51. package/dist/{chunk-WJTVZ6CB.mjs → chunk-RNHGLZYP.mjs} +1 -1
  52. package/dist/{chunk-2D3EN2AX.mjs → chunk-SJI6X5DK.mjs} +2 -2
  53. package/dist/{chunk-4JHX6BW6.mjs → chunk-TZH6L2OH.mjs} +1 -1
  54. package/dist/{chunk-OPJMXB4K.mjs → chunk-UCK4TW63.mjs} +4 -4
  55. package/dist/{chunk-36W3BORX.mjs → chunk-WAR2OXXK.mjs} +1 -1
  56. package/dist/{chunk-SM57JU3T.mjs → chunk-WZBXR7J3.mjs} +5 -5
  57. package/dist/{chunk-LPK5R32M.mjs → chunk-X4GP2O3Y.mjs} +1 -1
  58. package/dist/{chunk-6NRBLKM4.mjs → chunk-XCZCWSOY.mjs} +2 -2
  59. package/dist/{chunk-KOK3VCJZ.mjs → chunk-Y4KJTMKO.mjs} +1 -1
  60. package/dist/{chunk-YFOEG4PP.mjs → chunk-Z6MYLHDW.mjs} +1 -1
  61. package/dist/components/AdvancedComponents/AppSidebar.d.ts +1 -1
  62. package/dist/components/AdvancedComponents/AppSidebar.js +480 -301
  63. package/dist/components/AdvancedComponents/AppSidebar.mjs +3 -3
  64. package/dist/components/AdvancedComponents/index.js +480 -301
  65. package/dist/components/AdvancedComponents/index.mjs +3 -3
  66. package/dist/components/Blocks/Banner.mjs +8 -8
  67. package/dist/components/Blocks/CallToAction.mjs +8 -8
  68. package/dist/components/Blocks/CollapsibleArea.mjs +9 -9
  69. package/dist/components/Blocks/Content.mjs +9 -9
  70. package/dist/components/Blocks/FeaturesBlock.mjs +8 -8
  71. package/dist/components/Blocks/ImageBlock.mjs +3 -3
  72. package/dist/components/Blocks/MediaBlock.mjs +3 -3
  73. package/dist/components/Blocks/RelatedPosts.mjs +10 -10
  74. package/dist/components/Blocks/RenderBlocks.mjs +11 -11
  75. package/dist/components/Blocks/ReusableContentBlock.mjs +11 -11
  76. package/dist/components/Blocks/index.mjs +18 -18
  77. package/dist/components/CRM/index.mjs +3 -3
  78. package/dist/components/Cards/ContentCard.mjs +8 -8
  79. package/dist/components/Cards/FeatureCard.mjs +8 -8
  80. package/dist/components/Cards/index.mjs +14 -14
  81. package/dist/components/Chat/ChatInterface.mjs +11 -11
  82. package/dist/components/Chat/CopilotInterface.d.ts +1 -1
  83. package/dist/components/Chat/CopilotInterface.js +527 -330
  84. package/dist/components/Chat/CopilotInterface.mjs +16 -16
  85. package/dist/components/Chat/PartTypes/MessageHandler.mjs +9 -9
  86. package/dist/components/Chat/PartTypes/index.mjs +11 -11
  87. package/dist/components/Chat/chat-session-sidebar.d.ts +1 -1
  88. package/dist/components/Chat/demo-long-messages.js +527 -330
  89. package/dist/components/Chat/demo-long-messages.mjs +16 -16
  90. package/dist/components/Chat/demo-tests.js +527 -330
  91. package/dist/components/Chat/demo-tests.mjs +16 -16
  92. package/dist/components/Chat/demo.js +527 -330
  93. package/dist/components/Chat/demo.mjs +16 -16
  94. package/dist/components/Chat/example-usage.js +527 -330
  95. package/dist/components/Chat/example-usage.mjs +16 -16
  96. package/dist/components/Chat/example-with-vercel-ai.js +527 -330
  97. package/dist/components/Chat/example-with-vercel-ai.mjs +16 -16
  98. package/dist/components/Chat/index.js +527 -330
  99. package/dist/components/Chat/index.mjs +21 -21
  100. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +2 -2
  101. package/dist/components/DeliveryLead/index.mjs +4 -4
  102. package/dist/components/DigitalColleagues/Views/TeamsIndexView.d.ts +1 -9
  103. package/dist/components/DigitalColleagues/Views/TeamsIndexView.js +22 -27
  104. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +4 -6
  105. package/dist/components/DigitalColleagues/index.d.ts +0 -18
  106. package/dist/components/DigitalColleagues/index.js +0 -16754
  107. package/dist/components/DigitalColleagues/test-data.d.ts +1 -112
  108. package/dist/components/DigitalColleagues/test-data.js +482 -308
  109. package/dist/components/DigitalColleagues/test-data.mjs +1 -5
  110. package/dist/components/Foundry/AppSidebarLeft.mjs +3 -3
  111. package/dist/components/Foundry/Knowledge/add-knowledge-modal.mjs +3 -3
  112. package/dist/components/Foundry/Knowledge/add-team-context.mjs +3 -3
  113. package/dist/components/Foundry/MainPage.mjs +7 -7
  114. package/dist/components/Foundry/ManagementSidebar.d.ts +2 -2
  115. package/dist/components/Foundry/ManagementSidebar.js +11 -3
  116. package/dist/components/Foundry/ManagementSidebar.mjs +1 -1
  117. package/dist/components/Foundry/Pages/dashboardpage.js +1423 -2039
  118. package/dist/components/Foundry/Pages/dashboardpage.mjs +23 -24
  119. package/dist/components/Foundry/RichText/index.mjs +3 -3
  120. package/dist/components/Foundry/RichText/plugins/toolbar-plugin.mjs +2 -2
  121. package/dist/components/Foundry/Views/ColleaguesView.js +5 -4
  122. package/dist/components/Foundry/Views/ColleaguesView.mjs +3 -3
  123. package/dist/components/Foundry/Views/KnowledgeView.mjs +10 -10
  124. package/dist/components/Foundry/Views/TeamsIndexView.js +5 -4
  125. package/dist/components/Foundry/Views/TeamsIndexView.mjs +4 -4
  126. package/dist/components/Foundry/Views/index.js +1350 -785
  127. package/dist/components/Foundry/Views/index.mjs +50 -49
  128. package/dist/components/{.archive → Foundry}/app-card.d.ts +1 -1
  129. package/dist/components/{DigitalColleagues/colleague-type-selection.js → Foundry/app-card.js} +89 -117
  130. package/dist/components/{DigitalColleagues/colleague-card.mjs → Foundry/app-card.mjs} +4 -5
  131. package/dist/components/Foundry/document-edit.mjs +4 -4
  132. package/dist/components/Foundry/document-preview-examples.mjs +5 -5
  133. package/dist/components/Foundry/document-preview.mjs +5 -5
  134. package/dist/components/Foundry/file-edit.mjs +7 -7
  135. package/dist/components/Foundry/foundary-layout.js +480 -301
  136. package/dist/components/Foundry/foundary-layout.mjs +4 -4
  137. package/dist/components/Foundry/index.js +2746 -2866
  138. package/dist/components/Foundry/index.mjs +78 -79
  139. package/dist/components/Foundry/knowledge-browser.mjs +6 -6
  140. package/dist/components/Foundry/types.d.ts +26 -0
  141. package/dist/components/HeaderFooter/Header.mjs +1 -1
  142. package/dist/components/HeaderFooter/SectionHeading.mjs +9 -9
  143. package/dist/components/HeaderFooter/index.mjs +5 -5
  144. package/dist/components/Heros/DashboardHero/DashboardHero.js +5 -4
  145. package/dist/components/Heros/DashboardHero/DashboardHero.mjs +2 -2
  146. package/dist/components/Heros/DashboardHero/index.js +5 -4
  147. package/dist/components/Heros/DashboardHero/index.mjs +2 -2
  148. package/dist/components/Heros/HighImpact/index.mjs +9 -9
  149. package/dist/components/Heros/LowImpact/index.mjs +9 -9
  150. package/dist/components/Heros/MediumImpact/index.mjs +9 -9
  151. package/dist/components/Heros/PostHero/index.mjs +3 -3
  152. package/dist/components/Heros/RenderHero.mjs +12 -12
  153. package/dist/components/Heros/index.js +5 -4
  154. package/dist/components/Heros/index.mjs +19 -19
  155. package/dist/components/Layouts/OutputHeaderFooter.mjs +11 -11
  156. package/dist/components/Layouts/Print.mjs +15 -15
  157. package/dist/components/Layouts/SlideShow.mjs +17 -17
  158. package/dist/components/Layouts/index.mjs +21 -21
  159. package/dist/components/Menus/SidebarLeft.mjs +3 -3
  160. package/dist/components/Menus/SidebarLeftMulti.mjs +3 -3
  161. package/dist/components/Menus/SidebarRight.mjs +3 -3
  162. package/dist/components/Menus/index.mjs +5 -5
  163. package/dist/components/Payload/CollectionArchive/index.mjs +4 -4
  164. package/dist/components/Payload/Media/index.mjs +2 -2
  165. package/dist/components/Payload/PayloadCard/index.mjs +3 -3
  166. package/dist/components/Payload/RichText/index.mjs +8 -8
  167. package/dist/components/Payload/RichText/serialize.mjs +8 -8
  168. package/dist/components/Payload/index.mjs +10 -10
  169. package/dist/components/Projects/EpicFilter.d.ts +6 -2
  170. package/dist/components/Projects/EpicFilter.js +6 -6
  171. package/dist/components/Projects/EpicFilter.mjs +6 -6
  172. package/dist/components/Projects/EpicsView.d.ts +12 -2
  173. package/dist/components/Projects/EpicsView.js +3980 -736
  174. package/dist/components/Projects/EpicsView.mjs +46 -4
  175. package/dist/components/Projects/FileView.js +5 -4
  176. package/dist/components/Projects/FileView.mjs +11 -11
  177. package/dist/components/Projects/GanttView.d.ts +13 -0
  178. package/dist/components/{DigitalColleagues/colleague-card.js → Projects/GanttView.js} +559 -260
  179. package/dist/components/{DigitalColleagues/digital-colleague-clone.mjs → Projects/GanttView.mjs} +7 -6
  180. package/dist/components/Projects/KanbanBoardView.js +5 -4
  181. package/dist/components/Projects/KanbanBoardView.mjs +16 -16
  182. package/dist/components/Projects/KanbanColumn.d.ts +1 -1
  183. package/dist/components/Projects/PlanningView.js +5 -4
  184. package/dist/components/Projects/PlanningView.mjs +3 -3
  185. package/dist/components/Projects/ProjectPage.d.ts +2 -2
  186. package/dist/components/Projects/ProjectPage.js +1725 -964
  187. package/dist/components/Projects/ProjectPage.mjs +29 -28
  188. package/dist/components/Projects/ProjectView.d.ts +1 -1
  189. package/dist/components/Projects/ProjectView.js +1207 -642
  190. package/dist/components/Projects/ProjectView.mjs +24 -23
  191. package/dist/components/Projects/ProjectsIndexView.js +5 -4
  192. package/dist/components/Projects/ProjectsIndexView.mjs +4 -4
  193. package/dist/components/Projects/SprintBoardView.d.ts +3 -0
  194. package/dist/components/Projects/SprintBoardView.js +251 -109
  195. package/dist/components/Projects/SprintBoardView.mjs +16 -16
  196. package/dist/components/Projects/TaskDetailsModal.mjs +10 -10
  197. package/dist/components/Projects/TasksView.js +5 -4
  198. package/dist/components/Projects/TasksView.mjs +3 -3
  199. package/dist/components/Projects/business-unit-switcher.d.ts +1 -1
  200. package/dist/components/Projects/business-units.d.ts +1 -1
  201. package/dist/components/Projects/file-list.mjs +8 -8
  202. package/dist/components/Projects/index.js +537 -230
  203. package/dist/components/Projects/index.mjs +24 -24
  204. package/dist/components/Projects/project-card.d.ts +1 -1
  205. package/dist/components/Projects/project-form.d.ts +1 -1
  206. package/dist/components/Projects/team-card.d.ts +1 -1
  207. package/dist/components/Projects/team-switcher-bar.d.ts +1 -1
  208. package/dist/components/Projects/test-data.d.ts +448 -29
  209. package/dist/components/dc-temp/dashboard-integration-example.js +497 -325
  210. package/dist/components/dc-temp/dashboard-integration-example.mjs +6 -6
  211. package/dist/components/dc-temp/index.d.ts +3 -3
  212. package/dist/components/dc-temp/index.js +3745 -2979
  213. package/dist/components/dc-temp/index.mjs +24 -22
  214. package/dist/components/dc-temp/mock-data.d.ts +1 -1
  215. package/dist/components/index.js +4128 -4209
  216. package/dist/components/index.mjs +176 -178
  217. package/dist/components/ui/index.mjs +9 -9
  218. package/dist/components/ui/sidebar.mjs +2 -2
  219. package/dist/decorators/Intranet.css +54 -14
  220. package/dist/decorators/Intranet.mjs +103 -105
  221. package/dist/globals.css +54 -14
  222. package/dist/hooks/use-local-storage.d.ts +2 -1
  223. package/dist/hooks/use-local-storage.js +5 -4
  224. package/dist/hooks/use-local-storage.mjs +1 -1
  225. package/dist/index.js +4124 -4205
  226. package/dist/index.mjs +187 -189
  227. package/dist/metafile-cjs.json +1 -1
  228. package/dist/metafile-esm.json +1 -1
  229. package/dist/pages/Blog.mjs +15 -15
  230. package/dist/pages/Documentation.mjs +7 -7
  231. package/dist/pages/IndexPage.mjs +20 -20
  232. package/dist/pages/Intranet.mjs +4 -4
  233. package/dist/pages/LandingPage.mjs +113 -115
  234. package/dist/pages/Page.mjs +19 -19
  235. package/dist/pages/Publish.mjs +104 -106
  236. package/dist/pages/Website.mjs +20 -20
  237. package/dist/sections/AboutSection.mjs +10 -10
  238. package/dist/sections/BlogDetail.mjs +9 -9
  239. package/dist/sections/BlogList.mjs +10 -10
  240. package/dist/sections/BlogListSection.mjs +5 -5
  241. package/dist/sections/ContactSection.mjs +10 -10
  242. package/dist/sections/PageSections.mjs +113 -115
  243. package/dist/sections/PricingSection.mjs +10 -10
  244. package/dist/sections/ServiceDetail.mjs +9 -9
  245. package/dist/sections/ServiceDetailSection.mjs +9 -9
  246. package/dist/sections/ServiceSection.mjs +104 -106
  247. package/dist/sections/index.mjs +113 -115
  248. package/package.json +5 -2
  249. package/dist/chunk-5MMSWFVA.mjs +0 -364
  250. package/dist/chunk-7TDXZ32Q.mjs +0 -197
  251. package/dist/chunk-APXXTGT4.mjs +0 -424
  252. package/dist/chunk-BZENEU5C.mjs +0 -160
  253. package/dist/chunk-C444TUVA.mjs +0 -306
  254. package/dist/chunk-CNQTT5P3.mjs +0 -276
  255. package/dist/chunk-CQKCEXF2.mjs +0 -82
  256. package/dist/chunk-EKQB7NJA.mjs +0 -194
  257. package/dist/chunk-G4WW3ZTX.mjs +0 -1063
  258. package/dist/chunk-IWG2URAU.mjs +0 -74
  259. package/dist/chunk-IWSATDRG.mjs +0 -118
  260. package/dist/chunk-JRNDRMIC.mjs +0 -73
  261. package/dist/chunk-K2C4VMGF.mjs +0 -121
  262. package/dist/chunk-LQQ6C7FN.mjs +0 -365
  263. package/dist/chunk-M6ELOAGS.mjs +0 -136
  264. package/dist/chunk-NAUBZM7P.mjs +0 -183
  265. package/dist/chunk-NHDPHK6D.mjs +0 -72
  266. package/dist/chunk-R5MJWISX.mjs +0 -194
  267. package/dist/chunk-RKYMAFRJ.mjs +0 -92
  268. package/dist/chunk-SZBUXY6L.mjs +0 -121
  269. package/dist/chunk-VY6L37RQ.mjs +0 -103
  270. package/dist/chunk-X6UI73UN.mjs +0 -262
  271. package/dist/components/DigitalColleagues/AppSidebarLeft.d.ts +0 -47
  272. package/dist/components/DigitalColleagues/AppSidebarLeft.js +0 -3407
  273. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +0 -23
  274. package/dist/components/DigitalColleagues/DashboardHeader.d.ts +0 -8
  275. package/dist/components/DigitalColleagues/DashboardHeader.js +0 -2756
  276. package/dist/components/DigitalColleagues/DashboardHeader.mjs +0 -15
  277. package/dist/components/DigitalColleagues/DigitalColleageusLayout.css +0 -917
  278. package/dist/components/DigitalColleagues/DigitalColleageusLayout.d.ts +0 -28
  279. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +0 -4417
  280. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +0 -31
  281. package/dist/components/DigitalColleagues/MainPage.css +0 -917
  282. package/dist/components/DigitalColleagues/MainPage.d.ts +0 -3
  283. package/dist/components/DigitalColleagues/MainPage.js +0 -4080
  284. package/dist/components/DigitalColleagues/MainPage.mjs +0 -46
  285. package/dist/components/DigitalColleagues/ManagementSidebar.d.ts +0 -8
  286. package/dist/components/DigitalColleagues/ManagementSidebar.js +0 -99
  287. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +0 -9
  288. package/dist/components/DigitalColleagues/Pages/dashboardpage.css +0 -917
  289. package/dist/components/DigitalColleagues/Pages/dashboardpage.d.ts +0 -18
  290. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +0 -8514
  291. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +0 -78
  292. package/dist/components/DigitalColleagues/README-document-edit.js +0 -2
  293. package/dist/components/DigitalColleagues/README-document-edit.mjs +0 -7
  294. package/dist/components/DigitalColleagues/README-document-preview.js +0 -2
  295. package/dist/components/DigitalColleagues/README-document-preview.mjs +0 -7
  296. package/dist/components/DigitalColleagues/SearchableSelect.css +0 -917
  297. package/dist/components/DigitalColleagues/SearchableSelect.d.ts +0 -16
  298. package/dist/components/DigitalColleagues/SearchableSelect.js +0 -2745
  299. package/dist/components/DigitalColleagues/SearchableSelect.mjs +0 -16
  300. package/dist/components/DigitalColleagues/Views/ColleaguesView.css +0 -917
  301. package/dist/components/DigitalColleagues/Views/ColleaguesView.d.ts +0 -14
  302. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +0 -3795
  303. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +0 -28
  304. package/dist/components/DigitalColleagues/Views/KnowledgeView.css +0 -917
  305. package/dist/components/DigitalColleagues/Views/KnowledgeView.d.ts +0 -11
  306. package/dist/components/DigitalColleagues/Views/KnowledgeView.docs.js +0 -2
  307. package/dist/components/DigitalColleagues/Views/KnowledgeView.docs.mjs +0 -7
  308. package/dist/components/DigitalColleagues/Views/KnowledgeView.js +0 -3935
  309. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +0 -26
  310. package/dist/components/DigitalColleagues/Views/index.css +0 -917
  311. package/dist/components/DigitalColleagues/Views/index.d.ts +0 -7
  312. package/dist/components/DigitalColleagues/Views/index.js +0 -12284
  313. package/dist/components/DigitalColleagues/Views/index.mjs +0 -114
  314. package/dist/components/DigitalColleagues/colleague-card.css +0 -917
  315. package/dist/components/DigitalColleagues/colleague-card.d.ts +0 -12
  316. package/dist/components/DigitalColleagues/colleague-form.css +0 -917
  317. package/dist/components/DigitalColleagues/colleague-form.d.ts +0 -14
  318. package/dist/components/DigitalColleagues/colleague-form.js +0 -3086
  319. package/dist/components/DigitalColleagues/colleague-form.mjs +0 -22
  320. package/dist/components/DigitalColleagues/colleague-type-selection.css +0 -917
  321. package/dist/components/DigitalColleagues/colleague-type-selection.d.ts +0 -7
  322. package/dist/components/DigitalColleagues/colleague-type-selection.mjs +0 -16
  323. package/dist/components/DigitalColleagues/digital-colleague-clone.css +0 -917
  324. package/dist/components/DigitalColleagues/digital-colleague-clone.d.ts +0 -9
  325. package/dist/components/DigitalColleagues/digital-colleague-clone.js +0 -2828
  326. package/dist/components/DigitalColleagues/digital-colleague-options.css +0 -917
  327. package/dist/components/DigitalColleagues/digital-colleague-options.d.ts +0 -7
  328. package/dist/components/DigitalColleagues/digital-colleague-options.js +0 -2697
  329. package/dist/components/DigitalColleagues/digital-colleague-options.mjs +0 -16
  330. package/dist/components/DigitalColleagues/document-edit.css +0 -917
  331. package/dist/components/DigitalColleagues/document-edit.d.ts +0 -10
  332. package/dist/components/DigitalColleagues/document-edit.js +0 -3112
  333. package/dist/components/DigitalColleagues/document-edit.mjs +0 -20
  334. package/dist/components/DigitalColleagues/document-preview-examples.css +0 -917
  335. package/dist/components/DigitalColleagues/document-preview-examples.d.ts +0 -12
  336. package/dist/components/DigitalColleagues/document-preview-examples.js +0 -3433
  337. package/dist/components/DigitalColleagues/document-preview-examples.mjs +0 -151
  338. package/dist/components/DigitalColleagues/document-preview.css +0 -917
  339. package/dist/components/DigitalColleagues/document-preview.d.ts +0 -18
  340. package/dist/components/DigitalColleagues/document-preview.js +0 -3296
  341. package/dist/components/DigitalColleagues/document-preview.mjs +0 -21
  342. package/dist/components/DigitalColleagues/index.css +0 -917
  343. package/dist/components/DigitalColleagues/index.mjs +0 -200
  344. package/dist/components/DigitalColleagues/knowledge-browser.css +0 -917
  345. package/dist/components/DigitalColleagues/knowledge-browser.d.ts +0 -13
  346. package/dist/components/DigitalColleagues/knowledge-browser.js +0 -3581
  347. package/dist/components/DigitalColleagues/knowledge-browser.mjs +0 -23
  348. package/dist/components/DigitalColleagues/knowledge-search.css +0 -917
  349. package/dist/components/DigitalColleagues/knowledge-search.d.ts +0 -12
  350. package/dist/components/DigitalColleagues/knowledge-search.js +0 -2819
  351. package/dist/components/DigitalColleagues/knowledge-search.mjs +0 -20
  352. package/dist/components/DigitalColleagues/team-form.css +0 -917
  353. package/dist/components/DigitalColleagues/team-form.d.ts +0 -24
  354. package/dist/components/DigitalColleagues/team-form.js +0 -2836
  355. package/dist/components/DigitalColleagues/team-form.mjs +0 -20
  356. package/dist/components/DigitalColleagues/types.d.ts +0 -289
  357. package/dist/components/DigitalColleagues/types.js +0 -18
  358. package/dist/{chunk-GGOGMLBY.mjs → chunk-AKMJBGUU.mjs} +3 -3
  359. package/dist/{chunk-AEFGMCK3.mjs → chunk-D5KV6INF.mjs} +3 -3
  360. package/dist/{chunk-SNG6OKEL.mjs → chunk-FTVOJKVA.mjs} +3 -3
  361. package/dist/{chunk-GZGWWPCP.mjs → chunk-L666B5DN.mjs} +12 -12
  362. package/dist/{chunk-2YHN7ZCJ.mjs → chunk-NKRBXAPF.mjs} +3 -3
  363. /package/dist/components/{DigitalColleagues/AppSidebarLeft.css → Foundry/app-card.css} +0 -0
  364. /package/dist/components/{DigitalColleagues/DashboardHeader.css → Projects/GanttView.css} +0 -0
@@ -1,3935 +0,0 @@
1
- "use client";
2
- "use strict";
3
- 'use client'
4
-
5
- "use strict";
6
- var __create = Object.create;
7
- var __defProp = Object.defineProperty;
8
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
- var __getOwnPropNames = Object.getOwnPropertyNames;
10
- var __getProtoOf = Object.getPrototypeOf;
11
- var __hasOwnProp = Object.prototype.hasOwnProperty;
12
- var __export = (target, all) => {
13
- for (var name in all)
14
- __defProp(target, name, { get: all[name], enumerable: true });
15
- };
16
- var __copyProps = (to, from, except, desc) => {
17
- if (from && typeof from === "object" || typeof from === "function") {
18
- for (let key of __getOwnPropNames(from))
19
- if (!__hasOwnProp.call(to, key) && key !== except)
20
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
- mod
31
- ));
32
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
-
34
- // src/components/DigitalColleagues/Views/KnowledgeView.tsx
35
- var KnowledgeView_exports = {};
36
- __export(KnowledgeView_exports, {
37
- default: () => KnowledgeView
38
- });
39
- module.exports = __toCommonJS(KnowledgeView_exports);
40
- var import_react11 = require("react");
41
-
42
- // src/components/Heros/DashboardHero/DashboardHero.tsx
43
- var import_react2 = require("react");
44
- var import_react3 = require("motion/react");
45
-
46
- // src/components/ui/badge.tsx
47
- var import_class_variance_authority = require("class-variance-authority");
48
-
49
- // src/utils/cn.ts
50
- var import_clsx = require("clsx");
51
-
52
- // node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
53
- var CLASS_PART_SEPARATOR = "-";
54
- var createClassGroupUtils = (config) => {
55
- const classMap = createClassMap(config);
56
- const {
57
- conflictingClassGroups,
58
- conflictingClassGroupModifiers
59
- } = config;
60
- const getClassGroupId = (className) => {
61
- const classParts = className.split(CLASS_PART_SEPARATOR);
62
- if (classParts[0] === "" && classParts.length !== 1) {
63
- classParts.shift();
64
- }
65
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
66
- };
67
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
68
- const conflicts = conflictingClassGroups[classGroupId] || [];
69
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
70
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
71
- }
72
- return conflicts;
73
- };
74
- return {
75
- getClassGroupId,
76
- getConflictingClassGroupIds
77
- };
78
- };
79
- var getGroupRecursive = (classParts, classPartObject) => {
80
- if (classParts.length === 0) {
81
- return classPartObject.classGroupId;
82
- }
83
- const currentClassPart = classParts[0];
84
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
85
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
86
- if (classGroupFromNextClassPart) {
87
- return classGroupFromNextClassPart;
88
- }
89
- if (classPartObject.validators.length === 0) {
90
- return void 0;
91
- }
92
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
93
- return classPartObject.validators.find(({
94
- validator
95
- }) => validator(classRest))?.classGroupId;
96
- };
97
- var arbitraryPropertyRegex = /^\[(.+)\]$/;
98
- var getGroupIdForArbitraryProperty = (className) => {
99
- if (arbitraryPropertyRegex.test(className)) {
100
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
101
- const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
102
- if (property) {
103
- return "arbitrary.." + property;
104
- }
105
- }
106
- };
107
- var createClassMap = (config) => {
108
- const {
109
- theme,
110
- prefix
111
- } = config;
112
- const classMap = {
113
- nextPart: /* @__PURE__ */ new Map(),
114
- validators: []
115
- };
116
- const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
117
- prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
118
- processClassesRecursively(classGroup, classMap, classGroupId, theme);
119
- });
120
- return classMap;
121
- };
122
- var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
123
- classGroup.forEach((classDefinition) => {
124
- if (typeof classDefinition === "string") {
125
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
126
- classPartObjectToEdit.classGroupId = classGroupId;
127
- return;
128
- }
129
- if (typeof classDefinition === "function") {
130
- if (isThemeGetter(classDefinition)) {
131
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
132
- return;
133
- }
134
- classPartObject.validators.push({
135
- validator: classDefinition,
136
- classGroupId
137
- });
138
- return;
139
- }
140
- Object.entries(classDefinition).forEach(([key, classGroup2]) => {
141
- processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
142
- });
143
- });
144
- };
145
- var getPart = (classPartObject, path) => {
146
- let currentClassPartObject = classPartObject;
147
- path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
148
- if (!currentClassPartObject.nextPart.has(pathPart)) {
149
- currentClassPartObject.nextPart.set(pathPart, {
150
- nextPart: /* @__PURE__ */ new Map(),
151
- validators: []
152
- });
153
- }
154
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
155
- });
156
- return currentClassPartObject;
157
- };
158
- var isThemeGetter = (func) => func.isThemeGetter;
159
- var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
160
- if (!prefix) {
161
- return classGroupEntries;
162
- }
163
- return classGroupEntries.map(([classGroupId, classGroup]) => {
164
- const prefixedClassGroup = classGroup.map((classDefinition) => {
165
- if (typeof classDefinition === "string") {
166
- return prefix + classDefinition;
167
- }
168
- if (typeof classDefinition === "object") {
169
- return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
170
- }
171
- return classDefinition;
172
- });
173
- return [classGroupId, prefixedClassGroup];
174
- });
175
- };
176
- var createLruCache = (maxCacheSize) => {
177
- if (maxCacheSize < 1) {
178
- return {
179
- get: () => void 0,
180
- set: () => {
181
- }
182
- };
183
- }
184
- let cacheSize = 0;
185
- let cache = /* @__PURE__ */ new Map();
186
- let previousCache = /* @__PURE__ */ new Map();
187
- const update = (key, value) => {
188
- cache.set(key, value);
189
- cacheSize++;
190
- if (cacheSize > maxCacheSize) {
191
- cacheSize = 0;
192
- previousCache = cache;
193
- cache = /* @__PURE__ */ new Map();
194
- }
195
- };
196
- return {
197
- get(key) {
198
- let value = cache.get(key);
199
- if (value !== void 0) {
200
- return value;
201
- }
202
- if ((value = previousCache.get(key)) !== void 0) {
203
- update(key, value);
204
- return value;
205
- }
206
- },
207
- set(key, value) {
208
- if (cache.has(key)) {
209
- cache.set(key, value);
210
- } else {
211
- update(key, value);
212
- }
213
- }
214
- };
215
- };
216
- var IMPORTANT_MODIFIER = "!";
217
- var createParseClassName = (config) => {
218
- const {
219
- separator,
220
- experimentalParseClassName
221
- } = config;
222
- const isSeparatorSingleCharacter = separator.length === 1;
223
- const firstSeparatorCharacter = separator[0];
224
- const separatorLength = separator.length;
225
- const parseClassName = (className) => {
226
- const modifiers = [];
227
- let bracketDepth = 0;
228
- let modifierStart = 0;
229
- let postfixModifierPosition;
230
- for (let index = 0; index < className.length; index++) {
231
- let currentCharacter = className[index];
232
- if (bracketDepth === 0) {
233
- if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
234
- modifiers.push(className.slice(modifierStart, index));
235
- modifierStart = index + separatorLength;
236
- continue;
237
- }
238
- if (currentCharacter === "/") {
239
- postfixModifierPosition = index;
240
- continue;
241
- }
242
- }
243
- if (currentCharacter === "[") {
244
- bracketDepth++;
245
- } else if (currentCharacter === "]") {
246
- bracketDepth--;
247
- }
248
- }
249
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
250
- const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
251
- const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
252
- const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
253
- return {
254
- modifiers,
255
- hasImportantModifier,
256
- baseClassName,
257
- maybePostfixModifierPosition
258
- };
259
- };
260
- if (experimentalParseClassName) {
261
- return (className) => experimentalParseClassName({
262
- className,
263
- parseClassName
264
- });
265
- }
266
- return parseClassName;
267
- };
268
- var sortModifiers = (modifiers) => {
269
- if (modifiers.length <= 1) {
270
- return modifiers;
271
- }
272
- const sortedModifiers = [];
273
- let unsortedModifiers = [];
274
- modifiers.forEach((modifier) => {
275
- const isArbitraryVariant = modifier[0] === "[";
276
- if (isArbitraryVariant) {
277
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
278
- unsortedModifiers = [];
279
- } else {
280
- unsortedModifiers.push(modifier);
281
- }
282
- });
283
- sortedModifiers.push(...unsortedModifiers.sort());
284
- return sortedModifiers;
285
- };
286
- var createConfigUtils = (config) => ({
287
- cache: createLruCache(config.cacheSize),
288
- parseClassName: createParseClassName(config),
289
- ...createClassGroupUtils(config)
290
- });
291
- var SPLIT_CLASSES_REGEX = /\s+/;
292
- var mergeClassList = (classList, configUtils) => {
293
- const {
294
- parseClassName,
295
- getClassGroupId,
296
- getConflictingClassGroupIds
297
- } = configUtils;
298
- const classGroupsInConflict = [];
299
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
300
- let result = "";
301
- for (let index = classNames.length - 1; index >= 0; index -= 1) {
302
- const originalClassName = classNames[index];
303
- const {
304
- modifiers,
305
- hasImportantModifier,
306
- baseClassName,
307
- maybePostfixModifierPosition
308
- } = parseClassName(originalClassName);
309
- let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
310
- let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
311
- if (!classGroupId) {
312
- if (!hasPostfixModifier) {
313
- result = originalClassName + (result.length > 0 ? " " + result : result);
314
- continue;
315
- }
316
- classGroupId = getClassGroupId(baseClassName);
317
- if (!classGroupId) {
318
- result = originalClassName + (result.length > 0 ? " " + result : result);
319
- continue;
320
- }
321
- hasPostfixModifier = false;
322
- }
323
- const variantModifier = sortModifiers(modifiers).join(":");
324
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
325
- const classId = modifierId + classGroupId;
326
- if (classGroupsInConflict.includes(classId)) {
327
- continue;
328
- }
329
- classGroupsInConflict.push(classId);
330
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
331
- for (let i = 0; i < conflictGroups.length; ++i) {
332
- const group = conflictGroups[i];
333
- classGroupsInConflict.push(modifierId + group);
334
- }
335
- result = originalClassName + (result.length > 0 ? " " + result : result);
336
- }
337
- return result;
338
- };
339
- function twJoin() {
340
- let index = 0;
341
- let argument;
342
- let resolvedValue;
343
- let string = "";
344
- while (index < arguments.length) {
345
- if (argument = arguments[index++]) {
346
- if (resolvedValue = toValue(argument)) {
347
- string && (string += " ");
348
- string += resolvedValue;
349
- }
350
- }
351
- }
352
- return string;
353
- }
354
- var toValue = (mix) => {
355
- if (typeof mix === "string") {
356
- return mix;
357
- }
358
- let resolvedValue;
359
- let string = "";
360
- for (let k = 0; k < mix.length; k++) {
361
- if (mix[k]) {
362
- if (resolvedValue = toValue(mix[k])) {
363
- string && (string += " ");
364
- string += resolvedValue;
365
- }
366
- }
367
- }
368
- return string;
369
- };
370
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
371
- let configUtils;
372
- let cacheGet;
373
- let cacheSet;
374
- let functionToCall = initTailwindMerge;
375
- function initTailwindMerge(classList) {
376
- const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
377
- configUtils = createConfigUtils(config);
378
- cacheGet = configUtils.cache.get;
379
- cacheSet = configUtils.cache.set;
380
- functionToCall = tailwindMerge;
381
- return tailwindMerge(classList);
382
- }
383
- function tailwindMerge(classList) {
384
- const cachedResult = cacheGet(classList);
385
- if (cachedResult) {
386
- return cachedResult;
387
- }
388
- const result = mergeClassList(classList, configUtils);
389
- cacheSet(classList, result);
390
- return result;
391
- }
392
- return function callTailwindMerge() {
393
- return functionToCall(twJoin.apply(null, arguments));
394
- };
395
- }
396
- var fromTheme = (key) => {
397
- const themeGetter = (theme) => theme[key] || [];
398
- themeGetter.isThemeGetter = true;
399
- return themeGetter;
400
- };
401
- var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
402
- var fractionRegex = /^\d+\/\d+$/;
403
- var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
404
- var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
405
- var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
406
- var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
407
- var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
408
- var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
409
- var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
410
- var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
411
- var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
412
- var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
413
- var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
414
- var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
415
- var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
416
- var isTshirtSize = (value) => tshirtUnitRegex.test(value);
417
- var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
418
- var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
419
- var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
420
- var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
421
- var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
422
- var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
423
- var isAny = () => true;
424
- var getIsArbitraryValue = (value, label, testValue) => {
425
- const result = arbitraryValueRegex.exec(value);
426
- if (result) {
427
- if (result[1]) {
428
- return typeof label === "string" ? result[1] === label : label.has(result[1]);
429
- }
430
- return testValue(result[2]);
431
- }
432
- return false;
433
- };
434
- var isLengthOnly = (value) => (
435
- // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
436
- // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
437
- // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
438
- lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
439
- );
440
- var isNever = () => false;
441
- var isShadow = (value) => shadowRegex.test(value);
442
- var isImage = (value) => imageRegex.test(value);
443
- var getDefaultConfig = () => {
444
- const colors = fromTheme("colors");
445
- const spacing = fromTheme("spacing");
446
- const blur = fromTheme("blur");
447
- const brightness = fromTheme("brightness");
448
- const borderColor = fromTheme("borderColor");
449
- const borderRadius = fromTheme("borderRadius");
450
- const borderSpacing = fromTheme("borderSpacing");
451
- const borderWidth = fromTheme("borderWidth");
452
- const contrast = fromTheme("contrast");
453
- const grayscale = fromTheme("grayscale");
454
- const hueRotate = fromTheme("hueRotate");
455
- const invert = fromTheme("invert");
456
- const gap = fromTheme("gap");
457
- const gradientColorStops = fromTheme("gradientColorStops");
458
- const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
459
- const inset = fromTheme("inset");
460
- const margin = fromTheme("margin");
461
- const opacity = fromTheme("opacity");
462
- const padding = fromTheme("padding");
463
- const saturate = fromTheme("saturate");
464
- const scale = fromTheme("scale");
465
- const sepia = fromTheme("sepia");
466
- const skew = fromTheme("skew");
467
- const space = fromTheme("space");
468
- const translate = fromTheme("translate");
469
- const getOverscroll = () => ["auto", "contain", "none"];
470
- const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
471
- const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing];
472
- const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
473
- const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
474
- const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
475
- const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
476
- const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
477
- const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
478
- const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
479
- const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
480
- const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
481
- const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
482
- return {
483
- cacheSize: 500,
484
- separator: ":",
485
- theme: {
486
- colors: [isAny],
487
- spacing: [isLength, isArbitraryLength],
488
- blur: ["none", "", isTshirtSize, isArbitraryValue],
489
- brightness: getNumberAndArbitrary(),
490
- borderColor: [colors],
491
- borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
492
- borderSpacing: getSpacingWithArbitrary(),
493
- borderWidth: getLengthWithEmptyAndArbitrary(),
494
- contrast: getNumberAndArbitrary(),
495
- grayscale: getZeroAndEmpty(),
496
- hueRotate: getNumberAndArbitrary(),
497
- invert: getZeroAndEmpty(),
498
- gap: getSpacingWithArbitrary(),
499
- gradientColorStops: [colors],
500
- gradientColorStopPositions: [isPercent, isArbitraryLength],
501
- inset: getSpacingWithAutoAndArbitrary(),
502
- margin: getSpacingWithAutoAndArbitrary(),
503
- opacity: getNumberAndArbitrary(),
504
- padding: getSpacingWithArbitrary(),
505
- saturate: getNumberAndArbitrary(),
506
- scale: getNumberAndArbitrary(),
507
- sepia: getZeroAndEmpty(),
508
- skew: getNumberAndArbitrary(),
509
- space: getSpacingWithArbitrary(),
510
- translate: getSpacingWithArbitrary()
511
- },
512
- classGroups: {
513
- // Layout
514
- /**
515
- * Aspect Ratio
516
- * @see https://tailwindcss.com/docs/aspect-ratio
517
- */
518
- aspect: [{
519
- aspect: ["auto", "square", "video", isArbitraryValue]
520
- }],
521
- /**
522
- * Container
523
- * @see https://tailwindcss.com/docs/container
524
- */
525
- container: ["container"],
526
- /**
527
- * Columns
528
- * @see https://tailwindcss.com/docs/columns
529
- */
530
- columns: [{
531
- columns: [isTshirtSize]
532
- }],
533
- /**
534
- * Break After
535
- * @see https://tailwindcss.com/docs/break-after
536
- */
537
- "break-after": [{
538
- "break-after": getBreaks()
539
- }],
540
- /**
541
- * Break Before
542
- * @see https://tailwindcss.com/docs/break-before
543
- */
544
- "break-before": [{
545
- "break-before": getBreaks()
546
- }],
547
- /**
548
- * Break Inside
549
- * @see https://tailwindcss.com/docs/break-inside
550
- */
551
- "break-inside": [{
552
- "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
553
- }],
554
- /**
555
- * Box Decoration Break
556
- * @see https://tailwindcss.com/docs/box-decoration-break
557
- */
558
- "box-decoration": [{
559
- "box-decoration": ["slice", "clone"]
560
- }],
561
- /**
562
- * Box Sizing
563
- * @see https://tailwindcss.com/docs/box-sizing
564
- */
565
- box: [{
566
- box: ["border", "content"]
567
- }],
568
- /**
569
- * Display
570
- * @see https://tailwindcss.com/docs/display
571
- */
572
- display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
573
- /**
574
- * Floats
575
- * @see https://tailwindcss.com/docs/float
576
- */
577
- float: [{
578
- float: ["right", "left", "none", "start", "end"]
579
- }],
580
- /**
581
- * Clear
582
- * @see https://tailwindcss.com/docs/clear
583
- */
584
- clear: [{
585
- clear: ["left", "right", "both", "none", "start", "end"]
586
- }],
587
- /**
588
- * Isolation
589
- * @see https://tailwindcss.com/docs/isolation
590
- */
591
- isolation: ["isolate", "isolation-auto"],
592
- /**
593
- * Object Fit
594
- * @see https://tailwindcss.com/docs/object-fit
595
- */
596
- "object-fit": [{
597
- object: ["contain", "cover", "fill", "none", "scale-down"]
598
- }],
599
- /**
600
- * Object Position
601
- * @see https://tailwindcss.com/docs/object-position
602
- */
603
- "object-position": [{
604
- object: [...getPositions(), isArbitraryValue]
605
- }],
606
- /**
607
- * Overflow
608
- * @see https://tailwindcss.com/docs/overflow
609
- */
610
- overflow: [{
611
- overflow: getOverflow()
612
- }],
613
- /**
614
- * Overflow X
615
- * @see https://tailwindcss.com/docs/overflow
616
- */
617
- "overflow-x": [{
618
- "overflow-x": getOverflow()
619
- }],
620
- /**
621
- * Overflow Y
622
- * @see https://tailwindcss.com/docs/overflow
623
- */
624
- "overflow-y": [{
625
- "overflow-y": getOverflow()
626
- }],
627
- /**
628
- * Overscroll Behavior
629
- * @see https://tailwindcss.com/docs/overscroll-behavior
630
- */
631
- overscroll: [{
632
- overscroll: getOverscroll()
633
- }],
634
- /**
635
- * Overscroll Behavior X
636
- * @see https://tailwindcss.com/docs/overscroll-behavior
637
- */
638
- "overscroll-x": [{
639
- "overscroll-x": getOverscroll()
640
- }],
641
- /**
642
- * Overscroll Behavior Y
643
- * @see https://tailwindcss.com/docs/overscroll-behavior
644
- */
645
- "overscroll-y": [{
646
- "overscroll-y": getOverscroll()
647
- }],
648
- /**
649
- * Position
650
- * @see https://tailwindcss.com/docs/position
651
- */
652
- position: ["static", "fixed", "absolute", "relative", "sticky"],
653
- /**
654
- * Top / Right / Bottom / Left
655
- * @see https://tailwindcss.com/docs/top-right-bottom-left
656
- */
657
- inset: [{
658
- inset: [inset]
659
- }],
660
- /**
661
- * Right / Left
662
- * @see https://tailwindcss.com/docs/top-right-bottom-left
663
- */
664
- "inset-x": [{
665
- "inset-x": [inset]
666
- }],
667
- /**
668
- * Top / Bottom
669
- * @see https://tailwindcss.com/docs/top-right-bottom-left
670
- */
671
- "inset-y": [{
672
- "inset-y": [inset]
673
- }],
674
- /**
675
- * Start
676
- * @see https://tailwindcss.com/docs/top-right-bottom-left
677
- */
678
- start: [{
679
- start: [inset]
680
- }],
681
- /**
682
- * End
683
- * @see https://tailwindcss.com/docs/top-right-bottom-left
684
- */
685
- end: [{
686
- end: [inset]
687
- }],
688
- /**
689
- * Top
690
- * @see https://tailwindcss.com/docs/top-right-bottom-left
691
- */
692
- top: [{
693
- top: [inset]
694
- }],
695
- /**
696
- * Right
697
- * @see https://tailwindcss.com/docs/top-right-bottom-left
698
- */
699
- right: [{
700
- right: [inset]
701
- }],
702
- /**
703
- * Bottom
704
- * @see https://tailwindcss.com/docs/top-right-bottom-left
705
- */
706
- bottom: [{
707
- bottom: [inset]
708
- }],
709
- /**
710
- * Left
711
- * @see https://tailwindcss.com/docs/top-right-bottom-left
712
- */
713
- left: [{
714
- left: [inset]
715
- }],
716
- /**
717
- * Visibility
718
- * @see https://tailwindcss.com/docs/visibility
719
- */
720
- visibility: ["visible", "invisible", "collapse"],
721
- /**
722
- * Z-Index
723
- * @see https://tailwindcss.com/docs/z-index
724
- */
725
- z: [{
726
- z: ["auto", isInteger, isArbitraryValue]
727
- }],
728
- // Flexbox and Grid
729
- /**
730
- * Flex Basis
731
- * @see https://tailwindcss.com/docs/flex-basis
732
- */
733
- basis: [{
734
- basis: getSpacingWithAutoAndArbitrary()
735
- }],
736
- /**
737
- * Flex Direction
738
- * @see https://tailwindcss.com/docs/flex-direction
739
- */
740
- "flex-direction": [{
741
- flex: ["row", "row-reverse", "col", "col-reverse"]
742
- }],
743
- /**
744
- * Flex Wrap
745
- * @see https://tailwindcss.com/docs/flex-wrap
746
- */
747
- "flex-wrap": [{
748
- flex: ["wrap", "wrap-reverse", "nowrap"]
749
- }],
750
- /**
751
- * Flex
752
- * @see https://tailwindcss.com/docs/flex
753
- */
754
- flex: [{
755
- flex: ["1", "auto", "initial", "none", isArbitraryValue]
756
- }],
757
- /**
758
- * Flex Grow
759
- * @see https://tailwindcss.com/docs/flex-grow
760
- */
761
- grow: [{
762
- grow: getZeroAndEmpty()
763
- }],
764
- /**
765
- * Flex Shrink
766
- * @see https://tailwindcss.com/docs/flex-shrink
767
- */
768
- shrink: [{
769
- shrink: getZeroAndEmpty()
770
- }],
771
- /**
772
- * Order
773
- * @see https://tailwindcss.com/docs/order
774
- */
775
- order: [{
776
- order: ["first", "last", "none", isInteger, isArbitraryValue]
777
- }],
778
- /**
779
- * Grid Template Columns
780
- * @see https://tailwindcss.com/docs/grid-template-columns
781
- */
782
- "grid-cols": [{
783
- "grid-cols": [isAny]
784
- }],
785
- /**
786
- * Grid Column Start / End
787
- * @see https://tailwindcss.com/docs/grid-column
788
- */
789
- "col-start-end": [{
790
- col: ["auto", {
791
- span: ["full", isInteger, isArbitraryValue]
792
- }, isArbitraryValue]
793
- }],
794
- /**
795
- * Grid Column Start
796
- * @see https://tailwindcss.com/docs/grid-column
797
- */
798
- "col-start": [{
799
- "col-start": getNumberWithAutoAndArbitrary()
800
- }],
801
- /**
802
- * Grid Column End
803
- * @see https://tailwindcss.com/docs/grid-column
804
- */
805
- "col-end": [{
806
- "col-end": getNumberWithAutoAndArbitrary()
807
- }],
808
- /**
809
- * Grid Template Rows
810
- * @see https://tailwindcss.com/docs/grid-template-rows
811
- */
812
- "grid-rows": [{
813
- "grid-rows": [isAny]
814
- }],
815
- /**
816
- * Grid Row Start / End
817
- * @see https://tailwindcss.com/docs/grid-row
818
- */
819
- "row-start-end": [{
820
- row: ["auto", {
821
- span: [isInteger, isArbitraryValue]
822
- }, isArbitraryValue]
823
- }],
824
- /**
825
- * Grid Row Start
826
- * @see https://tailwindcss.com/docs/grid-row
827
- */
828
- "row-start": [{
829
- "row-start": getNumberWithAutoAndArbitrary()
830
- }],
831
- /**
832
- * Grid Row End
833
- * @see https://tailwindcss.com/docs/grid-row
834
- */
835
- "row-end": [{
836
- "row-end": getNumberWithAutoAndArbitrary()
837
- }],
838
- /**
839
- * Grid Auto Flow
840
- * @see https://tailwindcss.com/docs/grid-auto-flow
841
- */
842
- "grid-flow": [{
843
- "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
844
- }],
845
- /**
846
- * Grid Auto Columns
847
- * @see https://tailwindcss.com/docs/grid-auto-columns
848
- */
849
- "auto-cols": [{
850
- "auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
851
- }],
852
- /**
853
- * Grid Auto Rows
854
- * @see https://tailwindcss.com/docs/grid-auto-rows
855
- */
856
- "auto-rows": [{
857
- "auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
858
- }],
859
- /**
860
- * Gap
861
- * @see https://tailwindcss.com/docs/gap
862
- */
863
- gap: [{
864
- gap: [gap]
865
- }],
866
- /**
867
- * Gap X
868
- * @see https://tailwindcss.com/docs/gap
869
- */
870
- "gap-x": [{
871
- "gap-x": [gap]
872
- }],
873
- /**
874
- * Gap Y
875
- * @see https://tailwindcss.com/docs/gap
876
- */
877
- "gap-y": [{
878
- "gap-y": [gap]
879
- }],
880
- /**
881
- * Justify Content
882
- * @see https://tailwindcss.com/docs/justify-content
883
- */
884
- "justify-content": [{
885
- justify: ["normal", ...getAlign()]
886
- }],
887
- /**
888
- * Justify Items
889
- * @see https://tailwindcss.com/docs/justify-items
890
- */
891
- "justify-items": [{
892
- "justify-items": ["start", "end", "center", "stretch"]
893
- }],
894
- /**
895
- * Justify Self
896
- * @see https://tailwindcss.com/docs/justify-self
897
- */
898
- "justify-self": [{
899
- "justify-self": ["auto", "start", "end", "center", "stretch"]
900
- }],
901
- /**
902
- * Align Content
903
- * @see https://tailwindcss.com/docs/align-content
904
- */
905
- "align-content": [{
906
- content: ["normal", ...getAlign(), "baseline"]
907
- }],
908
- /**
909
- * Align Items
910
- * @see https://tailwindcss.com/docs/align-items
911
- */
912
- "align-items": [{
913
- items: ["start", "end", "center", "baseline", "stretch"]
914
- }],
915
- /**
916
- * Align Self
917
- * @see https://tailwindcss.com/docs/align-self
918
- */
919
- "align-self": [{
920
- self: ["auto", "start", "end", "center", "stretch", "baseline"]
921
- }],
922
- /**
923
- * Place Content
924
- * @see https://tailwindcss.com/docs/place-content
925
- */
926
- "place-content": [{
927
- "place-content": [...getAlign(), "baseline"]
928
- }],
929
- /**
930
- * Place Items
931
- * @see https://tailwindcss.com/docs/place-items
932
- */
933
- "place-items": [{
934
- "place-items": ["start", "end", "center", "baseline", "stretch"]
935
- }],
936
- /**
937
- * Place Self
938
- * @see https://tailwindcss.com/docs/place-self
939
- */
940
- "place-self": [{
941
- "place-self": ["auto", "start", "end", "center", "stretch"]
942
- }],
943
- // Spacing
944
- /**
945
- * Padding
946
- * @see https://tailwindcss.com/docs/padding
947
- */
948
- p: [{
949
- p: [padding]
950
- }],
951
- /**
952
- * Padding X
953
- * @see https://tailwindcss.com/docs/padding
954
- */
955
- px: [{
956
- px: [padding]
957
- }],
958
- /**
959
- * Padding Y
960
- * @see https://tailwindcss.com/docs/padding
961
- */
962
- py: [{
963
- py: [padding]
964
- }],
965
- /**
966
- * Padding Start
967
- * @see https://tailwindcss.com/docs/padding
968
- */
969
- ps: [{
970
- ps: [padding]
971
- }],
972
- /**
973
- * Padding End
974
- * @see https://tailwindcss.com/docs/padding
975
- */
976
- pe: [{
977
- pe: [padding]
978
- }],
979
- /**
980
- * Padding Top
981
- * @see https://tailwindcss.com/docs/padding
982
- */
983
- pt: [{
984
- pt: [padding]
985
- }],
986
- /**
987
- * Padding Right
988
- * @see https://tailwindcss.com/docs/padding
989
- */
990
- pr: [{
991
- pr: [padding]
992
- }],
993
- /**
994
- * Padding Bottom
995
- * @see https://tailwindcss.com/docs/padding
996
- */
997
- pb: [{
998
- pb: [padding]
999
- }],
1000
- /**
1001
- * Padding Left
1002
- * @see https://tailwindcss.com/docs/padding
1003
- */
1004
- pl: [{
1005
- pl: [padding]
1006
- }],
1007
- /**
1008
- * Margin
1009
- * @see https://tailwindcss.com/docs/margin
1010
- */
1011
- m: [{
1012
- m: [margin]
1013
- }],
1014
- /**
1015
- * Margin X
1016
- * @see https://tailwindcss.com/docs/margin
1017
- */
1018
- mx: [{
1019
- mx: [margin]
1020
- }],
1021
- /**
1022
- * Margin Y
1023
- * @see https://tailwindcss.com/docs/margin
1024
- */
1025
- my: [{
1026
- my: [margin]
1027
- }],
1028
- /**
1029
- * Margin Start
1030
- * @see https://tailwindcss.com/docs/margin
1031
- */
1032
- ms: [{
1033
- ms: [margin]
1034
- }],
1035
- /**
1036
- * Margin End
1037
- * @see https://tailwindcss.com/docs/margin
1038
- */
1039
- me: [{
1040
- me: [margin]
1041
- }],
1042
- /**
1043
- * Margin Top
1044
- * @see https://tailwindcss.com/docs/margin
1045
- */
1046
- mt: [{
1047
- mt: [margin]
1048
- }],
1049
- /**
1050
- * Margin Right
1051
- * @see https://tailwindcss.com/docs/margin
1052
- */
1053
- mr: [{
1054
- mr: [margin]
1055
- }],
1056
- /**
1057
- * Margin Bottom
1058
- * @see https://tailwindcss.com/docs/margin
1059
- */
1060
- mb: [{
1061
- mb: [margin]
1062
- }],
1063
- /**
1064
- * Margin Left
1065
- * @see https://tailwindcss.com/docs/margin
1066
- */
1067
- ml: [{
1068
- ml: [margin]
1069
- }],
1070
- /**
1071
- * Space Between X
1072
- * @see https://tailwindcss.com/docs/space
1073
- */
1074
- "space-x": [{
1075
- "space-x": [space]
1076
- }],
1077
- /**
1078
- * Space Between X Reverse
1079
- * @see https://tailwindcss.com/docs/space
1080
- */
1081
- "space-x-reverse": ["space-x-reverse"],
1082
- /**
1083
- * Space Between Y
1084
- * @see https://tailwindcss.com/docs/space
1085
- */
1086
- "space-y": [{
1087
- "space-y": [space]
1088
- }],
1089
- /**
1090
- * Space Between Y Reverse
1091
- * @see https://tailwindcss.com/docs/space
1092
- */
1093
- "space-y-reverse": ["space-y-reverse"],
1094
- // Sizing
1095
- /**
1096
- * Width
1097
- * @see https://tailwindcss.com/docs/width
1098
- */
1099
- w: [{
1100
- w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing]
1101
- }],
1102
- /**
1103
- * Min-Width
1104
- * @see https://tailwindcss.com/docs/min-width
1105
- */
1106
- "min-w": [{
1107
- "min-w": [isArbitraryValue, spacing, "min", "max", "fit"]
1108
- }],
1109
- /**
1110
- * Max-Width
1111
- * @see https://tailwindcss.com/docs/max-width
1112
- */
1113
- "max-w": [{
1114
- "max-w": [isArbitraryValue, spacing, "none", "full", "min", "max", "fit", "prose", {
1115
- screen: [isTshirtSize]
1116
- }, isTshirtSize]
1117
- }],
1118
- /**
1119
- * Height
1120
- * @see https://tailwindcss.com/docs/height
1121
- */
1122
- h: [{
1123
- h: [isArbitraryValue, spacing, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
1124
- }],
1125
- /**
1126
- * Min-Height
1127
- * @see https://tailwindcss.com/docs/min-height
1128
- */
1129
- "min-h": [{
1130
- "min-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1131
- }],
1132
- /**
1133
- * Max-Height
1134
- * @see https://tailwindcss.com/docs/max-height
1135
- */
1136
- "max-h": [{
1137
- "max-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1138
- }],
1139
- /**
1140
- * Size
1141
- * @see https://tailwindcss.com/docs/size
1142
- */
1143
- size: [{
1144
- size: [isArbitraryValue, spacing, "auto", "min", "max", "fit"]
1145
- }],
1146
- // Typography
1147
- /**
1148
- * Font Size
1149
- * @see https://tailwindcss.com/docs/font-size
1150
- */
1151
- "font-size": [{
1152
- text: ["base", isTshirtSize, isArbitraryLength]
1153
- }],
1154
- /**
1155
- * Font Smoothing
1156
- * @see https://tailwindcss.com/docs/font-smoothing
1157
- */
1158
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
1159
- /**
1160
- * Font Style
1161
- * @see https://tailwindcss.com/docs/font-style
1162
- */
1163
- "font-style": ["italic", "not-italic"],
1164
- /**
1165
- * Font Weight
1166
- * @see https://tailwindcss.com/docs/font-weight
1167
- */
1168
- "font-weight": [{
1169
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
1170
- }],
1171
- /**
1172
- * Font Family
1173
- * @see https://tailwindcss.com/docs/font-family
1174
- */
1175
- "font-family": [{
1176
- font: [isAny]
1177
- }],
1178
- /**
1179
- * Font Variant Numeric
1180
- * @see https://tailwindcss.com/docs/font-variant-numeric
1181
- */
1182
- "fvn-normal": ["normal-nums"],
1183
- /**
1184
- * Font Variant Numeric
1185
- * @see https://tailwindcss.com/docs/font-variant-numeric
1186
- */
1187
- "fvn-ordinal": ["ordinal"],
1188
- /**
1189
- * Font Variant Numeric
1190
- * @see https://tailwindcss.com/docs/font-variant-numeric
1191
- */
1192
- "fvn-slashed-zero": ["slashed-zero"],
1193
- /**
1194
- * Font Variant Numeric
1195
- * @see https://tailwindcss.com/docs/font-variant-numeric
1196
- */
1197
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
1198
- /**
1199
- * Font Variant Numeric
1200
- * @see https://tailwindcss.com/docs/font-variant-numeric
1201
- */
1202
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
1203
- /**
1204
- * Font Variant Numeric
1205
- * @see https://tailwindcss.com/docs/font-variant-numeric
1206
- */
1207
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1208
- /**
1209
- * Letter Spacing
1210
- * @see https://tailwindcss.com/docs/letter-spacing
1211
- */
1212
- tracking: [{
1213
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
1214
- }],
1215
- /**
1216
- * Line Clamp
1217
- * @see https://tailwindcss.com/docs/line-clamp
1218
- */
1219
- "line-clamp": [{
1220
- "line-clamp": ["none", isNumber, isArbitraryNumber]
1221
- }],
1222
- /**
1223
- * Line Height
1224
- * @see https://tailwindcss.com/docs/line-height
1225
- */
1226
- leading: [{
1227
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
1228
- }],
1229
- /**
1230
- * List Style Image
1231
- * @see https://tailwindcss.com/docs/list-style-image
1232
- */
1233
- "list-image": [{
1234
- "list-image": ["none", isArbitraryValue]
1235
- }],
1236
- /**
1237
- * List Style Type
1238
- * @see https://tailwindcss.com/docs/list-style-type
1239
- */
1240
- "list-style-type": [{
1241
- list: ["none", "disc", "decimal", isArbitraryValue]
1242
- }],
1243
- /**
1244
- * List Style Position
1245
- * @see https://tailwindcss.com/docs/list-style-position
1246
- */
1247
- "list-style-position": [{
1248
- list: ["inside", "outside"]
1249
- }],
1250
- /**
1251
- * Placeholder Color
1252
- * @deprecated since Tailwind CSS v3.0.0
1253
- * @see https://tailwindcss.com/docs/placeholder-color
1254
- */
1255
- "placeholder-color": [{
1256
- placeholder: [colors]
1257
- }],
1258
- /**
1259
- * Placeholder Opacity
1260
- * @see https://tailwindcss.com/docs/placeholder-opacity
1261
- */
1262
- "placeholder-opacity": [{
1263
- "placeholder-opacity": [opacity]
1264
- }],
1265
- /**
1266
- * Text Alignment
1267
- * @see https://tailwindcss.com/docs/text-align
1268
- */
1269
- "text-alignment": [{
1270
- text: ["left", "center", "right", "justify", "start", "end"]
1271
- }],
1272
- /**
1273
- * Text Color
1274
- * @see https://tailwindcss.com/docs/text-color
1275
- */
1276
- "text-color": [{
1277
- text: [colors]
1278
- }],
1279
- /**
1280
- * Text Opacity
1281
- * @see https://tailwindcss.com/docs/text-opacity
1282
- */
1283
- "text-opacity": [{
1284
- "text-opacity": [opacity]
1285
- }],
1286
- /**
1287
- * Text Decoration
1288
- * @see https://tailwindcss.com/docs/text-decoration
1289
- */
1290
- "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1291
- /**
1292
- * Text Decoration Style
1293
- * @see https://tailwindcss.com/docs/text-decoration-style
1294
- */
1295
- "text-decoration-style": [{
1296
- decoration: [...getLineStyles(), "wavy"]
1297
- }],
1298
- /**
1299
- * Text Decoration Thickness
1300
- * @see https://tailwindcss.com/docs/text-decoration-thickness
1301
- */
1302
- "text-decoration-thickness": [{
1303
- decoration: ["auto", "from-font", isLength, isArbitraryLength]
1304
- }],
1305
- /**
1306
- * Text Underline Offset
1307
- * @see https://tailwindcss.com/docs/text-underline-offset
1308
- */
1309
- "underline-offset": [{
1310
- "underline-offset": ["auto", isLength, isArbitraryValue]
1311
- }],
1312
- /**
1313
- * Text Decoration Color
1314
- * @see https://tailwindcss.com/docs/text-decoration-color
1315
- */
1316
- "text-decoration-color": [{
1317
- decoration: [colors]
1318
- }],
1319
- /**
1320
- * Text Transform
1321
- * @see https://tailwindcss.com/docs/text-transform
1322
- */
1323
- "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1324
- /**
1325
- * Text Overflow
1326
- * @see https://tailwindcss.com/docs/text-overflow
1327
- */
1328
- "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1329
- /**
1330
- * Text Wrap
1331
- * @see https://tailwindcss.com/docs/text-wrap
1332
- */
1333
- "text-wrap": [{
1334
- text: ["wrap", "nowrap", "balance", "pretty"]
1335
- }],
1336
- /**
1337
- * Text Indent
1338
- * @see https://tailwindcss.com/docs/text-indent
1339
- */
1340
- indent: [{
1341
- indent: getSpacingWithArbitrary()
1342
- }],
1343
- /**
1344
- * Vertical Alignment
1345
- * @see https://tailwindcss.com/docs/vertical-align
1346
- */
1347
- "vertical-align": [{
1348
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
1349
- }],
1350
- /**
1351
- * Whitespace
1352
- * @see https://tailwindcss.com/docs/whitespace
1353
- */
1354
- whitespace: [{
1355
- whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1356
- }],
1357
- /**
1358
- * Word Break
1359
- * @see https://tailwindcss.com/docs/word-break
1360
- */
1361
- break: [{
1362
- break: ["normal", "words", "all", "keep"]
1363
- }],
1364
- /**
1365
- * Hyphens
1366
- * @see https://tailwindcss.com/docs/hyphens
1367
- */
1368
- hyphens: [{
1369
- hyphens: ["none", "manual", "auto"]
1370
- }],
1371
- /**
1372
- * Content
1373
- * @see https://tailwindcss.com/docs/content
1374
- */
1375
- content: [{
1376
- content: ["none", isArbitraryValue]
1377
- }],
1378
- // Backgrounds
1379
- /**
1380
- * Background Attachment
1381
- * @see https://tailwindcss.com/docs/background-attachment
1382
- */
1383
- "bg-attachment": [{
1384
- bg: ["fixed", "local", "scroll"]
1385
- }],
1386
- /**
1387
- * Background Clip
1388
- * @see https://tailwindcss.com/docs/background-clip
1389
- */
1390
- "bg-clip": [{
1391
- "bg-clip": ["border", "padding", "content", "text"]
1392
- }],
1393
- /**
1394
- * Background Opacity
1395
- * @deprecated since Tailwind CSS v3.0.0
1396
- * @see https://tailwindcss.com/docs/background-opacity
1397
- */
1398
- "bg-opacity": [{
1399
- "bg-opacity": [opacity]
1400
- }],
1401
- /**
1402
- * Background Origin
1403
- * @see https://tailwindcss.com/docs/background-origin
1404
- */
1405
- "bg-origin": [{
1406
- "bg-origin": ["border", "padding", "content"]
1407
- }],
1408
- /**
1409
- * Background Position
1410
- * @see https://tailwindcss.com/docs/background-position
1411
- */
1412
- "bg-position": [{
1413
- bg: [...getPositions(), isArbitraryPosition]
1414
- }],
1415
- /**
1416
- * Background Repeat
1417
- * @see https://tailwindcss.com/docs/background-repeat
1418
- */
1419
- "bg-repeat": [{
1420
- bg: ["no-repeat", {
1421
- repeat: ["", "x", "y", "round", "space"]
1422
- }]
1423
- }],
1424
- /**
1425
- * Background Size
1426
- * @see https://tailwindcss.com/docs/background-size
1427
- */
1428
- "bg-size": [{
1429
- bg: ["auto", "cover", "contain", isArbitrarySize]
1430
- }],
1431
- /**
1432
- * Background Image
1433
- * @see https://tailwindcss.com/docs/background-image
1434
- */
1435
- "bg-image": [{
1436
- bg: ["none", {
1437
- "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1438
- }, isArbitraryImage]
1439
- }],
1440
- /**
1441
- * Background Color
1442
- * @see https://tailwindcss.com/docs/background-color
1443
- */
1444
- "bg-color": [{
1445
- bg: [colors]
1446
- }],
1447
- /**
1448
- * Gradient Color Stops From Position
1449
- * @see https://tailwindcss.com/docs/gradient-color-stops
1450
- */
1451
- "gradient-from-pos": [{
1452
- from: [gradientColorStopPositions]
1453
- }],
1454
- /**
1455
- * Gradient Color Stops Via Position
1456
- * @see https://tailwindcss.com/docs/gradient-color-stops
1457
- */
1458
- "gradient-via-pos": [{
1459
- via: [gradientColorStopPositions]
1460
- }],
1461
- /**
1462
- * Gradient Color Stops To Position
1463
- * @see https://tailwindcss.com/docs/gradient-color-stops
1464
- */
1465
- "gradient-to-pos": [{
1466
- to: [gradientColorStopPositions]
1467
- }],
1468
- /**
1469
- * Gradient Color Stops From
1470
- * @see https://tailwindcss.com/docs/gradient-color-stops
1471
- */
1472
- "gradient-from": [{
1473
- from: [gradientColorStops]
1474
- }],
1475
- /**
1476
- * Gradient Color Stops Via
1477
- * @see https://tailwindcss.com/docs/gradient-color-stops
1478
- */
1479
- "gradient-via": [{
1480
- via: [gradientColorStops]
1481
- }],
1482
- /**
1483
- * Gradient Color Stops To
1484
- * @see https://tailwindcss.com/docs/gradient-color-stops
1485
- */
1486
- "gradient-to": [{
1487
- to: [gradientColorStops]
1488
- }],
1489
- // Borders
1490
- /**
1491
- * Border Radius
1492
- * @see https://tailwindcss.com/docs/border-radius
1493
- */
1494
- rounded: [{
1495
- rounded: [borderRadius]
1496
- }],
1497
- /**
1498
- * Border Radius Start
1499
- * @see https://tailwindcss.com/docs/border-radius
1500
- */
1501
- "rounded-s": [{
1502
- "rounded-s": [borderRadius]
1503
- }],
1504
- /**
1505
- * Border Radius End
1506
- * @see https://tailwindcss.com/docs/border-radius
1507
- */
1508
- "rounded-e": [{
1509
- "rounded-e": [borderRadius]
1510
- }],
1511
- /**
1512
- * Border Radius Top
1513
- * @see https://tailwindcss.com/docs/border-radius
1514
- */
1515
- "rounded-t": [{
1516
- "rounded-t": [borderRadius]
1517
- }],
1518
- /**
1519
- * Border Radius Right
1520
- * @see https://tailwindcss.com/docs/border-radius
1521
- */
1522
- "rounded-r": [{
1523
- "rounded-r": [borderRadius]
1524
- }],
1525
- /**
1526
- * Border Radius Bottom
1527
- * @see https://tailwindcss.com/docs/border-radius
1528
- */
1529
- "rounded-b": [{
1530
- "rounded-b": [borderRadius]
1531
- }],
1532
- /**
1533
- * Border Radius Left
1534
- * @see https://tailwindcss.com/docs/border-radius
1535
- */
1536
- "rounded-l": [{
1537
- "rounded-l": [borderRadius]
1538
- }],
1539
- /**
1540
- * Border Radius Start Start
1541
- * @see https://tailwindcss.com/docs/border-radius
1542
- */
1543
- "rounded-ss": [{
1544
- "rounded-ss": [borderRadius]
1545
- }],
1546
- /**
1547
- * Border Radius Start End
1548
- * @see https://tailwindcss.com/docs/border-radius
1549
- */
1550
- "rounded-se": [{
1551
- "rounded-se": [borderRadius]
1552
- }],
1553
- /**
1554
- * Border Radius End End
1555
- * @see https://tailwindcss.com/docs/border-radius
1556
- */
1557
- "rounded-ee": [{
1558
- "rounded-ee": [borderRadius]
1559
- }],
1560
- /**
1561
- * Border Radius End Start
1562
- * @see https://tailwindcss.com/docs/border-radius
1563
- */
1564
- "rounded-es": [{
1565
- "rounded-es": [borderRadius]
1566
- }],
1567
- /**
1568
- * Border Radius Top Left
1569
- * @see https://tailwindcss.com/docs/border-radius
1570
- */
1571
- "rounded-tl": [{
1572
- "rounded-tl": [borderRadius]
1573
- }],
1574
- /**
1575
- * Border Radius Top Right
1576
- * @see https://tailwindcss.com/docs/border-radius
1577
- */
1578
- "rounded-tr": [{
1579
- "rounded-tr": [borderRadius]
1580
- }],
1581
- /**
1582
- * Border Radius Bottom Right
1583
- * @see https://tailwindcss.com/docs/border-radius
1584
- */
1585
- "rounded-br": [{
1586
- "rounded-br": [borderRadius]
1587
- }],
1588
- /**
1589
- * Border Radius Bottom Left
1590
- * @see https://tailwindcss.com/docs/border-radius
1591
- */
1592
- "rounded-bl": [{
1593
- "rounded-bl": [borderRadius]
1594
- }],
1595
- /**
1596
- * Border Width
1597
- * @see https://tailwindcss.com/docs/border-width
1598
- */
1599
- "border-w": [{
1600
- border: [borderWidth]
1601
- }],
1602
- /**
1603
- * Border Width X
1604
- * @see https://tailwindcss.com/docs/border-width
1605
- */
1606
- "border-w-x": [{
1607
- "border-x": [borderWidth]
1608
- }],
1609
- /**
1610
- * Border Width Y
1611
- * @see https://tailwindcss.com/docs/border-width
1612
- */
1613
- "border-w-y": [{
1614
- "border-y": [borderWidth]
1615
- }],
1616
- /**
1617
- * Border Width Start
1618
- * @see https://tailwindcss.com/docs/border-width
1619
- */
1620
- "border-w-s": [{
1621
- "border-s": [borderWidth]
1622
- }],
1623
- /**
1624
- * Border Width End
1625
- * @see https://tailwindcss.com/docs/border-width
1626
- */
1627
- "border-w-e": [{
1628
- "border-e": [borderWidth]
1629
- }],
1630
- /**
1631
- * Border Width Top
1632
- * @see https://tailwindcss.com/docs/border-width
1633
- */
1634
- "border-w-t": [{
1635
- "border-t": [borderWidth]
1636
- }],
1637
- /**
1638
- * Border Width Right
1639
- * @see https://tailwindcss.com/docs/border-width
1640
- */
1641
- "border-w-r": [{
1642
- "border-r": [borderWidth]
1643
- }],
1644
- /**
1645
- * Border Width Bottom
1646
- * @see https://tailwindcss.com/docs/border-width
1647
- */
1648
- "border-w-b": [{
1649
- "border-b": [borderWidth]
1650
- }],
1651
- /**
1652
- * Border Width Left
1653
- * @see https://tailwindcss.com/docs/border-width
1654
- */
1655
- "border-w-l": [{
1656
- "border-l": [borderWidth]
1657
- }],
1658
- /**
1659
- * Border Opacity
1660
- * @see https://tailwindcss.com/docs/border-opacity
1661
- */
1662
- "border-opacity": [{
1663
- "border-opacity": [opacity]
1664
- }],
1665
- /**
1666
- * Border Style
1667
- * @see https://tailwindcss.com/docs/border-style
1668
- */
1669
- "border-style": [{
1670
- border: [...getLineStyles(), "hidden"]
1671
- }],
1672
- /**
1673
- * Divide Width X
1674
- * @see https://tailwindcss.com/docs/divide-width
1675
- */
1676
- "divide-x": [{
1677
- "divide-x": [borderWidth]
1678
- }],
1679
- /**
1680
- * Divide Width X Reverse
1681
- * @see https://tailwindcss.com/docs/divide-width
1682
- */
1683
- "divide-x-reverse": ["divide-x-reverse"],
1684
- /**
1685
- * Divide Width Y
1686
- * @see https://tailwindcss.com/docs/divide-width
1687
- */
1688
- "divide-y": [{
1689
- "divide-y": [borderWidth]
1690
- }],
1691
- /**
1692
- * Divide Width Y Reverse
1693
- * @see https://tailwindcss.com/docs/divide-width
1694
- */
1695
- "divide-y-reverse": ["divide-y-reverse"],
1696
- /**
1697
- * Divide Opacity
1698
- * @see https://tailwindcss.com/docs/divide-opacity
1699
- */
1700
- "divide-opacity": [{
1701
- "divide-opacity": [opacity]
1702
- }],
1703
- /**
1704
- * Divide Style
1705
- * @see https://tailwindcss.com/docs/divide-style
1706
- */
1707
- "divide-style": [{
1708
- divide: getLineStyles()
1709
- }],
1710
- /**
1711
- * Border Color
1712
- * @see https://tailwindcss.com/docs/border-color
1713
- */
1714
- "border-color": [{
1715
- border: [borderColor]
1716
- }],
1717
- /**
1718
- * Border Color X
1719
- * @see https://tailwindcss.com/docs/border-color
1720
- */
1721
- "border-color-x": [{
1722
- "border-x": [borderColor]
1723
- }],
1724
- /**
1725
- * Border Color Y
1726
- * @see https://tailwindcss.com/docs/border-color
1727
- */
1728
- "border-color-y": [{
1729
- "border-y": [borderColor]
1730
- }],
1731
- /**
1732
- * Border Color S
1733
- * @see https://tailwindcss.com/docs/border-color
1734
- */
1735
- "border-color-s": [{
1736
- "border-s": [borderColor]
1737
- }],
1738
- /**
1739
- * Border Color E
1740
- * @see https://tailwindcss.com/docs/border-color
1741
- */
1742
- "border-color-e": [{
1743
- "border-e": [borderColor]
1744
- }],
1745
- /**
1746
- * Border Color Top
1747
- * @see https://tailwindcss.com/docs/border-color
1748
- */
1749
- "border-color-t": [{
1750
- "border-t": [borderColor]
1751
- }],
1752
- /**
1753
- * Border Color Right
1754
- * @see https://tailwindcss.com/docs/border-color
1755
- */
1756
- "border-color-r": [{
1757
- "border-r": [borderColor]
1758
- }],
1759
- /**
1760
- * Border Color Bottom
1761
- * @see https://tailwindcss.com/docs/border-color
1762
- */
1763
- "border-color-b": [{
1764
- "border-b": [borderColor]
1765
- }],
1766
- /**
1767
- * Border Color Left
1768
- * @see https://tailwindcss.com/docs/border-color
1769
- */
1770
- "border-color-l": [{
1771
- "border-l": [borderColor]
1772
- }],
1773
- /**
1774
- * Divide Color
1775
- * @see https://tailwindcss.com/docs/divide-color
1776
- */
1777
- "divide-color": [{
1778
- divide: [borderColor]
1779
- }],
1780
- /**
1781
- * Outline Style
1782
- * @see https://tailwindcss.com/docs/outline-style
1783
- */
1784
- "outline-style": [{
1785
- outline: ["", ...getLineStyles()]
1786
- }],
1787
- /**
1788
- * Outline Offset
1789
- * @see https://tailwindcss.com/docs/outline-offset
1790
- */
1791
- "outline-offset": [{
1792
- "outline-offset": [isLength, isArbitraryValue]
1793
- }],
1794
- /**
1795
- * Outline Width
1796
- * @see https://tailwindcss.com/docs/outline-width
1797
- */
1798
- "outline-w": [{
1799
- outline: [isLength, isArbitraryLength]
1800
- }],
1801
- /**
1802
- * Outline Color
1803
- * @see https://tailwindcss.com/docs/outline-color
1804
- */
1805
- "outline-color": [{
1806
- outline: [colors]
1807
- }],
1808
- /**
1809
- * Ring Width
1810
- * @see https://tailwindcss.com/docs/ring-width
1811
- */
1812
- "ring-w": [{
1813
- ring: getLengthWithEmptyAndArbitrary()
1814
- }],
1815
- /**
1816
- * Ring Width Inset
1817
- * @see https://tailwindcss.com/docs/ring-width
1818
- */
1819
- "ring-w-inset": ["ring-inset"],
1820
- /**
1821
- * Ring Color
1822
- * @see https://tailwindcss.com/docs/ring-color
1823
- */
1824
- "ring-color": [{
1825
- ring: [colors]
1826
- }],
1827
- /**
1828
- * Ring Opacity
1829
- * @see https://tailwindcss.com/docs/ring-opacity
1830
- */
1831
- "ring-opacity": [{
1832
- "ring-opacity": [opacity]
1833
- }],
1834
- /**
1835
- * Ring Offset Width
1836
- * @see https://tailwindcss.com/docs/ring-offset-width
1837
- */
1838
- "ring-offset-w": [{
1839
- "ring-offset": [isLength, isArbitraryLength]
1840
- }],
1841
- /**
1842
- * Ring Offset Color
1843
- * @see https://tailwindcss.com/docs/ring-offset-color
1844
- */
1845
- "ring-offset-color": [{
1846
- "ring-offset": [colors]
1847
- }],
1848
- // Effects
1849
- /**
1850
- * Box Shadow
1851
- * @see https://tailwindcss.com/docs/box-shadow
1852
- */
1853
- shadow: [{
1854
- shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
1855
- }],
1856
- /**
1857
- * Box Shadow Color
1858
- * @see https://tailwindcss.com/docs/box-shadow-color
1859
- */
1860
- "shadow-color": [{
1861
- shadow: [isAny]
1862
- }],
1863
- /**
1864
- * Opacity
1865
- * @see https://tailwindcss.com/docs/opacity
1866
- */
1867
- opacity: [{
1868
- opacity: [opacity]
1869
- }],
1870
- /**
1871
- * Mix Blend Mode
1872
- * @see https://tailwindcss.com/docs/mix-blend-mode
1873
- */
1874
- "mix-blend": [{
1875
- "mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
1876
- }],
1877
- /**
1878
- * Background Blend Mode
1879
- * @see https://tailwindcss.com/docs/background-blend-mode
1880
- */
1881
- "bg-blend": [{
1882
- "bg-blend": getBlendModes()
1883
- }],
1884
- // Filters
1885
- /**
1886
- * Filter
1887
- * @deprecated since Tailwind CSS v3.0.0
1888
- * @see https://tailwindcss.com/docs/filter
1889
- */
1890
- filter: [{
1891
- filter: ["", "none"]
1892
- }],
1893
- /**
1894
- * Blur
1895
- * @see https://tailwindcss.com/docs/blur
1896
- */
1897
- blur: [{
1898
- blur: [blur]
1899
- }],
1900
- /**
1901
- * Brightness
1902
- * @see https://tailwindcss.com/docs/brightness
1903
- */
1904
- brightness: [{
1905
- brightness: [brightness]
1906
- }],
1907
- /**
1908
- * Contrast
1909
- * @see https://tailwindcss.com/docs/contrast
1910
- */
1911
- contrast: [{
1912
- contrast: [contrast]
1913
- }],
1914
- /**
1915
- * Drop Shadow
1916
- * @see https://tailwindcss.com/docs/drop-shadow
1917
- */
1918
- "drop-shadow": [{
1919
- "drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
1920
- }],
1921
- /**
1922
- * Grayscale
1923
- * @see https://tailwindcss.com/docs/grayscale
1924
- */
1925
- grayscale: [{
1926
- grayscale: [grayscale]
1927
- }],
1928
- /**
1929
- * Hue Rotate
1930
- * @see https://tailwindcss.com/docs/hue-rotate
1931
- */
1932
- "hue-rotate": [{
1933
- "hue-rotate": [hueRotate]
1934
- }],
1935
- /**
1936
- * Invert
1937
- * @see https://tailwindcss.com/docs/invert
1938
- */
1939
- invert: [{
1940
- invert: [invert]
1941
- }],
1942
- /**
1943
- * Saturate
1944
- * @see https://tailwindcss.com/docs/saturate
1945
- */
1946
- saturate: [{
1947
- saturate: [saturate]
1948
- }],
1949
- /**
1950
- * Sepia
1951
- * @see https://tailwindcss.com/docs/sepia
1952
- */
1953
- sepia: [{
1954
- sepia: [sepia]
1955
- }],
1956
- /**
1957
- * Backdrop Filter
1958
- * @deprecated since Tailwind CSS v3.0.0
1959
- * @see https://tailwindcss.com/docs/backdrop-filter
1960
- */
1961
- "backdrop-filter": [{
1962
- "backdrop-filter": ["", "none"]
1963
- }],
1964
- /**
1965
- * Backdrop Blur
1966
- * @see https://tailwindcss.com/docs/backdrop-blur
1967
- */
1968
- "backdrop-blur": [{
1969
- "backdrop-blur": [blur]
1970
- }],
1971
- /**
1972
- * Backdrop Brightness
1973
- * @see https://tailwindcss.com/docs/backdrop-brightness
1974
- */
1975
- "backdrop-brightness": [{
1976
- "backdrop-brightness": [brightness]
1977
- }],
1978
- /**
1979
- * Backdrop Contrast
1980
- * @see https://tailwindcss.com/docs/backdrop-contrast
1981
- */
1982
- "backdrop-contrast": [{
1983
- "backdrop-contrast": [contrast]
1984
- }],
1985
- /**
1986
- * Backdrop Grayscale
1987
- * @see https://tailwindcss.com/docs/backdrop-grayscale
1988
- */
1989
- "backdrop-grayscale": [{
1990
- "backdrop-grayscale": [grayscale]
1991
- }],
1992
- /**
1993
- * Backdrop Hue Rotate
1994
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1995
- */
1996
- "backdrop-hue-rotate": [{
1997
- "backdrop-hue-rotate": [hueRotate]
1998
- }],
1999
- /**
2000
- * Backdrop Invert
2001
- * @see https://tailwindcss.com/docs/backdrop-invert
2002
- */
2003
- "backdrop-invert": [{
2004
- "backdrop-invert": [invert]
2005
- }],
2006
- /**
2007
- * Backdrop Opacity
2008
- * @see https://tailwindcss.com/docs/backdrop-opacity
2009
- */
2010
- "backdrop-opacity": [{
2011
- "backdrop-opacity": [opacity]
2012
- }],
2013
- /**
2014
- * Backdrop Saturate
2015
- * @see https://tailwindcss.com/docs/backdrop-saturate
2016
- */
2017
- "backdrop-saturate": [{
2018
- "backdrop-saturate": [saturate]
2019
- }],
2020
- /**
2021
- * Backdrop Sepia
2022
- * @see https://tailwindcss.com/docs/backdrop-sepia
2023
- */
2024
- "backdrop-sepia": [{
2025
- "backdrop-sepia": [sepia]
2026
- }],
2027
- // Tables
2028
- /**
2029
- * Border Collapse
2030
- * @see https://tailwindcss.com/docs/border-collapse
2031
- */
2032
- "border-collapse": [{
2033
- border: ["collapse", "separate"]
2034
- }],
2035
- /**
2036
- * Border Spacing
2037
- * @see https://tailwindcss.com/docs/border-spacing
2038
- */
2039
- "border-spacing": [{
2040
- "border-spacing": [borderSpacing]
2041
- }],
2042
- /**
2043
- * Border Spacing X
2044
- * @see https://tailwindcss.com/docs/border-spacing
2045
- */
2046
- "border-spacing-x": [{
2047
- "border-spacing-x": [borderSpacing]
2048
- }],
2049
- /**
2050
- * Border Spacing Y
2051
- * @see https://tailwindcss.com/docs/border-spacing
2052
- */
2053
- "border-spacing-y": [{
2054
- "border-spacing-y": [borderSpacing]
2055
- }],
2056
- /**
2057
- * Table Layout
2058
- * @see https://tailwindcss.com/docs/table-layout
2059
- */
2060
- "table-layout": [{
2061
- table: ["auto", "fixed"]
2062
- }],
2063
- /**
2064
- * Caption Side
2065
- * @see https://tailwindcss.com/docs/caption-side
2066
- */
2067
- caption: [{
2068
- caption: ["top", "bottom"]
2069
- }],
2070
- // Transitions and Animation
2071
- /**
2072
- * Tranisition Property
2073
- * @see https://tailwindcss.com/docs/transition-property
2074
- */
2075
- transition: [{
2076
- transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
2077
- }],
2078
- /**
2079
- * Transition Duration
2080
- * @see https://tailwindcss.com/docs/transition-duration
2081
- */
2082
- duration: [{
2083
- duration: getNumberAndArbitrary()
2084
- }],
2085
- /**
2086
- * Transition Timing Function
2087
- * @see https://tailwindcss.com/docs/transition-timing-function
2088
- */
2089
- ease: [{
2090
- ease: ["linear", "in", "out", "in-out", isArbitraryValue]
2091
- }],
2092
- /**
2093
- * Transition Delay
2094
- * @see https://tailwindcss.com/docs/transition-delay
2095
- */
2096
- delay: [{
2097
- delay: getNumberAndArbitrary()
2098
- }],
2099
- /**
2100
- * Animation
2101
- * @see https://tailwindcss.com/docs/animation
2102
- */
2103
- animate: [{
2104
- animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
2105
- }],
2106
- // Transforms
2107
- /**
2108
- * Transform
2109
- * @see https://tailwindcss.com/docs/transform
2110
- */
2111
- transform: [{
2112
- transform: ["", "gpu", "none"]
2113
- }],
2114
- /**
2115
- * Scale
2116
- * @see https://tailwindcss.com/docs/scale
2117
- */
2118
- scale: [{
2119
- scale: [scale]
2120
- }],
2121
- /**
2122
- * Scale X
2123
- * @see https://tailwindcss.com/docs/scale
2124
- */
2125
- "scale-x": [{
2126
- "scale-x": [scale]
2127
- }],
2128
- /**
2129
- * Scale Y
2130
- * @see https://tailwindcss.com/docs/scale
2131
- */
2132
- "scale-y": [{
2133
- "scale-y": [scale]
2134
- }],
2135
- /**
2136
- * Rotate
2137
- * @see https://tailwindcss.com/docs/rotate
2138
- */
2139
- rotate: [{
2140
- rotate: [isInteger, isArbitraryValue]
2141
- }],
2142
- /**
2143
- * Translate X
2144
- * @see https://tailwindcss.com/docs/translate
2145
- */
2146
- "translate-x": [{
2147
- "translate-x": [translate]
2148
- }],
2149
- /**
2150
- * Translate Y
2151
- * @see https://tailwindcss.com/docs/translate
2152
- */
2153
- "translate-y": [{
2154
- "translate-y": [translate]
2155
- }],
2156
- /**
2157
- * Skew X
2158
- * @see https://tailwindcss.com/docs/skew
2159
- */
2160
- "skew-x": [{
2161
- "skew-x": [skew]
2162
- }],
2163
- /**
2164
- * Skew Y
2165
- * @see https://tailwindcss.com/docs/skew
2166
- */
2167
- "skew-y": [{
2168
- "skew-y": [skew]
2169
- }],
2170
- /**
2171
- * Transform Origin
2172
- * @see https://tailwindcss.com/docs/transform-origin
2173
- */
2174
- "transform-origin": [{
2175
- origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
2176
- }],
2177
- // Interactivity
2178
- /**
2179
- * Accent Color
2180
- * @see https://tailwindcss.com/docs/accent-color
2181
- */
2182
- accent: [{
2183
- accent: ["auto", colors]
2184
- }],
2185
- /**
2186
- * Appearance
2187
- * @see https://tailwindcss.com/docs/appearance
2188
- */
2189
- appearance: [{
2190
- appearance: ["none", "auto"]
2191
- }],
2192
- /**
2193
- * Cursor
2194
- * @see https://tailwindcss.com/docs/cursor
2195
- */
2196
- cursor: [{
2197
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryValue]
2198
- }],
2199
- /**
2200
- * Caret Color
2201
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2202
- */
2203
- "caret-color": [{
2204
- caret: [colors]
2205
- }],
2206
- /**
2207
- * Pointer Events
2208
- * @see https://tailwindcss.com/docs/pointer-events
2209
- */
2210
- "pointer-events": [{
2211
- "pointer-events": ["none", "auto"]
2212
- }],
2213
- /**
2214
- * Resize
2215
- * @see https://tailwindcss.com/docs/resize
2216
- */
2217
- resize: [{
2218
- resize: ["none", "y", "x", ""]
2219
- }],
2220
- /**
2221
- * Scroll Behavior
2222
- * @see https://tailwindcss.com/docs/scroll-behavior
2223
- */
2224
- "scroll-behavior": [{
2225
- scroll: ["auto", "smooth"]
2226
- }],
2227
- /**
2228
- * Scroll Margin
2229
- * @see https://tailwindcss.com/docs/scroll-margin
2230
- */
2231
- "scroll-m": [{
2232
- "scroll-m": getSpacingWithArbitrary()
2233
- }],
2234
- /**
2235
- * Scroll Margin X
2236
- * @see https://tailwindcss.com/docs/scroll-margin
2237
- */
2238
- "scroll-mx": [{
2239
- "scroll-mx": getSpacingWithArbitrary()
2240
- }],
2241
- /**
2242
- * Scroll Margin Y
2243
- * @see https://tailwindcss.com/docs/scroll-margin
2244
- */
2245
- "scroll-my": [{
2246
- "scroll-my": getSpacingWithArbitrary()
2247
- }],
2248
- /**
2249
- * Scroll Margin Start
2250
- * @see https://tailwindcss.com/docs/scroll-margin
2251
- */
2252
- "scroll-ms": [{
2253
- "scroll-ms": getSpacingWithArbitrary()
2254
- }],
2255
- /**
2256
- * Scroll Margin End
2257
- * @see https://tailwindcss.com/docs/scroll-margin
2258
- */
2259
- "scroll-me": [{
2260
- "scroll-me": getSpacingWithArbitrary()
2261
- }],
2262
- /**
2263
- * Scroll Margin Top
2264
- * @see https://tailwindcss.com/docs/scroll-margin
2265
- */
2266
- "scroll-mt": [{
2267
- "scroll-mt": getSpacingWithArbitrary()
2268
- }],
2269
- /**
2270
- * Scroll Margin Right
2271
- * @see https://tailwindcss.com/docs/scroll-margin
2272
- */
2273
- "scroll-mr": [{
2274
- "scroll-mr": getSpacingWithArbitrary()
2275
- }],
2276
- /**
2277
- * Scroll Margin Bottom
2278
- * @see https://tailwindcss.com/docs/scroll-margin
2279
- */
2280
- "scroll-mb": [{
2281
- "scroll-mb": getSpacingWithArbitrary()
2282
- }],
2283
- /**
2284
- * Scroll Margin Left
2285
- * @see https://tailwindcss.com/docs/scroll-margin
2286
- */
2287
- "scroll-ml": [{
2288
- "scroll-ml": getSpacingWithArbitrary()
2289
- }],
2290
- /**
2291
- * Scroll Padding
2292
- * @see https://tailwindcss.com/docs/scroll-padding
2293
- */
2294
- "scroll-p": [{
2295
- "scroll-p": getSpacingWithArbitrary()
2296
- }],
2297
- /**
2298
- * Scroll Padding X
2299
- * @see https://tailwindcss.com/docs/scroll-padding
2300
- */
2301
- "scroll-px": [{
2302
- "scroll-px": getSpacingWithArbitrary()
2303
- }],
2304
- /**
2305
- * Scroll Padding Y
2306
- * @see https://tailwindcss.com/docs/scroll-padding
2307
- */
2308
- "scroll-py": [{
2309
- "scroll-py": getSpacingWithArbitrary()
2310
- }],
2311
- /**
2312
- * Scroll Padding Start
2313
- * @see https://tailwindcss.com/docs/scroll-padding
2314
- */
2315
- "scroll-ps": [{
2316
- "scroll-ps": getSpacingWithArbitrary()
2317
- }],
2318
- /**
2319
- * Scroll Padding End
2320
- * @see https://tailwindcss.com/docs/scroll-padding
2321
- */
2322
- "scroll-pe": [{
2323
- "scroll-pe": getSpacingWithArbitrary()
2324
- }],
2325
- /**
2326
- * Scroll Padding Top
2327
- * @see https://tailwindcss.com/docs/scroll-padding
2328
- */
2329
- "scroll-pt": [{
2330
- "scroll-pt": getSpacingWithArbitrary()
2331
- }],
2332
- /**
2333
- * Scroll Padding Right
2334
- * @see https://tailwindcss.com/docs/scroll-padding
2335
- */
2336
- "scroll-pr": [{
2337
- "scroll-pr": getSpacingWithArbitrary()
2338
- }],
2339
- /**
2340
- * Scroll Padding Bottom
2341
- * @see https://tailwindcss.com/docs/scroll-padding
2342
- */
2343
- "scroll-pb": [{
2344
- "scroll-pb": getSpacingWithArbitrary()
2345
- }],
2346
- /**
2347
- * Scroll Padding Left
2348
- * @see https://tailwindcss.com/docs/scroll-padding
2349
- */
2350
- "scroll-pl": [{
2351
- "scroll-pl": getSpacingWithArbitrary()
2352
- }],
2353
- /**
2354
- * Scroll Snap Align
2355
- * @see https://tailwindcss.com/docs/scroll-snap-align
2356
- */
2357
- "snap-align": [{
2358
- snap: ["start", "end", "center", "align-none"]
2359
- }],
2360
- /**
2361
- * Scroll Snap Stop
2362
- * @see https://tailwindcss.com/docs/scroll-snap-stop
2363
- */
2364
- "snap-stop": [{
2365
- snap: ["normal", "always"]
2366
- }],
2367
- /**
2368
- * Scroll Snap Type
2369
- * @see https://tailwindcss.com/docs/scroll-snap-type
2370
- */
2371
- "snap-type": [{
2372
- snap: ["none", "x", "y", "both"]
2373
- }],
2374
- /**
2375
- * Scroll Snap Type Strictness
2376
- * @see https://tailwindcss.com/docs/scroll-snap-type
2377
- */
2378
- "snap-strictness": [{
2379
- snap: ["mandatory", "proximity"]
2380
- }],
2381
- /**
2382
- * Touch Action
2383
- * @see https://tailwindcss.com/docs/touch-action
2384
- */
2385
- touch: [{
2386
- touch: ["auto", "none", "manipulation"]
2387
- }],
2388
- /**
2389
- * Touch Action X
2390
- * @see https://tailwindcss.com/docs/touch-action
2391
- */
2392
- "touch-x": [{
2393
- "touch-pan": ["x", "left", "right"]
2394
- }],
2395
- /**
2396
- * Touch Action Y
2397
- * @see https://tailwindcss.com/docs/touch-action
2398
- */
2399
- "touch-y": [{
2400
- "touch-pan": ["y", "up", "down"]
2401
- }],
2402
- /**
2403
- * Touch Action Pinch Zoom
2404
- * @see https://tailwindcss.com/docs/touch-action
2405
- */
2406
- "touch-pz": ["touch-pinch-zoom"],
2407
- /**
2408
- * User Select
2409
- * @see https://tailwindcss.com/docs/user-select
2410
- */
2411
- select: [{
2412
- select: ["none", "text", "all", "auto"]
2413
- }],
2414
- /**
2415
- * Will Change
2416
- * @see https://tailwindcss.com/docs/will-change
2417
- */
2418
- "will-change": [{
2419
- "will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
2420
- }],
2421
- // SVG
2422
- /**
2423
- * Fill
2424
- * @see https://tailwindcss.com/docs/fill
2425
- */
2426
- fill: [{
2427
- fill: [colors, "none"]
2428
- }],
2429
- /**
2430
- * Stroke Width
2431
- * @see https://tailwindcss.com/docs/stroke-width
2432
- */
2433
- "stroke-w": [{
2434
- stroke: [isLength, isArbitraryLength, isArbitraryNumber]
2435
- }],
2436
- /**
2437
- * Stroke
2438
- * @see https://tailwindcss.com/docs/stroke
2439
- */
2440
- stroke: [{
2441
- stroke: [colors, "none"]
2442
- }],
2443
- // Accessibility
2444
- /**
2445
- * Screen Readers
2446
- * @see https://tailwindcss.com/docs/screen-readers
2447
- */
2448
- sr: ["sr-only", "not-sr-only"],
2449
- /**
2450
- * Forced Color Adjust
2451
- * @see https://tailwindcss.com/docs/forced-color-adjust
2452
- */
2453
- "forced-color-adjust": [{
2454
- "forced-color-adjust": ["auto", "none"]
2455
- }]
2456
- },
2457
- conflictingClassGroups: {
2458
- overflow: ["overflow-x", "overflow-y"],
2459
- overscroll: ["overscroll-x", "overscroll-y"],
2460
- inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2461
- "inset-x": ["right", "left"],
2462
- "inset-y": ["top", "bottom"],
2463
- flex: ["basis", "grow", "shrink"],
2464
- gap: ["gap-x", "gap-y"],
2465
- p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2466
- px: ["pr", "pl"],
2467
- py: ["pt", "pb"],
2468
- m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2469
- mx: ["mr", "ml"],
2470
- my: ["mt", "mb"],
2471
- size: ["w", "h"],
2472
- "font-size": ["leading"],
2473
- "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2474
- "fvn-ordinal": ["fvn-normal"],
2475
- "fvn-slashed-zero": ["fvn-normal"],
2476
- "fvn-figure": ["fvn-normal"],
2477
- "fvn-spacing": ["fvn-normal"],
2478
- "fvn-fraction": ["fvn-normal"],
2479
- "line-clamp": ["display", "overflow"],
2480
- rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
2481
- "rounded-s": ["rounded-ss", "rounded-es"],
2482
- "rounded-e": ["rounded-se", "rounded-ee"],
2483
- "rounded-t": ["rounded-tl", "rounded-tr"],
2484
- "rounded-r": ["rounded-tr", "rounded-br"],
2485
- "rounded-b": ["rounded-br", "rounded-bl"],
2486
- "rounded-l": ["rounded-tl", "rounded-bl"],
2487
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
2488
- "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2489
- "border-w-x": ["border-w-r", "border-w-l"],
2490
- "border-w-y": ["border-w-t", "border-w-b"],
2491
- "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2492
- "border-color-x": ["border-color-r", "border-color-l"],
2493
- "border-color-y": ["border-color-t", "border-color-b"],
2494
- "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2495
- "scroll-mx": ["scroll-mr", "scroll-ml"],
2496
- "scroll-my": ["scroll-mt", "scroll-mb"],
2497
- "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
2498
- "scroll-px": ["scroll-pr", "scroll-pl"],
2499
- "scroll-py": ["scroll-pt", "scroll-pb"],
2500
- touch: ["touch-x", "touch-y", "touch-pz"],
2501
- "touch-x": ["touch"],
2502
- "touch-y": ["touch"],
2503
- "touch-pz": ["touch"]
2504
- },
2505
- conflictingClassGroupModifiers: {
2506
- "font-size": ["leading"]
2507
- }
2508
- };
2509
- };
2510
- var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
2511
-
2512
- // src/utils/cn.ts
2513
- function cn(...inputs) {
2514
- return twMerge((0, import_clsx.clsx)(inputs));
2515
- }
2516
-
2517
- // src/components/ui/badge.tsx
2518
- var import_jsx_runtime = require("react/jsx-runtime");
2519
- var badgeVariants = (0, import_class_variance_authority.cva)(
2520
- "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
2521
- {
2522
- variants: {
2523
- variant: {
2524
- default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
2525
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
2526
- destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
2527
- outline: "text-foreground"
2528
- }
2529
- },
2530
- defaultVariants: {
2531
- variant: "default"
2532
- }
2533
- }
2534
- );
2535
- function Badge({ className, variant, ...props }) {
2536
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
2537
- }
2538
-
2539
- // src/components/ui/button.tsx
2540
- var import_react_slot = require("@radix-ui/react-slot");
2541
- var import_class_variance_authority2 = require("class-variance-authority");
2542
- var React = __toESM(require("react"));
2543
- var import_jsx_runtime2 = require("react/jsx-runtime");
2544
- var buttonVariants = (0, import_class_variance_authority2.cva)(
2545
- "inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
2546
- {
2547
- defaultVariants: {
2548
- size: "default",
2549
- variant: "default"
2550
- },
2551
- variants: {
2552
- size: {
2553
- clear: "",
2554
- default: "h-10 px-4 py-2",
2555
- icon: "h-10 w-10",
2556
- lg: "h-11 rounded px-8",
2557
- sm: "h-9 rounded px-3"
2558
- },
2559
- variant: {
2560
- default: "bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",
2561
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
2562
- ghost: "hover:bg-card hover:text-accent",
2563
- link: "text-primary items-start justify-start underline-offset-4 hover:underline",
2564
- outline: "border border-border bg-background hover:bg-card hover:text-accent",
2565
- secondary: "bg-secondary text-secondary-foreground hover:bg-accent"
2566
- }
2567
- }
2568
- }
2569
- );
2570
- var Button = React.forwardRef(
2571
- ({ asChild = false, className, size, variant, ...props }, ref) => {
2572
- const Comp = asChild ? import_react_slot.Slot : "button";
2573
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Comp, { className: cn(buttonVariants({ className, size, variant })), ref, ...props });
2574
- }
2575
- );
2576
- Button.displayName = "Button";
2577
-
2578
- // src/hooks/use-local-storage.ts
2579
- var import_react = require("react");
2580
- function useLocalStorage(key, initialValue) {
2581
- const [storedValue, setStoredValue] = (0, import_react.useState)(() => {
2582
- if (typeof window === "undefined") return initialValue;
2583
- try {
2584
- const item = window.localStorage.getItem(key);
2585
- return item ? JSON.parse(item) : initialValue;
2586
- } catch (error) {
2587
- return initialValue;
2588
- }
2589
- });
2590
- const setValue = (value) => {
2591
- try {
2592
- setStoredValue(value);
2593
- if (typeof window !== "undefined") {
2594
- window.localStorage.setItem(key, JSON.stringify(value));
2595
- }
2596
- } catch (error) {
2597
- }
2598
- };
2599
- (0, import_react.useEffect)(() => {
2600
- setValue(storedValue);
2601
- }, []);
2602
- return [storedValue, setValue];
2603
- }
2604
-
2605
- // src/components/Heros/DashboardHero/DashboardHero.tsx
2606
- var import_fa = require("react-icons/fa");
2607
- var import_lucide_react = require("lucide-react");
2608
-
2609
- // src/components/ui/dropdown-menu.tsx
2610
- var React2 = __toESM(require("react"));
2611
- var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
2612
- var import_react_icons = require("@radix-ui/react-icons");
2613
- var import_jsx_runtime3 = require("react/jsx-runtime");
2614
- var DropdownMenu = DropdownMenuPrimitive.Root;
2615
- var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
2616
- var DropdownMenuSubTrigger = React2.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2617
- DropdownMenuPrimitive.SubTrigger,
2618
- {
2619
- ref,
2620
- className: cn(
2621
- "flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
2622
- inset && "pl-8",
2623
- className
2624
- ),
2625
- ...props,
2626
- children: [
2627
- children,
2628
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_icons.ChevronRightIcon, { className: "ml-auto" })
2629
- ]
2630
- }
2631
- ));
2632
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
2633
- var DropdownMenuSubContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2634
- DropdownMenuPrimitive.SubContent,
2635
- {
2636
- ref,
2637
- className: cn(
2638
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2639
- className
2640
- ),
2641
- ...props
2642
- }
2643
- ));
2644
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
2645
- var DropdownMenuContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2646
- DropdownMenuPrimitive.Content,
2647
- {
2648
- ref,
2649
- sideOffset,
2650
- className: cn(
2651
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
2652
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2653
- className
2654
- ),
2655
- ...props
2656
- }
2657
- ) }));
2658
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
2659
- var DropdownMenuItem = React2.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2660
- DropdownMenuPrimitive.Item,
2661
- {
2662
- ref,
2663
- className: cn(
2664
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
2665
- inset && "pl-8",
2666
- className
2667
- ),
2668
- ...props
2669
- }
2670
- ));
2671
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
2672
- var DropdownMenuCheckboxItem = React2.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2673
- DropdownMenuPrimitive.CheckboxItem,
2674
- {
2675
- ref,
2676
- className: cn(
2677
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2678
- className
2679
- ),
2680
- checked,
2681
- ...props,
2682
- children: [
2683
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_icons.CheckIcon, { className: "h-4 w-4" }) }) }),
2684
- children
2685
- ]
2686
- }
2687
- ));
2688
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
2689
- var DropdownMenuRadioItem = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2690
- DropdownMenuPrimitive.RadioItem,
2691
- {
2692
- ref,
2693
- className: cn(
2694
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2695
- className
2696
- ),
2697
- ...props,
2698
- children: [
2699
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_icons.DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
2700
- children
2701
- ]
2702
- }
2703
- ));
2704
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
2705
- var DropdownMenuLabel = React2.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2706
- DropdownMenuPrimitive.Label,
2707
- {
2708
- ref,
2709
- className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
2710
- ...props
2711
- }
2712
- ));
2713
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
2714
- var DropdownMenuSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2715
- DropdownMenuPrimitive.Separator,
2716
- {
2717
- ref,
2718
- className: cn("-mx-1 my-1 h-px bg-muted", className),
2719
- ...props
2720
- }
2721
- ));
2722
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
2723
- var DropdownMenuShortcut = ({ className, ...props }) => {
2724
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props });
2725
- };
2726
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
2727
-
2728
- // src/components/Heros/DashboardHero/DashboardHero.tsx
2729
- var import_jsx_runtime4 = require("react/jsx-runtime");
2730
- function DashboardHero({
2731
- title,
2732
- description,
2733
- badge,
2734
- primaryAction,
2735
- secondaryAction,
2736
- tertiaryAction,
2737
- gradient,
2738
- children,
2739
- className
2740
- }) {
2741
- const [minimized, setMinimized] = useLocalStorage(
2742
- `hero-section-minimized-${title.replace(/\s+/g, "-").toLowerCase()}`,
2743
- !secondaryAction && !description ? true : false
2744
- );
2745
- const [actionsMenuOpen, setActionsMenuOpen] = (0, import_react2.useState)(false);
2746
- const shouldBeMinimized = !secondaryAction && !description || minimized;
2747
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2748
- import_react3.motion.div,
2749
- {
2750
- initial: { opacity: 0, y: 20 },
2751
- animate: { opacity: 1, y: 0 },
2752
- transition: { duration: 0.5 },
2753
- className: `overflow-hidden rounded-3xl ${gradient} p-8 text-white ${className || ""}`,
2754
- children: [
2755
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center justify-between mb-2", children: [
2756
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-3", children: [
2757
- badge && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Badge, { className: "bg-white/20 text-white hover:bg-white/30 rounded-xl", children: badge }),
2758
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "text-3xl font-bold m-0", children: title })
2759
- ] }),
2760
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-3", children: [
2761
- shouldBeMinimized && primaryAction && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2762
- Button,
2763
- {
2764
- className: "rounded-2xl bg-white text-indigo-700 hover:bg-white/90",
2765
- onClick: primaryAction.onClick,
2766
- children: primaryAction.label
2767
- }
2768
- ),
2769
- shouldBeMinimized && (secondaryAction || tertiaryAction) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(DropdownMenu, { open: actionsMenuOpen, onOpenChange: setActionsMenuOpen, children: [
2770
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2771
- Button,
2772
- {
2773
- variant: "ghost",
2774
- size: "sm",
2775
- className: "rounded-2xl bg-white/20 text-white hover:bg-white/30 p-2",
2776
- "aria-label": "More actions",
2777
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.EllipsisVertical, { size: 20 })
2778
- }
2779
- ) }),
2780
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(DropdownMenuContent, { align: "end", className: "w-48", children: [
2781
- secondaryAction && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DropdownMenuItem, { onClick: secondaryAction.onClick, children: secondaryAction.label }),
2782
- tertiaryAction && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DropdownMenuItem, { onClick: tertiaryAction.onClick, children: tertiaryAction.label })
2783
- ] })
2784
- ] }),
2785
- (secondaryAction || description) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2786
- "button",
2787
- {
2788
- "aria-label": minimized ? "Expand hero section" : "Minimize hero section",
2789
- className: "rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",
2790
- onClick: () => setMinimized(!minimized),
2791
- style: { lineHeight: 0 },
2792
- children: minimized ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_fa.FaChevronDown, { size: 22 }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_fa.FaChevronUp, { size: 22 })
2793
- }
2794
- )
2795
- ] })
2796
- ] }),
2797
- !shouldBeMinimized && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col gap-6 md:flex-row md:items-center md:justify-between", children: [
2798
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "space-y-4", children: [
2799
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "max-w-[600px] text-white/80", children: description }),
2800
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-wrap gap-3", children: [
2801
- primaryAction && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2802
- Button,
2803
- {
2804
- className: "rounded-2xl bg-white text-indigo-700 hover:bg-white/90",
2805
- onClick: primaryAction.onClick,
2806
- children: primaryAction.label
2807
- }
2808
- ),
2809
- secondaryAction && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2810
- Button,
2811
- {
2812
- variant: "outline",
2813
- className: "rounded-2xl bg-transparent border-white text-white hover:bg-white/10",
2814
- onClick: secondaryAction.onClick,
2815
- children: secondaryAction.label
2816
- }
2817
- ),
2818
- tertiaryAction && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2819
- Button,
2820
- {
2821
- variant: "outline",
2822
- className: "rounded-2xl bg-transparent border-white text-white hover:bg-white/10",
2823
- onClick: tertiaryAction.onClick,
2824
- children: tertiaryAction.label
2825
- }
2826
- )
2827
- ] })
2828
- ] }),
2829
- children && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "hidden lg:block", children })
2830
- ] })
2831
- ]
2832
- }
2833
- );
2834
- }
2835
-
2836
- // src/components/DigitalColleagues/knowledge-browser.tsx
2837
- var import_react9 = require("motion/react");
2838
- var import_lucide_react6 = require("lucide-react");
2839
- var import_react10 = require("react");
2840
-
2841
- // src/components/ui/input.tsx
2842
- var React3 = __toESM(require("react"));
2843
- var import_jsx_runtime5 = require("react/jsx-runtime");
2844
- var Input = React3.forwardRef(
2845
- ({ className, type, ...props }, ref) => {
2846
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2847
- "input",
2848
- {
2849
- type,
2850
- className: cn(
2851
- "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2852
- className
2853
- ),
2854
- ref,
2855
- ...props
2856
- }
2857
- );
2858
- }
2859
- );
2860
- Input.displayName = "Input";
2861
-
2862
- // src/components/ui/scroll-area.tsx
2863
- var React4 = __toESM(require("react"));
2864
- var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"));
2865
- var import_jsx_runtime6 = require("react/jsx-runtime");
2866
- var ScrollArea = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
2867
- ScrollAreaPrimitive.Root,
2868
- {
2869
- ref,
2870
- className: cn("relative overflow-hidden", className),
2871
- ...props,
2872
- children: [
2873
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
2874
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ScrollBar, {}),
2875
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ScrollAreaPrimitive.Corner, {})
2876
- ]
2877
- }
2878
- ));
2879
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
2880
- var ScrollBar = React4.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2881
- ScrollAreaPrimitive.ScrollAreaScrollbar,
2882
- {
2883
- ref,
2884
- orientation,
2885
- className: cn(
2886
- "flex touch-none select-none transition-colors",
2887
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
2888
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
2889
- className
2890
- ),
2891
- ...props,
2892
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
2893
- }
2894
- ));
2895
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
2896
-
2897
- // src/components/DigitalColleagues/document-preview.tsx
2898
- var import_react7 = require("motion/react");
2899
- var import_lucide_react5 = require("lucide-react");
2900
- var import_react8 = require("react");
2901
-
2902
- // src/components/DigitalColleagues/document-edit.tsx
2903
- var import_react5 = require("motion/react");
2904
- var import_lucide_react4 = require("lucide-react");
2905
- var import_react6 = require("react");
2906
-
2907
- // src/components/ui/textarea.tsx
2908
- var React5 = __toESM(require("react"));
2909
- var import_jsx_runtime7 = require("react/jsx-runtime");
2910
- var Textarea = React5.forwardRef(
2911
- ({ className, ...props }, ref) => {
2912
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2913
- "textarea",
2914
- {
2915
- className: cn(
2916
- "flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
2917
- className
2918
- ),
2919
- ref,
2920
- ...props
2921
- }
2922
- );
2923
- }
2924
- );
2925
- Textarea.displayName = "Textarea";
2926
-
2927
- // src/components/ui/select.tsx
2928
- var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
2929
- var import_lucide_react2 = require("lucide-react");
2930
- var React6 = __toESM(require("react"));
2931
- var import_jsx_runtime8 = require("react/jsx-runtime");
2932
- var Select = SelectPrimitive.Root;
2933
- var SelectValue = SelectPrimitive.Value;
2934
- var SelectTrigger = React6.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2935
- SelectPrimitive.Trigger,
2936
- {
2937
- className: cn(
2938
- "flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
2939
- className
2940
- ),
2941
- ref,
2942
- ...props,
2943
- children: [
2944
- children,
2945
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
2946
- ]
2947
- }
2948
- ));
2949
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
2950
- var SelectScrollUpButton = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2951
- SelectPrimitive.ScrollUpButton,
2952
- {
2953
- className: cn("flex cursor-default items-center justify-center py-1", className),
2954
- ref,
2955
- ...props,
2956
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.ChevronUp, { className: "h-4 w-4" })
2957
- }
2958
- ));
2959
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
2960
- var SelectScrollDownButton = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2961
- SelectPrimitive.ScrollDownButton,
2962
- {
2963
- className: cn("flex cursor-default items-center justify-center py-1", className),
2964
- ref,
2965
- ...props,
2966
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.ChevronDown, { className: "h-4 w-4" })
2967
- }
2968
- ));
2969
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
2970
- var SelectContent = React6.forwardRef(({ children, className, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2971
- SelectPrimitive.Content,
2972
- {
2973
- className: cn(
2974
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2975
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
2976
- className
2977
- ),
2978
- position,
2979
- ref,
2980
- ...props,
2981
- children: [
2982
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectScrollUpButton, {}),
2983
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2984
- SelectPrimitive.Viewport,
2985
- {
2986
- className: cn(
2987
- "p-1",
2988
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
2989
- ),
2990
- children
2991
- }
2992
- ),
2993
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectScrollDownButton, {})
2994
- ]
2995
- }
2996
- ) }));
2997
- SelectContent.displayName = SelectPrimitive.Content.displayName;
2998
- var SelectLabel = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2999
- SelectPrimitive.Label,
3000
- {
3001
- className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
3002
- ref,
3003
- ...props
3004
- }
3005
- ));
3006
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
3007
- var SelectItem = React6.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3008
- SelectPrimitive.Item,
3009
- {
3010
- className: cn(
3011
- "relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3012
- className
3013
- ),
3014
- ref,
3015
- ...props,
3016
- children: [
3017
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" }) }) }),
3018
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectPrimitive.ItemText, { children })
3019
- ]
3020
- }
3021
- ));
3022
- SelectItem.displayName = SelectPrimitive.Item.displayName;
3023
- var SelectSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3024
- SelectPrimitive.Separator,
3025
- {
3026
- className: cn("-mx-1 my-1 h-px bg-muted", className),
3027
- ref,
3028
- ...props
3029
- }
3030
- ));
3031
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
3032
-
3033
- // src/components/AdvancedComponents/EditableField.tsx
3034
- var import_react4 = require("react");
3035
-
3036
- // src/components/ui/label.tsx
3037
- var React7 = __toESM(require("react"));
3038
- var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
3039
- var import_class_variance_authority3 = require("class-variance-authority");
3040
- var import_jsx_runtime9 = require("react/jsx-runtime");
3041
- var labelVariants = (0, import_class_variance_authority3.cva)(
3042
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
3043
- );
3044
- var Label3 = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
3045
- Label3.displayName = LabelPrimitive.Root.displayName;
3046
-
3047
- // src/components/AdvancedComponents/EditableField.tsx
3048
- var import_lucide_react3 = require("lucide-react");
3049
- var import_jsx_runtime10 = require("react/jsx-runtime");
3050
- var EditableField = ({
3051
- fieldName,
3052
- value,
3053
- label,
3054
- multiline = false,
3055
- onSave,
3056
- className = "",
3057
- disabled = false
3058
- }) => {
3059
- const [isEditing, setIsEditing] = (0, import_react4.useState)(false);
3060
- const [tempValue, setTempValue] = (0, import_react4.useState)("");
3061
- const handleFieldClick = () => {
3062
- if (!disabled) {
3063
- setIsEditing(true);
3064
- setTempValue(value);
3065
- }
3066
- };
3067
- const handleSave = async () => {
3068
- if (tempValue !== value) {
3069
- await onSave(fieldName, tempValue);
3070
- }
3071
- setIsEditing(false);
3072
- };
3073
- const handleKeyPress = (e) => {
3074
- if (e.key === "Enter" && !multiline) {
3075
- handleSave();
3076
- } else if (e.key === "Enter" && e.ctrlKey && multiline) {
3077
- handleSave();
3078
- } else if (e.key === "Escape") {
3079
- setIsEditing(false);
3080
- setTempValue("");
3081
- }
3082
- };
3083
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: `space-y-2 ${className}`, children: [
3084
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Label3, { children: label }),
3085
- isEditing ? multiline ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3086
- Textarea,
3087
- {
3088
- value: tempValue,
3089
- onChange: (e) => setTempValue(e.target.value),
3090
- onBlur: handleSave,
3091
- onKeyDown: handleKeyPress,
3092
- autoFocus: true,
3093
- rows: 4,
3094
- className: "resize-none"
3095
- }
3096
- ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3097
- Input,
3098
- {
3099
- value: tempValue,
3100
- onChange: (e) => setTempValue(e.target.value),
3101
- onBlur: handleSave,
3102
- onKeyPress: handleKeyPress,
3103
- autoFocus: true,
3104
- className: "text-lg font-medium"
3105
- }
3106
- ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3107
- "div",
3108
- {
3109
- onClick: handleFieldClick,
3110
- className: `${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${multiline ? "min-h-[100px] max-h-[300px]" : "min-h-[40px]"} flex items-start gap-2 overflow-hidden`,
3111
- children: [
3112
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: `${multiline ? "text-sm text-muted-foreground max-h-[280px] overflow-y-auto break-words" : "text-lg font-medium text-foreground"} flex-1 whitespace-pre-wrap break-words`, children: value || "Click to edit..." }),
3113
- !disabled && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react3.Edit, { className: "h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0" })
3114
- ]
3115
- }
3116
- )
3117
- ] });
3118
- };
3119
-
3120
- // src/components/DigitalColleagues/document-edit.tsx
3121
- var import_jsx_runtime11 = require("react/jsx-runtime");
3122
- function DocumentEdit({
3123
- document,
3124
- onSave,
3125
- onCancel,
3126
- availableDocuments = [],
3127
- knowledgeContexts = []
3128
- }) {
3129
- const [editedDocument, setEditedDocument] = (0, import_react6.useState)({
3130
- ...document,
3131
- updatedAt: /* @__PURE__ */ new Date()
3132
- });
3133
- const [isMetadataExpanded, setIsMetadataExpanded] = (0, import_react6.useState)(false);
3134
- const [metadataFields, setMetadataFields] = (0, import_react6.useState)(() => {
3135
- const fields = [];
3136
- let idCounter = 0;
3137
- const contextKeys = /* @__PURE__ */ new Set();
3138
- knowledgeContexts.forEach((context) => {
3139
- context.menuConfig.groupBy.forEach((key) => contextKeys.add(key));
3140
- });
3141
- contextKeys.forEach((key) => {
3142
- fields.push({
3143
- id: `context_field_${idCounter++}`,
3144
- key,
3145
- value: document.metadata?.[key] ? String(document.metadata[key]) : "",
3146
- isContextKey: true
3147
- });
3148
- });
3149
- if (document.metadata) {
3150
- Object.entries(document.metadata).forEach(([key, value]) => {
3151
- if (!contextKeys.has(key)) {
3152
- fields.push({
3153
- id: `existing_field_${idCounter++}`,
3154
- key,
3155
- value: String(value),
3156
- isContextKey: false
3157
- });
3158
- }
3159
- });
3160
- }
3161
- return fields;
3162
- });
3163
- const formatIcon = (format) => {
3164
- switch (format) {
3165
- case "markdown":
3166
- case "mdx":
3167
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.FileText, { className: "h-6 w-6 text-primary" });
3168
- case "richtext":
3169
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.File, { className: "h-6 w-6 text-success" });
3170
- case "text":
3171
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Type, { className: "h-6 w-6 text-muted-foreground" });
3172
- default:
3173
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.File, { className: "h-6 w-6 text-muted-foreground" });
3174
- }
3175
- };
3176
- const formatBadgeColor = (format) => {
3177
- switch (format) {
3178
- case "markdown":
3179
- return "bg-primary/10 text-primary border-primary/20";
3180
- case "mdx":
3181
- return "bg-secondary/10 text-secondary border-secondary/20";
3182
- case "richtext":
3183
- return "bg-success/10 text-success border-success/20";
3184
- case "text":
3185
- return "bg-muted/50 text-muted-foreground border-muted-foreground/20";
3186
- default:
3187
- return "bg-muted text-muted-foreground border-border";
3188
- }
3189
- };
3190
- const getSuggestedMetadataKeys = () => {
3191
- const keysFromDocuments = /* @__PURE__ */ new Set();
3192
- availableDocuments.forEach((doc) => {
3193
- if (doc.metadata) {
3194
- Object.keys(doc.metadata).forEach((key) => keysFromDocuments.add(key));
3195
- }
3196
- });
3197
- return {
3198
- documentKeys: Array.from(keysFromDocuments).sort()
3199
- };
3200
- };
3201
- const getSuggestedValues = (key) => {
3202
- const values = /* @__PURE__ */ new Set();
3203
- availableDocuments.forEach((doc) => {
3204
- if (doc.metadata?.[key]) {
3205
- values.add(String(doc.metadata[key]));
3206
- }
3207
- });
3208
- return Array.from(values).sort();
3209
- };
3210
- const suggestedKeys = getSuggestedMetadataKeys();
3211
- const handleSave = () => {
3212
- onSave(editedDocument);
3213
- };
3214
- (0, import_react6.useEffect)(() => {
3215
- const metadata = metadataFields.filter((field) => field.key.trim() !== "" && field.value.trim() !== "").reduce(
3216
- (acc, field) => ({
3217
- ...acc,
3218
- [field.key]: field.value
3219
- }),
3220
- {}
3221
- );
3222
- setEditedDocument((prev) => ({
3223
- ...prev,
3224
- metadata: Object.keys(metadata).length > 0 ? metadata : void 0
3225
- }));
3226
- }, [metadataFields]);
3227
- const handleMetadataKeyChange = (fieldId, newKey) => {
3228
- setMetadataFields(
3229
- (prev) => prev.map((field) => field.id === fieldId ? { ...field, key: newKey } : field)
3230
- );
3231
- };
3232
- const handleMetadataValueChange = (fieldId, newValue) => {
3233
- setMetadataFields(
3234
- (prev) => prev.map((field) => field.id === fieldId ? { ...field, value: newValue } : field)
3235
- );
3236
- };
3237
- const handleMetadataValueSelect = (fieldId, value) => {
3238
- if (value === "__custom__") {
3239
- handleMetadataValueChange(fieldId, "");
3240
- } else {
3241
- handleMetadataValueChange(fieldId, value);
3242
- }
3243
- };
3244
- const handleAddMetadataField = () => {
3245
- const newField = {
3246
- id: `field_${Date.now()}`,
3247
- key: "",
3248
- value: "",
3249
- isContextKey: false
3250
- };
3251
- setMetadataFields((prev) => [...prev, newField]);
3252
- };
3253
- const handleRemoveMetadataField = (fieldId) => {
3254
- setMetadataFields((prev) => prev.filter((field) => field.id !== fieldId));
3255
- };
3256
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3257
- import_react5.motion.div,
3258
- {
3259
- initial: { opacity: 0, y: 20 },
3260
- animate: { opacity: 1, y: 0 },
3261
- transition: { duration: 0.3 },
3262
- className: "h-full flex flex-col",
3263
- children: [
3264
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "border-b border-border bg-card p-8 pb-6", children: [
3265
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-start justify-between gap-4 mb-4", children: [
3266
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-start gap-4 flex-1 min-w-0", children: [
3267
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex-shrink-0 p-3 rounded-xl bg-muted border border-border", children: formatIcon(editedDocument.format) }),
3268
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-1 min-w-0", children: [
3269
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-start gap-4 mb-2 leading-tight", children: [
3270
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3271
- EditableField,
3272
- {
3273
- fieldName: "title",
3274
- value: editedDocument.title,
3275
- label: "",
3276
- onSave: (fieldName, value) => setEditedDocument((prev) => ({ ...prev, title: value })),
3277
- className: "[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"
3278
- }
3279
- ) }),
3280
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3281
- "span",
3282
- {
3283
- className: `inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${formatBadgeColor(
3284
- editedDocument.format
3285
- )} flex-shrink-0 mt-1`,
3286
- children: editedDocument.format.toUpperCase()
3287
- }
3288
- )
3289
- ] }),
3290
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3291
- EditableField,
3292
- {
3293
- fieldName: "description",
3294
- value: editedDocument.description || "Click to add description...",
3295
- label: "",
3296
- multiline: true,
3297
- onSave: (fieldName, value) => setEditedDocument((prev) => ({ ...prev, description: value })),
3298
- className: "[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"
3299
- }
3300
- ) })
3301
- ] })
3302
- ] }),
3303
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
3304
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3305
- Button,
3306
- {
3307
- variant: "ghost",
3308
- size: "sm",
3309
- onClick: () => setIsMetadataExpanded(!isMetadataExpanded),
3310
- className: "gap-2",
3311
- children: [
3312
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Info, { className: "h-4 w-4" }),
3313
- "Metadata",
3314
- metadataFields.filter(
3315
- (field) => field.key.trim() !== "" && field.value.trim() !== ""
3316
- ).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full", children: metadataFields.filter(
3317
- (field) => field.key.trim() !== "" && field.value.trim() !== ""
3318
- ).length }),
3319
- isMetadataExpanded ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.ChevronRight, { className: "h-4 w-4" })
3320
- ]
3321
- }
3322
- ),
3323
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Button, { variant: "outline", size: "sm", onClick: onCancel, className: "gap-2", children: [
3324
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.X, { className: "h-4 w-4" }),
3325
- "Cancel"
3326
- ] }),
3327
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Button, { size: "sm", onClick: handleSave, className: "gap-2", children: [
3328
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Save, { className: "h-4 w-4" }),
3329
- "Save Changes"
3330
- ] })
3331
- ] })
3332
- ] }),
3333
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3334
- import_react5.motion.div,
3335
- {
3336
- initial: false,
3337
- animate: {
3338
- height: isMetadataExpanded ? "auto" : 0,
3339
- opacity: isMetadataExpanded ? 1 : 0
3340
- },
3341
- transition: { duration: 0.2, ease: "easeInOut" },
3342
- className: "overflow-hidden",
3343
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "pt-4 border-t border-border mt-4", children: [
3344
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
3345
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("h3", { className: "text-sm font-semibold text-foreground flex items-center gap-2", children: [
3346
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Info, { className: "h-4 w-4" }),
3347
- "Document Metadata"
3348
- ] }),
3349
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3350
- Button,
3351
- {
3352
- type: "button",
3353
- variant: "outline",
3354
- size: "sm",
3355
- onClick: handleAddMetadataField,
3356
- className: "gap-1 h-8",
3357
- children: [
3358
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Plus, { className: "h-3 w-3" }),
3359
- "Add Field"
3360
- ]
3361
- }
3362
- )
3363
- ] }),
3364
- suggestedKeys.documentKeys.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("p", { className: "text-xs text-muted-foreground mb-3", children: [
3365
- "Additional from documents: ",
3366
- suggestedKeys.documentKeys.slice(0, 4).join(", "),
3367
- suggestedKeys.documentKeys.length > 4 && ` +${suggestedKeys.documentKeys.length - 4} more`
3368
- ] }),
3369
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "bg-muted rounded-lg p-4 border border-border", children: metadataFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "space-y-2", children: metadataFields.map((field) => {
3370
- const suggestedValues = getSuggestedValues(field.key);
3371
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex gap-2 items-center", children: [
3372
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3373
- Input,
3374
- {
3375
- value: field.key,
3376
- onChange: (e) => handleMetadataKeyChange(field.id, e.target.value),
3377
- placeholder: "Key",
3378
- className: `w-32 h-8 text-sm ${field.isContextKey ? "bg-primary/5 border-primary/30" : ""}`,
3379
- list: `metadata-keys-${field.id}`,
3380
- disabled: field.isContextKey
3381
- }
3382
- ),
3383
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("datalist", { id: `metadata-keys-${field.id}`, children: suggestedKeys.documentKeys.map((suggestedKey) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("option", { value: suggestedKey }, suggestedKey)) }),
3384
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-muted-foreground text-sm", children: "=" }),
3385
- suggestedValues.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3386
- Select,
3387
- {
3388
- value: field.value || "",
3389
- onValueChange: (newValue) => handleMetadataValueSelect(field.id, newValue),
3390
- children: [
3391
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectTrigger, { className: "flex-1 h-8 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectValue, { placeholder: "Value" }) }),
3392
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(SelectContent, { children: [
3393
- suggestedValues.map((suggestedValue) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectItem, { value: suggestedValue, children: suggestedValue }, suggestedValue)),
3394
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SelectItem, { value: "__custom__", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-muted-foreground text-xs", children: "Custom..." }) })
3395
- ] })
3396
- ]
3397
- }
3398
- ) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3399
- Input,
3400
- {
3401
- value: field.value || "",
3402
- onChange: (e) => handleMetadataValueChange(field.id, e.target.value),
3403
- placeholder: "Value",
3404
- className: "flex-1 h-8 text-sm"
3405
- }
3406
- ),
3407
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3408
- Button,
3409
- {
3410
- type: "button",
3411
- variant: "ghost",
3412
- size: "sm",
3413
- onClick: () => handleRemoveMetadataField(field.id),
3414
- className: "h-8 w-8 p-0 text-muted-foreground hover:text-destructive",
3415
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.X, { className: "h-3 w-3" })
3416
- }
3417
- )
3418
- ] }, field.id);
3419
- }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "text-center py-4", children: [
3420
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-sm text-muted-foreground mb-2", children: "No metadata fields" }),
3421
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "text-xs text-muted-foreground", children: 'Click "Add Field" to create metadata' })
3422
- ] }) })
3423
- ] })
3424
- }
3425
- )
3426
- ] }),
3427
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "p-8", children: [
3428
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { className: "block text-sm font-medium text-foreground mb-4", children: "Content" }),
3429
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3430
- Textarea,
3431
- {
3432
- value: editedDocument.content || "",
3433
- onChange: (e) => setEditedDocument((prev) => ({ ...prev, content: e.target.value })),
3434
- placeholder: "Document content...",
3435
- className: "min-h-[400px] font-mono text-sm",
3436
- style: { resize: "vertical" }
3437
- }
3438
- )
3439
- ] }) })
3440
- ]
3441
- }
3442
- );
3443
- }
3444
-
3445
- // src/components/DigitalColleagues/document-preview.tsx
3446
- var import_jsx_runtime12 = require("react/jsx-runtime");
3447
- var defaultMarkdownRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3448
- "div",
3449
- {
3450
- className: "prose prose-slate dark:prose-invert max-w-none",
3451
- dangerouslySetInnerHTML: {
3452
- __html: content.replace(/\n/g, "<br>").replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\*(.*?)\*/g, "<em>$1</em>").replace(/`(.*?)`/g, '<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm, '<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm, '<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm, '<h3 class="text-lg font-medium mb-2">$1</h3>')
3453
- }
3454
- }
3455
- );
3456
- var defaultTextRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "whitespace-pre-wrap font-mono text-sm leading-relaxed", children: content });
3457
- var defaultRichTextRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "prose prose-slate dark:prose-invert max-w-none", children: [
3458
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "text-amber-800 dark:text-amber-200 text-sm", children: [
3459
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "RichText Renderer:" }),
3460
- " This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."
3461
- ] }) }),
3462
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("pre", { className: "text-sm", children: content })
3463
- ] });
3464
- var defaultMDXRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "prose prose-slate dark:prose-invert max-w-none", children: [
3465
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("p", { className: "text-blue-800 dark:text-blue-200 text-sm", children: [
3466
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: "MDX Renderer:" }),
3467
- " This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."
3468
- ] }) }),
3469
- defaultMarkdownRenderer(content)
3470
- ] });
3471
- function DocumentPreview({
3472
- document,
3473
- onDocumentUpdate,
3474
- editable = true,
3475
- renderers,
3476
- availableDocuments = [],
3477
- knowledgeContexts = []
3478
- }) {
3479
- const [isEditing, setIsEditing] = (0, import_react8.useState)(false);
3480
- const [isMetadataExpanded, setIsMetadataExpanded] = (0, import_react8.useState)(false);
3481
- const formatIcon = (format) => {
3482
- switch (format) {
3483
- case "markdown":
3484
- case "mdx":
3485
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.FileText, { className: "h-6 w-6 text-primary" });
3486
- case "richtext":
3487
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.File, { className: "h-6 w-6 text-success" });
3488
- case "text":
3489
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Type, { className: "h-6 w-6 text-muted-foreground" });
3490
- default:
3491
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.File, { className: "h-6 w-6 text-muted-foreground" });
3492
- }
3493
- };
3494
- const formatBadgeColor = (format) => {
3495
- switch (format) {
3496
- case "markdown":
3497
- return "bg-primary/10 text-primary border-primary/20";
3498
- case "mdx":
3499
- return "bg-secondary/10 text-secondary border-secondary/20";
3500
- case "richtext":
3501
- return "bg-success/10 text-success border-success/20";
3502
- case "text":
3503
- return "bg-muted/50 text-muted-foreground border-muted-foreground/20";
3504
- default:
3505
- return "bg-muted text-muted-foreground border-border";
3506
- }
3507
- };
3508
- const renderContent = (content, format) => {
3509
- const defaultRenderers = {
3510
- markdown: defaultMarkdownRenderer,
3511
- mdx: defaultMDXRenderer,
3512
- richtext: defaultRichTextRenderer,
3513
- text: defaultTextRenderer
3514
- };
3515
- const renderer = renderers?.[format] || defaultRenderers[format];
3516
- if (renderer) {
3517
- return renderer(content);
3518
- }
3519
- return defaultTextRenderer(content);
3520
- };
3521
- const handleSave = (updatedDocument) => {
3522
- setIsEditing(false);
3523
- onDocumentUpdate?.(updatedDocument);
3524
- };
3525
- const handleCancel = () => {
3526
- setIsEditing(false);
3527
- };
3528
- if (isEditing) {
3529
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3530
- DocumentEdit,
3531
- {
3532
- document,
3533
- onSave: handleSave,
3534
- onCancel: handleCancel,
3535
- availableDocuments,
3536
- knowledgeContexts
3537
- }
3538
- );
3539
- }
3540
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3541
- import_react7.motion.div,
3542
- {
3543
- initial: { opacity: 0, y: 20 },
3544
- animate: { opacity: 1, y: 0 },
3545
- transition: { duration: 0.3 },
3546
- className: "h-full flex flex-col",
3547
- children: [
3548
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "border-b border-border bg-card p-8 pb-6", children: [
3549
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-start justify-between gap-4 mb-4", children: [
3550
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-start gap-4 flex-1 min-w-0", children: [
3551
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex-shrink-0 p-3 rounded-xl bg-muted border border-border", children: formatIcon(document.format) }),
3552
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex-1 min-w-0", children: [
3553
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("h1", { className: "text-2xl font-bold text-foreground mb-2 leading-tight", children: [
3554
- document.title,
3555
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: `inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${formatBadgeColor(document.format)}`, children: document.format.toUpperCase() })
3556
- ] }),
3557
- document.description && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-muted-foreground text-lg leading-relaxed", children: document.description })
3558
- ] })
3559
- ] }),
3560
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
3561
- document.metadata && Object.keys(document.metadata).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3562
- Button,
3563
- {
3564
- variant: "ghost",
3565
- size: "sm",
3566
- onClick: () => setIsMetadataExpanded(!isMetadataExpanded),
3567
- className: "gap-2",
3568
- children: [
3569
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Info, { className: "h-4 w-4" }),
3570
- "Metadata",
3571
- isMetadataExpanded ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ChevronRight, { className: "h-4 w-4" })
3572
- ]
3573
- }
3574
- ),
3575
- editable && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3576
- Button,
3577
- {
3578
- variant: "outline",
3579
- size: "sm",
3580
- onClick: () => setIsEditing(true),
3581
- className: "gap-2",
3582
- children: [
3583
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Edit3, { className: "h-4 w-4" }),
3584
- "Edit"
3585
- ]
3586
- }
3587
- )
3588
- ] })
3589
- ] }),
3590
- document.metadata && Object.keys(document.metadata).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
3591
- import_react7.motion.div,
3592
- {
3593
- initial: false,
3594
- animate: {
3595
- height: isMetadataExpanded ? "auto" : 0,
3596
- opacity: isMetadataExpanded ? 1 : 0
3597
- },
3598
- transition: { duration: 0.2, ease: "easeInOut" },
3599
- className: "overflow-hidden",
3600
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "pt-4 border-t border-border mt-4", children: [
3601
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("h3", { className: "text-sm font-semibold text-foreground mb-3 flex items-center gap-2", children: [
3602
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Info, { className: "h-4 w-4" }),
3603
- "Document Metadata"
3604
- ] }),
3605
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "bg-muted rounded-lg p-4 border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm", children: Object.entries(document.metadata).map(([key, value]) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1", children: [
3606
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-muted-foreground font-medium text-xs uppercase tracking-wide", children: key.replace(/([A-Z])/g, " $1").trim() }),
3607
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-foreground font-medium", children: String(value) })
3608
- ] }, key)) }) })
3609
- ] })
3610
- }
3611
- )
3612
- ] }),
3613
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "p-8", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "space-y-4", children: document.content ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "bg-card border border-border rounded-xl p-6 overflow-hidden", children: renderContent(document.content, document.format) }) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border", children: [
3614
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.FileText, { className: "h-8 w-8 text-muted-foreground" }) }),
3615
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h4", { className: "text-foreground font-medium mb-1", children: "No content available" }),
3616
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-muted-foreground text-sm", children: "This document doesn't have preview content" })
3617
- ] }) }) }) })
3618
- ]
3619
- }
3620
- );
3621
- }
3622
-
3623
- // src/components/DigitalColleagues/knowledge-browser.tsx
3624
- var import_jsx_runtime13 = require("react/jsx-runtime");
3625
- function MenuItem({
3626
- label,
3627
- documents,
3628
- children,
3629
- level,
3630
- onDocumentClick,
3631
- selectedDocumentId,
3632
- showDocumentCount = true
3633
- }) {
3634
- const [isExpanded, setIsExpanded] = (0, import_react10.useState)(level === 0);
3635
- const hasChildren = children && Object.keys(children).length > 0;
3636
- const totalDocuments = documents.length + (children ? Object.values(children).reduce((acc, child) => acc + child.documents.length, 0) : 0);
3637
- const formatDocumentIcon = (format) => {
3638
- switch (format) {
3639
- case "markdown":
3640
- case "mdx":
3641
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.FileText, { className: "h-3.5 w-3.5 text-muted-foreground" });
3642
- case "richtext":
3643
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.File, { className: "h-3.5 w-3.5 text-muted-foreground" });
3644
- default:
3645
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.File, { className: "h-3.5 w-3.5 text-muted-foreground" });
3646
- }
3647
- };
3648
- const getCategoryColor = (level2) => {
3649
- const colors = [
3650
- "bg-primary",
3651
- "bg-secondary",
3652
- "bg-accent",
3653
- "bg-chart-1"
3654
- ];
3655
- return colors[level2 % colors.length];
3656
- };
3657
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-1", children: [
3658
- (hasChildren || documents.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3659
- import_react9.motion.div,
3660
- {
3661
- className: `group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${isExpanded ? "bg-card shadow-sm border border-border" : "hover:bg-muted/50 hover:shadow-sm"}`,
3662
- style: { marginLeft: `${level * 20}px` },
3663
- onClick: () => setIsExpanded(!isExpanded),
3664
- whileHover: { scale: 1.01 },
3665
- whileTap: { scale: 0.99 },
3666
- children: [
3667
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: `w-1 h-6 rounded-full ${getCategoryColor(level)}` }),
3668
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3669
- import_react9.motion.div,
3670
- {
3671
- animate: { rotate: isExpanded ? 90 : 0 },
3672
- transition: { duration: 0.2 },
3673
- className: "flex-shrink-0",
3674
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.ChevronRight, { className: "h-4 w-4 text-muted-foreground" })
3675
- }
3676
- ),
3677
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex-1 flex items-center justify-between min-w-0", children: [
3678
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex items-center gap-2 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "font-medium text-foreground truncate", children: label }) }),
3679
- showDocumentCount && totalDocuments > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-shrink-0 ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full", children: totalDocuments }) })
3680
- ] })
3681
- ]
3682
- }
3683
- ),
3684
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3685
- import_react9.motion.div,
3686
- {
3687
- initial: false,
3688
- animate: {
3689
- height: isExpanded ? "auto" : 0,
3690
- opacity: isExpanded ? 1 : 0
3691
- },
3692
- transition: { duration: 0.2, ease: "easeInOut" },
3693
- className: "overflow-hidden",
3694
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "pt-2 space-y-1", children: [
3695
- documents.map((doc, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3696
- import_react9.motion.div,
3697
- {
3698
- initial: { opacity: 0, x: -10 },
3699
- animate: { opacity: 1, x: 0 },
3700
- transition: { delay: index * 0.05, duration: 0.2 },
3701
- className: `group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${selectedDocumentId === doc.id ? "bg-primary/10 border-l-2 border-primary shadow-sm" : "hover:bg-muted/50 hover:translate-x-1"}`,
3702
- style: { marginLeft: `${level * 20 + 20}px` },
3703
- onClick: () => onDocumentClick?.(doc),
3704
- whileHover: { scale: 1.01 },
3705
- whileTap: { scale: 0.99 },
3706
- children: [
3707
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-shrink-0", children: formatDocumentIcon(doc.format) }),
3708
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex-1 min-w-0", children: [
3709
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: `text-sm truncate transition-colors ${selectedDocumentId === doc.id ? "text-primary font-medium" : "text-foreground group-hover:text-foreground"}`, children: doc.title }),
3710
- doc.description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs text-muted-foreground truncate mt-0.5", children: doc.description })
3711
- ] }),
3712
- doc.tags && doc.tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors", children: doc.tags[0] }) })
3713
- ]
3714
- },
3715
- doc.id
3716
- )),
3717
- children && Object.entries(children).map(([childLabel, childData]) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3718
- MenuItem,
3719
- {
3720
- label: childLabel,
3721
- documents: childData.documents,
3722
- children: childData.children,
3723
- level: level + 1,
3724
- onDocumentClick,
3725
- selectedDocumentId,
3726
- showDocumentCount
3727
- },
3728
- childLabel
3729
- ))
3730
- ] })
3731
- }
3732
- )
3733
- ] });
3734
- }
3735
- function KnowledgeBrowser({
3736
- documents,
3737
- menuConfig,
3738
- onDocumentClick,
3739
- onDocumentShare,
3740
- onDocumentUpdate,
3741
- selectedDocumentId,
3742
- className,
3743
- editable = true
3744
- }) {
3745
- const [searchQuery, setSearchQuery] = (0, import_react10.useState)("");
3746
- const [selectedDocument, setSelectedDocument] = (0, import_react10.useState)(null);
3747
- const filteredDocuments = (0, import_react10.useMemo)(() => {
3748
- if (!searchQuery) return documents;
3749
- return documents.filter(
3750
- (doc) => doc.title.toLowerCase().includes(searchQuery.toLowerCase()) || doc.description?.toLowerCase().includes(searchQuery.toLowerCase()) || doc.tags?.some((tag) => tag.toLowerCase().includes(searchQuery.toLowerCase())) || Object.values(doc.metadata || {}).some(
3751
- (value) => String(value).toLowerCase().includes(searchQuery.toLowerCase())
3752
- )
3753
- );
3754
- }, [documents, searchQuery]);
3755
- const hierarchy = (0, import_react10.useMemo)(() => {
3756
- const buildHierarchy = (docs, groupKeys) => {
3757
- if (groupKeys.length === 0) {
3758
- return {};
3759
- }
3760
- const [currentKey, ...remainingKeys] = groupKeys;
3761
- const grouped = docs.reduce((acc, doc) => {
3762
- const value = doc.metadata?.[currentKey] || "Uncategorized";
3763
- const key = String(value);
3764
- if (!acc[key]) {
3765
- acc[key] = { documents: [], children: {} };
3766
- }
3767
- if (remainingKeys.length === 0) {
3768
- acc[key].documents.push(doc);
3769
- } else {
3770
- const childHierarchy = buildHierarchy([doc], remainingKeys);
3771
- const childKey = Object.keys(childHierarchy)[0];
3772
- if (childKey) {
3773
- if (!acc[key].children) acc[key].children = {};
3774
- if (!acc[key].children[childKey]) {
3775
- acc[key].children[childKey] = childHierarchy[childKey];
3776
- } else {
3777
- acc[key].children[childKey].documents.push(...childHierarchy[childKey].documents);
3778
- }
3779
- }
3780
- }
3781
- return acc;
3782
- }, {});
3783
- return grouped;
3784
- };
3785
- if (!menuConfig.groupBy || menuConfig.groupBy.length === 0) {
3786
- return {
3787
- "All Documents": {
3788
- documents: filteredDocuments,
3789
- children: {}
3790
- }
3791
- };
3792
- }
3793
- return buildHierarchy(filteredDocuments, menuConfig.groupBy);
3794
- }, [filteredDocuments, menuConfig.groupBy]);
3795
- const handleDocumentClick = (document) => {
3796
- setSelectedDocument(document);
3797
- onDocumentClick?.(document);
3798
- };
3799
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `flex h-full ${className || ""}`, children: [
3800
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w-1/3 border-r border-border bg-muted/20", children: [
3801
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "p-6 border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative", children: [
3802
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Search, { className: "h-4 w-4 text-muted-foreground" }) }),
3803
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3804
- Input,
3805
- {
3806
- placeholder: "Search knowledge base...",
3807
- value: searchQuery,
3808
- onChange: (e) => setSearchQuery(e.target.value),
3809
- className: "pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"
3810
- }
3811
- )
3812
- ] }) }),
3813
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ScrollArea, { className: "h-[calc(100%-100px)]", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "p-4 space-y-3", children: [
3814
- Object.entries(hierarchy).map(([label, data]) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3815
- MenuItem,
3816
- {
3817
- label,
3818
- documents: data.documents,
3819
- children: data.children,
3820
- level: 0,
3821
- onDocumentClick: handleDocumentClick,
3822
- selectedDocumentId,
3823
- showDocumentCount: menuConfig.showDocumentCount
3824
- },
3825
- label
3826
- )),
3827
- Object.keys(hierarchy).length === 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3828
- import_react9.motion.div,
3829
- {
3830
- initial: { opacity: 0 },
3831
- animate: { opacity: 1 },
3832
- className: "text-center text-muted-foreground py-12",
3833
- children: [
3834
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.FileText, { className: "h-8 w-8 text-muted-foreground" }) }),
3835
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-sm font-medium", children: "No documents found" }),
3836
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs mt-1", children: "Try adjusting your search terms" })
3837
- ]
3838
- }
3839
- )
3840
- ] }) })
3841
- ] }),
3842
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex-1 bg-background", children: selectedDocument ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
3843
- DocumentPreview,
3844
- {
3845
- document: selectedDocument,
3846
- onDocumentUpdate,
3847
- editable
3848
- }
3849
- ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-full flex items-center justify-center text-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
3850
- import_react9.motion.div,
3851
- {
3852
- initial: { opacity: 0, y: 20 },
3853
- animate: { opacity: 1, y: 0 },
3854
- transition: { duration: 0.4 },
3855
- className: "max-w-sm",
3856
- children: [
3857
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.FileText, { className: "h-10 w-10 text-primary" }) }),
3858
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { className: "text-xl font-semibold text-foreground mb-2", children: "Select a document" }),
3859
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-muted-foreground leading-relaxed", children: "Choose any document from the knowledge base to view its content and details" })
3860
- ]
3861
- }
3862
- ) }) })
3863
- ] });
3864
- }
3865
-
3866
- // src/components/DigitalColleagues/Views/KnowledgeView.tsx
3867
- var import_jsx_runtime14 = require("react/jsx-runtime");
3868
- function KnowledgeView({
3869
- documents = [],
3870
- contexts = [],
3871
- onDocumentClick = (document) => console.log("Document clicked:", document),
3872
- onDocumentShare = (document) => console.log("Share document:", document),
3873
- onLoadDocumentContent,
3874
- selectedDocumentId
3875
- }) {
3876
- const [activeContext, setActiveContext] = (0, import_react11.useState)(contexts[0]);
3877
- if (!contexts || contexts.length === 0) {
3878
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col h-full max-h-[calc(100vh-8rem)]", children: [
3879
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-2 md:px-4 py-4 flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3880
- DashboardHero,
3881
- {
3882
- title: "Knowledge",
3883
- description: "Access, manage, and share all your team knowledge in one place.",
3884
- gradient: "bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",
3885
- primaryAction: {
3886
- label: "Create",
3887
- onClick: () => console.log("Create document clicked")
3888
- }
3889
- }
3890
- ) }),
3891
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-muted-foreground", children: "No contexts available" }) })
3892
- ] });
3893
- }
3894
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col h-full max-h-[calc(100vh-8rem)]", children: [
3895
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "px-2 md:px-4 py-4 flex-shrink-0", children: [
3896
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3897
- DashboardHero,
3898
- {
3899
- title: "Knowledge",
3900
- description: "Access, manage, and share all your team knowledge in one place.",
3901
- gradient: "bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",
3902
- primaryAction: {
3903
- label: "Create",
3904
- onClick: () => console.log("Create document clicked")
3905
- }
3906
- }
3907
- ),
3908
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mt-6", children: [
3909
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("nav", { className: "-mb-px flex space-x-8 overflow-x-auto", children: contexts.map((context) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
3910
- "button",
3911
- {
3912
- onClick: () => setActiveContext(context),
3913
- className: `group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${activeContext.id === context.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,
3914
- children: [
3915
- context.icon,
3916
- context.label
3917
- ]
3918
- },
3919
- context.id
3920
- )) }) }),
3921
- activeContext.description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "mt-3 px-1", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-sm text-muted-foreground", children: activeContext.description }) })
3922
- ] })
3923
- ] }),
3924
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex-1 min-h-0 px-2 md:px-4 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-full rounded-3xl border overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3925
- KnowledgeBrowser,
3926
- {
3927
- documents,
3928
- menuConfig: activeContext.menuConfig,
3929
- onDocumentClick,
3930
- onDocumentShare,
3931
- selectedDocumentId
3932
- }
3933
- ) }) })
3934
- ] });
3935
- }