@wakastellar/ui 1.0.12 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/README.md +163 -193
  2. package/dist/charts.cjs.js +1 -0
  3. package/dist/charts.es.js +16 -0
  4. package/dist/cli/commands/add.d.ts +7 -0
  5. package/dist/cli/commands/init.d.ts +6 -0
  6. package/dist/cli/commands/list.d.ts +5 -0
  7. package/dist/cli/commands/search.d.ts +1 -0
  8. package/dist/cli/index.cjs +4844 -0
  9. package/dist/cli/index.d.ts +1 -0
  10. package/dist/cli/utils/config.d.ts +29 -0
  11. package/dist/cli/utils/logger.d.ts +20 -0
  12. package/dist/cli/utils/registry.d.ts +23 -0
  13. package/dist/cn-B-fTneHh.js +1 -0
  14. package/dist/cn-DzRe1GWm.mjs +21 -0
  15. package/dist/components/index.d.ts +122 -0
  16. package/dist/components/waka-3d-pie-chart/index.d.ts +67 -0
  17. package/dist/components/waka-achievement-unlock/index.d.ts +83 -0
  18. package/dist/components/waka-activity-feed/index.d.ts +78 -0
  19. package/dist/components/waka-address-autocomplete/index.d.ts +124 -0
  20. package/dist/components/waka-alert-stack/index.d.ts +58 -0
  21. package/dist/components/waka-allocation-matrix/index.d.ts +193 -0
  22. package/dist/components/waka-approval-chain/index.d.ts +43 -0
  23. package/dist/components/waka-audit-log/index.d.ts +142 -0
  24. package/dist/components/waka-badge-showcase/index.d.ts +51 -0
  25. package/dist/components/waka-biometric-prompt/index.d.ts +84 -0
  26. package/dist/components/waka-bottom-sheet/index.d.ts +61 -0
  27. package/dist/components/waka-breadcrumb-path/index.d.ts +46 -0
  28. package/dist/components/waka-budget-burn/index.d.ts +154 -0
  29. package/dist/components/waka-capacity-planner/index.d.ts +132 -0
  30. package/dist/components/waka-cart-summary/index.d.ts +154 -0
  31. package/dist/components/waka-challenge-timer/index.d.ts +86 -0
  32. package/dist/components/waka-chat-bubble/index.d.ts +127 -0
  33. package/dist/components/waka-checklist/index.d.ts +123 -0
  34. package/dist/components/waka-checkout-stepper/index.d.ts +154 -0
  35. package/dist/components/waka-cohort-table/index.d.ts +130 -0
  36. package/dist/components/waka-combo-counter/index.d.ts +53 -0
  37. package/dist/components/waka-command-bar/index.d.ts +45 -0
  38. package/dist/components/waka-compare-period/index.d.ts +122 -0
  39. package/dist/components/waka-connection-matrix/index.d.ts +117 -0
  40. package/dist/components/waka-contribution-graph/index.d.ts +34 -0
  41. package/dist/components/waka-cost-breakdown/index.d.ts +50 -0
  42. package/dist/components/waka-coupon-input/index.d.ts +105 -0
  43. package/dist/components/waka-credit-card-input/index.d.ts +95 -0
  44. package/dist/components/waka-daily-reward/index.d.ts +76 -0
  45. package/dist/components/waka-deployment-lane/index.d.ts +43 -0
  46. package/dist/components/waka-device-trust/index.d.ts +95 -0
  47. package/dist/components/waka-dock/index.d.ts +44 -0
  48. package/dist/components/waka-empty-state/index.d.ts +85 -0
  49. package/dist/components/waka-error-shake/index.d.ts +49 -0
  50. package/dist/components/waka-feature-announcement/index.d.ts +112 -0
  51. package/dist/components/waka-floating-nav/index.d.ts +51 -0
  52. package/dist/components/waka-flow-diagram/index.d.ts +71 -0
  53. package/dist/components/waka-funnel-chart/index.d.ts +108 -0
  54. package/dist/components/waka-glow-card/index.d.ts +32 -0
  55. package/dist/components/waka-goal-progress/index.d.ts +139 -0
  56. package/dist/components/waka-haptic-button/index.d.ts +45 -0
  57. package/dist/components/waka-health-pulse/index.d.ts +28 -0
  58. package/dist/components/waka-heatmap/index.d.ts +135 -0
  59. package/dist/components/waka-hotspot/index.d.ts +106 -0
  60. package/dist/components/waka-incident-timeline/index.d.ts +38 -0
  61. package/dist/components/waka-invoice-preview/index.d.ts +137 -0
  62. package/dist/components/waka-kpi-dashboard/index.d.ts +80 -0
  63. package/dist/components/waka-leaderboard/index.d.ts +85 -0
  64. package/dist/components/waka-level-progress/index.d.ts +89 -0
  65. package/dist/components/waka-liquid-button/index.d.ts +41 -0
  66. package/dist/components/waka-loading-orbit/index.d.ts +90 -0
  67. package/dist/components/waka-loot-box/index.d.ts +87 -0
  68. package/dist/components/waka-magic-link/index.d.ts +34 -0
  69. package/dist/components/waka-magnetic-button/index.d.ts +56 -0
  70. package/dist/components/waka-mention-input/index.d.ts +106 -0
  71. package/dist/components/waka-metric-sparkline/index.d.ts +46 -0
  72. package/dist/components/waka-milestone-road/index.d.ts +91 -0
  73. package/dist/components/waka-morph-button/index.d.ts +62 -0
  74. package/dist/components/waka-network-topology/index.d.ts +35 -0
  75. package/dist/components/waka-orbital-menu/index.d.ts +61 -0
  76. package/dist/components/waka-order-tracker/index.d.ts +121 -0
  77. package/dist/components/waka-password-strength/index.d.ts +98 -0
  78. package/dist/components/waka-payment-method-picker/index.d.ts +88 -0
  79. package/dist/components/waka-permission-matrix/index.d.ts +197 -0
  80. package/dist/components/waka-phone-input/index.d.ts +93 -0
  81. package/dist/components/waka-pipeline-view/index.d.ts +49 -0
  82. package/dist/components/waka-player-card/index.d.ts +36 -0
  83. package/dist/components/waka-points-popup/index.d.ts +75 -0
  84. package/dist/components/waka-power-up/index.d.ts +103 -0
  85. package/dist/components/waka-presence-indicator/index.d.ts +188 -0
  86. package/dist/components/waka-pricing-table/index.d.ts +77 -0
  87. package/dist/components/waka-product-card/index.d.ts +81 -0
  88. package/dist/components/waka-progress-onboarding/index.d.ts +97 -0
  89. package/dist/components/waka-pull-to-refresh/index.d.ts +45 -0
  90. package/dist/components/waka-quest-card/index.d.ts +110 -0
  91. package/dist/components/waka-quota-bar/index.d.ts +100 -0
  92. package/dist/components/waka-radar-score/index.d.ts +95 -0
  93. package/dist/components/waka-rank-badge/index.d.ts +58 -0
  94. package/dist/components/waka-rating-input/index.d.ts +110 -0
  95. package/dist/components/waka-reaction-picker/index.d.ts +77 -0
  96. package/dist/components/waka-region-map/index.d.ts +27 -0
  97. package/dist/components/waka-resource-gauge/index.d.ts +78 -0
  98. package/dist/components/waka-resource-pool/index.d.ts +81 -0
  99. package/dist/components/waka-rollback-slider/index.d.ts +79 -0
  100. package/dist/components/waka-sankey-diagram/index.d.ts +120 -0
  101. package/dist/components/waka-schedule-picker/index.d.ts +100 -0
  102. package/dist/components/waka-scratch-card/index.d.ts +87 -0
  103. package/dist/components/waka-season-pass/index.d.ts +65 -0
  104. package/dist/components/waka-security-score/index.d.ts +124 -0
  105. package/dist/components/waka-server-rack/index.d.ts +44 -0
  106. package/dist/components/waka-session-manager/index.d.ts +116 -0
  107. package/dist/components/waka-signature-pad/index.d.ts +87 -0
  108. package/dist/components/waka-skeleton-wave/index.d.ts +79 -0
  109. package/dist/components/waka-skill-tree/index.d.ts +78 -0
  110. package/dist/components/waka-sla-tracker/index.d.ts +65 -0
  111. package/dist/components/waka-slider-range/index.d.ts +88 -0
  112. package/dist/components/waka-spin-wheel/index.d.ts +51 -0
  113. package/dist/components/waka-spotlight/index.d.ts +47 -0
  114. package/dist/components/waka-stats-hexagon/index.d.ts +149 -0
  115. package/dist/components/waka-status-matrix/index.d.ts +38 -0
  116. package/dist/components/waka-streak-counter/index.d.ts +27 -0
  117. package/dist/components/waka-success-explosion/index.d.ts +51 -0
  118. package/dist/components/waka-swipe-card/index.d.ts +64 -0
  119. package/dist/components/waka-tabs-morph/index.d.ts +66 -0
  120. package/dist/components/waka-tag-input/index.d.ts +134 -0
  121. package/dist/components/waka-team-banner/index.d.ts +122 -0
  122. package/dist/components/waka-terminal-output/index.d.ts +48 -0
  123. package/dist/components/waka-thread-view/index.d.ts +101 -0
  124. package/dist/components/waka-tilt-card/index.d.ts +36 -0
  125. package/dist/components/waka-tooltip-tour/index.d.ts +118 -0
  126. package/dist/components/waka-tour-guide/index.d.ts +122 -0
  127. package/dist/components/waka-tournament-bracket/index.d.ts +101 -0
  128. package/dist/components/waka-treemap-chart/index.d.ts +104 -0
  129. package/dist/components/waka-two-factor-setup/index.d.ts +93 -0
  130. package/dist/components/waka-typewriter/index.d.ts +98 -0
  131. package/dist/components/waka-typing-indicator/index.d.ts +64 -0
  132. package/dist/components/waka-versus-card/index.d.ts +117 -0
  133. package/dist/components/waka-video-call/index.d.ts +170 -0
  134. package/dist/components/waka-voice-message/index.d.ts +117 -0
  135. package/dist/components/waka-welcome-modal/index.d.ts +120 -0
  136. package/dist/components/waka-xp-bar/index.d.ts +54 -0
  137. package/dist/export.cjs.js +1 -0
  138. package/dist/export.d.ts +3 -1
  139. package/dist/export.es.js +5 -0
  140. package/dist/index-B9GTFkji.js +1 -0
  141. package/dist/index-c0jcWyEL.mjs +466 -0
  142. package/dist/index.cjs.js +2530 -22
  143. package/dist/index.d.ts +1 -0
  144. package/dist/index.es.js +72081 -19512
  145. package/dist/rich-text.cjs.js +1 -0
  146. package/dist/rich-text.es.js +4 -0
  147. package/dist/types-BOWIoR7j.mjs +1111 -0
  148. package/dist/types-D2yCJ91P.js +1 -0
  149. package/dist/useDataTableImport-D8R2HQl6.mjs +229 -0
  150. package/dist/useDataTableImport-S_hhA5Wo.js +9 -0
  151. package/package.json +70 -22
  152. package/src/blocks/activity-timeline/index.tsx +586 -0
  153. package/src/blocks/calendar-view/index.tsx +756 -0
  154. package/src/blocks/chat/index.tsx +1018 -0
  155. package/src/blocks/chat/widget.tsx +504 -0
  156. package/src/blocks/dashboard/index.tsx +522 -0
  157. package/src/blocks/empty-states/index.tsx +452 -0
  158. package/src/blocks/error-pages/index.tsx +426 -0
  159. package/src/blocks/faq/index.tsx +479 -0
  160. package/src/blocks/file-manager/index.tsx +890 -0
  161. package/src/blocks/footer/index.tsx +133 -0
  162. package/src/blocks/header/index.tsx +357 -0
  163. package/src/blocks/headtab/index.tsx +139 -0
  164. package/src/blocks/i18n-editor/index.tsx +1016 -0
  165. package/src/blocks/index.ts +80 -0
  166. package/src/blocks/kanban-board/index.tsx +779 -0
  167. package/src/blocks/landing/index.tsx +677 -0
  168. package/src/blocks/language-selector/index.tsx +88 -0
  169. package/src/blocks/layout/index.tsx +159 -0
  170. package/src/blocks/login/index.tsx +339 -0
  171. package/src/blocks/login/types.ts +131 -0
  172. package/src/blocks/pricing/index.tsx +564 -0
  173. package/src/blocks/profile/index.tsx +746 -0
  174. package/src/blocks/settings/index.tsx +558 -0
  175. package/src/blocks/sidebar/index.tsx +713 -0
  176. package/src/blocks/theme-creator-block/index.tsx +835 -0
  177. package/src/blocks/user-management/index.tsx +1037 -0
  178. package/src/blocks/wizard/index.tsx +719 -0
  179. package/src/components/DataTable/DataTable.tsx +406 -0
  180. package/src/components/DataTable/DataTableAdvanced.tsx +720 -0
  181. package/src/components/DataTable/DataTableBody.tsx +216 -0
  182. package/src/components/DataTable/DataTableCell.tsx +172 -0
  183. package/src/components/DataTable/DataTableColumnResizer.tsx +62 -0
  184. package/src/components/DataTable/DataTableConflictResolver.tsx +478 -0
  185. package/src/components/DataTable/DataTableContextMenu.tsx +219 -0
  186. package/src/components/DataTable/DataTableEditCell.tsx +279 -0
  187. package/src/components/DataTable/DataTableFilterBuilder.tsx +519 -0
  188. package/src/components/DataTable/DataTableFilters.tsx +535 -0
  189. package/src/components/DataTable/DataTableGrouping.tsx +147 -0
  190. package/src/components/DataTable/DataTableHeader.tsx +172 -0
  191. package/src/components/DataTable/DataTablePagination.tsx +125 -0
  192. package/src/components/DataTable/DataTableSelection.tsx +269 -0
  193. package/src/components/DataTable/DataTableSyncStatus.tsx +281 -0
  194. package/src/components/DataTable/DataTableToolbar.tsx +262 -0
  195. package/src/components/DataTable/README.md +446 -0
  196. package/src/components/DataTable/__tests__/DataTableAdvanced.test.tsx +426 -0
  197. package/src/components/DataTable/__tests__/DataTableEdit.test.tsx +329 -0
  198. package/src/components/DataTable/__tests__/useDataTableAdvanced.test.ts +455 -0
  199. package/src/components/DataTable/examples/EditExample.tsx +166 -0
  200. package/src/components/DataTable/formatters/index.ts +335 -0
  201. package/src/components/DataTable/hooks/__tests__/useDataTableEdit.test.ts +239 -0
  202. package/src/components/DataTable/hooks/useDataTable.ts +145 -0
  203. package/src/components/DataTable/hooks/useDataTableAdvanced.ts +342 -0
  204. package/src/components/DataTable/hooks/useDataTableAdvancedFilters.ts +637 -0
  205. package/src/components/DataTable/hooks/useDataTableColumnTemplates.ts +186 -0
  206. package/src/components/DataTable/hooks/useDataTableEdit.ts +167 -0
  207. package/src/components/DataTable/hooks/useDataTableExport.ts +227 -0
  208. package/src/components/DataTable/hooks/useDataTableImport.ts +216 -0
  209. package/src/components/DataTable/hooks/useDataTableOffline.ts +481 -0
  210. package/src/components/DataTable/hooks/useDataTableTheme.ts +213 -0
  211. package/src/components/DataTable/hooks/useDataTableVirtualization.ts +99 -0
  212. package/src/components/DataTable/hooks/useTableLayout.ts +85 -0
  213. package/src/components/DataTable/index.ts +81 -0
  214. package/src/components/DataTable/services/IndexedDBService.ts +504 -0
  215. package/src/components/DataTable/templates/index.tsx +803 -0
  216. package/src/components/DataTable/types.ts +504 -0
  217. package/src/components/DataTable/utils.ts +164 -0
  218. package/src/components/DataTable/workers/exportWorker.ts +213 -0
  219. package/src/components/accordion/index.tsx +61 -0
  220. package/src/components/alert/index.tsx +61 -0
  221. package/src/components/alert-dialog/index.tsx +146 -0
  222. package/src/components/aspect-ratio/index.tsx +12 -0
  223. package/src/components/avatar/index.tsx +54 -0
  224. package/src/components/badge/Badge.stories.tsx +64 -0
  225. package/src/components/badge/index.tsx +38 -0
  226. package/src/components/button/Button.stories.tsx +173 -0
  227. package/src/components/button/index.tsx +56 -0
  228. package/src/components/calendar/index.tsx +73 -0
  229. package/src/components/card/index.tsx +78 -0
  230. package/src/components/checkbox/index.tsx +34 -0
  231. package/src/components/code/index.tsx +229 -0
  232. package/src/components/collapsible/index.tsx +16 -0
  233. package/src/components/command/index.tsx +162 -0
  234. package/src/components/context-menu/index.tsx +204 -0
  235. package/src/components/dialog/index.tsx +126 -0
  236. package/src/components/dropdown-menu/index.tsx +204 -0
  237. package/src/components/error-boundary/ErrorBoundary.tsx +281 -0
  238. package/src/components/error-boundary/index.ts +7 -0
  239. package/src/components/form/index.tsx +183 -0
  240. package/src/components/hover-card/index.tsx +33 -0
  241. package/src/components/index.ts +368 -0
  242. package/src/components/input/Input.stories.tsx +100 -0
  243. package/src/components/input/index.tsx +27 -0
  244. package/src/components/input-otp/index.tsx +277 -0
  245. package/src/components/label/index.tsx +30 -0
  246. package/src/components/language-selector/index.tsx +341 -0
  247. package/src/components/menubar/index.tsx +240 -0
  248. package/src/components/navigation-menu/index.tsx +134 -0
  249. package/src/components/popover/index.tsx +35 -0
  250. package/src/components/progress/index.tsx +32 -0
  251. package/src/components/radio-group/index.tsx +48 -0
  252. package/src/components/scroll-area/index.tsx +52 -0
  253. package/src/components/select/index.tsx +164 -0
  254. package/src/components/separator/index.tsx +35 -0
  255. package/src/components/sheet/index.tsx +147 -0
  256. package/src/components/skeleton/index.tsx +22 -0
  257. package/src/components/slider/index.tsx +32 -0
  258. package/src/components/switch/index.tsx +33 -0
  259. package/src/components/table/index.tsx +117 -0
  260. package/src/components/tabs/index.tsx +59 -0
  261. package/src/components/textarea/index.tsx +30 -0
  262. package/src/components/theme-selector/index.tsx +327 -0
  263. package/src/components/toast/index.tsx +133 -0
  264. package/src/components/toaster/index.tsx +34 -0
  265. package/src/components/toggle/index.tsx +49 -0
  266. package/src/components/tooltip/index.tsx +34 -0
  267. package/src/components/typography/index.tsx +276 -0
  268. package/src/components/waka-3d-pie-chart/index.tsx +486 -0
  269. package/src/components/waka-achievement-unlock/index.tsx +716 -0
  270. package/src/components/waka-activity-feed/index.tsx +686 -0
  271. package/src/components/waka-address-autocomplete/index.tsx +1202 -0
  272. package/src/components/waka-admincrumb/index.tsx +349 -0
  273. package/src/components/waka-alert-stack/index.tsx +827 -0
  274. package/src/components/waka-allocation-matrix/index.tsx +1278 -0
  275. package/src/components/waka-approval-chain/index.tsx +766 -0
  276. package/src/components/waka-audit-log/index.tsx +1475 -0
  277. package/src/components/waka-autocomplete/index.tsx +358 -0
  278. package/src/components/waka-badge-showcase/index.tsx +704 -0
  279. package/src/components/waka-barcode/index.tsx +260 -0
  280. package/src/components/waka-biometric-prompt/index.tsx +765 -0
  281. package/src/components/waka-bottom-sheet/index.tsx +495 -0
  282. package/src/components/waka-breadcrumb/index.tsx +376 -0
  283. package/src/components/waka-breadcrumb-path/index.tsx +513 -0
  284. package/src/components/waka-budget-burn/index.tsx +1234 -0
  285. package/src/components/waka-capacity-planner/index.tsx +1107 -0
  286. package/src/components/waka-carousel/index.tsx +893 -0
  287. package/src/components/waka-cart-summary/index.tsx +1055 -0
  288. package/src/components/waka-challenge-timer/index.tsx +1044 -0
  289. package/src/components/waka-charts/WakaAreaChart.tsx +251 -0
  290. package/src/components/waka-charts/WakaBarChart.tsx +222 -0
  291. package/src/components/waka-charts/WakaChart.tsx +124 -0
  292. package/src/components/waka-charts/WakaLineChart.tsx +219 -0
  293. package/src/components/waka-charts/WakaMiniChart.tsx +133 -0
  294. package/src/components/waka-charts/WakaPieChart.tsx +214 -0
  295. package/src/components/waka-charts/WakaSparkline.tsx +229 -0
  296. package/src/components/waka-charts/dataTableHelpers.ts +109 -0
  297. package/src/components/waka-charts/hooks/useChartTheme.ts +123 -0
  298. package/src/components/waka-charts/hooks/useRechartsLoader.ts +234 -0
  299. package/src/components/waka-charts/index.ts +90 -0
  300. package/src/components/waka-charts/types.ts +330 -0
  301. package/src/components/waka-chat-bubble/index.tsx +1060 -0
  302. package/src/components/waka-checklist/index.tsx +1067 -0
  303. package/src/components/waka-checkout-stepper/index.tsx +976 -0
  304. package/src/components/waka-cohort-table/index.tsx +1011 -0
  305. package/src/components/waka-color-picker/index.tsx +447 -0
  306. package/src/components/waka-combo-counter/index.tsx +864 -0
  307. package/src/components/waka-combobox/index.tsx +497 -0
  308. package/src/components/waka-command-bar/index.tsx +403 -0
  309. package/src/components/waka-compare-period/index.tsx +1230 -0
  310. package/src/components/waka-connection-matrix/index.tsx +1053 -0
  311. package/src/components/waka-contribution-graph/index.tsx +552 -0
  312. package/src/components/waka-cost-breakdown/index.tsx +1065 -0
  313. package/src/components/waka-coupon-input/index.tsx +592 -0
  314. package/src/components/waka-credit-card-input/index.tsx +982 -0
  315. package/src/components/waka-daily-reward/index.tsx +762 -0
  316. package/src/components/waka-date-range-picker/index.tsx +378 -0
  317. package/src/components/waka-datetime-picker/index.tsx +793 -0
  318. package/src/components/waka-datetime-picker.form-integration/index.tsx +402 -0
  319. package/src/components/waka-deployment-lane/index.tsx +673 -0
  320. package/src/components/waka-device-trust/index.tsx +1259 -0
  321. package/src/components/waka-dock/index.tsx +285 -0
  322. package/src/components/waka-drawer/index.tsx +319 -0
  323. package/src/components/waka-empty-state/index.tsx +545 -0
  324. package/src/components/waka-error-shake/index.tsx +398 -0
  325. package/src/components/waka-feature-announcement/index.tsx +991 -0
  326. package/src/components/waka-file-upload/index.tsx +437 -0
  327. package/src/components/waka-floating-nav/index.tsx +413 -0
  328. package/src/components/waka-flow-diagram/index.tsx +508 -0
  329. package/src/components/waka-funnel-chart/index.tsx +823 -0
  330. package/src/components/waka-glow-card/index.tsx +246 -0
  331. package/src/components/waka-goal-progress/index.tsx +1025 -0
  332. package/src/components/waka-haptic-button/index.tsx +388 -0
  333. package/src/components/waka-health-pulse/index.tsx +451 -0
  334. package/src/components/waka-heatmap/index.tsx +1026 -0
  335. package/src/components/waka-hotspot/index.tsx +682 -0
  336. package/src/components/waka-image/index.tsx +373 -0
  337. package/src/components/waka-incident-timeline/index.tsx +686 -0
  338. package/src/components/waka-invoice-preview/index.tsx +829 -0
  339. package/src/components/waka-kanban/index.tsx +646 -0
  340. package/src/components/waka-kpi-dashboard/index.tsx +755 -0
  341. package/src/components/waka-leaderboard/index.tsx +746 -0
  342. package/src/components/waka-level-progress/index.tsx +665 -0
  343. package/src/components/waka-liquid-button/index.tsx +520 -0
  344. package/src/components/waka-loading-orbit/index.tsx +478 -0
  345. package/src/components/waka-loot-box/index.tsx +1091 -0
  346. package/src/components/waka-magic-link/index.tsx +321 -0
  347. package/src/components/waka-magnetic-button/index.tsx +567 -0
  348. package/src/components/waka-mention-input/index.tsx +953 -0
  349. package/src/components/waka-metric-sparkline/index.tsx +627 -0
  350. package/src/components/waka-milestone-road/index.tsx +1064 -0
  351. package/src/components/waka-modal/index.tsx +374 -0
  352. package/src/components/waka-morph-button/index.tsx +495 -0
  353. package/src/components/waka-network-topology/index.tsx +801 -0
  354. package/src/components/waka-notifications/index.tsx +414 -0
  355. package/src/components/waka-number-input/index.tsx +373 -0
  356. package/src/components/waka-orbital-menu/index.tsx +445 -0
  357. package/src/components/waka-order-tracker/index.tsx +1041 -0
  358. package/src/components/waka-pagination/index.tsx +393 -0
  359. package/src/components/waka-password-strength/index.tsx +824 -0
  360. package/src/components/waka-payment-method-picker/index.tsx +715 -0
  361. package/src/components/waka-permission-matrix/index.tsx +1302 -0
  362. package/src/components/waka-phone-input/index.tsx +801 -0
  363. package/src/components/waka-pipeline-view/index.tsx +604 -0
  364. package/src/components/waka-player-card/index.tsx +691 -0
  365. package/src/components/waka-points-popup/index.tsx +366 -0
  366. package/src/components/waka-power-up/index.tsx +1155 -0
  367. package/src/components/waka-presence-indicator/index.tsx +1181 -0
  368. package/src/components/waka-pricing-table/index.tsx +755 -0
  369. package/src/components/waka-product-card/index.tsx +786 -0
  370. package/src/components/waka-progress-onboarding/index.tsx +878 -0
  371. package/src/components/waka-pull-to-refresh/index.tsx +451 -0
  372. package/src/components/waka-qrcode/index.tsx +232 -0
  373. package/src/components/waka-quest-card/index.tsx +1275 -0
  374. package/src/components/waka-quota-bar/index.tsx +693 -0
  375. package/src/components/waka-radar-score/index.tsx +512 -0
  376. package/src/components/waka-rank-badge/index.tsx +813 -0
  377. package/src/components/waka-rating-input/index.tsx +560 -0
  378. package/src/components/waka-reaction-picker/index.tsx +1062 -0
  379. package/src/components/waka-region-map/index.tsx +730 -0
  380. package/src/components/waka-resource-gauge/index.tsx +654 -0
  381. package/src/components/waka-resource-pool/index.tsx +1035 -0
  382. package/src/components/waka-rich-text-editor/index.tsx +594 -0
  383. package/src/components/waka-rollback-slider/index.tsx +891 -0
  384. package/src/components/waka-sankey-diagram/index.tsx +1032 -0
  385. package/src/components/waka-schedule-picker/index.tsx +1060 -0
  386. package/src/components/waka-scratch-card/index.tsx +914 -0
  387. package/src/components/waka-season-pass/index.tsx +886 -0
  388. package/src/components/waka-security-score/index.tsx +1126 -0
  389. package/src/components/waka-segmented-control/index.tsx +238 -0
  390. package/src/components/waka-server-rack/index.tsx +764 -0
  391. package/src/components/waka-session-manager/index.tsx +815 -0
  392. package/src/components/waka-signature-pad/index.tsx +744 -0
  393. package/src/components/waka-skeleton-wave/index.tsx +454 -0
  394. package/src/components/waka-skill-tree/index.tsx +1031 -0
  395. package/src/components/waka-sla-tracker/index.tsx +798 -0
  396. package/src/components/waka-slider-range/index.tsx +765 -0
  397. package/src/components/waka-spin-wheel/index.tsx +671 -0
  398. package/src/components/waka-spinner/index.tsx +284 -0
  399. package/src/components/waka-spotlight/index.tsx +410 -0
  400. package/src/components/waka-stat/index.tsx +428 -0
  401. package/src/components/waka-stats-hexagon/index.tsx +824 -0
  402. package/src/components/waka-status-matrix/index.tsx +565 -0
  403. package/src/components/waka-stepper/index.tsx +489 -0
  404. package/src/components/waka-streak-counter/index.tsx +334 -0
  405. package/src/components/waka-success-explosion/index.tsx +453 -0
  406. package/src/components/waka-swipe-card/index.tsx +574 -0
  407. package/src/components/waka-tabs-morph/index.tsx +509 -0
  408. package/src/components/waka-tag-input/index.tsx +877 -0
  409. package/src/components/waka-team-banner/index.tsx +1183 -0
  410. package/src/components/waka-terminal-output/index.tsx +836 -0
  411. package/src/components/waka-theme-creator/index.tsx +762 -0
  412. package/src/components/waka-theme-manager/index.tsx +654 -0
  413. package/src/components/waka-thread-view/index.tsx +874 -0
  414. package/src/components/waka-tilt-card/index.tsx +250 -0
  415. package/src/components/waka-time-picker/index.tsx +479 -0
  416. package/src/components/waka-timeline/index.tsx +385 -0
  417. package/src/components/waka-tooltip-tour/index.tsx +855 -0
  418. package/src/components/waka-tour-guide/index.tsx +920 -0
  419. package/src/components/waka-tournament-bracket/index.tsx +1276 -0
  420. package/src/components/waka-tree/index.tsx +557 -0
  421. package/src/components/waka-treemap-chart/index.tsx +1031 -0
  422. package/src/components/waka-two-factor-setup/index.tsx +995 -0
  423. package/src/components/waka-typewriter/index.tsx +566 -0
  424. package/src/components/waka-typing-indicator/index.tsx +649 -0
  425. package/src/components/waka-versus-card/index.tsx +1026 -0
  426. package/src/components/waka-video/index.tsx +557 -0
  427. package/src/components/waka-video-call/index.tsx +1087 -0
  428. package/src/components/waka-virtual-list/index.tsx +327 -0
  429. package/src/components/waka-voice-message/index.tsx +1019 -0
  430. package/src/components/waka-welcome-modal/index.tsx +790 -0
  431. package/src/components/waka-xp-bar/index.tsx +799 -0
  432. package/src/styles/base.css +108 -0
  433. package/src/styles/code-highlight.css +82 -86
  434. package/src/styles/globals-v3.css +9 -0
  435. package/src/styles/globals.css +57 -74
  436. package/src/styles/tailwind.preset.js +69 -0
