@godxjp/ui 20.0.0 → 20.2.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 (273) hide show
  1. package/README.md +8 -2
  2. package/dist/app/app-provider.js +37 -21
  3. package/dist/app/index.d.ts +2 -0
  4. package/dist/app/index.js +2 -0
  5. package/dist/app/storage.d.ts +17 -0
  6. package/dist/app/storage.js +28 -0
  7. package/dist/app/theme-axes.d.ts +2 -0
  8. package/dist/app/theme-axes.js +45 -0
  9. package/dist/components/charts/chart-cartesian.d.ts +2 -1
  10. package/dist/components/charts/chart-cartesian.js +52 -3
  11. package/dist/components/charts/chart-category-axis.d.ts +55 -0
  12. package/dist/components/charts/chart-category-axis.js +93 -0
  13. package/dist/components/charts/chart-frame.d.ts +10 -1
  14. package/dist/components/charts/chart-frame.js +19 -3
  15. package/dist/components/charts/compact-bar-trend.d.ts +1 -1
  16. package/dist/components/charts/compact-bar-trend.js +2 -0
  17. package/dist/components/charts/pie-chart.d.ts +1 -1
  18. package/dist/components/charts/pie-chart.js +12 -1
  19. package/dist/components/charts/recharts-peer.d.ts +49 -0
  20. package/dist/components/charts/recharts-peer.js +45 -0
  21. package/dist/components/data-display/card.d.ts +12 -1
  22. package/dist/components/data-display/card.js +22 -4
  23. package/dist/components/data-display/code-block.js +6 -2
  24. package/dist/components/data-display/data-table.d.ts +39 -4
  25. package/dist/components/data-display/data-table.js +802 -270
  26. package/dist/components/data-display/descriptions.d.ts +27 -6
  27. package/dist/components/data-display/descriptions.js +58 -17
  28. package/dist/components/data-display/index.d.ts +2 -0
  29. package/dist/components/data-display/index.js +2 -0
  30. package/dist/components/data-display/list-row.d.ts +10 -1
  31. package/dist/components/data-display/list-row.js +7 -1
  32. package/dist/components/data-display/popover.d.ts +9 -3
  33. package/dist/components/data-display/popover.js +65 -11
  34. package/dist/components/data-display/range-timeline.d.ts +38 -0
  35. package/dist/components/data-display/range-timeline.js +161 -0
  36. package/dist/components/data-display/scroll-area.js +13 -2
  37. package/dist/components/data-display/service-launcher-card.js +14 -12
  38. package/dist/components/data-display/table.d.ts +71 -3
  39. package/dist/components/data-display/table.js +56 -18
  40. package/dist/components/data-display/tree-list.js +4 -9
  41. package/dist/components/data-entry/calendar.d.ts +2 -2
  42. package/dist/components/data-entry/calendar.js +23 -3
  43. package/dist/components/data-entry/cascader.d.ts +1 -1
  44. package/dist/components/data-entry/cascader.js +188 -24
  45. package/dist/components/data-entry/color-picker.d.ts +1 -1
  46. package/dist/components/data-entry/color-picker.js +17 -5
  47. package/dist/components/data-entry/control-appearance.d.ts +64 -0
  48. package/dist/components/data-entry/control-appearance.js +39 -0
  49. package/dist/components/data-entry/control-surface.d.ts +61 -0
  50. package/dist/components/data-entry/control-surface.js +39 -0
  51. package/dist/components/data-entry/date-picker.d.ts +1 -1
  52. package/dist/components/data-entry/date-picker.js +344 -113
  53. package/dist/components/data-entry/date-range-picker.d.ts +1 -1
  54. package/dist/components/data-entry/date-range-picker.js +278 -140
  55. package/dist/components/data-entry/form-field.d.ts +1 -1
  56. package/dist/components/data-entry/form-field.js +39 -4
  57. package/dist/components/data-entry/form.d.ts +4 -0
  58. package/dist/components/data-entry/form.js +4 -2
  59. package/dist/components/data-entry/index.d.ts +7 -3
  60. package/dist/components/data-entry/index.js +10 -1
  61. package/dist/components/data-entry/input-otp.d.ts +1 -1
  62. package/dist/components/data-entry/input.d.ts +12 -34
  63. package/dist/components/data-entry/input.js +92 -24
  64. package/dist/components/data-entry/month-picker.d.ts +1 -1
  65. package/dist/components/data-entry/month-picker.js +47 -10
  66. package/dist/components/data-entry/month-range-picker.d.ts +1 -1
  67. package/dist/components/data-entry/month-range-picker.js +51 -11
  68. package/dist/components/data-entry/number-input.d.ts +7 -0
  69. package/dist/components/data-entry/number-input.js +147 -98
  70. package/dist/components/data-entry/password-input.d.ts +1 -1
  71. package/dist/components/data-entry/radio.d.ts +1 -1
  72. package/dist/components/data-entry/radio.js +61 -13
  73. package/dist/components/data-entry/search-input.d.ts +1 -1
  74. package/dist/components/data-entry/search-input.js +16 -2
  75. package/dist/components/data-entry/search-select.d.ts +2 -2
  76. package/dist/components/data-entry/search-select.js +209 -78
  77. package/dist/components/data-entry/select.d.ts +22 -4
  78. package/dist/components/data-entry/select.js +215 -163
  79. package/dist/components/data-entry/slider.d.ts +9 -1
  80. package/dist/components/data-entry/slider.js +87 -9
  81. package/dist/components/data-entry/switch.d.ts +3 -0
  82. package/dist/components/data-entry/switch.js +29 -3
  83. package/dist/components/data-entry/textarea.d.ts +14 -56
  84. package/dist/components/data-entry/textarea.js +80 -33
  85. package/dist/components/data-entry/time-picker.d.ts +2 -2
  86. package/dist/components/data-entry/time-picker.js +333 -109
  87. package/dist/components/data-entry/time-range-picker.d.ts +5 -0
  88. package/dist/components/data-entry/time-range-picker.js +89 -0
  89. package/dist/components/data-entry/transfer.d.ts +1 -1
  90. package/dist/components/data-entry/transfer.js +86 -28
  91. package/dist/components/data-entry/tree-select.d.ts +1 -1
  92. package/dist/components/data-entry/tree-select.js +201 -113
  93. package/dist/components/data-entry/tree-utils.js +7 -14
  94. package/dist/components/data-entry/upload-files.d.ts +2 -0
  95. package/dist/components/data-entry/upload-files.js +31 -0
  96. package/dist/components/data-entry/upload-request.d.ts +4 -0
  97. package/dist/components/data-entry/upload-request.js +53 -0
  98. package/dist/components/data-entry/upload-types.d.ts +28 -0
  99. package/dist/components/data-entry/upload-types.js +2 -0
  100. package/dist/components/data-entry/upload.d.ts +2 -2
  101. package/dist/components/data-entry/upload.js +475 -115
  102. package/dist/components/feedback/dialog.js +19 -19
  103. package/dist/components/feedback/sheet.js +3 -0
  104. package/dist/components/feedback/tooltip.js +3 -0
  105. package/dist/components/general/button.d.ts +2 -1
  106. package/dist/components/general/button.js +7 -1
  107. package/dist/components/general/index.d.ts +1 -0
  108. package/dist/components/general/index.js +2 -0
  109. package/dist/components/general/typography.d.ts +3 -0
  110. package/dist/components/general/typography.js +15 -1
  111. package/dist/components/general/visually-hidden.d.ts +3 -0
  112. package/dist/components/general/visually-hidden.js +9 -0
  113. package/dist/components/layout/app-launcher.d.ts +34 -0
  114. package/dist/components/layout/app-launcher.js +261 -0
  115. package/dist/components/layout/app-shell.d.ts +3 -1
  116. package/dist/components/layout/app-shell.js +34 -14
  117. package/dist/components/layout/auth-shell.d.ts +1 -1
  118. package/dist/components/layout/auth-shell.js +2 -0
  119. package/dist/components/layout/breadcrumb.d.ts +14 -2
  120. package/dist/components/layout/breadcrumb.js +46 -4
  121. package/dist/components/layout/flex.d.ts +1 -1
  122. package/dist/components/layout/flex.js +23 -2
  123. package/dist/components/layout/index.d.ts +3 -0
  124. package/dist/components/layout/index.js +5 -1
  125. package/dist/components/layout/org-switcher.js +20 -1
  126. package/dist/components/layout/page-container.d.ts +1 -1
  127. package/dist/components/layout/page-container.js +5 -3
  128. package/dist/components/layout/responsive-grid.d.ts +16 -2
  129. package/dist/components/layout/responsive-grid.js +29 -2
  130. package/dist/components/layout/sidebar.js +2 -1
  131. package/dist/components/layout/topbar-item.d.ts +3 -0
  132. package/dist/components/layout/topbar-item.js +18 -3
  133. package/dist/components/layout/topbar.d.ts +1 -1
  134. package/dist/components/layout/topbar.js +27 -6
  135. package/dist/components/navigation/dropdown-menu.d.ts +30 -2
  136. package/dist/components/navigation/dropdown-menu.js +73 -11
  137. package/dist/components/navigation/pagination.d.ts +2 -2
  138. package/dist/components/navigation/pagination.js +155 -83
  139. package/dist/components/navigation/steps.d.ts +2 -2
  140. package/dist/components/navigation/steps.js +29 -4
  141. package/dist/components/navigation/tabs.d.ts +5 -33
  142. package/dist/components/navigation/tabs.js +232 -64
  143. package/dist/components/ui/hover-card.js +3 -0
  144. package/dist/components/ui/input-otp.d.ts +26 -28
  145. package/dist/components/ui/input-otp.js +50 -7
  146. package/dist/components/ui/password-input.d.ts +36 -2
  147. package/dist/components/ui/password-input.js +27 -7
  148. package/dist/components/ui/rating.d.ts +25 -0
  149. package/dist/components/ui/rating.js +67 -27
  150. package/dist/components/ui/segmented.d.ts +9 -0
  151. package/dist/components/ui/segmented.js +17 -2
  152. package/dist/components/ui/separator.d.ts +4 -0
  153. package/dist/components/ui/separator.js +13 -0
  154. package/dist/components/ui/tag-input.d.ts +45 -0
  155. package/dist/components/ui/tag-input.js +109 -27
  156. package/dist/form/form-context.d.ts +29 -0
  157. package/dist/form/form-context.js +44 -4
  158. package/dist/form/form-field-array.d.ts +22 -0
  159. package/dist/form/form-field-array.js +50 -0
  160. package/dist/form/form-field-control.d.ts +2 -1
  161. package/dist/form/form-field-control.js +116 -40
  162. package/dist/form/form-root.d.ts +2 -1
  163. package/dist/form/form-root.js +142 -23
  164. package/dist/form/index.d.ts +3 -1
  165. package/dist/form/index.js +12 -1
  166. package/dist/i18n/index.d.ts +1 -1
  167. package/dist/i18n/index.js +3 -1
  168. package/dist/i18n/messages/en.json +59 -6
  169. package/dist/i18n/messages/ja.json +59 -6
  170. package/dist/i18n/messages/vi.json +59 -6
  171. package/dist/i18n/translate.d.ts +19 -0
  172. package/dist/i18n/translate.js +24 -0
  173. package/dist/inertia/index.d.ts +20 -0
  174. package/dist/inertia/index.js +60 -1
  175. package/dist/lib/control-styles.d.ts +25 -3
  176. package/dist/lib/control-styles.js +9 -3
  177. package/dist/lib/datetime/picker-format.d.ts +8 -0
  178. package/dist/lib/datetime/picker-format.js +54 -0
  179. package/dist/lib/overlay-portal.d.ts +18 -0
  180. package/dist/lib/overlay-portal.js +17 -0
  181. package/dist/props/components/app.prop.d.ts +13 -2
  182. package/dist/props/components/charts.prop.d.ts +21 -0
  183. package/dist/props/components/data-display.prop.d.ts +55 -4
  184. package/dist/props/components/data-entry.prop.d.ts +687 -43
  185. package/dist/props/components/form.prop.d.ts +142 -4
  186. package/dist/props/components/general.prop.d.ts +30 -1
  187. package/dist/props/components/index.d.ts +2 -2
  188. package/dist/props/components/layout.prop.d.ts +255 -8
  189. package/dist/props/components/navigation.prop.d.ts +113 -3
  190. package/dist/props/registry.d.ts +376 -10
  191. package/dist/props/registry.js +493 -9
  192. package/dist/props/vocabulary/data.prop.d.ts +179 -1
  193. package/dist/props/vocabulary/index.d.ts +4 -4
  194. package/dist/props/vocabulary/interaction.prop.d.ts +51 -2
  195. package/dist/props/vocabulary/navigation.prop.d.ts +40 -0
  196. package/dist/props/vocabulary/shared.prop.d.ts +33 -0
  197. package/dist/styles/badge-layout.css +2 -1
  198. package/dist/styles/card-layout.css +36 -5
  199. package/dist/styles/chart-layout.css +17 -1
  200. package/dist/styles/control.css +520 -14
  201. package/dist/styles/data-display-layout.css +248 -7
  202. package/dist/styles/data-entry-layout.css +13 -0
  203. package/dist/styles/layout.css +221 -4
  204. package/dist/styles/navigation-layout.css +230 -1
  205. package/dist/styles/shell-layout.css +690 -21
  206. package/dist/styles/table-layout.css +95 -6
  207. package/dist/styles/text-layout.css +5 -0
  208. package/dist/tokens/base.css +1 -0
  209. package/dist/tokens/components/badge.css +1 -0
  210. package/dist/tokens/components/chart.css +6 -0
  211. package/dist/tokens/components/control.css +81 -3
  212. package/dist/tokens/components/data-display.css +9 -0
  213. package/dist/tokens/components/descriptions.css +11 -0
  214. package/dist/tokens/components/flex.css +8 -0
  215. package/dist/tokens/components/navigation.css +55 -0
  216. package/dist/tokens/components/shell.css +100 -5
  217. package/dist/tokens/components/table.css +14 -0
  218. package/dist/tokens/foundation.css +2 -0
  219. package/dist/tokens/semantic/layout.css +9 -0
  220. package/docs/CONSUMER-RULES.md +13 -0
  221. package/docs/DESIGN-AUTHORITY.md +43 -6
  222. package/docs/DEVELOPMENT.md +4 -3
  223. package/docs/FORMS.md +151 -6
  224. package/docs/FRAME-COVERAGE-REPORT.md +29 -16
  225. package/docs/README.md +1 -1
  226. package/docs/STANDARDS-vocabulary-tokens.md +1 -1
  227. package/docs/TESTING.md +15 -6
  228. package/docs/charts/cjk-category-axis.tsx +81 -0
  229. package/docs/data-display/card/index.tsx +22 -0
  230. package/docs/data-display/data-table/examples/antd-parity.tsx +257 -0
  231. package/docs/data-display/data-table/index.tsx +23 -0
  232. package/docs/data-display/descriptions.tsx +41 -0
  233. package/docs/data-display/list-row.tsx +6 -6
  234. package/docs/data-display/scroll-area.tsx +31 -25
  235. package/docs/data-display/table.tsx +104 -45
  236. package/docs/data-display/timeline.tsx +41 -0
  237. package/docs/data-entry/date-picker.tsx +85 -0
  238. package/docs/data-entry/date-range-picker.tsx +26 -0
  239. package/docs/data-entry/form-dynamic-fields.tsx +199 -0
  240. package/docs/data-entry/form.tsx +74 -4
  241. package/docs/data-entry/input-otp.tsx +24 -0
  242. package/docs/data-entry/input.tsx +46 -1
  243. package/docs/data-entry/month-range-picker.tsx +1 -1
  244. package/docs/data-entry/select.tsx +27 -0
  245. package/docs/data-entry/switch.tsx +41 -0
  246. package/docs/data-entry/textarea.tsx +38 -0
  247. package/docs/data-entry/time-picker.tsx +85 -1
  248. package/docs/data-entry/time-range-picker.tsx +55 -0
  249. package/docs/data-entry/transfer.tsx +17 -0
  250. package/docs/data-entry/upload.tsx +56 -12
  251. package/docs/feedback/tooltip.tsx +1 -1
  252. package/docs/general/activity.tsx +2 -2
  253. package/docs/general/button/index.tsx +14 -1
  254. package/docs/general/typography.tsx +14 -1
  255. package/docs/layout/app-launcher.tsx +195 -0
  256. package/docs/layout/app-shell-arrangements.tsx +5 -5
  257. package/docs/layout/app-shell.tsx +11 -0
  258. package/docs/layout/flex.tsx +50 -0
  259. package/docs/layout/responsive-grid.tsx +21 -1
  260. package/docs/layout/topbar.tsx +5 -9
  261. package/docs/navigation/app-setting-picker.tsx +11 -0
  262. package/docs/navigation/breadcrumb.tsx +48 -0
  263. package/docs/navigation/dropdown-menu.tsx +21 -0
  264. package/docs/navigation/pagination.tsx +52 -0
  265. package/docs/navigation/steps.tsx +37 -0
  266. package/docs/navigation/tabs.tsx +97 -1
  267. package/docs/query/button-refetch.tsx +1 -0
  268. package/docs/showcase/settings-security-mfa.tsx +3 -3
  269. package/package.json +24 -4
  270. package/scripts/_agent-setup.mjs +76 -9
  271. package/scripts/init-guinea-pig.mjs +26 -4
  272. package/scripts/ui-audit.mjs +243 -30
  273. package/scripts/visual-audit.mjs +45 -7
