@parto-system-design/ui 1.1.17 → 1.1.19
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 +1244 -1173
- package/dist/index.css +8010 -5459
- package/dist/index.d.cts +213 -992
- package/dist/index.d.ts +213 -992
- package/dist/index.js +1210 -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
|
@@ -41,6 +41,62 @@ function convertToLocalNumbers(text, locale) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
// src/lib/i18n.ts
|
|
44
|
+
var EMOTION_KEYS = [
|
|
45
|
+
"anger",
|
|
46
|
+
"anticipation",
|
|
47
|
+
"joy",
|
|
48
|
+
"trust",
|
|
49
|
+
"fear",
|
|
50
|
+
"surprise",
|
|
51
|
+
"sadness",
|
|
52
|
+
"disgust",
|
|
53
|
+
"neutral"
|
|
54
|
+
];
|
|
55
|
+
var emotionLabels = {
|
|
56
|
+
fa: {
|
|
57
|
+
anger: "\u062E\u0634\u0645",
|
|
58
|
+
anticipation: "\u0627\u0646\u062A\u0638\u0627\u0631",
|
|
59
|
+
joy: "\u0634\u0627\u062F\u06CC",
|
|
60
|
+
trust: "\u0627\u0639\u062A\u0645\u0627\u062F",
|
|
61
|
+
fear: "\u062A\u0631\u0633",
|
|
62
|
+
surprise: "\u0634\u06AF\u0641\u062A\u06CC",
|
|
63
|
+
sadness: "\u063A\u0645",
|
|
64
|
+
disgust: "\u0627\u0646\u0632\u062C\u0627\u0631",
|
|
65
|
+
neutral: "\u062E\u0646\u062B\u06CC"
|
|
66
|
+
},
|
|
67
|
+
ar: {
|
|
68
|
+
anger: "\u063A\u0636\u0628",
|
|
69
|
+
anticipation: "\u062A\u0631\u0642\u0651\u0628",
|
|
70
|
+
joy: "\u0641\u0631\u062D",
|
|
71
|
+
trust: "\u062B\u0642\u0629",
|
|
72
|
+
fear: "\u062E\u0648\u0641",
|
|
73
|
+
surprise: "\u062F\u0647\u0634\u0629",
|
|
74
|
+
sadness: "\u062D\u0632\u0646",
|
|
75
|
+
disgust: "\u0627\u0634\u0645\u0626\u0632\u0627\u0632",
|
|
76
|
+
neutral: "\u0645\u062D\u0627\u064A\u062F"
|
|
77
|
+
},
|
|
78
|
+
en: {
|
|
79
|
+
anger: "Anger",
|
|
80
|
+
anticipation: "Anticipation",
|
|
81
|
+
joy: "Joy",
|
|
82
|
+
trust: "Trust",
|
|
83
|
+
fear: "Fear",
|
|
84
|
+
surprise: "Surprise",
|
|
85
|
+
sadness: "Sadness",
|
|
86
|
+
disgust: "Disgust",
|
|
87
|
+
neutral: "Neutral"
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
(() => {
|
|
91
|
+
const map = {};
|
|
92
|
+
for (const key of EMOTION_KEYS) map[key] = key;
|
|
93
|
+
for (const locale of Object.keys(emotionLabels)) {
|
|
94
|
+
for (const key of EMOTION_KEYS) {
|
|
95
|
+
map[emotionLabels[locale][key].toLowerCase()] = key;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return map;
|
|
99
|
+
})();
|
|
44
100
|
var FLOW_KEYS = [
|
|
45
101
|
"pro-gov",
|
|
46
102
|
"internal-critic",
|
|
@@ -50,37 +106,97 @@ var FLOW_KEYS = [
|
|
|
50
106
|
];
|
|
51
107
|
var flowLabels = {
|
|
52
108
|
fa: {
|
|
53
|
-
"pro-gov": "\u062D\u0627\u0645\u06CC",
|
|
54
|
-
"internal-critic": "\u0645\u0646\u062A\u0642\u062F \
|
|
55
|
-
"internal-opponent": "\u0645\u062E\u0627\u0644\u0641",
|
|
56
|
-
"external-opponent": "\u0645\u062E\u0627\u0644\u0641 \u062C\
|
|
57
|
-
grey: "\u062E\
|
|
109
|
+
"pro-gov": "\u062D\u0627\u0645\u06CC\u0627\u0646 \u062D\u06A9\u0648\u0645\u062A",
|
|
110
|
+
"internal-critic": "\u0645\u0646\u062A\u0642\u062F\u0627\u0646 \u062F\u0627\u062E\u0644\u06CC",
|
|
111
|
+
"internal-opponent": "\u0645\u062E\u0627\u0644\u0641\u0627\u0646 \u062F\u0627\u062E\u0644\u06CC",
|
|
112
|
+
"external-opponent": "\u0645\u062E\u0627\u0644\u0641\u0627\u0646 \u062E\u0627\u0631\u062C\u06CC",
|
|
113
|
+
grey: "\u0642\u0634\u0631 \u062E\u0627\u06A9\u0633\u062A\u0631\u06CC"
|
|
58
114
|
},
|
|
59
115
|
ar: {
|
|
60
|
-
"pro-gov": "\u0645\u0624\u064A\u062F",
|
|
61
|
-
"internal-critic": "\u0645\u0646\u062A\u0642\u062F
|
|
62
|
-
"internal-opponent": "\u0645\u0639\u0627\u0631\u0636",
|
|
63
|
-
"external-opponent": "\u0645\u0639\u0627\u0631\u0636 \
|
|
64
|
-
grey: "\
|
|
116
|
+
"pro-gov": "\u0645\u0624\u064A\u062F\u0648 \u0627\u0644\u062D\u0643\u0648\u0645\u0629",
|
|
117
|
+
"internal-critic": "\u0645\u0646\u062A\u0642\u062F\u0648\u0646 \u062F\u0627\u062E\u0644\u064A\u0648\u0646",
|
|
118
|
+
"internal-opponent": "\u0645\u0639\u0627\u0631\u0636\u0648\u0646 \u062F\u0627\u062E\u0644\u064A\u0648\u0646",
|
|
119
|
+
"external-opponent": "\u0645\u0639\u0627\u0631\u0636\u0648\u0646 \u062E\u0627\u0631\u062C\u064A\u0648\u0646",
|
|
120
|
+
grey: "\u0627\u0644\u0641\u0626\u0629 \u0627\u0644\u0631\u0645\u0627\u062F\u064A\u0629"
|
|
65
121
|
},
|
|
66
122
|
en: {
|
|
67
|
-
"pro-gov": "
|
|
68
|
-
"internal-critic": "
|
|
69
|
-
"internal-opponent": "
|
|
70
|
-
"external-opponent": "
|
|
71
|
-
grey: "
|
|
123
|
+
"pro-gov": "Pro-Government",
|
|
124
|
+
"internal-critic": "Internal Critic",
|
|
125
|
+
"internal-opponent": "Internal Opponent",
|
|
126
|
+
"external-opponent": "External Opponent",
|
|
127
|
+
grey: "Grey"
|
|
72
128
|
}
|
|
73
129
|
};
|
|
130
|
+
(() => {
|
|
131
|
+
const map = {};
|
|
132
|
+
for (const key of FLOW_KEYS) map[key] = key;
|
|
133
|
+
for (const locale of Object.keys(flowLabels)) {
|
|
134
|
+
for (const key of FLOW_KEYS) {
|
|
135
|
+
map[flowLabels[locale][key].toLowerCase()] = key;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return map;
|
|
139
|
+
})();
|
|
140
|
+
var STATUS_KEYS = ["critical", "warning", "middle", "low"];
|
|
74
141
|
var statusLabels = {
|
|
75
|
-
fa: { critical: "\u0628\u062D\u0631\u0627\u0646\u06CC", warning: "\u0647\u0634\u062F\u0627\u0631",
|
|
76
|
-
ar: { critical: "\u062D\u0631\u062C", warning: "\u062A\u062D\u0630\u064A\u0631",
|
|
77
|
-
en: { critical: "Critical", warning: "Warning",
|
|
142
|
+
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" },
|
|
143
|
+
ar: { critical: "\u062D\u0631\u062C", warning: "\u062A\u062D\u0630\u064A\u0631", middle: "\u0645\u062A\u0648\u0633\u0637", low: "\u0645\u0646\u062E\u0641\u0636" },
|
|
144
|
+
en: { critical: "Critical", warning: "Warning", middle: "Middle", low: "Low" }
|
|
145
|
+
};
|
|
146
|
+
var STATUS_VALUE_MAP = {
|
|
147
|
+
1: "critical",
|
|
148
|
+
2: "warning",
|
|
149
|
+
3: "middle",
|
|
150
|
+
4: "low"
|
|
78
151
|
};
|
|
152
|
+
var STATUS_LABEL_LOOKUP = (() => {
|
|
153
|
+
const map = { normal: "low" };
|
|
154
|
+
for (const key of STATUS_KEYS) map[key] = key;
|
|
155
|
+
for (const locale of Object.keys(statusLabels)) {
|
|
156
|
+
for (const key of STATUS_KEYS) {
|
|
157
|
+
map[statusLabels[locale][key].toLowerCase()] = key;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return map;
|
|
161
|
+
})();
|
|
162
|
+
function resolveStatus(input) {
|
|
163
|
+
if (input == null) return null;
|
|
164
|
+
if (typeof input === "number") return STATUS_VALUE_MAP[input] ?? null;
|
|
165
|
+
const raw = String(input).trim();
|
|
166
|
+
if (raw === "") return null;
|
|
167
|
+
if (/^\d+$/.test(raw)) return STATUS_VALUE_MAP[Number(raw)] ?? null;
|
|
168
|
+
return STATUS_LABEL_LOOKUP[raw.toLowerCase()] ?? null;
|
|
169
|
+
}
|
|
170
|
+
var SEVERITY_KEYS = ["urgent", "high", "medium", "low"];
|
|
79
171
|
var severityLabels = {
|
|
80
172
|
fa: { urgent: "\u0641\u0648\u0631\u06CC", high: "\u0628\u0627\u0644\u0627", medium: "\u0645\u062A\u0648\u0633\u0637", low: "\u067E\u0627\u06CC\u06CC\u0646" },
|
|
81
173
|
ar: { urgent: "\u0639\u0627\u062C\u0644", high: "\u0645\u0631\u062A\u0641\u0639", medium: "\u0645\u062A\u0648\u0633\u0637", low: "\u0645\u0646\u062E\u0641\u0636" },
|
|
82
174
|
en: { urgent: "Urgent", high: "High", medium: "Medium", low: "Low" }
|
|
83
175
|
};
|
|
176
|
+
var SEVERITY_VALUE_MAP = {
|
|
177
|
+
1: "urgent",
|
|
178
|
+
2: "high",
|
|
179
|
+
3: "medium",
|
|
180
|
+
4: "low"
|
|
181
|
+
};
|
|
182
|
+
var SEVERITY_LABEL_LOOKUP = (() => {
|
|
183
|
+
const map = {};
|
|
184
|
+
for (const key of SEVERITY_KEYS) map[key] = key;
|
|
185
|
+
for (const locale of Object.keys(severityLabels)) {
|
|
186
|
+
for (const key of SEVERITY_KEYS) {
|
|
187
|
+
map[severityLabels[locale][key].toLowerCase()] = key;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return map;
|
|
191
|
+
})();
|
|
192
|
+
function resolveSeverity(input) {
|
|
193
|
+
if (input == null) return null;
|
|
194
|
+
if (typeof input === "number") return SEVERITY_VALUE_MAP[input] ?? null;
|
|
195
|
+
const raw = String(input).trim();
|
|
196
|
+
if (raw === "") return null;
|
|
197
|
+
if (/^\d+$/.test(raw)) return SEVERITY_VALUE_MAP[Number(raw)] ?? null;
|
|
198
|
+
return SEVERITY_LABEL_LOOKUP[raw.toLowerCase()] ?? null;
|
|
199
|
+
}
|
|
84
200
|
var SIZE_CLASSES = {
|
|
85
201
|
sm: { badge: "h-6 text-xs px-2 gap-1.5", dot: "size-1.5" },
|
|
86
202
|
md: { badge: "h-7 text-sm px-2.5 gap-2", dot: "size-2" }
|
|
@@ -90,15 +206,17 @@ function tokenVar(status) {
|
|
|
90
206
|
}
|
|
91
207
|
var StatusBadge = React__namespace.forwardRef(
|
|
92
208
|
({ className, status, size = "md", showLabel = true, locale = "fa", animated, ...props }, ref) => {
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
const
|
|
209
|
+
const resolved = resolveStatus(status);
|
|
210
|
+
if (!resolved) return null;
|
|
211
|
+
const label = statusLabels[locale]?.[resolved] ?? statusLabels.fa[resolved];
|
|
212
|
+
const shouldPulse = animated ?? resolved === "critical";
|
|
213
|
+
const token = tokenVar(resolved);
|
|
96
214
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
97
215
|
"span",
|
|
98
216
|
{
|
|
99
217
|
ref,
|
|
100
218
|
"data-slot": "status-badge",
|
|
101
|
-
"data-status":
|
|
219
|
+
"data-status": resolved,
|
|
102
220
|
"aria-label": showLabel ? void 0 : label,
|
|
103
221
|
className: cn(
|
|
104
222
|
"inline-flex items-center rounded-full border font-medium transition-colors duration-150",
|
|
@@ -106,9 +224,9 @@ var StatusBadge = React__namespace.forwardRef(
|
|
|
106
224
|
className
|
|
107
225
|
),
|
|
108
226
|
style: {
|
|
109
|
-
backgroundColor: `
|
|
110
|
-
borderColor: `
|
|
111
|
-
color: `
|
|
227
|
+
backgroundColor: `color-mix(in srgb, var(${token}) 10%, transparent)`,
|
|
228
|
+
borderColor: `color-mix(in srgb, var(${token}) 30%, transparent)`,
|
|
229
|
+
color: `var(${token})`
|
|
112
230
|
},
|
|
113
231
|
...props,
|
|
114
232
|
children: [
|
|
@@ -117,7 +235,7 @@ var StatusBadge = React__namespace.forwardRef(
|
|
|
117
235
|
"span",
|
|
118
236
|
{
|
|
119
237
|
className: "absolute inset-0 rounded-full animate-pulse-subtle",
|
|
120
|
-
style: { backgroundColor: `
|
|
238
|
+
style: { backgroundColor: `color-mix(in srgb, var(${token}) 50%, transparent)` },
|
|
121
239
|
"aria-hidden": "true"
|
|
122
240
|
}
|
|
123
241
|
),
|
|
@@ -125,7 +243,7 @@ var StatusBadge = React__namespace.forwardRef(
|
|
|
125
243
|
"span",
|
|
126
244
|
{
|
|
127
245
|
className: cn("relative inline-block rounded-full", SIZE_CLASSES[size].dot),
|
|
128
|
-
style: { backgroundColor: `
|
|
246
|
+
style: { backgroundColor: `var(${token})` },
|
|
129
247
|
"aria-hidden": "true"
|
|
130
248
|
}
|
|
131
249
|
)
|
|
@@ -152,25 +270,27 @@ function tokenVar2(severity) {
|
|
|
152
270
|
}
|
|
153
271
|
var SeverityBadge = React__namespace.forwardRef(
|
|
154
272
|
({ className, severity, size = "md", showLabel = true, variant = "soft", locale = "fa", ...props }, ref) => {
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
const
|
|
273
|
+
const resolved = resolveSeverity(severity);
|
|
274
|
+
if (!resolved) return null;
|
|
275
|
+
const label = severityLabels[locale]?.[resolved] ?? severityLabels.fa[resolved];
|
|
276
|
+
const Icon = SEVERITY_ICON[resolved];
|
|
277
|
+
const token = tokenVar2(resolved);
|
|
158
278
|
const softStyle = {
|
|
159
|
-
backgroundColor: `
|
|
160
|
-
borderColor: `
|
|
161
|
-
color: `
|
|
279
|
+
backgroundColor: `color-mix(in srgb, var(${token}) 10%, transparent)`,
|
|
280
|
+
borderColor: `color-mix(in srgb, var(${token}) 30%, transparent)`,
|
|
281
|
+
color: `var(${token})`
|
|
162
282
|
};
|
|
163
283
|
const solidStyle = {
|
|
164
|
-
backgroundColor: `
|
|
165
|
-
borderColor: `
|
|
166
|
-
color: "
|
|
284
|
+
backgroundColor: `var(${token})`,
|
|
285
|
+
borderColor: `var(${token})`,
|
|
286
|
+
color: "var(--foreground-contrast)"
|
|
167
287
|
};
|
|
168
288
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
169
289
|
"span",
|
|
170
290
|
{
|
|
171
291
|
ref,
|
|
172
292
|
"data-slot": "severity-badge",
|
|
173
|
-
"data-severity":
|
|
293
|
+
"data-severity": resolved,
|
|
174
294
|
"data-variant": variant,
|
|
175
295
|
"aria-label": showLabel ? void 0 : label,
|
|
176
296
|
className: cn(
|
|
@@ -242,7 +362,7 @@ var FlowDistribution = React__namespace.forwardRef(
|
|
|
242
362
|
"div",
|
|
243
363
|
{
|
|
244
364
|
className: "transition-all duration-500",
|
|
245
|
-
style: { width: `${percents[k]}%`, backgroundColor: `
|
|
365
|
+
style: { width: `${percents[k]}%`, backgroundColor: `var(${tokenVar3(k)})` }
|
|
246
366
|
},
|
|
247
367
|
k
|
|
248
368
|
)) }),
|
|
@@ -251,11 +371,11 @@ var FlowDistribution = React__namespace.forwardRef(
|
|
|
251
371
|
"span",
|
|
252
372
|
{
|
|
253
373
|
className: "inline-block h-2 w-2 rounded-full",
|
|
254
|
-
style: { backgroundColor: `
|
|
374
|
+
style: { backgroundColor: `var(${tokenVar3(k)})` }
|
|
255
375
|
}
|
|
256
376
|
),
|
|
257
377
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-foreground-light", children: labels[k] }),
|
|
258
|
-
showPercent && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium tabular-nums", style: { color: `
|
|
378
|
+
showPercent && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium tabular-nums", style: { color: `var(${tokenVar3(k)})` }, children: [
|
|
259
379
|
convertToLocalNumbers(percents[k], locale),
|
|
260
380
|
percentSign
|
|
261
381
|
] }),
|
|
@@ -281,8 +401,8 @@ var FlowDistribution = React__namespace.forwardRef(
|
|
|
281
401
|
{
|
|
282
402
|
className: "inline-flex items-center gap-1 rounded-full px-2 py-0.5",
|
|
283
403
|
style: {
|
|
284
|
-
backgroundColor: `
|
|
285
|
-
color: `
|
|
404
|
+
backgroundColor: `color-mix(in srgb, var(${tokenVar3(k)}) 12%, transparent)`,
|
|
405
|
+
color: `var(${tokenVar3(k)})`
|
|
286
406
|
},
|
|
287
407
|
children: [
|
|
288
408
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium", children: labels[k] }),
|
|
@@ -311,7 +431,7 @@ var FlowDistribution = React__namespace.forwardRef(
|
|
|
311
431
|
className: "absolute inset-y-0 start-0 rounded-full transition-all duration-500",
|
|
312
432
|
style: {
|
|
313
433
|
width: `${percents[k]}%`,
|
|
314
|
-
backgroundColor: `
|
|
434
|
+
backgroundColor: `var(${tokenVar3(k)})`
|
|
315
435
|
},
|
|
316
436
|
role: "progressbar",
|
|
317
437
|
"aria-valuenow": percents[k],
|
|
@@ -324,7 +444,7 @@ var FlowDistribution = React__namespace.forwardRef(
|
|
|
324
444
|
"span",
|
|
325
445
|
{
|
|
326
446
|
className: "w-12 shrink-0 text-xs font-medium tabular-nums text-start",
|
|
327
|
-
style: { color: `
|
|
447
|
+
style: { color: `var(${tokenVar3(k)})` },
|
|
328
448
|
children: showCounts ? convertToLocalNumbers((data[k] ?? 0).toLocaleString(), locale) : `${convertToLocalNumbers(percents[k], locale)}${percentSign}`
|
|
329
449
|
}
|
|
330
450
|
)
|
|
@@ -339,24 +459,24 @@ var LABELS = {
|
|
|
339
459
|
};
|
|
340
460
|
var SENTIMENT_STYLES = {
|
|
341
461
|
positive: {
|
|
342
|
-
bar: "bg-[
|
|
343
|
-
text: "text-[
|
|
344
|
-
bg: "bg-[
|
|
462
|
+
bar: "bg-[var(--sentiment-positive)]",
|
|
463
|
+
text: "text-[var(--sentiment-positive)]",
|
|
464
|
+
bg: "bg-[color-mix(in_srgb,var(--sentiment-positive)_12%,transparent)]"
|
|
345
465
|
},
|
|
346
466
|
negative: {
|
|
347
|
-
bar: "bg-[
|
|
348
|
-
text: "text-[
|
|
349
|
-
bg: "bg-[
|
|
467
|
+
bar: "bg-[var(--sentiment-negative)]",
|
|
468
|
+
text: "text-[var(--sentiment-negative)]",
|
|
469
|
+
bg: "bg-[color-mix(in_srgb,var(--sentiment-negative)_12%,transparent)]"
|
|
350
470
|
},
|
|
351
471
|
neutral: {
|
|
352
|
-
bar: "bg-[
|
|
353
|
-
text: "text-[
|
|
354
|
-
bg: "bg-[
|
|
472
|
+
bar: "bg-[var(--sentiment-neutral)]",
|
|
473
|
+
text: "text-[var(--sentiment-neutral)]",
|
|
474
|
+
bg: "bg-[color-mix(in_srgb,var(--sentiment-neutral)_12%,transparent)]"
|
|
355
475
|
},
|
|
356
476
|
mixed: {
|
|
357
|
-
bar: "bg-[
|
|
358
|
-
text: "text-[
|
|
359
|
-
bg: "bg-[
|
|
477
|
+
bar: "bg-[var(--sentiment-mixed)]",
|
|
478
|
+
text: "text-[var(--sentiment-mixed)]",
|
|
479
|
+
bg: "bg-[color-mix(in_srgb,var(--sentiment-mixed)_12%,transparent)]"
|
|
360
480
|
}
|
|
361
481
|
};
|
|
362
482
|
function calcPercents2(data) {
|
|
@@ -486,9 +606,9 @@ var SentimentDistribution = React__namespace.forwardRef(
|
|
|
486
606
|
);
|
|
487
607
|
SentimentDistribution.displayName = "SentimentDistribution";
|
|
488
608
|
var TREND_CLASSES = {
|
|
489
|
-
up: "text-[
|
|
490
|
-
down: "text-[
|
|
491
|
-
neutral: "text-[
|
|
609
|
+
up: "text-[var(--sentiment-positive)]",
|
|
610
|
+
down: "text-[var(--sentiment-negative)]",
|
|
611
|
+
neutral: "text-[var(--sentiment-neutral)]"
|
|
492
612
|
};
|
|
493
613
|
function resolveTrend(data, trend) {
|
|
494
614
|
if (trend !== "auto") return trend;
|
|
@@ -731,5 +851,3 @@ var ConceptCard = React__namespace.forwardRef(
|
|
|
731
851
|
ConceptCard.displayName = "ConceptCard";
|
|
732
852
|
|
|
733
853
|
exports.ConceptCard = ConceptCard;
|
|
734
|
-
//# sourceMappingURL=concept-card.cjs.map
|
|
735
|
-
//# sourceMappingURL=concept-card.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '../../utils-
|
|
3
|
-
export { C as ConceptCard, a as ConceptCardProps } from '../../concept-card-
|
|
4
|
-
import '../../i18n-
|
|
2
|
+
import '../../utils-Czyp5Ned.cjs';
|
|
3
|
+
export { C as ConceptCard, a as ConceptCardProps } from '../../concept-card-BU8JL-gj.cjs';
|
|
4
|
+
import '../../i18n-DD3DMY8O.cjs';
|
|
5
5
|
import 'clsx';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '../../utils-
|
|
3
|
-
export { C as ConceptCard, a as ConceptCardProps } from '../../concept-card-
|
|
4
|
-
import '../../i18n-
|
|
2
|
+
import '../../utils-Czyp5Ned.js';
|
|
3
|
+
export { C as ConceptCard, a as ConceptCardProps } from '../../concept-card-D7PfDkNR.js';
|
|
4
|
+
import '../../i18n-UEClNsBy.js';
|
|
5
5
|
import 'clsx';
|