@parto-system-design/ui 1.1.5 → 1.1.8
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/AGENTS.md +233 -0
- package/LICENSE +21 -0
- package/README.md +96 -43
- package/dist/chunk-2ACKKPWA.cjs +112 -0
- package/dist/chunk-2ACKKPWA.cjs.map +1 -0
- package/dist/chunk-2UD3LGVX.cjs +316 -0
- package/dist/chunk-2UD3LGVX.cjs.map +1 -0
- package/dist/chunk-3QYYPPFJ.js +269 -0
- package/dist/chunk-3QYYPPFJ.js.map +1 -0
- package/dist/chunk-4SVQNEVH.js +173 -0
- package/dist/chunk-4SVQNEVH.js.map +1 -0
- package/dist/chunk-4WONHORR.cjs +152 -0
- package/dist/chunk-4WONHORR.cjs.map +1 -0
- package/dist/chunk-5HCXH6GS.js +409 -0
- package/dist/chunk-5HCXH6GS.js.map +1 -0
- package/dist/chunk-5JJSRGJD.js +31 -0
- package/dist/chunk-5JJSRGJD.js.map +1 -0
- package/dist/chunk-5K6E4ZSW.cjs +77 -0
- package/dist/chunk-5K6E4ZSW.cjs.map +1 -0
- package/dist/chunk-5NY26ULO.js +89 -0
- package/dist/chunk-5NY26ULO.js.map +1 -0
- package/dist/chunk-7RVPG3LE.cjs +231 -0
- package/dist/chunk-7RVPG3LE.cjs.map +1 -0
- package/dist/chunk-AYEK3WOM.js +207 -0
- package/dist/chunk-AYEK3WOM.js.map +1 -0
- package/dist/chunk-BRMBLIQG.js +53 -0
- package/dist/chunk-BRMBLIQG.js.map +1 -0
- package/dist/chunk-CAJKSTXX.cjs +54 -0
- package/dist/chunk-CAJKSTXX.cjs.map +1 -0
- package/dist/chunk-CKFWMHQU.js +401 -0
- package/dist/chunk-CKFWMHQU.js.map +1 -0
- package/dist/chunk-CV3N3HVK.js +672 -0
- package/dist/chunk-CV3N3HVK.js.map +1 -0
- package/dist/chunk-D2EBLE2B.cjs +220 -0
- package/dist/chunk-D2EBLE2B.cjs.map +1 -0
- package/dist/chunk-GCZ6YATL.js +940 -0
- package/dist/chunk-GCZ6YATL.js.map +1 -0
- package/dist/chunk-GKRAZGDI.cjs +84 -0
- package/dist/chunk-GKRAZGDI.cjs.map +1 -0
- package/dist/chunk-GPYJ66CG.js +45 -0
- package/dist/chunk-GPYJ66CG.js.map +1 -0
- package/dist/chunk-HF6XU5NI.js +84 -0
- package/dist/chunk-HF6XU5NI.js.map +1 -0
- package/dist/chunk-HJPDZOMJ.cjs +87 -0
- package/dist/chunk-HJPDZOMJ.cjs.map +1 -0
- package/dist/chunk-HS3XI3CC.cjs +69 -0
- package/dist/chunk-HS3XI3CC.cjs.map +1 -0
- package/dist/chunk-HUCC3QH5.cjs +53 -0
- package/dist/chunk-HUCC3QH5.cjs.map +1 -0
- package/dist/chunk-HYZ6BQPS.cjs +425 -0
- package/dist/chunk-HYZ6BQPS.cjs.map +1 -0
- package/dist/chunk-ISCSZMYW.cjs +106 -0
- package/dist/chunk-ISCSZMYW.cjs.map +1 -0
- package/dist/chunk-IXFEFIDO.js +82 -0
- package/dist/chunk-IXFEFIDO.js.map +1 -0
- package/dist/chunk-JCJLN437.js +108 -0
- package/dist/chunk-JCJLN437.js.map +1 -0
- package/dist/chunk-JMKNNH63.cjs +982 -0
- package/dist/chunk-JMKNNH63.cjs.map +1 -0
- package/dist/chunk-JUBHQAA2.js +53 -0
- package/dist/chunk-JUBHQAA2.js.map +1 -0
- package/dist/chunk-K6G63EED.cjs +41 -0
- package/dist/chunk-K6G63EED.cjs.map +1 -0
- package/dist/chunk-KCWRCSI7.js +62 -0
- package/dist/chunk-KCWRCSI7.js.map +1 -0
- package/dist/chunk-KYM7NIJO.cjs +433 -0
- package/dist/chunk-KYM7NIJO.cjs.map +1 -0
- package/dist/chunk-L2L5CKC2.js +291 -0
- package/dist/chunk-L2L5CKC2.js.map +1 -0
- package/dist/chunk-M5CHZ5BA.js +124 -0
- package/dist/chunk-M5CHZ5BA.js.map +1 -0
- package/dist/chunk-MEK4RSGC.js +65 -0
- package/dist/chunk-MEK4RSGC.js.map +1 -0
- package/dist/chunk-MEKWH3GS.js +89 -0
- package/dist/chunk-MEKWH3GS.js.map +1 -0
- package/dist/chunk-MFTX2DDQ.js +27 -0
- package/dist/chunk-MFTX2DDQ.js.map +1 -0
- package/dist/chunk-MMC6M35Q.cjs +272 -0
- package/dist/chunk-MMC6M35Q.cjs.map +1 -0
- package/dist/chunk-NMH43BDC.js +130 -0
- package/dist/chunk-NMH43BDC.js.map +1 -0
- package/dist/chunk-NORDUD2T.cjs +135 -0
- package/dist/chunk-NORDUD2T.cjs.map +1 -0
- package/dist/chunk-NV4JOKWL.cjs +197 -0
- package/dist/chunk-NV4JOKWL.cjs.map +1 -0
- package/dist/chunk-O2JG7WY5.cjs +121 -0
- package/dist/chunk-O2JG7WY5.cjs.map +1 -0
- package/dist/chunk-ONO2FTV4.cjs +68 -0
- package/dist/chunk-ONO2FTV4.cjs.map +1 -0
- package/dist/chunk-OQB6HIUL.cjs +108 -0
- package/dist/chunk-OQB6HIUL.cjs.map +1 -0
- package/dist/chunk-OS6CMYAS.cjs +79 -0
- package/dist/chunk-OS6CMYAS.cjs.map +1 -0
- package/dist/chunk-PYURPUTV.js +402 -0
- package/dist/chunk-PYURPUTV.js.map +1 -0
- package/dist/chunk-RJ3HYZ7S.js +44 -0
- package/dist/chunk-RJ3HYZ7S.js.map +1 -0
- package/dist/chunk-RZNRIOLT.js +128 -0
- package/dist/chunk-RZNRIOLT.js.map +1 -0
- package/dist/chunk-S3T2L6NA.js +38 -0
- package/dist/chunk-S3T2L6NA.js.map +1 -0
- package/dist/chunk-S5IPJQZ3.cjs +161 -0
- package/dist/chunk-S5IPJQZ3.cjs.map +1 -0
- package/dist/chunk-SB5DSYR5.js +211 -0
- package/dist/chunk-SB5DSYR5.js.map +1 -0
- package/dist/chunk-SFXV2DUH.js +106 -0
- package/dist/chunk-SFXV2DUH.js.map +1 -0
- package/dist/chunk-SXEPGD4Z.cjs +152 -0
- package/dist/chunk-SXEPGD4Z.cjs.map +1 -0
- package/dist/chunk-SXWSOU3Y.js +89 -0
- package/dist/chunk-SXWSOU3Y.js.map +1 -0
- package/dist/chunk-SZMVOHT7.cjs +107 -0
- package/dist/chunk-SZMVOHT7.cjs.map +1 -0
- package/dist/chunk-TWJXOV4C.js +145 -0
- package/dist/chunk-TWJXOV4C.js.map +1 -0
- package/dist/chunk-U3ADRIVO.cjs +434 -0
- package/dist/chunk-U3ADRIVO.cjs.map +1 -0
- package/dist/chunk-U5FLLCGC.cjs +151 -0
- package/dist/chunk-U5FLLCGC.cjs.map +1 -0
- package/dist/chunk-UOZN45G4.cjs +130 -0
- package/dist/chunk-UOZN45G4.cjs.map +1 -0
- package/dist/chunk-VHLDOG74.cjs +167 -0
- package/dist/chunk-VHLDOG74.cjs.map +1 -0
- package/dist/chunk-YC5KLN6I.js +139 -0
- package/dist/chunk-YC5KLN6I.js.map +1 -0
- package/dist/chunk-YENXXYUV.cjs +111 -0
- package/dist/chunk-YENXXYUV.cjs.map +1 -0
- package/dist/chunk-YFQWC2PW.js +113 -0
- package/dist/chunk-YFQWC2PW.js.map +1 -0
- package/dist/chunk-Z2TY4A75.cjs +700 -0
- package/dist/chunk-Z2TY4A75.cjs.map +1 -0
- package/dist/chunk-Z56O7UEU.cjs +136 -0
- package/dist/chunk-Z56O7UEU.cjs.map +1 -0
- package/dist/chunk-ZBZDR4ZC.js +106 -0
- package/dist/chunk-ZBZDR4ZC.js.map +1 -0
- package/dist/components/charts/PartoAreaChart.cjs +15 -0
- package/dist/components/charts/PartoAreaChart.cjs.map +1 -0
- package/dist/components/charts/PartoAreaChart.d.cts +53 -0
- package/dist/components/charts/PartoAreaChart.d.ts +53 -0
- package/dist/components/charts/PartoAreaChart.js +6 -0
- package/dist/components/charts/PartoAreaChart.js.map +1 -0
- package/dist/components/charts/PartoBarChart.cjs +15 -0
- package/dist/components/charts/PartoBarChart.cjs.map +1 -0
- package/dist/components/charts/PartoBarChart.d.cts +61 -0
- package/dist/components/charts/PartoBarChart.d.ts +61 -0
- package/dist/components/charts/PartoBarChart.js +6 -0
- package/dist/components/charts/PartoBarChart.js.map +1 -0
- package/dist/components/charts/PartoLineChart.cjs +15 -0
- package/dist/components/charts/PartoLineChart.cjs.map +1 -0
- package/dist/components/charts/PartoLineChart.d.cts +57 -0
- package/dist/components/charts/PartoLineChart.d.ts +57 -0
- package/dist/components/charts/PartoLineChart.js +6 -0
- package/dist/components/charts/PartoLineChart.js.map +1 -0
- package/dist/components/charts/PartoPieChart.cjs +15 -0
- package/dist/components/charts/PartoPieChart.cjs.map +1 -0
- package/dist/components/charts/PartoPieChart.d.cts +52 -0
- package/dist/components/charts/PartoPieChart.d.ts +52 -0
- package/dist/components/charts/PartoPieChart.js +6 -0
- package/dist/components/charts/PartoPieChart.js.map +1 -0
- package/dist/components/ui/alert-rule-card.cjs +15 -0
- package/dist/components/ui/alert-rule-card.cjs.map +1 -0
- package/dist/components/ui/alert-rule-card.d.cts +38 -0
- package/dist/components/ui/alert-rule-card.d.ts +38 -0
- package/dist/components/ui/alert-rule-card.js +6 -0
- package/dist/components/ui/alert-rule-card.js.map +1 -0
- package/dist/components/ui/avatar.cjs +21 -0
- package/dist/components/ui/avatar.cjs.map +1 -0
- package/dist/components/ui/avatar.d.cts +18 -0
- package/dist/components/ui/avatar.d.ts +18 -0
- package/dist/components/ui/avatar.js +4 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.cjs +17 -0
- package/dist/components/ui/badge.cjs.map +1 -0
- package/dist/components/ui/badge.d.cts +16 -0
- package/dist/components/ui/badge.d.ts +16 -0
- package/dist/components/ui/badge.js +4 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.cjs +18 -0
- package/dist/components/ui/button.cjs.map +1 -0
- package/dist/components/ui/button.d.cts +37 -0
- package/dist/components/ui/button.d.ts +37 -0
- package/dist/components/ui/button.js +5 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.cjs +15 -0
- package/dist/components/ui/calendar.cjs.map +1 -0
- package/dist/components/ui/calendar.d.cts +17 -0
- package/dist/components/ui/calendar.d.ts +17 -0
- package/dist/components/ui/calendar.js +6 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.cjs +37 -0
- package/dist/components/ui/card.cjs.map +1 -0
- package/dist/components/ui/card.d.cts +18 -0
- package/dist/components/ui/card.d.ts +18 -0
- package/dist/components/ui/card.js +4 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/concept-card.cjs +18 -0
- package/dist/components/ui/concept-card.cjs.map +1 -0
- package/dist/components/ui/concept-card.d.cts +5 -0
- package/dist/components/ui/concept-card.d.ts +5 -0
- package/dist/components/ui/concept-card.js +9 -0
- package/dist/components/ui/concept-card.js.map +1 -0
- package/dist/components/ui/data-table.cjs +18 -0
- package/dist/components/ui/data-table.cjs.map +1 -0
- package/dist/components/ui/data-table.d.cts +181 -0
- package/dist/components/ui/data-table.d.ts +181 -0
- package/dist/components/ui/data-table.js +9 -0
- package/dist/components/ui/data-table.js.map +1 -0
- package/dist/components/ui/dialog.cjs +49 -0
- package/dist/components/ui/dialog.cjs.map +1 -0
- package/dist/components/ui/dialog.d.cts +22 -0
- package/dist/components/ui/dialog.d.ts +22 -0
- package/dist/components/ui/dialog.js +4 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/filter-provider.cjs +20 -0
- package/dist/components/ui/filter-provider.cjs.map +1 -0
- package/dist/components/ui/filter-provider.d.cts +49 -0
- package/dist/components/ui/filter-provider.d.ts +49 -0
- package/dist/components/ui/filter-provider.js +3 -0
- package/dist/components/ui/filter-provider.js.map +1 -0
- package/dist/components/ui/input.cjs +22 -0
- package/dist/components/ui/input.cjs.map +1 -0
- package/dist/components/ui/input.d.cts +16 -0
- package/dist/components/ui/input.d.ts +16 -0
- package/dist/components/ui/input.js +5 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/iran-province-heat.cjs +13 -0
- package/dist/components/ui/iran-province-heat.cjs.map +1 -0
- package/dist/components/ui/iran-province-heat.d.cts +64 -0
- package/dist/components/ui/iran-province-heat.d.ts +64 -0
- package/dist/components/ui/iran-province-heat.js +4 -0
- package/dist/components/ui/iran-province-heat.js.map +1 -0
- package/dist/components/ui/page-card.cjs +16 -0
- package/dist/components/ui/page-card.cjs.map +1 -0
- package/dist/components/ui/page-card.d.cts +6 -0
- package/dist/components/ui/page-card.d.ts +6 -0
- package/dist/components/ui/page-card.js +7 -0
- package/dist/components/ui/page-card.js.map +1 -0
- package/dist/components/ui/popover.cjs +25 -0
- package/dist/components/ui/popover.cjs.map +1 -0
- package/dist/components/ui/popover.d.cts +9 -0
- package/dist/components/ui/popover.d.ts +9 -0
- package/dist/components/ui/popover.js +4 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/saved-query-card.cjs +15 -0
- package/dist/components/ui/saved-query-card.cjs.map +1 -0
- package/dist/components/ui/saved-query-card.d.cts +41 -0
- package/dist/components/ui/saved-query-card.d.ts +41 -0
- package/dist/components/ui/saved-query-card.js +6 -0
- package/dist/components/ui/saved-query-card.js.map +1 -0
- package/dist/components/ui/separator.cjs +13 -0
- package/dist/components/ui/separator.cjs.map +1 -0
- package/dist/components/ui/separator.d.cts +9 -0
- package/dist/components/ui/separator.d.ts +9 -0
- package/dist/components/ui/separator.js +4 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.cjs +45 -0
- package/dist/components/ui/sheet.cjs.map +1 -0
- package/dist/components/ui/sheet.d.cts +44 -0
- package/dist/components/ui/sheet.d.ts +44 -0
- package/dist/components/ui/sheet.js +4 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sparkline.cjs +13 -0
- package/dist/components/ui/sparkline.cjs.map +1 -0
- package/dist/components/ui/sparkline.d.cts +36 -0
- package/dist/components/ui/sparkline.d.ts +36 -0
- package/dist/components/ui/sparkline.js +4 -0
- package/dist/components/ui/sparkline.js.map +1 -0
- package/dist/components/ui/tooltip.cjs +25 -0
- package/dist/components/ui/tooltip.cjs.map +1 -0
- package/dist/components/ui/tooltip.d.cts +17 -0
- package/dist/components/ui/tooltip.d.ts +17 -0
- package/dist/components/ui/tooltip.js +4 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/concept-card-CcOBb2Nz.d.ts +83 -0
- package/dist/concept-card-RwPbqJ06.d.cts +83 -0
- package/dist/hooks/use-hotkey-registry.cjs +21 -0
- package/dist/hooks/use-hotkey-registry.cjs.map +1 -0
- package/dist/hooks/use-hotkey-registry.d.cts +65 -0
- package/dist/hooks/use-hotkey-registry.d.ts +65 -0
- package/dist/hooks/use-hotkey-registry.js +4 -0
- package/dist/hooks/use-hotkey-registry.js.map +1 -0
- package/dist/hooks/use-hotkeys.cjs +16 -0
- package/dist/hooks/use-hotkeys.cjs.map +1 -0
- package/dist/hooks/use-hotkeys.d.cts +66 -0
- package/dist/hooks/use-hotkeys.d.ts +66 -0
- package/dist/hooks/use-hotkeys.js +3 -0
- package/dist/hooks/use-hotkeys.js.map +1 -0
- package/dist/i18n-ArS3mqj0.d.ts +344 -0
- package/dist/i18n-CAd9wGOr.d.cts +344 -0
- package/dist/index.cjs +12195 -13224
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +490 -34
- package/dist/index.d.cts +1635 -1263
- package/dist/index.d.ts +1635 -1263
- package/dist/index.js +10693 -12364
- package/dist/index.js.map +1 -1
- package/dist/page-card-CmShVqG-.d.cts +100 -0
- package/dist/page-card-HBn-cy4J.d.ts +100 -0
- package/dist/utils-DlXWmDZ-.d.cts +35 -0
- package/dist/utils-DlXWmDZ-.d.ts +35 -0
- package/package.json +160 -4
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { S as SupportedLocale } from './utils-DlXWmDZ-.cjs';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { c as StatusKey } from './i18n-CAd9wGOr.cjs';
|
|
5
|
+
|
|
6
|
+
type SocialPlatform = 'instagram' | 'twitter' | 'tiktok' | 'youtube' | 'linkedin' | 'telegram' | 'threads' | 'facebook';
|
|
7
|
+
interface SocialPlatformBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
8
|
+
/** The social media platform to display */
|
|
9
|
+
platform: SocialPlatform;
|
|
10
|
+
/** Size of the badge */
|
|
11
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
12
|
+
/** Show the platform name label */
|
|
13
|
+
showLabel?: boolean;
|
|
14
|
+
/** Visual style of the badge */
|
|
15
|
+
variant?: 'flat' | 'badge';
|
|
16
|
+
}
|
|
17
|
+
declare const socialPlatformBadgeVariants: (props?: ({
|
|
18
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
19
|
+
variant?: "flat" | "badge" | null | undefined;
|
|
20
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
21
|
+
declare const SocialPlatformBadge: React.ForwardRefExoticComponent<SocialPlatformBadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
22
|
+
|
|
23
|
+
type BotDetectionKey = 'real' | 'suspicious' | 'bot';
|
|
24
|
+
interface BotDetectionData {
|
|
25
|
+
/** Confirmed real / human accounts */
|
|
26
|
+
real: number;
|
|
27
|
+
/** Suspicious — insufficient signal, possibly bot */
|
|
28
|
+
suspicious: number;
|
|
29
|
+
/** Confirmed bot / automated */
|
|
30
|
+
bot: number;
|
|
31
|
+
}
|
|
32
|
+
interface BotDetectionMeterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
33
|
+
/** Counts — auto-normalised to percentages that sum to exactly 100 */
|
|
34
|
+
data: BotDetectionData;
|
|
35
|
+
/** Display mode @default "stacked" */
|
|
36
|
+
variant?: 'stacked' | 'bars' | 'compact';
|
|
37
|
+
/** Show numeric count labels */
|
|
38
|
+
showCounts?: boolean;
|
|
39
|
+
/** Show percentage labels @default true */
|
|
40
|
+
showPercent?: boolean;
|
|
41
|
+
/** Show the top "Real-account rate" summary line (stacked variant only) @default true */
|
|
42
|
+
showSummary?: boolean;
|
|
43
|
+
/** Size of the stacked bar or individual bars */
|
|
44
|
+
size?: 'sm' | 'md' | 'lg';
|
|
45
|
+
/** Locale for digits + default labels @default "fa" */
|
|
46
|
+
locale?: SupportedLocale;
|
|
47
|
+
}
|
|
48
|
+
declare const BotDetectionMeter: React.ForwardRefExoticComponent<BotDetectionMeterProps & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* PageCard (government-flavor) — tracked-account tile for افکارسنجی pages
|
|
52
|
+
* dashboards. Composes: avatar + handle + platform badge, status (healthy/
|
|
53
|
+
* degrading/at-risk via StatusKey), follower trend sparkline, engagement
|
|
54
|
+
* stats, content-type mix, bot-detection percentages.
|
|
55
|
+
*
|
|
56
|
+
* Distinct from `ProfileCard` which is influencer-flavored (focus on
|
|
57
|
+
* engagement tier, follower count, avatar). PageCard is for **tracked
|
|
58
|
+
* accounts** in monitoring — health and trust signals matter most.
|
|
59
|
+
*/
|
|
60
|
+
interface PageCardContentMix {
|
|
61
|
+
/** Photo posts in window (count or %) */
|
|
62
|
+
photo?: number;
|
|
63
|
+
/** Video posts in window */
|
|
64
|
+
video?: number;
|
|
65
|
+
/** Carousel posts */
|
|
66
|
+
carousel?: number;
|
|
67
|
+
/** Story / reel count */
|
|
68
|
+
story?: number;
|
|
69
|
+
}
|
|
70
|
+
interface PageCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
71
|
+
/** Account handle / display name (e.g., "@news_agency") */
|
|
72
|
+
handle: React.ReactNode;
|
|
73
|
+
/** Optional secondary subtitle (e.g., page category) */
|
|
74
|
+
subtitle?: React.ReactNode;
|
|
75
|
+
/** Avatar URL */
|
|
76
|
+
avatarSrc?: string;
|
|
77
|
+
/** Platform — drives the platform badge */
|
|
78
|
+
platform?: SocialPlatform;
|
|
79
|
+
/** Operational status (healthy/degrading/at-risk) — uses StatusKey */
|
|
80
|
+
status?: StatusKey;
|
|
81
|
+
/** Total followers (current snapshot) */
|
|
82
|
+
followers?: number;
|
|
83
|
+
/** Follower-trend sparkline values */
|
|
84
|
+
followerTrend?: number[];
|
|
85
|
+
/** Engagement rate (%) */
|
|
86
|
+
engagementRate?: number;
|
|
87
|
+
/** Posts per week (recent average) */
|
|
88
|
+
postsPerWeek?: number;
|
|
89
|
+
/** Content-type mix (counts or percents) */
|
|
90
|
+
contentMix?: PageCardContentMix;
|
|
91
|
+
/** Bot-detection breakdown (real / suspicious / bot) */
|
|
92
|
+
botDetection?: BotDetectionData;
|
|
93
|
+
/** Make the entire card clickable */
|
|
94
|
+
interactive?: boolean;
|
|
95
|
+
/** Locale @default 'fa' */
|
|
96
|
+
locale?: SupportedLocale;
|
|
97
|
+
}
|
|
98
|
+
declare const PageCard: React.ForwardRefExoticComponent<PageCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
99
|
+
|
|
100
|
+
export { BotDetectionMeter as B, PageCard as P, type SocialPlatform as S, type PageCardContentMix as a, type PageCardProps as b, SocialPlatformBadge as c, type SocialPlatformBadgeProps as d, type BotDetectionKey as e, type BotDetectionData as f, type BotDetectionMeterProps as g, socialPlatformBadgeVariants as s };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { S as SupportedLocale } from './utils-DlXWmDZ-.js';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { c as StatusKey } from './i18n-ArS3mqj0.js';
|
|
5
|
+
|
|
6
|
+
type SocialPlatform = 'instagram' | 'twitter' | 'tiktok' | 'youtube' | 'linkedin' | 'telegram' | 'threads' | 'facebook';
|
|
7
|
+
interface SocialPlatformBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
8
|
+
/** The social media platform to display */
|
|
9
|
+
platform: SocialPlatform;
|
|
10
|
+
/** Size of the badge */
|
|
11
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
12
|
+
/** Show the platform name label */
|
|
13
|
+
showLabel?: boolean;
|
|
14
|
+
/** Visual style of the badge */
|
|
15
|
+
variant?: 'flat' | 'badge';
|
|
16
|
+
}
|
|
17
|
+
declare const socialPlatformBadgeVariants: (props?: ({
|
|
18
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
19
|
+
variant?: "flat" | "badge" | null | undefined;
|
|
20
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
21
|
+
declare const SocialPlatformBadge: React.ForwardRefExoticComponent<SocialPlatformBadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
22
|
+
|
|
23
|
+
type BotDetectionKey = 'real' | 'suspicious' | 'bot';
|
|
24
|
+
interface BotDetectionData {
|
|
25
|
+
/** Confirmed real / human accounts */
|
|
26
|
+
real: number;
|
|
27
|
+
/** Suspicious — insufficient signal, possibly bot */
|
|
28
|
+
suspicious: number;
|
|
29
|
+
/** Confirmed bot / automated */
|
|
30
|
+
bot: number;
|
|
31
|
+
}
|
|
32
|
+
interface BotDetectionMeterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
33
|
+
/** Counts — auto-normalised to percentages that sum to exactly 100 */
|
|
34
|
+
data: BotDetectionData;
|
|
35
|
+
/** Display mode @default "stacked" */
|
|
36
|
+
variant?: 'stacked' | 'bars' | 'compact';
|
|
37
|
+
/** Show numeric count labels */
|
|
38
|
+
showCounts?: boolean;
|
|
39
|
+
/** Show percentage labels @default true */
|
|
40
|
+
showPercent?: boolean;
|
|
41
|
+
/** Show the top "Real-account rate" summary line (stacked variant only) @default true */
|
|
42
|
+
showSummary?: boolean;
|
|
43
|
+
/** Size of the stacked bar or individual bars */
|
|
44
|
+
size?: 'sm' | 'md' | 'lg';
|
|
45
|
+
/** Locale for digits + default labels @default "fa" */
|
|
46
|
+
locale?: SupportedLocale;
|
|
47
|
+
}
|
|
48
|
+
declare const BotDetectionMeter: React.ForwardRefExoticComponent<BotDetectionMeterProps & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* PageCard (government-flavor) — tracked-account tile for افکارسنجی pages
|
|
52
|
+
* dashboards. Composes: avatar + handle + platform badge, status (healthy/
|
|
53
|
+
* degrading/at-risk via StatusKey), follower trend sparkline, engagement
|
|
54
|
+
* stats, content-type mix, bot-detection percentages.
|
|
55
|
+
*
|
|
56
|
+
* Distinct from `ProfileCard` which is influencer-flavored (focus on
|
|
57
|
+
* engagement tier, follower count, avatar). PageCard is for **tracked
|
|
58
|
+
* accounts** in monitoring — health and trust signals matter most.
|
|
59
|
+
*/
|
|
60
|
+
interface PageCardContentMix {
|
|
61
|
+
/** Photo posts in window (count or %) */
|
|
62
|
+
photo?: number;
|
|
63
|
+
/** Video posts in window */
|
|
64
|
+
video?: number;
|
|
65
|
+
/** Carousel posts */
|
|
66
|
+
carousel?: number;
|
|
67
|
+
/** Story / reel count */
|
|
68
|
+
story?: number;
|
|
69
|
+
}
|
|
70
|
+
interface PageCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
71
|
+
/** Account handle / display name (e.g., "@news_agency") */
|
|
72
|
+
handle: React.ReactNode;
|
|
73
|
+
/** Optional secondary subtitle (e.g., page category) */
|
|
74
|
+
subtitle?: React.ReactNode;
|
|
75
|
+
/** Avatar URL */
|
|
76
|
+
avatarSrc?: string;
|
|
77
|
+
/** Platform — drives the platform badge */
|
|
78
|
+
platform?: SocialPlatform;
|
|
79
|
+
/** Operational status (healthy/degrading/at-risk) — uses StatusKey */
|
|
80
|
+
status?: StatusKey;
|
|
81
|
+
/** Total followers (current snapshot) */
|
|
82
|
+
followers?: number;
|
|
83
|
+
/** Follower-trend sparkline values */
|
|
84
|
+
followerTrend?: number[];
|
|
85
|
+
/** Engagement rate (%) */
|
|
86
|
+
engagementRate?: number;
|
|
87
|
+
/** Posts per week (recent average) */
|
|
88
|
+
postsPerWeek?: number;
|
|
89
|
+
/** Content-type mix (counts or percents) */
|
|
90
|
+
contentMix?: PageCardContentMix;
|
|
91
|
+
/** Bot-detection breakdown (real / suspicious / bot) */
|
|
92
|
+
botDetection?: BotDetectionData;
|
|
93
|
+
/** Make the entire card clickable */
|
|
94
|
+
interactive?: boolean;
|
|
95
|
+
/** Locale @default 'fa' */
|
|
96
|
+
locale?: SupportedLocale;
|
|
97
|
+
}
|
|
98
|
+
declare const PageCard: React.ForwardRefExoticComponent<PageCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
99
|
+
|
|
100
|
+
export { BotDetectionMeter as B, PageCard as P, type SocialPlatform as S, type PageCardContentMix as a, type PageCardProps as b, SocialPlatformBadge as c, type SocialPlatformBadgeProps as d, type BotDetectionKey as e, type BotDetectionData as f, type BotDetectionMeterProps as g, socialPlatformBadgeVariants as s };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
|
|
3
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
4
|
+
type SupportedLocale = 'fa' | 'ar' | 'en';
|
|
5
|
+
/**
|
|
6
|
+
* Convert digits in a string to Persian/Arabic numerals based on locale.
|
|
7
|
+
* @example convertToLocalNumbers('123', 'fa') => '۱۲۳'
|
|
8
|
+
* @example convertToLocalNumbers('123', 'en') => '123'
|
|
9
|
+
*/
|
|
10
|
+
declare function convertToLocalNumbers(text: string | number, locale: SupportedLocale): string;
|
|
11
|
+
/**
|
|
12
|
+
* Format large numbers with locale-aware suffixes (K/M/B).
|
|
13
|
+
* @example formatLargeNumber(1500, 'fa') => '۱.۵ هزار'
|
|
14
|
+
* @example formatLargeNumber(1500, 'en') => '1.5K'
|
|
15
|
+
*/
|
|
16
|
+
declare function formatLargeNumber(num: number, locale: SupportedLocale): string;
|
|
17
|
+
/**
|
|
18
|
+
* Format number to Instagram-style short format (English only).
|
|
19
|
+
* @example formatNumber(123456, 'short') => '123K'
|
|
20
|
+
* @example formatNumber(123456, 'exact') => '123,456'
|
|
21
|
+
*/
|
|
22
|
+
declare function formatNumber(num: number | undefined, format?: 'exact' | 'short'): string;
|
|
23
|
+
/**
|
|
24
|
+
* Format date to relative time with absolute on hover (Persian)
|
|
25
|
+
* @example formatRelativeTime(new Date()) => '۲ ساعت پیش'
|
|
26
|
+
*/
|
|
27
|
+
declare function formatRelativeTime(date: Date | string | number): string;
|
|
28
|
+
/**
|
|
29
|
+
* Format date to absolute format (Persian / Jalali)
|
|
30
|
+
* Uses date-fns-jalali for accurate Jalali conversion.
|
|
31
|
+
* @example formatAbsoluteTime(new Date()) => '۱۵ دی ۱۴۰۳، ۱۵:۳۰'
|
|
32
|
+
*/
|
|
33
|
+
declare function formatAbsoluteTime(date: Date | string | number): string;
|
|
34
|
+
|
|
35
|
+
export { type SupportedLocale as S, convertToLocalNumbers as a, formatNumber as b, cn as c, formatRelativeTime as d, formatAbsoluteTime as e, formatLargeNumber as f };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
|
|
3
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
4
|
+
type SupportedLocale = 'fa' | 'ar' | 'en';
|
|
5
|
+
/**
|
|
6
|
+
* Convert digits in a string to Persian/Arabic numerals based on locale.
|
|
7
|
+
* @example convertToLocalNumbers('123', 'fa') => '۱۲۳'
|
|
8
|
+
* @example convertToLocalNumbers('123', 'en') => '123'
|
|
9
|
+
*/
|
|
10
|
+
declare function convertToLocalNumbers(text: string | number, locale: SupportedLocale): string;
|
|
11
|
+
/**
|
|
12
|
+
* Format large numbers with locale-aware suffixes (K/M/B).
|
|
13
|
+
* @example formatLargeNumber(1500, 'fa') => '۱.۵ هزار'
|
|
14
|
+
* @example formatLargeNumber(1500, 'en') => '1.5K'
|
|
15
|
+
*/
|
|
16
|
+
declare function formatLargeNumber(num: number, locale: SupportedLocale): string;
|
|
17
|
+
/**
|
|
18
|
+
* Format number to Instagram-style short format (English only).
|
|
19
|
+
* @example formatNumber(123456, 'short') => '123K'
|
|
20
|
+
* @example formatNumber(123456, 'exact') => '123,456'
|
|
21
|
+
*/
|
|
22
|
+
declare function formatNumber(num: number | undefined, format?: 'exact' | 'short'): string;
|
|
23
|
+
/**
|
|
24
|
+
* Format date to relative time with absolute on hover (Persian)
|
|
25
|
+
* @example formatRelativeTime(new Date()) => '۲ ساعت پیش'
|
|
26
|
+
*/
|
|
27
|
+
declare function formatRelativeTime(date: Date | string | number): string;
|
|
28
|
+
/**
|
|
29
|
+
* Format date to absolute format (Persian / Jalali)
|
|
30
|
+
* Uses date-fns-jalali for accurate Jalali conversion.
|
|
31
|
+
* @example formatAbsoluteTime(new Date()) => '۱۵ دی ۱۴۰۳، ۱۵:۳۰'
|
|
32
|
+
*/
|
|
33
|
+
declare function formatAbsoluteTime(date: Date | string | number): string;
|
|
34
|
+
|
|
35
|
+
export { type SupportedLocale as S, convertToLocalNumbers as a, formatNumber as b, cn as c, formatRelativeTime as d, formatAbsoluteTime as e, formatLargeNumber as f };
|
package/package.json
CHANGED
|
@@ -1,7 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parto-system-design/ui",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.8",
|
|
4
|
+
"description": "Persian-first, RTL-native React component library for public-opinion monitoring (افکارسنجی), social listening, and influencer analytics — Supabase-style design language adapted for Farsi typography.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Parto Design System contributors",
|
|
7
|
+
"homepage": "https://github.com/DadeNegar-Company/parto-ui#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/DadeNegar-Company/parto-ui.git",
|
|
11
|
+
"directory": "packages/ui"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/DadeNegar-Company/parto-ui/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react",
|
|
18
|
+
"design-system",
|
|
19
|
+
"ui-components",
|
|
20
|
+
"rtl",
|
|
21
|
+
"persian",
|
|
22
|
+
"farsi",
|
|
23
|
+
"shadcn",
|
|
24
|
+
"radix-ui",
|
|
25
|
+
"tailwindcss",
|
|
26
|
+
"social-listening",
|
|
27
|
+
"افکارسنجی",
|
|
28
|
+
"data-visualization",
|
|
29
|
+
"recharts",
|
|
30
|
+
"accessibility"
|
|
31
|
+
],
|
|
5
32
|
"type": "module",
|
|
6
33
|
"main": "./dist/index.cjs",
|
|
7
34
|
"module": "./dist/index.js",
|
|
@@ -12,12 +39,140 @@
|
|
|
12
39
|
"import": "./dist/index.js",
|
|
13
40
|
"require": "./dist/index.cjs"
|
|
14
41
|
},
|
|
42
|
+
"./button": {
|
|
43
|
+
"types": "./dist/components/ui/button.d.ts",
|
|
44
|
+
"import": "./dist/components/ui/button.js",
|
|
45
|
+
"require": "./dist/components/ui/button.cjs"
|
|
46
|
+
},
|
|
47
|
+
"./input": {
|
|
48
|
+
"types": "./dist/components/ui/input.d.ts",
|
|
49
|
+
"import": "./dist/components/ui/input.js",
|
|
50
|
+
"require": "./dist/components/ui/input.cjs"
|
|
51
|
+
},
|
|
52
|
+
"./card": {
|
|
53
|
+
"types": "./dist/components/ui/card.d.ts",
|
|
54
|
+
"import": "./dist/components/ui/card.js",
|
|
55
|
+
"require": "./dist/components/ui/card.cjs"
|
|
56
|
+
},
|
|
57
|
+
"./badge": {
|
|
58
|
+
"types": "./dist/components/ui/badge.d.ts",
|
|
59
|
+
"import": "./dist/components/ui/badge.js",
|
|
60
|
+
"require": "./dist/components/ui/badge.cjs"
|
|
61
|
+
},
|
|
62
|
+
"./avatar": {
|
|
63
|
+
"types": "./dist/components/ui/avatar.d.ts",
|
|
64
|
+
"import": "./dist/components/ui/avatar.js",
|
|
65
|
+
"require": "./dist/components/ui/avatar.cjs"
|
|
66
|
+
},
|
|
67
|
+
"./dialog": {
|
|
68
|
+
"types": "./dist/components/ui/dialog.d.ts",
|
|
69
|
+
"import": "./dist/components/ui/dialog.js",
|
|
70
|
+
"require": "./dist/components/ui/dialog.cjs"
|
|
71
|
+
},
|
|
72
|
+
"./sheet": {
|
|
73
|
+
"types": "./dist/components/ui/sheet.d.ts",
|
|
74
|
+
"import": "./dist/components/ui/sheet.js",
|
|
75
|
+
"require": "./dist/components/ui/sheet.cjs"
|
|
76
|
+
},
|
|
77
|
+
"./popover": {
|
|
78
|
+
"types": "./dist/components/ui/popover.d.ts",
|
|
79
|
+
"import": "./dist/components/ui/popover.js",
|
|
80
|
+
"require": "./dist/components/ui/popover.cjs"
|
|
81
|
+
},
|
|
82
|
+
"./tooltip": {
|
|
83
|
+
"types": "./dist/components/ui/tooltip.d.ts",
|
|
84
|
+
"import": "./dist/components/ui/tooltip.js",
|
|
85
|
+
"require": "./dist/components/ui/tooltip.cjs"
|
|
86
|
+
},
|
|
87
|
+
"./separator": {
|
|
88
|
+
"types": "./dist/components/ui/separator.d.ts",
|
|
89
|
+
"import": "./dist/components/ui/separator.js",
|
|
90
|
+
"require": "./dist/components/ui/separator.cjs"
|
|
91
|
+
},
|
|
92
|
+
"./data-table": {
|
|
93
|
+
"types": "./dist/components/ui/data-table.d.ts",
|
|
94
|
+
"import": "./dist/components/ui/data-table.js",
|
|
95
|
+
"require": "./dist/components/ui/data-table.cjs"
|
|
96
|
+
},
|
|
97
|
+
"./calendar": {
|
|
98
|
+
"types": "./dist/components/ui/calendar.d.ts",
|
|
99
|
+
"import": "./dist/components/ui/calendar.js",
|
|
100
|
+
"require": "./dist/components/ui/calendar.cjs"
|
|
101
|
+
},
|
|
102
|
+
"./iran-province-heat": {
|
|
103
|
+
"types": "./dist/components/ui/iran-province-heat.d.ts",
|
|
104
|
+
"import": "./dist/components/ui/iran-province-heat.js",
|
|
105
|
+
"require": "./dist/components/ui/iran-province-heat.cjs"
|
|
106
|
+
},
|
|
107
|
+
"./sparkline": {
|
|
108
|
+
"types": "./dist/components/ui/sparkline.d.ts",
|
|
109
|
+
"import": "./dist/components/ui/sparkline.js",
|
|
110
|
+
"require": "./dist/components/ui/sparkline.cjs"
|
|
111
|
+
},
|
|
112
|
+
"./line-chart": {
|
|
113
|
+
"types": "./dist/components/charts/PartoLineChart.d.ts",
|
|
114
|
+
"import": "./dist/components/charts/PartoLineChart.js",
|
|
115
|
+
"require": "./dist/components/charts/PartoLineChart.cjs"
|
|
116
|
+
},
|
|
117
|
+
"./bar-chart": {
|
|
118
|
+
"types": "./dist/components/charts/PartoBarChart.d.ts",
|
|
119
|
+
"import": "./dist/components/charts/PartoBarChart.js",
|
|
120
|
+
"require": "./dist/components/charts/PartoBarChart.cjs"
|
|
121
|
+
},
|
|
122
|
+
"./pie-chart": {
|
|
123
|
+
"types": "./dist/components/charts/PartoPieChart.d.ts",
|
|
124
|
+
"import": "./dist/components/charts/PartoPieChart.js",
|
|
125
|
+
"require": "./dist/components/charts/PartoPieChart.cjs"
|
|
126
|
+
},
|
|
127
|
+
"./area-chart": {
|
|
128
|
+
"types": "./dist/components/charts/PartoAreaChart.d.ts",
|
|
129
|
+
"import": "./dist/components/charts/PartoAreaChart.js",
|
|
130
|
+
"require": "./dist/components/charts/PartoAreaChart.cjs"
|
|
131
|
+
},
|
|
132
|
+
"./concept-card": {
|
|
133
|
+
"types": "./dist/components/ui/concept-card.d.ts",
|
|
134
|
+
"import": "./dist/components/ui/concept-card.js",
|
|
135
|
+
"require": "./dist/components/ui/concept-card.cjs"
|
|
136
|
+
},
|
|
137
|
+
"./page-card": {
|
|
138
|
+
"types": "./dist/components/ui/page-card.d.ts",
|
|
139
|
+
"import": "./dist/components/ui/page-card.js",
|
|
140
|
+
"require": "./dist/components/ui/page-card.cjs"
|
|
141
|
+
},
|
|
142
|
+
"./alert-rule-card": {
|
|
143
|
+
"types": "./dist/components/ui/alert-rule-card.d.ts",
|
|
144
|
+
"import": "./dist/components/ui/alert-rule-card.js",
|
|
145
|
+
"require": "./dist/components/ui/alert-rule-card.cjs"
|
|
146
|
+
},
|
|
147
|
+
"./saved-query-card": {
|
|
148
|
+
"types": "./dist/components/ui/saved-query-card.d.ts",
|
|
149
|
+
"import": "./dist/components/ui/saved-query-card.js",
|
|
150
|
+
"require": "./dist/components/ui/saved-query-card.cjs"
|
|
151
|
+
},
|
|
152
|
+
"./filter-provider": {
|
|
153
|
+
"types": "./dist/components/ui/filter-provider.d.ts",
|
|
154
|
+
"import": "./dist/components/ui/filter-provider.js",
|
|
155
|
+
"require": "./dist/components/ui/filter-provider.cjs"
|
|
156
|
+
},
|
|
157
|
+
"./hooks/use-hotkeys": {
|
|
158
|
+
"types": "./dist/hooks/use-hotkeys.d.ts",
|
|
159
|
+
"import": "./dist/hooks/use-hotkeys.js",
|
|
160
|
+
"require": "./dist/hooks/use-hotkeys.cjs"
|
|
161
|
+
},
|
|
162
|
+
"./hooks/use-hotkey-registry": {
|
|
163
|
+
"types": "./dist/hooks/use-hotkey-registry.d.ts",
|
|
164
|
+
"import": "./dist/hooks/use-hotkey-registry.js",
|
|
165
|
+
"require": "./dist/hooks/use-hotkey-registry.cjs"
|
|
166
|
+
},
|
|
15
167
|
"./styles.css": "./dist/index.css",
|
|
16
168
|
"./tailwind.config": "./tailwind.config.ts"
|
|
17
169
|
},
|
|
18
170
|
"files": [
|
|
19
171
|
"dist",
|
|
20
|
-
"tailwind.config.ts"
|
|
172
|
+
"tailwind.config.ts",
|
|
173
|
+
"LICENSE",
|
|
174
|
+
"README.md",
|
|
175
|
+
"AGENTS.md"
|
|
21
176
|
],
|
|
22
177
|
"sideEffects": [
|
|
23
178
|
"*.css"
|
|
@@ -125,6 +280,7 @@
|
|
|
125
280
|
"lint:fix": "eslint src/ --fix",
|
|
126
281
|
"typecheck": "tsc --noEmit --skipLibCheck",
|
|
127
282
|
"size": "size-limit",
|
|
128
|
-
"size:check": "size-limit --limit"
|
|
283
|
+
"size:check": "size-limit --limit",
|
|
284
|
+
"size:treeshake-audit": "size-limit --config .size-limit.audit.json"
|
|
129
285
|
}
|
|
130
286
|
}
|