Design Updates: Breadcrumbs, Empty State, new Charts and new colors

Design Updates: Breadcrumbs, Empty State, new Charts and new colors

* Add Breadcrumb component to UI package

* Add AppBreadcrumbs for improved navigation: Replaced static text descriptions with the new AppBreadcrumbs component across multiple pages to enhance navigation. Addressed an issue with Supabase client warnings by temporarily suppressing getSession warnings. Also made minor UI adjustments, including adjustments to heading styles and layout features.

* Enhance UI styling and configuration settings: Updated various UI components and global styles to improve styling consistency and responsiveness.

* Update global styles and adjust padding: Updated several CSS variables for improved color accuracy and appearance. Added padding to admin account page body for better layout consistency.

* Refactor UI components and adjust styling: Replaced Heading tags in Plan Picker with span for consistency. Added active and hover states to buttons in the sidebar. Refined background, layout styling, and color schemes across various components. Removed sidebar case in Page component switch statement.

* Add Chart Components and Integrate into Dashboard: Introduced `recharts` library and created `Chart` components. Updated dashboard to use the new components and enhanced UI/UX with descriptions and restructured cards.
* Enhance dashboard demo UI layout: Refactor the layout by adjusting flex properties and spacing classes to improve component alignment. Update dummy data generation and Figure font size for better visual consistency.

* Update localization keys for navigation labels: Changed localization keys for tab labels to use 'routes' prefix for consistency. Adjusted corresponding component references and added missing keys for routes. This ensures better organization and uniformity in the code.

* Add EmptyState component and enhance account handling: Introduced a new EmptyState component for UI consistency and updated JSON locales with 'account' route. Modified HomeAddAccountButton to accept className prop and refactored HomeAccountsListEmptyState to use the new EmptyState component. Updated navigation config to align labels in locales.

* Add locale support and enhance currency formatting: This commit introduces locale-based currency formatting across billing components by utilizing the `useTranslation` hook to fetch the current language. It also refactors the `formatCurrency` function to accept an object parameter for better readability and reusability.

* Fix typo in devDependencies section of template generator: Corrected a syntax error in `package.json.hbs` template affecting the `@kit/tsconfig` entry. The change ensures that the dependency is properly defined and prevents potential issues during package management.

* Update heading levels and add tracking-tight class in auth shell: Changed Heading components from level 4 to level 5 and added the 'tracking-tight' class in multiple auth-related pages. This improves visual consistency and better aligns the typography across the application.
This commit is contained in:
Giancarlo Buomprisco
2024-08-04 23:25:28 +08:00
committed by GitHub
parent 23154c366d
commit e696f1aed0
53 changed files with 1795 additions and 515 deletions

View File

@@ -13,9 +13,6 @@ type PageProps = React.PropsWithChildren<{
export function Page(props: PageProps) {
switch (props.style) {
case 'sidebar':
return <PageWithSidebar {...props} />;
case 'header':
return <PageWithHeader {...props} />;
@@ -31,7 +28,9 @@ function PageWithSidebar(props: PageProps) {
const { Navigation, Children, MobileNavigation } = getSlotsFromPage(props);
return (
<div className={cn('flex', props.className)}>
<div
className={cn('flex bg-gray-50/50 dark:bg-background', props.className)}
>
{Navigation}
<div
@@ -42,7 +41,13 @@ function PageWithSidebar(props: PageProps) {
>
{MobileNavigation}
<div className={'flex flex-1 flex-col space-y-4'}>{Children}</div>
<div
className={
'flex flex-1 flex-col overflow-y-auto bg-background lg:m-1.5 lg:ml-0 lg:rounded-lg lg:border'
}
>
{Children}
</div>
</div>
</div>
);
@@ -54,7 +59,7 @@ export function PageMobileNavigation(
}>,
) {
return (
<div className={cn('w-full py-2 lg:hidden', props.className)}>
<div className={cn('w-full py-2 lg:hidden flex items-center border-b', props.className)}>
{props.children}
</div>
);
@@ -72,7 +77,7 @@ function PageWithHeader(props: PageProps) {
>
<div
className={cn(
'dark:border-primary-900 flex h-14 items-center justify-between bg-muted/30 px-4 shadow-sm dark:shadow-primary/10 lg:justify-start',
'flex h-14 items-center justify-between bg-muted/40 px-4 lg:shadow-sm dark:border-border dark:shadow-primary/10 lg:justify-start',
{
'sticky top-0 z-10 backdrop-blur-md': props.sticky ?? true,
},
@@ -87,13 +92,7 @@ function PageWithHeader(props: PageProps) {
{MobileNavigation}
</div>
<div
className={
'flex h-screen flex-1 flex-col space-y-8 px-4 py-4 lg:container'
}
>
{Children}
</div>
<div className={'container flex flex-1 flex-col'}>{Children}</div>
</div>
</div>
);
@@ -115,13 +114,11 @@ export function PageNavigation(props: React.PropsWithChildren) {
export function PageDescription(props: React.PropsWithChildren) {
return (
<h2 className={'hidden lg:block'}>
<span
className={'text-base font-medium leading-none text-muted-foreground'}
>
<div className={'h-6'}>
<div className={'text-xs font-normal leading-none text-muted-foreground'}>
{props.children}
</span>
</h2>
</div>
</div>
);
}
@@ -129,7 +126,7 @@ export function PageTitle(props: React.PropsWithChildren) {
return (
<h1
className={
'font-heading text-2xl font-semibold leading-none dark:text-white'
'h-6 font-heading font-bold leading-none tracking-tight dark:text-white'
}
>
{props.children}
@@ -137,6 +134,10 @@ export function PageTitle(props: React.PropsWithChildren) {
);
}
export function PageHeaderActions(props: React.PropsWithChildren) {
return <div className={'flex items-center space-x-2'}>{props.children}</div>;
}
export function PageHeader({
children,
title,
@@ -150,17 +151,14 @@ export function PageHeader({
return (
<div
className={cn(
'flex h-20 items-center justify-between lg:px-4',
'flex items-center justify-between lg:px-4 py-4',
className,
)}
>
{title ? (
<div className={'flex flex-col space-y-1.5'}>
<PageTitle>{title}</PageTitle>
<PageDescription>{description}</PageDescription>
</div>
) : null}
<div className={'flex flex-col'}>
<PageDescription>{description}</PageDescription>
<PageTitle>{title}</PageTitle>
</div>
{children}
</div>