@wakastellar/ui 4.0.1 → 4.1.1

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 (622) hide show
  1. package/dist/blocks/_shared/identity/InviteUserPanel.cjs.js +1 -1
  2. package/dist/blocks/_shared/identity/RoleSelect.cjs.js +1 -1
  3. package/dist/blocks/_shared/identity/SidePushLayout.cjs.js +1 -1
  4. package/dist/blocks/activity-timeline/index.cjs.js +1 -1
  5. package/dist/blocks/activity-timeline/index.es.js +1 -1
  6. package/dist/blocks/antivirus-dashboard/index.cjs.js +1 -1
  7. package/dist/blocks/antivirus-dashboard/index.es.js +1 -1
  8. package/dist/blocks/api-keys-manager/index.cjs.js +1 -1
  9. package/dist/blocks/apm-overview/index.cjs.js +1 -1
  10. package/dist/blocks/auth-2fa/index.cjs.js +2 -2
  11. package/dist/blocks/auth-2fa/index.es.js +1 -1
  12. package/dist/blocks/avatar-upload/index.cjs.js +1 -1
  13. package/dist/blocks/avatar-upload/index.es.js +13 -13
  14. package/dist/blocks/calendar-view/index.cjs.js +1 -1
  15. package/dist/blocks/calendar-view/index.es.js +1 -1
  16. package/dist/blocks/chat/index.cjs.js +1 -1
  17. package/dist/blocks/chat/index.es.js +162 -162
  18. package/dist/blocks/chat/widget.cjs.js +1 -1
  19. package/dist/blocks/chat/widget.es.js +19 -13
  20. package/dist/blocks/chat-interface/index.cjs.js +1 -1
  21. package/dist/blocks/chat-interface/index.es.js +1 -1
  22. package/dist/blocks/checkout-flow/index.cjs.js +1 -1
  23. package/dist/blocks/checkout-flow/index.es.js +1 -1
  24. package/dist/blocks/cicd-builder/index.cjs.js +1 -1
  25. package/dist/blocks/clamav-service-status/index.cjs.js +1 -1
  26. package/dist/blocks/cloud-cost-dashboard/index.cjs.js +1 -1
  27. package/dist/blocks/container-orchestrator/index.cjs.js +1 -1
  28. package/dist/blocks/container-orchestrator/index.es.js +2 -1
  29. package/dist/blocks/dashboard/index.cjs.js +1 -1
  30. package/dist/blocks/dashboard/index.es.js +2 -2
  31. package/dist/blocks/dashboard-kpi/index.cjs.js +1 -1
  32. package/dist/blocks/dashboard-kpi/index.es.js +1 -1
  33. package/dist/blocks/database-admin/index.cjs.js +1 -1
  34. package/dist/blocks/deployment-dashboard/index.cjs.js +1 -1
  35. package/dist/blocks/deployment-dashboard/index.es.js +1 -1
  36. package/dist/blocks/empty-states/index.cjs.js +1 -1
  37. package/dist/blocks/empty-states/index.es.js +1 -1
  38. package/dist/blocks/error-pages/index.cjs.js +1 -1
  39. package/dist/blocks/error-pages/index.es.js +1 -1
  40. package/dist/blocks/faq/index.cjs.js +1 -1
  41. package/dist/blocks/faq/index.es.js +1 -1
  42. package/dist/blocks/file-manager/index.cjs.js +1 -1
  43. package/dist/blocks/file-manager/index.es.js +1 -1
  44. package/dist/blocks/file-scan-uploader/index.cjs.js +1 -1
  45. package/dist/blocks/file-scan-uploader/index.es.js +2 -2
  46. package/dist/blocks/footer/index.cjs.js +1 -1
  47. package/dist/blocks/gitops-sync-status/index.cjs.js +1 -1
  48. package/dist/blocks/header/index.cjs.js +1 -1
  49. package/dist/blocks/header/index.es.js +1 -1
  50. package/dist/blocks/headtab/index.cjs.js +1 -1
  51. package/dist/blocks/i18n-editor/index.cjs.js +1 -1
  52. package/dist/blocks/i18n-editor/index.es.js +127 -127
  53. package/dist/blocks/incident-manager/index.cjs.js +1 -1
  54. package/dist/blocks/infrastructure-map/index.cjs.js +1 -1
  55. package/dist/blocks/kanban-board/index.cjs.js +1 -1
  56. package/dist/blocks/kanban-board/index.es.js +1 -1
  57. package/dist/blocks/landing/index.cjs.js +1 -1
  58. package/dist/blocks/landing/index.es.js +1 -1
  59. package/dist/blocks/language-selector/index.cjs.js +1 -1
  60. package/dist/blocks/layout/index.cjs.js +1 -1
  61. package/dist/blocks/login/index.cjs.js +1 -1
  62. package/dist/blocks/on-call-schedule/index.cjs.js +1 -1
  63. package/dist/blocks/player-profile/index.cjs.js +1 -1
  64. package/dist/blocks/player-profile/index.es.js +1 -1
  65. package/dist/blocks/pricing/index.cjs.js +1 -1
  66. package/dist/blocks/pricing/index.es.js +1 -1
  67. package/dist/blocks/profile/index.cjs.js +1 -1
  68. package/dist/blocks/profile/index.es.js +1 -1
  69. package/dist/blocks/profile-list/index.cjs.js +1 -1
  70. package/dist/blocks/quarantine-manager/index.cjs.js +1 -1
  71. package/dist/blocks/quarantine-manager/index.es.js +1 -1
  72. package/dist/blocks/release-notes/index.cjs.js +1 -1
  73. package/dist/blocks/scan-history-log/index.cjs.js +1 -1
  74. package/dist/blocks/scan-history-log/index.es.js +1 -1
  75. package/dist/blocks/scan-policy-editor/index.cjs.js +1 -1
  76. package/dist/blocks/scan-report-generator/index.cjs.js +1 -1
  77. package/dist/blocks/settings/index.cjs.js +1 -1
  78. package/dist/blocks/settings/index.es.js +1 -1
  79. package/dist/blocks/sidebar/index.cjs.js +1 -1
  80. package/dist/blocks/sidebar/index.es.js +1 -1
  81. package/dist/blocks/signature-database-manager/index.cjs.js +1 -1
  82. package/dist/blocks/team-form/index.cjs.js +1 -1
  83. package/dist/blocks/threat-alert-banner/index.cjs.js +1 -1
  84. package/dist/blocks/user-management/index.cjs.js +1 -1
  85. package/dist/blocks/waka-doc-shell/index.cjs.js +1 -1
  86. package/dist/blocks/wizard/index.cjs.js +1 -1
  87. package/dist/blocks/wizard/index.es.js +37 -37
  88. package/dist/charts.cjs.js +1 -1
  89. package/dist/charts.es.js +8 -8
  90. package/dist/cli/index.cjs +5 -1
  91. package/dist/components/DataTable/DataTable.cjs.js +1 -1
  92. package/dist/components/DataTable/DataTable.es.js +68 -66
  93. package/dist/components/DataTable/DataTableAdvanced.cjs.js +1 -1
  94. package/dist/components/DataTable/DataTableColumnResizer.cjs.js +1 -1
  95. package/dist/components/DataTable/DataTableContextMenu.cjs.js +1 -1
  96. package/dist/components/DataTable/DataTableEditCell.cjs.js +1 -1
  97. package/dist/components/DataTable/DataTableFilters.cjs.js +1 -1
  98. package/dist/components/DataTable/DataTableGrouping.cjs.js +1 -1
  99. package/dist/components/DataTable/DataTablePagination.cjs.js +1 -1
  100. package/dist/components/DataTable/DataTablePagination.d.ts +3 -1
  101. package/dist/components/DataTable/DataTablePagination.es.js +38 -27
  102. package/dist/components/DataTable/DataTableSelection.cjs.js +1 -1
  103. package/dist/components/DataTable/DataTableToolbar.cjs.js +1 -1
  104. package/dist/components/DataTable/hooks/useDataTable.cjs.js +1 -1
  105. package/dist/components/DataTable/hooks/useDataTable.es.js +5 -1
  106. package/dist/components/DataTable/hooks/useDataTableAdvanced.cjs.js +1 -1
  107. package/dist/components/DataTable/hooks/useDataTableEdit.cjs.js +1 -1
  108. package/dist/components/DataTable/hooks/useDataTableExport.cjs.js +2 -2
  109. package/dist/components/DataTable/hooks/useDataTableImport.cjs.js +2 -2
  110. package/dist/components/DataTable/hooks/useDataTableImport.es.js +2 -1
  111. package/dist/components/DataTable/hooks/useDataTableTheme.cjs.js +1 -1
  112. package/dist/components/DataTable/hooks/useDataTableVirtualization.cjs.js +1 -1
  113. package/dist/components/DataTable/hooks/useTableLayout.cjs.js +1 -1
  114. package/dist/components/DataTable/utils.cjs.js +1 -1
  115. package/dist/components/accordion/index.cjs.js +1 -1
  116. package/dist/components/alert/index.cjs.js +1 -1
  117. package/dist/components/alert-dialog/index.cjs.js +1 -1
  118. package/dist/components/aspect-ratio/index.cjs.js +1 -1
  119. package/dist/components/avatar/index.cjs.js +1 -1
  120. package/dist/components/badge/index.cjs.js +1 -1
  121. package/dist/components/button/index.cjs.js +1 -1
  122. package/dist/components/calendar/index.cjs.js +1 -1
  123. package/dist/components/card/index.cjs.js +1 -1
  124. package/dist/components/checkbox/index.cjs.js +1 -1
  125. package/dist/components/code/index.cjs.js +2 -2
  126. package/dist/components/code/index.es.js +3 -2
  127. package/dist/components/collapsible/index.cjs.js +1 -1
  128. package/dist/components/command/index.cjs.js +1 -1
  129. package/dist/components/context-menu/index.cjs.js +1 -1
  130. package/dist/components/dialog/index.cjs.js +1 -1
  131. package/dist/components/dropdown-menu/index.cjs.js +1 -1
  132. package/dist/components/editor/blocks/index.cjs.js +1 -1
  133. package/dist/components/editor/blocks/index.es.js +12 -12
  134. package/dist/components/editor/blocks/waka-acceptance-criteria-block.cjs.js +1 -1
  135. package/dist/components/editor/blocks/waka-ai-assist-block.cjs.js +1 -1
  136. package/dist/components/editor/blocks/waka-api-endpoint-block.cjs.js +1 -1
  137. package/dist/components/editor/blocks/waka-code-playground-block.cjs.js +1 -1
  138. package/dist/components/editor/blocks/waka-comment-thread-block.cjs.js +1 -1
  139. package/dist/components/editor/blocks/waka-diagram-block.cjs.js +3 -3
  140. package/dist/components/editor/blocks/waka-diagram-block.es.js +21 -40
  141. package/dist/components/editor/blocks/waka-embed-block.cjs.js +1 -1
  142. package/dist/components/editor/blocks/waka-slash-menu-block.cjs.js +1 -1
  143. package/dist/components/editor/blocks/waka-user-story-block.cjs.js +1 -1
  144. package/dist/components/editor/blocks/waka-version-diff-block.cjs.js +1 -1
  145. package/dist/components/editor/waka-ai-writer.cjs.js +1 -1
  146. package/dist/components/editor/waka-collaborative-editor.cjs.js +1 -1
  147. package/dist/components/editor/waka-diff-viewer.cjs.js +1 -1
  148. package/dist/components/editor/waka-dnd-editor.cjs.js +1 -1
  149. package/dist/components/editor/waka-document-editor.cjs.js +1 -1
  150. package/dist/components/editor/waka-document-editor.es.js +1 -1
  151. package/dist/components/editor/waka-editor-elements.cjs.js +1 -1
  152. package/dist/components/editor/waka-editor-leaves.cjs.js +1 -1
  153. package/dist/components/editor/waka-editor-toolbar.cjs.js +1 -1
  154. package/dist/components/editor/waka-editor.cjs.js +1 -1
  155. package/dist/components/editor/waka-floating-toolbar.cjs.js +1 -1
  156. package/dist/components/editor/waka-markdown-editor.cjs.js +1 -1
  157. package/dist/components/editor/waka-mention-editor.cjs.js +1 -1
  158. package/dist/components/editor/waka-mention-editor.es.js +2 -2
  159. package/dist/components/editor/waka-slash-menu.cjs.js +1 -1
  160. package/dist/components/editor/waka-spec-editor.cjs.js +1 -1
  161. package/dist/components/form/index.cjs.js +1 -1
  162. package/dist/components/hover-card/index.cjs.js +1 -1
  163. package/dist/components/input/index.cjs.js +1 -1
  164. package/dist/components/input-otp/index.cjs.js +1 -1
  165. package/dist/components/input-otp/index.es.js +2 -1
  166. package/dist/components/label/index.cjs.js +1 -1
  167. package/dist/components/language-selector/index.cjs.js +1 -1
  168. package/dist/components/menubar/index.cjs.js +1 -1
  169. package/dist/components/navigation-menu/index.cjs.js +1 -1
  170. package/dist/components/popover/index.cjs.js +1 -1
  171. package/dist/components/progress/index.cjs.js +1 -1
  172. package/dist/components/radio-group/index.cjs.js +1 -1
  173. package/dist/components/resizable/index.cjs.js +1 -1
  174. package/dist/components/resizable/index.es.js +9 -9
  175. package/dist/components/scroll-area/index.cjs.js +1 -1
  176. package/dist/components/select/index.cjs.js +1 -1
  177. package/dist/components/separator/index.cjs.js +1 -1
  178. package/dist/components/sheet/index.cjs.js +1 -1
  179. package/dist/components/skeleton/index.cjs.js +1 -1
  180. package/dist/components/slider/index.cjs.js +1 -1
  181. package/dist/components/switch/index.cjs.js +1 -1
  182. package/dist/components/table/index.cjs.js +1 -1
  183. package/dist/components/tabs/index.cjs.js +1 -1
  184. package/dist/components/textarea/index.cjs.js +1 -1
  185. package/dist/components/theme-selector/index.cjs.js +1 -1
  186. package/dist/components/toast/index.cjs.js +1 -1
  187. package/dist/components/toaster/index.cjs.js +1 -1
  188. package/dist/components/toggle/index.cjs.js +1 -1
  189. package/dist/components/toggle-group/index.cjs.js +1 -1
  190. package/dist/components/tooltip/index.cjs.js +1 -1
  191. package/dist/components/typography/index.cjs.js +1 -1
  192. package/dist/components/waka-3d-pie-chart/index.cjs.js +1 -1
  193. package/dist/components/waka-3d-pie-chart/index.es.js +1 -1
  194. package/dist/components/waka-achievement-unlock/index.cjs.js +1 -1
  195. package/dist/components/waka-achievement-unlock/index.es.js +1 -1
  196. package/dist/components/waka-activity-feed/index.cjs.js +2 -2
  197. package/dist/components/waka-activity-feed/index.es.js +1 -1
  198. package/dist/components/waka-ad-banner/index.cjs.js +1 -1
  199. package/dist/components/waka-ad-banner/index.es.js +18 -15
  200. package/dist/components/waka-ad-fallback/index.cjs.js +1 -1
  201. package/dist/components/waka-ad-fallback/index.es.js +1 -1
  202. package/dist/components/waka-ad-inline/index.cjs.js +1 -1
  203. package/dist/components/waka-ad-inline/index.es.js +2 -2
  204. package/dist/components/waka-ad-interstitial/index.cjs.js +1 -1
  205. package/dist/components/waka-ad-interstitial/index.es.js +3 -3
  206. package/dist/components/waka-ad-placeholder/index.cjs.js +2 -2
  207. package/dist/components/waka-ad-placeholder/index.es.js +1 -1
  208. package/dist/components/waka-ad-provider/index.cjs.js +1 -1
  209. package/dist/components/waka-ad-provider/index.es.js +1 -1
  210. package/dist/components/waka-ad-sidebar/index.cjs.js +1 -1
  211. package/dist/components/waka-ad-sidebar/index.es.js +2 -2
  212. package/dist/components/waka-ad-sticky-footer/index.cjs.js +1 -1
  213. package/dist/components/waka-ad-sticky-footer/index.es.js +2 -2
  214. package/dist/components/waka-address-autocomplete/index.cjs.js +2 -2
  215. package/dist/components/waka-address-autocomplete/index.es.js +10 -6
  216. package/dist/components/waka-admincrumb/index.cjs.js +1 -1
  217. package/dist/components/waka-alert-panel/index.cjs.js +1 -1
  218. package/dist/components/waka-alert-stack/index.cjs.js +1 -1
  219. package/dist/components/waka-alert-stack/index.es.js +1 -1
  220. package/dist/components/waka-allocation-matrix/index.cjs.js +2 -2
  221. package/dist/components/waka-allocation-matrix/index.es.js +1 -1
  222. package/dist/components/waka-approval-chain/index.cjs.js +1 -1
  223. package/dist/components/waka-approval-chain/index.es.js +1 -1
  224. package/dist/components/waka-artifact-list/index.cjs.js +1 -1
  225. package/dist/components/waka-artifact-list/index.es.js +1 -1
  226. package/dist/components/waka-audit-log/index.cjs.js +2 -2
  227. package/dist/components/waka-audit-log/index.es.js +1 -1
  228. package/dist/components/waka-autocomplete/index.cjs.js +1 -1
  229. package/dist/components/waka-autocomplete/index.es.js +3 -2
  230. package/dist/components/waka-badge-showcase/index.cjs.js +1 -1
  231. package/dist/components/waka-barcode/index.cjs.js +1 -1
  232. package/dist/components/waka-barcode/index.es.js +1 -1
  233. package/dist/components/waka-biometric-prompt/index.cjs.js +2 -2
  234. package/dist/components/waka-biometric-prompt/index.es.js +1 -1
  235. package/dist/components/waka-bottom-sheet/index.cjs.js +1 -1
  236. package/dist/components/waka-bottom-sheet/index.es.js +12 -7
  237. package/dist/components/waka-breadcrumb/index.cjs.js +1 -1
  238. package/dist/components/waka-breadcrumb/index.es.js +1 -1
  239. package/dist/components/waka-breadcrumb-path/index.cjs.js +1 -1
  240. package/dist/components/waka-breadcrumb-path/index.es.js +1 -1
  241. package/dist/components/waka-budget-burn/index.cjs.js +2 -2
  242. package/dist/components/waka-budget-burn/index.es.js +3 -3
  243. package/dist/components/waka-build-matrix/index.cjs.js +1 -1
  244. package/dist/components/waka-capacity-planner/index.cjs.js +2 -2
  245. package/dist/components/waka-capacity-planner/index.es.js +1 -1
  246. package/dist/components/waka-carousel/index.cjs.js +1 -1
  247. package/dist/components/waka-carousel/index.es.js +2 -2
  248. package/dist/components/waka-cart-summary/index.cjs.js +1 -1
  249. package/dist/components/waka-cart-summary/index.es.js +2 -2
  250. package/dist/components/waka-challenge-timer/index.cjs.js +1 -1
  251. package/dist/components/waka-charts/WakaAreaChart.cjs.js +1 -1
  252. package/dist/components/waka-charts/WakaAreaChart.es.js +2 -2
  253. package/dist/components/waka-charts/WakaBarChart.cjs.js +1 -1
  254. package/dist/components/waka-charts/WakaBarChart.es.js +2 -2
  255. package/dist/components/waka-charts/WakaChart.cjs.js +1 -1
  256. package/dist/components/waka-charts/WakaChart.es.js +1 -1
  257. package/dist/components/waka-charts/WakaLineChart.cjs.js +1 -1
  258. package/dist/components/waka-charts/WakaLineChart.es.js +2 -2
  259. package/dist/components/waka-charts/WakaMiniChart.cjs.js +1 -1
  260. package/dist/components/waka-charts/WakaMiniChart.es.js +2 -2
  261. package/dist/components/waka-charts/WakaPieChart.cjs.js +1 -1
  262. package/dist/components/waka-charts/WakaPieChart.es.js +2 -2
  263. package/dist/components/waka-charts/WakaSparkline.cjs.js +1 -1
  264. package/dist/components/waka-charts/WakaSparkline.es.js +1 -1
  265. package/dist/components/waka-charts/dataTableHelpers.cjs.js +1 -1
  266. package/dist/components/waka-charts/dataTableHelpers.es.js +1 -1
  267. package/dist/components/waka-charts/hooks/useChartTheme.cjs.js +1 -1
  268. package/dist/components/waka-charts/hooks/useChartTheme.es.js +1 -1
  269. package/dist/components/waka-charts/hooks/useRechartsLoader.cjs.js +1 -1
  270. package/dist/components/waka-charts/hooks/useRechartsLoader.es.js +1 -1
  271. package/dist/components/waka-chat-bubble/index.cjs.js +1 -1
  272. package/dist/components/waka-checklist/index.cjs.js +2 -2
  273. package/dist/components/waka-checklist/index.es.js +1 -1
  274. package/dist/components/waka-checkout-stepper/index.cjs.js +1 -1
  275. package/dist/components/waka-checkout-stepper/index.es.js +1 -1
  276. package/dist/components/waka-cohort-table/index.cjs.js +2 -2
  277. package/dist/components/waka-cohort-table/index.es.js +1 -1
  278. package/dist/components/waka-color-picker/index.cjs.js +2 -2
  279. package/dist/components/waka-color-picker/index.es.js +1 -1
  280. package/dist/components/waka-combo-counter/index.cjs.js +1 -1
  281. package/dist/components/waka-combobox/index.cjs.js +1 -1
  282. package/dist/components/waka-combobox/index.es.js +3 -2
  283. package/dist/components/waka-command-bar/index.cjs.js +1 -1
  284. package/dist/components/waka-compare-period/index.cjs.js +2 -2
  285. package/dist/components/waka-compare-period/index.es.js +7 -5
  286. package/dist/components/waka-config-comparator/index.cjs.js +1 -1
  287. package/dist/components/waka-config-comparator/index.es.js +1 -1
  288. package/dist/components/waka-connection-matrix/index.cjs.js +1 -1
  289. package/dist/components/waka-connection-matrix/index.es.js +1 -1
  290. package/dist/components/waka-container-list/index.cjs.js +1 -1
  291. package/dist/components/waka-container-list/index.es.js +1 -1
  292. package/dist/components/waka-content-recommendation/index.cjs.js +1 -1
  293. package/dist/components/waka-content-recommendation/index.es.js +2 -2
  294. package/dist/components/waka-contribution-graph/index.cjs.js +1 -1
  295. package/dist/components/waka-contribution-graph/index.es.js +4 -4
  296. package/dist/components/waka-cost-breakdown/index.cjs.js +1 -1
  297. package/dist/components/waka-cost-breakdown/index.es.js +7 -7
  298. package/dist/components/waka-coupon-input/index.cjs.js +2 -2
  299. package/dist/components/waka-coupon-input/index.es.js +1 -1
  300. package/dist/components/waka-credit-activity-feed/index.cjs.js +2 -2
  301. package/dist/components/waka-credit-activity-feed/index.es.js +1 -1
  302. package/dist/components/waka-credit-alert/index.cjs.js +1 -1
  303. package/dist/components/waka-credit-alert/index.es.js +1 -1
  304. package/dist/components/waka-credit-balance/index.cjs.js +1 -1
  305. package/dist/components/waka-credit-balance/index.es.js +3 -3
  306. package/dist/components/waka-credit-breakdown/index.cjs.js +1 -1
  307. package/dist/components/waka-credit-breakdown/index.es.js +1 -1
  308. package/dist/components/waka-credit-burn-rate/index.cjs.js +1 -1
  309. package/dist/components/waka-credit-burn-rate/index.es.js +1 -1
  310. package/dist/components/waka-credit-card-input/index.cjs.js +1 -1
  311. package/dist/components/waka-credit-card-input/index.es.js +1 -1
  312. package/dist/components/waka-credit-history/index.cjs.js +1 -1
  313. package/dist/components/waka-credit-history/index.es.js +1 -1
  314. package/dist/components/waka-credit-meter/index.cjs.js +2 -2
  315. package/dist/components/waka-credit-meter/index.es.js +3 -3
  316. package/dist/components/waka-credit-pricing-pack/index.cjs.js +1 -1
  317. package/dist/components/waka-credit-pricing-pack/index.es.js +1 -1
  318. package/dist/components/waka-credit-projection/index.cjs.js +1 -1
  319. package/dist/components/waka-credit-projection/index.es.js +1 -1
  320. package/dist/components/waka-credit-quota/index.cjs.js +1 -1
  321. package/dist/components/waka-credit-quota/index.es.js +3 -3
  322. package/dist/components/waka-credit-receipt/index.cjs.js +1 -1
  323. package/dist/components/waka-credit-receipt/index.es.js +1 -1
  324. package/dist/components/waka-credit-top-up/index.cjs.js +1 -1
  325. package/dist/components/waka-credit-top-up/index.es.js +1 -1
  326. package/dist/components/waka-credit-transaction/index.cjs.js +1 -1
  327. package/dist/components/waka-credit-transaction/index.es.js +1 -1
  328. package/dist/components/waka-credit-transfer-form/index.cjs.js +1 -1
  329. package/dist/components/waka-credit-transfer-form/index.es.js +1 -1
  330. package/dist/components/waka-credit-usage-chart/index.cjs.js +1 -1
  331. package/dist/components/waka-credit-usage-chart/index.es.js +1 -1
  332. package/dist/components/waka-daily-reward/index.cjs.js +1 -1
  333. package/dist/components/waka-database-card/index.cjs.js +1 -1
  334. package/dist/components/waka-database-card/index.es.js +1 -1
  335. package/dist/components/waka-date-range-picker/index.cjs.js +1 -1
  336. package/dist/components/waka-date-range-picker/index.es.js +3 -2
  337. package/dist/components/waka-datetime-picker/index.cjs.js +1 -1
  338. package/dist/components/waka-datetime-picker/index.es.js +4 -1
  339. package/dist/components/waka-datetime-picker.form-integration/index.cjs.js +1 -1
  340. package/dist/components/waka-dependency-tree/index.cjs.js +1 -1
  341. package/dist/components/waka-dependency-tree/index.es.js +1 -1
  342. package/dist/components/waka-deployment-lane/index.cjs.js +1 -1
  343. package/dist/components/waka-deployment-lane/index.es.js +1 -1
  344. package/dist/components/waka-device-trust/index.cjs.js +2 -2
  345. package/dist/components/waka-device-trust/index.es.js +1 -1
  346. package/dist/components/waka-doc-breadcrumb/index.cjs.js +1 -1
  347. package/dist/components/waka-doc-callout/index.cjs.js +1 -1
  348. package/dist/components/waka-doc-code-block/index.cjs.js +1 -1
  349. package/dist/components/waka-doc-nav/index.cjs.js +1 -1
  350. package/dist/components/waka-doc-renderer/index.cjs.js +1 -1
  351. package/dist/components/waka-doc-search/index.cjs.js +1 -1
  352. package/dist/components/waka-doc-table/index.cjs.js +1 -1
  353. package/dist/components/waka-doc-toc/index.cjs.js +1 -1
  354. package/dist/components/waka-doc-toolbar/index.cjs.js +1 -1
  355. package/dist/components/waka-doc-version/index.cjs.js +1 -1
  356. package/dist/components/waka-dock/index.cjs.js +1 -1
  357. package/dist/components/waka-dock/index.es.js +2 -2
  358. package/dist/components/waka-drawer/index.cjs.js +1 -1
  359. package/dist/components/waka-drawer/index.es.js +1 -1
  360. package/dist/components/waka-empty-state/index.cjs.js +1 -1
  361. package/dist/components/waka-env-var-editor/index.cjs.js +1 -1
  362. package/dist/components/waka-error-shake/index.cjs.js +1 -1
  363. package/dist/components/waka-feature-announcement/index.cjs.js +2 -2
  364. package/dist/components/waka-feature-announcement/index.es.js +1 -1
  365. package/dist/components/waka-feature-flag-row/index.cjs.js +1 -1
  366. package/dist/components/waka-file-upload/index.cjs.js +1 -1
  367. package/dist/components/waka-file-upload/index.es.js +2 -2
  368. package/dist/components/waka-floating-nav/index.cjs.js +1 -1
  369. package/dist/components/waka-floating-nav/index.es.js +1 -1
  370. package/dist/components/waka-flow-diagram/index.cjs.js +1 -1
  371. package/dist/components/waka-funnel-chart/index.cjs.js +2 -2
  372. package/dist/components/waka-funnel-chart/index.es.js +1 -1
  373. package/dist/components/waka-glow-card/index.cjs.js +1 -1
  374. package/dist/components/waka-glow-card/index.es.js +3 -3
  375. package/dist/components/waka-goal-progress/index.cjs.js +3 -3
  376. package/dist/components/waka-goal-progress/index.es.js +3 -3
  377. package/dist/components/waka-haptic-button/index.cjs.js +1 -1
  378. package/dist/components/waka-health-pulse/index.cjs.js +2 -2
  379. package/dist/components/waka-health-pulse/index.es.js +1 -1
  380. package/dist/components/waka-heatmap/index.cjs.js +1 -1
  381. package/dist/components/waka-heatmap/index.es.js +3 -3
  382. package/dist/components/waka-hotspot/index.cjs.js +1 -1
  383. package/dist/components/waka-image/index.cjs.js +1 -1
  384. package/dist/components/waka-image/index.es.js +1 -1
  385. package/dist/components/waka-incident-timeline/index.cjs.js +1 -1
  386. package/dist/components/waka-incident-timeline/index.es.js +3 -2
  387. package/dist/components/waka-invoice-preview/index.cjs.js +1 -1
  388. package/dist/components/waka-invoice-preview/index.es.js +1 -1
  389. package/dist/components/waka-kanban/index.cjs.js +1 -1
  390. package/dist/components/waka-kanban/index.es.js +1 -1
  391. package/dist/components/waka-kpi-dashboard/index.cjs.js +1 -1
  392. package/dist/components/waka-kpi-dashboard/index.es.js +6 -4
  393. package/dist/components/waka-kubernetes-overview/index.cjs.js +1 -1
  394. package/dist/components/waka-kubernetes-overview/index.es.js +1 -1
  395. package/dist/components/waka-leaderboard/index.cjs.js +1 -1
  396. package/dist/components/waka-level-progress/index.cjs.js +2 -2
  397. package/dist/components/waka-level-progress/index.es.js +2 -2
  398. package/dist/components/waka-liquid-button/index.cjs.js +1 -1
  399. package/dist/components/waka-loading-orbit/index.cjs.js +1 -1
  400. package/dist/components/waka-log-viewer/index.cjs.js +1 -1
  401. package/dist/components/waka-loot-box/index.cjs.js +2 -2
  402. package/dist/components/waka-loot-box/index.es.js +1 -1
  403. package/dist/components/waka-magic-link/index.cjs.js +2 -2
  404. package/dist/components/waka-magnetic-button/index.cjs.js +1 -1
  405. package/dist/components/waka-mention-input/index.cjs.js +1 -1
  406. package/dist/components/waka-mention-input/index.es.js +52 -40
  407. package/dist/components/waka-metric-sparkline/index.cjs.js +1 -1
  408. package/dist/components/waka-metric-sparkline/index.es.js +1 -1
  409. package/dist/components/waka-migration-list/index.cjs.js +1 -1
  410. package/dist/components/waka-milestone-road/index.cjs.js +2 -2
  411. package/dist/components/waka-milestone-road/index.es.js +5 -5
  412. package/dist/components/waka-modal/index.cjs.js +1 -1
  413. package/dist/components/waka-modal/index.es.js +1 -1
  414. package/dist/components/waka-morph-button/index.cjs.js +2 -2
  415. package/dist/components/waka-morph-button/index.es.js +6 -2
  416. package/dist/components/waka-network-topology/index.cjs.js +1 -1
  417. package/dist/components/waka-network-topology/index.es.js +4 -2
  418. package/dist/components/waka-notifications/index.cjs.js +1 -1
  419. package/dist/components/waka-number-input/index.cjs.js +1 -1
  420. package/dist/components/waka-number-input/index.es.js +1 -1
  421. package/dist/components/waka-orbital-menu/index.cjs.js +1 -1
  422. package/dist/components/waka-orbital-menu/index.es.js +1 -1
  423. package/dist/components/waka-order-tracker/index.cjs.js +1 -1
  424. package/dist/components/waka-order-tracker/index.es.js +3 -2
  425. package/dist/components/waka-outstream-video/index.cjs.js +1 -1
  426. package/dist/components/waka-outstream-video/index.es.js +2 -2
  427. package/dist/components/waka-pagination/index.cjs.js +1 -1
  428. package/dist/components/waka-pagination/index.es.js +1 -1
  429. package/dist/components/waka-password-strength/index.cjs.js +2 -2
  430. package/dist/components/waka-password-strength/index.es.js +3 -3
  431. package/dist/components/waka-payment-method-picker/index.cjs.js +1 -1
  432. package/dist/components/waka-payment-method-picker/index.es.js +1 -1
  433. package/dist/components/waka-permission-matrix/index.cjs.js +2 -2
  434. package/dist/components/waka-permission-matrix/index.es.js +3 -2
  435. package/dist/components/waka-phone-input/index.cjs.js +1 -1
  436. package/dist/components/waka-phone-input/index.es.js +5 -3
  437. package/dist/components/waka-pipeline-view/index.cjs.js +2 -2
  438. package/dist/components/waka-pipeline-view/index.es.js +1 -1
  439. package/dist/components/waka-player-card/index.cjs.js +2 -2
  440. package/dist/components/waka-player-card/index.es.js +4 -4
  441. package/dist/components/waka-pod-card/index.cjs.js +1 -1
  442. package/dist/components/waka-pod-card/index.es.js +1 -1
  443. package/dist/components/waka-points-popup/index.cjs.js +1 -1
  444. package/dist/components/waka-points-popup/index.es.js +5 -1
  445. package/dist/components/waka-power-up/index.cjs.js +1 -1
  446. package/dist/components/waka-presence-indicator/index.cjs.js +2 -2
  447. package/dist/components/waka-presence-indicator/index.es.js +1 -1
  448. package/dist/components/waka-pricing-table/index.cjs.js +2 -2
  449. package/dist/components/waka-pricing-table/index.es.js +1 -1
  450. package/dist/components/waka-product-card/index.cjs.js +1 -1
  451. package/dist/components/waka-progress-onboarding/index.cjs.js +3 -3
  452. package/dist/components/waka-progress-onboarding/index.es.js +1 -1
  453. package/dist/components/waka-pull-to-refresh/index.cjs.js +1 -1
  454. package/dist/components/waka-qrcode/index.cjs.js +1 -1
  455. package/dist/components/waka-qrcode/index.es.js +1 -1
  456. package/dist/components/waka-query-explain/index.cjs.js +1 -1
  457. package/dist/components/waka-quest-card/index.cjs.js +2 -2
  458. package/dist/components/waka-quest-card/index.es.js +4 -1
  459. package/dist/components/waka-quota-bar/index.cjs.js +2 -2
  460. package/dist/components/waka-quota-bar/index.es.js +11 -4
  461. package/dist/components/waka-radar-score/index.cjs.js +1 -1
  462. package/dist/components/waka-radar-score/index.es.js +6 -6
  463. package/dist/components/waka-rank-badge/index.cjs.js +2 -2
  464. package/dist/components/waka-rank-badge/index.es.js +1 -1
  465. package/dist/components/waka-rating-input/index.cjs.js +2 -2
  466. package/dist/components/waka-rating-input/index.es.js +1 -1
  467. package/dist/components/waka-reaction-picker/index.cjs.js +1 -1
  468. package/dist/components/waka-reaction-picker/index.es.js +7 -4
  469. package/dist/components/waka-region-map/index.cjs.js +1 -1
  470. package/dist/components/waka-region-map/index.es.js +1 -1
  471. package/dist/components/waka-resource-gauge/index.cjs.js +2 -2
  472. package/dist/components/waka-resource-gauge/index.es.js +3 -3
  473. package/dist/components/waka-resource-pool/index.cjs.js +2 -2
  474. package/dist/components/waka-resource-pool/index.es.js +1 -1
  475. package/dist/components/waka-rich-text-editor/index.cjs.js +1 -1
  476. package/dist/components/waka-rich-text-editor/index.es.js +1 -1
  477. package/dist/components/waka-rollback-slider/index.cjs.js +2 -2
  478. package/dist/components/waka-rollback-slider/index.es.js +5 -3
  479. package/dist/components/waka-sankey-diagram/index.cjs.js +2 -2
  480. package/dist/components/waka-sankey-diagram/index.es.js +5 -5
  481. package/dist/components/waka-schedule-picker/index.cjs.js +1 -1
  482. package/dist/components/waka-schedule-picker/index.es.js +3 -2
  483. package/dist/components/waka-scratch-card/index.cjs.js +2 -2
  484. package/dist/components/waka-scratch-card/index.es.js +1 -1
  485. package/dist/components/waka-season-pass/index.cjs.js +1 -1
  486. package/dist/components/waka-secret-card/index.cjs.js +1 -1
  487. package/dist/components/waka-security-scan-result/index.cjs.js +1 -1
  488. package/dist/components/waka-security-score/index.cjs.js +2 -2
  489. package/dist/components/waka-security-score/index.es.js +5 -5
  490. package/dist/components/waka-segmented-control/index.cjs.js +1 -1
  491. package/dist/components/waka-segmented-control/index.es.js +1 -1
  492. package/dist/components/waka-server-rack/index.cjs.js +1 -1
  493. package/dist/components/waka-service-graph/index.cjs.js +1 -1
  494. package/dist/components/waka-session-manager/index.cjs.js +1 -1
  495. package/dist/components/waka-session-manager/index.es.js +3 -2
  496. package/dist/components/waka-signature-pad/index.cjs.js +1 -1
  497. package/dist/components/waka-signature-pad/index.es.js +1 -1
  498. package/dist/components/waka-skeleton-wave/index.cjs.js +1 -1
  499. package/dist/components/waka-skill-tree/index.cjs.js +2 -2
  500. package/dist/components/waka-skill-tree/index.es.js +32 -32
  501. package/dist/components/waka-sla-tracker/index.cjs.js +1 -1
  502. package/dist/components/waka-sla-tracker/index.es.js +1 -1
  503. package/dist/components/waka-slider-range/index.cjs.js +1 -1
  504. package/dist/components/waka-slider-range/index.es.js +3 -3
  505. package/dist/components/waka-spin-wheel/index.cjs.js +2 -2
  506. package/dist/components/waka-spin-wheel/index.es.js +6 -6
  507. package/dist/components/waka-spinner/index.cjs.js +1 -1
  508. package/dist/components/waka-sponsored-badge/index.cjs.js +1 -1
  509. package/dist/components/waka-sponsored-badge/index.es.js +1 -1
  510. package/dist/components/waka-sponsored-card/index.cjs.js +1 -1
  511. package/dist/components/waka-sponsored-card/index.es.js +2 -2
  512. package/dist/components/waka-sponsored-feed/index.cjs.js +1 -1
  513. package/dist/components/waka-sponsored-feed/index.es.js +2 -2
  514. package/dist/components/waka-spotlight/index.cjs.js +1 -1
  515. package/dist/components/waka-spotlight/index.es.js +2 -1
  516. package/dist/components/waka-stat/index.cjs.js +1 -1
  517. package/dist/components/waka-stat/index.es.js +1 -1
  518. package/dist/components/waka-stats-hexagon/index.cjs.js +1 -1
  519. package/dist/components/waka-stats-hexagon/index.es.js +9 -9
  520. package/dist/components/waka-status-matrix/index.cjs.js +1 -1
  521. package/dist/components/waka-status-matrix/index.es.js +1 -1
  522. package/dist/components/waka-stepper/index.cjs.js +1 -1
  523. package/dist/components/waka-stepper/index.es.js +1 -1
  524. package/dist/components/waka-streak-counter/index.cjs.js +1 -1
  525. package/dist/components/waka-success-explosion/index.cjs.js +1 -1
  526. package/dist/components/waka-swipe-card/index.cjs.js +1 -1
  527. package/dist/components/waka-swipe-card/index.es.js +2 -2
  528. package/dist/components/waka-tabs-morph/index.cjs.js +1 -1
  529. package/dist/components/waka-tabs-morph/index.es.js +1 -1
  530. package/dist/components/waka-tag-input/index.cjs.js +1 -1
  531. package/dist/components/waka-tag-input/index.es.js +3 -2
  532. package/dist/components/waka-team-banner/index.cjs.js +2 -2
  533. package/dist/components/waka-team-banner/index.es.js +1 -1
  534. package/dist/components/waka-terminal-output/index.cjs.js +2 -2
  535. package/dist/components/waka-terminal-output/index.es.js +5 -3
  536. package/dist/components/waka-test-report/index.cjs.js +1 -1
  537. package/dist/components/waka-theme-creator/index.cjs.js +1 -1
  538. package/dist/components/waka-theme-manager/index.cjs.js +1 -1
  539. package/dist/components/waka-theme-manager/index.es.js +5 -2
  540. package/dist/components/waka-thread-view/index.cjs.js +2 -2
  541. package/dist/components/waka-thread-view/index.es.js +1 -1
  542. package/dist/components/waka-tilt-card/index.cjs.js +1 -1
  543. package/dist/components/waka-tilt-card/index.es.js +8 -6
  544. package/dist/components/waka-time-picker/index.cjs.js +1 -1
  545. package/dist/components/waka-time-picker/index.es.js +10 -6
  546. package/dist/components/waka-timeline/index.cjs.js +1 -1
  547. package/dist/components/waka-timeline/index.es.js +1 -1
  548. package/dist/components/waka-tooltip-tour/index.cjs.js +3 -3
  549. package/dist/components/waka-tooltip-tour/index.es.js +53 -51
  550. package/dist/components/waka-tour-guide/index.cjs.js +2 -2
  551. package/dist/components/waka-tour-guide/index.es.js +1 -1
  552. package/dist/components/waka-tournament-bracket/index.cjs.js +2 -2
  553. package/dist/components/waka-tournament-bracket/index.es.js +1 -1
  554. package/dist/components/waka-trace-viewer/index.cjs.js +1 -1
  555. package/dist/components/waka-tree/index.cjs.js +1 -1
  556. package/dist/components/waka-tree/index.es.js +1 -1
  557. package/dist/components/waka-treemap-chart/index.cjs.js +1 -1
  558. package/dist/components/waka-treemap-chart/index.es.js +1 -1
  559. package/dist/components/waka-two-factor-setup/index.cjs.js +2 -2
  560. package/dist/components/waka-two-factor-setup/index.es.js +5 -4
  561. package/dist/components/waka-typewriter/index.cjs.js +1 -1
  562. package/dist/components/waka-typewriter/index.es.js +7 -2
  563. package/dist/components/waka-typing-indicator/index.cjs.js +2 -2
  564. package/dist/components/waka-typing-indicator/index.es.js +1 -1
  565. package/dist/components/waka-versus-card/index.cjs.js +3 -3
  566. package/dist/components/waka-versus-card/index.es.js +5 -4
  567. package/dist/components/waka-video/index.cjs.js +1 -1
  568. package/dist/components/waka-video/index.es.js +1 -1
  569. package/dist/components/waka-video-ad/index.cjs.js +1 -1
  570. package/dist/components/waka-video-ad/index.es.js +3 -3
  571. package/dist/components/waka-video-call/index.cjs.js +2 -2
  572. package/dist/components/waka-video-call/index.es.js +1 -1
  573. package/dist/components/waka-video-overlay/index.cjs.js +1 -1
  574. package/dist/components/waka-video-overlay/index.es.js +2 -2
  575. package/dist/components/waka-virtual-list/index.cjs.js +1 -1
  576. package/dist/components/waka-virtual-list/index.es.js +1 -1
  577. package/dist/components/waka-voice-message/index.cjs.js +1 -1
  578. package/dist/components/waka-voice-message/index.es.js +6 -5
  579. package/dist/components/waka-welcome-modal/index.cjs.js +2 -2
  580. package/dist/components/waka-welcome-modal/index.es.js +1 -1
  581. package/dist/components/waka-xp-bar/index.cjs.js +1 -1
  582. package/dist/components/waka-xp-bar/index.es.js +2 -2
  583. package/dist/context/admincrumb-context.cjs.js +1 -1
  584. package/dist/context/language-context.cjs.js +1 -1
  585. package/dist/context/language-context.es.js +2 -2
  586. package/dist/context/theme-context.cjs.js +1 -1
  587. package/dist/context/theme-provider.cjs.js +1 -1
  588. package/dist/context/theme-provider.es.js +9 -6
  589. package/dist/context/waka-provider.cjs.js +1 -1
  590. package/dist/context/waka-provider.es.js +57 -53
  591. package/dist/doc.cjs.js +1 -1
  592. package/dist/editor.cjs.js +1 -1
  593. package/dist/export.cjs.js +1 -1
  594. package/dist/hooks/use-toast.cjs.js +1 -1
  595. package/dist/hooks/use-translation.cjs.js +1 -1
  596. package/dist/index.cjs.js +1 -1
  597. package/dist/index.d.ts +2 -0
  598. package/dist/index.es.js +279 -278
  599. package/dist/lib/i18n.cjs.js +1 -1
  600. package/dist/lib/i18n.es.js +11 -9
  601. package/dist/locales/default-resources.cjs.js +1 -0
  602. package/dist/locales/default-resources.d.ts +155 -0
  603. package/dist/locales/default-resources.es.js +150 -0
  604. package/dist/node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/dist/exceljs.min.cjs.js +13 -13
  605. package/dist/node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/dist/exceljs.min.es.js +13 -13
  606. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-docker.cjs.js +1 -1
  607. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-docker.es.js +19 -19
  608. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-markdown.cjs.js +1 -1
  609. package/dist/node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-markdown.es.js +24 -25
  610. package/dist/node_modules/.pnpm/react-resizable-panels@4.11.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-resizable-panels/dist/react-resizable-panels.cjs.js +1 -1
  611. package/dist/node_modules/.pnpm/react-resizable-panels@4.11.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-resizable-panels/dist/react-resizable-panels.es.js +26 -23
  612. package/dist/rich-text.cjs.js +1 -1
  613. package/dist/ui.css +1 -1
  614. package/dist/utils/cn.cjs.js +1 -1
  615. package/dist/utils/datetime-helpers.cjs.js +1 -1
  616. package/dist/utils/theme-loader.cjs.js +1 -1
  617. package/dist/utils/tweak.cjs.js +1 -1
  618. package/package.json +28 -27
  619. package/src/components/DataTable/DataTable.tsx +2 -0
  620. package/src/components/DataTable/DataTablePagination.tsx +28 -8
  621. package/src/components/DataTable/hooks/useDataTable.ts +13 -0
  622. package/src/components/editor/blocks/waka-diagram-block.tsx +7 -36
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/badge/index.cjs.js`),r=require(`../../components/button/index.cjs.js`),i=require(`../../components/card/index.cjs.js`),a=require(`../../components/select/index.cjs.js`),o=require(`../../components/tooltip/index.cjs.js`);let s=require(`react`);s=e.__toESM(s);let c=require(`lucide-react`),l=require(`react/jsx-runtime`);var u={region:{icon:c.Globe,color:`text-blue-500`,label:`Region`},vpc:{icon:c.Network,color:`text-purple-500`,label:`VPC`},subnet:{icon:c.Layers,color:`text-indigo-500`,label:`Subnet`},server:{icon:c.Server,color:`text-gray-500`,label:`Server`},database:{icon:c.Database,color:`text-green-500`,label:`Database`},loadbalancer:{icon:c.Activity,color:`text-cyan-500`,label:`Load Balancer`},cache:{icon:c.HardDrive,color:`text-red-500`,label:`Cache`},storage:{icon:c.HardDrive,color:`text-orange-500`,label:`Storage`},container:{icon:c.Container,color:`text-blue-400`,label:`Container`},function:{icon:c.Cpu,color:`text-yellow-500`,label:`Function`},cdn:{icon:c.Globe,color:`text-teal-500`,label:`CDN`},firewall:{icon:c.Shield,color:`text-red-400`,label:`Firewall`}},d={healthy:{color:`text-green-500`,bgColor:`bg-green-500`,label:`Healthy`},warning:{color:`text-yellow-500`,bgColor:`bg-yellow-500`,label:`Warning`},critical:{color:`text-red-500`,bgColor:`bg-red-500`,label:`Critical`},unknown:{color:`text-gray-500`,bgColor:`bg-gray-500`,label:`Unknown`},maintenance:{color:`text-blue-500`,bgColor:`bg-blue-500`,label:`Maintenance`}},f={aws:{label:`AWS`,color:`text-orange-500`},gcp:{label:`GCP`,color:`text-blue-500`},azure:{label:`Azure`,color:`text-cyan-500`},custom:{label:`Custom`,color:`text-gray-500`}};function p({resource:e,depth:r=0,onClick:i,isExpanded:a,onToggle:s}){let p=u[e.type],m=d[e.status],h=p.icon,g=e.children&&e.children.length>0;return(0,l.jsx)(`div`,{className:t.cn(`border-l-2`,r>0&&`ml-6`,m.color.replace(`text-`,`border-`)),children:(0,l.jsxs)(`div`,{className:t.cn(`flex items-center gap-3 p-3 cursor-pointer rounded-r-lg transition-all`,`hover:bg-muted/50`,e.status===`critical`&&`bg-red-500/5`,e.status===`warning`&&`bg-yellow-500/5`),onClick:i,children:[g&&(0,l.jsx)(`button`,{className:`p-1 hover:bg-muted rounded`,onClick:e=>{e.stopPropagation(),s?.()},children:(0,l.jsx)(c.Layers,{className:t.cn(`h-4 w-4`,a&&`rotate-90`)})}),(0,l.jsx)(`div`,{className:t.cn(`p-2 rounded-lg bg-muted/50`),children:(0,l.jsx)(h,{className:t.cn(`h-5 w-5`,p.color)})}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`span`,{className:`font-medium truncate`,children:e.name}),(0,l.jsx)(n.Badge,{variant:`outline`,className:`text-xs shrink-0`,children:p.label}),e.provider&&(0,l.jsx)(n.Badge,{variant:`secondary`,className:t.cn(`text-xs shrink-0`,f[e.provider].color),children:f[e.provider].label})]}),e.region&&(0,l.jsx)(`div`,{className:`text-xs text-muted-foreground mt-0.5`,children:e.region})]}),e.metrics&&(0,l.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-muted-foreground`,children:[e.metrics.cpu!==void 0&&(0,l.jsxs)(`span`,{className:t.cn(e.metrics.cpu>80&&`text-red-500`),children:[`CPU: `,e.metrics.cpu,`%`]}),e.metrics.memory!==void 0&&(0,l.jsxs)(`span`,{className:t.cn(e.metrics.memory>80&&`text-red-500`),children:[`MEM: `,e.metrics.memory,`%`]}),e.metrics.latency!==void 0&&(0,l.jsxs)(`span`,{className:t.cn(e.metrics.latency>500&&`text-yellow-500`),children:[e.metrics.latency,`ms`]})]}),(0,l.jsx)(o.TooltipProvider,{children:(0,l.jsxs)(o.Tooltip,{children:[(0,l.jsx)(o.TooltipTrigger,{children:(0,l.jsx)(`div`,{className:t.cn(`w-3 h-3 rounded-full shrink-0`,m.bgColor)})}),(0,l.jsx)(o.TooltipContent,{children:m.label})]})})]})})}function m({resources:e,depth:n=0,expandedIds:r,onToggle:i,onResourceClick:a}){return(0,l.jsx)(`div`,{className:t.cn(n>0&&`ml-4`),children:e.map(e=>(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)(p,{resource:e,depth:n,onClick:()=>a?.(e),isExpanded:r.has(e.id),onToggle:()=>i(e.id)}),r.has(e.id)&&e.children&&(0,l.jsx)(m,{resources:e.children,depth:n+1,expandedIds:r,onToggle:i,onResourceClick:a})]},e.id))})}function h({resources:e,onResourceClick:n}){let r=e=>e.reduce((e,t)=>(e.push(t),t.children&&e.push(...r(t.children)),e),[]);return(0,l.jsx)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3`,children:r(e).map(e=>{let r=u[e.type],a=d[e.status],o=r.icon;return(0,l.jsx)(i.Card,{className:t.cn(`cursor-pointer transition-all hover:shadow-md`,e.status===`critical`&&`border-red-500/50`,e.status===`warning`&&`border-yellow-500/50`),onClick:()=>n?.(e),children:(0,l.jsxs)(i.CardContent,{className:`p-4`,children:[(0,l.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,l.jsx)(`div`,{className:t.cn(`p-2 rounded-lg`,`${r.color.replace(`text-`,`bg-`)}/10`),children:(0,l.jsx)(o,{className:t.cn(`h-5 w-5`,r.color)})}),(0,l.jsx)(`div`,{className:t.cn(`w-2 h-2 rounded-full`,a.bgColor)})]}),(0,l.jsxs)(`div`,{className:`mt-3`,children:[(0,l.jsx)(`div`,{className:`font-medium truncate`,children:e.name}),(0,l.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:r.label})]}),e.metrics&&(0,l.jsx)(`div`,{className:`flex items-center gap-2 mt-2 text-xs`,children:e.metrics.cpu!==void 0&&(0,l.jsxs)(`span`,{className:t.cn(e.metrics.cpu>80&&`text-red-500`),children:[e.metrics.cpu,`%`]})})]})},e.id)})})}function g({resources:e}){let t=s.useMemo(()=>{let t=0,n=0,r=0,i=0,a=e=>{e.forEach(e=>{t++,e.status===`healthy`&&n++,e.status===`warning`&&r++,e.status===`critical`&&i++,e.children&&a(e.children)})};return a(e),{total:t,healthy:n,warning:r,critical:i}},[e]);return(0,l.jsxs)(`div`,{className:`flex items-center gap-6`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(c.Box,{className:`h-4 w-4 text-muted-foreground`}),(0,l.jsx)(`span`,{className:`font-medium`,children:t.total}),(0,l.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:`Resources`})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(c.CheckCircle2,{className:`h-4 w-4 text-green-500`}),(0,l.jsx)(`span`,{className:`font-medium text-green-500`,children:t.healthy})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(c.AlertTriangle,{className:`h-4 w-4 text-yellow-500`}),(0,l.jsx)(`span`,{className:`font-medium text-yellow-500`,children:t.warning})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(c.AlertTriangle,{className:`h-4 w-4 text-red-500`}),(0,l.jsx)(`span`,{className:`font-medium text-red-500`,children:t.critical})]})]})}function _({resources:e,onResourceClick:t,onRefresh:n,showConnections:o=!1,viewMode:u=`tree`,className:d}){let[f,p]=s.useState(u),[_,v]=s.useState(()=>new Set(e.map(e=>e.id))),[y,b]=s.useState(`all`),x=e=>{v(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},S=()=>{let t=new Set,n=e=>{e.forEach(e=>{t.add(e.id),e.children&&n(e.children)})};n(e),v(t)},C=()=>{v(new Set)},w=s.useMemo(()=>{if(y===`all`)return e;let t=e=>e.filter(e=>{let n=e.children?.some(e=>t([e]).length>0);return e.status===y||n}).map(e=>({...e,children:e.children?t(e.children):void 0}));return t(e)},[e,y]);return(0,l.jsxs)(i.Card,{className:d,children:[(0,l.jsx)(i.CardHeader,{className:`pb-3`,children:(0,l.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,l.jsx)(c.Cloud,{className:`h-5 w-5`}),(0,l.jsx)(i.CardTitle,{children:`Infrastructure Map`})]}),(0,l.jsx)(g,{resources:e})]})}),(0,l.jsxs)(i.CardContent,{className:`space-y-4`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsxs)(a.Select,{value:f,onValueChange:e=>p(e),children:[(0,l.jsx)(a.SelectTrigger,{className:`w-28`,children:(0,l.jsx)(a.SelectValue,{})}),(0,l.jsxs)(a.SelectContent,{children:[(0,l.jsx)(a.SelectItem,{value:`tree`,children:`Tree View`}),(0,l.jsx)(a.SelectItem,{value:`grid`,children:`Grid View`})]})]}),(0,l.jsxs)(a.Select,{value:y,onValueChange:e=>b(e),children:[(0,l.jsxs)(a.SelectTrigger,{className:`w-32`,children:[(0,l.jsx)(c.Filter,{className:`h-4 w-4 mr-2`}),(0,l.jsx)(a.SelectValue,{placeholder:`Status`})]}),(0,l.jsxs)(a.SelectContent,{children:[(0,l.jsx)(a.SelectItem,{value:`all`,children:`All Status`}),(0,l.jsx)(a.SelectItem,{value:`healthy`,children:`Healthy`}),(0,l.jsx)(a.SelectItem,{value:`warning`,children:`Warning`}),(0,l.jsx)(a.SelectItem,{value:`critical`,children:`Critical`}),(0,l.jsx)(a.SelectItem,{value:`maintenance`,children:`Maintenance`})]})]})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-1`,children:[f===`tree`&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.Button,{variant:`ghost`,size:`sm`,onClick:S,children:[(0,l.jsx)(c.Maximize2,{className:`h-4 w-4 mr-1`}),`Expand`]}),(0,l.jsx)(r.Button,{variant:`ghost`,size:`sm`,onClick:C,children:`Collapse`})]}),n&&(0,l.jsx)(r.Button,{variant:`ghost`,size:`sm`,onClick:n,children:(0,l.jsx)(c.RefreshCw,{className:`h-4 w-4`})})]})]}),(0,l.jsx)(`div`,{className:`min-h-[400px]`,children:w.length===0?(0,l.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-64 text-muted-foreground`,children:[(0,l.jsx)(c.Cloud,{className:`h-12 w-12 mb-4`}),(0,l.jsx)(`p`,{children:`No resources found`})]}):f===`tree`?(0,l.jsx)(m,{resources:w,expandedIds:_,onToggle:x,onResourceClick:t}):(0,l.jsx)(h,{resources:w,onResourceClick:t})})]})]})}var v=[{id:`region-us-east-1`,name:`us-east-1`,type:`region`,status:`healthy`,provider:`aws`,region:`N. Virginia`,children:[{id:`vpc-prod`,name:`production-vpc`,type:`vpc`,status:`healthy`,provider:`aws`,metadata:{cidr:`10.0.0.0/16`},children:[{id:`subnet-public-1`,name:`public-subnet-1a`,type:`subnet`,status:`healthy`,metadata:{az:`us-east-1a`,cidr:`10.0.1.0/24`},children:[{id:`alb-1`,name:`api-load-balancer`,type:`loadbalancer`,status:`healthy`,metrics:{requests:15e3,latency:45}},{id:`nat-1`,name:`nat-gateway-1a`,type:`firewall`,status:`healthy`}]},{id:`subnet-private-1`,name:`private-subnet-1a`,type:`subnet`,status:`warning`,metadata:{az:`us-east-1a`,cidr:`10.0.10.0/24`},children:[{id:`ec2-api-1`,name:`api-server-1`,type:`server`,status:`healthy`,metrics:{cpu:45,memory:62}},{id:`ec2-api-2`,name:`api-server-2`,type:`server`,status:`warning`,metrics:{cpu:85,memory:78}},{id:`ec2-api-3`,name:`api-server-3`,type:`server`,status:`healthy`,metrics:{cpu:52,memory:55}}]},{id:`subnet-data-1`,name:`data-subnet-1a`,type:`subnet`,status:`healthy`,metadata:{az:`us-east-1a`,cidr:`10.0.20.0/24`},children:[{id:`rds-primary`,name:`postgres-primary`,type:`database`,status:`healthy`,metrics:{cpu:35,memory:68}},{id:`redis-1`,name:`redis-cluster`,type:`cache`,status:`healthy`,metrics:{memory:45}}]}]}]},{id:`region-eu-west-1`,name:`eu-west-1`,type:`region`,status:`critical`,provider:`aws`,region:`Ireland`,children:[{id:`vpc-prod-eu`,name:`production-vpc-eu`,type:`vpc`,status:`critical`,children:[{id:`ec2-eu-1`,name:`api-server-eu-1`,type:`server`,status:`critical`,metrics:{cpu:98,memory:95}},{id:`rds-eu`,name:`postgres-replica`,type:`database`,status:`warning`,metrics:{cpu:75,memory:82}}]}]}];exports.InfrastructureMap=_,exports.defaultInfraResources=v;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/badge/index.cjs.js"),r=require("../../components/button/index.cjs.js"),i=require("../../components/card/index.cjs.js"),a=require("../../components/select/index.cjs.js"),o=require("../../components/tooltip/index.cjs.js");let s=require("react");s=e.__toESM(s);let c=require("lucide-react"),l=require("react/jsx-runtime");var u={region:{icon:c.Globe,color:`text-blue-500`,label:`Region`},vpc:{icon:c.Network,color:`text-purple-500`,label:`VPC`},subnet:{icon:c.Layers,color:`text-indigo-500`,label:`Subnet`},server:{icon:c.Server,color:`text-gray-500`,label:`Server`},database:{icon:c.Database,color:`text-green-500`,label:`Database`},loadbalancer:{icon:c.Activity,color:`text-cyan-500`,label:`Load Balancer`},cache:{icon:c.HardDrive,color:`text-red-500`,label:`Cache`},storage:{icon:c.HardDrive,color:`text-orange-500`,label:`Storage`},container:{icon:c.Container,color:`text-blue-400`,label:`Container`},function:{icon:c.Cpu,color:`text-yellow-500`,label:`Function`},cdn:{icon:c.Globe,color:`text-teal-500`,label:`CDN`},firewall:{icon:c.Shield,color:`text-red-400`,label:`Firewall`}},d={healthy:{color:`text-green-500`,bgColor:`bg-green-500`,label:`Healthy`},warning:{color:`text-yellow-500`,bgColor:`bg-yellow-500`,label:`Warning`},critical:{color:`text-red-500`,bgColor:`bg-red-500`,label:`Critical`},unknown:{color:`text-gray-500`,bgColor:`bg-gray-500`,label:`Unknown`},maintenance:{color:`text-blue-500`,bgColor:`bg-blue-500`,label:`Maintenance`}},f={aws:{label:`AWS`,color:`text-orange-500`},gcp:{label:`GCP`,color:`text-blue-500`},azure:{label:`Azure`,color:`text-cyan-500`},custom:{label:`Custom`,color:`text-gray-500`}};function p({resource:e,depth:r=0,onClick:i,isExpanded:a,onToggle:s}){let p=u[e.type],m=d[e.status],h=p.icon,g=e.children&&e.children.length>0;return(0,l.jsx)(`div`,{className:t.cn(`border-l-2`,r>0&&`ml-6`,m.color.replace(`text-`,`border-`)),children:(0,l.jsxs)(`div`,{className:t.cn(`flex items-center gap-3 p-3 cursor-pointer rounded-r-lg transition-all`,`hover:bg-muted/50`,e.status===`critical`&&`bg-red-500/5`,e.status===`warning`&&`bg-yellow-500/5`),onClick:i,children:[g&&(0,l.jsx)(`button`,{className:`p-1 hover:bg-muted rounded`,onClick:e=>{e.stopPropagation(),s?.()},children:(0,l.jsx)(c.Layers,{className:t.cn(`h-4 w-4`,a&&`rotate-90`)})}),(0,l.jsx)(`div`,{className:t.cn(`p-2 rounded-lg bg-muted/50`),children:(0,l.jsx)(h,{className:t.cn(`h-5 w-5`,p.color)})}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`span`,{className:`font-medium truncate`,children:e.name}),(0,l.jsx)(n.Badge,{variant:`outline`,className:`text-xs shrink-0`,children:p.label}),e.provider&&(0,l.jsx)(n.Badge,{variant:`secondary`,className:t.cn(`text-xs shrink-0`,f[e.provider].color),children:f[e.provider].label})]}),e.region&&(0,l.jsx)(`div`,{className:`text-xs text-muted-foreground mt-0.5`,children:e.region})]}),e.metrics&&(0,l.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-muted-foreground`,children:[e.metrics.cpu!==void 0&&(0,l.jsxs)(`span`,{className:t.cn(e.metrics.cpu>80&&`text-red-500`),children:[`CPU: `,e.metrics.cpu,`%`]}),e.metrics.memory!==void 0&&(0,l.jsxs)(`span`,{className:t.cn(e.metrics.memory>80&&`text-red-500`),children:[`MEM: `,e.metrics.memory,`%`]}),e.metrics.latency!==void 0&&(0,l.jsxs)(`span`,{className:t.cn(e.metrics.latency>500&&`text-yellow-500`),children:[e.metrics.latency,`ms`]})]}),(0,l.jsx)(o.TooltipProvider,{children:(0,l.jsxs)(o.Tooltip,{children:[(0,l.jsx)(o.TooltipTrigger,{children:(0,l.jsx)(`div`,{className:t.cn(`w-3 h-3 rounded-full shrink-0`,m.bgColor)})}),(0,l.jsx)(o.TooltipContent,{children:m.label})]})})]})})}function m({resources:e,depth:n=0,expandedIds:r,onToggle:i,onResourceClick:a}){return(0,l.jsx)(`div`,{className:t.cn(n>0&&`ml-4`),children:e.map(e=>(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)(p,{resource:e,depth:n,onClick:()=>a?.(e),isExpanded:r.has(e.id),onToggle:()=>i(e.id)}),r.has(e.id)&&e.children&&(0,l.jsx)(m,{resources:e.children,depth:n+1,expandedIds:r,onToggle:i,onResourceClick:a})]},e.id))})}function h({resources:e,onResourceClick:n}){let r=e=>e.reduce((e,t)=>(e.push(t),t.children&&e.push(...r(t.children)),e),[]);return(0,l.jsx)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3`,children:r(e).map(e=>{let r=u[e.type],a=d[e.status],o=r.icon;return(0,l.jsx)(i.Card,{className:t.cn(`cursor-pointer transition-all hover:shadow-md`,e.status===`critical`&&`border-red-500/50`,e.status===`warning`&&`border-yellow-500/50`),onClick:()=>n?.(e),children:(0,l.jsxs)(i.CardContent,{className:`p-4`,children:[(0,l.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,l.jsx)(`div`,{className:t.cn(`p-2 rounded-lg`,`${r.color.replace(`text-`,`bg-`)}/10`),children:(0,l.jsx)(o,{className:t.cn(`h-5 w-5`,r.color)})}),(0,l.jsx)(`div`,{className:t.cn(`w-2 h-2 rounded-full`,a.bgColor)})]}),(0,l.jsxs)(`div`,{className:`mt-3`,children:[(0,l.jsx)(`div`,{className:`font-medium truncate`,children:e.name}),(0,l.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:r.label})]}),e.metrics&&(0,l.jsx)(`div`,{className:`flex items-center gap-2 mt-2 text-xs`,children:e.metrics.cpu!==void 0&&(0,l.jsxs)(`span`,{className:t.cn(e.metrics.cpu>80&&`text-red-500`),children:[e.metrics.cpu,`%`]})})]})},e.id)})})}function g({resources:e}){let t=s.useMemo(()=>{let t=0,n=0,r=0,i=0,a=e=>{e.forEach(e=>{t++,e.status===`healthy`&&n++,e.status===`warning`&&r++,e.status===`critical`&&i++,e.children&&a(e.children)})};return a(e),{total:t,healthy:n,warning:r,critical:i}},[e]);return(0,l.jsxs)(`div`,{className:`flex items-center gap-6`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(c.Box,{className:`h-4 w-4 text-muted-foreground`}),(0,l.jsx)(`span`,{className:`font-medium`,children:t.total}),(0,l.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:`Resources`})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(c.CheckCircle2,{className:`h-4 w-4 text-green-500`}),(0,l.jsx)(`span`,{className:`font-medium text-green-500`,children:t.healthy})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(c.AlertTriangle,{className:`h-4 w-4 text-yellow-500`}),(0,l.jsx)(`span`,{className:`font-medium text-yellow-500`,children:t.warning})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(c.AlertTriangle,{className:`h-4 w-4 text-red-500`}),(0,l.jsx)(`span`,{className:`font-medium text-red-500`,children:t.critical})]})]})}function _({resources:e,onResourceClick:t,onRefresh:n,showConnections:o=!1,viewMode:u=`tree`,className:d}){let[f,p]=s.useState(u),[_,v]=s.useState(()=>new Set(e.map(e=>e.id))),[y,b]=s.useState(`all`),x=e=>{v(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},S=()=>{let t=new Set,n=e=>{e.forEach(e=>{t.add(e.id),e.children&&n(e.children)})};n(e),v(t)},C=()=>{v(new Set)},w=s.useMemo(()=>{if(y===`all`)return e;let t=e=>e.filter(e=>{let n=e.children?.some(e=>t([e]).length>0);return e.status===y||n}).map(e=>({...e,children:e.children?t(e.children):void 0}));return t(e)},[e,y]);return(0,l.jsxs)(i.Card,{className:d,children:[(0,l.jsx)(i.CardHeader,{className:`pb-3`,children:(0,l.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,l.jsx)(c.Cloud,{className:`h-5 w-5`}),(0,l.jsx)(i.CardTitle,{children:`Infrastructure Map`})]}),(0,l.jsx)(g,{resources:e})]})}),(0,l.jsxs)(i.CardContent,{className:`space-y-4`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsxs)(a.Select,{value:f,onValueChange:e=>p(e),children:[(0,l.jsx)(a.SelectTrigger,{className:`w-28`,children:(0,l.jsx)(a.SelectValue,{})}),(0,l.jsxs)(a.SelectContent,{children:[(0,l.jsx)(a.SelectItem,{value:`tree`,children:`Tree View`}),(0,l.jsx)(a.SelectItem,{value:`grid`,children:`Grid View`})]})]}),(0,l.jsxs)(a.Select,{value:y,onValueChange:e=>b(e),children:[(0,l.jsxs)(a.SelectTrigger,{className:`w-32`,children:[(0,l.jsx)(c.Filter,{className:`h-4 w-4 mr-2`}),(0,l.jsx)(a.SelectValue,{placeholder:`Status`})]}),(0,l.jsxs)(a.SelectContent,{children:[(0,l.jsx)(a.SelectItem,{value:`all`,children:`All Status`}),(0,l.jsx)(a.SelectItem,{value:`healthy`,children:`Healthy`}),(0,l.jsx)(a.SelectItem,{value:`warning`,children:`Warning`}),(0,l.jsx)(a.SelectItem,{value:`critical`,children:`Critical`}),(0,l.jsx)(a.SelectItem,{value:`maintenance`,children:`Maintenance`})]})]})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-1`,children:[f===`tree`&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(r.Button,{variant:`ghost`,size:`sm`,onClick:S,children:[(0,l.jsx)(c.Maximize2,{className:`h-4 w-4 mr-1`}),`Expand`]}),(0,l.jsx)(r.Button,{variant:`ghost`,size:`sm`,onClick:C,children:`Collapse`})]}),n&&(0,l.jsx)(r.Button,{variant:`ghost`,size:`sm`,onClick:n,children:(0,l.jsx)(c.RefreshCw,{className:`h-4 w-4`})})]})]}),(0,l.jsx)(`div`,{className:`min-h-[400px]`,children:w.length===0?(0,l.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-64 text-muted-foreground`,children:[(0,l.jsx)(c.Cloud,{className:`h-12 w-12 mb-4`}),(0,l.jsx)(`p`,{children:`No resources found`})]}):f===`tree`?(0,l.jsx)(m,{resources:w,expandedIds:_,onToggle:x,onResourceClick:t}):(0,l.jsx)(h,{resources:w,onResourceClick:t})})]})]})}var v=[{id:`region-us-east-1`,name:`us-east-1`,type:`region`,status:`healthy`,provider:`aws`,region:`N. Virginia`,children:[{id:`vpc-prod`,name:`production-vpc`,type:`vpc`,status:`healthy`,provider:`aws`,metadata:{cidr:`10.0.0.0/16`},children:[{id:`subnet-public-1`,name:`public-subnet-1a`,type:`subnet`,status:`healthy`,metadata:{az:`us-east-1a`,cidr:`10.0.1.0/24`},children:[{id:`alb-1`,name:`api-load-balancer`,type:`loadbalancer`,status:`healthy`,metrics:{requests:15e3,latency:45}},{id:`nat-1`,name:`nat-gateway-1a`,type:`firewall`,status:`healthy`}]},{id:`subnet-private-1`,name:`private-subnet-1a`,type:`subnet`,status:`warning`,metadata:{az:`us-east-1a`,cidr:`10.0.10.0/24`},children:[{id:`ec2-api-1`,name:`api-server-1`,type:`server`,status:`healthy`,metrics:{cpu:45,memory:62}},{id:`ec2-api-2`,name:`api-server-2`,type:`server`,status:`warning`,metrics:{cpu:85,memory:78}},{id:`ec2-api-3`,name:`api-server-3`,type:`server`,status:`healthy`,metrics:{cpu:52,memory:55}}]},{id:`subnet-data-1`,name:`data-subnet-1a`,type:`subnet`,status:`healthy`,metadata:{az:`us-east-1a`,cidr:`10.0.20.0/24`},children:[{id:`rds-primary`,name:`postgres-primary`,type:`database`,status:`healthy`,metrics:{cpu:35,memory:68}},{id:`redis-1`,name:`redis-cluster`,type:`cache`,status:`healthy`,metrics:{memory:45}}]}]}]},{id:`region-eu-west-1`,name:`eu-west-1`,type:`region`,status:`critical`,provider:`aws`,region:`Ireland`,children:[{id:`vpc-prod-eu`,name:`production-vpc-eu`,type:`vpc`,status:`critical`,children:[{id:`ec2-eu-1`,name:`api-server-eu-1`,type:`server`,status:`critical`,metrics:{cpu:98,memory:95}},{id:`rds-eu`,name:`postgres-replica`,type:`database`,status:`warning`,metrics:{cpu:75,memory:82}}]}]}];exports.InfrastructureMap=_,exports.defaultInfraResources=v;
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/avatar/index.cjs.js`),r=require(`../../components/badge/index.cjs.js`),i=require(`../../components/button/index.cjs.js`),a=require(`../../components/card/index.cjs.js`),o=require(`../../components/dropdown-menu/index.cjs.js`),s=require(`../../components/input/index.cjs.js`),c=require(`../../components/textarea/index.cjs.js`);let l=require(`react`);l=e.__toESM(l);let u=require(`lucide-react`),d=require(`react/jsx-runtime`);var f={low:{label:`Basse`,color:`bg-gray-500`,icon:u.Clock},medium:{label:`Moyenne`,color:`bg-blue-500`,icon:u.Clock},high:{label:`Haute`,color:`bg-orange-500`,icon:u.AlertCircle},urgent:{label:`Urgente`,color:`bg-red-500`,icon:u.AlertCircle}};function p({card:e,columnId:s,showAssignees:c,showLabels:p,showPriority:m,showDueDate:h,draggable:g,onCardClick:_,onCardEdit:v,onCardDelete:y,onDragStart:b}){let x=l.useMemo(()=>e.dueDate?(typeof e.dueDate==`string`?new Date(e.dueDate):e.dueDate)<new Date:!1,[e.dueDate]);return(0,d.jsx)(a.Card,{className:t.cn(`cursor-pointer hover:shadow-md transition-shadow`,g&&`cursor-grab active:cursor-grabbing`),draggable:g,onDragStart:t=>b?.(t,e.id,s),onClick:()=>_?.(e,s),children:(0,d.jsxs)(a.CardContent,{className:`p-3 space-y-2`,children:[p&&e.labels&&e.labels.length>0&&(0,d.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.labels.map(e=>(0,d.jsx)(`div`,{className:`h-1.5 w-8 rounded-full`,style:{backgroundColor:e.color},title:e.name},e.id))}),(0,d.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,d.jsx)(`h4`,{className:`text-sm font-medium leading-tight`,children:e.title}),(0,d.jsxs)(o.DropdownMenu,{children:[(0,d.jsx)(o.DropdownMenuTrigger,{asChild:!0,onClick:e=>e.stopPropagation(),children:(0,d.jsx)(i.Button,{variant:`ghost`,size:`icon`,className:`h-6 w-6 flex-shrink-0`,children:(0,d.jsx)(u.MoreHorizontal,{className:`h-3 w-3`})})}),(0,d.jsxs)(o.DropdownMenuContent,{align:`end`,children:[(0,d.jsxs)(o.DropdownMenuItem,{onClick:t=>{t.stopPropagation(),_?.(e,s)},children:[(0,d.jsx)(u.Edit,{className:`mr-2 h-4 w-4`}),`Modifier`]}),(0,d.jsx)(o.DropdownMenuSeparator,{}),(0,d.jsxs)(o.DropdownMenuItem,{onClick:t=>{t.stopPropagation(),y?.(e.id,s)},className:`text-destructive`,children:[(0,d.jsx)(u.Trash2,{className:`mr-2 h-4 w-4`}),`Supprimer`]})]})]})]}),e.description&&(0,d.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2`,children:e.description}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between pt-1`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m&&e.priority&&(0,d.jsx)(`div`,{className:t.cn(`h-2 w-2 rounded-full`,f[e.priority].color),title:f[e.priority].label}),h&&e.dueDate&&(0,d.jsxs)(r.Badge,{variant:x?`destructive`:`outline`,className:`text-xs px-1.5 py-0`,children:[(0,d.jsx)(u.Calendar,{className:`h-3 w-3 mr-1`}),(e=>(typeof e==`string`?new Date(e):e).toLocaleDateString(`fr-FR`,{day:`numeric`,month:`short`}))(e.dueDate)]})]}),c&&e.assignees&&e.assignees.length>0&&(0,d.jsxs)(`div`,{className:`flex -space-x-1`,children:[e.assignees.slice(0,3).map(e=>(0,d.jsxs)(n.Avatar,{className:`h-5 w-5 border-2 border-background`,children:[(0,d.jsx)(n.AvatarImage,{src:e.avatar}),(0,d.jsx)(n.AvatarFallback,{className:`text-[8px]`,children:e.name.charAt(0)})]},e.id)),e.assignees.length>3&&(0,d.jsxs)(`div`,{className:`h-5 w-5 rounded-full bg-muted flex items-center justify-center text-[8px] border-2 border-background`,children:[`+`,e.assignees.length-3]})]})]})]})})}function m({column:e,showCardCount:t,showAddCard:n,showAssignees:f,showLabels:m,showPriority:h,showDueDate:g,draggable:_,onCardClick:v,onCardAdd:y,onCardEdit:b,onCardDelete:x,onColumnEdit:S,onColumnDelete:C,onDragStart:w,onDragOver:T,onDrop:E}){let[D,O]=l.useState(!1),[k,A]=l.useState(``),[j,M]=l.useState(!1),[N,P]=l.useState(e.title),F=()=>{k.trim()&&(y?.(e.id,{title:k.trim()}),A(``),O(!1))},I=()=>{N.trim()&&N!==e.title&&S?.(e.id,{title:N.trim()}),M(!1)},L=e.limit&&e.cards.length>=e.limit;return(0,d.jsxs)(`div`,{className:`flex flex-col w-72 flex-shrink-0 bg-muted/50 rounded-lg`,onDragOver:T,onDrop:t=>E?.(t,e.id),children:[(0,d.jsxs)(`div`,{className:`flex items-center justify-between p-3 border-b`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.color&&(0,d.jsx)(`div`,{className:`h-3 w-3 rounded-full`,style:{backgroundColor:e.color}}),j?(0,d.jsx)(`div`,{className:`flex items-center gap-1`,children:(0,d.jsx)(s.Input,{value:N,onChange:e=>P(e.target.value),className:`h-7 text-sm font-semibold`,autoFocus:!0,onBlur:I,onKeyDown:e=>{e.key===`Enter`&&I(),e.key===`Escape`&&M(!1)}})}):(0,d.jsx)(`h3`,{className:`font-semibold text-sm cursor-pointer`,onClick:()=>M(!0),children:e.title}),t&&(0,d.jsxs)(r.Badge,{variant:`secondary`,className:`text-xs`,children:[e.cards.length,e.limit&&`/${e.limit}`]})]}),(0,d.jsxs)(o.DropdownMenu,{children:[(0,d.jsx)(o.DropdownMenuTrigger,{asChild:!0,children:(0,d.jsx)(i.Button,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,children:(0,d.jsx)(u.MoreHorizontal,{className:`h-4 w-4`})})}),(0,d.jsxs)(o.DropdownMenuContent,{align:`end`,children:[(0,d.jsxs)(o.DropdownMenuItem,{onClick:()=>M(!0),children:[(0,d.jsx)(u.Edit,{className:`mr-2 h-4 w-4`}),`Renommer`]}),(0,d.jsx)(o.DropdownMenuSeparator,{}),(0,d.jsxs)(o.DropdownMenuItem,{onClick:()=>C?.(e.id),className:`text-destructive`,children:[(0,d.jsx)(u.Trash2,{className:`mr-2 h-4 w-4`}),`Supprimer`]})]})]})]}),(0,d.jsxs)(`div`,{className:`flex-1 p-2 space-y-2 min-h-[200px] overflow-y-auto`,children:[e.cards.map(t=>(0,d.jsx)(p,{card:t,columnId:e.id,showAssignees:f,showLabels:m,showPriority:h,showDueDate:g,draggable:_,onCardClick:v,onCardEdit:b,onCardDelete:x,onDragStart:w},t.id)),D&&(0,d.jsxs)(a.Card,{className:`p-2`,children:[(0,d.jsx)(c.Textarea,{placeholder:`Titre de la carte...`,value:k,onChange:e=>A(e.target.value),className:`min-h-[60px] text-sm`,autoFocus:!0}),(0,d.jsxs)(`div`,{className:`flex gap-2 mt-2`,children:[(0,d.jsx)(i.Button,{size:`sm`,onClick:F,children:`Ajouter`}),(0,d.jsx)(i.Button,{size:`sm`,variant:`ghost`,onClick:()=>{O(!1),A(``)},children:(0,d.jsx)(u.X,{className:`h-4 w-4`})})]})]})]}),n&&!D&&!L&&(0,d.jsx)(`div`,{className:`p-2 border-t`,children:(0,d.jsxs)(i.Button,{variant:`ghost`,size:`sm`,className:`w-full justify-start`,onClick:()=>O(!0),children:[(0,d.jsx)(u.Plus,{className:`h-4 w-4 mr-2`}),`Ajouter une carte`]})}),L&&(0,d.jsx)(`div`,{className:`p-2 border-t text-center text-xs text-muted-foreground`,children:`Limite atteinte`})]})}function h({columns:e,onColumnsChange:n,onCardClick:r,onCardAdd:o,onCardEdit:c,onCardDelete:f,onCardMove:p,onColumnAdd:h,onColumnEdit:g,onColumnDelete:_,showAddCard:v=!0,showAddColumn:y=!0,showCardCount:b=!0,showAssignees:x=!0,showLabels:S=!0,showPriority:C=!0,showDueDate:w=!0,draggable:T=!0,availableLabels:E=[],availableAssignees:D=[],className:O}){let[k,A]=l.useState(e),[j,M]=l.useState(null),[N,P]=l.useState(!1),[F,I]=l.useState(``);l.useEffect(()=>{A(e)},[e]);let L=(e,t,n)=>{M({cardId:t,columnId:n}),e.dataTransfer.effectAllowed=`move`},R=e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`},z=(e,t)=>{if(e.preventDefault(),!j)return;let{cardId:r,columnId:i}=j;if(i===t){M(null);return}if(p)p(r,i,t,0);else{let e=k.map(e=>{if(e.id===i)return{...e,cards:e.cards.filter(e=>e.id!==r)};if(e.id===t){let t=k.find(e=>e.id===i)?.cards.find(e=>e.id===r);if(t)return{...e,cards:[...e.cards,t]}}return e});A(e),n?.(e)}M(null)},B=(e,t)=>{if(o)o(e,t);else{let r={id:`card-${Date.now()}`,title:t.title||`Nouvelle carte`,...t},i=k.map(t=>t.id===e?{...t,cards:[...t.cards,r]}:t);A(i),n?.(i)}},V=(e,t)=>{if(f)f(e,t);else{let r=k.map(n=>n.id===t?{...n,cards:n.cards.filter(t=>t.id!==e)}:n);A(r),n?.(r)}},H=e=>{if(_)_(e);else{let t=k.filter(t=>t.id!==e);A(t),n?.(t)}},U=()=>{if(F.trim()){let e={id:`column-${Date.now()}`,title:F.trim(),cards:[]};if(h)h(e);else{let t=[...k,e];A(t),n?.(t)}I(``),P(!1)}};return(0,d.jsx)(`div`,{className:t.cn(`overflow-x-auto`,O),children:(0,d.jsxs)(`div`,{className:`flex gap-4 p-4 min-h-[500px]`,children:[k.map(e=>(0,d.jsx)(m,{column:e,showCardCount:b,showAddCard:v,showAssignees:x,showLabels:S,showPriority:C,showDueDate:w,draggable:T,onCardClick:r,onCardAdd:B,onCardEdit:c,onCardDelete:V,onColumnEdit:g,onColumnDelete:H,onDragStart:L,onDragOver:R,onDrop:z},e.id)),y&&(0,d.jsx)(`div`,{className:`w-72 flex-shrink-0`,children:N?(0,d.jsxs)(a.Card,{className:`p-3`,children:[(0,d.jsx)(s.Input,{placeholder:`Titre de la colonne...`,value:F,onChange:e=>I(e.target.value),autoFocus:!0,onKeyDown:e=>{e.key===`Enter`&&U(),e.key===`Escape`&&P(!1)}}),(0,d.jsxs)(`div`,{className:`flex gap-2 mt-2`,children:[(0,d.jsx)(i.Button,{size:`sm`,onClick:U,children:`Ajouter`}),(0,d.jsx)(i.Button,{size:`sm`,variant:`ghost`,onClick:()=>{P(!1),I(``)},children:(0,d.jsx)(u.X,{className:`h-4 w-4`})})]})]}):(0,d.jsxs)(i.Button,{variant:`outline`,className:`w-full justify-start h-12`,onClick:()=>P(!0),children:[(0,d.jsx)(u.Plus,{className:`h-4 w-4 mr-2`}),`Ajouter une colonne`]})})]})})}var g=[{id:`todo`,title:`À faire`,color:`#6b7280`,cards:[{id:`1`,title:`Implémenter l'authentification`,description:`Ajouter le login/logout avec JWT`,priority:`high`,labels:[{id:`dev`,name:`Dev`,color:`#3b82f6`}],assignees:[{id:`1`,name:`Marie D.`}]},{id:`2`,title:`Créer les maquettes`,priority:`medium`,labels:[{id:`design`,name:`Design`,color:`#8b5cf6`}]}]},{id:`in-progress`,title:`En cours`,color:`#3b82f6`,limit:3,cards:[{id:`3`,title:`Refactoring du dashboard`,priority:`medium`,assignees:[{id:`2`,name:`Pierre M.`}],dueDate:new Date(Date.now()+1e3*60*60*24*2)}]},{id:`review`,title:`En revue`,color:`#f59e0b`,cards:[]},{id:`done`,title:`Terminé`,color:`#10b981`,cards:[{id:`4`,title:`Setup du projet`,priority:`low`}]}],_=[{id:`dev`,name:`Dev`,color:`#3b82f6`},{id:`design`,name:`Design`,color:`#8b5cf6`},{id:`bug`,name:`Bug`,color:`#ef4444`},{id:`feature`,name:`Feature`,color:`#10b981`}];exports.default=h,exports.defaultKanbanColumns=g,exports.defaultKanbanLabels=_;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/avatar/index.cjs.js"),r=require("../../components/badge/index.cjs.js"),i=require("../../components/button/index.cjs.js"),a=require("../../components/card/index.cjs.js"),o=require("../../components/dropdown-menu/index.cjs.js"),s=require("../../components/input/index.cjs.js"),c=require("../../components/textarea/index.cjs.js");let l=require("react");l=e.__toESM(l);let u=require("lucide-react"),d=require("react/jsx-runtime");var f={low:{label:`Basse`,color:`bg-gray-500`,icon:u.Clock},medium:{label:`Moyenne`,color:`bg-blue-500`,icon:u.Clock},high:{label:`Haute`,color:`bg-orange-500`,icon:u.AlertCircle},urgent:{label:`Urgente`,color:`bg-red-500`,icon:u.AlertCircle}};function p({card:e,columnId:s,showAssignees:c,showLabels:p,showPriority:m,showDueDate:h,draggable:g,onCardClick:_,onCardEdit:v,onCardDelete:y,onDragStart:b}){let x=l.useMemo(()=>e.dueDate?(typeof e.dueDate==`string`?new Date(e.dueDate):e.dueDate)<new Date:!1,[e.dueDate]);return(0,d.jsx)(a.Card,{className:t.cn(`cursor-pointer hover:shadow-md transition-shadow`,g&&`cursor-grab active:cursor-grabbing`),draggable:g,onDragStart:t=>b?.(t,e.id,s),onClick:()=>_?.(e,s),children:(0,d.jsxs)(a.CardContent,{className:`p-3 space-y-2`,children:[p&&e.labels&&e.labels.length>0&&(0,d.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.labels.map(e=>(0,d.jsx)(`div`,{className:`h-1.5 w-8 rounded-full`,style:{backgroundColor:e.color},title:e.name},e.id))}),(0,d.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,d.jsx)(`h4`,{className:`text-sm font-medium leading-tight`,children:e.title}),(0,d.jsxs)(o.DropdownMenu,{children:[(0,d.jsx)(o.DropdownMenuTrigger,{asChild:!0,onClick:e=>e.stopPropagation(),children:(0,d.jsx)(i.Button,{variant:`ghost`,size:`icon`,className:`h-6 w-6 flex-shrink-0`,children:(0,d.jsx)(u.MoreHorizontal,{className:`h-3 w-3`})})}),(0,d.jsxs)(o.DropdownMenuContent,{align:`end`,children:[(0,d.jsxs)(o.DropdownMenuItem,{onClick:t=>{t.stopPropagation(),_?.(e,s)},children:[(0,d.jsx)(u.Edit,{className:`mr-2 h-4 w-4`}),`Modifier`]}),(0,d.jsx)(o.DropdownMenuSeparator,{}),(0,d.jsxs)(o.DropdownMenuItem,{onClick:t=>{t.stopPropagation(),y?.(e.id,s)},className:`text-destructive`,children:[(0,d.jsx)(u.Trash2,{className:`mr-2 h-4 w-4`}),`Supprimer`]})]})]})]}),e.description&&(0,d.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2`,children:e.description}),(0,d.jsxs)(`div`,{className:`flex items-center justify-between pt-1`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m&&e.priority&&(0,d.jsx)(`div`,{className:t.cn(`h-2 w-2 rounded-full`,f[e.priority].color),title:f[e.priority].label}),h&&e.dueDate&&(0,d.jsxs)(r.Badge,{variant:x?`destructive`:`outline`,className:`text-xs px-1.5 py-0`,children:[(0,d.jsx)(u.Calendar,{className:`h-3 w-3 mr-1`}),(e=>(typeof e==`string`?new Date(e):e).toLocaleDateString(`fr-FR`,{day:`numeric`,month:`short`}))(e.dueDate)]})]}),c&&e.assignees&&e.assignees.length>0&&(0,d.jsxs)(`div`,{className:`flex -space-x-1`,children:[e.assignees.slice(0,3).map(e=>(0,d.jsxs)(n.Avatar,{className:`h-5 w-5 border-2 border-background`,children:[(0,d.jsx)(n.AvatarImage,{src:e.avatar}),(0,d.jsx)(n.AvatarFallback,{className:`text-[8px]`,children:e.name.charAt(0)})]},e.id)),e.assignees.length>3&&(0,d.jsxs)(`div`,{className:`h-5 w-5 rounded-full bg-muted flex items-center justify-center text-[8px] border-2 border-background`,children:[`+`,e.assignees.length-3]})]})]})]})})}function m({column:e,showCardCount:t,showAddCard:n,showAssignees:f,showLabels:m,showPriority:h,showDueDate:g,draggable:_,onCardClick:v,onCardAdd:y,onCardEdit:b,onCardDelete:x,onColumnEdit:S,onColumnDelete:C,onDragStart:w,onDragOver:T,onDrop:E}){let[D,O]=l.useState(!1),[k,A]=l.useState(``),[j,M]=l.useState(!1),[N,P]=l.useState(e.title),F=()=>{k.trim()&&(y?.(e.id,{title:k.trim()}),A(``),O(!1))},I=()=>{N.trim()&&N!==e.title&&S?.(e.id,{title:N.trim()}),M(!1)},L=e.limit&&e.cards.length>=e.limit;return(0,d.jsxs)(`div`,{className:`flex flex-col w-72 flex-shrink-0 bg-muted/50 rounded-lg`,onDragOver:T,onDrop:t=>E?.(t,e.id),children:[(0,d.jsxs)(`div`,{className:`flex items-center justify-between p-3 border-b`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.color&&(0,d.jsx)(`div`,{className:`h-3 w-3 rounded-full`,style:{backgroundColor:e.color}}),j?(0,d.jsx)(`div`,{className:`flex items-center gap-1`,children:(0,d.jsx)(s.Input,{value:N,onChange:e=>P(e.target.value),className:`h-7 text-sm font-semibold`,autoFocus:!0,onBlur:I,onKeyDown:e=>{e.key===`Enter`&&I(),e.key===`Escape`&&M(!1)}})}):(0,d.jsx)(`h3`,{className:`font-semibold text-sm cursor-pointer`,onClick:()=>M(!0),children:e.title}),t&&(0,d.jsxs)(r.Badge,{variant:`secondary`,className:`text-xs`,children:[e.cards.length,e.limit&&`/${e.limit}`]})]}),(0,d.jsxs)(o.DropdownMenu,{children:[(0,d.jsx)(o.DropdownMenuTrigger,{asChild:!0,children:(0,d.jsx)(i.Button,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,children:(0,d.jsx)(u.MoreHorizontal,{className:`h-4 w-4`})})}),(0,d.jsxs)(o.DropdownMenuContent,{align:`end`,children:[(0,d.jsxs)(o.DropdownMenuItem,{onClick:()=>M(!0),children:[(0,d.jsx)(u.Edit,{className:`mr-2 h-4 w-4`}),`Renommer`]}),(0,d.jsx)(o.DropdownMenuSeparator,{}),(0,d.jsxs)(o.DropdownMenuItem,{onClick:()=>C?.(e.id),className:`text-destructive`,children:[(0,d.jsx)(u.Trash2,{className:`mr-2 h-4 w-4`}),`Supprimer`]})]})]})]}),(0,d.jsxs)(`div`,{className:`flex-1 p-2 space-y-2 min-h-[200px] overflow-y-auto`,children:[e.cards.map(t=>(0,d.jsx)(p,{card:t,columnId:e.id,showAssignees:f,showLabels:m,showPriority:h,showDueDate:g,draggable:_,onCardClick:v,onCardEdit:b,onCardDelete:x,onDragStart:w},t.id)),D&&(0,d.jsxs)(a.Card,{className:`p-2`,children:[(0,d.jsx)(c.Textarea,{placeholder:`Titre de la carte...`,value:k,onChange:e=>A(e.target.value),className:`min-h-[60px] text-sm`,autoFocus:!0}),(0,d.jsxs)(`div`,{className:`flex gap-2 mt-2`,children:[(0,d.jsx)(i.Button,{size:`sm`,onClick:F,children:`Ajouter`}),(0,d.jsx)(i.Button,{size:`sm`,variant:`ghost`,onClick:()=>{O(!1),A(``)},children:(0,d.jsx)(u.X,{className:`h-4 w-4`})})]})]})]}),n&&!D&&!L&&(0,d.jsx)(`div`,{className:`p-2 border-t`,children:(0,d.jsxs)(i.Button,{variant:`ghost`,size:`sm`,className:`w-full justify-start`,onClick:()=>O(!0),children:[(0,d.jsx)(u.Plus,{className:`h-4 w-4 mr-2`}),`Ajouter une carte`]})}),L&&(0,d.jsx)(`div`,{className:`p-2 border-t text-center text-xs text-muted-foreground`,children:`Limite atteinte`})]})}function h({columns:e,onColumnsChange:n,onCardClick:r,onCardAdd:o,onCardEdit:c,onCardDelete:f,onCardMove:p,onColumnAdd:h,onColumnEdit:g,onColumnDelete:_,showAddCard:v=!0,showAddColumn:y=!0,showCardCount:b=!0,showAssignees:x=!0,showLabels:S=!0,showPriority:C=!0,showDueDate:w=!0,draggable:T=!0,availableLabels:E=[],availableAssignees:D=[],className:O}){let[k,A]=l.useState(e),[j,M]=l.useState(null),[N,P]=l.useState(!1),[F,I]=l.useState(``);l.useEffect(()=>{A(e)},[e]);let L=(e,t,n)=>{M({cardId:t,columnId:n}),e.dataTransfer.effectAllowed=`move`},R=e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`},z=(e,t)=>{if(e.preventDefault(),!j)return;let{cardId:r,columnId:i}=j;if(i===t){M(null);return}if(p)p(r,i,t,0);else{let e=k.map(e=>{if(e.id===i)return{...e,cards:e.cards.filter(e=>e.id!==r)};if(e.id===t){let t=k.find(e=>e.id===i)?.cards.find(e=>e.id===r);if(t)return{...e,cards:[...e.cards,t]}}return e});A(e),n?.(e)}M(null)},B=(e,t)=>{if(o)o(e,t);else{let r={id:`card-${Date.now()}`,title:t.title||`Nouvelle carte`,...t},i=k.map(t=>t.id===e?{...t,cards:[...t.cards,r]}:t);A(i),n?.(i)}},V=(e,t)=>{if(f)f(e,t);else{let r=k.map(n=>n.id===t?{...n,cards:n.cards.filter(t=>t.id!==e)}:n);A(r),n?.(r)}},H=e=>{if(_)_(e);else{let t=k.filter(t=>t.id!==e);A(t),n?.(t)}},U=()=>{if(F.trim()){let e={id:`column-${Date.now()}`,title:F.trim(),cards:[]};if(h)h(e);else{let t=[...k,e];A(t),n?.(t)}I(``),P(!1)}};return(0,d.jsx)(`div`,{className:t.cn(`overflow-x-auto`,O),children:(0,d.jsxs)(`div`,{className:`flex gap-4 p-4 min-h-[500px]`,children:[k.map(e=>(0,d.jsx)(m,{column:e,showCardCount:b,showAddCard:v,showAssignees:x,showLabels:S,showPriority:C,showDueDate:w,draggable:T,onCardClick:r,onCardAdd:B,onCardEdit:c,onCardDelete:V,onColumnEdit:g,onColumnDelete:H,onDragStart:L,onDragOver:R,onDrop:z},e.id)),y&&(0,d.jsx)(`div`,{className:`w-72 flex-shrink-0`,children:N?(0,d.jsxs)(a.Card,{className:`p-3`,children:[(0,d.jsx)(s.Input,{placeholder:`Titre de la colonne...`,value:F,onChange:e=>I(e.target.value),autoFocus:!0,onKeyDown:e=>{e.key===`Enter`&&U(),e.key===`Escape`&&P(!1)}}),(0,d.jsxs)(`div`,{className:`flex gap-2 mt-2`,children:[(0,d.jsx)(i.Button,{size:`sm`,onClick:U,children:`Ajouter`}),(0,d.jsx)(i.Button,{size:`sm`,variant:`ghost`,onClick:()=>{P(!1),I(``)},children:(0,d.jsx)(u.X,{className:`h-4 w-4`})})]})]}):(0,d.jsxs)(i.Button,{variant:`outline`,className:`w-full justify-start h-12`,onClick:()=>P(!0),children:[(0,d.jsx)(u.Plus,{className:`h-4 w-4 mr-2`}),`Ajouter une colonne`]})})]})})}var g=[{id:`todo`,title:`À faire`,color:`#6b7280`,cards:[{id:`1`,title:`Implémenter l'authentification`,description:`Ajouter le login/logout avec JWT`,priority:`high`,labels:[{id:`dev`,name:`Dev`,color:`#3b82f6`}],assignees:[{id:`1`,name:`Marie D.`}]},{id:`2`,title:`Créer les maquettes`,priority:`medium`,labels:[{id:`design`,name:`Design`,color:`#8b5cf6`}]}]},{id:`in-progress`,title:`En cours`,color:`#3b82f6`,limit:3,cards:[{id:`3`,title:`Refactoring du dashboard`,priority:`medium`,assignees:[{id:`2`,name:`Pierre M.`}],dueDate:new Date(Date.now()+1e3*60*60*24*2)}]},{id:`review`,title:`En revue`,color:`#f59e0b`,cards:[]},{id:`done`,title:`Terminé`,color:`#10b981`,cards:[{id:`4`,title:`Setup du projet`,priority:`low`}]}],_=[{id:`dev`,name:`Dev`,color:`#3b82f6`},{id:`design`,name:`Design`,color:`#8b5cf6`},{id:`bug`,name:`Bug`,color:`#ef4444`},{id:`feature`,name:`Feature`,color:`#10b981`}];exports.WakaKanbanBoard=h,exports.default=h,exports.defaultKanbanColumns=g,exports.defaultKanbanLabels=_;
@@ -471,4 +471,4 @@ var A = [
471
471
  }
472
472
  ];
