+ );
+}
diff --git a/components/COMPONENTS.md b/components/COMPONENTS.md
index 93b80dd..4973951 100644
--- a/components/COMPONENTS.md
+++ b/components/COMPONENTS.md
@@ -1,7 +1,7 @@
# Components Documentation
-> This project follows **Atomic Design** pattern. See `Atomic.md` at project
-> root for full structure guide.
+> This project follows **Atomic Design** pattern.
+> See `Atomic.md` at project root for full structure guide.
## Directory Structure
@@ -19,21 +19,17 @@ components/
### ProductCard (`molecules/cards/ProductCard.tsx`)
-**Description:** Product card molecule. Displays product image, name,
-description, formatted price, and a Buy button. Width is controlled by the
-parent grid (w-full).
+**Description:** Product card molecule. Displays product image, name, description, formatted price, and a Buy button. Width is controlled by the parent grid (w-full).
**Atomic level:** Molecule (composed of Button, Caption, Text atoms)
### ShopCard (`molecules/cards/ShopCard.tsx`)
-**Description:** Shop discovery card. Displays shop image, name, address, and a
-link to the menu.
+**Description:** Shop discovery card. Displays shop image, name, address, and a link to the menu.
### SearchBar (`molecules/search-bar/SearchBar.tsx`)
-**Description:** Search input with clear button. Controlled component — value
-and onChange come from parent.
+**Description:** Search input with clear button. Controlled component — value and onChange come from parent.
---
@@ -41,41 +37,35 @@ and onChange come from parent.
### CategorySidebar (`organisms/navigation/CategorySidebar.tsx`)
-**Description:** Left sidebar with collapsible category filter. Sticky below
-header, full viewport height minus header.
+**Description:** Left sidebar with collapsible category filter. Sticky below header, full viewport height minus header.
### CartFab (`organisms/cart/CartFab.tsx`)
-**Description:** Floating Action Button displaying cart item count. Links to
-/payment page.
+**Description:** Floating Action Button displaying cart item count. Links to /payment page.
### ProductGrid (`organisms/product-grid/ProductGrid.tsx`)
-**Description:** Full product grid organism with mobile category tabs,
-filtering, and empty state. Uses useCart and useMenu contexts.
+**Description:** Full product grid organism with mobile category tabs, filtering, and empty state. Uses useCart and useMenu contexts.
### ShopGrid (`organisms/shop-grid/ShopGrid.tsx`)
-**Description:** Responsive grid of ShopCard molecules for the feed/discovery
-page.
+**Description:** Responsive grid of ShopCard molecules for the feed/discovery page.
### ReviewModal (`organisms/modals/ReviewModal.tsx`)
-**Description:** Modal for customer reviews. Shows 5-star rating and textarea.
-After submission, displays thank-you message.
+**Description:** Modal for customer reviews. Shows 5-star rating and textarea. After submission, displays thank-you message.
### Analytics Charts (`organisms/analytics/`)
-**Description:** Pure-SVG chart and table components for the Financial Analytics
-dashboard. All components are interactive with hover tooltips.
+**Description:** Pure-SVG chart and table components for the Financial Analytics dashboard. All components are interactive with hover tooltips.
-| Component | File | Description |
-| ------------ | ---------------- | ---------------------------------------------------------- |
-| LineChart | LineChart.tsx | Revenue trend line chart with area fill and hover tooltips |
-| BarChart | BarChart.tsx | Grouped bar chart comparing current vs previous period |
-| PieChart | PieChart.tsx | Pie chart with interactive legend for category breakdown |
-| SummaryCard | SummaryCard.tsx | Metric card with period-over-period comparison indicator |
-| ProductTable | ProductTable.tsx | Sortable product sales table with profit margin badges |
+| Component | File | Description |
+|-----------|------|-------------|
+| LineChart | LineChart.tsx | Revenue trend line chart with area fill and hover tooltips |
+| BarChart | BarChart.tsx | Grouped bar chart comparing current vs previous period |
+| PieChart | PieChart.tsx | Pie chart with interactive legend for category breakdown |
+| SummaryCard | SummaryCard.tsx | Metric card with period-over-period comparison indicator |
+| ProductTable | ProductTable.tsx | Sortable product sales table with profit margin badges |
**Usage:** Imported via `@/components/organisms/analytics` barrel index.
@@ -85,13 +75,11 @@ dashboard. All components are interactive with hover tooltips.
### MainLayout (`templates/main-layout/MainLayout.tsx`)
-**Description:** Main layout template — wraps content with Header, Footer, and
-CartFab. Used by (main) route group.
+**Description:** Main layout template — wraps content with Header, Footer, and CartFab. Used by (main) route group.
### AuthLayout (`templates/auth-layout/AuthLayout.tsx`)
-**Description:** Auth layout template — centers content in screen. Used by
-login/register pages.
+**Description:** Auth layout template — centers content in screen. Used by login/register pages.
### FeedLayout (`templates/feed-layout/FeedLayout.tsx`)
@@ -99,8 +87,7 @@ login/register pages.
### ManagerLayout (`templates/manager-layout/ManagerLayout.tsx`)
-**Description:** Manager layout template — auth guard + ManagerProvider. Used by
-the manager route group.
+**Description:** Manager layout template — auth guard + ManagerProvider. Used by the manager route group.
---
@@ -108,20 +95,16 @@ the manager route group.
### AuthContext (`lib/auth-context.tsx`)
-Manages user authentication state including login, logout, and registration.
-Uses localStorage for persistence.
+Manages user authentication state including login, logout, and registration. Uses localStorage for persistence.
### CartContext (`lib/cart-context.tsx`)
-Manages shopping cart state with localStorage persistence. Tracks items,
-quantities, and totals.
+Manages shopping cart state with localStorage persistence. Tracks items, quantities, and totals.
### MenuContext (`lib/menu-context.tsx`)
-Provides shared activeCategory state across components. Synchronizes Header
-mobile menu and CategorySidebar selection.
+Provides shared activeCategory state across components. Synchronizes Header mobile menu and CategorySidebar selection.
### ManagerContext (`lib/manager-context.tsx`)
-Manages menu CRUD state (products, combos, categories) for the manager
-dashboard.
+Manages menu CRUD state (products, combos, categories) for the manager dashboard.
diff --git a/components/atoms/ATOMS.md b/components/atoms/ATOMS.md
index e11486f..5ab88d3 100644
--- a/components/atoms/ATOMS.md
+++ b/components/atoms/ATOMS.md
@@ -42,7 +42,6 @@ Main interactive button component with multiple variants and sizes.
- All standard HTML button attributes
**Usage:**
-
```tsx
import { Button } from "@/components/atoms";
@@ -60,7 +59,6 @@ import { Button } from "@/components/atoms";
```
**Styling:**
-
- Primary: Branded color with dark hover
- Secondary: Border style with light background on hover
- Danger: Red for destructive actions
@@ -80,7 +78,6 @@ Button designed specifically for icon-only interactions.
- All standard HTML button attributes
**Usage:**
-
```tsx
import { IconButton } from "@/components/atoms";
@@ -105,7 +102,6 @@ General text input field with optional label, error, and icon.
- All standard HTML input attributes
**Usage:**
-
```tsx
import { TextInput } from "@/components/atoms";
@@ -139,7 +135,6 @@ Search input with built-in search icon and clear button.
- All standard HTML input attributes
**Usage:**
-
```tsx
import { SearchInput } from "@/components/atoms";
@@ -166,7 +161,6 @@ Multi-line text input with optional label and error.
- All standard HTML textarea attributes
**Usage:**
-
```tsx
import { Textarea } from "@/components/atoms";
@@ -194,7 +188,6 @@ Semantic heading component with level-based sizing.
- All standard HTML heading attributes
**Sizing:**
-
- Level 1: text-3xl font-bold
- Level 2: text-2xl font-bold
- Level 3: text-xl font-bold
@@ -203,7 +196,6 @@ Semantic heading component with level-based sizing.
- Level 6: text-sm font-semibold
**Usage:**
-
```tsx
import { Heading } from "@/components/atoms";
@@ -225,14 +217,12 @@ Paragraph text with semantic variants.
- All standard HTML paragraph attributes
**Variants:**
-
- body1: text-base (main content)
- body2: text-sm (secondary content)
- caption: text-xs (smallest text)
- label: text-sm font-medium (form labels)
**Usage:**
-
```tsx
import { Text } from "@/components/atoms";
@@ -254,7 +244,6 @@ Small caption/note text component.
- All standard HTML span attributes
**Usage:**
-
```tsx
import { Caption } from "@/components/atoms";
@@ -279,7 +268,6 @@ Labeled badge component for highlighting information.
- All standard HTML span attributes
**Variants:**
-
- primary: Branded color
- secondary: Light gray
- success: Green
@@ -287,7 +275,6 @@ Labeled badge component for highlighting information.
- warning: Yellow
**Usage:**
-
```tsx
import { Badge } from "@/components/atoms";
@@ -309,7 +296,6 @@ Specialized badge for displaying formatted prices.
- All standard HTML span attributes
**Usage:**
-
```tsx
import { PriceBadge } from "@/components/atoms";
@@ -318,7 +304,6 @@ import { PriceBadge } from "@/components/atoms";
```
**Output:**
-
- VND: "50.000 ₫"
- USD: "$99.99"
@@ -336,7 +321,6 @@ Visual separator element.
- All standard HTML hr attributes
**Usage:**
-
```tsx
import { Divider } from "@/components/atoms";
@@ -430,7 +414,6 @@ import type {
```
### Product Card
-
```tsx
Product Name
@@ -443,7 +426,6 @@ import type {
```
### Rating Display
-
```tsx