@parto-system-design/ui 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +579 -388
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +372 -19
- package/dist/index.d.cts +29 -28
- package/dist/index.d.ts +29 -28
- package/dist/index.js +595 -405
- package/dist/index.js.map +1 -1
- package/package.json +4 -21
- package/tailwind.config.ts +297 -13
package/dist/index.js
CHANGED
|
@@ -1,11 +1,95 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
// src/lib/utils.ts
|
|
4
2
|
import { clsx } from "clsx";
|
|
5
3
|
import { twMerge } from "tailwind-merge";
|
|
4
|
+
function cn(...inputs) {
|
|
5
|
+
return twMerge(clsx(inputs));
|
|
6
|
+
}
|
|
7
|
+
function formatNumber(num, format3 = "exact") {
|
|
8
|
+
if (num === void 0 || num === null) return "0";
|
|
9
|
+
if (format3 === "exact") {
|
|
10
|
+
return num.toLocaleString("en-US");
|
|
11
|
+
}
|
|
12
|
+
if (num >= 1e9) {
|
|
13
|
+
return `${(num / 1e9).toFixed(1).replace(/\.0$/, "")}B`;
|
|
14
|
+
}
|
|
15
|
+
if (num >= 1e6) {
|
|
16
|
+
return `${(num / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
17
|
+
}
|
|
18
|
+
if (num >= 1e3) {
|
|
19
|
+
return `${(num / 1e3).toFixed(1).replace(/\.0$/, "")}K`;
|
|
20
|
+
}
|
|
21
|
+
return num.toString();
|
|
22
|
+
}
|
|
23
|
+
function formatRelativeTime(date) {
|
|
24
|
+
const now = /* @__PURE__ */ new Date();
|
|
25
|
+
const then = new Date(date);
|
|
26
|
+
const diffInSeconds = Math.floor((now.getTime() - then.getTime()) / 1e3);
|
|
27
|
+
const toPersianDigits2 = (num) => {
|
|
28
|
+
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
29
|
+
return num.toString().replace(/\d/g, (digit) => persianDigits[parseInt(digit)]);
|
|
30
|
+
};
|
|
31
|
+
if (diffInSeconds < 60) {
|
|
32
|
+
return "\u0647\u0645\u06CC\u0646 \u0627\u0644\u0627\u0646";
|
|
33
|
+
}
|
|
34
|
+
const diffInMinutes = Math.floor(diffInSeconds / 60);
|
|
35
|
+
if (diffInMinutes < 60) {
|
|
36
|
+
return `${toPersianDigits2(diffInMinutes)} \u062F\u0642\u06CC\u0642\u0647 \u067E\u06CC\u0634`;
|
|
37
|
+
}
|
|
38
|
+
const diffInHours = Math.floor(diffInMinutes / 60);
|
|
39
|
+
if (diffInHours < 24) {
|
|
40
|
+
return `${toPersianDigits2(diffInHours)} \u0633\u0627\u0639\u062A \u067E\u06CC\u0634`;
|
|
41
|
+
}
|
|
42
|
+
const diffInDays = Math.floor(diffInHours / 24);
|
|
43
|
+
if (diffInDays < 7) {
|
|
44
|
+
return `${toPersianDigits2(diffInDays)} \u0631\u0648\u0632 \u067E\u06CC\u0634`;
|
|
45
|
+
}
|
|
46
|
+
const diffInWeeks = Math.floor(diffInDays / 7);
|
|
47
|
+
if (diffInWeeks < 4) {
|
|
48
|
+
return `${toPersianDigits2(diffInWeeks)} \u0647\u0641\u062A\u0647 \u067E\u06CC\u0634`;
|
|
49
|
+
}
|
|
50
|
+
const diffInMonths = Math.floor(diffInDays / 30);
|
|
51
|
+
if (diffInMonths < 12) {
|
|
52
|
+
return `${toPersianDigits2(diffInMonths)} \u0645\u0627\u0647 \u067E\u06CC\u0634`;
|
|
53
|
+
}
|
|
54
|
+
const diffInYears = Math.floor(diffInDays / 365);
|
|
55
|
+
return `${toPersianDigits2(diffInYears)} \u0633\u0627\u0644 \u067E\u06CC\u0634`;
|
|
56
|
+
}
|
|
57
|
+
function formatAbsoluteTime(date) {
|
|
58
|
+
const d = new Date(date);
|
|
59
|
+
const toPersianDigits2 = (num) => {
|
|
60
|
+
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
61
|
+
return num.toString().replace(/\d/g, (digit) => persianDigits[parseInt(digit)]);
|
|
62
|
+
};
|
|
63
|
+
const persianMonths = [
|
|
64
|
+
"\u0641\u0631\u0648\u0631\u062F\u06CC\u0646",
|
|
65
|
+
"\u0627\u0631\u062F\u06CC\u0628\u0647\u0634\u062A",
|
|
66
|
+
"\u062E\u0631\u062F\u0627\u062F",
|
|
67
|
+
"\u062A\u06CC\u0631",
|
|
68
|
+
"\u0645\u0631\u062F\u0627\u062F",
|
|
69
|
+
"\u0634\u0647\u0631\u06CC\u0648\u0631",
|
|
70
|
+
"\u0645\u0647\u0631",
|
|
71
|
+
"\u0622\u0628\u0627\u0646",
|
|
72
|
+
"\u0622\u0630\u0631",
|
|
73
|
+
"\u062F\u06CC",
|
|
74
|
+
"\u0628\u0647\u0645\u0646",
|
|
75
|
+
"\u0627\u0633\u0641\u0646\u062F"
|
|
76
|
+
];
|
|
77
|
+
const year = d.getFullYear();
|
|
78
|
+
const month = d.getMonth();
|
|
79
|
+
const day = d.getDate();
|
|
80
|
+
const hours = d.getHours();
|
|
81
|
+
const minutes = d.getMinutes();
|
|
82
|
+
const persianYear = year - 621;
|
|
83
|
+
const persianMonth = persianMonths[month];
|
|
84
|
+
const persianDay = toPersianDigits2(day);
|
|
85
|
+
const persianHours = toPersianDigits2(hours);
|
|
86
|
+
const persianMinutes = toPersianDigits2(minutes.toString().padStart(2, "0"));
|
|
87
|
+
return `${persianDay} ${persianMonth} ${toPersianDigits2(persianYear)}\u060C ${persianHours}:${persianMinutes}`;
|
|
88
|
+
}
|
|
6
89
|
|
|
7
90
|
// src/lib/jalali-utils.ts
|
|
8
|
-
import
|
|
91
|
+
import moment from "moment-jalaali";
|
|
92
|
+
moment.loadPersian({ usePersianDigits: true, dialect: "persian-modern" });
|
|
9
93
|
var PERSIAN_MONTHS = [
|
|
10
94
|
"\u0641\u0631\u0648\u0631\u062F\u06CC\u0646",
|
|
11
95
|
"\u0627\u0631\u062F\u06CC\u0628\u0647\u0634\u062A",
|
|
@@ -53,59 +137,49 @@ function toEnglishDigits(str) {
|
|
|
53
137
|
const arabicDigits = ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"];
|
|
54
138
|
return str.replace(/[۰-۹]/g, (digit) => String(persianDigits.indexOf(digit))).replace(/[٠-٩]/g, (digit) => String(arabicDigits.indexOf(digit)));
|
|
55
139
|
}
|
|
56
|
-
function formatJalaliDate(date,
|
|
57
|
-
|
|
58
|
-
if (finalFormatStr.includes("jYYYY")) finalFormatStr = finalFormatStr.replace(/jYYYY/g, "yyyy");
|
|
59
|
-
if (finalFormatStr.includes("jMMMM")) finalFormatStr = finalFormatStr.replace(/jMMMM/g, "MMMM");
|
|
60
|
-
if (finalFormatStr.includes("jMM")) finalFormatStr = finalFormatStr.replace(/jMM/g, "MM");
|
|
61
|
-
if (finalFormatStr.includes("jM")) finalFormatStr = finalFormatStr.replace(/jM/g, "M");
|
|
62
|
-
if (finalFormatStr.includes("jDD")) finalFormatStr = finalFormatStr.replace(/jDD/g, "dd");
|
|
63
|
-
if (finalFormatStr.includes("jD")) finalFormatStr = finalFormatStr.replace(/jD/g, "d");
|
|
64
|
-
return format(date, finalFormatStr);
|
|
140
|
+
function formatJalaliDate(date, format3 = "jYYYY/jMM/jDD") {
|
|
141
|
+
return moment(date).format(format3);
|
|
65
142
|
}
|
|
66
143
|
function getPersianMonthName(date) {
|
|
67
|
-
const monthIndex =
|
|
144
|
+
const monthIndex = moment(date).jMonth();
|
|
68
145
|
return PERSIAN_MONTHS[monthIndex];
|
|
69
146
|
}
|
|
70
147
|
function getPersianMonthNameShort(date) {
|
|
71
|
-
const monthIndex =
|
|
148
|
+
const monthIndex = moment(date).jMonth();
|
|
72
149
|
return PERSIAN_MONTHS_SHORT[monthIndex];
|
|
73
150
|
}
|
|
74
151
|
function getPersianWeekdayName(date, short = false) {
|
|
75
|
-
const dayIndex = date.
|
|
152
|
+
const dayIndex = moment(date).day();
|
|
76
153
|
return short ? PERSIAN_WEEKDAYS_SHORT[dayIndex] : PERSIAN_WEEKDAYS[dayIndex];
|
|
77
154
|
}
|
|
78
155
|
function getPersianYear(date) {
|
|
79
|
-
return
|
|
156
|
+
return moment(date).jYear();
|
|
80
157
|
}
|
|
81
158
|
function getPersianMonth(date) {
|
|
82
|
-
return
|
|
159
|
+
return moment(date).jMonth();
|
|
83
160
|
}
|
|
84
161
|
function getPersianDay(date) {
|
|
85
|
-
return
|
|
162
|
+
return moment(date).jDate();
|
|
86
163
|
}
|
|
87
164
|
function jalaliToGregorian(year, month, day) {
|
|
88
|
-
|
|
89
|
-
const MM = (month + 1).toString().padStart(2, "0");
|
|
90
|
-
const dd = day.toString().padStart(2, "0");
|
|
91
|
-
const referenceDate = /* @__PURE__ */ new Date();
|
|
92
|
-
referenceDate.setHours(12, 0, 0, 0);
|
|
93
|
-
return parse(`${yyyy}/${MM}/${dd}`, "yyyy/MM/dd", referenceDate);
|
|
165
|
+
return moment(`${year}/${month + 1}/${day}`, "jYYYY/jM/jD").toDate();
|
|
94
166
|
}
|
|
95
167
|
function formatPersianDateRange(from, to) {
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
const
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
|
|
168
|
+
const fromMoment = moment(from);
|
|
169
|
+
const toMoment = moment(to);
|
|
170
|
+
const fromYear = fromMoment.jYear();
|
|
171
|
+
const toYear = toMoment.jYear();
|
|
172
|
+
const fromMonth = fromMoment.jMonth();
|
|
173
|
+
const toMonth = toMoment.jMonth();
|
|
174
|
+
const fromDay = fromMoment.jDate();
|
|
175
|
+
const toDay = toMoment.jDate();
|
|
176
|
+
if (fromYear === toYear && fromMonth === toMonth && fromDay === toDay) {
|
|
103
177
|
return `${toPersianDigits(fromDay)} ${PERSIAN_MONTHS[fromMonth]} ${toPersianDigits(fromYear)}`;
|
|
104
178
|
}
|
|
105
|
-
if (
|
|
179
|
+
if (fromYear === toYear && fromMonth === toMonth) {
|
|
106
180
|
return `${toPersianDigits(fromDay)} - ${toPersianDigits(toDay)} ${PERSIAN_MONTHS[fromMonth]} ${toPersianDigits(fromYear)}`;
|
|
107
181
|
}
|
|
108
|
-
if (
|
|
182
|
+
if (fromYear === toYear) {
|
|
109
183
|
return `${toPersianDigits(fromDay)} ${PERSIAN_MONTHS[fromMonth]} - ${toPersianDigits(toDay)} ${PERSIAN_MONTHS[toMonth]} ${toPersianDigits(fromYear)}`;
|
|
110
184
|
}
|
|
111
185
|
return `${toPersianDigits(fromDay)} ${PERSIAN_MONTHS[fromMonth]} ${toPersianDigits(fromYear)} - ${toPersianDigits(toDay)} ${PERSIAN_MONTHS[toMonth]} ${toPersianDigits(toYear)}`;
|
|
@@ -127,66 +201,6 @@ function getPersianYearsForDropdown(fromYear, toYear) {
|
|
|
127
201
|
return years;
|
|
128
202
|
}
|
|
129
203
|
|
|
130
|
-
// src/lib/utils.ts
|
|
131
|
-
function cn(...inputs) {
|
|
132
|
-
return twMerge(clsx(inputs));
|
|
133
|
-
}
|
|
134
|
-
function formatNumber(num, format4 = "exact") {
|
|
135
|
-
if (num === void 0 || num === null) return "0";
|
|
136
|
-
if (format4 === "exact") {
|
|
137
|
-
return num.toLocaleString("en-US");
|
|
138
|
-
}
|
|
139
|
-
if (num >= 1e9) {
|
|
140
|
-
return `${(num / 1e9).toFixed(1).replace(/\.0$/, "")}B`;
|
|
141
|
-
}
|
|
142
|
-
if (num >= 1e6) {
|
|
143
|
-
return `${(num / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
144
|
-
}
|
|
145
|
-
if (num >= 1e3) {
|
|
146
|
-
return `${(num / 1e3).toFixed(1).replace(/\.0$/, "")}K`;
|
|
147
|
-
}
|
|
148
|
-
return num.toString();
|
|
149
|
-
}
|
|
150
|
-
function formatRelativeTime(date) {
|
|
151
|
-
const now = /* @__PURE__ */ new Date();
|
|
152
|
-
const then = new Date(date);
|
|
153
|
-
const diffInSeconds = Math.floor((now.getTime() - then.getTime()) / 1e3);
|
|
154
|
-
if (diffInSeconds < 60) {
|
|
155
|
-
return "\u0647\u0645\u06CC\u0646 \u0627\u0644\u0627\u0646";
|
|
156
|
-
}
|
|
157
|
-
const diffInMinutes = Math.floor(diffInSeconds / 60);
|
|
158
|
-
if (diffInMinutes < 60) {
|
|
159
|
-
return `${toPersianDigits(diffInMinutes)} \u062F\u0642\u06CC\u0642\u0647 \u067E\u06CC\u0634`;
|
|
160
|
-
}
|
|
161
|
-
const diffInHours = Math.floor(diffInMinutes / 60);
|
|
162
|
-
if (diffInHours < 24) {
|
|
163
|
-
return `${toPersianDigits(diffInHours)} \u0633\u0627\u0639\u062A \u067E\u06CC\u0634`;
|
|
164
|
-
}
|
|
165
|
-
const diffInDays = Math.floor(diffInHours / 24);
|
|
166
|
-
if (diffInDays < 7) {
|
|
167
|
-
return `${toPersianDigits(diffInDays)} \u0631\u0648\u0632 \u067E\u06CC\u0634`;
|
|
168
|
-
}
|
|
169
|
-
const diffInWeeks = Math.floor(diffInDays / 7);
|
|
170
|
-
if (diffInWeeks < 4) {
|
|
171
|
-
return `${toPersianDigits(diffInWeeks)} \u0647\u0641\u062A\u0647 \u067E\u06CC\u0634`;
|
|
172
|
-
}
|
|
173
|
-
const diffInMonths = Math.floor(diffInDays / 30);
|
|
174
|
-
if (diffInMonths < 12) {
|
|
175
|
-
return `${toPersianDigits(diffInMonths)} \u0645\u0627\u0647 \u067E\u06CC\u0634`;
|
|
176
|
-
}
|
|
177
|
-
const diffInYears = Math.floor(diffInDays / 365);
|
|
178
|
-
return `${toPersianDigits(diffInYears)} \u0633\u0627\u0644 \u067E\u06CC\u0634`;
|
|
179
|
-
}
|
|
180
|
-
function formatAbsoluteTime(date) {
|
|
181
|
-
const d = new Date(date);
|
|
182
|
-
const year = getPersianYear(d);
|
|
183
|
-
const month = getPersianMonth(d);
|
|
184
|
-
const day = getPersianDay(d);
|
|
185
|
-
const hours = d.getHours();
|
|
186
|
-
const minutes = d.getMinutes();
|
|
187
|
-
return `${toPersianDigits(day)} ${PERSIAN_MONTHS[month]} ${toPersianDigits(year)}\u060C ${toPersianDigits(hours)}:${toPersianDigits(String(minutes).padStart(2, "0"))}`;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
204
|
// src/icons.tsx
|
|
191
205
|
import {
|
|
192
206
|
AlertCircle,
|
|
@@ -234,21 +248,11 @@ import {
|
|
|
234
248
|
User,
|
|
235
249
|
Users,
|
|
236
250
|
Video,
|
|
237
|
-
X
|
|
238
|
-
UserCheck,
|
|
239
|
-
TrendingUp,
|
|
240
|
-
Award,
|
|
241
|
-
Crown,
|
|
242
|
-
Minus,
|
|
243
|
-
ImageOff,
|
|
244
|
-
ExternalLink,
|
|
245
|
-
GripVertical,
|
|
246
|
-
PanelLeft,
|
|
247
|
-
XCircle
|
|
251
|
+
X
|
|
248
252
|
} from "lucide-react";
|
|
249
253
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
250
254
|
var Icons = {
|
|
251
|
-
|
|
255
|
+
// Lucide Icons
|
|
252
256
|
logo: (props) => /* @__PURE__ */ jsxs(
|
|
253
257
|
"svg",
|
|
254
258
|
{
|
|
@@ -267,7 +271,6 @@ var Icons = {
|
|
|
267
271
|
]
|
|
268
272
|
}
|
|
269
273
|
),
|
|
270
|
-
/** Official Parto brand mark (triangle composition) */
|
|
271
274
|
parto: (props) => /* @__PURE__ */ jsxs(
|
|
272
275
|
"svg",
|
|
273
276
|
{
|
|
@@ -287,7 +290,6 @@ var Icons = {
|
|
|
287
290
|
arrowRight: ArrowRight,
|
|
288
291
|
arrowLeft: ArrowLeft,
|
|
289
292
|
bold: Bold,
|
|
290
|
-
building: Building,
|
|
291
293
|
calendar: Calendar,
|
|
292
294
|
check: Check,
|
|
293
295
|
chevronDown: ChevronDown,
|
|
@@ -296,19 +298,47 @@ var Icons = {
|
|
|
296
298
|
chevronUp: ChevronUp,
|
|
297
299
|
circle: Circle,
|
|
298
300
|
clock: Clock,
|
|
299
|
-
/** Use for close/dismiss actions (X mark) */
|
|
300
|
-
close: X,
|
|
301
301
|
copy: Copy,
|
|
302
302
|
download: Download,
|
|
303
303
|
eye: Eye,
|
|
304
304
|
eyeOff: EyeOff,
|
|
305
305
|
file: File,
|
|
306
306
|
fileText: FileText,
|
|
307
|
+
heart: Heart,
|
|
308
|
+
home: Home,
|
|
309
|
+
image: Image,
|
|
310
|
+
images: Images,
|
|
311
|
+
inbox: Inbox,
|
|
312
|
+
info: Info,
|
|
313
|
+
italic: Italic,
|
|
314
|
+
loader: Loader2,
|
|
315
|
+
menu: Menu,
|
|
316
|
+
messageCircle: MessageCircle,
|
|
317
|
+
moon: Moon,
|
|
318
|
+
moreHorizontal: MoreHorizontal,
|
|
319
|
+
moreVertical: MoreVertical,
|
|
320
|
+
plus: Plus,
|
|
321
|
+
rocket: Rocket,
|
|
322
|
+
search: Search,
|
|
323
|
+
settings: Settings,
|
|
324
|
+
share: Share2,
|
|
325
|
+
sparkles: Sparkles,
|
|
326
|
+
sun: Sun,
|
|
327
|
+
trash: Trash,
|
|
328
|
+
underline: Underline,
|
|
329
|
+
user: User,
|
|
330
|
+
users: Users,
|
|
331
|
+
video: Video,
|
|
332
|
+
building: Building,
|
|
333
|
+
close: X,
|
|
334
|
+
spinner: Loader2,
|
|
307
335
|
gitHub: (props) => /* @__PURE__ */ jsx(
|
|
308
336
|
"svg",
|
|
309
337
|
{
|
|
310
338
|
"aria-hidden": "true",
|
|
311
339
|
focusable: "false",
|
|
340
|
+
"data-prefix": "fab",
|
|
341
|
+
"data-icon": "github",
|
|
312
342
|
role: "img",
|
|
313
343
|
xmlns: "http://www.w3.org/2000/svg",
|
|
314
344
|
viewBox: "0 0 496 512",
|
|
@@ -322,13 +352,7 @@ var Icons = {
|
|
|
322
352
|
)
|
|
323
353
|
}
|
|
324
354
|
),
|
|
325
|
-
|
|
326
|
-
home: Home,
|
|
327
|
-
image: Image,
|
|
328
|
-
images: Images,
|
|
329
|
-
inbox: Inbox,
|
|
330
|
-
info: Info,
|
|
331
|
-
instagram: (props) => /* @__PURE__ */ jsxs(
|
|
355
|
+
twitter: (props) => /* @__PURE__ */ jsx(
|
|
332
356
|
"svg",
|
|
333
357
|
{
|
|
334
358
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -339,30 +363,10 @@ var Icons = {
|
|
|
339
363
|
strokeLinecap: "round",
|
|
340
364
|
strokeLinejoin: "round",
|
|
341
365
|
...props,
|
|
342
|
-
children:
|
|
343
|
-
/* @__PURE__ */ jsx("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", ry: "5" }),
|
|
344
|
-
/* @__PURE__ */ jsx("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
|
|
345
|
-
/* @__PURE__ */ jsx("line", { x1: "17.5", y1: "6.5", x2: "17.51", y2: "6.5" })
|
|
346
|
-
]
|
|
366
|
+
children: /* @__PURE__ */ jsx("path", { d: "M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z" })
|
|
347
367
|
}
|
|
348
368
|
),
|
|
349
|
-
|
|
350
|
-
/** Animated loading spinner — prefer this over a custom spinner */
|
|
351
|
-
loader: Loader2,
|
|
352
|
-
menu: Menu,
|
|
353
|
-
messageCircle: MessageCircle,
|
|
354
|
-
moon: Moon,
|
|
355
|
-
moreHorizontal: MoreHorizontal,
|
|
356
|
-
moreVertical: MoreVertical,
|
|
357
|
-
plus: Plus,
|
|
358
|
-
rocket: Rocket,
|
|
359
|
-
search: Search,
|
|
360
|
-
settings: Settings,
|
|
361
|
-
share: Share2,
|
|
362
|
-
sparkles: Sparkles,
|
|
363
|
-
sun: Sun,
|
|
364
|
-
trash: Trash,
|
|
365
|
-
twitter: (props) => /* @__PURE__ */ jsx(
|
|
369
|
+
instagram: (props) => /* @__PURE__ */ jsxs(
|
|
366
370
|
"svg",
|
|
367
371
|
{
|
|
368
372
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -373,27 +377,18 @@ var Icons = {
|
|
|
373
377
|
strokeLinecap: "round",
|
|
374
378
|
strokeLinejoin: "round",
|
|
375
379
|
...props,
|
|
376
|
-
children:
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ jsx("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", ry: "5" }),
|
|
382
|
+
/* @__PURE__ */ jsx("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
|
|
383
|
+
/* @__PURE__ */ jsx("line", { x1: "17.5", y1: "6.5", x2: "17.51", y2: "6.5" })
|
|
384
|
+
]
|
|
377
385
|
}
|
|
378
|
-
)
|
|
379
|
-
underline: Underline,
|
|
380
|
-
user: User,
|
|
381
|
-
users: Users,
|
|
382
|
-
video: Video,
|
|
383
|
-
userCheck: UserCheck,
|
|
384
|
-
trendingUp: TrendingUp,
|
|
385
|
-
award: Award,
|
|
386
|
-
crown: Crown,
|
|
387
|
-
minus: Minus,
|
|
388
|
-
imageOff: ImageOff,
|
|
389
|
-
externalLink: ExternalLink,
|
|
390
|
-
gripVertical: GripVertical,
|
|
391
|
-
panelLeft: PanelLeft,
|
|
392
|
-
xCircle: XCircle
|
|
386
|
+
)
|
|
393
387
|
};
|
|
394
388
|
|
|
395
389
|
// src/components/ui/accordion.tsx
|
|
396
390
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
391
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
397
392
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
398
393
|
function Accordion({
|
|
399
394
|
...props
|
|
@@ -429,7 +424,7 @@ function AccordionTrigger({
|
|
|
429
424
|
...props,
|
|
430
425
|
children: [
|
|
431
426
|
children,
|
|
432
|
-
/* @__PURE__ */ jsx2(
|
|
427
|
+
/* @__PURE__ */ jsx2(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
|
|
433
428
|
]
|
|
434
429
|
}
|
|
435
430
|
) });
|
|
@@ -507,6 +502,7 @@ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
|
507
502
|
// src/components/ui/button.tsx
|
|
508
503
|
import { Slot } from "@radix-ui/react-slot";
|
|
509
504
|
import { cva as cva2 } from "class-variance-authority";
|
|
505
|
+
import { Loader2 as Loader22 } from "lucide-react";
|
|
510
506
|
import { cloneElement, forwardRef as forwardRef2, isValidElement } from "react";
|
|
511
507
|
|
|
512
508
|
// src/lib/constants.ts
|
|
@@ -672,7 +668,7 @@ var buttonVariants = cva2(
|
|
|
672
668
|
bg-destructive-300 dark:bg-destructive-400 hover:bg-destructive-400 dark:hover:bg-destructive/50
|
|
673
669
|
border-destructive-500 hover:border-destructive
|
|
674
670
|
hover:text-hi-contrast
|
|
675
|
-
focus-visible:outline-
|
|
671
|
+
focus-visible:outline-brand-600
|
|
676
672
|
data-[state=open]:border-destructive
|
|
677
673
|
data-[state=open]:bg-destructive-400 dark:data-[state=open]:bg-destructive/50
|
|
678
674
|
data-[state=open]:outline-destructive
|
|
@@ -682,7 +678,7 @@ var buttonVariants = cva2(
|
|
|
682
678
|
bg-warning-300 dark:bg-warning-400 hover:bg-warning-400 dark:hover:bg-warning/50
|
|
683
679
|
border-warning-500 hover:border-warning
|
|
684
680
|
hover:text-hi-contrast
|
|
685
|
-
focus-visible:outline-
|
|
681
|
+
focus-visible:outline-brand-600
|
|
686
682
|
data-[state=open]:border-warning
|
|
687
683
|
data-[state=open]:bg-warning-400 dark:data-[state=open]:bg-warning/50
|
|
688
684
|
data-[state=open]:outline-warning
|
|
@@ -692,7 +688,7 @@ var buttonVariants = cva2(
|
|
|
692
688
|
bg-destructive-300 dark:bg-destructive-400 hover:bg-destructive-400 dark:hover:bg-destructive/50
|
|
693
689
|
border-destructive-500 hover:border-destructive
|
|
694
690
|
hover:text-hi-contrast
|
|
695
|
-
focus-visible:outline-
|
|
691
|
+
focus-visible:outline-brand-600
|
|
696
692
|
data-[state=open]:border-destructive
|
|
697
693
|
data-[state=open]:bg-destructive-400 dark:data-[state=open]:bg-destructive/50
|
|
698
694
|
data-[state=open]:outline-destructive
|
|
@@ -820,11 +816,11 @@ var Button = forwardRef2(
|
|
|
820
816
|
children: asChild ? isValidElement(children) ? cloneElement(
|
|
821
817
|
children,
|
|
822
818
|
void 0,
|
|
823
|
-
showIcon && (loading ? /* @__PURE__ */ jsx4("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: /* @__PURE__ */ jsx4(
|
|
819
|
+
showIcon && (loading ? /* @__PURE__ */ jsx4("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: /* @__PURE__ */ jsx4(Loader22, { className: cn(loadingVariants({ loading, variant: buttonVariant })) }) }) : _iconLeft ? /* @__PURE__ */ jsx4("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: _iconLeft }) : null),
|
|
824
820
|
children.props?.children && /* @__PURE__ */ jsx4("span", { className: "truncate", children: children.props.children }),
|
|
825
821
|
iconRight && !loading && /* @__PURE__ */ jsx4("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: iconRight })
|
|
826
822
|
) : null : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
827
|
-
showIcon && (loading ? /* @__PURE__ */ jsx4("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: /* @__PURE__ */ jsx4(
|
|
823
|
+
showIcon && (loading ? /* @__PURE__ */ jsx4("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: /* @__PURE__ */ jsx4(Loader22, { className: cn(loadingVariants({ loading, variant: buttonVariant })) }) }) : _iconLeft ? /* @__PURE__ */ jsx4("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: _iconLeft }) : null),
|
|
828
824
|
" ",
|
|
829
825
|
children && /* @__PURE__ */ jsx4("span", { className: "truncate", children }),
|
|
830
826
|
" ",
|
|
@@ -1003,10 +999,11 @@ var Input = React3.forwardRef(
|
|
|
1003
999
|
Input.displayName = "Input";
|
|
1004
1000
|
|
|
1005
1001
|
// src/components/ui/spinner.tsx
|
|
1002
|
+
import { Loader2Icon } from "lucide-react";
|
|
1006
1003
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1007
1004
|
function Spinner({ className, ...props }) {
|
|
1008
1005
|
return /* @__PURE__ */ jsx7(
|
|
1009
|
-
|
|
1006
|
+
Loader2Icon,
|
|
1010
1007
|
{
|
|
1011
1008
|
role: "status",
|
|
1012
1009
|
"aria-label": "Loading",
|
|
@@ -1714,6 +1711,7 @@ function Badge({
|
|
|
1714
1711
|
|
|
1715
1712
|
// src/components/ui/breadcrumb.tsx
|
|
1716
1713
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
1714
|
+
import { ChevronRight as ChevronRight2, MoreHorizontal as MoreHorizontal2 } from "lucide-react";
|
|
1717
1715
|
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1718
1716
|
function Breadcrumb({ ...props }) {
|
|
1719
1717
|
return /* @__PURE__ */ jsx13("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
@@ -1788,7 +1786,7 @@ function BreadcrumbSeparator({
|
|
|
1788
1786
|
"aria-hidden": "true",
|
|
1789
1787
|
className: cn("[&>svg]:size-3.5", className),
|
|
1790
1788
|
...props,
|
|
1791
|
-
children: children ?? /* @__PURE__ */ jsx13(
|
|
1789
|
+
children: children ?? /* @__PURE__ */ jsx13(ChevronRight2, {})
|
|
1792
1790
|
}
|
|
1793
1791
|
);
|
|
1794
1792
|
}
|
|
@@ -1805,7 +1803,7 @@ function BreadcrumbEllipsis({
|
|
|
1805
1803
|
className: cn("flex size-9 items-center justify-center", className),
|
|
1806
1804
|
...props,
|
|
1807
1805
|
children: [
|
|
1808
|
-
/* @__PURE__ */ jsx13(
|
|
1806
|
+
/* @__PURE__ */ jsx13(MoreHorizontal2, { className: "size-4" }),
|
|
1809
1807
|
/* @__PURE__ */ jsx13("span", { className: "sr-only", children: "More" })
|
|
1810
1808
|
]
|
|
1811
1809
|
}
|
|
@@ -1939,6 +1937,7 @@ function ButtonGroupSeparator({
|
|
|
1939
1937
|
}
|
|
1940
1938
|
|
|
1941
1939
|
// src/components/ui/calendar.tsx
|
|
1940
|
+
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
1942
1941
|
import { DayPicker } from "react-day-picker";
|
|
1943
1942
|
import { DayPicker as PersianDayPicker } from "react-day-picker/persian";
|
|
1944
1943
|
import { enUS } from "date-fns/locale";
|
|
@@ -2023,14 +2022,14 @@ function Calendar2({
|
|
|
2023
2022
|
Chevron: ({ orientation }) => {
|
|
2024
2023
|
if (usePersianCalendar) {
|
|
2025
2024
|
if (orientation === "left") {
|
|
2026
|
-
return /* @__PURE__ */ jsx16(
|
|
2025
|
+
return /* @__PURE__ */ jsx16(ChevronRight3, { className: "h-4 w-4" });
|
|
2027
2026
|
}
|
|
2028
|
-
return /* @__PURE__ */ jsx16(
|
|
2027
|
+
return /* @__PURE__ */ jsx16(ChevronLeft2, { className: "h-4 w-4" });
|
|
2029
2028
|
}
|
|
2030
2029
|
if (orientation === "left") {
|
|
2031
|
-
return /* @__PURE__ */ jsx16(
|
|
2030
|
+
return /* @__PURE__ */ jsx16(ChevronLeft2, { className: "h-4 w-4" });
|
|
2032
2031
|
}
|
|
2033
|
-
return /* @__PURE__ */ jsx16(
|
|
2032
|
+
return /* @__PURE__ */ jsx16(ChevronRight3, { className: "h-4 w-4" });
|
|
2034
2033
|
}
|
|
2035
2034
|
},
|
|
2036
2035
|
...props
|
|
@@ -2082,6 +2081,7 @@ CardFooter.displayName = "CardFooter";
|
|
|
2082
2081
|
// src/components/ui/carousel.tsx
|
|
2083
2082
|
import * as React8 from "react";
|
|
2084
2083
|
import useEmblaCarousel from "embla-carousel-react";
|
|
2084
|
+
import { ArrowLeft as ArrowLeft2, ArrowRight as ArrowRight2 } from "lucide-react";
|
|
2085
2085
|
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2086
2086
|
var CarouselContext = React8.createContext(null);
|
|
2087
2087
|
function useCarousel() {
|
|
@@ -2275,7 +2275,7 @@ function CarouselPrevious({
|
|
|
2275
2275
|
onClick: scrollPrev,
|
|
2276
2276
|
...props,
|
|
2277
2277
|
children: [
|
|
2278
|
-
isRTL ? /* @__PURE__ */ jsx18(
|
|
2278
|
+
isRTL ? /* @__PURE__ */ jsx18(ArrowRight2, {}) : /* @__PURE__ */ jsx18(ArrowLeft2, {}),
|
|
2279
2279
|
/* @__PURE__ */ jsx18("span", { className: "sr-only", children: "Previous slide" })
|
|
2280
2280
|
]
|
|
2281
2281
|
}
|
|
@@ -2306,7 +2306,7 @@ function CarouselNext({
|
|
|
2306
2306
|
onClick: scrollNext,
|
|
2307
2307
|
...props,
|
|
2308
2308
|
children: [
|
|
2309
|
-
isRTL ? /* @__PURE__ */ jsx18(
|
|
2309
|
+
isRTL ? /* @__PURE__ */ jsx18(ArrowLeft2, {}) : /* @__PURE__ */ jsx18(ArrowRight2, {}),
|
|
2310
2310
|
/* @__PURE__ */ jsx18("span", { className: "sr-only", children: "Next slide" })
|
|
2311
2311
|
]
|
|
2312
2312
|
}
|
|
@@ -2315,6 +2315,7 @@ function CarouselNext({
|
|
|
2315
2315
|
|
|
2316
2316
|
// src/components/ui/checkbox.tsx
|
|
2317
2317
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2318
|
+
import { CheckIcon } from "lucide-react";
|
|
2318
2319
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2319
2320
|
function Checkbox({
|
|
2320
2321
|
className,
|
|
@@ -2334,7 +2335,7 @@ function Checkbox({
|
|
|
2334
2335
|
{
|
|
2335
2336
|
"data-slot": "checkbox-indicator",
|
|
2336
2337
|
className: "grid place-content-center text-current transition-none",
|
|
2337
|
-
children: /* @__PURE__ */ jsx19(
|
|
2338
|
+
children: /* @__PURE__ */ jsx19(CheckIcon, { className: "size-3.5" })
|
|
2338
2339
|
}
|
|
2339
2340
|
)
|
|
2340
2341
|
}
|
|
@@ -2374,10 +2375,12 @@ function CollapsibleContent2({
|
|
|
2374
2375
|
|
|
2375
2376
|
// src/components/ui/command.tsx
|
|
2376
2377
|
import { Command as CommandPrimitive } from "cmdk";
|
|
2378
|
+
import { SearchIcon } from "lucide-react";
|
|
2377
2379
|
|
|
2378
2380
|
// src/components/ui/dialog.tsx
|
|
2379
2381
|
import * as React9 from "react";
|
|
2380
2382
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2383
|
+
import { X as X2 } from "lucide-react";
|
|
2381
2384
|
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2382
2385
|
var Dialog = DialogPrimitive.Root;
|
|
2383
2386
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
@@ -2409,7 +2412,7 @@ var DialogContent = React9.forwardRef(({ className, children, ...props }, ref) =
|
|
|
2409
2412
|
children: [
|
|
2410
2413
|
children,
|
|
2411
2414
|
/* @__PURE__ */ jsxs11(DialogPrimitive.Close, { className: "absolute end-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-brand-default focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-selection data-[state=open]:text-foreground-muted", children: [
|
|
2412
|
-
/* @__PURE__ */ jsx21(
|
|
2415
|
+
/* @__PURE__ */ jsx21(X2, { className: "h-4 w-4" }),
|
|
2413
2416
|
/* @__PURE__ */ jsx21("span", { className: "sr-only", children: "Close" })
|
|
2414
2417
|
] })
|
|
2415
2418
|
]
|
|
@@ -2516,7 +2519,7 @@ function CommandInput({
|
|
|
2516
2519
|
"data-slot": "command-input-wrapper",
|
|
2517
2520
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
2518
2521
|
children: [
|
|
2519
|
-
/* @__PURE__ */ jsx22(
|
|
2522
|
+
/* @__PURE__ */ jsx22(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
2520
2523
|
/* @__PURE__ */ jsx22(
|
|
2521
2524
|
CommandPrimitive.Input,
|
|
2522
2525
|
{
|
|
@@ -2695,6 +2698,7 @@ CommentCard.displayName = "CommentCard";
|
|
|
2695
2698
|
|
|
2696
2699
|
// src/components/ui/context-menu.tsx
|
|
2697
2700
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
2701
|
+
import { CheckIcon as CheckIcon2, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
2698
2702
|
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2699
2703
|
function ContextMenu({
|
|
2700
2704
|
...props
|
|
@@ -2750,7 +2754,7 @@ function ContextMenuSubTrigger({
|
|
|
2750
2754
|
...props,
|
|
2751
2755
|
children: [
|
|
2752
2756
|
children,
|
|
2753
|
-
/* @__PURE__ */ jsx24(
|
|
2757
|
+
/* @__PURE__ */ jsx24(ChevronRightIcon, { className: "ms-auto rtl:rotate-180" })
|
|
2754
2758
|
]
|
|
2755
2759
|
}
|
|
2756
2760
|
);
|
|
@@ -2824,7 +2828,7 @@ function ContextMenuCheckboxItem({
|
|
|
2824
2828
|
checked,
|
|
2825
2829
|
...props,
|
|
2826
2830
|
children: [
|
|
2827
|
-
/* @__PURE__ */ jsx24("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(
|
|
2831
|
+
/* @__PURE__ */ jsx24("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(CheckIcon2, { className: "size-4" }) }) }),
|
|
2828
2832
|
children
|
|
2829
2833
|
]
|
|
2830
2834
|
}
|
|
@@ -2845,7 +2849,7 @@ function ContextMenuRadioItem({
|
|
|
2845
2849
|
),
|
|
2846
2850
|
...props,
|
|
2847
2851
|
children: [
|
|
2848
|
-
/* @__PURE__ */ jsx24("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(
|
|
2852
|
+
/* @__PURE__ */ jsx24("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
2849
2853
|
children
|
|
2850
2854
|
]
|
|
2851
2855
|
}
|
|
@@ -2900,7 +2904,8 @@ function ContextMenuShortcut({
|
|
|
2900
2904
|
}
|
|
2901
2905
|
|
|
2902
2906
|
// src/components/ui/date-picker.tsx
|
|
2903
|
-
import { format
|
|
2907
|
+
import { format, subDays, subMonths, subYears } from "date-fns";
|
|
2908
|
+
import { Calendar as CalendarIcon } from "lucide-react";
|
|
2904
2909
|
|
|
2905
2910
|
// src/components/ui/popover.tsx
|
|
2906
2911
|
import * as React11 from "react";
|
|
@@ -2943,12 +2948,12 @@ function formatDateRange(range, usePersianCalendar) {
|
|
|
2943
2948
|
if (range.from) {
|
|
2944
2949
|
const isSameDate = range.from && range.to && range.from.getTime() === range.to.getTime();
|
|
2945
2950
|
if (range.to && !isSameDate) {
|
|
2946
|
-
return `${
|
|
2951
|
+
return `${format(range.from, "LLL dd, y")} - ${format(
|
|
2947
2952
|
range.to,
|
|
2948
2953
|
"LLL dd, y"
|
|
2949
2954
|
)}`;
|
|
2950
2955
|
} else {
|
|
2951
|
-
return
|
|
2956
|
+
return format(range.from, "LLL dd, y");
|
|
2952
2957
|
}
|
|
2953
2958
|
}
|
|
2954
2959
|
return "";
|
|
@@ -3040,7 +3045,7 @@ function DatePicker({
|
|
|
3040
3045
|
!value && "text-muted-foreground"
|
|
3041
3046
|
),
|
|
3042
3047
|
disabled,
|
|
3043
|
-
iconLeft: /* @__PURE__ */ jsx26(
|
|
3048
|
+
iconLeft: /* @__PURE__ */ jsx26(CalendarIcon, { className: "h-4 w-4" }),
|
|
3044
3049
|
children: displayText || placeholder || defaultPlaceholder
|
|
3045
3050
|
}
|
|
3046
3051
|
) }),
|
|
@@ -3099,6 +3104,7 @@ function DatePicker({
|
|
|
3099
3104
|
|
|
3100
3105
|
// src/components/ui/date-range-picker.tsx
|
|
3101
3106
|
import * as React12 from "react";
|
|
3107
|
+
import { CalendarIcon as CalendarIcon2, ChevronDownIcon as ChevronDownIcon2 } from "lucide-react";
|
|
3102
3108
|
|
|
3103
3109
|
// src/components/ui/label.tsx
|
|
3104
3110
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
@@ -3164,7 +3170,7 @@ function DateRangePicker({
|
|
|
3164
3170
|
),
|
|
3165
3171
|
children: [
|
|
3166
3172
|
formatDateRange2(value),
|
|
3167
|
-
/* @__PURE__ */ jsx28(
|
|
3173
|
+
/* @__PURE__ */ jsx28(ChevronDownIcon2, { className: "size-4 opacity-50" })
|
|
3168
3174
|
]
|
|
3169
3175
|
}
|
|
3170
3176
|
) }),
|
|
@@ -3231,7 +3237,7 @@ function DateRangePickerInline({
|
|
|
3231
3237
|
),
|
|
3232
3238
|
children: [
|
|
3233
3239
|
formatDateRange2(value),
|
|
3234
|
-
/* @__PURE__ */ jsx28(
|
|
3240
|
+
/* @__PURE__ */ jsx28(CalendarIcon2, { className: "size-4 opacity-50" })
|
|
3235
3241
|
]
|
|
3236
3242
|
}
|
|
3237
3243
|
) }),
|
|
@@ -3379,6 +3385,7 @@ function DrawerDescription({
|
|
|
3379
3385
|
|
|
3380
3386
|
// src/components/ui/dropdown-menu.tsx
|
|
3381
3387
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3388
|
+
import { CheckIcon as CheckIcon3, ChevronRightIcon as ChevronRightIcon2, CircleIcon as CircleIcon2 } from "lucide-react";
|
|
3382
3389
|
import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3383
3390
|
function DropdownMenu({
|
|
3384
3391
|
...props
|
|
@@ -3461,7 +3468,7 @@ function DropdownMenuCheckboxItem({
|
|
|
3461
3468
|
checked,
|
|
3462
3469
|
...props,
|
|
3463
3470
|
children: [
|
|
3464
|
-
/* @__PURE__ */ jsx30("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx30(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx30(
|
|
3471
|
+
/* @__PURE__ */ jsx30("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx30(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx30(CheckIcon3, { className: "size-4" }) }) }),
|
|
3465
3472
|
children
|
|
3466
3473
|
]
|
|
3467
3474
|
}
|
|
@@ -3493,7 +3500,7 @@ function DropdownMenuRadioItem({
|
|
|
3493
3500
|
),
|
|
3494
3501
|
...props,
|
|
3495
3502
|
children: [
|
|
3496
|
-
/* @__PURE__ */ jsx30("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx30(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx30(
|
|
3503
|
+
/* @__PURE__ */ jsx30("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx30(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx30(CircleIcon2, { className: "size-2 fill-current" }) }) }),
|
|
3497
3504
|
children
|
|
3498
3505
|
]
|
|
3499
3506
|
}
|
|
@@ -3569,7 +3576,7 @@ function DropdownMenuSubTrigger({
|
|
|
3569
3576
|
...props,
|
|
3570
3577
|
children: [
|
|
3571
3578
|
children,
|
|
3572
|
-
/* @__PURE__ */ jsx30(
|
|
3579
|
+
/* @__PURE__ */ jsx30(ChevronRightIcon2, { className: "ms-auto size-4 rtl:rotate-180" })
|
|
3573
3580
|
]
|
|
3574
3581
|
}
|
|
3575
3582
|
);
|
|
@@ -4003,15 +4010,20 @@ function HoverCardContent({
|
|
|
4003
4010
|
|
|
4004
4011
|
// src/components/ui/tag-input.tsx
|
|
4005
4012
|
import * as React14 from "react";
|
|
4013
|
+
import { X as X3 } from "lucide-react";
|
|
4006
4014
|
import { cva as cva7 } from "class-variance-authority";
|
|
4007
4015
|
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4008
4016
|
var tagInputVariants = cva7(
|
|
4009
|
-
|
|
4017
|
+
cn(
|
|
4018
|
+
"flex min-h-[34px] w-full flex-wrap gap-1.5 rounded-md border border-control bg-foreground/[.026] px-3 py-1.5 text-sm text-foreground",
|
|
4019
|
+
"focus-within:outline-none focus-within:ring-2 focus-within:ring-background-control focus-within:ring-offset-2 focus-within:ring-offset-foreground-muted",
|
|
4020
|
+
"disabled:cursor-not-allowed disabled:text-foreground-muted disabled:opacity-50"
|
|
4021
|
+
),
|
|
4010
4022
|
{
|
|
4011
4023
|
variants: {
|
|
4012
4024
|
variant: {
|
|
4013
|
-
default: "
|
|
4014
|
-
secondary: "bg-
|
|
4025
|
+
default: "",
|
|
4026
|
+
secondary: "bg-surface-200"
|
|
4015
4027
|
}
|
|
4016
4028
|
},
|
|
4017
4029
|
defaultVariants: {
|
|
@@ -4082,7 +4094,7 @@ var TagInput = React14.forwardRef(
|
|
|
4082
4094
|
Badge,
|
|
4083
4095
|
{
|
|
4084
4096
|
variant: "secondary",
|
|
4085
|
-
className: "gap-1 pe-1 ps-2 h-
|
|
4097
|
+
className: "gap-1 pe-1 ps-2 h-6 text-xs font-medium hover:!bg-primary/20 hover:!text-primary transition-colors [&:hover_svg]:!text-primary",
|
|
4086
4098
|
children: [
|
|
4087
4099
|
tag,
|
|
4088
4100
|
/* @__PURE__ */ jsxs20(
|
|
@@ -4096,7 +4108,7 @@ var TagInput = React14.forwardRef(
|
|
|
4096
4108
|
className: "rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2 hover:!bg-primary/20 transition-colors",
|
|
4097
4109
|
disabled,
|
|
4098
4110
|
children: [
|
|
4099
|
-
/* @__PURE__ */ jsx35(
|
|
4111
|
+
/* @__PURE__ */ jsx35(X3, { className: "h-3 w-3 text-muted-foreground" }),
|
|
4100
4112
|
/* @__PURE__ */ jsxs20("span", { className: "sr-only", children: [
|
|
4101
4113
|
"Remove ",
|
|
4102
4114
|
tag
|
|
@@ -4116,7 +4128,7 @@ var TagInput = React14.forwardRef(
|
|
|
4116
4128
|
value: inputValue,
|
|
4117
4129
|
onChange: (e) => setInputValue(e.target.value),
|
|
4118
4130
|
onKeyDown: handleKeyDown,
|
|
4119
|
-
className: "flex-1 bg-transparent outline-none placeholder:text-muted
|
|
4131
|
+
className: "flex-1 bg-transparent outline-none placeholder:text-foreground-muted min-w-[80px] text-sm leading-4",
|
|
4120
4132
|
placeholder: value.length === 0 ? placeholder : void 0,
|
|
4121
4133
|
disabled
|
|
4122
4134
|
}
|
|
@@ -4130,15 +4142,20 @@ TagInput.displayName = "TagInput";
|
|
|
4130
4142
|
|
|
4131
4143
|
// src/components/ui/hashtag-input.tsx
|
|
4132
4144
|
import * as React15 from "react";
|
|
4145
|
+
import { X as X4 } from "lucide-react";
|
|
4133
4146
|
import { cva as cva8 } from "class-variance-authority";
|
|
4134
4147
|
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4135
4148
|
var hashtagInputVariants = cva8(
|
|
4136
|
-
|
|
4149
|
+
cn(
|
|
4150
|
+
"flex min-h-[34px] w-full flex-wrap gap-1.5 rounded-md border border-control bg-foreground/[.026] px-3 py-1.5 text-sm text-foreground",
|
|
4151
|
+
"focus-within:outline-none focus-within:ring-2 focus-within:ring-background-control focus-within:ring-offset-2 focus-within:ring-offset-foreground-muted",
|
|
4152
|
+
"disabled:cursor-not-allowed disabled:text-foreground-muted disabled:opacity-50"
|
|
4153
|
+
),
|
|
4137
4154
|
{
|
|
4138
4155
|
variants: {
|
|
4139
4156
|
variant: {
|
|
4140
|
-
default: "
|
|
4141
|
-
secondary: "bg-
|
|
4157
|
+
default: "",
|
|
4158
|
+
secondary: "bg-surface-200"
|
|
4142
4159
|
}
|
|
4143
4160
|
},
|
|
4144
4161
|
defaultVariants: {
|
|
@@ -4209,7 +4226,7 @@ var HashtagInput = React15.forwardRef(
|
|
|
4209
4226
|
Badge,
|
|
4210
4227
|
{
|
|
4211
4228
|
variant: "secondary",
|
|
4212
|
-
className: "gap-1 pe-1 ps-2 h-
|
|
4229
|
+
className: "gap-1 pe-1 ps-2 h-6 text-xs font-medium hover:!bg-primary/20 hover:!text-primary transition-colors [&:hover_svg]:!text-primary",
|
|
4213
4230
|
children: [
|
|
4214
4231
|
"#",
|
|
4215
4232
|
tag,
|
|
@@ -4224,7 +4241,7 @@ var HashtagInput = React15.forwardRef(
|
|
|
4224
4241
|
className: "rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2 hover:!bg-primary/20 transition-colors",
|
|
4225
4242
|
disabled,
|
|
4226
4243
|
children: [
|
|
4227
|
-
/* @__PURE__ */ jsx36(
|
|
4244
|
+
/* @__PURE__ */ jsx36(X4, { className: "h-3 w-3 text-muted-foreground" }),
|
|
4228
4245
|
/* @__PURE__ */ jsxs21("span", { className: "sr-only", children: [
|
|
4229
4246
|
"Remove ",
|
|
4230
4247
|
tag
|
|
@@ -4244,7 +4261,7 @@ var HashtagInput = React15.forwardRef(
|
|
|
4244
4261
|
value: inputValue,
|
|
4245
4262
|
onChange: (e) => setInputValue(e.target.value),
|
|
4246
4263
|
onKeyDown: handleKeyDown,
|
|
4247
|
-
className: "flex-1 bg-transparent outline-none placeholder:text-muted
|
|
4264
|
+
className: "flex-1 bg-transparent outline-none placeholder:text-foreground-muted min-w-[80px] text-sm leading-4",
|
|
4248
4265
|
placeholder: value.length === 0 ? placeholder : void 0,
|
|
4249
4266
|
disabled
|
|
4250
4267
|
}
|
|
@@ -4449,6 +4466,7 @@ function InputGroupTextarea({
|
|
|
4449
4466
|
// src/components/ui/input-otp.tsx
|
|
4450
4467
|
import * as React17 from "react";
|
|
4451
4468
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
4469
|
+
import { MinusIcon } from "lucide-react";
|
|
4452
4470
|
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4453
4471
|
function InputOTP({
|
|
4454
4472
|
className,
|
|
@@ -4514,7 +4532,7 @@ function InputOTPSeparator({ ...props }) {
|
|
|
4514
4532
|
role: "separator",
|
|
4515
4533
|
dir: "ltr",
|
|
4516
4534
|
...props,
|
|
4517
|
-
children: /* @__PURE__ */ jsx39(
|
|
4535
|
+
children: /* @__PURE__ */ jsx39(MinusIcon, {})
|
|
4518
4536
|
}
|
|
4519
4537
|
);
|
|
4520
4538
|
}
|
|
@@ -4545,6 +4563,7 @@ var TooltipContent = React18.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
4545
4563
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
4546
4564
|
|
|
4547
4565
|
// src/components/ui/instagram-post.tsx
|
|
4566
|
+
import { ImageOff } from "lucide-react";
|
|
4548
4567
|
import { Fragment as Fragment4, jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4549
4568
|
var instagramPostVariants = cva10(
|
|
4550
4569
|
"relative border bg-background-surface-100",
|
|
@@ -4570,17 +4589,18 @@ function InstagramPostMedia({
|
|
|
4570
4589
|
const handleImageError = (url) => {
|
|
4571
4590
|
setImageError((prev) => ({ ...prev, [url]: true }));
|
|
4572
4591
|
};
|
|
4573
|
-
const renderPlaceholder = () => /* @__PURE__ */ jsx41("div", { className: "w-full h-full flex items-center justify-center bg-muted/10 dark:bg-muted/5", children: /* @__PURE__ */ jsx41(
|
|
4592
|
+
const renderPlaceholder = () => /* @__PURE__ */ jsx41("div", { className: "w-full h-full flex items-center justify-center bg-muted/10 dark:bg-muted/5", children: /* @__PURE__ */ jsx41(ImageOff, { className: "size-12 text-muted-foreground/50" }) });
|
|
4574
4593
|
if (!media || media.length === 0) {
|
|
4575
4594
|
return /* @__PURE__ */ jsx41(
|
|
4576
4595
|
"div",
|
|
4577
4596
|
{
|
|
4578
4597
|
className: cn(
|
|
4579
4598
|
"flex items-center justify-center bg-muted/30",
|
|
4580
|
-
variant === "vertical" ? "
|
|
4599
|
+
variant === "vertical" ? "w-full" : "w-[20%] shrink-0 h-full min-h-[200px] -my-[1px] -ms-[1px]"
|
|
4581
4600
|
),
|
|
4601
|
+
style: variant === "vertical" ? { aspectRatio: "4/5" } : void 0,
|
|
4582
4602
|
children: /* @__PURE__ */ jsxs23("div", { className: "text-center p-4", children: [
|
|
4583
|
-
/* @__PURE__ */ jsx41(
|
|
4603
|
+
/* @__PURE__ */ jsx41(ImageOff, { className: "size-12 mx-auto mb-2 text-muted-foreground" }),
|
|
4584
4604
|
/* @__PURE__ */ jsx41("p", { className: "text-sm text-muted-foreground", children: placeholderText })
|
|
4585
4605
|
] })
|
|
4586
4606
|
}
|
|
@@ -4602,19 +4622,33 @@ function InstagramPostMedia({
|
|
|
4602
4622
|
)
|
|
4603
4623
|
] });
|
|
4604
4624
|
}
|
|
4605
|
-
const
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4625
|
+
const aspectRatio = item.aspectRatio || "4:5";
|
|
4626
|
+
const isPortrait = aspectRatio === "9:16" || aspectRatio === "4:5";
|
|
4627
|
+
const instagramRatio = isPortrait ? "4/5" : getAspectRatioCSS(aspectRatio);
|
|
4628
|
+
return /* @__PURE__ */ jsxs23(
|
|
4629
|
+
"div",
|
|
4630
|
+
{
|
|
4631
|
+
className: "w-full relative overflow-hidden group cursor-pointer bg-black",
|
|
4632
|
+
style: { aspectRatio: instagramRatio },
|
|
4633
|
+
children: [
|
|
4634
|
+
/* @__PURE__ */ jsx41("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4635
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ jsx41(
|
|
4636
|
+
"img",
|
|
4637
|
+
{
|
|
4638
|
+
src: item.url,
|
|
4639
|
+
alt: "Post media",
|
|
4640
|
+
className: cn(
|
|
4641
|
+
"w-full h-full transition-transform duration-300 group-hover:scale-[1.02]",
|
|
4642
|
+
// For portrait images: object-contain to show full image like Instagram
|
|
4643
|
+
// For square/landscape: object-cover
|
|
4644
|
+
isPortrait ? "object-contain" : "object-cover"
|
|
4645
|
+
),
|
|
4646
|
+
onError: () => handleImageError(item.url)
|
|
4647
|
+
}
|
|
4648
|
+
)
|
|
4649
|
+
]
|
|
4650
|
+
}
|
|
4651
|
+
);
|
|
4618
4652
|
}
|
|
4619
4653
|
if (mediaType === "video" || media.length === 1 && media[0].type === "video") {
|
|
4620
4654
|
const item = media[0];
|
|
@@ -4632,19 +4666,31 @@ function InstagramPostMedia({
|
|
|
4632
4666
|
)
|
|
4633
4667
|
] });
|
|
4634
4668
|
}
|
|
4635
|
-
const
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4669
|
+
const aspectRatio = item.aspectRatio || "4:5";
|
|
4670
|
+
const isPortrait = aspectRatio === "9:16" || aspectRatio === "4:5";
|
|
4671
|
+
const instagramRatio = isPortrait ? "4/5" : getAspectRatioCSS(aspectRatio);
|
|
4672
|
+
return /* @__PURE__ */ jsxs23(
|
|
4673
|
+
"div",
|
|
4674
|
+
{
|
|
4675
|
+
className: "w-full relative overflow-hidden group cursor-pointer bg-black",
|
|
4676
|
+
style: { aspectRatio: instagramRatio },
|
|
4677
|
+
children: [
|
|
4678
|
+
/* @__PURE__ */ jsx41("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4679
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ jsx41(
|
|
4680
|
+
"img",
|
|
4681
|
+
{
|
|
4682
|
+
src: item.url,
|
|
4683
|
+
alt: "Post media",
|
|
4684
|
+
className: cn(
|
|
4685
|
+
"w-full h-full transition-transform duration-300 group-hover:scale-[1.02]",
|
|
4686
|
+
isPortrait ? "object-contain" : "object-cover"
|
|
4687
|
+
),
|
|
4688
|
+
onError: () => handleImageError(item.url)
|
|
4689
|
+
}
|
|
4690
|
+
)
|
|
4691
|
+
]
|
|
4692
|
+
}
|
|
4693
|
+
);
|
|
4648
4694
|
}
|
|
4649
4695
|
if (mediaType === "carousel" || media.length > 1) {
|
|
4650
4696
|
if (variant === "horizontal") {
|
|
@@ -4666,38 +4712,47 @@ function InstagramPostMedia({
|
|
|
4666
4712
|
] }) });
|
|
4667
4713
|
}
|
|
4668
4714
|
return /* @__PURE__ */ jsxs23(Carousel, { className: "w-full", children: [
|
|
4669
|
-
/* @__PURE__ */ jsx41(CarouselContent, { children: media.map((item, index) =>
|
|
4670
|
-
"
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4715
|
+
/* @__PURE__ */ jsx41(CarouselContent, { children: media.map((item, index) => {
|
|
4716
|
+
const itemAspect = item.aspectRatio || "4:5";
|
|
4717
|
+
const itemIsPortrait = itemAspect === "9:16" || itemAspect === "4:5";
|
|
4718
|
+
const itemRatio = itemIsPortrait ? "4/5" : getAspectRatioCSS(itemAspect);
|
|
4719
|
+
return /* @__PURE__ */ jsx41(CarouselItem, { children: /* @__PURE__ */ jsxs23(
|
|
4720
|
+
"div",
|
|
4721
|
+
{
|
|
4722
|
+
className: "w-full relative overflow-hidden group cursor-pointer bg-black",
|
|
4723
|
+
style: { aspectRatio: itemRatio },
|
|
4724
|
+
children: [
|
|
4725
|
+
/* @__PURE__ */ jsx41("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4726
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ jsx41(
|
|
4727
|
+
"img",
|
|
4728
|
+
{
|
|
4729
|
+
src: item.url,
|
|
4730
|
+
alt: `Post media ${index + 1}`,
|
|
4731
|
+
className: cn(
|
|
4732
|
+
"w-full h-full transition-transform duration-300",
|
|
4733
|
+
itemIsPortrait ? "object-contain" : "object-cover"
|
|
4734
|
+
),
|
|
4735
|
+
onError: () => handleImageError(item.url)
|
|
4736
|
+
}
|
|
4737
|
+
)
|
|
4738
|
+
]
|
|
4739
|
+
}
|
|
4740
|
+
) }, index);
|
|
4741
|
+
}) }),
|
|
4688
4742
|
/* @__PURE__ */ jsx41(CarouselPrevious, { className: "ms-2" }),
|
|
4689
4743
|
/* @__PURE__ */ jsx41(CarouselNext, { className: "me-2" })
|
|
4690
4744
|
] });
|
|
4691
4745
|
}
|
|
4692
4746
|
return null;
|
|
4693
4747
|
}
|
|
4694
|
-
function
|
|
4748
|
+
function getAspectRatioCSS(ratio) {
|
|
4695
4749
|
const ratios = {
|
|
4696
|
-
"16:9": 16
|
|
4697
|
-
"9:16":
|
|
4698
|
-
|
|
4699
|
-
"
|
|
4700
|
-
"5
|
|
4750
|
+
"16:9": "16/9",
|
|
4751
|
+
"9:16": "4/5",
|
|
4752
|
+
// Instagram standard portrait
|
|
4753
|
+
"1:1": "1/1",
|
|
4754
|
+
"4:5": "4/5",
|
|
4755
|
+
"5:4": "5/4"
|
|
4701
4756
|
};
|
|
4702
4757
|
return ratios[ratio];
|
|
4703
4758
|
}
|
|
@@ -4920,7 +4975,11 @@ function InstagramPostActions({
|
|
|
4920
4975
|
onBooster,
|
|
4921
4976
|
onAIAnalysis,
|
|
4922
4977
|
onOpenInstagram,
|
|
4923
|
-
instagramUrl
|
|
4978
|
+
instagramUrl,
|
|
4979
|
+
disableCommentAnalyzer = false,
|
|
4980
|
+
disableBooster = false,
|
|
4981
|
+
disableAIAnalysis = false,
|
|
4982
|
+
disableOpenInstagram = false
|
|
4924
4983
|
}) {
|
|
4925
4984
|
if (!showActions) return null;
|
|
4926
4985
|
const handleOpenInstagram = () => {
|
|
@@ -4930,21 +4989,6 @@ function InstagramPostActions({
|
|
|
4930
4989
|
window.open(instagramUrl, "_blank", "noopener,noreferrer");
|
|
4931
4990
|
}
|
|
4932
4991
|
};
|
|
4933
|
-
const handleCommentAnalyzer = () => {
|
|
4934
|
-
if (onCommentAnalyzer) {
|
|
4935
|
-
onCommentAnalyzer();
|
|
4936
|
-
}
|
|
4937
|
-
};
|
|
4938
|
-
const handleBooster = () => {
|
|
4939
|
-
if (onBooster) {
|
|
4940
|
-
onBooster();
|
|
4941
|
-
}
|
|
4942
|
-
};
|
|
4943
|
-
const handleAIAnalysis = () => {
|
|
4944
|
-
if (onAIAnalysis) {
|
|
4945
|
-
onAIAnalysis();
|
|
4946
|
-
}
|
|
4947
|
-
};
|
|
4948
4992
|
return /* @__PURE__ */ jsx41(TooltipProvider, { children: /* @__PURE__ */ jsxs23("div", { className: "absolute top-2 end-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-10", children: [
|
|
4949
4993
|
/* @__PURE__ */ jsxs23(Tooltip, { children: [
|
|
4950
4994
|
/* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
|
|
@@ -4952,13 +4996,17 @@ function InstagramPostActions({
|
|
|
4952
4996
|
{
|
|
4953
4997
|
variant: "ghost",
|
|
4954
4998
|
size: "icon",
|
|
4955
|
-
className:
|
|
4956
|
-
|
|
4999
|
+
className: cn(
|
|
5000
|
+
"size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5001
|
+
disableCommentAnalyzer && "opacity-40 cursor-not-allowed pointer-events-none"
|
|
5002
|
+
),
|
|
5003
|
+
onClick: disableCommentAnalyzer ? void 0 : onCommentAnalyzer,
|
|
5004
|
+
disabled: disableCommentAnalyzer,
|
|
4957
5005
|
"aria-label": "Comment Analyzer",
|
|
4958
5006
|
children: /* @__PURE__ */ jsx41(Icons.messageCircle, { className: "size-4" })
|
|
4959
5007
|
}
|
|
4960
5008
|
) }),
|
|
4961
|
-
/* @__PURE__ */ jsx41(TooltipContent, { children: /* @__PURE__ */ jsx41("p", { children: "\u062A\u062D\u0644\u06CC\u0644 \u06A9\u0627\u0645\u0646\u062A\u200C\u0647\u0627" }) })
|
|
5009
|
+
/* @__PURE__ */ jsx41(TooltipContent, { children: /* @__PURE__ */ jsx41("p", { children: disableCommentAnalyzer ? "\u062A\u062D\u0644\u06CC\u0644 \u06A9\u0627\u0645\u0646\u062A\u200C\u0647\u0627 (\u063A\u06CC\u0631\u0641\u0639\u0627\u0644)" : "\u062A\u062D\u0644\u06CC\u0644 \u06A9\u0627\u0645\u0646\u062A\u200C\u0647\u0627" }) })
|
|
4962
5010
|
] }),
|
|
4963
5011
|
/* @__PURE__ */ jsxs23(Tooltip, { children: [
|
|
4964
5012
|
/* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
|
|
@@ -4966,13 +5014,17 @@ function InstagramPostActions({
|
|
|
4966
5014
|
{
|
|
4967
5015
|
variant: "ghost",
|
|
4968
5016
|
size: "icon",
|
|
4969
|
-
className:
|
|
4970
|
-
|
|
5017
|
+
className: cn(
|
|
5018
|
+
"size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5019
|
+
disableBooster && "opacity-40 cursor-not-allowed pointer-events-none"
|
|
5020
|
+
),
|
|
5021
|
+
onClick: disableBooster ? void 0 : onBooster,
|
|
5022
|
+
disabled: disableBooster,
|
|
4971
5023
|
"aria-label": "Booster",
|
|
4972
5024
|
children: /* @__PURE__ */ jsx41(Icons.rocket, { className: "size-4" })
|
|
4973
5025
|
}
|
|
4974
5026
|
) }),
|
|
4975
|
-
/* @__PURE__ */ jsx41(TooltipContent, { children: /* @__PURE__ */ jsx41("p", { children: "\u0628\u0648\u0633\u062A\u0631" }) })
|
|
5027
|
+
/* @__PURE__ */ jsx41(TooltipContent, { children: /* @__PURE__ */ jsx41("p", { children: disableBooster ? "\u0628\u0648\u0633\u062A\u0631 (\u063A\u06CC\u0631\u0641\u0639\u0627\u0644)" : "\u0628\u0648\u0633\u062A\u0631" }) })
|
|
4976
5028
|
] }),
|
|
4977
5029
|
/* @__PURE__ */ jsxs23(Tooltip, { children: [
|
|
4978
5030
|
/* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
|
|
@@ -4980,13 +5032,17 @@ function InstagramPostActions({
|
|
|
4980
5032
|
{
|
|
4981
5033
|
variant: "ghost",
|
|
4982
5034
|
size: "icon",
|
|
4983
|
-
className:
|
|
4984
|
-
|
|
5035
|
+
className: cn(
|
|
5036
|
+
"size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5037
|
+
disableAIAnalysis && "opacity-40 cursor-not-allowed pointer-events-none"
|
|
5038
|
+
),
|
|
5039
|
+
onClick: disableAIAnalysis ? void 0 : onAIAnalysis,
|
|
5040
|
+
disabled: disableAIAnalysis,
|
|
4985
5041
|
"aria-label": "AI Analysis",
|
|
4986
5042
|
children: /* @__PURE__ */ jsx41(Icons.sparkles, { className: "size-4" })
|
|
4987
5043
|
}
|
|
4988
5044
|
) }),
|
|
4989
|
-
/* @__PURE__ */ jsx41(TooltipContent, { children: /* @__PURE__ */ jsx41("p", { children: "\u062A\u062D\u0644\u06CC\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06CC" }) })
|
|
5045
|
+
/* @__PURE__ */ jsx41(TooltipContent, { children: /* @__PURE__ */ jsx41("p", { children: disableAIAnalysis ? "\u062A\u062D\u0644\u06CC\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06CC (\u063A\u06CC\u0631\u0641\u0639\u0627\u0644)" : "\u062A\u062D\u0644\u06CC\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06CC" }) })
|
|
4990
5046
|
] }),
|
|
4991
5047
|
/* @__PURE__ */ jsxs23(Tooltip, { children: [
|
|
4992
5048
|
/* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(
|
|
@@ -4994,13 +5050,17 @@ function InstagramPostActions({
|
|
|
4994
5050
|
{
|
|
4995
5051
|
variant: "ghost",
|
|
4996
5052
|
size: "icon",
|
|
4997
|
-
className:
|
|
4998
|
-
|
|
5053
|
+
className: cn(
|
|
5054
|
+
"size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5055
|
+
disableOpenInstagram && "opacity-40 cursor-not-allowed pointer-events-none"
|
|
5056
|
+
),
|
|
5057
|
+
onClick: disableOpenInstagram ? void 0 : handleOpenInstagram,
|
|
5058
|
+
disabled: disableOpenInstagram,
|
|
4999
5059
|
"aria-label": "Open on Instagram",
|
|
5000
5060
|
children: /* @__PURE__ */ jsx41(Icons.instagram, { className: "size-4" })
|
|
5001
5061
|
}
|
|
5002
5062
|
) }),
|
|
5003
|
-
/* @__PURE__ */ jsx41(TooltipContent, { children: /* @__PURE__ */ jsx41("p", { children: "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u062F\u0631 \u0627\u06CC\u0646\u0633\u062A\u0627\u06AF\u0631\u0627\u0645" }) })
|
|
5063
|
+
/* @__PURE__ */ jsx41(TooltipContent, { children: /* @__PURE__ */ jsx41("p", { children: disableOpenInstagram ? "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u062F\u0631 \u0627\u06CC\u0646\u0633\u062A\u0627\u06AF\u0631\u0627\u0645 (\u063A\u06CC\u0631\u0641\u0639\u0627\u0644)" : "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u062F\u0631 \u0627\u06CC\u0646\u0633\u062A\u0627\u06AF\u0631\u0627\u0645" }) })
|
|
5004
5064
|
] })
|
|
5005
5065
|
] }) });
|
|
5006
5066
|
}
|
|
@@ -5056,6 +5116,10 @@ var InstagramPost = React19.forwardRef(
|
|
|
5056
5116
|
onAIAnalysis,
|
|
5057
5117
|
onOpenInstagram,
|
|
5058
5118
|
instagramUrl,
|
|
5119
|
+
disableCommentAnalyzer = false,
|
|
5120
|
+
disableBooster = false,
|
|
5121
|
+
disableAIAnalysis = false,
|
|
5122
|
+
disableOpenInstagram = false,
|
|
5059
5123
|
placeholderText,
|
|
5060
5124
|
dir,
|
|
5061
5125
|
...props
|
|
@@ -5077,7 +5141,11 @@ var InstagramPost = React19.forwardRef(
|
|
|
5077
5141
|
onBooster,
|
|
5078
5142
|
onAIAnalysis,
|
|
5079
5143
|
onOpenInstagram,
|
|
5080
|
-
instagramUrl
|
|
5144
|
+
instagramUrl,
|
|
5145
|
+
disableCommentAnalyzer,
|
|
5146
|
+
disableBooster,
|
|
5147
|
+
disableAIAnalysis,
|
|
5148
|
+
disableOpenInstagram
|
|
5081
5149
|
}
|
|
5082
5150
|
),
|
|
5083
5151
|
isVertical ? /* @__PURE__ */ jsxs23(Fragment4, { children: [
|
|
@@ -5182,6 +5250,7 @@ function KbdGroup({ className, ...props }) {
|
|
|
5182
5250
|
|
|
5183
5251
|
// src/components/ui/menubar.tsx
|
|
5184
5252
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
5253
|
+
import { CheckIcon as CheckIcon4, ChevronRightIcon as ChevronRightIcon3, CircleIcon as CircleIcon3 } from "lucide-react";
|
|
5185
5254
|
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5186
5255
|
function Menubar({
|
|
5187
5256
|
className,
|
|
@@ -5294,7 +5363,7 @@ function MenubarCheckboxItem({
|
|
|
5294
5363
|
checked,
|
|
5295
5364
|
...props,
|
|
5296
5365
|
children: [
|
|
5297
|
-
/* @__PURE__ */ jsx43("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx43(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx43(
|
|
5366
|
+
/* @__PURE__ */ jsx43("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx43(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx43(CheckIcon4, { className: "size-4" }) }) }),
|
|
5298
5367
|
children
|
|
5299
5368
|
]
|
|
5300
5369
|
}
|
|
@@ -5315,7 +5384,7 @@ function MenubarRadioItem({
|
|
|
5315
5384
|
),
|
|
5316
5385
|
...props,
|
|
5317
5386
|
children: [
|
|
5318
|
-
/* @__PURE__ */ jsx43("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx43(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx43(
|
|
5387
|
+
/* @__PURE__ */ jsx43("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx43(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx43(CircleIcon3, { className: "size-2 fill-current" }) }) }),
|
|
5319
5388
|
children
|
|
5320
5389
|
]
|
|
5321
5390
|
}
|
|
@@ -5391,7 +5460,7 @@ function MenubarSubTrigger({
|
|
|
5391
5460
|
...props,
|
|
5392
5461
|
children: [
|
|
5393
5462
|
children,
|
|
5394
|
-
/* @__PURE__ */ jsx43(
|
|
5463
|
+
/* @__PURE__ */ jsx43(ChevronRightIcon3, { className: "ms-auto h-4 w-4 rtl:rotate-180" })
|
|
5395
5464
|
]
|
|
5396
5465
|
}
|
|
5397
5466
|
);
|
|
@@ -5415,7 +5484,8 @@ function MenubarSubContent({
|
|
|
5415
5484
|
|
|
5416
5485
|
// src/components/ui/metric-card.tsx
|
|
5417
5486
|
import * as React20 from "react";
|
|
5418
|
-
import {
|
|
5487
|
+
import { ExternalLink, Info as Info2 } from "lucide-react";
|
|
5488
|
+
import { format as format2 } from "date-fns";
|
|
5419
5489
|
|
|
5420
5490
|
// src/components/ui/skeleton.tsx
|
|
5421
5491
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
@@ -5453,7 +5523,7 @@ var MetricCard = React20.forwardRef(
|
|
|
5453
5523
|
Card,
|
|
5454
5524
|
{
|
|
5455
5525
|
ref,
|
|
5456
|
-
className: cn("py-4 space-y-3
|
|
5526
|
+
className: cn("py-4 space-y-3", className),
|
|
5457
5527
|
...props,
|
|
5458
5528
|
children
|
|
5459
5529
|
}
|
|
@@ -5478,7 +5548,7 @@ var MetricCardHeader = React20.forwardRef(
|
|
|
5478
5548
|
target: "_blank",
|
|
5479
5549
|
rel: "noopener noreferrer",
|
|
5480
5550
|
className: "text-foreground-lighter hover:text-foreground transition-colors",
|
|
5481
|
-
children: /* @__PURE__ */ jsx45(
|
|
5551
|
+
children: /* @__PURE__ */ jsx45(ExternalLink, { className: "h-3.5 w-3.5" })
|
|
5482
5552
|
}
|
|
5483
5553
|
)
|
|
5484
5554
|
]
|
|
@@ -5508,7 +5578,7 @@ var MetricCardLabel = React20.forwardRef(
|
|
|
5508
5578
|
return /* @__PURE__ */ jsx45(TooltipProvider, { children: /* @__PURE__ */ jsxs25(Tooltip, { children: [
|
|
5509
5579
|
/* @__PURE__ */ jsx45(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1.5 cursor-help", children: [
|
|
5510
5580
|
label,
|
|
5511
|
-
/* @__PURE__ */ jsx45(
|
|
5581
|
+
/* @__PURE__ */ jsx45(Info2, { className: "h-3.5 w-3.5 text-foreground-lighter" })
|
|
5512
5582
|
] }) }),
|
|
5513
5583
|
/* @__PURE__ */ jsx45(TooltipContent, { children: /* @__PURE__ */ jsx45("p", { className: "max-w-xs", children: tooltip }) })
|
|
5514
5584
|
] }) });
|
|
@@ -5636,7 +5706,7 @@ var MetricCardSparkline = React20.forwardRef(
|
|
|
5636
5706
|
const jalaliDate = formatJalaliDate(date, "jD jMMMM");
|
|
5637
5707
|
return toPersianDigits(jalaliDate);
|
|
5638
5708
|
} else {
|
|
5639
|
-
return
|
|
5709
|
+
return format2(date, "MMM d");
|
|
5640
5710
|
}
|
|
5641
5711
|
};
|
|
5642
5712
|
return /* @__PURE__ */ jsxs25(
|
|
@@ -5767,6 +5837,7 @@ var MetricCardSparkline = React20.forwardRef(
|
|
|
5767
5837
|
MetricCardSparkline.displayName = "MetricCardSparkline";
|
|
5768
5838
|
|
|
5769
5839
|
// src/components/ui/native-select.tsx
|
|
5840
|
+
import { ChevronDownIcon as ChevronDownIcon3 } from "lucide-react";
|
|
5770
5841
|
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5771
5842
|
function NativeSelect({ className, ...props }) {
|
|
5772
5843
|
return /* @__PURE__ */ jsxs26(
|
|
@@ -5798,7 +5869,7 @@ function NativeSelect({ className, ...props }) {
|
|
|
5798
5869
|
}
|
|
5799
5870
|
),
|
|
5800
5871
|
/* @__PURE__ */ jsx46(
|
|
5801
|
-
|
|
5872
|
+
ChevronDownIcon3,
|
|
5802
5873
|
{
|
|
5803
5874
|
className: "pointer-events-none absolute top-1/2 end-3 size-4 -translate-y-1/2 text-foreground-muted select-none",
|
|
5804
5875
|
"aria-hidden": "true",
|
|
@@ -5829,6 +5900,7 @@ function NativeSelectOptGroup({
|
|
|
5829
5900
|
// src/components/ui/navigation-menu.tsx
|
|
5830
5901
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
5831
5902
|
import { cva as cva11 } from "class-variance-authority";
|
|
5903
|
+
import { ChevronDownIcon as ChevronDownIcon4 } from "lucide-react";
|
|
5832
5904
|
import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5833
5905
|
function NavigationMenu({
|
|
5834
5906
|
className,
|
|
@@ -5900,7 +5972,7 @@ function NavigationMenuTrigger({
|
|
|
5900
5972
|
children,
|
|
5901
5973
|
" ",
|
|
5902
5974
|
/* @__PURE__ */ jsx47(
|
|
5903
|
-
|
|
5975
|
+
ChevronDownIcon4,
|
|
5904
5976
|
{
|
|
5905
5977
|
className: "relative top-[1px] ms-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
5906
5978
|
"aria-hidden": "true"
|
|
@@ -5987,6 +6059,11 @@ function NavigationMenuIndicator({
|
|
|
5987
6059
|
|
|
5988
6060
|
// src/components/ui/pagination.tsx
|
|
5989
6061
|
import * as React21 from "react";
|
|
6062
|
+
import {
|
|
6063
|
+
ChevronLeftIcon,
|
|
6064
|
+
ChevronRightIcon as ChevronRightIcon4,
|
|
6065
|
+
MoreHorizontalIcon
|
|
6066
|
+
} from "lucide-react";
|
|
5990
6067
|
import { Fragment as Fragment6, jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5991
6068
|
var PaginationDirectionContext = React21.createContext("rtl");
|
|
5992
6069
|
function usePaginationDirection() {
|
|
@@ -6075,7 +6152,7 @@ function PaginationPrevious({
|
|
|
6075
6152
|
const dir = usePaginationDirection();
|
|
6076
6153
|
const isRTL = dir === "rtl";
|
|
6077
6154
|
const label = isRTL ? "\u0642\u0628\u0644\u06CC" : "Previous";
|
|
6078
|
-
const Icon2 = isRTL ?
|
|
6155
|
+
const Icon2 = isRTL ? ChevronRightIcon4 : ChevronLeftIcon;
|
|
6079
6156
|
return /* @__PURE__ */ jsxs28(
|
|
6080
6157
|
PaginationLink,
|
|
6081
6158
|
{
|
|
@@ -6101,7 +6178,7 @@ function PaginationNext({
|
|
|
6101
6178
|
const dir = usePaginationDirection();
|
|
6102
6179
|
const isRTL = dir === "rtl";
|
|
6103
6180
|
const label = isRTL ? "\u0628\u0639\u062F\u06CC" : "Next";
|
|
6104
|
-
const Icon2 = isRTL ?
|
|
6181
|
+
const Icon2 = isRTL ? ChevronLeftIcon : ChevronRightIcon4;
|
|
6105
6182
|
return /* @__PURE__ */ jsx48(
|
|
6106
6183
|
PaginationLink,
|
|
6107
6184
|
{
|
|
@@ -6135,7 +6212,7 @@ function PaginationEllipsis({
|
|
|
6135
6212
|
className: cn("flex size-9 items-center justify-center", className),
|
|
6136
6213
|
...props,
|
|
6137
6214
|
children: [
|
|
6138
|
-
/* @__PURE__ */ jsx48(
|
|
6215
|
+
/* @__PURE__ */ jsx48(MoreHorizontalIcon, { className: "size-4" }),
|
|
6139
6216
|
/* @__PURE__ */ jsx48("span", { className: "sr-only", children: "More pages" })
|
|
6140
6217
|
]
|
|
6141
6218
|
}
|
|
@@ -6336,7 +6413,7 @@ var ProfileCard = React22.forwardRef(
|
|
|
6336
6413
|
{
|
|
6337
6414
|
ref,
|
|
6338
6415
|
className: cn(
|
|
6339
|
-
"flex flex-col items-center rounded-lg shadow-sm transition-colors
|
|
6416
|
+
"flex flex-col items-center rounded-lg shadow-sm transition-colors",
|
|
6340
6417
|
variantClasses[variant],
|
|
6341
6418
|
currentSize.container,
|
|
6342
6419
|
onCardClick && "cursor-pointer hover:bg-surface-200",
|
|
@@ -6345,7 +6422,7 @@ var ProfileCard = React22.forwardRef(
|
|
|
6345
6422
|
onClick: onCardClick,
|
|
6346
6423
|
...props,
|
|
6347
6424
|
children: [
|
|
6348
|
-
/* @__PURE__ */ jsx50("div", { className: "relative flex-shrink-0", children: avatarBorderVariant === "gold" ? /* @__PURE__ */ jsx50("div", { className: "relative p-0.5 rounded-full bg-gradient-to-br from-
|
|
6425
|
+
/* @__PURE__ */ jsx50("div", { className: "relative flex-shrink-0", children: avatarBorderVariant === "gold" ? /* @__PURE__ */ jsx50("div", { className: "relative p-0.5 rounded-full bg-gradient-to-br from-brand-400 via-brand to-brand-400", children: /* @__PURE__ */ jsxs30(Avatar, { className: cn(currentSize.avatar, "ring-2 ring-background"), children: [
|
|
6349
6426
|
/* @__PURE__ */ jsx50(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6350
6427
|
/* @__PURE__ */ jsx50(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6351
6428
|
] }) }) : avatarBorderVariant === "primary" ? /* @__PURE__ */ jsxs30(Avatar, { className: cn(currentSize.avatar, "ring-2 ring-offset-2 ring-offset-background ring-primary"), children: [
|
|
@@ -6423,7 +6500,7 @@ var ProfileInfo = React23.forwardRef(
|
|
|
6423
6500
|
transparent: "bg-transparent"
|
|
6424
6501
|
};
|
|
6425
6502
|
const borderClasses = {
|
|
6426
|
-
gold: "ring-2 ring-offset-2 ring-offset-background [--tw-ring-color:conic-gradient(from_180deg,#
|
|
6503
|
+
gold: "ring-2 ring-offset-2 ring-offset-background [--tw-ring-color:conic-gradient(from_180deg,#22c55e,#4ade80,#22c55e)]",
|
|
6427
6504
|
primary: "ring-2 ring-offset-2 ring-offset-background ring-primary",
|
|
6428
6505
|
none: ""
|
|
6429
6506
|
};
|
|
@@ -6443,7 +6520,7 @@ var ProfileInfo = React23.forwardRef(
|
|
|
6443
6520
|
...props,
|
|
6444
6521
|
children: [
|
|
6445
6522
|
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-4", children: [
|
|
6446
|
-
/* @__PURE__ */ jsx51("div", { className: "relative", children: avatarBorderVariant === "gold" ? /* @__PURE__ */ jsx51("div", { className: "relative p-0.5 rounded-full bg-gradient-to-br from-
|
|
6523
|
+
/* @__PURE__ */ jsx51("div", { className: "relative", children: avatarBorderVariant === "gold" ? /* @__PURE__ */ jsx51("div", { className: "relative p-0.5 rounded-full bg-gradient-to-br from-brand-400 via-brand to-brand-400", children: /* @__PURE__ */ jsxs31(Avatar, { className: cn(currentSize.avatar, "ring-2 ring-background"), children: [
|
|
6447
6524
|
/* @__PURE__ */ jsx51(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6448
6525
|
/* @__PURE__ */ jsx51(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6449
6526
|
] }) }) : /* @__PURE__ */ jsxs31(Avatar, { className: cn(currentSize.avatar, borderClasses[avatarBorderVariant]), children: [
|
|
@@ -6500,6 +6577,7 @@ ProfileInfo.displayName = "ProfileInfo";
|
|
|
6500
6577
|
|
|
6501
6578
|
// src/components/ui/engagement-rate.tsx
|
|
6502
6579
|
import * as React24 from "react";
|
|
6580
|
+
import { TrendingUp, Users as Users2, UserCheck, Award, Crown } from "lucide-react";
|
|
6503
6581
|
import { jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6504
6582
|
var convertToLocalNumbers2 = (text, locale) => {
|
|
6505
6583
|
if (locale === "fa" || locale === "ar") {
|
|
@@ -6559,17 +6637,17 @@ var getGroupIcon = (group) => {
|
|
|
6559
6637
|
const iconClass = "w-12 h-12 text-primary";
|
|
6560
6638
|
switch (group) {
|
|
6561
6639
|
case "nano":
|
|
6562
|
-
return /* @__PURE__ */ jsx52(
|
|
6640
|
+
return /* @__PURE__ */ jsx52(Users2, { className: iconClass });
|
|
6563
6641
|
case "micro":
|
|
6564
|
-
return /* @__PURE__ */ jsx52(
|
|
6642
|
+
return /* @__PURE__ */ jsx52(UserCheck, { className: iconClass });
|
|
6565
6643
|
case "mid":
|
|
6566
|
-
return /* @__PURE__ */ jsx52(
|
|
6644
|
+
return /* @__PURE__ */ jsx52(TrendingUp, { className: iconClass });
|
|
6567
6645
|
case "macro":
|
|
6568
|
-
return /* @__PURE__ */ jsx52(
|
|
6646
|
+
return /* @__PURE__ */ jsx52(Award, { className: iconClass });
|
|
6569
6647
|
case "mega":
|
|
6570
|
-
return /* @__PURE__ */ jsx52(
|
|
6648
|
+
return /* @__PURE__ */ jsx52(Crown, { className: iconClass });
|
|
6571
6649
|
default:
|
|
6572
|
-
return /* @__PURE__ */ jsx52(
|
|
6650
|
+
return /* @__PURE__ */ jsx52(Users2, { className: iconClass });
|
|
6573
6651
|
}
|
|
6574
6652
|
};
|
|
6575
6653
|
var translations = {
|
|
@@ -6695,10 +6773,10 @@ var EngagementRate = React24.forwardRef(
|
|
|
6695
6773
|
min: r.average[0],
|
|
6696
6774
|
max: r.average[1],
|
|
6697
6775
|
display: `${r.average[0]}% - ${r.average[1]}%`,
|
|
6698
|
-
color: "#
|
|
6699
|
-
//
|
|
6700
|
-
hoverColor: "#
|
|
6701
|
-
//
|
|
6776
|
+
color: "#22c55e",
|
|
6777
|
+
// brand green (green-500)
|
|
6778
|
+
hoverColor: "#16a34a"
|
|
6779
|
+
// brand green hover (green-600)
|
|
6702
6780
|
},
|
|
6703
6781
|
{
|
|
6704
6782
|
label: t.couldBeImproved,
|
|
@@ -7039,10 +7117,10 @@ var EngagementRateBar = React25.forwardRef(
|
|
|
7039
7117
|
label: t.average,
|
|
7040
7118
|
min: r.average[0],
|
|
7041
7119
|
max: r.average[1],
|
|
7042
|
-
color: "#
|
|
7043
|
-
//
|
|
7044
|
-
hoverColor: "#
|
|
7045
|
-
//
|
|
7120
|
+
color: "#22c55e",
|
|
7121
|
+
// brand green (green-500)
|
|
7122
|
+
hoverColor: "#16a34a"
|
|
7123
|
+
// brand green hover (green-600)
|
|
7046
7124
|
},
|
|
7047
7125
|
{
|
|
7048
7126
|
label: t.couldBeImproved,
|
|
@@ -7182,7 +7260,7 @@ var progressIndicatorVariants = cva12(
|
|
|
7182
7260
|
primary: "bg-brand-500",
|
|
7183
7261
|
secondary: "bg-foreground",
|
|
7184
7262
|
success: "bg-green-500",
|
|
7185
|
-
warning: "bg-
|
|
7263
|
+
warning: "bg-warning-500",
|
|
7186
7264
|
destructive: "bg-destructive-500"
|
|
7187
7265
|
}
|
|
7188
7266
|
},
|
|
@@ -7229,6 +7307,7 @@ function Progress({
|
|
|
7229
7307
|
|
|
7230
7308
|
// src/components/ui/radio-group.tsx
|
|
7231
7309
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
7310
|
+
import { CircleIcon as CircleIcon4 } from "lucide-react";
|
|
7232
7311
|
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
7233
7312
|
function RadioGroup4({
|
|
7234
7313
|
className,
|
|
@@ -7261,7 +7340,7 @@ function RadioGroupItem({
|
|
|
7261
7340
|
{
|
|
7262
7341
|
"data-slot": "radio-group-indicator",
|
|
7263
7342
|
className: "relative flex items-center justify-center",
|
|
7264
|
-
children: /* @__PURE__ */ jsx55(
|
|
7343
|
+
children: /* @__PURE__ */ jsx55(CircleIcon4, { className: "fill-brand absolute top-1/2 start-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rtl:translate-x-1/2" })
|
|
7265
7344
|
}
|
|
7266
7345
|
)
|
|
7267
7346
|
}
|
|
@@ -7329,6 +7408,7 @@ var RadioCardDescription = React26.forwardRef(({ className, ...props }, ref) =>
|
|
|
7329
7408
|
RadioCardDescription.displayName = "RadioCardDescription";
|
|
7330
7409
|
|
|
7331
7410
|
// src/components/ui/resizable.tsx
|
|
7411
|
+
import { GripVerticalIcon } from "lucide-react";
|
|
7332
7412
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
7333
7413
|
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
7334
7414
|
function ResizablePanelGroup({
|
|
@@ -7366,7 +7446,7 @@ function ResizableHandle({
|
|
|
7366
7446
|
className
|
|
7367
7447
|
),
|
|
7368
7448
|
...props,
|
|
7369
|
-
children: withHandle && /* @__PURE__ */ jsx57("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx57(
|
|
7449
|
+
children: withHandle && /* @__PURE__ */ jsx57("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ jsx57(GripVerticalIcon, { className: "size-2.5" }) })
|
|
7370
7450
|
}
|
|
7371
7451
|
);
|
|
7372
7452
|
}
|
|
@@ -7431,6 +7511,7 @@ function ScrollBar({
|
|
|
7431
7511
|
// src/components/ui/select.tsx
|
|
7432
7512
|
import * as React27 from "react";
|
|
7433
7513
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
7514
|
+
import { Check as Check2, ChevronDown as ChevronDown2, ChevronUp as ChevronUp2 } from "lucide-react";
|
|
7434
7515
|
import { cva as cva13 } from "class-variance-authority";
|
|
7435
7516
|
import { jsx as jsx59, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7436
7517
|
var Select = SelectPrimitive.Root;
|
|
@@ -7469,7 +7550,7 @@ var SelectTrigger = React27.forwardRef(({ className, children, size, ...props },
|
|
|
7469
7550
|
...props,
|
|
7470
7551
|
children: [
|
|
7471
7552
|
children,
|
|
7472
|
-
/* @__PURE__ */ jsx59(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx59(
|
|
7553
|
+
/* @__PURE__ */ jsx59(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx59(ChevronDown2, { className: "h-4 w-4 text-foreground-lighter flex-shrink-0", strokeWidth: 1.5 }) })
|
|
7473
7554
|
]
|
|
7474
7555
|
}
|
|
7475
7556
|
));
|
|
@@ -7483,7 +7564,7 @@ var SelectScrollUpButton = React27.forwardRef(({ className, ...props }, ref) =>
|
|
|
7483
7564
|
className
|
|
7484
7565
|
),
|
|
7485
7566
|
...props,
|
|
7486
|
-
children: /* @__PURE__ */ jsx59(
|
|
7567
|
+
children: /* @__PURE__ */ jsx59(ChevronUp2, { className: "h-4 w-4" })
|
|
7487
7568
|
}
|
|
7488
7569
|
));
|
|
7489
7570
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
@@ -7496,7 +7577,7 @@ var SelectScrollDownButton = React27.forwardRef(({ className, ...props }, ref) =
|
|
|
7496
7577
|
className
|
|
7497
7578
|
),
|
|
7498
7579
|
...props,
|
|
7499
|
-
children: /* @__PURE__ */ jsx59(
|
|
7580
|
+
children: /* @__PURE__ */ jsx59(ChevronDown2, { className: "h-4 w-4" })
|
|
7500
7581
|
}
|
|
7501
7582
|
));
|
|
7502
7583
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
@@ -7551,7 +7632,7 @@ var SelectItem = React27.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
7551
7632
|
),
|
|
7552
7633
|
...props,
|
|
7553
7634
|
children: [
|
|
7554
|
-
/* @__PURE__ */ jsx59("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx59(SelectPrimitive.ItemIndicator, { className: "h-3.5 w-3.5 bg-foreground rounded-full flex justify-center items-center", children: /* @__PURE__ */ jsx59(
|
|
7635
|
+
/* @__PURE__ */ jsx59("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx59(SelectPrimitive.ItemIndicator, { className: "h-3.5 w-3.5 bg-foreground rounded-full flex justify-center items-center", children: /* @__PURE__ */ jsx59(Check2, { className: "h-2 w-2 text-background-overlay", strokeWidth: 6 }) }) }),
|
|
7555
7636
|
/* @__PURE__ */ jsx59(SelectPrimitive.ItemText, { children: typeof children === "string" ? /* @__PURE__ */ jsx59("span", { children }) : children })
|
|
7556
7637
|
]
|
|
7557
7638
|
}
|
|
@@ -7569,6 +7650,7 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
7569
7650
|
|
|
7570
7651
|
// src/components/ui/sheet.tsx
|
|
7571
7652
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
7653
|
+
import { XIcon } from "lucide-react";
|
|
7572
7654
|
import { jsx as jsx60, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7573
7655
|
function Sheet({ ...props }) {
|
|
7574
7656
|
return /* @__PURE__ */ jsx60(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
@@ -7628,7 +7710,7 @@ function SheetContent({
|
|
|
7628
7710
|
children: [
|
|
7629
7711
|
children,
|
|
7630
7712
|
/* @__PURE__ */ jsxs37(SheetPrimitive.Close, { className: "absolute top-4 end-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-brand-default focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-selection data-[state=open]:text-foreground-muted", children: [
|
|
7631
|
-
/* @__PURE__ */ jsx60(
|
|
7713
|
+
/* @__PURE__ */ jsx60(XIcon, { className: "size-4" }),
|
|
7632
7714
|
/* @__PURE__ */ jsx60("span", { className: "sr-only", children: "Close" })
|
|
7633
7715
|
] })
|
|
7634
7716
|
]
|
|
@@ -7687,6 +7769,7 @@ function SheetDescription({
|
|
|
7687
7769
|
import * as React29 from "react";
|
|
7688
7770
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
7689
7771
|
import { cva as cva14 } from "class-variance-authority";
|
|
7772
|
+
import { PanelLeftIcon } from "lucide-react";
|
|
7690
7773
|
|
|
7691
7774
|
// src/hooks/use-mobile.ts
|
|
7692
7775
|
import * as React28 from "react";
|
|
@@ -7904,7 +7987,7 @@ function SidebarTrigger({
|
|
|
7904
7987
|
},
|
|
7905
7988
|
...props,
|
|
7906
7989
|
children: [
|
|
7907
|
-
/* @__PURE__ */ jsx61(
|
|
7990
|
+
/* @__PURE__ */ jsx61(PanelLeftIcon, {}),
|
|
7908
7991
|
/* @__PURE__ */ jsx61("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
7909
7992
|
]
|
|
7910
7993
|
}
|
|
@@ -8397,15 +8480,22 @@ function Slider({
|
|
|
8397
8480
|
}
|
|
8398
8481
|
|
|
8399
8482
|
// src/components/ui/sonner.tsx
|
|
8483
|
+
import {
|
|
8484
|
+
CheckIcon as CheckIcon5,
|
|
8485
|
+
InfoIcon,
|
|
8486
|
+
Loader2Icon as Loader2Icon2,
|
|
8487
|
+
TriangleAlertIcon,
|
|
8488
|
+
XCircleIcon
|
|
8489
|
+
} from "lucide-react";
|
|
8400
8490
|
import { useTheme } from "next-themes";
|
|
8401
8491
|
import { Toaster as Sonner } from "sonner";
|
|
8402
8492
|
import { toast } from "sonner";
|
|
8403
8493
|
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
8404
8494
|
var SONNER_DEFAULT_DURATION = 4e3;
|
|
8405
|
-
var StatusIconSuccess = () => /* @__PURE__ */ jsx63("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-brand-600 dark:bg-brand-500 p-0.5", children: /* @__PURE__ */ jsx63(
|
|
8406
|
-
var StatusIconInfo = () => /* @__PURE__ */ jsx63("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-foreground-lighter p-0.5", children: /* @__PURE__ */ jsx63(
|
|
8407
|
-
var StatusIconWarning = () => /* @__PURE__ */ jsx63("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-warning-600 dark:bg-warning-500 p-0.5", children: /* @__PURE__ */ jsx63(
|
|
8408
|
-
var StatusIconError = () => /* @__PURE__ */ jsx63("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-destructive-600 dark:bg-destructive-500 p-0.5", children: /* @__PURE__ */ jsx63(
|
|
8495
|
+
var StatusIconSuccess = () => /* @__PURE__ */ jsx63("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-brand-600 dark:bg-brand-500 p-0.5", children: /* @__PURE__ */ jsx63(CheckIcon5, { className: "size-3 text-white", strokeWidth: 3 }) });
|
|
8496
|
+
var StatusIconInfo = () => /* @__PURE__ */ jsx63("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-foreground-lighter p-0.5", children: /* @__PURE__ */ jsx63(InfoIcon, { className: "size-3 text-background-surface-200" }) });
|
|
8497
|
+
var StatusIconWarning = () => /* @__PURE__ */ jsx63("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-warning-600 dark:bg-warning-500 p-0.5", children: /* @__PURE__ */ jsx63(TriangleAlertIcon, { className: "size-3 text-white" }) });
|
|
8498
|
+
var StatusIconError = () => /* @__PURE__ */ jsx63("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-destructive-600 dark:bg-destructive-500 p-0.5", children: /* @__PURE__ */ jsx63(XCircleIcon, { className: "size-3 text-white" }) });
|
|
8409
8499
|
var Toaster = ({
|
|
8410
8500
|
dir = "rtl",
|
|
8411
8501
|
position = "bottom-left",
|
|
@@ -8422,7 +8512,7 @@ var Toaster = ({
|
|
|
8422
8512
|
info: /* @__PURE__ */ jsx63(StatusIconInfo, {}),
|
|
8423
8513
|
warning: /* @__PURE__ */ jsx63(StatusIconWarning, {}),
|
|
8424
8514
|
error: /* @__PURE__ */ jsx63(StatusIconError, {}),
|
|
8425
|
-
loading: /* @__PURE__ */ jsx63(
|
|
8515
|
+
loading: /* @__PURE__ */ jsx63(Loader2Icon2, { className: "size-4 animate-spin" })
|
|
8426
8516
|
},
|
|
8427
8517
|
theme,
|
|
8428
8518
|
className: "toaster group pointer-events-auto",
|
|
@@ -8806,136 +8896,236 @@ function resolveCssColor(styles, variable, fallback) {
|
|
|
8806
8896
|
if (raw.includes("%")) return `hsl(${raw})`;
|
|
8807
8897
|
return raw;
|
|
8808
8898
|
}
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
const
|
|
8826
|
-
|
|
8899
|
+
|
|
8900
|
+
// src/components/charts/PartoLineChart.tsx
|
|
8901
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
8902
|
+
var FALLBACKS = {
|
|
8903
|
+
foreground: "hsl(0 0% 98%)",
|
|
8904
|
+
border: "hsl(0 0% 45%)",
|
|
8905
|
+
mutedForeground: "hsl(0 0% 55%)",
|
|
8906
|
+
background: "hsl(0 0% 98%)",
|
|
8907
|
+
foregroundMuted: "hsl(0 0% 55%)",
|
|
8908
|
+
chart1: "hsl(12 76% 61%)",
|
|
8909
|
+
chart2: "hsl(173 58% 39%)",
|
|
8910
|
+
chart3: "hsl(197 37% 24%)",
|
|
8911
|
+
chart4: "hsl(43 74% 66%)",
|
|
8912
|
+
chart5: "hsl(27 87% 67%)"
|
|
8913
|
+
};
|
|
8914
|
+
function PartoLineChart({ className, ...props }) {
|
|
8915
|
+
const styles = useRootStyles();
|
|
8916
|
+
const getColor = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
8917
|
+
const addOpacity = (color, opacity) => {
|
|
8918
|
+
if (color.startsWith("hsl(")) {
|
|
8919
|
+
return color.replace(")", ` / ${opacity})`);
|
|
8920
|
+
}
|
|
8921
|
+
if (color.startsWith("rgb(")) {
|
|
8922
|
+
return color.replace("rgb(", "rgba(").replace(")", `, ${opacity})`);
|
|
8923
|
+
}
|
|
8924
|
+
return color;
|
|
8925
|
+
};
|
|
8926
|
+
const nivoTheme = {
|
|
8827
8927
|
background: "transparent",
|
|
8828
8928
|
text: {
|
|
8829
|
-
fontFamily:
|
|
8830
|
-
fill: foreground
|
|
8929
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
8930
|
+
fill: getColor("--foreground", FALLBACKS.foreground)
|
|
8831
8931
|
},
|
|
8832
8932
|
axis: {
|
|
8833
8933
|
domain: {
|
|
8834
8934
|
line: {
|
|
8835
|
-
stroke: border,
|
|
8935
|
+
stroke: getColor("--border", FALLBACKS.border),
|
|
8836
8936
|
strokeWidth: 1
|
|
8837
8937
|
}
|
|
8838
8938
|
},
|
|
8839
8939
|
ticks: {
|
|
8840
8940
|
line: {
|
|
8841
|
-
stroke: border,
|
|
8941
|
+
stroke: getColor("--border", FALLBACKS.border),
|
|
8842
8942
|
strokeWidth: 1
|
|
8843
8943
|
},
|
|
8844
8944
|
text: {
|
|
8845
|
-
fontFamily:
|
|
8846
|
-
fill: foregroundMuted
|
|
8945
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
8946
|
+
fill: getColor("--foreground-muted", FALLBACKS.foregroundMuted)
|
|
8847
8947
|
}
|
|
8848
8948
|
},
|
|
8849
8949
|
legend: {
|
|
8850
8950
|
text: {
|
|
8851
|
-
fontFamily:
|
|
8852
|
-
fill: foreground
|
|
8951
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
8952
|
+
fill: getColor("--foreground", FALLBACKS.foreground)
|
|
8853
8953
|
}
|
|
8854
8954
|
}
|
|
8855
8955
|
},
|
|
8856
8956
|
grid: {
|
|
8857
8957
|
line: {
|
|
8858
|
-
stroke: border,
|
|
8958
|
+
stroke: getColor("--border", FALLBACKS.border),
|
|
8859
8959
|
strokeWidth: 1,
|
|
8860
8960
|
strokeOpacity: 0.5
|
|
8861
8961
|
}
|
|
8862
8962
|
},
|
|
8863
8963
|
tooltip: {
|
|
8864
8964
|
container: {
|
|
8865
|
-
fontFamily:
|
|
8866
|
-
background,
|
|
8867
|
-
color: foreground,
|
|
8965
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
8966
|
+
background: getColor("--background", FALLBACKS.background),
|
|
8967
|
+
color: getColor("--foreground", FALLBACKS.foreground),
|
|
8868
8968
|
fontSize: 12,
|
|
8869
8969
|
borderRadius: "8px",
|
|
8870
|
-
border: `1px solid ${
|
|
8970
|
+
border: `1px solid ${addOpacity(getColor("--border", FALLBACKS.border), 0.5)}`,
|
|
8871
8971
|
boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",
|
|
8872
8972
|
padding: "10px"
|
|
8873
8973
|
}
|
|
8874
8974
|
},
|
|
8875
8975
|
legends: {
|
|
8876
8976
|
text: {
|
|
8877
|
-
fontFamily:
|
|
8878
|
-
fill: foreground
|
|
8977
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
8978
|
+
fill: getColor("--foreground", FALLBACKS.foreground)
|
|
8879
8979
|
}
|
|
8880
8980
|
}
|
|
8881
8981
|
};
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
chart1: "hsl(152.9deg 60% 52.9%)",
|
|
8889
|
-
chart2: "hsl(173 58% 39%)",
|
|
8890
|
-
chart3: "hsl(197 37% 24%)",
|
|
8891
|
-
chart4: "hsl(43 74% 66%)",
|
|
8892
|
-
chart5: "hsl(27 87% 67%)"
|
|
8893
|
-
};
|
|
8894
|
-
function resolveChartColors(styles, fallbacks) {
|
|
8895
|
-
const fb = { ...DEFAULT_FALLBACKS, ...fallbacks };
|
|
8896
|
-
const get = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
8897
|
-
return [
|
|
8898
|
-
get("--chart-1", fb.chart1),
|
|
8899
|
-
get("--chart-2", fb.chart2),
|
|
8900
|
-
get("--chart-3", fb.chart3),
|
|
8901
|
-
get("--chart-4", fb.chart4),
|
|
8902
|
-
get("--chart-5", fb.chart5)
|
|
8982
|
+
const defaultColors = [
|
|
8983
|
+
getColor("--chart-1", FALLBACKS.chart1),
|
|
8984
|
+
getColor("--chart-2", FALLBACKS.chart2),
|
|
8985
|
+
getColor("--chart-3", FALLBACKS.chart3),
|
|
8986
|
+
getColor("--chart-4", FALLBACKS.chart4),
|
|
8987
|
+
getColor("--chart-5", FALLBACKS.chart5)
|
|
8903
8988
|
];
|
|
8904
|
-
}
|
|
8905
|
-
|
|
8906
|
-
// src/components/charts/PartoLineChart.tsx
|
|
8907
|
-
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
8908
|
-
function PartoLineChart({ className, ...props }) {
|
|
8909
|
-
const styles = useRootStyles();
|
|
8910
|
-
const nivoTheme = createNivoTheme(styles);
|
|
8911
|
-
const defaultColors = resolveChartColors(styles);
|
|
8912
8989
|
return /* @__PURE__ */ jsx69("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx69(ResponsiveLine, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
8913
8990
|
}
|
|
8914
8991
|
|
|
8915
8992
|
// src/components/charts/PartoBarChart.tsx
|
|
8916
8993
|
import { ResponsiveBar } from "@nivo/bar";
|
|
8917
8994
|
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
8995
|
+
var FALLBACKS2 = {
|
|
8996
|
+
foreground: "hsl(0 0% 98%)",
|
|
8997
|
+
border: "hsl(0 0% 45%)",
|
|
8998
|
+
mutedForeground: "hsl(0 0% 55%)",
|
|
8999
|
+
popover: "hsl(0 0% 12%)",
|
|
9000
|
+
popoverForeground: "hsl(0 0% 98%)",
|
|
9001
|
+
chart1: "hsl(12 76% 61%)",
|
|
9002
|
+
chart2: "hsl(173 58% 39%)",
|
|
9003
|
+
chart3: "hsl(197 37% 24%)",
|
|
9004
|
+
chart4: "hsl(43 74% 66%)",
|
|
9005
|
+
chart5: "hsl(27 87% 67%)"
|
|
9006
|
+
};
|
|
8918
9007
|
function PartoBarChart({ className, ...props }) {
|
|
8919
9008
|
const styles = useRootStyles();
|
|
8920
|
-
const
|
|
8921
|
-
const
|
|
9009
|
+
const getColor = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
9010
|
+
const nivoTheme = {
|
|
9011
|
+
background: "transparent",
|
|
9012
|
+
text: {
|
|
9013
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9014
|
+
fill: getColor("--foreground", FALLBACKS2.foreground)
|
|
9015
|
+
},
|
|
9016
|
+
axis: {
|
|
9017
|
+
domain: {
|
|
9018
|
+
line: {
|
|
9019
|
+
stroke: getColor("--border", FALLBACKS2.border),
|
|
9020
|
+
strokeWidth: 1
|
|
9021
|
+
}
|
|
9022
|
+
},
|
|
9023
|
+
ticks: {
|
|
9024
|
+
line: {
|
|
9025
|
+
stroke: getColor("--border", FALLBACKS2.border),
|
|
9026
|
+
strokeWidth: 1
|
|
9027
|
+
},
|
|
9028
|
+
text: {
|
|
9029
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9030
|
+
fill: getColor("--muted-foreground", FALLBACKS2.mutedForeground)
|
|
9031
|
+
}
|
|
9032
|
+
},
|
|
9033
|
+
legend: {
|
|
9034
|
+
text: {
|
|
9035
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9036
|
+
fill: getColor("--foreground", FALLBACKS2.foreground)
|
|
9037
|
+
}
|
|
9038
|
+
}
|
|
9039
|
+
},
|
|
9040
|
+
grid: {
|
|
9041
|
+
line: {
|
|
9042
|
+
stroke: getColor("--border", FALLBACKS2.border),
|
|
9043
|
+
strokeWidth: 1,
|
|
9044
|
+
strokeOpacity: 0.4
|
|
9045
|
+
}
|
|
9046
|
+
},
|
|
9047
|
+
tooltip: {
|
|
9048
|
+
container: {
|
|
9049
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9050
|
+
background: getColor("--popover", FALLBACKS2.popover),
|
|
9051
|
+
color: getColor("--popover-foreground", FALLBACKS2.popoverForeground),
|
|
9052
|
+
fontSize: 12,
|
|
9053
|
+
borderRadius: "var(--radius)",
|
|
9054
|
+
boxShadow: "0 2px 12px rgba(0,0,0,0.15)",
|
|
9055
|
+
padding: "8px 12px"
|
|
9056
|
+
}
|
|
9057
|
+
},
|
|
9058
|
+
legends: {
|
|
9059
|
+
text: {
|
|
9060
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9061
|
+
fill: getColor("--foreground", FALLBACKS2.foreground)
|
|
9062
|
+
}
|
|
9063
|
+
}
|
|
9064
|
+
};
|
|
9065
|
+
const defaultColors = [
|
|
9066
|
+
getColor("--chart-1", FALLBACKS2.chart1),
|
|
9067
|
+
getColor("--chart-2", FALLBACKS2.chart2),
|
|
9068
|
+
getColor("--chart-3", FALLBACKS2.chart3),
|
|
9069
|
+
getColor("--chart-4", FALLBACKS2.chart4),
|
|
9070
|
+
getColor("--chart-5", FALLBACKS2.chart5)
|
|
9071
|
+
];
|
|
8922
9072
|
return /* @__PURE__ */ jsx70("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx70(ResponsiveBar, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
8923
9073
|
}
|
|
8924
9074
|
|
|
8925
9075
|
// src/components/charts/PartoPieChart.tsx
|
|
8926
9076
|
import { ResponsivePie } from "@nivo/pie";
|
|
8927
9077
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
9078
|
+
var FALLBACKS3 = {
|
|
9079
|
+
foreground: "hsl(0 0% 98%)",
|
|
9080
|
+
popover: "hsl(0 0% 12%)",
|
|
9081
|
+
popoverForeground: "hsl(0 0% 98%)",
|
|
9082
|
+
chart1: "hsl(12 76% 61%)",
|
|
9083
|
+
chart2: "hsl(173 58% 39%)",
|
|
9084
|
+
chart3: "hsl(197 37% 24%)",
|
|
9085
|
+
chart4: "hsl(43 74% 66%)",
|
|
9086
|
+
chart5: "hsl(27 87% 67%)"
|
|
9087
|
+
};
|
|
8928
9088
|
function PartoPieChart({ className, ...props }) {
|
|
8929
9089
|
const styles = useRootStyles();
|
|
8930
|
-
const
|
|
8931
|
-
const
|
|
9090
|
+
const getColor = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
9091
|
+
const nivoTheme = {
|
|
9092
|
+
background: "transparent",
|
|
9093
|
+
text: {
|
|
9094
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9095
|
+
fill: getColor("--foreground", FALLBACKS3.foreground)
|
|
9096
|
+
},
|
|
9097
|
+
tooltip: {
|
|
9098
|
+
container: {
|
|
9099
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9100
|
+
background: getColor("--popover", FALLBACKS3.popover),
|
|
9101
|
+
color: getColor("--popover-foreground", FALLBACKS3.popoverForeground),
|
|
9102
|
+
fontSize: 12,
|
|
9103
|
+
borderRadius: "var(--radius)",
|
|
9104
|
+
boxShadow: "0 2px 12px rgba(0,0,0,0.15)",
|
|
9105
|
+
padding: "8px 12px"
|
|
9106
|
+
}
|
|
9107
|
+
},
|
|
9108
|
+
legends: {
|
|
9109
|
+
text: {
|
|
9110
|
+
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9111
|
+
fill: getColor("--foreground", FALLBACKS3.foreground)
|
|
9112
|
+
}
|
|
9113
|
+
}
|
|
9114
|
+
};
|
|
9115
|
+
const defaultColors = [
|
|
9116
|
+
getColor("--chart-1", FALLBACKS3.chart1),
|
|
9117
|
+
getColor("--chart-2", FALLBACKS3.chart2),
|
|
9118
|
+
getColor("--chart-3", FALLBACKS3.chart3),
|
|
9119
|
+
getColor("--chart-4", FALLBACKS3.chart4),
|
|
9120
|
+
getColor("--chart-5", FALLBACKS3.chart5)
|
|
9121
|
+
];
|
|
8932
9122
|
return /* @__PURE__ */ jsx71("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx71(ResponsivePie, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
8933
9123
|
}
|
|
8934
9124
|
|
|
8935
9125
|
// src/components/charts/PartoHeatMap.tsx
|
|
8936
9126
|
import { ResponsiveHeatMap } from "@nivo/heatmap";
|
|
8937
9127
|
import { jsx as jsx72, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8938
|
-
var
|
|
9128
|
+
var FALLBACKS4 = {
|
|
8939
9129
|
foreground: "hsl(0 0% 98%)",
|
|
8940
9130
|
border: "hsl(0 0% 45%)",
|
|
8941
9131
|
mutedForeground: "hsl(0 0% 55%)",
|
|
@@ -9003,24 +9193,24 @@ function PartoHeatMap({
|
|
|
9003
9193
|
background: "transparent",
|
|
9004
9194
|
text: {
|
|
9005
9195
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9006
|
-
fill: getColor("--foreground",
|
|
9196
|
+
fill: getColor("--foreground", FALLBACKS4.foreground),
|
|
9007
9197
|
fontSize: 11
|
|
9008
9198
|
},
|
|
9009
9199
|
axis: {
|
|
9010
9200
|
domain: {
|
|
9011
9201
|
line: {
|
|
9012
|
-
stroke: getColor("--border",
|
|
9202
|
+
stroke: getColor("--border", FALLBACKS4.border),
|
|
9013
9203
|
strokeWidth: 1
|
|
9014
9204
|
}
|
|
9015
9205
|
},
|
|
9016
9206
|
ticks: {
|
|
9017
9207
|
line: {
|
|
9018
|
-
stroke: getColor("--border",
|
|
9208
|
+
stroke: getColor("--border", FALLBACKS4.border),
|
|
9019
9209
|
strokeWidth: 1
|
|
9020
9210
|
},
|
|
9021
9211
|
text: {
|
|
9022
9212
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9023
|
-
fill: getColor("--foreground",
|
|
9213
|
+
fill: getColor("--foreground", FALLBACKS4.foreground),
|
|
9024
9214
|
fontSize: 13,
|
|
9025
9215
|
fontWeight: 600
|
|
9026
9216
|
}
|
|
@@ -9028,7 +9218,7 @@ function PartoHeatMap({
|
|
|
9028
9218
|
legend: {
|
|
9029
9219
|
text: {
|
|
9030
9220
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9031
|
-
fill: getColor("--foreground",
|
|
9221
|
+
fill: getColor("--foreground", FALLBACKS4.foreground),
|
|
9032
9222
|
fontSize: 13,
|
|
9033
9223
|
fontWeight: 700
|
|
9034
9224
|
}
|
|
@@ -9036,26 +9226,26 @@ function PartoHeatMap({
|
|
|
9036
9226
|
},
|
|
9037
9227
|
grid: {
|
|
9038
9228
|
line: {
|
|
9039
|
-
stroke: getColor("--card",
|
|
9229
|
+
stroke: getColor("--card", FALLBACKS4.card),
|
|
9040
9230
|
strokeWidth: 3
|
|
9041
9231
|
}
|
|
9042
9232
|
},
|
|
9043
9233
|
tooltip: {
|
|
9044
9234
|
container: {
|
|
9045
9235
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9046
|
-
background: getColor("--popover",
|
|
9047
|
-
color: getColor("--popover-foreground",
|
|
9236
|
+
background: getColor("--popover", FALLBACKS4.popover),
|
|
9237
|
+
color: getColor("--popover-foreground", FALLBACKS4.popoverForeground),
|
|
9048
9238
|
fontSize: 12,
|
|
9049
9239
|
borderRadius: "var(--radius)",
|
|
9050
9240
|
boxShadow: "0 2px 4px rgba(0,0,0,0.2)",
|
|
9051
9241
|
padding: "8px 12px",
|
|
9052
|
-
border: `1px solid ${getColor("--border",
|
|
9242
|
+
border: `1px solid ${getColor("--border", FALLBACKS4.border)}`
|
|
9053
9243
|
}
|
|
9054
9244
|
},
|
|
9055
9245
|
legends: {
|
|
9056
9246
|
text: {
|
|
9057
9247
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9058
|
-
fill: getColor("--foreground",
|
|
9248
|
+
fill: getColor("--foreground", FALLBACKS4.foreground),
|
|
9059
9249
|
fontSize: 11
|
|
9060
9250
|
}
|
|
9061
9251
|
}
|
|
@@ -9124,7 +9314,7 @@ function PartoHeatMap({
|
|
|
9124
9314
|
emptyColor: getColor("--muted", "hsl(0 0% 20%)"),
|
|
9125
9315
|
borderRadius: 2,
|
|
9126
9316
|
borderWidth: 3,
|
|
9127
|
-
borderColor: getColor("--card",
|
|
9317
|
+
borderColor: getColor("--card", FALLBACKS4.card),
|
|
9128
9318
|
enableLabels: false,
|
|
9129
9319
|
animate: true,
|
|
9130
9320
|
motionConfig: "gentle",
|
|
@@ -9143,7 +9333,7 @@ import { Wordcloud } from "@visx/wordcloud";
|
|
|
9143
9333
|
import { scaleLog } from "@visx/scale";
|
|
9144
9334
|
import { Text } from "@visx/text";
|
|
9145
9335
|
import { jsx as jsx73, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
9146
|
-
var
|
|
9336
|
+
var FALLBACKS5 = {
|
|
9147
9337
|
primary: "hsl(12 76% 61%)"
|
|
9148
9338
|
};
|
|
9149
9339
|
var stableRandom = () => 0.5;
|
|
@@ -9177,7 +9367,7 @@ function PartoWordCloud({
|
|
|
9177
9367
|
const [hovered, setHovered] = React34.useState(null);
|
|
9178
9368
|
const containerRef = React34.useRef(null);
|
|
9179
9369
|
const getColor = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
9180
|
-
const primaryColor = getColor("--primary",
|
|
9370
|
+
const primaryColor = getColor("--primary", FALLBACKS5.primary);
|
|
9181
9371
|
const formattedWords = React34.useMemo(() => {
|
|
9182
9372
|
return words.map((word) => ({
|
|
9183
9373
|
...word,
|