@kids-reporter/routing-ui 0.1.0-alpha.2 → 0.1.0-alpha.4

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.
@@ -86,7 +86,7 @@ function Menu({
86
86
  {/* Menu */}
87
87
  <div
88
88
  className={cn(
89
- 'top-0 left-0 tablet:w-80 bg-white shadow-2xl ease-in-out scrollbar-thin tablet:pt-0 fixed z-1001 h-full w-full transform pt-(--mobile-header-height) transition-transform duration-300',
89
+ 'top-0 left-0 tablet:w-80 bg-white shadow-2xl ease-in-out tablet:pt-0 fixed z-1001 h-full scrollbar-thin w-full transform pt-(--mobile-header-height) transition-transform duration-300',
90
90
  isOpen ? 'translate-x-0' : '-translate-x-full'
91
91
  )}
92
92
  >
@@ -173,12 +173,12 @@ export function SearchInputSection(props: SearchInputSectionProps) {
173
173
  isFocused,
174
174
  })}
175
175
  >
176
- <h3 className="prose-p3 font-bold mb-3 text-neutral-700">熱門搜尋</h3>
176
+ <h3 className="font-bold mb-3 prose-p3 text-neutral-700">熱門搜尋</h3>
177
177
  <div className="gap-2.5 flex flex-wrap">
