erp-pro-ui 0.2.6 → 0.2.7

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 (422) 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 +7 -0
  22. package/dist/catalog.cjs.map +1 -1
  23. package/dist/catalog.d.ts +13 -1
  24. package/dist/catalog.d.ts.map +1 -1
  25. package/dist/catalog.mjs +7 -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-Y0_sJni5.mjs → Drawer-BhTTQV8Q.mjs} +2 -2
  36. package/dist/chunks/{Drawer-Y0_sJni5.mjs.map → Drawer-BhTTQV8Q.mjs.map} +1 -1
  37. package/dist/chunks/{Drawer-D72Xi2Gq.cjs → Drawer-C_DLqrus.cjs} +2 -3
  38. package/dist/chunks/{Drawer-D72Xi2Gq.cjs.map → Drawer-C_DLqrus.cjs.map} +1 -1
  39. package/dist/chunks/{DropdownMenu-BQ4WlaGp.mjs → DropdownMenu-B18BI5l7.mjs} +2 -2
  40. package/dist/chunks/{DropdownMenu-BQ4WlaGp.mjs.map → DropdownMenu-B18BI5l7.mjs.map} +1 -1
  41. package/dist/chunks/{DropdownMenu-yh04burS.cjs → DropdownMenu-CEmlmX7P.cjs} +2 -3
  42. package/dist/chunks/{DropdownMenu-yh04burS.cjs.map → DropdownMenu-CEmlmX7P.cjs.map} +1 -1
  43. package/dist/chunks/{HoverBorderGradient-DEtm3owk.mjs → HoverBorderGradient-CGKcviEd.mjs} +2 -2
  44. package/dist/chunks/{HoverBorderGradient-DEtm3owk.mjs.map → HoverBorderGradient-CGKcviEd.mjs.map} +1 -1
  45. package/dist/chunks/{HoverBorderGradient-DMMyr2L3.cjs → HoverBorderGradient-DTKasFZO.cjs} +2 -3
  46. package/dist/chunks/{HoverBorderGradient-DMMyr2L3.cjs.map → HoverBorderGradient-DTKasFZO.cjs.map} +1 -1
  47. package/dist/chunks/{SunToMoonButton-BOKHzC1H.mjs → SunToMoonButton-DIMK53fW.mjs} +2 -2
  48. package/dist/chunks/{SunToMoonButton-BOKHzC1H.mjs.map → SunToMoonButton-DIMK53fW.mjs.map} +1 -1
  49. package/dist/chunks/{SunToMoonButton-gX4Kk_5B.cjs → SunToMoonButton-DUuIqw22.cjs} +2 -3
  50. package/dist/chunks/{SunToMoonButton-gX4Kk_5B.cjs.map → SunToMoonButton-DUuIqw22.cjs.map} +1 -1
  51. package/dist/chunks/{Tooltip-nnaiqJTT.cjs → Tooltip-1yPGRJ2Q.cjs} +1 -2
  52. package/dist/chunks/{Tooltip-nnaiqJTT.cjs.map → Tooltip-1yPGRJ2Q.cjs.map} +1 -1
  53. package/dist/chunks/{Tooltip-LbOKP__2.mjs → Tooltip-CEj-I4JO.mjs} +1 -1
  54. package/dist/chunks/{Tooltip-LbOKP__2.mjs.map → Tooltip-CEj-I4JO.mjs.map} +1 -1
  55. package/dist/chunks/{accordion-CLcjNX_X.mjs → accordion-Cf-Q3rec.mjs} +2 -2
  56. package/dist/chunks/{accordion-CLcjNX_X.mjs.map → accordion-Cf-Q3rec.mjs.map} +1 -1
  57. package/dist/chunks/{accordion-Bj3Sj0mC.cjs → accordion-X4PNqWkW.cjs} +2 -3
  58. package/dist/chunks/{accordion-Bj3Sj0mC.cjs.map → accordion-X4PNqWkW.cjs.map} +1 -1
  59. package/dist/chunks/{alert-BBA4Sh4e.cjs → alert-BEMULPIi.cjs} +2 -3
  60. package/dist/chunks/{alert-BBA4Sh4e.cjs.map → alert-BEMULPIi.cjs.map} +1 -1
  61. package/dist/chunks/{alert-oUz79MGc.mjs → alert-GImBqaCY.mjs} +2 -2
  62. package/dist/chunks/{alert-oUz79MGc.mjs.map → alert-GImBqaCY.mjs.map} +1 -1
  63. package/dist/chunks/{animated-content-CiNJLgbq.mjs → animated-content-Bp-Yt0_7.mjs} +1 -1
  64. package/dist/chunks/{animated-content-CiNJLgbq.mjs.map → animated-content-Bp-Yt0_7.mjs.map} +1 -1
  65. package/dist/chunks/{animated-content-B3wbiWQI.cjs → animated-content-tSHXDZq2.cjs} +1 -2
  66. package/dist/chunks/{animated-content-B3wbiWQI.cjs.map → animated-content-tSHXDZq2.cjs.map} +1 -1
  67. package/dist/chunks/{ascii-text-KwVE41Hw.cjs → ascii-text-Ctua6ucZ.cjs} +2 -2
  68. package/dist/chunks/{ascii-text-KwVE41Hw.cjs.map → ascii-text-Ctua6ucZ.cjs.map} +1 -1
  69. package/dist/chunks/{ascii-text-C6JegLhP.mjs → ascii-text-QyP7JU7g.mjs} +1 -1
  70. package/dist/chunks/{ascii-text-C6JegLhP.mjs.map → ascii-text-QyP7JU7g.mjs.map} +1 -1
  71. package/dist/chunks/{background-gradient-animation-CTc2ZR74.mjs → background-gradient-animation-CZUD_aq2.mjs} +2 -2
  72. package/dist/chunks/{background-gradient-animation-CTc2ZR74.mjs.map → background-gradient-animation-CZUD_aq2.mjs.map} +1 -1
  73. package/dist/chunks/{background-gradient-animation-1LZY3DYT.cjs → background-gradient-animation-PvM0i88k.cjs} +2 -3
  74. package/dist/chunks/{background-gradient-animation-1LZY3DYT.cjs.map → background-gradient-animation-PvM0i88k.cjs.map} +1 -1
  75. package/dist/chunks/{button-IDShmQqA.mjs → button-CAU9ej3h.mjs} +2 -2
  76. package/dist/chunks/{button-IDShmQqA.mjs.map → button-CAU9ej3h.mjs.map} +1 -1
  77. package/dist/chunks/{button-uD87K76W.cjs → button-D2ZYmVda.cjs} +2 -3
  78. package/dist/chunks/{button-uD87K76W.cjs.map → button-D2ZYmVda.cjs.map} +1 -1
  79. package/dist/chunks/{button-hover-border-gradient-DGZqd8je.cjs → button-hover-border-gradient-D12Zjmd3.cjs} +2 -3
  80. package/dist/chunks/{button-hover-border-gradient-DGZqd8je.cjs.map → button-hover-border-gradient-D12Zjmd3.cjs.map} +1 -1
  81. package/dist/chunks/{button-hover-border-gradient-B2ebbDek.mjs → button-hover-border-gradient-VNEg4V0o.mjs} +2 -2
  82. package/dist/chunks/{button-hover-border-gradient-B2ebbDek.mjs.map → button-hover-border-gradient-VNEg4V0o.mjs.map} +1 -1
  83. package/dist/chunks/calendar-BlUhssD4.mjs +203 -0
  84. package/dist/chunks/calendar-BlUhssD4.mjs.map +1 -0
  85. package/dist/chunks/calendar-CdKKhdx5.cjs +208 -0
  86. package/dist/chunks/calendar-CdKKhdx5.cjs.map +1 -0
  87. package/dist/chunks/{card-Cuud0jIt.cjs → card-C_Qr7E6E.cjs} +1 -2
  88. package/dist/chunks/{card-Cuud0jIt.cjs.map → card-C_Qr7E6E.cjs.map} +1 -1
  89. package/dist/chunks/{card-DNeC6jqk.mjs → card-DYHDNCPK.mjs} +1 -1
  90. package/dist/chunks/{card-DNeC6jqk.mjs.map → card-DYHDNCPK.mjs.map} +1 -1
  91. package/dist/chunks/{carousel-xHkrV_pt.cjs → carousel-DtOJEbEU.cjs} +4 -5
  92. package/dist/chunks/{carousel-xHkrV_pt.cjs.map → carousel-DtOJEbEU.cjs.map} +1 -1
  93. package/dist/chunks/{carousel-Dpe5QLJK.mjs → carousel-eeqWZZHE.mjs} +4 -4
  94. package/dist/chunks/{carousel-Dpe5QLJK.mjs.map → carousel-eeqWZZHE.mjs.map} +1 -1
  95. package/dist/chunks/{chartStyles-BADmRKZo.cjs → chartStyles-2mTluDoo.cjs} +1 -1
  96. package/dist/chunks/{chartStyles-BADmRKZo.cjs.map → chartStyles-2mTluDoo.cjs.map} +1 -1
  97. package/dist/chunks/{chartStyles-DPXgYmGn.mjs → chartStyles-DrHVYS5N.mjs} +1 -1
  98. package/dist/chunks/{chartStyles-DPXgYmGn.mjs.map → chartStyles-DrHVYS5N.mjs.map} +1 -1
  99. package/dist/chunks/{charts-COx3IbI2.cjs → charts-DMu4zp8j.cjs} +4 -4
  100. package/dist/chunks/{charts-COx3IbI2.cjs.map → charts-DMu4zp8j.cjs.map} +1 -1
  101. package/dist/chunks/{charts-C-KQ3Nk5.mjs → charts-DlskmT1J.mjs} +3 -3
  102. package/dist/chunks/{charts-C-KQ3Nk5.mjs.map → charts-DlskmT1J.mjs.map} +1 -1
  103. package/dist/chunks/{checkbox-Y04NlzB8.mjs → checkbox-D7EJQbqC.mjs} +1 -1
  104. package/dist/chunks/{checkbox-Y04NlzB8.mjs.map → checkbox-D7EJQbqC.mjs.map} +1 -1
  105. package/dist/chunks/{checkbox-CDknzh89.cjs → checkbox-Lw2UqyNE.cjs} +1 -2
  106. package/dist/chunks/{checkbox-CDknzh89.cjs.map → checkbox-Lw2UqyNE.cjs.map} +1 -1
  107. package/dist/chunks/{chip-sfQlzrbo.cjs → chip-D5i9VT9O.cjs} +4 -5
  108. package/dist/chunks/{chip-sfQlzrbo.cjs.map → chip-D5i9VT9O.cjs.map} +1 -1
  109. package/dist/chunks/{chip-B3j6R6sO.mjs → chip-DBlSQcqR.mjs} +4 -4
  110. package/dist/chunks/{chip-B3j6R6sO.mjs.map → chip-DBlSQcqR.mjs.map} +1 -1
  111. package/dist/chunks/{chroma-grid-Bp55pKEm.cjs → chroma-grid-CTDtdFUm.cjs} +2 -3
  112. package/dist/chunks/{chroma-grid-Bp55pKEm.cjs.map → chroma-grid-CTDtdFUm.cjs.map} +1 -1
  113. package/dist/chunks/{chroma-grid-BHS9qAn_.mjs → chroma-grid-DuLTfGVP.mjs} +2 -2
  114. package/dist/chunks/{chroma-grid-BHS9qAn_.mjs.map → chroma-grid-DuLTfGVP.mjs.map} +1 -1
  115. package/dist/chunks/{color-palette-Duud5Iqq.cjs → color-palette-DQQ9UV0N.cjs} +2 -2
  116. package/dist/chunks/{color-palette-Duud5Iqq.cjs.map → color-palette-DQQ9UV0N.cjs.map} +1 -1
  117. package/dist/chunks/{color-palette-D9Qlw2Cx.mjs → color-palette-G1HUXWJP.mjs} +1 -1
  118. package/dist/chunks/{color-palette-D9Qlw2Cx.mjs.map → color-palette-G1HUXWJP.mjs.map} +1 -1
  119. package/dist/chunks/{combobox-C3a2iogC.cjs → combobox-CkNzH1YV.cjs} +6 -6
  120. package/dist/chunks/{combobox-C3a2iogC.cjs.map → combobox-CkNzH1YV.cjs.map} +1 -1
  121. package/dist/chunks/{combobox-neBItbtz.mjs → combobox-xNmFFHd6.mjs} +5 -5
  122. package/dist/chunks/{combobox-neBItbtz.mjs.map → combobox-xNmFFHd6.mjs.map} +1 -1
  123. package/dist/chunks/dashboard-cards-Bww66_5K.cjs +6570 -0
  124. package/dist/chunks/dashboard-cards-Bww66_5K.cjs.map +1 -0
  125. package/dist/chunks/dashboard-cards-lnifLEyj.mjs +6385 -0
  126. package/dist/chunks/dashboard-cards-lnifLEyj.mjs.map +1 -0
  127. package/dist/chunks/{data-table-BZEiSZI2.cjs → data-table-BCVbzkLo.cjs} +16 -17
  128. package/dist/chunks/{data-table-BZEiSZI2.cjs.map → data-table-BCVbzkLo.cjs.map} +1 -1
  129. package/dist/chunks/{data-table-EfGKkerd.mjs → data-table-C25KHEn4.mjs} +14 -15
  130. package/dist/chunks/{data-table-EfGKkerd.mjs.map → data-table-C25KHEn4.mjs.map} +1 -1
  131. package/dist/chunks/date-picker--cqsgsIV.mjs +587 -0
  132. package/dist/chunks/date-picker--cqsgsIV.mjs.map +1 -0
  133. package/dist/chunks/date-picker-BJQdFyqr.cjs +592 -0
  134. package/dist/chunks/date-picker-BJQdFyqr.cjs.map +1 -0
  135. package/dist/chunks/{dialog-B60BjJz0.mjs → dialog-BHIeG3Sg.mjs} +3 -3
  136. package/dist/chunks/{dialog-B60BjJz0.mjs.map → dialog-BHIeG3Sg.mjs.map} +1 -1
  137. package/dist/chunks/{dialog-i9LdkXmF.cjs → dialog-CLKU0cXX.cjs} +3 -4
  138. package/dist/chunks/{dialog-i9LdkXmF.cjs.map → dialog-CLKU0cXX.cjs.map} +1 -1
  139. package/dist/chunks/draggable-grid-2L_eHKfp.cjs +245 -0
  140. package/dist/chunks/draggable-grid-2L_eHKfp.cjs.map +1 -0
  141. package/dist/chunks/draggable-grid-IuCMSOsE.mjs +240 -0
  142. package/dist/chunks/draggable-grid-IuCMSOsE.mjs.map +1 -0
  143. package/dist/chunks/{event-calendar-BbFOUDov.mjs → event-calendar-CO2doGJW.mjs} +11 -11
  144. package/dist/chunks/{event-calendar-BbFOUDov.mjs.map → event-calendar-CO2doGJW.mjs.map} +1 -1
  145. package/dist/chunks/{event-calendar-Bljd_7PI.cjs → event-calendar-CvficOuV.cjs} +11 -12
  146. package/dist/chunks/{event-calendar-Bljd_7PI.cjs.map → event-calendar-CvficOuV.cjs.map} +1 -1
  147. package/dist/chunks/{form-DGwdlSW2.cjs → form-DARN6jtX.cjs} +1 -2
  148. package/dist/chunks/{form-DGwdlSW2.cjs.map → form-DARN6jtX.cjs.map} +1 -1
  149. package/dist/chunks/{form-CDc9UM3r.mjs → form-DNuFklNR.mjs} +1 -1
  150. package/dist/chunks/{form-CDc9UM3r.mjs.map → form-DNuFklNR.mjs.map} +1 -1
  151. package/dist/chunks/{gradual-blur-BNYVlqb1.cjs → gradual-blur-BBLbpXD4.cjs} +2 -3
  152. package/dist/chunks/{gradual-blur-BNYVlqb1.cjs.map → gradual-blur-BBLbpXD4.cjs.map} +1 -1
  153. package/dist/chunks/{gradual-blur-Bw2KNmXb.mjs → gradual-blur-BPx2MSWI.mjs} +2 -2
  154. package/dist/chunks/{gradual-blur-Bw2KNmXb.mjs.map → gradual-blur-BPx2MSWI.mjs.map} +1 -1
  155. package/dist/chunks/{hover-card-G66SUyjq.mjs → hover-card-BkVHGXz6.mjs} +1 -1
  156. package/dist/chunks/{hover-card-G66SUyjq.mjs.map → hover-card-BkVHGXz6.mjs.map} +1 -1
  157. package/dist/chunks/{hover-card-Dp6Y2h2J.cjs → hover-card-DwZFtu8w.cjs} +1 -2
  158. package/dist/chunks/{hover-card-Dp6Y2h2J.cjs.map → hover-card-DwZFtu8w.cjs.map} +1 -1
  159. package/dist/chunks/{icons-ub9iu-JG.cjs → icons-Ci8yEvvF.cjs} +48 -2
  160. package/dist/chunks/icons-Ci8yEvvF.cjs.map +1 -0
  161. package/dist/chunks/{icons-JzMKLygv.mjs → icons-CkVHNbbN.mjs} +43 -2
  162. package/dist/chunks/icons-CkVHNbbN.mjs.map +1 -0
  163. package/dist/chunks/{input-CRc3MKb_.mjs → input-B-XSdnfh.mjs} +4 -4
  164. package/dist/chunks/{input-CRc3MKb_.mjs.map → input-B-XSdnfh.mjs.map} +1 -1
  165. package/dist/chunks/{input-DMTwz27q.cjs → input-EH7x0pQY.cjs} +4 -5
  166. package/dist/chunks/{input-DMTwz27q.cjs.map → input-EH7x0pQY.cjs.map} +1 -1
  167. package/dist/chunks/{label-Bc_r54NU.mjs → label-CcsncrKQ.mjs} +1 -1
  168. package/dist/chunks/{label-Bc_r54NU.mjs.map → label-CcsncrKQ.mjs.map} +1 -1
  169. package/dist/chunks/{label-B5Ugq0Nk.cjs → label-Du-5H7wd.cjs} +1 -2
  170. package/dist/chunks/{label-B5Ugq0Nk.cjs.map → label-Du-5H7wd.cjs.map} +1 -1
  171. package/dist/chunks/{loading-ll2L6lc7.mjs → loading-2Lh_355V.mjs} +2 -2
  172. package/dist/chunks/{loading-ll2L6lc7.mjs.map → loading-2Lh_355V.mjs.map} +1 -1
  173. package/dist/chunks/{loading-DZKJc3e7.cjs → loading-DeGHTDO2.cjs} +2 -3
  174. package/dist/chunks/{loading-DZKJc3e7.cjs.map → loading-DeGHTDO2.cjs.map} +1 -1
  175. package/dist/chunks/{multi-select-combobox-C_8sxaiL.mjs → multi-select-combobox-BOdKmPj2.mjs} +4 -4
  176. package/dist/chunks/{multi-select-combobox-C_8sxaiL.mjs.map → multi-select-combobox-BOdKmPj2.mjs.map} +1 -1
  177. package/dist/chunks/{multi-select-combobox-CFJGq1hn.cjs → multi-select-combobox-PPYRcaPg.cjs} +5 -5
  178. package/dist/chunks/{multi-select-combobox-CFJGq1hn.cjs.map → multi-select-combobox-PPYRcaPg.cjs.map} +1 -1
  179. package/dist/chunks/{otp-input-BpcTJOmU.mjs → otp-input--_itTXaL.mjs} +1 -1
  180. package/dist/chunks/{otp-input-BpcTJOmU.mjs.map → otp-input--_itTXaL.mjs.map} +1 -1
  181. package/dist/chunks/{otp-input-B5-tuc0q.cjs → otp-input-Dgw_47Z7.cjs} +1 -2
  182. package/dist/chunks/{otp-input-B5-tuc0q.cjs.map → otp-input-Dgw_47Z7.cjs.map} +1 -1
  183. package/dist/chunks/{overlay-DzE_GyYf.cjs → overlay-15EzdrIu.cjs} +1 -2
  184. package/dist/chunks/{overlay-DzE_GyYf.cjs.map → overlay-15EzdrIu.cjs.map} +1 -1
  185. package/dist/chunks/{overlay-CG1dMYtO.mjs → overlay-BMbhF-EC.mjs} +1 -1
  186. package/dist/chunks/{overlay-CG1dMYtO.mjs.map → overlay-BMbhF-EC.mjs.map} +1 -1
  187. package/dist/chunks/{password-strength-meter-_o1T1HLO.cjs → password-strength-meter-Be1c-dnK.cjs} +2 -3
  188. package/dist/chunks/{password-strength-meter-_o1T1HLO.cjs.map → password-strength-meter-Be1c-dnK.cjs.map} +1 -1
  189. package/dist/chunks/{password-strength-meter-CH6uQAuK.mjs → password-strength-meter-Q1Qr-4tz.mjs} +2 -2
  190. package/dist/chunks/{password-strength-meter-CH6uQAuK.mjs.map → password-strength-meter-Q1Qr-4tz.mjs.map} +1 -1
  191. package/dist/chunks/{progress-bar-FfdFVvTT.cjs → progress-bar-BsnX079N.cjs} +3 -3
  192. package/dist/chunks/{progress-bar-FfdFVvTT.cjs.map → progress-bar-BsnX079N.cjs.map} +1 -1
  193. package/dist/chunks/{progress-bar-BAvRSW1b.mjs → progress-bar-l5WpbpZf.mjs} +2 -2
  194. package/dist/chunks/{progress-bar-BAvRSW1b.mjs.map → progress-bar-l5WpbpZf.mjs.map} +1 -1
  195. package/dist/chunks/{radio-BMOnxnUS.mjs → radio-B94_TGtz.mjs} +2 -2
  196. package/dist/chunks/{radio-BMOnxnUS.mjs.map → radio-B94_TGtz.mjs.map} +1 -1
  197. package/dist/chunks/{radio-wagafWwx.cjs → radio-W_NiS_dO.cjs} +2 -3
  198. package/dist/chunks/{radio-wagafWwx.cjs.map → radio-W_NiS_dO.cjs.map} +1 -1
  199. package/dist/chunks/{select-zFFyNmlY.cjs → select-C5lkcrSB.cjs} +5 -6
  200. package/dist/chunks/{select-zFFyNmlY.cjs.map → select-C5lkcrSB.cjs.map} +1 -1
  201. package/dist/chunks/{select--DeSgPdn.mjs → select-DnSSxddm.mjs} +5 -5
  202. package/dist/chunks/{select--DeSgPdn.mjs.map → select-DnSSxddm.mjs.map} +1 -1
  203. package/dist/chunks/{sidebar-oemmRzCL.mjs → sidebar-C3Sx87wD.mjs} +10 -11
  204. package/dist/chunks/{sidebar-oemmRzCL.mjs.map → sidebar-C3Sx87wD.mjs.map} +1 -1
  205. package/dist/chunks/{sidebar-Cq7UbKJT.cjs → sidebar-DDRWkz5k.cjs} +10 -12
  206. package/dist/chunks/{sidebar-Cq7UbKJT.cjs.map → sidebar-DDRWkz5k.cjs.map} +1 -1
  207. package/dist/chunks/{skeleton-DWvVc17T.cjs → skeleton-B2u9c1xJ.cjs} +2 -3
  208. package/dist/chunks/{skeleton-DWvVc17T.cjs.map → skeleton-B2u9c1xJ.cjs.map} +1 -1
  209. package/dist/chunks/{skeleton-BsDMlWZG.mjs → skeleton-DVAlrOq2.mjs} +2 -2
  210. package/dist/chunks/{skeleton-BsDMlWZG.mjs.map → skeleton-DVAlrOq2.mjs.map} +1 -1
  211. package/dist/chunks/{spinners-DlMcokJa.mjs → spinners-BQtIp2ov.mjs} +2 -2
  212. package/dist/chunks/{spinners-DlMcokJa.mjs.map → spinners-BQtIp2ov.mjs.map} +1 -1
  213. package/dist/chunks/{spinners-DBAJliAj.cjs → spinners-BiebALzS.cjs} +2 -3
  214. package/dist/chunks/{spinners-DBAJliAj.cjs.map → spinners-BiebALzS.cjs.map} +1 -1
  215. package/dist/chunks/{splash-cursor-CQ6_HwHV.cjs → splash-cursor-8b7ORB2k.cjs} +2 -3
  216. package/dist/chunks/{splash-cursor-CQ6_HwHV.cjs.map → splash-cursor-8b7ORB2k.cjs.map} +1 -1
  217. package/dist/chunks/{splash-cursor-Bb7LSzaO.mjs → splash-cursor-CeZffMed.mjs} +2 -2
  218. package/dist/chunks/{splash-cursor-Bb7LSzaO.mjs.map → splash-cursor-CeZffMed.mjs.map} +1 -1
  219. package/dist/chunks/{spotlight-card-COfSD7ns.cjs → spotlight-card-BQjp7hO1.cjs} +2 -3
  220. package/dist/chunks/{spotlight-card-COfSD7ns.cjs.map → spotlight-card-BQjp7hO1.cjs.map} +1 -1
  221. package/dist/chunks/{spotlight-card-Bs0iiSLc.mjs → spotlight-card-DiPtBCAK.mjs} +2 -2
  222. package/dist/chunks/{spotlight-card-Bs0iiSLc.mjs.map → spotlight-card-DiPtBCAK.mjs.map} +1 -1
  223. package/dist/chunks/{stepper-CTteR-Kj.cjs → stepper-BuhQfQTH.cjs} +5 -6
  224. package/dist/chunks/{stepper-CTteR-Kj.cjs.map → stepper-BuhQfQTH.cjs.map} +1 -1
  225. package/dist/chunks/{stepper-B9NdZ6ZV.mjs → stepper-CVNcexxq.mjs} +5 -5
  226. package/dist/chunks/{stepper-B9NdZ6ZV.mjs.map → stepper-CVNcexxq.mjs.map} +1 -1
  227. package/dist/chunks/{sun-to-moon-button-lt-1vmWm.cjs → sun-to-moon-button-BzYGFhrg.cjs} +4 -5
  228. package/dist/chunks/{sun-to-moon-button-lt-1vmWm.cjs.map → sun-to-moon-button-BzYGFhrg.cjs.map} +1 -1
  229. package/dist/chunks/{sun-to-moon-button-DWHDpP5B.mjs → sun-to-moon-button-CRXBMFZb.mjs} +4 -4
  230. package/dist/chunks/{sun-to-moon-button-DWHDpP5B.mjs.map → sun-to-moon-button-CRXBMFZb.mjs.map} +1 -1
  231. package/dist/chunks/{switch-BbFl5b4t.cjs → switch-CEoT3MgX.cjs} +1 -2
  232. package/dist/chunks/{switch-BbFl5b4t.cjs.map → switch-CEoT3MgX.cjs.map} +1 -1
  233. package/dist/chunks/{switch--68scepb.mjs → switch-DUnNe4xP.mjs} +1 -1
  234. package/dist/chunks/{switch--68scepb.mjs.map → switch-DUnNe4xP.mjs.map} +1 -1
  235. package/dist/chunks/{textarea-U_JeSWI3.cjs → textarea-Bschfj24.cjs} +2 -3
  236. package/dist/chunks/{textarea-U_JeSWI3.cjs.map → textarea-Bschfj24.cjs.map} +1 -1
  237. package/dist/chunks/{textarea-CEj9voUJ.mjs → textarea-CfeKo5HA.mjs} +2 -2
  238. package/dist/chunks/{textarea-CEj9voUJ.mjs.map → textarea-CfeKo5HA.mjs.map} +1 -1
  239. package/dist/chunks/{theme-koPrLKQv.mjs → theme-BXML6jHE.mjs} +1 -1
  240. package/dist/chunks/{theme-koPrLKQv.mjs.map → theme-BXML6jHE.mjs.map} +1 -1
  241. package/dist/chunks/{theme-D6B-FaoE.cjs → theme-BzTaXYZ8.cjs} +1 -2
  242. package/dist/chunks/{theme-D6B-FaoE.cjs.map → theme-BzTaXYZ8.cjs.map} +1 -1
  243. package/dist/chunks/{toast-CyY8VZN7.mjs → toast-D1W0BvoH.mjs} +2 -2
  244. package/dist/chunks/{toast-CyY8VZN7.mjs.map → toast-D1W0BvoH.mjs.map} +1 -1
  245. package/dist/chunks/{toast-2yq4Q7-q.cjs → toast-DL8svc6q.cjs} +2 -3
  246. package/dist/chunks/{toast-2yq4Q7-q.cjs.map → toast-DL8svc6q.cjs.map} +1 -1
  247. package/dist/chunks/{truncated-text-CswjmrHZ.cjs → truncated-text-D0t4atw5.cjs} +3 -3
  248. package/dist/chunks/{truncated-text-CswjmrHZ.cjs.map → truncated-text-D0t4atw5.cjs.map} +1 -1
  249. package/dist/chunks/{truncated-text-DUYTW1KP.mjs → truncated-text-DIkg-8Vo.mjs} +2 -2
  250. package/dist/chunks/{truncated-text-DUYTW1KP.mjs.map → truncated-text-DIkg-8Vo.mjs.map} +1 -1
  251. package/dist/chunks/{typography-CFIiYk1d.cjs → typography-C5fYwhp2.cjs} +3 -3
  252. package/dist/chunks/{typography-CFIiYk1d.cjs.map → typography-C5fYwhp2.cjs.map} +1 -1
  253. package/dist/chunks/{typography-DHE9sUZ8.mjs → typography-Czi7t5y4.mjs} +2 -2
  254. package/dist/chunks/{typography-DHE9sUZ8.mjs.map → typography-Czi7t5y4.mjs.map} +1 -1
  255. package/dist/chunks/{utils-LRbEQHYs.cjs → utils-CoA0q63n.cjs} +84 -4
  256. package/dist/chunks/utils-CoA0q63n.cjs.map +1 -0
  257. package/dist/chunks/{utils-7S0u48mU.mjs → utils-Dc7j29ec.mjs} +84 -4
  258. package/dist/chunks/utils-Dc7j29ec.mjs.map +1 -0
  259. package/dist/color-palette.cjs +1 -1
  260. package/dist/color-palette.mjs +1 -1
  261. package/dist/combobox.cjs +1 -1
  262. package/dist/combobox.mjs +1 -1
  263. package/dist/components/data-display/dashboard-cards/AIFeatureAdoptionCard.d.ts +26 -0
  264. package/dist/components/data-display/dashboard-cards/AIFeatureAdoptionCard.d.ts.map +1 -0
  265. package/dist/components/data-display/dashboard-cards/AIInsightsCard.d.ts +30 -0
  266. package/dist/components/data-display/dashboard-cards/AIInsightsCard.d.ts.map +1 -0
  267. package/dist/components/data-display/dashboard-cards/AcquisitionChannelCard.d.ts +24 -0
  268. package/dist/components/data-display/dashboard-cards/AcquisitionChannelCard.d.ts.map +1 -0
  269. package/dist/components/data-display/dashboard-cards/BarBreakdownCard.d.ts +49 -0
  270. package/dist/components/data-display/dashboard-cards/BarBreakdownCard.d.ts.map +1 -0
  271. package/dist/components/data-display/dashboard-cards/CustomerLifecycleCard.d.ts +24 -0
  272. package/dist/components/data-display/dashboard-cards/CustomerLifecycleCard.d.ts.map +1 -0
  273. package/dist/components/data-display/dashboard-cards/EarningReportsTabsCard.d.ts +111 -2
  274. package/dist/components/data-display/dashboard-cards/EarningReportsTabsCard.d.ts.map +1 -1
  275. package/dist/components/data-display/dashboard-cards/FinancialPLCard.d.ts +78 -0
  276. package/dist/components/data-display/dashboard-cards/FinancialPLCard.d.ts.map +1 -0
  277. package/dist/components/data-display/dashboard-cards/InventoryCards.d.ts +44 -0
  278. package/dist/components/data-display/dashboard-cards/InventoryCards.d.ts.map +1 -0
  279. package/dist/components/data-display/dashboard-cards/PaymentSummaryCard.d.ts +45 -0
  280. package/dist/components/data-display/dashboard-cards/PaymentSummaryCard.d.ts.map +1 -0
  281. package/dist/components/data-display/dashboard-cards/SalesHeatmapCard.d.ts +36 -0
  282. package/dist/components/data-display/dashboard-cards/SalesHeatmapCard.d.ts.map +1 -0
  283. package/dist/components/data-display/dashboard-cards/SeatUtilizationCard.d.ts +22 -0
  284. package/dist/components/data-display/dashboard-cards/SeatUtilizationCard.d.ts.map +1 -0
  285. package/dist/components/data-display/dashboard-cards/SubscriptionHealthCard.d.ts +23 -0
  286. package/dist/components/data-display/dashboard-cards/SubscriptionHealthCard.d.ts.map +1 -0
  287. package/dist/components/data-display/dashboard-cards/ToolUsageOverviewCard.d.ts +22 -0
  288. package/dist/components/data-display/dashboard-cards/ToolUsageOverviewCard.d.ts.map +1 -0
  289. package/dist/components/data-display/dashboard-cards/TopPlansCard.d.ts +23 -0
  290. package/dist/components/data-display/dashboard-cards/TopPlansCard.d.ts.map +1 -0
  291. package/dist/components/data-display/dashboard-cards/TopSellingItemsCard.d.ts +42 -0
  292. package/dist/components/data-display/dashboard-cards/TopSellingItemsCard.d.ts.map +1 -0
  293. package/dist/components/data-display/dashboard-cards/TopToolsCard.d.ts +22 -0
  294. package/dist/components/data-display/dashboard-cards/TopToolsCard.d.ts.map +1 -0
  295. package/dist/components/data-display/dashboard-cards/_PLCardHeader.d.ts +63 -0
  296. package/dist/components/data-display/dashboard-cards/_PLCardHeader.d.ts.map +1 -0
  297. package/dist/components/data-display/dashboard-cards/_PLCharts.d.ts +33 -0
  298. package/dist/components/data-display/dashboard-cards/_PLCharts.d.ts.map +1 -0
  299. package/dist/components/data-display/dashboard-cards/_PLKpiStrip.d.ts +11 -0
  300. package/dist/components/data-display/dashboard-cards/_PLKpiStrip.d.ts.map +1 -0
  301. package/dist/components/data-display/dashboard-cards/_PLOverview.d.ts +9 -0
  302. package/dist/components/data-display/dashboard-cards/_PLOverview.d.ts.map +1 -0
  303. package/dist/components/data-display/dashboard-cards/_TabTooltip.d.ts +8 -0
  304. package/dist/components/data-display/dashboard-cards/_TabTooltip.d.ts.map +1 -0
  305. package/dist/components/data-display/dashboard-cards/index.d.ts +32 -1
  306. package/dist/components/data-display/dashboard-cards/index.d.ts.map +1 -1
  307. package/dist/components/forms/calendar/Calendar.d.ts +1 -1
  308. package/dist/components/forms/calendar/Calendar.d.ts.map +1 -1
  309. package/dist/components/forms/calendar/types.d.ts +6 -0
  310. package/dist/components/forms/calendar/types.d.ts.map +1 -1
  311. package/dist/components/forms/date-picker/DatePicker.d.ts.map +1 -1
  312. package/dist/components/layout/draggable-grid/DraggableGrid.d.ts +20 -0
  313. package/dist/components/layout/draggable-grid/DraggableGrid.d.ts.map +1 -0
  314. package/dist/components/layout/draggable-grid/index.d.ts +3 -0
  315. package/dist/components/layout/draggable-grid/index.d.ts.map +1 -0
  316. package/dist/components/navigation/sidebar/DashboardSidebarShell.d.ts.map +1 -1
  317. package/dist/dashboard-cards.cjs +16 -1
  318. package/dist/dashboard-cards.mjs +2 -2
  319. package/dist/data-table.cjs +1 -1
  320. package/dist/data-table.mjs +1 -1
  321. package/dist/date-picker.cjs +1 -1
  322. package/dist/date-picker.mjs +1 -1
  323. package/dist/dialog.cjs +1 -1
  324. package/dist/dialog.mjs +1 -1
  325. package/dist/docs.cjs +13 -0
  326. package/dist/docs.cjs.map +1 -1
  327. package/dist/docs.d.ts.map +1 -1
  328. package/dist/docs.mjs +13 -0
  329. package/dist/docs.mjs.map +1 -1
  330. package/dist/draggable-grid.cjs +3 -0
  331. package/dist/draggable-grid.d.ts +2 -0
  332. package/dist/draggable-grid.mjs +2 -0
  333. package/dist/drawer.cjs +1 -1
  334. package/dist/drawer.mjs +1 -1
  335. package/dist/event-calendar.cjs +1 -1
  336. package/dist/event-calendar.mjs +1 -1
  337. package/dist/form.cjs +1 -1
  338. package/dist/form.mjs +1 -1
  339. package/dist/gradual-blur.cjs +1 -1
  340. package/dist/gradual-blur.mjs +1 -1
  341. package/dist/hover-border-gradient.cjs +1 -1
  342. package/dist/hover-border-gradient.mjs +1 -1
  343. package/dist/hover-card.cjs +1 -1
  344. package/dist/hover-card.mjs +1 -1
  345. package/dist/icons.cjs +2 -3
  346. package/dist/icons.mjs +1 -2
  347. package/dist/index.cjs +71 -56
  348. package/dist/index.cjs.map +1 -1
  349. package/dist/index.d.ts +7 -2
  350. package/dist/index.d.ts.map +1 -1
  351. package/dist/index.mjs +55 -55
  352. package/dist/index.mjs.map +1 -1
  353. package/dist/input.cjs +1 -1
  354. package/dist/input.mjs +1 -1
  355. package/dist/label.cjs +1 -1
  356. package/dist/label.mjs +1 -1
  357. package/dist/loading.cjs +1 -1
  358. package/dist/loading.mjs +1 -1
  359. package/dist/multi-select-combobox.cjs +1 -1
  360. package/dist/multi-select-combobox.mjs +1 -1
  361. package/dist/otp-input.cjs +1 -1
  362. package/dist/otp-input.mjs +1 -1
  363. package/dist/password-strength-meter.cjs +1 -1
  364. package/dist/password-strength-meter.mjs +1 -1
  365. package/dist/progress-bar.cjs +1 -1
  366. package/dist/progress-bar.mjs +1 -1
  367. package/dist/radio.cjs +1 -1
  368. package/dist/radio.mjs +1 -1
  369. package/dist/select.cjs +1 -1
  370. package/dist/select.mjs +1 -1
  371. package/dist/sidebar.cjs +1 -1
  372. package/dist/sidebar.mjs +1 -1
  373. package/dist/skeleton.cjs +1 -1
  374. package/dist/skeleton.mjs +1 -1
  375. package/dist/spinners.cjs +1 -1
  376. package/dist/spinners.mjs +1 -1
  377. package/dist/splash-cursor.cjs +1 -1
  378. package/dist/splash-cursor.mjs +1 -1
  379. package/dist/spotlight-card.cjs +1 -1
  380. package/dist/spotlight-card.mjs +1 -1
  381. package/dist/stepper.cjs +1 -1
  382. package/dist/stepper.mjs +1 -1
  383. package/dist/sun-to-moon-button.cjs +2 -2
  384. package/dist/sun-to-moon-button.mjs +2 -2
  385. package/dist/switch.cjs +1 -1
  386. package/dist/switch.mjs +1 -1
  387. package/dist/textarea.cjs +1 -1
  388. package/dist/textarea.mjs +1 -1
  389. package/dist/theme.cjs +1 -1
  390. package/dist/theme.mjs +1 -1
  391. package/dist/toast.cjs +1 -1
  392. package/dist/toast.mjs +1 -1
  393. package/dist/tooltip.cjs +1 -1
  394. package/dist/tooltip.mjs +1 -1
  395. package/dist/truncated-text.cjs +1 -1
  396. package/dist/truncated-text.mjs +1 -1
  397. package/dist/typography.cjs +1 -1
  398. package/dist/typography.mjs +1 -1
  399. package/dist/utils.cjs +1 -1
  400. package/dist/utils.mjs +1 -1
  401. package/package.json +34 -13
  402. package/dist/chunks/EllipsisVerticalIcon-BJw3MNkg.cjs +0 -51
  403. package/dist/chunks/EllipsisVerticalIcon-BJw3MNkg.cjs.map +0 -1
  404. package/dist/chunks/EllipsisVerticalIcon-C2b2KMfE.mjs +0 -45
  405. package/dist/chunks/EllipsisVerticalIcon-C2b2KMfE.mjs.map +0 -1
  406. package/dist/chunks/calendar-DCkikZYb.cjs +0 -184
  407. package/dist/chunks/calendar-DCkikZYb.cjs.map +0 -1
  408. package/dist/chunks/calendar-FxAmm_ao.mjs +0 -178
  409. package/dist/chunks/calendar-FxAmm_ao.mjs.map +0 -1
  410. package/dist/chunks/dashboard-cards-BnPt0gDW.mjs +0 -2428
  411. package/dist/chunks/dashboard-cards-BnPt0gDW.mjs.map +0 -1
  412. package/dist/chunks/dashboard-cards-DNWJPKRu.cjs +0 -2524
  413. package/dist/chunks/dashboard-cards-DNWJPKRu.cjs.map +0 -1
  414. package/dist/chunks/date-picker-3IDSmb9Z.mjs +0 -228
  415. package/dist/chunks/date-picker-3IDSmb9Z.mjs.map +0 -1
  416. package/dist/chunks/date-picker-_EVYpGga.cjs +0 -234
  417. package/dist/chunks/date-picker-_EVYpGga.cjs.map +0 -1
  418. package/dist/chunks/icons-JzMKLygv.mjs.map +0 -1
  419. package/dist/chunks/icons-ub9iu-JG.cjs.map +0 -1
  420. package/dist/chunks/utils-7S0u48mU.mjs.map +0 -1
  421. package/dist/chunks/utils-LRbEQHYs.cjs.map +0 -1
  422. /package/dist/chunks/{chunk-B_GkZjkl.cjs → chunk-D6vf50IK.cjs} +0 -0
@@ -1,2428 +0,0 @@
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