@armoyu/ui 1.0.0 → 1.0.2
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/app/api/proxy/[...path]/route.d.ts +22 -0
- package/dist/app/api/proxy/[...path]/route.d.ts.map +1 -0
- package/dist/app/api/proxy/[...path]/route.js +89 -0
- package/dist/app/api/proxy/[...path]/route.js.map +1 -0
- package/dist/app/layout.js +11 -11
- package/dist/components/Button.d.ts +7 -7
- package/dist/components/Button.js +15 -15
- package/dist/components/GenderStatsBar.d.ts +5 -5
- package/dist/components/GenderStatsBar.js +7 -7
- package/dist/components/RollingNumber.d.ts +6 -6
- package/dist/components/RollingNumber.js +23 -23
- package/dist/components/Slider.d.ts +10 -10
- package/dist/components/Slider.js +35 -35
- package/dist/components/StatsGrid.js +13 -13
- package/dist/components/ViewModeToggle.d.ts +7 -7
- package/dist/components/ViewModeToggle.js +9 -9
- package/dist/components/modules/auth/Dashboard.js +250 -250
- package/dist/components/modules/auth/MediaLightbox.d.ts +13 -13
- package/dist/components/modules/auth/MediaLightbox.js +46 -46
- package/dist/components/modules/auth/PostCard.js +112 -112
- package/dist/components/modules/auth/PostInteractionsModal.js +12 -12
- package/dist/components/modules/auth/RepostModal.js +75 -75
- package/dist/components/modules/auth/SidebarLeft.js +40 -40
- package/dist/components/modules/auth/Stories.js +15 -15
- package/dist/components/modules/auth/StoryViewer.js +47 -47
- package/dist/components/modules/chat/ChatContainer.js +196 -196
- package/dist/components/modules/chat/ChatInput.js +30 -30
- package/dist/components/modules/chat/ChatList.js +51 -51
- package/dist/components/modules/chat/ChatMessage.d.ts +11 -11
- package/dist/components/modules/chat/ChatMessage.js +6 -6
- package/dist/components/modules/chat/ChatNotes.js +11 -11
- package/dist/components/modules/community/GroupHeader.js +17 -17
- package/dist/components/modules/community/GroupMenu.js +16 -16
- package/dist/components/modules/community/SchoolCard.js +7 -7
- package/dist/components/modules/community/SurveyCard.js +35 -35
- package/dist/components/modules/forum/ForumBoard.d.ts +16 -16
- package/dist/components/modules/forum/ForumBoard.js +6 -6
- package/dist/components/modules/forum/ForumPost.d.ts +13 -13
- package/dist/components/modules/forum/ForumPost.js +5 -5
- package/dist/components/modules/forum/NewTopicModal.d.ts +7 -7
- package/dist/components/modules/forum/NewTopicModal.js +26 -26
- package/dist/components/modules/forum/TopicItem.d.ts +15 -15
- package/dist/components/modules/forum/TopicItem.js +6 -6
- package/dist/components/modules/galleries/GalleryCard.d.ts +9 -9
- package/dist/components/modules/galleries/GalleryCard.js +5 -5
- package/dist/components/modules/giveaways/GiveawayCard.d.ts +9 -9
- package/dist/components/modules/giveaways/GiveawayCard.js +6 -6
- package/dist/components/modules/groups/ApplicationModal.d.ts +7 -7
- package/dist/components/modules/groups/ApplicationModal.js +27 -27
- package/dist/components/modules/groups/GroupCard.d.ts +12 -12
- package/dist/components/modules/groups/GroupCard.js +6 -6
- package/dist/components/modules/guest/Introduction.js +13 -13
- package/dist/components/modules/magaza/BackToStore.js +10 -10
- package/dist/components/modules/magaza/StoreHeader.js +8 -8
- package/dist/components/modules/news/NewsCard.js +6 -6
- package/dist/components/modules/news/NewsComments.js +52 -52
- package/dist/components/modules/profile/CloudStorageModal.d.ts +8 -8
- package/dist/components/modules/profile/CloudStorageModal.js +31 -31
- package/dist/components/modules/profile/EditProfileModal.d.ts +8 -8
- package/dist/components/modules/profile/EditProfileModal.js +27 -27
- package/dist/components/modules/profile/ProfileContent.js +70 -70
- package/dist/components/modules/profile/ProfileHeader.js +19 -19
- package/dist/components/modules/profile/ProfileStats.d.ts +1 -1
- package/dist/components/modules/profile/ProfileStats.js +14 -14
- package/dist/components/modules/profile/TeamSelectorModal.js +16 -16
- package/dist/components/modules/stations/StationCard.js +25 -25
- package/dist/components/modules/stations/StationQRModal.js +12 -12
- package/dist/components/shared/FloatingChatButton.js +20 -20
- package/dist/components/shared/Footer.d.ts +1 -1
- package/dist/components/shared/Footer.js +9 -9
- package/dist/components/shared/Header.js +97 -97
- package/dist/components/shared/LoginModal.d.ts.map +1 -1
- package/dist/components/shared/LoginModal.js +12 -16
- package/dist/components/shared/LoginModal.js.map +1 -1
- package/dist/components/shared/MainLayoutWrapper.js +7 -7
- package/dist/components/shared/PageWidth.d.ts +5 -5
- package/dist/components/shared/PageWidth.js +13 -13
- package/dist/components/showcase/SocialTab.d.ts.map +1 -1
- package/dist/components/showcase/SocialTab.js +47 -2
- package/dist/components/showcase/SocialTab.js.map +1 -1
- package/dist/context/AuthContext.d.ts +1 -1
- package/dist/context/AuthContext.d.ts.map +1 -1
- package/dist/context/AuthContext.js +52 -33
- package/dist/context/AuthContext.js.map +1 -1
- package/dist/context/CartContext.js +63 -63
- package/dist/context/ChatContext.d.ts +12 -12
- package/dist/context/ChatContext.js +17 -17
- package/dist/context/LayoutContext.d.ts +10 -10
- package/dist/context/LayoutContext.js +16 -16
- package/dist/context/SocketContext.js +30 -30
- package/dist/context/ThemeContext.d.ts +10 -10
- package/dist/context/ThemeContext.js +39 -39
- package/dist/index.js +80 -80
- package/dist/lib/constants/educationData.js +117 -117
- package/dist/lib/constants/punishmentData.d.ts +29 -29
- package/dist/lib/constants/punishmentData.js +183 -183
- package/dist/lib/constants/seedData.js +694 -694
- package/dist/lib/constants/stationData.js +166 -166
- package/dist/lib/constants/surveyData.js +49 -49
- package/dist/lib/constants/teamData.js +65 -65
- package/dist/types/stats.d.ts +17 -17
- package/dist/types/stats.js +1 -1
- package/package.json +47 -46
- package/src/globals.css +187 -187
- package/next.config.ts +0 -13
- package/postcss.config.js +0 -6
- package/src/app/layout.tsx +0 -64
- package/src/app/page.tsx +0 -101
- package/src/components/Button.tsx +0 -41
- package/src/components/GenderStatsBar.tsx +0 -66
- package/src/components/RollingNumber.tsx +0 -50
- package/src/components/Slider.tsx +0 -114
- package/src/components/StatsGrid.tsx +0 -35
- package/src/components/ViewModeToggle.tsx +0 -39
- package/src/components/modules/auth/Dashboard.tsx +0 -649
- package/src/components/modules/auth/MediaLightbox.tsx +0 -112
- package/src/components/modules/auth/PostCard.tsx +0 -556
- package/src/components/modules/auth/PostInteractionsModal.tsx +0 -138
- package/src/components/modules/auth/RepostModal.tsx +0 -167
- package/src/components/modules/auth/SidebarLeft.tsx +0 -237
- package/src/components/modules/auth/Stories.tsx +0 -69
- package/src/components/modules/auth/StoryViewer.tsx +0 -146
- package/src/components/modules/chat/ChatContainer.tsx +0 -332
- package/src/components/modules/chat/ChatInput.tsx +0 -57
- package/src/components/modules/chat/ChatList.tsx +0 -179
- package/src/components/modules/chat/ChatMessage.tsx +0 -43
- package/src/components/modules/chat/ChatNotes.tsx +0 -58
- package/src/components/modules/community/GroupHeader.tsx +0 -111
- package/src/components/modules/community/GroupMenu.tsx +0 -82
- package/src/components/modules/community/SchoolCard.tsx +0 -104
- package/src/components/modules/community/SurveyCard.tsx +0 -149
- package/src/components/modules/forum/ForumBoard.tsx +0 -78
- package/src/components/modules/forum/ForumPost.tsx +0 -71
- package/src/components/modules/forum/NewTopicModal.tsx +0 -112
- package/src/components/modules/forum/TopicItem.tsx +0 -72
- package/src/components/modules/galleries/GalleryCard.tsx +0 -66
- package/src/components/modules/giveaways/GiveawayCard.tsx +0 -76
- package/src/components/modules/groups/ApplicationModal.tsx +0 -133
- package/src/components/modules/groups/GroupCard.tsx +0 -96
- package/src/components/modules/guest/Introduction.tsx +0 -60
- package/src/components/modules/magaza/BackToStore.tsx +0 -53
- package/src/components/modules/magaza/StoreHeader.tsx +0 -74
- package/src/components/modules/news/NewsCard.tsx +0 -66
- package/src/components/modules/news/NewsComments.tsx +0 -141
- package/src/components/modules/profile/CloudStorageModal.tsx +0 -200
- package/src/components/modules/profile/EditProfileModal.tsx +0 -191
- package/src/components/modules/profile/ProfileContent.tsx +0 -491
- package/src/components/modules/profile/ProfileHeader.tsx +0 -128
- package/src/components/modules/profile/ProfileStats.tsx +0 -72
- package/src/components/modules/profile/TeamSelectorModal.tsx +0 -129
- package/src/components/modules/stations/StationCard.tsx +0 -95
- package/src/components/modules/stations/StationQRModal.tsx +0 -102
- package/src/components/shared/FloatingChatButton.tsx +0 -57
- package/src/components/shared/Footer.tsx +0 -77
- package/src/components/shared/Header.tsx +0 -799
- package/src/components/shared/LoginModal.tsx +0 -208
- package/src/components/shared/MainLayoutWrapper.tsx +0 -15
- package/src/components/shared/PageWidth.tsx +0 -22
- package/src/components/showcase/CommunityTab.tsx +0 -22
- package/src/components/showcase/CorporateTab.tsx +0 -38
- package/src/components/showcase/GeneralTab.tsx +0 -41
- package/src/components/showcase/MessagesTab.tsx +0 -26
- package/src/components/showcase/ProfileTab.tsx +0 -20
- package/src/components/showcase/ShopTab.tsx +0 -24
- package/src/components/showcase/SocialTab.tsx +0 -28
- package/src/context/AuthContext.tsx +0 -104
- package/src/context/CartContext.tsx +0 -93
- package/src/context/ChatContext.tsx +0 -32
- package/src/context/LayoutContext.tsx +0 -29
- package/src/context/SocketContext.tsx +0 -50
- package/src/context/ThemeContext.tsx +0 -52
- package/src/index.ts +0 -96
- package/src/lib/constants/educationData.ts +0 -124
- package/src/lib/constants/punishmentData.ts +0 -201
- package/src/lib/constants/seedData.ts +0 -758
- package/src/lib/constants/stationData.ts +0 -170
- package/src/lib/constants/surveyData.ts +0 -53
- package/src/lib/constants/teamData.ts +0 -69
- package/src/lib/utils/numberFormat.ts +0 -16
- package/src/lib/utils/odpUtils.ts +0 -51
- package/src/types/index.ts +0 -1
- package/src/types/stats.ts +0 -17
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React, { useState, useEffect, useCallback } from 'react';
|
|
3
|
-
import { createPortal } from 'react-dom';
|
|
4
|
-
|
|
5
|
-
export interface PostMedia {
|
|
6
|
-
type: 'image' | 'video';
|
|
7
|
-
url: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface MediaLightboxProps {
|
|
11
|
-
isOpen: boolean;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
media: PostMedia[];
|
|
14
|
-
initialIndex?: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function MediaLightbox({ isOpen, onClose, media, initialIndex = 0 }: MediaLightboxProps) {
|
|
18
|
-
const [currentIndex, setCurrentIndex] = useState(initialIndex);
|
|
19
|
-
const [mounted, setMounted] = useState(false);
|
|
20
|
-
|
|
21
|
-
const handlePrev = useCallback((e?: React.MouseEvent | KeyboardEvent) => {
|
|
22
|
-
e?.stopPropagation();
|
|
23
|
-
setCurrentIndex(prev => (prev === 0 ? media.length - 1 : prev - 1));
|
|
24
|
-
}, [media.length]);
|
|
25
|
-
|
|
26
|
-
const handleNext = useCallback((e?: React.MouseEvent | KeyboardEvent) => {
|
|
27
|
-
e?.stopPropagation();
|
|
28
|
-
setCurrentIndex(prev => (prev === media.length - 1 ? 0 : prev + 1));
|
|
29
|
-
}, [media.length]);
|
|
30
|
-
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
setMounted(true);
|
|
33
|
-
if (isOpen) {
|
|
34
|
-
setCurrentIndex(initialIndex);
|
|
35
|
-
document.body.style.overflow = 'hidden';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Klavye Desteği
|
|
39
|
-
const handleKeyDown = (e: KeyboardEvent) => {
|
|
40
|
-
if (!isOpen) return;
|
|
41
|
-
if (e.key === 'ArrowLeft') handlePrev(e);
|
|
42
|
-
if (e.key === 'ArrowRight') handleNext(e);
|
|
43
|
-
if (e.key === 'Escape') onClose();
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
window.addEventListener('keydown', handleKeyDown);
|
|
47
|
-
return () => {
|
|
48
|
-
document.body.style.overflow = '';
|
|
49
|
-
window.removeEventListener('keydown', handleKeyDown);
|
|
50
|
-
};
|
|
51
|
-
}, [isOpen, initialIndex, handlePrev, handleNext, onClose]);
|
|
52
|
-
|
|
53
|
-
if (!isOpen || !media || media.length === 0 || !mounted) return null;
|
|
54
|
-
|
|
55
|
-
const currentMedia = media[currentIndex];
|
|
56
|
-
|
|
57
|
-
const modalContent = (
|
|
58
|
-
<div className="fixed inset-0 z-[9999] flex items-center justify-center animate-in fade-in duration-200">
|
|
59
|
-
{/* Background Dar Overlay */}
|
|
60
|
-
<div className="absolute inset-0 bg-[#0a0a0f]/95 backdrop-blur-md" onClick={onClose} />
|
|
61
|
-
|
|
62
|
-
{/* Kapat Butonu */}
|
|
63
|
-
<button onClick={onClose} className="absolute top-4 md:top-6 right-4 md:right-6 text-white/50 hover:text-white bg-white/10 hover:bg-white/20 p-2.5 md:p-3 rounded-full transition-all z-[10001] border border-white/10 active:scale-90">
|
|
64
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
65
|
-
</button>
|
|
66
|
-
|
|
67
|
-
{/* İndeks Sayacı */}
|
|
68
|
-
{media.length > 1 && (
|
|
69
|
-
<div className="absolute top-4 md:top-6 left-4 md:left-6 text-white bg-white/10 px-4 py-1.5 rounded-full font-black text-[10px] tracking-widest z-[10001] border border-white/10 backdrop-blur-md uppercase">
|
|
70
|
-
{currentIndex + 1} / {media.length}
|
|
71
|
-
</div>
|
|
72
|
-
)}
|
|
73
|
-
|
|
74
|
-
{/* Sol Gezinme Oku */}
|
|
75
|
-
{media.length > 1 && (
|
|
76
|
-
<button onClick={(e) => handlePrev(e)} className="absolute left-4 md:left-8 top-1/2 -translate-y-1/2 text-white/40 hover:text-white bg-white/5 hover:bg-white/10 p-4 md:p-5 rounded-full transition-all z-[10001] border border-transparent hover:border-white/10 backdrop-blur-md group active:scale-90">
|
|
77
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" className="group-hover:-translate-x-0.5 transition-transform"><polyline points="15 18 9 12 15 6"></polyline></svg>
|
|
78
|
-
</button>
|
|
79
|
-
)}
|
|
80
|
-
|
|
81
|
-
{/* Sağ Gezinme Oku */}
|
|
82
|
-
{media.length > 1 && (
|
|
83
|
-
<button onClick={(e) => handleNext(e)} className="absolute right-4 md:right-8 top-1/2 -translate-y-1/2 text-white/40 hover:text-white bg-white/5 hover:bg-white/10 p-4 md:p-5 rounded-full transition-all z-[10001] border border-transparent hover:border-white/10 backdrop-blur-md group active:scale-90">
|
|
84
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" className="group-hover:translate-x-0.5 transition-transform"><polyline points="9 18 15 12 9 6"></polyline></svg>
|
|
85
|
-
</button>
|
|
86
|
-
)}
|
|
87
|
-
|
|
88
|
-
{/* Medya Render Motoru */}
|
|
89
|
-
<div className="relative w-full h-full max-w-7xl max-h-[92vh] flex items-center justify-center p-4 md:p-12 z-[10000]" onClick={onClose}>
|
|
90
|
-
{currentMedia.type === 'video' ? (
|
|
91
|
-
// eslint-disable-next-line jsx-a11y/media-has-caption
|
|
92
|
-
<video
|
|
93
|
-
src={currentMedia.url}
|
|
94
|
-
controls
|
|
95
|
-
autoPlay
|
|
96
|
-
className="max-w-full max-h-full rounded-2xl shadow-[0_0_80px_rgba(0,0,0,0.8)] object-contain animate-in zoom-in-95 duration-500 ring-1 ring-white/10"
|
|
97
|
-
onClick={(e) => e.stopPropagation()}
|
|
98
|
-
/>
|
|
99
|
-
) : (
|
|
100
|
-
<img
|
|
101
|
-
src={currentMedia.url}
|
|
102
|
-
alt="Galeri Medyası"
|
|
103
|
-
className="max-w-full max-h-full rounded-2xl shadow-[0_0_80px_rgba(0,0,0,0.8)] object-contain animate-in zoom-in-95 duration-500 ring-1 ring-white/10"
|
|
104
|
-
onClick={(e) => e.stopPropagation()}
|
|
105
|
-
/>
|
|
106
|
-
)}
|
|
107
|
-
</div>
|
|
108
|
-
</div>
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
return createPortal(modalContent, document.body);
|
|
112
|
-
}
|