Skip to content

Commit 3d71091

Browse files
Merge pull request #300 from softnetics/supakorn/fix/components
feat: UI component improvement.
2 parents b658cb8 + 1337a03 commit 3d71091

58 files changed

Lines changed: 1909 additions & 235 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/khaki-mayflies-fly.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@example/ui-playground": patch
3+
---
4+
5+
feat: UI component improvement focus on `tanstack-table` and `pagination`.

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"typescript.enablePromptUseWorkspaceTsdk": true,
4646
"typescript.tsdk": "node_modules/typescript/lib",
4747
"tailwindCSS.experimental.configFile": {
48-
"packages/react/src/react/styles/tailwind.css": "packages/react/**",
48+
"legacies/react/src/react/styles/tailwind.css": ["legacies/react/**", "packages/ui/**"],
4949
"examples/erp/src/app/(admin)/admin/tailwind.css": "examples/erp/src/app/(admin)/admin/**",
5050
"examples/ui-playground/src/styles/tailwind.css": "examples/ui-playground/**"
5151
},

examples/ui-playground/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@genseki/react": "workspace:^",
1717
"@genseki/react-query": "workspace:^",
1818
"@genseki/rest": "workspace:^",
19+
"@genseki/ui": "workspace:^",
1920
"@intentui/icons": "^1.10.31",
2021
"@phosphor-icons/react": "^2.1.8",
2122
"@tailwindcss/postcss": "^4.1.7",

examples/ui-playground/src/app/playground/shadcn/button-section.tsx

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,7 @@ import {
1515
SortDescendingIcon,
1616
} from '@phosphor-icons/react'
1717

18-
import {
19-
Button,
20-
ButtonGroup,
21-
ButtonGroupSeparator,
22-
ButtonGroupText,
23-
Typography,
24-
} from '@genseki/react/v2'
18+
import { Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Typography } from '@genseki/ui'
2519

2620
import { PlaygroundCard } from '~/src/components/card'
2721

@@ -162,11 +156,35 @@ function LoadingButton() {
162156
function ButtonGroupBasic() {
163157
return (
164158
<ButtonGroup>
165-
<Button variant="outline">One</Button>
166-
<ButtonGroupSeparator />
167-
<Button variant="outline">Two</Button>
159+
<Button variant="outline" className="">
160+
One
161+
</Button>
162+
<Button variant="outline" className="">
163+
Two
164+
</Button>
165+
166+
<Button variant="outline" className="">
167+
Three
168+
</Button>
169+
</ButtonGroup>
170+
)
171+
}
172+
173+
// Button Group - Basic (primary)
174+
function ButtonGroupBasicPrimary() {
175+
return (
176+
<ButtonGroup>
177+
<Button variant="primary" className="">
178+
One
179+
</Button>
168180
<ButtonGroupSeparator />
169-
<Button variant="outline">Three</Button>
181+
<Button variant="primary" className="">
182+
Two
183+
</Button>
184+
185+
<Button variant="primary" className="">
186+
Three
187+
</Button>
170188
</ButtonGroup>
171189
)
172190
}
@@ -334,6 +352,19 @@ export function ButtonSection() {
334352
</div>
335353
</PlaygroundCard>
336354

355+
<PlaygroundCard
356+
title="Button Group - Basic (Primary & Separator)"
357+
categoryTitle="Composition"
358+
>
359+
<Typography type="body" className="text-muted-foreground mb-4">
360+
A simple button group with connected buttons in primary variants and button group
361+
separator.
362+
</Typography>
363+
<div className="p-4 bg-secondary w-full rounded-lg">
364+
<ButtonGroupBasicPrimary />
365+
</div>
366+
</PlaygroundCard>
367+
337368
<PlaygroundCard title="Button Group - With Separators" categoryTitle="Composition">
338369
<Typography type="body" className="text-muted-foreground mb-4">
339370
Button groups with separators between buttons for visual distinction.

examples/ui-playground/src/app/playground/shadcn/checkbox-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22

33
import { CheckIcon, MinusIcon, XIcon } from '@phosphor-icons/react'
44

5-
import { Checkbox, Label, Typography } from '@genseki/react/v2'
5+
import { Checkbox, Label, Typography } from '@genseki/ui'
66

77
import { PlaygroundCard } from '~/src/components/card'
88

examples/ui-playground/src/app/playground/shadcn/collapsible-section.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
VideoIcon,
1212
} from '@phosphor-icons/react'
1313

14-
import { Button, Typography } from '@genseki/react/v2'
15-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@genseki/react/v2'
14+
import { Button, Typography } from '@genseki/ui'
15+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@genseki/ui'
1616

1717
import { PlaygroundCard } from '~/src/components/card'
1818

examples/ui-playground/src/app/playground/shadcn/collection-card-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
CollectionCardIcon,
99
CollectionCardTitle,
1010
Typography,
11-
} from '@genseki/react/v2'
11+
} from '@genseki/ui'
1212

1313
export function CollectionCardSection() {
1414
return (

examples/ui-playground/src/app/playground/shadcn/color-picker-section.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
PopoverTrigger,
1010
Typography,
1111
useColorPicker,
12-
} from '@genseki/react/v2'
12+
} from '@genseki/ui'
1313
import {
1414
ColorPicker,
1515
ColorPickerAlpha,
@@ -23,7 +23,7 @@ import {
2323
SelectItem,
2424
SelectTrigger,
2525
SelectValue,
26-
} from '@genseki/react/v2'
26+
} from '@genseki/ui'
2727

2828
import { InformationCard, PlaygroundCard } from '~/src/components/card'
2929

examples/ui-playground/src/app/playground/shadcn/combobox-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
InputGroupControl,
1919
InputGroupText,
2020
Typography,
21-
} from '@genseki/react/v2'
21+
} from '@genseki/ui'
2222

2323
import { PlaygroundCard } from '~/src/components/card'
2424

examples/ui-playground/src/app/playground/shadcn/date-picker-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
PopoverContent,
2626
PopoverTrigger,
2727
Typography,
28-
} from '@genseki/react/v2'
28+
} from '@genseki/ui'
2929

3030
import { InformationCard, PlaygroundCard } from '../../../components/card'
3131

0 commit comments

Comments
 (0)