feat(ui): Arc bileşenleri, landing bölümleri ve bildirim yığını
Sonner/vaul yerine kendi bildirim yığını ve alt sayfa; çip grubu, kart destesi, kaydırma eylemi, yazı dönüşümü, bölme tutamacı; landing'e program duvarı, süzülen haplar ve veri akışı; yaylar tek dosyada (lib/hareket.ts). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -37,13 +37,14 @@ import { UNITUR_ETIKET } from "@/lib/unitur";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { SON_YIL } from "@/lib/veri-yillari";
|
||||
import {
|
||||
Drawer,
|
||||
DrawerClose,
|
||||
DrawerContent,
|
||||
DrawerDescription,
|
||||
DrawerTitle,
|
||||
DrawerTrigger,
|
||||
} from "@/components/ui/drawer";
|
||||
AltSayfa,
|
||||
AltSayfaKapat,
|
||||
AltSayfaGovde,
|
||||
AltSayfaIcerik,
|
||||
AltSayfaAciklama,
|
||||
AltSayfaBaslik,
|
||||
AltSayfaTetik,
|
||||
} from "@/components/ui/alt-sayfa";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -137,8 +138,8 @@ export function ProgramAyrintiButonu({
|
||||
}
|
||||
|
||||
return (
|
||||
<Drawer onOpenChange={acildi} handleOnly>
|
||||
<DrawerTrigger asChild>
|
||||
<AltSayfa onOpenChange={acildi}>
|
||||
<AltSayfaTetik asChild>
|
||||
{varyant === "metin" ? (
|
||||
<button
|
||||
type="button"
|
||||
@@ -160,21 +161,24 @@ export function ProgramAyrintiButonu({
|
||||
<span className="sr-only">{isim} — program ayrıntısı</span>
|
||||
</button>
|
||||
)}
|
||||
</DrawerTrigger>
|
||||
{/* Çekmece kabı ve çarpı cta-sira-form.tsx'teki çekmeceyle birebir (§4.10, §4.3) */}
|
||||
<DrawerContent
|
||||
className="max-h-[92dvh] bg-card sm:mx-auto sm:max-w-2xl sm:border-x sm:border-slate-200 sm:shadow-2xl"
|
||||
</AltSayfaTetik>
|
||||
{/* Alt sayfa kabı tek kaynak (alt-sayfa.tsx), çarpı §4.3. İçerik uzun:
|
||||
sayfa ekranın %60'ında açılır (başlık + künye), yukarı çekince ya da
|
||||
kaydırınca tam boya çıkar (§4.19). */}
|
||||
<AltSayfaIcerik
|
||||
duraklar={[0.6, 0.92]}
|
||||
ilkDurak={0}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<DrawerClose className="absolute top-3 right-3 z-10 flex size-9 cursor-pointer items-center justify-center rounded-full border border-slate-200 bg-popover text-slate-500 transition-[background-color,transform] duration-150 hover:bg-slate-100 hover:text-slate-800 active:scale-[0.96]">
|
||||
<AltSayfaKapat className="absolute top-3 right-3 z-10 flex size-9 cursor-pointer items-center justify-center rounded-full border border-slate-200 bg-popover text-slate-500 transition-[background-color,transform] duration-150 hover:bg-slate-100 hover:text-slate-800 active:scale-[0.96]">
|
||||
<X className="size-4" aria-hidden />
|
||||
<span className="sr-only">Kapat</span>
|
||||
</DrawerClose>
|
||||
<div className="min-h-0 flex-1 overflow-y-auto px-4 pt-5 pb-[max(1.25rem,env(safe-area-inset-bottom))] sm:px-6">
|
||||
<DrawerTitle className="px-10 text-center font-heading text-2xl font-bold text-slate-900">
|
||||
</AltSayfaKapat>
|
||||
<AltSayfaGovde className="px-4 pt-3 pb-[max(1.25rem,env(safe-area-inset-bottom))] sm:px-6">
|
||||
<AltSayfaBaslik className="px-10 text-center font-heading text-2xl font-bold text-slate-900">
|
||||
{isim}
|
||||
</DrawerTitle>
|
||||
<DrawerDescription className="mx-auto mt-1 max-w-md px-4 text-center text-sm text-slate-500">
|
||||
</AltSayfaBaslik>
|
||||
<AltSayfaAciklama className="mx-auto mt-1 max-w-md px-4 text-center text-sm text-slate-500">
|
||||
{veri
|
||||
? [
|
||||
trBaslikDuzeni(veri.program.universite),
|
||||
@@ -184,13 +188,13 @@ export function ProgramAyrintiButonu({
|
||||
.filter(Boolean)
|
||||
.join(" · ")
|
||||
: (universite ?? "Programın tüm açık verisi")}
|
||||
</DrawerDescription>
|
||||
</AltSayfaAciklama>
|
||||
<div className="mt-5">
|
||||
<AyrintiIcerik durum={durum} veri={veri} />
|
||||
</div>
|
||||
</div>
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
</AltSayfaGovde>
|
||||
</AltSayfaIcerik>
|
||||
</AltSayfa>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user