@parto-system-design/ui 1.1.17 → 1.1.18
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 +2 -2
- package/README.md +1 -1
- package/dist/components/brand/parto-logo.cjs +0 -2
- package/dist/components/brand/parto-logo.js +0 -2
- package/dist/components/charts/PartoAreaChart.cjs +2 -4
- package/dist/components/charts/PartoAreaChart.d.cts +1 -1
- package/dist/components/charts/PartoAreaChart.d.ts +1 -1
- package/dist/components/charts/PartoAreaChart.js +2 -4
- package/dist/components/charts/PartoBarChart.cjs +2 -4
- package/dist/components/charts/PartoBarChart.d.cts +1 -1
- package/dist/components/charts/PartoBarChart.d.ts +1 -1
- package/dist/components/charts/PartoBarChart.js +2 -4
- package/dist/components/charts/PartoLineChart.cjs +2 -4
- package/dist/components/charts/PartoLineChart.d.cts +1 -1
- package/dist/components/charts/PartoLineChart.d.ts +1 -1
- package/dist/components/charts/PartoLineChart.js +2 -4
- package/dist/components/charts/PartoPieChart.cjs +2 -4
- package/dist/components/charts/PartoPieChart.d.cts +1 -1
- package/dist/components/charts/PartoPieChart.d.ts +1 -1
- package/dist/components/charts/PartoPieChart.js +2 -4
- package/dist/components/ui/accordion.cjs +0 -2
- package/dist/components/ui/accordion.d.cts +4 -5
- package/dist/components/ui/accordion.d.ts +4 -5
- package/dist/components/ui/accordion.js +0 -2
- package/dist/components/ui/alert-dialog.cjs +0 -2
- package/dist/components/ui/alert-dialog.d.cts +9 -10
- package/dist/components/ui/alert-dialog.d.ts +9 -10
- package/dist/components/ui/alert-dialog.js +1 -3
- package/dist/components/ui/alert-rule-card.cjs +149 -12
- package/dist/components/ui/alert-rule-card.d.cts +2 -2
- package/dist/components/ui/alert-rule-card.d.ts +2 -2
- package/dist/components/ui/alert-rule-card.js +149 -12
- package/dist/components/ui/alert.cjs +3 -5
- package/dist/components/ui/alert.js +3 -5
- package/dist/components/ui/app-bar.cjs +0 -2
- package/dist/components/ui/app-bar.js +0 -2
- package/dist/components/ui/avatar.cjs +0 -2
- package/dist/components/ui/avatar.d.cts +3 -4
- package/dist/components/ui/avatar.d.ts +3 -4
- package/dist/components/ui/avatar.js +0 -2
- package/dist/components/ui/badge.cjs +0 -2
- package/dist/components/ui/badge.d.cts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +0 -2
- package/dist/components/ui/breadcrumb.cjs +0 -2
- package/dist/components/ui/breadcrumb.d.cts +7 -8
- package/dist/components/ui/breadcrumb.d.ts +7 -8
- package/dist/components/ui/breadcrumb.js +0 -2
- package/dist/components/ui/button.cjs +0 -2
- package/dist/components/ui/button.d.cts +2 -2
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +1 -3
- package/dist/components/ui/calendar.cjs +0 -2
- package/dist/components/ui/calendar.d.cts +1 -2
- package/dist/components/ui/calendar.d.ts +1 -2
- package/dist/components/ui/calendar.js +1 -3
- package/dist/components/ui/card.cjs +0 -2
- package/dist/components/ui/card.js +0 -2
- package/dist/components/ui/checkbox.cjs +0 -2
- package/dist/components/ui/checkbox.js +0 -2
- package/dist/components/ui/concept-card.cjs +179 -61
- package/dist/components/ui/concept-card.d.cts +3 -3
- package/dist/components/ui/concept-card.d.ts +3 -3
- package/dist/components/ui/concept-card.js +179 -61
- package/dist/components/ui/data-table.cjs +129 -3
- package/dist/components/ui/data-table.d.cts +1 -1
- package/dist/components/ui/data-table.d.ts +1 -1
- package/dist/components/ui/data-table.js +130 -4
- package/dist/components/ui/dialog.cjs +0 -2
- package/dist/components/ui/dialog.d.cts +2 -3
- package/dist/components/ui/dialog.d.ts +2 -3
- package/dist/components/ui/dialog.js +0 -2
- package/dist/components/ui/dropdown-menu.cjs +0 -2
- package/dist/components/ui/dropdown-menu.d.cts +15 -16
- package/dist/components/ui/dropdown-menu.d.ts +15 -16
- package/dist/components/ui/dropdown-menu.js +0 -2
- package/dist/components/ui/filter-provider.cjs +0 -2
- package/dist/components/ui/filter-provider.d.cts +1 -2
- package/dist/components/ui/filter-provider.d.ts +1 -2
- package/dist/components/ui/filter-provider.js +0 -2
- package/dist/components/ui/form.cjs +0 -2
- package/dist/components/ui/form.d.cts +7 -8
- package/dist/components/ui/form.d.ts +7 -8
- package/dist/components/ui/form.js +0 -2
- package/dist/components/ui/input.cjs +0 -2
- package/dist/components/ui/input.js +0 -2
- package/dist/components/ui/iran-province-heat.cjs +1 -3
- package/dist/components/ui/iran-province-heat.d.cts +1 -1
- package/dist/components/ui/iran-province-heat.d.ts +1 -1
- package/dist/components/ui/iran-province-heat.js +1 -3
- package/dist/components/ui/label.cjs +0 -2
- package/dist/components/ui/label.d.cts +1 -2
- package/dist/components/ui/label.d.ts +1 -2
- package/dist/components/ui/label.js +0 -2
- package/dist/components/ui/page-card.cjs +170 -33
- package/dist/components/ui/page-card.d.cts +3 -3
- package/dist/components/ui/page-card.d.ts +3 -3
- package/dist/components/ui/page-card.js +170 -33
- package/dist/components/ui/page-header.cjs +128 -2
- package/dist/components/ui/page-header.d.cts +1 -1
- package/dist/components/ui/page-header.d.ts +1 -1
- package/dist/components/ui/page-header.js +128 -2
- package/dist/components/ui/password-input.cjs +0 -2
- package/dist/components/ui/password-input.js +0 -2
- package/dist/components/ui/popover.cjs +0 -2
- package/dist/components/ui/popover.js +0 -2
- package/dist/components/ui/progress.cjs +1 -3
- package/dist/components/ui/progress.js +1 -3
- package/dist/components/ui/radio-card.cjs +0 -2
- package/dist/components/ui/radio-card.js +0 -2
- package/dist/components/ui/radio-group.cjs +0 -2
- package/dist/components/ui/radio-group.js +0 -2
- package/dist/components/ui/saved-query-card.cjs +0 -2
- package/dist/components/ui/saved-query-card.d.cts +1 -1
- package/dist/components/ui/saved-query-card.d.ts +1 -1
- package/dist/components/ui/saved-query-card.js +1 -3
- package/dist/components/ui/scroll-area.cjs +0 -2
- package/dist/components/ui/scroll-area.d.cts +2 -3
- package/dist/components/ui/scroll-area.d.ts +2 -3
- package/dist/components/ui/scroll-area.js +0 -2
- package/dist/components/ui/select.cjs +0 -2
- package/dist/components/ui/select.d.cts +1 -2
- package/dist/components/ui/select.d.ts +1 -2
- package/dist/components/ui/select.js +0 -2
- package/dist/components/ui/separator.cjs +0 -2
- package/dist/components/ui/separator.js +0 -2
- package/dist/components/ui/sheet.cjs +0 -2
- package/dist/components/ui/sheet.d.cts +9 -10
- package/dist/components/ui/sheet.d.ts +9 -10
- package/dist/components/ui/sheet.js +0 -2
- package/dist/components/ui/skeleton.cjs +0 -2
- package/dist/components/ui/skeleton.d.cts +8 -9
- package/dist/components/ui/skeleton.d.ts +8 -9
- package/dist/components/ui/skeleton.js +0 -2
- package/dist/components/ui/slider.cjs +0 -2
- package/dist/components/ui/slider.d.cts +1 -2
- package/dist/components/ui/slider.d.ts +1 -2
- package/dist/components/ui/slider.js +0 -2
- package/dist/components/ui/social-platform-badge.cjs +0 -2
- package/dist/components/ui/social-platform-badge.js +1 -3
- package/dist/components/ui/sonner.cjs +4 -6
- package/dist/components/ui/sonner.d.cts +2 -2
- package/dist/components/ui/sonner.d.ts +2 -2
- package/dist/components/ui/sonner.js +4 -6
- package/dist/components/ui/sparkline.cjs +3 -5
- package/dist/components/ui/sparkline.d.cts +1 -1
- package/dist/components/ui/sparkline.d.ts +1 -1
- package/dist/components/ui/sparkline.js +3 -5
- package/dist/components/ui/switch.cjs +0 -2
- package/dist/components/ui/switch.d.cts +1 -1
- package/dist/components/ui/switch.d.ts +1 -1
- package/dist/components/ui/switch.js +0 -2
- package/dist/components/ui/table.cjs +0 -2
- package/dist/components/ui/table.d.cts +9 -10
- package/dist/components/ui/table.d.ts +9 -10
- package/dist/components/ui/table.js +0 -2
- package/dist/components/ui/tabs.cjs +0 -2
- package/dist/components/ui/tabs.js +0 -2
- package/dist/components/ui/textarea.cjs +0 -2
- package/dist/components/ui/textarea.js +0 -2
- package/dist/components/ui/toggle-group.cjs +0 -2
- package/dist/components/ui/toggle-group.d.cts +1 -2
- package/dist/components/ui/toggle-group.d.ts +1 -2
- package/dist/components/ui/toggle-group.js +0 -2
- package/dist/components/ui/tooltip.cjs +0 -2
- package/dist/components/ui/tooltip.js +0 -2
- package/dist/{concept-card-BoJ5gIJD.d.ts → concept-card-BU8JL-gj.d.cts} +5 -5
- package/dist/{concept-card-BXra9mr0.d.cts → concept-card-D7PfDkNR.d.ts} +5 -5
- package/dist/hooks/use-hotkey-registry.cjs +0 -2
- package/dist/hooks/use-hotkey-registry.d.cts +1 -2
- package/dist/hooks/use-hotkey-registry.d.ts +1 -2
- package/dist/hooks/use-hotkey-registry.js +0 -2
- package/dist/hooks/use-hotkeys.cjs +0 -2
- package/dist/hooks/use-hotkeys.js +0 -2
- package/dist/{i18n-BfRhV5aw.d.cts → i18n-DD3DMY8O.d.cts} +94 -5
- package/dist/{i18n-ewyqbKM-.d.ts → i18n-UEClNsBy.d.ts} +94 -5
- package/dist/index.cjs +1242 -1173
- package/dist/index.css +8010 -5459
- package/dist/index.d.cts +212 -991
- package/dist/index.d.ts +212 -991
- package/dist/index.js +1208 -1153
- package/dist/{page-card-C9XXXOVr.d.cts → page-card-DjztZrFM.d.cts} +4 -4
- package/dist/{page-card-DAnbez_f.d.ts → page-card-sIE4lvnb.d.ts} +4 -4
- package/dist/server-FTUA8opZ.d.cts +829 -0
- package/dist/server-m6tiB6DB.d.ts +829 -0
- package/dist/server.cjs +1565 -0
- package/dist/server.d.cts +8 -0
- package/dist/server.d.ts +8 -0
- package/dist/server.js +1483 -0
- package/dist/theme.css +50 -0
- package/dist/{toggle-group-B8r4LOQw.d.cts → toggle-group-Bis6suuR.d.cts} +3 -4
- package/dist/{toggle-group-B8r4LOQw.d.ts → toggle-group-Bis6suuR.d.ts} +3 -4
- package/dist/{utils-DlXWmDZ-.d.cts → utils-Czyp5Ned.d.cts} +1 -1
- package/dist/{utils-DlXWmDZ-.d.ts → utils-Czyp5Ned.d.ts} +1 -1
- package/package.json +455 -187
- package/tailwind.config.ts +184 -183
- package/dist/components/brand/parto-logo.cjs.map +0 -1
- package/dist/components/brand/parto-logo.js.map +0 -1
- package/dist/components/charts/PartoAreaChart.cjs.map +0 -1
- package/dist/components/charts/PartoAreaChart.js.map +0 -1
- package/dist/components/charts/PartoBarChart.cjs.map +0 -1
- package/dist/components/charts/PartoBarChart.js.map +0 -1
- package/dist/components/charts/PartoLineChart.cjs.map +0 -1
- package/dist/components/charts/PartoLineChart.js.map +0 -1
- package/dist/components/charts/PartoPieChart.cjs.map +0 -1
- package/dist/components/charts/PartoPieChart.js.map +0 -1
- package/dist/components/ui/accordion.cjs.map +0 -1
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/alert-dialog.cjs.map +0 -1
- package/dist/components/ui/alert-dialog.js.map +0 -1
- package/dist/components/ui/alert-rule-card.cjs.map +0 -1
- package/dist/components/ui/alert-rule-card.js.map +0 -1
- package/dist/components/ui/alert.cjs.map +0 -1
- package/dist/components/ui/alert.js.map +0 -1
- package/dist/components/ui/app-bar.cjs.map +0 -1
- package/dist/components/ui/app-bar.js.map +0 -1
- package/dist/components/ui/avatar.cjs.map +0 -1
- package/dist/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/badge.cjs.map +0 -1
- package/dist/components/ui/badge.js.map +0 -1
- package/dist/components/ui/breadcrumb.cjs.map +0 -1
- package/dist/components/ui/breadcrumb.js.map +0 -1
- package/dist/components/ui/button.cjs.map +0 -1
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/calendar.cjs.map +0 -1
- package/dist/components/ui/calendar.js.map +0 -1
- package/dist/components/ui/card.cjs.map +0 -1
- package/dist/components/ui/card.js.map +0 -1
- package/dist/components/ui/checkbox.cjs.map +0 -1
- package/dist/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/concept-card.cjs.map +0 -1
- package/dist/components/ui/concept-card.js.map +0 -1
- package/dist/components/ui/data-table.cjs.map +0 -1
- package/dist/components/ui/data-table.js.map +0 -1
- package/dist/components/ui/dialog.cjs.map +0 -1
- package/dist/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/dropdown-menu.cjs.map +0 -1
- package/dist/components/ui/dropdown-menu.js.map +0 -1
- package/dist/components/ui/filter-provider.cjs.map +0 -1
- package/dist/components/ui/filter-provider.js.map +0 -1
- package/dist/components/ui/form.cjs.map +0 -1
- package/dist/components/ui/form.js.map +0 -1
- package/dist/components/ui/input.cjs.map +0 -1
- package/dist/components/ui/input.js.map +0 -1
- package/dist/components/ui/iran-province-heat.cjs.map +0 -1
- package/dist/components/ui/iran-province-heat.js.map +0 -1
- package/dist/components/ui/label.cjs.map +0 -1
- package/dist/components/ui/label.js.map +0 -1
- package/dist/components/ui/page-card.cjs.map +0 -1
- package/dist/components/ui/page-card.js.map +0 -1
- package/dist/components/ui/page-header.cjs.map +0 -1
- package/dist/components/ui/page-header.js.map +0 -1
- package/dist/components/ui/password-input.cjs.map +0 -1
- package/dist/components/ui/password-input.js.map +0 -1
- package/dist/components/ui/popover.cjs.map +0 -1
- package/dist/components/ui/popover.js.map +0 -1
- package/dist/components/ui/progress.cjs.map +0 -1
- package/dist/components/ui/progress.js.map +0 -1
- package/dist/components/ui/radio-card.cjs.map +0 -1
- package/dist/components/ui/radio-card.js.map +0 -1
- package/dist/components/ui/radio-group.cjs.map +0 -1
- package/dist/components/ui/radio-group.js.map +0 -1
- package/dist/components/ui/saved-query-card.cjs.map +0 -1
- package/dist/components/ui/saved-query-card.js.map +0 -1
- package/dist/components/ui/scroll-area.cjs.map +0 -1
- package/dist/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/select.cjs.map +0 -1
- package/dist/components/ui/select.js.map +0 -1
- package/dist/components/ui/separator.cjs.map +0 -1
- package/dist/components/ui/separator.js.map +0 -1
- package/dist/components/ui/sheet.cjs.map +0 -1
- package/dist/components/ui/sheet.js.map +0 -1
- package/dist/components/ui/skeleton.cjs.map +0 -1
- package/dist/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/slider.cjs.map +0 -1
- package/dist/components/ui/slider.js.map +0 -1
- package/dist/components/ui/social-platform-badge.cjs.map +0 -1
- package/dist/components/ui/social-platform-badge.js.map +0 -1
- package/dist/components/ui/sonner.cjs.map +0 -1
- package/dist/components/ui/sonner.js.map +0 -1
- package/dist/components/ui/sparkline.cjs.map +0 -1
- package/dist/components/ui/sparkline.js.map +0 -1
- package/dist/components/ui/switch.cjs.map +0 -1
- package/dist/components/ui/switch.js.map +0 -1
- package/dist/components/ui/table.cjs.map +0 -1
- package/dist/components/ui/table.js.map +0 -1
- package/dist/components/ui/tabs.cjs.map +0 -1
- package/dist/components/ui/tabs.js.map +0 -1
- package/dist/components/ui/textarea.cjs.map +0 -1
- package/dist/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/toggle-group.cjs.map +0 -1
- package/dist/components/ui/toggle-group.js.map +0 -1
- package/dist/components/ui/tooltip.cjs.map +0 -1
- package/dist/components/ui/tooltip.js.map +0 -1
- package/dist/hooks/use-hotkey-registry.cjs.map +0 -1
- package/dist/hooks/use-hotkey-registry.js.map +0 -1
- package/dist/hooks/use-hotkeys.cjs.map +0 -1
- package/dist/hooks/use-hotkeys.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
3
|
|
|
5
|
-
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>):
|
|
4
|
+
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
|
|
6
5
|
declare namespace Label {
|
|
7
6
|
var displayName: string;
|
|
8
7
|
}
|
|
@@ -39,11 +39,148 @@ function convertToLocalNumbers(text, locale) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// src/lib/i18n.ts
|
|
42
|
+
var EMOTION_KEYS = [
|
|
43
|
+
"anger",
|
|
44
|
+
"anticipation",
|
|
45
|
+
"joy",
|
|
46
|
+
"trust",
|
|
47
|
+
"fear",
|
|
48
|
+
"surprise",
|
|
49
|
+
"sadness",
|
|
50
|
+
"disgust",
|
|
51
|
+
"neutral"
|
|
52
|
+
];
|
|
53
|
+
var emotionLabels = {
|
|
54
|
+
fa: {
|
|
55
|
+
anger: "\u062E\u0634\u0645",
|
|
56
|
+
anticipation: "\u0627\u0646\u062A\u0638\u0627\u0631",
|
|
57
|
+
joy: "\u0634\u0627\u062F\u06CC",
|
|
58
|
+
trust: "\u0627\u0639\u062A\u0645\u0627\u062F",
|
|
59
|
+
fear: "\u062A\u0631\u0633",
|
|
60
|
+
surprise: "\u0634\u06AF\u0641\u062A\u06CC",
|
|
61
|
+
sadness: "\u063A\u0645",
|
|
62
|
+
disgust: "\u0627\u0646\u0632\u062C\u0627\u0631",
|
|
63
|
+
neutral: "\u062E\u0646\u062B\u06CC"
|
|
64
|
+
},
|
|
65
|
+
ar: {
|
|
66
|
+
anger: "\u063A\u0636\u0628",
|
|
67
|
+
anticipation: "\u062A\u0631\u0642\u0651\u0628",
|
|
68
|
+
joy: "\u0641\u0631\u062D",
|
|
69
|
+
trust: "\u062B\u0642\u0629",
|
|
70
|
+
fear: "\u062E\u0648\u0641",
|
|
71
|
+
surprise: "\u062F\u0647\u0634\u0629",
|
|
72
|
+
sadness: "\u062D\u0632\u0646",
|
|
73
|
+
disgust: "\u0627\u0634\u0645\u0626\u0632\u0627\u0632",
|
|
74
|
+
neutral: "\u0645\u062D\u0627\u064A\u062F"
|
|
75
|
+
},
|
|
76
|
+
en: {
|
|
77
|
+
anger: "Anger",
|
|
78
|
+
anticipation: "Anticipation",
|
|
79
|
+
joy: "Joy",
|
|
80
|
+
trust: "Trust",
|
|
81
|
+
fear: "Fear",
|
|
82
|
+
surprise: "Surprise",
|
|
83
|
+
sadness: "Sadness",
|
|
84
|
+
disgust: "Disgust",
|
|
85
|
+
neutral: "Neutral"
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
(() => {
|
|
89
|
+
const map = {};
|
|
90
|
+
for (const key of EMOTION_KEYS) map[key] = key;
|
|
91
|
+
for (const locale of Object.keys(emotionLabels)) {
|
|
92
|
+
for (const key of EMOTION_KEYS) {
|
|
93
|
+
map[emotionLabels[locale][key].toLowerCase()] = key;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return map;
|
|
97
|
+
})();
|
|
98
|
+
var FLOW_KEYS = [
|
|
99
|
+
"pro-gov",
|
|
100
|
+
"internal-critic",
|
|
101
|
+
"internal-opponent",
|
|
102
|
+
"external-opponent",
|
|
103
|
+
"grey"
|
|
104
|
+
];
|
|
105
|
+
var flowLabels = {
|
|
106
|
+
fa: {
|
|
107
|
+
"pro-gov": "\u062D\u0627\u0645\u06CC\u0627\u0646 \u062D\u06A9\u0648\u0645\u062A",
|
|
108
|
+
"internal-critic": "\u0645\u0646\u062A\u0642\u062F\u0627\u0646 \u062F\u0627\u062E\u0644\u06CC",
|
|
109
|
+
"internal-opponent": "\u0645\u062E\u0627\u0644\u0641\u0627\u0646 \u062F\u0627\u062E\u0644\u06CC",
|
|
110
|
+
"external-opponent": "\u0645\u062E\u0627\u0644\u0641\u0627\u0646 \u062E\u0627\u0631\u062C\u06CC",
|
|
111
|
+
grey: "\u0642\u0634\u0631 \u062E\u0627\u06A9\u0633\u062A\u0631\u06CC"
|
|
112
|
+
},
|
|
113
|
+
ar: {
|
|
114
|
+
"pro-gov": "\u0645\u0624\u064A\u062F\u0648 \u0627\u0644\u062D\u0643\u0648\u0645\u0629",
|
|
115
|
+
"internal-critic": "\u0645\u0646\u062A\u0642\u062F\u0648\u0646 \u062F\u0627\u062E\u0644\u064A\u0648\u0646",
|
|
116
|
+
"internal-opponent": "\u0645\u0639\u0627\u0631\u0636\u0648\u0646 \u062F\u0627\u062E\u0644\u064A\u0648\u0646",
|
|
117
|
+
"external-opponent": "\u0645\u0639\u0627\u0631\u0636\u0648\u0646 \u062E\u0627\u0631\u062C\u064A\u0648\u0646",
|
|
118
|
+
grey: "\u0627\u0644\u0641\u0626\u0629 \u0627\u0644\u0631\u0645\u0627\u062F\u064A\u0629"
|
|
119
|
+
},
|
|
120
|
+
en: {
|
|
121
|
+
"pro-gov": "Pro-Government",
|
|
122
|
+
"internal-critic": "Internal Critic",
|
|
123
|
+
"internal-opponent": "Internal Opponent",
|
|
124
|
+
"external-opponent": "External Opponent",
|
|
125
|
+
grey: "Grey"
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
(() => {
|
|
129
|
+
const map = {};
|
|
130
|
+
for (const key of FLOW_KEYS) map[key] = key;
|
|
131
|
+
for (const locale of Object.keys(flowLabels)) {
|
|
132
|
+
for (const key of FLOW_KEYS) {
|
|
133
|
+
map[flowLabels[locale][key].toLowerCase()] = key;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return map;
|
|
137
|
+
})();
|
|
138
|
+
var STATUS_KEYS = ["critical", "warning", "middle", "low"];
|
|
42
139
|
var statusLabels = {
|
|
43
|
-
fa: { critical: "\u0628\u062D\u0631\u0627\u0646\u06CC", warning: "\u0647\u0634\u062F\u0627\u0631",
|
|
44
|
-
ar: { critical: "\u062D\u0631\u062C", warning: "\u062A\u062D\u0630\u064A\u0631",
|
|
45
|
-
en: { critical: "Critical", warning: "Warning",
|
|
140
|
+
fa: { critical: "\u0628\u062D\u0631\u0627\u0646\u06CC", warning: "\u0647\u0634\u062F\u0627\u0631", middle: "\u0645\u062A\u0648\u0633\u0637", low: "\u067E\u0627\u06CC\u06CC\u0646" },
|
|
141
|
+
ar: { critical: "\u062D\u0631\u062C", warning: "\u062A\u062D\u0630\u064A\u0631", middle: "\u0645\u062A\u0648\u0633\u0637", low: "\u0645\u0646\u062E\u0641\u0636" },
|
|
142
|
+
en: { critical: "Critical", warning: "Warning", middle: "Middle", low: "Low" }
|
|
143
|
+
};
|
|
144
|
+
var STATUS_VALUE_MAP = {
|
|
145
|
+
1: "critical",
|
|
146
|
+
2: "warning",
|
|
147
|
+
3: "middle",
|
|
148
|
+
4: "low"
|
|
149
|
+
};
|
|
150
|
+
var STATUS_LABEL_LOOKUP = (() => {
|
|
151
|
+
const map = { normal: "low" };
|
|
152
|
+
for (const key of STATUS_KEYS) map[key] = key;
|
|
153
|
+
for (const locale of Object.keys(statusLabels)) {
|
|
154
|
+
for (const key of STATUS_KEYS) {
|
|
155
|
+
map[statusLabels[locale][key].toLowerCase()] = key;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return map;
|
|
159
|
+
})();
|
|
160
|
+
function resolveStatus(input) {
|
|
161
|
+
if (input == null) return null;
|
|
162
|
+
if (typeof input === "number") return STATUS_VALUE_MAP[input] ?? null;
|
|
163
|
+
const raw = String(input).trim();
|
|
164
|
+
if (raw === "") return null;
|
|
165
|
+
if (/^\d+$/.test(raw)) return STATUS_VALUE_MAP[Number(raw)] ?? null;
|
|
166
|
+
return STATUS_LABEL_LOOKUP[raw.toLowerCase()] ?? null;
|
|
167
|
+
}
|
|
168
|
+
var SEVERITY_KEYS = ["urgent", "high", "medium", "low"];
|
|
169
|
+
var severityLabels = {
|
|
170
|
+
fa: { urgent: "\u0641\u0648\u0631\u06CC", high: "\u0628\u0627\u0644\u0627", medium: "\u0645\u062A\u0648\u0633\u0637", low: "\u067E\u0627\u06CC\u06CC\u0646" },
|
|
171
|
+
ar: { urgent: "\u0639\u0627\u062C\u0644", high: "\u0645\u0631\u062A\u0641\u0639", medium: "\u0645\u062A\u0648\u0633\u0637", low: "\u0645\u0646\u062E\u0641\u0636" },
|
|
172
|
+
en: { urgent: "Urgent", high: "High", medium: "Medium", low: "Low" }
|
|
46
173
|
};
|
|
174
|
+
(() => {
|
|
175
|
+
const map = {};
|
|
176
|
+
for (const key of SEVERITY_KEYS) map[key] = key;
|
|
177
|
+
for (const locale of Object.keys(severityLabels)) {
|
|
178
|
+
for (const key of SEVERITY_KEYS) {
|
|
179
|
+
map[severityLabels[locale][key].toLowerCase()] = key;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return map;
|
|
183
|
+
})();
|
|
47
184
|
var SIZE_CLASSES = {
|
|
48
185
|
sm: { badge: "h-6 text-xs px-2 gap-1.5", dot: "size-1.5" },
|
|
49
186
|
md: { badge: "h-7 text-sm px-2.5 gap-2", dot: "size-2" }
|
|
@@ -53,15 +190,17 @@ function tokenVar(status) {
|
|
|
53
190
|
}
|
|
54
191
|
var StatusBadge = React__namespace.forwardRef(
|
|
55
192
|
({ className, status, size = "md", showLabel = true, locale = "fa", animated, ...props }, ref) => {
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
const
|
|
193
|
+
const resolved = resolveStatus(status);
|
|
194
|
+
if (!resolved) return null;
|
|
195
|
+
const label = statusLabels[locale]?.[resolved] ?? statusLabels.fa[resolved];
|
|
196
|
+
const shouldPulse = animated ?? resolved === "critical";
|
|
197
|
+
const token = tokenVar(resolved);
|
|
59
198
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
60
199
|
"span",
|
|
61
200
|
{
|
|
62
201
|
ref,
|
|
63
202
|
"data-slot": "status-badge",
|
|
64
|
-
"data-status":
|
|
203
|
+
"data-status": resolved,
|
|
65
204
|
"aria-label": showLabel ? void 0 : label,
|
|
66
205
|
className: cn(
|
|
67
206
|
"inline-flex items-center rounded-full border font-medium transition-colors duration-150",
|
|
@@ -69,9 +208,9 @@ var StatusBadge = React__namespace.forwardRef(
|
|
|
69
208
|
className
|
|
70
209
|
),
|
|
71
210
|
style: {
|
|
72
|
-
backgroundColor: `
|
|
73
|
-
borderColor: `
|
|
74
|
-
color: `
|
|
211
|
+
backgroundColor: `color-mix(in srgb, var(${token}) 10%, transparent)`,
|
|
212
|
+
borderColor: `color-mix(in srgb, var(${token}) 30%, transparent)`,
|
|
213
|
+
color: `var(${token})`
|
|
75
214
|
},
|
|
76
215
|
...props,
|
|
77
216
|
children: [
|
|
@@ -80,7 +219,7 @@ var StatusBadge = React__namespace.forwardRef(
|
|
|
80
219
|
"span",
|
|
81
220
|
{
|
|
82
221
|
className: "absolute inset-0 rounded-full animate-pulse-subtle",
|
|
83
|
-
style: { backgroundColor: `
|
|
222
|
+
style: { backgroundColor: `color-mix(in srgb, var(${token}) 50%, transparent)` },
|
|
84
223
|
"aria-hidden": "true"
|
|
85
224
|
}
|
|
86
225
|
),
|
|
@@ -88,7 +227,7 @@ var StatusBadge = React__namespace.forwardRef(
|
|
|
88
227
|
"span",
|
|
89
228
|
{
|
|
90
229
|
className: cn("relative inline-block rounded-full", SIZE_CLASSES[size].dot),
|
|
91
|
-
style: { backgroundColor: `
|
|
230
|
+
style: { backgroundColor: `var(${token})` },
|
|
92
231
|
"aria-hidden": "true"
|
|
93
232
|
}
|
|
94
233
|
)
|
|
@@ -184,9 +323,9 @@ var SocialPlatformBadge = React__namespace.forwardRef(
|
|
|
184
323
|
);
|
|
185
324
|
SocialPlatformBadge.displayName = "SocialPlatformBadge";
|
|
186
325
|
var TREND_CLASSES = {
|
|
187
|
-
up: "text-[
|
|
188
|
-
down: "text-[
|
|
189
|
-
neutral: "text-[
|
|
326
|
+
up: "text-[var(--sentiment-positive)]",
|
|
327
|
+
down: "text-[var(--sentiment-negative)]",
|
|
328
|
+
neutral: "text-[var(--sentiment-neutral)]"
|
|
190
329
|
};
|
|
191
330
|
function resolveTrend(data, trend) {
|
|
192
331
|
if (trend !== "auto") return trend;
|
|
@@ -321,22 +460,22 @@ var LABELS = {
|
|
|
321
460
|
};
|
|
322
461
|
var SEGMENT_STYLES = {
|
|
323
462
|
real: {
|
|
324
|
-
bar: "bg-[
|
|
325
|
-
text: "text-[
|
|
326
|
-
bg: "bg-[
|
|
327
|
-
dot: "bg-[
|
|
463
|
+
bar: "bg-[var(--sentiment-positive)]",
|
|
464
|
+
text: "text-[var(--sentiment-positive)]",
|
|
465
|
+
bg: "bg-[color-mix(in_srgb,var(--sentiment-positive)_12%,transparent)]",
|
|
466
|
+
dot: "bg-[var(--sentiment-positive)]"
|
|
328
467
|
},
|
|
329
468
|
suspicious: {
|
|
330
|
-
bar: "bg-[
|
|
331
|
-
text: "text-[
|
|
332
|
-
bg: "bg-[
|
|
333
|
-
dot: "bg-[
|
|
469
|
+
bar: "bg-[var(--warning-default)]",
|
|
470
|
+
text: "text-[var(--warning-default)]",
|
|
471
|
+
bg: "bg-[color-mix(in_srgb,var(--warning-default)_12%,transparent)]",
|
|
472
|
+
dot: "bg-[var(--warning-default)]"
|
|
334
473
|
},
|
|
335
474
|
bot: {
|
|
336
|
-
bar: "bg-[
|
|
337
|
-
text: "text-[
|
|
338
|
-
bg: "bg-[
|
|
339
|
-
dot: "bg-[
|
|
475
|
+
bar: "bg-[var(--destructive-default)]",
|
|
476
|
+
text: "text-[var(--destructive-default)]",
|
|
477
|
+
bg: "bg-[color-mix(in_srgb,var(--destructive-default)_12%,transparent)]",
|
|
478
|
+
dot: "bg-[var(--destructive-default)]"
|
|
340
479
|
}
|
|
341
480
|
};
|
|
342
481
|
var SEGMENT_ORDER = ["real", "suspicious", "bot"];
|
|
@@ -584,7 +723,7 @@ var PageCard = React__namespace.forwardRef(
|
|
|
584
723
|
{
|
|
585
724
|
style: {
|
|
586
725
|
width: `${contentMix.photo / totalContent * 100}%`,
|
|
587
|
-
backgroundColor: "
|
|
726
|
+
backgroundColor: "var(--chart-1)"
|
|
588
727
|
},
|
|
589
728
|
"aria-label": `photo ${contentMix.photo}`
|
|
590
729
|
}
|
|
@@ -594,7 +733,7 @@ var PageCard = React__namespace.forwardRef(
|
|
|
594
733
|
{
|
|
595
734
|
style: {
|
|
596
735
|
width: `${contentMix.video / totalContent * 100}%`,
|
|
597
|
-
backgroundColor: "
|
|
736
|
+
backgroundColor: "var(--chart-2)"
|
|
598
737
|
},
|
|
599
738
|
"aria-label": `video ${contentMix.video}`
|
|
600
739
|
}
|
|
@@ -604,7 +743,7 @@ var PageCard = React__namespace.forwardRef(
|
|
|
604
743
|
{
|
|
605
744
|
style: {
|
|
606
745
|
width: `${contentMix.carousel / totalContent * 100}%`,
|
|
607
|
-
backgroundColor: "
|
|
746
|
+
backgroundColor: "var(--chart-3)"
|
|
608
747
|
},
|
|
609
748
|
"aria-label": `carousel ${contentMix.carousel}`
|
|
610
749
|
}
|
|
@@ -614,7 +753,7 @@ var PageCard = React__namespace.forwardRef(
|
|
|
614
753
|
{
|
|
615
754
|
style: {
|
|
616
755
|
width: `${contentMix.story / totalContent * 100}%`,
|
|
617
|
-
backgroundColor: "
|
|
756
|
+
backgroundColor: "var(--chart-4)"
|
|
618
757
|
},
|
|
619
758
|
"aria-label": `story ${contentMix.story}`
|
|
620
759
|
}
|
|
@@ -631,5 +770,3 @@ var PageCard = React__namespace.forwardRef(
|
|
|
631
770
|
PageCard.displayName = "PageCard";
|
|
632
771
|
|
|
633
772
|
exports.PageCard = PageCard;
|
|
634
|
-
//# sourceMappingURL=page-card.cjs.map
|
|
635
|
-
//# sourceMappingURL=page-card.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '../../utils-
|
|
2
|
+
import '../../utils-Czyp5Ned.cjs';
|
|
3
3
|
import './social-platform-badge.cjs';
|
|
4
|
-
export { P as PageCard,
|
|
5
|
-
import '../../i18n-
|
|
4
|
+
export { P as PageCard, d as PageCardContentMix, e as PageCardProps } from '../../page-card-DjztZrFM.cjs';
|
|
5
|
+
import '../../i18n-DD3DMY8O.cjs';
|
|
6
6
|
import 'clsx';
|
|
7
7
|
import 'class-variance-authority/types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '../../utils-
|
|
2
|
+
import '../../utils-Czyp5Ned.js';
|
|
3
3
|
import './social-platform-badge.js';
|
|
4
|
-
export { P as PageCard,
|
|
5
|
-
import '../../i18n-
|
|
4
|
+
export { P as PageCard, d as PageCardContentMix, e as PageCardProps } from '../../page-card-sIE4lvnb.js';
|
|
5
|
+
import '../../i18n-UEClNsBy.js';
|
|
6
6
|
import 'clsx';
|
|
7
7
|
import 'class-variance-authority/types';
|
|
@@ -17,11 +17,148 @@ function convertToLocalNumbers(text, locale) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// src/lib/i18n.ts
|
|
20
|
+
var EMOTION_KEYS = [
|
|
21
|
+
"anger",
|
|
22
|
+
"anticipation",
|
|
23
|
+
"joy",
|
|
24
|
+
"trust",
|
|
25
|
+
"fear",
|
|
26
|
+
"surprise",
|
|
27
|
+
"sadness",
|
|
28
|
+
"disgust",
|
|
29
|
+
"neutral"
|
|
30
|
+
];
|
|
31
|
+
var emotionLabels = {
|
|
32
|
+
fa: {
|
|
33
|
+
anger: "\u062E\u0634\u0645",
|
|
34
|
+
anticipation: "\u0627\u0646\u062A\u0638\u0627\u0631",
|
|
35
|
+
joy: "\u0634\u0627\u062F\u06CC",
|
|
36
|
+
trust: "\u0627\u0639\u062A\u0645\u0627\u062F",
|
|
37
|
+
fear: "\u062A\u0631\u0633",
|
|
38
|
+
surprise: "\u0634\u06AF\u0641\u062A\u06CC",
|
|
39
|
+
sadness: "\u063A\u0645",
|
|
40
|
+
disgust: "\u0627\u0646\u0632\u062C\u0627\u0631",
|
|
41
|
+
neutral: "\u062E\u0646\u062B\u06CC"
|
|
42
|
+
},
|
|
43
|
+
ar: {
|
|
44
|
+
anger: "\u063A\u0636\u0628",
|
|
45
|
+
anticipation: "\u062A\u0631\u0642\u0651\u0628",
|
|
46
|
+
joy: "\u0641\u0631\u062D",
|
|
47
|
+
trust: "\u062B\u0642\u0629",
|
|
48
|
+
fear: "\u062E\u0648\u0641",
|
|
49
|
+
surprise: "\u062F\u0647\u0634\u0629",
|
|
50
|
+
sadness: "\u062D\u0632\u0646",
|
|
51
|
+
disgust: "\u0627\u0634\u0645\u0626\u0632\u0627\u0632",
|
|
52
|
+
neutral: "\u0645\u062D\u0627\u064A\u062F"
|
|
53
|
+
},
|
|
54
|
+
en: {
|
|
55
|
+
anger: "Anger",
|
|
56
|
+
anticipation: "Anticipation",
|
|
57
|
+
joy: "Joy",
|
|
58
|
+
trust: "Trust",
|
|
59
|
+
fear: "Fear",
|
|
60
|
+
surprise: "Surprise",
|
|
61
|
+
sadness: "Sadness",
|
|
62
|
+
disgust: "Disgust",
|
|
63
|
+
neutral: "Neutral"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
(() => {
|
|
67
|
+
const map = {};
|
|
68
|
+
for (const key of EMOTION_KEYS) map[key] = key;
|
|
69
|
+
for (const locale of Object.keys(emotionLabels)) {
|
|
70
|
+
for (const key of EMOTION_KEYS) {
|
|
71
|
+
map[emotionLabels[locale][key].toLowerCase()] = key;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return map;
|
|
75
|
+
})();
|
|
76
|
+
var FLOW_KEYS = [
|
|
77
|
+
"pro-gov",
|
|
78
|
+
"internal-critic",
|
|
79
|
+
"internal-opponent",
|
|
80
|
+
"external-opponent",
|
|
81
|
+
"grey"
|
|
82
|
+
];
|
|
83
|
+
var flowLabels = {
|
|
84
|
+
fa: {
|
|
85
|
+
"pro-gov": "\u062D\u0627\u0645\u06CC\u0627\u0646 \u062D\u06A9\u0648\u0645\u062A",
|
|
86
|
+
"internal-critic": "\u0645\u0646\u062A\u0642\u062F\u0627\u0646 \u062F\u0627\u062E\u0644\u06CC",
|
|
87
|
+
"internal-opponent": "\u0645\u062E\u0627\u0644\u0641\u0627\u0646 \u062F\u0627\u062E\u0644\u06CC",
|
|
88
|
+
"external-opponent": "\u0645\u062E\u0627\u0644\u0641\u0627\u0646 \u062E\u0627\u0631\u062C\u06CC",
|
|
89
|
+
grey: "\u0642\u0634\u0631 \u062E\u0627\u06A9\u0633\u062A\u0631\u06CC"
|
|
90
|
+
},
|
|
91
|
+
ar: {
|
|
92
|
+
"pro-gov": "\u0645\u0624\u064A\u062F\u0648 \u0627\u0644\u062D\u0643\u0648\u0645\u0629",
|
|
93
|
+
"internal-critic": "\u0645\u0646\u062A\u0642\u062F\u0648\u0646 \u062F\u0627\u062E\u0644\u064A\u0648\u0646",
|
|
94
|
+
"internal-opponent": "\u0645\u0639\u0627\u0631\u0636\u0648\u0646 \u062F\u0627\u062E\u0644\u064A\u0648\u0646",
|
|
95
|
+
"external-opponent": "\u0645\u0639\u0627\u0631\u0636\u0648\u0646 \u062E\u0627\u0631\u062C\u064A\u0648\u0646",
|
|
96
|
+
grey: "\u0627\u0644\u0641\u0626\u0629 \u0627\u0644\u0631\u0645\u0627\u062F\u064A\u0629"
|
|
97
|
+
},
|
|
98
|
+
en: {
|
|
99
|
+
"pro-gov": "Pro-Government",
|
|
100
|
+
"internal-critic": "Internal Critic",
|
|
101
|
+
"internal-opponent": "Internal Opponent",
|
|
102
|
+
"external-opponent": "External Opponent",
|
|
103
|
+
grey: "Grey"
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
(() => {
|
|
107
|
+
const map = {};
|
|
108
|
+
for (const key of FLOW_KEYS) map[key] = key;
|
|
109
|
+
for (const locale of Object.keys(flowLabels)) {
|
|
110
|
+
for (const key of FLOW_KEYS) {
|
|
111
|
+
map[flowLabels[locale][key].toLowerCase()] = key;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return map;
|
|
115
|
+
})();
|
|
116
|
+
var STATUS_KEYS = ["critical", "warning", "middle", "low"];
|
|
20
117
|
var statusLabels = {
|
|
21
|
-
fa: { critical: "\u0628\u062D\u0631\u0627\u0646\u06CC", warning: "\u0647\u0634\u062F\u0627\u0631",
|
|
22
|
-
ar: { critical: "\u062D\u0631\u062C", warning: "\u062A\u062D\u0630\u064A\u0631",
|
|
23
|
-
en: { critical: "Critical", warning: "Warning",
|
|
118
|
+
fa: { critical: "\u0628\u062D\u0631\u0627\u0646\u06CC", warning: "\u0647\u0634\u062F\u0627\u0631", middle: "\u0645\u062A\u0648\u0633\u0637", low: "\u067E\u0627\u06CC\u06CC\u0646" },
|
|
119
|
+
ar: { critical: "\u062D\u0631\u062C", warning: "\u062A\u062D\u0630\u064A\u0631", middle: "\u0645\u062A\u0648\u0633\u0637", low: "\u0645\u0646\u062E\u0641\u0636" },
|
|
120
|
+
en: { critical: "Critical", warning: "Warning", middle: "Middle", low: "Low" }
|
|
121
|
+
};
|
|
122
|
+
var STATUS_VALUE_MAP = {
|
|
123
|
+
1: "critical",
|
|
124
|
+
2: "warning",
|
|
125
|
+
3: "middle",
|
|
126
|
+
4: "low"
|
|
127
|
+
};
|
|
128
|
+
var STATUS_LABEL_LOOKUP = (() => {
|
|
129
|
+
const map = { normal: "low" };
|
|
130
|
+
for (const key of STATUS_KEYS) map[key] = key;
|
|
131
|
+
for (const locale of Object.keys(statusLabels)) {
|
|
132
|
+
for (const key of STATUS_KEYS) {
|
|
133
|
+
map[statusLabels[locale][key].toLowerCase()] = key;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return map;
|
|
137
|
+
})();
|
|
138
|
+
function resolveStatus(input) {
|
|
139
|
+
if (input == null) return null;
|
|
140
|
+
if (typeof input === "number") return STATUS_VALUE_MAP[input] ?? null;
|
|
141
|
+
const raw = String(input).trim();
|
|
142
|
+
if (raw === "") return null;
|
|
143
|
+
if (/^\d+$/.test(raw)) return STATUS_VALUE_MAP[Number(raw)] ?? null;
|
|
144
|
+
return STATUS_LABEL_LOOKUP[raw.toLowerCase()] ?? null;
|
|
145
|
+
}
|
|
146
|
+
var SEVERITY_KEYS = ["urgent", "high", "medium", "low"];
|
|
147
|
+
var severityLabels = {
|
|
148
|
+
fa: { urgent: "\u0641\u0648\u0631\u06CC", high: "\u0628\u0627\u0644\u0627", medium: "\u0645\u062A\u0648\u0633\u0637", low: "\u067E\u0627\u06CC\u06CC\u0646" },
|
|
149
|
+
ar: { urgent: "\u0639\u0627\u062C\u0644", high: "\u0645\u0631\u062A\u0641\u0639", medium: "\u0645\u062A\u0648\u0633\u0637", low: "\u0645\u0646\u062E\u0641\u0636" },
|
|
150
|
+
en: { urgent: "Urgent", high: "High", medium: "Medium", low: "Low" }
|
|
24
151
|
};
|
|
152
|
+
(() => {
|
|
153
|
+
const map = {};
|
|
154
|
+
for (const key of SEVERITY_KEYS) map[key] = key;
|
|
155
|
+
for (const locale of Object.keys(severityLabels)) {
|
|
156
|
+
for (const key of SEVERITY_KEYS) {
|
|
157
|
+
map[severityLabels[locale][key].toLowerCase()] = key;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return map;
|
|
161
|
+
})();
|
|
25
162
|
var SIZE_CLASSES = {
|
|
26
163
|
sm: { badge: "h-6 text-xs px-2 gap-1.5", dot: "size-1.5" },
|
|
27
164
|
md: { badge: "h-7 text-sm px-2.5 gap-2", dot: "size-2" }
|
|
@@ -31,15 +168,17 @@ function tokenVar(status) {
|
|
|
31
168
|
}
|
|
32
169
|
var StatusBadge = React.forwardRef(
|
|
33
170
|
({ className, status, size = "md", showLabel = true, locale = "fa", animated, ...props }, ref) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const
|
|
171
|
+
const resolved = resolveStatus(status);
|
|
172
|
+
if (!resolved) return null;
|
|
173
|
+
const label = statusLabels[locale]?.[resolved] ?? statusLabels.fa[resolved];
|
|
174
|
+
const shouldPulse = animated ?? resolved === "critical";
|
|
175
|
+
const token = tokenVar(resolved);
|
|
37
176
|
return /* @__PURE__ */ jsxs(
|
|
38
177
|
"span",
|
|
39
178
|
{
|
|
40
179
|
ref,
|
|
41
180
|
"data-slot": "status-badge",
|
|
42
|
-
"data-status":
|
|
181
|
+
"data-status": resolved,
|
|
43
182
|
"aria-label": showLabel ? void 0 : label,
|
|
44
183
|
className: cn(
|
|
45
184
|
"inline-flex items-center rounded-full border font-medium transition-colors duration-150",
|
|
@@ -47,9 +186,9 @@ var StatusBadge = React.forwardRef(
|
|
|
47
186
|
className
|
|
48
187
|
),
|
|
49
188
|
style: {
|
|
50
|
-
backgroundColor: `
|
|
51
|
-
borderColor: `
|
|
52
|
-
color: `
|
|
189
|
+
backgroundColor: `color-mix(in srgb, var(${token}) 10%, transparent)`,
|
|
190
|
+
borderColor: `color-mix(in srgb, var(${token}) 30%, transparent)`,
|
|
191
|
+
color: `var(${token})`
|
|
53
192
|
},
|
|
54
193
|
...props,
|
|
55
194
|
children: [
|
|
@@ -58,7 +197,7 @@ var StatusBadge = React.forwardRef(
|
|
|
58
197
|
"span",
|
|
59
198
|
{
|
|
60
199
|
className: "absolute inset-0 rounded-full animate-pulse-subtle",
|
|
61
|
-
style: { backgroundColor: `
|
|
200
|
+
style: { backgroundColor: `color-mix(in srgb, var(${token}) 50%, transparent)` },
|
|
62
201
|
"aria-hidden": "true"
|
|
63
202
|
}
|
|
64
203
|
),
|
|
@@ -66,7 +205,7 @@ var StatusBadge = React.forwardRef(
|
|
|
66
205
|
"span",
|
|
67
206
|
{
|
|
68
207
|
className: cn("relative inline-block rounded-full", SIZE_CLASSES[size].dot),
|
|
69
|
-
style: { backgroundColor: `
|
|
208
|
+
style: { backgroundColor: `var(${token})` },
|
|
70
209
|
"aria-hidden": "true"
|
|
71
210
|
}
|
|
72
211
|
)
|
|
@@ -162,9 +301,9 @@ var SocialPlatformBadge = React.forwardRef(
|
|
|
162
301
|
);
|
|
163
302
|
SocialPlatformBadge.displayName = "SocialPlatformBadge";
|
|
164
303
|
var TREND_CLASSES = {
|
|
165
|
-
up: "text-[
|
|
166
|
-
down: "text-[
|
|
167
|
-
neutral: "text-[
|
|
304
|
+
up: "text-[var(--sentiment-positive)]",
|
|
305
|
+
down: "text-[var(--sentiment-negative)]",
|
|
306
|
+
neutral: "text-[var(--sentiment-neutral)]"
|
|
168
307
|
};
|
|
169
308
|
function resolveTrend(data, trend) {
|
|
170
309
|
if (trend !== "auto") return trend;
|
|
@@ -299,22 +438,22 @@ var LABELS = {
|
|
|
299
438
|
};
|
|
300
439
|
var SEGMENT_STYLES = {
|
|
301
440
|
real: {
|
|
302
|
-
bar: "bg-[
|
|
303
|
-
text: "text-[
|
|
304
|
-
bg: "bg-[
|
|
305
|
-
dot: "bg-[
|
|
441
|
+
bar: "bg-[var(--sentiment-positive)]",
|
|
442
|
+
text: "text-[var(--sentiment-positive)]",
|
|
443
|
+
bg: "bg-[color-mix(in_srgb,var(--sentiment-positive)_12%,transparent)]",
|
|
444
|
+
dot: "bg-[var(--sentiment-positive)]"
|
|
306
445
|
},
|
|
307
446
|
suspicious: {
|
|
308
|
-
bar: "bg-[
|
|
309
|
-
text: "text-[
|
|
310
|
-
bg: "bg-[
|
|
311
|
-
dot: "bg-[
|
|
447
|
+
bar: "bg-[var(--warning-default)]",
|
|
448
|
+
text: "text-[var(--warning-default)]",
|
|
449
|
+
bg: "bg-[color-mix(in_srgb,var(--warning-default)_12%,transparent)]",
|
|
450
|
+
dot: "bg-[var(--warning-default)]"
|
|
312
451
|
},
|
|
313
452
|
bot: {
|
|
314
|
-
bar: "bg-[
|
|
315
|
-
text: "text-[
|
|
316
|
-
bg: "bg-[
|
|
317
|
-
dot: "bg-[
|
|
453
|
+
bar: "bg-[var(--destructive-default)]",
|
|
454
|
+
text: "text-[var(--destructive-default)]",
|
|
455
|
+
bg: "bg-[color-mix(in_srgb,var(--destructive-default)_12%,transparent)]",
|
|
456
|
+
dot: "bg-[var(--destructive-default)]"
|
|
318
457
|
}
|
|
319
458
|
};
|
|
320
459
|
var SEGMENT_ORDER = ["real", "suspicious", "bot"];
|
|
@@ -562,7 +701,7 @@ var PageCard = React.forwardRef(
|
|
|
562
701
|
{
|
|
563
702
|
style: {
|
|
564
703
|
width: `${contentMix.photo / totalContent * 100}%`,
|
|
565
|
-
backgroundColor: "
|
|
704
|
+
backgroundColor: "var(--chart-1)"
|
|
566
705
|
},
|
|
567
706
|
"aria-label": `photo ${contentMix.photo}`
|
|
568
707
|
}
|
|
@@ -572,7 +711,7 @@ var PageCard = React.forwardRef(
|
|
|
572
711
|
{
|
|
573
712
|
style: {
|
|
574
713
|
width: `${contentMix.video / totalContent * 100}%`,
|
|
575
|
-
backgroundColor: "
|
|
714
|
+
backgroundColor: "var(--chart-2)"
|
|
576
715
|
},
|
|
577
716
|
"aria-label": `video ${contentMix.video}`
|
|
578
717
|
}
|
|
@@ -582,7 +721,7 @@ var PageCard = React.forwardRef(
|
|
|
582
721
|
{
|
|
583
722
|
style: {
|
|
584
723
|
width: `${contentMix.carousel / totalContent * 100}%`,
|
|
585
|
-
backgroundColor: "
|
|
724
|
+
backgroundColor: "var(--chart-3)"
|
|
586
725
|
},
|
|
587
726
|
"aria-label": `carousel ${contentMix.carousel}`
|
|
588
727
|
}
|
|
@@ -592,7 +731,7 @@ var PageCard = React.forwardRef(
|
|
|
592
731
|
{
|
|
593
732
|
style: {
|
|
594
733
|
width: `${contentMix.story / totalContent * 100}%`,
|
|
595
|
-
backgroundColor: "
|
|
734
|
+
backgroundColor: "var(--chart-4)"
|
|
596
735
|
},
|
|
597
736
|
"aria-label": `story ${contentMix.story}`
|
|
598
737
|
}
|
|
@@ -609,5 +748,3 @@ var PageCard = React.forwardRef(
|
|
|
609
748
|
PageCard.displayName = "PageCard";
|
|
610
749
|
|
|
611
750
|
export { PageCard };
|
|
612
|
-
//# sourceMappingURL=page-card.js.map
|
|
613
|
-
//# sourceMappingURL=page-card.js.map
|