@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.
- package/dist/components/data-display/badge.d.ts +18 -2
- package/dist/components/data-display/badge.js +18 -4
- package/dist/props/components/data-display.prop.d.ts +7 -0
- package/dist/props/registry.d.ts +5 -1
- package/dist/props/registry.js +12 -1
- package/dist/styles/badge-layout.css +15 -0
- package/dist/tokens/components/badge.css +8 -0
- package/docs/data-display/badge.tsx +36 -0
- package/docs/data-display/carousel.tsx +8 -4
- package/docs/data-display/data-table/examples/grid-features.tsx +1 -1
- package/docs/data-display/permission-matrix.tsx +13 -9
- package/docs/data-display/popover.tsx +2 -1
- package/docs/data-display/scroll-area.tsx +107 -75
- package/docs/data-display/table.tsx +1 -1
- package/docs/data-entry/calendar.tsx +1 -1
- package/docs/data-entry/checkbox.tsx +1 -1
- package/docs/data-entry/country-picker-recipe.tsx +11 -6
- package/docs/data-entry/form-field/index.tsx +33 -29
- package/docs/data-entry/form-root.tsx +1 -1
- package/docs/data-entry/password-input.tsx +1 -5
- package/docs/data-entry/select.tsx +7 -7
- package/docs/data-entry/textarea.tsx +2 -2
- package/docs/feedback/sheet.tsx +112 -102
- package/docs/feedback/skeleton.tsx +2 -2
- package/docs/foundation/colors.tsx +8 -6
- package/docs/foundation/email-tokens.tsx +82 -65
- package/docs/foundation/radius-shadow.tsx +13 -11
- package/docs/layout/app-shell.tsx +2 -2
- package/docs/layout/aspect-ratio.tsx +30 -14
- package/docs/layout/flex.tsx +6 -2
- package/docs/layout/page-container.tsx +9 -1
- package/docs/layout/responsive-grid.tsx +10 -2
- package/docs/layout/sidebar.tsx +169 -146
- package/docs/layout/split-pane.tsx +44 -27
- package/docs/layout/topbar.tsx +17 -15
- package/docs/navigation/app-setting-picker.tsx +5 -4
- package/docs/navigation/breadcrumb.tsx +12 -5
- package/docs/navigation/context-menu.tsx +10 -4
- package/docs/navigation/navigation-menu.tsx +89 -96
- package/docs/navigation/steps.tsx +12 -10
- package/docs/navigation/tabs.tsx +26 -20
- package/docs/navigation/toolbar.tsx +15 -15
- package/docs/providers/format-date.tsx +2 -2
- package/docs/showcase/acme-portal.tsx +41 -27
- package/docs/showcase/acme-website.tsx +60 -54
- package/docs/showcase/case1-warehouse-dashboard.tsx +46 -30
- package/docs/showcase/case2-employee-me.tsx +23 -20
- package/docs/showcase/case3-approval-workflow.tsx +34 -32
- package/docs/showcase/case4-login.tsx +119 -113
- package/docs/showcase/case5-shift-calendar.tsx +3 -3
- package/docs/showcase/case6-agency-handy.tsx +340 -299
- package/docs/showcase/futurelastic-web.tsx +23 -21
- package/docs/showcase/org-switcher.tsx +2 -2
- package/docs/showcase/permission-matrix.tsx +7 -4
- package/docs/showcase/table-conditional-format.tsx +8 -8
- package/docs/showcase/table-crud-list.tsx +3 -3
- package/docs/showcase/table-density.tsx +49 -42
- package/docs/showcase/table-expandable-rows.tsx +24 -15
- package/docs/showcase/table-filter-chips.tsx +2 -7
- package/docs/showcase/table-footer-totals.tsx +7 -4
- package/docs/showcase/table-grouped-subtotals.tsx +25 -22
- package/docs/showcase/table-master-detail.tsx +15 -10
- package/docs/showcase/table-pagination.tsx +34 -27
- package/docs/showcase/table-states.tsx +8 -5
- package/docs/showcase/table-sticky-columns.tsx +8 -5
- package/package.json +2 -3
package/docs/layout/sidebar.tsx
CHANGED
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
} from "@godxjp/ui/layout";
|
|
14
14
|
import type { SidebarItemData, SidebarRenderItemProp, SidebarSectionProp } from "@godxjp/ui/layout";
|
|
15
15
|
import {
|
|
16
|
+
Avatar,
|
|
17
|
+
AvatarFallback,
|
|
18
|
+
Badge,
|
|
16
19
|
Card,
|
|
17
20
|
CardContent,
|
|
18
21
|
CardDescription,
|
|
19
22
|
CardHeader,
|
|
20
23
|
CardTitle,
|
|
21
|
-
Badge,
|
|
22
|
-
Avatar,
|
|
23
|
-
AvatarFallback,
|
|
24
24
|
} from "@godxjp/ui/data-display";
|
|
25
25
|
import { Button, Text } from "@godxjp/ui/general";
|
|
26
26
|
import {
|
|
@@ -313,30 +313,36 @@ export default function Demo() {
|
|
|
313
313
|
</CardDescription>
|
|
314
314
|
</CardHeader>
|
|
315
315
|
<CardContent>
|
|
316
|
-
<
|
|
317
|
-
<
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
<
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
316
|
+
<Card className="h-80 w-64 overflow-hidden">
|
|
317
|
+
<CardContent flush>
|
|
318
|
+
<Flex direction="col">
|
|
319
|
+
<Sidebar
|
|
320
|
+
ariaLabel="ブランド例のナビゲーション"
|
|
321
|
+
activeId={brandActiveId}
|
|
322
|
+
onSelect={setBrandActiveId}
|
|
323
|
+
sections={BRAND_SECTIONS}
|
|
324
|
+
aria-label="brand プロップ例のナビゲーション"
|
|
325
|
+
brand={
|
|
326
|
+
<SidebarHeader>
|
|
327
|
+
<Avatar className="size-7 shrink-0 rounded-md">
|
|
328
|
+
<AvatarFallback className="bg-primary text-primary-foreground">
|
|
329
|
+
<Boxes className="size-4" aria-hidden="true" />
|
|
330
|
+
</AvatarFallback>
|
|
331
|
+
</Avatar>
|
|
332
|
+
<Flex direction="col" gap="xs" className="min-w-0">
|
|
333
|
+
<Text weight="bold" truncate>
|
|
334
|
+
Acme Suite
|
|
335
|
+
</Text>
|
|
336
|
+
<Text size="xs" tone="muted" truncate>
|
|
337
|
+
v7.0 Enterprise
|
|
338
|
+
</Text>
|
|
339
|
+
</Flex>
|
|
340
|
+
</SidebarHeader>
|
|
341
|
+
}
|
|
342
|
+
/>
|
|
343
|
+
</Flex>
|
|
344
|
+
</CardContent>
|
|
345
|
+
</Card>
|
|
340
346
|
</CardContent>
|
|
341
347
|
</Card>
|
|
342
348
|
|
|
@@ -356,33 +362,35 @@ export default function Demo() {
|
|
|
356
362
|
</CardHeader>
|
|
357
363
|
<CardContent>
|
|
358
364
|
<Flex gap="md" wrap>
|
|
359
|
-
<
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
365
|
+
<Card className="h-72 w-64 overflow-hidden">
|
|
366
|
+
<CardContent flush>
|
|
367
|
+
<Flex direction="col">
|
|
368
|
+
<Sidebar
|
|
369
|
+
ariaLabel="ルーターリンク行のナビゲーション"
|
|
370
|
+
activeId={routedActiveId}
|
|
371
|
+
onSelect={setRoutedActiveId}
|
|
372
|
+
sections={ROUTED_SECTIONS}
|
|
373
|
+
linkComponent={RouterLink}
|
|
374
|
+
aria-label="linkComponent プロップ例のナビゲーション(展開)"
|
|
375
|
+
/>
|
|
376
|
+
</Flex>
|
|
377
|
+
</CardContent>
|
|
378
|
+
</Card>
|
|
379
|
+
<Card className="h-72 w-16 overflow-hidden">
|
|
380
|
+
<CardContent flush>
|
|
381
|
+
<Flex direction="col">
|
|
382
|
+
<Sidebar
|
|
383
|
+
ariaLabel="折りたたみレールのルーターリンク"
|
|
384
|
+
activeId={routedActiveId}
|
|
385
|
+
onSelect={setRoutedActiveId}
|
|
386
|
+
sections={ROUTED_SECTIONS}
|
|
387
|
+
linkComponent={RouterLink}
|
|
388
|
+
collapsed
|
|
389
|
+
aria-label="linkComponent プロップ例のナビゲーション(折りたたみ)"
|
|
390
|
+
/>
|
|
391
|
+
</Flex>
|
|
392
|
+
</CardContent>
|
|
393
|
+
</Card>
|
|
386
394
|
</Flex>
|
|
387
395
|
</CardContent>
|
|
388
396
|
</Card>
|
|
@@ -401,18 +409,22 @@ export default function Demo() {
|
|
|
401
409
|
</CardDescription>
|
|
402
410
|
</CardHeader>
|
|
403
411
|
<CardContent>
|
|
404
|
-
<
|
|
405
|
-
<
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
412
|
+
<Card className="h-72 w-64 overflow-hidden">
|
|
413
|
+
<CardContent flush>
|
|
414
|
+
<Flex direction="col">
|
|
415
|
+
<Sidebar
|
|
416
|
+
ariaLabel="カスタム行例のナビゲーション"
|
|
417
|
+
activeId={renderActiveId}
|
|
418
|
+
onSelect={setRenderActiveId}
|
|
419
|
+
sections={FAVOURITE_SECTIONS}
|
|
420
|
+
renderItem={(item, rowProps) =>
|
|
421
|
+
renderFavouriteRow(item, rowProps, setRenderActiveId)
|
|
422
|
+
}
|
|
423
|
+
aria-label="renderItem プロップ例のナビゲーション"
|
|
424
|
+
/>
|
|
425
|
+
</Flex>
|
|
426
|
+
</CardContent>
|
|
427
|
+
</Card>
|
|
416
428
|
</CardContent>
|
|
417
429
|
</Card>
|
|
418
430
|
|
|
@@ -430,52 +442,54 @@ export default function Demo() {
|
|
|
430
442
|
</CardHeader>
|
|
431
443
|
<CardContent>
|
|
432
444
|
<Flex gap="md" wrap>
|
|
433
|
-
<
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
445
|
+
<Card className="h-64 w-64 overflow-hidden">
|
|
446
|
+
<CardContent flush>
|
|
447
|
+
<Flex direction="col">
|
|
448
|
+
<Sidebar
|
|
449
|
+
ariaLabel="構成可能な例のナビゲーション"
|
|
450
|
+
activeId={composedActiveId}
|
|
451
|
+
onSelect={setComposedActiveId}
|
|
452
|
+
>
|
|
453
|
+
<SidebarSection label="お気に入り">
|
|
454
|
+
{COMPOSED_ITEMS.map((item) => (
|
|
455
|
+
<SidebarItem
|
|
456
|
+
key={item.id}
|
|
457
|
+
item={item}
|
|
458
|
+
active={composedActiveId === item.id}
|
|
459
|
+
onActivate={setComposedActiveId}
|
|
460
|
+
/>
|
|
461
|
+
))}
|
|
462
|
+
</SidebarSection>
|
|
463
|
+
</Sidebar>
|
|
464
|
+
</Flex>
|
|
465
|
+
</CardContent>
|
|
466
|
+
</Card>
|
|
467
|
+
<Card className="h-64 w-64 overflow-hidden">
|
|
468
|
+
<CardContent flush>
|
|
469
|
+
<Flex direction="col">
|
|
470
|
+
<Sidebar
|
|
471
|
+
ariaLabel="asChild 例のナビゲーション"
|
|
472
|
+
activeId={composedActiveId}
|
|
473
|
+
onSelect={setComposedActiveId}
|
|
474
|
+
aria-label="SidebarItem asChild 例のナビゲーション"
|
|
475
|
+
>
|
|
476
|
+
<SidebarSection label="お気に入り(asChild)">
|
|
477
|
+
{COMPOSED_ITEMS.map((item) => (
|
|
478
|
+
<SidebarItem
|
|
479
|
+
key={item.id}
|
|
480
|
+
item={item}
|
|
481
|
+
active={composedActiveId === item.id}
|
|
482
|
+
onActivate={setComposedActiveId}
|
|
483
|
+
asChild
|
|
484
|
+
>
|
|
485
|
+
<Link to={item.href ?? "/"} />
|
|
486
|
+
</SidebarItem>
|
|
487
|
+
))}
|
|
488
|
+
</SidebarSection>
|
|
489
|
+
</Sidebar>
|
|
490
|
+
</Flex>
|
|
491
|
+
</CardContent>
|
|
492
|
+
</Card>
|
|
479
493
|
</Flex>
|
|
480
494
|
</CardContent>
|
|
481
495
|
</Card>
|
|
@@ -496,15 +510,19 @@ export default function Demo() {
|
|
|
496
510
|
</CardDescription>
|
|
497
511
|
</CardHeader>
|
|
498
512
|
<CardContent>
|
|
499
|
-
<
|
|
500
|
-
<
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
513
|
+
<Card className="h-64 w-64 overflow-hidden">
|
|
514
|
+
<CardContent flush>
|
|
515
|
+
<Flex direction="col">
|
|
516
|
+
<Sidebar
|
|
517
|
+
ariaLabel="チャンネル一覧のナビゲーション"
|
|
518
|
+
activeId={mentionActiveId}
|
|
519
|
+
onSelect={setMentionActiveId}
|
|
520
|
+
sections={MENTION_SECTIONS}
|
|
521
|
+
aria-label="badgeTone 例のナビゲーション"
|
|
522
|
+
/>
|
|
523
|
+
</Flex>
|
|
524
|
+
</CardContent>
|
|
525
|
+
</Card>
|
|
508
526
|
</CardContent>
|
|
509
527
|
</Card>
|
|
510
528
|
|
|
@@ -522,31 +540,36 @@ export default function Demo() {
|
|
|
522
540
|
</CardHeader>
|
|
523
541
|
<CardContent>
|
|
524
542
|
<Flex gap="md" wrap>
|
|
525
|
-
<
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
543
|
+
<Card className="h-64 w-64 overflow-hidden">
|
|
544
|
+
<CardContent flush>
|
|
545
|
+
<Flex direction="col">
|
|
546
|
+
<Sidebar
|
|
547
|
+
ariaLabel="既定の配色のナビゲーション"
|
|
548
|
+
activeId={tokenActiveId}
|
|
549
|
+
onSelect={setTokenActiveId}
|
|
550
|
+
sections={FAVOURITE_SECTIONS}
|
|
551
|
+
aria-label="既定の配色(アイコンは行の色を継承)"
|
|
552
|
+
/>
|
|
553
|
+
</Flex>
|
|
554
|
+
</CardContent>
|
|
555
|
+
</Card>
|
|
556
|
+
<Card className="h-64 w-64 overflow-hidden">
|
|
557
|
+
<CardContent flush>
|
|
558
|
+
<Flex
|
|
559
|
+
direction="col"
|
|
560
|
+
|
|
561
|
+
style={CANONICAL_NAV_TOKENS}
|
|
562
|
+
>
|
|
563
|
+
<Sidebar
|
|
564
|
+
ariaLabel="アイコンを濃くしたナビゲーション"
|
|
565
|
+
activeId={tokenActiveId}
|
|
566
|
+
onSelect={setTokenActiveId}
|
|
567
|
+
sections={FAVOURITE_SECTIONS}
|
|
568
|
+
aria-label="トークン上書き(アイコンのみ --foreground)"
|
|
569
|
+
/>
|
|
570
|
+
</Flex>
|
|
571
|
+
</CardContent>
|
|
572
|
+
</Card>
|
|
550
573
|
</Flex>
|
|
551
574
|
</CardContent>
|
|
552
575
|
</Card>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
import { Flex, PageContainer, ResponsiveGrid, SplitPane } from "@godxjp/ui/layout";
|
|
2
|
+
import { Flex, PageContainer, ResponsiveGrid, Separator, SplitPane } from "@godxjp/ui/layout";
|
|
3
3
|
import {
|
|
4
4
|
Card,
|
|
5
5
|
CardContent,
|
|
@@ -188,7 +188,7 @@ export default function Demo() {
|
|
|
188
188
|
</CardTitle>
|
|
189
189
|
</CardHeader>
|
|
190
190
|
<CardContent>
|
|
191
|
-
<Flex direction="col" gap="
|
|
191
|
+
<Flex direction="col" gap="xs">
|
|
192
192
|
<Flex direction="row" justify="between">
|
|
193
193
|
<Text tone="muted">小計</Text>
|
|
194
194
|
<Text tabular>{selected.amount}</Text>
|
|
@@ -197,7 +197,8 @@ export default function Demo() {
|
|
|
197
197
|
<Text tone="muted">消費税 (10%)</Text>
|
|
198
198
|
<Text tabular>{yen(base * 0.1)}</Text>
|
|
199
199
|
</Flex>
|
|
200
|
-
<
|
|
200
|
+
<Separator />
|
|
201
|
+
<div>
|
|
201
202
|
<Flex direction="row" justify="between">
|
|
202
203
|
<Text weight="bold">合計</Text>
|
|
203
204
|
<Text weight="bold" tabular>
|
|
@@ -417,31 +418,47 @@ export default function Demo() {
|
|
|
417
418
|
<CardContent>
|
|
418
419
|
<Flex direction="col" gap="md">
|
|
419
420
|
{/* Narrow embed → stays single column (the container is < 48rem). */}
|
|
420
|
-
<
|
|
421
|
-
<
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
421
|
+
<Card className="max-w-md">
|
|
422
|
+
<CardContent>
|
|
423
|
+
<Text size="xs" tone="muted">
|
|
424
|
+
約 28rem のコンテナ → 縦積み
|
|
425
|
+
</Text>
|
|
426
|
+
<SplitPane
|
|
427
|
+
asideLabel="補助パネル(狭い埋め込み)"
|
|
428
|
+
asideWidth="sm"
|
|
429
|
+
aside={
|
|
430
|
+
<Card variant="muted">
|
|
431
|
+
<CardContent>補助パネル</CardContent>
|
|
432
|
+
</Card>
|
|
433
|
+
}
|
|
434
|
+
>
|
|
435
|
+
<Card variant="muted">
|
|
436
|
+
<CardContent>メインコンテンツ</CardContent>
|
|
437
|
+
</Card>
|
|
438
|
+
</SplitPane>
|
|
439
|
+
</CardContent>
|
|
440
|
+
</Card>
|
|
432
441
|
{/* Wide embed → splits into two columns (the container is ≥ 48rem). */}
|
|
433
|
-
<
|
|
434
|
-
<
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
442
|
+
<Card className="max-w-4xl">
|
|
443
|
+
<CardContent>
|
|
444
|
+
<Text size="xs" tone="muted">
|
|
445
|
+
約 56rem のコンテナ → 2 カラム
|
|
446
|
+
</Text>
|
|
447
|
+
<SplitPane
|
|
448
|
+
asideLabel="補助パネル(広い埋め込み)"
|
|
449
|
+
asideWidth="sm"
|
|
450
|
+
aside={
|
|
451
|
+
<Card variant="muted">
|
|
452
|
+
<CardContent>補助パネル</CardContent>
|
|
453
|
+
</Card>
|
|
454
|
+
}
|
|
455
|
+
>
|
|
456
|
+
<Card variant="muted">
|
|
457
|
+
<CardContent>メインコンテンツ</CardContent>
|
|
458
|
+
</Card>
|
|
459
|
+
</SplitPane>
|
|
460
|
+
</CardContent>
|
|
461
|
+
</Card>
|
|
445
462
|
</Flex>
|
|
446
463
|
</CardContent>
|
|
447
464
|
</Card>
|
package/docs/layout/topbar.tsx
CHANGED
|
@@ -98,7 +98,7 @@ export default function Demo() {
|
|
|
98
98
|
{collapsed ? <PanelLeftOpen /> : <PanelLeftClose />}
|
|
99
99
|
</Button>
|
|
100
100
|
{/* Decorative mark — hidden below sm so the budget goes to the two real controls. */}
|
|
101
|
-
<Avatar className="
|
|
101
|
+
<Avatar className="rounded-md">
|
|
102
102
|
<AvatarFallback className="bg-primary text-primary-foreground font-bold">C</AvatarFallback>
|
|
103
103
|
</Avatar>
|
|
104
104
|
<DropdownMenu>
|
|
@@ -120,7 +120,7 @@ export default function Demo() {
|
|
|
120
120
|
<DropdownMenuSeparator />
|
|
121
121
|
{ENTITIES.map((e) => (
|
|
122
122
|
<DropdownMenuItem key={e.id} onSelect={() => setActiveEntity(e)}>
|
|
123
|
-
<Building2 className="
|
|
123
|
+
<Building2 className="size-4" />
|
|
124
124
|
{e.name}
|
|
125
125
|
{activeEntity.id === e.id ? (
|
|
126
126
|
<Badge variant="secondary" className="ms-auto text-xs">
|
|
@@ -157,7 +157,7 @@ export default function Demo() {
|
|
|
157
157
|
budget before it gets a say. At 320 this environment chip alone claimed 93 of the bar's
|
|
158
158
|
198px, squeezing start to 25px and clipping the entity switcher inside it. An ambient
|
|
159
159
|
status label is the first thing a compact bar drops, so it appears from sm up. */}
|
|
160
|
-
<Badge tone="warning" className="
|
|
160
|
+
<Badge tone="warning" className="text-xs">
|
|
161
161
|
ステージング
|
|
162
162
|
</Badge>
|
|
163
163
|
<Button
|
|
@@ -184,16 +184,16 @@ export default function Demo() {
|
|
|
184
184
|
<DropdownMenuLabel>佐藤 花子</DropdownMenuLabel>
|
|
185
185
|
<DropdownMenuSeparator />
|
|
186
186
|
<DropdownMenuItem>
|
|
187
|
-
<UserRound className="
|
|
187
|
+
<UserRound className="size-4" />
|
|
188
188
|
プロフィール
|
|
189
189
|
</DropdownMenuItem>
|
|
190
190
|
<DropdownMenuItem>
|
|
191
|
-
<Settings className="
|
|
191
|
+
<Settings className="size-4" />
|
|
192
192
|
アカウント設定
|
|
193
193
|
</DropdownMenuItem>
|
|
194
194
|
<DropdownMenuSeparator />
|
|
195
195
|
<DropdownMenuItem>
|
|
196
|
-
<LogOut className="
|
|
196
|
+
<LogOut className="size-4" />
|
|
197
197
|
ログアウト
|
|
198
198
|
</DropdownMenuItem>
|
|
199
199
|
</DropdownMenuContent>
|
|
@@ -291,9 +291,9 @@ export default function Demo() {
|
|
|
291
291
|
{ prop: "children", desc: "3 slot を使わず完全カスタムにする場合の逃げ道" },
|
|
292
292
|
].map(({ prop, desc }) => (
|
|
293
293
|
<Flex key={prop} align="start" gap="sm">
|
|
294
|
-
<
|
|
294
|
+
<Badge variant="secondary" className="shrink-0">
|
|
295
295
|
{prop}
|
|
296
|
-
</
|
|
296
|
+
</Badge>
|
|
297
297
|
<Text tone="muted">{desc}</Text>
|
|
298
298
|
</Flex>
|
|
299
299
|
))}
|
|
@@ -331,13 +331,15 @@ export default function Demo() {
|
|
|
331
331
|
</CardDescription>
|
|
332
332
|
</CardHeader>
|
|
333
333
|
<CardContent>
|
|
334
|
-
<
|
|
335
|
-
<
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
334
|
+
<Card className="max-w-80 overflow-hidden">
|
|
335
|
+
<CardContent>
|
|
336
|
+
<Topbar
|
|
337
|
+
start={<Text weight="medium">株式会社とても長い組織名称</Text>}
|
|
338
|
+
center={<Button variant="outline">すべての取引を検索</Button>}
|
|
339
|
+
end={<Button variant="ghost">山田 太郎 システム管理者</Button>}
|
|
340
|
+
/>
|
|
341
|
+
</CardContent>
|
|
342
|
+
</Card>
|
|
341
343
|
</CardContent>
|
|
342
344
|
</Card>
|
|
343
345
|
</Flex>
|
|
@@ -90,9 +90,11 @@ export default function Demo() {
|
|
|
90
90
|
</CardDescription>
|
|
91
91
|
</CardHeader>
|
|
92
92
|
<CardContent>
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
|
|
93
|
+
<Card className="max-w-80" lang="ja">
|
|
94
|
+
<CardContent>
|
|
95
|
+
<AppSettingPicker kind="timezone" id="setting-timezone-narrow" />
|
|
96
|
+
</CardContent>
|
|
97
|
+
</Card>
|
|
96
98
|
</CardContent>
|
|
97
99
|
</Card>
|
|
98
100
|
|
|
@@ -106,7 +108,6 @@ export default function Demo() {
|
|
|
106
108
|
</CardHeader>
|
|
107
109
|
<CardContent>
|
|
108
110
|
<Topbar
|
|
109
|
-
className="rounded-md border"
|
|
110
111
|
start={
|
|
111
112
|
<Avatar className="rounded-md">
|
|
112
113
|
<AvatarFallback>G</AvatarFallback>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { forwardRef } from "react";
|
|
2
2
|
import type { AnchorHTMLAttributes } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Card,
|
|
5
|
+
CardContent,
|
|
6
|
+
CardDescription,
|
|
7
|
+
CardHeader,
|
|
8
|
+
CardTitle,
|
|
9
|
+
CodeBlock,
|
|
10
|
+
} from "@godxjp/ui/data-display";
|
|
4
11
|
import { Text } from "@godxjp/ui/general";
|
|
5
12
|
import { Breadcrumb } from "@godxjp/ui/layout";
|
|
6
13
|
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
@@ -110,15 +117,15 @@ export default function Demo() {
|
|
|
110
117
|
{/* tabIndex: the snippet scrolls sideways on a narrow viewport and holds no
|
|
111
118
|
focusable content, so without its own tab stop a keyboard user cannot reach the
|
|
112
119
|
clipped end of the line (WCAG 2.1.1). */}
|
|
113
|
-
<
|
|
120
|
+
<CodeBlock size="xs" wrap={false}>
|
|
114
121
|
{`<Breadcrumb items={[{ label: "ホーム", to: "/" }, { label: "現在ページ" }]} />`}
|
|
115
|
-
</
|
|
122
|
+
</CodeBlock>
|
|
116
123
|
<Text as="p" size="xs" tone="muted">
|
|
117
124
|
PageContainer / AppShell の breadcrumb プロップに (任意):
|
|
118
125
|
</Text>
|
|
119
|
-
<
|
|
126
|
+
<CodeBlock size="xs" wrap={false}>
|
|
120
127
|
{`<PageContainer title="仕訳詳細" breadcrumb={[{ label: "ホーム", to: "/" }, { label: "JE-0042" }]}>`}
|
|
121
|
-
</
|
|
128
|
+
</CodeBlock>
|
|
122
129
|
</Flex>
|
|
123
130
|
</CardContent>
|
|
124
131
|
</Card>
|
|
@@ -47,8 +47,11 @@ export default function Demo() {
|
|
|
47
47
|
</CardHeader>
|
|
48
48
|
<CardContent>
|
|
49
49
|
<ContextMenu>
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — the dashed area is the right-click target the demo asks you to use */}
|
|
51
|
+
<ContextMenuTrigger className="border-border h-36 w-full cursor-context-menu rounded-md border border-dashed">
|
|
52
|
+
<Flex align="center" justify="center" gap="xs">
|
|
53
|
+
<Text tone="muted">ここを右クリックしてください</Text>
|
|
54
|
+
</Flex>
|
|
52
55
|
</ContextMenuTrigger>
|
|
53
56
|
<ContextMenuContent>
|
|
54
57
|
<ContextMenuLabel>仕訳操作</ContextMenuLabel>
|
|
@@ -89,8 +92,11 @@ export default function Demo() {
|
|
|
89
92
|
</CardHeader>
|
|
90
93
|
<CardContent>
|
|
91
94
|
<ContextMenu>
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
{/* ui-audit-disable-next-line no-hand-rolled-surface — the dashed area is the right-click target the demo asks you to use */}
|
|
96
|
+
<ContextMenuTrigger className="border-border h-36 w-full cursor-context-menu rounded-md border border-dashed">
|
|
97
|
+
<Flex align="center" justify="center" gap="xs">
|
|
98
|
+
<Text tone="muted">右クリック · 表示設定</Text>
|
|
99
|
+
</Flex>
|
|
94
100
|
</ContextMenuTrigger>
|
|
95
101
|
<ContextMenuContent>
|
|
96
102
|
<ContextMenuLabel>表示オプション</ContextMenuLabel>
|