Skip to content

Commit a5f4189

Browse files
Merge pull request #249 from softnetics/supakorn/migrate/components
migrate `date-picker`, `time-input` and more fixes
2 parents fcaad14 + 1c47e0d commit a5f4189

38 files changed

Lines changed: 1351 additions & 170 deletions

.changeset/gold-jars-exercise.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"@example/erp": patch
3+
"@example/ui-playground": patch
4+
"@genseki/react": patch
5+
---
6+
7+
migrate `date-picker`, `time-input` and more fixes
8+
9+
1. `typography` component now in the `v2`
10+
2. Add example for server side sidebar toggle state as a default value (Via data hydration)
11+
3. Fix `breadcrumb` focus ring color
12+
4. Fix `sidebar-footer` example, focus ring color.
13+
5. Fix `group-input-addon` focusing state
14+
6. Fix `group-input` disable background color
15+
7. Change button variant `default` to `md`
16+
8. Make `button-section` and `input-section` default background color to secondary color, so background color of input will be noticable
17+
9. Add `date-picker` examples (at `date-picker-section`)
18+
10. Add `time-input` examples (at `input-section`)
19+
11. New dependencies `date-fns` for `@example/ui-playground` and `react-day-picker` as a peer dependency for `@genseki/react`

examples/erp/genseki/auth/setup/setup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Typography } from '@genseki/react'
1+
import { Typography } from '@genseki/react/v2'
22

33
import { SetupClientForm } from './setup.client'
44

examples/ui-playground/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
"@tailwindcss/postcss": "^4.1.7",
2222
"@tanstack/react-query": "^5.71.5",
2323
"@tiptap/starter-kit": "^2.26.3",
24+
"date-fns": "^4.1.0",
2425
"next": "15.2.2",
2526
"next-themes": "^0.4.6",
2627
"postcss": "^8.5.3",
2728
"react": "19.1.0",
29+
"react-day-picker": "^9.11.1",
2830
"react-dom": "19.1.0",
2931
"tailwindcss": "^4.1.7",
3032
"zod": "4.0.11"

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

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

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

2126
import { PlaygroundCard } from '~/src/components/card'
2227

@@ -68,7 +73,7 @@ function ButtonSizes() {
6873
<MagnifyingGlassIcon />
6974
Small
7075
</Button>
71-
<Button size="default">
76+
<Button size="md">
7277
<MagnifyingGlassIcon />
7378
Default
7479
</Button>
@@ -270,7 +275,7 @@ export function ButtonSection() {
270275
<Typography type="body" className="text-muted-foreground mb-4">
271276
Different button variants with various styles and purposes.
272277
</Typography>
273-
<div className="p-4 bg-background w-full rounded-lg">
278+
<div className="p-4 bg-secondary w-full rounded-lg">
274279
<ButtonVariants />
275280
</div>
276281
</PlaygroundCard>
@@ -279,7 +284,7 @@ export function ButtonSection() {
279284
<Typography type="body" className="text-muted-foreground mb-4">
280285
Buttons come in three sizes: small, default, and large.
281286
</Typography>
282-
<div className="p-4 bg-background w-full rounded-lg">
287+
<div className="p-4 bg-secondary w-full rounded-lg">
283288
<ButtonSizes />
284289
</div>
285290
</PlaygroundCard>
@@ -288,7 +293,7 @@ export function ButtonSection() {
288293
<Typography type="body" className="text-muted-foreground mb-4">
289294
Icon-only buttons in different sizes.
290295
</Typography>
291-
<div className="p-4 bg-background w-full rounded-lg">
296+
<div className="p-4 bg-secondary w-full rounded-lg">
292297
<IconButtons />
293298
</div>
294299
</PlaygroundCard>
@@ -297,7 +302,7 @@ export function ButtonSection() {
297302
<Typography type="body" className="text-muted-foreground mb-4">
298303
Buttons with icons alongside text labels.
299304
</Typography>
300-
<div className="p-4 bg-background w-full rounded-lg">
305+
<div className="p-4 bg-secondary w-full rounded-lg">
301306
<ButtonsWithIcons />
302307
</div>
303308
</PlaygroundCard>
@@ -306,7 +311,7 @@ export function ButtonSection() {
306311
<Typography type="body" className="text-muted-foreground mb-4">
307312
Buttons can be disabled or show a pending/loading state.
308313
</Typography>
309-
<div className="p-4 bg-background w-full rounded-lg">
314+
<div className="p-4 bg-secondary w-full rounded-lg">
310315
<ButtonStates />
311316
</div>
312317
</PlaygroundCard>
@@ -315,7 +320,7 @@ export function ButtonSection() {
315320
<Typography type="body" className="text-muted-foreground mb-4">
316321
A button that shows loading state during async operations.
317322
</Typography>
318-
<div className="p-4 bg-background w-full rounded-lg">
323+
<div className="p-4 bg-secondary w-full rounded-lg">
319324
<LoadingButton />
320325
</div>
321326
</PlaygroundCard>
@@ -324,7 +329,7 @@ export function ButtonSection() {
324329
<Typography type="body" className="text-muted-foreground mb-4">
325330
A simple button group with connected buttons.
326331
</Typography>
327-
<div className="p-4 bg-background w-full rounded-lg">
332+
<div className="p-4 bg-secondary w-full rounded-lg">
328333
<ButtonGroupBasic />
329334
</div>
330335
</PlaygroundCard>
@@ -333,7 +338,7 @@ export function ButtonSection() {
333338
<Typography type="body" className="text-muted-foreground mb-4">
334339
Button groups with separators between buttons for visual distinction.
335340
</Typography>
336-
<div className="p-4 bg-background w-full rounded-lg">
341+
<div className="p-4 bg-secondary w-full rounded-lg">
337342
<ButtonGroupWithSeparators />
338343
</div>
339344
</PlaygroundCard>
@@ -342,7 +347,7 @@ export function ButtonSection() {
342347
<Typography type="body" className="text-muted-foreground mb-4">
343348
Button groups with text labels and icons for better context.
344349
</Typography>
345-
<div className="p-4 bg-background w-full rounded-lg">
350+
<div className="p-4 bg-secondary w-full rounded-lg">
346351
<ButtonGroupWithText />
347352
</div>
348353
</PlaygroundCard>
@@ -351,7 +356,7 @@ export function ButtonSection() {
351356
<Typography type="body" className="text-muted-foreground mb-4">
352357
Vertical button groups for stacked layouts.
353358
</Typography>
354-
<div className="p-4 bg-background w-full rounded-lg">
359+
<div className="p-4 bg-secondary w-full rounded-lg">
355360
<ButtonGroupVertical />
356361
</div>
357362
</PlaygroundCard>
@@ -360,7 +365,7 @@ export function ButtonSection() {
360365
<Typography type="body" className="text-muted-foreground mb-4">
361366
Button groups with different button variants mixed together.
362367
</Typography>
363-
<div className="p-4 bg-background w-full rounded-lg">
368+
<div className="p-4 bg-secondary w-full rounded-lg">
364369
<ButtonGroupVariants />
365370
</div>
366371
</PlaygroundCard>

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

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

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

1817
import { PlaygroundCard } from '~/src/components/card'

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

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

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

5-
import { Typography } from '@genseki/react'
65
import {
76
Button,
87
ComboboxCommandEmpty,
@@ -14,6 +13,7 @@ import {
1413
ComboboxProvider,
1514
ComboboxTrigger,
1615
ComboboxTriggerMultiValue,
16+
Typography,
1717
} from '@genseki/react/v2'
1818

1919
import { PlaygroundCard } from '~/src/components/card'

0 commit comments

Comments
 (0)