@umituz/web-design-system 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import { useState, useEffect, useRef, useMemo } from 'react';
|
|
|
7
7
|
// @ts-ignore - react-router-dom is a peer dependency, may not be available during package build
|
|
8
8
|
import { Link, useLocation } from 'react-router-dom';
|
|
9
9
|
import React from 'react';
|
|
10
|
+
import { Show, Hide } from '../atoms';
|
|
10
11
|
import type { BaseProps } from '../../domain/types';
|
|
11
12
|
|
|
12
13
|
export interface NavItem {
|
|
@@ -92,33 +93,36 @@ export const MainNavbar = ({
|
|
|
92
93
|
</Link>
|
|
93
94
|
|
|
94
95
|
{/* Desktop Menu */}
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
96
|
+
<Show above="lg">
|
|
97
|
+
<div className="flex items-center space-x-6">
|
|
98
|
+
{navItemsMemo.map((item) => {
|
|
99
|
+
const isActive = location.pathname === item.path;
|
|
100
|
+
return (
|
|
101
|
+
<Link
|
|
102
|
+
key={item.path}
|
|
103
|
+
to={item.path}
|
|
104
|
+
className={`font-medium transition-colors transition-theme ${
|
|
105
|
+
isActive ? 'text-primary-light' : 'text-text-secondary hover:text-primary-light'
|
|
106
|
+
}`}
|
|
107
|
+
>
|
|
108
|
+
{item.name}
|
|
109
|
+
</Link>
|
|
110
|
+
);
|
|
111
|
+
})}
|
|
112
|
+
</div>
|
|
113
|
+
</Show>
|
|
111
114
|
|
|
112
115
|
{/* Actions */}
|
|
113
116
|
<div className="flex items-center gap-2 md:gap-3">
|
|
114
117
|
{/* Language Selector */}
|
|
115
|
-
<
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
<Show above="lg">
|
|
119
|
+
<div className="relative" ref={langDropdownRef}>
|
|
120
|
+
<button
|
|
121
|
+
onClick={() => setIsLangOpen(!isLangOpen)}
|
|
122
|
+
className="p-2 rounded-lg bg-bg-secondary text-text-secondary hover:text-primary-light border border-border hover:border-primary-light transition-all transition-theme"
|
|
123
|
+
title={translations.language}
|
|
124
|
+
type="button"
|
|
125
|
+
>
|
|
122
126
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
123
127
|
<path d="m5 8 6 6" />
|
|
124
128
|
<path d="m4 14 6-6 2-3" />
|
|
@@ -152,7 +156,8 @@ export const MainNavbar = ({
|
|
|
152
156
|
))}
|
|
153
157
|
</div>
|
|
154
158
|
)}
|
|
155
|
-
|
|
159
|
+
</div>
|
|
160
|
+
</Show>
|
|
156
161
|
|
|
157
162
|
{/* Theme Toggle */}
|
|
158
163
|
<button
|
|
@@ -182,46 +187,51 @@ export const MainNavbar = ({
|
|
|
182
187
|
</button>
|
|
183
188
|
|
|
184
189
|
{/* GitHub */}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
190
|
+
<Show above="lg">
|
|
191
|
+
{githubUrl && (
|
|
192
|
+
<a
|
|
193
|
+
href={githubUrl}
|
|
194
|
+
target="_blank"
|
|
195
|
+
rel="noopener noreferrer"
|
|
196
|
+
className="flex items-center gap-2 px-4 py-2 bg-bg-secondary text-text-secondary rounded-lg border border-border hover:border-primary-light hover:text-text-primary transition-all transition-theme"
|
|
197
|
+
>
|
|
198
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
|
|
199
|
+
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
|
200
|
+
</svg>
|
|
201
|
+
<span className="font-medium">{githubLabel}</span>
|
|
202
|
+
</a>
|
|
203
|
+
)}
|
|
204
|
+
</Show>
|
|
198
205
|
|
|
199
206
|
{/* Mobile Button */}
|
|
200
|
-
<
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
<
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
207
|
+
<Hide above="lg">
|
|
208
|
+
<button
|
|
209
|
+
onClick={() => setIsOpen(!isOpen)}
|
|
210
|
+
className="text-text-secondary flex"
|
|
211
|
+
type="button"
|
|
212
|
+
aria-label="Toggle menu"
|
|
213
|
+
>
|
|
214
|
+
{isOpen ? (
|
|
215
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
216
|
+
<path d="M18 6L6 18M6 6l12 12" />
|
|
217
|
+
</svg>
|
|
218
|
+
) : (
|
|
219
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
220
|
+
<line x1="4" x2="20" y1="12" y2="12" />
|
|
221
|
+
<line x1="4" x2="20" y1="6" y2="6" />
|
|
222
|
+
<line x1="4" x2="20" y1="18" y2="18" />
|
|
223
|
+
</svg>
|
|
224
|
+
)}
|
|
225
|
+
</button>
|
|
226
|
+
</Hide>
|
|
218
227
|
</div>
|
|
219
228
|
</div>
|
|
220
229
|
</div>
|
|
221
230
|
|
|
222
231
|
{/* Mobile Menu */}
|
|
223
|
-
|
|
224
|
-
|
|
232
|
+
<Hide above="lg">
|
|
233
|
+
{isOpen && (
|
|
234
|
+
<div className="bg-bg-secondary border-t border-border transition-theme">
|
|
225
235
|
<div className="px-4 py-4 space-y-2">
|
|
226
236
|
{/* Theme Toggle Mobile */}
|
|
227
237
|
<button
|
|
@@ -302,7 +312,8 @@ export const MainNavbar = ({
|
|
|
302
312
|
)}
|
|
303
313
|
</div>
|
|
304
314
|
</div>
|
|
305
|
-
|
|
315
|
+
)}
|
|
316
|
+
</Hide>
|
|
306
317
|
</nav>
|
|
307
318
|
);
|
|
308
319
|
};
|