473
473
  //#endregion
474
- export { k as default, A as defaultKanbanColumns, j as defaultKanbanLabels };
474
+ export { k as WakaKanbanBoard, k as default, A as defaultKanbanColumns, j as defaultKanbanLabels };
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/badge/index.cjs.js`),r=require(`../../components/button/index.cjs.js`),i=require(`../../components/card/index.cjs.js`);let a=require(`react`);a=e.__toESM(a);let o=require(`lucide-react`),s=require(`react/jsx-runtime`);var c=a.createContext({});function l(){return a.useContext(c)}function u({logo:e,brandName:n=`Brand`,navItems:i=[],showLoginButton:c=!0,loginButtonText:u=`Se connecter`,onLogin:d,loginHref:f}){let[p,m]=a.useState(!1),{LinkComponent:h}=l(),g=(e,t,n,r)=>h?(0,s.jsx)(h,{href:e,className:t,onClick:r,children:n}):(0,s.jsx)(`a`,{href:e,className:t,onClick:r,children:n});return(0,s.jsxs)(`nav`,{className:`sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60`,children:[(0,s.jsxs)(`div`,{className:`container flex h-16 items-center justify-between`,children:[g(`/`,`flex items-center gap-2 font-bold text-xl`,(0,s.jsxs)(s.Fragment,{children:[e,(0,s.jsx)(`span`,{children:n})]})),(0,s.jsx)(`div`,{className:`hidden md:flex items-center gap-6`,children:i.map(e=>g(e.href,t.cn(`text-sm font-medium transition-colors hover:text-primary`,e.isActive?`text-primary`:`text-muted-foreground`),e.label))}),(0,s.jsx)(`div`,{className:`hidden md:flex items-center gap-4`,children:c&&(0,s.jsx)(r.Button,{variant:`default`,onClick:d,asChild:!!f,children:f?h?(0,s.jsx)(h,{href:f,children:u}):(0,s.jsx)(`a`,{href:f,children:u}):u})}),(0,s.jsx)(r.Button,{variant:`ghost`,size:`icon`,className:`md:hidden`,onClick:()=>m(!p),children:p?(0,s.jsx)(o.X,{className:`h-5 w-5`}):(0,s.jsx)(o.Menu,{className:`h-5 w-5`})})]}),p&&(0,s.jsx)(`div`,{className:`md:hidden border-t bg-background p-4`,children:(0,s.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[i.map(e=>g(e.href,`text-sm font-medium`,e.label,()=>m(!1))),c&&(0,s.jsx)(r.Button,{onClick:d,asChild:!!f,children:f?h?(0,s.jsx)(h,{href:f,children:u}):(0,s.jsx)(`a`,{href:f,children:u}):u})]})})]})}function d({badge:e,title:t,highlightedTitle:i,description:a,primaryButtonText:c=`Commencer`,primaryButtonAction:u,primaryButtonHref:d,secondaryButtonText:f,secondaryButtonAction:p,secondaryButtonHref:m,image:h,stats:g}){let{LinkComponent:_}=l();return(0,s.jsx)(`section`,{className:`container py-24 md:py-32`,children:(0,s.jsxs)(`div`,{className:`flex flex-col lg:flex-row items-center gap-12`,children:[(0,s.jsxs)(`div`,{className:`flex-1 text-center lg:text-left`,children:[e&&(0,s.jsx)(n.Badge,{variant:`secondary`,className:`mb-4`,children:e}),(0,s.jsxs)(`h1`,{className:`text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight mb-6`,children:[t,` `,i&&(0,s.jsx)(`span`,{className:`text-primary`,children:i})]}),(0,s.jsx)(`p`,{className:`text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl lg:max-w-none`,children:a}),(0,s.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-4 justify-center lg:justify-start mb-8`,children:[(0,s.jsx)(r.Button,{size:`lg`,onClick:u,asChild:!!d,children:d?_?(0,s.jsxs)(_,{href:d,children:[c,(0,s.jsx)(o.ArrowRight,{className:`ml-2 h-4 w-4`})]}):(0,s.jsxs)(`a`,{href:d,children:[c,(0,s.jsx)(o.ArrowRight,{className:`ml-2 h-4 w-4`})]}):(0,s.jsxs)(s.Fragment,{children:[c,(0,s.jsx)(o.ArrowRight,{className:`ml-2 h-4 w-4`})]})}),f&&(0,s.jsx)(r.Button,{size:`lg`,variant:`outline`,onClick:p,asChild:!!m,children:m?_?(0,s.jsxs)(_,{href:m,children:[(0,s.jsx)(o.Play,{className:`mr-2 h-4 w-4`}),f]}):(0,s.jsxs)(`a`,{href:m,children:[(0,s.jsx)(o.Play,{className:`mr-2 h-4 w-4`}),f]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Play,{className:`mr-2 h-4 w-4`}),f]})})]}),g&&g.length>0&&(0,s.jsx)(`div`,{className:`flex gap-8 justify-center lg:justify-start`,children:g.map((e,t)=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`div`,{className:`text-2xl md:text-3xl font-bold`,children:e.value}),(0,s.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:e.label})]},t))})]}),h&&(0,s.jsx)(`div`,{className:`flex-1 w-full lg:w-auto`,children:h})]})})}function f({title:e=`Fonctionnalités`,description:t,features:n}){return(0,s.jsxs)(`section`,{className:`container py-24 bg-muted/30`,children:[(0,s.jsxs)(`div`,{className:`text-center mb-12`,children:[(0,s.jsx)(`h2`,{className:`text-3xl md:text-4xl font-bold tracking-tight mb-4`,children:e}),t&&(0,s.jsx)(`p`,{className:`text-lg text-muted-foreground max-w-2xl mx-auto`,children:t})]}),(0,s.jsx)(`div`,{className:`grid md:grid-cols-2 lg:grid-cols-3 gap-6`,children:n.map(e=>(0,s.jsxs)(i.Card,{className:`bg-background`,children:[(0,s.jsxs)(i.CardHeader,{children:[(0,s.jsx)(`div`,{className:`h-12 w-12 rounded-lg bg-primary/10 flex items-center justify-center mb-4`,children:(0,s.jsx)(`span`,{className:`text-primary`,children:e.icon})}),(0,s.jsx)(i.CardTitle,{className:`text-xl`,children:e.title})]}),(0,s.jsx)(i.CardContent,{children:(0,s.jsx)(i.CardDescription,{className:`text-base`,children:e.description})})]},e.id))})]})}function p({title:e=`Ce que disent nos clients`,testimonials:n}){return(0,s.jsxs)(`section`,{className:`container py-24`,children:[(0,s.jsx)(`h2`,{className:`text-3xl md:text-4xl font-bold tracking-tight text-center mb-12`,children:e}),(0,s.jsx)(`div`,{className:`grid md:grid-cols-2 lg:grid-cols-3 gap-6`,children:n.map(e=>(0,s.jsx)(i.Card,{children:(0,s.jsxs)(i.CardContent,{className:`pt-6`,children:[e.rating&&(0,s.jsx)(`div`,{className:`flex gap-1 mb-4`,children:Array.from({length:5}).map((n,r)=>(0,s.jsx)(o.Star,{className:t.cn(`h-4 w-4`,r<e.rating?`text-yellow-400 fill-yellow-400`:`text-muted-foreground`)},r))}),(0,s.jsxs)(`p`,{className:`text-muted-foreground mb-6`,children:[`"`,e.content,`"`]}),(0,s.jsxs)(`div`,{className:`flex items-center gap-3`,children:[e.avatar?(0,s.jsx)(`img`,{src:e.avatar,alt:e.author,className:`h-10 w-10 rounded-full object-cover`}):(0,s.jsx)(`div`,{className:`h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center`,children:(0,s.jsx)(`span`,{className:`text-sm font-medium text-primary`,children:e.author.charAt(0)})}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`div`,{className:`font-medium`,children:e.author}),(0,s.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[e.role,e.company&&` @ ${e.company}`]})]})]})]})},e.id))})]})}function m({title:e,description:n,buttonText:i,buttonAction:a,buttonHref:c,secondaryButtonText:u,secondaryButtonAction:d,variant:f=`default`}){let{LinkComponent:p}=l();return(0,s.jsx)(`section`,{className:t.cn(`py-24`,{default:`bg-muted/50`,gradient:`bg-gradient-to-r from-primary/10 via-primary/5 to-background`,dark:`bg-foreground text-background`}[f]),children:(0,s.jsx)(`div`,{className:`container`,children:(0,s.jsxs)(`div`,{className:`text-center max-w-2xl mx-auto`,children:[(0,s.jsx)(`h2`,{className:t.cn(`text-3xl md:text-4xl font-bold tracking-tight mb-4`,f===`dark`&&`text-background`),children:e}),n&&(0,s.jsx)(`p`,{className:t.cn(`text-lg mb-8`,f===`dark`?`text-background/80`:`text-muted-foreground`),children:n}),(0,s.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-4 justify-center`,children:[(0,s.jsx)(r.Button,{size:`lg`,variant:f===`dark`?`secondary`:`default`,onClick:a,asChild:!!c,children:c?p?(0,s.jsxs)(p,{href:c,children:[i,(0,s.jsx)(o.ChevronRight,{className:`ml-2 h-4 w-4`})]}):(0,s.jsxs)(`a`,{href:c,children:[i,(0,s.jsx)(o.ChevronRight,{className:`ml-2 h-4 w-4`})]}):(0,s.jsxs)(s.Fragment,{children:[i,(0,s.jsx)(o.ChevronRight,{className:`ml-2 h-4 w-4`})]})}),u&&(0,s.jsx)(r.Button,{size:`lg`,variant:`outline`,onClick:d,className:f===`dark`?`border-background/20 text-background hover:bg-background/10`:``,children:u})]})]})})})}function h({logo:e,brandName:n=`Brand`,navItems:r,showLoginButton:i=!0,loginButtonText:o=`Se connecter`,onLogin:l,loginHref:h,hero:g,features:_,featuresTitle:v,featuresDescription:y,testimonials:b,testimonialsTitle:x,cta:S,footer:C,className:w,LinkComponent:T}){let E=a.useMemo(()=>({LinkComponent:T}),[T]);return(0,s.jsx)(c.Provider,{value:E,children:(0,s.jsxs)(`div`,{className:t.cn(`min-h-screen`,w),children:[(0,s.jsx)(u,{logo:e,brandName:n,navItems:r,showLoginButton:i,loginButtonText:o,onLogin:l,loginHref:h}),g&&(0,s.jsx)(d,{...g}),_&&_.length>0&&(0,s.jsx)(f,{title:v,description:y,features:_}),b&&b.length>0&&(0,s.jsx)(p,{title:x,testimonials:b}),S&&(0,s.jsx)(m,{...S}),C]})})}var g=[{label:`Fonctionnalités`,href:`#features`},{label:`Tarifs`,href:`#pricing`},{label:`Témoignages`,href:`#testimonials`},{label:`Contact`,href:`#contact`}],_=[{id:`1`,icon:(0,s.jsx)(o.Zap,{className:`h-6 w-6`}),title:`Rapide et performant`,description:`Optimisé pour la vitesse avec des temps de chargement minimaux.`},{id:`2`,icon:(0,s.jsx)(o.Shield,{className:`h-6 w-6`}),title:`Sécurisé`,description:`Vos données sont protégées avec un chiffrement de bout en bout.`},{id:`3`,icon:(0,s.jsx)(o.Users,{className:`h-6 w-6`}),title:`Collaboration`,description:`Travaillez en équipe avec des outils de collaboration intégrés.`},{id:`4`,icon:(0,s.jsx)(o.Globe,{className:`h-6 w-6`}),title:`Accessible partout`,description:`Accédez à votre espace depuis n'importe quel appareil.`}],v=[{id:`1`,content:`Cette solution a transformé notre façon de travailler. Nous avons gagné un temps précieux.`,author:`Marie Dupont`,role:`CEO`,company:`TechCorp`,rating:5},{id:`2`,content:`Interface intuitive et support réactif. Je recommande vivement.`,author:`Pierre Martin`,role:`CTO`,company:`StartupXYZ`,rating:5},{id:`3`,content:`Le meilleur outil que nous ayons utilisé pour gérer nos projets.`,author:`Sophie Bernard`,role:`Product Manager`,company:`InnoLab`,rating:5}],y={badge:`Nouveau`,title:`La solution pour`,highlightedTitle:`votre entreprise`,description:`Simplifiez votre quotidien avec notre plateforme tout-en-un. Gagnez du temps et concentrez-vous sur l'essentiel.`,primaryButtonText:`Essayer gratuitement`,secondaryButtonText:`Voir la démo`,stats:[{value:`10K+`,label:`Utilisateurs`},{value:`99.9%`,label:`Uptime`},{value:`24/7`,label:`Support`}]},b={title:`Prêt à commencer ?`,description:`Rejoignez des milliers d'entreprises qui nous font confiance.`,buttonText:`Créer un compte gratuit`,secondaryButtonText:`Contacter les ventes`,variant:`gradient`};exports.default=h,exports.defaultLandingCTA=b,exports.defaultLandingFeatures=_,exports.defaultLandingHero=y,exports.defaultLandingNavItems=g,exports.defaultLandingTestimonials=v;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/badge/index.cjs.js"),r=require("../../components/button/index.cjs.js"),i=require("../../components/card/index.cjs.js");let a=require("react");a=e.__toESM(a);let o=require("lucide-react"),s=require("react/jsx-runtime");var c=a.createContext({});function l(){return a.useContext(c)}function u({logo:e,brandName:n=`Brand`,navItems:i=[],showLoginButton:c=!0,loginButtonText:u=`Se connecter`,onLogin:d,loginHref:f}){let[p,m]=a.useState(!1),{LinkComponent:h}=l(),g=(e,t,n,r)=>h?(0,s.jsx)(h,{href:e,className:t,onClick:r,children:n}):(0,s.jsx)(`a`,{href:e,className:t,onClick:r,children:n});return(0,s.jsxs)(`nav`,{className:`sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60`,children:[(0,s.jsxs)(`div`,{className:`container flex h-16 items-center justify-between`,children:[g(`/`,`flex items-center gap-2 font-bold text-xl`,(0,s.jsxs)(s.Fragment,{children:[e,(0,s.jsx)(`span`,{children:n})]})),(0,s.jsx)(`div`,{className:`hidden md:flex items-center gap-6`,children:i.map(e=>g(e.href,t.cn(`text-sm font-medium transition-colors hover:text-primary`,e.isActive?`text-primary`:`text-muted-foreground`),e.label))}),(0,s.jsx)(`div`,{className:`hidden md:flex items-center gap-4`,children:c&&(0,s.jsx)(r.Button,{variant:`default`,onClick:d,asChild:!!f,children:f?h?(0,s.jsx)(h,{href:f,children:u}):(0,s.jsx)(`a`,{href:f,children:u}):u})}),(0,s.jsx)(r.Button,{variant:`ghost`,size:`icon`,className:`md:hidden`,onClick:()=>m(!p),children:p?(0,s.jsx)(o.X,{className:`h-5 w-5`}):(0,s.jsx)(o.Menu,{className:`h-5 w-5`})})]}),p&&(0,s.jsx)(`div`,{className:`md:hidden border-t bg-background p-4`,children:(0,s.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[i.map(e=>g(e.href,`text-sm font-medium`,e.label,()=>m(!1))),c&&(0,s.jsx)(r.Button,{onClick:d,asChild:!!f,children:f?h?(0,s.jsx)(h,{href:f,children:u}):(0,s.jsx)(`a`,{href:f,children:u}):u})]})})]})}function d({badge:e,title:t,highlightedTitle:i,description:a,primaryButtonText:c=`Commencer`,primaryButtonAction:u,primaryButtonHref:d,secondaryButtonText:f,secondaryButtonAction:p,secondaryButtonHref:m,image:h,stats:g}){let{LinkComponent:_}=l();return(0,s.jsx)(`section`,{className:`container py-24 md:py-32`,children:(0,s.jsxs)(`div`,{className:`flex flex-col lg:flex-row items-center gap-12`,children:[(0,s.jsxs)(`div`,{className:`flex-1 text-center lg:text-left`,children:[e&&(0,s.jsx)(n.Badge,{variant:`secondary`,className:`mb-4`,children:e}),(0,s.jsxs)(`h1`,{className:`text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight mb-6`,children:[t,` `,i&&(0,s.jsx)(`span`,{className:`text-primary`,children:i})]}),(0,s.jsx)(`p`,{className:`text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl lg:max-w-none`,children:a}),(0,s.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-4 justify-center lg:justify-start mb-8`,children:[(0,s.jsx)(r.Button,{size:`lg`,onClick:u,asChild:!!d,children:d?_?(0,s.jsxs)(_,{href:d,children:[c,(0,s.jsx)(o.ArrowRight,{className:`ml-2 h-4 w-4`})]}):(0,s.jsxs)(`a`,{href:d,children:[c,(0,s.jsx)(o.ArrowRight,{className:`ml-2 h-4 w-4`})]}):(0,s.jsxs)(s.Fragment,{children:[c,(0,s.jsx)(o.ArrowRight,{className:`ml-2 h-4 w-4`})]})}),f&&(0,s.jsx)(r.Button,{size:`lg`,variant:`outline`,onClick:p,asChild:!!m,children:m?_?(0,s.jsxs)(_,{href:m,children:[(0,s.jsx)(o.Play,{className:`mr-2 h-4 w-4`}),f]}):(0,s.jsxs)(`a`,{href:m,children:[(0,s.jsx)(o.Play,{className:`mr-2 h-4 w-4`}),f]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Play,{className:`mr-2 h-4 w-4`}),f]})})]}),g&&g.length>0&&(0,s.jsx)(`div`,{className:`flex gap-8 justify-center lg:justify-start`,children:g.map((e,t)=>(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`div`,{className:`text-2xl md:text-3xl font-bold`,children:e.value}),(0,s.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:e.label})]},t))})]}),h&&(0,s.jsx)(`div`,{className:`flex-1 w-full lg:w-auto`,children:h})]})})}function f({title:e=`Fonctionnalités`,description:t,features:n}){return(0,s.jsxs)(`section`,{className:`container py-24 bg-muted/30`,children:[(0,s.jsxs)(`div`,{className:`text-center mb-12`,children:[(0,s.jsx)(`h2`,{className:`text-3xl md:text-4xl font-bold tracking-tight mb-4`,children:e}),t&&(0,s.jsx)(`p`,{className:`text-lg text-muted-foreground max-w-2xl mx-auto`,children:t})]}),(0,s.jsx)(`div`,{className:`grid md:grid-cols-2 lg:grid-cols-3 gap-6`,children:n.map(e=>(0,s.jsxs)(i.Card,{className:`bg-background`,children:[(0,s.jsxs)(i.CardHeader,{children:[(0,s.jsx)(`div`,{className:`h-12 w-12 rounded-lg bg-primary/10 flex items-center justify-center mb-4`,children:(0,s.jsx)(`span`,{className:`text-primary`,children:e.icon})}),(0,s.jsx)(i.CardTitle,{className:`text-xl`,children:e.title})]}),(0,s.jsx)(i.CardContent,{children:(0,s.jsx)(i.CardDescription,{className:`text-base`,children:e.description})})]},e.id))})]})}function p({title:e=`Ce que disent nos clients`,testimonials:n}){return(0,s.jsxs)(`section`,{className:`container py-24`,children:[(0,s.jsx)(`h2`,{className:`text-3xl md:text-4xl font-bold tracking-tight text-center mb-12`,children:e}),(0,s.jsx)(`div`,{className:`grid md:grid-cols-2 lg:grid-cols-3 gap-6`,children:n.map(e=>(0,s.jsx)(i.Card,{children:(0,s.jsxs)(i.CardContent,{className:`pt-6`,children:[e.rating&&(0,s.jsx)(`div`,{className:`flex gap-1 mb-4`,children:Array.from({length:5}).map((n,r)=>(0,s.jsx)(o.Star,{className:t.cn(`h-4 w-4`,r<e.rating?`text-yellow-400 fill-yellow-400`:`text-muted-foreground`)},r))}),(0,s.jsxs)(`p`,{className:`text-muted-foreground mb-6`,children:[`"`,e.content,`"`]}),(0,s.jsxs)(`div`,{className:`flex items-center gap-3`,children:[e.avatar?(0,s.jsx)(`img`,{src:e.avatar,alt:e.author,className:`h-10 w-10 rounded-full object-cover`}):(0,s.jsx)(`div`,{className:`h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center`,children:(0,s.jsx)(`span`,{className:`text-sm font-medium text-primary`,children:e.author.charAt(0)})}),(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`div`,{className:`font-medium`,children:e.author}),(0,s.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[e.role,e.company&&` @ ${e.company}`]})]})]})]})},e.id))})]})}function m({title:e,description:n,buttonText:i,buttonAction:a,buttonHref:c,secondaryButtonText:u,secondaryButtonAction:d,variant:f=`default`}){let{LinkComponent:p}=l();return(0,s.jsx)(`section`,{className:t.cn(`py-24`,{default:`bg-muted/50`,gradient:`bg-gradient-to-r from-primary/10 via-primary/5 to-background`,dark:`bg-foreground text-background`}[f]),children:(0,s.jsx)(`div`,{className:`container`,children:(0,s.jsxs)(`div`,{className:`text-center max-w-2xl mx-auto`,children:[(0,s.jsx)(`h2`,{className:t.cn(`text-3xl md:text-4xl font-bold tracking-tight mb-4`,f===`dark`&&`text-background`),children:e}),n&&(0,s.jsx)(`p`,{className:t.cn(`text-lg mb-8`,f===`dark`?`text-background/80`:`text-muted-foreground`),children:n}),(0,s.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-4 justify-center`,children:[(0,s.jsx)(r.Button,{size:`lg`,variant:f===`dark`?`secondary`:`default`,onClick:a,asChild:!!c,children:c?p?(0,s.jsxs)(p,{href:c,children:[i,(0,s.jsx)(o.ChevronRight,{className:`ml-2 h-4 w-4`})]}):(0,s.jsxs)(`a`,{href:c,children:[i,(0,s.jsx)(o.ChevronRight,{className:`ml-2 h-4 w-4`})]}):(0,s.jsxs)(s.Fragment,{children:[i,(0,s.jsx)(o.ChevronRight,{className:`ml-2 h-4 w-4`})]})}),u&&(0,s.jsx)(r.Button,{size:`lg`,variant:`outline`,onClick:d,className:f===`dark`?`border-background/20 text-background hover:bg-background/10`:``,children:u})]})]})})})}function h({logo:e,brandName:n=`Brand`,navItems:r,showLoginButton:i=!0,loginButtonText:o=`Se connecter`,onLogin:l,loginHref:h,hero:g,features:_,featuresTitle:v,featuresDescription:y,testimonials:b,testimonialsTitle:x,cta:S,footer:C,className:w,LinkComponent:T}){let E=a.useMemo(()=>({LinkComponent:T}),[T]);return(0,s.jsx)(c.Provider,{value:E,children:(0,s.jsxs)(`div`,{className:t.cn(`min-h-screen`,w),children:[(0,s.jsx)(u,{logo:e,brandName:n,navItems:r,showLoginButton:i,loginButtonText:o,onLogin:l,loginHref:h}),g&&(0,s.jsx)(d,{...g}),_&&_.length>0&&(0,s.jsx)(f,{title:v,description:y,features:_}),b&&b.length>0&&(0,s.jsx)(p,{title:x,testimonials:b}),S&&(0,s.jsx)(m,{...S}),C]})})}var g=[{label:`Fonctionnalités`,href:`#features`},{label:`Tarifs`,href:`#pricing`},{label:`Témoignages`,href:`#testimonials`},{label:`Contact`,href:`#contact`}],_=[{id:`1`,icon:(0,s.jsx)(o.Zap,{className:`h-6 w-6`}),title:`Rapide et performant`,description:`Optimisé pour la vitesse avec des temps de chargement minimaux.`},{id:`2`,icon:(0,s.jsx)(o.Shield,{className:`h-6 w-6`}),title:`Sécurisé`,description:`Vos données sont protégées avec un chiffrement de bout en bout.`},{id:`3`,icon:(0,s.jsx)(o.Users,{className:`h-6 w-6`}),title:`Collaboration`,description:`Travaillez en équipe avec des outils de collaboration intégrés.`},{id:`4`,icon:(0,s.jsx)(o.Globe,{className:`h-6 w-6`}),title:`Accessible partout`,description:`Accédez à votre espace depuis n'importe quel appareil.`}],v=[{id:`1`,content:`Cette solution a transformé notre façon de travailler. Nous avons gagné un temps précieux.`,author:`Marie Dupont`,role:`CEO`,company:`TechCorp`,rating:5},{id:`2`,content:`Interface intuitive et support réactif. Je recommande vivement.`,author:`Pierre Martin`,role:`CTO`,company:`StartupXYZ`,rating:5},{id:`3`,content:`Le meilleur outil que nous ayons utilisé pour gérer nos projets.`,author:`Sophie Bernard`,role:`Product Manager`,company:`InnoLab`,rating:5}],y={badge:`Nouveau`,title:`La solution pour`,highlightedTitle:`votre entreprise`,description:`Simplifiez votre quotidien avec notre plateforme tout-en-un. Gagnez du temps et concentrez-vous sur l'essentiel.`,primaryButtonText:`Essayer gratuitement`,secondaryButtonText:`Voir la démo`,stats:[{value:`10K+`,label:`Utilisateurs`},{value:`99.9%`,label:`Uptime`},{value:`24/7`,label:`Support`}]},b={title:`Prêt à commencer ?`,description:`Rejoignez des milliers d'entreprises qui nous font confiance.`,buttonText:`Créer un compte gratuit`,secondaryButtonText:`Contacter les ventes`,variant:`gradient`};exports.WakaLanding=h,exports.default=h,exports.defaultLandingCTA=b,exports.defaultLandingFeatures=_,exports.defaultLandingHero=y,exports.defaultLandingNavItems=g,exports.defaultLandingTestimonials=v;
@@ -387,4 +387,4 @@ var A = [
387
387
  variant: "gradient"
388
388
  };
389
389
  //#endregion
390
- export { k as default, P as defaultLandingCTA, j as defaultLandingFeatures, N as defaultLandingHero, A as defaultLandingNavItems, M as defaultLandingTestimonials };
390
+ export { k as WakaLanding, k as default, P as defaultLandingCTA, j as defaultLandingFeatures, N as defaultLandingHero, A as defaultLandingNavItems, M as defaultLandingTestimonials };
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/button/index.cjs.js`),r=require(`../../components/dropdown-menu/index.cjs.js`),i=require(`../../components/select/index.cjs.js`),a=require(`../../context/language-context.cjs.js`);let o=require(`react`);o=e.__toESM(o);let s=require(`lucide-react`),c=require(`react/jsx-runtime`);function l({variant:e=`dropdown`,showFlags:o=!0,className:l}){let{currentLanguage:u,languages:d,changeLanguage:f,isLoading:p}=a.useLanguage(),m=d.find(e=>e.code===u);return e===`select`?(0,c.jsxs)(i.Select,{value:u,onValueChange:f,disabled:p,children:[(0,c.jsx)(i.SelectTrigger,{className:t.cn(`w-[180px]`,l),children:(0,c.jsxs)(i.SelectValue,{children:[o&&m?.flagEmoji&&(0,c.jsx)(`span`,{className:`mr-2`,children:m.flagEmoji}),m?.label]})}),(0,c.jsx)(i.SelectContent,{children:d.map(e=>(0,c.jsxs)(i.SelectItem,{value:e.code,children:[o&&e.flagEmoji&&(0,c.jsx)(`span`,{className:`mr-2`,children:e.flagEmoji}),e.label]},e.code))})]}):(0,c.jsxs)(r.DropdownMenu,{children:[(0,c.jsx)(r.DropdownMenuTrigger,{asChild:!0,children:(0,c.jsxs)(n.Button,{variant:`outline`,size:`sm`,className:t.cn(`gap-2`,l),disabled:p,children:[(0,c.jsx)(s.Globe,{className:`h-4 w-4`}),o&&m?.flagEmoji&&(0,c.jsx)(`span`,{children:m.flagEmoji}),m?.label]})}),(0,c.jsx)(r.DropdownMenuContent,{align:`end`,children:d.map(e=>(0,c.jsxs)(r.DropdownMenuItem,{onClick:()=>f(e.code),className:`cursor-pointer`,children:[o&&e.flagEmoji&&(0,c.jsx)(`span`,{className:`mr-2`,children:e.flagEmoji}),e.label]},e.code))})]})}exports.LanguageSelector=l;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/button/index.cjs.js"),r=require("../../components/dropdown-menu/index.cjs.js"),i=require("../../components/select/index.cjs.js"),a=require("../../context/language-context.cjs.js");let o=require("react");o=e.__toESM(o);let s=require("lucide-react"),c=require("react/jsx-runtime");function l({variant:e=`dropdown`,showFlags:o=!0,className:l}){let{currentLanguage:u,languages:d,changeLanguage:f,isLoading:p}=a.useLanguage(),m=d.find(e=>e.code===u);return e===`select`?(0,c.jsxs)(i.Select,{value:u,onValueChange:f,disabled:p,children:[(0,c.jsx)(i.SelectTrigger,{className:t.cn(`w-[180px]`,l),children:(0,c.jsxs)(i.SelectValue,{children:[o&&m?.flagEmoji&&(0,c.jsx)(`span`,{className:`mr-2`,children:m.flagEmoji}),m?.label]})}),(0,c.jsx)(i.SelectContent,{children:d.map(e=>(0,c.jsxs)(i.SelectItem,{value:e.code,children:[o&&e.flagEmoji&&(0,c.jsx)(`span`,{className:`mr-2`,children:e.flagEmoji}),e.label]},e.code))})]}):(0,c.jsxs)(r.DropdownMenu,{children:[(0,c.jsx)(r.DropdownMenuTrigger,{asChild:!0,children:(0,c.jsxs)(n.Button,{variant:`outline`,size:`sm`,className:t.cn(`gap-2`,l),disabled:p,children:[(0,c.jsx)(s.Globe,{className:`h-4 w-4`}),o&&m?.flagEmoji&&(0,c.jsx)(`span`,{children:m.flagEmoji}),m?.label]})}),(0,c.jsx)(r.DropdownMenuContent,{align:`end`,children:d.map(e=>(0,c.jsxs)(r.DropdownMenuItem,{onClick:()=>f(e.code),className:`cursor-pointer`,children:[o&&e.flagEmoji&&(0,c.jsx)(`span`,{className:`mr-2`,children:e.flagEmoji}),e.label]},e.code))})]})}exports.LanguageSelector=l;
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/button/index.cjs.js`),r=require(`../../components/sheet/index.cjs.js`);let i=require(`react`);i=e.__toESM(i);let a=require(`lucide-react`),o=require(`react/jsx-runtime`);function s({children:e,header:s,sidebar:c,footer:l,collapsible:u=!1,className:d}){let[f,p]=i.useState(!1);return(0,o.jsxs)(`div`,{className:t.cn(`min-h-screen bg-background`,d),children:[s&&(0,o.jsx)(`header`,{className:`sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60`,children:(0,o.jsxs)(`div`,{className:`container flex h-14 max-w-screen-2xl items-center`,children:[u&&c&&(0,o.jsxs)(r.Sheet,{open:f,onOpenChange:p,children:[(0,o.jsx)(r.SheetTrigger,{asChild:!0,children:(0,o.jsxs)(n.Button,{variant:`ghost`,size:`icon`,className:`md:hidden`,children:[(0,o.jsx)(a.Menu,{className:`h-5 w-5`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Ouvrir le menu`})]})}),(0,o.jsx)(r.SheetContent,{side:`left`,className:`w-72 p-0`,children:(0,o.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between p-4`,children:[(0,o.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Navigation`}),(0,o.jsx)(n.Button,{variant:`ghost`,size:`icon`,onClick:()=>p(!1),children:(0,o.jsx)(a.X,{className:`h-4 w-4`})})]}),(0,o.jsx)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:c})]})})]}),s]})}),(0,o.jsxs)(`div`,{className:`flex`,children:[c&&!u&&(0,o.jsx)(`aside`,{className:`hidden w-64 border-r bg-muted/40 md:block`,children:(0,o.jsx)(`div`,{className:`h-full overflow-y-auto p-4`,children:c})}),(0,o.jsx)(`main`,{className:`flex-1`,children:(0,o.jsx)(`div`,{className:`container mx-auto p-4`,children:e})})]}),l&&(0,o.jsx)(`footer`,{className:`border-t bg-muted/40`,children:(0,o.jsx)(`div`,{className:`container mx-auto p-4`,children:l})})]})}exports.Layout=s;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/button/index.cjs.js"),r=require("../../components/sheet/index.cjs.js");let i=require("react");i=e.__toESM(i);let a=require("lucide-react"),o=require("react/jsx-runtime");function s({children:e,header:s,sidebar:c,footer:l,collapsible:u=!1,className:d}){let[f,p]=i.useState(!1);return(0,o.jsxs)(`div`,{className:t.cn(`min-h-screen bg-background`,d),children:[s&&(0,o.jsx)(`header`,{className:`sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60`,children:(0,o.jsxs)(`div`,{className:`container flex h-14 max-w-screen-2xl items-center`,children:[u&&c&&(0,o.jsxs)(r.Sheet,{open:f,onOpenChange:p,children:[(0,o.jsx)(r.SheetTrigger,{asChild:!0,children:(0,o.jsxs)(n.Button,{variant:`ghost`,size:`icon`,className:`md:hidden`,children:[(0,o.jsx)(a.Menu,{className:`h-5 w-5`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Ouvrir le menu`})]})}),(0,o.jsx)(r.SheetContent,{side:`left`,className:`w-72 p-0`,children:(0,o.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between p-4`,children:[(0,o.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Navigation`}),(0,o.jsx)(n.Button,{variant:`ghost`,size:`icon`,onClick:()=>p(!1),children:(0,o.jsx)(a.X,{className:`h-4 w-4`})})]}),(0,o.jsx)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:c})]})})]}),s]})}),(0,o.jsxs)(`div`,{className:`flex`,children:[c&&!u&&(0,o.jsx)(`aside`,{className:`hidden w-64 border-r bg-muted/40 md:block`,children:(0,o.jsx)(`div`,{className:`h-full overflow-y-auto p-4`,children:c})}),(0,o.jsx)(`main`,{className:`flex-1`,children:(0,o.jsx)(`div`,{className:`container mx-auto p-4`,children:e})})]}),l&&(0,o.jsx)(`footer`,{className:`border-t bg-muted/40`,children:(0,o.jsx)(`div`,{className:`container mx-auto p-4`,children:l})})]})}exports.Layout=s;
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/button/index.cjs.js`),r=require(`../../components/card/index.cjs.js`),i=require(`../../components/label/index.cjs.js`),a=require(`../../components/input/index.cjs.js`),o=require(`../../components/separator/index.cjs.js`),s=require(`../../context/theme-provider.cjs.js`);let c=require(`react`);c=e.__toESM(c);let l=require(`lucide-react`),u=require(`react/jsx-runtime`);function d({config:e,onSubmit:d,onForgotPassword:f,onSignUp:p,onSSOGoogle:m,onSSOMicrosoft:h,onSSOApple:g,onSSOLinkedIn:_,onSSOGlobe:v,onSSOUsers:y,onSSOCamera:b,onSSOFranceConnect:x,showSocialLogin:S=!1,className:C}){let w=!1;try{w=s.useTheme().isDarkMode}catch{}let T=e?.theme_json?.dark_mode??w,[E,D]=c.useState({email:``,password:``,rememberMe:!1}),[O,k]=c.useState(!1),A=c.useMemo(()=>e?.assets?T?e.assets.theme_logo_dark:e.assets.theme_logo_light:null,[e?.assets,T]),j=c.useMemo(()=>e?.color_json?{"--login-primary":e.color_json.primary,"--login-secondary":e.color_json.secondary,"--login-accent":e.color_json.accent}:{},[e?.color_json]),M=c.useMemo(()=>{let t=[];if(!e?.signup_options)return S&&(v&&t.push({id:`github`,label:`GitHub`,icon:(0,u.jsx)(l.Globe,{className:`h-4 w-4`}),onClick:v}),m&&t.push({id:`google`,label:`Google`,icon:(0,u.jsx)(l.Mail,{className:`h-4 w-4`}),onClick:m})),t;let n=e.signup_options;return n.allow_sso_google&&t.push({id:`google`,label:`Google`,icon:(0,u.jsx)(l.Mail,{className:`h-4 w-4`}),onClick:m}),n.allow_sso_microsoft&&t.push({id:`microsoft`,label:`Microsoft`,icon:(0,u.jsx)(l.Mail,{className:`h-4 w-4`}),onClick:h}),n.allow_sso_apple&&t.push({id:`apple`,label:`Apple`,icon:(0,u.jsx)(l.Apple,{className:`h-4 w-4`}),onClick:g}),n.allow_sso_linkedIn&&t.push({id:`linkedin`,label:`LinkedIn`,icon:(0,u.jsx)(l.ExternalLink,{className:`h-4 w-4`}),onClick:_}),n.allow_sso_github&&t.push({id:`github`,label:`GitHub`,icon:(0,u.jsx)(l.Globe,{className:`h-4 w-4`}),onClick:v}),n.allow_sso_facebook&&t.push({id:`facebook`,label:`Users`,icon:(0,u.jsx)(l.Users,{className:`h-4 w-4`}),onClick:y}),n.allow_sso_instagram&&t.push({id:`instagram`,label:`Camera`,icon:(0,u.jsx)(l.Camera,{className:`h-4 w-4`}),onClick:b}),n.allow_sso_france_connect&&t.push({id:`france-connect`,label:`France Connect`,icon:(0,u.jsx)(l.Mail,{className:`h-4 w-4`}),onClick:x}),t},[e?.signup_options,S,m,h,g,_,v,y,b,x]),N=e?.signup_options?.allow_login!==!1,P=async e=>{e.preventDefault(),k(!0);try{await d?.(E)}finally{k(!1)}},F=e=>t=>{D(n=>({...n,[e]:e===`rememberMe`?t.target.checked:t.target.value}))};return(0,u.jsx)(`div`,{className:t.cn(`flex items-center justify-center p-4`,C),style:j,children:(0,u.jsxs)(r.Card,{className:`w-full max-w-md`,children:[(0,u.jsxs)(r.CardHeader,{className:`space-y-1`,children:[A&&(0,u.jsx)(`div`,{className:`flex justify-center mb-4`,children:(0,u.jsx)(`img`,{src:A,alt:e?.theme_json?.name||`Logo`,className:`max-h-16 max-w-full object-contain`})}),(0,u.jsx)(r.CardTitle,{className:`text-2xl text-center`,children:`Connexion`}),(0,u.jsx)(r.CardDescription,{className:`text-center`,children:`Entrez vos identifiants pour accéder à votre compte`})]}),(0,u.jsxs)(r.CardContent,{className:`space-y-4`,children:[M.length>0&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:t.cn(`grid gap-4`,M.length===1?`grid-cols-1`:`grid-cols-2`),children:M.map(e=>(0,u.jsxs)(n.Button,{variant:`outline`,className:`w-full`,onClick:e.onClick,type:`button`,children:[e.icon,e.label]},e.id))}),N&&(0,u.jsxs)(`div`,{className:`relative`,children:[(0,u.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,u.jsx)(o.Separator,{className:`w-full`})}),(0,u.jsx)(`div`,{className:`relative flex justify-center text-xs uppercase`,children:(0,u.jsx)(`span`,{className:`bg-background px-2 text-muted-foreground`,children:`Ou continuez avec`})})]})]}),N&&(0,u.jsxs)(`form`,{onSubmit:P,className:`space-y-4`,children:[(0,u.jsxs)(`div`,{className:`space-y-2`,children:[(0,u.jsx)(i.Label,{htmlFor:`email`,children:`Email`}),(0,u.jsx)(a.Input,{id:`email`,type:`email`,placeholder:`votre@email.com`,value:E.email,onChange:F(`email`),required:!0})]}),(0,u.jsxs)(`div`,{className:`space-y-2`,children:[(0,u.jsx)(i.Label,{htmlFor:`password`,children:`Mot de passe`}),(0,u.jsx)(a.Input,{id:`password`,type:`password`,placeholder:`••••••••`,value:E.password,onChange:F(`password`),required:!0})]}),(0,u.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,u.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,u.jsx)(`input`,{id:`remember`,type:`checkbox`,checked:E.rememberMe,onChange:F(`rememberMe`),className:`h-4 w-4 rounded border-gray-300`}),(0,u.jsx)(i.Label,{htmlFor:`remember`,className:`text-sm`,children:`Se souvenir de moi`})]}),f&&(0,u.jsx)(n.Button,{type:`button`,variant:`link`,className:`px-0 text-sm`,onClick:f,children:`Mot de passe oublié ?`})]}),(0,u.jsx)(n.Button,{type:`submit`,className:`w-full`,disabled:O,style:e?.color_json?.primary?{backgroundColor:e.color_json.primary,color:e.color_json.secondary}:void 0,children:O?`Connexion...`:`Se connecter`})]}),p&&(0,u.jsxs)(`div`,{className:`text-center text-sm`,children:[(0,u.jsx)(`span`,{className:`text-muted-foreground`,children:`Pas encore de compte ? `}),(0,u.jsx)(n.Button,{type:`button`,variant:`link`,className:`px-0 text-sm`,onClick:p,children:`S'inscrire`})]}),e?.waka_powered&&(0,u.jsx)(`div`,{className:`text-center text-xs text-muted-foreground mt-4 pt-4 border-t`,children:`Powered by Waka`})]})]})})}exports.Login=d;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/button/index.cjs.js"),r=require("../../components/card/index.cjs.js"),i=require("../../components/label/index.cjs.js"),a=require("../../components/input/index.cjs.js"),o=require("../../components/separator/index.cjs.js"),s=require("../../context/theme-provider.cjs.js");let c=require("react");c=e.__toESM(c);let l=require("lucide-react"),u=require("react/jsx-runtime");function d({config:e,onSubmit:d,onForgotPassword:f,onSignUp:p,onSSOGoogle:m,onSSOMicrosoft:h,onSSOApple:g,onSSOLinkedIn:_,onSSOGlobe:v,onSSOUsers:y,onSSOCamera:b,onSSOFranceConnect:x,showSocialLogin:S=!1,className:C}){let w=!1;try{w=s.useTheme().isDarkMode}catch{}let T=e?.theme_json?.dark_mode??w,[E,D]=c.useState({email:``,password:``,rememberMe:!1}),[O,k]=c.useState(!1),A=c.useMemo(()=>e?.assets?T?e.assets.theme_logo_dark:e.assets.theme_logo_light:null,[e?.assets,T]),j=c.useMemo(()=>e?.color_json?{"--login-primary":e.color_json.primary,"--login-secondary":e.color_json.secondary,"--login-accent":e.color_json.accent}:{},[e?.color_json]),M=c.useMemo(()=>{let t=[];if(!e?.signup_options)return S&&(v&&t.push({id:`github`,label:`GitHub`,icon:(0,u.jsx)(l.Globe,{className:`h-4 w-4`}),onClick:v}),m&&t.push({id:`google`,label:`Google`,icon:(0,u.jsx)(l.Mail,{className:`h-4 w-4`}),onClick:m})),t;let n=e.signup_options;return n.allow_sso_google&&t.push({id:`google`,label:`Google`,icon:(0,u.jsx)(l.Mail,{className:`h-4 w-4`}),onClick:m}),n.allow_sso_microsoft&&t.push({id:`microsoft`,label:`Microsoft`,icon:(0,u.jsx)(l.Mail,{className:`h-4 w-4`}),onClick:h}),n.allow_sso_apple&&t.push({id:`apple`,label:`Apple`,icon:(0,u.jsx)(l.Apple,{className:`h-4 w-4`}),onClick:g}),n.allow_sso_linkedIn&&t.push({id:`linkedin`,label:`LinkedIn`,icon:(0,u.jsx)(l.ExternalLink,{className:`h-4 w-4`}),onClick:_}),n.allow_sso_github&&t.push({id:`github`,label:`GitHub`,icon:(0,u.jsx)(l.Globe,{className:`h-4 w-4`}),onClick:v}),n.allow_sso_facebook&&t.push({id:`facebook`,label:`Users`,icon:(0,u.jsx)(l.Users,{className:`h-4 w-4`}),onClick:y}),n.allow_sso_instagram&&t.push({id:`instagram`,label:`Camera`,icon:(0,u.jsx)(l.Camera,{className:`h-4 w-4`}),onClick:b}),n.allow_sso_france_connect&&t.push({id:`france-connect`,label:`France Connect`,icon:(0,u.jsx)(l.Mail,{className:`h-4 w-4`}),onClick:x}),t},[e?.signup_options,S,m,h,g,_,v,y,b,x]),N=e?.signup_options?.allow_login!==!1,P=async e=>{e.preventDefault(),k(!0);try{await d?.(E)}finally{k(!1)}},F=e=>t=>{D(n=>({...n,[e]:e===`rememberMe`?t.target.checked:t.target.value}))};return(0,u.jsx)(`div`,{className:t.cn(`flex items-center justify-center p-4`,C),style:j,children:(0,u.jsxs)(r.Card,{className:`w-full max-w-md`,children:[(0,u.jsxs)(r.CardHeader,{className:`space-y-1`,children:[A&&(0,u.jsx)(`div`,{className:`flex justify-center mb-4`,children:(0,u.jsx)(`img`,{src:A,alt:e?.theme_json?.name||`Logo`,className:`max-h-16 max-w-full object-contain`})}),(0,u.jsx)(r.CardTitle,{className:`text-2xl text-center`,children:`Connexion`}),(0,u.jsx)(r.CardDescription,{className:`text-center`,children:`Entrez vos identifiants pour accéder à votre compte`})]}),(0,u.jsxs)(r.CardContent,{className:`space-y-4`,children:[M.length>0&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:t.cn(`grid gap-4`,M.length===1?`grid-cols-1`:`grid-cols-2`),children:M.map(e=>(0,u.jsxs)(n.Button,{variant:`outline`,className:`w-full`,onClick:e.onClick,type:`button`,children:[e.icon,e.label]},e.id))}),N&&(0,u.jsxs)(`div`,{className:`relative`,children:[(0,u.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,u.jsx)(o.Separator,{className:`w-full`})}),(0,u.jsx)(`div`,{className:`relative flex justify-center text-xs uppercase`,children:(0,u.jsx)(`span`,{className:`bg-background px-2 text-muted-foreground`,children:`Ou continuez avec`})})]})]}),N&&(0,u.jsxs)(`form`,{onSubmit:P,className:`space-y-4`,children:[(0,u.jsxs)(`div`,{className:`space-y-2`,children:[(0,u.jsx)(i.Label,{htmlFor:`email`,children:`Email`}),(0,u.jsx)(a.Input,{id:`email`,type:`email`,placeholder:`votre@email.com`,value:E.email,onChange:F(`email`),required:!0})]}),(0,u.jsxs)(`div`,{className:`space-y-2`,children:[(0,u.jsx)(i.Label,{htmlFor:`password`,children:`Mot de passe`}),(0,u.jsx)(a.Input,{id:`password`,type:`password`,placeholder:`••••••••`,value:E.password,onChange:F(`password`),required:!0})]}),(0,u.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,u.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,u.jsx)(`input`,{id:`remember`,type:`checkbox`,checked:E.rememberMe,onChange:F(`rememberMe`),className:`h-4 w-4 rounded border-gray-300`}),(0,u.jsx)(i.Label,{htmlFor:`remember`,className:`text-sm`,children:`Se souvenir de moi`})]}),f&&(0,u.jsx)(n.Button,{type:`button`,variant:`link`,className:`px-0 text-sm`,onClick:f,children:`Mot de passe oublié ?`})]}),(0,u.jsx)(n.Button,{type:`submit`,className:`w-full`,disabled:O,style:e?.color_json?.primary?{backgroundColor:e.color_json.primary,color:e.color_json.secondary}:void 0,children:O?`Connexion...`:`Se connecter`})]}),p&&(0,u.jsxs)(`div`,{className:`text-center text-sm`,children:[(0,u.jsx)(`span`,{className:`text-muted-foreground`,children:`Pas encore de compte ? `}),(0,u.jsx)(n.Button,{type:`button`,variant:`link`,className:`px-0 text-sm`,onClick:p,children:`S'inscrire`})]}),e?.waka_powered&&(0,u.jsx)(`div`,{className:`text-center text-xs text-muted-foreground mt-4 pt-4 border-t`,children:`Powered by Waka`})]})]})})}exports.Login=d;
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/avatar/index.cjs.js`),r=require(`../../components/badge/index.cjs.js`),i=require(`../../components/button/index.cjs.js`),a=require(`../../components/card/index.cjs.js`);let o=require(`react`);o=e.__toESM(o);let s=require(`lucide-react`),c=require(`react/jsx-runtime`);var l={1:{label:`Primary`,color:`text-green-500`,bgColor:`bg-green-500`},2:{label:`Secondary`,color:`text-yellow-500`,bgColor:`bg-yellow-500`},3:{label:`Tertiary`,color:`text-red-500`,bgColor:`bg-red-500`}},u={available:{color:`bg-green-500`,label:`Available`},busy:{color:`bg-yellow-500`,label:`Busy`},dnd:{color:`bg-red-500`,label:`Do Not Disturb`},offline:{color:`bg-gray-500`,label:`Offline`}};function d(e){let t=new Date;return e.startTime<=t&&e.endTime>t}function f({shift:e,nextShift:o,onContact:d}){if(!e)return(0,c.jsx)(a.Card,{className:`border-dashed`,children:(0,c.jsxs)(a.CardContent,{className:`p-6 text-center text-muted-foreground`,children:[(0,c.jsx)(s.AlertCircle,{className:`h-8 w-8 mx-auto mb-2`}),(0,c.jsx)(`p`,{children:`No one is currently on call`})]})});let f=l[e.level],p=e.user.status?u[e.user.status]:null,m=e.endTime.getTime()-Date.now(),h=Math.floor(m/36e5),g=Math.floor(m%36e5/6e4);return(0,c.jsxs)(a.Card,{className:`border-green-500/30 bg-green-500/5`,children:[(0,c.jsx)(a.CardHeader,{className:`pb-2`,children:(0,c.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,c.jsxs)(r.Badge,{className:t.cn(`text-white`,f.bgColor),children:[f.label,` On-Call`]}),(0,c.jsxs)(`span`,{className:`text-sm text-muted-foreground flex items-center gap-1`,children:[(0,c.jsx)(s.Clock,{className:`h-4 w-4`}),h,`h `,g,`m remaining`]})]})}),(0,c.jsxs)(a.CardContent,{className:`space-y-4`,children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,c.jsxs)(`div`,{className:`relative`,children:[(0,c.jsxs)(n.Avatar,{className:`h-16 w-16`,children:[(0,c.jsx)(n.AvatarImage,{src:e.user.avatar}),(0,c.jsx)(n.AvatarFallback,{className:`text-xl`,children:e.user.name.slice(0,2).toUpperCase()})]}),p&&(0,c.jsx)(`div`,{className:t.cn(`absolute bottom-0 right-0 w-4 h-4 rounded-full border-2 border-background`,p.color)})]}),(0,c.jsxs)(`div`,{className:`flex-1`,children:[(0,c.jsx)(`div`,{className:`text-xl font-semibold`,children:e.user.name}),(0,c.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:e.user.email}),e.user.timezone&&(0,c.jsxs)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:[`Timezone: `,e.user.timezone]})]}),(0,c.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.user.phone&&(0,c.jsxs)(i.Button,{size:`sm`,variant:`outline`,onClick:()=>d?.(e.user),children:[(0,c.jsx)(s.Phone,{className:`h-4 w-4 mr-1`}),`Call`]}),(0,c.jsxs)(i.Button,{size:`sm`,variant:`outline`,onClick:()=>d?.(e.user),children:[(0,c.jsx)(s.MessageSquare,{className:`h-4 w-4 mr-1`}),`Message`]})]})]}),e.overrideReason&&(0,c.jsxs)(`div`,{className:`text-sm text-muted-foreground bg-muted/50 p-2 rounded`,children:[(0,c.jsx)(`span`,{className:`font-medium`,children:`Override:`}),` `,e.overrideReason]}),o&&(0,c.jsxs)(`div`,{className:`flex items-center gap-2 pt-2 border-t text-sm`,children:[(0,c.jsx)(s.ArrowRight,{className:`h-4 w-4 text-muted-foreground`}),(0,c.jsx)(`span`,{className:`text-muted-foreground`,children:`Next:`}),(0,c.jsxs)(n.Avatar,{className:`h-5 w-5`,children:[(0,c.jsx)(n.AvatarImage,{src:o.user.avatar}),(0,c.jsx)(n.AvatarFallback,{className:`text-xs`,children:o.user.name.slice(0,2).toUpperCase()})]}),(0,c.jsx)(`span`,{children:o.user.name}),(0,c.jsxs)(`span`,{className:`text-muted-foreground`,children:[`at `,o.startTime.toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`})]})]})]})]})}function p({policy:e,currentLevel:n}){return(0,c.jsxs)(a.Card,{children:[(0,c.jsx)(a.CardHeader,{className:`pb-2`,children:(0,c.jsxs)(a.CardTitle,{className:`text-base flex items-center gap-2`,children:[(0,c.jsx)(s.Shield,{className:`h-4 w-4`}),`Escalation Policy`]})}),(0,c.jsx)(a.CardContent,{children:(0,c.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(i=>{let a=l[i],o=i===1?e.level1Timeout:i===2?e.level2Timeout:e.level3Timeout,s=n===i;return(0,c.jsxs)(`div`,{className:t.cn(`flex items-center gap-3 p-2 rounded`,s&&`${a.bgColor}/10 border ${a.bgColor}/30`),children:[(0,c.jsx)(`div`,{className:t.cn(`w-8 h-8 rounded-full flex items-center justify-center text-white text-sm font-bold`,a.bgColor),children:i}),(0,c.jsxs)(`div`,{className:`flex-1`,children:[(0,c.jsx)(`div`,{className:`font-medium`,children:a.label}),(0,c.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Escalates after `,o,` minutes`]})]}),s&&(0,c.jsx)(r.Badge,{variant:`outline`,className:a.color,children:`Active`})]},i)})})})]})}function m({shifts:e,weekStart:r,onShiftClick:i}){let a=o.useMemo(()=>{let e=[];for(let t=0;t<7;t++){let n=new Date(r);n.setDate(n.getDate()+t),e.push(n)}return e},[r]),s=t=>e.filter(e=>new Date(e.startTime).toDateString()===t.toDateString()),u=e=>e.toDateString()===new Date().toDateString();return(0,c.jsx)(`div`,{className:`grid grid-cols-7 gap-2`,children:a.map(e=>{let r=s(e),a=u(e);return(0,c.jsxs)(`div`,{className:t.cn(`border rounded-lg p-2 min-h-[120px]`,a&&`border-primary bg-primary/5`),children:[(0,c.jsxs)(`div`,{className:t.cn(`text-center mb-2`,a&&`font-bold text-primary`),children:[(0,c.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.toLocaleDateString(`en-US`,{weekday:`short`})}),(0,c.jsx)(`div`,{className:t.cn(`text-lg`,a&&`text-primary`),children:e.getDate()})]}),(0,c.jsx)(`div`,{className:`space-y-1`,children:r.map(e=>{let r=l[e.level],a=d(e);return(0,c.jsxs)(`button`,{className:t.cn(`w-full text-left p-1.5 rounded text-xs transition-colors`,`${r.bgColor}/10 hover:${r.bgColor}/20`,a&&`ring-2 ring-${r.bgColor}`),onClick:()=>i?.(e),children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,c.jsxs)(n.Avatar,{className:`h-4 w-4`,children:[(0,c.jsx)(n.AvatarImage,{src:e.user.avatar}),(0,c.jsx)(n.AvatarFallback,{className:`text-[8px]`,children:e.user.name.slice(0,2).toUpperCase()})]}),(0,c.jsx)(`span`,{className:`truncate`,children:e.user.name.split(` `)[0]})]}),(0,c.jsx)(`div`,{className:`text-muted-foreground mt-0.5`,children:e.startTime.toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`})})]},e.id)})})]},e.toISOString())})})}function h({users:e,shifts:i}){let l=o.useMemo(()=>e.map(e=>{let t=i.filter(t=>t.user.id===e.id),n=t.reduce((e,t)=>e+(t.endTime.getTime()-t.startTime.getTime())/36e5,0),r=t.some(d);return{user:e,totalHours:n,shiftCount:t.length,isOnCall:r}}),[e,i]);return(0,c.jsxs)(a.Card,{children:[(0,c.jsx)(a.CardHeader,{className:`pb-2`,children:(0,c.jsxs)(a.CardTitle,{className:`text-base flex items-center gap-2`,children:[(0,c.jsx)(s.Users,{className:`h-4 w-4`}),`Team Members`]})}),(0,c.jsx)(a.CardContent,{children:(0,c.jsx)(`div`,{className:`space-y-2`,children:l.map(({user:e,totalHours:i,shiftCount:a,isOnCall:o})=>{let s=e.status?u[e.status]:null;return(0,c.jsxs)(`div`,{className:t.cn(`flex items-center gap-3 p-2 rounded`,o&&`bg-green-500/10 border border-green-500/30`),children:[(0,c.jsxs)(`div`,{className:`relative`,children:[(0,c.jsxs)(n.Avatar,{className:`h-8 w-8`,children:[(0,c.jsx)(n.AvatarImage,{src:e.avatar}),(0,c.jsx)(n.AvatarFallback,{className:`text-xs`,children:e.name.slice(0,2).toUpperCase()})]}),s&&(0,c.jsx)(`div`,{className:t.cn(`absolute -bottom-0.5 -right-0.5 w-3 h-3 rounded-full border-2 border-background`,s.color)})]}),(0,c.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,c.jsxs)(`div`,{className:`font-medium truncate flex items-center gap-2`,children:[e.name,o&&(0,c.jsx)(r.Badge,{className:`bg-green-500 text-xs`,children:`On-Call`})]}),(0,c.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[a,` shifts • `,Math.round(i),`h total`]})]})]},e.id)})})})]})}function g({schedule:e,onEditSchedule:n,onAddOverride:l,onSwapShift:u,onContactOnCall:g,className:_}){let[v,y]=o.useState(0),b=o.useMemo(()=>{let e=new Date,t=e.getDay(),n=new Date(e);return n.setDate(e.getDate()-t+v*7),n.setHours(0,0,0,0),n},[v]),x=e.shifts.find(d),S=e.shifts.filter(e=>e.startTime>new Date).sort((e,t)=>e.startTime.getTime()-t.startTime.getTime())[0];return(0,c.jsxs)(`div`,{className:t.cn(`space-y-6`,_),children:[(0,c.jsx)(a.Card,{children:(0,c.jsx)(a.CardHeader,{children:(0,c.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,c.jsx)(s.Phone,{className:`h-6 w-6`}),(0,c.jsxs)(`div`,{children:[(0,c.jsx)(a.CardTitle,{children:e.name}),(0,c.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[(0,c.jsx)(r.Badge,{variant:`outline`,children:e.team}),(0,c.jsxs)(r.Badge,{variant:`secondary`,children:[(0,c.jsx)(s.Repeat,{className:`h-3 w-3 mr-1`}),e.rotation]})]})]})]}),(0,c.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&(0,c.jsxs)(i.Button,{variant:`outline`,onClick:()=>l(new Date),children:[(0,c.jsx)(s.Plus,{className:`h-4 w-4 mr-1`}),`Add Override`]}),n&&(0,c.jsxs)(i.Button,{variant:`outline`,onClick:n,children:[(0,c.jsx)(s.Settings,{className:`h-4 w-4 mr-1`}),`Settings`]})]})]})})}),(0,c.jsxs)(`div`,{className:`grid grid-cols-3 gap-6`,children:[(0,c.jsxs)(`div`,{className:`col-span-2 space-y-4`,children:[(0,c.jsx)(f,{shift:x,nextShift:S,onContact:g}),(0,c.jsxs)(a.Card,{children:[(0,c.jsx)(a.CardHeader,{className:`pb-2`,children:(0,c.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,c.jsxs)(a.CardTitle,{className:`text-base flex items-center gap-2`,children:[(0,c.jsx)(s.Calendar,{className:`h-4 w-4`}),`Schedule`]}),(0,c.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,c.jsx)(i.Button,{variant:`ghost`,size:`sm`,onClick:()=>y(e=>e-1),children:(0,c.jsx)(s.ChevronLeft,{className:`h-4 w-4`})}),(0,c.jsxs)(`span`,{className:`text-sm min-w-[120px] text-center`,children:[b.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}),` -`,new Date(b.getTime()+144*36e5).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})]}),(0,c.jsx)(i.Button,{variant:`ghost`,size:`sm`,onClick:()=>y(e=>e+1),children:(0,c.jsx)(s.ChevronRight,{className:`h-4 w-4`})}),v!==0&&(0,c.jsx)(i.Button,{variant:`ghost`,size:`sm`,onClick:()=>y(0),children:`Today`})]})]})}),(0,c.jsx)(a.CardContent,{children:(0,c.jsx)(m,{shifts:e.shifts,weekStart:b,onShiftClick:u})})]})]}),(0,c.jsxs)(`div`,{className:`space-y-4`,children:[(0,c.jsx)(p,{policy:e.escalationPolicy,currentLevel:x?.level}),(0,c.jsx)(h,{users:e.users,shifts:e.shifts})]})]})]})}var _=[{id:`1`,name:`John Doe`,email:`john@example.com`,phone:`+1 555-0101`,status:`available`,timezone:`America/New_York`},{id:`2`,name:`Jane Smith`,email:`jane@example.com`,phone:`+1 555-0102`,status:`available`,timezone:`America/Los_Angeles`},{id:`3`,name:`Bob Wilson`,email:`bob@example.com`,phone:`+1 555-0103`,status:`busy`,timezone:`Europe/London`},{id:`4`,name:`Alice Brown`,email:`alice@example.com`,phone:`+1 555-0104`,status:`available`,timezone:`Europe/Paris`}];function v(){let e=[],t=new Date,n=new Date(t);n.setDate(t.getDate()-t.getDay()),n.setHours(0,0,0,0);for(let t=-1;t<3;t++)for(let r=0;r<7;r++){let i=new Date(n);i.setDate(n.getDate()+t*7+r),i.setHours(9,0,0,0);let a=new Date(i);a.setDate(a.getDate()+1);let o=(t+1+r)%_.length;e.push({id:`shift-${t}-${r}`,user:_[o],startTime:i,endTime:a,level:1})}return e}var y={id:`1`,name:`Platform Team On-Call`,description:`Primary on-call rotation for the platform engineering team`,team:`Platform Engineering`,rotation:`weekly`,escalationPolicy:{level1Timeout:15,level2Timeout:30,level3Timeout:60},shifts:v(),users:_};exports.OnCallScheduleBlock=g,exports.defaultOnCallSchedule=y;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/avatar/index.cjs.js"),r=require("../../components/badge/index.cjs.js"),i=require("../../components/button/index.cjs.js"),a=require("../../components/card/index.cjs.js");let o=require("react");o=e.__toESM(o);let s=require("lucide-react"),c=require("react/jsx-runtime");var l={1:{label:`Primary`,color:`text-green-500`,bgColor:`bg-green-500`},2:{label:`Secondary`,color:`text-yellow-500`,bgColor:`bg-yellow-500`},3:{label:`Tertiary`,color:`text-red-500`,bgColor:`bg-red-500`}},u={available:{color:`bg-green-500`,label:`Available`},busy:{color:`bg-yellow-500`,label:`Busy`},dnd:{color:`bg-red-500`,label:`Do Not Disturb`},offline:{color:`bg-gray-500`,label:`Offline`}};function d(e){let t=new Date;return e.startTime<=t&&e.endTime>t}function f({shift:e,nextShift:o,onContact:d}){if(!e)return(0,c.jsx)(a.Card,{className:`border-dashed`,children:(0,c.jsxs)(a.CardContent,{className:`p-6 text-center text-muted-foreground`,children:[(0,c.jsx)(s.AlertCircle,{className:`h-8 w-8 mx-auto mb-2`}),(0,c.jsx)(`p`,{children:`No one is currently on call`})]})});let f=l[e.level],p=e.user.status?u[e.user.status]:null,m=e.endTime.getTime()-Date.now(),h=Math.floor(m/36e5),g=Math.floor(m%36e5/6e4);return(0,c.jsxs)(a.Card,{className:`border-green-500/30 bg-green-500/5`,children:[(0,c.jsx)(a.CardHeader,{className:`pb-2`,children:(0,c.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,c.jsxs)(r.Badge,{className:t.cn(`text-white`,f.bgColor),children:[f.label,` On-Call`]}),(0,c.jsxs)(`span`,{className:`text-sm text-muted-foreground flex items-center gap-1`,children:[(0,c.jsx)(s.Clock,{className:`h-4 w-4`}),h,`h `,g,`m remaining`]})]})}),(0,c.jsxs)(a.CardContent,{className:`space-y-4`,children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,c.jsxs)(`div`,{className:`relative`,children:[(0,c.jsxs)(n.Avatar,{className:`h-16 w-16`,children:[(0,c.jsx)(n.AvatarImage,{src:e.user.avatar}),(0,c.jsx)(n.AvatarFallback,{className:`text-xl`,children:e.user.name.slice(0,2).toUpperCase()})]}),p&&(0,c.jsx)(`div`,{className:t.cn(`absolute bottom-0 right-0 w-4 h-4 rounded-full border-2 border-background`,p.color)})]}),(0,c.jsxs)(`div`,{className:`flex-1`,children:[(0,c.jsx)(`div`,{className:`text-xl font-semibold`,children:e.user.name}),(0,c.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:e.user.email}),e.user.timezone&&(0,c.jsxs)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:[`Timezone: `,e.user.timezone]})]}),(0,c.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.user.phone&&(0,c.jsxs)(i.Button,{size:`sm`,variant:`outline`,onClick:()=>d?.(e.user),children:[(0,c.jsx)(s.Phone,{className:`h-4 w-4 mr-1`}),`Call`]}),(0,c.jsxs)(i.Button,{size:`sm`,variant:`outline`,onClick:()=>d?.(e.user),children:[(0,c.jsx)(s.MessageSquare,{className:`h-4 w-4 mr-1`}),`Message`]})]})]}),e.overrideReason&&(0,c.jsxs)(`div`,{className:`text-sm text-muted-foreground bg-muted/50 p-2 rounded`,children:[(0,c.jsx)(`span`,{className:`font-medium`,children:`Override:`}),` `,e.overrideReason]}),o&&(0,c.jsxs)(`div`,{className:`flex items-center gap-2 pt-2 border-t text-sm`,children:[(0,c.jsx)(s.ArrowRight,{className:`h-4 w-4 text-muted-foreground`}),(0,c.jsx)(`span`,{className:`text-muted-foreground`,children:`Next:`}),(0,c.jsxs)(n.Avatar,{className:`h-5 w-5`,children:[(0,c.jsx)(n.AvatarImage,{src:o.user.avatar}),(0,c.jsx)(n.AvatarFallback,{className:`text-xs`,children:o.user.name.slice(0,2).toUpperCase()})]}),(0,c.jsx)(`span`,{children:o.user.name}),(0,c.jsxs)(`span`,{className:`text-muted-foreground`,children:[`at `,o.startTime.toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`})]})]})]})]})}function p({policy:e,currentLevel:n}){return(0,c.jsxs)(a.Card,{children:[(0,c.jsx)(a.CardHeader,{className:`pb-2`,children:(0,c.jsxs)(a.CardTitle,{className:`text-base flex items-center gap-2`,children:[(0,c.jsx)(s.Shield,{className:`h-4 w-4`}),`Escalation Policy`]})}),(0,c.jsx)(a.CardContent,{children:(0,c.jsx)(`div`,{className:`space-y-3`,children:[1,2,3].map(i=>{let a=l[i],o=i===1?e.level1Timeout:i===2?e.level2Timeout:e.level3Timeout,s=n===i;return(0,c.jsxs)(`div`,{className:t.cn(`flex items-center gap-3 p-2 rounded`,s&&`${a.bgColor}/10 border ${a.bgColor}/30`),children:[(0,c.jsx)(`div`,{className:t.cn(`w-8 h-8 rounded-full flex items-center justify-center text-white text-sm font-bold`,a.bgColor),children:i}),(0,c.jsxs)(`div`,{className:`flex-1`,children:[(0,c.jsx)(`div`,{className:`font-medium`,children:a.label}),(0,c.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Escalates after `,o,` minutes`]})]}),s&&(0,c.jsx)(r.Badge,{variant:`outline`,className:a.color,children:`Active`})]},i)})})})]})}function m({shifts:e,weekStart:r,onShiftClick:i}){let a=o.useMemo(()=>{let e=[];for(let t=0;t<7;t++){let n=new Date(r);n.setDate(n.getDate()+t),e.push(n)}return e},[r]),s=t=>e.filter(e=>new Date(e.startTime).toDateString()===t.toDateString()),u=e=>e.toDateString()===new Date().toDateString();return(0,c.jsx)(`div`,{className:`grid grid-cols-7 gap-2`,children:a.map(e=>{let r=s(e),a=u(e);return(0,c.jsxs)(`div`,{className:t.cn(`border rounded-lg p-2 min-h-[120px]`,a&&`border-primary bg-primary/5`),children:[(0,c.jsxs)(`div`,{className:t.cn(`text-center mb-2`,a&&`font-bold text-primary`),children:[(0,c.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.toLocaleDateString(`en-US`,{weekday:`short`})}),(0,c.jsx)(`div`,{className:t.cn(`text-lg`,a&&`text-primary`),children:e.getDate()})]}),(0,c.jsx)(`div`,{className:`space-y-1`,children:r.map(e=>{let r=l[e.level],a=d(e);return(0,c.jsxs)(`button`,{className:t.cn(`w-full text-left p-1.5 rounded text-xs transition-colors`,`${r.bgColor}/10 hover:${r.bgColor}/20`,a&&`ring-2 ring-${r.bgColor}`),onClick:()=>i?.(e),children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,c.jsxs)(n.Avatar,{className:`h-4 w-4`,children:[(0,c.jsx)(n.AvatarImage,{src:e.user.avatar}),(0,c.jsx)(n.AvatarFallback,{className:`text-[8px]`,children:e.user.name.slice(0,2).toUpperCase()})]}),(0,c.jsx)(`span`,{className:`truncate`,children:e.user.name.split(` `)[0]})]}),(0,c.jsx)(`div`,{className:`text-muted-foreground mt-0.5`,children:e.startTime.toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`})})]},e.id)})})]},e.toISOString())})})}function h({users:e,shifts:i}){let l=o.useMemo(()=>e.map(e=>{let t=i.filter(t=>t.user.id===e.id),n=t.reduce((e,t)=>e+(t.endTime.getTime()-t.startTime.getTime())/36e5,0),r=t.some(d);return{user:e,totalHours:n,shiftCount:t.length,isOnCall:r}}),[e,i]);return(0,c.jsxs)(a.Card,{children:[(0,c.jsx)(a.CardHeader,{className:`pb-2`,children:(0,c.jsxs)(a.CardTitle,{className:`text-base flex items-center gap-2`,children:[(0,c.jsx)(s.Users,{className:`h-4 w-4`}),`Team Members`]})}),(0,c.jsx)(a.CardContent,{children:(0,c.jsx)(`div`,{className:`space-y-2`,children:l.map(({user:e,totalHours:i,shiftCount:a,isOnCall:o})=>{let s=e.status?u[e.status]:null;return(0,c.jsxs)(`div`,{className:t.cn(`flex items-center gap-3 p-2 rounded`,o&&`bg-green-500/10 border border-green-500/30`),children:[(0,c.jsxs)(`div`,{className:`relative`,children:[(0,c.jsxs)(n.Avatar,{className:`h-8 w-8`,children:[(0,c.jsx)(n.AvatarImage,{src:e.avatar}),(0,c.jsx)(n.AvatarFallback,{className:`text-xs`,children:e.name.slice(0,2).toUpperCase()})]}),s&&(0,c.jsx)(`div`,{className:t.cn(`absolute -bottom-0.5 -right-0.5 w-3 h-3 rounded-full border-2 border-background`,s.color)})]}),(0,c.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,c.jsxs)(`div`,{className:`font-medium truncate flex items-center gap-2`,children:[e.name,o&&(0,c.jsx)(r.Badge,{className:`bg-green-500 text-xs`,children:`On-Call`})]}),(0,c.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[a,` shifts • `,Math.round(i),`h total`]})]})]},e.id)})})})]})}function g({schedule:e,onEditSchedule:n,onAddOverride:l,onSwapShift:u,onContactOnCall:g,className:_}){let[v,y]=o.useState(0),b=o.useMemo(()=>{let e=new Date,t=e.getDay(),n=new Date(e);return n.setDate(e.getDate()-t+v*7),n.setHours(0,0,0,0),n},[v]),x=e.shifts.find(d),S=e.shifts.filter(e=>e.startTime>new Date).sort((e,t)=>e.startTime.getTime()-t.startTime.getTime())[0];return(0,c.jsxs)(`div`,{className:t.cn(`space-y-6`,_),children:[(0,c.jsx)(a.Card,{children:(0,c.jsx)(a.CardHeader,{children:(0,c.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,c.jsx)(s.Phone,{className:`h-6 w-6`}),(0,c.jsxs)(`div`,{children:[(0,c.jsx)(a.CardTitle,{children:e.name}),(0,c.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[(0,c.jsx)(r.Badge,{variant:`outline`,children:e.team}),(0,c.jsxs)(r.Badge,{variant:`secondary`,children:[(0,c.jsx)(s.Repeat,{className:`h-3 w-3 mr-1`}),e.rotation]})]})]})]}),(0,c.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&(0,c.jsxs)(i.Button,{variant:`outline`,onClick:()=>l(new Date),children:[(0,c.jsx)(s.Plus,{className:`h-4 w-4 mr-1`}),`Add Override`]}),n&&(0,c.jsxs)(i.Button,{variant:`outline`,onClick:n,children:[(0,c.jsx)(s.Settings,{className:`h-4 w-4 mr-1`}),`Settings`]})]})]})})}),(0,c.jsxs)(`div`,{className:`grid grid-cols-3 gap-6`,children:[(0,c.jsxs)(`div`,{className:`col-span-2 space-y-4`,children:[(0,c.jsx)(f,{shift:x,nextShift:S,onContact:g}),(0,c.jsxs)(a.Card,{children:[(0,c.jsx)(a.CardHeader,{className:`pb-2`,children:(0,c.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,c.jsxs)(a.CardTitle,{className:`text-base flex items-center gap-2`,children:[(0,c.jsx)(s.Calendar,{className:`h-4 w-4`}),`Schedule`]}),(0,c.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,c.jsx)(i.Button,{variant:`ghost`,size:`sm`,onClick:()=>y(e=>e-1),children:(0,c.jsx)(s.ChevronLeft,{className:`h-4 w-4`})}),(0,c.jsxs)(`span`,{className:`text-sm min-w-[120px] text-center`,children:[b.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`}),` -`,new Date(b.getTime()+144*36e5).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`})]}),(0,c.jsx)(i.Button,{variant:`ghost`,size:`sm`,onClick:()=>y(e=>e+1),children:(0,c.jsx)(s.ChevronRight,{className:`h-4 w-4`})}),v!==0&&(0,c.jsx)(i.Button,{variant:`ghost`,size:`sm`,onClick:()=>y(0),children:`Today`})]})]})}),(0,c.jsx)(a.CardContent,{children:(0,c.jsx)(m,{shifts:e.shifts,weekStart:b,onShiftClick:u})})]})]}),(0,c.jsxs)(`div`,{className:`space-y-4`,children:[(0,c.jsx)(p,{policy:e.escalationPolicy,currentLevel:x?.level}),(0,c.jsx)(h,{users:e.users,shifts:e.shifts})]})]})]})}var _=[{id:`1`,name:`John Doe`,email:`john@example.com`,phone:`+1 555-0101`,status:`available`,timezone:`America/New_York`},{id:`2`,name:`Jane Smith`,email:`jane@example.com`,phone:`+1 555-0102`,status:`available`,timezone:`America/Los_Angeles`},{id:`3`,name:`Bob Wilson`,email:`bob@example.com`,phone:`+1 555-0103`,status:`busy`,timezone:`Europe/London`},{id:`4`,name:`Alice Brown`,email:`alice@example.com`,phone:`+1 555-0104`,status:`available`,timezone:`Europe/Paris`}];function v(){let e=[],t=new Date,n=new Date(t);n.setDate(t.getDate()-t.getDay()),n.setHours(0,0,0,0);for(let t=-1;t<3;t++)for(let r=0;r<7;r++){let i=new Date(n);i.setDate(n.getDate()+t*7+r),i.setHours(9,0,0,0);let a=new Date(i);a.setDate(a.getDate()+1);let o=(t+1+r)%_.length;e.push({id:`shift-${t}-${r}`,user:_[o],startTime:i,endTime:a,level:1})}return e}var y={id:`1`,name:`Platform Team On-Call`,description:`Primary on-call rotation for the platform engineering team`,team:`Platform Engineering`,rotation:`weekly`,escalationPolicy:{level1Timeout:15,level2Timeout:30,level3Timeout:60},shifts:v(),users:_};exports.OnCallScheduleBlock=g,exports.defaultOnCallSchedule=y;
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/avatar/index.cjs.js`),r=require(`../../components/badge/index.cjs.js`),i=require(`../../components/card/index.cjs.js`),a=require(`../../components/progress/index.cjs.js`),o=require(`../../components/tabs/index.cjs.js`);let s=require(`react`);s=e.__toESM(s);let c=require(`lucide-react`),l=require(`react/jsx-runtime`);var u={common:`bg-slate-500/20 text-slate-400 border-slate-500/30`,rare:`bg-blue-500/20 text-blue-400 border-blue-500/30`,epic:`bg-purple-500/20 text-purple-400 border-purple-500/30`,legendary:`bg-amber-500/20 text-amber-400 border-amber-500/30`},d={common:``,rare:`shadow-blue-500/20`,epic:`shadow-purple-500/20`,legendary:`shadow-amber-500/30 shadow-lg`};function f({current:e,max:t,level:n}){let r=e/t*100;return(0,l.jsxs)(`div`,{className:`space-y-2`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`div`,{className:`h-8 w-8 rounded-full bg-primary flex items-center justify-center text-primary-foreground font-bold`,children:n}),(0,l.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Level `,n]})]}),(0,l.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.toLocaleString(),` / `,t.toLocaleString(),` XP`]})]}),(0,l.jsxs)(`div`,{className:`relative h-3 rounded-full bg-muted overflow-hidden`,children:[(0,l.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-gradient-to-r from-primary to-primary/80 rounded-full transition-all duration-500`,style:{width:`${r}%`}}),(0,l.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-gradient-to-r from-white/20 to-transparent rounded-full`,style:{width:`${r}%`}})]})]})}function p({stat:e}){return(0,l.jsxs)(`div`,{className:`flex items-center gap-3 p-3 rounded-lg bg-muted/50`,children:[e.icon&&(0,l.jsx)(`div`,{className:t.cn(`h-10 w-10 rounded-lg bg-background flex items-center justify-center`,{default:`text-foreground`,blue:`text-blue-500`,green:`text-green-500`,yellow:`text-yellow-500`,red:`text-red-500`,purple:`text-purple-500`}[e.color||`default`]),children:e.icon}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`p`,{className:`text-2xl font-bold`,children:e.value}),(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.label})]})]})}function m({achievement:e}){let n=e.unlockedAt||e.progress!==void 0&&e.maxProgress!==void 0&&e.progress>=e.maxProgress;return(0,l.jsx)(`div`,{className:t.cn(`p-4 rounded-lg border transition-all`,n?t.cn(u[e.rarity||`common`],d[e.rarity||`common`]):`bg-muted/30 border-dashed opacity-60`),children:(0,l.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,l.jsx)(`div`,{className:t.cn(`h-12 w-12 rounded-lg flex items-center justify-center`,n?`bg-background/50`:`bg-muted`),children:e.icon||(0,l.jsx)(c.Trophy,{className:`h-6 w-6`})}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`h4`,{className:`font-medium truncate`,children:e.name}),e.rarity&&(0,l.jsx)(r.Badge,{variant:`outline`,className:`text-xs capitalize`,children:e.rarity})]}),(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.description}),e.progress!==void 0&&e.maxProgress!==void 0&&!n&&(0,l.jsxs)(`div`,{className:`mt-2`,children:[(0,l.jsx)(a.Progress,{value:e.progress/e.maxProgress*100,className:`h-1.5`}),(0,l.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:[e.progress,` / `,e.maxProgress]})]}),e.unlockedAt&&(0,l.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-2`,children:[`Unlocked `,typeof e.unlockedAt==`string`?e.unlockedAt:e.unlockedAt.toLocaleDateString()]})]})]})})}function h({match:e}){let n={win:`text-green-500 bg-green-500/10`,loss:`text-red-500 bg-red-500/10`,draw:`text-yellow-500 bg-yellow-500/10`},i={win:(0,l.jsx)(c.Trophy,{className:`h-4 w-4`}),loss:(0,l.jsx)(c.Swords,{className:`h-4 w-4`}),draw:(0,l.jsx)(c.Shield,{className:`h-4 w-4`})};return(0,l.jsxs)(`div`,{className:`flex items-center gap-4 p-3 rounded-lg bg-muted/50`,children:[(0,l.jsx)(`div`,{className:t.cn(`h-10 w-10 rounded-lg flex items-center justify-center`,n[e.result]),children:i[e.result]}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`span`,{className:`font-medium capitalize`,children:e.result}),e.score&&(0,l.jsx)(`span`,{className:`text-muted-foreground`,children:e.score})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[e.opponent&&(0,l.jsxs)(`span`,{children:[`vs `,e.opponent]}),e.mode&&(0,l.jsx)(r.Badge,{variant:`outline`,className:`text-xs`,children:e.mode})]})]}),(0,l.jsxs)(`div`,{className:`text-right`,children:[e.xpGained&&(0,l.jsxs)(`p`,{className:`text-sm font-medium text-green-500`,children:[`+`,e.xpGained,` XP`]}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:typeof e.date==`string`?e.date:e.date.toLocaleDateString()})]})]})}function g({name:e,avatar:r,title:a,level:s,currentXP:u,maxXP:d,totalXP:g,rank:_,rankIcon:v,stats:y,achievements:b,badges:x,matchHistory:S,streak:C,joinDate:w,playtime:T,friendsCount:E,isOnline:D=!1,className:O}){return(0,l.jsxs)(`div`,{className:t.cn(`space-y-6`,O),children:[(0,l.jsx)(i.Card,{children:(0,l.jsxs)(i.CardContent,{className:`pt-6`,children:[(0,l.jsxs)(`div`,{className:`flex flex-col md:flex-row gap-6 items-start`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsxs)(n.Avatar,{className:`h-24 w-24 border-4 border-primary/20`,children:[(0,l.jsx)(n.AvatarImage,{src:r,alt:e}),(0,l.jsx)(n.AvatarFallback,{className:`text-2xl`,children:e.slice(0,2).toUpperCase()})]}),D&&(0,l.jsx)(`div`,{className:`absolute bottom-1 right-1 h-5 w-5 rounded-full bg-green-500 border-2 border-background`}),(0,l.jsx)(`div`,{className:`absolute -top-2 -right-2 h-8 w-8 rounded-full bg-primary flex items-center justify-center text-primary-foreground font-bold text-sm`,children:s})]}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h2`,{className:`text-2xl font-bold`,children:e}),a&&(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:a}),_&&(0,l.jsxs)(`div`,{className:`flex items-center gap-2 mt-2`,children:[v||(0,l.jsx)(c.Medal,{className:`h-5 w-5 text-yellow-500`}),(0,l.jsx)(`span`,{className:`font-medium`,children:_})]})]})]}),(0,l.jsxs)(`div`,{className:`flex-1 grid grid-cols-2 md:grid-cols-4 gap-4`,children:[C!==void 0&&(0,l.jsxs)(`div`,{className:`text-center p-3 rounded-lg bg-orange-500/10`,children:[(0,l.jsx)(c.Flame,{className:`h-6 w-6 text-orange-500 mx-auto`}),(0,l.jsx)(`p`,{className:`text-2xl font-bold mt-1`,children:C}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Day Streak`})]}),g!==void 0&&(0,l.jsxs)(`div`,{className:`text-center p-3 rounded-lg bg-purple-500/10`,children:[(0,l.jsx)(c.Zap,{className:`h-6 w-6 text-purple-500 mx-auto`}),(0,l.jsx)(`p`,{className:`text-2xl font-bold mt-1`,children:g.toLocaleString()}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Total XP`})]}),T&&(0,l.jsxs)(`div`,{className:`text-center p-3 rounded-lg bg-blue-500/10`,children:[(0,l.jsx)(c.Clock,{className:`h-6 w-6 text-blue-500 mx-auto`}),(0,l.jsx)(`p`,{className:`text-2xl font-bold mt-1`,children:T}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Playtime`})]}),E!==void 0&&(0,l.jsxs)(`div`,{className:`text-center p-3 rounded-lg bg-green-500/10`,children:[(0,l.jsx)(c.Users,{className:`h-6 w-6 text-green-500 mx-auto`}),(0,l.jsx)(`p`,{className:`text-2xl font-bold mt-1`,children:E}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Friends`})]})]})]}),(0,l.jsx)(`div`,{className:`mt-6`,children:(0,l.jsx)(f,{current:u,max:d,level:s})}),x&&x.length>0&&(0,l.jsxs)(`div`,{className:`mt-6`,children:[(0,l.jsx)(`h3`,{className:`text-sm font-medium text-muted-foreground mb-3`,children:`Badges`}),(0,l.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:x.map(e=>(0,l.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 rounded-full bg-muted text-sm`,style:e.color?{backgroundColor:`${e.color}20`,color:e.color}:void 0,children:[e.icon,(0,l.jsx)(`span`,{children:e.name})]},e.id))})]})]})}),(0,l.jsxs)(o.Tabs,{defaultValue:`stats`,className:`w-full`,children:[(0,l.jsxs)(o.TabsList,{className:`w-full justify-start`,children:[(0,l.jsx)(o.TabsTrigger,{value:`stats`,children:`Stats`}),(0,l.jsx)(o.TabsTrigger,{value:`achievements`,children:`Achievements`}),(0,l.jsx)(o.TabsTrigger,{value:`history`,children:`Match History`})]}),(0,l.jsx)(o.TabsContent,{value:`stats`,className:`mt-4`,children:(0,l.jsxs)(i.Card,{children:[(0,l.jsxs)(i.CardHeader,{children:[(0,l.jsx)(i.CardTitle,{children:`Player Statistics`}),(0,l.jsx)(i.CardDescription,{children:`Your performance metrics`})]}),(0,l.jsx)(i.CardContent,{children:y&&y.length>0?(0,l.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:y.map((e,t)=>(0,l.jsx)(p,{stat:e},t))}):(0,l.jsx)(`p`,{className:`text-muted-foreground text-center py-8`,children:`No statistics available`})})]})}),(0,l.jsx)(o.TabsContent,{value:`achievements`,className:`mt-4`,children:(0,l.jsxs)(i.Card,{children:[(0,l.jsxs)(i.CardHeader,{children:[(0,l.jsx)(i.CardTitle,{children:`Achievements`}),(0,l.jsxs)(i.CardDescription,{children:[b?.filter(e=>e.unlockedAt).length||0,` / `,b?.length||0,` unlocked`]})]}),(0,l.jsx)(i.CardContent,{children:b&&b.length>0?(0,l.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:b.map(e=>(0,l.jsx)(m,{achievement:e},e.id))}):(0,l.jsx)(`p`,{className:`text-muted-foreground text-center py-8`,children:`No achievements yet`})})]})}),(0,l.jsx)(o.TabsContent,{value:`history`,className:`mt-4`,children:(0,l.jsxs)(i.Card,{children:[(0,l.jsxs)(i.CardHeader,{children:[(0,l.jsx)(i.CardTitle,{children:`Match History`}),(0,l.jsx)(i.CardDescription,{children:`Your recent games`})]}),(0,l.jsx)(i.CardContent,{children:S&&S.length>0?(0,l.jsx)(`div`,{className:`space-y-3`,children:S.map(e=>(0,l.jsx)(h,{match:e},e.id))}):(0,l.jsx)(`p`,{className:`text-muted-foreground text-center py-8`,children:`No matches played yet`})})]})})]}),w&&(0,l.jsxs)(`div`,{className:`flex items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,l.jsx)(c.Calendar,{className:`h-4 w-4`}),(0,l.jsxs)(`span`,{children:[`Member since `,typeof w==`string`?w:w.toLocaleDateString()]})]})]})}var _=[{label:`Matches Played`,value:342,icon:(0,l.jsx)(c.Gamepad2,{className:`h-5 w-5`}),color:`blue`},{label:`Wins`,value:189,icon:(0,l.jsx)(c.Trophy,{className:`h-5 w-5`}),color:`green`},{label:`Win Rate`,value:`55.3%`,icon:(0,l.jsx)(c.TrendingUp,{className:`h-5 w-5`}),color:`yellow`},{label:`Best Score`,value:`12,450`,icon:(0,l.jsx)(c.Star,{className:`h-5 w-5`}),color:`purple`},{label:`Kills`,value:`1,234`,icon:(0,l.jsx)(c.Target,{className:`h-5 w-5`}),color:`red`},{label:`Assists`,value:876,icon:(0,l.jsx)(c.Heart,{className:`h-5 w-5`}),color:`default`}],v=[{id:`first-win`,name:`First Victory`,description:`Win your first match`,rarity:`common`,unlockedAt:new Date(`2024-01-15`),icon:(0,l.jsx)(c.Trophy,{className:`h-6 w-6 text-yellow-500`})},{id:`streak-master`,name:`Streak Master`,description:`Achieve a 10-day login streak`,rarity:`rare`,unlockedAt:new Date(`2024-02-20`),icon:(0,l.jsx)(c.Flame,{className:`h-6 w-6 text-orange-500`})},{id:`legendary-player`,name:`Legendary Player`,description:`Reach level 50`,rarity:`legendary`,progress:42,maxProgress:50,icon:(0,l.jsx)(c.Crown,{className:`h-6 w-6 text-amber-500`})},{id:`social-butterfly`,name:`Social Butterfly`,description:`Add 25 friends`,rarity:`epic`,progress:18,maxProgress:25,icon:(0,l.jsx)(c.Users,{className:`h-6 w-6 text-purple-500`})}],y=[{id:`beta`,name:`Beta Tester`,icon:(0,l.jsx)(c.Shield,{className:`h-4 w-4`}),color:`#3b82f6`},{id:`premium`,name:`Premium`,icon:(0,l.jsx)(c.Crown,{className:`h-4 w-4`}),color:`#f59e0b`},{id:`verified`,name:`Verified`,icon:(0,l.jsx)(c.Award,{className:`h-4 w-4`}),color:`#10b981`}],b=[{id:`1`,result:`win`,score:`3-1`,opponent:`xShadowx`,mode:`Ranked`,date:new Date(`2024-03-10`),xpGained:150},{id:`2`,result:`win`,score:`2-0`,opponent:`ProGamer99`,mode:`Ranked`,date:new Date(`2024-03-10`),xpGained:175},{id:`3`,result:`loss`,score:`1-3`,opponent:`NightHawk`,mode:`Ranked`,date:new Date(`2024-03-09`),xpGained:50},{id:`4`,result:`draw`,score:`2-2`,opponent:`StormRider`,mode:`Casual`,date:new Date(`2024-03-09`),xpGained:75},{id:`5`,result:`win`,score:`5-2`,opponent:`BlazeMaster`,mode:`Ranked`,date:new Date(`2024-03-08`),xpGained:200}];exports.default=g,exports.defaultAchievements=v,exports.defaultBadges=y,exports.defaultMatchHistory=b,exports.defaultPlayerStats=_;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/avatar/index.cjs.js"),r=require("../../components/badge/index.cjs.js"),i=require("../../components/card/index.cjs.js"),a=require("../../components/progress/index.cjs.js"),o=require("../../components/tabs/index.cjs.js");let s=require("react");s=e.__toESM(s);let c=require("lucide-react"),l=require("react/jsx-runtime");var u={common:`bg-slate-500/20 text-slate-400 border-slate-500/30`,rare:`bg-blue-500/20 text-blue-400 border-blue-500/30`,epic:`bg-purple-500/20 text-purple-400 border-purple-500/30`,legendary:`bg-amber-500/20 text-amber-400 border-amber-500/30`},d={common:``,rare:`shadow-blue-500/20`,epic:`shadow-purple-500/20`,legendary:`shadow-amber-500/30 shadow-lg`};function f({current:e,max:t,level:n}){let r=e/t*100;return(0,l.jsxs)(`div`,{className:`space-y-2`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`div`,{className:`h-8 w-8 rounded-full bg-primary flex items-center justify-center text-primary-foreground font-bold`,children:n}),(0,l.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Level `,n]})]}),(0,l.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.toLocaleString(),` / `,t.toLocaleString(),` XP`]})]}),(0,l.jsxs)(`div`,{className:`relative h-3 rounded-full bg-muted overflow-hidden`,children:[(0,l.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-gradient-to-r from-primary to-primary/80 rounded-full transition-all duration-500`,style:{width:`${r}%`}}),(0,l.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-gradient-to-r from-white/20 to-transparent rounded-full`,style:{width:`${r}%`}})]})]})}function p({stat:e}){return(0,l.jsxs)(`div`,{className:`flex items-center gap-3 p-3 rounded-lg bg-muted/50`,children:[e.icon&&(0,l.jsx)(`div`,{className:t.cn(`h-10 w-10 rounded-lg bg-background flex items-center justify-center`,{default:`text-foreground`,blue:`text-blue-500`,green:`text-green-500`,yellow:`text-yellow-500`,red:`text-red-500`,purple:`text-purple-500`}[e.color||`default`]),children:e.icon}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`p`,{className:`text-2xl font-bold`,children:e.value}),(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.label})]})]})}function m({achievement:e}){let n=e.unlockedAt||e.progress!==void 0&&e.maxProgress!==void 0&&e.progress>=e.maxProgress;return(0,l.jsx)(`div`,{className:t.cn(`p-4 rounded-lg border transition-all`,n?t.cn(u[e.rarity||`common`],d[e.rarity||`common`]):`bg-muted/30 border-dashed opacity-60`),children:(0,l.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,l.jsx)(`div`,{className:t.cn(`h-12 w-12 rounded-lg flex items-center justify-center`,n?`bg-background/50`:`bg-muted`),children:e.icon||(0,l.jsx)(c.Trophy,{className:`h-6 w-6`})}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`h4`,{className:`font-medium truncate`,children:e.name}),e.rarity&&(0,l.jsx)(r.Badge,{variant:`outline`,className:`text-xs capitalize`,children:e.rarity})]}),(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.description}),e.progress!==void 0&&e.maxProgress!==void 0&&!n&&(0,l.jsxs)(`div`,{className:`mt-2`,children:[(0,l.jsx)(a.Progress,{value:e.progress/e.maxProgress*100,className:`h-1.5`}),(0,l.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:[e.progress,` / `,e.maxProgress]})]}),e.unlockedAt&&(0,l.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-2`,children:[`Unlocked `,typeof e.unlockedAt==`string`?e.unlockedAt:e.unlockedAt.toLocaleDateString()]})]})]})})}function h({match:e}){let n={win:`text-green-500 bg-green-500/10`,loss:`text-red-500 bg-red-500/10`,draw:`text-yellow-500 bg-yellow-500/10`},i={win:(0,l.jsx)(c.Trophy,{className:`h-4 w-4`}),loss:(0,l.jsx)(c.Swords,{className:`h-4 w-4`}),draw:(0,l.jsx)(c.Shield,{className:`h-4 w-4`})};return(0,l.jsxs)(`div`,{className:`flex items-center gap-4 p-3 rounded-lg bg-muted/50`,children:[(0,l.jsx)(`div`,{className:t.cn(`h-10 w-10 rounded-lg flex items-center justify-center`,n[e.result]),children:i[e.result]}),(0,l.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(`span`,{className:`font-medium capitalize`,children:e.result}),e.score&&(0,l.jsx)(`span`,{className:`text-muted-foreground`,children:e.score})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[e.opponent&&(0,l.jsxs)(`span`,{children:[`vs `,e.opponent]}),e.mode&&(0,l.jsx)(r.Badge,{variant:`outline`,className:`text-xs`,children:e.mode})]})]}),(0,l.jsxs)(`div`,{className:`text-right`,children:[e.xpGained&&(0,l.jsxs)(`p`,{className:`text-sm font-medium text-green-500`,children:[`+`,e.xpGained,` XP`]}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:typeof e.date==`string`?e.date:e.date.toLocaleDateString()})]})]})}function g({name:e,avatar:r,title:a,level:s,currentXP:u,maxXP:d,totalXP:g,rank:_,rankIcon:v,stats:y,achievements:b,badges:x,matchHistory:S,streak:C,joinDate:w,playtime:T,friendsCount:E,isOnline:D=!1,className:O}){return(0,l.jsxs)(`div`,{className:t.cn(`space-y-6`,O),children:[(0,l.jsx)(i.Card,{children:(0,l.jsxs)(i.CardContent,{className:`pt-6`,children:[(0,l.jsxs)(`div`,{className:`flex flex-col md:flex-row gap-6 items-start`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsxs)(n.Avatar,{className:`h-24 w-24 border-4 border-primary/20`,children:[(0,l.jsx)(n.AvatarImage,{src:r,alt:e}),(0,l.jsx)(n.AvatarFallback,{className:`text-2xl`,children:e.slice(0,2).toUpperCase()})]}),D&&(0,l.jsx)(`div`,{className:`absolute bottom-1 right-1 h-5 w-5 rounded-full bg-green-500 border-2 border-background`}),(0,l.jsx)(`div`,{className:`absolute -top-2 -right-2 h-8 w-8 rounded-full bg-primary flex items-center justify-center text-primary-foreground font-bold text-sm`,children:s})]}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h2`,{className:`text-2xl font-bold`,children:e}),a&&(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:a}),_&&(0,l.jsxs)(`div`,{className:`flex items-center gap-2 mt-2`,children:[v||(0,l.jsx)(c.Medal,{className:`h-5 w-5 text-yellow-500`}),(0,l.jsx)(`span`,{className:`font-medium`,children:_})]})]})]}),(0,l.jsxs)(`div`,{className:`flex-1 grid grid-cols-2 md:grid-cols-4 gap-4`,children:[C!==void 0&&(0,l.jsxs)(`div`,{className:`text-center p-3 rounded-lg bg-orange-500/10`,children:[(0,l.jsx)(c.Flame,{className:`h-6 w-6 text-orange-500 mx-auto`}),(0,l.jsx)(`p`,{className:`text-2xl font-bold mt-1`,children:C}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Day Streak`})]}),g!==void 0&&(0,l.jsxs)(`div`,{className:`text-center p-3 rounded-lg bg-purple-500/10`,children:[(0,l.jsx)(c.Zap,{className:`h-6 w-6 text-purple-500 mx-auto`}),(0,l.jsx)(`p`,{className:`text-2xl font-bold mt-1`,children:g.toLocaleString()}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Total XP`})]}),T&&(0,l.jsxs)(`div`,{className:`text-center p-3 rounded-lg bg-blue-500/10`,children:[(0,l.jsx)(c.Clock,{className:`h-6 w-6 text-blue-500 mx-auto`}),(0,l.jsx)(`p`,{className:`text-2xl font-bold mt-1`,children:T}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Playtime`})]}),E!==void 0&&(0,l.jsxs)(`div`,{className:`text-center p-3 rounded-lg bg-green-500/10`,children:[(0,l.jsx)(c.Users,{className:`h-6 w-6 text-green-500 mx-auto`}),(0,l.jsx)(`p`,{className:`text-2xl font-bold mt-1`,children:E}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Friends`})]})]})]}),(0,l.jsx)(`div`,{className:`mt-6`,children:(0,l.jsx)(f,{current:u,max:d,level:s})}),x&&x.length>0&&(0,l.jsxs)(`div`,{className:`mt-6`,children:[(0,l.jsx)(`h3`,{className:`text-sm font-medium text-muted-foreground mb-3`,children:`Badges`}),(0,l.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:x.map(e=>(0,l.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 rounded-full bg-muted text-sm`,style:e.color?{backgroundColor:`${e.color}20`,color:e.color}:void 0,children:[e.icon,(0,l.jsx)(`span`,{children:e.name})]},e.id))})]})]})}),(0,l.jsxs)(o.Tabs,{defaultValue:`stats`,className:`w-full`,children:[(0,l.jsxs)(o.TabsList,{className:`w-full justify-start`,children:[(0,l.jsx)(o.TabsTrigger,{value:`stats`,children:`Stats`}),(0,l.jsx)(o.TabsTrigger,{value:`achievements`,children:`Achievements`}),(0,l.jsx)(o.TabsTrigger,{value:`history`,children:`Match History`})]}),(0,l.jsx)(o.TabsContent,{value:`stats`,className:`mt-4`,children:(0,l.jsxs)(i.Card,{children:[(0,l.jsxs)(i.CardHeader,{children:[(0,l.jsx)(i.CardTitle,{children:`Player Statistics`}),(0,l.jsx)(i.CardDescription,{children:`Your performance metrics`})]}),(0,l.jsx)(i.CardContent,{children:y&&y.length>0?(0,l.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:y.map((e,t)=>(0,l.jsx)(p,{stat:e},t))}):(0,l.jsx)(`p`,{className:`text-muted-foreground text-center py-8`,children:`No statistics available`})})]})}),(0,l.jsx)(o.TabsContent,{value:`achievements`,className:`mt-4`,children:(0,l.jsxs)(i.Card,{children:[(0,l.jsxs)(i.CardHeader,{children:[(0,l.jsx)(i.CardTitle,{children:`Achievements`}),(0,l.jsxs)(i.CardDescription,{children:[b?.filter(e=>e.unlockedAt).length||0,` / `,b?.length||0,` unlocked`]})]}),(0,l.jsx)(i.CardContent,{children:b&&b.length>0?(0,l.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:b.map(e=>(0,l.jsx)(m,{achievement:e},e.id))}):(0,l.jsx)(`p`,{className:`text-muted-foreground text-center py-8`,children:`No achievements yet`})})]})}),(0,l.jsx)(o.TabsContent,{value:`history`,className:`mt-4`,children:(0,l.jsxs)(i.Card,{children:[(0,l.jsxs)(i.CardHeader,{children:[(0,l.jsx)(i.CardTitle,{children:`Match History`}),(0,l.jsx)(i.CardDescription,{children:`Your recent games`})]}),(0,l.jsx)(i.CardContent,{children:S&&S.length>0?(0,l.jsx)(`div`,{className:`space-y-3`,children:S.map(e=>(0,l.jsx)(h,{match:e},e.id))}):(0,l.jsx)(`p`,{className:`text-muted-foreground text-center py-8`,children:`No matches played yet`})})]})})]}),w&&(0,l.jsxs)(`div`,{className:`flex items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,l.jsx)(c.Calendar,{className:`h-4 w-4`}),(0,l.jsxs)(`span`,{children:[`Member since `,typeof w==`string`?w:w.toLocaleDateString()]})]})]})}var _=[{label:`Matches Played`,value:342,icon:(0,l.jsx)(c.Gamepad2,{className:`h-5 w-5`}),color:`blue`},{label:`Wins`,value:189,icon:(0,l.jsx)(c.Trophy,{className:`h-5 w-5`}),color:`green`},{label:`Win Rate`,value:`55.3%`,icon:(0,l.jsx)(c.TrendingUp,{className:`h-5 w-5`}),color:`yellow`},{label:`Best Score`,value:`12,450`,icon:(0,l.jsx)(c.Star,{className:`h-5 w-5`}),color:`purple`},{label:`Kills`,value:`1,234`,icon:(0,l.jsx)(c.Target,{className:`h-5 w-5`}),color:`red`},{label:`Assists`,value:876,icon:(0,l.jsx)(c.Heart,{className:`h-5 w-5`}),color:`default`}],v=[{id:`first-win`,name:`First Victory`,description:`Win your first match`,rarity:`common`,unlockedAt:new Date(`2024-01-15`),icon:(0,l.jsx)(c.Trophy,{className:`h-6 w-6 text-yellow-500`})},{id:`streak-master`,name:`Streak Master`,description:`Achieve a 10-day login streak`,rarity:`rare`,unlockedAt:new Date(`2024-02-20`),icon:(0,l.jsx)(c.Flame,{className:`h-6 w-6 text-orange-500`})},{id:`legendary-player`,name:`Legendary Player`,description:`Reach level 50`,rarity:`legendary`,progress:42,maxProgress:50,icon:(0,l.jsx)(c.Crown,{className:`h-6 w-6 text-amber-500`})},{id:`social-butterfly`,name:`Social Butterfly`,description:`Add 25 friends`,rarity:`epic`,progress:18,maxProgress:25,icon:(0,l.jsx)(c.Users,{className:`h-6 w-6 text-purple-500`})}],y=[{id:`beta`,name:`Beta Tester`,icon:(0,l.jsx)(c.Shield,{className:`h-4 w-4`}),color:`#3b82f6`},{id:`premium`,name:`Premium`,icon:(0,l.jsx)(c.Crown,{className:`h-4 w-4`}),color:`#f59e0b`},{id:`verified`,name:`Verified`,icon:(0,l.jsx)(c.Award,{className:`h-4 w-4`}),color:`#10b981`}],b=[{id:`1`,result:`win`,score:`3-1`,opponent:`xShadowx`,mode:`Ranked`,date:new Date(`2024-03-10`),xpGained:150},{id:`2`,result:`win`,score:`2-0`,opponent:`ProGamer99`,mode:`Ranked`,date:new Date(`2024-03-10`),xpGained:175},{id:`3`,result:`loss`,score:`1-3`,opponent:`NightHawk`,mode:`Ranked`,date:new Date(`2024-03-09`),xpGained:50},{id:`4`,result:`draw`,score:`2-2`,opponent:`StormRider`,mode:`Casual`,date:new Date(`2024-03-09`),xpGained:75},{id:`5`,result:`win`,score:`5-2`,opponent:`BlazeMaster`,mode:`Ranked`,date:new Date(`2024-03-08`),xpGained:200}];exports.PlayerProfile=g,exports.default=g,exports.defaultAchievements=v,exports.defaultBadges=y,exports.defaultMatchHistory=b,exports.defaultPlayerStats=_;
@@ -526,4 +526,4 @@ var B = [
526
526
  }
