erp-pro-ui 0.2.5 → 0.2.6

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 (408) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.mjs +1 -1
  3. package/dist/alert.cjs +1 -1
  4. package/dist/alert.mjs +1 -1
  5. package/dist/animated-content.cjs +1 -1
  6. package/dist/animated-content.mjs +1 -1
  7. package/dist/ascii-text.cjs +1 -1
  8. package/dist/ascii-text.mjs +1 -1
  9. package/dist/background-gradient-animation.cjs +1 -1
  10. package/dist/background-gradient-animation.mjs +1 -1
  11. package/dist/button-hover-border-gradient.cjs +1 -1
  12. package/dist/button-hover-border-gradient.mjs +1 -1
  13. package/dist/button.cjs +1 -1
  14. package/dist/button.mjs +1 -1
  15. package/dist/calendar.cjs +1 -1
  16. package/dist/calendar.mjs +1 -1
  17. package/dist/card.cjs +1 -1
  18. package/dist/card.mjs +1 -1
  19. package/dist/carousel.cjs +1 -1
  20. package/dist/carousel.mjs +1 -1
  21. package/dist/catalog.cjs +14 -0
  22. package/dist/catalog.cjs.map +1 -1
  23. package/dist/catalog.d.ts +25 -1
  24. package/dist/catalog.d.ts.map +1 -1
  25. package/dist/catalog.mjs +14 -0
  26. package/dist/catalog.mjs.map +1 -1
  27. package/dist/charts.cjs +1 -1
  28. package/dist/charts.mjs +1 -1
  29. package/dist/checkbox.cjs +1 -1
  30. package/dist/checkbox.mjs +1 -1
  31. package/dist/chip.cjs +1 -1
  32. package/dist/chip.mjs +1 -1
  33. package/dist/chroma-grid.cjs +1 -1
  34. package/dist/chroma-grid.mjs +1 -1
  35. package/dist/chunks/{drawer-D07dGN6R.cjs → Drawer-D72Xi2Gq.cjs} +2 -2
  36. package/dist/chunks/{drawer-D07dGN6R.cjs.map → Drawer-D72Xi2Gq.cjs.map} +1 -1
  37. package/dist/chunks/{drawer-DaoAXL-w.mjs → Drawer-Y0_sJni5.mjs} +2 -2
  38. package/dist/chunks/{drawer-DaoAXL-w.mjs.map → Drawer-Y0_sJni5.mjs.map} +1 -1
  39. package/dist/chunks/{DropdownMenu-BtTOri-A.mjs → DropdownMenu-BQ4WlaGp.mjs} +1 -1
  40. package/dist/chunks/{DropdownMenu-BtTOri-A.mjs.map → DropdownMenu-BQ4WlaGp.mjs.map} +1 -1
  41. package/dist/chunks/{DropdownMenu-BDrNYO-D.cjs → DropdownMenu-yh04burS.cjs} +1 -1
  42. package/dist/chunks/{DropdownMenu-BDrNYO-D.cjs.map → DropdownMenu-yh04burS.cjs.map} +1 -1
  43. package/dist/chunks/EllipsisVerticalIcon-BJw3MNkg.cjs +51 -0
  44. package/dist/chunks/EllipsisVerticalIcon-BJw3MNkg.cjs.map +1 -0
  45. package/dist/chunks/EllipsisVerticalIcon-C2b2KMfE.mjs +45 -0
  46. package/dist/chunks/EllipsisVerticalIcon-C2b2KMfE.mjs.map +1 -0
  47. package/dist/chunks/{HoverBorderGradient-NbdXeLgC.mjs → HoverBorderGradient-DEtm3owk.mjs} +1 -1
  48. package/dist/chunks/{HoverBorderGradient-NbdXeLgC.mjs.map → HoverBorderGradient-DEtm3owk.mjs.map} +1 -1
  49. package/dist/chunks/{HoverBorderGradient-9pfvBoHR.cjs → HoverBorderGradient-DMMyr2L3.cjs} +1 -1
  50. package/dist/chunks/{HoverBorderGradient-9pfvBoHR.cjs.map → HoverBorderGradient-DMMyr2L3.cjs.map} +1 -1
  51. package/dist/chunks/{SunToMoonButton-BkEfkElJ.mjs → SunToMoonButton-BOKHzC1H.mjs} +1 -1
  52. package/dist/chunks/{SunToMoonButton-BkEfkElJ.mjs.map → SunToMoonButton-BOKHzC1H.mjs.map} +1 -1
  53. package/dist/chunks/{SunToMoonButton-jS4BJD9q.cjs → SunToMoonButton-gX4Kk_5B.cjs} +1 -1
  54. package/dist/chunks/{SunToMoonButton-jS4BJD9q.cjs.map → SunToMoonButton-gX4Kk_5B.cjs.map} +1 -1
  55. package/dist/chunks/{Tooltip-DK3B879v.mjs → Tooltip-LbOKP__2.mjs} +10 -7
  56. package/dist/chunks/Tooltip-LbOKP__2.mjs.map +1 -0
  57. package/dist/chunks/{Tooltip-DD30yj3A.cjs → Tooltip-nnaiqJTT.cjs} +10 -7
  58. package/dist/chunks/Tooltip-nnaiqJTT.cjs.map +1 -0
  59. package/dist/chunks/{accordion-CmB6EidC.cjs → accordion-Bj3Sj0mC.cjs} +2 -2
  60. package/dist/chunks/{accordion-CmB6EidC.cjs.map → accordion-Bj3Sj0mC.cjs.map} +1 -1
  61. package/dist/chunks/{accordion-6zxJUYXr.mjs → accordion-CLcjNX_X.mjs} +2 -2
  62. package/dist/chunks/{accordion-6zxJUYXr.mjs.map → accordion-CLcjNX_X.mjs.map} +1 -1
  63. package/dist/chunks/{alert-C5KEeQqh.cjs → alert-BBA4Sh4e.cjs} +2 -2
  64. package/dist/chunks/{alert-C5KEeQqh.cjs.map → alert-BBA4Sh4e.cjs.map} +1 -1
  65. package/dist/chunks/{alert-XVmYJgds.mjs → alert-oUz79MGc.mjs} +2 -2
  66. package/dist/chunks/{alert-XVmYJgds.mjs.map → alert-oUz79MGc.mjs.map} +1 -1
  67. package/dist/chunks/{animated-content-CLsFnjgr.cjs → animated-content-B3wbiWQI.cjs} +1 -1
  68. package/dist/chunks/{animated-content-CLsFnjgr.cjs.map → animated-content-B3wbiWQI.cjs.map} +1 -1
  69. package/dist/chunks/{animated-content-bK6xp-vc.mjs → animated-content-CiNJLgbq.mjs} +1 -1
  70. package/dist/chunks/{animated-content-bK6xp-vc.mjs.map → animated-content-CiNJLgbq.mjs.map} +1 -1
  71. package/dist/chunks/{ascii-text-Bdy4C5rU.mjs → ascii-text-C6JegLhP.mjs} +1 -1
  72. package/dist/chunks/{ascii-text-Bdy4C5rU.mjs.map → ascii-text-C6JegLhP.mjs.map} +1 -1
  73. package/dist/chunks/{ascii-text-BFnpVur6.cjs → ascii-text-KwVE41Hw.cjs} +1 -1
  74. package/dist/chunks/{ascii-text-BFnpVur6.cjs.map → ascii-text-KwVE41Hw.cjs.map} +1 -1
  75. package/dist/chunks/{background-gradient-animation-CiNdmA61.cjs → background-gradient-animation-1LZY3DYT.cjs} +1 -1
  76. package/dist/chunks/{background-gradient-animation-CiNdmA61.cjs.map → background-gradient-animation-1LZY3DYT.cjs.map} +1 -1
  77. package/dist/chunks/{background-gradient-animation-BR9wx6Z8.mjs → background-gradient-animation-CTc2ZR74.mjs} +1 -1
  78. package/dist/chunks/{background-gradient-animation-BR9wx6Z8.mjs.map → background-gradient-animation-CTc2ZR74.mjs.map} +1 -1
  79. package/dist/chunks/{button-A6UTvrOu.mjs → button-IDShmQqA.mjs} +3 -2
  80. package/dist/chunks/button-IDShmQqA.mjs.map +1 -0
  81. package/dist/chunks/{button-hover-border-gradient-DnFvjNNw.mjs → button-hover-border-gradient-B2ebbDek.mjs} +2 -2
  82. package/dist/chunks/{button-hover-border-gradient-DnFvjNNw.mjs.map → button-hover-border-gradient-B2ebbDek.mjs.map} +1 -1
  83. package/dist/chunks/{button-hover-border-gradient-ssmwU5-U.cjs → button-hover-border-gradient-DGZqd8je.cjs} +2 -2
  84. package/dist/chunks/{button-hover-border-gradient-ssmwU5-U.cjs.map → button-hover-border-gradient-DGZqd8je.cjs.map} +1 -1
  85. package/dist/chunks/{button-C4MXPxsC.cjs → button-uD87K76W.cjs} +3 -2
  86. package/dist/chunks/button-uD87K76W.cjs.map +1 -0
  87. package/dist/chunks/{calendar-CQJgQ5H_.cjs → calendar-DCkikZYb.cjs} +2 -2
  88. package/dist/chunks/{calendar-CQJgQ5H_.cjs.map → calendar-DCkikZYb.cjs.map} +1 -1
  89. package/dist/chunks/{calendar-5XzPqKbE.mjs → calendar-FxAmm_ao.mjs} +2 -2
  90. package/dist/chunks/{calendar-5XzPqKbE.mjs.map → calendar-FxAmm_ao.mjs.map} +1 -1
  91. package/dist/chunks/{card-RrT68nvu.cjs → card-Cuud0jIt.cjs} +1 -1
  92. package/dist/chunks/{card-RrT68nvu.cjs.map → card-Cuud0jIt.cjs.map} +1 -1
  93. package/dist/chunks/{card-BId1_zHw.mjs → card-DNeC6jqk.mjs} +1 -1
  94. package/dist/chunks/{card-BId1_zHw.mjs.map → card-DNeC6jqk.mjs.map} +1 -1
  95. package/dist/chunks/{carousel-Dd4rp-jr.mjs → carousel-Dpe5QLJK.mjs} +2 -2
  96. package/dist/chunks/{carousel-Dd4rp-jr.mjs.map → carousel-Dpe5QLJK.mjs.map} +1 -1
  97. package/dist/chunks/{carousel-Cv0m1Pp5.cjs → carousel-xHkrV_pt.cjs} +2 -2
  98. package/dist/chunks/{carousel-Cv0m1Pp5.cjs.map → carousel-xHkrV_pt.cjs.map} +1 -1
  99. package/dist/chunks/chartStyles-BADmRKZo.cjs +108 -0
  100. package/dist/chunks/chartStyles-BADmRKZo.cjs.map +1 -0
  101. package/dist/chunks/chartStyles-DPXgYmGn.mjs +55 -0
  102. package/dist/chunks/chartStyles-DPXgYmGn.mjs.map +1 -0
  103. package/dist/chunks/{charts-DkVu0rFc.mjs → charts-C-KQ3Nk5.mjs} +3 -54
  104. package/dist/chunks/charts-C-KQ3Nk5.mjs.map +1 -0
  105. package/dist/chunks/{charts-BmIV-mJy.cjs → charts-COx3IbI2.cjs} +42 -93
  106. package/dist/chunks/charts-COx3IbI2.cjs.map +1 -0
  107. package/dist/chunks/{checkbox-D8ivRZ1x.cjs → checkbox-CDknzh89.cjs} +1 -1
  108. package/dist/chunks/{checkbox-D8ivRZ1x.cjs.map → checkbox-CDknzh89.cjs.map} +1 -1
  109. package/dist/chunks/{checkbox-3aB7XC9_.mjs → checkbox-Y04NlzB8.mjs} +1 -1
  110. package/dist/chunks/{checkbox-3aB7XC9_.mjs.map → checkbox-Y04NlzB8.mjs.map} +1 -1
  111. package/dist/chunks/{chip-CqcdcSs2.mjs → chip-B3j6R6sO.mjs} +3 -3
  112. package/dist/chunks/{chip-CqcdcSs2.mjs.map → chip-B3j6R6sO.mjs.map} +1 -1
  113. package/dist/chunks/{chip-B0YzBwkz.cjs → chip-sfQlzrbo.cjs} +3 -3
  114. package/dist/chunks/{chip-B0YzBwkz.cjs.map → chip-sfQlzrbo.cjs.map} +1 -1
  115. package/dist/chunks/{chroma-grid-opB2DBtS.mjs → chroma-grid-BHS9qAn_.mjs} +1 -1
  116. package/dist/chunks/{chroma-grid-opB2DBtS.mjs.map → chroma-grid-BHS9qAn_.mjs.map} +1 -1
  117. package/dist/chunks/{chroma-grid-DcZ9f4Ui.cjs → chroma-grid-Bp55pKEm.cjs} +1 -1
  118. package/dist/chunks/{chroma-grid-DcZ9f4Ui.cjs.map → chroma-grid-Bp55pKEm.cjs.map} +1 -1
  119. package/dist/chunks/{color-palette-C3lesasJ.mjs → color-palette-D9Qlw2Cx.mjs} +1 -1
  120. package/dist/chunks/{color-palette-C3lesasJ.mjs.map → color-palette-D9Qlw2Cx.mjs.map} +1 -1
  121. package/dist/chunks/{color-palette-pLh6En3n.cjs → color-palette-Duud5Iqq.cjs} +1 -1
  122. package/dist/chunks/{color-palette-pLh6En3n.cjs.map → color-palette-Duud5Iqq.cjs.map} +1 -1
  123. package/dist/chunks/{combobox-CtNrGmuR.cjs → combobox-C3a2iogC.cjs} +4 -4
  124. package/dist/chunks/{combobox-CtNrGmuR.cjs.map → combobox-C3a2iogC.cjs.map} +1 -1
  125. package/dist/chunks/{combobox-B6yk5U82.mjs → combobox-neBItbtz.mjs} +4 -4
  126. package/dist/chunks/{combobox-B6yk5U82.mjs.map → combobox-neBItbtz.mjs.map} +1 -1
  127. package/dist/chunks/dashboard-cards-BnPt0gDW.mjs +2428 -0
  128. package/dist/chunks/dashboard-cards-BnPt0gDW.mjs.map +1 -0
  129. package/dist/chunks/dashboard-cards-DNWJPKRu.cjs +2524 -0
  130. package/dist/chunks/dashboard-cards-DNWJPKRu.cjs.map +1 -0
  131. package/dist/chunks/{data-table-fAEuevPn.cjs → data-table-BZEiSZI2.cjs} +48 -36
  132. package/dist/chunks/data-table-BZEiSZI2.cjs.map +1 -0
  133. package/dist/chunks/{data-table-Dtf6lKpp.mjs → data-table-EfGKkerd.mjs} +47 -35
  134. package/dist/chunks/data-table-EfGKkerd.mjs.map +1 -0
  135. package/dist/chunks/{date-picker-BmQ0rgwH.mjs → date-picker-3IDSmb9Z.mjs} +3 -3
  136. package/dist/chunks/{date-picker-BmQ0rgwH.mjs.map → date-picker-3IDSmb9Z.mjs.map} +1 -1
  137. package/dist/chunks/{date-picker-qpUZMtZC.cjs → date-picker-_EVYpGga.cjs} +3 -3
  138. package/dist/chunks/{date-picker-qpUZMtZC.cjs.map → date-picker-_EVYpGga.cjs.map} +1 -1
  139. package/dist/chunks/{dialog-DSyq6MS3.mjs → dialog-B60BjJz0.mjs} +3 -3
  140. package/dist/chunks/{dialog-DSyq6MS3.mjs.map → dialog-B60BjJz0.mjs.map} +1 -1
  141. package/dist/chunks/{dialog-J2ZTSTpL.cjs → dialog-i9LdkXmF.cjs} +3 -3
  142. package/dist/chunks/{dialog-J2ZTSTpL.cjs.map → dialog-i9LdkXmF.cjs.map} +1 -1
  143. package/dist/chunks/event-calendar-BbFOUDov.mjs +1191 -0
  144. package/dist/chunks/event-calendar-BbFOUDov.mjs.map +1 -0
  145. package/dist/chunks/event-calendar-Bljd_7PI.cjs +1209 -0
  146. package/dist/chunks/event-calendar-Bljd_7PI.cjs.map +1 -0
  147. package/dist/chunks/{form-CtZ6U-_B.mjs → form-CDc9UM3r.mjs} +1 -1
  148. package/dist/chunks/{form-CtZ6U-_B.mjs.map → form-CDc9UM3r.mjs.map} +1 -1
  149. package/dist/chunks/{form-X6Vyaavl.cjs → form-DGwdlSW2.cjs} +1 -1
  150. package/dist/chunks/{form-X6Vyaavl.cjs.map → form-DGwdlSW2.cjs.map} +1 -1
  151. package/dist/chunks/{gradual-blur-C6NOnjTw.cjs → gradual-blur-BNYVlqb1.cjs} +1 -1
  152. package/dist/chunks/{gradual-blur-C6NOnjTw.cjs.map → gradual-blur-BNYVlqb1.cjs.map} +1 -1
  153. package/dist/chunks/{gradual-blur-DXfxpCdB.mjs → gradual-blur-Bw2KNmXb.mjs} +1 -1
  154. package/dist/chunks/{gradual-blur-DXfxpCdB.mjs.map → gradual-blur-Bw2KNmXb.mjs.map} +1 -1
  155. package/dist/chunks/{hover-card--rplmsA_.cjs → hover-card-Dp6Y2h2J.cjs} +1 -1
  156. package/dist/chunks/{hover-card--rplmsA_.cjs.map → hover-card-Dp6Y2h2J.cjs.map} +1 -1
  157. package/dist/chunks/{hover-card-C88rU-nW.mjs → hover-card-G66SUyjq.mjs} +1 -1
  158. package/dist/chunks/{hover-card-C88rU-nW.mjs.map → hover-card-G66SUyjq.mjs.map} +1 -1
  159. package/dist/chunks/{icons-bx3nrxNv.mjs → icons-JzMKLygv.mjs} +2 -43
  160. package/dist/chunks/icons-JzMKLygv.mjs.map +1 -0
  161. package/dist/chunks/{icons-CRanVZB1.cjs → icons-ub9iu-JG.cjs} +1 -48
  162. package/dist/chunks/icons-ub9iu-JG.cjs.map +1 -0
  163. package/dist/chunks/{input-Bqo9Q5zF.mjs → input-CRc3MKb_.mjs} +3 -3
  164. package/dist/chunks/{input-Bqo9Q5zF.mjs.map → input-CRc3MKb_.mjs.map} +1 -1
  165. package/dist/chunks/{input-DkCPyWXi.cjs → input-DMTwz27q.cjs} +3 -3
  166. package/dist/chunks/{input-DkCPyWXi.cjs.map → input-DMTwz27q.cjs.map} +1 -1
  167. package/dist/chunks/{label-BKzqfAAq.cjs → label-B5Ugq0Nk.cjs} +1 -1
  168. package/dist/chunks/{label-BKzqfAAq.cjs.map → label-B5Ugq0Nk.cjs.map} +1 -1
  169. package/dist/chunks/{label-Drxg0cG2.mjs → label-Bc_r54NU.mjs} +1 -1
  170. package/dist/chunks/{label-Drxg0cG2.mjs.map → label-Bc_r54NU.mjs.map} +1 -1
  171. package/dist/chunks/{loading-BiM4mKh6.cjs → loading-DZKJc3e7.cjs} +2 -2
  172. package/dist/chunks/{loading-BiM4mKh6.cjs.map → loading-DZKJc3e7.cjs.map} +1 -1
  173. package/dist/chunks/{loading-Dtosnb4A.mjs → loading-ll2L6lc7.mjs} +2 -2
  174. package/dist/chunks/{loading-Dtosnb4A.mjs.map → loading-ll2L6lc7.mjs.map} +1 -1
  175. package/dist/chunks/{multi-select-combobox-C0DoDzxQ.cjs → multi-select-combobox-CFJGq1hn.cjs} +3 -3
  176. package/dist/chunks/{multi-select-combobox-C0DoDzxQ.cjs.map → multi-select-combobox-CFJGq1hn.cjs.map} +1 -1
  177. package/dist/chunks/{multi-select-combobox-Do23ZfOQ.mjs → multi-select-combobox-C_8sxaiL.mjs} +3 -3
  178. package/dist/chunks/{multi-select-combobox-Do23ZfOQ.mjs.map → multi-select-combobox-C_8sxaiL.mjs.map} +1 -1
  179. package/dist/chunks/{otp-input-CkhV-sGl.cjs → otp-input-B5-tuc0q.cjs} +1 -1
  180. package/dist/chunks/{otp-input-CkhV-sGl.cjs.map → otp-input-B5-tuc0q.cjs.map} +1 -1
  181. package/dist/chunks/{otp-input-JOysxKfD.mjs → otp-input-BpcTJOmU.mjs} +1 -1
  182. package/dist/chunks/{otp-input-JOysxKfD.mjs.map → otp-input-BpcTJOmU.mjs.map} +1 -1
  183. package/dist/chunks/{overlay-BzkUmjQ-.mjs → overlay-CG1dMYtO.mjs} +1 -1
  184. package/dist/chunks/{overlay-BzkUmjQ-.mjs.map → overlay-CG1dMYtO.mjs.map} +1 -1
  185. package/dist/chunks/{overlay-DNnZywyR.cjs → overlay-DzE_GyYf.cjs} +1 -1
  186. package/dist/chunks/{overlay-DNnZywyR.cjs.map → overlay-DzE_GyYf.cjs.map} +1 -1
  187. package/dist/chunks/{password-strength-meter-BsvqQBAg.mjs → password-strength-meter-CH6uQAuK.mjs} +2 -2
  188. package/dist/chunks/{password-strength-meter-BsvqQBAg.mjs.map → password-strength-meter-CH6uQAuK.mjs.map} +1 -1
  189. package/dist/chunks/{password-strength-meter-DCi_BP7e.cjs → password-strength-meter-_o1T1HLO.cjs} +2 -2
  190. package/dist/chunks/{password-strength-meter-DCi_BP7e.cjs.map → password-strength-meter-_o1T1HLO.cjs.map} +1 -1
  191. package/dist/chunks/{progress-bar-DQ5ZKk2Y.mjs → progress-bar-BAvRSW1b.mjs} +1 -1
  192. package/dist/chunks/{progress-bar-DQ5ZKk2Y.mjs.map → progress-bar-BAvRSW1b.mjs.map} +1 -1
  193. package/dist/chunks/{progress-bar-CYaBO_lS.cjs → progress-bar-FfdFVvTT.cjs} +1 -1
  194. package/dist/chunks/{progress-bar-CYaBO_lS.cjs.map → progress-bar-FfdFVvTT.cjs.map} +1 -1
  195. package/dist/chunks/{radio-CuiM_gDv.mjs → radio-BMOnxnUS.mjs} +1 -1
  196. package/dist/chunks/{radio-CuiM_gDv.mjs.map → radio-BMOnxnUS.mjs.map} +1 -1
  197. package/dist/chunks/{radio-zx9xEW_C.cjs → radio-wagafWwx.cjs} +1 -1
  198. package/dist/chunks/{radio-zx9xEW_C.cjs.map → radio-wagafWwx.cjs.map} +1 -1
  199. package/dist/chunks/{select-CUaSNR09.mjs → select--DeSgPdn.mjs} +4 -4
  200. package/dist/chunks/{select-CUaSNR09.mjs.map → select--DeSgPdn.mjs.map} +1 -1
  201. package/dist/chunks/{select-bZ9WqLOc.cjs → select-zFFyNmlY.cjs} +4 -4
  202. package/dist/chunks/{select-bZ9WqLOc.cjs.map → select-zFFyNmlY.cjs.map} +1 -1
  203. package/dist/chunks/{sidebar-3i4mGE6T.cjs → sidebar-Cq7UbKJT.cjs} +6 -6
  204. package/dist/chunks/{sidebar-3i4mGE6T.cjs.map → sidebar-Cq7UbKJT.cjs.map} +1 -1
  205. package/dist/chunks/{sidebar-Dhf_Arae.mjs → sidebar-oemmRzCL.mjs} +6 -6
  206. package/dist/chunks/{sidebar-Dhf_Arae.mjs.map → sidebar-oemmRzCL.mjs.map} +1 -1
  207. package/dist/chunks/{skeleton-nH1eAN96.mjs → skeleton-BsDMlWZG.mjs} +1 -1
  208. package/dist/chunks/{skeleton-nH1eAN96.mjs.map → skeleton-BsDMlWZG.mjs.map} +1 -1
  209. package/dist/chunks/{skeleton-DCBGLNAZ.cjs → skeleton-DWvVc17T.cjs} +1 -1
  210. package/dist/chunks/{skeleton-DCBGLNAZ.cjs.map → skeleton-DWvVc17T.cjs.map} +1 -1
  211. package/dist/chunks/{spinners-C9acUulz.cjs → spinners-DBAJliAj.cjs} +2 -2
  212. package/dist/chunks/{spinners-C9acUulz.cjs.map → spinners-DBAJliAj.cjs.map} +1 -1
  213. package/dist/chunks/{spinners-g6_Up5Rb.mjs → spinners-DlMcokJa.mjs} +2 -2
  214. package/dist/chunks/{spinners-g6_Up5Rb.mjs.map → spinners-DlMcokJa.mjs.map} +1 -1
  215. package/dist/chunks/{splash-cursor-N4FdnkOa.mjs → splash-cursor-Bb7LSzaO.mjs} +1 -1
  216. package/dist/chunks/{splash-cursor-N4FdnkOa.mjs.map → splash-cursor-Bb7LSzaO.mjs.map} +1 -1
  217. package/dist/chunks/{splash-cursor-BqG7ClsJ.cjs → splash-cursor-CQ6_HwHV.cjs} +1 -1
  218. package/dist/chunks/{splash-cursor-BqG7ClsJ.cjs.map → splash-cursor-CQ6_HwHV.cjs.map} +1 -1
  219. package/dist/chunks/{spotlight-card-D9Z3nTmb.mjs → spotlight-card-Bs0iiSLc.mjs} +1 -1
  220. package/dist/chunks/{spotlight-card-D9Z3nTmb.mjs.map → spotlight-card-Bs0iiSLc.mjs.map} +1 -1
  221. package/dist/chunks/{spotlight-card-BmsqC7wm.cjs → spotlight-card-COfSD7ns.cjs} +1 -1
  222. package/dist/chunks/{spotlight-card-BmsqC7wm.cjs.map → spotlight-card-COfSD7ns.cjs.map} +1 -1
  223. package/dist/chunks/{stepper-Jv5OS1nY.mjs → stepper-B9NdZ6ZV.mjs} +4 -4
  224. package/dist/chunks/{stepper-Jv5OS1nY.mjs.map → stepper-B9NdZ6ZV.mjs.map} +1 -1
  225. package/dist/chunks/{stepper-DepvEGfr.cjs → stepper-CTteR-Kj.cjs} +4 -4
  226. package/dist/chunks/{stepper-DepvEGfr.cjs.map → stepper-CTteR-Kj.cjs.map} +1 -1
  227. package/dist/chunks/{sun-to-moon-button-BJtBEaa3.mjs → sun-to-moon-button-DWHDpP5B.mjs} +2 -2
  228. package/dist/chunks/{sun-to-moon-button-BJtBEaa3.mjs.map → sun-to-moon-button-DWHDpP5B.mjs.map} +1 -1
  229. package/dist/chunks/{sun-to-moon-button-PwgTPsTW.cjs → sun-to-moon-button-lt-1vmWm.cjs} +2 -2
  230. package/dist/chunks/{sun-to-moon-button-PwgTPsTW.cjs.map → sun-to-moon-button-lt-1vmWm.cjs.map} +1 -1
  231. package/dist/chunks/{switch-iPsN1NS2.mjs → switch--68scepb.mjs} +1 -1
  232. package/dist/chunks/{switch-iPsN1NS2.mjs.map → switch--68scepb.mjs.map} +1 -1
  233. package/dist/chunks/{switch-X3l8xnle.cjs → switch-BbFl5b4t.cjs} +1 -1
  234. package/dist/chunks/{switch-X3l8xnle.cjs.map → switch-BbFl5b4t.cjs.map} +1 -1
  235. package/dist/chunks/{textarea-Bdo-Trvi.mjs → textarea-CEj9voUJ.mjs} +1 -1
  236. package/dist/chunks/{textarea-Bdo-Trvi.mjs.map → textarea-CEj9voUJ.mjs.map} +1 -1
  237. package/dist/chunks/{textarea-CGRl2hrM.cjs → textarea-U_JeSWI3.cjs} +1 -1
  238. package/dist/chunks/{textarea-CGRl2hrM.cjs.map → textarea-U_JeSWI3.cjs.map} +1 -1
  239. package/dist/chunks/{toast-DiFgv3IL.cjs → toast-2yq4Q7-q.cjs} +2 -2
  240. package/dist/chunks/{toast-DiFgv3IL.cjs.map → toast-2yq4Q7-q.cjs.map} +1 -1
  241. package/dist/chunks/{toast-BcBidy5n.mjs → toast-CyY8VZN7.mjs} +2 -2
  242. package/dist/chunks/{toast-BcBidy5n.mjs.map → toast-CyY8VZN7.mjs.map} +1 -1
  243. package/dist/chunks/{truncated-text-BIXqNfOL.cjs → truncated-text-CswjmrHZ.cjs} +1 -1
  244. package/dist/chunks/{truncated-text-BIXqNfOL.cjs.map → truncated-text-CswjmrHZ.cjs.map} +1 -1
  245. package/dist/chunks/{truncated-text-C9t9o9IA.mjs → truncated-text-DUYTW1KP.mjs} +1 -1
  246. package/dist/chunks/{truncated-text-C9t9o9IA.mjs.map → truncated-text-DUYTW1KP.mjs.map} +1 -1
  247. package/dist/chunks/{typography-LwwY_MOy.cjs → typography-CFIiYk1d.cjs} +1 -1
  248. package/dist/chunks/{typography-LwwY_MOy.cjs.map → typography-CFIiYk1d.cjs.map} +1 -1
  249. package/dist/chunks/{typography-Ct-jDJP3.mjs → typography-DHE9sUZ8.mjs} +1 -1
  250. package/dist/chunks/{typography-Ct-jDJP3.mjs.map → typography-DHE9sUZ8.mjs.map} +1 -1
  251. package/dist/color-palette.cjs +1 -1
  252. package/dist/color-palette.mjs +1 -1
  253. package/dist/combobox.cjs +1 -1
  254. package/dist/combobox.mjs +1 -1
  255. package/dist/components/data-display/charts/chartPalette.d.ts +1 -1
  256. package/dist/components/data-display/dashboard-cards/DeviceSalesCard.d.ts +25 -0
  257. package/dist/components/data-display/dashboard-cards/DeviceSalesCard.d.ts.map +1 -0
  258. package/dist/components/data-display/dashboard-cards/EarningReportsTabsCard.d.ts +34 -0
  259. package/dist/components/data-display/dashboard-cards/EarningReportsTabsCard.d.ts.map +1 -0
  260. package/dist/components/data-display/dashboard-cards/EarningsCard.d.ts +43 -0
  261. package/dist/components/data-display/dashboard-cards/EarningsCard.d.ts.map +1 -0
  262. package/dist/components/data-display/dashboard-cards/ExpensesCard.d.ts +26 -0
  263. package/dist/components/data-display/dashboard-cards/ExpensesCard.d.ts.map +1 -0
  264. package/dist/components/data-display/dashboard-cards/IncomeExpenseCard.d.ts +30 -0
  265. package/dist/components/data-display/dashboard-cards/IncomeExpenseCard.d.ts.map +1 -0
  266. package/dist/components/data-display/dashboard-cards/RevenueGrowthCard.d.ts +26 -0
  267. package/dist/components/data-display/dashboard-cards/RevenueGrowthCard.d.ts.map +1 -0
  268. package/dist/components/data-display/dashboard-cards/SalesOverviewCard.d.ts +33 -0
  269. package/dist/components/data-display/dashboard-cards/SalesOverviewCard.d.ts.map +1 -0
  270. package/dist/components/data-display/dashboard-cards/ShipmentStatisticsCard.d.ts +33 -0
  271. package/dist/components/data-display/dashboard-cards/ShipmentStatisticsCard.d.ts.map +1 -0
  272. package/dist/components/data-display/dashboard-cards/StockAvailabilityCard.d.ts +24 -0
  273. package/dist/components/data-display/dashboard-cards/StockAvailabilityCard.d.ts.map +1 -0
  274. package/dist/components/data-display/dashboard-cards/SupportTrackerCard.d.ts +25 -0
  275. package/dist/components/data-display/dashboard-cards/SupportTrackerCard.d.ts.map +1 -0
  276. package/dist/components/data-display/dashboard-cards/TopicsCard.d.ts +18 -0
  277. package/dist/components/data-display/dashboard-cards/TopicsCard.d.ts.map +1 -0
  278. package/dist/components/data-display/dashboard-cards/VehicleConditionCard.d.ts +20 -0
  279. package/dist/components/data-display/dashboard-cards/VehicleConditionCard.d.ts.map +1 -0
  280. package/dist/components/data-display/dashboard-cards/VehiclesOverviewCard.d.ts +21 -0
  281. package/dist/components/data-display/dashboard-cards/VehiclesOverviewCard.d.ts.map +1 -0
  282. package/dist/components/data-display/dashboard-cards/index.d.ts +26 -0
  283. package/dist/components/data-display/dashboard-cards/index.d.ts.map +1 -1
  284. package/dist/components/data-display/data-table/DataTable.d.ts.map +1 -1
  285. package/dist/components/data-display/data-table/DataTableControls.d.ts.map +1 -1
  286. package/dist/components/data-display/event-calendar/AddEventPanel.d.ts +11 -0
  287. package/dist/components/data-display/event-calendar/AddEventPanel.d.ts.map +1 -0
  288. package/dist/components/data-display/event-calendar/CalendarHeader.d.ts +13 -0
  289. package/dist/components/data-display/event-calendar/CalendarHeader.d.ts.map +1 -0
  290. package/dist/components/data-display/event-calendar/CalendarSidebar.d.ts +13 -0
  291. package/dist/components/data-display/event-calendar/CalendarSidebar.d.ts.map +1 -0
  292. package/dist/components/data-display/event-calendar/EventCalendar.d.ts +3 -0
  293. package/dist/components/data-display/event-calendar/EventCalendar.d.ts.map +1 -0
  294. package/dist/components/data-display/event-calendar/EventDetailDrawer.d.ts +10 -0
  295. package/dist/components/data-display/event-calendar/EventDetailDrawer.d.ts.map +1 -0
  296. package/dist/components/data-display/event-calendar/EventFilterList.d.ts +9 -0
  297. package/dist/components/data-display/event-calendar/EventFilterList.d.ts.map +1 -0
  298. package/dist/components/data-display/event-calendar/EventPill.d.ts +10 -0
  299. package/dist/components/data-display/event-calendar/EventPill.d.ts.map +1 -0
  300. package/dist/components/data-display/event-calendar/MiniCalendarPicker.d.ts +9 -0
  301. package/dist/components/data-display/event-calendar/MiniCalendarPicker.d.ts.map +1 -0
  302. package/dist/components/data-display/event-calendar/calendarUtils.d.ts +27 -0
  303. package/dist/components/data-display/event-calendar/calendarUtils.d.ts.map +1 -0
  304. package/dist/components/data-display/event-calendar/index.d.ts +4 -0
  305. package/dist/components/data-display/event-calendar/index.d.ts.map +1 -0
  306. package/dist/components/data-display/event-calendar/types.d.ts +52 -0
  307. package/dist/components/data-display/event-calendar/types.d.ts.map +1 -0
  308. package/dist/components/data-display/event-calendar/views/DayView.d.ts +10 -0
  309. package/dist/components/data-display/event-calendar/views/DayView.d.ts.map +1 -0
  310. package/dist/components/data-display/event-calendar/views/ListView.d.ts +10 -0
  311. package/dist/components/data-display/event-calendar/views/ListView.d.ts.map +1 -0
  312. package/dist/components/data-display/event-calendar/views/MonthView.d.ts +11 -0
  313. package/dist/components/data-display/event-calendar/views/MonthView.d.ts.map +1 -0
  314. package/dist/components/data-display/event-calendar/views/WeekView.d.ts +10 -0
  315. package/dist/components/data-display/event-calendar/views/WeekView.d.ts.map +1 -0
  316. package/dist/components/forms/button/Button.d.ts.map +1 -1
  317. package/dist/components/overlays/tooltip/Tooltip.d.ts +3 -1
  318. package/dist/components/overlays/tooltip/Tooltip.d.ts.map +1 -1
  319. package/dist/dashboard-cards.cjs +18 -0
  320. package/dist/dashboard-cards.d.ts +2 -0
  321. package/dist/dashboard-cards.mjs +2 -0
  322. package/dist/data-table.cjs +1 -1
  323. package/dist/data-table.mjs +1 -1
  324. package/dist/date-picker.cjs +1 -1
  325. package/dist/date-picker.mjs +1 -1
  326. package/dist/dialog.cjs +1 -1
  327. package/dist/dialog.mjs +1 -1
  328. package/dist/docs.cjs +31 -0
  329. package/dist/docs.cjs.map +1 -1
  330. package/dist/docs.d.ts.map +1 -1
  331. package/dist/docs.mjs +31 -0
  332. package/dist/docs.mjs.map +1 -1
  333. package/dist/drawer.cjs +2 -2
  334. package/dist/drawer.mjs +1 -1
  335. package/dist/event-calendar.cjs +5 -0
  336. package/dist/event-calendar.d.ts +2 -0
  337. package/dist/event-calendar.mjs +2 -0
  338. package/dist/form.cjs +1 -1
  339. package/dist/form.mjs +1 -1
  340. package/dist/gradual-blur.cjs +1 -1
  341. package/dist/gradual-blur.mjs +1 -1
  342. package/dist/hover-border-gradient.cjs +1 -1
  343. package/dist/hover-border-gradient.mjs +1 -1
  344. package/dist/hover-card.cjs +1 -1
  345. package/dist/hover-card.mjs +1 -1
  346. package/dist/icons.cjs +3 -2
  347. package/dist/icons.mjs +2 -1
  348. package/dist/index.cjs +74 -330
  349. package/dist/index.cjs.map +1 -1
  350. package/dist/index.d.ts +5 -2
  351. package/dist/index.d.ts.map +1 -1
  352. package/dist/index.mjs +55 -327
  353. package/dist/index.mjs.map +1 -1
  354. package/dist/input.cjs +1 -1
  355. package/dist/input.mjs +1 -1
  356. package/dist/label.cjs +1 -1
  357. package/dist/label.mjs +1 -1
  358. package/dist/loading.cjs +1 -1
  359. package/dist/loading.mjs +1 -1
  360. package/dist/multi-select-combobox.cjs +1 -1
  361. package/dist/multi-select-combobox.mjs +1 -1
  362. package/dist/otp-input.cjs +1 -1
  363. package/dist/otp-input.mjs +1 -1
  364. package/dist/password-strength-meter.cjs +1 -1
  365. package/dist/password-strength-meter.mjs +1 -1
  366. package/dist/progress-bar.cjs +1 -1
  367. package/dist/progress-bar.mjs +1 -1
  368. package/dist/radio.cjs +1 -1
  369. package/dist/radio.mjs +1 -1
  370. package/dist/select.cjs +1 -1
  371. package/dist/select.mjs +1 -1
  372. package/dist/sidebar.cjs +1 -1
  373. package/dist/sidebar.mjs +1 -1
  374. package/dist/skeleton.cjs +1 -1
  375. package/dist/skeleton.mjs +1 -1
  376. package/dist/spinners.cjs +1 -1
  377. package/dist/spinners.mjs +1 -1
  378. package/dist/splash-cursor.cjs +1 -1
  379. package/dist/splash-cursor.mjs +1 -1
  380. package/dist/spotlight-card.cjs +1 -1
  381. package/dist/spotlight-card.mjs +1 -1
  382. package/dist/stepper.cjs +1 -1
  383. package/dist/stepper.mjs +1 -1
  384. package/dist/sun-to-moon-button.cjs +2 -2
  385. package/dist/sun-to-moon-button.mjs +2 -2
  386. package/dist/switch.cjs +1 -1
  387. package/dist/switch.mjs +1 -1
  388. package/dist/textarea.cjs +1 -1
  389. package/dist/textarea.mjs +1 -1
  390. package/dist/toast.cjs +1 -1
  391. package/dist/toast.mjs +1 -1
  392. package/dist/tooltip.cjs +1 -1
  393. package/dist/tooltip.mjs +1 -1
  394. package/dist/truncated-text.cjs +1 -1
  395. package/dist/truncated-text.mjs +1 -1
  396. package/dist/typography.cjs +1 -1
  397. package/dist/typography.mjs +1 -1
  398. package/package.json +17 -5
  399. package/dist/chunks/Tooltip-DD30yj3A.cjs.map +0 -1
  400. package/dist/chunks/Tooltip-DK3B879v.mjs.map +0 -1
  401. package/dist/chunks/button-A6UTvrOu.mjs.map +0 -1
  402. package/dist/chunks/button-C4MXPxsC.cjs.map +0 -1
  403. package/dist/chunks/charts-BmIV-mJy.cjs.map +0 -1
  404. package/dist/chunks/charts-DkVu0rFc.mjs.map +0 -1
  405. package/dist/chunks/data-table-Dtf6lKpp.mjs.map +0 -1
  406. package/dist/chunks/data-table-fAEuevPn.cjs.map +0 -1
  407. package/dist/chunks/icons-CRanVZB1.cjs.map +0 -1
  408. package/dist/chunks/icons-bx3nrxNv.mjs.map +0 -1