@@ -0,0 +1,213 @@
1
+ /**
2
+ * Web Worker pour l'export de grandes tables
3
+ *
4
+ * Ce worker gère la conversion de données en différents formats (CSV, JSON, XML)
5
+ * dans un thread séparé pour éviter de bloquer l'interface utilisateur.
6
+ *
7
+ * @example
8
+ * // Utilisation via le hook useDataTableExport
9
+ * const { exportDataAsync } = useDataTableExport({ data, columns })
10
+ * await exportDataAsync('csv') // Utilise automatiquement le worker pour >1000 lignes
11
+ */
12
+
13
+ export interface ExportWorkerMessage {
14
+ type: 'export'
15
+ format: 'csv' | 'json' | 'xml'
16
+ data: Record<string, unknown>[]
17
+ columns: {
18
+ key: string
19
+ header: string
20
+ }[]
21
+ filename: string
22
+ }
23
+
24
+ export interface ExportWorkerResponse {
25
+ type: 'success' | 'error' | 'progress'
26
+ content?: string
27
+ blob?: Blob
28
+ progress?: number
29
+ error?: string
30
+ }
31
+
32
+ // Fonction pour convertir en CSV
33
+ function convertToCSV(
34
+ data: Record<string, unknown>[],
35
+ columns: { key: string; header: string }[]
36
+ ): string {
37
+ const headers = columns.map(col => col.header).join(',')
38
+
39
+ const rows = data.map(row => {
40
+ return columns
41
+ .map(col => {
42
+ const value = row[col.key]
43
+ const stringValue = String(value ?? '')
44
+ // Échapper les virgules, guillemets et sauts de ligne
45
+ if (stringValue.includes(',') || stringValue.includes('"') || stringValue.includes('\n')) {
46
+ return `"${stringValue.replace(/"/g, '""')}"`
47
+ }
48
+ return stringValue
49
+ })
50
+ .join(',')
51
+ })
52
+
53
+ return [headers, ...rows].join('\n')
54
+ }
55
+
56
+ // Fonction pour convertir en JSON
57
+ function convertToJSON(data: Record<string, unknown>[]): string {
58
+ return JSON.stringify(data, null, 2)
59
+ }
60
+
61
+ // Fonction pour convertir en XML
62
+ function convertToXML(
63
+ data: Record<string, unknown>[],
64
+ columns: { key: string; header: string }[]
65
+ ): string {
66
+ let xmlContent = '<?xml version="1.0" encoding="UTF-8"?>\n<data>\n'
67
+
68
+ data.forEach((row, index) => {
69
+ xmlContent += ` <row id="${index}">\n`
70
+ columns.forEach(col => {
71
+ const value = row[col.key]
72
+ const stringValue = String(value ?? '')
73
+ .replace(/&/g, '&amp;')
74
+ .replace(/</g, '&lt;')
75
+ .replace(/>/g, '&gt;')
76
+ xmlContent += ` <${col.key}>${stringValue}</${col.key}>\n`
77
+ })
78
+ xmlContent += ' </row>\n'
79
+ })
80
+
81
+ xmlContent += '</data>'
82
+ return xmlContent
83
+ }
84
+
85
+ // Fonction pour traiter les données par chunks et signaler la progression
86
+ function processWithProgress(
87
+ data: Record<string, unknown>[],
88
+ columns: { key: string; header: string }[],
89
+ format: 'csv' | 'json' | 'xml',
90
+ onProgress: (progress: number) => void
91
+ ): string {
92
+ const CHUNK_SIZE = 1000
93
+ const totalRows = data.length
94
+ let result = ''
95
+
96
+ // Pour JSON, on ne peut pas faire de chunking
97
+ if (format === 'json') {
98
+ onProgress(50)
99
+ result = convertToJSON(data)
100
+ onProgress(100)
101
+ return result
102
+ }
103
+
104
+ // Pour CSV
105
+ if (format === 'csv') {
106
+ result = columns.map(col => col.header).join(',') + '\n'
107
+
108
+ for (let i = 0; i < totalRows; i += CHUNK_SIZE) {
109
+ const chunk = data.slice(i, Math.min(i + CHUNK_SIZE, totalRows))
110
+ const chunkRows = chunk.map(row => {
111
+ return columns
112
+ .map(col => {
113
+ const value = row[col.key]
114
+ const stringValue = String(value ?? '')
115
+ if (stringValue.includes(',') || stringValue.includes('"') || stringValue.includes('\n')) {
116
+ return `"${stringValue.replace(/"/g, '""')}"`
117
+ }
118
+ return stringValue
119
+ })
120
+ .join(',')
121
+ })
122
+ result += chunkRows.join('\n') + (i + CHUNK_SIZE < totalRows ? '\n' : '')
123
+ onProgress(Math.round(((i + CHUNK_SIZE) / totalRows) * 100))
124
+ }
125
+
126
+ return result
127
+ }
128
+
129
+ // Pour XML
130
+ if (format === 'xml') {
131
+ result = '<?xml version="1.0" encoding="UTF-8"?>\n<data>\n'
132
+
133
+ for (let i = 0; i < totalRows; i += CHUNK_SIZE) {
134
+ const chunk = data.slice(i, Math.min(i + CHUNK_SIZE, totalRows))
135
+
136
+ chunk.forEach((row, idx) => {
137
+ result += ` <row id="${i + idx}">\n`
138
+ columns.forEach(col => {
139
+ const value = row[col.key]
140
+ const stringValue = String(value ?? '')
141
+ .replace(/&/g, '&amp;')
142
+ .replace(/</g, '&lt;')
143
+ .replace(/>/g, '&gt;')
144
+ result += ` <${col.key}>${stringValue}</${col.key}>\n`
145
+ })
146
+ result += ' </row>\n'
147
+ })
148
+
149
+ onProgress(Math.round(((i + CHUNK_SIZE) / totalRows) * 100))
150
+ }
151
+
152
+ result += '</data>'
153
+ return result
154
+ }
155
+
156
+ return result
157
+ }
158
+
159
+ // Handler du worker
160
+ self.onmessage = function (e: MessageEvent<ExportWorkerMessage>) {
161
+ const { type, format, data, columns, filename } = e.data
162
+
163
+ if (type !== 'export') {
164
+ self.postMessage({
165
+ type: 'error',
166
+ error: `Unknown message type: ${type}`,
167
+ } as ExportWorkerResponse)
168
+ return
169
+ }
170
+
171
+ try {
172
+ // Reporter la progression
173
+ const onProgress = (progress: number) => {
174
+ self.postMessage({
175
+ type: 'progress',
176
+ progress,
177
+ } as ExportWorkerResponse)
178
+ }
179
+
180
+ // Convertir les données
181
+ const content = processWithProgress(data, columns, format, onProgress)
182
+
183
+ // Créer le blob approprié
184
+ let mimeType: string
185
+ switch (format) {
186
+ case 'csv':
187
+ mimeType = 'text/csv;charset=utf-8;'
188
+ break
189
+ case 'json':
190
+ mimeType = 'application/json'
191
+ break
192
+ case 'xml':
193
+ mimeType = 'application/xml'
194
+ break
195
+ default:
196
+ mimeType = 'text/plain'
197
+ }
198
+
199
+ // Envoyer la réponse
200
+ self.postMessage({
201
+ type: 'success',
202
+ content,
203
+ } as ExportWorkerResponse)
204
+ } catch (error) {
205
+ self.postMessage({
206
+ type: 'error',
207
+ error: error instanceof Error ? error.message : 'Unknown error during export',
208
+ } as ExportWorkerResponse)
209
+ }
210
+ }
211
+
212
+ // Export vide pour que le fichier soit reconnu comme un module
213
+ export {}
@@ -0,0 +1,61 @@
1
+ import * as React from "react"
2
+ import * as AccordionPrimitive from "@radix-ui/react-accordion"
3
+ import { ChevronDown } from "lucide-react"
4
+ import { cn } from "../../utils/cn"
5
+
6
+ const Accordion: typeof AccordionPrimitive.Root = AccordionPrimitive.Root
7
+
8
+ const AccordionItem = React.forwardRef<
9
+ React.ElementRef<typeof AccordionPrimitive.Item>,
10
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
11
+ >(({ className, ...props }, ref) => (
12
+ <AccordionPrimitive.Item
13
+ ref={ref}
14
+ className={cn("border-b", className)}
15
+ {...props}
16
+ />
17
+ ))
18
+ AccordionItem.displayName = "AccordionItem"
19
+
20
+ const AccordionTrigger = React.forwardRef<
21
+ React.ElementRef<typeof AccordionPrimitive.Trigger>,
22
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
23
+ >(({ className, children, ...props }, ref) => (
24
+ <AccordionPrimitive.Header className="flex">
25
+ <AccordionPrimitive.Trigger
26
+ ref={ref}
27
+ className={cn(
28
+ "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
29
+ className
30
+ )}
31
+ {...props}
32
+ >
33
+ {children}
34
+ <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
35
+ </AccordionPrimitive.Trigger>
36
+ </AccordionPrimitive.Header>
37
+ ))
38
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
39
+
40
+ const AccordionContent = React.forwardRef<
41
+ React.ElementRef<typeof AccordionPrimitive.Content>,
42
+ React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
43
+ >(({ className, children, ...props }, ref) => (
44
+ <AccordionPrimitive.Content
45
+ ref={ref}
46
+ className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
47
+ {...props}
48
+ >
49
+ <div className={cn("pb-4 pt-0", className)}>{children}</div>
50
+ </AccordionPrimitive.Content>
51
+ ))
52
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName
53
+
54
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
55
+
56
+
57
+
58
+
59
+
60
+
61
+
@@ -0,0 +1,61 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cva, type VariantProps } from "class-variance-authority"
5
+ import { cn } from "../../utils/cn"
6
+
7
+ const alertVariants = cva(
8
+ "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: "bg-background text-foreground",
13
+ destructive:
14
+ "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
15
+ },
16
+ },
17
+ defaultVariants: {
18
+ variant: "default",
19
+ },
20
+ }
21
+ )
22
+
23
+ const Alert = React.forwardRef<
24
+ HTMLDivElement,
25
+ React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
26
+ >(({ className, variant, ...props }, ref) => (
27
+ <div
28
+ ref={ref}
29
+ role="alert"
30
+ className={cn(alertVariants({ variant }), className)}
31
+ {...props}
32
+ />
33
+ ))
34
+ Alert.displayName = "Alert"
35
+
36
+ const AlertTitle = React.forwardRef<
37
+ HTMLParagraphElement,
38
+ React.HTMLAttributes<HTMLHeadingElement>
39
+ >(({ className, ...props }, ref) => (
40
+ <h5
41
+ ref={ref}
42
+ className={cn("mb-1 font-medium leading-none tracking-tight", className)}
43
+ {...props}
44
+ />
45
+ ))
46
+ AlertTitle.displayName = "AlertTitle"
47
+
48
+ const AlertDescription = React.forwardRef<
49
+ HTMLParagraphElement,
50
+ React.HTMLAttributes<HTMLParagraphElement>
51
+ >(({ className, ...props }, ref) => (
52
+ <div
53
+ ref={ref}
54
+ className={cn("text-sm [&_p]:leading-relaxed", className)}
55
+ {...props}
56
+ />
57
+ ))
58
+ AlertDescription.displayName = "AlertDescription"
59
+
60
+ export { Alert, AlertTitle, AlertDescription }
61
+
@@ -0,0 +1,146 @@
1
+ import * as React from "react"
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
3
+ import { cn } from "../../utils/cn"
4
+
5
+ const AlertDialog: typeof AlertDialogPrimitive.Root = AlertDialogPrimitive.Root
6
+
7
+ const AlertDialogTrigger: typeof AlertDialogPrimitive.Trigger = AlertDialogPrimitive.Trigger
8
+
9
+ const AlertDialogPortal: typeof AlertDialogPrimitive.Portal = AlertDialogPrimitive.Portal
10
+
11
+ const AlertDialogOverlay = React.forwardRef<
12
+ React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
13
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
14
+ >(({ className, ...props }, ref) => (
15
+ <AlertDialogPrimitive.Overlay
16
+ className={cn(
17
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
18
+ className
19
+ )}
20
+ {...props}
21
+ ref={ref}
22
+ />
23
+ ))
24
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName
25
+
26
+ const AlertDialogContent = React.forwardRef<
27
+ React.ElementRef<typeof AlertDialogPrimitive.Content>,
28
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
29
+ >(({ className, ...props }, ref) => (
30
+ <AlertDialogPortal>
31
+ <AlertDialogOverlay />
32
+ <AlertDialogPrimitive.Content
33
+ ref={ref}
34
+ className={cn(
35
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
36
+ className
37
+ )}
38
+ {...props}
39
+ />
40
+ </AlertDialogPortal>
41
+ ))
42
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
43
+
44
+ const AlertDialogHeader = ({
45
+ className,
46
+ ...props
47
+ }: React.HTMLAttributes<HTMLDivElement>) => (
48
+ <div
49
+ className={cn(
50
+ "flex flex-col space-y-2 text-center sm:text-left",
51
+ className
52
+ )}
53
+ {...props}
54
+ />
55
+ )
56
+ AlertDialogHeader.displayName = "AlertDialogHeader"
57
+
58
+ const AlertDialogFooter = ({
59
+ className,
60
+ ...props
61
+ }: React.HTMLAttributes<HTMLDivElement>) => (
62
+ <div
63
+ className={cn(
64
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
65
+ className
66
+ )}
67
+ {...props}
68
+ />
69
+ )
70
+ AlertDialogFooter.displayName = "AlertDialogFooter"
71
+
72
+ const AlertDialogTitle = React.forwardRef<
73
+ React.ElementRef<typeof AlertDialogPrimitive.Title>,
74
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
75
+ >(({ className, ...props }, ref) => (
76
+ <AlertDialogPrimitive.Title
77
+ ref={ref}
78
+ className={cn("text-lg font-semibold", className)}
79
+ {...props}
80
+ />
81
+ ))
82
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName
83
+
84
+ const AlertDialogDescription = React.forwardRef<
85
+ React.ElementRef<typeof AlertDialogPrimitive.Description>,
86
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
87
+ >(({ className, ...props }, ref) => (
88
+ <AlertDialogPrimitive.Description
89
+ ref={ref}
90
+ className={cn("text-sm text-muted-foreground", className)}
91
+ {...props}
92
+ />
93
+ ))
94
+ AlertDialogDescription.displayName =
95
+ AlertDialogPrimitive.Description.displayName
96
+
97
+ const AlertDialogAction = React.forwardRef<
98
+ React.ElementRef<typeof AlertDialogPrimitive.Action>,
99
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
100
+ >(({ className, ...props }, ref) => (
101
+ <AlertDialogPrimitive.Action
102
+ ref={ref}
103
+ className={cn(
104
+ "inline-flex h-10 items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground ring-offset-background transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
105
+ className
106
+ )}
107
+ {...props}
108
+ />
109
+ ))
110
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName
111
+
112
+ const AlertDialogCancel = React.forwardRef<
113
+ React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
114
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
115
+ >(({ className, ...props }, ref) => (
116
+ <AlertDialogPrimitive.Cancel
117
+ ref={ref}
118
+ className={cn(
119
+ "mt-2 inline-flex h-10 items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-semibold ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 sm:mt-0",
120
+ className
121
+ )}
122
+ {...props}
123
+ />
124
+ ))
125
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName
126
+
127
+ export {
128
+ AlertDialog,
129
+ AlertDialogPortal,
130
+ AlertDialogOverlay,
131
+ AlertDialogTrigger,
132
+ AlertDialogContent,
133
+ AlertDialogHeader,
134
+ AlertDialogFooter,
135
+ AlertDialogTitle,
136
+ AlertDialogDescription,
137
+ AlertDialogAction,
138
+ AlertDialogCancel,
139
+ }
140
+
141
+
142
+
143
+
144
+
145
+
146
+
@@ -0,0 +1,12 @@
1
+ import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
2
+
3
+ const AspectRatio: typeof AspectRatioPrimitive.Root = AspectRatioPrimitive.Root
4
+
5
+ export { AspectRatio }
6
+
7
+
8
+
9
+
10
+
11
+
12
+
@@ -0,0 +1,54 @@
1
+ import * as React from "react"
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar"
3
+ import { cn } from "../../utils/cn"
4
+
5
+ const Avatar = React.forwardRef<
6
+ React.ElementRef<typeof AvatarPrimitive.Root>,
7
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
8
+ >(({ className, ...props }, ref) => (
9
+ <AvatarPrimitive.Root
10
+ ref={ref}
11
+ className={cn(
12
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
13
+ className
14
+ )}
15
+ {...props}
16
+ />
17
+ ))
18
+ Avatar.displayName = AvatarPrimitive.Root.displayName
19
+
20
+ const AvatarImage = React.forwardRef<
21
+ React.ElementRef<typeof AvatarPrimitive.Image>,
22
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
23
+ >(({ className, ...props }, ref) => (
24
+ <AvatarPrimitive.Image
25
+ ref={ref}
26
+ className={cn("aspect-square h-full w-full", className)}
27
+ {...props}
28
+ />
29
+ ))
30
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName
31
+
32
+ const AvatarFallback = React.forwardRef<
33
+ React.ElementRef<typeof AvatarPrimitive.Fallback>,
34
+ React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
35
+ >(({ className, ...props }, ref) => (
36
+ <AvatarPrimitive.Fallback
37
+ ref={ref}
38
+ className={cn(
39
+ "flex h-full w-full items-center justify-center rounded-full bg-muted",
40
+ className
41
+ )}
42
+ {...props}
43
+ />
44
+ ))
45
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
46
+
47
+ export { Avatar, AvatarImage, AvatarFallback }
48
+
49
+
50
+
51
+
52
+
53
+
54
+
@@ -0,0 +1,64 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+ import { Badge } from './index'
3
+
4
+ const meta: Meta<typeof Badge> = {
5
+ title: 'Components/Badge',
6
+ component: Badge,
7
+ parameters: {
8
+ layout: 'centered',
9
+ docs: {
10
+ description: {
11
+ component: 'A badge component for displaying status, labels, or counts.',
12
+ },
13
+ },
14
+ },
15
+ tags: ['autodocs'],
16
+ argTypes: {
17
+ variant: {
18
+ control: 'select',
19
+ options: ['default', 'secondary', 'destructive', 'outline'],
20
+ description: 'The visual style of the badge',
21
+ },
22
+ },
23
+ }
24
+
25
+ export default meta
26
+ type Story = StoryObj<typeof Badge>
27
+
28
+ export const Default: Story = {
29
+ args: {
30
+ children: 'Badge',
31
+ variant: 'default',
32
+ },
33
+ }
34
+
35
+ export const Variants: Story = {
36
+ render: () => (
37
+ <div className="flex flex-wrap gap-4">
38
+ <Badge variant="default">Default</Badge>
39
+ <Badge variant="secondary">Secondary</Badge>
40
+ <Badge variant="destructive">Destructive</Badge>
41
+ <Badge variant="outline">Outline</Badge>
42
+ </div>
43
+ ),
44
+ }
45
+
46
+ export const WithCount: Story = {
47
+ render: () => (
48
+ <div className="flex flex-wrap gap-4">
49
+ <Badge>3</Badge>
50
+ <Badge variant="secondary">12</Badge>
51
+ <Badge variant="destructive">99+</Badge>
52
+ </div>
53
+ ),
54
+ }
55
+
56
+ export const AsStatus: Story = {
57
+ render: () => (
58
+ <div className="flex flex-wrap gap-4">
59
+ <Badge className="bg-green-500 hover:bg-green-600">Active</Badge>
60
+ <Badge className="bg-yellow-500 hover:bg-yellow-600">Pending</Badge>
61
+ <Badge className="bg-red-500 hover:bg-red-600">Inactive</Badge>
62
+ </div>
63
+ ),
64
+ }
@@ -0,0 +1,38 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cva, type VariantProps } from "class-variance-authority"
5
+ import { cn } from "../../utils/cn"
6
+
7
+ const badgeVariants = cva(
8
+ "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default:
13
+ "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
14
+ secondary:
15
+ "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
16
+ destructive:
17
+ "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
18
+ outline: "text-foreground",
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ variant: "default",
23
+ },
24
+ }
25
+ )
26
+
27
+ export interface BadgeProps
28
+ extends React.HTMLAttributes<HTMLDivElement>,
29
+ VariantProps<typeof badgeVariants> {}
30
+
31
+ function Badge({ className, variant, ...props }: BadgeProps) {
32
+ return (
33
+ <div className={cn(badgeVariants({ variant }), className)} {...props} />
34
+ )
35
+ }
36
+
37
+ export { Badge, badgeVariants }
38
+