@parto-system-design/ui 1.1.11 → 1.1.16
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.
- package/dist/components/brand/parto-logo.cjs +130 -0
- package/dist/components/brand/parto-logo.cjs.map +1 -0
- package/dist/components/brand/parto-logo.d.cts +38 -0
- package/dist/components/brand/parto-logo.d.ts +38 -0
- package/dist/components/brand/parto-logo.js +108 -0
- package/dist/components/brand/parto-logo.js.map +1 -0
- package/dist/components/charts/PartoAreaChart.cjs +579 -7
- package/dist/components/charts/PartoAreaChart.cjs.map +1 -1
- package/dist/components/charts/PartoAreaChart.js +564 -4
- package/dist/components/charts/PartoAreaChart.js.map +1 -1
- package/dist/components/charts/PartoBarChart.cjs +616 -7
- package/dist/components/charts/PartoBarChart.cjs.map +1 -1
- package/dist/components/charts/PartoBarChart.js +601 -4
- package/dist/components/charts/PartoBarChart.js.map +1 -1
- package/dist/components/charts/PartoLineChart.cjs +584 -7
- package/dist/components/charts/PartoLineChart.cjs.map +1 -1
- package/dist/components/charts/PartoLineChart.js +569 -4
- package/dist/components/charts/PartoLineChart.js.map +1 -1
- package/dist/components/charts/PartoPieChart.cjs +566 -7
- package/dist/components/charts/PartoPieChart.cjs.map +1 -1
- package/dist/components/charts/PartoPieChart.js +551 -4
- package/dist/components/charts/PartoPieChart.js.map +1 -1
- package/dist/components/ui/accordion.cjs +97 -0
- package/dist/components/ui/accordion.cjs.map +1 -0
- package/dist/components/ui/accordion.d.cts +22 -0
- package/dist/components/ui/accordion.d.ts +22 -0
- package/dist/components/ui/accordion.js +72 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/{chunk-MMC6M35Q.cjs → components/ui/alert-dialog.cjs} +216 -22
- package/dist/components/ui/alert-dialog.cjs.map +1 -0
- package/dist/components/ui/alert-dialog.d.cts +17 -0
- package/dist/components/ui/alert-dialog.d.ts +17 -0
- package/dist/{chunk-3QYYPPFJ.js → components/ui/alert-dialog.js} +175 -10
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert-rule-card.cjs +289 -8
- package/dist/components/ui/alert-rule-card.cjs.map +1 -1
- package/dist/components/ui/alert-rule-card.d.cts +1 -1
- package/dist/components/ui/alert-rule-card.d.ts +1 -1
- package/dist/components/ui/alert-rule-card.js +271 -4
- package/dist/components/ui/alert-rule-card.js.map +1 -1
- package/dist/components/ui/alert.cjs +81 -0
- package/dist/components/ui/alert.cjs.map +1 -0
- package/dist/components/ui/alert.d.cts +11 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.js +57 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/app-bar.cjs +67 -0
- package/dist/components/ui/app-bar.cjs.map +1 -0
- package/dist/components/ui/app-bar.d.cts +22 -0
- package/dist/components/ui/app-bar.d.ts +22 -0
- package/dist/components/ui/app-bar.js +44 -0
- package/dist/components/ui/app-bar.js.map +1 -0
- package/dist/components/ui/avatar.cjs +66 -14
- package/dist/components/ui/avatar.cjs.map +1 -1
- package/dist/components/ui/avatar.js +47 -2
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.cjs +113 -9
- package/dist/components/ui/badge.cjs.map +1 -1
- package/dist/components/ui/badge.d.cts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +96 -2
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.cjs +100 -0
- package/dist/components/ui/breadcrumb.cjs.map +1 -0
- package/dist/components/ui/breadcrumb.d.cts +35 -0
- package/dist/components/ui/breadcrumb.d.ts +35 -0
- package/dist/components/ui/breadcrumb.js +92 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.cjs +304 -11
- package/dist/components/ui/button.cjs.map +1 -1
- package/dist/components/ui/button.d.cts +3 -3
- package/dist/components/ui/button.d.ts +3 -3
- package/dist/components/ui/button.js +306 -3
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.cjs +401 -8
- package/dist/components/ui/calendar.cjs.map +1 -1
- package/dist/components/ui/calendar.js +404 -4
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.cjs +154 -30
- package/dist/components/ui/card.cjs.map +1 -1
- package/dist/components/ui/card.js +131 -2
- package/dist/components/ui/card.js.map +1 -1
- package/dist/{chunk-CAJKSTXX.cjs → components/ui/checkbox.cjs} +10 -5
- package/dist/components/ui/checkbox.cjs.map +1 -0
- package/dist/components/ui/checkbox.d.cts +6 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/{chunk-5JJSRGJD.js → components/ui/checkbox.js} +9 -4
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/concept-card.cjs +728 -11
- package/dist/components/ui/concept-card.cjs.map +1 -1
- package/dist/components/ui/concept-card.d.cts +2 -2
- package/dist/components/ui/concept-card.d.ts +2 -2
- package/dist/components/ui/concept-card.js +710 -7
- package/dist/components/ui/concept-card.js.map +1 -1
- package/dist/components/ui/data-table.cjs +1553 -10
- package/dist/components/ui/data-table.cjs.map +1 -1
- package/dist/components/ui/data-table.js +1537 -7
- package/dist/components/ui/data-table.js.map +1 -1
- package/dist/components/ui/dialog.cjs +119 -42
- package/dist/components/ui/dialog.cjs.map +1 -1
- package/dist/components/ui/dialog.js +92 -2
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dropdown-menu.cjs +268 -0
- package/dist/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/components/ui/dropdown-menu.d.cts +73 -0
- package/dist/components/ui/dropdown-menu.d.ts +73 -0
- package/dist/components/ui/dropdown-menu.js +232 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/filter-provider.cjs +70 -13
- package/dist/components/ui/filter-provider.cjs.map +1 -1
- package/dist/components/ui/filter-provider.js +51 -1
- package/dist/components/ui/filter-provider.js.map +1 -1
- package/dist/components/ui/form.cjs +169 -0
- package/dist/components/ui/form.cjs.map +1 -0
- package/dist/components/ui/form.d.cts +46 -0
- package/dist/components/ui/form.d.ts +46 -0
- package/dist/components/ui/form.js +139 -0
- package/dist/components/ui/form.js.map +1 -0
- package/dist/components/ui/input.cjs +135 -15
- package/dist/components/ui/input.cjs.map +1 -1
- package/dist/components/ui/input.d.cts +15 -0
- package/dist/components/ui/input.d.ts +15 -0
- package/dist/components/ui/input.js +116 -3
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/iran-province-heat.cjs +328 -5
- package/dist/components/ui/iran-province-heat.cjs.map +1 -1
- package/dist/components/ui/iran-province-heat.js +312 -2
- package/dist/components/ui/iran-province-heat.js.map +1 -1
- package/dist/components/ui/label.cjs +52 -0
- package/dist/components/ui/label.cjs.map +1 -0
- package/dist/components/ui/label.d.cts +10 -0
- package/dist/components/ui/label.d.ts +10 -0
- package/dist/components/ui/label.js +30 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/page-card.cjs +627 -8
- package/dist/components/ui/page-card.cjs.map +1 -1
- package/dist/components/ui/page-card.d.cts +3 -2
- package/dist/components/ui/page-card.d.ts +3 -2
- package/dist/components/ui/page-card.js +611 -5
- package/dist/components/ui/page-card.js.map +1 -1
- package/dist/components/ui/page-header.cjs +299 -0
- package/dist/components/ui/page-header.cjs.map +1 -0
- package/dist/components/ui/page-header.d.cts +21 -0
- package/dist/components/ui/page-header.d.ts +21 -0
- package/dist/components/ui/page-header.js +277 -0
- package/dist/components/ui/page-header.js.map +1 -0
- package/dist/components/ui/password-input.cjs +168 -0
- package/dist/components/ui/password-input.cjs.map +1 -0
- package/dist/components/ui/password-input.d.cts +48 -0
- package/dist/components/ui/password-input.d.ts +48 -0
- package/dist/components/ui/password-input.js +146 -0
- package/dist/components/ui/password-input.js.map +1 -0
- package/dist/components/ui/popover.cjs +51 -18
- package/dist/components/ui/popover.cjs.map +1 -1
- package/dist/components/ui/popover.js +30 -2
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.cjs +95 -0
- package/dist/components/ui/progress.cjs.map +1 -0
- package/dist/components/ui/progress.d.cts +18 -0
- package/dist/components/ui/progress.d.ts +18 -0
- package/dist/components/ui/progress.js +72 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-card.cjs +84 -0
- package/dist/components/ui/radio-card.cjs.map +1 -0
- package/dist/components/ui/radio-card.d.cts +12 -0
- package/dist/components/ui/radio-card.d.ts +12 -0
- package/dist/components/ui/radio-card.js +58 -0
- package/dist/components/ui/radio-card.js.map +1 -0
- package/dist/components/ui/radio-group.cjs +62 -0
- package/dist/components/ui/radio-group.cjs.map +1 -0
- package/dist/components/ui/radio-group.d.cts +7 -0
- package/dist/components/ui/radio-group.d.ts +7 -0
- package/dist/components/ui/radio-group.js +38 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/saved-query-card.cjs +409 -7
- package/dist/components/ui/saved-query-card.cjs.map +1 -1
- package/dist/components/ui/saved-query-card.js +394 -4
- package/dist/components/ui/saved-query-card.js.map +1 -1
- package/dist/components/ui/scroll-area.cjs +79 -0
- package/dist/components/ui/scroll-area.cjs.map +1 -0
- package/dist/components/ui/scroll-area.d.cts +14 -0
- package/dist/components/ui/scroll-area.d.ts +14 -0
- package/dist/components/ui/scroll-area.js +56 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.cjs +242 -0
- package/dist/components/ui/select.cjs.map +1 -0
- package/dist/components/ui/select.d.cts +29 -0
- package/dist/components/ui/select.d.ts +29 -0
- package/dist/components/ui/select.js +210 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.cjs +105 -6
- package/dist/components/ui/separator.cjs.map +1 -1
- package/dist/components/ui/separator.js +87 -2
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.cjs +134 -38
- package/dist/components/ui/sheet.cjs.map +1 -1
- package/dist/components/ui/sheet.js +109 -2
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/{chunk-D2EBLE2B.cjs → components/ui/skeleton.cjs} +21 -16
- package/dist/components/ui/skeleton.cjs.map +1 -0
- package/dist/components/ui/skeleton.d.cts +90 -0
- package/dist/components/ui/skeleton.d.ts +90 -0
- package/dist/{chunk-SB5DSYR5.js → components/ui/skeleton.js} +8 -3
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.cjs +129 -0
- package/dist/components/ui/slider.cjs.map +1 -0
- package/dist/components/ui/slider.d.cts +10 -0
- package/dist/components/ui/slider.d.ts +10 -0
- package/dist/components/ui/slider.js +107 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/social-platform-badge.cjs +120 -0
- package/dist/components/ui/social-platform-badge.cjs.map +1 -0
- package/dist/components/ui/social-platform-badge.d.cts +21 -0
- package/dist/components/ui/social-platform-badge.d.ts +21 -0
- package/dist/components/ui/social-platform-badge.js +97 -0
- package/dist/components/ui/social-platform-badge.js.map +1 -0
- package/dist/components/ui/sonner.cjs +51 -0
- package/dist/components/ui/sonner.cjs.map +1 -0
- package/dist/components/ui/sonner.d.cts +13 -0
- package/dist/components/ui/sonner.d.ts +13 -0
- package/dist/components/ui/sonner.js +45 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/sparkline.cjs +159 -6
- package/dist/components/ui/sparkline.cjs.map +1 -1
- package/dist/components/ui/sparkline.js +142 -2
- package/dist/components/ui/sparkline.js.map +1 -1
- package/dist/components/ui/switch.cjs +96 -0
- package/dist/components/ui/switch.cjs.map +1 -0
- package/dist/components/ui/switch.d.cts +13 -0
- package/dist/components/ui/switch.d.ts +13 -0
- package/dist/components/ui/switch.js +73 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.cjs +188 -0
- package/dist/components/ui/table.cjs.map +1 -0
- package/dist/components/ui/table.d.cts +59 -0
- package/dist/components/ui/table.d.ts +59 -0
- package/dist/components/ui/table.js +178 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.cjs +140 -0
- package/dist/components/ui/tabs.cjs.map +1 -0
- package/dist/components/ui/tabs.d.cts +21 -0
- package/dist/components/ui/tabs.d.ts +21 -0
- package/dist/components/ui/tabs.js +115 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.cjs +56 -0
- package/dist/components/ui/textarea.cjs.map +1 -0
- package/dist/components/ui/textarea.d.cts +5 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +34 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.cjs +123 -0
- package/dist/components/ui/toggle-group.cjs.map +1 -0
- package/dist/components/ui/toggle-group.d.cts +7 -0
- package/dist/components/ui/toggle-group.d.ts +7 -0
- package/dist/components/ui/toggle-group.js +99 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/tooltip.cjs +77 -18
- package/dist/components/ui/tooltip.cjs.map +1 -1
- package/dist/components/ui/tooltip.js +56 -2
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/{concept-card-RwPbqJ06.d.cts → concept-card-BXra9mr0.d.cts} +2 -2
- package/dist/{concept-card-CcOBb2Nz.d.ts → concept-card-BoJ5gIJD.d.ts} +2 -2
- package/dist/hooks/use-hotkey-registry.cjs +201 -14
- package/dist/hooks/use-hotkey-registry.cjs.map +1 -1
- package/dist/hooks/use-hotkey-registry.js +182 -2
- package/dist/hooks/use-hotkey-registry.js.map +1 -1
- package/dist/hooks/use-hotkeys.cjs +144 -9
- package/dist/hooks/use-hotkeys.cjs.map +1 -1
- package/dist/hooks/use-hotkeys.js +126 -1
- package/dist/hooks/use-hotkeys.js.map +1 -1
- package/dist/{i18n-CAd9wGOr.d.cts → i18n-BfRhV5aw.d.cts} +5 -3
- package/dist/{i18n-ArS3mqj0.d.ts → i18n-ewyqbKM-.d.ts} +5 -3
- package/dist/index.cjs +20906 -15706
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +396 -69
- package/dist/index.d.cts +49 -490
- package/dist/index.d.ts +49 -490
- package/dist/index.js +7704 -2032
- package/dist/index.js.map +1 -1
- package/dist/{page-card-CmShVqG-.d.cts → page-card-C9XXXOVr.d.cts} +3 -20
- package/dist/{page-card-HBn-cy4J.d.ts → page-card-DAnbez_f.d.ts} +3 -20
- package/dist/toggle-group-B8r4LOQw.d.cts +26 -0
- package/dist/toggle-group-B8r4LOQw.d.ts +26 -0
- package/package.json +132 -2
- package/tailwind.config.ts +45 -0
- package/dist/chunk-2ACKKPWA.cjs +0 -112
- package/dist/chunk-2ACKKPWA.cjs.map +0 -1
- package/dist/chunk-2UD3LGVX.cjs +0 -316
- package/dist/chunk-2UD3LGVX.cjs.map +0 -1
- package/dist/chunk-3QYYPPFJ.js.map +0 -1
- package/dist/chunk-4SVQNEVH.js +0 -173
- package/dist/chunk-4SVQNEVH.js.map +0 -1
- package/dist/chunk-4WONHORR.cjs +0 -152
- package/dist/chunk-4WONHORR.cjs.map +0 -1
- package/dist/chunk-5HCXH6GS.js +0 -409
- package/dist/chunk-5HCXH6GS.js.map +0 -1
- package/dist/chunk-5JJSRGJD.js.map +0 -1
- package/dist/chunk-5K6E4ZSW.cjs +0 -77
- package/dist/chunk-5K6E4ZSW.cjs.map +0 -1
- package/dist/chunk-5NY26ULO.js +0 -89
- package/dist/chunk-5NY26ULO.js.map +0 -1
- package/dist/chunk-7RVPG3LE.cjs +0 -231
- package/dist/chunk-7RVPG3LE.cjs.map +0 -1
- package/dist/chunk-AYEK3WOM.js +0 -207
- package/dist/chunk-AYEK3WOM.js.map +0 -1
- package/dist/chunk-BRMBLIQG.js +0 -53
- package/dist/chunk-BRMBLIQG.js.map +0 -1
- package/dist/chunk-CAJKSTXX.cjs.map +0 -1
- package/dist/chunk-CKFWMHQU.js +0 -401
- package/dist/chunk-CKFWMHQU.js.map +0 -1
- package/dist/chunk-CV3N3HVK.js +0 -672
- package/dist/chunk-CV3N3HVK.js.map +0 -1
- package/dist/chunk-D2EBLE2B.cjs.map +0 -1
- package/dist/chunk-GCZ6YATL.js +0 -940
- package/dist/chunk-GCZ6YATL.js.map +0 -1
- package/dist/chunk-GKRAZGDI.cjs +0 -84
- package/dist/chunk-GKRAZGDI.cjs.map +0 -1
- package/dist/chunk-GPYJ66CG.js +0 -45
- package/dist/chunk-GPYJ66CG.js.map +0 -1
- package/dist/chunk-HF6XU5NI.js +0 -84
- package/dist/chunk-HF6XU5NI.js.map +0 -1
- package/dist/chunk-HJPDZOMJ.cjs +0 -87
- package/dist/chunk-HJPDZOMJ.cjs.map +0 -1
- package/dist/chunk-HS3XI3CC.cjs +0 -69
- package/dist/chunk-HS3XI3CC.cjs.map +0 -1
- package/dist/chunk-HUCC3QH5.cjs +0 -53
- package/dist/chunk-HUCC3QH5.cjs.map +0 -1
- package/dist/chunk-HYZ6BQPS.cjs +0 -425
- package/dist/chunk-HYZ6BQPS.cjs.map +0 -1
- package/dist/chunk-ISCSZMYW.cjs +0 -106
- package/dist/chunk-ISCSZMYW.cjs.map +0 -1
- package/dist/chunk-IXFEFIDO.js +0 -82
- package/dist/chunk-IXFEFIDO.js.map +0 -1
- package/dist/chunk-JCJLN437.js +0 -108
- package/dist/chunk-JCJLN437.js.map +0 -1
- package/dist/chunk-JMKNNH63.cjs +0 -982
- package/dist/chunk-JMKNNH63.cjs.map +0 -1
- package/dist/chunk-JUBHQAA2.js +0 -53
- package/dist/chunk-JUBHQAA2.js.map +0 -1
- package/dist/chunk-K6G63EED.cjs +0 -41
- package/dist/chunk-K6G63EED.cjs.map +0 -1
- package/dist/chunk-KCWRCSI7.js +0 -62
- package/dist/chunk-KCWRCSI7.js.map +0 -1
- package/dist/chunk-KYM7NIJO.cjs +0 -433
- package/dist/chunk-KYM7NIJO.cjs.map +0 -1
- package/dist/chunk-L2L5CKC2.js +0 -291
- package/dist/chunk-L2L5CKC2.js.map +0 -1
- package/dist/chunk-M5CHZ5BA.js +0 -124
- package/dist/chunk-M5CHZ5BA.js.map +0 -1
- package/dist/chunk-MEK4RSGC.js +0 -65
- package/dist/chunk-MEK4RSGC.js.map +0 -1
- package/dist/chunk-MEKWH3GS.js +0 -89
- package/dist/chunk-MEKWH3GS.js.map +0 -1
- package/dist/chunk-MFTX2DDQ.js +0 -27
- package/dist/chunk-MFTX2DDQ.js.map +0 -1
- package/dist/chunk-MMC6M35Q.cjs.map +0 -1
- package/dist/chunk-NMH43BDC.js +0 -130
- package/dist/chunk-NMH43BDC.js.map +0 -1
- package/dist/chunk-NORDUD2T.cjs +0 -135
- package/dist/chunk-NORDUD2T.cjs.map +0 -1
- package/dist/chunk-NV4JOKWL.cjs +0 -197
- package/dist/chunk-NV4JOKWL.cjs.map +0 -1
- package/dist/chunk-O2JG7WY5.cjs +0 -121
- package/dist/chunk-O2JG7WY5.cjs.map +0 -1
- package/dist/chunk-ONO2FTV4.cjs +0 -68
- package/dist/chunk-ONO2FTV4.cjs.map +0 -1
- package/dist/chunk-OQB6HIUL.cjs +0 -108
- package/dist/chunk-OQB6HIUL.cjs.map +0 -1
- package/dist/chunk-OS6CMYAS.cjs +0 -79
- package/dist/chunk-OS6CMYAS.cjs.map +0 -1
- package/dist/chunk-PYURPUTV.js +0 -402
- package/dist/chunk-PYURPUTV.js.map +0 -1
- package/dist/chunk-RJ3HYZ7S.js +0 -44
- package/dist/chunk-RJ3HYZ7S.js.map +0 -1
- package/dist/chunk-RZNRIOLT.js +0 -128
- package/dist/chunk-RZNRIOLT.js.map +0 -1
- package/dist/chunk-S3T2L6NA.js +0 -38
- package/dist/chunk-S3T2L6NA.js.map +0 -1
- package/dist/chunk-S5IPJQZ3.cjs +0 -161
- package/dist/chunk-S5IPJQZ3.cjs.map +0 -1
- package/dist/chunk-SB5DSYR5.js.map +0 -1
- package/dist/chunk-SFXV2DUH.js +0 -106
- package/dist/chunk-SFXV2DUH.js.map +0 -1
- package/dist/chunk-SXEPGD4Z.cjs +0 -152
- package/dist/chunk-SXEPGD4Z.cjs.map +0 -1
- package/dist/chunk-SXWSOU3Y.js +0 -89
- package/dist/chunk-SXWSOU3Y.js.map +0 -1
- package/dist/chunk-SZMVOHT7.cjs +0 -107
- package/dist/chunk-SZMVOHT7.cjs.map +0 -1
- package/dist/chunk-TWJXOV4C.js +0 -145
- package/dist/chunk-TWJXOV4C.js.map +0 -1
- package/dist/chunk-U3ADRIVO.cjs +0 -434
- package/dist/chunk-U3ADRIVO.cjs.map +0 -1
- package/dist/chunk-U5FLLCGC.cjs +0 -151
- package/dist/chunk-U5FLLCGC.cjs.map +0 -1
- package/dist/chunk-UOZN45G4.cjs +0 -130
- package/dist/chunk-UOZN45G4.cjs.map +0 -1
- package/dist/chunk-VHLDOG74.cjs +0 -167
- package/dist/chunk-VHLDOG74.cjs.map +0 -1
- package/dist/chunk-YC5KLN6I.js +0 -139
- package/dist/chunk-YC5KLN6I.js.map +0 -1
- package/dist/chunk-YENXXYUV.cjs +0 -111
- package/dist/chunk-YENXXYUV.cjs.map +0 -1
- package/dist/chunk-YFQWC2PW.js +0 -113
- package/dist/chunk-YFQWC2PW.js.map +0 -1
- package/dist/chunk-Z2TY4A75.cjs +0 -700
- package/dist/chunk-Z2TY4A75.cjs.map +0 -1
- package/dist/chunk-Z56O7UEU.cjs +0 -136
- package/dist/chunk-Z56O7UEU.cjs.map +0 -1
- package/dist/chunk-ZBZDR4ZC.js +0 -106
- package/dist/chunk-ZBZDR4ZC.js.map +0 -1
|
@@ -1,15 +1,574 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
|
-
var
|
|
4
|
-
require('
|
|
5
|
-
require('
|
|
6
|
-
require('
|
|
4
|
+
var React2 = require('react');
|
|
5
|
+
var recharts = require('recharts');
|
|
6
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
+
var clsx = require('clsx');
|
|
8
|
+
var tailwindMerge = require('tailwind-merge');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
10
|
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
8
28
|
|
|
29
|
+
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
9
30
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
31
|
+
function useRootStyles() {
|
|
32
|
+
const [version, setVersion] = React2.useState(0);
|
|
33
|
+
React2.useEffect(() => {
|
|
34
|
+
if (typeof window === "undefined" || !document?.documentElement) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const target = document.documentElement;
|
|
38
|
+
const observer = new MutationObserver(() => {
|
|
39
|
+
setVersion((prev) => prev + 1);
|
|
40
|
+
});
|
|
41
|
+
observer.observe(target, {
|
|
42
|
+
attributes: true,
|
|
43
|
+
attributeFilter: ["class", "data-theme"]
|
|
44
|
+
});
|
|
45
|
+
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
46
|
+
const mediaHandler = () => setVersion((prev) => prev + 1);
|
|
47
|
+
media.addEventListener("change", mediaHandler);
|
|
48
|
+
return () => {
|
|
49
|
+
observer.disconnect();
|
|
50
|
+
media.removeEventListener("change", mediaHandler);
|
|
51
|
+
};
|
|
52
|
+
}, []);
|
|
53
|
+
return React2.useMemo(() => {
|
|
54
|
+
if (typeof window === "undefined" || !document?.documentElement) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return getComputedStyle(document.documentElement);
|
|
58
|
+
}, [version]);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// src/lib/theme.ts
|
|
62
|
+
var COLOR_VALUE_REGEX = /^(#|rgb|hsl|oklch)/i;
|
|
63
|
+
function resolveCssColor(styles, variable, fallback) {
|
|
64
|
+
if (!styles) return fallback;
|
|
65
|
+
const raw = styles.getPropertyValue(variable).trim();
|
|
66
|
+
if (!raw) return fallback;
|
|
67
|
+
if (COLOR_VALUE_REGEX.test(raw)) return raw;
|
|
68
|
+
if (raw.includes("%")) return `hsl(${raw})`;
|
|
69
|
+
return raw;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// src/hooks/use-chart-theme.ts
|
|
73
|
+
var FALLBACKS = {
|
|
74
|
+
foregroundMuted: "hsl(0 0% 50%)",
|
|
75
|
+
border: "hsl(0 0% 22%)",
|
|
76
|
+
popover: "hsl(0 0% 10%)",
|
|
77
|
+
popoverForeground: "hsl(0 0% 98%)",
|
|
78
|
+
chart1: "hsl(155 65% 38%)",
|
|
79
|
+
chart2: "hsl(198 50% 48%)",
|
|
80
|
+
chart3: "hsl(240 40% 54%)",
|
|
81
|
+
chart4: "hsl(310 38% 52%)",
|
|
82
|
+
chart5: "hsl(355 45% 52%)",
|
|
83
|
+
chart6: "hsl(35 52% 48%)",
|
|
84
|
+
chart7: "hsl(75 38% 46%)",
|
|
85
|
+
chart8: "hsl(118 35% 46%)"
|
|
86
|
+
};
|
|
87
|
+
var CHART_FONT_FAMILY = "Yekan Bakh, system-ui, -apple-system, sans-serif";
|
|
88
|
+
function useChartTheme() {
|
|
89
|
+
const styles = useRootStyles();
|
|
90
|
+
return React2__namespace.useMemo(() => {
|
|
91
|
+
const getColor = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
92
|
+
const chartColors = [
|
|
93
|
+
getColor("--chart-1", FALLBACKS.chart1),
|
|
94
|
+
getColor("--chart-2", FALLBACKS.chart2),
|
|
95
|
+
getColor("--chart-3", FALLBACKS.chart3),
|
|
96
|
+
getColor("--chart-4", FALLBACKS.chart4),
|
|
97
|
+
getColor("--chart-5", FALLBACKS.chart5),
|
|
98
|
+
getColor("--chart-6", FALLBACKS.chart6),
|
|
99
|
+
getColor("--chart-7", FALLBACKS.chart7),
|
|
100
|
+
getColor("--chart-8", FALLBACKS.chart8)
|
|
101
|
+
];
|
|
102
|
+
const axisTickStyle = {
|
|
103
|
+
fontFamily: CHART_FONT_FAMILY,
|
|
104
|
+
fill: getColor("--foreground-lighter", FALLBACKS.foregroundMuted),
|
|
105
|
+
fontSize: 11,
|
|
106
|
+
fontWeight: 400
|
|
107
|
+
};
|
|
108
|
+
const gridStyle = {
|
|
109
|
+
stroke: getColor("--border", FALLBACKS.border),
|
|
110
|
+
strokeDasharray: "3 3",
|
|
111
|
+
strokeOpacity: 0.15
|
|
112
|
+
};
|
|
113
|
+
const tooltipStyle = {
|
|
114
|
+
fontFamily: CHART_FONT_FAMILY,
|
|
115
|
+
background: getColor("--background-overlay-default", FALLBACKS.popover),
|
|
116
|
+
color: getColor("--foreground-default", FALLBACKS.popoverForeground),
|
|
117
|
+
fontSize: 12,
|
|
118
|
+
lineHeight: "1.5",
|
|
119
|
+
borderRadius: "10px",
|
|
120
|
+
border: `1px solid ${getColor("--border-muted", FALLBACKS.border)}`,
|
|
121
|
+
boxShadow: "0 4px 24px -4px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06)",
|
|
122
|
+
padding: "10px 14px",
|
|
123
|
+
backdropFilter: "blur(8px)",
|
|
124
|
+
WebkitBackdropFilter: "blur(8px)"
|
|
125
|
+
};
|
|
126
|
+
const crosshairStyle = {
|
|
127
|
+
stroke: getColor("--foreground-muted", FALLBACKS.foregroundMuted),
|
|
128
|
+
strokeWidth: 1,
|
|
129
|
+
strokeDasharray: "4 4",
|
|
130
|
+
strokeOpacity: 0.5
|
|
131
|
+
};
|
|
132
|
+
return {
|
|
133
|
+
chartColors,
|
|
134
|
+
getColor,
|
|
135
|
+
fontFamily: CHART_FONT_FAMILY,
|
|
136
|
+
axisTickStyle,
|
|
137
|
+
gridStyle,
|
|
138
|
+
tooltipStyle,
|
|
139
|
+
crosshairStyle
|
|
140
|
+
};
|
|
141
|
+
}, [styles]);
|
|
142
|
+
}
|
|
143
|
+
function cn(...inputs) {
|
|
144
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
145
|
+
}
|
|
146
|
+
var skeletonVariants = classVarianceAuthority.cva("bg-accent animate-pulse", {
|
|
147
|
+
variants: {
|
|
148
|
+
shape: {
|
|
149
|
+
rect: "rounded-md",
|
|
150
|
+
line: "rounded-full h-4 w-full",
|
|
151
|
+
circle: "rounded-full",
|
|
152
|
+
text: "rounded h-4"
|
|
153
|
+
},
|
|
154
|
+
size: {
|
|
155
|
+
sm: "",
|
|
156
|
+
md: "",
|
|
157
|
+
lg: ""
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
compoundVariants: [
|
|
161
|
+
{ shape: "circle", size: "sm", class: "size-8" },
|
|
162
|
+
{ shape: "circle", size: "md", class: "size-10" },
|
|
163
|
+
{ shape: "circle", size: "lg", class: "size-14" }
|
|
164
|
+
],
|
|
165
|
+
defaultVariants: {
|
|
166
|
+
shape: "rect",
|
|
167
|
+
size: "md"
|
|
168
|
+
}
|
|
13
169
|
});
|
|
170
|
+
function Skeleton({ className, shape, size, count, ...props }) {
|
|
171
|
+
if (count && count > 1) {
|
|
172
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-busy": "true", "aria-label": "Loading", className: "space-y-2", children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
173
|
+
"div",
|
|
174
|
+
{
|
|
175
|
+
"data-slot": "skeleton",
|
|
176
|
+
"aria-hidden": "true",
|
|
177
|
+
className: cn(skeletonVariants({ shape, size }), className)
|
|
178
|
+
},
|
|
179
|
+
i
|
|
180
|
+
)) });
|
|
181
|
+
}
|
|
182
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
"data-slot": "skeleton",
|
|
186
|
+
role: "status",
|
|
187
|
+
"aria-busy": "true",
|
|
188
|
+
"aria-label": "Loading",
|
|
189
|
+
...props,
|
|
190
|
+
className: cn(skeletonVariants({ shape, size }), className)
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
Skeleton.displayName = "Skeleton";
|
|
195
|
+
var ChartContainer = React2__namespace.forwardRef(
|
|
196
|
+
({ className, dataSlot, ariaLabel, children }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
ref,
|
|
200
|
+
className,
|
|
201
|
+
dir: "ltr",
|
|
202
|
+
"data-slot": dataSlot,
|
|
203
|
+
role: "img",
|
|
204
|
+
"aria-label": ariaLabel ?? "\u0646\u0645\u0648\u062F\u0627\u0631",
|
|
205
|
+
style: { position: "relative", width: "100%", height: "100%" },
|
|
206
|
+
children
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
);
|
|
210
|
+
ChartContainer.displayName = "ChartContainer";
|
|
211
|
+
function ChartLoadingSkeleton({ className, shape = "rect" }) {
|
|
212
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
"data-slot": "chart-loading-skeleton",
|
|
216
|
+
className,
|
|
217
|
+
dir: "ltr",
|
|
218
|
+
style: { position: "relative", width: "100%", height: "100%" },
|
|
219
|
+
role: "status",
|
|
220
|
+
"aria-label": "Loading chart",
|
|
221
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
222
|
+
Skeleton,
|
|
223
|
+
{
|
|
224
|
+
shape,
|
|
225
|
+
className: shape === "circle" ? "w-full h-full min-h-[200px] aspect-square mx-auto" : "w-full h-full min-h-[200px]"
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
var LOCALE_TO_BCP47 = {
|
|
232
|
+
fa: "fa-IR",
|
|
233
|
+
ar: "ar",
|
|
234
|
+
en: "en-US"
|
|
235
|
+
};
|
|
236
|
+
function ChartTooltip({ active, payload, label, tooltipStyle, formatter, locale = "fa" }) {
|
|
237
|
+
if (!active || !payload?.length) return null;
|
|
238
|
+
const bcp47 = LOCALE_TO_BCP47[locale] ?? "fa-IR";
|
|
239
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "chart-tooltip", style: tooltipStyle, children: [
|
|
240
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontWeight: 500, fontSize: 13, marginBottom: 6 }, children: label }),
|
|
241
|
+
payload.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginTop: i > 0 ? 4 : 0 }, children: [
|
|
242
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
243
|
+
"div",
|
|
244
|
+
{
|
|
245
|
+
style: {
|
|
246
|
+
width: 10,
|
|
247
|
+
height: 10,
|
|
248
|
+
borderRadius: 2,
|
|
249
|
+
backgroundColor: entry.color,
|
|
250
|
+
flexShrink: 0
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
formatter ? formatter(entry.name, entry.value) : /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "flex", justifyContent: "space-between", width: "100%", gap: 16 }, children: [
|
|
255
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { opacity: 0.7 }, children: entry.name }),
|
|
256
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 600, fontVariantNumeric: "tabular-nums" }, children: typeof entry.value === "number" ? entry.value.toLocaleString(bcp47) : entry.value })
|
|
257
|
+
] })
|
|
258
|
+
] }, i))
|
|
259
|
+
] });
|
|
260
|
+
}
|
|
261
|
+
var PATTERN_DASHARRAY = {
|
|
262
|
+
solid: void 0,
|
|
263
|
+
dashed: "4 3",
|
|
264
|
+
dotted: "1 3",
|
|
265
|
+
"dash-dot": "4 2 1 2"
|
|
266
|
+
};
|
|
267
|
+
var ChartLegend = React2__namespace.forwardRef(
|
|
268
|
+
({ className, items, orientation = "horizontal", swatchSize = 10, ...props }, ref) => {
|
|
269
|
+
const isVertical = orientation === "vertical";
|
|
270
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
271
|
+
"div",
|
|
272
|
+
{
|
|
273
|
+
ref,
|
|
274
|
+
"data-slot": "chart-legend",
|
|
275
|
+
"data-orientation": orientation,
|
|
276
|
+
className,
|
|
277
|
+
style: {
|
|
278
|
+
display: "flex",
|
|
279
|
+
flexWrap: isVertical ? "nowrap" : "wrap",
|
|
280
|
+
flexDirection: isVertical ? "column" : "row",
|
|
281
|
+
gap: isVertical ? "6px" : "12px 16px",
|
|
282
|
+
fontSize: 12,
|
|
283
|
+
color: "hsl(var(--foreground-light))"
|
|
284
|
+
},
|
|
285
|
+
role: "list",
|
|
286
|
+
...props,
|
|
287
|
+
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
288
|
+
"div",
|
|
289
|
+
{
|
|
290
|
+
role: "listitem",
|
|
291
|
+
"data-slot": "chart-legend-item",
|
|
292
|
+
style: { display: "inline-flex", alignItems: "center", gap: 6, lineHeight: 1.2 },
|
|
293
|
+
children: [
|
|
294
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
295
|
+
ChartLegendSwatch,
|
|
296
|
+
{
|
|
297
|
+
color: item.color,
|
|
298
|
+
shape: item.shape ?? "dot",
|
|
299
|
+
pattern: item.pattern ?? "solid",
|
|
300
|
+
size: swatchSize
|
|
301
|
+
}
|
|
302
|
+
),
|
|
303
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500 }, children: item.label }),
|
|
304
|
+
item.value !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
305
|
+
"span",
|
|
306
|
+
{
|
|
307
|
+
style: { marginInlineStart: 4, fontVariantNumeric: "tabular-nums", opacity: 0.7 },
|
|
308
|
+
"data-slot": "chart-legend-value",
|
|
309
|
+
children: item.value
|
|
310
|
+
}
|
|
311
|
+
)
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
item.key
|
|
315
|
+
))
|
|
316
|
+
}
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
);
|
|
320
|
+
ChartLegend.displayName = "ChartLegend";
|
|
321
|
+
function ChartLegendSwatch({
|
|
322
|
+
color,
|
|
323
|
+
shape,
|
|
324
|
+
pattern,
|
|
325
|
+
size
|
|
326
|
+
}) {
|
|
327
|
+
if (shape === "dot") {
|
|
328
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
329
|
+
"span",
|
|
330
|
+
{
|
|
331
|
+
"aria-hidden": "true",
|
|
332
|
+
style: {
|
|
333
|
+
display: "inline-block",
|
|
334
|
+
width: size,
|
|
335
|
+
height: size,
|
|
336
|
+
borderRadius: "50%",
|
|
337
|
+
backgroundColor: color,
|
|
338
|
+
flexShrink: 0
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
if (shape === "bar") {
|
|
344
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
345
|
+
"span",
|
|
346
|
+
{
|
|
347
|
+
"aria-hidden": "true",
|
|
348
|
+
style: {
|
|
349
|
+
display: "inline-block",
|
|
350
|
+
width: size + 4,
|
|
351
|
+
height: Math.max(3, Math.round(size / 2.5)),
|
|
352
|
+
borderRadius: 2,
|
|
353
|
+
backgroundColor: color,
|
|
354
|
+
flexShrink: 0
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
360
|
+
"svg",
|
|
361
|
+
{
|
|
362
|
+
"aria-hidden": "true",
|
|
363
|
+
width: size + 8,
|
|
364
|
+
height: Math.max(8, Math.round(size / 1.5)),
|
|
365
|
+
viewBox: `0 0 ${size + 8} ${Math.max(8, Math.round(size / 1.5))}`,
|
|
366
|
+
style: { flexShrink: 0 },
|
|
367
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
368
|
+
"line",
|
|
369
|
+
{
|
|
370
|
+
x1: 1,
|
|
371
|
+
y1: Math.max(8, Math.round(size / 1.5)) / 2,
|
|
372
|
+
x2: size + 7,
|
|
373
|
+
y2: Math.max(8, Math.round(size / 1.5)) / 2,
|
|
374
|
+
stroke: color,
|
|
375
|
+
strokeWidth: 2,
|
|
376
|
+
strokeLinecap: "round",
|
|
377
|
+
strokeDasharray: PATTERN_DASHARRAY[pattern]
|
|
378
|
+
}
|
|
379
|
+
)
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
var ChartGradientLegend = React2__namespace.forwardRef(
|
|
384
|
+
({
|
|
385
|
+
className,
|
|
386
|
+
startColor,
|
|
387
|
+
endColor,
|
|
388
|
+
startLabel,
|
|
389
|
+
endLabel,
|
|
390
|
+
caption,
|
|
391
|
+
width = 160,
|
|
392
|
+
height = 8,
|
|
393
|
+
"aria-label": ariaLabelProp,
|
|
394
|
+
...props
|
|
395
|
+
}, ref) => {
|
|
396
|
+
const ariaLabel = ariaLabelProp ?? (typeof startLabel === "string" && typeof endLabel === "string" ? `${startLabel} \u062A\u0627 ${endLabel}` : "\u0645\u0642\u06CC\u0627\u0633 \u0631\u0646\u06AF");
|
|
397
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
398
|
+
"div",
|
|
399
|
+
{
|
|
400
|
+
ref,
|
|
401
|
+
"data-slot": "chart-gradient-legend",
|
|
402
|
+
className,
|
|
403
|
+
role: "img",
|
|
404
|
+
"aria-label": ariaLabel,
|
|
405
|
+
style: {
|
|
406
|
+
display: "inline-flex",
|
|
407
|
+
flexDirection: "column",
|
|
408
|
+
gap: 4,
|
|
409
|
+
fontSize: 12,
|
|
410
|
+
color: "hsl(var(--foreground-light))"
|
|
411
|
+
},
|
|
412
|
+
...props,
|
|
413
|
+
children: [
|
|
414
|
+
caption && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "chart-gradient-legend-caption", style: { fontWeight: 500 }, children: caption }),
|
|
415
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
416
|
+
"div",
|
|
417
|
+
{
|
|
418
|
+
"data-slot": "chart-gradient-legend-bar",
|
|
419
|
+
"aria-hidden": "true",
|
|
420
|
+
style: {
|
|
421
|
+
width,
|
|
422
|
+
height,
|
|
423
|
+
borderRadius: height / 2,
|
|
424
|
+
background: `linear-gradient(to right, ${startColor}, ${endColor})`
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
),
|
|
428
|
+
(startLabel !== void 0 || endLabel !== void 0) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
429
|
+
"div",
|
|
430
|
+
{
|
|
431
|
+
style: {
|
|
432
|
+
display: "flex",
|
|
433
|
+
justifyContent: "space-between",
|
|
434
|
+
width,
|
|
435
|
+
fontVariantNumeric: "tabular-nums",
|
|
436
|
+
opacity: 0.85
|
|
437
|
+
},
|
|
438
|
+
children: [
|
|
439
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "chart-gradient-legend-start", children: startLabel }),
|
|
440
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "chart-gradient-legend-end", children: endLabel })
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
ChartGradientLegend.displayName = "ChartGradientLegend";
|
|
450
|
+
function renderActiveShape(props) {
|
|
451
|
+
const { cx, cy, innerRadius, outerRadius, startAngle, endAngle, fill, cornerRadius } = props;
|
|
452
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
453
|
+
recharts.Sector,
|
|
454
|
+
{
|
|
455
|
+
cx,
|
|
456
|
+
cy,
|
|
457
|
+
innerRadius: innerRadius - 3,
|
|
458
|
+
outerRadius: outerRadius + 5,
|
|
459
|
+
startAngle,
|
|
460
|
+
endAngle,
|
|
461
|
+
fill,
|
|
462
|
+
cornerRadius,
|
|
463
|
+
forceCornerRadius: true
|
|
464
|
+
}
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
function renderArcLinkLabel(props, labelSkipAngle, textColor) {
|
|
468
|
+
const { cx, cy, midAngle, outerRadius, name, percent } = props;
|
|
469
|
+
const angle = percent * 360;
|
|
470
|
+
if (angle < labelSkipAngle) return null;
|
|
471
|
+
const RADIAN = Math.PI / 180;
|
|
472
|
+
const sin = Math.sin(-RADIAN * midAngle);
|
|
473
|
+
const cos = Math.cos(-RADIAN * midAngle);
|
|
474
|
+
const arcX = cx + (outerRadius + 4) * cos;
|
|
475
|
+
const arcY = cy + (outerRadius + 4) * sin;
|
|
476
|
+
const diagLen = 10;
|
|
477
|
+
const diagX = arcX + diagLen * cos;
|
|
478
|
+
const diagY = arcY + diagLen * sin;
|
|
479
|
+
const straightLen = 14;
|
|
480
|
+
const endX = diagX + (cos >= 0 ? straightLen : -straightLen);
|
|
481
|
+
const endY = diagY;
|
|
482
|
+
const textAnchor = cos >= 0 ? "start" : "end";
|
|
483
|
+
const textX = endX + (cos >= 0 ? 4 : -4);
|
|
484
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
485
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
486
|
+
"path",
|
|
487
|
+
{
|
|
488
|
+
d: `M ${arcX},${arcY} L ${diagX},${diagY} L ${endX},${endY}`,
|
|
489
|
+
fill: "none",
|
|
490
|
+
stroke: textColor,
|
|
491
|
+
strokeWidth: 1,
|
|
492
|
+
strokeOpacity: 0.4
|
|
493
|
+
}
|
|
494
|
+
),
|
|
495
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
496
|
+
"text",
|
|
497
|
+
{
|
|
498
|
+
x: textX,
|
|
499
|
+
y: endY,
|
|
500
|
+
textAnchor,
|
|
501
|
+
dominantBaseline: "central",
|
|
502
|
+
fill: textColor,
|
|
503
|
+
fontFamily: CHART_FONT_FAMILY,
|
|
504
|
+
fontSize: 11,
|
|
505
|
+
children: name
|
|
506
|
+
}
|
|
507
|
+
)
|
|
508
|
+
] });
|
|
509
|
+
}
|
|
510
|
+
var PartoPieChart = React2__namespace.forwardRef(function PartoPieChart2({
|
|
511
|
+
data,
|
|
512
|
+
innerRadius = "60%",
|
|
513
|
+
outerRadius = "80%",
|
|
514
|
+
paddingAngle = 1.2,
|
|
515
|
+
cornerRadius = 4,
|
|
516
|
+
showLabels = true,
|
|
517
|
+
labelSkipAngle = 14,
|
|
518
|
+
margin = { top: 20, right: 20, bottom: 20, left: 20 },
|
|
519
|
+
tooltipFormatter,
|
|
520
|
+
locale = "fa",
|
|
521
|
+
className,
|
|
522
|
+
isLoading = false,
|
|
523
|
+
ariaLabel,
|
|
524
|
+
legend = false,
|
|
525
|
+
legendValues = true
|
|
526
|
+
}, ref) {
|
|
527
|
+
const { chartColors, tooltipStyle, axisTickStyle } = useChartTheme();
|
|
528
|
+
if (isLoading) {
|
|
529
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ChartLoadingSkeleton, { className, shape: "circle" });
|
|
530
|
+
}
|
|
531
|
+
const legendItems = legend ? data.map((row, i) => ({
|
|
532
|
+
key: String(row.name),
|
|
533
|
+
label: row.name,
|
|
534
|
+
color: chartColors[i % chartColors.length],
|
|
535
|
+
shape: "dot",
|
|
536
|
+
value: legendValues ? row.value : void 0
|
|
537
|
+
})) : [];
|
|
538
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ChartContainer, { ref, className, dataSlot: "pie-chart", ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", width: "100%", height: "100%" }, children: [
|
|
539
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.PieChart, { margin, children: [
|
|
540
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
541
|
+
recharts.Pie,
|
|
542
|
+
{
|
|
543
|
+
data,
|
|
544
|
+
dataKey: "value",
|
|
545
|
+
nameKey: "name",
|
|
546
|
+
cx: "50%",
|
|
547
|
+
cy: "50%",
|
|
548
|
+
innerRadius,
|
|
549
|
+
outerRadius,
|
|
550
|
+
paddingAngle,
|
|
551
|
+
cornerRadius,
|
|
552
|
+
activeShape: renderActiveShape,
|
|
553
|
+
label: showLabels ? (props) => renderArcLinkLabel(props, labelSkipAngle, axisTickStyle.fill) : false,
|
|
554
|
+
labelLine: false,
|
|
555
|
+
animationDuration: 800,
|
|
556
|
+
animationEasing: "ease-out",
|
|
557
|
+
children: data.map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(recharts.Cell, { fill: chartColors[i % chartColors.length], stroke: "none" }, i))
|
|
558
|
+
}
|
|
559
|
+
),
|
|
560
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
561
|
+
recharts.Tooltip,
|
|
562
|
+
{
|
|
563
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(ChartTooltip, { tooltipStyle, formatter: tooltipFormatter, locale })
|
|
564
|
+
}
|
|
565
|
+
)
|
|
566
|
+
] }) }) }),
|
|
567
|
+
legend && /* @__PURE__ */ jsxRuntime.jsx(ChartLegend, { items: legendItems, style: { paddingTop: 12 } })
|
|
568
|
+
] }) });
|
|
569
|
+
});
|
|
570
|
+
PartoPieChart.displayName = "PartoPieChart";
|
|
571
|
+
|
|
572
|
+
exports.PartoPieChart = PartoPieChart;
|
|
14
573
|
//# sourceMappingURL=PartoPieChart.cjs.map
|
|
15
574
|
//# sourceMappingURL=PartoPieChart.cjs.map
|