@@ -0,0 +1,2428 @@
1
+ import { n as mergeClassNames } from "./utils-7S0u48mU.mjs";
2
+ import { a as chartTooltipContentStyle, c as chartTooltipWrapperStyle, o as chartTooltipItemStyle, s as chartTooltipLabelStyle } from "./chartStyles-DPXgYmGn.mjs";
3
+ import { t as TruncatedText } from "./truncated-text-DUYTW1KP.mjs";
4
+ import { t as EllipsisVerticalIcon } from "./EllipsisVerticalIcon-C2b2KMfE.mjs";
5
+ import { t as Button } from "./button-IDShmQqA.mjs";
6
+ import { t as Tooltip$1 } from "./Tooltip-LbOKP__2.mjs";
7
+ import { useEffect, useRef, useState } from "react";
8
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
+ import { Bar, BarChart, CartesianGrid, Cell, ComposedChart, LabelList, Line, Pie, PieChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts";
10
+ //#region src/components/data-display/dashboard-cards/StatCard.tsx
11
+ var TrendBadge$3 = ({ value, direction }) => {
12
+ const isUp = direction === "up";
13
+ const color = isUp ? "var(--ds-color-success)" : "var(--ds-color-danger)";
14
+ return /* @__PURE__ */ jsxs("span", {
15
+ className: "inline-flex items-center gap-1 rounded-sm border px-1 py-0.5 text-[11px] font-semibold leading-none",
16
+ style: {
17
+ color,
18
+ borderColor: color,
19
+ backgroundColor: isUp ? "var(--ds-color-success-subtle)" : "var(--ds-color-danger-subtle)"
20
+ },
21
+ "aria-label": `${value} ${isUp ? "increase" : "decrease"}`,
22
+ children: [value, /* @__PURE__ */ jsx("svg", {
23
+ width: "10",
24
+ height: "10",
25
+ viewBox: "0 0 10 10",
26
+ fill: "none",
27
+ "aria-hidden": "true",
28
+ children: isUp ? /* @__PURE__ */ jsx("path", {
29
+ d: "M5 8V2M5 2L2 5M5 2L8 5",
30
+ stroke: "currentColor",
31
+ strokeWidth: "1.5",
32
+ strokeLinecap: "round",
33
+ strokeLinejoin: "round"
34
+ }) : /* @__PURE__ */ jsx("path", {
35
+ d: "M5 2V8M5 8L2 5M5 8L8 5",
36
+ stroke: "currentColor",
37
+ strokeWidth: "1.5",
38
+ strokeLinecap: "round",
39
+ strokeLinejoin: "round"
40
+ })
41
+ })]
42
+ });
43
+ };
44
+ var MenuButton = ({ onClick }) => /* @__PURE__ */ jsx(Button, {
45
+ variant: "tertiary",
46
+ size: "small",
47
+ className: "shrink-0 p-0.5! text-ds-3",
48
+ "aria-label": "More options",
49
+ onClick,
50
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
51
+ width: 18,
52
+ height: 18
53
+ })
54
+ });
55
+ var LegendDots = ({ items }) => /* @__PURE__ */ jsx("div", {
56
+ className: "flex items-center gap-3",
57
+ children: items.map((item) => /* @__PURE__ */ jsxs("span", {
58
+ className: "flex items-center gap-1.5 text-xs text-ds-2",
59
+ children: [/* @__PURE__ */ jsx("span", {
60
+ className: "inline-block h-2.5 w-2.5 shrink-0 rounded-full",
61
+ style: { backgroundColor: item.color },
62
+ "aria-hidden": "true"
63
+ }), item.label]
64
+ }, item.label))
65
+ });
66
+ var StatCard = ({ size = "md", title, badge, value, dateRange, chart, chartPosition = "side", chartClassName, legend, className, onMenuClick }) => {
67
+ const base = mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className);
68
+ if (size === "sm") return /* @__PURE__ */ jsxs("div", {
69
+ className: mergeClassNames(base, "flex flex-col gap-7 p-5"),
70
+ children: [/* @__PURE__ */ jsxs("div", {
71
+ className: "flex items-start justify-between gap-2",
72
+ children: [/* @__PURE__ */ jsxs("div", {
73
+ className: "flex flex-wrap items-center gap-2",
74
+ children: [/* @__PURE__ */ jsx("span", {
75
+ className: "text-sm font-semibold text-ds-1",
76
+ children: title
77
+ }), badge && /* @__PURE__ */ jsx(TrendBadge$3, {
78
+ value: badge.value,
79
+ direction: badge.direction
80
+ })]
81
+ }), /* @__PURE__ */ jsx(MenuButton, { onClick: onMenuClick })]
82
+ }), /* @__PURE__ */ jsxs("div", {
83
+ className: "flex flex-col gap-1",
84
+ children: [/* @__PURE__ */ jsx("p", {
85
+ className: "text-2xl font-bold tracking-tight text-ds-1 leading-none",
86
+ children: value
87
+ }), /* @__PURE__ */ jsx("p", {
88
+ className: "text-[10px] text-ds-3 mt-1",
89
+ children: dateRange
90
+ })]
91
+ })]
92
+ });
93
+ if (size === "md") {
94
+ const metricBlock = /* @__PURE__ */ jsxs("div", {
95
+ className: "flex flex-col gap-1 min-w-0",
96
+ children: [/* @__PURE__ */ jsx("p", {
97
+ className: "text-3xl font-bold tracking-tight text-ds-1 leading-none",
98
+ children: value
99
+ }), /* @__PURE__ */ jsx("p", {
100
+ className: "text-[10px] text-ds-3 mt-1",
101
+ children: dateRange
102
+ })]
103
+ });
104
+ return /* @__PURE__ */ jsxs("div", {
105
+ className: mergeClassNames(base, "flex flex-col gap-3 p-5"),
106
+ children: [/* @__PURE__ */ jsxs("div", {
107
+ className: "flex items-start justify-between gap-2",
108
+ children: [/* @__PURE__ */ jsxs("div", {
109
+ className: "flex flex-wrap items-center gap-2",
110
+ children: [/* @__PURE__ */ jsx("span", {
111
+ className: "text-sm font-semibold text-ds-1",
112
+ children: title
113
+ }), badge && /* @__PURE__ */ jsx(TrendBadge$3, {
114
+ value: badge.value,
115
+ direction: badge.direction
116
+ })]
117
+ }), /* @__PURE__ */ jsx(MenuButton, { onClick: onMenuClick })]
118
+ }), chartPosition === "bottom" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [metricBlock, chart && /* @__PURE__ */ jsx("div", {
119
+ className: mergeClassNames("w-full pt-3", chartClassName),
120
+ children: chart
121
+ })] }) : /* @__PURE__ */ jsxs("div", {
122
+ className: "flex items-end justify-between gap-3",
123
+ children: [metricBlock, chart && /* @__PURE__ */ jsx("div", {
124
+ className: mergeClassNames("h-[46px] w-[155px] shrink-0 overflow-hidden", chartClassName),
125
+ children: chart
126
+ })]
127
+ })]
128
+ });
129
+ }
130
+ return /* @__PURE__ */ jsxs("div", {
131
+ className: mergeClassNames(base, "flex flex-col p-5"),
132
+ children: [/* @__PURE__ */ jsxs("div", {
133
+ className: "flex flex-wrap items-start justify-between gap-x-6 gap-y-2 mb-4",
134
+ children: [/* @__PURE__ */ jsxs("div", {
135
+ className: "flex flex-col gap-1.5",
136
+ children: [
137
+ /* @__PURE__ */ jsxs("div", {
138
+ className: "flex flex-wrap items-center gap-2",
139
+ children: [/* @__PURE__ */ jsx("span", {
140
+ className: "text-sm font-semibold text-ds-1",
141
+ children: title
142
+ }), badge && /* @__PURE__ */ jsx(TrendBadge$3, {
143
+ value: badge.value,
144
+ direction: badge.direction
145
+ })]
146
+ }),
147
+ /* @__PURE__ */ jsx("p", {
148
+ className: "text-3xl font-bold tracking-tight text-ds-1 leading-none",
149
+ children: value
150
+ }),
151
+ /* @__PURE__ */ jsx("p", {
152
+ className: "text-xs text-ds-3",
153
+ children: dateRange
154
+ })
155
+ ]
156
+ }), /* @__PURE__ */ jsxs("div", {
157
+ className: "flex items-center gap-4 ms-auto",
158
+ children: [legend && legend.length > 0 && /* @__PURE__ */ jsx(LegendDots, { items: legend }), /* @__PURE__ */ jsx(MenuButton, { onClick: onMenuClick })]
159
+ })]
160
+ }), chart && /* @__PURE__ */ jsx("div", {
161
+ className: mergeClassNames("border-t border-ds-border-2 pt-4 w-full", chartClassName),
162
+ children: chart
163
+ })]
164
+ });
165
+ };
166
+ //#endregion
167
+ //#region src/components/data-display/dashboard-cards/ChartCard.tsx
168
+ var ChartCard = ({ title, dateRange, legend, className, onMenuClick, children }) => {
169
+ return /* @__PURE__ */ jsxs("div", {
170
+ className: mergeClassNames("flex flex-col gap-4 rounded-2xl border border-ds-border-2 bg-ds-surface-1 p-5", className),
171
+ children: [/* @__PURE__ */ jsxs("div", {
172
+ className: "flex flex-wrap items-start justify-between gap-x-6 gap-y-2",
173
+ children: [/* @__PURE__ */ jsxs("div", {
174
+ className: "flex flex-col gap-0.5",
175
+ children: [/* @__PURE__ */ jsx("span", {
176
+ className: "text-sm font-semibold text-ds-color-fg",
177
+ children: title
178
+ }), dateRange && /* @__PURE__ */ jsx("span", {
179
+ className: "text-xs text-ds-color-fg-subtle",
180
+ children: dateRange
181
+ })]
182
+ }), /* @__PURE__ */ jsxs("div", {
183
+ className: "flex items-center gap-4 ms-auto",
184
+ children: [legend && legend.length > 0 && /* @__PURE__ */ jsx("div", {
185
+ className: "flex items-center gap-3",
186
+ children: legend.map((item) => /* @__PURE__ */ jsxs("span", {
187
+ className: "flex items-center gap-1.5 text-xs text-ds-color-fg-muted",
188
+ children: [/* @__PURE__ */ jsx("span", {
189
+ className: "inline-block h-2.5 w-2.5 rounded-full shrink-0",
190
+ style: { backgroundColor: item.color },
191
+ "aria-hidden": "true"
192
+ }), item.label]
193
+ }, item.label))
194
+ }), /* @__PURE__ */ jsx(Button, {
195
+ variant: "tertiary",
196
+ size: "small",
197
+ className: "shrink-0 p-0.5! text-ds-color-fg-subtle",
198
+ "aria-label": "More options",
199
+ onClick: onMenuClick,
200
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
201
+ width: 18,
202
+ height: 18
203
+ })
204
+ })]
205
+ })]
206
+ }), /* @__PURE__ */ jsx("div", {
207
+ className: "w-full",
208
+ children
209
+ })]
210
+ });
211
+ };
212
+ //#endregion
213
+ //#region src/components/data-display/dashboard-cards/TopProductsCard.tsx
214
+ var RankBadge = ({ rank }) => /* @__PURE__ */ jsx("span", {
215
+ className: "inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md border text-xs font-semibold border-ds-border-3/80 ",
216
+ style: {
217
+ borderColor: "var(--ds-color-accent)",
218
+ color: "var(--ds-color-accent)"
219
+ },
220
+ "aria-label": `Rank ${rank}`,
221
+ children: rank
222
+ });
223
+ var ProductImage = ({ src, alt }) => {
224
+ if (src) return /* @__PURE__ */ jsx("img", {
225
+ src,
226
+ alt,
227
+ className: "h-11 w-11 shrink-0 rounded-md object-contain bg-ds-color-bg-utility p-1"
228
+ });
229
+ return /* @__PURE__ */ jsx("div", {
230
+ className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-md bg-ds-color-bg-utility text-ds-color-fg-subtle text-lg",
231
+ "aria-hidden": "true",
232
+ children: "□"
233
+ });
234
+ };
235
+ var TopProductsCard = ({ title = "Top Products", items, className, onMenuClick }) => {
236
+ return /* @__PURE__ */ jsxs("div", {
237
+ className: mergeClassNames("flex flex-col rounded-lg border border-ds-border-3/80 bg-ds-surface-1 p-5", className),
238
+ children: [/* @__PURE__ */ jsxs("div", {
239
+ className: "mb-4 flex items-center justify-between",
240
+ children: [/* @__PURE__ */ jsx("span", {
241
+ className: "text-sm font-semibold text-ds-color-fg",
242
+ children: title
243
+ }), /* @__PURE__ */ jsx(Button, {
244
+ variant: "tertiary",
245
+ size: "small",
246
+ className: "shrink-0 p-0.5! text-ds-color-fg-subtle",
247
+ "aria-label": "More options",
248
+ onClick: onMenuClick,
249
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
250
+ width: 18,
251
+ height: 18
252
+ })
253
+ })]
254
+ }), /* @__PURE__ */ jsx("ul", {
255
+ className: "flex flex-col divide-y divide-ds-border-2",
256
+ role: "list",
257
+ children: items.map((item) => /* @__PURE__ */ jsxs("li", {
258
+ className: "flex items-center gap-3 py-3 first:pt-0 last:pb-0",
259
+ children: [
260
+ /* @__PURE__ */ jsx(ProductImage, {
261
+ src: item.image,
262
+ alt: item.name
263
+ }),
264
+ /* @__PURE__ */ jsxs("div", {
265
+ className: "flex min-w-0 flex-1 flex-col gap-0.5",
266
+ children: [/* @__PURE__ */ jsx("span", {
267
+ className: "truncate text-sm font-semibold text-ds-color-fg",
268
+ children: item.name
269
+ }), /* @__PURE__ */ jsxs("span", {
270
+ className: "truncate text-xs text-ds-color-fg-subtle",
271
+ children: [
272
+ item.category,
273
+ " · ",
274
+ item.soldCount.toLocaleString(),
275
+ " sold"
276
+ ]
277
+ })]
278
+ }),
279
+ /* @__PURE__ */ jsx(RankBadge, { rank: item.rank })
280
+ ]
281
+ }, item.id))
282
+ })]
283
+ });
284
+ };
285
+ //#endregion
286
+ //#region src/components/data-display/dashboard-cards/EarningsCard.tsx
287
+ var TrendBadge$2 = ({ value, direction }) => {
288
+ const isUp = direction === "up";
289
+ const color = isUp ? "var(--ds-color-success)" : "var(--ds-color-danger)";
290
+ return /* @__PURE__ */ jsxs("span", {
291
+ className: "inline-flex items-center gap-1 rounded-sm border px-1.5 py-0.5 text-[11px] font-semibold leading-none",
292
+ style: {
293
+ color,
294
+ borderColor: color,
295
+ backgroundColor: isUp ? "var(--ds-color-success-subtle)" : "var(--ds-color-danger-subtle)"
296
+ },
297
+ "aria-label": `${value} ${isUp ? "increase" : "decrease"}`,
298
+ children: [value, /* @__PURE__ */ jsx("svg", {
299
+ width: "10",
300
+ height: "10",
301
+ viewBox: "0 0 10 10",
302
+ fill: "none",
303
+ "aria-hidden": "true",
304
+ children: isUp ? /* @__PURE__ */ jsx("path", {
305
+ d: "M5 8V2M5 2L2 5M5 2L8 5",
306
+ stroke: "currentColor",
307
+ strokeWidth: "1.5",
308
+ strokeLinecap: "round",
309
+ strokeLinejoin: "round"
310
+ }) : /* @__PURE__ */ jsx("path", {
311
+ d: "M5 2V8M5 8L2 5M5 8L8 5",
312
+ stroke: "currentColor",
313
+ strokeWidth: "1.5",
314
+ strokeLinecap: "round",
315
+ strokeLinejoin: "round"
316
+ })
317
+ })]
318
+ });
319
+ };
320
+ var BarChartSection = ({ weeklyData, barSize = 16, height = 90 }) => /* @__PURE__ */ jsx("div", {
321
+ style: { height },
322
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, {
323
+ width: "100%",
324
+ height: "100%",
325
+ children: /* @__PURE__ */ jsxs(BarChart, {
326
+ data: weeklyData,
327
+ barSize,
328
+ barCategoryGap: "25%",
329
+ margin: {
330
+ top: 4,
331
+ right: 0,
332
+ left: 0,
333
+ bottom: 0
334
+ },
335
+ children: [
336
+ /* @__PURE__ */ jsx(XAxis, {
337
+ dataKey: "day",
338
+ axisLine: false,
339
+ tickLine: false,
340
+ tick: {
341
+ fill: "var(--ds-color-fg-muted)",
342
+ fontSize: 10
343
+ },
344
+ dy: 6
345
+ }),
346
+ /* @__PURE__ */ jsx(Tooltip, {
347
+ contentStyle: chartTooltipContentStyle,
348
+ itemStyle: chartTooltipItemStyle,
349
+ labelStyle: chartTooltipLabelStyle,
350
+ wrapperStyle: chartTooltipWrapperStyle,
351
+ cursor: false
352
+ }),
353
+ /* @__PURE__ */ jsx(Bar, {
354
+ dataKey: "value",
355
+ radius: [
356
+ 4,
357
+ 4,
358
+ 0,
359
+ 0
360
+ ],
361
+ children: weeklyData.map((entry, i) => /* @__PURE__ */ jsx(Cell, { fill: entry.highlighted ? "var(--ds-color-accent)" : "var(--ds-color-accent-subtle)" }, i))
362
+ })
363
+ ]
364
+ })
365
+ })
366
+ });
367
+ var MetricsStrip = ({ metrics, large = false }) => /* @__PURE__ */ jsx("div", {
368
+ className: "mx-5 mb-5 rounded-lg border border-ds-border-3/60 bg-ds-surface-2/50 px-1 py-3",
369
+ children: /* @__PURE__ */ jsx("div", {
370
+ className: "grid grid-cols-3 divide-x divide-ds-border-3/50",
371
+ children: metrics.slice(0, 3).map((metric, i) => /* @__PURE__ */ jsxs("div", {
372
+ className: mergeClassNames("flex flex-col gap-2 px-4", large && "gap-3 px-5"),
373
+ children: [
374
+ /* @__PURE__ */ jsxs("div", {
375
+ className: "flex items-center gap-1.5",
376
+ children: [/* @__PURE__ */ jsx("span", {
377
+ className: mergeClassNames("inline-flex shrink-0 items-center justify-center rounded-full", large ? "h-6 w-6 text-xs" : "h-5 w-5 text-[10px]"),
378
+ style: {
379
+ backgroundColor: metric.color + "28",
380
+ color: metric.color
381
+ },
382
+ "aria-hidden": "true",
383
+ children: metric.icon
384
+ }), /* @__PURE__ */ jsx("span", {
385
+ className: mergeClassNames("truncate text-ds-2", large ? "text-sm" : "text-xs"),
386
+ children: metric.label
387
+ })]
388
+ }),
389
+ /* @__PURE__ */ jsx("p", {
390
+ className: mergeClassNames("font-bold text-ds-1", large ? "text-base" : "text-sm"),
391
+ children: metric.value
392
+ }),
393
+ /* @__PURE__ */ jsx("div", {
394
+ className: "h-[3px] w-full overflow-hidden rounded-full bg-ds-border-3/50",
395
+ children: /* @__PURE__ */ jsx("div", {
396
+ className: "h-full rounded-full transition-all duration-500",
397
+ style: {
398
+ width: `${Math.min(100, Math.max(0, metric.progress))}%`,
399
+ backgroundColor: metric.color
400
+ }
401
+ })
402
+ })
403
+ ]
404
+ }, i))
405
+ })
406
+ });
407
+ var EarningsCard = ({ title = "Earning Reports", subtitle = "Weekly Earnings Overview", value, badge, description, weeklyData, metrics, size = "md", className, onMenuClick }) => /* @__PURE__ */ jsxs("div", {
408
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
409
+ children: [
410
+ /* @__PURE__ */ jsxs("div", {
411
+ className: "flex items-start justify-between px-5 pb-3 pt-5",
412
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
413
+ className: "text-base font-bold text-ds-1",
414
+ children: title
415
+ }), subtitle && /* @__PURE__ */ jsx("p", {
416
+ className: "mt-0.5 text-xs text-ds-3",
417
+ children: subtitle
418
+ })] }), /* @__PURE__ */ jsx(Button, {
419
+ variant: "tertiary",
420
+ size: "small",
421
+ className: "shrink-0 p-0.5! text-ds-3",
422
+ "aria-label": "More options",
423
+ onClick: onMenuClick,
424
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
425
+ width: 18,
426
+ height: 18
427
+ })
428
+ })]
429
+ }),
430
+ size === "md" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
431
+ className: "flex items-start gap-4 px-5 pb-5",
432
+ children: [/* @__PURE__ */ jsxs("div", {
433
+ className: "min-w-0 flex-1",
434
+ children: [/* @__PURE__ */ jsxs("div", {
435
+ className: "flex items-center gap-2",
436
+ children: [/* @__PURE__ */ jsx("span", {
437
+ className: "text-4xl font-bold tracking-tight text-ds-1",
438
+ children: value
439
+ }), badge && /* @__PURE__ */ jsx(TrendBadge$2, {
440
+ value: badge.value,
441
+ direction: badge.direction
442
+ })]
443
+ }), description && /* @__PURE__ */ jsx("p", {
444
+ className: "mt-2 max-w-[180px] text-xs leading-relaxed text-ds-3",
445
+ children: description
446
+ })]
447
+ }), /* @__PURE__ */ jsx("div", {
448
+ className: "w-[185px] shrink-0",
449
+ children: /* @__PURE__ */ jsx(BarChartSection, {
450
+ weeklyData,
451
+ barSize: 16,
452
+ height: 90
453
+ })
454
+ })]
455
+ }), /* @__PURE__ */ jsx(MetricsStrip, { metrics })] }),
456
+ size === "lg" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
457
+ /* @__PURE__ */ jsxs("div", {
458
+ className: "px-5 pb-4",
459
+ children: [/* @__PURE__ */ jsxs("div", {
460
+ className: "flex items-center gap-3",
461
+ children: [/* @__PURE__ */ jsx("span", {
462
+ className: "text-5xl font-bold tracking-tight text-ds-1",
463
+ children: value
464
+ }), badge && /* @__PURE__ */ jsx(TrendBadge$2, {
465
+ value: badge.value,
466
+ direction: badge.direction
467
+ })]
468
+ }), description && /* @__PURE__ */ jsx("p", {
469
+ className: "mt-2 text-sm leading-relaxed text-ds-3",
470
+ children: description
471
+ })]
472
+ }),
473
+ /* @__PURE__ */ jsx("div", {
474
+ className: "px-5 pb-5",
475
+ children: /* @__PURE__ */ jsx(BarChartSection, {
476
+ weeklyData,
477
+ barSize: 24,
478
+ height: 160
479
+ })
480
+ }),
481
+ /* @__PURE__ */ jsx(MetricsStrip, {
482
+ metrics,
483
+ large: true
484
+ })
485
+ ] })
486
+ ]
487
+ });
488
+ //#endregion
489
+ //#region src/components/data-display/dashboard-cards/SupportTrackerCard.tsx
490
+ function GaugeChart({ percentage, label = "Completed Task", size = 190 }) {
491
+ const segments = 26;
492
+ const filledCount = Math.round(percentage / 100 * segments);
493
+ const cx = size / 2;
494
+ const cy = size * .5;
495
+ const radius = size * .4;
496
+ const segW = size * .03;
497
+ const segH = size * .1;
498
+ const startAngle = 135;
499
+ const step = 270 / segments;
500
+ const viewH = Math.ceil(cy + radius * .78 + segH);
501
+ return /* @__PURE__ */ jsxs("svg", {
502
+ width: "100%",
503
+ viewBox: `0 0 ${size} ${viewH}`,
504
+ style: { aspectRatio: `${size} / ${viewH}` },
505
+ "aria-label": `${percentage}% ${label}`,
506
+ role: "img",
507
+ children: [
508
+ Array.from({ length: segments }, (_, i) => {
509
+ const angleDeg = startAngle + (i + .5) * step;
510
+ const angleRad = angleDeg * Math.PI / 180;
511
+ const x = cx + radius * Math.cos(angleRad);
512
+ const y = cy + radius * Math.sin(angleRad);
513
+ const filled = i < filledCount;
514
+ return /* @__PURE__ */ jsx("rect", {
515
+ x: -segW / 2,
516
+ y: -segH / 2,
517
+ width: segW,
518
+ height: segH,
519
+ rx: segW / 2,
520
+ fill: filled ? "var(--ds-color-accent)" : "var(--ds-color-border-3)",
521
+ opacity: filled ? 1 : .45,
522
+ transform: `translate(${x}, ${y}) rotate(${angleDeg - 90})`
523
+ }, i);
524
+ }),
525
+ /* @__PURE__ */ jsx("text", {
526
+ x: cx,
527
+ y: cy - size * .04,
528
+ textAnchor: "middle",
529
+ dominantBaseline: "middle",
530
+ fontSize: size * .085,
531
+ fill: "var(--ds-color-fg-muted)",
532
+ children: label
533
+ }),
534
+ /* @__PURE__ */ jsxs("text", {
535
+ x: cx,
536
+ y: cy + size * .12,
537
+ textAnchor: "middle",
538
+ dominantBaseline: "middle",
539
+ fontSize: size * .22,
540
+ fontWeight: "700",
541
+ fill: "var(--ds-color-fg)",
542
+ children: [percentage, "%"]
543
+ })
544
+ ]
545
+ });
546
+ }
547
+ var SupportTrackerCard = ({ title = "Support Tracker", subtitle = "Last 7 Days", total, totalLabel = "Total Tickets", items, percentage, completedLabel = "Completed Task", className, onMenuClick }) => /* @__PURE__ */ jsxs("div", {
548
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
549
+ children: [/* @__PURE__ */ jsxs("div", {
550
+ className: "flex items-start justify-between px-5 pb-3 pt-5",
551
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
552
+ className: "text-base font-bold text-ds-1",
553
+ children: title
554
+ }), subtitle && /* @__PURE__ */ jsx("p", {
555
+ className: "mt-0.5 text-xs text-ds-3",
556
+ children: subtitle
557
+ })] }), /* @__PURE__ */ jsx(Button, {
558
+ variant: "tertiary",
559
+ size: "small",
560
+ className: "shrink-0 p-0.5! text-ds-3",
561
+ "aria-label": "More options",
562
+ onClick: onMenuClick,
563
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
564
+ width: 18,
565
+ height: 18
566
+ })
567
+ })]
568
+ }), /* @__PURE__ */ jsxs("div", {
569
+ className: "flex items-center gap-3 px-5 pb-6",
570
+ children: [/* @__PURE__ */ jsxs("div", {
571
+ className: "flex flex-[1_1_0] flex-col gap-5 min-w-0",
572
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
573
+ className: "text-4xl font-bold tracking-tight text-ds-1",
574
+ children: total
575
+ }), /* @__PURE__ */ jsx("p", {
576
+ className: "mt-0.5 text-xs text-ds-3",
577
+ children: totalLabel
578
+ })] }), /* @__PURE__ */ jsx("div", {
579
+ className: "flex flex-col gap-3",
580
+ children: items.map((item, i) => /* @__PURE__ */ jsxs("div", {
581
+ className: "flex items-center gap-3",
582
+ children: [/* @__PURE__ */ jsx("span", {
583
+ className: "inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-md",
584
+ style: {
585
+ backgroundColor: item.iconColor + "22",
586
+ color: item.iconColor
587
+ },
588
+ "aria-hidden": "true",
589
+ children: item.icon
590
+ }), /* @__PURE__ */ jsxs("div", {
591
+ className: "min-w-0",
592
+ children: [/* @__PURE__ */ jsx(Tooltip$1, {
593
+ content: item.label,
594
+ position: "top",
595
+ delayShow: 400,
596
+ children: /* @__PURE__ */ jsx(TruncatedText, {
597
+ showTitleOnHover: true,
598
+ className: "text-sm font-semibold text-ds-1",
599
+ children: item.label
600
+ })
601
+ }), /* @__PURE__ */ jsx("p", {
602
+ className: "text-xs text-ds-3",
603
+ children: item.value
604
+ })]
605
+ })]
606
+ }, i))
607
+ })]
608
+ }), /* @__PURE__ */ jsx("div", {
609
+ className: "flex-[1_1_0] min-w-0",
610
+ children: /* @__PURE__ */ jsx(GaugeChart, {
611
+ percentage,
612
+ label: completedLabel,
613
+ size: 190
614
+ })
615
+ })]
616
+ })]
617
+ });
618
+ //#endregion
619
+ //#region src/components/data-display/dashboard-cards/SalesOverviewCard.tsx
620
+ var TrendBadge$1 = ({ value, direction }) => {
621
+ const isUp = direction === "up";
622
+ return /* @__PURE__ */ jsx("span", {
623
+ className: "text-sm font-semibold",
624
+ style: {
625
+ color: isUp ? "var(--ds-color-success)" : "var(--ds-color-danger)",
626
+ backgroundColor: isUp ? "var(--ds-color-success-subtle)" : "var(--ds-color-danger-subtle)"
627
+ },
628
+ "aria-label": `${value} ${isUp ? "increase" : "decrease"}`,
629
+ children: value
630
+ });
631
+ };
632
+ function parsePercent(s) {
633
+ return parseFloat(s.replace("%", "")) || 0;
634
+ }
635
+ var SalesOverviewCard = ({ title = "Sales Overview", badge, value, leftMetric, rightMetric, leftProgress, vsLabel = "VS", className }) => {
636
+ const leftPct = parsePercent(leftMetric.percentage);
637
+ const total = leftPct + parsePercent(rightMetric.percentage);
638
+ const resolvedLeftProgress = leftProgress ?? (total > 0 ? leftPct / total * 100 : 50);
639
+ return /* @__PURE__ */ jsxs("div", {
640
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1 p-5", className),
641
+ children: [
642
+ /* @__PURE__ */ jsxs("div", {
643
+ className: "mb-1 flex items-center justify-between gap-2",
644
+ children: [/* @__PURE__ */ jsx("p", {
645
+ className: "text-sm font-semibold text-ds-1",
646
+ children: title
647
+ }), badge && /* @__PURE__ */ jsx(TrendBadge$1, {
648
+ value: badge.value,
649
+ direction: badge.direction
650
+ })]
651
+ }),
652
+ /* @__PURE__ */ jsx("p", {
653
+ className: "mb-5 text-3xl font-bold tracking-tight text-ds-1",
654
+ children: value
655
+ }),
656
+ /* @__PURE__ */ jsxs("div", {
657
+ className: "relative mb-5 flex items-start",
658
+ children: [
659
+ /* @__PURE__ */ jsxs("div", {
660
+ className: "flex flex-1 flex-col gap-1",
661
+ children: [
662
+ /* @__PURE__ */ jsxs("div", {
663
+ className: "flex items-center gap-1.5 text-xs text-ds-2",
664
+ children: [/* @__PURE__ */ jsx("span", {
665
+ className: "inline-flex h-6 w-6 items-center justify-center rounded-md",
666
+ style: {
667
+ backgroundColor: leftMetric.color + "20",
668
+ color: leftMetric.color
669
+ },
670
+ "aria-hidden": "true",
671
+ children: leftMetric.icon
672
+ }), /* @__PURE__ */ jsx("span", {
673
+ className: "font-medium",
674
+ children: leftMetric.label
675
+ })]
676
+ }),
677
+ /* @__PURE__ */ jsx("p", {
678
+ className: "text-2xl font-bold text-ds-1",
679
+ children: leftMetric.percentage
680
+ }),
681
+ /* @__PURE__ */ jsx("p", {
682
+ className: "text-xs text-ds-3",
683
+ children: leftMetric.count
684
+ })
685
+ ]
686
+ }),
687
+ /* @__PURE__ */ jsxs("div", {
688
+ className: "relative flex flex-col items-center self-stretch",
689
+ children: [
690
+ /* @__PURE__ */ jsx("div", { className: "w-px flex-1 bg-ds-border-3" }),
691
+ /* @__PURE__ */ jsx("span", {
692
+ className: "my-2 flex h-7 w-7 items-center justify-center rounded-full border border-ds-border-3 bg-ds-surface-1 text-[9px] font-bold text-ds-3",
693
+ children: vsLabel
694
+ }),
695
+ /* @__PURE__ */ jsx("div", { className: "w-px flex-1 bg-ds-border-3" })
696
+ ]
697
+ }),
698
+ /* @__PURE__ */ jsxs("div", {
699
+ className: "flex flex-1 flex-col items-end gap-1",
700
+ children: [
701
+ /* @__PURE__ */ jsxs("div", {
702
+ className: "flex items-center gap-1.5 text-xs text-ds-2",
703
+ children: [/* @__PURE__ */ jsx("span", {
704
+ className: "font-medium",
705
+ children: rightMetric.label
706
+ }), /* @__PURE__ */ jsx("span", {
707
+ className: "inline-flex h-6 w-6 items-center justify-center rounded-md",
708
+ style: {
709
+ backgroundColor: rightMetric.color + "20",
710
+ color: rightMetric.color
711
+ },
712
+ "aria-hidden": "true",
713
+ children: rightMetric.icon
714
+ })]
715
+ }),
716
+ /* @__PURE__ */ jsx("p", {
717
+ className: "text-2xl font-bold text-ds-1",
718
+ children: rightMetric.percentage
719
+ }),
720
+ /* @__PURE__ */ jsx("p", {
721
+ className: "text-xs text-ds-3",
722
+ children: rightMetric.count
723
+ })
724
+ ]
725
+ })
726
+ ]
727
+ }),
728
+ /* @__PURE__ */ jsxs("div", {
729
+ className: "flex h-2 w-full overflow-hidden rounded-full",
730
+ children: [/* @__PURE__ */ jsx("div", {
731
+ className: "h-full rounded-l-full transition-all duration-500",
732
+ style: {
733
+ width: `${resolvedLeftProgress}%`,
734
+ backgroundColor: leftMetric.color
735
+ }
736
+ }), /* @__PURE__ */ jsx("div", {
737
+ className: "h-full flex-1 rounded-r-full transition-all duration-500",
738
+ style: { backgroundColor: rightMetric.color }
739
+ })]
740
+ })
741
+ ]
742
+ });
743
+ };
744
+ //#endregion
745
+ //#region src/components/data-display/dashboard-cards/RevenueGrowthCard.tsx
746
+ var TrendBadge = ({ value, direction, color, bg }) => {
747
+ const isUp = direction === "up";
748
+ return /* @__PURE__ */ jsx("span", {
749
+ className: "inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-semibold",
750
+ style: {
751
+ color: color ?? (isUp ? "var(--ds-color-success)" : "var(--ds-color-danger)"),
752
+ backgroundColor: bg ?? (isUp ? "var(--ds-color-success-subtle)" : "var(--ds-color-danger-subtle)")
753
+ },
754
+ "aria-label": `${value} ${isUp ? "increase" : "decrease"}`,
755
+ children: value
756
+ });
757
+ };
758
+ var RevenueGrowthCard = ({ title = "Revenue Growth", subtitle = "Weekly Report", value, badge, weeklyData, highlightColor = "var(--ds-color-success)", barColor, className }) => {
759
+ const resolvedBarColor = barColor ?? highlightColor + "38";
760
+ return /* @__PURE__ */ jsxs("div", {
761
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1 p-5", className),
762
+ children: [/* @__PURE__ */ jsxs("div", {
763
+ className: "mb-4",
764
+ children: [/* @__PURE__ */ jsx("p", {
765
+ className: "text-base font-bold text-ds-1",
766
+ children: title
767
+ }), subtitle && /* @__PURE__ */ jsx("p", {
768
+ className: "mt-0.5 text-xs text-ds-3",
769
+ children: subtitle
770
+ })]
771
+ }), /* @__PURE__ */ jsxs("div", {
772
+ className: "flex items-end gap-4",
773
+ children: [/* @__PURE__ */ jsxs("div", {
774
+ className: "flex flex-col gap-2",
775
+ children: [/* @__PURE__ */ jsx("p", {
776
+ className: "text-4xl font-bold tracking-tight text-ds-1",
777
+ children: value
778
+ }), badge && /* @__PURE__ */ jsx(TrendBadge, {
779
+ value: badge.value,
780
+ direction: badge.direction,
781
+ color: highlightColor,
782
+ bg: highlightColor + "22"
783
+ })]
784
+ }), /* @__PURE__ */ jsx("div", {
785
+ className: "min-w-0 flex-1 pb-1",
786
+ style: { height: 100 },
787
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, {
788
+ width: "100%",
789
+ height: "100%",
790
+ children: /* @__PURE__ */ jsxs(BarChart, {
791
+ data: weeklyData,
792
+ barSize: 14,
793
+ barCategoryGap: "25%",
794
+ margin: {
795
+ top: 4,
796
+ right: 0,
797
+ left: 0,
798
+ bottom: 0
799
+ },
800
+ children: [
801
+ /* @__PURE__ */ jsx(XAxis, {
802
+ dataKey: "day",
803
+ axisLine: false,
804
+ tickLine: false,
805
+ tick: {
806
+ fill: "var(--ds-color-fg-muted)",
807
+ fontSize: 10
808
+ },
809
+ dy: 6
810
+ }),
811
+ /* @__PURE__ */ jsx(Tooltip, {
812
+ contentStyle: chartTooltipContentStyle,
813
+ itemStyle: chartTooltipItemStyle,
814
+ labelStyle: chartTooltipLabelStyle,
815
+ wrapperStyle: chartTooltipWrapperStyle,
816
+ cursor: false
817
+ }),
818
+ /* @__PURE__ */ jsx(Bar, {
819
+ dataKey: "value",
820
+ radius: [
821
+ 4,
822
+ 4,
823
+ 0,
824
+ 0
825
+ ],
826
+ children: weeklyData.map((entry, i) => /* @__PURE__ */ jsx(Cell, { fill: entry.highlighted ? highlightColor : resolvedBarColor }, i))
827
+ })
828
+ ]
829
+ })
830
+ })
831
+ })]
832
+ })]
833
+ });
834
+ };
835
+ //#endregion
836
+ //#region src/components/data-display/dashboard-cards/EarningReportsTabsCard.tsx
837
+ function defaultKFormatter(value) {
838
+ if (value >= 1e3) return `${Math.round(value / 1e3)}k`;
839
+ return String(value);
840
+ }
841
+ var EarningReportsTabsCard = ({ title = "Earning Reports", subtitle = "Yearly Earnings Overview", tabs, selectedTabId, onTabChange, defaultTabId, yAxisFormatter = defaultKFormatter, barLabelFormatter, showAddTab = true, onAddTab, className, onMenuClick }) => {
842
+ const [internalId, setInternalId] = useState(defaultTabId ?? tabs[0]?.id ?? "");
843
+ const isControlled = selectedTabId !== void 0;
844
+ const activeId = isControlled ? selectedTabId : internalId;
845
+ const handleTabChange = (id) => {
846
+ if (!isControlled) setInternalId(id);
847
+ onTabChange?.(id);
848
+ };
849
+ const activeTab = tabs.find((t) => t.id === activeId) ?? tabs[0];
850
+ const labelFormatter = barLabelFormatter ?? yAxisFormatter;
851
+ return /* @__PURE__ */ jsxs("div", {
852
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
853
+ children: [
854
+ /* @__PURE__ */ jsxs("div", {
855
+ className: "flex items-start justify-between px-5 pb-4 pt-5",
856
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
857
+ className: "text-base font-bold text-ds-1",
858
+ children: title
859
+ }), subtitle && /* @__PURE__ */ jsx("p", {
860
+ className: "mt-0.5 text-xs text-ds-3",
861
+ children: subtitle
862
+ })] }), /* @__PURE__ */ jsx(Button, {
863
+ variant: "tertiary",
864
+ size: "small",
865
+ className: "shrink-0 p-0.5! text-ds-3",
866
+ "aria-label": "More options",
867
+ onClick: onMenuClick,
868
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
869
+ width: 18,
870
+ height: 18
871
+ })
872
+ })]
873
+ }),
874
+ /* @__PURE__ */ jsxs("div", {
875
+ className: "flex items-center gap-3 overflow-x-auto px-5 pb-5",
876
+ children: [tabs.map((tab) => {
877
+ const isActive = tab.id === activeId;
878
+ return /* @__PURE__ */ jsxs(Button, {
879
+ variant: "tertiary",
880
+ onClick: () => handleTabChange(tab.id),
881
+ className: mergeClassNames("min-w-[72px] flex-col gap-1.5 rounded-lg border p-3 transition-colors hover:opacity-100", isActive ? "border-ds-accent bg-ds-accent-subtle text-ds-accent" : "border-ds-border-3 bg-ds-surface-1 text-ds-2 hover:border-ds-border-accent/30 hover:bg-ds-surface-2"),
882
+ "aria-pressed": isActive,
883
+ "aria-label": tab.label,
884
+ children: [/* @__PURE__ */ jsx("span", {
885
+ className: "flex h-6 w-6 items-center justify-center",
886
+ children: tab.icon
887
+ }), /* @__PURE__ */ jsx("span", {
888
+ className: "text-xs font-semibold",
889
+ children: tab.label
890
+ })]
891
+ }, tab.id);
892
+ }), showAddTab && /* @__PURE__ */ jsx(Button, {
893
+ variant: "tertiary",
894
+ onClick: onAddTab,
895
+ className: "min-w-[72px] flex-col gap-1.5 rounded-lg border border-dashed border-ds-border-3 p-3 text-ds-3 transition-colors hover:border-ds-border-2 hover:bg-ds-surface-2 hover:text-ds-2 hover:opacity-100",
896
+ "aria-label": "Add category",
897
+ children: /* @__PURE__ */ jsx("span", {
898
+ className: "flex h-6 w-6 items-center justify-center text-lg font-light",
899
+ children: "+"
900
+ })
901
+ })]
902
+ }),
903
+ /* @__PURE__ */ jsx("div", {
904
+ className: "px-2 pb-5",
905
+ style: { height: 280 },
906
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, {
907
+ width: "100%",
908
+ height: "100%",
909
+ children: /* @__PURE__ */ jsxs(BarChart, {
910
+ data: activeTab?.chartData ?? [],
911
+ barSize: 36,
912
+ barCategoryGap: "25%",
913
+ margin: {
914
+ top: 28,
915
+ right: 16,
916
+ left: 0,
917
+ bottom: 0
918
+ },
919
+ children: [
920
+ /* @__PURE__ */ jsx(CartesianGrid, {
921
+ strokeDasharray: "3 3",
922
+ vertical: false,
923
+ stroke: "var(--ds-color-border)",
924
+ opacity: .5
925
+ }),
926
+ /* @__PURE__ */ jsx(XAxis, {
927
+ dataKey: "name",
928
+ axisLine: false,
929
+ tickLine: false,
930
+ tick: {
931
+ fill: "var(--ds-color-fg-muted)",
932
+ fontSize: 12
933
+ },
934
+ dy: 10
935
+ }),
936
+ /* @__PURE__ */ jsx(YAxis, {
937
+ axisLine: false,
938
+ tickLine: false,
939
+ tickFormatter: yAxisFormatter,
940
+ tick: {
941
+ fill: "var(--ds-color-fg-muted)",
942
+ fontSize: 11
943
+ },
944
+ dx: -4
945
+ }),
946
+ /* @__PURE__ */ jsx(Tooltip, {
947
+ contentStyle: chartTooltipContentStyle,
948
+ itemStyle: chartTooltipItemStyle,
949
+ labelStyle: chartTooltipLabelStyle,
950
+ wrapperStyle: chartTooltipWrapperStyle,
951
+ cursor: {
952
+ fill: "var(--ds-color-accent)",
953
+ fillOpacity: .06
954
+ },
955
+ formatter: (v) => [labelFormatter(Number(v)), activeTab?.label]
956
+ }),
957
+ /* @__PURE__ */ jsxs(Bar, {
958
+ dataKey: "value",
959
+ radius: [
960
+ 4,
961
+ 4,
962
+ 0,
963
+ 0
964
+ ],
965
+ children: [/* @__PURE__ */ jsx(LabelList, {
966
+ dataKey: "value",
967
+ position: "top",
968
+ formatter: (v) => labelFormatter(Number(v)),
969
+ style: {
970
+ fontSize: 11,
971
+ fill: "var(--ds-color-fg-muted)",
972
+ fontWeight: 600
973
+ }
974
+ }), (activeTab?.chartData ?? []).map((entry, i) => /* @__PURE__ */ jsx(Cell, { fill: entry.highlighted ? "var(--ds-color-accent)" : "var(--ds-color-accent-subtle)" }, i))]
975
+ })
976
+ ]
977
+ })
978
+ })
979
+ })
980
+ ]
981
+ });
982
+ };
983
+ //#endregion
984
+ //#region src/components/data-display/dashboard-cards/TopicsCard.tsx
985
+ function BarLabel({ x = 0, y = 0, width = 0, height = 0, value = "" }) {
986
+ const pad = 10;
987
+ const availW = width - pad * 2;
988
+ if (availW < 24) return null;
989
+ return /* @__PURE__ */ jsx("foreignObject", {
990
+ x: x + pad,
991
+ y,
992
+ width: availW,
993
+ height,
994
+ children: /* @__PURE__ */ jsx("div", {
995
+ style: {
996
+ height: "100%",
997
+ display: "flex",
998
+ alignItems: "center",
999
+ overflow: "hidden"
1000
+ },
1001
+ children: /* @__PURE__ */ jsx(TruncatedText, {
1002
+ showTitleOnHover: true,
1003
+ style: {
1004
+ color: "#fff",
1005
+ fontSize: 12,
1006
+ fontWeight: 600,
1007
+ lineHeight: 1
1008
+ },
1009
+ children: value
1010
+ })
1011
+ })
1012
+ });
1013
+ }
1014
+ var TopicsCard = ({ title = "Topic you are interested in", items, xTickFormatter = (v) => `${v}%`, className, onMenuClick }) => {
1015
+ const chartData = [...items].sort((a, b) => b.percentage - a.percentage).map((item, i) => ({
1016
+ ...item,
1017
+ rank: items.length - i
1018
+ }));
1019
+ const maxValue = Math.max(...items.map((it) => it.percentage), 1);
1020
+ const xMax = Math.ceil(maxValue / 7) * 7;
1021
+ const xTicks = Array.from({ length: Math.floor(xMax / 7) + 1 }, (_, i) => i * 7);
1022
+ return /* @__PURE__ */ jsxs("div", {
1023
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
1024
+ children: [/* @__PURE__ */ jsxs("div", {
1025
+ className: "flex items-start justify-between px-5 pb-4 pt-5",
1026
+ children: [/* @__PURE__ */ jsx("p", {
1027
+ className: "text-base font-bold text-ds-1",
1028
+ children: title
1029
+ }), /* @__PURE__ */ jsx(Button, {
1030
+ variant: "tertiary",
1031
+ size: "small",
1032
+ className: "shrink-0 p-0.5! text-ds-3",
1033
+ "aria-label": "More options",
1034
+ onClick: onMenuClick,
1035
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
1036
+ width: 18,
1037
+ height: 18
1038
+ })
1039
+ })]
1040
+ }), /* @__PURE__ */ jsxs("div", {
1041
+ className: "flex items-center gap-4 px-5 pb-6",
1042
+ children: [/* @__PURE__ */ jsx("div", {
1043
+ className: "min-w-0 flex-1",
1044
+ style: { height: items.length * 42 + 32 },
1045
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, {
1046
+ width: "100%",
1047
+ height: "100%",
1048
+ children: /* @__PURE__ */ jsxs(BarChart, {
1049
+ data: chartData,
1050
+ layout: "vertical",
1051
+ barSize: 28,
1052
+ barCategoryGap: "20%",
1053
+ margin: {
1054
+ top: 0,
1055
+ right: 16,
1056
+ left: 8,
1057
+ bottom: 24
1058
+ },
1059
+ children: [
1060
+ /* @__PURE__ */ jsx(CartesianGrid, {
1061
+ strokeDasharray: "3 3",
1062
+ horizontal: false,
1063
+ stroke: "var(--ds-color-border)",
1064
+ opacity: .5
1065
+ }),
1066
+ /* @__PURE__ */ jsx(XAxis, {
1067
+ type: "number",
1068
+ domain: [0, xMax],
1069
+ ticks: xTicks,
1070
+ tickFormatter: xTickFormatter,
1071
+ axisLine: false,
1072
+ tickLine: false,
1073
+ tick: {
1074
+ fill: "var(--ds-color-fg-muted)",
1075
+ fontSize: 11
1076
+ },
1077
+ dy: 10
1078
+ }),
1079
+ /* @__PURE__ */ jsx(YAxis, {
1080
+ type: "category",
1081
+ dataKey: "rank",
1082
+ axisLine: false,
1083
+ tickLine: false,
1084
+ tick: {
1085
+ fill: "var(--ds-color-fg-muted)",
1086
+ fontSize: 11
1087
+ },
1088
+ dx: -4,
1089
+ width: 16
1090
+ }),
1091
+ /* @__PURE__ */ jsx(Tooltip, {
1092
+ contentStyle: chartTooltipContentStyle,
1093
+ itemStyle: chartTooltipItemStyle,
1094
+ labelStyle: chartTooltipLabelStyle,
1095
+ wrapperStyle: chartTooltipWrapperStyle,
1096
+ cursor: { fill: "rgba(0,0,0,0.04)" },
1097
+ formatter: (v, _name, props) => [`${Number(v)}%`, props.payload?.label ?? ""],
1098
+ labelFormatter: () => ""
1099
+ }),
1100
+ /* @__PURE__ */ jsxs(Bar, {
1101
+ dataKey: "percentage",
1102
+ radius: [
1103
+ 0,
1104
+ 4,
1105
+ 4,
1106
+ 0
1107
+ ],
1108
+ children: [/* @__PURE__ */ jsx(LabelList, {
1109
+ dataKey: "label",
1110
+ content: (props) => /* @__PURE__ */ jsx(BarLabel, { ...props })
1111
+ }), chartData.map((entry, i) => /* @__PURE__ */ jsx(Cell, { fill: entry.color }, i))]
1112
+ })
1113
+ ]
1114
+ })
1115
+ })
1116
+ }), /* @__PURE__ */ jsx("div", {
1117
+ className: "grid shrink-0 grid-cols-2 gap-x-6 gap-y-4",
1118
+ children: items.map((item) => /* @__PURE__ */ jsxs("div", {
1119
+ className: "flex flex-col gap-0.5",
1120
+ children: [/* @__PURE__ */ jsxs("div", {
1121
+ className: "flex items-center gap-1.5",
1122
+ children: [/* @__PURE__ */ jsx("span", {
1123
+ className: "inline-block h-2.5 w-2.5 shrink-0 rounded-full",
1124
+ style: { backgroundColor: item.color },
1125
+ "aria-hidden": "true"
1126
+ }), /* @__PURE__ */ jsx("span", {
1127
+ className: "text-xs text-ds-2",
1128
+ children: item.label
1129
+ })]
1130
+ }), /* @__PURE__ */ jsxs("p", {
1131
+ className: "ps-4 text-sm font-bold text-ds-1",
1132
+ children: [item.percentage, "%"]
1133
+ })]
1134
+ }, item.label))
1135
+ })]
1136
+ })]
1137
+ });
1138
+ };
1139
+ //#endregion
1140
+ //#region src/components/data-display/dashboard-cards/ShipmentStatisticsCard.tsx
1141
+ var ChevronDownIcon$2 = () => /* @__PURE__ */ jsx("svg", {
1142
+ width: "13",
1143
+ height: "13",
1144
+ viewBox: "0 0 24 24",
1145
+ fill: "none",
1146
+ stroke: "currentColor",
1147
+ strokeWidth: "2.5",
1148
+ strokeLinecap: "round",
1149
+ strokeLinejoin: "round",
1150
+ children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
1151
+ });
1152
+ var ShipmentStatisticsCard = ({ title = "Shipment statistics", subtitle, data, months = [
1153
+ "January",
1154
+ "February",
1155
+ "March",
1156
+ "April",
1157
+ "May",
1158
+ "June",
1159
+ "July",
1160
+ "August",
1161
+ "September",
1162
+ "October",
1163
+ "November",
1164
+ "December"
1165
+ ], selectedMonth: controlledMonth, onMonthChange, defaultMonth, yAxisFormatter = (v) => `${v}%`, shipmentColor = "#FFB400", deliveryColor = "#7367F0", shipmentLabel = "Shipment", deliveryLabel = "Delivery", className }) => {
1166
+ const isControlled = controlledMonth !== void 0;
1167
+ const [internalMonth, setInternalMonth] = useState(defaultMonth ?? months[0] ?? "");
1168
+ const activeMonth = isControlled ? controlledMonth : internalMonth;
1169
+ const [dropdownOpen, setDropdownOpen] = useState(false);
1170
+ const dropdownRef = useRef(null);
1171
+ useEffect(() => {
1172
+ function handleClickOutside(e) {
1173
+ if (dropdownRef.current && !dropdownRef.current.contains(e.target)) setDropdownOpen(false);
1174
+ }
1175
+ if (dropdownOpen) document.addEventListener("mousedown", handleClickOutside);
1176
+ return () => document.removeEventListener("mousedown", handleClickOutside);
1177
+ }, [dropdownOpen]);
1178
+ const handleMonthSelect = (m) => {
1179
+ if (!isControlled) setInternalMonth(m);
1180
+ onMonthChange?.(m);
1181
+ setDropdownOpen(false);
1182
+ };
1183
+ return /* @__PURE__ */ jsxs("div", {
1184
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1 p-5", className),
1185
+ children: [
1186
+ /* @__PURE__ */ jsxs("div", {
1187
+ className: "mb-5 flex items-start justify-between gap-4",
1188
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
1189
+ className: "text-lg font-bold text-ds-1",
1190
+ children: title
1191
+ }), subtitle && /* @__PURE__ */ jsx("p", {
1192
+ className: "mt-0.5 text-sm text-ds-3",
1193
+ children: subtitle
1194
+ })] }), /* @__PURE__ */ jsxs("div", {
1195
+ ref: dropdownRef,
1196
+ className: "relative shrink-0",
1197
+ children: [/* @__PURE__ */ jsxs(Button, {
1198
+ variant: "tertiary",
1199
+ size: "small",
1200
+ onClick: () => setDropdownOpen((o) => !o),
1201
+ className: "gap-1.5 rounded-md border border-ds-border-accent/30 bg-ds-accent-subtle px-3 py-1.5 text-sm font-semibold text-ds-accent hover:bg-ds-accent-subtle/80 hover:opacity-100",
1202
+ "aria-haspopup": "listbox",
1203
+ "aria-expanded": dropdownOpen,
1204
+ children: [activeMonth, /* @__PURE__ */ jsx("span", {
1205
+ className: mergeClassNames("transition-transform duration-150", dropdownOpen ? "rotate-180" : ""),
1206
+ children: /* @__PURE__ */ jsx(ChevronDownIcon$2, {})
1207
+ })]
1208
+ }), dropdownOpen && /* @__PURE__ */ jsx("div", {
1209
+ role: "listbox",
1210
+ className: "absolute end-0 top-full z-20 mt-1 max-h-48 min-w-[130px] overflow-y-auto rounded-md border border-ds-border-2 bg-ds-surface-1 py-1 shadow-lg",
1211
+ children: months.map((m) => /* @__PURE__ */ jsx(Button, {
1212
+ variant: "tertiary",
1213
+ size: "small",
1214
+ role: "option",
1215
+ "aria-selected": m === activeMonth,
1216
+ onClick: () => handleMonthSelect(m),
1217
+ className: mergeClassNames("w-full justify-start rounded-none px-3 py-1.5 text-start text-sm hover:bg-ds-surface-2 hover:opacity-100", m === activeMonth ? "font-semibold text-ds-accent" : "text-ds-2"),
1218
+ children: m
1219
+ }, m))
1220
+ })]
1221
+ })]
1222
+ }),
1223
+ /* @__PURE__ */ jsx("div", {
1224
+ style: { height: 260 },
1225
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, {
1226
+ width: "100%",
1227
+ height: "100%",
1228
+ children: /* @__PURE__ */ jsxs(ComposedChart, {
1229
+ data,
1230
+ barSize: 22,
1231
+ barCategoryGap: "30%",
1232
+ margin: {
1233
+ top: 8,
1234
+ right: 8,
1235
+ left: 0,
1236
+ bottom: 0
1237
+ },
1238
+ children: [
1239
+ /* @__PURE__ */ jsx(CartesianGrid, {
1240
+ strokeDasharray: "3 3",
1241
+ vertical: false,
1242
+ stroke: "var(--ds-color-border)",
1243
+ opacity: .5
1244
+ }),
1245
+ /* @__PURE__ */ jsx(XAxis, {
1246
+ dataKey: "date",
1247
+ axisLine: false,
1248
+ tickLine: false,
1249
+ tick: {
1250
+ fill: "var(--ds-color-fg-muted)",
1251
+ fontSize: 12
1252
+ },
1253
+ dy: 10
1254
+ }),
1255
+ /* @__PURE__ */ jsx(YAxis, {
1256
+ axisLine: false,
1257
+ tickLine: false,
1258
+ tickFormatter: yAxisFormatter,
1259
+ tick: {
1260
+ fill: "var(--ds-color-fg-muted)",
1261
+ fontSize: 11
1262
+ },
1263
+ dx: -4,
1264
+ domain: [0, "auto"]
1265
+ }),
1266
+ /* @__PURE__ */ jsx(Tooltip, {
1267
+ contentStyle: chartTooltipContentStyle,
1268
+ itemStyle: chartTooltipItemStyle,
1269
+ labelStyle: chartTooltipLabelStyle,
1270
+ wrapperStyle: chartTooltipWrapperStyle,
1271
+ cursor: { fill: "rgba(0,0,0,0.04)" },
1272
+ formatter: (v, name) => [yAxisFormatter(Number(v)), name === "shipment" ? shipmentLabel : deliveryLabel]
1273
+ }),
1274
+ /* @__PURE__ */ jsx(Bar, {
1275
+ dataKey: "shipment",
1276
+ fill: shipmentColor,
1277
+ radius: [
1278
+ 4,
1279
+ 4,
1280
+ 0,
1281
+ 0
1282
+ ]
1283
+ }),
1284
+ /* @__PURE__ */ jsx(Line, {
1285
+ type: "monotone",
1286
+ dataKey: "delivery",
1287
+ stroke: deliveryColor,
1288
+ strokeWidth: 2.5,
1289
+ dot: {
1290
+ r: 3.5,
1291
+ fill: deliveryColor,
1292
+ strokeWidth: 0
1293
+ },
1294
+ activeDot: {
1295
+ r: 5,
1296
+ fill: deliveryColor,
1297
+ strokeWidth: 0
1298
+ }
1299
+ })
1300
+ ]
1301
+ })
1302
+ })
1303
+ }),
1304
+ /* @__PURE__ */ jsxs("div", {
1305
+ className: "mt-4 flex items-center justify-center gap-6",
1306
+ children: [/* @__PURE__ */ jsxs("div", {
1307
+ className: "flex items-center gap-2",
1308
+ children: [/* @__PURE__ */ jsx("span", {
1309
+ className: "inline-block h-2.5 w-2.5 shrink-0 rounded-full",
1310
+ style: { backgroundColor: shipmentColor },
1311
+ "aria-hidden": "true"
1312
+ }), /* @__PURE__ */ jsx("span", {
1313
+ className: "text-sm text-ds-2",
1314
+ children: shipmentLabel
1315
+ })]
1316
+ }), /* @__PURE__ */ jsxs("div", {
1317
+ className: "flex items-center gap-2",
1318
+ children: [/* @__PURE__ */ jsx("span", {
1319
+ className: "inline-block h-2.5 w-2.5 shrink-0 rounded-full",
1320
+ style: { backgroundColor: deliveryColor },
1321
+ "aria-hidden": "true"
1322
+ }), /* @__PURE__ */ jsx("span", {
1323
+ className: "text-sm text-ds-2",
1324
+ children: deliveryLabel
1325
+ })]
1326
+ })]
1327
+ })
1328
+ ]
1329
+ });
1330
+ };
1331
+ //#endregion
1332
+ //#region src/components/data-display/dashboard-cards/VehicleConditionCard.tsx
1333
+ var MiniGauge = ({ percentage, color, size = 62 }) => {
1334
+ const strokeWidth = 4;
1335
+ const r = (size - strokeWidth * 2) / 2;
1336
+ const cx = size / 2;
1337
+ const cy = size / 2;
1338
+ const circumference = 2 * Math.PI * r;
1339
+ const clamped = Math.max(0, Math.min(100, percentage));
1340
+ const dashOffset = circumference - clamped / 100 * circumference;
1341
+ return /* @__PURE__ */ jsxs("svg", {
1342
+ width: size,
1343
+ height: size,
1344
+ viewBox: `0 0 ${size} ${size}`,
1345
+ "aria-hidden": "true",
1346
+ children: [
1347
+ /* @__PURE__ */ jsx("circle", {
1348
+ cx,
1349
+ cy,
1350
+ r,
1351
+ fill: "none",
1352
+ stroke: "var(--ds-color-border)",
1353
+ strokeWidth
1354
+ }),
1355
+ /* @__PURE__ */ jsx("circle", {
1356
+ cx,
1357
+ cy,
1358
+ r,
1359
+ fill: "none",
1360
+ stroke: color,
1361
+ strokeWidth,
1362
+ strokeDasharray: circumference,
1363
+ strokeDashoffset: dashOffset,
1364
+ strokeLinecap: "round",
1365
+ transform: `rotate(-90 ${cx} ${cy})`
1366
+ }),
1367
+ /* @__PURE__ */ jsxs("text", {
1368
+ x: cx,
1369
+ y: cy,
1370
+ textAnchor: "middle",
1371
+ dominantBaseline: "middle",
1372
+ fontSize: size * .21,
1373
+ fontWeight: "700",
1374
+ fill: "var(--ds-color-fg)",
1375
+ children: [clamped, "%"]
1376
+ })
1377
+ ]
1378
+ });
1379
+ };
1380
+ var VehicleConditionCard = ({ title = "Vehicle Condition", items, className, onMenuClick }) => /* @__PURE__ */ jsxs("div", {
1381
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
1382
+ children: [/* @__PURE__ */ jsxs("div", {
1383
+ className: "flex items-start justify-between px-5 pb-2 pt-5",
1384
+ children: [/* @__PURE__ */ jsx("p", {
1385
+ className: "text-base font-bold text-ds-1",
1386
+ children: title
1387
+ }), /* @__PURE__ */ jsx(Button, {
1388
+ variant: "tertiary",
1389
+ size: "small",
1390
+ className: "shrink-0 p-0.5! text-ds-3",
1391
+ "aria-label": "More options",
1392
+ onClick: onMenuClick,
1393
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
1394
+ width: 18,
1395
+ height: 18
1396
+ })
1397
+ })]
1398
+ }), /* @__PURE__ */ jsx("div", {
1399
+ className: "divide-y divide-ds-border-3/50 px-5 pb-4",
1400
+ children: items.map((item) => /* @__PURE__ */ jsxs("div", {
1401
+ className: "flex items-center gap-4 py-3",
1402
+ children: [
1403
+ /* @__PURE__ */ jsx("div", {
1404
+ className: "shrink-0",
1405
+ children: /* @__PURE__ */ jsx(MiniGauge, {
1406
+ percentage: item.percentage,
1407
+ color: item.color
1408
+ })
1409
+ }),
1410
+ /* @__PURE__ */ jsxs("div", {
1411
+ className: "min-w-0 flex-1",
1412
+ children: [/* @__PURE__ */ jsx("p", {
1413
+ className: "text-sm font-semibold leading-tight",
1414
+ style: { color: item.color },
1415
+ children: item.label
1416
+ }), /* @__PURE__ */ jsx("p", {
1417
+ className: "mt-0.5 text-xs text-ds-3",
1418
+ children: item.sublabel
1419
+ })]
1420
+ }),
1421
+ /* @__PURE__ */ jsx("span", {
1422
+ className: "shrink-0 rounded-md bg-ds-surface-2 px-2.5 py-1 text-xs font-semibold text-ds-2",
1423
+ children: item.badge
1424
+ })
1425
+ ]
1426
+ }, item.label))
1427
+ })]
1428
+ });
1429
+ //#endregion
1430
+ //#region src/components/data-display/dashboard-cards/VehiclesOverviewCard.tsx
1431
+ var VehiclesOverviewCard = ({ title = "Vehicles Overview", items, className, onMenuClick }) => {
1432
+ const totalPct = items.reduce((sum, item) => sum + item.percentage, 0);
1433
+ return /* @__PURE__ */ jsxs("div", {
1434
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
1435
+ children: [
1436
+ /* @__PURE__ */ jsxs("div", {
1437
+ className: "flex items-start justify-between px-5 pb-2 pt-5",
1438
+ children: [/* @__PURE__ */ jsx("p", {
1439
+ className: "text-base font-bold text-ds-1",
1440
+ children: title
1441
+ }), /* @__PURE__ */ jsx(Button, {
1442
+ variant: "tertiary",
1443
+ size: "small",
1444
+ className: "shrink-0 p-0.5! text-ds-3",
1445
+ "aria-label": "More options",
1446
+ onClick: onMenuClick,
1447
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
1448
+ width: 18,
1449
+ height: 18
1450
+ })
1451
+ })]
1452
+ }),
1453
+ /* @__PURE__ */ jsx("div", {
1454
+ className: "flex items-center px-5 pb-3",
1455
+ children: items.map((item, i) => /* @__PURE__ */ jsxs("div", {
1456
+ className: "flex flex-1 items-center",
1457
+ children: [i > 0 && /* @__PURE__ */ jsx("div", { className: "me-3 h-8 w-px shrink-0 bg-ds-border-3/60" }), /* @__PURE__ */ jsx("span", {
1458
+ className: "text-xs font-medium text-ds-3",
1459
+ children: item.label
1460
+ })]
1461
+ }, item.label))
1462
+ }),
1463
+ /* @__PURE__ */ jsx("div", {
1464
+ className: "mx-5 mb-5 flex h-3 overflow-hidden rounded-full",
1465
+ children: items.map((item, i) => {
1466
+ return /* @__PURE__ */ jsx("div", {
1467
+ style: {
1468
+ width: `${totalPct > 0 ? item.percentage / totalPct * 100 : 0}%`,
1469
+ backgroundColor: item.color
1470
+ },
1471
+ className: mergeClassNames("h-full transition-all", i === 0 && "rounded-s-full", i === items.length - 1 && "rounded-e-full"),
1472
+ role: "presentation",
1473
+ "aria-label": `${item.label}: ${item.percentage}%`
1474
+ }, item.label);
1475
+ })
1476
+ }),
1477
+ /* @__PURE__ */ jsx("div", {
1478
+ className: "divide-y divide-ds-border-3/50 px-5 pb-4",
1479
+ children: items.map((item) => /* @__PURE__ */ jsxs("div", {
1480
+ className: "flex items-center gap-3 py-3",
1481
+ children: [
1482
+ /* @__PURE__ */ jsx("div", {
1483
+ className: "flex size-9 shrink-0 items-center justify-center rounded-full",
1484
+ style: { backgroundColor: `${item.color}1a` },
1485
+ "aria-hidden": "true",
1486
+ children: /* @__PURE__ */ jsx("span", {
1487
+ style: { color: item.color },
1488
+ className: "flex items-center",
1489
+ children: item.icon
1490
+ })
1491
+ }),
1492
+ /* @__PURE__ */ jsx("span", {
1493
+ className: "min-w-0 flex-1 text-sm font-medium text-ds-2",
1494
+ children: item.label
1495
+ }),
1496
+ /* @__PURE__ */ jsx("span", {
1497
+ className: "text-sm font-bold text-ds-1",
1498
+ children: item.duration
1499
+ }),
1500
+ /* @__PURE__ */ jsxs("span", {
1501
+ className: "w-12 text-end text-xs font-semibold text-ds-3",
1502
+ children: [item.percentage, "%"]
1503
+ })
1504
+ ]
1505
+ }, item.label))
1506
+ })
1507
+ ]
1508
+ });
1509
+ };
1510
+ //#endregion
1511
+ //#region src/components/data-display/dashboard-cards/StockAvailabilityCard.tsx
1512
+ var AVAILABLE_COLOR = "#0ABFBC";
1513
+ var LOW_STOCK_COLOR = "#FFC107";
1514
+ var OUT_OF_STOCK_COLOR = "#FF5B5C";
1515
+ var StockAvailabilityCard = ({ title = "Stock Availability", totalAsset = "$53,000", totalProduct = 442, availability = {
1516
+ available: 62,
1517
+ lowStock: 28,
1518
+ outOfStock: 10
1519
+ }, lowStockItems = [], onViewAll, className, onMenuClick }) => {
1520
+ const { available, lowStock, outOfStock } = availability;
1521
+ const total = available + lowStock + outOfStock || 100;
1522
+ const segments = [
1523
+ {
1524
+ label: "Available",
1525
+ color: AVAILABLE_COLOR,
1526
+ pct: available
1527
+ },
1528
+ {
1529
+ label: "Low Stock",
1530
+ color: LOW_STOCK_COLOR,
1531
+ pct: lowStock
1532
+ },
1533
+ {
1534
+ label: "Out of stock",
1535
+ color: OUT_OF_STOCK_COLOR,
1536
+ pct: outOfStock
1537
+ }
1538
+ ];
1539
+ return /* @__PURE__ */ jsxs("div", {
1540
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
1541
+ children: [
1542
+ /* @__PURE__ */ jsxs("div", {
1543
+ className: "flex items-center justify-between px-5 pb-3 pt-5",
1544
+ children: [/* @__PURE__ */ jsx("p", {
1545
+ className: "text-base font-bold text-ds-1",
1546
+ children: title
1547
+ }), /* @__PURE__ */ jsx(Button, {
1548
+ variant: "tertiary",
1549
+ size: "small",
1550
+ className: "shrink-0 p-0.5! text-ds-3",
1551
+ "aria-label": "More options",
1552
+ onClick: onMenuClick,
1553
+ children: /* @__PURE__ */ jsx(EllipsisVerticalIcon, {
1554
+ width: 18,
1555
+ height: 18
1556
+ })
1557
+ })]
1558
+ }),
1559
+ /* @__PURE__ */ jsxs("div", {
1560
+ className: "grid grid-cols-2 divide-x divide-ds-border-3/50 border-b border-ds-border-3/50 px-5 pb-5",
1561
+ children: [/* @__PURE__ */ jsxs("div", {
1562
+ className: "pe-4",
1563
+ children: [/* @__PURE__ */ jsx("p", {
1564
+ className: "text-[10px] font-medium uppercase tracking-wide text-ds-3",
1565
+ children: "Total Asset"
1566
+ }), /* @__PURE__ */ jsx("p", {
1567
+ className: "mt-1 text-2xl font-bold text-ds-1",
1568
+ children: totalAsset
1569
+ })]
1570
+ }), /* @__PURE__ */ jsxs("div", {
1571
+ className: "ps-4",
1572
+ children: [/* @__PURE__ */ jsx("p", {
1573
+ className: "text-[10px] font-medium uppercase tracking-wide text-ds-3",
1574
+ children: "Total Product"
1575
+ }), /* @__PURE__ */ jsx("p", {
1576
+ className: "mt-1 text-2xl font-bold text-ds-1",
1577
+ children: totalProduct.toLocaleString()
1578
+ })]
1579
+ })]
1580
+ }),
1581
+ /* @__PURE__ */ jsxs("div", {
1582
+ className: "px-5 py-4",
1583
+ children: [/* @__PURE__ */ jsx("div", {
1584
+ className: "flex h-2 w-full overflow-hidden rounded-full",
1585
+ children: segments.map(({ label, color, pct }) => /* @__PURE__ */ jsx("div", {
1586
+ style: {
1587
+ width: `${pct / total * 100}%`,
1588
+ backgroundColor: color
1589
+ },
1590
+ "aria-hidden": "true"
1591
+ }, label))
1592
+ }), /* @__PURE__ */ jsx("div", {
1593
+ className: "mt-3 flex flex-wrap gap-x-4 gap-y-1.5",
1594
+ children: segments.map(({ label, color, pct }) => /* @__PURE__ */ jsxs("div", {
1595
+ className: "flex items-center gap-1.5",
1596
+ children: [
1597
+ /* @__PURE__ */ jsx("span", {
1598
+ className: "h-2 w-2 shrink-0 rounded-full",
1599
+ style: { backgroundColor: color },
1600
+ "aria-hidden": "true"
1601
+ }),
1602
+ /* @__PURE__ */ jsx("span", {
1603
+ className: "text-xs text-ds-2",
1604
+ children: label
1605
+ }),
1606
+ /* @__PURE__ */ jsxs("span", {
1607
+ className: "text-xs font-semibold text-ds-1",
1608
+ children: [pct, "%"]
1609
+ })
1610
+ ]
1611
+ }, label))
1612
+ })]
1613
+ }),
1614
+ lowStockItems.length > 0 && /* @__PURE__ */ jsxs("div", {
1615
+ className: "border-t border-ds-border-3/50",
1616
+ children: [/* @__PURE__ */ jsxs("div", {
1617
+ className: "flex items-center justify-between px-5 py-3",
1618
+ children: [/* @__PURE__ */ jsx("p", {
1619
+ className: "text-xs font-bold uppercase tracking-wide text-ds-1",
1620
+ children: "Low Stock"
1621
+ }), onViewAll && /* @__PURE__ */ jsx(Button, {
1622
+ variant: "tertiary",
1623
+ size: "small",
1624
+ onClick: onViewAll,
1625
+ className: "p-0! text-xs text-ds-accent hover:opacity-100",
1626
+ children: "View all"
1627
+ })]
1628
+ }), /* @__PURE__ */ jsx("div", {
1629
+ className: "pb-2",
1630
+ children: lowStockItems.map((item) => /* @__PURE__ */ jsxs("div", {
1631
+ className: "flex items-center justify-between gap-2 px-5 py-2",
1632
+ children: [/* @__PURE__ */ jsx("p", {
1633
+ className: "truncate text-sm font-medium text-ds-1",
1634
+ children: item.name
1635
+ }), /* @__PURE__ */ jsxs("div", {
1636
+ className: "flex shrink-0 items-center gap-3",
1637
+ children: [/* @__PURE__ */ jsxs("span", {
1638
+ className: "text-xs text-ds-3",
1639
+ children: ["Qty: ", item.qty]
1640
+ }), /* @__PURE__ */ jsx(Button, {
1641
+ variant: "secondary",
1642
+ size: "small",
1643
+ onClick: item.onOrder,
1644
+ className: "h-7 rounded-md px-3 text-xs",
1645
+ children: "Order"
1646
+ })]
1647
+ })]
1648
+ }, item.id))
1649
+ })]
1650
+ })
1651
+ ]
1652
+ });
1653
+ };
1654
+ //#endregion
1655
+ //#region src/components/data-display/dashboard-cards/ExpensesCard.tsx
1656
+ var DEFAULT_EXPENSES = [
1657
+ {
1658
+ label: "Internet",
1659
+ percentage: 45,
1660
+ color: "#7367F0"
1661
+ },
1662
+ {
1663
+ label: "Electricity",
1664
+ percentage: 26,
1665
+ color: "#00CFE8"
1666
+ },
1667
+ {
1668
+ label: "Transactions",
1669
+ percentage: 22,
1670
+ color: "#28C76F"
1671
+ },
1672
+ {
1673
+ label: "Rental Cost",
1674
+ percentage: 8,
1675
+ color: "#FF9F43"
1676
+ },
1677
+ {
1678
+ label: "Foods",
1679
+ percentage: 3,
1680
+ color: "#EA5455"
1681
+ },
1682
+ {
1683
+ label: "Other",
1684
+ percentage: 2,
1685
+ color: "#82868B"
1686
+ }
1687
+ ];
1688
+ var DEFAULT_TOP = [
1689
+ {
1690
+ label: "Internet",
1691
+ value: "$59.46",
1692
+ color: "#7367F0"
1693
+ },
1694
+ {
1695
+ label: "Electricity",
1696
+ value: "$34.41",
1697
+ color: "#00CFE8"
1698
+ },
1699
+ {
1700
+ label: "Transactions",
1701
+ value: "$29.12",
1702
+ color: "#28C76F"
1703
+ },
1704
+ {
1705
+ label: "Rental Cost",
1706
+ value: "$10.58",
1707
+ color: "#FF9F43"
1708
+ }
1709
+ ];
1710
+ var ChevronDownIcon$1 = () => /* @__PURE__ */ jsx("svg", {
1711
+ width: "13",
1712
+ height: "13",
1713
+ viewBox: "0 0 24 24",
1714
+ fill: "none",
1715
+ stroke: "currentColor",
1716
+ strokeWidth: "2.5",
1717
+ strokeLinecap: "round",
1718
+ strokeLinejoin: "round",
1719
+ children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
1720
+ });
1721
+ var ExpensesCard = ({ title = "Expenses", totalExpense = "$132.34", expenses = DEFAULT_EXPENSES, topExpenses = DEFAULT_TOP, periods = [
1722
+ "Last 6 months",
1723
+ "Last 3 months",
1724
+ "Last year"
1725
+ ], defaultPeriod, selectedPeriod: controlledPeriod, onPeriodChange, className }) => {
1726
+ const isControlled = controlledPeriod !== void 0;
1727
+ const [internalPeriod, setInternalPeriod] = useState(defaultPeriod ?? periods[0] ?? "");
1728
+ const activePeriod = isControlled ? controlledPeriod : internalPeriod;
1729
+ const [dropdownOpen, setDropdownOpen] = useState(false);
1730
+ const dropdownRef = useRef(null);
1731
+ useEffect(() => {
1732
+ function handleClickOutside(e) {
1733
+ if (dropdownRef.current && !dropdownRef.current.contains(e.target)) setDropdownOpen(false);
1734
+ }
1735
+ if (dropdownOpen) document.addEventListener("mousedown", handleClickOutside);
1736
+ return () => document.removeEventListener("mousedown", handleClickOutside);
1737
+ }, [dropdownOpen]);
1738
+ const handlePeriodSelect = (p) => {
1739
+ if (!isControlled) setInternalPeriod(p);
1740
+ onPeriodChange?.(p);
1741
+ setDropdownOpen(false);
1742
+ };
1743
+ return /* @__PURE__ */ jsxs("div", {
1744
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
1745
+ children: [
1746
+ /* @__PURE__ */ jsxs("div", {
1747
+ className: "flex items-center justify-between px-5 pb-3 pt-5",
1748
+ children: [/* @__PURE__ */ jsx("p", {
1749
+ className: "text-base font-bold text-ds-1",
1750
+ children: title
1751
+ }), /* @__PURE__ */ jsxs("div", {
1752
+ ref: dropdownRef,
1753
+ className: "relative shrink-0",
1754
+ children: [/* @__PURE__ */ jsxs(Button, {
1755
+ variant: "tertiary",
1756
+ size: "small",
1757
+ onClick: () => setDropdownOpen((o) => !o),
1758
+ className: "gap-1.5 rounded-md border border-ds-border-accent/30 bg-ds-accent-subtle px-3 py-1.5 text-sm font-semibold text-ds-accent hover:bg-ds-accent-subtle/80 hover:opacity-100",
1759
+ "aria-haspopup": "listbox",
1760
+ "aria-expanded": dropdownOpen,
1761
+ children: [activePeriod, /* @__PURE__ */ jsx("span", {
1762
+ className: mergeClassNames("transition-transform duration-150", dropdownOpen ? "rotate-180" : ""),
1763
+ children: /* @__PURE__ */ jsx(ChevronDownIcon$1, {})
1764
+ })]
1765
+ }), dropdownOpen && /* @__PURE__ */ jsx("div", {
1766
+ role: "listbox",
1767
+ className: "absolute end-0 top-full z-20 mt-1 min-w-[160px] overflow-y-auto rounded-md border border-ds-border-2 bg-ds-surface-1 py-1 shadow-lg",
1768
+ children: periods.map((p) => /* @__PURE__ */ jsx(Button, {
1769
+ variant: "tertiary",
1770
+ size: "small",
1771
+ role: "option",
1772
+ "aria-selected": p === activePeriod,
1773
+ onClick: () => handlePeriodSelect(p),
1774
+ className: mergeClassNames("w-full justify-start rounded-none px-3 py-1.5 text-start text-sm hover:bg-ds-surface-2 hover:opacity-100", p === activePeriod ? "font-semibold text-ds-accent" : "text-ds-2"),
1775
+ children: p
1776
+ }, p))
1777
+ })]
1778
+ })]
1779
+ }),
1780
+ /* @__PURE__ */ jsxs("div", {
1781
+ className: "flex items-center gap-4 px-5 pb-5",
1782
+ children: [/* @__PURE__ */ jsxs("div", {
1783
+ className: "relative shrink-0",
1784
+ style: {
1785
+ width: 160,
1786
+ height: 160
1787
+ },
1788
+ children: [/* @__PURE__ */ jsx(ResponsiveContainer, {
1789
+ width: "100%",
1790
+ height: "100%",
1791
+ children: /* @__PURE__ */ jsxs(PieChart, { children: [/* @__PURE__ */ jsx(Pie, {
1792
+ data: expenses,
1793
+ cx: "50%",
1794
+ cy: "50%",
1795
+ innerRadius: 52,
1796
+ outerRadius: 72,
1797
+ dataKey: "percentage",
1798
+ paddingAngle: 2,
1799
+ startAngle: 90,
1800
+ endAngle: -270,
1801
+ children: expenses.map((entry, i) => /* @__PURE__ */ jsx(Cell, { fill: entry.color }, i))
1802
+ }), /* @__PURE__ */ jsx(Tooltip, {
1803
+ contentStyle: chartTooltipContentStyle,
1804
+ itemStyle: chartTooltipItemStyle,
1805
+ labelStyle: chartTooltipLabelStyle,
1806
+ wrapperStyle: chartTooltipWrapperStyle,
1807
+ formatter: (v, _name, props) => [`${v}%`, props.payload.label]
1808
+ })] })
1809
+ }), /* @__PURE__ */ jsxs("div", {
1810
+ className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center text-center",
1811
+ children: [/* @__PURE__ */ jsx("span", {
1812
+ className: "text-[10px] leading-none text-ds-3",
1813
+ children: "Total Expense"
1814
+ }), /* @__PURE__ */ jsx("span", {
1815
+ className: "mt-1 text-base font-bold leading-none text-ds-1",
1816
+ children: totalExpense
1817
+ })]
1818
+ })]
1819
+ }), /* @__PURE__ */ jsx("div", {
1820
+ className: "flex min-w-0 flex-1 flex-col gap-2",
1821
+ children: expenses.map((e) => /* @__PURE__ */ jsxs("div", {
1822
+ className: "flex items-center gap-2",
1823
+ children: [
1824
+ /* @__PURE__ */ jsx("span", {
1825
+ className: "h-2.5 w-2.5 shrink-0 rounded-full",
1826
+ style: { backgroundColor: e.color },
1827
+ "aria-hidden": "true"
1828
+ }),
1829
+ /* @__PURE__ */ jsx("span", {
1830
+ className: "flex-1 truncate text-xs text-ds-2",
1831
+ children: e.label
1832
+ }),
1833
+ /* @__PURE__ */ jsxs("span", {
1834
+ className: "text-xs font-semibold text-ds-1",
1835
+ children: [e.percentage, "%"]
1836
+ })
1837
+ ]
1838
+ }, e.label))
1839
+ })]
1840
+ }),
1841
+ topExpenses.length > 0 && /* @__PURE__ */ jsxs("div", {
1842
+ className: "border-t border-ds-border-3/50 px-5 pb-5 pt-4",
1843
+ children: [/* @__PURE__ */ jsx("p", {
1844
+ className: "mb-3 text-[10px] font-bold uppercase tracking-wide text-ds-3",
1845
+ children: "Top Expense"
1846
+ }), /* @__PURE__ */ jsx("div", {
1847
+ className: "grid grid-cols-2 gap-3",
1848
+ children: topExpenses.map((item) => /* @__PURE__ */ jsxs("div", {
1849
+ className: "flex items-start gap-2",
1850
+ children: [/* @__PURE__ */ jsx("span", {
1851
+ className: "mt-0.5 h-2.5 w-2.5 shrink-0 rounded-full",
1852
+ style: { backgroundColor: item.color },
1853
+ "aria-hidden": "true"
1854
+ }), /* @__PURE__ */ jsxs("div", {
1855
+ className: "min-w-0",
1856
+ children: [/* @__PURE__ */ jsx("p", {
1857
+ className: "truncate text-xs text-ds-3",
1858
+ children: item.label
1859
+ }), /* @__PURE__ */ jsx("p", {
1860
+ className: "text-sm font-bold text-ds-1",
1861
+ children: item.value
1862
+ })]
1863
+ })]
1864
+ }, item.label))
1865
+ })]
1866
+ })
1867
+ ]
1868
+ });
1869
+ };
1870
+ //#endregion
1871
+ //#region src/components/data-display/dashboard-cards/IncomeExpenseCard.tsx
1872
+ var DEFAULT_DATA = [
1873
+ {
1874
+ month: "JAN",
1875
+ income: 800,
1876
+ expense: 400
1877
+ },
1878
+ {
1879
+ month: "FEB",
1880
+ income: 1e3,
1881
+ expense: 500
1882
+ },
1883
+ {
1884
+ month: "MAR",
1885
+ income: 1412,
1886
+ expense: 612,
1887
+ highlighted: true
1888
+ },
1889
+ {
1890
+ month: "APR",
1891
+ income: 900,
1892
+ expense: 450
1893
+ },
1894
+ {
1895
+ month: "MAY",
1896
+ income: 1100,
1897
+ expense: 520
1898
+ },
1899
+ {
1900
+ month: "JUN",
1901
+ income: 950,
1902
+ expense: 480
1903
+ }
1904
+ ];
1905
+ var ChevronDownIcon = () => /* @__PURE__ */ jsx("svg", {
1906
+ width: "13",
1907
+ height: "13",
1908
+ viewBox: "0 0 24 24",
1909
+ fill: "none",
1910
+ stroke: "currentColor",
1911
+ strokeWidth: "2.5",
1912
+ strokeLinecap: "round",
1913
+ strokeLinejoin: "round",
1914
+ children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
1915
+ });
1916
+ var TrendLabel = ({ value, direction }) => /* @__PURE__ */ jsxs("span", {
1917
+ className: "text-xs font-semibold",
1918
+ style: { color: direction === "up" ? "var(--ds-color-success)" : "var(--ds-color-danger)" },
1919
+ children: [
1920
+ direction === "up" ? "▲" : "▼",
1921
+ " ",
1922
+ value
1923
+ ]
1924
+ });
1925
+ var IncomeExpenseCard = ({ title = "Income & Expense", totalIncome = "$1,412", incomeBadge = {
1926
+ value: "4.51%",
1927
+ direction: "up"
1928
+ }, totalExpenses = "$612.34", expensesBadge = {
1929
+ value: "2.41%",
1930
+ direction: "down"
1931
+ }, data = DEFAULT_DATA, incomeColor = "#28C76F", expenseColor = "#FFC107", periods = [
1932
+ "Last 6 months",
1933
+ "Last 3 months",
1934
+ "Last year"
1935
+ ], defaultPeriod, selectedPeriod: controlledPeriod, onPeriodChange, className }) => {
1936
+ const isControlled = controlledPeriod !== void 0;
1937
+ const [internalPeriod, setInternalPeriod] = useState(defaultPeriod ?? periods[0] ?? "");
1938
+ const activePeriod = isControlled ? controlledPeriod : internalPeriod;
1939
+ const [dropdownOpen, setDropdownOpen] = useState(false);
1940
+ const dropdownRef = useRef(null);
1941
+ useEffect(() => {
1942
+ function handleClickOutside(e) {
1943
+ if (dropdownRef.current && !dropdownRef.current.contains(e.target)) setDropdownOpen(false);
1944
+ }
1945
+ if (dropdownOpen) document.addEventListener("mousedown", handleClickOutside);
1946
+ return () => document.removeEventListener("mousedown", handleClickOutside);
1947
+ }, [dropdownOpen]);
1948
+ const handlePeriodSelect = (p) => {
1949
+ if (!isControlled) setInternalPeriod(p);
1950
+ onPeriodChange?.(p);
1951
+ setDropdownOpen(false);
1952
+ };
1953
+ return /* @__PURE__ */ jsxs("div", {
1954
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
1955
+ children: [
1956
+ /* @__PURE__ */ jsxs("div", {
1957
+ className: "flex items-center justify-between px-5 pb-3 pt-5",
1958
+ children: [/* @__PURE__ */ jsx("p", {
1959
+ className: "text-base font-bold text-ds-1",
1960
+ children: title
1961
+ }), /* @__PURE__ */ jsxs("div", {
1962
+ ref: dropdownRef,
1963
+ className: "relative shrink-0",
1964
+ children: [/* @__PURE__ */ jsxs(Button, {
1965
+ variant: "tertiary",
1966
+ size: "small",
1967
+ onClick: () => setDropdownOpen((o) => !o),
1968
+ className: "gap-1.5 rounded-md border border-ds-border-accent/30 bg-ds-accent-subtle px-3 py-1.5 text-sm font-semibold text-ds-accent hover:bg-ds-accent-subtle/80 hover:opacity-100",
1969
+ "aria-haspopup": "listbox",
1970
+ "aria-expanded": dropdownOpen,
1971
+ children: [activePeriod, /* @__PURE__ */ jsx("span", {
1972
+ className: mergeClassNames("transition-transform duration-150", dropdownOpen ? "rotate-180" : ""),
1973
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
1974
+ })]
1975
+ }), dropdownOpen && /* @__PURE__ */ jsx("div", {
1976
+ role: "listbox",
1977
+ className: "absolute end-0 top-full z-20 mt-1 min-w-[160px] overflow-y-auto rounded-md border border-ds-border-2 bg-ds-surface-1 py-1 shadow-lg",
1978
+ children: periods.map((p) => /* @__PURE__ */ jsx(Button, {
1979
+ variant: "tertiary",
1980
+ size: "small",
1981
+ role: "option",
1982
+ "aria-selected": p === activePeriod,
1983
+ onClick: () => handlePeriodSelect(p),
1984
+ className: mergeClassNames("w-full justify-start rounded-none px-3 py-1.5 text-start text-sm hover:bg-ds-surface-2 hover:opacity-100", p === activePeriod ? "font-semibold text-ds-accent" : "text-ds-2"),
1985
+ children: p
1986
+ }, p))
1987
+ })]
1988
+ })]
1989
+ }),
1990
+ /* @__PURE__ */ jsxs("div", {
1991
+ className: "grid grid-cols-2 gap-4 px-5 pb-4",
1992
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
1993
+ className: "text-[10px] font-medium uppercase tracking-wide text-ds-3",
1994
+ children: "Total Income"
1995
+ }), /* @__PURE__ */ jsxs("div", {
1996
+ className: "mt-1 flex items-baseline gap-2",
1997
+ children: [/* @__PURE__ */ jsx("span", {
1998
+ className: "text-2xl font-bold text-ds-1",
1999
+ children: totalIncome
2000
+ }), incomeBadge && /* @__PURE__ */ jsx(TrendLabel, {
2001
+ value: incomeBadge.value,
2002
+ direction: incomeBadge.direction
2003
+ })]
2004
+ })] }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
2005
+ className: "text-[10px] font-medium uppercase tracking-wide text-ds-3",
2006
+ children: "Total Expenses"
2007
+ }), /* @__PURE__ */ jsxs("div", {
2008
+ className: "mt-1 flex items-baseline gap-2",
2009
+ children: [/* @__PURE__ */ jsx("span", {
2010
+ className: "text-2xl font-bold text-ds-1",
2011
+ children: totalExpenses
2012
+ }), expensesBadge && /* @__PURE__ */ jsx(TrendLabel, {
2013
+ value: expensesBadge.value,
2014
+ direction: expensesBadge.direction
2015
+ })]
2016
+ })] })]
2017
+ }),
2018
+ /* @__PURE__ */ jsx("div", {
2019
+ style: { height: 200 },
2020
+ className: "px-2",
2021
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, {
2022
+ width: "100%",
2023
+ height: "100%",
2024
+ children: /* @__PURE__ */ jsxs(BarChart, {
2025
+ data,
2026
+ barSize: 12,
2027
+ barCategoryGap: "30%",
2028
+ barGap: 4,
2029
+ margin: {
2030
+ top: 8,
2031
+ right: 8,
2032
+ left: 0,
2033
+ bottom: 0
2034
+ },
2035
+ children: [
2036
+ /* @__PURE__ */ jsx(CartesianGrid, {
2037
+ strokeDasharray: "3 3",
2038
+ vertical: false,
2039
+ stroke: "var(--ds-color-border)",
2040
+ opacity: .5
2041
+ }),
2042
+ /* @__PURE__ */ jsx(XAxis, {
2043
+ dataKey: "month",
2044
+ axisLine: false,
2045
+ tickLine: false,
2046
+ tick: {
2047
+ fill: "var(--ds-color-fg-muted)",
2048
+ fontSize: 11
2049
+ },
2050
+ dy: 8
2051
+ }),
2052
+ /* @__PURE__ */ jsx(YAxis, {
2053
+ axisLine: false,
2054
+ tickLine: false,
2055
+ tick: {
2056
+ fill: "var(--ds-color-fg-muted)",
2057
+ fontSize: 10
2058
+ },
2059
+ dx: -4
2060
+ }),
2061
+ /* @__PURE__ */ jsx(Tooltip, {
2062
+ contentStyle: chartTooltipContentStyle,
2063
+ itemStyle: chartTooltipItemStyle,
2064
+ labelStyle: chartTooltipLabelStyle,
2065
+ wrapperStyle: chartTooltipWrapperStyle,
2066
+ cursor: { fill: "rgba(0,0,0,0.04)" }
2067
+ }),
2068
+ /* @__PURE__ */ jsx(Bar, {
2069
+ dataKey: "income",
2070
+ name: "Income",
2071
+ radius: [
2072
+ 4,
2073
+ 4,
2074
+ 0,
2075
+ 0
2076
+ ],
2077
+ children: data.map((entry, i) => /* @__PURE__ */ jsx(Cell, { fill: entry.highlighted ? incomeColor : incomeColor + "80" }, i))
2078
+ }),
2079
+ /* @__PURE__ */ jsx(Bar, {
2080
+ dataKey: "expense",
2081
+ name: "Expense",
2082
+ radius: [
2083
+ 4,
2084
+ 4,
2085
+ 0,
2086
+ 0
2087
+ ],
2088
+ children: data.map((entry, i) => /* @__PURE__ */ jsx(Cell, { fill: entry.highlighted ? expenseColor : expenseColor + "80" }, i))
2089
+ })
2090
+ ]
2091
+ })
2092
+ })
2093
+ }),
2094
+ /* @__PURE__ */ jsxs("div", {
2095
+ className: "flex items-center justify-center gap-6 py-4",
2096
+ children: [/* @__PURE__ */ jsxs("div", {
2097
+ className: "flex items-center gap-2",
2098
+ children: [/* @__PURE__ */ jsx("span", {
2099
+ className: "h-2.5 w-2.5 shrink-0 rounded-full",
2100
+ style: { backgroundColor: incomeColor },
2101
+ "aria-hidden": "true"
2102
+ }), /* @__PURE__ */ jsx("span", {
2103
+ className: "text-sm text-ds-2",
2104
+ children: "Income"
2105
+ })]
2106
+ }), /* @__PURE__ */ jsxs("div", {
2107
+ className: "flex items-center gap-2",
2108
+ children: [/* @__PURE__ */ jsx("span", {
2109
+ className: "h-2.5 w-2.5 shrink-0 rounded-full",
2110
+ style: { backgroundColor: expenseColor },
2111
+ "aria-hidden": "true"
2112
+ }), /* @__PURE__ */ jsx("span", {
2113
+ className: "text-sm text-ds-2",
2114
+ children: "Expense"
2115
+ })]
2116
+ })]
2117
+ })
2118
+ ]
2119
+ });
2120
+ };
2121
+ //#endregion
2122
+ //#region src/components/data-display/dashboard-cards/DeviceSalesCard.tsx
2123
+ var DEFAULT_CHANNELS = [
2124
+ {
2125
+ key: "retail",
2126
+ label: "Retail",
2127
+ sales: 310,
2128
+ color: "#4361EE"
2129
+ },
2130
+ {
2131
+ key: "website",
2132
+ label: "Website",
2133
+ sales: 1420,
2134
+ color: "#00CFE8"
2135
+ },
2136
+ {
2137
+ key: "thirdParty",
2138
+ label: "Third Party",
2139
+ sales: 1920,
2140
+ color: "#FF9F43"
2141
+ }
2142
+ ];
2143
+ var DEFAULT_BRANDS = [
2144
+ {
2145
+ name: "Apple",
2146
+ retail: 35e3,
2147
+ website: 4e4,
2148
+ thirdParty: 45e3
2149
+ },
2150
+ {
2151
+ name: "Lenovo",
2152
+ retail: 2e4,
2153
+ website: 35e3,
2154
+ thirdParty: 3e4
2155
+ },
2156
+ {
2157
+ name: "Asus",
2158
+ retail: 15e3,
2159
+ website: 25e3,
2160
+ thirdParty: 2e4
2161
+ }
2162
+ ];
2163
+ var InfoIcon = () => /* @__PURE__ */ jsxs("svg", {
2164
+ width: "14",
2165
+ height: "14",
2166
+ viewBox: "0 0 24 24",
2167
+ fill: "none",
2168
+ stroke: "currentColor",
2169
+ strokeWidth: "2",
2170
+ strokeLinecap: "round",
2171
+ strokeLinejoin: "round",
2172
+ children: [
2173
+ /* @__PURE__ */ jsx("circle", {
2174
+ cx: "12",
2175
+ cy: "12",
2176
+ r: "10"
2177
+ }),
2178
+ /* @__PURE__ */ jsx("line", {
2179
+ x1: "12",
2180
+ y1: "16",
2181
+ x2: "12",
2182
+ y2: "12"
2183
+ }),
2184
+ /* @__PURE__ */ jsx("line", {
2185
+ x1: "12",
2186
+ y1: "8",
2187
+ x2: "12.01",
2188
+ y2: "8"
2189
+ })
2190
+ ]
2191
+ });
2192
+ var ExpandIcon = () => /* @__PURE__ */ jsxs("svg", {
2193
+ width: "14",
2194
+ height: "14",
2195
+ viewBox: "0 0 24 24",
2196
+ fill: "none",
2197
+ stroke: "currentColor",
2198
+ strokeWidth: "2",
2199
+ strokeLinecap: "round",
2200
+ strokeLinejoin: "round",
2201
+ children: [
2202
+ /* @__PURE__ */ jsx("polyline", { points: "15 3 21 3 21 9" }),
2203
+ /* @__PURE__ */ jsx("polyline", { points: "9 21 3 21 3 15" }),
2204
+ /* @__PURE__ */ jsx("line", {
2205
+ x1: "21",
2206
+ y1: "3",
2207
+ x2: "14",
2208
+ y2: "10"
2209
+ }),
2210
+ /* @__PURE__ */ jsx("line", {
2211
+ x1: "3",
2212
+ y1: "21",
2213
+ x2: "10",
2214
+ y2: "14"
2215
+ })
2216
+ ]
2217
+ });
2218
+ var EditIcon = () => /* @__PURE__ */ jsxs("svg", {
2219
+ width: "14",
2220
+ height: "14",
2221
+ viewBox: "0 0 24 24",
2222
+ fill: "none",
2223
+ stroke: "currentColor",
2224
+ strokeWidth: "2",
2225
+ strokeLinecap: "round",
2226
+ strokeLinejoin: "round",
2227
+ children: [/* @__PURE__ */ jsx("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), /* @__PURE__ */ jsx("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })]
2228
+ });
2229
+ var EllipsisHIcon = () => /* @__PURE__ */ jsxs("svg", {
2230
+ width: "14",
2231
+ height: "14",
2232
+ viewBox: "0 0 24 24",
2233
+ fill: "none",
2234
+ stroke: "currentColor",
2235
+ strokeWidth: "2",
2236
+ strokeLinecap: "round",
2237
+ strokeLinejoin: "round",
2238
+ children: [
2239
+ /* @__PURE__ */ jsx("circle", {
2240
+ cx: "12",
2241
+ cy: "12",
2242
+ r: "1"
2243
+ }),
2244
+ /* @__PURE__ */ jsx("circle", {
2245
+ cx: "19",
2246
+ cy: "12",
2247
+ r: "1"
2248
+ }),
2249
+ /* @__PURE__ */ jsx("circle", {
2250
+ cx: "5",
2251
+ cy: "12",
2252
+ r: "1"
2253
+ })
2254
+ ]
2255
+ });
2256
+ var xTickFormatter = (v) => v === 0 ? "0" : `${Math.round(v / 1e3)}K`;
2257
+ var DeviceSalesCard = ({ title = "Device Sales", channels = DEFAULT_CHANNELS, brands = DEFAULT_BRANDS, className, onExpand, onEdit, onMoreClick }) => {
2258
+ const channelMap = Object.fromEntries(channels.map((c) => [c.key, c]));
2259
+ const maxValue = Math.ceil(brands.reduce((max, b) => Math.max(max, b.retail + b.website + b.thirdParty), 0) / 2e4) * 2e4;
2260
+ const xDomain = [0, Math.max(maxValue, 1e5)];
2261
+ const xTicks = Array.from({ length: Math.floor(xDomain[1] / 2e4) + 1 }, (_, i) => i * 2e4);
2262
+ return /* @__PURE__ */ jsxs("div", {
2263
+ className: mergeClassNames("rounded-lg border border-ds-border-3/80 bg-ds-surface-1", className),
2264
+ children: [
2265
+ /* @__PURE__ */ jsxs("div", {
2266
+ className: "flex items-center justify-between px-5 pb-3 pt-5",
2267
+ children: [/* @__PURE__ */ jsxs("div", {
2268
+ className: "flex items-center gap-2",
2269
+ children: [/* @__PURE__ */ jsx("p", {
2270
+ className: "text-base font-bold text-ds-1",
2271
+ children: title
2272
+ }), /* @__PURE__ */ jsx("span", {
2273
+ className: "text-ds-3",
2274
+ "aria-hidden": "true",
2275
+ children: /* @__PURE__ */ jsx(InfoIcon, {})
2276
+ })]
2277
+ }), /* @__PURE__ */ jsxs("div", {
2278
+ className: "flex items-center gap-0.5",
2279
+ children: [
2280
+ /* @__PURE__ */ jsx(Button, {
2281
+ variant: "tertiary",
2282
+ size: "small",
2283
+ className: "p-1! text-ds-3",
2284
+ "aria-label": "Expand",
2285
+ onClick: onExpand,
2286
+ children: /* @__PURE__ */ jsx(ExpandIcon, {})
2287
+ }),
2288
+ /* @__PURE__ */ jsx(Button, {
2289
+ variant: "tertiary",
2290
+ size: "small",
2291
+ className: "p-1! text-ds-3",
2292
+ "aria-label": "Edit",
2293
+ onClick: onEdit,
2294
+ children: /* @__PURE__ */ jsx(EditIcon, {})
2295
+ }),
2296
+ /* @__PURE__ */ jsx(Button, {
2297
+ variant: "tertiary",
2298
+ size: "small",
2299
+ className: "p-1! text-ds-3",
2300
+ "aria-label": "More options",
2301
+ onClick: onMoreClick,
2302
+ children: /* @__PURE__ */ jsx(EllipsisHIcon, {})
2303
+ })
2304
+ ]
2305
+ })]
2306
+ }),
2307
+ /* @__PURE__ */ jsx("div", {
2308
+ className: "grid grid-cols-3 divide-x divide-ds-border-3/50 border-b border-ds-border-3/50 pb-4",
2309
+ children: channels.map((channel) => /* @__PURE__ */ jsxs("div", {
2310
+ className: "flex flex-col items-center gap-1 px-3 pt-1",
2311
+ children: [
2312
+ /* @__PURE__ */ jsx("div", {
2313
+ className: "mb-1 h-1 w-8 rounded-full",
2314
+ style: { backgroundColor: channel.color },
2315
+ "aria-hidden": "true"
2316
+ }),
2317
+ /* @__PURE__ */ jsx("p", {
2318
+ className: "text-lg font-bold text-ds-1",
2319
+ children: channel.sales.toLocaleString()
2320
+ }),
2321
+ /* @__PURE__ */ jsxs("p", {
2322
+ className: "text-center text-[11px] leading-tight text-ds-3",
2323
+ children: [channel.label, " Sales"]
2324
+ })
2325
+ ]
2326
+ }, channel.key))
2327
+ }),
2328
+ /* @__PURE__ */ jsx("div", {
2329
+ style: { height: brands.length * 64 + 56 },
2330
+ className: "px-2 pt-4",
2331
+ children: /* @__PURE__ */ jsx(ResponsiveContainer, {
2332
+ width: "100%",
2333
+ height: "100%",
2334
+ children: /* @__PURE__ */ jsxs(BarChart, {
2335
+ data: brands,
2336
+ layout: "vertical",
2337
+ barSize: 18,
2338
+ barCategoryGap: "35%",
2339
+ margin: {
2340
+ top: 4,
2341
+ right: 12,
2342
+ left: 0,
2343
+ bottom: 4
2344
+ },
2345
+ children: [
2346
+ /* @__PURE__ */ jsx(XAxis, {
2347
+ type: "number",
2348
+ domain: xDomain,
2349
+ ticks: xTicks,
2350
+ axisLine: false,
2351
+ tickLine: false,
2352
+ tickFormatter: xTickFormatter,
2353
+ tick: {
2354
+ fill: "var(--ds-color-fg-muted)",
2355
+ fontSize: 10
2356
+ }
2357
+ }),
2358
+ /* @__PURE__ */ jsx(YAxis, {
2359
+ type: "category",
2360
+ dataKey: "name",
2361
+ axisLine: false,
2362
+ tickLine: false,
2363
+ tick: {
2364
+ fill: "var(--ds-color-fg-muted)",
2365
+ fontSize: 12
2366
+ },
2367
+ width: 52
2368
+ }),
2369
+ /* @__PURE__ */ jsx(Tooltip, {
2370
+ contentStyle: chartTooltipContentStyle,
2371
+ itemStyle: chartTooltipItemStyle,
2372
+ labelStyle: chartTooltipLabelStyle,
2373
+ wrapperStyle: chartTooltipWrapperStyle,
2374
+ cursor: { fill: "rgba(0,0,0,0.04)" },
2375
+ formatter: (v, name) => [Number(v).toLocaleString(), channelMap[name]?.label ?? String(name)]
2376
+ }),
2377
+ /* @__PURE__ */ jsx(Bar, {
2378
+ dataKey: "retail",
2379
+ stackId: "stack",
2380
+ fill: channelMap.retail?.color ?? "#4361EE",
2381
+ radius: [
2382
+ 2,
2383
+ 0,
2384
+ 0,
2385
+ 2
2386
+ ]
2387
+ }),
2388
+ /* @__PURE__ */ jsx(Bar, {
2389
+ dataKey: "website",
2390
+ stackId: "stack",
2391
+ fill: channelMap.website?.color ?? "#00CFE8"
2392
+ }),
2393
+ /* @__PURE__ */ jsx(Bar, {
2394
+ dataKey: "thirdParty",
2395
+ stackId: "stack",
2396
+ fill: channelMap.thirdParty?.color ?? "#FF9F43",
2397
+ radius: [
2398
+ 0,
2399
+ 2,
2400
+ 2,
2401
+ 0
2402
+ ]
2403
+ })
2404
+ ]
2405
+ })
2406
+ })
2407
+ }),
2408
+ /* @__PURE__ */ jsx("div", {
2409
+ className: "flex flex-wrap items-center justify-center gap-4 px-5 pb-4 pt-1",
2410
+ children: channels.map((channel) => /* @__PURE__ */ jsxs("div", {
2411
+ className: "flex items-center gap-2",
2412
+ children: [/* @__PURE__ */ jsx("span", {
2413
+ className: "h-2.5 w-2.5 shrink-0 rounded-full",
2414
+ style: { backgroundColor: channel.color },
2415
+ "aria-hidden": "true"
2416
+ }), /* @__PURE__ */ jsx("span", {
2417
+ className: "text-xs text-ds-2",
2418
+ children: channel.label
2419
+ })]
2420
+ }, channel.key))
2421
+ })
2422
+ ]
2423
+ });
2424
+ };
2425
+ //#endregion
2426
+ export { VehiclesOverviewCard as a, TopicsCard as c, SalesOverviewCard as d, SupportTrackerCard as f, StatCard as g, ChartCard as h, StockAvailabilityCard as i, EarningReportsTabsCard as l, TopProductsCard as m, IncomeExpenseCard as n, VehicleConditionCard as o, EarningsCard as p, ExpensesCard as r, ShipmentStatisticsCard as s, DeviceSalesCard as t, RevenueGrowthCard as u };
2427
+
2428
+ //# sourceMappingURL=dashboard-cards-BnPt0gDW.mjs.map