@godxjp/ui 19.2.0 → 19.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/components/data-display/badge.d.ts +18 -2
  2. package/dist/components/data-display/badge.js +18 -4
  3. package/dist/props/components/data-display.prop.d.ts +7 -0
  4. package/dist/props/registry.d.ts +5 -1
  5. package/dist/props/registry.js +12 -1
  6. package/dist/styles/badge-layout.css +15 -0
  7. package/dist/tokens/components/badge.css +8 -0
  8. package/docs/data-display/badge.tsx +36 -0
  9. package/docs/data-display/carousel.tsx +8 -4
  10. package/docs/data-display/data-table/examples/grid-features.tsx +1 -1
  11. package/docs/data-display/permission-matrix.tsx +13 -9
  12. package/docs/data-display/popover.tsx +2 -1
  13. package/docs/data-display/scroll-area.tsx +107 -75
  14. package/docs/data-display/table.tsx +1 -1
  15. package/docs/data-entry/calendar.tsx +1 -1
  16. package/docs/data-entry/checkbox.tsx +1 -1
  17. package/docs/data-entry/country-picker-recipe.tsx +11 -6
  18. package/docs/data-entry/form-field/index.tsx +33 -29
  19. package/docs/data-entry/form-root.tsx +1 -1
  20. package/docs/data-entry/password-input.tsx +1 -5
  21. package/docs/data-entry/select.tsx +7 -7
  22. package/docs/data-entry/textarea.tsx +2 -2
  23. package/docs/feedback/sheet.tsx +112 -102
  24. package/docs/feedback/skeleton.tsx +2 -2
  25. package/docs/foundation/colors.tsx +8 -6
  26. package/docs/foundation/email-tokens.tsx +82 -65
  27. package/docs/foundation/radius-shadow.tsx +13 -11
  28. package/docs/layout/app-shell.tsx +2 -2
  29. package/docs/layout/aspect-ratio.tsx +30 -14
  30. package/docs/layout/flex.tsx +6 -2
  31. package/docs/layout/page-container.tsx +9 -1
  32. package/docs/layout/responsive-grid.tsx +10 -2
  33. package/docs/layout/sidebar.tsx +169 -146
  34. package/docs/layout/split-pane.tsx +44 -27
  35. package/docs/layout/topbar.tsx +17 -15
  36. package/docs/navigation/app-setting-picker.tsx +5 -4
  37. package/docs/navigation/breadcrumb.tsx +12 -5
  38. package/docs/navigation/context-menu.tsx +10 -4
  39. package/docs/navigation/navigation-menu.tsx +89 -96
  40. package/docs/navigation/steps.tsx +12 -10
  41. package/docs/navigation/tabs.tsx +26 -20
  42. package/docs/navigation/toolbar.tsx +15 -15
  43. package/docs/providers/format-date.tsx +2 -2
  44. package/docs/showcase/acme-portal.tsx +41 -27
  45. package/docs/showcase/acme-website.tsx +60 -54
  46. package/docs/showcase/case1-warehouse-dashboard.tsx +46 -30
  47. package/docs/showcase/case2-employee-me.tsx +23 -20
  48. package/docs/showcase/case3-approval-workflow.tsx +34 -32
  49. package/docs/showcase/case4-login.tsx +119 -113
  50. package/docs/showcase/case5-shift-calendar.tsx +3 -3
  51. package/docs/showcase/case6-agency-handy.tsx +340 -299
  52. package/docs/showcase/futurelastic-web.tsx +23 -21
  53. package/docs/showcase/org-switcher.tsx +2 -2
  54. package/docs/showcase/permission-matrix.tsx +7 -4
  55. package/docs/showcase/table-conditional-format.tsx +8 -8
  56. package/docs/showcase/table-crud-list.tsx +3 -3
  57. package/docs/showcase/table-density.tsx +49 -42
  58. package/docs/showcase/table-expandable-rows.tsx +24 -15
  59. package/docs/showcase/table-filter-chips.tsx +2 -7
  60. package/docs/showcase/table-footer-totals.tsx +7 -4
  61. package/docs/showcase/table-grouped-subtotals.tsx +25 -22
  62. package/docs/showcase/table-master-detail.tsx +15 -10
  63. package/docs/showcase/table-pagination.tsx +34 -27
  64. package/docs/showcase/table-states.tsx +8 -5
  65. package/docs/showcase/table-sticky-columns.tsx +8 -5
  66. package/package.json +2 -3
