Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
b465d6a
Enhance color palette and improve documentation visualization (#34)
danielppolo Mar 12, 2025
5691b35
fix: Adjust Switch component height for better alignment (#38)
danielppolo Mar 13, 2025
2ed1acd
Update Button (#35)
danielppolo Mar 13, 2025
c26a718
Set TKW Lausanne as the main font in the UI Kit (#39)
danielppolo Mar 14, 2025
a7c076d
Add Toast component (#40)
danielppolo Mar 14, 2025
bfb6b79
fix: allow opacity transformations to colors (#43)
danielppolo Mar 14, 2025
2e8e326
refactor: Update RadioGroupItem styles and enhance documentation (#51)
danielppolo Mar 17, 2025
849ee7d
Enhance Checkbox component with new props and improved styling (#50)
danielppolo Mar 17, 2025
5de6fd5
feat: add Progress component to UI kit (#45)
danielppolo Mar 17, 2025
a36ef79
Refactor Input and OTPField components for better styling and error h…
danielppolo Mar 17, 2025
b556e71
Update Drawer, AlertDialog, BottomBar (#44)
danielppolo Mar 17, 2025
a8bd67c
Add client directive to SearchField (#41)
danielppolo Mar 14, 2025
4daf4e4
Version Packages (#42)
github-actions[bot] Mar 14, 2025
144c496
feat: Add EU flag component to mini-apps UI kit (#37)
danielppolo Mar 17, 2025
0fe308e
Update Button (#35)
danielppolo Mar 13, 2025
10c1e17
Set TKW Lausanne as the main font in the UI Kit (#39)
danielppolo Mar 14, 2025
4bdd2db
Add Toast component (#40)
danielppolo Mar 14, 2025
bca7142
Add client directive to SearchField (#41)
danielppolo Mar 14, 2025
f3326ba
Update Button (#35)
danielppolo Mar 13, 2025
8774d3a
Set TKW Lausanne as the main font in the UI Kit (#39)
danielppolo Mar 14, 2025
0946643
Add Toast component (#40)
danielppolo Mar 14, 2025
e3a9064
Marble (#56)
igorosip0v Mar 17, 2025
a03c34e
Add TopBar component (#60)
danielppolo Mar 17, 2025
8b131b9
refactor: Update ListItem component to use button element and enhance…
danielppolo Mar 17, 2025
4912206
Enhance Drawer component by allowing additional props to be passed an…
danielppolo Mar 17, 2025
048de95
Update the Input (#57)
danielppolo Mar 17, 2025
7e31184
Update Select (#54)
danielppolo Mar 17, 2025
c20f53a
Refactor Delete component and enhance NumberPad input validation (#65)
danielppolo Mar 18, 2025
8a78ed6
feat: Add ToggleGroup component to UI kit (#63)
danielppolo Mar 18, 2025
c813a96
Improve country selection experience in PhoneField (#62)
danielppolo Mar 18, 2025
48174db
Add CountryDrawer component for country selection (#66)
danielppolo Mar 18, 2025
d99050b
Add Tabs component with active icon support to mini-apps UI kit (#61)
danielppolo Mar 18, 2025
bc1d318
implement bullet list & bullet list item (#55)
igorosip0v Mar 18, 2025
9500d24
Refactor components for improved styling and user experience (#67)
danielppolo Mar 18, 2025
d54dd22
Add FloatingLabel story for TextArea component (#64)
danielppolo Mar 18, 2025
7cb1f81
Enhance Token component and icons with new features (#68)
danielppolo Mar 18, 2025
bf9780b
Merge branch 'main' into develop
danielppolo Mar 18, 2025
739500d
chore: upgrade to 1.0.0
danielppolo Mar 18, 2025
349c45e
fix: update Drawer component height property in CountryDrawer for imp…
danielppolo Mar 18, 2025
07440fc
chore: update package version to 1.0.0-canary.0
danielppolo Mar 18, 2025
e3d812d
Update font styles in Button and Typography components
danielppolo Mar 18, 2025
015ba28
chore: Update package version to 1.0.0-canary.1
danielppolo Mar 18, 2025
44220c0
Refactor Button component to allow for custom variant and size
danielppolo Mar 18, 2025
a80f5e6
Refactor AlertDialog component to use DrawerPrimitive.Overlay for imp…
danielppolo Mar 18, 2025
49f4745
Update package version to 1.0.0-canary.3 and add Tabs component
danielppolo Mar 19, 2025
423ad98
Refactor Tabs component to remove unnecessary div wrapper
danielppolo Mar 19, 2025
da006d9
Refactor Tabs component to replace activeIcon with altIcon and update…
danielppolo Mar 19, 2025
0592b9d
Refactor PhoneField component to simplify country data handling by re…
danielppolo Mar 19, 2025
be89314
Update TopBar stories to change title from "Title" to "World" and add…
danielppolo Mar 19, 2025
81e663e
Update README and Icons documentation to reflect the transition from …
danielppolo Mar 19, 2025
ede7dd2
Enhance Chip component to extend HTMLAttributes, allowing for additio…
danielppolo Mar 19, 2025
f241935
feat: include fonts in lib
danielppolo Apr 1, 2025
a564f8a
feat: enable client-side rendering in CountryDrawer component
danielppolo Apr 1, 2025
fa374ea
chore: update package version to 1.0.0-canary.5
danielppolo Apr 1, 2025
a2c4f49
feat: add CircularIcon component with customizable sizes
danielppolo Apr 3, 2025
3bcda52
fix: make title prop in TopBar optional for improved flexibility
danielppolo Apr 3, 2025
b3cd529
refactor: update TabItemProps to remove className omission and enhanc…
danielppolo Apr 3, 2025
efa4541
refactor: adjust ColorPickerItem styles for improved visual consisten…
danielppolo Apr 3, 2025
c0aeae9
style: increase padding in Toast component for improved spacing
danielppolo Apr 3, 2025
222be3a
feat: add LiveFeedback component for enhanced user feedback during op…
danielppolo Apr 3, 2025
f880a58
chore: update package version to 1.0.0-canary.9
danielppolo Apr 4, 2025
2f7e74d
chore: update package version to 1.0.0-canary.10 and export LiveFeedb…
danielppolo Apr 4, 2025
20fa2d6
feat: Add LiveFeedback component and update package version
danielppolo Apr 4, 2025
5b866ec
style: update Toast component padding and adjust font-weight in globa…
danielppolo Apr 4, 2025
1f0571c
chore: update package version to 1.0.0-canary.13 and enhance typograp…
danielppolo Apr 4, 2025
50709b6
chore: update package version to 1.0.0-canary.14
danielppolo Apr 4, 2025
b6a0c46
fix: update LiveFeedback import to named export for consistency
danielppolo Apr 4, 2025
47293f3
style: refactor Tabs component className for improved readability and…
danielppolo Apr 4, 2025
1d82c51
refactor: remove documentation parameters from RadioGroup story for c…
danielppolo Apr 4, 2025
9b49a0e
feat: enhance CountryDrawer component with additional props for impro…
danielppolo Apr 8, 2025
944382c
style: remove invalid input styles from Input component for cleaner d…
danielppolo Apr 8, 2025
7fc4eb7
feat: enhance AlertDialogHeader component with close button functiona…
danielppolo Apr 8, 2025
9cfe12c
feat: enhance Tabs and TopBar components with additional className pr…
danielppolo Apr 8, 2025
f7711ae
feat: add NavigationBar component with tab navigation for improved us…
danielppolo Apr 8, 2025
500548c
feat: extend CircularIconProps to include HTML attributes for better …
danielppolo Apr 8, 2025
c2f7b12
style: update input typography level for cleaner design
danielppolo Apr 8, 2025
896ea2e
refactor: Update CountryDrawer component layout for improved user exp…
danielppolo Apr 8, 2025
99f78c6
feat: integrate PhoneField component into Home page and enhance Drawe…
danielppolo Apr 8, 2025
0c35901
chore: update package version to 1.0.0-canary.15
danielppolo Apr 8, 2025
400bf94
feat: add new color utilities and enhance documentation
danielppolo Apr 8, 2025
524877f
feat: add new token color utilities and update documentation
danielppolo Apr 8, 2025
6ca54cd
style: add gap to TopBar component for improved layout
danielppolo Apr 8, 2025
299450c
feat: refactor Input component for improved styling and functionality
danielppolo Apr 8, 2025
c923f2e
feat: enhance Select and TextArea components with new styling variants
danielppolo Apr 8, 2025
9d71883
refactor: update Input component styles and story for improved usability
danielppolo Apr 9, 2025
042f7fa
style: update layout.tsx to include viewport meta tag
danielppolo Apr 9, 2025
19b4efa
refactor: update Input component styles and props for consistency
danielppolo Apr 9, 2025
e450152
chore: update package version to 1.0.0-canary.16
danielppolo Apr 9, 2025
cebaba9
Optimize bundle size (#70)
danielppolo Apr 10, 2025
ada67f2
Merge branch 'main' into develop
danielppolo Apr 10, 2025
2318772
refactor: remove LazyFlag component and update imports
danielppolo Apr 10, 2025
e60d18c
refactor: enhance Flag component with CDN support and improved props
danielppolo Apr 10, 2025
f908d79
chore: update package version to 1.0.0-canary.17 and remove BulletPoi…
danielppolo Apr 10, 2025
033244a
chore: bump package version to 1.0.0-canary.18 and add CircularIcon e…
danielppolo Apr 10, 2025
33a76cf
chore: bump package version to 1.0.0-canary.19
danielppolo Apr 10, 2025
3ce1771
feat: enhance Toast and TopBar components with new icons
danielppolo Apr 10, 2025
b40980c
fix: adjust Toast component padding for improved layout
danielppolo Apr 10, 2025
c40882d
feat: add new Drawer story with input fields
danielppolo Apr 10, 2025
8995be6
chore: bump package version to 1.0.0-canary.20 and export CountryCode…
danielppolo Apr 10, 2025
1ed0644
refactor: Remove Pill component and use Chip component in ListItem st…
danielppolo Apr 10, 2025
69888a4
chore: Update package version to 1.0.0-canary.21
danielppolo Apr 10, 2025
4c6256b
feat: add State component with icons for various statuses
danielppolo Apr 10, 2025
4d65acc
fix: enhance State component styling with shadow effect
danielppolo Apr 11, 2025
075c48a
feat: add CircularState component for status representation
danielppolo Apr 11, 2025
4383e5a
feat: add new token icons and update stories
danielppolo Apr 11, 2025
54c01f8
Add haptic feedback (#72)
danielppolo Apr 14, 2025
9ed8832
chore: add .npmignore file and update CHANGELOG
danielppolo Apr 14, 2025
8006f43
docs: update README.md to streamline font configuration and import me…
danielppolo Apr 14, 2025
b6948dc
chore: remove generate-country-codes script
danielppolo Apr 14, 2025
c1dfcb2
chore: update tree-shaking input path and add test script
danielppolo Apr 14, 2025
b1636b3
feat: enhance components with improved error handling and styling
danielppolo Apr 14, 2025
4e78aef
feat: update country codes generation and documentation
danielppolo Apr 14, 2025
442a265
feat: integrate @radix-ui/react-visually-hidden and update components
danielppolo Apr 14, 2025
6a0f22a
chore: bump package version to 1.0.0
danielppolo Apr 14, 2025
ff66dab
chore: rename publish script for clarity
danielppolo Apr 14, 2025
6fd73ca
fix: update Progress component transition duration for smoother anima…
danielppolo Apr 14, 2025
50fb14d
feat: enhance TopBar component with scroll-based title visibility
danielppolo Apr 15, 2025
e08a59f
feat: enhance TopBar component with overflow handling for adornments
danielppolo Apr 15, 2025
f328daf
Merge branch 'main' into danielpolo-stu-1244-animate-topbar-title
danielppolo Apr 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chilly-radios-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@worldcoin/mini-apps-ui-kit-react": minor
---

Add title animation to TopBar
48 changes: 30 additions & 18 deletions packages/mini-apps-ui-kit-react/src/components/TopBar/TopBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { cn } from "@/lib/utils";
import { useWindowScroll } from "@uidotdev/usehooks";
import React from "react";

import { Typography } from "../Typography";
Expand All @@ -15,37 +16,48 @@ interface TopBarProps {
}

function TopBar({ title, startAdornment, endAdornment, className }: TopBarProps) {
const [{ y }] = useWindowScroll();
const isScrolled = (y ?? 0) > 0;
const hasStartAdornment = Boolean(startAdornment);
const hasEndAdornment = Boolean(endAdornment);

const textAlignment = hasStartAdornment ? "text-center" : "text-left";
const justifyContent =
hasStartAdornment || hasEndAdornment ? "justify-between" : "justify-start";

return (
<div
className={cn(
"flex items-center px-6 pt-6 pb-2 w-full h-[4.5rem] gap-10",
justifyContent,
"flex items-center justify-center px-6 pt-6 pb-2 w-full h-[4.5rem] gap-10 relative",
className,
)}
>
{startAdornment && <div className="shrink-0">{startAdornment}</div>}
{startAdornment && (
<div className="absolute left-6 size-10 overflow-hidden">{startAdornment}</div>
)}

{!hasStartAdornment && (
<Typography
key="heading"
variant={"heading"}
level={3}
className={cn(
"flex-1 grow truncate text-left absolute left-6 right-6 text-ellipsis overflow-hidden line-clamp-1",
isScrolled ? "opacity-0 duration-300" : "duration-700",
)}
>
{title}
</Typography>
)}

<Typography
variant={hasStartAdornment ? "subtitle" : "heading"}
level={hasStartAdornment ? 1 : 3}
className={cn("flex-1 grow truncate", textAlignment)}
key="subtitle"
variant={"subtitle"}
level={1}
className={cn(
"truncate opacity-0 basis-1/2 text-center",
isScrolled || hasStartAdornment ? "opacity-100 duration-700" : "duration-300",
)}
>
{title}
</Typography>

{endAdornment && <div className="shrink-0">{endAdornment}</div>}

{!endAdornment && hasStartAdornment && (
<div className="shrink-0 invisible" aria-hidden="true">
{startAdornment}
</div>
{endAdornment && (
<div className="absolute right-6 size-10 overflow-hidden">{endAdornment}</div>
)}
</div>
);
Expand Down
6 changes: 6 additions & 0 deletions packages/mini-apps-ui-kit-react/stories/TopBar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ export const Default: Story = {
},
};

export const WithLongTitle: Story = {
args: {
title: "This is a long title that should be truncated",
},
};

export const WithStartAdornment: Story = {
args: {
title: "World",
Expand Down