178
178
  {tags.map((keyword) => (
179
179
  <a
180
180
  key={keyword}
181
- className="px-3 py-1 prose-p2 font-bold cursor-pointer rounded-full bg-neutral-200 text-neutral-900 transition-colors duration-200 hover:bg-red-500 hover:text-neutral-white"
181
+ className="px-3 py-1 font-bold cursor-pointer rounded-full bg-neutral-200 prose-p2 text-neutral-900 transition-colors duration-200 hover:bg-red-500 hover:text-neutral-white"
182
182
  href={`/search?q=${encodeURIComponent(keyword)}`}
183
183
  >
184
184
  #{keyword}
@@ -285,7 +285,7 @@ export function BottomNavigation({
285
285
  <div key={item.label} className="flex items-center">
286
286
  <a
287
287
  href={item.href}
288
- className="py-1 prose-p1 font-bold! h-6 flex items-center text-neutral-900 transition-colors hover:text-red-400"
288
+ className="py-1 font-bold! h-6 flex items-center prose-p1 text-neutral-900 transition-colors hover:text-red-400"
289
289
  >
290
290
  {item.label}
291
291
  </a>
package/src/styles.css CHANGED
@@ -56,12 +56,12 @@
56
56
  --font-size-h5-large: 22px;
57
57
  --font-size-h6-large: 18px;
58
58
 
59
- --font-size-h1-small: 28px;
60
- --font-size-h2-small: 24px;
61
- --font-size-h3-small: 22px;
62
- --font-size-h4-small: 18px;
63
- --font-size-h5-small: 17px;
64
- --font-size-h6-small: 16px;
59
+ --font-size-h1-small: 32px;
60
+ --font-size-h2-small: 28px;
61
+ --font-size-h3-small: 24px;
62
+ --font-size-h4-small: 22px;
63
+ --font-size-h5-small: 20px;
64
+ --font-size-h6-small: 18px;
65
65
 
66
66
  --font-size-p1: 16px;
67
67
  --font-size-p2: 14px;
@@ -122,11 +122,11 @@
122
122
  /* Updated color palette using design system */
123
123
  --paletteColor1: var(--color-blue-400);
124
124
  --paletteColor2: var(--color-blue-600);
125
- --paletteColor3: var(--color-neutral-gray-700);
126
- --paletteColor4: var(--color-neutral-gray-900);
125
+ --paletteColor3: var(--color-neutral-700);
126
+ --paletteColor4: var(--color-neutral-900);
127
127
  --paletteColor5: var(--color-red-400);
128
128
  --paletteColor6: var(--color-yellow-400);
129
- --paletteColor7: var(--color-neutral-gray-200);
129
+ --paletteColor7: var(--color-neutral-200);
130
130
  --paletteColor8: var(--color-neutral-white);
131
131
  --color: var(--paletteColor3);
132
132
  }
@@ -134,120 +134,6 @@
134
134
  /* Design System CSS Variables for compatibility */
135
135
  @layer base {
136
136
  :root {
137
- /* Colors - Neutral */
138
- --color-neutral-white: #ffffff;
139
- --color-neutral-gray-100: #f8f8f8;
140
- --color-neutral-gray-200: #eaeaea;
141
- --color-neutral-gray-300: #d9d9d9;
142
- --color-neutral-gray-400: #c6c6c6;
143
- --color-neutral-gray-500: #a3a3a3;
144
- --color-neutral-gray-600: #8e8e8e;
145
- --color-neutral-gray-700: #575757;
146
- --color-neutral-gray-800: #3b3b3b;
147
- --color-neutral-gray-900: #232323;
148
- --color-neutral-black: #000000;
149
- --color-neutral-border: #00000026;
150
-
151
- /* Colors - Brand Red */
152
- --color-red-100: #fff0f2;
153
- --color-red-200: #ffc4ca;
154
- --color-red-300: #ff98a2;
155
- --color-red-400: #f76977;
156
- --color-red-500: #bd4450;
157
- --color-red-600: #a0343e;
158
- --color-red-700: #82262f;
159
- --color-red-800: #651a22;
160
-
161
- /* Colors - Brand Blue */
162
- --color-blue-100: #e9f8ff;
163
- --color-blue-200: #b9e8ff;
164
- --color-blue-300: #89d9ff;
165
- --color-blue-400: #27b3f5;
166
- --color-blue-500: #1696d3;
167
- --color-blue-600: #087bb1;
168
- --color-blue-700: #00618f;
169
- --color-blue-800: #004a6d;
170
-
171
- /* Colors - Brand Yellow */
172
- --color-yellow-100: #fff9ec;
173
- --color-yellow-200: #ffedc2;
174
- --color-yellow-300: #ffe197;
175
- --color-yellow-400: #f8c341;
176
- --color-yellow-500: #d6a52d;
177
- --color-yellow-600: #b4881d;
178
- --color-yellow-700: #926c10;
179
- --color-yellow-800: #705207;
180
-
181
- /* Typography - Font Families */
182
- --font-family-noto: 'Noto Sans TC', sans-serif;
183
- --font-family-swei: 'SweiMarkerSansCJKtc-Regular', sans-serif;
184
-
185
- /* Typography - Font Sizes */
186
- --font-size-h1-large: 48px;
187
- --font-size-h2-large: 40px;
188
- --font-size-h3-large: 32px;
189
- --font-size-h4-large: 28px;
190
- --font-size-h5-large: 22px;
191
- --font-size-h6-large: 18px;
192
-
193
- --font-size-h1-small: 28px;
194
- --font-size-h2-small: 24px;
195
- --font-size-h3-small: 22px;
196
- --font-size-h4-small: 18px;
197
- --font-size-h5-small: 17px;
198
- --font-size-h6-small: 16px;
199
-
200
- --font-size-p1: 16px;
201
- --font-size-p2: 14px;
202
- --font-size-p3: 12px;
203
- --font-size-p4: 10px;
204
-
205
- /* Typography - Line Heights */
206
- --line-height-tight: 1.25;
207
- --line-height-normal: 1.6;
208
- --line-height-relaxed: 1.75;
209
-
210
- /* Typography - Letter Spacing */
211
- --letter-spacing-wide: 0.05em;
212
-
213
- /* Spacing - Grid System */
214
- --spacing-grid-xs: 4px;
215
- --spacing-grid-sm: 8px;
216
- --spacing-grid-md: 16px;
217
- --spacing-grid-lg: 24px;
218
- --spacing-grid-xl: 32px;
219
- --spacing-grid-2xl: 48px;
220
- --spacing-grid-3xl: 64px;
221
- --spacing-grid-4xl: 96px;
222
- --spacing-grid-5xl: 128px;
223
-
224
- /* Container Widths */
225
- --container-mobile: 375px;
226
- --container-tablet: 768px;
227
- --container-desktop: 1024px;
228
- --container-hd: 1440px;
229
-
230
- /* Grid Gutters */
231
- --gutter-mobile: 16px;
232
- --gutter-tablet: 24px;
233
- --gutter-desktop: 32px;
234
- --gutter-hd: 32px;
235
-
236
- /* Margins */
237
- --margin-mobile: 24px;
238
- --margin-tablet: 32px;
239
- --margin-desktop: 48px;
240
- --margin-hd: 120px;
241
-
242
- /* Responsive Breakpoints */
243
- --breakpoint-mobile: 375px;
244
- --breakpoint-tablet: 768px;
245
- --breakpoint-desktop: 1024px;
246
- --breakpoint-hd: 1440px;
247
-
248
- /* Header */
249
- --mobile-header-height: 64px;
250
-
251
137
  /* Legacy variables for backward compatibility */
252
138
  --fontFamily: var(--font-family-noto);
253
139
  --max-width: 1100px;
@@ -256,220 +142,219 @@
256
142
  /* Updated color palette using design system */
257
143
  --paletteColor1: var(--color-blue-400);
258
144
  --paletteColor2: var(--color-blue-600);
259
- --paletteColor3: var(--color-neutral-gray-700);
260
- --paletteColor4: var(--color-neutral-gray-900);
145
+ --paletteColor3: var(--color-neutral-700);
146
+ --paletteColor4: var(--color-neutral-900);
261
147
  --paletteColor5: var(--color-red-400);
262
148
  --paletteColor6: var(--color-yellow-400);
263
- --paletteColor7: var(--color-neutral-gray-200);
149
+ --paletteColor7: var(--color-neutral-200);
264
150
  --paletteColor8: var(--color-neutral-white);
265
151
  --color: var(--paletteColor3);
266
152
  }
267
153
  }
268
154
 
269
155
  @layer utilities {
270
- /* Typography Utilities - Headlines Large */
271
- .prose-h1-large {
272
- font-family: var(--font-family-noto);
273
- font-size: var(--font-size-h1-large);
274
- font-weight: 700;
275
- line-height: var(--line-height-normal);
276
- letter-spacing: var(--letter-spacing-wide);
156
+ body.no-scroll {
157
+ overflow: hidden;
277
158
  }
159
+ }
278
160
 
279
- .prose-h2-large {
280
- font-family: var(--font-family-noto);
281
- font-size: var(--font-size-h2-large);
282
- font-weight: 700;
283
- line-height: var(--line-height-normal);
284
- letter-spacing: var(--letter-spacing-wide);
285
- }
161
+ /* Typography Utilities - Headlines Large */
162
+ @utility prose-h1-large {
163
+ font-family: var(--font-family-noto);
164
+ font-size: var(--font-size-h1-large);
165
+ font-weight: 700;
166
+ line-height: var(--line-height-normal);
167
+ letter-spacing: 2.4px;
168
+ }
286
169
 
287
- .prose-h3-large {
288
- font-family: var(--font-family-noto);
289
- font-size: var(--font-size-h3-large);
290
- font-weight: 700;
291
- line-height: var(--line-height-normal);
292
- letter-spacing: var(--letter-spacing-wide);
293
- }
170
+ @utility prose-h2-large {
171
+ font-family: var(--font-family-noto);
172
+ font-size: var(--font-size-h2-large);
173
+ font-weight: 700;
174
+ line-height: var(--line-height-normal);
175
+ letter-spacing: 2px;
176
+ }
294
177
 
295
- .prose-h4-large {
296
- font-family: var(--font-family-noto);
297
- font-size: var(--font-size-h4-large);
298
- font-weight: 700;
299
- line-height: var(--line-height-normal);
300
- letter-spacing: var(--letter-spacing-wide);
301
- }
178
+ @utility prose-h3-large {
179
+ font-family: var(--font-family-noto);
180
+ font-size: var(--font-size-h3-large);
181
+ font-weight: 700;
182
+ line-height: var(--line-height-normal);
183
+ letter-spacing: 1.6px;
184
+ }
302
185
 
303
- .prose-h5-large {
304
- font-family: var(--font-family-noto);
305
- font-size: var(--font-size-h5-large);
306
- font-weight: 700;
307
- line-height: var(--line-height-normal);
308
- letter-spacing: var(--letter-spacing-wide);
309
- }
186
+ @utility prose-h4-large {
187
+ font-family: var(--font-family-noto);
188
+ font-size: var(--font-size-h4-large);
189
+ font-weight: 700;
190
+ line-height: var(--line-height-normal);
191
+ letter-spacing: 1.4px;
192
+ }
310
193
 
311
- .prose-h6-large {
312
- font-family: var(--font-family-noto);
313
- font-size: var(--font-size-h6-large);
314
- font-weight: 700;
315
- line-height: var(--line-height-normal);
316
- letter-spacing: var(--letter-spacing-wide);
317
- }
194
+ @utility prose-h5-large {
195
+ font-family: var(--font-family-noto);
196
+ font-size: var(--font-size-h5-large);
197
+ font-weight: 700;
198
+ line-height: var(--line-height-normal);
199
+ letter-spacing: 1.1px;
200
+ }
318
201
 
319
- /* Typography Utilities - Headlines Small */
320
- .prose-h1-small {
321
- font-family: var(--font-family-noto);
322
- font-size: var(--font-size-h1-small);
323
- font-weight: 700;
324
- line-height: var(--line-height-tight);
325
- letter-spacing: var(--letter-spacing-wide);
326
- }
202
+ @utility prose-h6-large {
203
+ font-family: var(--font-family-noto);
204
+ font-size: var(--font-size-h6-large);
205
+ font-weight: 700;
206
+ line-height: var(--line-height-normal);
207
+ letter-spacing: 0.9px;
208
+ }
327
209
 
328
- .prose-h2-small {
329
- font-family: var(--font-family-noto);
330
- font-size: var(--font-size-h2-small);
331
- font-weight: 700;
332
- line-height: var(--line-height-tight);
333
- letter-spacing: var(--letter-spacing-wide);
334
- }
210
+ /* Typography Utilities - Headlines Small */
211
+ @utility prose-h1-small {
212
+ font-family: var(--font-family-noto);
213
+ font-size: var(--font-size-h1-small);
214
+ font-weight: 700;
215
+ line-height: var(--line-height-normal);
216
+ letter-spacing: 1.6px;
217
+ }
335
218
 
336
- .prose-h3-small {
337
- font-family: var(--font-family-noto);
338
- font-size: var(--font-size-h3-small);
339
- font-weight: 700;
340
- line-height: var(--line-height-normal);
341
- letter-spacing: var(--letter-spacing-wide);
342
- }
219
+ @utility prose-h2-small {
220
+ font-family: var(--font-family-noto);
221
+ font-size: var(--font-size-h2-small);
222
+ font-weight: 700;
223
+ line-height: var(--line-height-normal);
224
+ letter-spacing: 1.4px;
225
+ }
343
226
 
344
- .prose-h4-small {
345
- font-family: var(--font-family-noto);
346
- font-size: var(--font-size-h4-small);
347
- font-weight: 700;
348
- line-height: var(--line-height-normal);
349
- letter-spacing: var(--letter-spacing-wide);
350
- }
227
+ @utility prose-h3-small {
228
+ font-family: var(--font-family-noto);
229
+ font-size: var(--font-size-h3-small);
230
+ font-weight: 700;
231
+ line-height: var(--line-height-normal);
232
+ letter-spacing: 1.2px;
233
+ }
351
234
 
352
- .prose-h5-small {
353
- font-family: var(--font-family-noto);
354
- font-size: var(--font-size-h5-small);
355
- font-weight: 700;
356
- line-height: var(--line-height-normal);
357
- letter-spacing: var(--letter-spacing-wide);
358
- }
235
+ @utility prose-h4-small {
236
+ font-family: var(--font-family-noto);
237
+ font-size: var(--font-size-h4-small);
238
+ font-weight: 700;
239
+ line-height: var(--line-height-normal);
240
+ letter-spacing: 1.1px;
241
+ }
359
242
 
360
- .prose-h6-small {
361
- font-family: var(--font-family-noto);
362
- font-size: var(--font-size-h6-small);
363
- font-weight: 700;
364
- line-height: var(--line-height-normal);
365
- letter-spacing: var(--letter-spacing-wide);
366
- }
243
+ @utility prose-h5-small {
244
+ font-family: var(--font-family-noto);
245
+ font-size: var(--font-size-h5-small);
246
+ font-weight: 700;
247
+ line-height: var(--line-height-normal);
248
+ letter-spacing: 1px;
249
+ }
367
250
 
368
- /* Typography Utilities - Paragraphs */
369
- .prose-p1 {
370
- font-family: var(--font-family-noto);
371
- font-size: var(--font-size-p1);
372
- font-weight: 500;
373
- line-height: var(--line-height-normal);
374
- letter-spacing: var(--letter-spacing-wide);
375
- }
251
+ @utility prose-h6-small {
252
+ font-family: var(--font-family-noto);
253
+ font-size: var(--font-size-h6-small);
254
+ font-weight: 700;
255
+ line-height: var(--line-height-normal);
256
+ letter-spacing: 0.9px;
257
+ }
376
258
 
377
- .prose-p1-bold {
378
- font-family: var(--font-family-noto);
379
- font-size: var(--font-size-p1);
380
- font-weight: 700;
381
- line-height: var(--line-height-normal);
382
- letter-spacing: var(--letter-spacing-wide);
383
- }
259
+ /* Typography Utilities - Paragraphs */
260
+ @utility prose-p1 {
261
+ font-family: var(--font-family-noto);
262
+ font-size: var(--font-size-p1);
263
+ font-weight: 500;
264
+ line-height: var(--line-height-normal);
265
+ letter-spacing: 0.8px;
266
+ }
384
267
 
385
- .prose-p2 {
386
- font-family: var(--font-family-noto);
387
- font-size: var(--font-size-p2);
388
- font-weight: 500;
389
- line-height: var(--line-height-normal);
390
- letter-spacing: var(--letter-spacing-wide);
391
- }
268
+ @utility prose-p1-bold {
269
+ font-family: var(--font-family-noto);
270
+ font-size: var(--font-size-p1);
271
+ font-weight: 700;
272
+ line-height: var(--line-height-normal);
273
+ letter-spacing: 0.8px;
274
+ }
392
275
 
393
- .prose-p2-bold {
394
- font-family: var(--font-family-noto);
395
- font-size: var(--font-size-p2);
396
- font-weight: 700;
397
- line-height: var(--line-height-normal);
398
- letter-spacing: var(--letter-spacing-wide);
399
- }
276
+ @utility prose-p2 {
277
+ font-family: var(--font-family-noto);
278
+ font-size: var(--font-size-p2);
279
+ font-weight: 500;
280
+ line-height: var(--line-height-normal);
281
+ letter-spacing: 0.7px;
282
+ }
400
283
 
401
- .prose-p3 {
402
- font-family: var(--font-family-noto);
403
- font-size: var(--font-size-p3);
404
- font-weight: 500;
405
- line-height: var(--line-height-normal);
406
- letter-spacing: var(--letter-spacing-wide);
407
- }
284
+ @utility prose-p2-bold {
285
+ font-family: var(--font-family-noto);
286
+ font-size: var(--font-size-p2);
287
+ font-weight: 700;
288
+ line-height: var(--line-height-normal);
289
+ letter-spacing: 0.7px;
290
+ }
408
291
 
409
- .prose-p3-bold {
410
- font-family: var(--font-family-noto);
411
- font-size: var(--font-size-p3);
412
- font-weight: 700;
413
- line-height: var(--line-height-normal);
414
- letter-spacing: var(--letter-spacing-wide);
415
- }
292
+ @utility prose-p3 {
293
+ font-family: var(--font-family-noto);
294
+ font-size: var(--font-size-p3);
295
+ font-weight: 500;
296
+ line-height: var(--line-height-normal);
297
+ letter-spacing: 0.6px;
298
+ }
416
299
 
417
- .prose-p4 {
418
- font-family: var(--font-family-noto);
419
- font-size: var(--font-size-p4);
420
- font-weight: 500;
421
- line-height: var(--line-height-normal);
422
- letter-spacing: var(--letter-spacing-wide);
423
- }
300
+ @utility prose-p3-bold {
301
+ font-family: var(--font-family-noto);
302
+ font-size: var(--font-size-p3);
303
+ font-weight: 700;
304
+ line-height: var(--line-height-normal);
305
+ letter-spacing: 0.6px;
306
+ }
424
307
 
425
- .prose-p4-bold {
426
- font-family: var(--font-family-noto);
427
- font-size: var(--font-size-p4);
428
- font-weight: 700;
429
- line-height: var(--line-height-normal);
430
- letter-spacing: var(--letter-spacing-wide);
431
- }
308
+ @utility prose-p4 {
309
+ font-family: var(--font-family-noto);
310
+ font-size: var(--font-size-p4);
311
+ font-weight: 500;
312
+ line-height: var(--line-height-normal);
313
+ letter-spacing: 0.5px;
314
+ }
432
315
 
433
- /* Swei Marker Sans Font Variants */
434
- .font-swei {
435
- font-family: var(--font-family-swei);
436
- }
316
+ @utility prose-p4-bold {
317
+ font-family: var(--font-family-noto);
318
+ font-size: var(--font-size-p4);
319
+ font-weight: 700;
320
+ line-height: var(--line-height-normal);
321
+ letter-spacing: 0.5px;
322
+ }
437
323
 
438
- /* Theme Color Utilities */
439
- .theme-red {
440
- --theme-color: var(--color-red-400);
441
- }
442
- .theme-yellow {
443
- --theme-color: var(--color-yellow-400);
444
- }
445
- .theme-blue {
446
- --theme-color: var(--color-blue-400);
447
- }
324
+ /* Swei Marker Sans Font Variants */
325
+ @utility font-swei {
326
+ font-family: var(--font-family-swei);
327
+ }
448
328
 
449
- /* Custom Scrollbar Utilities */
450
- .scrollbar-thin {
451
- scrollbar-width: thin;
452
- scrollbar-color: var(--color-neutral-gray-300) transparent;
453
- }
329
+ @utility scrollbar-thin {
330
+ scrollbar-width: thin;
331
+ scrollbar-color: var(--color-neutral-300) transparent;
454
332
 
455
- .scrollbar-thin::-webkit-scrollbar {
333
+ &::-webkit-scrollbar {
456
334
  width: 6px;
457
335
  }
458
336
 
459
- .scrollbar-thin::-webkit-scrollbar-track {
337
+ &::-webkit-scrollbar-track {
460
338
  background: transparent;
461
339
  }
462
340
 
463
- .scrollbar-thin::-webkit-scrollbar-thumb {
341
+ &::-webkit-scrollbar-thumb {
464
342
  background: transparent;
465
343
  border-radius: 3px;
466
344
  }
467
345
 
468
- .scrollbar-thin::-webkit-scrollbar-thumb:hover {
346
+ &::-webkit-scrollbar-thumb:hover {
469
347
  background: transparent;
470
348
  }
349
+ }
471
350
 
472
- body.no-scroll {
473
- overflow: hidden;
474
- }
351
+ /* Theme Color Utilities */
352
+ @utility theme-red {
353
+ --theme-color: var(--color-red-400);
354
+ }
355
+ @utility theme-yellow {
356
+ --theme-color: var(--color-yellow-400);
357
+ }
358
+ @utility theme-blue {
359
+ --theme-color: var(--color-blue-400);
475
360
  }