@@ -125,7 +125,7 @@ export default function Demo() {
125
125
  <CardHeader>
126
126
  <CardTitle level={2}>Shared delay across a toolbar (TooltipProvider)</CardTitle>
127
127
  <CardDescription>
128
- Wrap a cluster in TooltipProvider to set one delayDuration for every tooltip inside
128
+ Wrap a cluster in TooltipProvider to set one delayDuration for every tooltip inside ·
129
129
  a dense toolbar feels snappy without repeating the prop on each Tooltip.
130
130
  </CardDescription>
131
131
  </CardHeader>
@@ -99,7 +99,7 @@ export default function Demo() {
99
99
  <Flex direction="col" gap="md">
100
100
  <Flex direction="col" gap="xs">
101
101
  <Text size="xs" tone="muted">
102
- dots(既定)— 3 点が順に浮く。&ldquo;入力中&rdquo; の省略記号の慣習。
102
+ dots(既定)· 3 点が順に浮く。&ldquo;入力中&rdquo; の省略記号の慣習。
103
103
  </Text>
104
104
  <Activity variant="dots" label="佐藤さんが入力しています…" />
105
105
  </Flex>
@@ -156,7 +156,7 @@ export default function Demo() {
156
156
  <Flex direction="col" gap="md">
157
157
  <Flex direction="col" gap="xs">
158
158
  <Text size="xs" tone="muted">
159
- label のみ
159
+ label のみ ·
160
160
  マークの隣に可視テキストとして描画される。アニメーションだけで意味を運ばせない。
161
161
  </Text>
162
162
  <Activity label="佐藤さんが入力しています…" />
@@ -1,4 +1,11 @@
1
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
1
+ import {
2
+ Badge,
3
+ Card,
4
+ CardContent,
5
+ CardDescription,
6
+ CardHeader,
7
+ CardTitle,
8
+ } from "@godxjp/ui/data-display";
2
9
  import { Button } from "@godxjp/ui/general";
3
10
  import { Flex, PageContainer } from "@godxjp/ui/layout";
4
11
  import { Pencil, Plus, Trash2 } from "lucide-react";
@@ -56,6 +63,12 @@ export default function Demo() {
56
63
  <Button variant="dashed">追加 Add row</Button>
57
64
  <Button variant="ghost">詳細 Details</Button>
58
65
  <Button variant="link">もっと見る More</Button>
66
+ <Button id="bare-count" variant="bare">
67
+ 返信 <Badge icon={null}>12</Badge>
68
+ </Button>
69
+ <Button id="ghost-count" variant="ghost">
70
+ 返信 <Badge icon={null}>12</Badge>
71
+ </Button>
59
72
  <Button variant="destructive">削除 Delete</Button>
60
73
  </Flex>
61
74
  </CardContent>
@@ -1,4 +1,5 @@
1
- import { Button, Heading, Text } from "@godxjp/ui/general";
1
+ import { useTranslation } from "@godxjp/ui/i18n";
2
+ import { Button, Heading, Text, VisuallyHidden } from "@godxjp/ui/general";
2
3
  import {
3
4
  Card,
4
5
  CardContent,
@@ -35,6 +36,7 @@ const headingTones = [
35
36
  ] as const;
36
37
 
37
38
  export default function Demo() {
39
+ const { t } = useTranslation();
38
40
  return (
39
41
  <PageContainer
40
42
  title="Typography"
@@ -229,6 +231,17 @@ export default function Demo() {
229
231
  </Flex>
230
232
  </CardContent>
231
233
  </Card>
234
+ <Card>
235
+ <CardHeader>
236
+ <CardTitle level={2}>{t("textExamples.preservedText")}</CardTitle>
237
+ </CardHeader>
238
+ <CardContent>
239
+ <Text as="p" whitespace="pre-wrap">
240
+ {t("textExamples.sampleText")}
241
+ </Text>
242
+ <VisuallyHidden>{t("textExamples.preservedText")}</VisuallyHidden>
243
+ </CardContent>
244
+ </Card>
232
245
  </Flex>
233
246
  </PageContainer>
234
247
  );
@@ -0,0 +1,195 @@
1
+ import { useState } from "react";
2
+ import { BarChart3, LifeBuoy, MessagesSquare, Receipt, Users } from "lucide-react";
3
+
4
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
5
+ import { Button, Text } from "@godxjp/ui/general";
6
+ import {
7
+ AppLauncher,
8
+ type AppLauncherLabels,
9
+ Flex,
10
+ PageContainer,
11
+ ResponsiveGrid,
12
+ Topbar,
13
+ } from "@godxjp/ui/layout";
14
+
15
+ const apps = [
16
+ { id: "console", name: "Console", href: "/console", icon: <BarChart3 />, current: true },
17
+ { id: "billing", name: "Billing", href: "/billing", icon: <Receipt /> },
18
+ { id: "people", name: "People", href: "/people", icon: <Users /> },
19
+ { id: "chat", name: "Chat", href: "/chat", icon: <MessagesSquare /> },
20
+ ];
21
+
22
+ const groups = [
23
+ {
24
+ label: "More from Acme",
25
+ apps: [
26
+ {
27
+ id: "support",
28
+ name: "Support",
29
+ href: "https://support.example.test",
30
+ icon: <LifeBuoy />,
31
+ // An external destination renders a plain anchor and bypasses `linkComponent` — a
32
+ // client-side router link to another origin is a router asked to route somewhere it
33
+ // does not own.
34
+ external: true,
35
+ },
36
+ ],
37
+ },
38
+ ];
39
+
40
+ const labels: AppLauncherLabels = {
41
+ trigger: "Acme のアプリ",
42
+ title: "アプリを切り替える",
43
+ empty: "利用できるアプリがありません。",
44
+ loading: "アプリを読み込み中",
45
+ retry: "再試行",
46
+ externalHint: "(新しいタブで開きます)",
47
+ };
48
+
49
+ /**
50
+ * AppLauncher — the nine-dot platform app grid.
51
+ *
52
+ * WHERE IT SITS AMONG THINGS THAT LOOK LIKE IT:
53
+ *
54
+ * - `ServiceLauncherCard` (data-display) is also a launcher tile, but a PAGE-SIZED one — status,
55
+ * hostname, plan, an action button, a reason it is locked — for a service-catalogue page where
56
+ * choosing is a considered act. This tile is bar-sized: mark plus name, the whole tile one link,
57
+ * because changing app is a reflex. A grid of `ServiceLauncherCard`s inside a popover is the
58
+ * wrong component, not a smaller version of this one.
59
+ * - `AppShell navRail` says the SAME platform scope as a docked column. Pick ONE. The launcher for
60
+ * a platform with MANY apps where switching is occasional (the Google Workspace shape); the rail
61
+ * for a single product where switching workspace is constant enough to deserve permanent screen
62
+ * width (the Slack shape). Shipping both puts one scope in two places.
63
+ */
64
+ export default function Demo() {
65
+ const [error, setError] = useState<string | undefined>("アプリ一覧を取得できませんでした。");
66
+
67
+ return (
68
+ <PageContainer title="AppLauncher" subtitle="topbar のセル · popover/sheet · グループ · 状態">
69
+ <ResponsiveGrid columns={{ sm: 1, lg: 2 }}>
70
+ <Card>
71
+ <CardHeader>
72
+ <CardTitle level={2}>バーの中のセル</CardTitle>
73
+ <CardDescription>
74
+ trigger は `TopbarItem` なので、高さはバーそのもの(`align-self: stretch`)。 `Button
75
+ variant=&quot;ghost&quot;` を置くと、背の高い帯の中に浮いた丸薬になります。 panel は
76
+ `responsive=&quot;auto&quot;` で、共有トークン
77
+ `--sheet-responsive-breakpoint-width`(48rem)を境に popover と bottom sheet
78
+ が入れ替わります。
79
+ </CardDescription>
80
+ </CardHeader>
81
+ <CardContent>
82
+ <Flex direction="col" gap="md">
83
+ <Topbar
84
+ start={<Text weight="medium">Acme Console</Text>}
85
+ end={<AppLauncher apps={apps} groups={groups} labels={labels} />}
86
+ />
87
+ <Text size="sm" tone="muted">
88
+ current のアプリだけが `aria-current=&quot;page&quot;` を持ちます。
89
+ </Text>
90
+ </Flex>
91
+ </CardContent>
92
+ </Card>
93
+
94
+ <Card>
95
+ <CardHeader>
96
+ <CardTitle level={2}>列数と非同期状態</CardTitle>
97
+ <CardDescription>
98
+ 既定は3列(Google と同じ形)。`columns` は1インスタンスの上書きです。 loading と error
99
+ は grid の代わりに同じ所有 surface へ表示されます。
100
+ </CardDescription>
101
+ </CardHeader>
102
+ <CardContent>
103
+ <Flex direction="col" gap="md">
104
+ <Topbar
105
+ start={<Text weight="medium">4 列</Text>}
106
+ end={
107
+ <AppLauncher
108
+ apps={apps}
109
+ groups={groups}
110
+ labels={labels}
111
+ columns={4}
112
+ responsive="popover"
113
+ />
114
+ }
115
+ />
116
+ <Topbar
117
+ start={<Text weight="medium">loading</Text>}
118
+ end={<AppLauncher apps={apps} labels={labels} loading responsive="popover" />}
119
+ />
120
+ <Topbar
121
+ start={<Text weight="medium">empty</Text>}
122
+ end={<AppLauncher apps={[]} labels={labels} responsive="sheet" />}
123
+ />
124
+ <Topbar
125
+ start={<Text weight="medium">error</Text>}
126
+ end={
127
+ <AppLauncher
128
+ apps={apps}
129
+ labels={labels}
130
+ error={error}
131
+ onRetry={() => setError(undefined)}
132
+ responsive="popover"
133
+ />
134
+ }
135
+ />
136
+ {!error ? (
137
+ <Button
138
+ variant="outline"
139
+ size="sm"
140
+ onClick={() => setError("再試行に失敗しました。")}
141
+ >
142
+ エラーを復元
143
+ </Button>
144
+ ) : null}
145
+ </Flex>
146
+ </CardContent>
147
+ </Card>
148
+ <Card>
149
+ <CardHeader>
150
+ <CardTitle level={2}>バー以外の chrome — icon とパネルの向き</CardTitle>
151
+ <CardDescription>
152
+ `appearance=&quot;icon&quot;` は正方形の ghost Button。バーではない chrome(nav rail、
153
+ カードのヘッダ、ツールバー)のための箱で、glyph は同じです。 パネルは既定で chrome
154
+ から外へ開きます(bar は下+end、それ以外は inline-end+start)。 位置を変えられる
155
+ chrome だけが向きを知っているので、`side` / `align` で明示できます。
156
+ </CardDescription>
157
+ </CardHeader>
158
+ <CardContent>
159
+ <Flex direction="row" gap="md">
160
+ <AppLauncher apps={apps} groups={groups} labels={labels} appearance="icon" />
161
+ <AppLauncher
162
+ apps={apps}
163
+ groups={groups}
164
+ labels={labels}
165
+ appearance="icon"
166
+ side="bottom"
167
+ align="start"
168
+ />
169
+ </Flex>
170
+ </CardContent>
171
+ </Card>
172
+
173
+ <Card>
174
+ <CardHeader>
175
+ <CardTitle level={2}>Launchpad — 画面いっぱい</CardTitle>
176
+ <CardDescription>
177
+ `responsive=&quot;fullscreen&quot;` は plaform の start bar のための形。背後のページを
178
+ ぼかし、その地の上にタイルが並びます(macOS Launchpad / Windows Start)。 幅に関係なく
179
+ 1つの surface に固定。列数だけが surface に合わせて 3 · 4 · 5 · 6 と上がります。
180
+ </CardDescription>
181
+ </CardHeader>
182
+ <CardContent>
183
+ <AppLauncher
184
+ apps={apps}
185
+ groups={groups}
186
+ labels={labels}
187
+ appearance="icon"
188
+ responsive="fullscreen"
189
+ />
190
+ </CardContent>
191
+ </Card>
192
+ </ResponsiveGrid>
193
+ </PageContainer>
194
+ );
195
+ }
@@ -1,5 +1,5 @@
1
1
  import { useState } from "react";
2
- import { AppShell, Flex, PageContainer, Sidebar, Topbar } from "@godxjp/ui/layout";
2
+ import { AppShell, Flex, PageContainer, Sidebar, Topbar, TopbarItem } from "@godxjp/ui/layout";
3
3
  import type { SidebarSectionProp } from "@godxjp/ui/layout";
4
4
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
5
5
  import { Button, Text } from "@godxjp/ui/general";
@@ -95,9 +95,9 @@ export default function Demo() {
95
95
  topbar={
96
96
  <Topbar
97
97
  start={
98
- <Button
99
- size="sm"
100
- variant="ghost"
98
+ // A bar cell is a TopbarItem, not a Button: a Button in a bar is a --control-height
99
+ // pill floating in a taller strip, with its own hover fill and its own focus ring.
100
+ <TopbarItem
101
101
  aria-label={collapsed ? "サイドバーを開く" : "サイドバーを閉じる"}
102
102
  aria-expanded={!collapsed}
103
103
  onClick={() => setCollapsed((c) => !c)}
@@ -107,7 +107,7 @@ export default function Demo() {
107
107
  ) : (
108
108
  <PanelLeftClose aria-hidden="true" />
109
109
  )}
110
- </Button>
110
+ </TopbarItem>
111
111
  }
112
112
  />
113
113
  }
@@ -372,3 +372,14 @@ export default function Demo() {
372
372
  </AppShell>
373
373
  );
374
374
  }
375
+
376
+ /** A dashboard keeps the canonical topbar and main area without a sidebar track. */
377
+ export function WithoutSidebar() {
378
+ return (
379
+ <AppShell topbar={<Topbar start={<Text>Workspace</Text>} />}>
380
+ <PageContainer title="Dashboard">
381
+ <Text>Project overview</Text>
382
+ </PageContainer>
383
+ </AppShell>
384
+ );
385
+ }
@@ -260,6 +260,56 @@ export default function Demo() {
260
260
  </Flex>
261
261
  </CardContent>
262
262
  </Card>
263
+
264
+ <Card>
265
+ <CardHeader>
266
+ <CardTitle level={2}>レスポンシブな操作行</CardTitle>
267
+ </CardHeader>
268
+ <CardContent>
269
+ <Flex
270
+ id="responsive-actions"
271
+ direction={{ base: "col", lg: "row" }}
272
+ gap="md"
273
+ align="start"
274
+ >
275
+ <Flex fill>
276
+ <Text>画面幅に合わせて操作をまとめます。</Text>
277
+ </Flex>
278
+ <Button>保存</Button>
279
+ <Button variant="outline">キャンセル</Button>
280
+ </Flex>
281
+ </CardContent>
282
+ </Card>
283
+ <Card>
284
+ <CardHeader>
285
+ <CardTitle level={2}>軽い強調と行アクション</CardTitle>
286
+ </CardHeader>
287
+ <CardContent>
288
+ <Flex direction="col" gap="md">
289
+ <Flex id="hover-notice" surface="warning" pad={3} tabIndex={0}>
290
+ <Text>締切を確認してください。</Text>
291
+ <Flex reveal="hover" surface="popover" gap="xs" pad={1}>
292
+ <Button variant="ghost" size="sm">
293
+ 編集
294
+ </Button>
295
+ <Button variant="ghost" size="sm">
296
+ 解除
297
+ </Button>
298
+ </Flex>
299
+ </Flex>
300
+ <Flex as="ul" direction="col" gap="xs">
301
+ <li>添付ファイルを確認</li>
302
+ <li>担当者を選択</li>
303
+ </Flex>
304
+ <Flex surface="muted" pad={{ block: 2, inline: 3 }}>
305
+ <Text as="code" chip decoration="line-through">
306
+ old_status
307
+ </Text>
308
+ <Text>更新済み</Text>
309
+ </Flex>
310
+ </Flex>
311
+ </CardContent>
312
+ </Card>
263
313
  </Flex>
264
314
  </PageContainer>
265
315
  );
@@ -217,7 +217,7 @@ export default function Demo() {
217
217
  <CardDescription>
218
218
  名前付きコレクション geometry: コンテナ幅が lg ステップ(64rem)に達するまでは 1
219
219
  列、そこから 3 列に切り替わる。ResponsiveGrid には lg
220
- より上のステップが無いため、1024px 相当でも 1440px 相当でも同じ 3 列になる
220
+ より上のステップが無いため、1024px 相当でも 1440px 相当でも同じ 3 列になる ·
221
221
  課金プランカタログの「3/3/1」契約 (dxs-platform/platform#333)。`columns` の代わりに
222
222
  `preset` を渡すだけで、呼び出し側がブレークポイント値を自作する必要がない。
223
223
  </CardDescription>
@@ -254,6 +254,26 @@ export default function Demo() {
254
254
  </ResponsiveGrid>
255
255
  </CardContent>
256
256
  </Card>
257
+
258
+ <Card>
259
+ <CardHeader>
260
+ <CardTitle level={2}>一覧と補助情報 2:1</CardTitle>
261
+ </CardHeader>
262
+ <CardContent>
263
+ <ResponsiveGrid columns={{ base: 1, lg: 3 }} pad={{ block: 2 }}>
264
+ <ResponsiveGrid.Item span={{ base: 1, lg: 2 }}>
265
+ <Flex id="grid-main" surface="muted" pad={3}>
266
+ <Text>メインの一覧</Text>
267
+ </Flex>
268
+ </ResponsiveGrid.Item>
269
+ <ResponsiveGrid.Item>
270
+ <Flex id="grid-rail" surface="muted" pad={3}>
271
+ <Text>補助情報</Text>
272
+ </Flex>
273
+ </ResponsiveGrid.Item>
274
+ </ResponsiveGrid>
275
+ </CardContent>
276
+ </Card>
257
277
  </Flex>
258
278
  </PageContainer>
259
279
  );
@@ -1,5 +1,5 @@
1
1
  import { useState } from "react";
2
- import { AppShell, Flex, PageContainer, Sidebar, Topbar } from "@godxjp/ui/layout";
2
+ import { AppShell, Flex, PageContainer, Sidebar, Topbar, TopbarItem } from "@godxjp/ui/layout";
3
3
  import type { SidebarSectionProp } from "@godxjp/ui/layout";
4
4
  import {
5
5
  Avatar,
@@ -154,18 +154,14 @@ export default function Demo() {
154
154
  <Badge tone="warning" className="text-xs">
155
155
  ステージング
156
156
  </Badge>
157
- <Button
158
- variant="ghost"
159
- size="icon-sm"
157
+ <TopbarItem
160
158
  aria-label="通知"
161
- className="relative"
159
+ badge={unread ? 12 : undefined}
160
+ badgeTone="destructive"
162
161
  onClick={() => setUnread(false)}
163
162
  >
164
163
  <Bell />
165
- {unread ? (
166
- <span className="bg-destructive absolute end-1.5 top-1.5 size-1.5 rounded-full" />
167
- ) : null}
168
- </Button>
164
+ </TopbarItem>
169
165
  <DropdownMenu>
170
166
  <DropdownMenuTrigger asChild>
171
167
  <Button variant="ghost" size="icon-sm" aria-label="アカウントメニュー">
@@ -33,6 +33,17 @@ export default function Demo() {
33
33
  subtitle="kind で 1 つの AppProvider 設定を読み書きする統合ピッカー"
34
34
  >
35
35
  <Flex direction="col" gap="lg">
36
+ <Card>
37
+ <CardHeader>
38
+ <CardTitle level={2}>インライン表示</CardTitle>
39
+ </CardHeader>
40
+ <CardContent>
41
+ <Flex gap="md" align="center">
42
+ <Text>表示言語</Text>
43
+ <AppSettingPicker kind="locale" appearance="inline" id="setting-inline" />
44
+ </Flex>
45
+ </CardContent>
46
+ </Card>
36
47
  <Card>
37
48
  <CardHeader>
38
49
  <CardTitle level={2}>kind で対象設定を選ぶ</CardTitle>
@@ -129,6 +129,54 @@ export default function Demo() {
129
129
  </Flex>
130
130
  </CardContent>
131
131
  </Card>
132
+
133
+ {/* Ant Design parity surface — separator / itemRender / item menu */}
134
+ <Card>
135
+ <CardHeader>
136
+ <CardTitle level={2}>separator · itemRender · menu (Ant Design パリティ)</CardTitle>
137
+ <CardDescription>
138
+ separator は既定のシェブロンを任意のノードに置き換える(空文字で消える)。常に
139
+ aria-hidden なので、読み上げは ol / li の構造のまま。menu は antd の
140
+ BreadcrumbItemType.menu で、その区切りを兄弟切り替えのメニューボタンにする
141
+ (パス付きエントリは role=&quot;menuitem&quot; を保ったまま本物のアンカーになる)。
142
+ </CardDescription>
143
+ </CardHeader>
144
+ <CardContent>
145
+ <Flex direction="col" gap="sm">
146
+ <div id="antd-breadcrumb-slash">
147
+ <Breadcrumb
148
+ ariaLabel="区切り文字のパンくず"
149
+ separator="/"
150
+ items={[
151
+ { label: "ホーム", to: "/" },
152
+ { label: "会員管理", to: "/members" },
153
+ { label: "田中 太郎" },
154
+ ]}
155
+ />
156
+ </div>
157
+ <div id="antd-breadcrumb-menu">
158
+ <Breadcrumb
159
+ ariaLabel="プロジェクト切替のパンくず"
160
+ items={[
161
+ { label: "ホーム", to: "/" },
162
+ {
163
+ label: "プロジェクト A",
164
+ to: "/p/a",
165
+ menu: {
166
+ items: [
167
+ { value: "b", label: "プロジェクト B", to: "/p/b" },
168
+ { value: "c", label: "プロジェクト C", to: "/p/c" },
169
+ { value: "d", label: "プロジェクト D (準備中)", disabled: true },
170
+ ],
171
+ },
172
+ },
173
+ { label: "設定" },
174
+ ]}
175
+ />
176
+ </div>
177
+ </Flex>
178
+ </CardContent>
179
+ </Card>
132
180
  </Flex>
133
181
  </PageContainer>
134
182
  );
@@ -37,6 +37,27 @@ export default function Demo() {
37
37
  subtitle="Radix dropdown · Trigger asChild + Content + Item/Separator/Sub"
38
38
  >
39
39
  <Flex direction="col" gap="lg">
40
+ <Card>
41
+ <CardHeader>
42
+ <CardTitle level={2}>メニュー幅</CardTitle>
43
+ </CardHeader>
44
+ <CardContent>
45
+ <Flex wrap gap="md">
46
+ {(["auto", "trigger", "sm", "md", "lg"] as const).map((width) => (
47
+ <DropdownMenu key={width}>
48
+ <DropdownMenuTrigger asChild>
49
+ <Button id={`menu-width-${width}`} variant="outline">
50
+ {width}
51
+ </Button>
52
+ </DropdownMenuTrigger>
53
+ <DropdownMenuContent width={width}>
54
+ <DropdownMenuItem>編集</DropdownMenuItem>
55
+ </DropdownMenuContent>
56
+ </DropdownMenu>
57
+ ))}
58
+ </Flex>
59
+ </CardContent>
60
+ </Card>
40
61
  {/* Row action menu — the most common use */}
41
62
  <Card>
42
63
  <CardHeader>
@@ -235,6 +235,58 @@ export default function Demo() {
235
235
  />
236
236
  </CardContent>
237
237
  </Card>
238
+
239
+ {/* Ant Design parity surface — showQuickJumper / size / align / responsive */}
240
+ <Card>
241
+ <CardHeader>
242
+ <CardTitle level={2}>showQuickJumper · size · align (Ant Design パリティ)</CardTitle>
243
+ <CardDescription>
244
+ showQuickJumper はページ番号を直接入力するフィールド(Enter または goButton
245
+ で確定、範囲外はクランプ)。size=&quot;sm&quot; はバーに --control-height
246
+ を一度だけ再束縛するので、ページボタン・サイズ変更・ジャンプ欄が同時に縮む。align
247
+ は論理軸(start / center / end)。responsive は既定で有効で、モバイル幅では simple
248
+ 形態に畳む。
249
+ </CardDescription>
250
+ </CardHeader>
251
+ <CardContent>
252
+ <Flex direction="col" gap="lg">
253
+ <div id="antd-pagination-jumper">
254
+ <Pagination
255
+ ariaLabel="クイックジャンパー付きページネーション"
256
+ value={3}
257
+ total={95}
258
+ pageSize={10}
259
+ showTotal
260
+ showSizeChanger
261
+ showQuickJumper
262
+ onValueChange={() => {}}
263
+ />
264
+ </div>
265
+ <div id="antd-pagination-sm">
266
+ <Pagination
267
+ ariaLabel="小サイズ・中央寄せのページネーション"
268
+ value={3}
269
+ total={95}
270
+ pageSize={10}
271
+ size="sm"
272
+ align="center"
273
+ showQuickJumper={{ goButton: "移動" }}
274
+ onValueChange={() => {}}
275
+ />
276
+ </div>
277
+ <div id="antd-pagination-start">
278
+ <Pagination
279
+ ariaLabel="先頭寄せのページネーション"
280
+ value={3}
281
+ total={95}
282
+ pageSize={10}
283
+ align="start"
284
+ onValueChange={() => {}}
285
+ />
286
+ </div>
287
+ </Flex>
288
+ </CardContent>
289
+ </Card>
238
290
  </Flex>
239
291
  </PageContainer>
240
292
  );
@@ -259,6 +259,43 @@ export default function Demo() {
259
259
  </Flex>
260
260
  </CardContent>
261
261
  </Card>
262
+
263
+ {/* Ant Design parity surface — percent + navigation */}
264
+ <Card>
265
+ <CardHeader>
266
+ <CardTitle level={2}>percent · navigation (Ant Design パリティ)</CardTitle>
267
+ <CardDescription>
268
+ percent は antd と同じく「現在ステップ」の進捗のみ(0–100
269
+ にクランプ)。マーカーの周りに確定アークを描き、role=&quot;progressbar&quot;
270
+ として読み上げられる。type=&quot;navigation&quot; は antd
271
+ のスラブ型ナビゲーションバーで、既定のヘアライン
272
+ コネクタは切られ、代わりにシェブロンで繋がる。
273
+ </CardDescription>
274
+ </CardHeader>
275
+ <CardContent>
276
+ <Flex direction="col" gap="lg">
277
+ <div id="antd-steps-percent">
278
+ <Steps
279
+ value={1}
280
+ percent={40}
281
+ items={[{ title: "申込" }, { title: "審査" }, { title: "完了" }]}
282
+ />
283
+ </div>
284
+ <div id="antd-steps-navigation">
285
+ <Steps
286
+ type="navigation"
287
+ value={1}
288
+ onValueChange={() => {}}
289
+ items={[
290
+ { title: "申込", description: "受付済" },
291
+ { title: "審査", description: "書類確認中" },
292
+ { title: "完了", description: "未着手" },
293
+ ]}
294
+ />
295
+ </div>
296
+ </Flex>
297
+ </CardContent>
298
+ </Card>
262
299
  </Flex>
263
300
  </PageContainer>
264
301
  );