-
-
Notifications
You must be signed in to change notification settings - Fork 125
UI #1055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
UI #1055
Changes from 49 commits
Commits
Show all changes
114 commits
Select commit
Hold shift + click to select a range
40012b9
feat(ui): add background color to outline button and input
nelsonlaidev 4bf22e3
feat: remove ui and utils packages
nelsonlaidev 4af4957
chore: remove an unused release
nelsonlaidev bef0d38
feat: ui
nelsonlaidev a644754
feat(docs): remove blur fade
nelsonlaidev 0e259d4
refactor: remove blur image from ui
nelsonlaidev ac390ce
feat: callout -> alert
nelsonlaidev a64d91e
refactor: classes sort
nelsonlaidev 57f3851
fix(docs): correct cn path
nelsonlaidev 6284ef2
refactor: misc
nelsonlaidev 18812e7
feat(docs): remove ark references
nelsonlaidev 91a419a
feat(docs): intro
nelsonlaidev 1b8b297
feat(docs): ark ui badge
nelsonlaidev 4c6ecbc
feat(docs): update intro
nelsonlaidev b03b543
feat(docs): add calendar and chart, add registry, fix generators
nelsonlaidev 20330ca
feat(docs): prepare for registry
nelsonlaidev fadd9a7
refactor(docs): shorter classes
nelsonlaidev 94ba2f7
feat(docs): ark ui badges
nelsonlaidev a3fa2d2
feat(ui): add back ui for cli
nelsonlaidev 3e76548
feat(docs): manually installation
nelsonlaidev 0625141
fix(docs): set max width to demos
nelsonlaidev c345309
feat(docs): add info icon to alert component
nelsonlaidev c4202d0
feat(docs): change the image of aspect ratio demo
nelsonlaidev fafc3a9
feat(docs): update keyboard input element
nelsonlaidev b61105e
feat(docs): add installation
nelsonlaidev 7ac9afc
fix: export link variants
nelsonlaidev 216b8ac
fix(web): isPending prop is no longer available on Button
nelsonlaidev e6aaaad
feat(docs): data table
nelsonlaidev 5554cef
feat: ui package approach
nelsonlaidev 2af0b85
chore: move get-abbr to utils
nelsonlaidev 481630c
chore: check diff
nelsonlaidev ff4aa9d
chore: see diff
nelsonlaidev d8f1d01
feat(docs): remove installation
nelsonlaidev c478824
fix(docs): correct alert usage
nelsonlaidev f222a38
chore: see diff
nelsonlaidev f7eb93c
chore: see diff
nelsonlaidev 6a51711
chore: see diff
nelsonlaidev dc75be0
chore: update pnpm lock
nelsonlaidev 62f0ee9
refactor: remove unused files, unnecessary size-4
nelsonlaidev 0b9f901
feat(ui): re-export constants from input one time password
nelsonlaidev 60b8c86
style: &&
nelsonlaidev b7019de
chore: update knip config
nelsonlaidev ec23d1c
refactor(web): remove unnecessary inline in theme
nelsonlaidev 63598b8
refactor(web): should import range function from utils package
nelsonlaidev fa978c6
refactor(docs): remove unnecessary use client directive
nelsonlaidev 102f7fb
fix(ui): add back the `useTheme()` in sonner
nelsonlaidev fa43ac9
refactor(ui): update variable names
nelsonlaidev 39694bf
refactor(ui): shorter destructure
nelsonlaidev 4a7b4aa
refactor(ui): export link variants at the bottom
nelsonlaidev 4b5947a
chore: move /ui/components to /ui
nelsonlaidev 5fb87ca
feat(docs): add new utilities section with links for various utility …
nelsonlaidev 4be3b3f
feat(ui): add html and css icons in code block
nelsonlaidev fa2986b
feat(docs): add a guide for UI
nelsonlaidev 87a8de1
feat(docs): docs for peer dependencies
nelsonlaidev 92e363e
feat(ui): react-textarea-autosize
nelsonlaidev f5f990a
chore: changeset
nelsonlaidev ccbdcf3
fix(web): update avatar usage
nelsonlaidev b40670a
fix(web): add aria-label to profile dropdown on admin header
nelsonlaidev 584d921
feat(ui): data table
nelsonlaidev 1daec1a
docs: update release notes
nelsonlaidev 8493967
chore: update cspell config to always use lowercase in word list
nelsonlaidev 67cd572
feat(docs): update usage part in data table docs
nelsonlaidev 9b58bdc
refactor(web): remove unnecessary new Date in comments router
nelsonlaidev 1953b94
chore: remove unnecessary dependency
nelsonlaidev b496390
feat(docs): enhance data table demo with advanced filtering and toolb…
nelsonlaidev 995aacf
fix(docs): wrap Mdx component in Suspense for fixing useSearchParams …
nelsonlaidev 8a8dcde
feat(web): enhance comments and users tables with additional data pro…
nelsonlaidev 8156a6e
fix(i18n): correct placement of 'createdAt' key in Chinese translations
nelsonlaidev 71d221d
feat(ui): add sortable component with drag-and-drop functionality and…
nelsonlaidev 624b8b4
fix: include optional isArkUI property in component generator
nelsonlaidev 5e92512
chore: add license and copyright information to data-table and sortab…
nelsonlaidev c3649b8
feat(ui): implement sorting in comments & users tables with new DataT…
nelsonlaidev 163519c
refactor(emails): rename Comment and Reply components
nelsonlaidev 10dd94d
refactor(web): rename type to parentId and update related logic in co…
nelsonlaidev 79a34bb
refactor(web): update sorting logic
nelsonlaidev 2070421
refactor(ui): remove unused exports
nelsonlaidev b8e274c
chore: update caching-for-turbo action to version 1.7
nelsonlaidev 1b13d5b
chore: update caching-for-turbo action to version 1.8
nelsonlaidev 02e2847
refactor(web): replace Skeleton with DataTableSkeleton for loading st…
nelsonlaidev e00d9b7
refactor(ui): remove 'use client' directive from multiple files
nelsonlaidev 6035a0e
feat: use tRPC server for admin routes
nelsonlaidev 1ddcd5d
fix(docs): correct title formatting in code block documentation
nelsonlaidev cff2551
fix(docs): update description for Tree View component
nelsonlaidev 5abeedb
refactor: update package.json and tsup.config.ts files to use exports…
nelsonlaidev b7b73d4
refactor: remove exports field from package.json and set main entry p…
nelsonlaidev aea526d
feat: update TypeScript configuration and package generator
nelsonlaidev 4d3ad79
refactor: remove tsconfig.app.json files and update package.json for …
nelsonlaidev 7ed48e8
refactor(env): remove exports field from package.json and set main en…
nelsonlaidev e76cd68
fix: update prepare script to include package build step
nelsonlaidev 70a923e
refactor: move some exports to their own file
nelsonlaidev 766dcde
feat: add @rsbuild/plugin-react dependency and update configuration
nelsonlaidev 6bbbe92
feat: add 'use client' directive to multiple component files
nelsonlaidev 9deec8e
fix: missing headers in TRPC context creation
nelsonlaidev 981795f
refactor: remove unused export keyword
nelsonlaidev 518a52f
refactor: remove tailwindcss configuration and related dependencies
nelsonlaidev cfe3233
refactor: update TypeScript include patterns in tsconfig files
nelsonlaidev af50788
refactor: remove unused environment variables from configuration files
nelsonlaidev d081a5c
fix(web): add missing hydrate client in admin users page.tsx
nelsonlaidev 1a0c668
refactor(web): remove unused icon in admin comments table
nelsonlaidev 6fda136
fix: update main entry point and clean up unused dependencies in pack…
nelsonlaidev 4de7a2f
refactor: simplify package.json by removing exports field
nelsonlaidev e49a72c
refactor(web): use client-side tRPC in admin routes
nelsonlaidev 81b7f1f
fix(web): missing use client directive
nelsonlaidev e4a2575
refactor(web): enhance query handling in admin comments and users pages
nelsonlaidev 6e56a87
style: format package.json
nelsonlaidev 58ce057
refactor: update comment for clarity in knip.config.ts
nelsonlaidev 06f8fbf
refactor: remove unused tsx entry in knip.config.ts
nelsonlaidev 62de885
refactor: remove unused tsconfig.app.json file
nelsonlaidev 1eafe48
refactor: update tsconfig.lint.json to include .tsx files for React s…
nelsonlaidev d33b8e9
refactor: remove tsconfig.lint.json files and update tsconfig.json to…
nelsonlaidev 0a57faf
chore: changeset
nelsonlaidev c586f65
fix(docs): specify version for react-day-picker installation in docum…
nelsonlaidev 7bb87fa
chore(ui): update dependencies in package.json and pnpm-lock.yaml
nelsonlaidev 36e82e0
refactor(docs): remove installation instructions for Calendar, Chart,…
nelsonlaidev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { Alert, AlertDescription, AlertTitle } from '@tszhong0411/ui' | ||
| import { CheckCircle2Icon } from 'lucide-react' | ||
|
|
||
| const AlertDemo = () => { | ||
| return ( | ||
| <Alert className='max-w-md'> | ||
| <CheckCircle2Icon /> | ||
| <AlertTitle>Success! Your changes have been saved</AlertTitle> | ||
| <AlertDescription>This is an alert with icon, title and description.</AlertDescription> | ||
| </Alert> | ||
| ) | ||
| } | ||
|
|
||
| export default AlertDemo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { Alert, AlertDescription, AlertTitle } from '@tszhong0411/ui' | ||
| import { AlertCircleIcon } from 'lucide-react' | ||
|
|
||
| const AlertDestructiveDemo = () => { | ||
| return ( | ||
| <Alert variant='destructive' className='max-w-md'> | ||
| <AlertCircleIcon /> | ||
| <AlertTitle>Something went wrong!</AlertTitle> | ||
| <AlertDescription>Your session has expired. Please log in again.</AlertDescription> | ||
| </Alert> | ||
| ) | ||
| } | ||
|
|
||
| export default AlertDestructiveDemo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,13 @@ | ||
| import { Button } from '@tszhong0411/ui' | ||
| import { LoaderIcon } from 'lucide-react' | ||
|
|
||
| const ButtonPendingDemo = () => { | ||
| return <Button isPending>Pending</Button> | ||
| return ( | ||
| <Button> | ||
| <LoaderIcon className='animate-spin' /> | ||
| Pending | ||
| </Button> | ||
| ) | ||
| } | ||
|
|
||
| export default ButtonPendingDemo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| 'use client' | ||
|
|
||
| import { Calendar } from '@tszhong0411/ui' | ||
| import { useState } from 'react' | ||
|
|
||
| const CalendarDemo = () => { | ||
| const [date, setDate] = useState<Date | undefined>(() => new Date()) | ||
|
|
||
| return ( | ||
| <Calendar | ||
| mode='single' | ||
| selected={date} | ||
| onSelect={setDate} | ||
| className='rounded-md border shadow-sm' | ||
| /> | ||
| ) | ||
| } | ||
|
|
||
| export default CalendarDemo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| 'use client' | ||
|
|
||
| import type { DateRange } from 'react-day-picker' | ||
|
|
||
| import { Calendar } from '@tszhong0411/ui' | ||
| import { addDays } from 'date-fns' | ||
| import { useState } from 'react' | ||
|
|
||
| const CalendarRangeDemo = () => { | ||
| const [dateRange, setDateRange] = useState<DateRange | undefined>(() => ({ | ||
| from: new Date(new Date().getFullYear(), 0, 12), | ||
| to: addDays(new Date(new Date().getFullYear(), 0, 12), 30) | ||
| })) | ||
| const [range, setRange] = useState<DateRange | undefined>(() => ({ | ||
| from: new Date(new Date().getFullYear(), 0, 12), | ||
| to: addDays(new Date(new Date().getFullYear(), 0, 12), 50) | ||
| })) | ||
|
|
||
| return ( | ||
| <div> | ||
| <Calendar | ||
| mode='range' | ||
| defaultMonth={dateRange?.from} | ||
| selected={dateRange} | ||
| onSelect={setDateRange} | ||
| numberOfMonths={2} | ||
| disabled={(d) => d > new Date() || d < new Date('1900-01-01')} | ||
| className='rounded-md border shadow-sm' | ||
| /> | ||
| <Calendar | ||
| mode='range' | ||
| defaultMonth={range?.from} | ||
| selected={range} | ||
| onSelect={setRange} | ||
| numberOfMonths={3} | ||
| className='@4xl:flex hidden rounded-md border shadow-sm [&>div]:gap-5' | ||
| /> | ||
| </div> | ||
| ) | ||
| } | ||
|
|
||
| export default CalendarRangeDemo |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| 'use client' | ||
|
|
||
| import { | ||
| Card, | ||
| CardContent, | ||
| CardDescription, | ||
| CardFooter, | ||
| CardHeader, | ||
| CardTitle | ||
| } from '@tszhong0411/ui' | ||
| import { | ||
| type ChartConfig, | ||
| ChartContainer, | ||
| ChartTooltip, | ||
| ChartTooltipContent | ||
| } from '@tszhong0411/ui' | ||
| import { TrendingUpIcon } from 'lucide-react' | ||
| import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts' | ||
|
|
||
| const chartData = [ | ||
| { month: 'January', desktop: 186 }, | ||
| { month: 'February', desktop: 305 }, | ||
| { month: 'March', desktop: 237 }, | ||
| { month: 'April', desktop: 73 }, | ||
| { month: 'May', desktop: 209 }, | ||
| { month: 'June', desktop: 214 } | ||
| ] | ||
|
|
||
| const chartConfig = { | ||
| desktop: { | ||
| label: 'Desktop', | ||
| color: 'var(--chart-1)' | ||
| } | ||
| } satisfies ChartConfig | ||
|
|
||
| const ChartDemo = () => { | ||
| return ( | ||
| <Card className='w-full max-w-md'> | ||
| <CardHeader> | ||
| <CardTitle>Area Chart</CardTitle> | ||
| <CardDescription>Showing total visitors for the last 6 months</CardDescription> | ||
| </CardHeader> | ||
| <CardContent> | ||
| <ChartContainer config={chartConfig}> | ||
| <AreaChart | ||
| accessibilityLayer | ||
| data={chartData} | ||
| margin={{ | ||
| left: 12, | ||
| right: 12 | ||
| }} | ||
| > | ||
| <CartesianGrid vertical={false} /> | ||
| <XAxis | ||
| dataKey='month' | ||
| tickLine={false} | ||
| axisLine={false} | ||
| tickMargin={8} | ||
| tickFormatter={(value: string) => value.slice(0, 3)} | ||
| /> | ||
| <ChartTooltip cursor={false} content={<ChartTooltipContent indicator='line' />} /> | ||
| <Area | ||
| dataKey='desktop' | ||
| type='natural' | ||
| fill='var(--color-desktop)' | ||
| fillOpacity={0.4} | ||
| stroke='var(--color-desktop)' | ||
| /> | ||
| </AreaChart> | ||
| </ChartContainer> | ||
| </CardContent> | ||
| <CardFooter> | ||
| <div className='flex w-full items-start gap-2 text-sm'> | ||
| <div className='grid gap-2'> | ||
| <div className='flex items-center gap-2 font-medium leading-none'> | ||
| Trending up by 5.2% this month <TrendingUpIcon className='size-4' /> | ||
| </div> | ||
| <div className='text-muted-foreground flex items-center gap-2 leading-none'> | ||
| January - June 2024 | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </CardFooter> | ||
| </Card> | ||
| ) | ||
| } | ||
|
|
||
| export default ChartDemo | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.