527
527
  ];
528
528
  //#endregion
529
- export { z as default, V as defaultAchievements, H as defaultBadges, U as defaultMatchHistory, B as defaultPlayerStats };
529
+ export { z as PlayerProfile, z as default, V as defaultAchievements, H as defaultBadges, U as defaultMatchHistory, B as defaultPlayerStats };
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/badge/index.cjs.js`),r=require(`../../components/button/index.cjs.js`),i=require(`../../components/card/index.cjs.js`),a=require(`../../components/label/index.cjs.js`),o=require(`../../components/switch/index.cjs.js`),s=require(`../../components/tooltip/index.cjs.js`);let c=require(`react`);c=e.__toESM(c);let l=require(`lucide-react`),u=require(`react/jsx-runtime`);var d=c.createContext({});function f(){return c.useContext(d)}function p({period:e,onChange:r,yearlyDiscount:i}){return(0,u.jsxs)(`div`,{className:`flex items-center justify-center gap-4 mb-8`,children:[(0,u.jsx)(a.Label,{htmlFor:`billing-toggle`,className:t.cn(`cursor-pointer transition-colors`,e===`monthly`?`text-foreground`:`text-muted-foreground`),children:`Mensuel`}),(0,u.jsx)(o.Switch,{id:`billing-toggle`,checked:e===`yearly`,onCheckedChange:e=>r(e?`yearly`:`monthly`)}),(0,u.jsxs)(a.Label,{htmlFor:`billing-toggle`,className:t.cn(`cursor-pointer transition-colors flex items-center gap-2`,e===`yearly`?`text-foreground`:`text-muted-foreground`),children:[`Annuel`,i&&(0,u.jsxs)(n.Badge,{variant:`secondary`,className:`text-xs`,children:[`-`,i]})]})]})}function m({plan:e,billingPeriod:a}){let{LinkComponent:o}=f(),c=a===`yearly`&&e.priceYearly!==void 0?e.priceYearly:e.price,d=a===`yearly`&&e.periodYearly?e.periodYearly:e.period||`/mois`,p=typeof c==`string`;return(0,u.jsxs)(i.Card,{className:t.cn(`relative flex flex-col`,e.popular&&`border-primary shadow-lg scale-105`),children:[e.popular&&(0,u.jsx)(`div`,{className:`absolute -top-3 left-1/2 -translate-x-1/2`,children:(0,u.jsxs)(n.Badge,{className:`px-3`,children:[(0,u.jsx)(l.Zap,{className:`h-3 w-3 mr-1`}),e.badge||`Populaire`]})}),(0,u.jsxs)(i.CardHeader,{className:`text-center pb-2`,children:[(0,u.jsx)(i.CardTitle,{className:`text-xl`,children:e.name}),e.description&&(0,u.jsx)(i.CardDescription,{children:e.description})]}),(0,u.jsxs)(i.CardContent,{className:`flex-1`,children:[(0,u.jsx)(`div`,{className:`text-center mb-6`,children:p?(0,u.jsx)(`div`,{className:`text-3xl font-bold`,children:c}):(0,u.jsxs)(`div`,{className:`flex items-baseline justify-center`,children:[(0,u.jsx)(`span`,{className:`text-sm text-muted-foreground mr-1`,children:e.currency||`€`}),(0,u.jsx)(`span`,{className:`text-4xl font-bold`,children:c}),(0,u.jsx)(`span`,{className:`text-sm text-muted-foreground ml-1`,children:d})]})}),(0,u.jsx)(`ul`,{className:`space-y-3`,children:e.features.map((e,n)=>(0,u.jsxs)(`li`,{className:`flex items-start gap-2`,children:[e.included===!0?(0,u.jsx)(l.Check,{className:`h-5 w-5 text-green-500 flex-shrink-0`}):e.included===`partial`||e.included===`limited`?(0,u.jsx)(l.Check,{className:`h-5 w-5 text-yellow-500 flex-shrink-0`}):(0,u.jsx)(l.X,{className:`h-5 w-5 text-muted-foreground flex-shrink-0`}),(0,u.jsxs)(`span`,{className:t.cn(`text-sm`,!e.included&&`text-muted-foreground`),children:[e.name,e.value&&(0,u.jsxs)(`span`,{className:`text-muted-foreground ml-1`,children:[`(`,e.value,`)`]})]}),e.tooltip&&(0,u.jsx)(s.TooltipProvider,{children:(0,u.jsxs)(s.Tooltip,{children:[(0,u.jsx)(s.TooltipTrigger,{asChild:!0,children:(0,u.jsx)(l.HelpCircle,{className:`h-4 w-4 text-muted-foreground cursor-help`})}),(0,u.jsx)(s.TooltipContent,{children:(0,u.jsx)(`p`,{className:`max-w-xs`,children:e.tooltip})})]})})]},n))})]}),(0,u.jsx)(i.CardFooter,{children:(0,u.jsx)(r.Button,{className:`w-full`,variant:e.buttonVariant||(e.popular?`default`:`outline`),onClick:e.onSelect,disabled:e.disabled,asChild:!!e.href,children:e.href?o?(0,u.jsx)(o,{href:e.href,children:e.buttonText||`Choisir`}):(0,u.jsx)(`a`,{href:e.href,children:e.buttonText||`Choisir`}):e.buttonText||`Choisir`})})]})}function h({plans:e,billingPeriod:i}){let{LinkComponent:a}=f(),o=Array.from(new Set(e.flatMap(e=>e.features.map(e=>e.name))));return(0,u.jsx)(`div`,{className:`overflow-x-auto`,children:(0,u.jsxs)(`table`,{className:`w-full border-collapse`,children:[(0,u.jsxs)(`thead`,{children:[(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`th`,{className:`text-left p-4 border-b bg-muted/50`,children:`Fonctionnalité`}),e.map(e=>(0,u.jsxs)(`th`,{className:t.cn(`text-center p-4 border-b min-w-[150px]`,e.popular&&`bg-primary/5`),children:[(0,u.jsx)(`div`,{className:`font-bold`,children:e.name}),e.popular&&(0,u.jsx)(n.Badge,{className:`mt-1`,variant:`default`,children:`Populaire`})]},e.id))]}),(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`td`,{className:`p-4 border-b bg-muted/50 font-medium`,children:`Prix`}),e.map(e=>{let n=i===`yearly`&&e.priceYearly!==void 0?e.priceYearly:e.price,r=i===`yearly`&&e.periodYearly?e.periodYearly:e.period||`/mois`,a=typeof n==`string`;return(0,u.jsx)(`td`,{className:t.cn(`text-center p-4 border-b`,e.popular&&`bg-primary/5`),children:a?(0,u.jsx)(`span`,{className:`font-bold`,children:n}):(0,u.jsxs)(`span`,{className:`font-bold`,children:[e.currency||`€`,n,(0,u.jsx)(`span`,{className:`text-sm font-normal text-muted-foreground`,children:r})]})},e.id)})]})]}),(0,u.jsxs)(`tbody`,{children:[o.map((n,r)=>(0,u.jsxs)(`tr`,{className:r%2==0?`bg-muted/20`:``,children:[(0,u.jsx)(`td`,{className:`p-4 border-b`,children:n}),e.map(e=>{let r=e.features.find(e=>e.name===n);return(0,u.jsx)(`td`,{className:t.cn(`text-center p-4 border-b`,e.popular&&`bg-primary/5`),children:r?r.included===!0?r.value?(0,u.jsx)(`span`,{children:r.value}):(0,u.jsx)(l.Check,{className:`h-5 w-5 text-green-500 mx-auto`}):r.included===`partial`||r.included===`limited`?(0,u.jsx)(`span`,{className:`text-yellow-600`,children:r.value||`Limité`}):(0,u.jsx)(l.X,{className:`h-5 w-5 text-muted-foreground mx-auto`}):(0,u.jsx)(l.X,{className:`h-5 w-5 text-muted-foreground mx-auto`})},e.id)})]},r)),(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`td`,{className:`p-4`}),e.map(e=>(0,u.jsx)(`td`,{className:t.cn(`text-center p-4`,e.popular&&`bg-primary/5`),children:(0,u.jsx)(r.Button,{variant:e.buttonVariant||(e.popular?`default`:`outline`),onClick:e.onSelect,disabled:e.disabled,asChild:!!e.href,children:e.href?a?(0,u.jsx)(a,{href:e.href,children:e.buttonText||`Choisir`}):(0,u.jsx)(`a`,{href:e.href,children:e.buttonText||`Choisir`}):e.buttonText||`Choisir`})},e.id))]})]})]})})}function g({title:e=`Questions fréquentes`,items:t}){return(0,u.jsxs)(`div`,{className:`mt-16`,children:[(0,u.jsx)(`h2`,{className:`text-2xl font-bold text-center mb-8`,children:e}),(0,u.jsx)(`div`,{className:`grid md:grid-cols-2 gap-6 max-w-4xl mx-auto`,children:t.map((e,t)=>(0,u.jsxs)(`div`,{className:`space-y-2`,children:[(0,u.jsx)(`h3`,{className:`font-semibold`,children:e.question}),(0,u.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e.answer})]},t))})]})}function _({title:e=`Tarification`,description:n,plans:r,showBillingToggle:i=!0,billingPeriod:a,onBillingPeriodChange:o,yearlyDiscount:s,faq:l,faqTitle:f,layout:_=`cards`,columns:v=3,showComparison:y=!1,className:b,LinkComponent:x}){let[S,C]=c.useState(`monthly`),w=a??S,T=e=>{o?o(e):C(e)},E={2:`md:grid-cols-2`,3:`md:grid-cols-2 lg:grid-cols-3`,4:`md:grid-cols-2 lg:grid-cols-4`},D=c.useMemo(()=>({LinkComponent:x}),[x]);return(0,u.jsx)(d.Provider,{value:D,children:(0,u.jsxs)(`div`,{className:t.cn(`container py-16`,b),children:[(0,u.jsxs)(`div`,{className:`text-center mb-12`,children:[(0,u.jsx)(`h1`,{className:`text-3xl md:text-4xl font-bold tracking-tight mb-4`,children:e}),n&&(0,u.jsx)(`p`,{className:`text-lg text-muted-foreground max-w-2xl mx-auto`,children:n})]}),i&&(0,u.jsx)(p,{period:w,onChange:T,yearlyDiscount:s}),_===`cards`&&!y?(0,u.jsx)(`div`,{className:t.cn(`grid gap-6 items-stretch`,E[v]),children:r.map(e=>(0,u.jsx)(m,{plan:e,billingPeriod:w},e.id))}):(0,u.jsx)(h,{plans:r,billingPeriod:w}),l&&l.length>0&&(0,u.jsx)(g,{title:f,items:l})]})})}var v=[{id:`free`,name:`Gratuit`,description:`Pour démarrer`,price:0,priceYearly:0,features:[{name:`1 utilisateur`,included:!0},{name:`5 projets`,included:!0},{name:`1 Go de stockage`,included:!0},{name:`Support email`,included:!0},{name:`API Access`,included:!1},{name:`Analytics avancés`,included:!1},{name:`Support prioritaire`,included:!1}],buttonText:`Commencer gratuitement`,buttonVariant:`outline`},{id:`pro`,name:`Pro`,description:`Pour les équipes`,price:29,priceYearly:24,periodYearly:`/mois (facturé annuellement)`,popular:!0,features:[{name:`5 utilisateurs`,included:!0},{name:`Projets illimités`,included:!0},{name:`50 Go de stockage`,included:!0},{name:`Support email`,included:!0},{name:`API Access`,included:!0},{name:`Analytics avancés`,included:!0},{name:`Support prioritaire`,included:!1}],buttonText:`Essai gratuit 14 jours`},{id:`enterprise`,name:`Enterprise`,description:`Pour les grandes équipes`,price:`Sur mesure`,features:[{name:`Utilisateurs illimités`,included:!0},{name:`Projets illimités`,included:!0},{name:`Stockage illimité`,included:!0},{name:`Support email`,included:!0},{name:`API Access`,included:!0},{name:`Analytics avancés`,included:!0},{name:`Support prioritaire`,included:!0}],buttonText:`Contacter les ventes`,buttonVariant:`outline`}],y=[{question:`Puis-je changer de plan à tout moment ?`,answer:`Oui, vous pouvez upgrader ou downgrader votre plan à tout moment. Les changements prennent effet immédiatement.`},{question:`Y a-t-il une période d'essai ?`,answer:`Oui, tous nos plans payants incluent une période d'essai gratuite de 14 jours, sans carte bancaire requise.`},{question:`Quels moyens de paiement acceptez-vous ?`,answer:`Nous acceptons les cartes de crédit (Visa, Mastercard, Amex), PayPal et les virements bancaires pour les entreprises.`},{question:`Puis-je annuler à tout moment ?`,answer:`Absolument. Vous pouvez annuler votre abonnement à tout moment sans frais supplémentaires.`}];exports.default=_,exports.defaultPricingFAQ=y,exports.defaultPricingPlans=v;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/badge/index.cjs.js"),r=require("../../components/button/index.cjs.js"),i=require("../../components/card/index.cjs.js"),a=require("../../components/label/index.cjs.js"),o=require("../../components/switch/index.cjs.js"),s=require("../../components/tooltip/index.cjs.js");let c=require("react");c=e.__toESM(c);let l=require("lucide-react"),u=require("react/jsx-runtime");var d=c.createContext({});function f(){return c.useContext(d)}function p({period:e,onChange:r,yearlyDiscount:i}){return(0,u.jsxs)(`div`,{className:`flex items-center justify-center gap-4 mb-8`,children:[(0,u.jsx)(a.Label,{htmlFor:`billing-toggle`,className:t.cn(`cursor-pointer transition-colors`,e===`monthly`?`text-foreground`:`text-muted-foreground`),children:`Mensuel`}),(0,u.jsx)(o.Switch,{id:`billing-toggle`,checked:e===`yearly`,onCheckedChange:e=>r(e?`yearly`:`monthly`)}),(0,u.jsxs)(a.Label,{htmlFor:`billing-toggle`,className:t.cn(`cursor-pointer transition-colors flex items-center gap-2`,e===`yearly`?`text-foreground`:`text-muted-foreground`),children:[`Annuel`,i&&(0,u.jsxs)(n.Badge,{variant:`secondary`,className:`text-xs`,children:[`-`,i]})]})]})}function m({plan:e,billingPeriod:a}){let{LinkComponent:o}=f(),c=a===`yearly`&&e.priceYearly!==void 0?e.priceYearly:e.price,d=a===`yearly`&&e.periodYearly?e.periodYearly:e.period||`/mois`,p=typeof c==`string`;return(0,u.jsxs)(i.Card,{className:t.cn(`relative flex flex-col`,e.popular&&`border-primary shadow-lg scale-105`),children:[e.popular&&(0,u.jsx)(`div`,{className:`absolute -top-3 left-1/2 -translate-x-1/2`,children:(0,u.jsxs)(n.Badge,{className:`px-3`,children:[(0,u.jsx)(l.Zap,{className:`h-3 w-3 mr-1`}),e.badge||`Populaire`]})}),(0,u.jsxs)(i.CardHeader,{className:`text-center pb-2`,children:[(0,u.jsx)(i.CardTitle,{className:`text-xl`,children:e.name}),e.description&&(0,u.jsx)(i.CardDescription,{children:e.description})]}),(0,u.jsxs)(i.CardContent,{className:`flex-1`,children:[(0,u.jsx)(`div`,{className:`text-center mb-6`,children:p?(0,u.jsx)(`div`,{className:`text-3xl font-bold`,children:c}):(0,u.jsxs)(`div`,{className:`flex items-baseline justify-center`,children:[(0,u.jsx)(`span`,{className:`text-sm text-muted-foreground mr-1`,children:e.currency||`€`}),(0,u.jsx)(`span`,{className:`text-4xl font-bold`,children:c}),(0,u.jsx)(`span`,{className:`text-sm text-muted-foreground ml-1`,children:d})]})}),(0,u.jsx)(`ul`,{className:`space-y-3`,children:e.features.map((e,n)=>(0,u.jsxs)(`li`,{className:`flex items-start gap-2`,children:[e.included===!0?(0,u.jsx)(l.Check,{className:`h-5 w-5 text-green-500 flex-shrink-0`}):e.included===`partial`||e.included===`limited`?(0,u.jsx)(l.Check,{className:`h-5 w-5 text-yellow-500 flex-shrink-0`}):(0,u.jsx)(l.X,{className:`h-5 w-5 text-muted-foreground flex-shrink-0`}),(0,u.jsxs)(`span`,{className:t.cn(`text-sm`,!e.included&&`text-muted-foreground`),children:[e.name,e.value&&(0,u.jsxs)(`span`,{className:`text-muted-foreground ml-1`,children:[`(`,e.value,`)`]})]}),e.tooltip&&(0,u.jsx)(s.TooltipProvider,{children:(0,u.jsxs)(s.Tooltip,{children:[(0,u.jsx)(s.TooltipTrigger,{asChild:!0,children:(0,u.jsx)(l.HelpCircle,{className:`h-4 w-4 text-muted-foreground cursor-help`})}),(0,u.jsx)(s.TooltipContent,{children:(0,u.jsx)(`p`,{className:`max-w-xs`,children:e.tooltip})})]})})]},n))})]}),(0,u.jsx)(i.CardFooter,{children:(0,u.jsx)(r.Button,{className:`w-full`,variant:e.buttonVariant||(e.popular?`default`:`outline`),onClick:e.onSelect,disabled:e.disabled,asChild:!!e.href,children:e.href?o?(0,u.jsx)(o,{href:e.href,children:e.buttonText||`Choisir`}):(0,u.jsx)(`a`,{href:e.href,children:e.buttonText||`Choisir`}):e.buttonText||`Choisir`})})]})}function h({plans:e,billingPeriod:i}){let{LinkComponent:a}=f(),o=Array.from(new Set(e.flatMap(e=>e.features.map(e=>e.name))));return(0,u.jsx)(`div`,{className:`overflow-x-auto`,children:(0,u.jsxs)(`table`,{className:`w-full border-collapse`,children:[(0,u.jsxs)(`thead`,{children:[(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`th`,{className:`text-left p-4 border-b bg-muted/50`,children:`Fonctionnalité`}),e.map(e=>(0,u.jsxs)(`th`,{className:t.cn(`text-center p-4 border-b min-w-[150px]`,e.popular&&`bg-primary/5`),children:[(0,u.jsx)(`div`,{className:`font-bold`,children:e.name}),e.popular&&(0,u.jsx)(n.Badge,{className:`mt-1`,variant:`default`,children:`Populaire`})]},e.id))]}),(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`td`,{className:`p-4 border-b bg-muted/50 font-medium`,children:`Prix`}),e.map(e=>{let n=i===`yearly`&&e.priceYearly!==void 0?e.priceYearly:e.price,r=i===`yearly`&&e.periodYearly?e.periodYearly:e.period||`/mois`,a=typeof n==`string`;return(0,u.jsx)(`td`,{className:t.cn(`text-center p-4 border-b`,e.popular&&`bg-primary/5`),children:a?(0,u.jsx)(`span`,{className:`font-bold`,children:n}):(0,u.jsxs)(`span`,{className:`font-bold`,children:[e.currency||`€`,n,(0,u.jsx)(`span`,{className:`text-sm font-normal text-muted-foreground`,children:r})]})},e.id)})]})]}),(0,u.jsxs)(`tbody`,{children:[o.map((n,r)=>(0,u.jsxs)(`tr`,{className:r%2==0?`bg-muted/20`:``,children:[(0,u.jsx)(`td`,{className:`p-4 border-b`,children:n}),e.map(e=>{let r=e.features.find(e=>e.name===n);return(0,u.jsx)(`td`,{className:t.cn(`text-center p-4 border-b`,e.popular&&`bg-primary/5`),children:r?r.included===!0?r.value?(0,u.jsx)(`span`,{children:r.value}):(0,u.jsx)(l.Check,{className:`h-5 w-5 text-green-500 mx-auto`}):r.included===`partial`||r.included===`limited`?(0,u.jsx)(`span`,{className:`text-yellow-600`,children:r.value||`Limité`}):(0,u.jsx)(l.X,{className:`h-5 w-5 text-muted-foreground mx-auto`}):(0,u.jsx)(l.X,{className:`h-5 w-5 text-muted-foreground mx-auto`})},e.id)})]},r)),(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`td`,{className:`p-4`}),e.map(e=>(0,u.jsx)(`td`,{className:t.cn(`text-center p-4`,e.popular&&`bg-primary/5`),children:(0,u.jsx)(r.Button,{variant:e.buttonVariant||(e.popular?`default`:`outline`),onClick:e.onSelect,disabled:e.disabled,asChild:!!e.href,children:e.href?a?(0,u.jsx)(a,{href:e.href,children:e.buttonText||`Choisir`}):(0,u.jsx)(`a`,{href:e.href,children:e.buttonText||`Choisir`}):e.buttonText||`Choisir`})},e.id))]})]})]})})}function g({title:e=`Questions fréquentes`,items:t}){return(0,u.jsxs)(`div`,{className:`mt-16`,children:[(0,u.jsx)(`h2`,{className:`text-2xl font-bold text-center mb-8`,children:e}),(0,u.jsx)(`div`,{className:`grid md:grid-cols-2 gap-6 max-w-4xl mx-auto`,children:t.map((e,t)=>(0,u.jsxs)(`div`,{className:`space-y-2`,children:[(0,u.jsx)(`h3`,{className:`font-semibold`,children:e.question}),(0,u.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e.answer})]},t))})]})}function _({title:e=`Tarification`,description:n,plans:r,showBillingToggle:i=!0,billingPeriod:a,onBillingPeriodChange:o,yearlyDiscount:s,faq:l,faqTitle:f,layout:_=`cards`,columns:v=3,showComparison:y=!1,className:b,LinkComponent:x}){let[S,C]=c.useState(`monthly`),w=a??S,T=e=>{o?o(e):C(e)},E={2:`md:grid-cols-2`,3:`md:grid-cols-2 lg:grid-cols-3`,4:`md:grid-cols-2 lg:grid-cols-4`},D=c.useMemo(()=>({LinkComponent:x}),[x]);return(0,u.jsx)(d.Provider,{value:D,children:(0,u.jsxs)(`div`,{className:t.cn(`container py-16`,b),children:[(0,u.jsxs)(`div`,{className:`text-center mb-12`,children:[(0,u.jsx)(`h1`,{className:`text-3xl md:text-4xl font-bold tracking-tight mb-4`,children:e}),n&&(0,u.jsx)(`p`,{className:`text-lg text-muted-foreground max-w-2xl mx-auto`,children:n})]}),i&&(0,u.jsx)(p,{period:w,onChange:T,yearlyDiscount:s}),_===`cards`&&!y?(0,u.jsx)(`div`,{className:t.cn(`grid gap-6 items-stretch`,E[v]),children:r.map(e=>(0,u.jsx)(m,{plan:e,billingPeriod:w},e.id))}):(0,u.jsx)(h,{plans:r,billingPeriod:w}),l&&l.length>0&&(0,u.jsx)(g,{title:f,items:l})]})})}var v=[{id:`free`,name:`Gratuit`,description:`Pour démarrer`,price:0,priceYearly:0,features:[{name:`1 utilisateur`,included:!0},{name:`5 projets`,included:!0},{name:`1 Go de stockage`,included:!0},{name:`Support email`,included:!0},{name:`API Access`,included:!1},{name:`Analytics avancés`,included:!1},{name:`Support prioritaire`,included:!1}],buttonText:`Commencer gratuitement`,buttonVariant:`outline`},{id:`pro`,name:`Pro`,description:`Pour les équipes`,price:29,priceYearly:24,periodYearly:`/mois (facturé annuellement)`,popular:!0,features:[{name:`5 utilisateurs`,included:!0},{name:`Projets illimités`,included:!0},{name:`50 Go de stockage`,included:!0},{name:`Support email`,included:!0},{name:`API Access`,included:!0},{name:`Analytics avancés`,included:!0},{name:`Support prioritaire`,included:!1}],buttonText:`Essai gratuit 14 jours`},{id:`enterprise`,name:`Enterprise`,description:`Pour les grandes équipes`,price:`Sur mesure`,features:[{name:`Utilisateurs illimités`,included:!0},{name:`Projets illimités`,included:!0},{name:`Stockage illimité`,included:!0},{name:`Support email`,included:!0},{name:`API Access`,included:!0},{name:`Analytics avancés`,included:!0},{name:`Support prioritaire`,included:!0}],buttonText:`Contacter les ventes`,buttonVariant:`outline`}],y=[{question:`Puis-je changer de plan à tout moment ?`,answer:`Oui, vous pouvez upgrader ou downgrader votre plan à tout moment. Les changements prennent effet immédiatement.`},{question:`Y a-t-il une période d'essai ?`,answer:`Oui, tous nos plans payants incluent une période d'essai gratuite de 14 jours, sans carte bancaire requise.`},{question:`Quels moyens de paiement acceptez-vous ?`,answer:`Nous acceptons les cartes de crédit (Visa, Mastercard, Amex), PayPal et les virements bancaires pour les entreprises.`},{question:`Puis-je annuler à tout moment ?`,answer:`Absolument. Vous pouvez annuler votre abonnement à tout moment sans frais supplémentaires.`}];exports.WakaPricing=_,exports.default=_,exports.defaultPricingFAQ=y,exports.defaultPricingPlans=v;
@@ -402,4 +402,4 @@ var k = [
402
402
  }
403
403
  ];
404
404
  //#endregion
405
- export { O as default, A as defaultPricingFAQ, k as defaultPricingPlans };
405
+ export { O as WakaPricing, O as default, A as defaultPricingFAQ, k as defaultPricingPlans };
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/avatar/index.cjs.js`),r=require(`../../components/button/index.cjs.js`),i=require(`../../components/card/index.cjs.js`),a=require(`../../components/label/index.cjs.js`),o=require(`../../components/input/index.cjs.js`),s=require(`../../components/select/index.cjs.js`),c=require(`../../components/separator/index.cjs.js`),l=require(`../../components/tabs/index.cjs.js`),u=require(`../../components/textarea/index.cjs.js`);let d=require(`react`);d=e.__toESM(d);let f=require(`lucide-react`),p=require(`react/jsx-runtime`);function m({url:e,name:i,size:a=`lg`,editable:o,onAvatarChange:s}){let c=d.useRef(null),l={sm:`h-12 w-12`,md:`h-16 w-16`,lg:`h-24 w-24`,xl:`h-32 w-32`},u=i.split(` `).map(e=>e[0]).join(``).toUpperCase().slice(0,2);return(0,p.jsxs)(`div`,{className:`relative inline-block`,children:[(0,p.jsxs)(n.Avatar,{className:t.cn(l[a],`border-4 border-background shadow-lg`),children:[(0,p.jsx)(n.AvatarImage,{src:e,alt:i}),(0,p.jsx)(n.AvatarFallback,{className:`text-lg font-medium`,children:u})]}),o&&s&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`input`,{ref:c,type:`file`,accept:`image/*`,onChange:e=>{let t=e.target.files?.[0];t&&s&&s(t)},className:`hidden`}),(0,p.jsx)(r.Button,{size:`icon`,variant:`secondary`,className:`absolute bottom-0 right-0 h-8 w-8 rounded-full shadow-md`,onClick:()=>c.current?.click(),children:(0,p.jsx)(f.Camera,{className:`h-4 w-4`})})]})]})}function h({field:e,value:n,onChange:r,isEditing:i}){if(!i)return(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.icon&&(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),(0,p.jsx)(`span`,{className:t.cn(!n&&`text-muted-foreground italic`),children:n||`Non renseigné`})]});let a={id:e.id,value:n||``,onChange:e=>r(e.target.value),placeholder:e.placeholder,disabled:e.disabled};return e.type===`textarea`?(0,p.jsx)(u.Textarea,{...a,rows:3}):e.type===`select`&&e.options?(0,p.jsxs)(s.Select,{value:n,onValueChange:r,disabled:e.disabled,children:[(0,p.jsx)(s.SelectTrigger,{children:(0,p.jsx)(s.SelectValue,{placeholder:e.placeholder||`Sélectionner...`})}),(0,p.jsx)(s.SelectContent,{children:e.options.map(e=>(0,p.jsx)(s.SelectItem,{value:e.value,children:e.label},e.value))})]}):(0,p.jsx)(o.Input,{type:e.type||`text`,...a})}function g({section:e,values:t,onChange:n,isEditing:r}){return(0,p.jsxs)(i.Card,{children:[(0,p.jsx)(i.CardHeader,{children:(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.icon&&(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(i.CardTitle,{className:`text-base`,children:e.title}),e.description&&(0,p.jsx)(i.CardDescription,{children:e.description})]})]})}),(0,p.jsx)(i.CardContent,{className:`space-y-4`,children:e.fields.map((i,o)=>(0,p.jsxs)(d.Fragment,{children:[(0,p.jsxs)(`div`,{className:`space-y-2`,children:[(0,p.jsxs)(a.Label,{htmlFor:i.id,className:`text-sm font-medium`,children:[i.label,i.required&&(0,p.jsx)(`span`,{className:`text-destructive ml-1`,children:`*`})]}),(0,p.jsx)(h,{field:i,value:t[i.id]||``,onChange:e=>n(i.id,e),isEditing:r})]}),o<e.fields.length-1&&r&&(0,p.jsx)(c.Separator,{className:`my-4`})]},i.id))})]})}function _({links:e,isEditing:t}){let n=e=>{switch(e){case`twitter`:return(0,p.jsx)(f.Share2,{className:`h-4 w-4`});case`github`:return(0,p.jsx)(f.Globe,{className:`h-4 w-4`});case`linkedin`:return(0,p.jsx)(f.ExternalLink,{className:`h-4 w-4`});case`website`:return(0,p.jsx)(f.Globe,{className:`h-4 w-4`});default:return(0,p.jsx)(f.Link,{className:`h-4 w-4`})}};return t?(0,p.jsx)(`div`,{className:`space-y-2`,children:e.map(e=>(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n(e.type),(0,p.jsx)(o.Input,{value:e.url,className:`flex-1`,readOnly:!0})]},e.id))}):(0,p.jsx)(`div`,{className:`flex gap-2 flex-wrap`,children:e.map(e=>(0,p.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted rounded-full text-sm hover:bg-muted/80 transition-colors`,children:[n(e.type),(0,p.jsx)(`span`,{children:e.label||e.type})]},e.id))})}function v({profile:e,editable:n=!1,isEditing:a,onEditToggle:o,onChange:s,onSave:u,saving:h=!1,onAvatarChange:v,customSections:y,showSocialLinks:b=!0,showStats:x=!1,stats:S,layout:C=`card`,useTabs:w=!1,className:T}){let[E,D]=d.useState(!1),[O,k]=d.useState(e),A=a??E;d.useEffect(()=>{k(e)},[e]);let j=t=>{o?o(t):D(t),t||k(e)},M=(e,t)=>{k(n=>({...n,[e]:t})),s?.(e,t)},N=async()=>{await u?.(O),j(!1)},P=[{id:`personal`,title:`Informations personnelles`,icon:(0,p.jsx)(f.User,{className:`h-5 w-5`}),fields:[{id:`firstName`,label:`Prénom`,value:O.firstName||``,type:`text`,placeholder:`Jean`,icon:(0,p.jsx)(f.User,{className:`h-4 w-4`})},{id:`lastName`,label:`Nom`,value:O.lastName||``,type:`text`,placeholder:`Dupont`},{id:`email`,label:`Email`,value:O.email,type:`email`,placeholder:`jean@exemple.com`,required:!0,icon:(0,p.jsx)(f.Mail,{className:`h-4 w-4`})},{id:`phone`,label:`Téléphone`,value:O.phone||``,type:`tel`,placeholder:`+33 6 12 34 56 78`,icon:(0,p.jsx)(f.Phone,{className:`h-4 w-4`})},{id:`bio`,label:`Bio`,value:O.bio||``,type:`textarea`,placeholder:`Parlez-nous de vous...`}]},{id:`professional`,title:`Informations professionnelles`,icon:(0,p.jsx)(f.Briefcase,{className:`h-5 w-5`}),fields:[{id:`role`,label:`Poste`,value:O.role||``,type:`text`,placeholder:`Développeur Senior`,icon:(0,p.jsx)(f.Briefcase,{className:`h-4 w-4`})},{id:`department`,label:`Département`,value:O.department||``,type:`text`,placeholder:`Engineering`},{id:`company`,label:`Entreprise`,value:O.company||``,type:`text`,placeholder:`Acme Inc.`,icon:(0,p.jsx)(f.Building,{className:`h-4 w-4`})},{id:`location`,label:`Localisation`,value:O.location||``,type:`text`,placeholder:`Paris, France`,icon:(0,p.jsx)(f.MapPin,{className:`h-4 w-4`})},{id:`website`,label:`Site web`,value:O.website||``,type:`url`,placeholder:`https://exemple.com`,icon:(0,p.jsx)(f.Globe,{className:`h-4 w-4`})}]}],F=y||P,I={firstName:O.firstName||``,lastName:O.lastName||``,email:O.email,phone:O.phone||``,bio:O.bio||``,role:O.role||``,department:O.department||``,company:O.company||``,location:O.location||``,website:O.website||``,...O.customFields};if(C===`compact`)return(0,p.jsxs)(`div`,{className:t.cn(`flex items-center gap-4`,T),children:[(0,p.jsx)(m,{url:O.avatarUrl,name:O.displayName,size:`md`}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`h3`,{className:`font-semibold`,children:O.displayName}),O.role&&(0,p.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:O.role}),O.email&&(0,p.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:O.email})]})]});let L=()=>(0,p.jsxs)(`div`,{className:`flex flex-col items-center text-center gap-4 md:flex-row md:text-left`,children:[(0,p.jsx)(m,{url:O.avatarUrl,name:O.displayName,size:`xl`,editable:n&&A,onAvatarChange:v}),(0,p.jsxs)(`div`,{className:`flex-1`,children:[(0,p.jsxs)(`div`,{className:`flex flex-col gap-2 md:flex-row md:items-start md:justify-between`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`h1`,{className:`text-2xl font-bold`,children:O.displayName}),O.role&&(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:O.role}),O.company&&(0,p.jsxs)(`p`,{className:`text-sm text-muted-foreground flex items-center gap-1`,children:[(0,p.jsx)(f.Building,{className:`h-3 w-3`}),O.company]}),O.location&&(0,p.jsxs)(`p`,{className:`text-sm text-muted-foreground flex items-center gap-1`,children:[(0,p.jsx)(f.MapPin,{className:`h-3 w-3`}),O.location]})]}),n&&(0,p.jsx)(`div`,{className:`flex gap-2`,children:A?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>j(!1),disabled:h,children:[(0,p.jsx)(f.X,{className:`mr-2 h-4 w-4`}),`Annuler`]}),(0,p.jsxs)(r.Button,{size:`sm`,onClick:N,disabled:h,children:[h?(0,p.jsx)(f.Loader2,{className:`mr-2 h-4 w-4 animate-spin`}):(0,p.jsx)(f.Save,{className:`mr-2 h-4 w-4`}),`Enregistrer`]})]}):(0,p.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>j(!0),children:[(0,p.jsx)(f.Edit3,{className:`mr-2 h-4 w-4`}),`Modifier`]})})]}),x&&S&&S.length>0&&(0,p.jsx)(`div`,{className:`flex gap-6 mt-4`,children:S.map((e,t)=>(0,p.jsxs)(`div`,{className:`text-center`,children:[(0,p.jsx)(`div`,{className:`text-2xl font-bold`,children:e.value}),(0,p.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label})]},t))}),b&&O.socialLinks&&O.socialLinks.length>0&&(0,p.jsx)(`div`,{className:`mt-4`,children:(0,p.jsx)(_,{links:O.socialLinks,isEditing:A})}),O.joinedAt&&(0,p.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-4 flex items-center gap-1`,children:[(0,p.jsx)(f.Calendar,{className:`h-3 w-3`}),`Membre depuis`,` `,new Date(O.joinedAt).toLocaleDateString(`fr-FR`,{month:`long`,year:`numeric`})]})]})]}),R=()=>(0,p.jsx)(`div`,{className:`space-y-6`,children:F.map(e=>(0,p.jsx)(g,{section:e,values:I,onChange:M,isEditing:A},e.id))});return C===`card`?(0,p.jsx)(i.Card,{className:T,children:(0,p.jsx)(i.CardContent,{className:`pt-6`,children:(0,p.jsxs)(`div`,{className:`space-y-6`,children:[L(),(0,p.jsx)(c.Separator,{}),R()]})})}):(0,p.jsxs)(`div`,{className:t.cn(`space-y-6`,T),children:[L(),w?(0,p.jsxs)(l.Tabs,{defaultValue:F[0]?.id,className:`space-y-6`,children:[(0,p.jsx)(l.TabsList,{children:F.map(e=>(0,p.jsxs)(l.TabsTrigger,{value:e.id,className:`gap-2`,children:[e.icon,e.title]},e.id))}),F.map(e=>(0,p.jsx)(l.TabsContent,{value:e.id,children:(0,p.jsx)(g,{section:e,values:I,onChange:M,isEditing:A})},e.id))]}):R()]})}var y={displayName:`Jean Dupont`,firstName:`Jean`,lastName:`Dupont`,email:`jean.dupont@exemple.com`,phone:`+33 6 12 34 56 78`,bio:`Développeur passionné avec plus de 10 ans d'expérience dans le développement web et mobile.`,avatarUrl:``,role:`Lead Developer`,department:`Engineering`,company:`Acme Inc.`,location:`Paris, France`,website:`https://jeandupont.dev`,joinedAt:new Date(`2023-01-15`),socialLinks:[{id:`1`,type:`twitter`,url:`https://twitter.com/jeandupont`,label:`@jeandupont`},{id:`2`,type:`github`,url:`https://github.com/jeandupont`,label:`jeandupont`},{id:`3`,type:`linkedin`,url:`https://linkedin.com/in/jeandupont`,label:`Jean Dupont`}]};exports.default=v,exports.defaultProfileData=y;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/avatar/index.cjs.js"),r=require("../../components/button/index.cjs.js"),i=require("../../components/card/index.cjs.js"),a=require("../../components/label/index.cjs.js"),o=require("../../components/input/index.cjs.js"),s=require("../../components/select/index.cjs.js"),c=require("../../components/separator/index.cjs.js"),l=require("../../components/tabs/index.cjs.js"),u=require("../../components/textarea/index.cjs.js");let d=require("react");d=e.__toESM(d);let f=require("lucide-react"),p=require("react/jsx-runtime");function m({url:e,name:i,size:a=`lg`,editable:o,onAvatarChange:s}){let c=d.useRef(null),l={sm:`h-12 w-12`,md:`h-16 w-16`,lg:`h-24 w-24`,xl:`h-32 w-32`},u=i.split(` `).map(e=>e[0]).join(``).toUpperCase().slice(0,2);return(0,p.jsxs)(`div`,{className:`relative inline-block`,children:[(0,p.jsxs)(n.Avatar,{className:t.cn(l[a],`border-4 border-background shadow-lg`),children:[(0,p.jsx)(n.AvatarImage,{src:e,alt:i}),(0,p.jsx)(n.AvatarFallback,{className:`text-lg font-medium`,children:u})]}),o&&s&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`input`,{ref:c,type:`file`,accept:`image/*`,onChange:e=>{let t=e.target.files?.[0];t&&s&&s(t)},className:`hidden`}),(0,p.jsx)(r.Button,{size:`icon`,variant:`secondary`,className:`absolute bottom-0 right-0 h-8 w-8 rounded-full shadow-md`,onClick:()=>c.current?.click(),children:(0,p.jsx)(f.Camera,{className:`h-4 w-4`})})]})]})}function h({field:e,value:n,onChange:r,isEditing:i}){if(!i)return(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.icon&&(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),(0,p.jsx)(`span`,{className:t.cn(!n&&`text-muted-foreground italic`),children:n||`Non renseigné`})]});let a={id:e.id,value:n||``,onChange:e=>r(e.target.value),placeholder:e.placeholder,disabled:e.disabled};return e.type===`textarea`?(0,p.jsx)(u.Textarea,{...a,rows:3}):e.type===`select`&&e.options?(0,p.jsxs)(s.Select,{value:n,onValueChange:r,disabled:e.disabled,children:[(0,p.jsx)(s.SelectTrigger,{children:(0,p.jsx)(s.SelectValue,{placeholder:e.placeholder||`Sélectionner...`})}),(0,p.jsx)(s.SelectContent,{children:e.options.map(e=>(0,p.jsx)(s.SelectItem,{value:e.value,children:e.label},e.value))})]}):(0,p.jsx)(o.Input,{type:e.type||`text`,...a})}function g({section:e,values:t,onChange:n,isEditing:r}){return(0,p.jsxs)(i.Card,{children:[(0,p.jsx)(i.CardHeader,{children:(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.icon&&(0,p.jsx)(`span`,{className:`text-muted-foreground`,children:e.icon}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(i.CardTitle,{className:`text-base`,children:e.title}),e.description&&(0,p.jsx)(i.CardDescription,{children:e.description})]})]})}),(0,p.jsx)(i.CardContent,{className:`space-y-4`,children:e.fields.map((i,o)=>(0,p.jsxs)(d.Fragment,{children:[(0,p.jsxs)(`div`,{className:`space-y-2`,children:[(0,p.jsxs)(a.Label,{htmlFor:i.id,className:`text-sm font-medium`,children:[i.label,i.required&&(0,p.jsx)(`span`,{className:`text-destructive ml-1`,children:`*`})]}),(0,p.jsx)(h,{field:i,value:t[i.id]||``,onChange:e=>n(i.id,e),isEditing:r})]}),o<e.fields.length-1&&r&&(0,p.jsx)(c.Separator,{className:`my-4`})]},i.id))})]})}function _({links:e,isEditing:t}){let n=e=>{switch(e){case`twitter`:return(0,p.jsx)(f.Share2,{className:`h-4 w-4`});case`github`:return(0,p.jsx)(f.Globe,{className:`h-4 w-4`});case`linkedin`:return(0,p.jsx)(f.ExternalLink,{className:`h-4 w-4`});case`website`:return(0,p.jsx)(f.Globe,{className:`h-4 w-4`});default:return(0,p.jsx)(f.Link,{className:`h-4 w-4`})}};return t?(0,p.jsx)(`div`,{className:`space-y-2`,children:e.map(e=>(0,p.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n(e.type),(0,p.jsx)(o.Input,{value:e.url,className:`flex-1`,readOnly:!0})]},e.id))}):(0,p.jsx)(`div`,{className:`flex gap-2 flex-wrap`,children:e.map(e=>(0,p.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 px-3 py-1.5 bg-muted rounded-full text-sm hover:bg-muted/80 transition-colors`,children:[n(e.type),(0,p.jsx)(`span`,{children:e.label||e.type})]},e.id))})}function v({profile:e,editable:n=!1,isEditing:a,onEditToggle:o,onChange:s,onSave:u,saving:h=!1,onAvatarChange:v,customSections:y,showSocialLinks:b=!0,showStats:x=!1,stats:S,layout:C=`card`,useTabs:w=!1,className:T}){let[E,D]=d.useState(!1),[O,k]=d.useState(e),A=a??E;d.useEffect(()=>{k(e)},[e]);let j=t=>{o?o(t):D(t),t||k(e)},M=(e,t)=>{k(n=>({...n,[e]:t})),s?.(e,t)},N=async()=>{await u?.(O),j(!1)},P=[{id:`personal`,title:`Informations personnelles`,icon:(0,p.jsx)(f.User,{className:`h-5 w-5`}),fields:[{id:`firstName`,label:`Prénom`,value:O.firstName||``,type:`text`,placeholder:`Jean`,icon:(0,p.jsx)(f.User,{className:`h-4 w-4`})},{id:`lastName`,label:`Nom`,value:O.lastName||``,type:`text`,placeholder:`Dupont`},{id:`email`,label:`Email`,value:O.email,type:`email`,placeholder:`jean@exemple.com`,required:!0,icon:(0,p.jsx)(f.Mail,{className:`h-4 w-4`})},{id:`phone`,label:`Téléphone`,value:O.phone||``,type:`tel`,placeholder:`+33 6 12 34 56 78`,icon:(0,p.jsx)(f.Phone,{className:`h-4 w-4`})},{id:`bio`,label:`Bio`,value:O.bio||``,type:`textarea`,placeholder:`Parlez-nous de vous...`}]},{id:`professional`,title:`Informations professionnelles`,icon:(0,p.jsx)(f.Briefcase,{className:`h-5 w-5`}),fields:[{id:`role`,label:`Poste`,value:O.role||``,type:`text`,placeholder:`Développeur Senior`,icon:(0,p.jsx)(f.Briefcase,{className:`h-4 w-4`})},{id:`department`,label:`Département`,value:O.department||``,type:`text`,placeholder:`Engineering`},{id:`company`,label:`Entreprise`,value:O.company||``,type:`text`,placeholder:`Acme Inc.`,icon:(0,p.jsx)(f.Building,{className:`h-4 w-4`})},{id:`location`,label:`Localisation`,value:O.location||``,type:`text`,placeholder:`Paris, France`,icon:(0,p.jsx)(f.MapPin,{className:`h-4 w-4`})},{id:`website`,label:`Site web`,value:O.website||``,type:`url`,placeholder:`https://exemple.com`,icon:(0,p.jsx)(f.Globe,{className:`h-4 w-4`})}]}],F=y||P,I={firstName:O.firstName||``,lastName:O.lastName||``,email:O.email,phone:O.phone||``,bio:O.bio||``,role:O.role||``,department:O.department||``,company:O.company||``,location:O.location||``,website:O.website||``,...O.customFields};if(C===`compact`)return(0,p.jsxs)(`div`,{className:t.cn(`flex items-center gap-4`,T),children:[(0,p.jsx)(m,{url:O.avatarUrl,name:O.displayName,size:`md`}),(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`h3`,{className:`font-semibold`,children:O.displayName}),O.role&&(0,p.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:O.role}),O.email&&(0,p.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:O.email})]})]});let L=()=>(0,p.jsxs)(`div`,{className:`flex flex-col items-center text-center gap-4 md:flex-row md:text-left`,children:[(0,p.jsx)(m,{url:O.avatarUrl,name:O.displayName,size:`xl`,editable:n&&A,onAvatarChange:v}),(0,p.jsxs)(`div`,{className:`flex-1`,children:[(0,p.jsxs)(`div`,{className:`flex flex-col gap-2 md:flex-row md:items-start md:justify-between`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`h1`,{className:`text-2xl font-bold`,children:O.displayName}),O.role&&(0,p.jsx)(`p`,{className:`text-muted-foreground`,children:O.role}),O.company&&(0,p.jsxs)(`p`,{className:`text-sm text-muted-foreground flex items-center gap-1`,children:[(0,p.jsx)(f.Building,{className:`h-3 w-3`}),O.company]}),O.location&&(0,p.jsxs)(`p`,{className:`text-sm text-muted-foreground flex items-center gap-1`,children:[(0,p.jsx)(f.MapPin,{className:`h-3 w-3`}),O.location]})]}),n&&(0,p.jsx)(`div`,{className:`flex gap-2`,children:A?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>j(!1),disabled:h,children:[(0,p.jsx)(f.X,{className:`mr-2 h-4 w-4`}),`Annuler`]}),(0,p.jsxs)(r.Button,{size:`sm`,onClick:N,disabled:h,children:[h?(0,p.jsx)(f.Loader2,{className:`mr-2 h-4 w-4 animate-spin`}):(0,p.jsx)(f.Save,{className:`mr-2 h-4 w-4`}),`Enregistrer`]})]}):(0,p.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>j(!0),children:[(0,p.jsx)(f.Edit3,{className:`mr-2 h-4 w-4`}),`Modifier`]})})]}),x&&S&&S.length>0&&(0,p.jsx)(`div`,{className:`flex gap-6 mt-4`,children:S.map((e,t)=>(0,p.jsxs)(`div`,{className:`text-center`,children:[(0,p.jsx)(`div`,{className:`text-2xl font-bold`,children:e.value}),(0,p.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label})]},t))}),b&&O.socialLinks&&O.socialLinks.length>0&&(0,p.jsx)(`div`,{className:`mt-4`,children:(0,p.jsx)(_,{links:O.socialLinks,isEditing:A})}),O.joinedAt&&(0,p.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-4 flex items-center gap-1`,children:[(0,p.jsx)(f.Calendar,{className:`h-3 w-3`}),`Membre depuis`,` `,new Date(O.joinedAt).toLocaleDateString(`fr-FR`,{month:`long`,year:`numeric`})]})]})]}),R=()=>(0,p.jsx)(`div`,{className:`space-y-6`,children:F.map(e=>(0,p.jsx)(g,{section:e,values:I,onChange:M,isEditing:A},e.id))});return C===`card`?(0,p.jsx)(i.Card,{className:T,children:(0,p.jsx)(i.CardContent,{className:`pt-6`,children:(0,p.jsxs)(`div`,{className:`space-y-6`,children:[L(),(0,p.jsx)(c.Separator,{}),R()]})})}):(0,p.jsxs)(`div`,{className:t.cn(`space-y-6`,T),children:[L(),w?(0,p.jsxs)(l.Tabs,{defaultValue:F[0]?.id,className:`space-y-6`,children:[(0,p.jsx)(l.TabsList,{children:F.map(e=>(0,p.jsxs)(l.TabsTrigger,{value:e.id,className:`gap-2`,children:[e.icon,e.title]},e.id))}),F.map(e=>(0,p.jsx)(l.TabsContent,{value:e.id,children:(0,p.jsx)(g,{section:e,values:I,onChange:M,isEditing:A})},e.id))]}):R()]})}var y={displayName:`Jean Dupont`,firstName:`Jean`,lastName:`Dupont`,email:`jean.dupont@exemple.com`,phone:`+33 6 12 34 56 78`,bio:`Développeur passionné avec plus de 10 ans d'expérience dans le développement web et mobile.`,avatarUrl:``,role:`Lead Developer`,department:`Engineering`,company:`Acme Inc.`,location:`Paris, France`,website:`https://jeandupont.dev`,joinedAt:new Date(`2023-01-15`),socialLinks:[{id:`1`,type:`twitter`,url:`https://twitter.com/jeandupont`,label:`@jeandupont`},{id:`2`,type:`github`,url:`https://github.com/jeandupont`,label:`jeandupont`},{id:`3`,type:`linkedin`,url:`https://linkedin.com/in/jeandupont`,label:`Jean Dupont`}]};exports.WakaProfile=v,exports.default=v,exports.defaultProfileData=y;
@@ -447,4 +447,4 @@ var J = {
447
447
  ]
448
448
  };
449
449
  //#endregion
450
- export { q as default, J as defaultProfileData };
450
+ export { q as WakaProfile, q as default, J as defaultProfileData };
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/avatar/index.cjs.js`),r=require(`../../components/badge/index.cjs.js`),i=require(`../../components/skeleton/index.cjs.js`);let a=require(`react`);a=e.__toESM(a);let o=require(`react/jsx-runtime`);function s(e){let t=e.displayName.trim().split(/\s+/);return((t[0]?.[0]??``)+(t[1]?.[0]??``)).toUpperCase()||`?`}function c({profiles:e,layout:n=`grid`,onProfileClick:r,renderActions:a,emptyState:s,isLoading:c,className:u}){return c?(0,o.jsx)(`div`,{className:t.cn(n===`grid`?`grid gap-4 grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4`:`flex flex-col gap-2`,u),children:Array.from({length:6}).map((e,t)=>(0,o.jsx)(i.Skeleton,{"data-skeleton":``,className:`h-32 rounded-lg`},t))}):e.length===0?(0,o.jsx)(`div`,{className:t.cn(`p-12 text-center text-sm text-muted-foreground`,u),children:s??`Aucun profil à afficher`}):n===`list`?(0,o.jsx)(`div`,{className:t.cn(`flex flex-col gap-2`,u),children:e.map(e=>(0,o.jsx)(d,{profile:e,onClick:r,renderActions:a},e.id))}):(0,o.jsx)(`div`,{className:t.cn(`grid gap-4 grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4`,u),children:e.map(e=>(0,o.jsx)(l,{profile:e,onClick:r,renderActions:a},e.id))})}function l({profile:e,onClick:n,renderActions:r}){return n?(0,o.jsx)(`button`,{type:`button`,onClick:()=>n(e),className:t.cn(`flex flex-col items-center gap-2 rounded-lg border bg-card p-4 text-center`,`hover:bg-accent transition-colors`),"aria-label":e.displayName,children:(0,o.jsx)(u,{profile:e,renderActions:r})}):(0,o.jsx)(`div`,{className:`flex flex-col items-center gap-2 rounded-lg border bg-card p-4 text-center`,children:(0,o.jsx)(u,{profile:e,renderActions:r})})}function u({profile:e,renderActions:t}){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.Avatar,{className:`size-14`,children:[e.avatarUrl&&(0,o.jsx)(n.AvatarImage,{src:e.avatarUrl,alt:``}),(0,o.jsx)(n.AvatarFallback,{children:s(e)})]}),(0,o.jsxs)(`div`,{className:`text-center w-full`,children:[(0,o.jsx)(`div`,{className:`font-medium truncate`,children:e.displayName}),e.title&&(0,o.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:e.title}),e.email&&(0,o.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:e.email})]}),e.badges&&e.badges.length>0&&(0,o.jsx)(`div`,{className:`flex flex-wrap gap-1 justify-center`,children:e.badges.map((e,t)=>(0,o.jsx)(r.Badge,{variant:e.variant??`default`,children:e.label},t))}),t&&(0,o.jsx)(`div`,{className:`mt-2`,children:t(e)})]})}function d({profile:e,onClick:n,renderActions:r}){return n?(0,o.jsx)(`button`,{type:`button`,onClick:()=>n(e),className:t.cn(`flex items-center gap-3 rounded-md border bg-card p-3 w-full text-left`,`hover:bg-accent transition-colors`),"aria-label":e.displayName,children:(0,o.jsx)(f,{profile:e,renderActions:r})}):(0,o.jsx)(`div`,{className:`flex items-center gap-3 rounded-md border bg-card p-3 w-full text-left`,children:(0,o.jsx)(f,{profile:e,renderActions:r})})}function f({profile:e,renderActions:t}){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.Avatar,{className:`size-10 shrink-0`,children:[e.avatarUrl&&(0,o.jsx)(n.AvatarImage,{src:e.avatarUrl,alt:``}),(0,o.jsx)(n.AvatarFallback,{children:s(e)})]}),(0,o.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,o.jsx)(`div`,{className:`font-medium truncate`,children:e.displayName}),(0,o.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:[e.title,e.email].filter(Boolean).join(` • `)})]}),e.badges&&e.badges.length>0&&(0,o.jsx)(`div`,{className:`hidden sm:flex gap-1`,children:e.badges.map((e,t)=>(0,o.jsx)(r.Badge,{variant:e.variant??`default`,children:e.label},t))}),t&&(0,o.jsx)(`div`,{className:`ml-2`,children:t(e)})]})}exports.WakaProfileList=c;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/avatar/index.cjs.js"),r=require("../../components/badge/index.cjs.js"),i=require("../../components/skeleton/index.cjs.js");let a=require("react");a=e.__toESM(a);let o=require("react/jsx-runtime");function s(e){let t=e.displayName.trim().split(/\s+/);return((t[0]?.[0]??``)+(t[1]?.[0]??``)).toUpperCase()||`?`}function c({profiles:e,layout:n=`grid`,onProfileClick:r,renderActions:a,emptyState:s,isLoading:c,className:u}){return c?(0,o.jsx)(`div`,{className:t.cn(n===`grid`?`grid gap-4 grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4`:`flex flex-col gap-2`,u),children:Array.from({length:6}).map((e,t)=>(0,o.jsx)(i.Skeleton,{"data-skeleton":``,className:`h-32 rounded-lg`},t))}):e.length===0?(0,o.jsx)(`div`,{className:t.cn(`p-12 text-center text-sm text-muted-foreground`,u),children:s??`Aucun profil à afficher`}):n===`list`?(0,o.jsx)(`div`,{className:t.cn(`flex flex-col gap-2`,u),children:e.map(e=>(0,o.jsx)(d,{profile:e,onClick:r,renderActions:a},e.id))}):(0,o.jsx)(`div`,{className:t.cn(`grid gap-4 grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4`,u),children:e.map(e=>(0,o.jsx)(l,{profile:e,onClick:r,renderActions:a},e.id))})}function l({profile:e,onClick:n,renderActions:r}){return n?(0,o.jsx)(`button`,{type:`button`,onClick:()=>n(e),className:t.cn(`flex flex-col items-center gap-2 rounded-lg border bg-card p-4 text-center`,`hover:bg-accent transition-colors`),"aria-label":e.displayName,children:(0,o.jsx)(u,{profile:e,renderActions:r})}):(0,o.jsx)(`div`,{className:`flex flex-col items-center gap-2 rounded-lg border bg-card p-4 text-center`,children:(0,o.jsx)(u,{profile:e,renderActions:r})})}function u({profile:e,renderActions:t}){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.Avatar,{className:`size-14`,children:[e.avatarUrl&&(0,o.jsx)(n.AvatarImage,{src:e.avatarUrl,alt:``}),(0,o.jsx)(n.AvatarFallback,{children:s(e)})]}),(0,o.jsxs)(`div`,{className:`text-center w-full`,children:[(0,o.jsx)(`div`,{className:`font-medium truncate`,children:e.displayName}),e.title&&(0,o.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:e.title}),e.email&&(0,o.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:e.email})]}),e.badges&&e.badges.length>0&&(0,o.jsx)(`div`,{className:`flex flex-wrap gap-1 justify-center`,children:e.badges.map((e,t)=>(0,o.jsx)(r.Badge,{variant:e.variant??`default`,children:e.label},t))}),t&&(0,o.jsx)(`div`,{className:`mt-2`,children:t(e)})]})}function d({profile:e,onClick:n,renderActions:r}){return n?(0,o.jsx)(`button`,{type:`button`,onClick:()=>n(e),className:t.cn(`flex items-center gap-3 rounded-md border bg-card p-3 w-full text-left`,`hover:bg-accent transition-colors`),"aria-label":e.displayName,children:(0,o.jsx)(f,{profile:e,renderActions:r})}):(0,o.jsx)(`div`,{className:`flex items-center gap-3 rounded-md border bg-card p-3 w-full text-left`,children:(0,o.jsx)(f,{profile:e,renderActions:r})})}function f({profile:e,renderActions:t}){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.Avatar,{className:`size-10 shrink-0`,children:[e.avatarUrl&&(0,o.jsx)(n.AvatarImage,{src:e.avatarUrl,alt:``}),(0,o.jsx)(n.AvatarFallback,{children:s(e)})]}),(0,o.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,o.jsx)(`div`,{className:`font-medium truncate`,children:e.displayName}),(0,o.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:[e.title,e.email].filter(Boolean).join(` • `)})]}),e.badges&&e.badges.length>0&&(0,o.jsx)(`div`,{className:`hidden sm:flex gap-1`,children:e.badges.map((e,t)=>(0,o.jsx)(r.Badge,{variant:e.variant??`default`,children:e.label},t))}),t&&(0,o.jsx)(`div`,{className:`ml-2`,children:t(e)})]})}exports.WakaProfileList=c;
@@ -1 +1 @@
1
- "use client";"use client";const e=require(`../../_virtual/_rolldown/runtime.cjs.js`),t=require(`../../utils/cn.cjs.js`),n=require(`../../components/badge/index.cjs.js`),r=require(`../../components/button/index.cjs.js`),i=require(`../../components/card/index.cjs.js`),a=require(`../../components/dialog/index.cjs.js`),o=require(`../../components/input/index.cjs.js`),s=require(`../../components/select/index.cjs.js`),c=require(`../../components/scroll-area/index.cjs.js`);let l=require(`react`);l=e.__toESM(l);let u=require(`lucide-react`),d=require(`react/jsx-runtime`);var f={critical:{label:`Critique`,color:`bg-red-500/10 text-red-700 dark:text-red-400 border-red-500/20`},high:{label:`Élevée`,color:`bg-orange-500/10 text-orange-700 dark:text-orange-400 border-orange-500/20`},medium:{label:`Moyenne`,color:`bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 border-yellow-500/20`},low:{label:`Faible`,color:`bg-blue-500/10 text-blue-700 dark:text-blue-400 border-blue-500/20`}},p=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`,m=e=>new Intl.DateTimeFormat(`fr-FR`,{dateStyle:`short`,timeStyle:`short`}).format(e),h=({files:e=[],totalCount:h=0,onDelete:g,onRestore:_,onRescan:v,onPurgeAll:y,onDownloadReport:b,className:x})=>{let[S,C]=l.useState(``),[w,T]=l.useState(`all`),[E,D]=l.useState(`all`),[O,k]=l.useState(!1),[A,j]=l.useState(!1),[M,N]=l.useState(!1),[P,F]=l.useState(null),I=l.useMemo(()=>{let t=e;if(S){let e=S.toLowerCase();t=t.filter(t=>t.originalName.toLowerCase().includes(e)||t.threatName.toLowerCase().includes(e)||t.originalPath.toLowerCase().includes(e))}if(w!==`all`&&(t=t.filter(e=>e.severity===w)),E!==`all`){let e=new Date,n=new Date;switch(E){case`today`:n.setHours(0,0,0,0);break;case`week`:n.setDate(e.getDate()-7);break;case`month`:n.setMonth(e.getMonth()-1);break}E!==`all`&&(t=t.filter(e=>new Date(e.quarantinedAt)>=n))}return t},[e,S,w,E]),L=l.useMemo(()=>{let t={critical:0,high:0,medium:0,low:0};return e.forEach(e=>{t[e.severity]++}),t},[e]),R=e=>{F(e),k(!0)},z=e=>{F(e),j(!0)};return(0,d.jsxs)(`div`,{className:t.cn(`space-y-6`,x),children:[(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsxs)(`div`,{className:`space-y-1`,children:[(0,d.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:`Quarantaine`}),(0,d.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[h||e.length,` fichier`,(h||e.length)>1?`s`:``,` en quarantaine`]})]}),(0,d.jsxs)(r.Button,{variant:`destructive`,onClick:()=>N(!0),disabled:e.length===0,children:[(0,d.jsx)(u.Trash2,{className:`mr-2 h-4 w-4`}),`Vider la quarantaine`]})]}),(0,d.jsx)(`div`,{className:`grid gap-4 md:grid-cols-4`,children:[`critical`,`high`,`medium`,`low`].map(e=>(0,d.jsx)(i.Card,{className:`p-4`,children:(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:f[e].label}),(0,d.jsx)(`p`,{className:`text-2xl font-bold`,children:L[e]})]}),(0,d.jsx)(u.AlertTriangle,{className:t.cn(`h-5 w-5`,e===`critical`&&`text-red-500`,e===`high`&&`text-orange-500`,e===`medium`&&`text-yellow-500`,e===`low`&&`text-blue-500`)})]})},e))}),(0,d.jsx)(i.Card,{className:`p-4`,children:(0,d.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[(0,d.jsxs)(`div`,{className:`relative`,children:[(0,d.jsx)(u.Search,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`}),(0,d.jsx)(o.Input,{placeholder:`Rechercher par nom, menace ou chemin...`,value:S,onChange:e=>C(e.target.value),className:`pl-9`})]}),(0,d.jsxs)(s.Select,{value:w,onValueChange:e=>T(e),children:[(0,d.jsx)(`option`,{value:`all`,children:`Toutes les sévérités`}),(0,d.jsx)(`option`,{value:`critical`,children:`Critique`}),(0,d.jsx)(`option`,{value:`high`,children:`Élevée`}),(0,d.jsx)(`option`,{value:`medium`,children:`Moyenne`}),(0,d.jsx)(`option`,{value:`low`,children:`Faible`})]}),(0,d.jsxs)(s.Select,{value:E,onValueChange:D,children:[(0,d.jsx)(`option`,{value:`all`,children:`Toutes les dates`}),(0,d.jsx)(`option`,{value:`today`,children:`Aujourd'hui`}),(0,d.jsx)(`option`,{value:`week`,children:`7 derniers jours`}),(0,d.jsx)(`option`,{value:`month`,children:`30 derniers jours`})]})]})}),(0,d.jsx)(i.Card,{children:(0,d.jsx)(c.ScrollArea,{className:`h-[600px]`,children:(0,d.jsx)(`div`,{className:`p-4`,children:I.length===0?(0,d.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-center`,children:[(0,d.jsx)(u.AlertTriangle,{className:`mb-4 h-12 w-12 text-muted-foreground`}),(0,d.jsx)(`h3`,{className:`mb-1 text-lg font-semibold`,children:`Aucun fichier trouvé`}),(0,d.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.length===0?`La quarantaine est vide`:`Aucun fichier ne correspond aux filtres`})]}):(0,d.jsx)(`div`,{className:`space-y-4`,children:I.map(e=>(0,d.jsx)(i.Card,{className:`p-4`,children:(0,d.jsxs)(`div`,{className:`space-y-3`,children:[(0,d.jsx)(`div`,{className:`flex items-start justify-between`,children:(0,d.jsxs)(`div`,{className:`flex-1 space-y-1`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,d.jsx)(`h4`,{className:`font-medium`,children:e.originalName}),(0,d.jsx)(n.Badge,{className:f[e.severity].color,children:f[e.severity].label})]}),(0,d.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.originalPath})]})}),(0,d.jsxs)(`div`,{className:`grid gap-3 text-sm md:grid-cols-2`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Menace détectée:`}),` `,(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:e.threatName})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Date quarantaine:`}),` `,(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:m(e.quarantinedAt)})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Taille:`}),` `,(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:p(e.fileSize)})]}),e.uploadedBy&&(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Uploadé par:`}),` `,(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:e.uploadedBy})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Hash:`}),` `,(0,d.jsxs)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:[e.fileHash.substring(0,16),`...`]})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Moteur:`}),` `,(0,d.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.scanEngine,` (`,e.signatureVersion,`)`]})]})]}),(0,d.jsxs)(`div`,{className:`flex gap-2 border-t pt-3`,children:[(0,d.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>v?.(e.id),children:[(0,d.jsx)(u.RefreshCw,{className:`mr-2 h-3 w-3`}),`Re-scanner`]}),(0,d.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>z(e),children:[(0,d.jsx)(u.RotateCcw,{className:`mr-2 h-3 w-3`}),`Restaurer`]}),(0,d.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>b?.(e.id),children:[(0,d.jsx)(u.Download,{className:`mr-2 h-3 w-3`}),`Rapport`]}),(0,d.jsxs)(r.Button,{variant:`destructive`,size:`sm`,onClick:()=>R(e),children:[(0,d.jsx)(u.Trash2,{className:`mr-2 h-3 w-3`}),`Supprimer`]})]})]})},e.id))})})})}),(0,d.jsx)(a.Dialog,{open:O,onOpenChange:k,children:(0,d.jsxs)(a.DialogContent,{children:[(0,d.jsxs)(a.DialogHeader,{children:[(0,d.jsx)(a.DialogTitle,{children:`Supprimer définitivement`}),(0,d.jsxs)(a.DialogDescription,{children:[`Êtes-vous sûr de vouloir supprimer définitivement le fichier`,` `,(0,d.jsx)(`span`,{className:`font-medium`,children:P?.originalName}),` ?`,(0,d.jsx)(`br`,{}),`Cette action est irréversible.`]})]}),(0,d.jsxs)(a.DialogFooter,{children:[(0,d.jsx)(r.Button,{variant:`outline`,onClick:()=>k(!1),children:`Annuler`}),(0,d.jsx)(r.Button,{variant:`destructive`,onClick:()=>{P&&g&&g(P.id),k(!1),F(null)},children:`Supprimer`})]})]})}),(0,d.jsx)(a.Dialog,{open:A,onOpenChange:j,children:(0,d.jsxs)(a.DialogContent,{children:[(0,d.jsxs)(a.DialogHeader,{children:[(0,d.jsx)(a.DialogTitle,{children:`Restaurer le fichier`}),(0,d.jsxs)(a.DialogDescription,{children:[`Êtes-vous sûr de vouloir restaurer le fichier`,` `,(0,d.jsx)(`span`,{className:`font-medium`,children:P?.originalName}),` ?`,(0,d.jsx)(`br`,{}),`Le fichier sera replacé à son emplacement d'origine :`,` `,(0,d.jsx)(`span`,{className:`font-mono text-xs`,children:P?.originalPath})]})]}),(0,d.jsxs)(a.DialogFooter,{children:[(0,d.jsx)(r.Button,{variant:`outline`,onClick:()=>j(!1),children:`Annuler`}),(0,d.jsx)(r.Button,{onClick:()=>{P&&_&&_(P.id),j(!1),F(null)},children:`Restaurer`})]})]})}),(0,d.jsx)(a.Dialog,{open:M,onOpenChange:N,children:(0,d.jsxs)(a.DialogContent,{children:[(0,d.jsxs)(a.DialogHeader,{children:[(0,d.jsx)(a.DialogTitle,{children:`Vider la quarantaine`}),(0,d.jsxs)(a.DialogDescription,{children:[`Êtes-vous sûr de vouloir supprimer définitivement tous les fichiers en quarantaine ?`,(0,d.jsx)(`br`,{}),e.length,` fichier`,e.length>1?`s`:``,` ser`,e.length>1?`ont`:`a`,` `,`supprimé`,e.length>1?`s`:``,`. Cette action est irréversible.`]})]}),(0,d.jsxs)(a.DialogFooter,{children:[(0,d.jsx)(r.Button,{variant:`outline`,onClick:()=>N(!1),children:`Annuler`}),(0,d.jsx)(r.Button,{variant:`destructive`,onClick:()=>{y&&y(),N(!1)},children:`Vider la quarantaine`})]})]})})]})};exports.default=h;
1
+ "use client";"use client";const e=require("../../_virtual/_rolldown/runtime.cjs.js"),t=require("../../utils/cn.cjs.js"),n=require("../../components/badge/index.cjs.js"),r=require("../../components/button/index.cjs.js"),i=require("../../components/card/index.cjs.js"),a=require("../../components/dialog/index.cjs.js"),o=require("../../components/input/index.cjs.js"),s=require("../../components/select/index.cjs.js"),c=require("../../components/scroll-area/index.cjs.js");let l=require("react");l=e.__toESM(l);let u=require("lucide-react"),d=require("react/jsx-runtime");var f={critical:{label:`Critique`,color:`bg-red-500/10 text-red-700 dark:text-red-400 border-red-500/20`},high:{label:`Élevée`,color:`bg-orange-500/10 text-orange-700 dark:text-orange-400 border-orange-500/20`},medium:{label:`Moyenne`,color:`bg-yellow-500/10 text-yellow-700 dark:text-yellow-400 border-yellow-500/20`},low:{label:`Faible`,color:`bg-blue-500/10 text-blue-700 dark:text-blue-400 border-blue-500/20`}},p=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`,m=e=>new Intl.DateTimeFormat(`fr-FR`,{dateStyle:`short`,timeStyle:`short`}).format(e),h=({files:e=[],totalCount:h=0,onDelete:g,onRestore:_,onRescan:v,onPurgeAll:y,onDownloadReport:b,className:x})=>{let[S,C]=l.useState(``),[w,T]=l.useState(`all`),[E,D]=l.useState(`all`),[O,k]=l.useState(!1),[A,j]=l.useState(!1),[M,N]=l.useState(!1),[P,F]=l.useState(null),I=l.useMemo(()=>{let t=e;if(S){let e=S.toLowerCase();t=t.filter(t=>t.originalName.toLowerCase().includes(e)||t.threatName.toLowerCase().includes(e)||t.originalPath.toLowerCase().includes(e))}if(w!==`all`&&(t=t.filter(e=>e.severity===w)),E!==`all`){let e=new Date,n=new Date;switch(E){case`today`:n.setHours(0,0,0,0);break;case`week`:n.setDate(e.getDate()-7);break;case`month`:n.setMonth(e.getMonth()-1);break}E!==`all`&&(t=t.filter(e=>new Date(e.quarantinedAt)>=n))}return t},[e,S,w,E]),L=l.useMemo(()=>{let t={critical:0,high:0,medium:0,low:0};return e.forEach(e=>{t[e.severity]++}),t},[e]),R=e=>{F(e),k(!0)},z=e=>{F(e),j(!0)};return(0,d.jsxs)(`div`,{className:t.cn(`space-y-6`,x),children:[(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsxs)(`div`,{className:`space-y-1`,children:[(0,d.jsx)(`h2`,{className:`text-2xl font-semibold tracking-tight`,children:`Quarantaine`}),(0,d.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[h||e.length,` fichier`,(h||e.length)>1?`s`:``,` en quarantaine`]})]}),(0,d.jsxs)(r.Button,{variant:`destructive`,onClick:()=>N(!0),disabled:e.length===0,children:[(0,d.jsx)(u.Trash2,{className:`mr-2 h-4 w-4`}),`Vider la quarantaine`]})]}),(0,d.jsx)(`div`,{className:`grid gap-4 md:grid-cols-4`,children:[`critical`,`high`,`medium`,`low`].map(e=>(0,d.jsx)(i.Card,{className:`p-4`,children:(0,d.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:f[e].label}),(0,d.jsx)(`p`,{className:`text-2xl font-bold`,children:L[e]})]}),(0,d.jsx)(u.AlertTriangle,{className:t.cn(`h-5 w-5`,e===`critical`&&`text-red-500`,e===`high`&&`text-orange-500`,e===`medium`&&`text-yellow-500`,e===`low`&&`text-blue-500`)})]})},e))}),(0,d.jsx)(i.Card,{className:`p-4`,children:(0,d.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-3`,children:[(0,d.jsxs)(`div`,{className:`relative`,children:[(0,d.jsx)(u.Search,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`}),(0,d.jsx)(o.Input,{placeholder:`Rechercher par nom, menace ou chemin...`,value:S,onChange:e=>C(e.target.value),className:`pl-9`})]}),(0,d.jsxs)(s.Select,{value:w,onValueChange:e=>T(e),children:[(0,d.jsx)(`option`,{value:`all`,children:`Toutes les sévérités`}),(0,d.jsx)(`option`,{value:`critical`,children:`Critique`}),(0,d.jsx)(`option`,{value:`high`,children:`Élevée`}),(0,d.jsx)(`option`,{value:`medium`,children:`Moyenne`}),(0,d.jsx)(`option`,{value:`low`,children:`Faible`})]}),(0,d.jsxs)(s.Select,{value:E,onValueChange:D,children:[(0,d.jsx)(`option`,{value:`all`,children:`Toutes les dates`}),(0,d.jsx)(`option`,{value:`today`,children:`Aujourd'hui`}),(0,d.jsx)(`option`,{value:`week`,children:`7 derniers jours`}),(0,d.jsx)(`option`,{value:`month`,children:`30 derniers jours`})]})]})}),(0,d.jsx)(i.Card,{children:(0,d.jsx)(c.ScrollArea,{className:`h-[600px]`,children:(0,d.jsx)(`div`,{className:`p-4`,children:I.length===0?(0,d.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-center`,children:[(0,d.jsx)(u.AlertTriangle,{className:`mb-4 h-12 w-12 text-muted-foreground`}),(0,d.jsx)(`h3`,{className:`mb-1 text-lg font-semibold`,children:`Aucun fichier trouvé`}),(0,d.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.length===0?`La quarantaine est vide`:`Aucun fichier ne correspond aux filtres`})]}):(0,d.jsx)(`div`,{className:`space-y-4`,children:I.map(e=>(0,d.jsx)(i.Card,{className:`p-4`,children:(0,d.jsxs)(`div`,{className:`space-y-3`,children:[(0,d.jsx)(`div`,{className:`flex items-start justify-between`,children:(0,d.jsxs)(`div`,{className:`flex-1 space-y-1`,children:[(0,d.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,d.jsx)(`h4`,{className:`font-medium`,children:e.originalName}),(0,d.jsx)(n.Badge,{className:f[e.severity].color,children:f[e.severity].label})]}),(0,d.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.originalPath})]})}),(0,d.jsxs)(`div`,{className:`grid gap-3 text-sm md:grid-cols-2`,children:[(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Menace détectée:`}),` `,(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:e.threatName})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Date quarantaine:`}),` `,(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:m(e.quarantinedAt)})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Taille:`}),` `,(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:p(e.fileSize)})]}),e.uploadedBy&&(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Uploadé par:`}),` `,(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:e.uploadedBy})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Hash:`}),` `,(0,d.jsxs)(`span`,{className:`font-mono text-xs text-muted-foreground`,children:[e.fileHash.substring(0,16),`...`]})]}),(0,d.jsxs)(`div`,{children:[(0,d.jsx)(`span`,{className:`font-medium`,children:`Moteur:`}),` `,(0,d.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.scanEngine,` (`,e.signatureVersion,`)`]})]})]}),(0,d.jsxs)(`div`,{className:`flex gap-2 border-t pt-3`,children:[(0,d.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>v?.(e.id),children:[(0,d.jsx)(u.RefreshCw,{className:`mr-2 h-3 w-3`}),`Re-scanner`]}),(0,d.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>z(e),children:[(0,d.jsx)(u.RotateCcw,{className:`mr-2 h-3 w-3`}),`Restaurer`]}),(0,d.jsxs)(r.Button,{variant:`outline`,size:`sm`,onClick:()=>b?.(e.id),children:[(0,d.jsx)(u.Download,{className:`mr-2 h-3 w-3`}),`Rapport`]}),(0,d.jsxs)(r.Button,{variant:`destructive`,size:`sm`,onClick:()=>R(e),children:[(0,d.jsx)(u.Trash2,{className:`mr-2 h-3 w-3`}),`Supprimer`]})]})]})},e.id))})})})}),(0,d.jsx)(a.Dialog,{open:O,onOpenChange:k,children:(0,d.jsxs)(a.DialogContent,{children:[(0,d.jsxs)(a.DialogHeader,{children:[(0,d.jsx)(a.DialogTitle,{children:`Supprimer définitivement`}),(0,d.jsxs)(a.DialogDescription,{children:[`Êtes-vous sûr de vouloir supprimer définitivement le fichier`,` `,(0,d.jsx)(`span`,{className:`font-medium`,children:P?.originalName}),` ?`,(0,d.jsx)(`br`,{}),`Cette action est irréversible.`]})]}),(0,d.jsxs)(a.DialogFooter,{children:[(0,d.jsx)(r.Button,{variant:`outline`,onClick:()=>k(!1),children:`Annuler`}),(0,d.jsx)(r.Button,{variant:`destructive`,onClick:()=>{P&&g&&g(P.id),k(!1),F(null)},children:`Supprimer`})]})]})}),(0,d.jsx)(a.Dialog,{open:A,onOpenChange:j,children:(0,d.jsxs)(a.DialogContent,{children:[(0,d.jsxs)(a.DialogHeader,{children:[(0,d.jsx)(a.DialogTitle,{children:`Restaurer le fichier`}),(0,d.jsxs)(a.DialogDescription,{children:[`Êtes-vous sûr de vouloir restaurer le fichier`,` `,(0,d.jsx)(`span`,{className:`font-medium`,children:P?.originalName}),` ?`,(0,d.jsx)(`br`,{}),`Le fichier sera replacé à son emplacement d'origine :`,` `,(0,d.jsx)(`span`,{className:`font-mono text-xs`,children:P?.originalPath})]})]}),(0,d.jsxs)(a.DialogFooter,{children:[(0,d.jsx)(r.Button,{variant:`outline`,onClick:()=>j(!1),children:`Annuler`}),(0,d.jsx)(r.Button,{onClick:()=>{P&&_&&_(P.id),j(!1),F(null)},children:`Restaurer`})]})]})}),(0,d.jsx)(a.Dialog,{open:M,onOpenChange:N,children:(0,d.jsxs)(a.DialogContent,{children:[(0,d.jsxs)(a.DialogHeader,{children:[(0,d.jsx)(a.DialogTitle,{children:`Vider la quarantaine`}),(0,d.jsxs)(a.DialogDescription,{children:[`Êtes-vous sûr de vouloir supprimer définitivement tous les fichiers en quarantaine ?`,(0,d.jsx)(`br`,{}),e.length,` fichier`,e.length>1?`s`:``,` ser`,e.length>1?`ont`:`a`,` `,`supprimé`,e.length>1?`s`:``,`. Cette action est irréversible.`]})]}),(0,d.jsxs)(a.DialogFooter,{children:[(0,d.jsx)(r.Button,{variant:`outline`,onClick:()=>N(!1),children:`Annuler`}),(0,d.jsx)(r.Button,{variant:`destructive`,onClick:()=>{y&&y(),N(!1)},children:`Vider la quarantaine`})]})]})})]})};exports.QuarantineManager=h,exports.default=h;
@@ -426,4 +426,4 @@ var S = {
426
426
  });
427
427
  };
428
428
  //#endregion
429
- export { T as default };
429
+ export { T as QuarantineManager, T as default };