Update carousels, card hover, and IranBay branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-10-04 13:21:27 +03:30
co-authored by Cursor
commit 1153e8e78f
178 changed files with 30517 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
import type { ReactNode } from "react";
const ARABIC_SCRIPT = /[\u0600-\u06FF]/;
/** Wrap Persian/Arabic runs in IRANYekan; leave Latin as-is. */
export function withFaSpans(value: string): ReactNode {
if (!value || !ARABIC_SCRIPT.test(value)) return value;
const parts = value.split(/([\u0600-\u06FF][\u0600-\u06FF\s\u200c]*)/g);
return parts.map((part, index) =>
ARABIC_SCRIPT.test(part) ? (
<span key={index} className="fa" lang="fa" dir="rtl">
{part}
</span>
) : (
part
),
);
}
export function hasArabicScript(value: string | null | undefined) {
return Boolean(value && ARABIC_SCRIPT.test(value));
}
/** Keep phone / E.164 numbers LTR even next to Persian text. */
export function PhoneLtr({
value,
className,
}: {
value: string;
className?: string;
}) {
return (
<span className={className} dir="ltr" lang="en">
{value}
</span>
);
}