@godxjp/ui 19.4.2 → 19.6.0

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 (77) hide show
  1. package/dist/app/app-provider.js +10 -1
  2. package/dist/app/theme-axes.d.ts +18 -3
  3. package/dist/app/theme-axes.js +15 -3
  4. package/dist/components/data-display/badge.js +4 -1
  5. package/dist/components/data-display/data-table.js +9 -2
  6. package/dist/components/data-entry/checkbox.d.ts +12 -0
  7. package/dist/components/data-entry/checkbox.js +34 -3
  8. package/dist/components/data-entry/index.d.ts +2 -0
  9. package/dist/components/data-entry/index.js +2 -0
  10. package/dist/components/data-entry/segmented.d.ts +2 -0
  11. package/dist/components/data-entry/segmented.js +5 -0
  12. package/dist/components/data-entry/select.d.ts +2 -0
  13. package/dist/components/data-entry/select.js +8 -3
  14. package/dist/components/feedback/sheet.js +1 -1
  15. package/dist/components/feedback/sonner.d.ts +7 -1
  16. package/dist/components/feedback/sonner.js +27 -7
  17. package/dist/components/general/button.js +6 -1
  18. package/dist/components/general/inert-background.d.ts +8 -3
  19. package/dist/components/general/inert-background.js +26 -2
  20. package/dist/components/general/logo.d.ts +53 -0
  21. package/dist/components/general/logo.js +57 -3
  22. package/dist/components/general/typography.d.ts +7 -1
  23. package/dist/components/general/typography.js +20 -5
  24. package/dist/components/layout/index.d.ts +4 -0
  25. package/dist/components/layout/index.js +4 -0
  26. package/dist/components/layout/nav-list.d.ts +26 -0
  27. package/dist/components/layout/nav-list.js +21 -0
  28. package/dist/components/layout/topbar-item.d.ts +17 -0
  29. package/dist/components/layout/topbar-item.js +21 -0
  30. package/dist/components/navigation/app-setting-picker.js +22 -5
  31. package/dist/components/navigation/context-menu.js +2 -2
  32. package/dist/components/navigation/dropdown-menu.js +2 -2
  33. package/dist/components/navigation/tabs.js +42 -10
  34. package/dist/components/ui/segmented.d.ts +48 -0
  35. package/dist/components/ui/segmented.js +48 -0
  36. package/dist/email/tokens.generated.d.ts +3 -3
  37. package/dist/email/tokens.generated.js +3 -3
  38. package/dist/i18n/messages/en.json +2 -1
  39. package/dist/i18n/messages/ja.json +2 -1
  40. package/dist/i18n/messages/vi.json +2 -1
  41. package/dist/props/components/app.prop.d.ts +9 -2
  42. package/dist/props/components/general.prop.d.ts +31 -1
  43. package/dist/props/components/layout.prop.d.ts +48 -2
  44. package/dist/props/registry.d.ts +19 -0
  45. package/dist/props/registry.js +27 -0
  46. package/dist/props/vocabulary/shared.prop.d.ts +11 -2
  47. package/dist/styles/alert-layout.css +4 -0
  48. package/dist/styles/base.css +2 -0
  49. package/dist/styles/control.css +94 -26
  50. package/dist/styles/data-display-layout.css +2 -1
  51. package/dist/styles/dialog-layout.css +2 -1
  52. package/dist/styles/focus-ring.css +85 -24
  53. package/dist/styles/layout.css +2 -1
  54. package/dist/styles/logo-layout.css +56 -0
  55. package/dist/styles/navigation-layout.css +15 -0
  56. package/dist/styles/shell-layout.css +64 -10
  57. package/dist/styles/text-layout.css +11 -0
  58. package/dist/tokens/antd.generated.css +40 -0
  59. package/dist/tokens/axes.css +6 -0
  60. package/dist/tokens/base.css +4 -0
  61. package/dist/tokens/components/control.css +5 -1
  62. package/dist/tokens/components/feedback.css +2 -0
  63. package/dist/tokens/components/legal-document.css +0 -2
  64. package/dist/tokens/components/logo.css +13 -0
  65. package/dist/tokens/components/navigation.css +2 -0
  66. package/dist/tokens/components/segmented.css +27 -0
  67. package/dist/tokens/components/shell.css +15 -2
  68. package/dist/tokens/components/text.css +7 -0
  69. package/dist/tokens/foundation.css +19 -12
  70. package/docs/DESIGN-AUTHORITY.md +346 -0
  71. package/docs/FRAME-COVERAGE-REPORT.md +5 -2
  72. package/docs/README.md +14 -13
  73. package/docs/data-entry/segmented.tsx +124 -0
  74. package/docs/general/typography.tsx +84 -1
  75. package/docs/layout/nav-list.tsx +63 -0
  76. package/docs/layout/topbar-item.tsx +157 -0
  77. package/package.json +8 -2
