@adlas/create-app 1.0.50 → 1.0.51
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
|
@@ -11,25 +11,19 @@ This document provides comprehensive guidelines for converting Figma designs to
|
|
|
11
11
|
**❌ NEVER use screenshots** - Screenshots lose design data, measurements, and context
|
|
12
12
|
|
|
13
13
|
**✅ ALWAYS use Figma MCP server with node links**:
|
|
14
|
-
|
|
15
14
|
```typescript
|
|
16
15
|
// Use get_design_context tool with node-id from Figma URL
|
|
17
16
|
// Example URL: https://figma.com/design/:fileKey/:fileName?node-id=8486-1580
|
|
18
17
|
// Extract node-id: 8486-1580 → use as: "8486:1580"
|
|
19
18
|
|
|
20
|
-
mcp__figma
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
nodeId: "8486:1580",
|
|
26
|
-
clientLanguages: "typescript",
|
|
27
|
-
clientFrameworks: "react,nextjs",
|
|
28
|
-
});
|
|
19
|
+
mcp__figma-dev-mode-mcp-server__get_design_context({
|
|
20
|
+
nodeId: "8486:1580",
|
|
21
|
+
clientLanguages: "typescript",
|
|
22
|
+
clientFrameworks: "react,nextjs"
|
|
23
|
+
})
|
|
29
24
|
```
|
|
30
25
|
|
|
31
26
|
**Benefits of using Figma MCP**:
|
|
32
|
-
|
|
33
27
|
- ✅ Get exact measurements, colors, and spacing
|
|
34
28
|
- ✅ Access design tokens and styles
|
|
35
29
|
- ✅ See component structure and hierarchy
|
|
@@ -59,7 +53,6 @@ mcp__figma -
|
|
|
59
53
|
### CRITICAL: Component Styles Must Be Configured, Not Inline
|
|
60
54
|
|
|
61
55
|
**❌ WRONG - Inline component styles**:
|
|
62
|
-
|
|
63
56
|
```tsx
|
|
64
57
|
// DON'T: Apply component-specific styles inline via className
|
|
65
58
|
<Button className="h-10 rounded-full bg-[#19ffa3] px-4 text-sm text-black">
|
|
@@ -76,7 +69,6 @@ mcp__figma -
|
|
|
76
69
|
```
|
|
77
70
|
|
|
78
71
|
**✅ CORRECT - Use props and configured variants**:
|
|
79
|
-
|
|
80
72
|
```tsx
|
|
81
73
|
// Step 1: Configure variants in component wrapper
|
|
82
74
|
// File: src/components/ui/Button.tsx
|
|
@@ -121,7 +113,6 @@ import { Button } from '@/components/ui';
|
|
|
121
113
|
```
|
|
122
114
|
|
|
123
115
|
**Component Style Rules**:
|
|
124
|
-
|
|
125
116
|
- ✅ **Configure in wrapper**: All component-specific styles (height, padding, colors, text size)
|
|
126
117
|
- ✅ **Set defaultVariants**: Define defaults in wrapper so you don't repeat them in usage
|
|
127
118
|
- ✅ **Use theme colors**: `bg-primary`, `bg-secondary`, `bg-success`, `bg-danger`, `bg-warning` from hero.ts
|
|
@@ -134,7 +125,6 @@ import { Button } from '@/components/ui';
|
|
|
134
125
|
- ❌ **NEVER repeat defaultVariants**: Don't specify `size="md"` if `md` is already the default
|
|
135
126
|
|
|
136
127
|
**Color Usage Rules**:
|
|
137
|
-
|
|
138
128
|
```tsx
|
|
139
129
|
// ✅ CORRECT - Use theme colors from hero.ts or globals.css
|
|
140
130
|
color: {
|
|
@@ -156,7 +146,6 @@ secondary, success, danger, warning, default, foreground, background
|
|
|
156
146
|
```
|
|
157
147
|
|
|
158
148
|
**What goes where**:
|
|
159
|
-
|
|
160
149
|
```tsx
|
|
161
150
|
// In Button.tsx configuration:
|
|
162
151
|
const Button = extendVariants(HerouiButton, {
|
|
@@ -200,7 +189,6 @@ import { Icon } from '@/components/ui';
|
|
|
200
189
|
### Data Must Be Mapped from Constants
|
|
201
190
|
|
|
202
191
|
**❌ WRONG - Hardcoded data**:
|
|
203
|
-
|
|
204
192
|
```tsx
|
|
205
193
|
<DropdownMenu>
|
|
206
194
|
<DropdownItem key="option1">Option 1</DropdownItem>
|
|
@@ -210,17 +198,16 @@ import { Icon } from '@/components/ui';
|
|
|
210
198
|
```
|
|
211
199
|
|
|
212
200
|
**✅ CORRECT - Map from constants**:
|
|
213
|
-
|
|
214
201
|
```tsx
|
|
215
202
|
// File: src/config/menuOptions.ts
|
|
216
203
|
export const productMenuItems = [
|
|
217
|
-
{ key:
|
|
218
|
-
{ key:
|
|
219
|
-
{ key:
|
|
204
|
+
{ key: 'analytics', labelKey: 'product.analytics', href: '/analytics' },
|
|
205
|
+
{ key: 'insights', labelKey: 'product.insights', href: '/insights' },
|
|
206
|
+
{ key: 'reports', labelKey: 'product.reports', href: '/reports' },
|
|
220
207
|
];
|
|
221
208
|
|
|
222
209
|
// Usage:
|
|
223
|
-
import { productMenuItems } from
|
|
210
|
+
import { productMenuItems } from '@/config/menuOptions';
|
|
224
211
|
|
|
225
212
|
<DropdownMenu>
|
|
226
213
|
{productMenuItems.map((item) => (
|
|
@@ -228,7 +215,7 @@ import { productMenuItems } from "@/config/menuOptions";
|
|
|
228
215
|
{t(item.labelKey)}
|
|
229
216
|
</DropdownItem>
|
|
230
217
|
))}
|
|
231
|
-
</DropdownMenu
|
|
218
|
+
</DropdownMenu>
|
|
232
219
|
```
|
|
233
220
|
|
|
234
221
|
---
|
|
@@ -236,14 +223,11 @@ import { productMenuItems } from "@/config/menuOptions";
|
|
|
236
223
|
## 🎨 Component Priority & Usage Strategy
|
|
237
224
|
|
|
238
225
|
### 1. Check HeroUI First
|
|
239
|
-
|
|
240
226
|
Before creating ANY component, check if HeroUI provides it:
|
|
241
|
-
|
|
242
227
|
- **HeroUI Documentation**: https://heroui.com/docs/components
|
|
243
228
|
- **HeroUI Figma Kit**: https://www.figma.com/design/kFGcjHsNKZx7zh2NxEJXYt/HeroUI-Figma-Kit--Community---Community-
|
|
244
229
|
|
|
245
230
|
### 2. Component Selection Flow
|
|
246
|
-
|
|
247
231
|
```
|
|
248
232
|
1. Does HeroUI have this component?
|
|
249
233
|
→ YES: Use HeroUI component (via @/components/ui wrapper if exists)
|
|
@@ -259,7 +243,6 @@ Before creating ANY component, check if HeroUI provides it:
|
|
|
259
243
|
```
|
|
260
244
|
|
|
261
245
|
### 3. Example Decision Tree
|
|
262
|
-
|
|
263
246
|
```tsx
|
|
264
247
|
// Need a Button?
|
|
265
248
|
import { Button } from '@/components/ui'; // ✅ Use HeroUI Button wrapper
|
|
@@ -278,12 +261,10 @@ import { Input } from '@/components/ui'; // ✅ Use HeroUI Input wrapper
|
|
|
278
261
|
## 📁 Project Structure
|
|
279
262
|
|
|
280
263
|
### Pages Location
|
|
281
|
-
|
|
282
264
|
- **With i18n**: `src/app/[locale]/(route-group)/page.tsx`
|
|
283
265
|
- **Without i18n**: `src/app/(route-group)/page.tsx`
|
|
284
266
|
|
|
285
267
|
### Components Location
|
|
286
|
-
|
|
287
268
|
```
|
|
288
269
|
src/components/
|
|
289
270
|
├── ui/ # Reusable UI components (HeroUI wrappers)
|
|
@@ -293,7 +274,6 @@ src/components/
|
|
|
293
274
|
```
|
|
294
275
|
|
|
295
276
|
### Styling
|
|
296
|
-
|
|
297
277
|
- **Global styles**: `src/styles/globals.css`
|
|
298
278
|
- **Theme config**: `src/styles/hero.ts`
|
|
299
279
|
- **Approach**: Tailwind CSS utility classes ONLY
|
|
@@ -306,7 +286,6 @@ src/components/
|
|
|
306
286
|
### Navigation Components
|
|
307
287
|
|
|
308
288
|
#### Navbar (HeroUI)
|
|
309
|
-
|
|
310
289
|
**CRITICAL**: Always use HeroUI Navbar component for navigation bars:
|
|
311
290
|
|
|
312
291
|
```tsx
|
|
@@ -318,8 +297,8 @@ import {
|
|
|
318
297
|
NavbarMenu,
|
|
319
298
|
NavbarMenuItem,
|
|
320
299
|
NavbarMenuToggle,
|
|
321
|
-
} from
|
|
322
|
-
import { Button } from
|
|
300
|
+
} from '@heroui/react';
|
|
301
|
+
import { Button } from '@/components/ui';
|
|
323
302
|
|
|
324
303
|
<Navbar maxWidth="full" className="bg-black border-b-2">
|
|
325
304
|
{/* Logo */}
|
|
@@ -330,16 +309,14 @@ import { Button } from "@/components/ui";
|
|
|
330
309
|
{/* Desktop Menu */}
|
|
331
310
|
<NavbarContent className="hidden lg:flex" justify="center">
|
|
332
311
|
<NavbarItem>
|
|
333
|
-
<Button variant="light">Menu Item</Button>{"
|
|
334
|
-
{/* size="md" omitted - it's default */}
|
|
312
|
+
<Button variant="light">Menu Item</Button> {/* size="md" omitted - it's default */}
|
|
335
313
|
</NavbarItem>
|
|
336
314
|
</NavbarContent>
|
|
337
315
|
|
|
338
316
|
{/* CTA */}
|
|
339
317
|
<NavbarContent className="hidden lg:flex" justify="end">
|
|
340
318
|
<NavbarItem>
|
|
341
|
-
<Button color="primary">CTA</Button>{"
|
|
342
|
-
{/* size="md" omitted - it's default */}
|
|
319
|
+
<Button color="primary">CTA</Button> {/* size="md" omitted - it's default */}
|
|
343
320
|
</NavbarItem>
|
|
344
321
|
</NavbarContent>
|
|
345
322
|
|
|
@@ -349,16 +326,13 @@ import { Button } from "@/components/ui";
|
|
|
349
326
|
{/* Mobile Menu */}
|
|
350
327
|
<NavbarMenu>
|
|
351
328
|
<NavbarMenuItem>
|
|
352
|
-
<Button variant="light" fullWidth>
|
|
353
|
-
Menu Item
|
|
354
|
-
</Button>
|
|
329
|
+
<Button variant="light" fullWidth>Menu Item</Button>
|
|
355
330
|
</NavbarMenuItem>
|
|
356
331
|
</NavbarMenu>
|
|
357
|
-
</Navbar
|
|
332
|
+
</Navbar>
|
|
358
333
|
```
|
|
359
334
|
|
|
360
335
|
**Key Points**:
|
|
361
|
-
|
|
362
336
|
- ✅ Use `Navbar` from `@heroui/react`
|
|
363
337
|
- ✅ Use `Button` from `@/components/ui` for menu items
|
|
364
338
|
- ✅ Use props (`color`, `size`, `variant`) NOT className for styles
|
|
@@ -366,11 +340,9 @@ import { Button } from "@/components/ui";
|
|
|
366
340
|
- ❌ DON'T use custom `<header>` or `<nav>` tags
|
|
367
341
|
|
|
368
342
|
### Form Components
|
|
369
|
-
|
|
370
343
|
All located in `src/components/ui/`:
|
|
371
344
|
|
|
372
345
|
#### Input Fields
|
|
373
|
-
|
|
374
346
|
```tsx
|
|
375
347
|
import { Input, PasswordInput, NumberInput, Textarea } from '@/components/ui';
|
|
376
348
|
|
|
@@ -406,7 +378,6 @@ import { Input, PasswordInput, NumberInput, Textarea } from '@/components/ui';
|
|
|
406
378
|
```
|
|
407
379
|
|
|
408
380
|
#### Selection Components
|
|
409
|
-
|
|
410
381
|
```tsx
|
|
411
382
|
import { Select, RadioGroup, Checkbox, Autocomplete } from '@/components/ui';
|
|
412
383
|
|
|
@@ -439,18 +410,16 @@ import { Select, RadioGroup, Checkbox, Autocomplete } from '@/components/ui';
|
|
|
439
410
|
```
|
|
440
411
|
|
|
441
412
|
#### Date & Time
|
|
442
|
-
|
|
443
413
|
```tsx
|
|
444
|
-
import { DatePicker } from
|
|
414
|
+
import { DatePicker } from '@/components/ui';
|
|
445
415
|
|
|
446
416
|
<DatePicker
|
|
447
417
|
label="Select Date"
|
|
448
418
|
placeholderValue={new CalendarDate(2024, 1, 1)}
|
|
449
|
-
|
|
419
|
+
/>
|
|
450
420
|
```
|
|
451
421
|
|
|
452
422
|
#### Buttons
|
|
453
|
-
|
|
454
423
|
```tsx
|
|
455
424
|
import { Button } from '@/components/ui';
|
|
456
425
|
|
|
@@ -468,7 +437,6 @@ import { Button } from '@/components/ui';
|
|
|
468
437
|
```
|
|
469
438
|
|
|
470
439
|
#### Other Components
|
|
471
|
-
|
|
472
440
|
```tsx
|
|
473
441
|
import { Modal, Chip, Breadcrumbs, Tabs, Icon } from '@/components/ui';
|
|
474
442
|
|
|
@@ -508,27 +476,23 @@ import { Modal, Chip, Breadcrumbs, Tabs, Icon } from '@/components/ui';
|
|
|
508
476
|
**CRITICAL WORKFLOW**: Icons must follow this exact process:
|
|
509
477
|
|
|
510
478
|
#### Step 1: Export SVG from Figma
|
|
511
|
-
|
|
512
479
|
1. Select the icon in Figma design
|
|
513
480
|
2. Export as SVG (not PNG/JPG)
|
|
514
481
|
3. Download the SVG file
|
|
515
482
|
|
|
516
483
|
#### Step 2: Place in Icons Folder
|
|
517
|
-
|
|
518
484
|
```bash
|
|
519
485
|
# Place SVG file in src/assets/icons/
|
|
520
486
|
mv downloaded-icon.svg src/assets/icons/icon-name.svg
|
|
521
487
|
```
|
|
522
488
|
|
|
523
489
|
#### Step 3: Generate React Components
|
|
524
|
-
|
|
525
490
|
```bash
|
|
526
491
|
# Run the icon generation script
|
|
527
492
|
pnpm generate-icons
|
|
528
493
|
```
|
|
529
494
|
|
|
530
495
|
This command will:
|
|
531
|
-
|
|
532
496
|
- Convert all SVG files in `src/assets/icons/` to React components
|
|
533
497
|
- Place them in `src/components/icons/`
|
|
534
498
|
- Auto-format and lint the generated code
|
|
@@ -548,7 +512,6 @@ import { Icon } from '@/components/ui';
|
|
|
548
512
|
```
|
|
549
513
|
|
|
550
514
|
**❌ WRONG USAGE - DO NOT import individual icon components**:
|
|
551
|
-
|
|
552
515
|
```tsx
|
|
553
516
|
// ❌ WRONG - Don't import and use individual icon components
|
|
554
517
|
import { ChevronDownIcon, CloseIcon } from '@/components/icons';
|
|
@@ -557,7 +520,6 @@ import { ChevronDownIcon, CloseIcon } from '@/components/icons';
|
|
|
557
520
|
```
|
|
558
521
|
|
|
559
522
|
**Available Icons** (auto-generated):
|
|
560
|
-
|
|
561
523
|
- ChevronDownIcon, ChevronRightIcon
|
|
562
524
|
- CloseIcon, MenuIcon
|
|
563
525
|
- EyeIcon, EyeSlashIcon
|
|
@@ -567,13 +529,11 @@ import { ChevronDownIcon, CloseIcon } from '@/components/icons';
|
|
|
567
529
|
- And more...
|
|
568
530
|
|
|
569
531
|
**Icon Names**:
|
|
570
|
-
|
|
571
532
|
- Icon names are PascalCase with "Icon" suffix (e.g., `ChevronDownIcon`)
|
|
572
533
|
- Generated from SVG filename: `chevron-down.svg` → component `ChevronDownIcon`
|
|
573
534
|
- The Icon component uses the exact component name from `@/components/icons`
|
|
574
535
|
|
|
575
536
|
**❌ DO NOT**:
|
|
576
|
-
|
|
577
537
|
- Import individual icon components directly
|
|
578
538
|
- Use kebab-case names (use `ChevronDownIcon` not `chevron-down`)
|
|
579
539
|
- Use Lucide, Font Awesome, or other icon libraries
|
|
@@ -582,7 +542,6 @@ import { ChevronDownIcon, CloseIcon } from '@/components/icons';
|
|
|
582
542
|
- Hardcode SVG paths directly in components
|
|
583
543
|
|
|
584
544
|
**✅ DO**:
|
|
585
|
-
|
|
586
545
|
- Always use `<Icon name="IconName" />` pattern with PascalCase
|
|
587
546
|
- Always export from Figma as SVG
|
|
588
547
|
- Use `pnpm generate-icons` to create components
|
|
@@ -595,7 +554,6 @@ import { ChevronDownIcon, CloseIcon } from '@/components/icons';
|
|
|
595
554
|
#### Step 1: Check Existing Images First
|
|
596
555
|
|
|
597
556
|
**BEFORE implementing or exporting from Figma**:
|
|
598
|
-
|
|
599
557
|
1. Check `public/images/index.ts` to see if the image/logo already exists
|
|
600
558
|
2. Check `public/images/logos/` directory for available logo files
|
|
601
559
|
3. Only export from Figma if the asset doesn't exist
|
|
@@ -607,19 +565,16 @@ ls public/images/logos/
|
|
|
607
565
|
```
|
|
608
566
|
|
|
609
567
|
**Why this matters**:
|
|
610
|
-
|
|
611
568
|
- Avoid duplicate assets
|
|
612
569
|
- User may have already exported the assets
|
|
613
570
|
- Maintain consistency with existing naming conventions
|
|
614
571
|
|
|
615
572
|
#### Step 2: Export from Figma (if needed)
|
|
616
|
-
|
|
617
573
|
1. **For logos**: Export as SVG (preferred) or PNG if source is raster
|
|
618
574
|
2. **For images**: Export as PNG, JPG, or WebP based on image type
|
|
619
575
|
3. Use appropriate resolution (2x or 3x for retina displays)
|
|
620
576
|
|
|
621
577
|
#### Step 3: Place in Public Folder
|
|
622
|
-
|
|
623
578
|
```bash
|
|
624
579
|
# Place logo/image files in public/
|
|
625
580
|
public/
|
|
@@ -645,36 +600,36 @@ public/
|
|
|
645
600
|
*/
|
|
646
601
|
|
|
647
602
|
const LOGOS = {
|
|
648
|
-
PRIMARY_CIRCLE:
|
|
649
|
-
SECONDARY_CIRCLE:
|
|
650
|
-
FULL:
|
|
651
|
-
FULL_BLACK:
|
|
652
|
-
FULL_WHITE:
|
|
653
|
-
ICON:
|
|
603
|
+
PRIMARY_CIRCLE: '/images/logos/logo-circle-primary.svg',
|
|
604
|
+
SECONDARY_CIRCLE: '/images/logos/logo-circle-secondary.svg',
|
|
605
|
+
FULL: '/images/logos/logo-full.svg',
|
|
606
|
+
FULL_BLACK: '/images/logos/logo-full-black.svg',
|
|
607
|
+
FULL_WHITE: '/images/logos/logo-full-white.svg',
|
|
608
|
+
ICON: '/images/logos/logo-icon.svg',
|
|
654
609
|
} as const;
|
|
655
610
|
|
|
656
611
|
const AUTH = {
|
|
657
|
-
LOGIN_BG:
|
|
658
|
-
SIGNUP_BG:
|
|
659
|
-
RESET_PASSWORD:
|
|
612
|
+
LOGIN_BG: '/images/auth/login-background.jpg',
|
|
613
|
+
SIGNUP_BG: '/images/auth/signup-background.jpg',
|
|
614
|
+
RESET_PASSWORD: '/images/auth/reset-password.jpg',
|
|
660
615
|
} as const;
|
|
661
616
|
|
|
662
617
|
const WEBSITE = {
|
|
663
|
-
HOME_HERO:
|
|
664
|
-
HOME_NEWSLETTER:
|
|
665
|
-
ABOUT_HEADER:
|
|
666
|
-
CONTACT_MAP:
|
|
618
|
+
HOME_HERO: '/images/website/home-hero.webp',
|
|
619
|
+
HOME_NEWSLETTER: '/images/website/home-newsletter.webp',
|
|
620
|
+
ABOUT_HEADER: '/images/website/about-header.jpg',
|
|
621
|
+
CONTACT_MAP: '/images/website/contact-map.png',
|
|
667
622
|
} as const;
|
|
668
623
|
|
|
669
624
|
const SERVICES = {
|
|
670
|
-
HEADER:
|
|
671
|
-
FEATURE_1:
|
|
672
|
-
FEATURE_2:
|
|
625
|
+
HEADER: '/images/services/services-header.webp',
|
|
626
|
+
FEATURE_1: '/images/services/feature-1.jpg',
|
|
627
|
+
FEATURE_2: '/images/services/feature-2.jpg',
|
|
673
628
|
} as const;
|
|
674
629
|
|
|
675
630
|
const PRODUCTS = {
|
|
676
|
-
THUMBNAIL_DEFAULT:
|
|
677
|
-
HERO:
|
|
631
|
+
THUMBNAIL_DEFAULT: '/images/products/thumbnail-default.png',
|
|
632
|
+
HERO: '/images/products/hero-banner.jpg',
|
|
678
633
|
} as const;
|
|
679
634
|
|
|
680
635
|
export const IMAGES = {
|
|
@@ -718,14 +673,12 @@ import Image from 'next/image';
|
|
|
718
673
|
```
|
|
719
674
|
|
|
720
675
|
**Preference Order**:
|
|
721
|
-
|
|
722
676
|
1. ✅ **SVG** - Best for logos, icons, and vector graphics (scalable, small file size)
|
|
723
677
|
2. ✅ **WebP** - Modern format for photos (smaller than PNG/JPG)
|
|
724
678
|
3. ✅ **PNG** - For images requiring transparency
|
|
725
679
|
4. ✅ **JPG** - For photos without transparency
|
|
726
680
|
|
|
727
681
|
**❌ DO NOT**:
|
|
728
|
-
|
|
729
682
|
- Put images in `src/` folder
|
|
730
683
|
- Import images as modules unless necessary
|
|
731
684
|
- Use base64 encoded images inline
|
|
@@ -733,7 +686,6 @@ import Image from 'next/image';
|
|
|
733
686
|
- Hardcode image paths directly in components (use centralized constants)
|
|
734
687
|
|
|
735
688
|
**✅ DO**:
|
|
736
|
-
|
|
737
689
|
- Always place in `public/` directory
|
|
738
690
|
- Create centralized image constants file (src/config/images.ts)
|
|
739
691
|
- Organize image paths by category (LOGOS, AUTH, WEBSITE, SERVICES)
|
|
@@ -750,30 +702,27 @@ import Image from 'next/image';
|
|
|
750
702
|
### CRITICAL: Use Theme Colors, NOT Custom Values
|
|
751
703
|
|
|
752
704
|
**Colors are defined in two places**:
|
|
753
|
-
|
|
754
705
|
1. **`src/styles/hero.ts`** - HeroUI theme colors (primary, secondary, etc.)
|
|
755
706
|
2. **`src/styles/globals.css`** - Additional custom theme colors
|
|
756
707
|
|
|
757
708
|
### Available Theme Colors
|
|
758
709
|
|
|
759
710
|
#### From hero.ts (Primary Color Palette):
|
|
760
|
-
|
|
761
711
|
```typescript
|
|
762
712
|
// Primary green shades (defined in hero.ts)
|
|
763
|
-
primary
|
|
764
|
-
primary
|
|
765
|
-
primary
|
|
766
|
-
primary
|
|
767
|
-
primary
|
|
768
|
-
primary
|
|
769
|
-
primary
|
|
770
|
-
primary
|
|
771
|
-
primary
|
|
772
|
-
primary
|
|
713
|
+
primary-50 // #E6FFF0 (lightest)
|
|
714
|
+
primary-100 // #CBFFE0
|
|
715
|
+
primary-200 // #AEFFD1
|
|
716
|
+
primary-300 // #8EFFC2
|
|
717
|
+
primary-400 // #66FFB2
|
|
718
|
+
primary-500 // #19FFA3 (default primary)
|
|
719
|
+
primary-600 // #25C780
|
|
720
|
+
primary-700 // #26915F
|
|
721
|
+
primary-800 // #215F40
|
|
722
|
+
primary-900 // #173123 (darkest)
|
|
773
723
|
```
|
|
774
724
|
|
|
775
725
|
#### HeroUI Default Colors:
|
|
776
|
-
|
|
777
726
|
```tsx
|
|
778
727
|
// Semantic colors (built into HeroUI)
|
|
779
728
|
bg-primary text-primary border-primary
|
|
@@ -789,7 +738,6 @@ bg-background text-background border-background
|
|
|
789
738
|
### Color Usage Examples
|
|
790
739
|
|
|
791
740
|
**✅ CORRECT - Use theme colors**:
|
|
792
|
-
|
|
793
741
|
```tsx
|
|
794
742
|
// In component configuration (NO hover states)
|
|
795
743
|
color: {
|
|
@@ -803,7 +751,6 @@ className="bg-primary-50 text-primary-900"
|
|
|
803
751
|
```
|
|
804
752
|
|
|
805
753
|
**❌ WRONG - Custom color values or hover states**:
|
|
806
|
-
|
|
807
754
|
```tsx
|
|
808
755
|
// DON'T use hex values or hover states in config
|
|
809
756
|
color: {
|
|
@@ -823,13 +770,11 @@ color: {
|
|
|
823
770
|
### When to Add Custom Colors
|
|
824
771
|
|
|
825
772
|
**Only add custom colors to hero.ts if**:
|
|
826
|
-
|
|
827
773
|
1. Color is NOT in the existing palette
|
|
828
774
|
2. Color is used in multiple places (reusable)
|
|
829
775
|
3. Color is part of the design system
|
|
830
776
|
|
|
831
777
|
**Steps to add custom color**:
|
|
832
|
-
|
|
833
778
|
```typescript
|
|
834
779
|
// 1. Add to hero.ts theme
|
|
835
780
|
export default heroui({
|
|
@@ -838,9 +783,9 @@ export default heroui({
|
|
|
838
783
|
colors: {
|
|
839
784
|
// Add new color palette
|
|
840
785
|
accent: {
|
|
841
|
-
50:
|
|
842
|
-
500:
|
|
843
|
-
900:
|
|
786
|
+
50: '#...',
|
|
787
|
+
500: '#...',
|
|
788
|
+
900: '#...',
|
|
844
789
|
},
|
|
845
790
|
},
|
|
846
791
|
},
|
|
@@ -848,7 +793,7 @@ export default heroui({
|
|
|
848
793
|
});
|
|
849
794
|
|
|
850
795
|
// 2. Use in components
|
|
851
|
-
className
|
|
796
|
+
className="bg-accent text-accent-900"
|
|
852
797
|
```
|
|
853
798
|
|
|
854
799
|
---
|
|
@@ -860,23 +805,21 @@ className = "bg-accent text-accent-900";
|
|
|
860
805
|
**CRITICAL**: Always use closest standard Tailwind class instead of custom arbitrary values
|
|
861
806
|
|
|
862
807
|
**Common Conversions**:
|
|
863
|
-
|
|
864
808
|
```tsx
|
|
865
809
|
// ❌ WRONG - Custom arbitrary values
|
|
866
|
-
className
|
|
867
|
-
className
|
|
868
|
-
className
|
|
869
|
-
className
|
|
810
|
+
className="h-[41px] w-[54.6px]"
|
|
811
|
+
className="p-[24px]"
|
|
812
|
+
className="text-[14px]"
|
|
813
|
+
className="gap-[11px]"
|
|
870
814
|
|
|
871
815
|
// ✅ CORRECT - Standard Tailwind classes
|
|
872
|
-
className
|
|
873
|
-
className
|
|
874
|
-
className
|
|
875
|
-
className
|
|
816
|
+
className="h-10 w-14" // h-10 = 40px, w-14 = 56px (closest to 54.6px)
|
|
817
|
+
className="p-6" // p-6 = 24px
|
|
818
|
+
className="text-sm" // text-sm = 14px
|
|
819
|
+
className="gap-3" // gap-3 = 12px (closest to 11px)
|
|
876
820
|
```
|
|
877
821
|
|
|
878
822
|
**Tailwind Size Reference**:
|
|
879
|
-
|
|
880
823
|
```css
|
|
881
824
|
/* Spacing Scale (padding, margin, gap, etc.) */
|
|
882
825
|
0.5 = 2px 4 = 16px 12 = 48px
|
|
@@ -900,13 +843,11 @@ auto, full, screen, fit, min, max
|
|
|
900
843
|
```
|
|
901
844
|
|
|
902
845
|
**Only use arbitrary values when**:
|
|
903
|
-
|
|
904
846
|
- Exact pixel value is required by design system
|
|
905
847
|
- No standard Tailwind class is close enough
|
|
906
848
|
- Using design tokens/CSS variables: `bg-[var(--custom-color)]`
|
|
907
849
|
|
|
908
850
|
**Examples**:
|
|
909
|
-
|
|
910
851
|
```tsx
|
|
911
852
|
// ✅ Good - Using standard classes
|
|
912
853
|
<div className="h-10 w-full p-6 text-sm">
|
|
@@ -916,7 +857,6 @@ auto, full, screen, fit, min, max
|
|
|
916
857
|
```
|
|
917
858
|
|
|
918
859
|
### Responsive Breakpoints (Mobile-First)
|
|
919
|
-
|
|
920
860
|
```css
|
|
921
861
|
/* Mobile */
|
|
922
862
|
4xs: 320px /* iPhone SE */
|
|
@@ -937,7 +877,6 @@ xl: 1280px /* MacBook Air */
|
|
|
937
877
|
```
|
|
938
878
|
|
|
939
879
|
### Usage Example
|
|
940
|
-
|
|
941
880
|
```tsx
|
|
942
881
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
943
882
|
{/* Mobile: 1 column, Tablet: 2 columns, Desktop: 3 columns */}
|
|
@@ -945,9 +884,7 @@ xl: 1280px /* MacBook Air */
|
|
|
945
884
|
```
|
|
946
885
|
|
|
947
886
|
### HeroUI Color System
|
|
948
|
-
|
|
949
887
|
Use these semantic colors from HeroUI theme:
|
|
950
|
-
|
|
951
888
|
- `bg-background` - Main background
|
|
952
889
|
- `bg-foreground` - Text color background
|
|
953
890
|
- `bg-default` / `bg-default-50` to `bg-default-900` - Gray scale
|
|
@@ -958,7 +895,6 @@ Use these semantic colors from HeroUI theme:
|
|
|
958
895
|
- `bg-danger` - Error/danger states
|
|
959
896
|
|
|
960
897
|
### Common Patterns
|
|
961
|
-
|
|
962
898
|
```tsx
|
|
963
899
|
// Card
|
|
964
900
|
<div className="rounded-lg bg-white p-6 shadow-md">
|
|
@@ -982,20 +918,19 @@ Use these semantic colors from HeroUI theme:
|
|
|
982
918
|
## 📝 Form Implementation with Zod
|
|
983
919
|
|
|
984
920
|
### Pattern to Follow
|
|
985
|
-
|
|
986
921
|
```tsx
|
|
987
|
-
|
|
922
|
+
'use client';
|
|
988
923
|
|
|
989
|
-
import { zodResolver } from
|
|
990
|
-
import { useForm } from
|
|
991
|
-
import { z } from
|
|
924
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
925
|
+
import { useForm } from 'react-hook-form';
|
|
926
|
+
import { z } from 'zod';
|
|
992
927
|
|
|
993
|
-
import { Button, Input } from
|
|
928
|
+
import { Button, Input } from '@/components/ui';
|
|
994
929
|
|
|
995
930
|
// 1. Define schema
|
|
996
931
|
const schema = z.object({
|
|
997
|
-
email: z.string().email(
|
|
998
|
-
password: z.string().min(8,
|
|
932
|
+
email: z.string().email('Invalid email'),
|
|
933
|
+
password: z.string().min(8, 'Password must be at least 8 characters'),
|
|
999
934
|
});
|
|
1000
935
|
|
|
1001
936
|
type FormData = z.infer<typeof schema>;
|
|
@@ -1022,7 +957,7 @@ export default function LoginForm() {
|
|
|
1022
957
|
<Input
|
|
1023
958
|
label="Email"
|
|
1024
959
|
type="email"
|
|
1025
|
-
{...register(
|
|
960
|
+
{...register('email')}
|
|
1026
961
|
errorMessage={errors.email?.message}
|
|
1027
962
|
isInvalid={!!errors.email}
|
|
1028
963
|
/>
|
|
@@ -1030,7 +965,7 @@ export default function LoginForm() {
|
|
|
1030
965
|
<Input
|
|
1031
966
|
label="Password"
|
|
1032
967
|
type="password"
|
|
1033
|
-
{...register(
|
|
968
|
+
{...register('password')}
|
|
1034
969
|
errorMessage={errors.password?.message}
|
|
1035
970
|
isInvalid={!!errors.password}
|
|
1036
971
|
/>
|
|
@@ -1052,20 +987,18 @@ export default function LoginForm() {
|
|
|
1052
987
|
### Navigation with i18n
|
|
1053
988
|
|
|
1054
989
|
**Import Guidelines**:
|
|
1055
|
-
|
|
1056
990
|
```tsx
|
|
1057
991
|
// For Link component - use Next.js Link
|
|
1058
|
-
import Link from
|
|
992
|
+
import Link from 'next/link';
|
|
1059
993
|
|
|
1060
994
|
// For navigation hooks - use next/navigation
|
|
1061
|
-
import { usePathname, useRouter } from
|
|
995
|
+
import { usePathname, useRouter } from 'next/navigation';
|
|
1062
996
|
|
|
1063
997
|
// For navigation URLs - use centralized constants
|
|
1064
|
-
import { NAVIGATION_URLS } from
|
|
998
|
+
import { NAVIGATION_URLS } from '@/config/navigationUrls';
|
|
1065
999
|
```
|
|
1066
1000
|
|
|
1067
1001
|
**Navigation Example**:
|
|
1068
|
-
|
|
1069
1002
|
```tsx
|
|
1070
1003
|
import Link from 'next/link';
|
|
1071
1004
|
import { NAVIGATION_URLS } from '@/config/navigationUrls';
|
|
@@ -1082,11 +1015,10 @@ import { Link } from '@heroui/react';
|
|
|
1082
1015
|
```
|
|
1083
1016
|
|
|
1084
1017
|
**Using Navigation Hooks**:
|
|
1085
|
-
|
|
1086
1018
|
```tsx
|
|
1087
|
-
|
|
1019
|
+
'use client';
|
|
1088
1020
|
|
|
1089
|
-
import { usePathname, useRouter } from
|
|
1021
|
+
import { usePathname, useRouter } from 'next/navigation';
|
|
1090
1022
|
|
|
1091
1023
|
export function MyComponent() {
|
|
1092
1024
|
const pathname = usePathname();
|
|
@@ -1101,9 +1033,8 @@ export function MyComponent() {
|
|
|
1101
1033
|
```
|
|
1102
1034
|
|
|
1103
1035
|
### Translations for ALL text
|
|
1104
|
-
|
|
1105
1036
|
```tsx
|
|
1106
|
-
import { useTranslations } from
|
|
1037
|
+
import { useTranslations } from 'next-intl';
|
|
1107
1038
|
|
|
1108
1039
|
function MyComponent() {
|
|
1109
1040
|
const t = useTranslations();
|
|
@@ -1111,8 +1042,8 @@ function MyComponent() {
|
|
|
1111
1042
|
return (
|
|
1112
1043
|
<div>
|
|
1113
1044
|
{/* ✅ CORRECT - Using translation key */}
|
|
1114
|
-
<h1>{t(
|
|
1115
|
-
<p>{t(
|
|
1045
|
+
<h1>{t('welcome')}</h1>
|
|
1046
|
+
<p>{t('description')}</p>
|
|
1116
1047
|
|
|
1117
1048
|
{/* ❌ WRONG - Hardcoded text */}
|
|
1118
1049
|
<h1>Welcome</h1>
|
|
@@ -1122,9 +1053,8 @@ function MyComponent() {
|
|
|
1122
1053
|
```
|
|
1123
1054
|
|
|
1124
1055
|
### Form labels, placeholders, errors - ALL must use i18n
|
|
1125
|
-
|
|
1126
1056
|
```tsx
|
|
1127
|
-
import { useTranslations } from
|
|
1057
|
+
import { useTranslations } from 'next-intl';
|
|
1128
1058
|
|
|
1129
1059
|
function LoginForm() {
|
|
1130
1060
|
const t = useTranslations();
|
|
@@ -1133,11 +1063,9 @@ function LoginForm() {
|
|
|
1133
1063
|
<form>
|
|
1134
1064
|
{/* ✅ CORRECT */}
|
|
1135
1065
|
<Input
|
|
1136
|
-
label={t(
|
|
1137
|
-
placeholder={t(
|
|
1138
|
-
errorMessage={
|
|
1139
|
-
errors.email?.message ? t(errors.email.message) : undefined
|
|
1140
|
-
}
|
|
1066
|
+
label={t('email')}
|
|
1067
|
+
placeholder={t('enterEmail')}
|
|
1068
|
+
errorMessage={errors.email?.message ? t(errors.email.message) : undefined}
|
|
1141
1069
|
/>
|
|
1142
1070
|
|
|
1143
1071
|
{/* ❌ WRONG - Hardcoded text */}
|
|
@@ -1152,7 +1080,6 @@ function LoginForm() {
|
|
|
1152
1080
|
```
|
|
1153
1081
|
|
|
1154
1082
|
### Navigation URLs Reference
|
|
1155
|
-
|
|
1156
1083
|
```tsx
|
|
1157
1084
|
import { NAVIGATION_URLS } from '@/config/navigationUrls';
|
|
1158
1085
|
|
|
@@ -1177,20 +1104,19 @@ NAVIGATION_URLS.DASHBOARD.INDEX // '/dashboard'
|
|
|
1177
1104
|
## 🎯 Data Fetching
|
|
1178
1105
|
|
|
1179
1106
|
### Using React Query
|
|
1180
|
-
|
|
1181
1107
|
```tsx
|
|
1182
|
-
|
|
1108
|
+
'use client';
|
|
1183
1109
|
|
|
1184
|
-
import { useQuery } from
|
|
1185
|
-
import axios from
|
|
1110
|
+
import { useQuery } from '@tanstack/react-query';
|
|
1111
|
+
import axios from 'axios';
|
|
1186
1112
|
|
|
1187
|
-
import { QUERY_KEYS } from
|
|
1113
|
+
import { QUERY_KEYS } from '@/libs/react-query';
|
|
1188
1114
|
|
|
1189
1115
|
export default function ProductList() {
|
|
1190
1116
|
const { data, isLoading, error } = useQuery({
|
|
1191
1117
|
queryKey: QUERY_KEYS.PRODUCTS.LIST,
|
|
1192
1118
|
queryFn: async () => {
|
|
1193
|
-
const response = await axios.get(
|
|
1119
|
+
const response = await axios.get('/api/products');
|
|
1194
1120
|
return response.data;
|
|
1195
1121
|
},
|
|
1196
1122
|
});
|
|
@@ -1213,12 +1139,11 @@ export default function ProductList() {
|
|
|
1213
1139
|
## 📐 Layout Components
|
|
1214
1140
|
|
|
1215
1141
|
### Using Existing Layouts
|
|
1216
|
-
|
|
1217
1142
|
```tsx
|
|
1218
1143
|
// Auth pages use auth layout automatically
|
|
1219
1144
|
// Location: src/app/[locale]/(auth)/login/page.tsx
|
|
1220
1145
|
|
|
1221
|
-
|
|
1146
|
+
'use client';
|
|
1222
1147
|
|
|
1223
1148
|
export default function LoginPage() {
|
|
1224
1149
|
return (
|
|
@@ -1231,14 +1156,11 @@ export default function LoginPage() {
|
|
|
1231
1156
|
```
|
|
1232
1157
|
|
|
1233
1158
|
### Navbar & Footer
|
|
1234
|
-
|
|
1235
1159
|
Already implemented in `src/components/layout/`:
|
|
1236
|
-
|
|
1237
1160
|
- `Navbar.tsx` - Main navigation using HeroUI Navbar
|
|
1238
1161
|
- `Footer.tsx` - Footer component
|
|
1239
1162
|
|
|
1240
1163
|
**CRITICAL**: Navbar uses HeroUI Navbar component:
|
|
1241
|
-
|
|
1242
1164
|
```tsx
|
|
1243
1165
|
import { Navbar } from '@/components/layout';
|
|
1244
1166
|
|
|
@@ -1248,7 +1170,6 @@ import { Navbar } from '@/components/layout';
|
|
|
1248
1170
|
```
|
|
1249
1171
|
|
|
1250
1172
|
**Implementation details** (see `src/components/layout/Navbar.tsx`):
|
|
1251
|
-
|
|
1252
1173
|
- ✅ Uses HeroUI `Navbar`, `NavbarBrand`, `NavbarContent`, `NavbarItem`
|
|
1253
1174
|
- ✅ Uses `Button` from `@/components/ui` with props (`color`, `size`, `variant`)
|
|
1254
1175
|
- ✅ All styles via props, NO className for component styles
|
|
@@ -1259,7 +1180,6 @@ import { Navbar } from '@/components/layout';
|
|
|
1259
1180
|
## ⚠️ CRITICAL RULES
|
|
1260
1181
|
|
|
1261
1182
|
### ❌ DO NOT
|
|
1262
|
-
|
|
1263
1183
|
1. ❌ **Figma**: Use screenshots to implement design - MUST use Figma MCP server with `get_design_context`
|
|
1264
1184
|
2. ❌ **Figma**: Call `get_screenshot` tool - Design context provides all needed information
|
|
1265
1185
|
3. ❌ **Icons**: Import individual icon components (e.g., `import { ChevronDownIcon }`) - MUST use `<Icon name="ChevronDownIcon" />`
|
|
@@ -1288,7 +1208,6 @@ import { Navbar } from '@/components/layout';
|
|
|
1288
1208
|
26. ❌ **Forms**: Skip form validation (always use Zod schemas)
|
|
1289
1209
|
|
|
1290
1210
|
### ✅ DO
|
|
1291
|
-
|
|
1292
1211
|
1. ✅ **Figma**: Use Figma MCP server with `get_design_context` and node-id from Figma URL
|
|
1293
1212
|
2. ✅ **Figma**: Extract node-id from URL (e.g., `node-id=8486-1580` → `"8486:1580"`)
|
|
1294
1213
|
3. ✅ **Icons**: Export SVG from Figma → `src/assets/icons/` → Run `pnpm generate-icons`
|
|
@@ -1329,7 +1248,6 @@ import { Navbar } from '@/components/layout';
|
|
|
1329
1248
|
When converting Figma to code, ensure:
|
|
1330
1249
|
|
|
1331
1250
|
### Icons & Assets
|
|
1332
|
-
|
|
1333
1251
|
- [ ] Exported icons as SVG from Figma
|
|
1334
1252
|
- [ ] Placed SVG files in `src/assets/icons/`
|
|
1335
1253
|
- [ ] Ran `pnpm generate-icons` to create React components
|
|
@@ -1344,7 +1262,6 @@ When converting Figma to code, ensure:
|
|
|
1344
1262
|
- [ ] Referenced via `IMAGES.LOGOS.PRIMARY` (not hardcoded paths)
|
|
1345
1263
|
|
|
1346
1264
|
### Component & Styling
|
|
1347
|
-
|
|
1348
1265
|
- [ ] Checked HeroUI library first for component availability
|
|
1349
1266
|
- [ ] Used HeroUI components via `src/components/ui/` wrappers (e.g., `<Button>` not `<button>`)
|
|
1350
1267
|
- [ ] Configured component styles in wrapper/theme (not inline)
|
|
@@ -1355,7 +1272,6 @@ When converting Figma to code, ensure:
|
|
|
1355
1272
|
- [ ] Mapped all data from constants (no hardcoded menu items/dropdowns)
|
|
1356
1273
|
|
|
1357
1274
|
### Content & Navigation
|
|
1358
|
-
|
|
1359
1275
|
- [ ] ALL text uses i18n translation keys (no hardcoded text)
|
|
1360
1276
|
- [ ] ALL labels use `t('labelKey')`
|
|
1361
1277
|
- [ ] ALL placeholders use `t('placeholderKey')`
|
|
@@ -1364,21 +1280,18 @@ When converting Figma to code, ensure:
|
|
|
1364
1280
|
- [ ] ALL URLs use `NAVIGATION_URLS` from config (no hardcoded URLs)
|
|
1365
1281
|
|
|
1366
1282
|
### Structure & Types
|
|
1367
|
-
|
|
1368
1283
|
- [ ] Page created in correct location (`src/app/[locale]/...`)
|
|
1369
1284
|
- [ ] Added TypeScript types for all data structures
|
|
1370
1285
|
- [ ] Used `'use client'` for interactive components
|
|
1371
1286
|
- [ ] No `any` types used
|
|
1372
1287
|
|
|
1373
1288
|
### Forms & Validation
|
|
1374
|
-
|
|
1375
1289
|
- [ ] Implemented forms with Zod validation schemas
|
|
1376
1290
|
- [ ] Form labels use i18n
|
|
1377
1291
|
- [ ] Form placeholders use i18n
|
|
1378
1292
|
- [ ] Form errors use i18n
|
|
1379
1293
|
|
|
1380
1294
|
### Responsive & States
|
|
1381
|
-
|
|
1382
1295
|
- [ ] Implemented responsive design (mobile-first)
|
|
1383
1296
|
- [ ] Added proper loading states
|
|
1384
1297
|
- [ ] Added proper error states
|
|
@@ -1391,14 +1304,12 @@ When converting Figma to code, ensure:
|
|
|
1391
1304
|
Before finalizing code, verify:
|
|
1392
1305
|
|
|
1393
1306
|
### Icons & Assets
|
|
1394
|
-
|
|
1395
1307
|
1. **Icons workflow** - All icons created via `pnpm generate-icons` (not manual)
|
|
1396
1308
|
2. **Icons source** - SVG files exist in `src/assets/icons/`
|
|
1397
1309
|
3. **Logos location** - All logos/images in `public/` directory (not `src/`)
|
|
1398
1310
|
4. **Image format** - SVG used for logos when possible (not PNG)
|
|
1399
1311
|
|
|
1400
1312
|
### Components & Styling
|
|
1401
|
-
|
|
1402
1313
|
1. **HeroUI components first** - Verify HeroUI library was checked before custom implementation
|
|
1403
1314
|
2. **No direct HeroUI imports** - Only through `@/components/ui`
|
|
1404
1315
|
3. **Component reuse** - Don't duplicate existing components
|
|
@@ -1408,20 +1319,17 @@ Before finalizing code, verify:
|
|
|
1408
1319
|
7. **Map from constants** - All menu items, dropdown options mapped from config files
|
|
1409
1320
|
|
|
1410
1321
|
### i18n & Navigation
|
|
1411
|
-
|
|
1412
1322
|
5. **Zero hardcoded text** - ALL text uses `t('key')`
|
|
1413
1323
|
6. **Zero hardcoded URLs** - ALL links use `NAVIGATION_URLS`
|
|
1414
1324
|
7. **Form fields i18n** - Labels, placeholders, errors all use translation keys
|
|
1415
1325
|
|
|
1416
1326
|
### Styling & Layout
|
|
1417
|
-
|
|
1418
1327
|
8. **Tailwind only** - No CSS modules, no styled-components
|
|
1419
1328
|
9. **HeroUI theme colors** - Use semantic colors, not arbitrary values
|
|
1420
1329
|
10. **Consistent spacing** - Use `space-y-*` and `space-x-*` utilities
|
|
1421
1330
|
11. **Mobile-first** - Base styles for mobile, then `md:`, `lg:`, etc.
|
|
1422
1331
|
|
|
1423
1332
|
### TypeScript & Validation
|
|
1424
|
-
|
|
1425
1333
|
12. **Proper TypeScript** - No `any`, all props typed
|
|
1426
1334
|
13. **Form validation** - Zod schemas for all forms
|
|
1427
1335
|
|
|
@@ -1430,7 +1338,6 @@ Before finalizing code, verify:
|
|
|
1430
1338
|
## 📚 Reference Files
|
|
1431
1339
|
|
|
1432
1340
|
When in doubt, check these example files:
|
|
1433
|
-
|
|
1434
1341
|
- **Form example**: `src/components/ui/form/Form.tsx`
|
|
1435
1342
|
- **Page example**: `src/app/[locale]/(auth)/login/page.tsx`
|
|
1436
1343
|
- **Component example**: `src/components/ui/Input.tsx`
|
|
@@ -1442,7 +1349,6 @@ When in doubt, check these example files:
|
|
|
1442
1349
|
## 🚀 Quick Reference Guide
|
|
1443
1350
|
|
|
1444
1351
|
### Icons Workflow
|
|
1445
|
-
|
|
1446
1352
|
```bash
|
|
1447
1353
|
# 1. Export SVG from Figma
|
|
1448
1354
|
# 2. Place in folder
|
|
@@ -1457,7 +1363,6 @@ import { IconIcon } from '@/components/icons';
|
|
|
1457
1363
|
```
|
|
1458
1364
|
|
|
1459
1365
|
### Logos/Images Workflow
|
|
1460
|
-
|
|
1461
1366
|
```bash
|
|
1462
1367
|
# 1. Export SVG/PNG from Figma
|
|
1463
1368
|
# 2. Place in public with organized folders
|
|
@@ -1487,7 +1392,6 @@ import { IMAGES } from '@/config/images';
|
|
|
1487
1392
|
```
|
|
1488
1393
|
|
|
1489
1394
|
### Tailwind Standard Classes
|
|
1490
|
-
|
|
1491
1395
|
```tsx
|
|
1492
1396
|
// Heights/Widths
|
|
1493
1397
|
h-10 = 40px w-14 = 56px size-5 = 20px
|
|
@@ -1507,7 +1411,6 @@ text-lg = 18px text-3xl = 30px
|
|
|
1507
1411
|
```
|
|
1508
1412
|
|
|
1509
1413
|
### Common Patterns
|
|
1510
|
-
|
|
1511
1414
|
```tsx
|
|
1512
1415
|
// Icons (auto-generated)
|
|
1513
1416
|
import { MenuIcon, CloseIcon } from '@/components/icons';
|