Skip to content

Commit 498f675

Browse files
feat: add Upload component and integrate with context and demo (#485)
* feat: add Upload component and integrate with context and demo * feat: enhance Upload component with file validation and drag-and-drop support * fix: correct regex for file type validation in Upload component * feat: update Upload component to handle file status and errors * refactor: remove unused className prop from AccordionItem component * fix: update Upload component styles and improve file drop handling * fix: improve accessibility features in Upload component * feat: enhance Upload with file type consistency and help icon * feat: enhance file handling in Upload component with duplicate files * feat: add Upload component states with Default, Mixed, and FileListDisplay
1 parent f715208 commit 498f675

File tree

21 files changed

+2706
-11
lines changed

21 files changed

+2706
-11
lines changed

apps/site/src/demos/SidebarDemo.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
Shield,
3232
Settings,
3333
TrendingUp,
34+
Upload,
3435
} from 'lucide-react'
3536
import { FOUNDATION_THEME } from '../../../../packages/blend/lib/tokens'
3637
import { Sidebar } from '../../../../packages/blend/lib/components/Sidebar'
@@ -89,6 +90,7 @@ import KeyValuePairDemo from './KeyValuePairDemo'
8990
import AllComponentsDemo from './AllComponentsDemo'
9091
import SearchInputDemo from './SearchInputDemo'
9192
import VirtualListDemo from './VirtualListDemo'
93+
import UploadDemo from './UploadDemo'
9294
import CodeBlockDemo from './CodeBlockDemo'
9395

9496
const SidebarDemo = () => {
@@ -144,6 +146,7 @@ const SidebarDemo = () => {
144146
| 'dataRangePicker'
145147
| 'allComponents'
146148
| 'virtualList'
149+
| 'upload'
147150
| 'codeBlock'
148151
>('dataRangePicker')
149152

@@ -399,6 +402,8 @@ const SidebarDemo = () => {
399402
return <AllComponentsDemo />
400403
case 'virtualList':
401404
return <VirtualListDemo />
405+
case 'upload':
406+
return <UploadDemo />
402407
case 'codeBlock':
403408
return <CodeBlockDemo />
404409
default:
@@ -517,6 +522,13 @@ const SidebarDemo = () => {
517522
isSelected: activeComponent === 'virtualList',
518523
onClick: () => setActiveComponent('virtualList'),
519524
},
525+
{
526+
label: 'File Upload',
527+
leftSlot: (
528+
<Upload style={{ width: '16px', height: '16px' }} />
529+
),
530+
onClick: () => setActiveComponent('upload'),
531+
},
520532
],
521533
},
522534
{

0 commit comments

Comments
 (0)