Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
144 changes: 94 additions & 50 deletions apps/www/src/app/examples/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
'use client';
import {
ActivityLogIcon,
BarChartIcon,
DashboardIcon,
DotsHorizontalIcon,
FileTextIcon,
GearIcon,
HomeIcon,
MixerHorizontalIcon,
PersonIcon,
QuestionMarkCircledIcon,
BellIcon as RadixBellIcon
} from '@radix-ui/react-icons';
import {
Amount,
Avatar,
Expand Down Expand Up @@ -30,12 +43,6 @@ import {
TextArea,
Tooltip
} from '@raystack/apsara';
import {
BellIcon,
FilterIcon,
OrganizationIcon,
SidebarIcon
} from '@raystack/apsara/icons';
import dayjs from 'dayjs';
import React, { useState } from 'react';

Expand All @@ -59,16 +66,16 @@ const Page = () => {

// Sample options data with icons
const selectOptions = [
{ value: 'dashboard', label: 'Dashboard', icon: <BellIcon /> },
{ value: 'analytics', label: 'Analytics', icon: <FilterIcon /> },
{ value: 'settings', label: 'Settings', icon: <OrganizationIcon /> },
{ value: 'profile', label: 'Profile', icon: <SidebarIcon /> }
{ value: 'dashboard', label: 'Dashboard', icon: <RadixBellIcon /> },
{ value: 'analytics', label: 'Analytics', icon: <MixerHorizontalIcon /> },
{ value: 'settings', label: 'Settings', icon: <PersonIcon /> },
{ value: 'profile', label: 'Profile', icon: <DashboardIcon /> }
];

const filterOptions = [
{ value: 'Option 1', label: 'Option 1', icon: <BellIcon /> },
{ value: 'Option 2', label: 'Option 2', icon: <FilterIcon /> },
{ value: 'Option 3', label: 'Option 3', icon: <OrganizationIcon /> }
{ value: 'Option 1', label: 'Option 1', icon: <RadixBellIcon /> },
{ value: 'Option 2', label: 'Option 2', icon: <MixerHorizontalIcon /> },
{ value: 'Option 3', label: 'Option 3', icon: <PersonIcon /> }
];

return (
Expand All @@ -79,15 +86,15 @@ const Page = () => {
backgroundColor: 'var(--rs-color-background-base-primary)'
}}
>
<Sidebar defaultOpen>
<Sidebar defaultOpen variant='inset'>
<Sidebar.Header>
<Flex align='center' gap={3}>
<IconButton
size={4}
onClick={() => console.log('Logo clicked')}
aria-label='Logo'
>
<BellIcon width={24} height={24} />
<RadixBellIcon width={24} height={24} />
</IconButton>
<Text size={4} weight='medium'>
Raystack
Expand All @@ -96,31 +103,62 @@ const Page = () => {
</Sidebar.Header>

<Sidebar.Main>
<Sidebar.Item href='#' active leadingIcon={<BellIcon />}>
<Sidebar.Item href='#' active leadingIcon={<HomeIcon />}>
Dashboard
</Sidebar.Item>

<Sidebar.Item href='#' leadingIcon={<BellIcon />}>
<Sidebar.Item href='#' leadingIcon={<BarChartIcon />}>
Analytics
</Sidebar.Item>

<Sidebar.Group label='Resources' leadingIcon={<FilterIcon />}>
<Sidebar.Item href='#'>Reports</Sidebar.Item>

<Sidebar.Item href='#'>Activities</Sidebar.Item>
<Sidebar.Group label='Resources'>
<Sidebar.Item href='#' leadingIcon={<FileTextIcon />}>
Reports
</Sidebar.Item>
<Sidebar.More label='More'>
<Sidebar.Item
href='#'
target='_blank'
leadingIcon={<ActivityLogIcon />}
>
Activities
</Sidebar.Item>
<Sidebar.Item
onClick={() => console.log('Notifications clicked')}
leadingIcon={<RadixBellIcon />}
>
Notifications
</Sidebar.Item>
</Sidebar.More>
</Sidebar.Group>

<Sidebar.Group label='Account'>
<Sidebar.Item href='#'>Settings</Sidebar.Item>

<Sidebar.Item href='#'>Notifications</Sidebar.Item>
<Sidebar.Item href='#' leadingIcon={<GearIcon />}>
Settings
</Sidebar.Item>
<Sidebar.More leadingIcon={<DotsHorizontalIcon />}>
<Sidebar.Item href='#' leadingIcon={<RadixBellIcon />}>
Notifications
</Sidebar.Item>
<Sidebar.Item href='#' leadingIcon={<PersonIcon />} disabled>
Billing
</Sidebar.Item>
</Sidebar.More>
</Sidebar.Group>
</Sidebar.Main>

<Sidebar.Footer>
<Sidebar.Item href='#'>Help & Support</Sidebar.Item>

<Sidebar.Item href='#'>Preferences</Sidebar.Item>
<Sidebar.Item href='#' leadingIcon={<QuestionMarkCircledIcon />}>
Help & Support
</Sidebar.Item>
<Sidebar.More label='More footer'>
<Sidebar.Item href='#' leadingIcon={<GearIcon />}>
Preferences
</Sidebar.Item>
<Sidebar.Item href='#' leadingIcon={<FileTextIcon />}>
Documentation
</Sidebar.Item>
</Sidebar.More>
</Sidebar.Footer>
</Sidebar>

Expand Down Expand Up @@ -285,7 +323,7 @@ const Page = () => {
color: 'var(--rs-color-foreground-base-secondary)'
}}
>
<BellIcon style={{ width: '8px', height: '8px' }} />
<RadixBellIcon style={{ width: '8px', height: '8px' }} />
<Text style={{ fontSize: '8px' }} color='secondary'>
25%
</Text>
Expand All @@ -300,7 +338,7 @@ const Page = () => {
color: 'var(--rs-color-foreground-base-secondary)'
}}
>
<BellIcon style={{ width: '8px', height: '8px' }} />
<RadixBellIcon style={{ width: '8px', height: '8px' }} />
<Text style={{ fontSize: '8px' }} color='secondary'>
25%
</Text>
Expand All @@ -315,7 +353,7 @@ const Page = () => {
color: 'var(--rs-color-foreground-base-secondary)'
}}
>
<BellIcon style={{ width: '8px', height: '8px' }} />
<RadixBellIcon style={{ width: '8px', height: '8px' }} />
<Text style={{ fontSize: '8px' }} color='secondary'>
25%
</Text>
Expand Down Expand Up @@ -352,7 +390,9 @@ const Page = () => {
color: 'var(--rs-color-foreground-base-secondary)'
}}
>
<BellIcon style={{ width: '8px', height: '8px' }} />
<RadixBellIcon
style={{ width: '8px', height: '8px' }}
/>
<Text style={{ fontSize: '8px' }} color='secondary'>
Sun
</Text>
Expand All @@ -371,7 +411,9 @@ const Page = () => {
color: 'var(--rs-color-foreground-base-secondary)'
}}
>
<BellIcon style={{ width: '8px', height: '8px' }} />
<RadixBellIcon
style={{ width: '8px', height: '8px' }}
/>
<Text style={{ fontSize: '8px' }} color='secondary'>
15th
</Text>
Expand All @@ -390,7 +432,9 @@ const Page = () => {
color: 'var(--rs-color-foreground-base-secondary)'
}}
>
<BellIcon style={{ width: '8px', height: '8px' }} />
<RadixBellIcon
style={{ width: '8px', height: '8px' }}
/>
<Text style={{ fontSize: '8px' }} color='secondary'>
Today
</Text>
Expand Down Expand Up @@ -1365,7 +1409,7 @@ const Page = () => {
</Text>

<EmptyState
icon={<FilterIcon />}
icon={<MixerHorizontalIcon />}
heading='KYC required for image orders'
subHeading='Please contact your organization owner to complete the KYC process for the image orders. You can also contact support@raystack.io for assistance.'
primaryAction={
Expand Down Expand Up @@ -1562,7 +1606,7 @@ const Page = () => {
<Popover>
<Popover.Trigger>
<Button variant='ghost' size='small'>
<FilterIcon />
<MixerHorizontalIcon />
<Text size='small'>Filter Help</Text>
</Button>
</Popover.Trigger>
Expand All @@ -1584,7 +1628,7 @@ const Page = () => {
<InputField
label='Filter Team Members'
placeholder='Type to filter...'
leadingIcon={<FilterIcon />}
leadingIcon={<MixerHorizontalIcon />}
width='100%'
/>
</Flex>
Expand Down Expand Up @@ -1722,7 +1766,7 @@ const Page = () => {
<Popover>
<Popover.Trigger>
<Button variant='ghost' size='small'>
<FilterIcon />
<MixerHorizontalIcon />
<Text size='small'>Filter Help</Text>
</Button>
</Popover.Trigger>
Expand Down Expand Up @@ -1755,7 +1799,7 @@ const Page = () => {
<InputField
label='Filter Team Members'
placeholder='Type to filter...'
leadingIcon={<FilterIcon />}
leadingIcon={<MixerHorizontalIcon />}
width='100%'
/>
</Flex>
Expand Down Expand Up @@ -2197,15 +2241,15 @@ const Page = () => {
<DataTable.Content
zeroState={
<EmptyState
icon={<OrganizationIcon />}
icon={<PersonIcon />}
heading='Zero state'
variant='empty2'
subHeading='Get started by creating your first user. Filter bar and search are hidden in zero state.'
/>
}
emptyState={
<EmptyState
icon={<FilterIcon />}
icon={<MixerHorizontalIcon />}
heading='Empty state'
variant='empty1'
subHeading="We couldn't find any matches for that keyword or filter."
Expand Down Expand Up @@ -2277,15 +2321,15 @@ const Page = () => {
<DataTable.Content
zeroState={
<EmptyState
icon={<OrganizationIcon />}
icon={<PersonIcon />}
heading='zero state'
variant='empty2'
subHeading='Get started by creating your first user.'
/>
}
emptyState={
<EmptyState
icon={<FilterIcon />}
icon={<MixerHorizontalIcon />}
heading='empty state'
variant='empty1'
subHeading="We couldn't find any matches for that filter. Try adjusting your filters or search query. Filter bar remains visible so you can modify filters."
Expand Down Expand Up @@ -2352,15 +2396,15 @@ const Page = () => {
<DataTable.Content
zeroState={
<EmptyState
icon={<OrganizationIcon />}
icon={<PersonIcon />}
heading='zero state'
variant='empty2'
subHeading='Get started by creating your first user.'
/>
}
emptyState={
<EmptyState
icon={<FilterIcon />}
icon={<MixerHorizontalIcon />}
heading='empty state'
variant='empty1'
subHeading="We couldn't find any matches for that search. Try a different search term. Filter bar stays hidden when only search is applied."
Expand Down Expand Up @@ -2413,7 +2457,7 @@ const Page = () => {
align='center'
style={{ padding: '40px' }}
>
<OrganizationIcon
<PersonIcon
width={48}
height={48}
style={{ opacity: 0.5 }}
Expand All @@ -2435,7 +2479,7 @@ const Page = () => {
}
emptyState={
<EmptyState
icon={<FilterIcon />}
icon={<MixerHorizontalIcon />}
heading='empty state'
variant='empty1'
subHeading='Try adjusting your filters or search query.'
Expand Down Expand Up @@ -2483,15 +2527,15 @@ const Page = () => {
<DataTable.Content
zeroState={
<EmptyState
icon={<OrganizationIcon />}
icon={<PersonIcon />}
heading='zero state'
variant='empty2'
subHeading='Search is enabled even in zero state. Start typing to see empty state. Filter bar will only appear when filters are applied.'
/>
}
emptyState={
<EmptyState
icon={<FilterIcon />}
icon={<MixerHorizontalIcon />}
heading='empty state'
variant='empty1'
subHeading='Search applied but no results. Filter bar stays hidden when only search is used.'
Expand Down Expand Up @@ -2557,15 +2601,15 @@ const Page = () => {
<DataTable.Content
zeroState={
<EmptyState
icon={<OrganizationIcon />}
icon={<PersonIcon />}
heading='zero state'
variant='empty2'
subHeading='Get started by creating your first user.'
/>
}
emptyState={
<EmptyState
icon={<FilterIcon />}
icon={<MixerHorizontalIcon />}
heading='empty state'
variant='empty1'
subHeading="We couldn't find any matches for that keyword or filter."
Expand Down
Loading
Loading