Skip to content

Commit d3bc245

Browse files
committed
Enhance Layout and GuidelinesPage components with improved navbar variant handling and updated design guidelines. Refactor HomePage to include a login card with form fields, and update PatternsPage and DialogPage with consistent default values. Add new navbar variant prop for better customization.
1 parent 79ba8a4 commit d3bc245

15 files changed

Lines changed: 483 additions & 113 deletions

File tree

.changeset/hip-clowns-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pplethai/components": patch
3+
---
4+
5+
fix badge border

.changeset/odd-pans-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pplethai/components": patch
3+
---
4+
5+
fix navbar in mini-app

.changeset/wide-maps-juggle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pplethai/components": patch
3+
---
4+
5+
fix checkbox animation

apps/docs/src/components/Layout.tsx

Lines changed: 51 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
import { Container, Inline, Navbar, Separator, Stack, type NavbarItem } from "@pplethai/components";
1+
import {
2+
Container,
3+
getNavbarVariant,
4+
Inline,
5+
Navbar,
6+
Separator,
7+
Stack,
8+
type NavbarItem,
9+
} from "@pplethai/components";
10+
import * as React from "react";
211

312
const footerLinkClass = "text-primary hover:underline";
413
import { NavLink, Outlet, useLocation } from "react-router-dom";
@@ -16,6 +25,7 @@ const navItems: NavbarItem[] = [
1625

1726
export function Layout() {
1827
const { pathname } = useLocation();
28+
const [navbarVariant] = React.useState(() => getNavbarVariant());
1929

2030
return (
2131
<Stack gap="none" className="min-h-screen bg-background text-foreground">
@@ -34,7 +44,13 @@ export function Layout() {
3444
</NavLink>
3545
)}
3646
/>
37-
<Stack as="main" gap="none" className="flex-1 max-md:pt-12 md:pt-0">
47+
<Stack
48+
as="main"
49+
gap="none"
50+
className={
51+
navbarVariant === "light" ? "flex-1 max-md:pt-12 md:pt-0" : "flex-1 max-md:pt-16 md:pt-0"
52+
}
53+
>
3854
<Container className="py-10">
3955
<Outlet />
4056
</Container>
@@ -43,36 +59,40 @@ export function Layout() {
4359
<Container className="py-6">
4460
<Stack gap="md">
4561
<Separator />
46-
<p>@pplethai/components — เอกสารระบบดีไซน์พรรคประชาชน</p>
47-
<Inline gap="sm" className="flex-wrap">
48-
<a
49-
href="https://github.com/PPLEThai/pple-design-system"
50-
target="_blank"
51-
rel="noreferrer"
52-
className={footerLinkClass}
53-
>
54-
GitHub
55-
</a>
56-
<span aria-hidden="true">·</span>
57-
<a
58-
href="https://www.npmjs.com/package/@pplethai/components"
59-
target="_blank"
60-
rel="noreferrer"
61-
className={footerLinkClass}
62-
>
63-
npm
64-
</a>
62+
<Inline justify="between" align="start" gap="md" className="flex-wrap">
63+
<p>@pplethai/components — เอกสารระบบดีไซน์พรรคประชาชน</p>
64+
<Stack gap="sm" className="items-end text-right">
65+
<Inline gap="sm" className="flex-wrap justify-end">
66+
<a
67+
href="https://github.com/PPLEThai/pple-design-system"
68+
target="_blank"
69+
rel="noreferrer"
70+
className={footerLinkClass}
71+
>
72+
GitHub
73+
</a>
74+
<span aria-hidden="true">·</span>
75+
<a
76+
href="https://www.npmjs.com/package/@pplethai/components"
77+
target="_blank"
78+
rel="noreferrer"
79+
className={footerLinkClass}
80+
>
81+
npm
82+
</a>
83+
</Inline>
84+
<p>
85+
<a
86+
href="https://github.com/PPLEThai/pple-design-system/blob/main/AGENTS.md"
87+
target="_blank"
88+
rel="noreferrer"
89+
className={footerLinkClass}
90+
>
91+
AGENTS.md สำหรับ Coding Agents ในการใช้งานระบบดีไซน์นี้
92+
</a>
93+
</p>
94+
</Stack>
6595
</Inline>
66-
<p>
67-
<a
68-
href="https://github.com/PPLEThai/pple-design-system/blob/main/AGENTS.md"
69-
target="_blank"
70-
rel="noreferrer"
71-
className={footerLinkClass}
72-
>
73-
AGENTS.md สำหรับ Coding Agents ในการใช้งานระบบดีไซน์นี้
74-
</a>
75-
</p>
7696
</Stack>
7797
</Container>
7898
</Stack>

0 commit comments

Comments
 (0)