@parto-system-design/ui 1.0.4 → 1.1.0
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 +1164 -1021
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +78 -347
- package/dist/index.d.cts +54 -25
- package/dist/index.d.ts +54 -25
- package/dist/index.js +1181 -1041
- package/dist/index.js.map +1 -1
- package/package.json +21 -4
- package/tailwind.config.ts +13 -297
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
@@ -167,6 +168,7 @@ __export(index_exports, {
|
|
|
167
168
|
FormItem: () => FormItem,
|
|
168
169
|
FormLabel: () => FormLabel,
|
|
169
170
|
FormMessage: () => FormMessage,
|
|
171
|
+
HashtagInput: () => HashtagInput,
|
|
170
172
|
HoverCard: () => HoverCard,
|
|
171
173
|
HoverCardContent: () => HoverCardContent,
|
|
172
174
|
HoverCardTrigger: () => HoverCardTrigger,
|
|
@@ -315,6 +317,7 @@ __export(index_exports, {
|
|
|
315
317
|
TabsContent: () => TabsContent,
|
|
316
318
|
TabsList: () => TabsList,
|
|
317
319
|
TabsTrigger: () => TabsTrigger,
|
|
320
|
+
TagInput: () => TagInput,
|
|
318
321
|
Textarea: () => Textarea,
|
|
319
322
|
Toaster: () => Toaster,
|
|
320
323
|
Toggle: () => Toggle,
|
|
@@ -342,9 +345,11 @@ __export(index_exports, {
|
|
|
342
345
|
getPersianWeekdayName: () => getPersianWeekdayName,
|
|
343
346
|
getPersianYear: () => getPersianYear,
|
|
344
347
|
getPersianYearsForDropdown: () => getPersianYearsForDropdown,
|
|
348
|
+
hashtagInputVariants: () => hashtagInputVariants,
|
|
345
349
|
instagramPostVariants: () => instagramPostVariants,
|
|
346
350
|
jalaliToGregorian: () => jalaliToGregorian,
|
|
347
351
|
navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
|
|
352
|
+
tagInputVariants: () => tagInputVariants,
|
|
348
353
|
toEnglishDigits: () => toEnglishDigits,
|
|
349
354
|
toPersianDigits: () => toPersianDigits,
|
|
350
355
|
toast: () => import_sonner2.toast,
|
|
@@ -358,95 +363,9 @@ module.exports = __toCommonJS(index_exports);
|
|
|
358
363
|
// src/lib/utils.ts
|
|
359
364
|
var import_clsx = require("clsx");
|
|
360
365
|
var import_tailwind_merge = require("tailwind-merge");
|
|
361
|
-
function cn(...inputs) {
|
|
362
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
363
|
-
}
|
|
364
|
-
function formatNumber(num, format3 = "exact") {
|
|
365
|
-
if (num === void 0 || num === null) return "0";
|
|
366
|
-
if (format3 === "exact") {
|
|
367
|
-
return num.toLocaleString("en-US");
|
|
368
|
-
}
|
|
369
|
-
if (num >= 1e9) {
|
|
370
|
-
return `${(num / 1e9).toFixed(1).replace(/\.0$/, "")}B`;
|
|
371
|
-
}
|
|
372
|
-
if (num >= 1e6) {
|
|
373
|
-
return `${(num / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
374
|
-
}
|
|
375
|
-
if (num >= 1e3) {
|
|
376
|
-
return `${(num / 1e3).toFixed(1).replace(/\.0$/, "")}K`;
|
|
377
|
-
}
|
|
378
|
-
return num.toString();
|
|
379
|
-
}
|
|
380
|
-
function formatRelativeTime(date) {
|
|
381
|
-
const now = /* @__PURE__ */ new Date();
|
|
382
|
-
const then = new Date(date);
|
|
383
|
-
const diffInSeconds = Math.floor((now.getTime() - then.getTime()) / 1e3);
|
|
384
|
-
const toPersianDigits2 = (num) => {
|
|
385
|
-
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
386
|
-
return num.toString().replace(/\d/g, (digit) => persianDigits[parseInt(digit)]);
|
|
387
|
-
};
|
|
388
|
-
if (diffInSeconds < 60) {
|
|
389
|
-
return "\u0647\u0645\u06CC\u0646 \u0627\u0644\u0627\u0646";
|
|
390
|
-
}
|
|
391
|
-
const diffInMinutes = Math.floor(diffInSeconds / 60);
|
|
392
|
-
if (diffInMinutes < 60) {
|
|
393
|
-
return `${toPersianDigits2(diffInMinutes)} \u062F\u0642\u06CC\u0642\u0647 \u067E\u06CC\u0634`;
|
|
394
|
-
}
|
|
395
|
-
const diffInHours = Math.floor(diffInMinutes / 60);
|
|
396
|
-
if (diffInHours < 24) {
|
|
397
|
-
return `${toPersianDigits2(diffInHours)} \u0633\u0627\u0639\u062A \u067E\u06CC\u0634`;
|
|
398
|
-
}
|
|
399
|
-
const diffInDays = Math.floor(diffInHours / 24);
|
|
400
|
-
if (diffInDays < 7) {
|
|
401
|
-
return `${toPersianDigits2(diffInDays)} \u0631\u0648\u0632 \u067E\u06CC\u0634`;
|
|
402
|
-
}
|
|
403
|
-
const diffInWeeks = Math.floor(diffInDays / 7);
|
|
404
|
-
if (diffInWeeks < 4) {
|
|
405
|
-
return `${toPersianDigits2(diffInWeeks)} \u0647\u0641\u062A\u0647 \u067E\u06CC\u0634`;
|
|
406
|
-
}
|
|
407
|
-
const diffInMonths = Math.floor(diffInDays / 30);
|
|
408
|
-
if (diffInMonths < 12) {
|
|
409
|
-
return `${toPersianDigits2(diffInMonths)} \u0645\u0627\u0647 \u067E\u06CC\u0634`;
|
|
410
|
-
}
|
|
411
|
-
const diffInYears = Math.floor(diffInDays / 365);
|
|
412
|
-
return `${toPersianDigits2(diffInYears)} \u0633\u0627\u0644 \u067E\u06CC\u0634`;
|
|
413
|
-
}
|
|
414
|
-
function formatAbsoluteTime(date) {
|
|
415
|
-
const d = new Date(date);
|
|
416
|
-
const toPersianDigits2 = (num) => {
|
|
417
|
-
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
418
|
-
return num.toString().replace(/\d/g, (digit) => persianDigits[parseInt(digit)]);
|
|
419
|
-
};
|
|
420
|
-
const persianMonths = [
|
|
421
|
-
"\u0641\u0631\u0648\u0631\u062F\u06CC\u0646",
|
|
422
|
-
"\u0627\u0631\u062F\u06CC\u0628\u0647\u0634\u062A",
|
|
423
|
-
"\u062E\u0631\u062F\u0627\u062F",
|
|
424
|
-
"\u062A\u06CC\u0631",
|
|
425
|
-
"\u0645\u0631\u062F\u0627\u062F",
|
|
426
|
-
"\u0634\u0647\u0631\u06CC\u0648\u0631",
|
|
427
|
-
"\u0645\u0647\u0631",
|
|
428
|
-
"\u0622\u0628\u0627\u0646",
|
|
429
|
-
"\u0622\u0630\u0631",
|
|
430
|
-
"\u062F\u06CC",
|
|
431
|
-
"\u0628\u0647\u0645\u0646",
|
|
432
|
-
"\u0627\u0633\u0641\u0646\u062F"
|
|
433
|
-
];
|
|
434
|
-
const year = d.getFullYear();
|
|
435
|
-
const month = d.getMonth();
|
|
436
|
-
const day = d.getDate();
|
|
437
|
-
const hours = d.getHours();
|
|
438
|
-
const minutes = d.getMinutes();
|
|
439
|
-
const persianYear = year - 621;
|
|
440
|
-
const persianMonth = persianMonths[month];
|
|
441
|
-
const persianDay = toPersianDigits2(day);
|
|
442
|
-
const persianHours = toPersianDigits2(hours);
|
|
443
|
-
const persianMinutes = toPersianDigits2(minutes.toString().padStart(2, "0"));
|
|
444
|
-
return `${persianDay} ${persianMonth} ${toPersianDigits2(persianYear)}\u060C ${persianHours}:${persianMinutes}`;
|
|
445
|
-
}
|
|
446
366
|
|
|
447
367
|
// src/lib/jalali-utils.ts
|
|
448
|
-
var
|
|
449
|
-
import_moment_jalaali.default.loadPersian({ usePersianDigits: true, dialect: "persian-modern" });
|
|
368
|
+
var import_date_fns_jalali = require("date-fns-jalali");
|
|
450
369
|
var PERSIAN_MONTHS = [
|
|
451
370
|
"\u0641\u0631\u0648\u0631\u062F\u06CC\u0646",
|
|
452
371
|
"\u0627\u0631\u062F\u06CC\u0628\u0647\u0634\u062A",
|
|
@@ -494,49 +413,59 @@ function toEnglishDigits(str) {
|
|
|
494
413
|
const arabicDigits = ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"];
|
|
495
414
|
return str.replace(/[۰-۹]/g, (digit) => String(persianDigits.indexOf(digit))).replace(/[٠-٩]/g, (digit) => String(arabicDigits.indexOf(digit)));
|
|
496
415
|
}
|
|
497
|
-
function formatJalaliDate(date,
|
|
498
|
-
|
|
416
|
+
function formatJalaliDate(date, formatStr = "yyyy/MM/dd") {
|
|
417
|
+
let finalFormatStr = formatStr;
|
|
418
|
+
if (finalFormatStr.includes("jYYYY")) finalFormatStr = finalFormatStr.replace(/jYYYY/g, "yyyy");
|
|
419
|
+
if (finalFormatStr.includes("jMMMM")) finalFormatStr = finalFormatStr.replace(/jMMMM/g, "MMMM");
|
|
420
|
+
if (finalFormatStr.includes("jMM")) finalFormatStr = finalFormatStr.replace(/jMM/g, "MM");
|
|
421
|
+
if (finalFormatStr.includes("jM")) finalFormatStr = finalFormatStr.replace(/jM/g, "M");
|
|
422
|
+
if (finalFormatStr.includes("jDD")) finalFormatStr = finalFormatStr.replace(/jDD/g, "dd");
|
|
423
|
+
if (finalFormatStr.includes("jD")) finalFormatStr = finalFormatStr.replace(/jD/g, "d");
|
|
424
|
+
return (0, import_date_fns_jalali.format)(date, finalFormatStr);
|
|
499
425
|
}
|
|
500
426
|
function getPersianMonthName(date) {
|
|
501
|
-
const monthIndex = (0,
|
|
427
|
+
const monthIndex = (0, import_date_fns_jalali.getMonth)(date);
|
|
502
428
|
return PERSIAN_MONTHS[monthIndex];
|
|
503
429
|
}
|
|
504
430
|
function getPersianMonthNameShort(date) {
|
|
505
|
-
const monthIndex = (0,
|
|
431
|
+
const monthIndex = (0, import_date_fns_jalali.getMonth)(date);
|
|
506
432
|
return PERSIAN_MONTHS_SHORT[monthIndex];
|
|
507
433
|
}
|
|
508
434
|
function getPersianWeekdayName(date, short = false) {
|
|
509
|
-
const dayIndex =
|
|
435
|
+
const dayIndex = date.getDay();
|
|
510
436
|
return short ? PERSIAN_WEEKDAYS_SHORT[dayIndex] : PERSIAN_WEEKDAYS[dayIndex];
|
|
511
437
|
}
|
|
512
438
|
function getPersianYear(date) {
|
|
513
|
-
return (0,
|
|
439
|
+
return (0, import_date_fns_jalali.getYear)(date);
|
|
514
440
|
}
|
|
515
441
|
function getPersianMonth(date) {
|
|
516
|
-
return (0,
|
|
442
|
+
return (0, import_date_fns_jalali.getMonth)(date);
|
|
517
443
|
}
|
|
518
444
|
function getPersianDay(date) {
|
|
519
|
-
return (0,
|
|
445
|
+
return (0, import_date_fns_jalali.getDate)(date);
|
|
520
446
|
}
|
|
521
447
|
function jalaliToGregorian(year, month, day) {
|
|
522
|
-
|
|
448
|
+
const yyyy = year.toString().padStart(4, "0");
|
|
449
|
+
const MM = (month + 1).toString().padStart(2, "0");
|
|
450
|
+
const dd = day.toString().padStart(2, "0");
|
|
451
|
+
const referenceDate = /* @__PURE__ */ new Date();
|
|
452
|
+
referenceDate.setHours(12, 0, 0, 0);
|
|
453
|
+
return (0, import_date_fns_jalali.parse)(`${yyyy}/${MM}/${dd}`, "yyyy/MM/dd", referenceDate);
|
|
523
454
|
}
|
|
524
455
|
function formatPersianDateRange(from, to) {
|
|
525
|
-
const
|
|
526
|
-
const
|
|
527
|
-
const
|
|
528
|
-
const
|
|
529
|
-
const
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
const toDay = toMoment.jDate();
|
|
533
|
-
if (fromYear === toYear && fromMonth === toMonth && fromDay === toDay) {
|
|
456
|
+
const fromYear = (0, import_date_fns_jalali.getYear)(from);
|
|
457
|
+
const toYear = (0, import_date_fns_jalali.getYear)(to);
|
|
458
|
+
const fromMonth = (0, import_date_fns_jalali.getMonth)(from);
|
|
459
|
+
const toMonth = (0, import_date_fns_jalali.getMonth)(to);
|
|
460
|
+
const fromDay = (0, import_date_fns_jalali.getDate)(from);
|
|
461
|
+
const toDay = (0, import_date_fns_jalali.getDate)(to);
|
|
462
|
+
if ((0, import_date_fns_jalali.isSameDay)(from, to)) {
|
|
534
463
|
return `${toPersianDigits(fromDay)} ${PERSIAN_MONTHS[fromMonth]} ${toPersianDigits(fromYear)}`;
|
|
535
464
|
}
|
|
536
|
-
if (
|
|
465
|
+
if ((0, import_date_fns_jalali.isSameYear)(from, to) && (0, import_date_fns_jalali.isSameMonth)(from, to)) {
|
|
537
466
|
return `${toPersianDigits(fromDay)} - ${toPersianDigits(toDay)} ${PERSIAN_MONTHS[fromMonth]} ${toPersianDigits(fromYear)}`;
|
|
538
467
|
}
|
|
539
|
-
if (
|
|
468
|
+
if ((0, import_date_fns_jalali.isSameYear)(from, to)) {
|
|
540
469
|
return `${toPersianDigits(fromDay)} ${PERSIAN_MONTHS[fromMonth]} - ${toPersianDigits(toDay)} ${PERSIAN_MONTHS[toMonth]} ${toPersianDigits(fromYear)}`;
|
|
541
470
|
}
|
|
542
471
|
return `${toPersianDigits(fromDay)} ${PERSIAN_MONTHS[fromMonth]} ${toPersianDigits(fromYear)} - ${toPersianDigits(toDay)} ${PERSIAN_MONTHS[toMonth]} ${toPersianDigits(toYear)}`;
|
|
@@ -558,11 +487,71 @@ function getPersianYearsForDropdown(fromYear, toYear) {
|
|
|
558
487
|
return years;
|
|
559
488
|
}
|
|
560
489
|
|
|
490
|
+
// src/lib/utils.ts
|
|
491
|
+
function cn(...inputs) {
|
|
492
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
493
|
+
}
|
|
494
|
+
function formatNumber(num, format4 = "exact") {
|
|
495
|
+
if (num === void 0 || num === null) return "0";
|
|
496
|
+
if (format4 === "exact") {
|
|
497
|
+
return num.toLocaleString("en-US");
|
|
498
|
+
}
|
|
499
|
+
if (num >= 1e9) {
|
|
500
|
+
return `${(num / 1e9).toFixed(1).replace(/\.0$/, "")}B`;
|
|
501
|
+
}
|
|
502
|
+
if (num >= 1e6) {
|
|
503
|
+
return `${(num / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
504
|
+
}
|
|
505
|
+
if (num >= 1e3) {
|
|
506
|
+
return `${(num / 1e3).toFixed(1).replace(/\.0$/, "")}K`;
|
|
507
|
+
}
|
|
508
|
+
return num.toString();
|
|
509
|
+
}
|
|
510
|
+
function formatRelativeTime(date) {
|
|
511
|
+
const now = /* @__PURE__ */ new Date();
|
|
512
|
+
const then = new Date(date);
|
|
513
|
+
const diffInSeconds = Math.floor((now.getTime() - then.getTime()) / 1e3);
|
|
514
|
+
if (diffInSeconds < 60) {
|
|
515
|
+
return "\u0647\u0645\u06CC\u0646 \u0627\u0644\u0627\u0646";
|
|
516
|
+
}
|
|
517
|
+
const diffInMinutes = Math.floor(diffInSeconds / 60);
|
|
518
|
+
if (diffInMinutes < 60) {
|
|
519
|
+
return `${toPersianDigits(diffInMinutes)} \u062F\u0642\u06CC\u0642\u0647 \u067E\u06CC\u0634`;
|
|
520
|
+
}
|
|
521
|
+
const diffInHours = Math.floor(diffInMinutes / 60);
|
|
522
|
+
if (diffInHours < 24) {
|
|
523
|
+
return `${toPersianDigits(diffInHours)} \u0633\u0627\u0639\u062A \u067E\u06CC\u0634`;
|
|
524
|
+
}
|
|
525
|
+
const diffInDays = Math.floor(diffInHours / 24);
|
|
526
|
+
if (diffInDays < 7) {
|
|
527
|
+
return `${toPersianDigits(diffInDays)} \u0631\u0648\u0632 \u067E\u06CC\u0634`;
|
|
528
|
+
}
|
|
529
|
+
const diffInWeeks = Math.floor(diffInDays / 7);
|
|
530
|
+
if (diffInWeeks < 4) {
|
|
531
|
+
return `${toPersianDigits(diffInWeeks)} \u0647\u0641\u062A\u0647 \u067E\u06CC\u0634`;
|
|
532
|
+
}
|
|
533
|
+
const diffInMonths = Math.floor(diffInDays / 30);
|
|
534
|
+
if (diffInMonths < 12) {
|
|
535
|
+
return `${toPersianDigits(diffInMonths)} \u0645\u0627\u0647 \u067E\u06CC\u0634`;
|
|
536
|
+
}
|
|
537
|
+
const diffInYears = Math.floor(diffInDays / 365);
|
|
538
|
+
return `${toPersianDigits(diffInYears)} \u0633\u0627\u0644 \u067E\u06CC\u0634`;
|
|
539
|
+
}
|
|
540
|
+
function formatAbsoluteTime(date) {
|
|
541
|
+
const d = new Date(date);
|
|
542
|
+
const year = getPersianYear(d);
|
|
543
|
+
const month = getPersianMonth(d);
|
|
544
|
+
const day = getPersianDay(d);
|
|
545
|
+
const hours = d.getHours();
|
|
546
|
+
const minutes = d.getMinutes();
|
|
547
|
+
return `${toPersianDigits(day)} ${PERSIAN_MONTHS[month]} ${toPersianDigits(year)}\u060C ${toPersianDigits(hours)}:${toPersianDigits(String(minutes).padStart(2, "0"))}`;
|
|
548
|
+
}
|
|
549
|
+
|
|
561
550
|
// src/icons.tsx
|
|
562
551
|
var import_lucide_react = require("lucide-react");
|
|
563
552
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
564
553
|
var Icons = {
|
|
565
|
-
|
|
554
|
+
/** Parto layered logo mark (generic) */
|
|
566
555
|
logo: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
567
556
|
"svg",
|
|
568
557
|
{
|
|
@@ -581,6 +570,7 @@ var Icons = {
|
|
|
581
570
|
]
|
|
582
571
|
}
|
|
583
572
|
),
|
|
573
|
+
/** Official Parto brand mark (triangle composition) */
|
|
584
574
|
parto: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
585
575
|
"svg",
|
|
586
576
|
{
|
|
@@ -600,6 +590,7 @@ var Icons = {
|
|
|
600
590
|
arrowRight: import_lucide_react.ArrowRight,
|
|
601
591
|
arrowLeft: import_lucide_react.ArrowLeft,
|
|
602
592
|
bold: import_lucide_react.Bold,
|
|
593
|
+
building: import_lucide_react.Building,
|
|
603
594
|
calendar: import_lucide_react.Calendar,
|
|
604
595
|
check: import_lucide_react.Check,
|
|
605
596
|
chevronDown: import_lucide_react.ChevronDown,
|
|
@@ -608,47 +599,19 @@ var Icons = {
|
|
|
608
599
|
chevronUp: import_lucide_react.ChevronUp,
|
|
609
600
|
circle: import_lucide_react.Circle,
|
|
610
601
|
clock: import_lucide_react.Clock,
|
|
602
|
+
/** Use for close/dismiss actions (X mark) */
|
|
603
|
+
close: import_lucide_react.X,
|
|
611
604
|
copy: import_lucide_react.Copy,
|
|
612
605
|
download: import_lucide_react.Download,
|
|
613
606
|
eye: import_lucide_react.Eye,
|
|
614
607
|
eyeOff: import_lucide_react.EyeOff,
|
|
615
608
|
file: import_lucide_react.File,
|
|
616
609
|
fileText: import_lucide_react.FileText,
|
|
617
|
-
heart: import_lucide_react.Heart,
|
|
618
|
-
home: import_lucide_react.Home,
|
|
619
|
-
image: import_lucide_react.Image,
|
|
620
|
-
images: import_lucide_react.Images,
|
|
621
|
-
inbox: import_lucide_react.Inbox,
|
|
622
|
-
info: import_lucide_react.Info,
|
|
623
|
-
italic: import_lucide_react.Italic,
|
|
624
|
-
loader: import_lucide_react.Loader2,
|
|
625
|
-
menu: import_lucide_react.Menu,
|
|
626
|
-
messageCircle: import_lucide_react.MessageCircle,
|
|
627
|
-
moon: import_lucide_react.Moon,
|
|
628
|
-
moreHorizontal: import_lucide_react.MoreHorizontal,
|
|
629
|
-
moreVertical: import_lucide_react.MoreVertical,
|
|
630
|
-
plus: import_lucide_react.Plus,
|
|
631
|
-
rocket: import_lucide_react.Rocket,
|
|
632
|
-
search: import_lucide_react.Search,
|
|
633
|
-
settings: import_lucide_react.Settings,
|
|
634
|
-
share: import_lucide_react.Share2,
|
|
635
|
-
sparkles: import_lucide_react.Sparkles,
|
|
636
|
-
sun: import_lucide_react.Sun,
|
|
637
|
-
trash: import_lucide_react.Trash,
|
|
638
|
-
underline: import_lucide_react.Underline,
|
|
639
|
-
user: import_lucide_react.User,
|
|
640
|
-
users: import_lucide_react.Users,
|
|
641
|
-
video: import_lucide_react.Video,
|
|
642
|
-
building: import_lucide_react.Building,
|
|
643
|
-
close: import_lucide_react.X,
|
|
644
|
-
spinner: import_lucide_react.Loader2,
|
|
645
610
|
gitHub: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
646
611
|
"svg",
|
|
647
612
|
{
|
|
648
613
|
"aria-hidden": "true",
|
|
649
614
|
focusable: "false",
|
|
650
|
-
"data-prefix": "fab",
|
|
651
|
-
"data-icon": "github",
|
|
652
615
|
role: "img",
|
|
653
616
|
xmlns: "http://www.w3.org/2000/svg",
|
|
654
617
|
viewBox: "0 0 496 512",
|
|
@@ -662,7 +625,13 @@ var Icons = {
|
|
|
662
625
|
)
|
|
663
626
|
}
|
|
664
627
|
),
|
|
665
|
-
|
|
628
|
+
heart: import_lucide_react.Heart,
|
|
629
|
+
home: import_lucide_react.Home,
|
|
630
|
+
image: import_lucide_react.Image,
|
|
631
|
+
images: import_lucide_react.Images,
|
|
632
|
+
inbox: import_lucide_react.Inbox,
|
|
633
|
+
info: import_lucide_react.Info,
|
|
634
|
+
instagram: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
666
635
|
"svg",
|
|
667
636
|
{
|
|
668
637
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -673,10 +642,30 @@ var Icons = {
|
|
|
673
642
|
strokeLinecap: "round",
|
|
674
643
|
strokeLinejoin: "round",
|
|
675
644
|
...props,
|
|
676
|
-
children:
|
|
645
|
+
children: [
|
|
646
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", ry: "5" }),
|
|
647
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
|
|
648
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "17.5", y1: "6.5", x2: "17.51", y2: "6.5" })
|
|
649
|
+
]
|
|
677
650
|
}
|
|
678
651
|
),
|
|
679
|
-
|
|
652
|
+
italic: import_lucide_react.Italic,
|
|
653
|
+
/** Animated loading spinner — prefer this over a custom spinner */
|
|
654
|
+
loader: import_lucide_react.Loader2,
|
|
655
|
+
menu: import_lucide_react.Menu,
|
|
656
|
+
messageCircle: import_lucide_react.MessageCircle,
|
|
657
|
+
moon: import_lucide_react.Moon,
|
|
658
|
+
moreHorizontal: import_lucide_react.MoreHorizontal,
|
|
659
|
+
moreVertical: import_lucide_react.MoreVertical,
|
|
660
|
+
plus: import_lucide_react.Plus,
|
|
661
|
+
rocket: import_lucide_react.Rocket,
|
|
662
|
+
search: import_lucide_react.Search,
|
|
663
|
+
settings: import_lucide_react.Settings,
|
|
664
|
+
share: import_lucide_react.Share2,
|
|
665
|
+
sparkles: import_lucide_react.Sparkles,
|
|
666
|
+
sun: import_lucide_react.Sun,
|
|
667
|
+
trash: import_lucide_react.Trash,
|
|
668
|
+
twitter: (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
680
669
|
"svg",
|
|
681
670
|
{
|
|
682
671
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -687,18 +676,27 @@ var Icons = {
|
|
|
687
676
|
strokeLinecap: "round",
|
|
688
677
|
strokeLinejoin: "round",
|
|
689
678
|
...props,
|
|
690
|
-
children:
|
|
691
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "2", y: "2", width: "20", height: "20", rx: "5", ry: "5" }),
|
|
692
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
|
|
693
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "17.5", y1: "6.5", x2: "17.51", y2: "6.5" })
|
|
694
|
-
]
|
|
679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.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" })
|
|
695
680
|
}
|
|
696
|
-
)
|
|
681
|
+
),
|
|
682
|
+
underline: import_lucide_react.Underline,
|
|
683
|
+
user: import_lucide_react.User,
|
|
684
|
+
users: import_lucide_react.Users,
|
|
685
|
+
video: import_lucide_react.Video,
|
|
686
|
+
userCheck: import_lucide_react.UserCheck,
|
|
687
|
+
trendingUp: import_lucide_react.TrendingUp,
|
|
688
|
+
award: import_lucide_react.Award,
|
|
689
|
+
crown: import_lucide_react.Crown,
|
|
690
|
+
minus: import_lucide_react.Minus,
|
|
691
|
+
imageOff: import_lucide_react.ImageOff,
|
|
692
|
+
externalLink: import_lucide_react.ExternalLink,
|
|
693
|
+
gripVertical: import_lucide_react.GripVertical,
|
|
694
|
+
panelLeft: import_lucide_react.PanelLeft,
|
|
695
|
+
xCircle: import_lucide_react.XCircle
|
|
697
696
|
};
|
|
698
697
|
|
|
699
698
|
// src/components/ui/accordion.tsx
|
|
700
699
|
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"), 1);
|
|
701
|
-
var import_lucide_react2 = require("lucide-react");
|
|
702
700
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
703
701
|
function Accordion({
|
|
704
702
|
...props
|
|
@@ -734,7 +732,7 @@ function AccordionTrigger({
|
|
|
734
732
|
...props,
|
|
735
733
|
children: [
|
|
736
734
|
children,
|
|
737
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
735
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icons.chevronDown, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
|
|
738
736
|
]
|
|
739
737
|
}
|
|
740
738
|
) });
|
|
@@ -812,7 +810,6 @@ var AlertDialogPrimitive = __toESM(require("@radix-ui/react-alert-dialog"), 1);
|
|
|
812
810
|
// src/components/ui/button.tsx
|
|
813
811
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
814
812
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
815
|
-
var import_lucide_react3 = require("lucide-react");
|
|
816
813
|
var import_react = require("react");
|
|
817
814
|
|
|
818
815
|
// src/lib/constants.ts
|
|
@@ -1126,11 +1123,11 @@ var Button = (0, import_react.forwardRef)(
|
|
|
1126
1123
|
children: asChild ? (0, import_react.isValidElement)(children) ? (0, import_react.cloneElement)(
|
|
1127
1124
|
children,
|
|
1128
1125
|
void 0,
|
|
1129
|
-
showIcon && (loading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1126
|
+
showIcon && (loading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icons.loader, { className: cn(loadingVariants({ loading, variant: buttonVariant })) }) }) : _iconLeft ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: _iconLeft }) : null),
|
|
1130
1127
|
children.props?.children && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "truncate", children: children.props.children }),
|
|
1131
1128
|
iconRight && !loading && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: iconRight })
|
|
1132
1129
|
) : null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
1133
|
-
showIcon && (loading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1130
|
+
showIcon && (loading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icons.loader, { className: cn(loadingVariants({ loading, variant: buttonVariant })) }) }) : _iconLeft ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: cn(IconContainerVariants({ size: iconSize, variant: buttonVariant })), children: _iconLeft }) : null),
|
|
1134
1131
|
" ",
|
|
1135
1132
|
children && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "truncate", children }),
|
|
1136
1133
|
" ",
|
|
@@ -1309,11 +1306,10 @@ var Input = React3.forwardRef(
|
|
|
1309
1306
|
Input.displayName = "Input";
|
|
1310
1307
|
|
|
1311
1308
|
// src/components/ui/spinner.tsx
|
|
1312
|
-
var import_lucide_react4 = require("lucide-react");
|
|
1313
1309
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1314
1310
|
function Spinner({ className, ...props }) {
|
|
1315
1311
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1316
|
-
|
|
1312
|
+
Icons.loader,
|
|
1317
1313
|
{
|
|
1318
1314
|
role: "status",
|
|
1319
1315
|
"aria-label": "Loading",
|
|
@@ -2021,7 +2017,6 @@ function Badge({
|
|
|
2021
2017
|
|
|
2022
2018
|
// src/components/ui/breadcrumb.tsx
|
|
2023
2019
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
2024
|
-
var import_lucide_react5 = require("lucide-react");
|
|
2025
2020
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2026
2021
|
function Breadcrumb({ ...props }) {
|
|
2027
2022
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
@@ -2096,7 +2091,7 @@ function BreadcrumbSeparator({
|
|
|
2096
2091
|
"aria-hidden": "true",
|
|
2097
2092
|
className: cn("[&>svg]:size-3.5", className),
|
|
2098
2093
|
...props,
|
|
2099
|
-
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2094
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icons.chevronRight, {})
|
|
2100
2095
|
}
|
|
2101
2096
|
);
|
|
2102
2097
|
}
|
|
@@ -2113,7 +2108,7 @@ function BreadcrumbEllipsis({
|
|
|
2113
2108
|
className: cn("flex size-9 items-center justify-center", className),
|
|
2114
2109
|
...props,
|
|
2115
2110
|
children: [
|
|
2116
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icons.moreHorizontal, { className: "size-4" }),
|
|
2117
2112
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sr-only", children: "More" })
|
|
2118
2113
|
]
|
|
2119
2114
|
}
|
|
@@ -2247,7 +2242,6 @@ function ButtonGroupSeparator({
|
|
|
2247
2242
|
}
|
|
2248
2243
|
|
|
2249
2244
|
// src/components/ui/calendar.tsx
|
|
2250
|
-
var import_lucide_react6 = require("lucide-react");
|
|
2251
2245
|
var import_react_day_picker = require("react-day-picker");
|
|
2252
2246
|
var import_persian = require("react-day-picker/persian");
|
|
2253
2247
|
var import_locale = require("date-fns/locale");
|
|
@@ -2332,14 +2326,14 @@ function Calendar2({
|
|
|
2332
2326
|
Chevron: ({ orientation }) => {
|
|
2333
2327
|
if (usePersianCalendar) {
|
|
2334
2328
|
if (orientation === "left") {
|
|
2335
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icons.chevronRight, { className: "h-4 w-4" });
|
|
2336
2330
|
}
|
|
2337
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icons.chevronLeft, { className: "h-4 w-4" });
|
|
2338
2332
|
}
|
|
2339
2333
|
if (orientation === "left") {
|
|
2340
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icons.chevronLeft, { className: "h-4 w-4" });
|
|
2341
2335
|
}
|
|
2342
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icons.chevronRight, { className: "h-4 w-4" });
|
|
2343
2337
|
}
|
|
2344
2338
|
},
|
|
2345
2339
|
...props
|
|
@@ -2391,7 +2385,6 @@ CardFooter.displayName = "CardFooter";
|
|
|
2391
2385
|
// src/components/ui/carousel.tsx
|
|
2392
2386
|
var React8 = __toESM(require("react"), 1);
|
|
2393
2387
|
var import_embla_carousel_react = __toESM(require("embla-carousel-react"), 1);
|
|
2394
|
-
var import_lucide_react7 = require("lucide-react");
|
|
2395
2388
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2396
2389
|
var CarouselContext = React8.createContext(null);
|
|
2397
2390
|
function useCarousel() {
|
|
@@ -2585,7 +2578,7 @@ function CarouselPrevious({
|
|
|
2585
2578
|
onClick: scrollPrev,
|
|
2586
2579
|
...props,
|
|
2587
2580
|
children: [
|
|
2588
|
-
isRTL ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2581
|
+
isRTL ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icons.arrowRight, {}) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icons.arrowLeft, {}),
|
|
2589
2582
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sr-only", children: "Previous slide" })
|
|
2590
2583
|
]
|
|
2591
2584
|
}
|
|
@@ -2616,7 +2609,7 @@ function CarouselNext({
|
|
|
2616
2609
|
onClick: scrollNext,
|
|
2617
2610
|
...props,
|
|
2618
2611
|
children: [
|
|
2619
|
-
isRTL ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2612
|
+
isRTL ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icons.arrowLeft, {}) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icons.arrowRight, {}),
|
|
2620
2613
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sr-only", children: "Next slide" })
|
|
2621
2614
|
]
|
|
2622
2615
|
}
|
|
@@ -2625,7 +2618,6 @@ function CarouselNext({
|
|
|
2625
2618
|
|
|
2626
2619
|
// src/components/ui/checkbox.tsx
|
|
2627
2620
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
2628
|
-
var import_lucide_react8 = require("lucide-react");
|
|
2629
2621
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2630
2622
|
function Checkbox({
|
|
2631
2623
|
className,
|
|
@@ -2645,7 +2637,7 @@ function Checkbox({
|
|
|
2645
2637
|
{
|
|
2646
2638
|
"data-slot": "checkbox-indicator",
|
|
2647
2639
|
className: "grid place-content-center text-current transition-none",
|
|
2648
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2640
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icons.check, { className: "size-3.5" })
|
|
2649
2641
|
}
|
|
2650
2642
|
)
|
|
2651
2643
|
}
|
|
@@ -2685,12 +2677,10 @@ function CollapsibleContent2({
|
|
|
2685
2677
|
|
|
2686
2678
|
// src/components/ui/command.tsx
|
|
2687
2679
|
var import_cmdk = require("cmdk");
|
|
2688
|
-
var import_lucide_react10 = require("lucide-react");
|
|
2689
2680
|
|
|
2690
2681
|
// src/components/ui/dialog.tsx
|
|
2691
2682
|
var React9 = __toESM(require("react"), 1);
|
|
2692
2683
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
2693
|
-
var import_lucide_react9 = require("lucide-react");
|
|
2694
2684
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2695
2685
|
var Dialog = DialogPrimitive.Root;
|
|
2696
2686
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
@@ -2722,7 +2712,7 @@ var DialogContent = React9.forwardRef(({ className, children, ...props }, ref) =
|
|
|
2722
2712
|
children: [
|
|
2723
2713
|
children,
|
|
2724
2714
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(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: [
|
|
2725
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2715
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icons.close, { className: "h-4 w-4" }),
|
|
2726
2716
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "sr-only", children: "Close" })
|
|
2727
2717
|
] })
|
|
2728
2718
|
]
|
|
@@ -2829,7 +2819,7 @@ function CommandInput({
|
|
|
2829
2819
|
"data-slot": "command-input-wrapper",
|
|
2830
2820
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
2831
2821
|
children: [
|
|
2832
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icons.search, { className: "size-4 shrink-0 opacity-50" }),
|
|
2833
2823
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2834
2824
|
import_cmdk.Command.Input,
|
|
2835
2825
|
{
|
|
@@ -3008,7 +2998,6 @@ CommentCard.displayName = "CommentCard";
|
|
|
3008
2998
|
|
|
3009
2999
|
// src/components/ui/context-menu.tsx
|
|
3010
3000
|
var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"), 1);
|
|
3011
|
-
var import_lucide_react11 = require("lucide-react");
|
|
3012
3001
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3013
3002
|
function ContextMenu({
|
|
3014
3003
|
...props
|
|
@@ -3064,7 +3053,7 @@ function ContextMenuSubTrigger({
|
|
|
3064
3053
|
...props,
|
|
3065
3054
|
children: [
|
|
3066
3055
|
children,
|
|
3067
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3056
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icons.chevronRight, { className: "ms-auto rtl:rotate-180" })
|
|
3068
3057
|
]
|
|
3069
3058
|
}
|
|
3070
3059
|
);
|
|
@@ -3138,7 +3127,7 @@ function ContextMenuCheckboxItem({
|
|
|
3138
3127
|
checked,
|
|
3139
3128
|
...props,
|
|
3140
3129
|
children: [
|
|
3141
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3130
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icons.check, { className: "size-4" }) }) }),
|
|
3142
3131
|
children
|
|
3143
3132
|
]
|
|
3144
3133
|
}
|
|
@@ -3159,7 +3148,7 @@ function ContextMenuRadioItem({
|
|
|
3159
3148
|
),
|
|
3160
3149
|
...props,
|
|
3161
3150
|
children: [
|
|
3162
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3151
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icons.circle, { className: "size-2 fill-current" }) }) }),
|
|
3163
3152
|
children
|
|
3164
3153
|
]
|
|
3165
3154
|
}
|
|
@@ -3215,7 +3204,6 @@ function ContextMenuShortcut({
|
|
|
3215
3204
|
|
|
3216
3205
|
// src/components/ui/date-picker.tsx
|
|
3217
3206
|
var import_date_fns = require("date-fns");
|
|
3218
|
-
var import_lucide_react12 = require("lucide-react");
|
|
3219
3207
|
|
|
3220
3208
|
// src/components/ui/popover.tsx
|
|
3221
3209
|
var React11 = __toESM(require("react"), 1);
|
|
@@ -3355,7 +3343,7 @@ function DatePicker({
|
|
|
3355
3343
|
!value && "text-muted-foreground"
|
|
3356
3344
|
),
|
|
3357
3345
|
disabled,
|
|
3358
|
-
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3346
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icons.calendar, { className: "h-4 w-4" }),
|
|
3359
3347
|
children: displayText || placeholder || defaultPlaceholder
|
|
3360
3348
|
}
|
|
3361
3349
|
) }),
|
|
@@ -3414,7 +3402,6 @@ function DatePicker({
|
|
|
3414
3402
|
|
|
3415
3403
|
// src/components/ui/date-range-picker.tsx
|
|
3416
3404
|
var React12 = __toESM(require("react"), 1);
|
|
3417
|
-
var import_lucide_react13 = require("lucide-react");
|
|
3418
3405
|
|
|
3419
3406
|
// src/components/ui/label.tsx
|
|
3420
3407
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
@@ -3480,7 +3467,7 @@ function DateRangePicker({
|
|
|
3480
3467
|
),
|
|
3481
3468
|
children: [
|
|
3482
3469
|
formatDateRange2(value),
|
|
3483
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3470
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icons.chevronDown, { className: "size-4 opacity-50" })
|
|
3484
3471
|
]
|
|
3485
3472
|
}
|
|
3486
3473
|
) }),
|
|
@@ -3547,7 +3534,7 @@ function DateRangePickerInline({
|
|
|
3547
3534
|
),
|
|
3548
3535
|
children: [
|
|
3549
3536
|
formatDateRange2(value),
|
|
3550
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3537
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icons.calendar, { className: "size-4 opacity-50" })
|
|
3551
3538
|
]
|
|
3552
3539
|
}
|
|
3553
3540
|
) }),
|
|
@@ -3695,7 +3682,6 @@ function DrawerDescription({
|
|
|
3695
3682
|
|
|
3696
3683
|
// src/components/ui/dropdown-menu.tsx
|
|
3697
3684
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
3698
|
-
var import_lucide_react14 = require("lucide-react");
|
|
3699
3685
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3700
3686
|
function DropdownMenu({
|
|
3701
3687
|
...props
|
|
@@ -3778,7 +3764,7 @@ function DropdownMenuCheckboxItem({
|
|
|
3778
3764
|
checked,
|
|
3779
3765
|
...props,
|
|
3780
3766
|
children: [
|
|
3781
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3767
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icons.check, { className: "size-4" }) }) }),
|
|
3782
3768
|
children
|
|
3783
3769
|
]
|
|
3784
3770
|
}
|
|
@@ -3810,7 +3796,7 @@ function DropdownMenuRadioItem({
|
|
|
3810
3796
|
),
|
|
3811
3797
|
...props,
|
|
3812
3798
|
children: [
|
|
3813
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3799
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icons.circle, { className: "size-2 fill-current" }) }) }),
|
|
3814
3800
|
children
|
|
3815
3801
|
]
|
|
3816
3802
|
}
|
|
@@ -3886,7 +3872,7 @@ function DropdownMenuSubTrigger({
|
|
|
3886
3872
|
...props,
|
|
3887
3873
|
children: [
|
|
3888
3874
|
children,
|
|
3889
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icons.chevronRight, { className: "ms-auto size-4 rtl:rotate-180" })
|
|
3890
3876
|
]
|
|
3891
3877
|
}
|
|
3892
3878
|
);
|
|
@@ -4313,108 +4299,363 @@ function HoverCardContent({
|
|
|
4313
4299
|
) });
|
|
4314
4300
|
}
|
|
4315
4301
|
|
|
4316
|
-
// src/components/ui/input
|
|
4302
|
+
// src/components/ui/tag-input.tsx
|
|
4317
4303
|
var React14 = __toESM(require("react"), 1);
|
|
4318
4304
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
4319
|
-
|
|
4320
|
-
// src/components/ui/textarea.tsx
|
|
4321
4305
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
"textarea",
|
|
4325
|
-
{
|
|
4326
|
-
"data-slot": "textarea",
|
|
4327
|
-
className: cn(
|
|
4328
|
-
// Base styles - aligned with Input component
|
|
4329
|
-
"flex field-sizing-content min-h-16 w-full rounded-md border border-control bg-foreground/[.026] px-3 py-2 text-base text-foreground placeholder:text-foreground-muted",
|
|
4330
|
-
// Focus state - aligned with Input component
|
|
4331
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-background-control focus-visible:ring-offset-2 focus-visible:ring-offset-foreground-muted",
|
|
4332
|
-
// Disabled state
|
|
4333
|
-
"disabled:cursor-not-allowed disabled:text-foreground-muted",
|
|
4334
|
-
// Error state - aligned with Input component
|
|
4335
|
-
"aria-[invalid=true]:bg-destructive-200 aria-[invalid=true]:border-destructive-400 aria-[invalid=true]:focus:border-destructive aria-[invalid=true]:focus-visible:border-destructive",
|
|
4336
|
-
// Responsive
|
|
4337
|
-
"md:text-sm",
|
|
4338
|
-
className
|
|
4339
|
-
),
|
|
4340
|
-
...props
|
|
4341
|
-
}
|
|
4342
|
-
);
|
|
4343
|
-
}
|
|
4344
|
-
|
|
4345
|
-
// src/components/ui/input-group.tsx
|
|
4346
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4347
|
-
var InputGroupContext = React14.createContext({});
|
|
4348
|
-
function useInputGroup() {
|
|
4349
|
-
return React14.useContext(InputGroupContext);
|
|
4350
|
-
}
|
|
4351
|
-
function InputGroup({ className, dir, ...props }) {
|
|
4352
|
-
const contextValue = React14.useMemo(() => ({ dir }), [dir]);
|
|
4353
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(InputGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4354
|
-
"div",
|
|
4355
|
-
{
|
|
4356
|
-
"data-slot": "input-group",
|
|
4357
|
-
role: "group",
|
|
4358
|
-
dir,
|
|
4359
|
-
className: cn(
|
|
4360
|
-
// Base styles - aligned with Input component
|
|
4361
|
-
"group/input-group relative flex w-full items-center rounded-md border border-control bg-foreground/[.026] transition-[color,box-shadow] outline-none",
|
|
4362
|
-
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
4363
|
-
// Variants based on alignment.
|
|
4364
|
-
"has-[>[data-align=inline-start]]:[&>input]:ps-2",
|
|
4365
|
-
"has-[>[data-align=inline-end]]:[&>input]:pe-2",
|
|
4366
|
-
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
4367
|
-
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
4368
|
-
// Focus state - aligned with Input component
|
|
4369
|
-
"has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-background-control has-[[data-slot=input-group-control]:focus-visible]:ring-offset-2 has-[[data-slot=input-group-control]:focus-visible]:ring-offset-foreground-muted",
|
|
4370
|
-
// Error state - aligned with Input component
|
|
4371
|
-
"has-[[data-slot][aria-invalid=true]]:bg-destructive-200 has-[[data-slot][aria-invalid=true]]:border-destructive-400",
|
|
4372
|
-
className
|
|
4373
|
-
),
|
|
4374
|
-
...props
|
|
4375
|
-
}
|
|
4376
|
-
) });
|
|
4377
|
-
}
|
|
4378
|
-
var inputGroupAddonVariants = (0, import_class_variance_authority7.cva)(
|
|
4379
|
-
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
|
|
4306
|
+
var tagInputVariants = (0, import_class_variance_authority7.cva)(
|
|
4307
|
+
"flex min-h-[38px] w-full flex-wrap gap-2 rounded-md border border-control bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-background-control focus-within:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
4380
4308
|
{
|
|
4381
4309
|
variants: {
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
"block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
|
|
4386
|
-
"block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
|
|
4310
|
+
variant: {
|
|
4311
|
+
default: "bg-background",
|
|
4312
|
+
secondary: "bg-secondary"
|
|
4387
4313
|
}
|
|
4388
4314
|
},
|
|
4389
4315
|
defaultVariants: {
|
|
4390
|
-
|
|
4316
|
+
variant: "default"
|
|
4391
4317
|
}
|
|
4392
4318
|
}
|
|
4393
4319
|
);
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
}
|
|
4416
|
-
|
|
4417
|
-
|
|
4320
|
+
var TagInput = React14.forwardRef(
|
|
4321
|
+
({
|
|
4322
|
+
className,
|
|
4323
|
+
variant,
|
|
4324
|
+
value: controlledValue,
|
|
4325
|
+
defaultValue,
|
|
4326
|
+
onChange,
|
|
4327
|
+
placeholder,
|
|
4328
|
+
disabled,
|
|
4329
|
+
maxTags,
|
|
4330
|
+
...props
|
|
4331
|
+
}, ref) => {
|
|
4332
|
+
const [value, setValue] = React14.useState(
|
|
4333
|
+
controlledValue || defaultValue || []
|
|
4334
|
+
);
|
|
4335
|
+
const [inputValue, setInputValue] = React14.useState("");
|
|
4336
|
+
const inputRef = React14.useRef(null);
|
|
4337
|
+
React14.useEffect(() => {
|
|
4338
|
+
if (controlledValue !== void 0) {
|
|
4339
|
+
setValue(controlledValue);
|
|
4340
|
+
}
|
|
4341
|
+
}, [controlledValue]);
|
|
4342
|
+
const handleKeyDown = (e) => {
|
|
4343
|
+
if (e.key === "Enter") {
|
|
4344
|
+
e.preventDefault();
|
|
4345
|
+
const newTag = inputValue.trim();
|
|
4346
|
+
if (newTag && !value.includes(newTag)) {
|
|
4347
|
+
if (maxTags && value.length >= maxTags) return;
|
|
4348
|
+
const newValue = [...value, newTag];
|
|
4349
|
+
if (controlledValue === void 0) {
|
|
4350
|
+
setValue(newValue);
|
|
4351
|
+
}
|
|
4352
|
+
onChange?.(newValue);
|
|
4353
|
+
setInputValue("");
|
|
4354
|
+
}
|
|
4355
|
+
} else if (e.key === "Backspace" && !inputValue && value.length > 0) {
|
|
4356
|
+
const newValue = value.slice(0, -1);
|
|
4357
|
+
if (controlledValue === void 0) {
|
|
4358
|
+
setValue(newValue);
|
|
4359
|
+
}
|
|
4360
|
+
onChange?.(newValue);
|
|
4361
|
+
}
|
|
4362
|
+
};
|
|
4363
|
+
const removeTag = (tagToRemove) => {
|
|
4364
|
+
const newValue = value.filter((tag) => tag !== tagToRemove);
|
|
4365
|
+
if (controlledValue === void 0) {
|
|
4366
|
+
setValue(newValue);
|
|
4367
|
+
}
|
|
4368
|
+
onChange?.(newValue);
|
|
4369
|
+
inputRef.current?.focus();
|
|
4370
|
+
};
|
|
4371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4372
|
+
"div",
|
|
4373
|
+
{
|
|
4374
|
+
ref,
|
|
4375
|
+
className: cn(tagInputVariants({ variant }), className),
|
|
4376
|
+
onClick: () => inputRef.current?.focus(),
|
|
4377
|
+
...props,
|
|
4378
|
+
children: [
|
|
4379
|
+
value.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4380
|
+
Badge,
|
|
4381
|
+
{
|
|
4382
|
+
variant: "secondary",
|
|
4383
|
+
className: "gap-1 pe-1 ps-2 h-7 hover:!bg-primary/20 hover:!text-primary transition-colors [&:hover_svg]:!text-primary",
|
|
4384
|
+
children: [
|
|
4385
|
+
tag,
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4387
|
+
"button",
|
|
4388
|
+
{
|
|
4389
|
+
type: "button",
|
|
4390
|
+
onClick: (e) => {
|
|
4391
|
+
e.stopPropagation();
|
|
4392
|
+
removeTag(tag);
|
|
4393
|
+
},
|
|
4394
|
+
className: "rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2 hover:!bg-primary/20 transition-colors",
|
|
4395
|
+
disabled,
|
|
4396
|
+
children: [
|
|
4397
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icons.close, { className: "h-3 w-3 text-muted-foreground" }),
|
|
4398
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "sr-only", children: [
|
|
4399
|
+
"Remove ",
|
|
4400
|
+
tag
|
|
4401
|
+
] })
|
|
4402
|
+
]
|
|
4403
|
+
}
|
|
4404
|
+
)
|
|
4405
|
+
]
|
|
4406
|
+
},
|
|
4407
|
+
tag
|
|
4408
|
+
)),
|
|
4409
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4410
|
+
"input",
|
|
4411
|
+
{
|
|
4412
|
+
ref: inputRef,
|
|
4413
|
+
type: "text",
|
|
4414
|
+
value: inputValue,
|
|
4415
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
4416
|
+
onKeyDown: handleKeyDown,
|
|
4417
|
+
className: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground min-w-[120px] text-sm h-7",
|
|
4418
|
+
placeholder: value.length === 0 ? placeholder : void 0,
|
|
4419
|
+
disabled
|
|
4420
|
+
}
|
|
4421
|
+
)
|
|
4422
|
+
]
|
|
4423
|
+
}
|
|
4424
|
+
);
|
|
4425
|
+
}
|
|
4426
|
+
);
|
|
4427
|
+
TagInput.displayName = "TagInput";
|
|
4428
|
+
|
|
4429
|
+
// src/components/ui/hashtag-input.tsx
|
|
4430
|
+
var React15 = __toESM(require("react"), 1);
|
|
4431
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
4432
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4433
|
+
var hashtagInputVariants = (0, import_class_variance_authority8.cva)(
|
|
4434
|
+
"flex min-h-[38px] w-full flex-wrap gap-2 rounded-md border border-control bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-background-control focus-within:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
4435
|
+
{
|
|
4436
|
+
variants: {
|
|
4437
|
+
variant: {
|
|
4438
|
+
default: "bg-background",
|
|
4439
|
+
secondary: "bg-secondary"
|
|
4440
|
+
}
|
|
4441
|
+
},
|
|
4442
|
+
defaultVariants: {
|
|
4443
|
+
variant: "default"
|
|
4444
|
+
}
|
|
4445
|
+
}
|
|
4446
|
+
);
|
|
4447
|
+
var HashtagInput = React15.forwardRef(
|
|
4448
|
+
({
|
|
4449
|
+
className,
|
|
4450
|
+
variant,
|
|
4451
|
+
value: controlledValue,
|
|
4452
|
+
defaultValue,
|
|
4453
|
+
onChange,
|
|
4454
|
+
placeholder,
|
|
4455
|
+
disabled,
|
|
4456
|
+
maxTags,
|
|
4457
|
+
...props
|
|
4458
|
+
}, ref) => {
|
|
4459
|
+
const [value, setValue] = React15.useState(
|
|
4460
|
+
controlledValue || defaultValue || []
|
|
4461
|
+
);
|
|
4462
|
+
const [inputValue, setInputValue] = React15.useState("");
|
|
4463
|
+
const inputRef = React15.useRef(null);
|
|
4464
|
+
React15.useEffect(() => {
|
|
4465
|
+
if (controlledValue !== void 0) {
|
|
4466
|
+
setValue(controlledValue);
|
|
4467
|
+
}
|
|
4468
|
+
}, [controlledValue]);
|
|
4469
|
+
const handleKeyDown = (e) => {
|
|
4470
|
+
if (e.key === "Enter") {
|
|
4471
|
+
e.preventDefault();
|
|
4472
|
+
const rawTag = inputValue.trim().replace(/^#/, "");
|
|
4473
|
+
if (rawTag && !value.includes(rawTag)) {
|
|
4474
|
+
if (maxTags && value.length >= maxTags) return;
|
|
4475
|
+
const newValue = [...value, rawTag];
|
|
4476
|
+
if (controlledValue === void 0) {
|
|
4477
|
+
setValue(newValue);
|
|
4478
|
+
}
|
|
4479
|
+
onChange?.(newValue);
|
|
4480
|
+
setInputValue("");
|
|
4481
|
+
}
|
|
4482
|
+
} else if (e.key === "Backspace" && !inputValue && value.length > 0) {
|
|
4483
|
+
const newValue = value.slice(0, -1);
|
|
4484
|
+
if (controlledValue === void 0) {
|
|
4485
|
+
setValue(newValue);
|
|
4486
|
+
}
|
|
4487
|
+
onChange?.(newValue);
|
|
4488
|
+
}
|
|
4489
|
+
};
|
|
4490
|
+
const removeTag = (tagToRemove) => {
|
|
4491
|
+
const newValue = value.filter((tag) => tag !== tagToRemove);
|
|
4492
|
+
if (controlledValue === void 0) {
|
|
4493
|
+
setValue(newValue);
|
|
4494
|
+
}
|
|
4495
|
+
onChange?.(newValue);
|
|
4496
|
+
inputRef.current?.focus();
|
|
4497
|
+
};
|
|
4498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4499
|
+
"div",
|
|
4500
|
+
{
|
|
4501
|
+
ref,
|
|
4502
|
+
className: cn(hashtagInputVariants({ variant }), className),
|
|
4503
|
+
onClick: () => inputRef.current?.focus(),
|
|
4504
|
+
...props,
|
|
4505
|
+
children: [
|
|
4506
|
+
value.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4507
|
+
Badge,
|
|
4508
|
+
{
|
|
4509
|
+
variant: "secondary",
|
|
4510
|
+
className: "gap-1 pe-1 ps-2 h-7 hover:!bg-primary/20 hover:!text-primary transition-colors [&:hover_svg]:!text-primary",
|
|
4511
|
+
children: [
|
|
4512
|
+
"#",
|
|
4513
|
+
tag,
|
|
4514
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4515
|
+
"button",
|
|
4516
|
+
{
|
|
4517
|
+
type: "button",
|
|
4518
|
+
onClick: (e) => {
|
|
4519
|
+
e.stopPropagation();
|
|
4520
|
+
removeTag(tag);
|
|
4521
|
+
},
|
|
4522
|
+
className: "rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2 hover:!bg-primary/20 transition-colors",
|
|
4523
|
+
disabled,
|
|
4524
|
+
children: [
|
|
4525
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icons.close, { className: "h-3 w-3 text-muted-foreground" }),
|
|
4526
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "sr-only", children: [
|
|
4527
|
+
"Remove ",
|
|
4528
|
+
tag
|
|
4529
|
+
] })
|
|
4530
|
+
]
|
|
4531
|
+
}
|
|
4532
|
+
)
|
|
4533
|
+
]
|
|
4534
|
+
},
|
|
4535
|
+
tag
|
|
4536
|
+
)),
|
|
4537
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4538
|
+
"input",
|
|
4539
|
+
{
|
|
4540
|
+
ref: inputRef,
|
|
4541
|
+
type: "text",
|
|
4542
|
+
value: inputValue,
|
|
4543
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
4544
|
+
onKeyDown: handleKeyDown,
|
|
4545
|
+
className: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground min-w-[120px] text-sm h-7",
|
|
4546
|
+
placeholder: value.length === 0 ? placeholder : void 0,
|
|
4547
|
+
disabled
|
|
4548
|
+
}
|
|
4549
|
+
)
|
|
4550
|
+
]
|
|
4551
|
+
}
|
|
4552
|
+
);
|
|
4553
|
+
}
|
|
4554
|
+
);
|
|
4555
|
+
HashtagInput.displayName = "HashtagInput";
|
|
4556
|
+
|
|
4557
|
+
// src/components/ui/input-group.tsx
|
|
4558
|
+
var React16 = __toESM(require("react"), 1);
|
|
4559
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
4560
|
+
|
|
4561
|
+
// src/components/ui/textarea.tsx
|
|
4562
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4563
|
+
function Textarea({ className, ...props }) {
|
|
4564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4565
|
+
"textarea",
|
|
4566
|
+
{
|
|
4567
|
+
"data-slot": "textarea",
|
|
4568
|
+
className: cn(
|
|
4569
|
+
// Base styles - aligned with Input component
|
|
4570
|
+
"flex field-sizing-content min-h-16 w-full rounded-md border border-control bg-foreground/[.026] px-3 py-2 text-base text-foreground placeholder:text-foreground-muted",
|
|
4571
|
+
// Focus state - aligned with Input component
|
|
4572
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-background-control focus-visible:ring-offset-2 focus-visible:ring-offset-foreground-muted",
|
|
4573
|
+
// Disabled state
|
|
4574
|
+
"disabled:cursor-not-allowed disabled:text-foreground-muted",
|
|
4575
|
+
// Error state - aligned with Input component
|
|
4576
|
+
"aria-[invalid=true]:bg-destructive-200 aria-[invalid=true]:border-destructive-400 aria-[invalid=true]:focus:border-destructive aria-[invalid=true]:focus-visible:border-destructive",
|
|
4577
|
+
// Responsive
|
|
4578
|
+
"md:text-sm",
|
|
4579
|
+
className
|
|
4580
|
+
),
|
|
4581
|
+
...props
|
|
4582
|
+
}
|
|
4583
|
+
);
|
|
4584
|
+
}
|
|
4585
|
+
|
|
4586
|
+
// src/components/ui/input-group.tsx
|
|
4587
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4588
|
+
var InputGroupContext = React16.createContext({});
|
|
4589
|
+
function useInputGroup() {
|
|
4590
|
+
return React16.useContext(InputGroupContext);
|
|
4591
|
+
}
|
|
4592
|
+
function InputGroup({ className, dir, ...props }) {
|
|
4593
|
+
const contextValue = React16.useMemo(() => ({ dir }), [dir]);
|
|
4594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(InputGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4595
|
+
"div",
|
|
4596
|
+
{
|
|
4597
|
+
"data-slot": "input-group",
|
|
4598
|
+
role: "group",
|
|
4599
|
+
dir,
|
|
4600
|
+
className: cn(
|
|
4601
|
+
// Base styles - aligned with Input component
|
|
4602
|
+
"group/input-group relative flex w-full items-center rounded-md border border-control bg-foreground/[.026] transition-[color,box-shadow] outline-none",
|
|
4603
|
+
"h-9 min-w-0 has-[>textarea]:h-auto",
|
|
4604
|
+
// Variants based on alignment.
|
|
4605
|
+
"has-[>[data-align=inline-start]]:[&>input]:ps-2",
|
|
4606
|
+
"has-[>[data-align=inline-end]]:[&>input]:pe-2",
|
|
4607
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
4608
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
4609
|
+
// Focus state - aligned with Input component
|
|
4610
|
+
"has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-background-control has-[[data-slot=input-group-control]:focus-visible]:ring-offset-2 has-[[data-slot=input-group-control]:focus-visible]:ring-offset-foreground-muted",
|
|
4611
|
+
// Error state - aligned with Input component
|
|
4612
|
+
"has-[[data-slot][aria-invalid=true]]:bg-destructive-200 has-[[data-slot][aria-invalid=true]]:border-destructive-400",
|
|
4613
|
+
className
|
|
4614
|
+
),
|
|
4615
|
+
...props
|
|
4616
|
+
}
|
|
4617
|
+
) });
|
|
4618
|
+
}
|
|
4619
|
+
var inputGroupAddonVariants = (0, import_class_variance_authority9.cva)(
|
|
4620
|
+
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
|
|
4621
|
+
{
|
|
4622
|
+
variants: {
|
|
4623
|
+
align: {
|
|
4624
|
+
"inline-start": "order-first ps-3 has-[>button]:[margin-inline-start:-0.45rem] has-[>kbd]:[margin-inline-start:-0.35rem]",
|
|
4625
|
+
"inline-end": "order-last pe-3 has-[>button]:[margin-inline-end:-0.45rem] has-[>kbd]:[margin-inline-end:-0.35rem]",
|
|
4626
|
+
"block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5",
|
|
4627
|
+
"block-end": "order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"
|
|
4628
|
+
}
|
|
4629
|
+
},
|
|
4630
|
+
defaultVariants: {
|
|
4631
|
+
align: "inline-start"
|
|
4632
|
+
}
|
|
4633
|
+
}
|
|
4634
|
+
);
|
|
4635
|
+
function InputGroupAddon({
|
|
4636
|
+
className,
|
|
4637
|
+
align = "inline-start",
|
|
4638
|
+
...props
|
|
4639
|
+
}) {
|
|
4640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4641
|
+
"div",
|
|
4642
|
+
{
|
|
4643
|
+
role: "group",
|
|
4644
|
+
"data-slot": "input-group-addon",
|
|
4645
|
+
"data-align": align,
|
|
4646
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
4647
|
+
onClick: (e) => {
|
|
4648
|
+
if (e.target.closest("button")) {
|
|
4649
|
+
return;
|
|
4650
|
+
}
|
|
4651
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
4652
|
+
},
|
|
4653
|
+
...props
|
|
4654
|
+
}
|
|
4655
|
+
);
|
|
4656
|
+
}
|
|
4657
|
+
var inputGroupButtonVariants = (0, import_class_variance_authority9.cva)(
|
|
4658
|
+
"text-sm shadow-none flex gap-2 items-center",
|
|
4418
4659
|
{
|
|
4419
4660
|
variants: {
|
|
4420
4661
|
size: {
|
|
@@ -4436,7 +4677,7 @@ function InputGroupButton({
|
|
|
4436
4677
|
size = "xs",
|
|
4437
4678
|
...props
|
|
4438
4679
|
}) {
|
|
4439
|
-
return /* @__PURE__ */ (0,
|
|
4680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4440
4681
|
Button,
|
|
4441
4682
|
{
|
|
4442
4683
|
type,
|
|
@@ -4448,7 +4689,7 @@ function InputGroupButton({
|
|
|
4448
4689
|
);
|
|
4449
4690
|
}
|
|
4450
4691
|
function InputGroupText({ className, ...props }) {
|
|
4451
|
-
return /* @__PURE__ */ (0,
|
|
4692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4452
4693
|
"span",
|
|
4453
4694
|
{
|
|
4454
4695
|
className: cn(
|
|
@@ -4469,7 +4710,7 @@ function InputGroupInput({
|
|
|
4469
4710
|
const { dir: contextDir } = useInputGroup();
|
|
4470
4711
|
const isLTRType = type === "url" || type === "email" || type === "tel" || type === "number" || props.inputMode === "numeric";
|
|
4471
4712
|
const dir = dirProp ?? contextDir ?? (isLTRType ? "ltr" : void 0);
|
|
4472
|
-
return /* @__PURE__ */ (0,
|
|
4713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4473
4714
|
Input,
|
|
4474
4715
|
{
|
|
4475
4716
|
"data-slot": "input-group-control",
|
|
@@ -4490,7 +4731,7 @@ function InputGroupTextarea({
|
|
|
4490
4731
|
className,
|
|
4491
4732
|
...props
|
|
4492
4733
|
}) {
|
|
4493
|
-
return /* @__PURE__ */ (0,
|
|
4734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4494
4735
|
Textarea,
|
|
4495
4736
|
{
|
|
4496
4737
|
"data-slot": "input-group-control",
|
|
@@ -4504,17 +4745,16 @@ function InputGroupTextarea({
|
|
|
4504
4745
|
}
|
|
4505
4746
|
|
|
4506
4747
|
// src/components/ui/input-otp.tsx
|
|
4507
|
-
var
|
|
4748
|
+
var React17 = __toESM(require("react"), 1);
|
|
4508
4749
|
var import_input_otp = require("input-otp");
|
|
4509
|
-
var
|
|
4510
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4750
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4511
4751
|
function InputOTP({
|
|
4512
4752
|
className,
|
|
4513
4753
|
containerClassName,
|
|
4514
4754
|
dir = "ltr",
|
|
4515
4755
|
...props
|
|
4516
4756
|
}) {
|
|
4517
|
-
return /* @__PURE__ */ (0,
|
|
4757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { dir: dir ?? "ltr", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4518
4758
|
import_input_otp.OTPInput,
|
|
4519
4759
|
{
|
|
4520
4760
|
"data-slot": "input-otp",
|
|
@@ -4529,7 +4769,7 @@ function InputOTP({
|
|
|
4529
4769
|
) });
|
|
4530
4770
|
}
|
|
4531
4771
|
function InputOTPGroup({ className, ...props }) {
|
|
4532
|
-
return /* @__PURE__ */ (0,
|
|
4772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4533
4773
|
"div",
|
|
4534
4774
|
{
|
|
4535
4775
|
"data-slot": "input-otp-group",
|
|
@@ -4544,9 +4784,9 @@ function InputOTPSlot({
|
|
|
4544
4784
|
className,
|
|
4545
4785
|
...props
|
|
4546
4786
|
}) {
|
|
4547
|
-
const inputOTPContext =
|
|
4787
|
+
const inputOTPContext = React17.useContext(import_input_otp.OTPInputContext);
|
|
4548
4788
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4549
|
-
return /* @__PURE__ */ (0,
|
|
4789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
4550
4790
|
"div",
|
|
4551
4791
|
{
|
|
4552
4792
|
"data-slot": "input-otp-slot",
|
|
@@ -4559,36 +4799,36 @@ function InputOTPSlot({
|
|
|
4559
4799
|
...props,
|
|
4560
4800
|
children: [
|
|
4561
4801
|
char,
|
|
4562
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
4802
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
4563
4803
|
]
|
|
4564
4804
|
}
|
|
4565
4805
|
);
|
|
4566
4806
|
}
|
|
4567
4807
|
function InputOTPSeparator({ ...props }) {
|
|
4568
|
-
return /* @__PURE__ */ (0,
|
|
4808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4569
4809
|
"div",
|
|
4570
4810
|
{
|
|
4571
4811
|
"data-slot": "input-otp-separator",
|
|
4572
4812
|
role: "separator",
|
|
4573
4813
|
dir: "ltr",
|
|
4574
4814
|
...props,
|
|
4575
|
-
children: /* @__PURE__ */ (0,
|
|
4815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icons.minus, {})
|
|
4576
4816
|
}
|
|
4577
4817
|
);
|
|
4578
4818
|
}
|
|
4579
4819
|
|
|
4580
4820
|
// src/components/ui/instagram-post.tsx
|
|
4581
|
-
var
|
|
4582
|
-
var
|
|
4821
|
+
var React19 = __toESM(require("react"), 1);
|
|
4822
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
4583
4823
|
|
|
4584
4824
|
// src/components/ui/tooltip.tsx
|
|
4585
|
-
var
|
|
4825
|
+
var React18 = __toESM(require("react"), 1);
|
|
4586
4826
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
4587
|
-
var
|
|
4827
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4588
4828
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4589
4829
|
var Tooltip = TooltipPrimitive.Root;
|
|
4590
4830
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
4591
|
-
var TooltipContent =
|
|
4831
|
+
var TooltipContent = React18.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
4592
4832
|
TooltipPrimitive.Content,
|
|
4593
4833
|
{
|
|
4594
4834
|
ref,
|
|
@@ -4603,8 +4843,8 @@ var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
4603
4843
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
4604
4844
|
|
|
4605
4845
|
// src/components/ui/instagram-post.tsx
|
|
4606
|
-
var
|
|
4607
|
-
var instagramPostVariants = (0,
|
|
4846
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4847
|
+
var instagramPostVariants = (0, import_class_variance_authority10.cva)(
|
|
4608
4848
|
"relative border bg-background-surface-100",
|
|
4609
4849
|
{
|
|
4610
4850
|
variants: {
|
|
@@ -4624,17 +4864,22 @@ function InstagramPostMedia({
|
|
|
4624
4864
|
variant = "vertical",
|
|
4625
4865
|
placeholderText = "No media available"
|
|
4626
4866
|
}) {
|
|
4867
|
+
const [imageError, setImageError] = React19.useState({});
|
|
4868
|
+
const handleImageError = (url) => {
|
|
4869
|
+
setImageError((prev) => ({ ...prev, [url]: true }));
|
|
4870
|
+
};
|
|
4871
|
+
const renderPlaceholder = () => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-full h-full flex items-center justify-center bg-muted/10 dark:bg-muted/5", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.imageOff, { className: "size-12 text-muted-foreground/50" }) });
|
|
4627
4872
|
if (!media || media.length === 0) {
|
|
4628
|
-
return /* @__PURE__ */ (0,
|
|
4873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4629
4874
|
"div",
|
|
4630
4875
|
{
|
|
4631
4876
|
className: cn(
|
|
4632
4877
|
"flex items-center justify-center bg-muted/30",
|
|
4633
4878
|
variant === "vertical" ? "aspect-square" : "w-[20%] shrink-0 h-full min-h-[200px] -my-[1px] -ms-[1px]"
|
|
4634
4879
|
),
|
|
4635
|
-
children: /* @__PURE__ */ (0,
|
|
4636
|
-
/* @__PURE__ */ (0,
|
|
4637
|
-
/* @__PURE__ */ (0,
|
|
4880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "text-center p-4", children: [
|
|
4881
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.imageOff, { className: "size-12 mx-auto mb-2 text-muted-foreground" }),
|
|
4882
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-muted-foreground", children: placeholderText })
|
|
4638
4883
|
] })
|
|
4639
4884
|
}
|
|
4640
4885
|
);
|
|
@@ -4642,27 +4887,29 @@ function InstagramPostMedia({
|
|
|
4642
4887
|
if (mediaType === "image" || media.length === 1 && media[0].type === "image") {
|
|
4643
4888
|
const item = media[0];
|
|
4644
4889
|
if (variant === "horizontal") {
|
|
4645
|
-
return /* @__PURE__ */ (0,
|
|
4646
|
-
/* @__PURE__ */ (0,
|
|
4647
|
-
/* @__PURE__ */ (0,
|
|
4890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-[20%] shrink-0 relative overflow-hidden group cursor-pointer h-full -my-[1px] -ms-[1px] bg-muted/30", children: [
|
|
4891
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4892
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4648
4893
|
"img",
|
|
4649
4894
|
{
|
|
4650
4895
|
src: item.url,
|
|
4651
4896
|
alt: "Post media",
|
|
4652
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4897
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4898
|
+
onError: () => handleImageError(item.url)
|
|
4653
4899
|
}
|
|
4654
4900
|
)
|
|
4655
4901
|
] });
|
|
4656
4902
|
}
|
|
4657
4903
|
const ratio = getAspectRatio(item.aspectRatio || "1:1");
|
|
4658
|
-
return /* @__PURE__ */ (0,
|
|
4659
|
-
/* @__PURE__ */ (0,
|
|
4660
|
-
/* @__PURE__ */ (0,
|
|
4904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-full relative overflow-hidden group cursor-pointer bg-muted/30", style: { aspectRatio: ratio }, children: [
|
|
4905
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4906
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4661
4907
|
"img",
|
|
4662
4908
|
{
|
|
4663
4909
|
src: item.url,
|
|
4664
4910
|
alt: "Post media",
|
|
4665
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4911
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4912
|
+
onError: () => handleImageError(item.url)
|
|
4666
4913
|
}
|
|
4667
4914
|
)
|
|
4668
4915
|
] });
|
|
@@ -4670,70 +4917,74 @@ function InstagramPostMedia({
|
|
|
4670
4917
|
if (mediaType === "video" || media.length === 1 && media[0].type === "video") {
|
|
4671
4918
|
const item = media[0];
|
|
4672
4919
|
if (variant === "horizontal") {
|
|
4673
|
-
return /* @__PURE__ */ (0,
|
|
4674
|
-
/* @__PURE__ */ (0,
|
|
4675
|
-
/* @__PURE__ */ (0,
|
|
4920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-[20%] shrink-0 relative overflow-hidden group cursor-pointer h-full -my-[1px] -ms-[1px] bg-muted/30", children: [
|
|
4921
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4922
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4676
4923
|
"img",
|
|
4677
4924
|
{
|
|
4678
4925
|
src: item.url,
|
|
4679
4926
|
alt: "Post media",
|
|
4680
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4927
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4928
|
+
onError: () => handleImageError(item.url)
|
|
4681
4929
|
}
|
|
4682
4930
|
)
|
|
4683
4931
|
] });
|
|
4684
4932
|
}
|
|
4685
4933
|
const ratio = getAspectRatio(item.aspectRatio || "16:9");
|
|
4686
|
-
return /* @__PURE__ */ (0,
|
|
4687
|
-
/* @__PURE__ */ (0,
|
|
4688
|
-
/* @__PURE__ */ (0,
|
|
4934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-full relative overflow-hidden group cursor-pointer bg-muted/30", style: { aspectRatio: ratio }, children: [
|
|
4935
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4936
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4689
4937
|
"img",
|
|
4690
4938
|
{
|
|
4691
4939
|
src: item.url,
|
|
4692
4940
|
alt: "Post media",
|
|
4693
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4941
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4942
|
+
onError: () => handleImageError(item.url)
|
|
4694
4943
|
}
|
|
4695
4944
|
)
|
|
4696
4945
|
] });
|
|
4697
4946
|
}
|
|
4698
4947
|
if (mediaType === "carousel" || media.length > 1) {
|
|
4699
4948
|
if (variant === "horizontal") {
|
|
4700
|
-
return /* @__PURE__ */ (0,
|
|
4701
|
-
/* @__PURE__ */ (0,
|
|
4702
|
-
/* @__PURE__ */ (0,
|
|
4703
|
-
/* @__PURE__ */ (0,
|
|
4949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-[20%] shrink-0 relative overflow-hidden group cursor-pointer h-full -my-[1px] -ms-[1px] bg-muted/30", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Carousel, { className: "w-full h-full", children: [
|
|
4950
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselContent, { className: "h-full", children: media.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(CarouselItem, { className: "h-full", children: [
|
|
4951
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4952
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4704
4953
|
"img",
|
|
4705
4954
|
{
|
|
4706
4955
|
src: item.url,
|
|
4707
4956
|
alt: `Post media ${index + 1}`,
|
|
4708
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4957
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4958
|
+
onError: () => handleImageError(item.url)
|
|
4709
4959
|
}
|
|
4710
4960
|
)
|
|
4711
4961
|
] }, index)) }),
|
|
4712
|
-
/* @__PURE__ */ (0,
|
|
4713
|
-
/* @__PURE__ */ (0,
|
|
4962
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselPrevious, { className: "ms-2" }),
|
|
4963
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselNext, { className: "me-2" })
|
|
4714
4964
|
] }) });
|
|
4715
4965
|
}
|
|
4716
|
-
return /* @__PURE__ */ (0,
|
|
4717
|
-
/* @__PURE__ */ (0,
|
|
4966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Carousel, { className: "w-full", children: [
|
|
4967
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselContent, { children: media.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselItem, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
4718
4968
|
"div",
|
|
4719
4969
|
{
|
|
4720
|
-
className: "w-full relative overflow-hidden group cursor-pointer",
|
|
4970
|
+
className: "w-full relative overflow-hidden group cursor-pointer bg-muted/30",
|
|
4721
4971
|
style: { aspectRatio: getAspectRatio(item.aspectRatio || (item.type === "video" ? "16:9" : "1:1")) },
|
|
4722
4972
|
children: [
|
|
4723
|
-
/* @__PURE__ */ (0,
|
|
4724
|
-
/* @__PURE__ */ (0,
|
|
4973
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4974
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4725
4975
|
"img",
|
|
4726
4976
|
{
|
|
4727
4977
|
src: item.url,
|
|
4728
4978
|
alt: `Post media ${index + 1}`,
|
|
4729
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4979
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4980
|
+
onError: () => handleImageError(item.url)
|
|
4730
4981
|
}
|
|
4731
4982
|
)
|
|
4732
4983
|
]
|
|
4733
4984
|
}
|
|
4734
4985
|
) }, index)) }),
|
|
4735
|
-
/* @__PURE__ */ (0,
|
|
4736
|
-
/* @__PURE__ */ (0,
|
|
4986
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselPrevious, { className: "ms-2" }),
|
|
4987
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselNext, { className: "me-2" })
|
|
4737
4988
|
] });
|
|
4738
4989
|
}
|
|
4739
4990
|
return null;
|
|
@@ -4753,10 +5004,10 @@ function InstagramPostCaption({
|
|
|
4753
5004
|
maxLines = 3,
|
|
4754
5005
|
variant = "vertical"
|
|
4755
5006
|
}) {
|
|
4756
|
-
const [isExpanded, setIsExpanded] =
|
|
4757
|
-
const [shouldShowMore, setShouldShowMore] =
|
|
4758
|
-
const textRef =
|
|
4759
|
-
|
|
5007
|
+
const [isExpanded, setIsExpanded] = React19.useState(false);
|
|
5008
|
+
const [shouldShowMore, setShouldShowMore] = React19.useState(false);
|
|
5009
|
+
const textRef = React19.useRef(null);
|
|
5010
|
+
React19.useEffect(() => {
|
|
4760
5011
|
if (variant === "vertical" && textRef.current && !isExpanded) {
|
|
4761
5012
|
const lineHeight = parseInt(window.getComputedStyle(textRef.current).lineHeight);
|
|
4762
5013
|
const maxHeight = lineHeight * maxLines;
|
|
@@ -4767,11 +5018,11 @@ function InstagramPostCaption({
|
|
|
4767
5018
|
}, [caption, maxLines, isExpanded, variant]);
|
|
4768
5019
|
if (!caption) return null;
|
|
4769
5020
|
const parsedCaption = parseCaption(caption);
|
|
4770
|
-
return /* @__PURE__ */ (0,
|
|
5021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cn(
|
|
4771
5022
|
"px-4 py-2",
|
|
4772
5023
|
variant === "horizontal" && "overflow-visible"
|
|
4773
5024
|
), children: [
|
|
4774
|
-
/* @__PURE__ */ (0,
|
|
5025
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4775
5026
|
"p",
|
|
4776
5027
|
{
|
|
4777
5028
|
ref: textRef,
|
|
@@ -4788,7 +5039,7 @@ function InstagramPostCaption({
|
|
|
4788
5039
|
} : void 0,
|
|
4789
5040
|
children: parsedCaption.map((part, index) => {
|
|
4790
5041
|
if (part.type === "hashtag") {
|
|
4791
|
-
return /* @__PURE__ */ (0,
|
|
5042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4792
5043
|
"span",
|
|
4793
5044
|
{
|
|
4794
5045
|
className: "text-brand-link hover:underline cursor-pointer",
|
|
@@ -4798,7 +5049,7 @@ function InstagramPostCaption({
|
|
|
4798
5049
|
);
|
|
4799
5050
|
}
|
|
4800
5051
|
if (part.type === "mention") {
|
|
4801
|
-
return /* @__PURE__ */ (0,
|
|
5052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4802
5053
|
"span",
|
|
4803
5054
|
{
|
|
4804
5055
|
className: "text-brand-link hover:underline cursor-pointer font-medium",
|
|
@@ -4807,11 +5058,11 @@ function InstagramPostCaption({
|
|
|
4807
5058
|
index
|
|
4808
5059
|
);
|
|
4809
5060
|
}
|
|
4810
|
-
return /* @__PURE__ */ (0,
|
|
5061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: part.text }, index);
|
|
4811
5062
|
})
|
|
4812
5063
|
}
|
|
4813
5064
|
),
|
|
4814
|
-
shouldShowMore && variant === "vertical" && /* @__PURE__ */ (0,
|
|
5065
|
+
shouldShowMore && variant === "vertical" && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4815
5066
|
"button",
|
|
4816
5067
|
{
|
|
4817
5068
|
onClick: () => setIsExpanded(!isExpanded),
|
|
@@ -4917,15 +5168,15 @@ function InstagramPostStats({
|
|
|
4917
5168
|
});
|
|
4918
5169
|
}
|
|
4919
5170
|
if (items.length === 0) return null;
|
|
4920
|
-
return /* @__PURE__ */ (0,
|
|
5171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "px-4 py-2 flex items-center gap-4 text-sm text-foreground-light border-t border-border-default", dir: "ltr", children: items.map((item, index) => {
|
|
4921
5172
|
const Icon2 = item.icon;
|
|
4922
|
-
return /* @__PURE__ */ (0,
|
|
4923
|
-
/* @__PURE__ */ (0,
|
|
4924
|
-
/* @__PURE__ */ (0,
|
|
4925
|
-
/* @__PURE__ */ (0,
|
|
4926
|
-
/* @__PURE__ */ (0,
|
|
5173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5174
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-1.5 cursor-default", children: [
|
|
5175
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon2, { className: "size-4" }),
|
|
5176
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: item.isPostType ? "text-xs" : "", children: item.value }),
|
|
5177
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "sr-only", children: item.labelEn })
|
|
4927
5178
|
] }) }),
|
|
4928
|
-
/* @__PURE__ */ (0,
|
|
5179
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { children: [
|
|
4929
5180
|
item.label,
|
|
4930
5181
|
": ",
|
|
4931
5182
|
item.exactValue
|
|
@@ -4940,7 +5191,7 @@ function InstagramPostProfile({
|
|
|
4940
5191
|
}) {
|
|
4941
5192
|
if (!profile) return null;
|
|
4942
5193
|
const displayAvatarUrl = avatarUrl || profile.avatarUrl || profile.profilePicture;
|
|
4943
|
-
return /* @__PURE__ */ (0,
|
|
5194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
4944
5195
|
"div",
|
|
4945
5196
|
{
|
|
4946
5197
|
className: cn(
|
|
@@ -4949,13 +5200,13 @@ function InstagramPostProfile({
|
|
|
4949
5200
|
variant === "horizontal" && "pb-2"
|
|
4950
5201
|
),
|
|
4951
5202
|
children: [
|
|
4952
|
-
/* @__PURE__ */ (0,
|
|
4953
|
-
displayAvatarUrl && /* @__PURE__ */ (0,
|
|
4954
|
-
/* @__PURE__ */ (0,
|
|
5203
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Avatar, { className: "size-10", children: [
|
|
5204
|
+
displayAvatarUrl && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AvatarImage, { src: displayAvatarUrl, alt: profile.username }),
|
|
5205
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AvatarFallback, { children: profile.username.charAt(0).toUpperCase() })
|
|
4955
5206
|
] }),
|
|
4956
|
-
/* @__PURE__ */ (0,
|
|
4957
|
-
/* @__PURE__ */ (0,
|
|
4958
|
-
profile.fullName && /* @__PURE__ */ (0,
|
|
5207
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
5208
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "font-semibold text-sm truncate", children: profile.username }),
|
|
5209
|
+
profile.fullName && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "text-xs text-muted-foreground truncate", children: profile.fullName })
|
|
4959
5210
|
] })
|
|
4960
5211
|
]
|
|
4961
5212
|
}
|
|
@@ -4992,9 +5243,9 @@ function InstagramPostActions({
|
|
|
4992
5243
|
onAIAnalysis();
|
|
4993
5244
|
}
|
|
4994
5245
|
};
|
|
4995
|
-
return /* @__PURE__ */ (0,
|
|
4996
|
-
/* @__PURE__ */ (0,
|
|
4997
|
-
/* @__PURE__ */ (0,
|
|
5246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "absolute top-2 end-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-10", children: [
|
|
5247
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5248
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4998
5249
|
Button,
|
|
4999
5250
|
{
|
|
5000
5251
|
variant: "ghost",
|
|
@@ -5002,13 +5253,13 @@ function InstagramPostActions({
|
|
|
5002
5253
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5003
5254
|
onClick: handleCommentAnalyzer,
|
|
5004
5255
|
"aria-label": "Comment Analyzer",
|
|
5005
|
-
children: /* @__PURE__ */ (0,
|
|
5256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.messageCircle, { className: "size-4" })
|
|
5006
5257
|
}
|
|
5007
5258
|
) }),
|
|
5008
|
-
/* @__PURE__ */ (0,
|
|
5259
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u062A\u062D\u0644\u06CC\u0644 \u06A9\u0627\u0645\u0646\u062A\u200C\u0647\u0627" }) })
|
|
5009
5260
|
] }),
|
|
5010
|
-
/* @__PURE__ */ (0,
|
|
5011
|
-
/* @__PURE__ */ (0,
|
|
5261
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5262
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5012
5263
|
Button,
|
|
5013
5264
|
{
|
|
5014
5265
|
variant: "ghost",
|
|
@@ -5016,13 +5267,13 @@ function InstagramPostActions({
|
|
|
5016
5267
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5017
5268
|
onClick: handleBooster,
|
|
5018
5269
|
"aria-label": "Booster",
|
|
5019
|
-
children: /* @__PURE__ */ (0,
|
|
5270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.rocket, { className: "size-4" })
|
|
5020
5271
|
}
|
|
5021
5272
|
) }),
|
|
5022
|
-
/* @__PURE__ */ (0,
|
|
5273
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u0628\u0648\u0633\u062A\u0631" }) })
|
|
5023
5274
|
] }),
|
|
5024
|
-
/* @__PURE__ */ (0,
|
|
5025
|
-
/* @__PURE__ */ (0,
|
|
5275
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5276
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5026
5277
|
Button,
|
|
5027
5278
|
{
|
|
5028
5279
|
variant: "ghost",
|
|
@@ -5030,13 +5281,13 @@ function InstagramPostActions({
|
|
|
5030
5281
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5031
5282
|
onClick: handleAIAnalysis,
|
|
5032
5283
|
"aria-label": "AI Analysis",
|
|
5033
|
-
children: /* @__PURE__ */ (0,
|
|
5284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.sparkles, { className: "size-4" })
|
|
5034
5285
|
}
|
|
5035
5286
|
) }),
|
|
5036
|
-
/* @__PURE__ */ (0,
|
|
5287
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u062A\u062D\u0644\u06CC\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06CC" }) })
|
|
5037
5288
|
] }),
|
|
5038
|
-
/* @__PURE__ */ (0,
|
|
5039
|
-
/* @__PURE__ */ (0,
|
|
5289
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5290
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5040
5291
|
Button,
|
|
5041
5292
|
{
|
|
5042
5293
|
variant: "ghost",
|
|
@@ -5044,10 +5295,10 @@ function InstagramPostActions({
|
|
|
5044
5295
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5045
5296
|
onClick: handleOpenInstagram,
|
|
5046
5297
|
"aria-label": "Open on Instagram",
|
|
5047
|
-
children: /* @__PURE__ */ (0,
|
|
5298
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.instagram, { className: "size-4" })
|
|
5048
5299
|
}
|
|
5049
5300
|
) }),
|
|
5050
|
-
/* @__PURE__ */ (0,
|
|
5301
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u062F\u0631 \u0627\u06CC\u0646\u0633\u062A\u0627\u06AF\u0631\u0627\u0645" }) })
|
|
5051
5302
|
] })
|
|
5052
5303
|
] }) });
|
|
5053
5304
|
}
|
|
@@ -5059,25 +5310,25 @@ function InstagramPostTime({
|
|
|
5059
5310
|
const relativeTime = formatRelativeTime(publishTime);
|
|
5060
5311
|
const absoluteTime = formatAbsoluteTime(publishTime);
|
|
5061
5312
|
if (timeFormat === "absolute") {
|
|
5062
|
-
return /* @__PURE__ */ (0,
|
|
5063
|
-
/* @__PURE__ */ (0,
|
|
5064
|
-
/* @__PURE__ */ (0,
|
|
5313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "px-4 py-1 text-xs text-muted-foreground flex items-center gap-1.5", dir: "ltr", children: [
|
|
5314
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.clock, { className: "size-3" }),
|
|
5315
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: absoluteTime })
|
|
5065
5316
|
] });
|
|
5066
5317
|
}
|
|
5067
|
-
return /* @__PURE__ */ (0,
|
|
5318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5068
5319
|
"div",
|
|
5069
5320
|
{
|
|
5070
5321
|
className: "px-4 py-1 text-xs text-muted-foreground cursor-default flex items-center gap-1.5",
|
|
5071
5322
|
title: absoluteTime,
|
|
5072
5323
|
dir: "ltr",
|
|
5073
5324
|
children: [
|
|
5074
|
-
/* @__PURE__ */ (0,
|
|
5075
|
-
/* @__PURE__ */ (0,
|
|
5325
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.clock, { className: "size-3" }),
|
|
5326
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: relativeTime })
|
|
5076
5327
|
]
|
|
5077
5328
|
}
|
|
5078
5329
|
);
|
|
5079
5330
|
}
|
|
5080
|
-
var InstagramPost =
|
|
5331
|
+
var InstagramPost = React19.forwardRef(
|
|
5081
5332
|
({
|
|
5082
5333
|
className,
|
|
5083
5334
|
variant = "vertical",
|
|
@@ -5108,7 +5359,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
5108
5359
|
...props
|
|
5109
5360
|
}, ref) => {
|
|
5110
5361
|
const isVertical = variant === "vertical";
|
|
5111
|
-
return /* @__PURE__ */ (0,
|
|
5362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5112
5363
|
"div",
|
|
5113
5364
|
{
|
|
5114
5365
|
ref,
|
|
@@ -5116,7 +5367,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
5116
5367
|
dir,
|
|
5117
5368
|
...props,
|
|
5118
5369
|
children: [
|
|
5119
|
-
showActions && /* @__PURE__ */ (0,
|
|
5370
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5120
5371
|
InstagramPostActions,
|
|
5121
5372
|
{
|
|
5122
5373
|
showActions,
|
|
@@ -5127,9 +5378,9 @@ var InstagramPost = React17.forwardRef(
|
|
|
5127
5378
|
instagramUrl
|
|
5128
5379
|
}
|
|
5129
5380
|
),
|
|
5130
|
-
isVertical ? /* @__PURE__ */ (0,
|
|
5131
|
-
showProfile && /* @__PURE__ */ (0,
|
|
5132
|
-
/* @__PURE__ */ (0,
|
|
5381
|
+
isVertical ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
5382
|
+
showProfile && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InstagramPostProfile, { profile, variant: variant || "vertical", avatarUrl }),
|
|
5383
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mt-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5133
5384
|
InstagramPostMedia,
|
|
5134
5385
|
{
|
|
5135
5386
|
media,
|
|
@@ -5138,7 +5389,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
5138
5389
|
placeholderText
|
|
5139
5390
|
}
|
|
5140
5391
|
) }),
|
|
5141
|
-
/* @__PURE__ */ (0,
|
|
5392
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5142
5393
|
InstagramPostStats,
|
|
5143
5394
|
{
|
|
5144
5395
|
stats,
|
|
@@ -5150,16 +5401,16 @@ var InstagramPost = React17.forwardRef(
|
|
|
5150
5401
|
postType
|
|
5151
5402
|
}
|
|
5152
5403
|
),
|
|
5153
|
-
showCaption && /* @__PURE__ */ (0,
|
|
5154
|
-
/* @__PURE__ */ (0,
|
|
5404
|
+
showCaption && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InstagramPostCaption, { caption, variant: variant || "vertical" }),
|
|
5405
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mt-auto w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5155
5406
|
InstagramPostTime,
|
|
5156
5407
|
{
|
|
5157
5408
|
publishTime,
|
|
5158
5409
|
timeFormat
|
|
5159
5410
|
}
|
|
5160
5411
|
) })
|
|
5161
|
-
] }) : /* @__PURE__ */ (0,
|
|
5162
|
-
/* @__PURE__ */ (0,
|
|
5412
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
5413
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5163
5414
|
InstagramPostMedia,
|
|
5164
5415
|
{
|
|
5165
5416
|
media,
|
|
@@ -5168,9 +5419,9 @@ var InstagramPost = React17.forwardRef(
|
|
|
5168
5419
|
placeholderText
|
|
5169
5420
|
}
|
|
5170
5421
|
),
|
|
5171
|
-
/* @__PURE__ */ (0,
|
|
5172
|
-
showProfile && /* @__PURE__ */ (0,
|
|
5173
|
-
/* @__PURE__ */ (0,
|
|
5422
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 flex flex-col min-w-0 overflow-hidden rounded-e-lg", children: [
|
|
5423
|
+
showProfile && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InstagramPostProfile, { profile, variant: variant || "horizontal", avatarUrl }),
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5174
5425
|
InstagramPostStats,
|
|
5175
5426
|
{
|
|
5176
5427
|
stats,
|
|
@@ -5182,8 +5433,8 @@ var InstagramPost = React17.forwardRef(
|
|
|
5182
5433
|
postType
|
|
5183
5434
|
}
|
|
5184
5435
|
),
|
|
5185
|
-
showCaption && /* @__PURE__ */ (0,
|
|
5186
|
-
/* @__PURE__ */ (0,
|
|
5436
|
+
showCaption && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InstagramPostCaption, { caption, variant: variant || "horizontal" }),
|
|
5437
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mt-auto w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5187
5438
|
InstagramPostTime,
|
|
5188
5439
|
{
|
|
5189
5440
|
publishTime,
|
|
@@ -5200,9 +5451,9 @@ var InstagramPost = React17.forwardRef(
|
|
|
5200
5451
|
InstagramPost.displayName = "InstagramPost";
|
|
5201
5452
|
|
|
5202
5453
|
// src/components/ui/kbd.tsx
|
|
5203
|
-
var
|
|
5454
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5204
5455
|
function Kbd({ className, ...props }) {
|
|
5205
|
-
return /* @__PURE__ */ (0,
|
|
5456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5206
5457
|
"kbd",
|
|
5207
5458
|
{
|
|
5208
5459
|
"data-slot": "kbd",
|
|
@@ -5217,7 +5468,7 @@ function Kbd({ className, ...props }) {
|
|
|
5217
5468
|
);
|
|
5218
5469
|
}
|
|
5219
5470
|
function KbdGroup({ className, ...props }) {
|
|
5220
|
-
return /* @__PURE__ */ (0,
|
|
5471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5221
5472
|
"kbd",
|
|
5222
5473
|
{
|
|
5223
5474
|
"data-slot": "kbd-group",
|
|
@@ -5229,13 +5480,12 @@ function KbdGroup({ className, ...props }) {
|
|
|
5229
5480
|
|
|
5230
5481
|
// src/components/ui/menubar.tsx
|
|
5231
5482
|
var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"), 1);
|
|
5232
|
-
var
|
|
5233
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5483
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5234
5484
|
function Menubar({
|
|
5235
5485
|
className,
|
|
5236
5486
|
...props
|
|
5237
5487
|
}) {
|
|
5238
|
-
return /* @__PURE__ */ (0,
|
|
5488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5239
5489
|
MenubarPrimitive.Root,
|
|
5240
5490
|
{
|
|
5241
5491
|
"data-slot": "menubar",
|
|
@@ -5250,28 +5500,28 @@ function Menubar({
|
|
|
5250
5500
|
function MenubarMenu({
|
|
5251
5501
|
...props
|
|
5252
5502
|
}) {
|
|
5253
|
-
return /* @__PURE__ */ (0,
|
|
5503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
5254
5504
|
}
|
|
5255
5505
|
function MenubarGroup({
|
|
5256
5506
|
...props
|
|
5257
5507
|
}) {
|
|
5258
|
-
return /* @__PURE__ */ (0,
|
|
5508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
5259
5509
|
}
|
|
5260
5510
|
function MenubarPortal({
|
|
5261
5511
|
...props
|
|
5262
5512
|
}) {
|
|
5263
|
-
return /* @__PURE__ */ (0,
|
|
5513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
5264
5514
|
}
|
|
5265
5515
|
function MenubarRadioGroup({
|
|
5266
5516
|
...props
|
|
5267
5517
|
}) {
|
|
5268
|
-
return /* @__PURE__ */ (0,
|
|
5518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
5269
5519
|
}
|
|
5270
5520
|
function MenubarTrigger({
|
|
5271
5521
|
className,
|
|
5272
5522
|
...props
|
|
5273
5523
|
}) {
|
|
5274
|
-
return /* @__PURE__ */ (0,
|
|
5524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5275
5525
|
MenubarPrimitive.Trigger,
|
|
5276
5526
|
{
|
|
5277
5527
|
"data-slot": "menubar-trigger",
|
|
@@ -5290,7 +5540,7 @@ function MenubarContent({
|
|
|
5290
5540
|
sideOffset = 8,
|
|
5291
5541
|
...props
|
|
5292
5542
|
}) {
|
|
5293
|
-
return /* @__PURE__ */ (0,
|
|
5543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5294
5544
|
MenubarPrimitive.Content,
|
|
5295
5545
|
{
|
|
5296
5546
|
"data-slot": "menubar-content",
|
|
@@ -5311,7 +5561,7 @@ function MenubarItem({
|
|
|
5311
5561
|
variant = "default",
|
|
5312
5562
|
...props
|
|
5313
5563
|
}) {
|
|
5314
|
-
return /* @__PURE__ */ (0,
|
|
5564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5315
5565
|
MenubarPrimitive.Item,
|
|
5316
5566
|
{
|
|
5317
5567
|
"data-slot": "menubar-item",
|
|
@@ -5331,7 +5581,7 @@ function MenubarCheckboxItem({
|
|
|
5331
5581
|
checked,
|
|
5332
5582
|
...props
|
|
5333
5583
|
}) {
|
|
5334
|
-
return /* @__PURE__ */ (0,
|
|
5584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5335
5585
|
MenubarPrimitive.CheckboxItem,
|
|
5336
5586
|
{
|
|
5337
5587
|
"data-slot": "menubar-checkbox-item",
|
|
@@ -5342,7 +5592,7 @@ function MenubarCheckboxItem({
|
|
|
5342
5592
|
checked,
|
|
5343
5593
|
...props,
|
|
5344
5594
|
children: [
|
|
5345
|
-
/* @__PURE__ */ (0,
|
|
5595
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icons.check, { className: "size-4" }) }) }),
|
|
5346
5596
|
children
|
|
5347
5597
|
]
|
|
5348
5598
|
}
|
|
@@ -5353,7 +5603,7 @@ function MenubarRadioItem({
|
|
|
5353
5603
|
children,
|
|
5354
5604
|
...props
|
|
5355
5605
|
}) {
|
|
5356
|
-
return /* @__PURE__ */ (0,
|
|
5606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5357
5607
|
MenubarPrimitive.RadioItem,
|
|
5358
5608
|
{
|
|
5359
5609
|
"data-slot": "menubar-radio-item",
|
|
@@ -5363,7 +5613,7 @@ function MenubarRadioItem({
|
|
|
5363
5613
|
),
|
|
5364
5614
|
...props,
|
|
5365
5615
|
children: [
|
|
5366
|
-
/* @__PURE__ */ (0,
|
|
5616
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icons.circle, { className: "size-2 fill-current" }) }) }),
|
|
5367
5617
|
children
|
|
5368
5618
|
]
|
|
5369
5619
|
}
|
|
@@ -5374,7 +5624,7 @@ function MenubarLabel({
|
|
|
5374
5624
|
inset,
|
|
5375
5625
|
...props
|
|
5376
5626
|
}) {
|
|
5377
|
-
return /* @__PURE__ */ (0,
|
|
5627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5378
5628
|
MenubarPrimitive.Label,
|
|
5379
5629
|
{
|
|
5380
5630
|
"data-slot": "menubar-label",
|
|
@@ -5391,7 +5641,7 @@ function MenubarSeparator({
|
|
|
5391
5641
|
className,
|
|
5392
5642
|
...props
|
|
5393
5643
|
}) {
|
|
5394
|
-
return /* @__PURE__ */ (0,
|
|
5644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5395
5645
|
MenubarPrimitive.Separator,
|
|
5396
5646
|
{
|
|
5397
5647
|
"data-slot": "menubar-separator",
|
|
@@ -5404,7 +5654,7 @@ function MenubarShortcut({
|
|
|
5404
5654
|
className,
|
|
5405
5655
|
...props
|
|
5406
5656
|
}) {
|
|
5407
|
-
return /* @__PURE__ */ (0,
|
|
5657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5408
5658
|
"span",
|
|
5409
5659
|
{
|
|
5410
5660
|
"data-slot": "menubar-shortcut",
|
|
@@ -5419,7 +5669,7 @@ function MenubarShortcut({
|
|
|
5419
5669
|
function MenubarSub({
|
|
5420
5670
|
...props
|
|
5421
5671
|
}) {
|
|
5422
|
-
return /* @__PURE__ */ (0,
|
|
5672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
5423
5673
|
}
|
|
5424
5674
|
function MenubarSubTrigger({
|
|
5425
5675
|
className,
|
|
@@ -5427,7 +5677,7 @@ function MenubarSubTrigger({
|
|
|
5427
5677
|
children,
|
|
5428
5678
|
...props
|
|
5429
5679
|
}) {
|
|
5430
|
-
return /* @__PURE__ */ (0,
|
|
5680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5431
5681
|
MenubarPrimitive.SubTrigger,
|
|
5432
5682
|
{
|
|
5433
5683
|
"data-slot": "menubar-sub-trigger",
|
|
@@ -5439,7 +5689,7 @@ function MenubarSubTrigger({
|
|
|
5439
5689
|
...props,
|
|
5440
5690
|
children: [
|
|
5441
5691
|
children,
|
|
5442
|
-
/* @__PURE__ */ (0,
|
|
5692
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icons.chevronRight, { className: "ms-auto h-4 w-4 rtl:rotate-180" })
|
|
5443
5693
|
]
|
|
5444
5694
|
}
|
|
5445
5695
|
);
|
|
@@ -5448,7 +5698,7 @@ function MenubarSubContent({
|
|
|
5448
5698
|
className,
|
|
5449
5699
|
...props
|
|
5450
5700
|
}) {
|
|
5451
|
-
return /* @__PURE__ */ (0,
|
|
5701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5452
5702
|
MenubarPrimitive.SubContent,
|
|
5453
5703
|
{
|
|
5454
5704
|
"data-slot": "menubar-sub-content",
|
|
@@ -5462,14 +5712,13 @@ function MenubarSubContent({
|
|
|
5462
5712
|
}
|
|
5463
5713
|
|
|
5464
5714
|
// src/components/ui/metric-card.tsx
|
|
5465
|
-
var
|
|
5466
|
-
var import_lucide_react17 = require("lucide-react");
|
|
5715
|
+
var React20 = __toESM(require("react"), 1);
|
|
5467
5716
|
var import_date_fns2 = require("date-fns");
|
|
5468
5717
|
|
|
5469
5718
|
// src/components/ui/skeleton.tsx
|
|
5470
|
-
var
|
|
5719
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5471
5720
|
function Skeleton({ className, ...props }) {
|
|
5472
|
-
return /* @__PURE__ */ (0,
|
|
5721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5473
5722
|
"div",
|
|
5474
5723
|
{
|
|
5475
5724
|
"data-slot": "skeleton",
|
|
@@ -5480,29 +5729,29 @@ function Skeleton({ className, ...props }) {
|
|
|
5480
5729
|
}
|
|
5481
5730
|
|
|
5482
5731
|
// src/components/ui/metric-card.tsx
|
|
5483
|
-
var
|
|
5484
|
-
var MetricCard =
|
|
5732
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5733
|
+
var MetricCard = React20.forwardRef(
|
|
5485
5734
|
({ className, isLoading, children, ...props }, ref) => {
|
|
5486
5735
|
if (isLoading) {
|
|
5487
|
-
return /* @__PURE__ */ (0,
|
|
5736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5488
5737
|
Card,
|
|
5489
5738
|
{
|
|
5490
5739
|
ref,
|
|
5491
5740
|
className: cn("py-4 space-y-3", className),
|
|
5492
5741
|
...props,
|
|
5493
5742
|
children: [
|
|
5494
|
-
/* @__PURE__ */ (0,
|
|
5495
|
-
/* @__PURE__ */ (0,
|
|
5496
|
-
/* @__PURE__ */ (0,
|
|
5743
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Skeleton, { className: "h-4 w-24" }),
|
|
5744
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Skeleton, { className: "h-8 w-16" }),
|
|
5745
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Skeleton, { className: "h-12 w-full" })
|
|
5497
5746
|
]
|
|
5498
5747
|
}
|
|
5499
5748
|
);
|
|
5500
5749
|
}
|
|
5501
|
-
return /* @__PURE__ */ (0,
|
|
5750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5502
5751
|
Card,
|
|
5503
5752
|
{
|
|
5504
5753
|
ref,
|
|
5505
|
-
className: cn("py-4 space-y-3", className),
|
|
5754
|
+
className: cn("py-4 space-y-3 @container", className),
|
|
5506
5755
|
...props,
|
|
5507
5756
|
children
|
|
5508
5757
|
}
|
|
@@ -5510,9 +5759,9 @@ var MetricCard = React18.forwardRef(
|
|
|
5510
5759
|
}
|
|
5511
5760
|
);
|
|
5512
5761
|
MetricCard.displayName = "MetricCard";
|
|
5513
|
-
var MetricCardHeader =
|
|
5762
|
+
var MetricCardHeader = React20.forwardRef(
|
|
5514
5763
|
({ className, href, children, ...props }, ref) => {
|
|
5515
|
-
return /* @__PURE__ */ (0,
|
|
5764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5516
5765
|
"div",
|
|
5517
5766
|
{
|
|
5518
5767
|
ref,
|
|
@@ -5520,14 +5769,14 @@ var MetricCardHeader = React18.forwardRef(
|
|
|
5520
5769
|
...props,
|
|
5521
5770
|
children: [
|
|
5522
5771
|
children,
|
|
5523
|
-
href && /* @__PURE__ */ (0,
|
|
5772
|
+
href && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5524
5773
|
"a",
|
|
5525
5774
|
{
|
|
5526
5775
|
href,
|
|
5527
5776
|
target: "_blank",
|
|
5528
5777
|
rel: "noopener noreferrer",
|
|
5529
5778
|
className: "text-foreground-lighter hover:text-foreground transition-colors",
|
|
5530
|
-
children: /* @__PURE__ */ (0,
|
|
5779
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icons.externalLink, { className: "h-3.5 w-3.5" })
|
|
5531
5780
|
}
|
|
5532
5781
|
)
|
|
5533
5782
|
]
|
|
@@ -5536,9 +5785,9 @@ var MetricCardHeader = React18.forwardRef(
|
|
|
5536
5785
|
}
|
|
5537
5786
|
);
|
|
5538
5787
|
MetricCardHeader.displayName = "MetricCardHeader";
|
|
5539
|
-
var MetricCardLabel =
|
|
5788
|
+
var MetricCardLabel = React20.forwardRef(
|
|
5540
5789
|
({ className, tooltip, icon, children, ...props }, ref) => {
|
|
5541
|
-
const label = /* @__PURE__ */ (0,
|
|
5790
|
+
const label = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5542
5791
|
"h3",
|
|
5543
5792
|
{
|
|
5544
5793
|
ref,
|
|
@@ -5547,28 +5796,28 @@ var MetricCardLabel = React18.forwardRef(
|
|
|
5547
5796
|
className
|
|
5548
5797
|
),
|
|
5549
5798
|
...props,
|
|
5550
|
-
children: /* @__PURE__ */ (0,
|
|
5551
|
-
icon && /* @__PURE__ */ (0,
|
|
5552
|
-
/* @__PURE__ */ (0,
|
|
5799
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
5800
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "flex-shrink-0", children: icon }),
|
|
5801
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children })
|
|
5553
5802
|
] })
|
|
5554
5803
|
}
|
|
5555
5804
|
);
|
|
5556
5805
|
if (tooltip) {
|
|
5557
|
-
return /* @__PURE__ */ (0,
|
|
5558
|
-
/* @__PURE__ */ (0,
|
|
5806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Tooltip, { children: [
|
|
5807
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-1.5 cursor-help", children: [
|
|
5559
5808
|
label,
|
|
5560
|
-
/* @__PURE__ */ (0,
|
|
5809
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icons.info, { className: "h-3.5 w-3.5 text-foreground-lighter" })
|
|
5561
5810
|
] }) }),
|
|
5562
|
-
/* @__PURE__ */ (0,
|
|
5811
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "max-w-xs", children: tooltip }) })
|
|
5563
5812
|
] }) });
|
|
5564
5813
|
}
|
|
5565
5814
|
return label;
|
|
5566
5815
|
}
|
|
5567
5816
|
);
|
|
5568
5817
|
MetricCardLabel.displayName = "MetricCardLabel";
|
|
5569
|
-
var MetricCardContent =
|
|
5818
|
+
var MetricCardContent = React20.forwardRef(
|
|
5570
5819
|
({ className, children, ...props }, ref) => {
|
|
5571
|
-
return /* @__PURE__ */ (0,
|
|
5820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5572
5821
|
"div",
|
|
5573
5822
|
{
|
|
5574
5823
|
ref,
|
|
@@ -5580,9 +5829,9 @@ var MetricCardContent = React18.forwardRef(
|
|
|
5580
5829
|
}
|
|
5581
5830
|
);
|
|
5582
5831
|
MetricCardContent.displayName = "MetricCardContent";
|
|
5583
|
-
var MetricCardValue =
|
|
5832
|
+
var MetricCardValue = React20.forwardRef(
|
|
5584
5833
|
({ className, children, ...props }, ref) => {
|
|
5585
|
-
return /* @__PURE__ */ (0,
|
|
5834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5586
5835
|
"div",
|
|
5587
5836
|
{
|
|
5588
5837
|
ref,
|
|
@@ -5594,7 +5843,7 @@ var MetricCardValue = React18.forwardRef(
|
|
|
5594
5843
|
}
|
|
5595
5844
|
);
|
|
5596
5845
|
MetricCardValue.displayName = "MetricCardValue";
|
|
5597
|
-
var MetricCardDifferential =
|
|
5846
|
+
var MetricCardDifferential = React20.forwardRef(
|
|
5598
5847
|
({ className, variant = "positive", children, ...props }, ref) => {
|
|
5599
5848
|
const childrenString = typeof children === "string" ? children : String(children);
|
|
5600
5849
|
const signMatch = childrenString.match(/^([+\-])|([+\-])$/);
|
|
@@ -5604,7 +5853,7 @@ var MetricCardDifferential = React18.forwardRef(
|
|
|
5604
5853
|
sign = signMatch[1] || signMatch[2] || "";
|
|
5605
5854
|
value = childrenString.replace(/^[+\-]|[+\-]$/, "").trim();
|
|
5606
5855
|
}
|
|
5607
|
-
return /* @__PURE__ */ (0,
|
|
5856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5608
5857
|
"div",
|
|
5609
5858
|
{
|
|
5610
5859
|
ref,
|
|
@@ -5615,19 +5864,19 @@ var MetricCardDifferential = React18.forwardRef(
|
|
|
5615
5864
|
),
|
|
5616
5865
|
...props,
|
|
5617
5866
|
children: [
|
|
5618
|
-
/* @__PURE__ */ (0,
|
|
5619
|
-
sign && /* @__PURE__ */ (0,
|
|
5867
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: value }),
|
|
5868
|
+
sign && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "inline-block", dir: "ltr", children: sign })
|
|
5620
5869
|
]
|
|
5621
5870
|
}
|
|
5622
5871
|
);
|
|
5623
5872
|
}
|
|
5624
5873
|
);
|
|
5625
5874
|
MetricCardDifferential.displayName = "MetricCardDifferential";
|
|
5626
|
-
var MetricCardSparkline =
|
|
5875
|
+
var MetricCardSparkline = React20.forwardRef(
|
|
5627
5876
|
({ data, dataKey, usePersianCalendar = false, className }, _ref) => {
|
|
5628
|
-
const [hoveredIndex, setHoveredIndex] =
|
|
5629
|
-
const [tooltipPosition, setTooltipPosition] =
|
|
5630
|
-
const containerRef =
|
|
5877
|
+
const [hoveredIndex, setHoveredIndex] = React20.useState(null);
|
|
5878
|
+
const [tooltipPosition, setTooltipPosition] = React20.useState({ x: 0, y: 0 });
|
|
5879
|
+
const containerRef = React20.useRef(null);
|
|
5631
5880
|
if (!data || data.length === 0) return null;
|
|
5632
5881
|
const values = data.map((item) => item[dataKey]);
|
|
5633
5882
|
const timestamps = data.map((item) => new Date(item.timestamp));
|
|
@@ -5653,7 +5902,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5653
5902
|
areaPath += ` L ${points[0].x},${height}`;
|
|
5654
5903
|
areaPath += ` Z`;
|
|
5655
5904
|
const isPositive = values[values.length - 1] >= values[0];
|
|
5656
|
-
const gradientId =
|
|
5905
|
+
const gradientId = React20.useId();
|
|
5657
5906
|
const handleMouseMove = (e) => {
|
|
5658
5907
|
if (!containerRef.current) return;
|
|
5659
5908
|
const rect = containerRef.current.getBoundingClientRect();
|
|
@@ -5688,7 +5937,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5688
5937
|
return (0, import_date_fns2.format)(date, "MMM d");
|
|
5689
5938
|
}
|
|
5690
5939
|
};
|
|
5691
|
-
return /* @__PURE__ */ (0,
|
|
5940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5692
5941
|
"div",
|
|
5693
5942
|
{
|
|
5694
5943
|
ref: containerRef,
|
|
@@ -5696,7 +5945,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5696
5945
|
onMouseMove: handleMouseMove,
|
|
5697
5946
|
onMouseLeave: handleMouseLeave,
|
|
5698
5947
|
children: [
|
|
5699
|
-
/* @__PURE__ */ (0,
|
|
5948
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5700
5949
|
"svg",
|
|
5701
5950
|
{
|
|
5702
5951
|
width: "100%",
|
|
@@ -5705,8 +5954,8 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5705
5954
|
preserveAspectRatio: "none",
|
|
5706
5955
|
className: "overflow-visible",
|
|
5707
5956
|
children: [
|
|
5708
|
-
/* @__PURE__ */ (0,
|
|
5709
|
-
/* @__PURE__ */ (0,
|
|
5957
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("linearGradient", { id: gradientId, x1: "0", x2: "0", y1: "0", y2: "1", children: [
|
|
5958
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5710
5959
|
"stop",
|
|
5711
5960
|
{
|
|
5712
5961
|
offset: "0%",
|
|
@@ -5717,7 +5966,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5717
5966
|
)
|
|
5718
5967
|
}
|
|
5719
5968
|
),
|
|
5720
|
-
/* @__PURE__ */ (0,
|
|
5969
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5721
5970
|
"stop",
|
|
5722
5971
|
{
|
|
5723
5972
|
offset: "100%",
|
|
@@ -5729,14 +5978,14 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5729
5978
|
}
|
|
5730
5979
|
)
|
|
5731
5980
|
] }) }),
|
|
5732
|
-
/* @__PURE__ */ (0,
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5733
5982
|
"path",
|
|
5734
5983
|
{
|
|
5735
5984
|
d: areaPath,
|
|
5736
5985
|
fill: `url(#${gradientId})`
|
|
5737
5986
|
}
|
|
5738
5987
|
),
|
|
5739
|
-
/* @__PURE__ */ (0,
|
|
5988
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5740
5989
|
"path",
|
|
5741
5990
|
{
|
|
5742
5991
|
d: pathData,
|
|
@@ -5750,8 +5999,8 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5750
5999
|
)
|
|
5751
6000
|
}
|
|
5752
6001
|
),
|
|
5753
|
-
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0,
|
|
5754
|
-
/* @__PURE__ */ (0,
|
|
6002
|
+
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
6003
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5755
6004
|
"line",
|
|
5756
6005
|
{
|
|
5757
6006
|
x1: (points[hoveredIndex].x + points[hoveredIndex + 1].x) / 2,
|
|
@@ -5764,7 +6013,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5764
6013
|
className: "text-foreground-lighter opacity-50"
|
|
5765
6014
|
}
|
|
5766
6015
|
),
|
|
5767
|
-
/* @__PURE__ */ (0,
|
|
6016
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5768
6017
|
"circle",
|
|
5769
6018
|
{
|
|
5770
6019
|
cx: (points[hoveredIndex].x + points[hoveredIndex + 1].x) / 2,
|
|
@@ -5778,7 +6027,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5778
6027
|
)
|
|
5779
6028
|
}
|
|
5780
6029
|
),
|
|
5781
|
-
/* @__PURE__ */ (0,
|
|
6030
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5782
6031
|
"circle",
|
|
5783
6032
|
{
|
|
5784
6033
|
cx: (points[hoveredIndex].x + points[hoveredIndex + 1].x) / 2,
|
|
@@ -5794,7 +6043,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5794
6043
|
]
|
|
5795
6044
|
}
|
|
5796
6045
|
),
|
|
5797
|
-
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0,
|
|
6046
|
+
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5798
6047
|
"div",
|
|
5799
6048
|
{
|
|
5800
6049
|
className: "absolute z-50 pointer-events-none",
|
|
@@ -5802,9 +6051,9 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5802
6051
|
left: `${tooltipPosition.x + 8}px`,
|
|
5803
6052
|
top: `${tooltipPosition.y - 40}px`
|
|
5804
6053
|
},
|
|
5805
|
-
children: /* @__PURE__ */ (0,
|
|
5806
|
-
/* @__PURE__ */ (0,
|
|
5807
|
-
/* @__PURE__ */ (0,
|
|
6054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "bg-background-surface-100 border border-border-default rounded-md shadow-lg px-2 py-1.5", children: [
|
|
6055
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-xs text-foreground-lighter", children: formatDate(points[hoveredIndex].timestamp) }),
|
|
6056
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-xs font-medium tabular-nums mt-0.5", children: points[hoveredIndex].value.toLocaleString(usePersianCalendar ? "fa-IR" : "en-US") })
|
|
5808
6057
|
] })
|
|
5809
6058
|
}
|
|
5810
6059
|
)
|
|
@@ -5816,16 +6065,15 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5816
6065
|
MetricCardSparkline.displayName = "MetricCardSparkline";
|
|
5817
6066
|
|
|
5818
6067
|
// src/components/ui/native-select.tsx
|
|
5819
|
-
var
|
|
5820
|
-
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6068
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5821
6069
|
function NativeSelect({ className, ...props }) {
|
|
5822
|
-
return /* @__PURE__ */ (0,
|
|
6070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
5823
6071
|
"div",
|
|
5824
6072
|
{
|
|
5825
6073
|
className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
5826
6074
|
"data-slot": "native-select-wrapper",
|
|
5827
6075
|
children: [
|
|
5828
|
-
/* @__PURE__ */ (0,
|
|
6076
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5829
6077
|
"select",
|
|
5830
6078
|
{
|
|
5831
6079
|
"data-slot": "native-select",
|
|
@@ -5847,8 +6095,8 @@ function NativeSelect({ className, ...props }) {
|
|
|
5847
6095
|
...props
|
|
5848
6096
|
}
|
|
5849
6097
|
),
|
|
5850
|
-
/* @__PURE__ */ (0,
|
|
5851
|
-
|
|
6098
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6099
|
+
Icons.chevronDown,
|
|
5852
6100
|
{
|
|
5853
6101
|
className: "pointer-events-none absolute top-1/2 end-3 size-4 -translate-y-1/2 text-foreground-muted select-none",
|
|
5854
6102
|
"aria-hidden": "true",
|
|
@@ -5860,13 +6108,13 @@ function NativeSelect({ className, ...props }) {
|
|
|
5860
6108
|
);
|
|
5861
6109
|
}
|
|
5862
6110
|
function NativeSelectOption({ ...props }) {
|
|
5863
|
-
return /* @__PURE__ */ (0,
|
|
6111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { "data-slot": "native-select-option", ...props });
|
|
5864
6112
|
}
|
|
5865
6113
|
function NativeSelectOptGroup({
|
|
5866
6114
|
className,
|
|
5867
6115
|
...props
|
|
5868
6116
|
}) {
|
|
5869
|
-
return /* @__PURE__ */ (0,
|
|
6117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5870
6118
|
"optgroup",
|
|
5871
6119
|
{
|
|
5872
6120
|
"data-slot": "native-select-optgroup",
|
|
@@ -5878,16 +6126,15 @@ function NativeSelectOptGroup({
|
|
|
5878
6126
|
|
|
5879
6127
|
// src/components/ui/navigation-menu.tsx
|
|
5880
6128
|
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"), 1);
|
|
5881
|
-
var
|
|
5882
|
-
var
|
|
5883
|
-
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6129
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
6130
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5884
6131
|
function NavigationMenu({
|
|
5885
6132
|
className,
|
|
5886
6133
|
children,
|
|
5887
6134
|
viewport = true,
|
|
5888
6135
|
...props
|
|
5889
6136
|
}) {
|
|
5890
|
-
return /* @__PURE__ */ (0,
|
|
6137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
5891
6138
|
NavigationMenuPrimitive.Root,
|
|
5892
6139
|
{
|
|
5893
6140
|
"data-slot": "navigation-menu",
|
|
@@ -5899,7 +6146,7 @@ function NavigationMenu({
|
|
|
5899
6146
|
...props,
|
|
5900
6147
|
children: [
|
|
5901
6148
|
children,
|
|
5902
|
-
viewport && /* @__PURE__ */ (0,
|
|
6149
|
+
viewport && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NavigationMenuViewport, {})
|
|
5903
6150
|
]
|
|
5904
6151
|
}
|
|
5905
6152
|
);
|
|
@@ -5908,7 +6155,7 @@ function NavigationMenuList({
|
|
|
5908
6155
|
className,
|
|
5909
6156
|
...props
|
|
5910
6157
|
}) {
|
|
5911
|
-
return /* @__PURE__ */ (0,
|
|
6158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5912
6159
|
NavigationMenuPrimitive.List,
|
|
5913
6160
|
{
|
|
5914
6161
|
"data-slot": "navigation-menu-list",
|
|
@@ -5924,7 +6171,7 @@ function NavigationMenuItem({
|
|
|
5924
6171
|
className,
|
|
5925
6172
|
...props
|
|
5926
6173
|
}) {
|
|
5927
|
-
return /* @__PURE__ */ (0,
|
|
6174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5928
6175
|
NavigationMenuPrimitive.Item,
|
|
5929
6176
|
{
|
|
5930
6177
|
"data-slot": "navigation-menu-item",
|
|
@@ -5933,7 +6180,7 @@ function NavigationMenuItem({
|
|
|
5933
6180
|
}
|
|
5934
6181
|
);
|
|
5935
6182
|
}
|
|
5936
|
-
var navigationMenuTriggerStyle = (0,
|
|
6183
|
+
var navigationMenuTriggerStyle = (0, import_class_variance_authority11.cva)(
|
|
5937
6184
|
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
|
|
5938
6185
|
);
|
|
5939
6186
|
function NavigationMenuTrigger({
|
|
@@ -5941,7 +6188,7 @@ function NavigationMenuTrigger({
|
|
|
5941
6188
|
children,
|
|
5942
6189
|
...props
|
|
5943
6190
|
}) {
|
|
5944
|
-
return /* @__PURE__ */ (0,
|
|
6191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
5945
6192
|
NavigationMenuPrimitive.Trigger,
|
|
5946
6193
|
{
|
|
5947
6194
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -5950,8 +6197,8 @@ function NavigationMenuTrigger({
|
|
|
5950
6197
|
children: [
|
|
5951
6198
|
children,
|
|
5952
6199
|
" ",
|
|
5953
|
-
/* @__PURE__ */ (0,
|
|
5954
|
-
|
|
6200
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6201
|
+
Icons.chevronDown,
|
|
5955
6202
|
{
|
|
5956
6203
|
className: "relative top-[1px] ms-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
5957
6204
|
"aria-hidden": "true"
|
|
@@ -5965,7 +6212,7 @@ function NavigationMenuContent({
|
|
|
5965
6212
|
className,
|
|
5966
6213
|
...props
|
|
5967
6214
|
}) {
|
|
5968
|
-
return /* @__PURE__ */ (0,
|
|
6215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5969
6216
|
NavigationMenuPrimitive.Content,
|
|
5970
6217
|
{
|
|
5971
6218
|
"data-slot": "navigation-menu-content",
|
|
@@ -5982,13 +6229,13 @@ function NavigationMenuViewport({
|
|
|
5982
6229
|
className,
|
|
5983
6230
|
...props
|
|
5984
6231
|
}) {
|
|
5985
|
-
return /* @__PURE__ */ (0,
|
|
6232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5986
6233
|
"div",
|
|
5987
6234
|
{
|
|
5988
6235
|
className: cn(
|
|
5989
6236
|
"absolute top-full start-0 isolate z-50 flex justify-center"
|
|
5990
6237
|
),
|
|
5991
|
-
children: /* @__PURE__ */ (0,
|
|
6238
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5992
6239
|
NavigationMenuPrimitive.Viewport,
|
|
5993
6240
|
{
|
|
5994
6241
|
"data-slot": "navigation-menu-viewport",
|
|
@@ -6006,7 +6253,7 @@ function NavigationMenuLink({
|
|
|
6006
6253
|
className,
|
|
6007
6254
|
...props
|
|
6008
6255
|
}) {
|
|
6009
|
-
return /* @__PURE__ */ (0,
|
|
6256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6010
6257
|
NavigationMenuPrimitive.Link,
|
|
6011
6258
|
{
|
|
6012
6259
|
"data-slot": "navigation-menu-link",
|
|
@@ -6022,7 +6269,7 @@ function NavigationMenuIndicator({
|
|
|
6022
6269
|
className,
|
|
6023
6270
|
...props
|
|
6024
6271
|
}) {
|
|
6025
|
-
return /* @__PURE__ */ (0,
|
|
6272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6026
6273
|
NavigationMenuPrimitive.Indicator,
|
|
6027
6274
|
{
|
|
6028
6275
|
"data-slot": "navigation-menu-indicator",
|
|
@@ -6031,18 +6278,17 @@ function NavigationMenuIndicator({
|
|
|
6031
6278
|
className
|
|
6032
6279
|
),
|
|
6033
6280
|
...props,
|
|
6034
|
-
children: /* @__PURE__ */ (0,
|
|
6281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
6035
6282
|
}
|
|
6036
6283
|
);
|
|
6037
6284
|
}
|
|
6038
6285
|
|
|
6039
6286
|
// src/components/ui/pagination.tsx
|
|
6040
|
-
var
|
|
6041
|
-
var
|
|
6042
|
-
var
|
|
6043
|
-
var PaginationDirectionContext = React19.createContext("rtl");
|
|
6287
|
+
var React21 = __toESM(require("react"), 1);
|
|
6288
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6289
|
+
var PaginationDirectionContext = React21.createContext("rtl");
|
|
6044
6290
|
function usePaginationDirection() {
|
|
6045
|
-
return
|
|
6291
|
+
return React21.useContext(PaginationDirectionContext);
|
|
6046
6292
|
}
|
|
6047
6293
|
function Pagination({
|
|
6048
6294
|
className,
|
|
@@ -6051,7 +6297,7 @@ function Pagination({
|
|
|
6051
6297
|
...props
|
|
6052
6298
|
}) {
|
|
6053
6299
|
const resolvedDir = dir ?? "rtl";
|
|
6054
|
-
return /* @__PURE__ */ (0,
|
|
6300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PaginationDirectionContext.Provider, { value: resolvedDir, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6055
6301
|
"nav",
|
|
6056
6302
|
{
|
|
6057
6303
|
role: "navigation",
|
|
@@ -6069,7 +6315,7 @@ function PaginationContent({
|
|
|
6069
6315
|
...props
|
|
6070
6316
|
}) {
|
|
6071
6317
|
const dir = usePaginationDirection();
|
|
6072
|
-
return /* @__PURE__ */ (0,
|
|
6318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6073
6319
|
"ul",
|
|
6074
6320
|
{
|
|
6075
6321
|
"data-slot": "pagination-content",
|
|
@@ -6083,7 +6329,7 @@ function PaginationContent({
|
|
|
6083
6329
|
);
|
|
6084
6330
|
}
|
|
6085
6331
|
function PaginationItem({ ...props }) {
|
|
6086
|
-
return /* @__PURE__ */ (0,
|
|
6332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
6087
6333
|
}
|
|
6088
6334
|
function PaginationLink({
|
|
6089
6335
|
className,
|
|
@@ -6094,7 +6340,7 @@ function PaginationLink({
|
|
|
6094
6340
|
}) {
|
|
6095
6341
|
const contextDir = usePaginationDirection();
|
|
6096
6342
|
const linkDir = dir ?? (contextDir === "rtl" ? "rtl" : "ltr");
|
|
6097
|
-
return /* @__PURE__ */ (0,
|
|
6343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6098
6344
|
"a",
|
|
6099
6345
|
{
|
|
6100
6346
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -6127,8 +6373,8 @@ function PaginationPrevious({
|
|
|
6127
6373
|
const dir = usePaginationDirection();
|
|
6128
6374
|
const isRTL = dir === "rtl";
|
|
6129
6375
|
const label = isRTL ? "\u0642\u0628\u0644\u06CC" : "Previous";
|
|
6130
|
-
const Icon2 = isRTL ?
|
|
6131
|
-
return /* @__PURE__ */ (0,
|
|
6376
|
+
const Icon2 = isRTL ? Icons.chevronRight : Icons.chevronLeft;
|
|
6377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6132
6378
|
PaginationLink,
|
|
6133
6379
|
{
|
|
6134
6380
|
"aria-label": isRTL ? "\u0631\u0641\u062A\u0646 \u0628\u0647 \u0635\u0641\u062D\u0647 \u0642\u0628\u0644\u06CC" : "Go to previous page",
|
|
@@ -6140,8 +6386,8 @@ function PaginationPrevious({
|
|
|
6140
6386
|
dir: "ltr",
|
|
6141
6387
|
...props,
|
|
6142
6388
|
children: [
|
|
6143
|
-
/* @__PURE__ */ (0,
|
|
6144
|
-
/* @__PURE__ */ (0,
|
|
6389
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon2, { className: "size-4" }),
|
|
6390
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hidden sm:inline no-underline", children: label })
|
|
6145
6391
|
]
|
|
6146
6392
|
}
|
|
6147
6393
|
);
|
|
@@ -6153,8 +6399,8 @@ function PaginationNext({
|
|
|
6153
6399
|
const dir = usePaginationDirection();
|
|
6154
6400
|
const isRTL = dir === "rtl";
|
|
6155
6401
|
const label = isRTL ? "\u0628\u0639\u062F\u06CC" : "Next";
|
|
6156
|
-
const Icon2 = isRTL ?
|
|
6157
|
-
return /* @__PURE__ */ (0,
|
|
6402
|
+
const Icon2 = isRTL ? Icons.chevronLeft : Icons.chevronRight;
|
|
6403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6158
6404
|
PaginationLink,
|
|
6159
6405
|
{
|
|
6160
6406
|
"aria-label": isRTL ? "\u0631\u0641\u062A\u0646 \u0628\u0647 \u0635\u0641\u062D\u0647 \u0628\u0639\u062F\u06CC" : "Go to next page",
|
|
@@ -6165,12 +6411,12 @@ function PaginationNext({
|
|
|
6165
6411
|
),
|
|
6166
6412
|
dir: "ltr",
|
|
6167
6413
|
...props,
|
|
6168
|
-
children: isRTL ? /* @__PURE__ */ (0,
|
|
6169
|
-
/* @__PURE__ */ (0,
|
|
6170
|
-
/* @__PURE__ */ (0,
|
|
6171
|
-
] }) : /* @__PURE__ */ (0,
|
|
6172
|
-
/* @__PURE__ */ (0,
|
|
6173
|
-
/* @__PURE__ */ (0,
|
|
6414
|
+
children: isRTL ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
6415
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon2, { className: "size-4" }),
|
|
6416
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hidden sm:inline no-underline", children: label })
|
|
6417
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
6418
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hidden sm:inline no-underline", children: label }),
|
|
6419
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon2, { className: "size-4" })
|
|
6174
6420
|
] })
|
|
6175
6421
|
}
|
|
6176
6422
|
);
|
|
@@ -6179,7 +6425,7 @@ function PaginationEllipsis({
|
|
|
6179
6425
|
className,
|
|
6180
6426
|
...props
|
|
6181
6427
|
}) {
|
|
6182
|
-
return /* @__PURE__ */ (0,
|
|
6428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6183
6429
|
"span",
|
|
6184
6430
|
{
|
|
6185
6431
|
"aria-hidden": true,
|
|
@@ -6187,15 +6433,15 @@ function PaginationEllipsis({
|
|
|
6187
6433
|
className: cn("flex size-9 items-center justify-center", className),
|
|
6188
6434
|
...props,
|
|
6189
6435
|
children: [
|
|
6190
|
-
/* @__PURE__ */ (0,
|
|
6191
|
-
/* @__PURE__ */ (0,
|
|
6436
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icons.moreHorizontal, { className: "size-4" }),
|
|
6437
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
6192
6438
|
]
|
|
6193
6439
|
}
|
|
6194
6440
|
);
|
|
6195
6441
|
}
|
|
6196
6442
|
|
|
6197
6443
|
// src/components/ui/pagination-controlled.tsx
|
|
6198
|
-
var
|
|
6444
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6199
6445
|
function PaginationControlled({
|
|
6200
6446
|
currentPage,
|
|
6201
6447
|
totalPages,
|
|
@@ -6258,8 +6504,8 @@ function PaginationControlled({
|
|
|
6258
6504
|
const pageNumbers = generatePageNumbers();
|
|
6259
6505
|
const showFirstButton = showFirstLast && !pageNumbers.includes(1) && currentPage > 1;
|
|
6260
6506
|
const showLastButton = showFirstLast && !pageNumbers.includes(totalPages) && currentPage < totalPages;
|
|
6261
|
-
return /* @__PURE__ */ (0,
|
|
6262
|
-
showFirstButton && /* @__PURE__ */ (0,
|
|
6507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Pagination, { className, dir, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(PaginationContent, { children: [
|
|
6508
|
+
showFirstButton && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6263
6509
|
PaginationLink,
|
|
6264
6510
|
{
|
|
6265
6511
|
href: "#",
|
|
@@ -6270,7 +6516,7 @@ function PaginationControlled({
|
|
|
6270
6516
|
children: 1 .toLocaleString("fa-IR")
|
|
6271
6517
|
}
|
|
6272
6518
|
) }),
|
|
6273
|
-
showPrevNext && /* @__PURE__ */ (0,
|
|
6519
|
+
showPrevNext && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6274
6520
|
PaginationPrevious,
|
|
6275
6521
|
{
|
|
6276
6522
|
href: "#",
|
|
@@ -6283,9 +6529,9 @@ function PaginationControlled({
|
|
|
6283
6529
|
) }),
|
|
6284
6530
|
pageNumbers.map((page, index) => {
|
|
6285
6531
|
if (page === "ellipsis") {
|
|
6286
|
-
return /* @__PURE__ */ (0,
|
|
6532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationEllipsis, {}) }, `ellipsis-${index}`);
|
|
6287
6533
|
}
|
|
6288
|
-
return /* @__PURE__ */ (0,
|
|
6534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6289
6535
|
PaginationLink,
|
|
6290
6536
|
{
|
|
6291
6537
|
href: "#",
|
|
@@ -6298,7 +6544,7 @@ function PaginationControlled({
|
|
|
6298
6544
|
}
|
|
6299
6545
|
) }, page);
|
|
6300
6546
|
}),
|
|
6301
|
-
showPrevNext && /* @__PURE__ */ (0,
|
|
6547
|
+
showPrevNext && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6302
6548
|
PaginationNext,
|
|
6303
6549
|
{
|
|
6304
6550
|
href: "#",
|
|
@@ -6309,7 +6555,7 @@ function PaginationControlled({
|
|
|
6309
6555
|
className: currentPage === totalPages ? "pointer-events-none opacity-50" : ""
|
|
6310
6556
|
}
|
|
6311
6557
|
) }),
|
|
6312
|
-
showLastButton && /* @__PURE__ */ (0,
|
|
6558
|
+
showLastButton && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6313
6559
|
PaginationLink,
|
|
6314
6560
|
{
|
|
6315
6561
|
href: "#",
|
|
@@ -6324,8 +6570,8 @@ function PaginationControlled({
|
|
|
6324
6570
|
}
|
|
6325
6571
|
|
|
6326
6572
|
// src/components/ui/profile-card.tsx
|
|
6327
|
-
var
|
|
6328
|
-
var
|
|
6573
|
+
var React22 = __toESM(require("react"), 1);
|
|
6574
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6329
6575
|
var formatFollowers2 = (count) => {
|
|
6330
6576
|
if (count >= 1e6) {
|
|
6331
6577
|
return `${(count / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
@@ -6335,7 +6581,7 @@ var formatFollowers2 = (count) => {
|
|
|
6335
6581
|
}
|
|
6336
6582
|
return count.toString();
|
|
6337
6583
|
};
|
|
6338
|
-
var ProfileCard =
|
|
6584
|
+
var ProfileCard = React22.forwardRef(
|
|
6339
6585
|
({
|
|
6340
6586
|
className,
|
|
6341
6587
|
name,
|
|
@@ -6383,12 +6629,12 @@ var ProfileCard = React20.forwardRef(
|
|
|
6383
6629
|
transparent: "bg-transparent border border-border"
|
|
6384
6630
|
};
|
|
6385
6631
|
const currentSize = sizeClasses[size];
|
|
6386
|
-
return /* @__PURE__ */ (0,
|
|
6632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
6387
6633
|
"div",
|
|
6388
6634
|
{
|
|
6389
6635
|
ref,
|
|
6390
6636
|
className: cn(
|
|
6391
|
-
"flex flex-col items-center rounded-lg shadow-sm transition-colors",
|
|
6637
|
+
"flex flex-col items-center rounded-lg shadow-sm transition-colors @container",
|
|
6392
6638
|
variantClasses[variant],
|
|
6393
6639
|
currentSize.container,
|
|
6394
6640
|
onCardClick && "cursor-pointer hover:bg-surface-200",
|
|
@@ -6397,22 +6643,22 @@ var ProfileCard = React20.forwardRef(
|
|
|
6397
6643
|
onClick: onCardClick,
|
|
6398
6644
|
...props,
|
|
6399
6645
|
children: [
|
|
6400
|
-
/* @__PURE__ */ (0,
|
|
6401
|
-
/* @__PURE__ */ (0,
|
|
6402
|
-
/* @__PURE__ */ (0,
|
|
6403
|
-
] }) }) : avatarBorderVariant === "primary" ? /* @__PURE__ */ (0,
|
|
6404
|
-
/* @__PURE__ */ (0,
|
|
6405
|
-
/* @__PURE__ */ (0,
|
|
6406
|
-
] }) : /* @__PURE__ */ (0,
|
|
6407
|
-
/* @__PURE__ */ (0,
|
|
6408
|
-
/* @__PURE__ */ (0,
|
|
6646
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative flex-shrink-0", children: avatarBorderVariant === "gold" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative p-0.5 rounded-full bg-gradient-to-br from-amber-500 via-yellow-400 to-amber-500", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Avatar, { className: cn(currentSize.avatar, "ring-2 ring-background"), children: [
|
|
6647
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6648
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6649
|
+
] }) }) : avatarBorderVariant === "primary" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Avatar, { className: cn(currentSize.avatar, "ring-2 ring-offset-2 ring-offset-background ring-primary"), children: [
|
|
6650
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6651
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6652
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Avatar, { className: currentSize.avatar, children: [
|
|
6653
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6654
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6409
6655
|
] }) }),
|
|
6410
|
-
/* @__PURE__ */ (0,
|
|
6411
|
-
/* @__PURE__ */ (0,
|
|
6412
|
-
/* @__PURE__ */ (0,
|
|
6413
|
-
followers !== void 0 && /* @__PURE__ */ (0,
|
|
6414
|
-
followersIcon && /* @__PURE__ */ (0,
|
|
6415
|
-
/* @__PURE__ */ (0,
|
|
6656
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col items-center gap-0.5 w-full", children: [
|
|
6657
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h3", { className: cn("font-semibold text-foreground text-center", currentSize.name), children: name }),
|
|
6658
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: cn("text-muted-foreground text-center", currentSize.username), children: username }),
|
|
6659
|
+
followers !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("flex items-center gap-1.5 text-muted-foreground mt-0.5", currentSize.followers), children: [
|
|
6660
|
+
followersIcon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: cn("flex-shrink-0", currentSize.iconSize), children: followersIcon }),
|
|
6661
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "font-medium", children: formatFollowers2(followers) })
|
|
6416
6662
|
] })
|
|
6417
6663
|
] })
|
|
6418
6664
|
]
|
|
@@ -6423,9 +6669,9 @@ var ProfileCard = React20.forwardRef(
|
|
|
6423
6669
|
ProfileCard.displayName = "ProfileCard";
|
|
6424
6670
|
|
|
6425
6671
|
// src/components/ui/profile-info.tsx
|
|
6426
|
-
var
|
|
6427
|
-
var
|
|
6428
|
-
var ProfileInfo =
|
|
6672
|
+
var React23 = __toESM(require("react"), 1);
|
|
6673
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6674
|
+
var ProfileInfo = React23.forwardRef(
|
|
6429
6675
|
({
|
|
6430
6676
|
className,
|
|
6431
6677
|
name,
|
|
@@ -6480,7 +6726,7 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6480
6726
|
none: ""
|
|
6481
6727
|
};
|
|
6482
6728
|
const currentSize = sizeClasses[size];
|
|
6483
|
-
return /* @__PURE__ */ (0,
|
|
6729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
6484
6730
|
"div",
|
|
6485
6731
|
{
|
|
6486
6732
|
ref,
|
|
@@ -6494,24 +6740,24 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6494
6740
|
onClick: onProfileClick,
|
|
6495
6741
|
...props,
|
|
6496
6742
|
children: [
|
|
6497
|
-
/* @__PURE__ */ (0,
|
|
6498
|
-
/* @__PURE__ */ (0,
|
|
6499
|
-
/* @__PURE__ */ (0,
|
|
6500
|
-
/* @__PURE__ */ (0,
|
|
6501
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
6502
|
-
/* @__PURE__ */ (0,
|
|
6503
|
-
/* @__PURE__ */ (0,
|
|
6743
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
6744
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "relative", children: avatarBorderVariant === "gold" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "relative p-0.5 rounded-full bg-gradient-to-br from-amber-500 via-yellow-400 to-amber-500", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Avatar, { className: cn(currentSize.avatar, "ring-2 ring-background"), children: [
|
|
6745
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6746
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6747
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Avatar, { className: cn(currentSize.avatar, borderClasses[avatarBorderVariant]), children: [
|
|
6748
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6749
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6504
6750
|
] }) }),
|
|
6505
|
-
/* @__PURE__ */ (0,
|
|
6506
|
-
/* @__PURE__ */ (0,
|
|
6507
|
-
/* @__PURE__ */ (0,
|
|
6508
|
-
infoText && /* @__PURE__ */ (0,
|
|
6509
|
-
infoIcon && /* @__PURE__ */ (0,
|
|
6510
|
-
/* @__PURE__ */ (0,
|
|
6751
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
6752
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h3", { className: cn("font-semibold text-foreground", currentSize.name), children: name }),
|
|
6753
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: cn("text-muted-foreground", currentSize.username), children: username }),
|
|
6754
|
+
infoText && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("flex items-center gap-1.5 text-muted-foreground", currentSize.info), children: [
|
|
6755
|
+
infoIcon && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex-shrink-0", children: infoIcon }),
|
|
6756
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "font-medium", children: infoText })
|
|
6511
6757
|
] })
|
|
6512
6758
|
] })
|
|
6513
6759
|
] }),
|
|
6514
|
-
(actionIcon || onActionClick) && /* @__PURE__ */ (0,
|
|
6760
|
+
(actionIcon || onActionClick) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6515
6761
|
Button,
|
|
6516
6762
|
{
|
|
6517
6763
|
variant: "ghost",
|
|
@@ -6522,7 +6768,7 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6522
6768
|
onActionClick?.();
|
|
6523
6769
|
},
|
|
6524
6770
|
"aria-label": "\u0639\u0645\u0644\u06CC\u0627\u062A",
|
|
6525
|
-
children: actionIcon || /* @__PURE__ */ (0,
|
|
6771
|
+
children: actionIcon || /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
6526
6772
|
"svg",
|
|
6527
6773
|
{
|
|
6528
6774
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6535,9 +6781,9 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6535
6781
|
strokeLinecap: "round",
|
|
6536
6782
|
strokeLinejoin: "round",
|
|
6537
6783
|
children: [
|
|
6538
|
-
/* @__PURE__ */ (0,
|
|
6539
|
-
/* @__PURE__ */ (0,
|
|
6540
|
-
/* @__PURE__ */ (0,
|
|
6784
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "12", cy: "12", r: "1" }),
|
|
6785
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "12", cy: "5", r: "1" }),
|
|
6786
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "12", cy: "19", r: "1" })
|
|
6541
6787
|
]
|
|
6542
6788
|
}
|
|
6543
6789
|
)
|
|
@@ -6551,9 +6797,8 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6551
6797
|
ProfileInfo.displayName = "ProfileInfo";
|
|
6552
6798
|
|
|
6553
6799
|
// src/components/ui/engagement-rate.tsx
|
|
6554
|
-
var
|
|
6555
|
-
var
|
|
6556
|
-
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6800
|
+
var React24 = __toESM(require("react"), 1);
|
|
6801
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
6557
6802
|
var convertToLocalNumbers2 = (text, locale) => {
|
|
6558
6803
|
if (locale === "fa" || locale === "ar") {
|
|
6559
6804
|
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
@@ -6612,17 +6857,17 @@ var getGroupIcon = (group) => {
|
|
|
6612
6857
|
const iconClass = "w-12 h-12 text-primary";
|
|
6613
6858
|
switch (group) {
|
|
6614
6859
|
case "nano":
|
|
6615
|
-
return /* @__PURE__ */ (0,
|
|
6860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icons.users, { className: iconClass });
|
|
6616
6861
|
case "micro":
|
|
6617
|
-
return /* @__PURE__ */ (0,
|
|
6862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icons.userCheck, { className: iconClass });
|
|
6618
6863
|
case "mid":
|
|
6619
|
-
return /* @__PURE__ */ (0,
|
|
6864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icons.trendingUp, { className: iconClass });
|
|
6620
6865
|
case "macro":
|
|
6621
|
-
return /* @__PURE__ */ (0,
|
|
6866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icons.award, { className: iconClass });
|
|
6622
6867
|
case "mega":
|
|
6623
|
-
return /* @__PURE__ */ (0,
|
|
6868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icons.crown, { className: iconClass });
|
|
6624
6869
|
default:
|
|
6625
|
-
return /* @__PURE__ */ (0,
|
|
6870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icons.users, { className: iconClass });
|
|
6626
6871
|
}
|
|
6627
6872
|
};
|
|
6628
6873
|
var translations = {
|
|
@@ -6693,7 +6938,7 @@ var translations = {
|
|
|
6693
6938
|
mega: "Mega"
|
|
6694
6939
|
}
|
|
6695
6940
|
};
|
|
6696
|
-
var EngagementRate =
|
|
6941
|
+
var EngagementRate = React24.forwardRef(
|
|
6697
6942
|
({ className, currentRate, followers, locale = "fa", showCategoryCard = true, ...props }, ref) => {
|
|
6698
6943
|
const isRTL = locale === "fa" || locale === "ar";
|
|
6699
6944
|
const t = translations[locale];
|
|
@@ -6815,13 +7060,13 @@ var EngagementRate = React22.forwardRef(
|
|
|
6815
7060
|
return `${formatNumber2(1e3)} ${t.to} ${formatNumber2(1e4)} ${t.followers}`;
|
|
6816
7061
|
}
|
|
6817
7062
|
};
|
|
6818
|
-
return /* @__PURE__ */ (0,
|
|
6819
|
-
/* @__PURE__ */ (0,
|
|
6820
|
-
/* @__PURE__ */ (0,
|
|
7063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { ref, className: cn("space-y-4", className), dir: isRTL ? "rtl" : "ltr", ...props, children: [
|
|
7064
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "text-center", children: [
|
|
7065
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "text-4xl font-bold text-primary mb-2", children: [
|
|
6821
7066
|
convertToLocalNumbers2((currentRate * 100).toFixed(3), locale),
|
|
6822
7067
|
"%"
|
|
6823
7068
|
] }),
|
|
6824
|
-
currentRangeIndex !== -1 && /* @__PURE__ */ (0,
|
|
7069
|
+
currentRangeIndex !== -1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6825
7070
|
Badge,
|
|
6826
7071
|
{
|
|
6827
7072
|
className: "text-sm font-medium text-white border-0",
|
|
@@ -6830,13 +7075,13 @@ var EngagementRate = React22.forwardRef(
|
|
|
6830
7075
|
}
|
|
6831
7076
|
)
|
|
6832
7077
|
] }),
|
|
6833
|
-
/* @__PURE__ */ (0,
|
|
6834
|
-
/* @__PURE__ */ (0,
|
|
6835
|
-
/* @__PURE__ */ (0,
|
|
6836
|
-
/* @__PURE__ */ (0,
|
|
7078
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-3", children: [
|
|
7079
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex justify-between text-sm text-muted-foreground", children: [
|
|
7080
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: isRTL ? t.excellent : t.low }),
|
|
7081
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: isRTL ? t.low : t.excellent })
|
|
6837
7082
|
] }),
|
|
6838
|
-
/* @__PURE__ */ (0,
|
|
6839
|
-
/* @__PURE__ */ (0,
|
|
7083
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "relative", children: [
|
|
7084
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex gap-1 h-6 rounded overflow-hidden", children: engagementRanges.map((range, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6840
7085
|
"div",
|
|
6841
7086
|
{
|
|
6842
7087
|
className: "flex-1 transition-all duration-300 cursor-pointer group relative",
|
|
@@ -6857,35 +7102,35 @@ var EngagementRate = React22.forwardRef(
|
|
|
6857
7102
|
},
|
|
6858
7103
|
index
|
|
6859
7104
|
)) }),
|
|
6860
|
-
/* @__PURE__ */ (0,
|
|
7105
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6861
7106
|
"div",
|
|
6862
7107
|
{
|
|
6863
7108
|
className: "absolute -top-1 transform -translate-x-1/2 transition-all duration-500 z-10",
|
|
6864
7109
|
style: { left: `${adjustedTrianglePosition}%` },
|
|
6865
|
-
children: /* @__PURE__ */ (0,
|
|
7110
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6866
7111
|
"svg",
|
|
6867
7112
|
{
|
|
6868
7113
|
width: "20",
|
|
6869
7114
|
height: "14",
|
|
6870
7115
|
viewBox: "0 0 20 14",
|
|
6871
7116
|
className: "fill-white dark:fill-white drop-shadow-md transition-transform duration-300",
|
|
6872
|
-
children: /* @__PURE__ */ (0,
|
|
7117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M10 14L0 0H20L10 14Z" })
|
|
6873
7118
|
}
|
|
6874
7119
|
)
|
|
6875
7120
|
}
|
|
6876
7121
|
)
|
|
6877
7122
|
] })
|
|
6878
7123
|
] }),
|
|
6879
|
-
showCategoryCard && /* @__PURE__ */ (0,
|
|
6880
|
-
/* @__PURE__ */ (0,
|
|
6881
|
-
/* @__PURE__ */ (0,
|
|
6882
|
-
/* @__PURE__ */ (0,
|
|
6883
|
-
/* @__PURE__ */ (0,
|
|
6884
|
-
/* @__PURE__ */ (0,
|
|
7124
|
+
showCategoryCard && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mt-6 bg-surface-100 rounded-lg border border-border p-5", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
7125
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center justify-center order-1 lg:order-1", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "w-full h-full flex flex-col justify-center items-center text-center space-y-4", children: [
|
|
7126
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mb-2", children: getGroupIcon(engagementData.groupKey) }),
|
|
7127
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-2", children: [
|
|
7128
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-lg font-semibold", children: t.yourCategory }),
|
|
7129
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-3xl font-black text-primary", children: locale === "en" ? `${engagementData.group} ${t.influencer}` : `${engagementData.group} ${t.influencer}` })
|
|
6885
7130
|
] }),
|
|
6886
|
-
/* @__PURE__ */ (0,
|
|
6887
|
-
/* @__PURE__ */ (0,
|
|
6888
|
-
/* @__PURE__ */ (0,
|
|
7131
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-2", children: [
|
|
7132
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-base font-medium text-muted-foreground", children: getFollowerRange() }),
|
|
7133
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "text-xl font-bold", children: [
|
|
6889
7134
|
"(",
|
|
6890
7135
|
formatNumber2(followers),
|
|
6891
7136
|
" ",
|
|
@@ -6894,9 +7139,9 @@ var EngagementRate = React22.forwardRef(
|
|
|
6894
7139
|
] })
|
|
6895
7140
|
] })
|
|
6896
7141
|
] }) }),
|
|
6897
|
-
/* @__PURE__ */ (0,
|
|
6898
|
-
/* @__PURE__ */ (0,
|
|
6899
|
-
/* @__PURE__ */ (0,
|
|
7142
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-3 order-2 lg:order-2", children: [
|
|
7143
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h3", { className: "text-base font-semibold mb-3", children: locale === "en" ? `${engagementData.group} ${t.influencer} ${t.criteria}` : `${t.criteria} ${engagementData.group} ${t.influencer}` }),
|
|
7144
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "space-y-2.5", children: engagementRanges.map((range, index) => {
|
|
6900
7145
|
const isCurrentRange = index === currentRangeIndex;
|
|
6901
7146
|
const hexToRgb = (hex) => {
|
|
6902
7147
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
@@ -6909,7 +7154,7 @@ var EngagementRate = React22.forwardRef(
|
|
|
6909
7154
|
const rgb = hexToRgb(range.color);
|
|
6910
7155
|
const bgColor = isCurrentRange && rgb ? `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.1)` : "transparent";
|
|
6911
7156
|
const displayText = index === 0 ? convertToLocalNumbers2(`${range.min}% ${t.and}`, locale) : index === engagementRanges.length - 1 ? convertToLocalNumbers2(`${t.lessThan} ${range.max}%`, locale) : convertToLocalNumbers2(`${range.min}% ${t.to} ${range.max}%`, locale);
|
|
6912
|
-
return /* @__PURE__ */ (0,
|
|
7157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6913
7158
|
"div",
|
|
6914
7159
|
{
|
|
6915
7160
|
className: cn(
|
|
@@ -6921,9 +7166,9 @@ var EngagementRate = React22.forwardRef(
|
|
|
6921
7166
|
borderColor: isCurrentRange ? range.color : void 0
|
|
6922
7167
|
},
|
|
6923
7168
|
children: [
|
|
6924
|
-
/* @__PURE__ */ (0,
|
|
6925
|
-
/* @__PURE__ */ (0,
|
|
6926
|
-
/* @__PURE__ */ (0,
|
|
7169
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
7170
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-2.5 h-2.5 rounded-full", style: { backgroundColor: range.color } }),
|
|
7171
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6927
7172
|
"span",
|
|
6928
7173
|
{
|
|
6929
7174
|
className: cn(
|
|
@@ -6932,7 +7177,7 @@ var EngagementRate = React22.forwardRef(
|
|
|
6932
7177
|
),
|
|
6933
7178
|
children: [
|
|
6934
7179
|
range.label,
|
|
6935
|
-
isCurrentRange && /* @__PURE__ */ (0,
|
|
7180
|
+
isCurrentRange && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: cn("text-xs font-normal text-muted-foreground", isRTL ? "mr-1" : "ml-1"), children: [
|
|
6936
7181
|
"(",
|
|
6937
7182
|
t.you,
|
|
6938
7183
|
")"
|
|
@@ -6941,7 +7186,7 @@ var EngagementRate = React22.forwardRef(
|
|
|
6941
7186
|
}
|
|
6942
7187
|
)
|
|
6943
7188
|
] }),
|
|
6944
|
-
/* @__PURE__ */ (0,
|
|
7189
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6945
7190
|
"span",
|
|
6946
7191
|
{
|
|
6947
7192
|
className: cn("text-sm font-semibold", !isCurrentRange && "text-muted-foreground"),
|
|
@@ -6962,8 +7207,8 @@ var EngagementRate = React22.forwardRef(
|
|
|
6962
7207
|
EngagementRate.displayName = "EngagementRate";
|
|
6963
7208
|
|
|
6964
7209
|
// src/components/ui/engagement-rate-bar.tsx
|
|
6965
|
-
var
|
|
6966
|
-
var
|
|
7210
|
+
var React25 = __toESM(require("react"), 1);
|
|
7211
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
6967
7212
|
var convertToLocalNumbers3 = (text, locale) => {
|
|
6968
7213
|
if (locale === "fa" || locale === "ar") {
|
|
6969
7214
|
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
@@ -7044,7 +7289,7 @@ var translations2 = {
|
|
|
7044
7289
|
low: "Low"
|
|
7045
7290
|
}
|
|
7046
7291
|
};
|
|
7047
|
-
var EngagementRateBar =
|
|
7292
|
+
var EngagementRateBar = React25.forwardRef(
|
|
7048
7293
|
({ className, currentRate, followers, locale = "fa", showHelperText = true, ...props }, ref) => {
|
|
7049
7294
|
const isRTL = locale === "fa" || locale === "ar";
|
|
7050
7295
|
const t = translations2[locale];
|
|
@@ -7139,7 +7384,7 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7139
7384
|
};
|
|
7140
7385
|
const trianglePosition = getTrianglePosition();
|
|
7141
7386
|
const adjustedTrianglePosition = isRTL ? 100 - trianglePosition : trianglePosition;
|
|
7142
|
-
return /* @__PURE__ */ (0,
|
|
7387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
7143
7388
|
"div",
|
|
7144
7389
|
{
|
|
7145
7390
|
ref,
|
|
@@ -7147,12 +7392,12 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7147
7392
|
dir: isRTL ? "rtl" : "ltr",
|
|
7148
7393
|
...props,
|
|
7149
7394
|
children: [
|
|
7150
|
-
/* @__PURE__ */ (0,
|
|
7151
|
-
/* @__PURE__ */ (0,
|
|
7395
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-center", children: [
|
|
7396
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-4xl font-bold text-primary mb-2", children: [
|
|
7152
7397
|
convertToLocalNumbers3((currentRate * 100).toFixed(3), locale),
|
|
7153
7398
|
"%"
|
|
7154
7399
|
] }),
|
|
7155
|
-
currentRangeIndex !== -1 && /* @__PURE__ */ (0,
|
|
7400
|
+
currentRangeIndex !== -1 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7156
7401
|
Badge,
|
|
7157
7402
|
{
|
|
7158
7403
|
className: "text-sm font-medium text-white border-0",
|
|
@@ -7161,13 +7406,13 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7161
7406
|
}
|
|
7162
7407
|
)
|
|
7163
7408
|
] }),
|
|
7164
|
-
/* @__PURE__ */ (0,
|
|
7165
|
-
showHelperText && /* @__PURE__ */ (0,
|
|
7166
|
-
/* @__PURE__ */ (0,
|
|
7167
|
-
/* @__PURE__ */ (0,
|
|
7409
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "space-y-3", children: [
|
|
7410
|
+
showHelperText && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex justify-between text-sm text-muted-foreground", children: [
|
|
7411
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: isRTL ? t.excellent : t.low }),
|
|
7412
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: isRTL ? t.low : t.excellent })
|
|
7168
7413
|
] }),
|
|
7169
|
-
/* @__PURE__ */ (0,
|
|
7170
|
-
/* @__PURE__ */ (0,
|
|
7414
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative", children: [
|
|
7415
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex gap-1 h-6 rounded overflow-hidden", children: engagementRanges.map((range, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7171
7416
|
"div",
|
|
7172
7417
|
{
|
|
7173
7418
|
className: "flex-1 transition-all duration-300 cursor-pointer group relative",
|
|
@@ -7188,14 +7433,14 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7188
7433
|
},
|
|
7189
7434
|
index
|
|
7190
7435
|
)) }),
|
|
7191
|
-
/* @__PURE__ */ (0,
|
|
7436
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7192
7437
|
"div",
|
|
7193
7438
|
{
|
|
7194
7439
|
className: "absolute -top-2 transform -translate-x-1/2 transition-all duration-500 z-10",
|
|
7195
7440
|
style: { left: `${adjustedTrianglePosition}%` },
|
|
7196
|
-
children: /* @__PURE__ */ (0,
|
|
7197
|
-
/* @__PURE__ */ (0,
|
|
7198
|
-
/* @__PURE__ */ (0,
|
|
7441
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative", children: [
|
|
7442
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "w-0 h-0 border-l-[20px] rotate-180 border-r-[20px] border-b-[24px] border-l-transparent border-r-transparent border-b-background transition-transform duration-300" }),
|
|
7443
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "w-0 h-0 border-l-[12px] rotate-180 border-r-[12px] border-b-[16px] border-l-transparent border-r-transparent border-b-foreground transition-transform duration-300 absolute top-[4px] left-1/2 transform -translate-x-1/2" })
|
|
7199
7444
|
] })
|
|
7200
7445
|
}
|
|
7201
7446
|
)
|
|
@@ -7210,9 +7455,9 @@ EngagementRateBar.displayName = "EngagementRateBar";
|
|
|
7210
7455
|
|
|
7211
7456
|
// src/components/ui/progress.tsx
|
|
7212
7457
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
7213
|
-
var
|
|
7214
|
-
var
|
|
7215
|
-
var progressVariants = (0,
|
|
7458
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
7459
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7460
|
+
var progressVariants = (0, import_class_variance_authority12.cva)(
|
|
7216
7461
|
"relative w-full overflow-hidden rounded-full bg-surface-300",
|
|
7217
7462
|
{
|
|
7218
7463
|
variants: {
|
|
@@ -7227,7 +7472,7 @@ var progressVariants = (0, import_class_variance_authority10.cva)(
|
|
|
7227
7472
|
}
|
|
7228
7473
|
}
|
|
7229
7474
|
);
|
|
7230
|
-
var progressIndicatorVariants = (0,
|
|
7475
|
+
var progressIndicatorVariants = (0, import_class_variance_authority12.cva)(
|
|
7231
7476
|
"h-full w-full flex-1 transition-all origin-left rtl:origin-right",
|
|
7232
7477
|
{
|
|
7233
7478
|
variants: {
|
|
@@ -7255,19 +7500,19 @@ function Progress({
|
|
|
7255
7500
|
}) {
|
|
7256
7501
|
const clampedValue = Math.max(0, Math.min(100, value ?? 0));
|
|
7257
7502
|
const displayValue = `${Math.round(clampedValue)}%`;
|
|
7258
|
-
return /* @__PURE__ */ (0,
|
|
7259
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
7260
|
-
label && /* @__PURE__ */ (0,
|
|
7261
|
-
showValue && /* @__PURE__ */ (0,
|
|
7503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "w-full space-y-2", children: [
|
|
7504
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
7505
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-foreground", children: label }),
|
|
7506
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-foreground-light font-medium", children: displayValue })
|
|
7262
7507
|
] }),
|
|
7263
|
-
/* @__PURE__ */ (0,
|
|
7508
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7264
7509
|
ProgressPrimitive.Root,
|
|
7265
7510
|
{
|
|
7266
7511
|
"data-slot": "progress",
|
|
7267
7512
|
className: cn(progressVariants({ size }), className),
|
|
7268
7513
|
value,
|
|
7269
7514
|
...props,
|
|
7270
|
-
children: /* @__PURE__ */ (0,
|
|
7515
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7271
7516
|
ProgressPrimitive.Indicator,
|
|
7272
7517
|
{
|
|
7273
7518
|
"data-slot": "progress-indicator",
|
|
@@ -7282,13 +7527,12 @@ function Progress({
|
|
|
7282
7527
|
|
|
7283
7528
|
// src/components/ui/radio-group.tsx
|
|
7284
7529
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
7285
|
-
var
|
|
7286
|
-
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7530
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7287
7531
|
function RadioGroup4({
|
|
7288
7532
|
className,
|
|
7289
7533
|
...props
|
|
7290
7534
|
}) {
|
|
7291
|
-
return /* @__PURE__ */ (0,
|
|
7535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7292
7536
|
RadioGroupPrimitive.Root,
|
|
7293
7537
|
{
|
|
7294
7538
|
"data-slot": "radio-group",
|
|
@@ -7301,7 +7545,7 @@ function RadioGroupItem({
|
|
|
7301
7545
|
className,
|
|
7302
7546
|
...props
|
|
7303
7547
|
}) {
|
|
7304
|
-
return /* @__PURE__ */ (0,
|
|
7548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7305
7549
|
RadioGroupPrimitive.Item,
|
|
7306
7550
|
{
|
|
7307
7551
|
"data-slot": "radio-group-item",
|
|
@@ -7310,12 +7554,12 @@ function RadioGroupItem({
|
|
|
7310
7554
|
className
|
|
7311
7555
|
),
|
|
7312
7556
|
...props,
|
|
7313
|
-
children: /* @__PURE__ */ (0,
|
|
7557
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7314
7558
|
RadioGroupPrimitive.Indicator,
|
|
7315
7559
|
{
|
|
7316
7560
|
"data-slot": "radio-group-indicator",
|
|
7317
7561
|
className: "relative flex items-center justify-center",
|
|
7318
|
-
children: /* @__PURE__ */ (0,
|
|
7562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icons.circle, { 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" })
|
|
7319
7563
|
}
|
|
7320
7564
|
)
|
|
7321
7565
|
}
|
|
@@ -7323,14 +7567,14 @@ function RadioGroupItem({
|
|
|
7323
7567
|
}
|
|
7324
7568
|
|
|
7325
7569
|
// src/components/ui/radio-card.tsx
|
|
7326
|
-
var
|
|
7570
|
+
var React26 = __toESM(require("react"), 1);
|
|
7327
7571
|
var RadioGroupPrimitive2 = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
7328
|
-
var
|
|
7329
|
-
var RadioCards =
|
|
7572
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7573
|
+
var RadioCards = React26.forwardRef(({ className, columns = 1, dir = "rtl", children, ...props }, ref) => {
|
|
7330
7574
|
const gridCols = typeof columns === "number" ? `grid-cols-${columns}` : Object.entries(columns).map(
|
|
7331
7575
|
([key, val]) => key === "initial" ? `grid-cols-${val}` : `${key}:grid-cols-${val}`
|
|
7332
7576
|
).join(" ");
|
|
7333
|
-
return /* @__PURE__ */ (0,
|
|
7577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7334
7578
|
RadioGroupPrimitive2.Root,
|
|
7335
7579
|
{
|
|
7336
7580
|
ref,
|
|
@@ -7343,8 +7587,8 @@ var RadioCards = React24.forwardRef(({ className, columns = 1, dir = "rtl", chil
|
|
|
7343
7587
|
);
|
|
7344
7588
|
});
|
|
7345
7589
|
RadioCards.displayName = "RadioCards";
|
|
7346
|
-
var RadioCardItem =
|
|
7347
|
-
return /* @__PURE__ */ (0,
|
|
7590
|
+
var RadioCardItem = React26.forwardRef(({ className, children, ...props }, ref) => {
|
|
7591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7348
7592
|
RadioGroupPrimitive2.Item,
|
|
7349
7593
|
{
|
|
7350
7594
|
ref,
|
|
@@ -7363,7 +7607,7 @@ var RadioCardItem = React24.forwardRef(({ className, children, ...props }, ref)
|
|
|
7363
7607
|
);
|
|
7364
7608
|
});
|
|
7365
7609
|
RadioCardItem.displayName = "RadioCardItem";
|
|
7366
|
-
var RadioCardTitle =
|
|
7610
|
+
var RadioCardTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7367
7611
|
"h4",
|
|
7368
7612
|
{
|
|
7369
7613
|
ref,
|
|
@@ -7372,7 +7616,7 @@ var RadioCardTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
7372
7616
|
}
|
|
7373
7617
|
));
|
|
7374
7618
|
RadioCardTitle.displayName = "RadioCardTitle";
|
|
7375
|
-
var RadioCardDescription =
|
|
7619
|
+
var RadioCardDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7376
7620
|
"p",
|
|
7377
7621
|
{
|
|
7378
7622
|
ref,
|
|
@@ -7383,14 +7627,13 @@ var RadioCardDescription = React24.forwardRef(({ className, ...props }, ref) =>
|
|
|
7383
7627
|
RadioCardDescription.displayName = "RadioCardDescription";
|
|
7384
7628
|
|
|
7385
7629
|
// src/components/ui/resizable.tsx
|
|
7386
|
-
var import_lucide_react23 = require("lucide-react");
|
|
7387
7630
|
var ResizablePrimitive = __toESM(require("react-resizable-panels"), 1);
|
|
7388
|
-
var
|
|
7631
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7389
7632
|
function ResizablePanelGroup({
|
|
7390
7633
|
className,
|
|
7391
7634
|
...props
|
|
7392
7635
|
}) {
|
|
7393
|
-
return /* @__PURE__ */ (0,
|
|
7636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7394
7637
|
ResizablePrimitive.PanelGroup,
|
|
7395
7638
|
{
|
|
7396
7639
|
"data-slot": "resizable-panel-group",
|
|
@@ -7405,14 +7648,14 @@ function ResizablePanelGroup({
|
|
|
7405
7648
|
function ResizablePanel({
|
|
7406
7649
|
...props
|
|
7407
7650
|
}) {
|
|
7408
|
-
return /* @__PURE__ */ (0,
|
|
7651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
7409
7652
|
}
|
|
7410
7653
|
function ResizableHandle({
|
|
7411
7654
|
withHandle,
|
|
7412
7655
|
className,
|
|
7413
7656
|
...props
|
|
7414
7657
|
}) {
|
|
7415
|
-
return /* @__PURE__ */ (0,
|
|
7658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7416
7659
|
ResizablePrimitive.PanelResizeHandle,
|
|
7417
7660
|
{
|
|
7418
7661
|
"data-slot": "resizable-handle",
|
|
@@ -7421,27 +7664,27 @@ function ResizableHandle({
|
|
|
7421
7664
|
className
|
|
7422
7665
|
),
|
|
7423
7666
|
...props,
|
|
7424
|
-
children: withHandle && /* @__PURE__ */ (0,
|
|
7667
|
+
children: withHandle && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icons.gripVertical, { className: "size-2.5" }) })
|
|
7425
7668
|
}
|
|
7426
7669
|
);
|
|
7427
7670
|
}
|
|
7428
7671
|
|
|
7429
7672
|
// src/components/ui/scroll-area.tsx
|
|
7430
7673
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
7431
|
-
var
|
|
7674
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7432
7675
|
function ScrollArea({
|
|
7433
7676
|
className,
|
|
7434
7677
|
children,
|
|
7435
7678
|
...props
|
|
7436
7679
|
}) {
|
|
7437
|
-
return /* @__PURE__ */ (0,
|
|
7680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
7438
7681
|
ScrollAreaPrimitive.Root,
|
|
7439
7682
|
{
|
|
7440
7683
|
"data-slot": "scroll-area",
|
|
7441
7684
|
className: cn("relative", className),
|
|
7442
7685
|
...props,
|
|
7443
7686
|
children: [
|
|
7444
|
-
/* @__PURE__ */ (0,
|
|
7687
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7445
7688
|
ScrollAreaPrimitive.Viewport,
|
|
7446
7689
|
{
|
|
7447
7690
|
"data-slot": "scroll-area-viewport",
|
|
@@ -7449,8 +7692,8 @@ function ScrollArea({
|
|
|
7449
7692
|
children
|
|
7450
7693
|
}
|
|
7451
7694
|
),
|
|
7452
|
-
/* @__PURE__ */ (0,
|
|
7453
|
-
/* @__PURE__ */ (0,
|
|
7695
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ScrollBar, {}),
|
|
7696
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
7454
7697
|
]
|
|
7455
7698
|
}
|
|
7456
7699
|
);
|
|
@@ -7460,7 +7703,7 @@ function ScrollBar({
|
|
|
7460
7703
|
orientation = "vertical",
|
|
7461
7704
|
...props
|
|
7462
7705
|
}) {
|
|
7463
|
-
return /* @__PURE__ */ (0,
|
|
7706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7464
7707
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
7465
7708
|
{
|
|
7466
7709
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -7472,7 +7715,7 @@ function ScrollBar({
|
|
|
7472
7715
|
className
|
|
7473
7716
|
),
|
|
7474
7717
|
...props,
|
|
7475
|
-
children: /* @__PURE__ */ (0,
|
|
7718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7476
7719
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
7477
7720
|
{
|
|
7478
7721
|
"data-slot": "scroll-area-thumb",
|
|
@@ -7484,14 +7727,13 @@ function ScrollBar({
|
|
|
7484
7727
|
}
|
|
7485
7728
|
|
|
7486
7729
|
// src/components/ui/select.tsx
|
|
7487
|
-
var
|
|
7730
|
+
var React27 = __toESM(require("react"), 1);
|
|
7488
7731
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
7489
|
-
var
|
|
7490
|
-
var
|
|
7491
|
-
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7732
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
7733
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7492
7734
|
var Select = SelectPrimitive.Root;
|
|
7493
7735
|
var SelectGroup = SelectPrimitive.Group;
|
|
7494
|
-
var SelectTriggerVariants = (0,
|
|
7736
|
+
var SelectTriggerVariants = (0, import_class_variance_authority13.cva)("", {
|
|
7495
7737
|
variants: {
|
|
7496
7738
|
size: {
|
|
7497
7739
|
...SIZE_VARIANTS
|
|
@@ -7501,16 +7743,16 @@ var SelectTriggerVariants = (0, import_class_variance_authority11.cva)("", {
|
|
|
7501
7743
|
size: SIZE_VARIANTS_DEFAULT
|
|
7502
7744
|
}
|
|
7503
7745
|
});
|
|
7504
|
-
var SelectValue =
|
|
7746
|
+
var SelectValue = React27.forwardRef(({ placeholder, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7505
7747
|
SelectPrimitive.Value,
|
|
7506
7748
|
{
|
|
7507
|
-
placeholder: typeof placeholder === "string" ? /* @__PURE__ */ (0,
|
|
7749
|
+
placeholder: typeof placeholder === "string" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: placeholder }) : placeholder,
|
|
7508
7750
|
...props,
|
|
7509
7751
|
ref
|
|
7510
7752
|
}
|
|
7511
7753
|
));
|
|
7512
7754
|
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
7513
|
-
var SelectTrigger =
|
|
7755
|
+
var SelectTrigger = React27.forwardRef(({ className, children, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7514
7756
|
SelectPrimitive.Trigger,
|
|
7515
7757
|
{
|
|
7516
7758
|
ref,
|
|
@@ -7525,12 +7767,12 @@ var SelectTrigger = React25.forwardRef(({ className, children, size, ...props },
|
|
|
7525
7767
|
...props,
|
|
7526
7768
|
children: [
|
|
7527
7769
|
children,
|
|
7528
|
-
/* @__PURE__ */ (0,
|
|
7770
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icons.chevronDown, { className: "h-4 w-4 text-foreground-lighter flex-shrink-0", strokeWidth: 1.5 }) })
|
|
7529
7771
|
]
|
|
7530
7772
|
}
|
|
7531
7773
|
));
|
|
7532
7774
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
7533
|
-
var SelectScrollUpButton =
|
|
7775
|
+
var SelectScrollUpButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7534
7776
|
SelectPrimitive.ScrollUpButton,
|
|
7535
7777
|
{
|
|
7536
7778
|
ref,
|
|
@@ -7539,11 +7781,11 @@ var SelectScrollUpButton = React25.forwardRef(({ className, ...props }, ref) =>
|
|
|
7539
7781
|
className
|
|
7540
7782
|
),
|
|
7541
7783
|
...props,
|
|
7542
|
-
children: /* @__PURE__ */ (0,
|
|
7784
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icons.chevronUp, { className: "h-4 w-4" })
|
|
7543
7785
|
}
|
|
7544
7786
|
));
|
|
7545
7787
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
7546
|
-
var SelectScrollDownButton =
|
|
7788
|
+
var SelectScrollDownButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7547
7789
|
SelectPrimitive.ScrollDownButton,
|
|
7548
7790
|
{
|
|
7549
7791
|
ref,
|
|
@@ -7552,11 +7794,11 @@ var SelectScrollDownButton = React25.forwardRef(({ className, ...props }, ref) =
|
|
|
7552
7794
|
className
|
|
7553
7795
|
),
|
|
7554
7796
|
...props,
|
|
7555
|
-
children: /* @__PURE__ */ (0,
|
|
7797
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icons.chevronDown, { className: "h-4 w-4" })
|
|
7556
7798
|
}
|
|
7557
7799
|
));
|
|
7558
7800
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
7559
|
-
var SelectContent =
|
|
7801
|
+
var SelectContent = React27.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7560
7802
|
SelectPrimitive.Content,
|
|
7561
7803
|
{
|
|
7562
7804
|
ref,
|
|
@@ -7568,8 +7810,8 @@ var SelectContent = React25.forwardRef(({ className, children, position = "poppe
|
|
|
7568
7810
|
position,
|
|
7569
7811
|
...props,
|
|
7570
7812
|
children: [
|
|
7571
|
-
/* @__PURE__ */ (0,
|
|
7572
|
-
/* @__PURE__ */ (0,
|
|
7813
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectScrollUpButton, {}),
|
|
7814
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7573
7815
|
SelectPrimitive.Viewport,
|
|
7574
7816
|
{
|
|
7575
7817
|
className: cn(
|
|
@@ -7579,12 +7821,12 @@ var SelectContent = React25.forwardRef(({ className, children, position = "poppe
|
|
|
7579
7821
|
children
|
|
7580
7822
|
}
|
|
7581
7823
|
),
|
|
7582
|
-
/* @__PURE__ */ (0,
|
|
7824
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectScrollDownButton, {})
|
|
7583
7825
|
]
|
|
7584
7826
|
}
|
|
7585
7827
|
) }));
|
|
7586
7828
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
7587
|
-
var SelectLabel =
|
|
7829
|
+
var SelectLabel = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7588
7830
|
SelectPrimitive.Label,
|
|
7589
7831
|
{
|
|
7590
7832
|
ref,
|
|
@@ -7596,7 +7838,7 @@ var SelectLabel = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
7596
7838
|
}
|
|
7597
7839
|
));
|
|
7598
7840
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
7599
|
-
var SelectItem =
|
|
7841
|
+
var SelectItem = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7600
7842
|
SelectPrimitive.Item,
|
|
7601
7843
|
{
|
|
7602
7844
|
ref,
|
|
@@ -7607,13 +7849,13 @@ var SelectItem = React25.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
7607
7849
|
),
|
|
7608
7850
|
...props,
|
|
7609
7851
|
children: [
|
|
7610
|
-
/* @__PURE__ */ (0,
|
|
7611
|
-
/* @__PURE__ */ (0,
|
|
7852
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectPrimitive.ItemIndicator, { className: "h-3.5 w-3.5 bg-foreground rounded-full flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icons.check, { className: "h-2 w-2 text-background-overlay", strokeWidth: 6 }) }) }),
|
|
7853
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectPrimitive.ItemText, { children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children }) : children })
|
|
7612
7854
|
]
|
|
7613
7855
|
}
|
|
7614
7856
|
));
|
|
7615
7857
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
7616
|
-
var SelectSeparator =
|
|
7858
|
+
var SelectSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7617
7859
|
SelectPrimitive.Separator,
|
|
7618
7860
|
{
|
|
7619
7861
|
ref,
|
|
@@ -7625,31 +7867,30 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
7625
7867
|
|
|
7626
7868
|
// src/components/ui/sheet.tsx
|
|
7627
7869
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
7628
|
-
var
|
|
7629
|
-
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7870
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7630
7871
|
function Sheet({ ...props }) {
|
|
7631
|
-
return /* @__PURE__ */ (0,
|
|
7872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
7632
7873
|
}
|
|
7633
7874
|
function SheetTrigger({
|
|
7634
7875
|
...props
|
|
7635
7876
|
}) {
|
|
7636
|
-
return /* @__PURE__ */ (0,
|
|
7877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
7637
7878
|
}
|
|
7638
7879
|
function SheetClose({
|
|
7639
7880
|
...props
|
|
7640
7881
|
}) {
|
|
7641
|
-
return /* @__PURE__ */ (0,
|
|
7882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
7642
7883
|
}
|
|
7643
7884
|
function SheetPortal({
|
|
7644
7885
|
...props
|
|
7645
7886
|
}) {
|
|
7646
|
-
return /* @__PURE__ */ (0,
|
|
7887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
7647
7888
|
}
|
|
7648
7889
|
function SheetOverlay({
|
|
7649
7890
|
className,
|
|
7650
7891
|
...props
|
|
7651
7892
|
}) {
|
|
7652
|
-
return /* @__PURE__ */ (0,
|
|
7893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7653
7894
|
SheetPrimitive.Overlay,
|
|
7654
7895
|
{
|
|
7655
7896
|
"data-slot": "sheet-overlay",
|
|
@@ -7667,9 +7908,9 @@ function SheetContent({
|
|
|
7667
7908
|
side = "right",
|
|
7668
7909
|
...props
|
|
7669
7910
|
}) {
|
|
7670
|
-
return /* @__PURE__ */ (0,
|
|
7671
|
-
/* @__PURE__ */ (0,
|
|
7672
|
-
/* @__PURE__ */ (0,
|
|
7911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(SheetPortal, { children: [
|
|
7912
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetOverlay, {}),
|
|
7913
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
7673
7914
|
SheetPrimitive.Content,
|
|
7674
7915
|
{
|
|
7675
7916
|
"data-slot": "sheet-content",
|
|
@@ -7684,9 +7925,9 @@ function SheetContent({
|
|
|
7684
7925
|
...props,
|
|
7685
7926
|
children: [
|
|
7686
7927
|
children,
|
|
7687
|
-
/* @__PURE__ */ (0,
|
|
7688
|
-
/* @__PURE__ */ (0,
|
|
7689
|
-
/* @__PURE__ */ (0,
|
|
7928
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(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: [
|
|
7929
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icons.close, { className: "size-4" }),
|
|
7930
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "sr-only", children: "Close" })
|
|
7690
7931
|
] })
|
|
7691
7932
|
]
|
|
7692
7933
|
}
|
|
@@ -7694,7 +7935,7 @@ function SheetContent({
|
|
|
7694
7935
|
] });
|
|
7695
7936
|
}
|
|
7696
7937
|
function SheetHeader({ className, ...props }) {
|
|
7697
|
-
return /* @__PURE__ */ (0,
|
|
7938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7698
7939
|
"div",
|
|
7699
7940
|
{
|
|
7700
7941
|
"data-slot": "sheet-header",
|
|
@@ -7704,7 +7945,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
7704
7945
|
);
|
|
7705
7946
|
}
|
|
7706
7947
|
function SheetFooter({ className, ...props }) {
|
|
7707
|
-
return /* @__PURE__ */ (0,
|
|
7948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7708
7949
|
"div",
|
|
7709
7950
|
{
|
|
7710
7951
|
"data-slot": "sheet-footer",
|
|
@@ -7717,7 +7958,7 @@ function SheetTitle({
|
|
|
7717
7958
|
className,
|
|
7718
7959
|
...props
|
|
7719
7960
|
}) {
|
|
7720
|
-
return /* @__PURE__ */ (0,
|
|
7961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7721
7962
|
SheetPrimitive.Title,
|
|
7722
7963
|
{
|
|
7723
7964
|
"data-slot": "sheet-title",
|
|
@@ -7730,7 +7971,7 @@ function SheetDescription({
|
|
|
7730
7971
|
className,
|
|
7731
7972
|
...props
|
|
7732
7973
|
}) {
|
|
7733
|
-
return /* @__PURE__ */ (0,
|
|
7974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7734
7975
|
SheetPrimitive.Description,
|
|
7735
7976
|
{
|
|
7736
7977
|
"data-slot": "sheet-description",
|
|
@@ -7741,17 +7982,16 @@ function SheetDescription({
|
|
|
7741
7982
|
}
|
|
7742
7983
|
|
|
7743
7984
|
// src/components/ui/sidebar.tsx
|
|
7744
|
-
var
|
|
7985
|
+
var React29 = __toESM(require("react"), 1);
|
|
7745
7986
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
7746
|
-
var
|
|
7747
|
-
var import_lucide_react26 = require("lucide-react");
|
|
7987
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
7748
7988
|
|
|
7749
7989
|
// src/hooks/use-mobile.ts
|
|
7750
|
-
var
|
|
7990
|
+
var React28 = __toESM(require("react"), 1);
|
|
7751
7991
|
var MOBILE_BREAKPOINT = 768;
|
|
7752
7992
|
function useIsMobile() {
|
|
7753
|
-
const [isMobile, setIsMobile] =
|
|
7754
|
-
|
|
7993
|
+
const [isMobile, setIsMobile] = React28.useState(void 0);
|
|
7994
|
+
React28.useEffect(() => {
|
|
7755
7995
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
7756
7996
|
const onChange = () => {
|
|
7757
7997
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -7764,16 +8004,16 @@ function useIsMobile() {
|
|
|
7764
8004
|
}
|
|
7765
8005
|
|
|
7766
8006
|
// src/components/ui/sidebar.tsx
|
|
7767
|
-
var
|
|
8007
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7768
8008
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
7769
8009
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
7770
8010
|
var SIDEBAR_WIDTH = "16rem";
|
|
7771
8011
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
7772
8012
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
7773
8013
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
7774
|
-
var SidebarContext =
|
|
8014
|
+
var SidebarContext = React29.createContext(null);
|
|
7775
8015
|
function useSidebar() {
|
|
7776
|
-
const context =
|
|
8016
|
+
const context = React29.useContext(SidebarContext);
|
|
7777
8017
|
if (!context) {
|
|
7778
8018
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
7779
8019
|
}
|
|
@@ -7789,10 +8029,10 @@ function SidebarProvider({
|
|
|
7789
8029
|
...props
|
|
7790
8030
|
}) {
|
|
7791
8031
|
const isMobile = useIsMobile();
|
|
7792
|
-
const [openMobile, setOpenMobile] =
|
|
7793
|
-
const [_open, _setOpen] =
|
|
8032
|
+
const [openMobile, setOpenMobile] = React29.useState(false);
|
|
8033
|
+
const [_open, _setOpen] = React29.useState(defaultOpen);
|
|
7794
8034
|
const open = openProp ?? _open;
|
|
7795
|
-
const setOpen =
|
|
8035
|
+
const setOpen = React29.useCallback(
|
|
7796
8036
|
(value) => {
|
|
7797
8037
|
const openState = typeof value === "function" ? value(open) : value;
|
|
7798
8038
|
if (setOpenProp) {
|
|
@@ -7804,10 +8044,10 @@ function SidebarProvider({
|
|
|
7804
8044
|
},
|
|
7805
8045
|
[setOpenProp, open]
|
|
7806
8046
|
);
|
|
7807
|
-
const toggleSidebar =
|
|
8047
|
+
const toggleSidebar = React29.useCallback(() => {
|
|
7808
8048
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
7809
8049
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
7810
|
-
|
|
8050
|
+
React29.useEffect(() => {
|
|
7811
8051
|
const handleKeyDown = (event) => {
|
|
7812
8052
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
7813
8053
|
event.preventDefault();
|
|
@@ -7818,7 +8058,7 @@ function SidebarProvider({
|
|
|
7818
8058
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
7819
8059
|
}, [toggleSidebar]);
|
|
7820
8060
|
const state = open ? "expanded" : "collapsed";
|
|
7821
|
-
const contextValue =
|
|
8061
|
+
const contextValue = React29.useMemo(
|
|
7822
8062
|
() => ({
|
|
7823
8063
|
state,
|
|
7824
8064
|
open,
|
|
@@ -7830,7 +8070,7 @@ function SidebarProvider({
|
|
|
7830
8070
|
}),
|
|
7831
8071
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
7832
8072
|
);
|
|
7833
|
-
return /* @__PURE__ */ (0,
|
|
8073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7834
8074
|
"div",
|
|
7835
8075
|
{
|
|
7836
8076
|
"data-slot": "sidebar-wrapper",
|
|
@@ -7858,7 +8098,7 @@ function Sidebar({
|
|
|
7858
8098
|
}) {
|
|
7859
8099
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
7860
8100
|
if (collapsible === "none") {
|
|
7861
|
-
return /* @__PURE__ */ (0,
|
|
8101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7862
8102
|
"div",
|
|
7863
8103
|
{
|
|
7864
8104
|
"data-slot": "sidebar",
|
|
@@ -7872,7 +8112,7 @@ function Sidebar({
|
|
|
7872
8112
|
);
|
|
7873
8113
|
}
|
|
7874
8114
|
if (isMobile) {
|
|
7875
|
-
return /* @__PURE__ */ (0,
|
|
8115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7876
8116
|
SheetContent,
|
|
7877
8117
|
{
|
|
7878
8118
|
"data-sidebar": "sidebar",
|
|
@@ -7884,16 +8124,16 @@ function Sidebar({
|
|
|
7884
8124
|
},
|
|
7885
8125
|
side,
|
|
7886
8126
|
children: [
|
|
7887
|
-
/* @__PURE__ */ (0,
|
|
7888
|
-
/* @__PURE__ */ (0,
|
|
7889
|
-
/* @__PURE__ */ (0,
|
|
8127
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
8128
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
8129
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
7890
8130
|
] }),
|
|
7891
|
-
/* @__PURE__ */ (0,
|
|
8131
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
7892
8132
|
]
|
|
7893
8133
|
}
|
|
7894
8134
|
) });
|
|
7895
8135
|
}
|
|
7896
|
-
return /* @__PURE__ */ (0,
|
|
8136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7897
8137
|
"div",
|
|
7898
8138
|
{
|
|
7899
8139
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -7903,7 +8143,7 @@ function Sidebar({
|
|
|
7903
8143
|
"data-side": side,
|
|
7904
8144
|
"data-slot": "sidebar",
|
|
7905
8145
|
children: [
|
|
7906
|
-
/* @__PURE__ */ (0,
|
|
8146
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7907
8147
|
"div",
|
|
7908
8148
|
{
|
|
7909
8149
|
"data-slot": "sidebar-gap",
|
|
@@ -7915,7 +8155,7 @@ function Sidebar({
|
|
|
7915
8155
|
)
|
|
7916
8156
|
}
|
|
7917
8157
|
),
|
|
7918
|
-
/* @__PURE__ */ (0,
|
|
8158
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7919
8159
|
"div",
|
|
7920
8160
|
{
|
|
7921
8161
|
"data-slot": "sidebar-container",
|
|
@@ -7927,7 +8167,7 @@ function Sidebar({
|
|
|
7927
8167
|
className
|
|
7928
8168
|
),
|
|
7929
8169
|
...props,
|
|
7930
|
-
children: /* @__PURE__ */ (0,
|
|
8170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7931
8171
|
"div",
|
|
7932
8172
|
{
|
|
7933
8173
|
"data-sidebar": "sidebar",
|
|
@@ -7948,7 +8188,7 @@ function SidebarTrigger({
|
|
|
7948
8188
|
...props
|
|
7949
8189
|
}) {
|
|
7950
8190
|
const { toggleSidebar } = useSidebar();
|
|
7951
|
-
return /* @__PURE__ */ (0,
|
|
8191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7952
8192
|
Button,
|
|
7953
8193
|
{
|
|
7954
8194
|
"data-sidebar": "trigger",
|
|
@@ -7962,15 +8202,15 @@ function SidebarTrigger({
|
|
|
7962
8202
|
},
|
|
7963
8203
|
...props,
|
|
7964
8204
|
children: [
|
|
7965
|
-
/* @__PURE__ */ (0,
|
|
7966
|
-
/* @__PURE__ */ (0,
|
|
8205
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icons.panelLeft, {}),
|
|
8206
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
7967
8207
|
]
|
|
7968
8208
|
}
|
|
7969
8209
|
);
|
|
7970
8210
|
}
|
|
7971
8211
|
function SidebarRail({ className, ...props }) {
|
|
7972
8212
|
const { toggleSidebar } = useSidebar();
|
|
7973
|
-
return /* @__PURE__ */ (0,
|
|
8213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7974
8214
|
"button",
|
|
7975
8215
|
{
|
|
7976
8216
|
"data-sidebar": "rail",
|
|
@@ -7993,7 +8233,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
7993
8233
|
);
|
|
7994
8234
|
}
|
|
7995
8235
|
function SidebarInset({ className, ...props }) {
|
|
7996
|
-
return /* @__PURE__ */ (0,
|
|
8236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7997
8237
|
"main",
|
|
7998
8238
|
{
|
|
7999
8239
|
"data-slot": "sidebar-inset",
|
|
@@ -8010,7 +8250,7 @@ function SidebarInput({
|
|
|
8010
8250
|
className,
|
|
8011
8251
|
...props
|
|
8012
8252
|
}) {
|
|
8013
|
-
return /* @__PURE__ */ (0,
|
|
8253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8014
8254
|
Input,
|
|
8015
8255
|
{
|
|
8016
8256
|
"data-slot": "sidebar-input",
|
|
@@ -8021,7 +8261,7 @@ function SidebarInput({
|
|
|
8021
8261
|
);
|
|
8022
8262
|
}
|
|
8023
8263
|
function SidebarHeader({ className, ...props }) {
|
|
8024
|
-
return /* @__PURE__ */ (0,
|
|
8264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8025
8265
|
"div",
|
|
8026
8266
|
{
|
|
8027
8267
|
"data-slot": "sidebar-header",
|
|
@@ -8032,7 +8272,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
8032
8272
|
);
|
|
8033
8273
|
}
|
|
8034
8274
|
function SidebarFooter({ className, ...props }) {
|
|
8035
|
-
return /* @__PURE__ */ (0,
|
|
8275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8036
8276
|
"div",
|
|
8037
8277
|
{
|
|
8038
8278
|
"data-slot": "sidebar-footer",
|
|
@@ -8046,7 +8286,7 @@ function SidebarSeparator({
|
|
|
8046
8286
|
className,
|
|
8047
8287
|
...props
|
|
8048
8288
|
}) {
|
|
8049
|
-
return /* @__PURE__ */ (0,
|
|
8289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8050
8290
|
Separator,
|
|
8051
8291
|
{
|
|
8052
8292
|
"data-slot": "sidebar-separator",
|
|
@@ -8057,7 +8297,7 @@ function SidebarSeparator({
|
|
|
8057
8297
|
);
|
|
8058
8298
|
}
|
|
8059
8299
|
function SidebarContent({ className, ...props }) {
|
|
8060
|
-
return /* @__PURE__ */ (0,
|
|
8300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8061
8301
|
"div",
|
|
8062
8302
|
{
|
|
8063
8303
|
"data-slot": "sidebar-content",
|
|
@@ -8071,7 +8311,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
8071
8311
|
);
|
|
8072
8312
|
}
|
|
8073
8313
|
function SidebarGroup({ className, ...props }) {
|
|
8074
|
-
return /* @__PURE__ */ (0,
|
|
8314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8075
8315
|
"div",
|
|
8076
8316
|
{
|
|
8077
8317
|
"data-slot": "sidebar-group",
|
|
@@ -8087,7 +8327,7 @@ function SidebarGroupLabel({
|
|
|
8087
8327
|
...props
|
|
8088
8328
|
}) {
|
|
8089
8329
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
8090
|
-
return /* @__PURE__ */ (0,
|
|
8330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8091
8331
|
Comp,
|
|
8092
8332
|
{
|
|
8093
8333
|
"data-slot": "sidebar-group-label",
|
|
@@ -8107,7 +8347,7 @@ function SidebarGroupAction({
|
|
|
8107
8347
|
...props
|
|
8108
8348
|
}) {
|
|
8109
8349
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8110
|
-
return /* @__PURE__ */ (0,
|
|
8350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8111
8351
|
Comp,
|
|
8112
8352
|
{
|
|
8113
8353
|
"data-slot": "sidebar-group-action",
|
|
@@ -8127,7 +8367,7 @@ function SidebarGroupContent({
|
|
|
8127
8367
|
className,
|
|
8128
8368
|
...props
|
|
8129
8369
|
}) {
|
|
8130
|
-
return /* @__PURE__ */ (0,
|
|
8370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8131
8371
|
"div",
|
|
8132
8372
|
{
|
|
8133
8373
|
"data-slot": "sidebar-group-content",
|
|
@@ -8138,7 +8378,7 @@ function SidebarGroupContent({
|
|
|
8138
8378
|
);
|
|
8139
8379
|
}
|
|
8140
8380
|
function SidebarMenu({ className, ...props }) {
|
|
8141
|
-
return /* @__PURE__ */ (0,
|
|
8381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8142
8382
|
"ul",
|
|
8143
8383
|
{
|
|
8144
8384
|
"data-slot": "sidebar-menu",
|
|
@@ -8149,7 +8389,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
8149
8389
|
);
|
|
8150
8390
|
}
|
|
8151
8391
|
function SidebarMenuItem({ className, ...props }) {
|
|
8152
|
-
return /* @__PURE__ */ (0,
|
|
8392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8153
8393
|
"li",
|
|
8154
8394
|
{
|
|
8155
8395
|
"data-slot": "sidebar-menu-item",
|
|
@@ -8159,7 +8399,7 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
8159
8399
|
}
|
|
8160
8400
|
);
|
|
8161
8401
|
}
|
|
8162
|
-
var sidebarMenuButtonVariants = (0,
|
|
8402
|
+
var sidebarMenuButtonVariants = (0, import_class_variance_authority14.cva)(
|
|
8163
8403
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pe-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
8164
8404
|
{
|
|
8165
8405
|
variants: {
|
|
@@ -8190,7 +8430,7 @@ function SidebarMenuButton({
|
|
|
8190
8430
|
}) {
|
|
8191
8431
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8192
8432
|
const { isMobile, state } = useSidebar();
|
|
8193
|
-
const button = /* @__PURE__ */ (0,
|
|
8433
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8194
8434
|
Comp,
|
|
8195
8435
|
{
|
|
8196
8436
|
"data-slot": "sidebar-menu-button",
|
|
@@ -8209,9 +8449,9 @@ function SidebarMenuButton({
|
|
|
8209
8449
|
children: tooltip
|
|
8210
8450
|
};
|
|
8211
8451
|
}
|
|
8212
|
-
return /* @__PURE__ */ (0,
|
|
8213
|
-
/* @__PURE__ */ (0,
|
|
8214
|
-
/* @__PURE__ */ (0,
|
|
8452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Tooltip, { children: [
|
|
8453
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
8454
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8215
8455
|
TooltipContent,
|
|
8216
8456
|
{
|
|
8217
8457
|
side: "right",
|
|
@@ -8229,7 +8469,7 @@ function SidebarMenuAction({
|
|
|
8229
8469
|
...props
|
|
8230
8470
|
}) {
|
|
8231
8471
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8232
|
-
return /* @__PURE__ */ (0,
|
|
8472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8233
8473
|
Comp,
|
|
8234
8474
|
{
|
|
8235
8475
|
"data-slot": "sidebar-menu-action",
|
|
@@ -8253,7 +8493,7 @@ function SidebarMenuBadge({
|
|
|
8253
8493
|
className,
|
|
8254
8494
|
...props
|
|
8255
8495
|
}) {
|
|
8256
|
-
return /* @__PURE__ */ (0,
|
|
8496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8257
8497
|
"div",
|
|
8258
8498
|
{
|
|
8259
8499
|
"data-slot": "sidebar-menu-badge",
|
|
@@ -8276,10 +8516,10 @@ function SidebarMenuSkeleton({
|
|
|
8276
8516
|
showIcon = false,
|
|
8277
8517
|
...props
|
|
8278
8518
|
}) {
|
|
8279
|
-
const width =
|
|
8519
|
+
const width = React29.useMemo(() => {
|
|
8280
8520
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
8281
8521
|
}, []);
|
|
8282
|
-
return /* @__PURE__ */ (0,
|
|
8522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8283
8523
|
"div",
|
|
8284
8524
|
{
|
|
8285
8525
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -8287,14 +8527,14 @@ function SidebarMenuSkeleton({
|
|
|
8287
8527
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
8288
8528
|
...props,
|
|
8289
8529
|
children: [
|
|
8290
|
-
showIcon && /* @__PURE__ */ (0,
|
|
8530
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8291
8531
|
Skeleton,
|
|
8292
8532
|
{
|
|
8293
8533
|
className: "size-4 rounded-md",
|
|
8294
8534
|
"data-sidebar": "menu-skeleton-icon"
|
|
8295
8535
|
}
|
|
8296
8536
|
),
|
|
8297
|
-
/* @__PURE__ */ (0,
|
|
8537
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8298
8538
|
Skeleton,
|
|
8299
8539
|
{
|
|
8300
8540
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -8309,7 +8549,7 @@ function SidebarMenuSkeleton({
|
|
|
8309
8549
|
);
|
|
8310
8550
|
}
|
|
8311
8551
|
function SidebarMenuSub({ className, ...props }) {
|
|
8312
|
-
return /* @__PURE__ */ (0,
|
|
8552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8313
8553
|
"ul",
|
|
8314
8554
|
{
|
|
8315
8555
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -8327,7 +8567,7 @@ function SidebarMenuSubItem({
|
|
|
8327
8567
|
className,
|
|
8328
8568
|
...props
|
|
8329
8569
|
}) {
|
|
8330
|
-
return /* @__PURE__ */ (0,
|
|
8570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8331
8571
|
"li",
|
|
8332
8572
|
{
|
|
8333
8573
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -8345,7 +8585,7 @@ function SidebarMenuSubButton({
|
|
|
8345
8585
|
...props
|
|
8346
8586
|
}) {
|
|
8347
8587
|
const Comp = asChild ? import_react_slot5.Slot : "a";
|
|
8348
|
-
return /* @__PURE__ */ (0,
|
|
8588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8349
8589
|
Comp,
|
|
8350
8590
|
{
|
|
8351
8591
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -8366,12 +8606,12 @@ function SidebarMenuSubButton({
|
|
|
8366
8606
|
}
|
|
8367
8607
|
|
|
8368
8608
|
// src/components/ui/slider.tsx
|
|
8369
|
-
var
|
|
8609
|
+
var React30 = __toESM(require("react"), 1);
|
|
8370
8610
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
8371
|
-
var
|
|
8611
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8372
8612
|
function useDocumentDirection2() {
|
|
8373
|
-
const [direction, setDirection] =
|
|
8374
|
-
|
|
8613
|
+
const [direction, setDirection] = React30.useState("rtl");
|
|
8614
|
+
React30.useEffect(() => {
|
|
8375
8615
|
const getDirection = () => {
|
|
8376
8616
|
if (typeof document === "undefined") return "rtl";
|
|
8377
8617
|
const htmlDir = document.documentElement.getAttribute("dir");
|
|
@@ -8402,13 +8642,13 @@ function Slider({
|
|
|
8402
8642
|
dir,
|
|
8403
8643
|
...props
|
|
8404
8644
|
}) {
|
|
8405
|
-
const _values =
|
|
8645
|
+
const _values = React30.useMemo(
|
|
8406
8646
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
8407
8647
|
[value, defaultValue, min, max]
|
|
8408
8648
|
);
|
|
8409
8649
|
const documentDir = useDocumentDirection2();
|
|
8410
8650
|
const resolvedDir = dir ?? documentDir;
|
|
8411
|
-
return /* @__PURE__ */ (0,
|
|
8651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
8412
8652
|
SliderPrimitive.Root,
|
|
8413
8653
|
{
|
|
8414
8654
|
"data-slot": "slider",
|
|
@@ -8423,14 +8663,14 @@ function Slider({
|
|
|
8423
8663
|
),
|
|
8424
8664
|
...props,
|
|
8425
8665
|
children: [
|
|
8426
|
-
/* @__PURE__ */ (0,
|
|
8666
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8427
8667
|
SliderPrimitive.Track,
|
|
8428
8668
|
{
|
|
8429
8669
|
"data-slot": "slider-track",
|
|
8430
8670
|
className: cn(
|
|
8431
8671
|
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
8432
8672
|
),
|
|
8433
|
-
children: /* @__PURE__ */ (0,
|
|
8673
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8434
8674
|
SliderPrimitive.Range,
|
|
8435
8675
|
{
|
|
8436
8676
|
"data-slot": "slider-range",
|
|
@@ -8441,7 +8681,7 @@ function Slider({
|
|
|
8441
8681
|
)
|
|
8442
8682
|
}
|
|
8443
8683
|
),
|
|
8444
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0,
|
|
8684
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8445
8685
|
SliderPrimitive.Thumb,
|
|
8446
8686
|
{
|
|
8447
8687
|
"data-slot": "slider-thumb",
|
|
@@ -8455,16 +8695,15 @@ function Slider({
|
|
|
8455
8695
|
}
|
|
8456
8696
|
|
|
8457
8697
|
// src/components/ui/sonner.tsx
|
|
8458
|
-
var import_lucide_react27 = require("lucide-react");
|
|
8459
8698
|
var import_next_themes = require("next-themes");
|
|
8460
8699
|
var import_sonner = require("sonner");
|
|
8461
8700
|
var import_sonner2 = require("sonner");
|
|
8462
|
-
var
|
|
8701
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8463
8702
|
var SONNER_DEFAULT_DURATION = 4e3;
|
|
8464
|
-
var StatusIconSuccess = () => /* @__PURE__ */ (0,
|
|
8465
|
-
var StatusIconInfo = () => /* @__PURE__ */ (0,
|
|
8466
|
-
var StatusIconWarning = () => /* @__PURE__ */ (0,
|
|
8467
|
-
var StatusIconError = () => /* @__PURE__ */ (0,
|
|
8703
|
+
var StatusIconSuccess = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-brand-600 dark:bg-brand-500 p-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icons.check, { className: "size-3 text-white", strokeWidth: 3 }) });
|
|
8704
|
+
var StatusIconInfo = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-foreground-lighter p-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icons.info, { className: "size-3 text-background-surface-200" }) });
|
|
8705
|
+
var StatusIconWarning = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-warning-600 dark:bg-warning-500 p-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icons.alertTriangle, { className: "size-3 text-white" }) });
|
|
8706
|
+
var StatusIconError = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-destructive-600 dark:bg-destructive-500 p-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icons.xCircle, { className: "size-3 text-white" }) });
|
|
8468
8707
|
var Toaster = ({
|
|
8469
8708
|
dir = "rtl",
|
|
8470
8709
|
position = "bottom-left",
|
|
@@ -8473,15 +8712,15 @@ var Toaster = ({
|
|
|
8473
8712
|
...props
|
|
8474
8713
|
}) => {
|
|
8475
8714
|
const { theme = "system" } = (0, import_next_themes.useTheme)();
|
|
8476
|
-
return /* @__PURE__ */ (0,
|
|
8715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8477
8716
|
import_sonner.Toaster,
|
|
8478
8717
|
{
|
|
8479
8718
|
icons: {
|
|
8480
|
-
success: /* @__PURE__ */ (0,
|
|
8481
|
-
info: /* @__PURE__ */ (0,
|
|
8482
|
-
warning: /* @__PURE__ */ (0,
|
|
8483
|
-
error: /* @__PURE__ */ (0,
|
|
8484
|
-
loading: /* @__PURE__ */ (0,
|
|
8719
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StatusIconSuccess, {}),
|
|
8720
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StatusIconInfo, {}),
|
|
8721
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StatusIconWarning, {}),
|
|
8722
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StatusIconError, {}),
|
|
8723
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icons.loader, { className: "size-4 animate-spin" })
|
|
8485
8724
|
},
|
|
8486
8725
|
theme,
|
|
8487
8726
|
className: "toaster group pointer-events-auto",
|
|
@@ -8531,11 +8770,11 @@ var Toaster = ({
|
|
|
8531
8770
|
};
|
|
8532
8771
|
|
|
8533
8772
|
// src/components/ui/switch.tsx
|
|
8534
|
-
var
|
|
8773
|
+
var React31 = __toESM(require("react"), 1);
|
|
8535
8774
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"), 1);
|
|
8536
|
-
var
|
|
8537
|
-
var
|
|
8538
|
-
var switchRootVariants = (0,
|
|
8775
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
8776
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
8777
|
+
var switchRootVariants = (0, import_class_variance_authority15.cva)(
|
|
8539
8778
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-brand data-[state=checked]:hover:bg-brand-600/90 data-[state=unchecked]:bg-control data-[state=unchecked]:hover:bg-border",
|
|
8540
8779
|
{
|
|
8541
8780
|
variants: {
|
|
@@ -8550,7 +8789,7 @@ var switchRootVariants = (0, import_class_variance_authority13.cva)(
|
|
|
8550
8789
|
}
|
|
8551
8790
|
}
|
|
8552
8791
|
);
|
|
8553
|
-
var switchThumbVariants = (0,
|
|
8792
|
+
var switchThumbVariants = (0, import_class_variance_authority15.cva)(
|
|
8554
8793
|
"pointer-events-none block rounded-full bg-foreground-lighter data-[state=checked]:bg-white shadow-lg ring-0 transition-transform",
|
|
8555
8794
|
{
|
|
8556
8795
|
variants: {
|
|
@@ -8565,14 +8804,14 @@ var switchThumbVariants = (0, import_class_variance_authority13.cva)(
|
|
|
8565
8804
|
}
|
|
8566
8805
|
}
|
|
8567
8806
|
);
|
|
8568
|
-
var Switch =
|
|
8807
|
+
var Switch = React31.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8569
8808
|
SwitchPrimitive.Root,
|
|
8570
8809
|
{
|
|
8571
8810
|
"data-slot": "switch",
|
|
8572
8811
|
className: cn(switchRootVariants({ size }), className),
|
|
8573
8812
|
...props,
|
|
8574
8813
|
ref,
|
|
8575
|
-
children: /* @__PURE__ */ (0,
|
|
8814
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8576
8815
|
SwitchPrimitive.Thumb,
|
|
8577
8816
|
{
|
|
8578
8817
|
"data-slot": "switch-thumb",
|
|
@@ -8584,14 +8823,14 @@ var Switch = React29.forwardRef(({ className, size, ...props }, ref) => /* @__PU
|
|
|
8584
8823
|
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
8585
8824
|
|
|
8586
8825
|
// src/components/ui/table.tsx
|
|
8587
|
-
var
|
|
8826
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
8588
8827
|
function Table({ className, ...props }) {
|
|
8589
|
-
return /* @__PURE__ */ (0,
|
|
8828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8590
8829
|
"div",
|
|
8591
8830
|
{
|
|
8592
8831
|
"data-slot": "table-container",
|
|
8593
8832
|
className: "relative w-full overflow-x-auto",
|
|
8594
|
-
children: /* @__PURE__ */ (0,
|
|
8833
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8595
8834
|
"table",
|
|
8596
8835
|
{
|
|
8597
8836
|
"data-slot": "table",
|
|
@@ -8603,7 +8842,7 @@ function Table({ className, ...props }) {
|
|
|
8603
8842
|
);
|
|
8604
8843
|
}
|
|
8605
8844
|
function TableHeader({ className, ...props }) {
|
|
8606
|
-
return /* @__PURE__ */ (0,
|
|
8845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8607
8846
|
"thead",
|
|
8608
8847
|
{
|
|
8609
8848
|
"data-slot": "table-header",
|
|
@@ -8613,7 +8852,7 @@ function TableHeader({ className, ...props }) {
|
|
|
8613
8852
|
);
|
|
8614
8853
|
}
|
|
8615
8854
|
function TableBody({ className, ...props }) {
|
|
8616
|
-
return /* @__PURE__ */ (0,
|
|
8855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8617
8856
|
"tbody",
|
|
8618
8857
|
{
|
|
8619
8858
|
"data-slot": "table-body",
|
|
@@ -8623,7 +8862,7 @@ function TableBody({ className, ...props }) {
|
|
|
8623
8862
|
);
|
|
8624
8863
|
}
|
|
8625
8864
|
function TableFooter({ className, ...props }) {
|
|
8626
|
-
return /* @__PURE__ */ (0,
|
|
8865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8627
8866
|
"tfoot",
|
|
8628
8867
|
{
|
|
8629
8868
|
"data-slot": "table-footer",
|
|
@@ -8636,7 +8875,7 @@ function TableFooter({ className, ...props }) {
|
|
|
8636
8875
|
);
|
|
8637
8876
|
}
|
|
8638
8877
|
function TableRow({ className, ...props }) {
|
|
8639
|
-
return /* @__PURE__ */ (0,
|
|
8878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8640
8879
|
"tr",
|
|
8641
8880
|
{
|
|
8642
8881
|
"data-slot": "table-row",
|
|
@@ -8649,7 +8888,7 @@ function TableRow({ className, ...props }) {
|
|
|
8649
8888
|
);
|
|
8650
8889
|
}
|
|
8651
8890
|
function TableHead({ className, ...props }) {
|
|
8652
|
-
return /* @__PURE__ */ (0,
|
|
8891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8653
8892
|
"th",
|
|
8654
8893
|
{
|
|
8655
8894
|
"data-slot": "table-head",
|
|
@@ -8662,7 +8901,7 @@ function TableHead({ className, ...props }) {
|
|
|
8662
8901
|
);
|
|
8663
8902
|
}
|
|
8664
8903
|
function TableCell({ className, ...props }) {
|
|
8665
|
-
return /* @__PURE__ */ (0,
|
|
8904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8666
8905
|
"td",
|
|
8667
8906
|
{
|
|
8668
8907
|
"data-slot": "table-cell",
|
|
@@ -8678,7 +8917,7 @@ function TableCaption({
|
|
|
8678
8917
|
className,
|
|
8679
8918
|
...props
|
|
8680
8919
|
}) {
|
|
8681
|
-
return /* @__PURE__ */ (0,
|
|
8920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8682
8921
|
"caption",
|
|
8683
8922
|
{
|
|
8684
8923
|
"data-slot": "table-caption",
|
|
@@ -8689,11 +8928,11 @@ function TableCaption({
|
|
|
8689
8928
|
}
|
|
8690
8929
|
|
|
8691
8930
|
// src/components/ui/tabs.tsx
|
|
8692
|
-
var
|
|
8931
|
+
var React32 = __toESM(require("react"), 1);
|
|
8693
8932
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
8694
|
-
var
|
|
8933
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
8695
8934
|
var Tabs = TabsPrimitive.Root;
|
|
8696
|
-
var TabsList =
|
|
8935
|
+
var TabsList = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8697
8936
|
TabsPrimitive.List,
|
|
8698
8937
|
{
|
|
8699
8938
|
ref,
|
|
@@ -8705,7 +8944,7 @@ var TabsList = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
8705
8944
|
}
|
|
8706
8945
|
));
|
|
8707
8946
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
8708
|
-
var TabsTrigger =
|
|
8947
|
+
var TabsTrigger = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8709
8948
|
TabsPrimitive.Trigger,
|
|
8710
8949
|
{
|
|
8711
8950
|
ref,
|
|
@@ -8717,7 +8956,7 @@ var TabsTrigger = React30.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
8717
8956
|
}
|
|
8718
8957
|
));
|
|
8719
8958
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
8720
|
-
var TabsContent =
|
|
8959
|
+
var TabsContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8721
8960
|
TabsPrimitive.Content,
|
|
8722
8961
|
{
|
|
8723
8962
|
ref,
|
|
@@ -8732,9 +8971,9 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
8732
8971
|
|
|
8733
8972
|
// src/components/ui/toggle.tsx
|
|
8734
8973
|
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
8735
|
-
var
|
|
8736
|
-
var
|
|
8737
|
-
var toggleVariants = (0,
|
|
8974
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
8975
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
8976
|
+
var toggleVariants = (0, import_class_variance_authority16.cva)(
|
|
8738
8977
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-background-control focus-visible:ring-offset-2 transition-[color,box-shadow] whitespace-nowrap",
|
|
8739
8978
|
{
|
|
8740
8979
|
variants: {
|
|
@@ -8760,7 +8999,7 @@ function Toggle({
|
|
|
8760
8999
|
size,
|
|
8761
9000
|
...props
|
|
8762
9001
|
}) {
|
|
8763
|
-
return /* @__PURE__ */ (0,
|
|
9002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
8764
9003
|
TogglePrimitive.Root,
|
|
8765
9004
|
{
|
|
8766
9005
|
"data-slot": "toggle",
|
|
@@ -8771,10 +9010,10 @@ function Toggle({
|
|
|
8771
9010
|
}
|
|
8772
9011
|
|
|
8773
9012
|
// src/components/ui/toggle-group.tsx
|
|
8774
|
-
var
|
|
9013
|
+
var React33 = __toESM(require("react"), 1);
|
|
8775
9014
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
8776
|
-
var
|
|
8777
|
-
var ToggleGroupContext =
|
|
9015
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
9016
|
+
var ToggleGroupContext = React33.createContext({
|
|
8778
9017
|
size: "default",
|
|
8779
9018
|
variant: "default"
|
|
8780
9019
|
});
|
|
@@ -8785,13 +9024,13 @@ function ToggleGroup({
|
|
|
8785
9024
|
children,
|
|
8786
9025
|
...props
|
|
8787
9026
|
}) {
|
|
8788
|
-
return /* @__PURE__ */ (0,
|
|
9027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8789
9028
|
ToggleGroupPrimitive.Root,
|
|
8790
9029
|
{
|
|
8791
9030
|
"data-slot": "toggle-group",
|
|
8792
9031
|
className: cn("flex items-center justify-center gap-1", className),
|
|
8793
9032
|
...props,
|
|
8794
|
-
children: /* @__PURE__ */ (0,
|
|
9033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
8795
9034
|
}
|
|
8796
9035
|
);
|
|
8797
9036
|
}
|
|
@@ -8802,8 +9041,8 @@ function ToggleGroupItem({
|
|
|
8802
9041
|
size,
|
|
8803
9042
|
...props
|
|
8804
9043
|
}) {
|
|
8805
|
-
const context =
|
|
8806
|
-
return /* @__PURE__ */ (0,
|
|
9044
|
+
const context = React33.useContext(ToggleGroupContext);
|
|
9045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8807
9046
|
ToggleGroupPrimitive.Item,
|
|
8808
9047
|
{
|
|
8809
9048
|
"data-slot": "toggle-group-item",
|
|
@@ -8865,236 +9104,136 @@ function resolveCssColor(styles, variable, fallback) {
|
|
|
8865
9104
|
if (raw.includes("%")) return `hsl(${raw})`;
|
|
8866
9105
|
return raw;
|
|
8867
9106
|
}
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
const
|
|
8885
|
-
|
|
8886
|
-
const addOpacity = (color, opacity) => {
|
|
8887
|
-
if (color.startsWith("hsl(")) {
|
|
8888
|
-
return color.replace(")", ` / ${opacity})`);
|
|
8889
|
-
}
|
|
8890
|
-
if (color.startsWith("rgb(")) {
|
|
8891
|
-
return color.replace("rgb(", "rgba(").replace(")", `, ${opacity})`);
|
|
8892
|
-
}
|
|
8893
|
-
return color;
|
|
8894
|
-
};
|
|
8895
|
-
const nivoTheme = {
|
|
9107
|
+
function addOpacityToColor(color, opacity) {
|
|
9108
|
+
if (color.startsWith("hsl(")) {
|
|
9109
|
+
return color.replace(")", ` / ${opacity})`);
|
|
9110
|
+
}
|
|
9111
|
+
if (color.startsWith("rgb(")) {
|
|
9112
|
+
return color.replace("rgb(", "rgba(").replace(")", `, ${opacity})`);
|
|
9113
|
+
}
|
|
9114
|
+
return color;
|
|
9115
|
+
}
|
|
9116
|
+
var CHART_FONT_FAMILY = "Yekan Bakh, system-ui, -apple-system, sans-serif";
|
|
9117
|
+
function createNivoTheme(styles, fallbacks) {
|
|
9118
|
+
const fb = { ...DEFAULT_FALLBACKS, ...fallbacks };
|
|
9119
|
+
const get = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
9120
|
+
const foreground = get("--foreground", fb.foreground);
|
|
9121
|
+
const foregroundMuted = get("--foreground-muted", fb.foregroundMuted);
|
|
9122
|
+
const border = get("--border", fb.border);
|
|
9123
|
+
const background = get("--background", fb.background);
|
|
9124
|
+
return {
|
|
8896
9125
|
background: "transparent",
|
|
8897
9126
|
text: {
|
|
8898
|
-
fontFamily:
|
|
8899
|
-
fill:
|
|
9127
|
+
fontFamily: CHART_FONT_FAMILY,
|
|
9128
|
+
fill: foreground
|
|
8900
9129
|
},
|
|
8901
9130
|
axis: {
|
|
8902
9131
|
domain: {
|
|
8903
9132
|
line: {
|
|
8904
|
-
stroke:
|
|
9133
|
+
stroke: border,
|
|
8905
9134
|
strokeWidth: 1
|
|
8906
9135
|
}
|
|
8907
9136
|
},
|
|
8908
9137
|
ticks: {
|
|
8909
9138
|
line: {
|
|
8910
|
-
stroke:
|
|
9139
|
+
stroke: border,
|
|
8911
9140
|
strokeWidth: 1
|
|
8912
9141
|
},
|
|
8913
9142
|
text: {
|
|
8914
|
-
fontFamily:
|
|
8915
|
-
fill:
|
|
9143
|
+
fontFamily: CHART_FONT_FAMILY,
|
|
9144
|
+
fill: foregroundMuted
|
|
8916
9145
|
}
|
|
8917
9146
|
},
|
|
8918
9147
|
legend: {
|
|
8919
9148
|
text: {
|
|
8920
|
-
fontFamily:
|
|
8921
|
-
fill:
|
|
9149
|
+
fontFamily: CHART_FONT_FAMILY,
|
|
9150
|
+
fill: foreground
|
|
8922
9151
|
}
|
|
8923
9152
|
}
|
|
8924
9153
|
},
|
|
8925
9154
|
grid: {
|
|
8926
9155
|
line: {
|
|
8927
|
-
stroke:
|
|
9156
|
+
stroke: border,
|
|
8928
9157
|
strokeWidth: 1,
|
|
8929
9158
|
strokeOpacity: 0.5
|
|
8930
9159
|
}
|
|
8931
9160
|
},
|
|
8932
9161
|
tooltip: {
|
|
8933
9162
|
container: {
|
|
8934
|
-
fontFamily:
|
|
8935
|
-
background
|
|
8936
|
-
color:
|
|
9163
|
+
fontFamily: CHART_FONT_FAMILY,
|
|
9164
|
+
background,
|
|
9165
|
+
color: foreground,
|
|
8937
9166
|
fontSize: 12,
|
|
8938
9167
|
borderRadius: "8px",
|
|
8939
|
-
border: `1px solid ${
|
|
9168
|
+
border: `1px solid ${addOpacityToColor(border, 0.5)}`,
|
|
8940
9169
|
boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",
|
|
8941
9170
|
padding: "10px"
|
|
8942
9171
|
}
|
|
8943
9172
|
},
|
|
8944
9173
|
legends: {
|
|
8945
9174
|
text: {
|
|
8946
|
-
fontFamily:
|
|
8947
|
-
fill:
|
|
9175
|
+
fontFamily: CHART_FONT_FAMILY,
|
|
9176
|
+
fill: foreground
|
|
8948
9177
|
}
|
|
8949
9178
|
}
|
|
8950
9179
|
};
|
|
8951
|
-
const defaultColors = [
|
|
8952
|
-
getColor("--chart-1", FALLBACKS.chart1),
|
|
8953
|
-
getColor("--chart-2", FALLBACKS.chart2),
|
|
8954
|
-
getColor("--chart-3", FALLBACKS.chart3),
|
|
8955
|
-
getColor("--chart-4", FALLBACKS.chart4),
|
|
8956
|
-
getColor("--chart-5", FALLBACKS.chart5)
|
|
8957
|
-
];
|
|
8958
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_line.ResponsiveLine, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
8959
9180
|
}
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
border: "hsl(0 0% 45%)",
|
|
8967
|
-
mutedForeground: "hsl(0 0% 55%)",
|
|
8968
|
-
popover: "hsl(0 0% 12%)",
|
|
8969
|
-
popoverForeground: "hsl(0 0% 98%)",
|
|
8970
|
-
chart1: "hsl(12 76% 61%)",
|
|
9181
|
+
var DEFAULT_FALLBACKS = {
|
|
9182
|
+
foreground: "hsl(0 0% 9%)",
|
|
9183
|
+
foregroundMuted: "hsl(0 0% 44%)",
|
|
9184
|
+
border: "hsl(0 0% 88%)",
|
|
9185
|
+
background: "hsl(0 0% 99%)",
|
|
9186
|
+
chart1: "hsl(152.9deg 60% 52.9%)",
|
|
8971
9187
|
chart2: "hsl(173 58% 39%)",
|
|
8972
9188
|
chart3: "hsl(197 37% 24%)",
|
|
8973
9189
|
chart4: "hsl(43 74% 66%)",
|
|
8974
9190
|
chart5: "hsl(27 87% 67%)"
|
|
8975
9191
|
};
|
|
9192
|
+
function resolveChartColors(styles, fallbacks) {
|
|
9193
|
+
const fb = { ...DEFAULT_FALLBACKS, ...fallbacks };
|
|
9194
|
+
const get = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
9195
|
+
return [
|
|
9196
|
+
get("--chart-1", fb.chart1),
|
|
9197
|
+
get("--chart-2", fb.chart2),
|
|
9198
|
+
get("--chart-3", fb.chart3),
|
|
9199
|
+
get("--chart-4", fb.chart4),
|
|
9200
|
+
get("--chart-5", fb.chart5)
|
|
9201
|
+
];
|
|
9202
|
+
}
|
|
9203
|
+
|
|
9204
|
+
// src/components/charts/PartoLineChart.tsx
|
|
9205
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
9206
|
+
function PartoLineChart({ className, ...props }) {
|
|
9207
|
+
const styles = useRootStyles();
|
|
9208
|
+
const nivoTheme = createNivoTheme(styles);
|
|
9209
|
+
const defaultColors = resolveChartColors(styles);
|
|
9210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_line.ResponsiveLine, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
9211
|
+
}
|
|
9212
|
+
|
|
9213
|
+
// src/components/charts/PartoBarChart.tsx
|
|
9214
|
+
var import_bar = require("@nivo/bar");
|
|
9215
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
8976
9216
|
function PartoBarChart({ className, ...props }) {
|
|
8977
9217
|
const styles = useRootStyles();
|
|
8978
|
-
const
|
|
8979
|
-
const
|
|
8980
|
-
|
|
8981
|
-
text: {
|
|
8982
|
-
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
8983
|
-
fill: getColor("--foreground", FALLBACKS2.foreground)
|
|
8984
|
-
},
|
|
8985
|
-
axis: {
|
|
8986
|
-
domain: {
|
|
8987
|
-
line: {
|
|
8988
|
-
stroke: getColor("--border", FALLBACKS2.border),
|
|
8989
|
-
strokeWidth: 1
|
|
8990
|
-
}
|
|
8991
|
-
},
|
|
8992
|
-
ticks: {
|
|
8993
|
-
line: {
|
|
8994
|
-
stroke: getColor("--border", FALLBACKS2.border),
|
|
8995
|
-
strokeWidth: 1
|
|
8996
|
-
},
|
|
8997
|
-
text: {
|
|
8998
|
-
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
8999
|
-
fill: getColor("--muted-foreground", FALLBACKS2.mutedForeground)
|
|
9000
|
-
}
|
|
9001
|
-
},
|
|
9002
|
-
legend: {
|
|
9003
|
-
text: {
|
|
9004
|
-
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9005
|
-
fill: getColor("--foreground", FALLBACKS2.foreground)
|
|
9006
|
-
}
|
|
9007
|
-
}
|
|
9008
|
-
},
|
|
9009
|
-
grid: {
|
|
9010
|
-
line: {
|
|
9011
|
-
stroke: getColor("--border", FALLBACKS2.border),
|
|
9012
|
-
strokeWidth: 1,
|
|
9013
|
-
strokeOpacity: 0.4
|
|
9014
|
-
}
|
|
9015
|
-
},
|
|
9016
|
-
tooltip: {
|
|
9017
|
-
container: {
|
|
9018
|
-
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9019
|
-
background: getColor("--popover", FALLBACKS2.popover),
|
|
9020
|
-
color: getColor("--popover-foreground", FALLBACKS2.popoverForeground),
|
|
9021
|
-
fontSize: 12,
|
|
9022
|
-
borderRadius: "var(--radius)",
|
|
9023
|
-
boxShadow: "0 2px 12px rgba(0,0,0,0.15)",
|
|
9024
|
-
padding: "8px 12px"
|
|
9025
|
-
}
|
|
9026
|
-
},
|
|
9027
|
-
legends: {
|
|
9028
|
-
text: {
|
|
9029
|
-
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9030
|
-
fill: getColor("--foreground", FALLBACKS2.foreground)
|
|
9031
|
-
}
|
|
9032
|
-
}
|
|
9033
|
-
};
|
|
9034
|
-
const defaultColors = [
|
|
9035
|
-
getColor("--chart-1", FALLBACKS2.chart1),
|
|
9036
|
-
getColor("--chart-2", FALLBACKS2.chart2),
|
|
9037
|
-
getColor("--chart-3", FALLBACKS2.chart3),
|
|
9038
|
-
getColor("--chart-4", FALLBACKS2.chart4),
|
|
9039
|
-
getColor("--chart-5", FALLBACKS2.chart5)
|
|
9040
|
-
];
|
|
9041
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_bar.ResponsiveBar, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
9218
|
+
const nivoTheme = createNivoTheme(styles);
|
|
9219
|
+
const defaultColors = resolveChartColors(styles);
|
|
9220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_bar.ResponsiveBar, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
9042
9221
|
}
|
|
9043
9222
|
|
|
9044
9223
|
// src/components/charts/PartoPieChart.tsx
|
|
9045
9224
|
var import_pie = require("@nivo/pie");
|
|
9046
|
-
var
|
|
9047
|
-
var FALLBACKS3 = {
|
|
9048
|
-
foreground: "hsl(0 0% 98%)",
|
|
9049
|
-
popover: "hsl(0 0% 12%)",
|
|
9050
|
-
popoverForeground: "hsl(0 0% 98%)",
|
|
9051
|
-
chart1: "hsl(12 76% 61%)",
|
|
9052
|
-
chart2: "hsl(173 58% 39%)",
|
|
9053
|
-
chart3: "hsl(197 37% 24%)",
|
|
9054
|
-
chart4: "hsl(43 74% 66%)",
|
|
9055
|
-
chart5: "hsl(27 87% 67%)"
|
|
9056
|
-
};
|
|
9225
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
9057
9226
|
function PartoPieChart({ className, ...props }) {
|
|
9058
9227
|
const styles = useRootStyles();
|
|
9059
|
-
const
|
|
9060
|
-
const
|
|
9061
|
-
|
|
9062
|
-
text: {
|
|
9063
|
-
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9064
|
-
fill: getColor("--foreground", FALLBACKS3.foreground)
|
|
9065
|
-
},
|
|
9066
|
-
tooltip: {
|
|
9067
|
-
container: {
|
|
9068
|
-
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9069
|
-
background: getColor("--popover", FALLBACKS3.popover),
|
|
9070
|
-
color: getColor("--popover-foreground", FALLBACKS3.popoverForeground),
|
|
9071
|
-
fontSize: 12,
|
|
9072
|
-
borderRadius: "var(--radius)",
|
|
9073
|
-
boxShadow: "0 2px 12px rgba(0,0,0,0.15)",
|
|
9074
|
-
padding: "8px 12px"
|
|
9075
|
-
}
|
|
9076
|
-
},
|
|
9077
|
-
legends: {
|
|
9078
|
-
text: {
|
|
9079
|
-
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9080
|
-
fill: getColor("--foreground", FALLBACKS3.foreground)
|
|
9081
|
-
}
|
|
9082
|
-
}
|
|
9083
|
-
};
|
|
9084
|
-
const defaultColors = [
|
|
9085
|
-
getColor("--chart-1", FALLBACKS3.chart1),
|
|
9086
|
-
getColor("--chart-2", FALLBACKS3.chart2),
|
|
9087
|
-
getColor("--chart-3", FALLBACKS3.chart3),
|
|
9088
|
-
getColor("--chart-4", FALLBACKS3.chart4),
|
|
9089
|
-
getColor("--chart-5", FALLBACKS3.chart5)
|
|
9090
|
-
];
|
|
9091
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_pie.ResponsivePie, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
9228
|
+
const nivoTheme = createNivoTheme(styles);
|
|
9229
|
+
const defaultColors = resolveChartColors(styles);
|
|
9230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_pie.ResponsivePie, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
9092
9231
|
}
|
|
9093
9232
|
|
|
9094
9233
|
// src/components/charts/PartoHeatMap.tsx
|
|
9095
9234
|
var import_heatmap = require("@nivo/heatmap");
|
|
9096
|
-
var
|
|
9097
|
-
var
|
|
9235
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
9236
|
+
var FALLBACKS = {
|
|
9098
9237
|
foreground: "hsl(0 0% 98%)",
|
|
9099
9238
|
border: "hsl(0 0% 45%)",
|
|
9100
9239
|
mutedForeground: "hsl(0 0% 55%)",
|
|
@@ -9162,24 +9301,24 @@ function PartoHeatMap({
|
|
|
9162
9301
|
background: "transparent",
|
|
9163
9302
|
text: {
|
|
9164
9303
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9165
|
-
fill: getColor("--foreground",
|
|
9304
|
+
fill: getColor("--foreground", FALLBACKS.foreground),
|
|
9166
9305
|
fontSize: 11
|
|
9167
9306
|
},
|
|
9168
9307
|
axis: {
|
|
9169
9308
|
domain: {
|
|
9170
9309
|
line: {
|
|
9171
|
-
stroke: getColor("--border",
|
|
9310
|
+
stroke: getColor("--border", FALLBACKS.border),
|
|
9172
9311
|
strokeWidth: 1
|
|
9173
9312
|
}
|
|
9174
9313
|
},
|
|
9175
9314
|
ticks: {
|
|
9176
9315
|
line: {
|
|
9177
|
-
stroke: getColor("--border",
|
|
9316
|
+
stroke: getColor("--border", FALLBACKS.border),
|
|
9178
9317
|
strokeWidth: 1
|
|
9179
9318
|
},
|
|
9180
9319
|
text: {
|
|
9181
9320
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9182
|
-
fill: getColor("--foreground",
|
|
9321
|
+
fill: getColor("--foreground", FALLBACKS.foreground),
|
|
9183
9322
|
fontSize: 13,
|
|
9184
9323
|
fontWeight: 600
|
|
9185
9324
|
}
|
|
@@ -9187,7 +9326,7 @@ function PartoHeatMap({
|
|
|
9187
9326
|
legend: {
|
|
9188
9327
|
text: {
|
|
9189
9328
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9190
|
-
fill: getColor("--foreground",
|
|
9329
|
+
fill: getColor("--foreground", FALLBACKS.foreground),
|
|
9191
9330
|
fontSize: 13,
|
|
9192
9331
|
fontWeight: 700
|
|
9193
9332
|
}
|
|
@@ -9195,41 +9334,41 @@ function PartoHeatMap({
|
|
|
9195
9334
|
},
|
|
9196
9335
|
grid: {
|
|
9197
9336
|
line: {
|
|
9198
|
-
stroke: getColor("--card",
|
|
9337
|
+
stroke: getColor("--card", FALLBACKS.card),
|
|
9199
9338
|
strokeWidth: 3
|
|
9200
9339
|
}
|
|
9201
9340
|
},
|
|
9202
9341
|
tooltip: {
|
|
9203
9342
|
container: {
|
|
9204
9343
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9205
|
-
background: getColor("--popover",
|
|
9206
|
-
color: getColor("--popover-foreground",
|
|
9344
|
+
background: getColor("--popover", FALLBACKS.popover),
|
|
9345
|
+
color: getColor("--popover-foreground", FALLBACKS.popoverForeground),
|
|
9207
9346
|
fontSize: 12,
|
|
9208
9347
|
borderRadius: "var(--radius)",
|
|
9209
9348
|
boxShadow: "0 2px 4px rgba(0,0,0,0.2)",
|
|
9210
9349
|
padding: "8px 12px",
|
|
9211
|
-
border: `1px solid ${getColor("--border",
|
|
9350
|
+
border: `1px solid ${getColor("--border", FALLBACKS.border)}`
|
|
9212
9351
|
}
|
|
9213
9352
|
},
|
|
9214
9353
|
legends: {
|
|
9215
9354
|
text: {
|
|
9216
9355
|
fontFamily: "Yekan Bakh, system-ui, -apple-system, sans-serif",
|
|
9217
|
-
fill: getColor("--foreground",
|
|
9356
|
+
fill: getColor("--foreground", FALLBACKS.foreground),
|
|
9218
9357
|
fontSize: 11
|
|
9219
9358
|
}
|
|
9220
9359
|
}
|
|
9221
9360
|
};
|
|
9222
9361
|
const defaultValueFormat = (value) => formatNumber2(value);
|
|
9223
|
-
const defaultTooltip = ({ cell }) => /* @__PURE__ */ (0,
|
|
9224
|
-
/* @__PURE__ */ (0,
|
|
9362
|
+
const defaultTooltip = ({ cell }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "bg-popover text-popover-foreground rounded-md shadow-lg px-3 py-2 border border-border min-w-[140px] text-center", children: [
|
|
9363
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "font-semibold text-sm mb-1.5 whitespace-nowrap", children: [
|
|
9225
9364
|
formatWeekday(String(cell.serieId)),
|
|
9226
9365
|
" - ",
|
|
9227
9366
|
formatNumber2(cell.data.x)
|
|
9228
9367
|
] }),
|
|
9229
|
-
/* @__PURE__ */ (0,
|
|
9368
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "text-xs whitespace-nowrap", children: [
|
|
9230
9369
|
isPersian ? "\u0634\u062F\u062A \u0641\u0639\u0627\u0644\u06CC\u062A" : "Activity",
|
|
9231
9370
|
": ",
|
|
9232
|
-
/* @__PURE__ */ (0,
|
|
9371
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "font-bold text-primary", children: formatNumber2(cell.value ?? 0) })
|
|
9233
9372
|
] })
|
|
9234
9373
|
] });
|
|
9235
9374
|
const processAxisConfig = (axisConfig) => {
|
|
@@ -9258,13 +9397,13 @@ function PartoHeatMap({
|
|
|
9258
9397
|
return formatWeekday(String(formatted));
|
|
9259
9398
|
}
|
|
9260
9399
|
} : null;
|
|
9261
|
-
return /* @__PURE__ */ (0,
|
|
9400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
9262
9401
|
"div",
|
|
9263
9402
|
{
|
|
9264
9403
|
className,
|
|
9265
9404
|
dir: "ltr",
|
|
9266
9405
|
style: { position: "relative", width: "100%", height: "100%" },
|
|
9267
|
-
children: /* @__PURE__ */ (0,
|
|
9406
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
9268
9407
|
import_heatmap.ResponsiveHeatMap,
|
|
9269
9408
|
{
|
|
9270
9409
|
data,
|
|
@@ -9283,7 +9422,7 @@ function PartoHeatMap({
|
|
|
9283
9422
|
emptyColor: getColor("--muted", "hsl(0 0% 20%)"),
|
|
9284
9423
|
borderRadius: 2,
|
|
9285
9424
|
borderWidth: 3,
|
|
9286
|
-
borderColor: getColor("--card",
|
|
9425
|
+
borderColor: getColor("--card", FALLBACKS.card),
|
|
9287
9426
|
enableLabels: false,
|
|
9288
9427
|
animate: true,
|
|
9289
9428
|
motionConfig: "gentle",
|
|
@@ -9296,13 +9435,13 @@ function PartoHeatMap({
|
|
|
9296
9435
|
}
|
|
9297
9436
|
|
|
9298
9437
|
// src/components/charts/PartoWordCloud.tsx
|
|
9299
|
-
var
|
|
9438
|
+
var React34 = __toESM(require("react"), 1);
|
|
9300
9439
|
var import_react_dom3 = require("react-dom");
|
|
9301
9440
|
var import_wordcloud = require("@visx/wordcloud");
|
|
9302
9441
|
var import_scale = require("@visx/scale");
|
|
9303
9442
|
var import_text = require("@visx/text");
|
|
9304
|
-
var
|
|
9305
|
-
var
|
|
9443
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
9444
|
+
var FALLBACKS2 = {
|
|
9306
9445
|
primary: "hsl(12 76% 61%)"
|
|
9307
9446
|
};
|
|
9308
9447
|
var stableRandom = () => 0.5;
|
|
@@ -9333,11 +9472,11 @@ function PartoWordCloud({
|
|
|
9333
9472
|
fontWeight = 600
|
|
9334
9473
|
}) {
|
|
9335
9474
|
const styles = useRootStyles();
|
|
9336
|
-
const [hovered, setHovered] =
|
|
9337
|
-
const containerRef =
|
|
9475
|
+
const [hovered, setHovered] = React34.useState(null);
|
|
9476
|
+
const containerRef = React34.useRef(null);
|
|
9338
9477
|
const getColor = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
9339
|
-
const primaryColor = getColor("--primary",
|
|
9340
|
-
const formattedWords =
|
|
9478
|
+
const primaryColor = getColor("--primary", FALLBACKS2.primary);
|
|
9479
|
+
const formattedWords = React34.useMemo(() => {
|
|
9341
9480
|
return words.map((word) => ({
|
|
9342
9481
|
...word,
|
|
9343
9482
|
text: formatHashtagDirection(word.text)
|
|
@@ -9364,7 +9503,7 @@ function PartoWordCloud({
|
|
|
9364
9503
|
color: primaryColor
|
|
9365
9504
|
});
|
|
9366
9505
|
};
|
|
9367
|
-
return /* @__PURE__ */ (0,
|
|
9506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
9368
9507
|
"div",
|
|
9369
9508
|
{
|
|
9370
9509
|
ref: containerRef,
|
|
@@ -9372,7 +9511,7 @@ function PartoWordCloud({
|
|
|
9372
9511
|
style: { position: "relative", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center" },
|
|
9373
9512
|
dir: "rtl",
|
|
9374
9513
|
children: [
|
|
9375
|
-
/* @__PURE__ */ (0,
|
|
9514
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { style: { position: "relative", width, height, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
9376
9515
|
import_wordcloud.Wordcloud,
|
|
9377
9516
|
{
|
|
9378
9517
|
words: formattedWords,
|
|
@@ -9388,7 +9527,7 @@ function PartoWordCloud({
|
|
|
9388
9527
|
const originalData = formattedWords.find((item) => item.text === w.text);
|
|
9389
9528
|
const value = originalData?.value || 0;
|
|
9390
9529
|
if (!w.x || !w.y || !w.text) return null;
|
|
9391
|
-
return /* @__PURE__ */ (0,
|
|
9530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
9392
9531
|
import_text.Text,
|
|
9393
9532
|
{
|
|
9394
9533
|
fill: primaryColor,
|
|
@@ -9412,7 +9551,7 @@ function PartoWordCloud({
|
|
|
9412
9551
|
}
|
|
9413
9552
|
) }),
|
|
9414
9553
|
hovered && typeof document !== "undefined" && (0, import_react_dom3.createPortal)(
|
|
9415
|
-
/* @__PURE__ */ (0,
|
|
9554
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
9416
9555
|
"div",
|
|
9417
9556
|
{
|
|
9418
9557
|
className: "pointer-events-none fixed z-[9999]",
|
|
@@ -9422,14 +9561,14 @@ function PartoWordCloud({
|
|
|
9422
9561
|
top: `${hovered.y - 10}px`,
|
|
9423
9562
|
transform: "translate(-50%, -100%)"
|
|
9424
9563
|
},
|
|
9425
|
-
children: /* @__PURE__ */ (0,
|
|
9426
|
-
/* @__PURE__ */ (0,
|
|
9427
|
-
/* @__PURE__ */ (0,
|
|
9428
|
-
/* @__PURE__ */ (0,
|
|
9564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", dir: "rtl", children: [
|
|
9565
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9566
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "h-2.5 w-2.5 rounded-[2px]", style: { backgroundColor: hovered.color } }),
|
|
9567
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "font-medium", children: hovered.text })
|
|
9429
9568
|
] }),
|
|
9430
|
-
/* @__PURE__ */ (0,
|
|
9431
|
-
/* @__PURE__ */ (0,
|
|
9432
|
-
/* @__PURE__ */ (0,
|
|
9569
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
9570
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-muted-foreground", children: "\u062A\u0639\u062F\u0627\u062F" }),
|
|
9571
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "font-mono font-medium tabular-nums", children: hovered.value.toLocaleString("fa-IR") })
|
|
9433
9572
|
] })
|
|
9434
9573
|
] })
|
|
9435
9574
|
}
|
|
@@ -9579,6 +9718,7 @@ function PartoWordCloud({
|
|
|
9579
9718
|
FormItem,
|
|
9580
9719
|
FormLabel,
|
|
9581
9720
|
FormMessage,
|
|
9721
|
+
HashtagInput,
|
|
9582
9722
|
HoverCard,
|
|
9583
9723
|
HoverCardContent,
|
|
9584
9724
|
HoverCardTrigger,
|
|
@@ -9727,6 +9867,7 @@ function PartoWordCloud({
|
|
|
9727
9867
|
TabsContent,
|
|
9728
9868
|
TabsList,
|
|
9729
9869
|
TabsTrigger,
|
|
9870
|
+
TagInput,
|
|
9730
9871
|
Textarea,
|
|
9731
9872
|
Toaster,
|
|
9732
9873
|
Toggle,
|
|
@@ -9754,9 +9895,11 @@ function PartoWordCloud({
|
|
|
9754
9895
|
getPersianWeekdayName,
|
|
9755
9896
|
getPersianYear,
|
|
9756
9897
|
getPersianYearsForDropdown,
|
|
9898
|
+
hashtagInputVariants,
|
|
9757
9899
|
instagramPostVariants,
|
|
9758
9900
|
jalaliToGregorian,
|
|
9759
9901
|
navigationMenuTriggerStyle,
|
|
9902
|
+
tagInputVariants,
|
|
9760
9903
|
toEnglishDigits,
|
|
9761
9904
|
toPersianDigits,
|
|
9762
9905
|
toast,
|