@@ -121,7 +121,7 @@ function Navbar() {
121
121
  <span className="tx-brand" data-logotype="">
122
122
  TIXI<span className="tx-gold">MAX</span>
123
123
  </span>
124
- <Flex direction="row" gap="xs" align="center" className="ms-2">
124
+ <Flex direction="row" gap="xs" align="center">
125
125
  {links.map((l, i) => (
126
126
  <Button key={l} variant="ghost" size="sm" aria-current={i === 0 ? "page" : undefined}>
127
127
  {l}
@@ -156,7 +156,7 @@ function Hero() {
156
156
  <section className="tx-navy relative overflow-hidden">
157
157
  <div className="tx-glow tx-glow-tr" />
158
158
  <div className={`${SHELL} tx-hero-grid relative`}>
159
- <div>
159
+ <Flex direction="col" gap="xl">
160
160
  <div className="tx-eyebrow">Mua hộ &amp; vận chuyển quốc tế</div>
161
161
  <h1 className="tx-display">
162
162
  Mua sắm toàn cầu,
@@ -167,7 +167,7 @@ function Hero() {
167
167
  Đặt mua, thanh toán và vận chuyển hàng từ Nhật, Hàn, Indonesia và Mỹ về tận nhà. Minh
168
168
  bạch chi phí, theo dõi từng bước.
169
169
  </p>
170
- <Flex direction="row" gap="md" className="mt-6">
170
+ <Flex direction="row" gap="md">
171
171
  <Button size="lg">
172
172
  Nhận báo giá miễn phí
173
173
  <ArrowRight aria-hidden="true" />
@@ -177,7 +177,7 @@ function Hero() {
177
177
  Tra cứu đơn
178
178
  </Button>
179
179
  </Flex>
180
- <Flex direction="row" gap="lg" className="mt-10">
180
+ <Flex direction="row" gap="lg">
181
181
  {stats.map(([n, l]) => (
182
182
  <div key={l}>
183
183
  <div className="tx-stat">{n}</div>
@@ -187,34 +187,36 @@ function Hero() {
187
187
  </div>
188
188
  ))}
189
189
  </Flex>
190
- </div>
190
+ </Flex>
191
191
 
192
192
  <Card>
193
193
  <CardContent>
194
- <div className="tx-eyebrow">Ước tính phí vận chuyển</div>
195
- <Flex direction="col" gap="sm" className="mt-4">
196
- {fields.map(([Icon, label, value]) => (
197
- <div key={label} className="tx-field">
198
- <Icon aria-hidden="true" className="tx-gold tx-icon-18" />
199
- <div className="min-w-0 flex-1">
200
- <Text as="div" size="2xs" tone="muted">
201
- {label}
202
- </Text>
203
- <Text as="div" weight="bold">
204
- {value}
205
- </Text>
194
+ <Flex direction="col" gap="md">
195
+ <div className="tx-eyebrow">Ước tính phí vận chuyển</div>
196
+ <Flex direction="col" gap="sm">
197
+ {fields.map(([Icon, label, value]) => (
198
+ <div key={label} className="tx-field">
199
+ <Icon aria-hidden="true" className="tx-gold tx-icon-18" />
200
+ <div className="min-w-0 flex-1">
201
+ <Text as="div" size="2xs" tone="muted">
202
+ {label}
203
+ </Text>
204
+ <Text as="div" weight="bold">
205
+ {value}
206
+ </Text>
207
+ </div>
208
+ <ChevronDown aria-hidden="true" className="tx-icon-18" />
206
209
  </div>
207
- <ChevronDown aria-hidden="true" className="tx-icon-18" />
210
+ ))}
211
+ <div className="tx-quote-total">
212
+ <Text as="span" weight="bold" className="text-primary-foreground">
213
+ Tạm tính
214
+ </Text>
215
+ <Text as="span" weight="bold" size="2xl" className="text-primary-foreground">
216
+ 525.000đ
217
+ </Text>
208
218
  </div>
209
- ))}
210
- <div className="tx-quote-total">
211
- <Text as="span" weight="bold" className="text-primary-foreground">
212
- Tạm tính
213
- </Text>
214
- <Text as="span" weight="bold" size="2xl" className="text-primary-foreground">
215
- 525.000đ
216
- </Text>
217
- </div>
219
+ </Flex>
218
220
  </Flex>
219
221
  </CardContent>
220
222
  </Card>
@@ -281,13 +283,15 @@ function Services() {
281
283
  {items.map(([icon, t, d]) => (
282
284
  <Card key={t}>
283
285
  <CardContent>
284
- <Medallion icon={icon} />
285
- <Text as="div" weight="bold" size="lg" className="mt-4">
286
- {t}
287
- </Text>
288
- <Text as="p" size="sm" tone="muted" className="mt-1">
289
- {d}
290
- </Text>
286
+ <Flex direction="col" gap="md">
287
+ <Medallion icon={icon} />
288
+ <Text as="div" weight="bold" size="lg">
289
+ {t}
290
+ </Text>
291
+ <Text as="p" size="sm" tone="muted">
292
+ {d}
293
+ </Text>
294
+ </Flex>
291
295
  </CardContent>
292
296
  </Card>
293
297
  ))}
@@ -310,8 +314,8 @@ function Steps() {
310
314
  <SectionHead eyebrow="Quy trình" title="Mua hàng quốc tế trong 4 bước" />
311
315
  <ResponsiveGrid columns={{ sm: 1, md: 2, lg: 4 }}>
312
316
  {steps.map(([Icon, t, d], i) => (
313
- <div key={t}>
314
- <Flex direction="row" gap="sm" align="center" className="mb-3">
317
+ <Flex direction="col" gap="md" key={t}>
318
+ <Flex direction="row" gap="sm" align="center">
315
319
  <Avatar>
316
320
  <AvatarFallback className="bg-secondary text-primary font-bold">
317
321
  {i + 1}
@@ -322,10 +326,10 @@ function Steps() {
322
326
  <Text as="div" weight="bold" size="lg">
323
327
  {t}
324
328
  </Text>
325
- <Text as="p" size="sm" tone="muted" className="mt-1">
329
+ <Text as="p" size="sm" tone="muted">
326
330
  {d}
327
331
  </Text>
328
- </div>
332
+ </Flex>
329
333
  ))}
330
334
  </ResponsiveGrid>
331
335
  </div>
@@ -351,15 +355,17 @@ function Routes() {
351
355
  <span className="tx-route-code">{code}</span>
352
356
  </CardCover>
353
357
  <CardContent>
354
- <Text as="div" weight="bold" size="lg">
355
- {c}
356
- </Text>
357
- <Text as="div" size="xs" tone="muted" className="mt-1 mb-3">
358
- {mode}
359
- </Text>
360
- <Text as="div" weight="bold" size="2xl">
361
- {price}
362
- </Text>
358
+ <Flex direction="col" gap="md">
359
+ <Text as="div" weight="bold" size="lg">
360
+ {c}
361
+ </Text>
362
+ <Text as="div" size="xs" tone="muted">
363
+ {mode}
364
+ </Text>
365
+ <Text as="div" weight="bold" size="2xl">
366
+ {price}
367
+ </Text>
368
+ </Flex>
363
369
  </CardContent>
364
370
  </Card>
365
371
  ))}
@@ -376,7 +382,7 @@ function CtaBanner() {
376
382
  <div className={`${SHELL} relative text-center`}>
377
383
  <h2 className="tx-h2">Sẵn sàng cho đơn hàng đầu tiên?</h2>
378
384
  <p className="tx-lead mx-auto">Tạo tài khoản miễn phí và nhận báo giá trong 5 phút.</p>
379
- <Flex direction="row" gap="md" className="mt-6 justify-center">
385
+ <Flex direction="row" gap="md" justify="center">
380
386
  <Button size="lg">
381
387
  <UserPlus aria-hidden="true" />
382
388
  Đăng ký ngay
@@ -399,18 +405,18 @@ function Footer() {
399
405
  return (
400
406
  <footer className="tx-navy tx-navy-deep">
401
407
  <div className={`${SHELL} tx-footer-grid`} style={{ paddingBlock: "3.5rem 2rem" }}>
402
- <div>
408
+ <Flex direction="col" gap="md">
403
409
  <span className="tx-brand">
404
410
  TIXI<span className="tx-gold">MAX</span>
405
411
  </span>
406
- <Text as="p" size="sm" tone="muted" className="mt-4">
412
+ <Text as="p" size="sm" tone="muted">
407
413
  Dịch vụ mua hộ &amp; vận chuyển quốc tế uy tín, minh bạch về tận nhà bạn.
408
414
  </Text>
409
- </div>
415
+ </Flex>
410
416
  {cols.map(([h, items]) => (
411
- <div key={h}>
417
+ <Flex direction="col" gap="md" key={h}>
412
418
  <div className="tx-eyebrow">{h}</div>
413
- <Flex direction="col" gap="xs" className="mt-3">
419
+ <Flex direction="col" gap="xs">
414
420
  {items.map((i) => (
415
421
  <Button
416
422
  key={i}
@@ -422,7 +428,7 @@ function Footer() {
422
428
  </Button>
423
429
  ))}
424
430
  </Flex>
425
- </div>
431
+ </Flex>
426
432
  ))}
427
433
  </div>
428
434
  <div className={`${SHELL} tx-footer-bottom`}>
@@ -38,8 +38,8 @@ import {
38
38
  import { Button, Text } from "@godxjp/ui/general";
39
39
  import {
40
40
  Badge,
41
- type BadgeProps,
42
41
  Card,
42
+ CardAction,
43
43
  CardContent,
44
44
  CardHeader,
45
45
  CardTitle,
@@ -52,6 +52,7 @@ import {
52
52
  TableHeader,
53
53
  TableRow,
54
54
  Timeline,
55
+ type BadgeProps,
55
56
  type TimelineItem,
56
57
  } from "@godxjp/ui/data-display";
57
58
 
@@ -228,29 +229,38 @@ export default function WarehouseDashboardShowcase() {
228
229
  {/* Queue + Activity */}
229
230
  <ResponsiveGrid columns={{ sm: 1, md: 1, lg: 2 }}>
230
231
  <Card className="self-start">
231
- <CardHeader className="flex flex-row items-center justify-between">
232
+ <CardHeader>
232
233
  <CardTitle level={2}>Cần xử lý</CardTitle>
233
- <Text size="xs" tone="muted">
234
- {QUEUE.length} hàng đợi
235
- </Text>
234
+ <CardAction>
235
+ <Text size="xs" tone="muted">
236
+ {QUEUE.length} hàng đợi
237
+ </Text>
238
+ </CardAction>
236
239
  </CardHeader>
237
240
  <CardContent flush>
238
241
  <ul className="divide-border divide-y">
239
242
  {QUEUE.map((q) => {
240
243
  return (
241
- <li key={q.title} className="flex items-center gap-3 px-4 py-3">
242
- <Badge tone={q.tone} variant="outline" icon={q.icon} aria-label={q.title} />
243
- <div className="min-w-0 flex-1">
244
- <Text as="div" size="sm" weight="medium" truncate>
245
- {q.title}
246
- </Text>
247
- <Text as="div" size="2xs" tone="muted" truncate>
248
- {q.meta}
249
- </Text>
250
- </div>
251
- <Button variant="outline" size="sm">
252
- {q.action}
253
- </Button>
244
+ <li key={q.title} className="px-4 py-3">
245
+ <Flex align="center" gap="md">
246
+ <Badge
247
+ tone={q.tone}
248
+ variant="outline"
249
+ icon={q.icon}
250
+ aria-label={q.title}
251
+ />
252
+ <div className="min-w-0 flex-1">
253
+ <Text as="div" size="sm" weight="medium" truncate>
254
+ {q.title}
255
+ </Text>
256
+ <Text as="div" size="2xs" tone="muted" truncate>
257
+ {q.meta}
258
+ </Text>
259
+ </div>
260
+ <Button variant="outline" size="sm">
261
+ {q.action}
262
+ </Button>
263
+ </Flex>
254
264
  </li>
255
265
  );
256
266
  })}
@@ -259,11 +269,13 @@ export default function WarehouseDashboardShowcase() {
259
269
  </Card>
260
270
 
261
271
  <Card className="self-start">
262
- <CardHeader className="flex flex-row items-center justify-between">
272
+ <CardHeader>
263
273
  <CardTitle level={2}>Hoạt động gần đây</CardTitle>
264
- <Text size="xs" tone="muted">
265
- 24h qua
266
- </Text>
274
+ <CardAction>
275
+ <Text size="xs" tone="muted">
276
+ 24h qua
277
+ </Text>
278
+ </CardAction>
267
279
  </CardHeader>
268
280
  <CardContent>
269
281
  <Timeline items={ACTIVITY} />
@@ -274,11 +286,13 @@ export default function WarehouseDashboardShowcase() {
274
286
  {/* Capacity + Recent shipments */}
275
287
  <ResponsiveGrid columns={{ sm: 1, md: 1, lg: 2 }}>
276
288
  <Card className="self-start">
277
- <CardHeader className="flex flex-row items-center justify-between">
289
+ <CardHeader>
278
290
  <CardTitle level={2}>Dung lượng giá hàng</CardTitle>
279
- <Button variant="ghost" size="sm">
280
- Xem tất cả
281
- </Button>
291
+ <CardAction>
292
+ <Button variant="ghost" size="sm">
293
+ Xem tất cả
294
+ </Button>
295
+ </CardAction>
282
296
  </CardHeader>
283
297
  <CardContent>
284
298
  <Flex direction="col" gap="md">
@@ -298,11 +312,13 @@ export default function WarehouseDashboardShowcase() {
298
312
  </Card>
299
313
 
300
314
  <Card className="self-start">
301
- <CardHeader className="flex flex-row items-center justify-between">
315
+ <CardHeader>
302
316
  <CardTitle level={2}>Chuyến gần nhất</CardTitle>
303
- <Button variant="ghost" size="sm">
304
- Tất cả
305
- </Button>
317
+ <CardAction>
318
+ <Button variant="ghost" size="sm">
319
+ Tất cả
320
+ </Button>
321
+ </CardAction>
306
322
  </CardHeader>
307
323
  <CardContent flush>
308
324
  <Table>
@@ -39,8 +39,8 @@ import { Button, Text } from "@godxjp/ui/general";
39
39
  import { Alert, AlertDescription, AlertTitle } from "@godxjp/ui/feedback";
40
40
  import {
41
41
  Badge,
42
- type BadgeProps,
43
42
  Card,
43
+ CardAction,
44
44
  CardContent,
45
45
  CardHeader,
46
46
  CardTitle,
@@ -51,6 +51,7 @@ import {
51
51
  TableHead,
52
52
  TableHeader,
53
53
  TableRow,
54
+ type BadgeProps,
54
55
  } from "@godxjp/ui/data-display";
55
56
  import {
56
57
  AppShell,
@@ -149,26 +150,28 @@ function PunchCard() {
149
150
 
150
151
  return (
151
152
  <Card density="cozy" className="self-start" accent={state === "break" ? "warning" : undefined}>
152
- <CardHeader className="flex flex-row items-center justify-between gap-3">
153
+ <CardHeader>
153
154
  <CardTitle level={2} className="whitespace-nowrap">
154
155
  打刻 · Chấm công
155
156
  </CardTitle>
156
- <Badge tone={status.tone} variant="outline" className="whitespace-nowrap">
157
- {status.label}
158
- </Badge>
157
+ <CardAction>
158
+ <Badge tone={status.tone} variant="outline" className="whitespace-nowrap">
159
+ {status.label}
160
+ </Badge>
161
+ </CardAction>
159
162
  </CardHeader>
160
163
  <CardContent>
161
164
  <Flex direction="col" gap="md">
162
165
  {/* Big tabular clock — the signature employee block. */}
163
- <div>
166
+ <Flex direction="col" gap="xs">
164
167
  {/* Hero numeral at the system's max step (2xl) — the golden scale tops here by design. */}
165
168
  <Text as="div" size="2xl" weight="bold" tabular className="leading-none">
166
169
  {clock}
167
170
  </Text>
168
- <Text as="div" size="sm" tone="muted" className="mt-1">
171
+ <Text as="div" size="sm" tone="muted">
169
172
  {status.meta}
170
173
  </Text>
171
- </div>
174
+ </Flex>
172
175
 
173
176
  {/* Checkout-locked notice (attention, not destructive — it's a fixable hold). */}
174
177
  {checkoutLocked ? (
@@ -226,7 +229,7 @@ function PunchCard() {
226
229
 
227
230
  {/* Demo state stepper — lets a reader walk every FSM state at rest. */}
228
231
  <Flex direction="row" wrap gap="xs" className="border-t pt-3">
229
- <Text size="2xs" tone="muted" className="me-1 self-center">
232
+ <Text size="2xs" tone="muted" className="self-center">
230
233
  状態:
231
234
  </Text>
232
235
  {(["off", "working", "break", "closed"] as PunchState[]).map((s) => (
@@ -334,7 +337,7 @@ export default function EmployeeMeShowcase() {
334
337
  <PageContainer title="ダッシュボード" subtitle="田中 美咲 · 渋谷店 · 5月度" density="default">
335
338
  <Flex direction="col" gap="lg">
336
339
  {/* Punch (left) + month KPI 2×2 (right) — stack <lg, side-by-side ≥lg */}
337
- <div className="grid grid-cols-1 gap-4 lg:grid-cols-3 lg:items-start">
340
+ <ResponsiveGrid columns={{ sm: 1, lg: 3 }} gap="md">
338
341
  <div className="lg:col-span-1">
339
342
  <PunchCard />
340
343
  </div>
@@ -353,18 +356,20 @@ export default function EmployeeMeShowcase() {
353
356
  ))}
354
357
  </ResponsiveGrid>
355
358
  </div>
356
- </div>
359
+ </ResponsiveGrid>
357
360
 
358
361
  {/* 7-day attendance (left, wide) + today summary (right) */}
359
- <div className="grid grid-cols-1 gap-4 lg:grid-cols-3 lg:items-start">
362
+ <ResponsiveGrid columns={{ sm: 1, lg: 3 }} gap="md">
360
363
  <Card className="self-start lg:col-span-2">
361
- <CardHeader className="flex flex-row items-center justify-between gap-3">
364
+ <CardHeader>
362
365
  <CardTitle level={2} className="whitespace-nowrap">
363
366
  最近7日 · 7 ngày gần nhất
364
367
  </CardTitle>
365
- <Text size="xs" tone="muted" className="whitespace-nowrap">
366
- 勤務 47.4h · 残業 1.5h
367
- </Text>
368
+ <CardAction>
369
+ <Text size="xs" tone="muted" className="whitespace-nowrap">
370
+ 勤務 47.4h · 残業 1.5h
371
+ </Text>
372
+ </CardAction>
368
373
  </CardHeader>
369
374
  <CardContent flush>
370
375
  <Table>
@@ -383,9 +388,7 @@ export default function EmployeeMeShowcase() {
383
388
  <TableRow key={d.date}>
384
389
  <TableCell className="whitespace-nowrap tabular-nums">
385
390
  {d.date}
386
- <Text tone="muted" className="ms-1.5">
387
- ({d.weekday})
388
- </Text>
391
+ <Text tone="muted">({d.weekday})</Text>
389
392
  </TableCell>
390
393
  <TableCell className="text-end tabular-nums">{d.work}</TableCell>
391
394
  <TableCell className="text-end tabular-nums">{d.ot}</TableCell>
@@ -433,7 +436,7 @@ export default function EmployeeMeShowcase() {
433
436
  </dl>
434
437
  </CardContent>
435
438
  </Card>
436
- </div>
439
+ </ResponsiveGrid>
437
440
  </Flex>
438
441
  </PageContainer>
439
442
  </AppShell>
@@ -352,38 +352,40 @@ export default function Demo() {
352
352
  {/* ── 4-column filter bar ───────────────────────────────────────── */}
353
353
  <Card className="self-start">
354
354
  <CardContent>
355
- <ResponsiveGrid columns={{ sm: 1, md: 2, lg: 4 }}>
356
- <FormField id="f-type" label="区分">
357
- <Select
358
- options={TYPE_OPTIONS}
359
- value={type}
360
- onValueChange={setType}
361
- placeholder="すべて"
362
- />
363
- </FormField>
364
- <FormField id="f-status" label="状態">
365
- <Select
366
- options={STATUS_OPTIONS}
367
- value={status}
368
- onValueChange={setStatus}
369
- placeholder="すべて"
370
- />
371
- </FormField>
372
- <FormField id="f-from" label="期間 (開始)">
373
- <DatePicker value={from} onValueChange={setFrom} placeholder="YYYY-MM-DD" />
374
- </FormField>
375
- <FormField id="f-to" label="期間 (終了)">
376
- <DatePicker value={to} onValueChange={setTo} placeholder="YYYY-MM-DD" />
377
- </FormField>
378
- </ResponsiveGrid>
379
- {hasActiveFilters && (
380
- <Flex direction="row" justify="end" className="mt-3">
381
- <Button variant="ghost" size="sm" onClick={clearFilters}>
382
- <X aria-hidden="true" />
383
- 条件をクリア
384
- </Button>
385
- </Flex>
386
- )}
355
+ <Flex direction="col" gap="md">
356
+ <ResponsiveGrid columns={{ sm: 1, md: 2, lg: 4 }}>
357
+ <FormField id="f-type" label="区分">
358
+ <Select
359
+ options={TYPE_OPTIONS}
360
+ value={type}
361
+ onValueChange={setType}
362
+ placeholder="すべて"
363
+ />
364
+ </FormField>
365
+ <FormField id="f-status" label="状態">
366
+ <Select
367
+ options={STATUS_OPTIONS}
368
+ value={status}
369
+ onValueChange={setStatus}
370
+ placeholder="すべて"
371
+ />
372
+ </FormField>
373
+ <FormField id="f-from" label="期間 (開始)">
374
+ <DatePicker value={from} onValueChange={setFrom} placeholder="YYYY-MM-DD" />
375
+ </FormField>
376
+ <FormField id="f-to" label="期間 (終了)">
377
+ <DatePicker value={to} onValueChange={setTo} placeholder="YYYY-MM-DD" />
378
+ </FormField>
379
+ </ResponsiveGrid>
380
+ {hasActiveFilters && (
381
+ <Flex direction="row" justify="end">
382
+ <Button variant="ghost" size="sm" onClick={clearFilters}>
383
+ <X aria-hidden="true" />
384
+ 条件をクリア
385
+ </Button>
386
+ </Flex>
387
+ )}
388
+ </Flex>
387
389
  </CardContent>
388
390
  </Card>
389
391