@@ -0,0 +1,63 @@
1
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
2
+ import { MasterDetail, NavList, PageContainer } from "@godxjp/ui/layout";
3
+ import { Bell, Palette, ShieldCheck, User } from "lucide-react";
4
+
5
+ const items = [
6
+ { id: "profile", label: "Profile", icon: User },
7
+ { id: "appearance", label: "Appearance", icon: Palette },
8
+ { id: "notifications", label: "Notifications", icon: Bell, badge: "3" },
9
+ { id: "security", label: "Security", icon: ShieldCheck },
10
+ ];
11
+
12
+ /**
13
+ * NavList — vertical route navigation for inside a page. Same rows as the Sidebar rail, in a
14
+ * `<nav>` landmark instead of the shell grid, so the settings-nav shape stops being hand-rolled
15
+ * out of Buttons.
16
+ */
17
+ export default function Demo() {
18
+ return (
19
+ <PageContainer title="NavList" subtitle="ページ内のルート遷移ナビゲーション">
20
+ <Card>
21
+ <CardHeader>
22
+ <CardTitle level={2}>Master と組み合わせる</CardTitle>
23
+ <CardDescription>
24
+ 選択中の行だけが aria-current=&quot;page&quot; を持ち、ラベルはアイコン列に揃います。
25
+ </CardDescription>
26
+ </CardHeader>
27
+ <CardContent>
28
+ <MasterDetail
29
+ masterLabel="Settings"
30
+ railWidth="compact"
31
+ master={<NavList label="Settings" items={items} activeId="appearance" />}
32
+ >
33
+ <Card>
34
+ <CardHeader>
35
+ <CardTitle level={3}>Appearance</CardTitle>
36
+ <CardDescription>
37
+ 詳細ペインは選択された行が決めます。ナビゲーション自体は折りたたみ状態を持ちません。
38
+ </CardDescription>
39
+ </CardHeader>
40
+ </Card>
41
+ </MasterDetail>
42
+ </CardContent>
43
+ </Card>
44
+
45
+ <Card>
46
+ <CardHeader>
47
+ <CardTitle level={2}>長いラベルと content stress</CardTitle>
48
+ <CardDescription>行は縮み、ラベルだけが切り詰められます。</CardDescription>
49
+ </CardHeader>
50
+ <CardContent>
51
+ <NavList
52
+ label="Long labels"
53
+ activeId="long"
54
+ items={[
55
+ { id: "long", label: "組織全体の通知とメール配信の既定値", icon: Bell },
56
+ { id: "short", label: "Security", icon: ShieldCheck },
57
+ ]}
58
+ />
59
+ </CardContent>
60
+ </Card>
61
+ </PageContainer>
62
+ );
63
+ }
@@ -0,0 +1,157 @@
1
+ import { useState } from "react";
2
+
3
+ import {
4
+ Avatar,
5
+ AvatarFallback,
6
+ Card,
7
+ CardContent,
8
+ CardDescription,
9
+ CardHeader,
10
+ CardTitle,
11
+ } from "@godxjp/ui/data-display";
12
+ import { Button, Text } from "@godxjp/ui/general";
13
+ import { AppShell, Flex, PageContainer, Sidebar, Topbar, TopbarItem } from "@godxjp/ui/layout";
14
+ import type { SidebarSectionProp } from "@godxjp/ui/layout";
15
+ import {
16
+ DropdownMenu,
17
+ DropdownMenuContent,
18
+ DropdownMenuItem,
19
+ DropdownMenuLabel,
20
+ DropdownMenuSeparator,
21
+ DropdownMenuTrigger,
22
+ } from "@godxjp/ui/navigation";
23
+ import {
24
+ Bell,
25
+ FileText,
26
+ LayoutDashboard,
27
+ LogOut,
28
+ PanelLeftClose,
29
+ PanelLeftOpen,
30
+ Settings,
31
+ Users,
32
+ } from "lucide-react";
33
+
34
+ /**
35
+ * TopbarItem — one interactive cell of a Topbar slot, shaped like part of the bar: full bar
36
+ * height, the bar's own hover surface, and the focus mark hosted INSIDE the cell. The second bar
37
+ * below shows the same triggers built from `Button` instead, which is the floating-pill read this
38
+ * component exists to replace.
39
+ */
40
+ const SECTIONS: SidebarSectionProp[] = [
41
+ {
42
+ label: "会計",
43
+ items: [
44
+ { id: "dashboard", label: "ダッシュボード", icon: LayoutDashboard },
45
+ { id: "journal", label: "仕訳", icon: FileText },
46
+ ],
47
+ },
48
+ { label: "管理", items: [{ id: "users", label: "ユーザー", icon: Users }] },
49
+ ];
50
+
51
+ export default function Demo() {
52
+ const [collapsed, setCollapsed] = useState(false);
53
+
54
+ return (
55
+ <AppShell
56
+ sidebarCollapsed={collapsed}
57
+ sidebar={<Sidebar activeId="dashboard" sections={SECTIONS} />}
58
+ topbar={
59
+ <Topbar
60
+ start={
61
+ <TopbarItem
62
+ aria-label={collapsed ? "サイドバーを開く" : "サイドバーを閉じる"}
63
+ aria-expanded={!collapsed}
64
+ onClick={() => setCollapsed((open) => !open)}
65
+ >
66
+ {collapsed ? (
67
+ <PanelLeftOpen aria-hidden="true" />
68
+ ) : (
69
+ <PanelLeftClose aria-hidden="true" />
70
+ )}
71
+ </TopbarItem>
72
+ }
73
+ end={
74
+ <>
75
+ <TopbarItem aria-label="お知らせ">
76
+ <Bell aria-hidden="true" />
77
+ </TopbarItem>
78
+ <DropdownMenu>
79
+ <DropdownMenuTrigger asChild>
80
+ <TopbarItem aria-label="アカウント">
81
+ <Avatar>
82
+ <AvatarFallback>SD</AvatarFallback>
83
+ </Avatar>
84
+ </TopbarItem>
85
+ </DropdownMenuTrigger>
86
+ <DropdownMenuContent align="end">
87
+ <DropdownMenuLabel>佐藤 大輔</DropdownMenuLabel>
88
+ <DropdownMenuSeparator />
89
+ <DropdownMenuItem>
90
+ <Settings aria-hidden="true" />
91
+ 設定
92
+ </DropdownMenuItem>
93
+ <DropdownMenuItem>
94
+ <LogOut aria-hidden="true" />
95
+ ログアウト
96
+ </DropdownMenuItem>
97
+ </DropdownMenuContent>
98
+ </DropdownMenu>
99
+ </>
100
+ }
101
+ />
102
+ }
103
+ >
104
+ <PageContainer title="TopbarItem" subtitle="バーの一部として読める、バーの高さのセル">
105
+ <Flex direction="col" gap="lg">
106
+ <Card>
107
+ <CardHeader>
108
+ <CardTitle level={2}>上のバーがこのコンポーネントです</CardTitle>
109
+ <CardDescription>
110
+ セルの高さは自分では決めません。AppShell のグリッド行、単体で使うときは
111
+ --topbar-height、粗いポインタのときはその上書き。どれであっても、セルはバーの
112
+ 高さまで伸びます。ホバー面もバー自身の面です。
113
+ </CardDescription>
114
+ </CardHeader>
115
+ <CardContent>
116
+ <Text size="sm" tone="muted">
117
+ DropdownMenuTrigger には `asChild` で渡します。メニューが開いている間は
118
+ [data-state=&quot;open&quot;] でセルが点いたままになります。
119
+ </Text>
120
+ </CardContent>
121
+ </Card>
122
+
123
+ <Card>
124
+ <CardHeader>
125
+ <CardTitle level={2}>Button を入れた場合(比較)</CardTitle>
126
+ <CardDescription>
127
+ 同じスロットに Button を置くと、背の高いバーの中に --control-height
128
+ の丸いピルが浮きます。バーの一部ではなく、バーに落ちてきた部品に見えます。
129
+ </CardDescription>
130
+ </CardHeader>
131
+ <CardContent>
132
+ <Topbar
133
+ start={
134
+ <Button variant="ghost" size="sm" aria-label="サイドバーを閉じる">
135
+ <PanelLeftClose aria-hidden="true" />
136
+ </Button>
137
+ }
138
+ end={
139
+ <>
140
+ <Button variant="ghost" size="sm" aria-label="お知らせ">
141
+ <Bell aria-hidden="true" />
142
+ </Button>
143
+ <Button variant="ghost" size="sm" aria-label="アカウント">
144
+ <Avatar>
145
+ <AvatarFallback>SD</AvatarFallback>
146
+ </Avatar>
147
+ </Button>
148
+ </>
149
+ }
150
+ />
151
+ </CardContent>
152
+ </Card>
153
+ </Flex>
154
+ </PageContainer>
155
+ </AppShell>
156
+ );
157
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@godxjp/ui",
3
- "version": "19.4.2",
4
- "godxUiMcp": "19.4.2",
3
+ "version": "19.6.0",
4
+ "godxUiMcp": "19.6.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -365,6 +365,10 @@
365
365
  "check:rtl": "node scripts/check-rtl.mjs",
366
366
  "check:typography": "node scripts/check-typography.mjs",
367
367
  "gen:component-tokens": "node scripts/gen-component-tokens.mjs",
368
+ "gen:antd-tokens": "node scripts/gen-antd-tokens.mjs",
369
+ "check:antd-tokens": "node scripts/gen-antd-tokens.mjs --check",
370
+ "report:antd-tokens": "node scripts/gen-antd-tokens.mjs --report",
371
+ "check:no-antd-runtime": "node scripts/check-no-antd-runtime.mjs",
368
372
  "gen:email-tokens": "node scripts/gen-email-tokens.mjs",
369
373
  "check:core-isolation": "node scripts/check-core-isolation.mjs",
370
374
  "check:no-consumer-coupling": "node scripts/check-no-consumer-coupling.mjs",
@@ -461,6 +465,7 @@
461
465
  "sonner": "^2.0.8",
462
466
  "tailwind-merge": "^3.5.0",
463
467
  "tailwindcss-animate": "^1.0.7",
468
+ "tw-animate-css": "^1.4.0",
464
469
  "vaul": "^1.1.2"
465
470
  },
466
471
  "devDependencies": {
@@ -478,6 +483,7 @@
478
483
  "@types/react-dom": "^19.2.5",
479
484
  "@vitejs/plugin-react": "^6.1.1",
480
485
  "@vitest/coverage-v8": "^4.1.11",
486
+ "antd": "6.6.2",
481
487
  "axe-core": "^4.13.0",
482
488
  "eslint": "^10.9.1",
483
489
  "eslint-plugin-react": "^7.37.5",