@godxjp/ui 19.3.1 → 19.4.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 (116) hide show
  1. package/dist/components/data-display/badge.d.ts +9 -1
  2. package/dist/components/data-display/badge.js +3 -2
  3. package/dist/components/data-display/index.d.ts +2 -0
  4. package/dist/components/data-display/index.js +2 -0
  5. package/dist/components/data-display/popover.d.ts +13 -1
  6. package/dist/components/data-display/popover.js +3 -1
  7. package/dist/components/data-display/table.d.ts +19 -2
  8. package/dist/components/data-display/table.js +4 -1
  9. package/dist/components/data-display/timeline-grid.d.ts +18 -0
  10. package/dist/components/data-display/timeline-grid.js +222 -0
  11. package/dist/components/data-entry/cascader.js +4 -6
  12. package/dist/components/data-entry/checkbox.js +1 -1
  13. package/dist/components/data-entry/search-select.js +5 -7
  14. package/dist/components/data-entry/select.js +32 -28
  15. package/dist/components/data-entry/tree-select.js +4 -6
  16. package/dist/components/general/inert-background.d.ts +5 -0
  17. package/dist/components/general/inert-background.js +48 -0
  18. package/dist/components/layout/auth-shell.d.ts +4 -2
  19. package/dist/components/layout/auth-shell.js +7 -1
  20. package/dist/components/layout/centered-shell.d.ts +2 -2
  21. package/dist/components/layout/flex.d.ts +1 -1
  22. package/dist/components/layout/flex.js +2 -1
  23. package/dist/components/layout/index.d.ts +3 -0
  24. package/dist/components/layout/index.js +2 -0
  25. package/dist/components/layout/mobile-shell.d.ts +21 -0
  26. package/dist/components/layout/mobile-shell.js +43 -0
  27. package/dist/components/layout/sidebar-link.d.ts +1 -1
  28. package/dist/components/navigation/context-menu.js +13 -9
  29. package/dist/components/navigation/dropdown-menu.js +17 -13
  30. package/dist/inertia/index.d.ts +1 -1
  31. package/dist/lib/variants.d.ts +3 -3
  32. package/dist/lib/variants.js +1 -0
  33. package/dist/props/components/data-display.prop.d.ts +65 -0
  34. package/dist/props/components/data-entry.prop.d.ts +1 -1
  35. package/dist/props/components/layout.prop.d.ts +93 -6
  36. package/dist/props/registry.d.ts +109 -2
  37. package/dist/props/registry.js +143 -0
  38. package/dist/props/vocabulary/data.prop.d.ts +6 -0
  39. package/dist/props/vocabulary/index.d.ts +3 -3
  40. package/dist/props/vocabulary/layout.prop.d.ts +17 -2
  41. package/dist/props/vocabulary/shared.prop.d.ts +7 -0
  42. package/dist/styles/control.css +18 -1
  43. package/dist/styles/data-display-layout.css +167 -0
  44. package/dist/styles/layout.css +7 -0
  45. package/dist/styles/shell-layout.css +148 -0
  46. package/dist/styles/table-layout.css +23 -4
  47. package/dist/tokens/components/control.css +1 -0
  48. package/dist/tokens/components/data-display.css +20 -0
  49. package/dist/tokens/components/shell.css +22 -0
  50. package/dist/tokens/components/table.css +2 -0
  51. package/docs/SPACING.md +19 -6
  52. package/docs/charts/compact-bar-trend.tsx +5 -6
  53. package/docs/data-display/avatar.tsx +7 -9
  54. package/docs/data-display/badge.tsx +1 -1
  55. package/docs/data-display/card/index.tsx +6 -4
  56. package/docs/data-display/data-table/examples/approval-queue.tsx +1 -1
  57. package/docs/data-display/data-table/index.tsx +1 -1
  58. package/docs/data-display/permission-matrix.tsx +2 -2
  59. package/docs/data-display/scroll-area.tsx +1 -1
  60. package/docs/data-display/table.tsx +1 -1
  61. package/docs/data-display/timeline-grid.tsx +119 -0
  62. package/docs/data-entry/branch-scope-picker.tsx +1 -1
  63. package/docs/data-entry/input-otp.tsx +1 -1
  64. package/docs/data-entry/textarea.tsx +1 -1
  65. package/docs/data-entry/toggle-count.tsx +1 -1
  66. package/docs/feedback/alert.tsx +1 -1
  67. package/docs/feedback/banner.tsx +1 -1
  68. package/docs/foundation/email-tokens.tsx +1 -1
  69. package/docs/general/activity.tsx +1 -1
  70. package/docs/layout/auth-account-summary.tsx +1 -1
  71. package/docs/layout/auth-recovery/examples/mobile-390.tsx +1 -1
  72. package/docs/layout/auth-recovery/examples/password-recovery.tsx +0 -2
  73. package/docs/layout/auth-shell-context.tsx +1 -1
  74. package/docs/layout/auth-shell-device.tsx +2 -2
  75. package/docs/layout/auth-shell-registration.tsx +1 -1
  76. package/docs/layout/auth-shell.tsx +1 -1
  77. package/docs/layout/master-detail.tsx +2 -2
  78. package/docs/layout/mobile-shell.tsx +101 -0
  79. package/docs/layout/page-container.tsx +6 -6
  80. package/docs/layout/responsive-grid.tsx +2 -2
  81. package/docs/layout/separator.tsx +2 -2
  82. package/docs/layout/service-role-panel.tsx +1 -1
  83. package/docs/layout/sidebar.tsx +6 -6
  84. package/docs/layout/split-pane.tsx +1 -1
  85. package/docs/layout/topbar.tsx +2 -8
  86. package/docs/navigation/filter-bar.tsx +2 -2
  87. package/docs/navigation/pagination.tsx +2 -2
  88. package/docs/navigation/steps.tsx +1 -1
  89. package/docs/navigation/tabs.tsx +1 -1
  90. package/docs/showcase/acme-portal.tsx +11 -12
  91. package/docs/showcase/acme-website.tsx +7 -7
  92. package/docs/showcase/case1-warehouse-dashboard.tsx +11 -12
  93. package/docs/showcase/case2-employee-me.tsx +10 -16
  94. package/docs/showcase/case4-login.tsx +144 -156
  95. package/docs/showcase/case5-shift-calendar.tsx +181 -280
  96. package/docs/showcase/case6-agency-handy.tsx +446 -443
  97. package/docs/showcase/futurelastic-web.tsx +9 -8
  98. package/docs/showcase/org-switcher.tsx +18 -11
  99. package/docs/showcase/permission-matrix.tsx +13 -13
  100. package/docs/showcase/public-landing.tsx +1 -1
  101. package/docs/showcase/settings-account-sections.tsx +2 -2
  102. package/docs/showcase/settings-security-mfa.tsx +3 -3
  103. package/docs/showcase/table-approval-queue.tsx +1 -1
  104. package/docs/showcase/table-bulk-actions.tsx +49 -52
  105. package/docs/showcase/table-conditional-format.tsx +1 -1
  106. package/docs/showcase/table-crud-list.tsx +1 -1
  107. package/docs/showcase/table-expandable-rows.tsx +101 -98
  108. package/docs/showcase/table-filter-chips.tsx +78 -66
  109. package/docs/showcase/table-footer-totals.tsx +23 -19
  110. package/docs/showcase/table-grouped-subtotals.tsx +7 -4
  111. package/docs/showcase/table-master-detail.tsx +12 -14
  112. package/docs/showcase/table-states.tsx +34 -29
  113. package/docs/showcase/table-sticky-columns.tsx +3 -2
  114. package/docs/showcase/table-tree-rows.tsx +22 -15
  115. package/docs/showcase/table-view-tabs.tsx +12 -14
  116. package/package.json +7 -6
@@ -44,6 +44,7 @@ import {
44
44
  CardContent,
45
45
  CardHeader,
46
46
  CardTitle,
47
+ Descriptions,
47
48
  StatCard,
48
49
  Table,
49
50
  TableBody,
@@ -58,6 +59,7 @@ import {
58
59
  Flex,
59
60
  PageContainer,
60
61
  ResponsiveGrid,
62
+ Separator,
61
63
  Sidebar,
62
64
  type SidebarSectionProp,
63
65
  } from "@godxjp/ui/layout";
@@ -228,7 +230,8 @@ function PunchCard() {
228
230
  </Flex>
229
231
 
230
232
  {/* Demo state stepper — lets a reader walk every FSM state at rest. */}
231
- <Flex direction="row" wrap gap="xs" className="border-t pt-3">
233
+ <Separator />
234
+ <Flex direction="row" wrap gap="xs">
232
235
  <Text size="2xs" tone="muted" className="self-center">
233
236
  状態:
234
237
  </Text>
@@ -415,25 +418,16 @@ export default function EmployeeMeShowcase() {
415
418
  本日のサマリー · Hôm nay
416
419
  </CardTitle>
417
420
  </CardHeader>
418
- <CardContent flush>
419
- <dl className="divide-border divide-y">
421
+ <CardContent>
422
+ <Descriptions columns={1} layout="horizontal" labelAlign="start">
420
423
  {SUMMARY.map((s) => (
421
- <Flex
422
- key={s.label}
423
- align="center"
424
- justify="between"
425
- gap="md"
426
- className="px-4 py-2.5"
427
- >
428
- <Text as="dt" size="sm" tone="muted" className="whitespace-nowrap">
429
- {s.label}
430
- </Text>
431
- <Text as="dd" size="sm" weight="medium" align="end" tabular>
424
+ <Descriptions.Item key={s.label} label={s.label}>
425
+ <Text size="sm" weight="medium" tabular>
432
426
  {s.value}
433
427
  </Text>
434
- </Flex>
428
+ </Descriptions.Item>
435
429
  ))}
436
- </dl>
430
+ </Descriptions>
437
431
  </CardContent>
438
432
  </Card>
439
433
  </ResponsiveGrid>
@@ -7,9 +7,10 @@
7
7
  * not a transcription of the prototype DOM.
8
8
  *
9
9
  * Composition map (prototype block → @godxjp/ui primitive):
10
- * no shell ............... a bare centered page (login has no AppShell)
11
- * comfortable density .... `.ui-density-comfortable` wrapper → 44px touch floor
12
- * locale + theme toggle .. Select (locale) + ToggleGroup (theme) top-right
10
+ * page shell ............. AuthShell (the unauthenticated root shell)
11
+ * comfortable density .... AuthShell's own control tier → 44px touch floor
12
+ * locale + theme toggle .. AuthShell `actions` (banner, inline end)
13
+ * two-column measure ..... AuthShell `measure="wide"` → 64rem content slot
13
14
  * split brand panel ...... Card composition, hidden < lg (mobile-first)
14
15
  * auth card .............. Card (shadow-lg — the one resting shadow login allows)
15
16
  * SSO buttons ............ Button(outline) full-width + brand SVG slot
@@ -47,8 +48,9 @@ import {
47
48
  CardHeader,
48
49
  CardTitle,
49
50
  CardDescription,
51
+ Descriptions,
50
52
  } from "@godxjp/ui/data-display";
51
- import { Flex, ResponsiveGrid, Separator } from "@godxjp/ui/layout";
53
+ import { AuthShell, Flex, ResponsiveGrid, Separator } from "@godxjp/ui/layout";
52
54
 
53
55
  // ── The single allowed multi-color brand mark (Google "G") ─────────────────────
54
56
  // Icons normally inherit currentColor; a third-party brand mark is the documented
@@ -114,13 +116,19 @@ export default function LoginShowcase() {
114
116
  const [theme, setTheme] = React.useState("light");
115
117
 
116
118
  return (
117
- <div className="ui-density-comfortable bg-muted/40 text-foreground min-h-screen">
118
- {/* Locale + theme toggle, pinned top-right. Stacks under brand on narrow. */}
119
- <Flex align="center" justify="between" gap="md" className="px-4 py-3 sm:px-6">
119
+ <AuthShell
120
+ /* The 64rem content slot the split (brand panel + card) login needs. */
121
+ measure="wide"
122
+ className="text-foreground"
123
+ /* Brand mark in the banner below lg; from lg the split panel carries it. */
124
+ brand={
120
125
  <div className="lg:hidden">
121
126
  <BrandLockup />
122
127
  </div>
123
- <Flex align="center" gap="sm" className="ms-auto">
128
+ }
129
+ /* Page-level controls, pinned to the banner's inline end. */
130
+ actions={
131
+ <>
124
132
  <Select value={locale} onValueChange={setLocale}>
125
133
  <SelectTrigger size="sm" className="w-32" aria-label="言語を選択">
126
134
  <Languages aria-hidden="true" className="text-muted-foreground" />
@@ -152,162 +160,142 @@ export default function LoginShowcase() {
152
160
  <Monitor aria-hidden="true" />
153
161
  </ToggleGroupItem>
154
162
  </ToggleGroup>
155
- </Flex>
156
- </Flex>
157
-
163
+ </>
164
+ }
165
+ >
158
166
  {/* Centered auth area. Split brand panel + card sit side-by-side from lg. */}
159
- <Flex
160
- align="center"
161
- gap="xs"
162
- className="mx-auto min-h-[calc(100vh-64px)] w-full max-w-5xl px-4 py-8 sm:px-6"
163
- >
164
- <ResponsiveGrid
165
- columns={{ sm: 1, lg: 2, md: 1 }}
166
- gap="xl"
167
- className="mx-auto w-full items-stretch"
168
- >
169
- {/* Split brand panel — hidden on mobile (mobile-first), shown from lg. */}
170
- <aside className="hidden lg:flex">
171
- <Card className="bg-primary/5 w-full">
172
- <CardContent solo className="h-full">
173
- <Flex direction="col" justify="between" gap="xl">
174
- <BrandLockup size="lg" />
175
- <Flex direction="col" gap="md">
176
- <Heading level={2} className="leading-snug">
177
- 打刻から承認まで、ひとつの勤怠基盤で。
178
- </Heading>
179
- <Text as="p" tone="muted" className="leading-relaxed">
180
- 出勤・休憩・残業の打刻、シフト調整、欠勤・遅刻の承認を一元化します。
181
- 多拠点・多テナントに対応し、現場と管理をつなぎます。
182
- </Text>
183
- </Flex>
184
- <dl className="border-border border-t pt-6">
185
- <ResponsiveGrid columns={3} gap="md">
186
- <div>
187
- <Text as="dt" size="2xs" tone="muted">
188
- 導入企業
189
- </Text>
190
- <Text as="dd" size="lg" weight="bold" tabular>
191
- 1,240
192
- </Text>
193
- </div>
194
- <div>
195
- <Text as="dt" size="2xs" tone="muted">
196
- 稼働拠点
197
- </Text>
198
- <Text as="dd" size="lg" weight="bold" tabular>
199
- 8,600
200
- </Text>
201
- </div>
202
- <div>
203
- <Text as="dt" size="2xs" tone="muted">
204
- 月間打刻
205
- </Text>
206
- <Text as="dd" size="lg" weight="bold" tabular>
207
- 21M
208
- </Text>
209
- </div>
210
- </ResponsiveGrid>
211
- </dl>
167
+ <ResponsiveGrid columns={{ sm: 1, lg: 2, md: 1 }} gap="xl" className="w-full items-stretch">
168
+ {/* Split brand panel — hidden on mobile (mobile-first), shown from lg. */}
169
+ <aside className="hidden lg:block">
170
+ <Card className="bg-primary/5 h-full w-full">
171
+ <CardContent solo className="h-full">
172
+ <Flex direction="col" justify="between" gap="xl">
173
+ <BrandLockup size="lg" />
174
+ <Flex direction="col" gap="md">
175
+ <Heading level={2} className="leading-snug">
176
+ 打刻から承認まで、ひとつの勤怠基盤で。
177
+ </Heading>
178
+ <Text as="p" tone="muted" className="leading-relaxed">
179
+ 出勤・休憩・残業の打刻、シフト調整、欠勤・遅刻の承認を一元化します。
180
+ 多拠点・多テナントに対応し、現場と管理をつなぎます。
181
+ </Text>
212
182
  </Flex>
213
- </CardContent>
214
- </Card>
215
- </aside>
216
-
217
- {/* Auth card — the one surface allowed a resting shadow (shadow-lg). */}
218
- <Card className="mx-auto w-full max-w-sm self-center shadow-lg lg:mx-0">
219
- <CardHeader className="text-center lg:text-start">
220
- <Flex justify="center" className="lg:hidden">
221
- <BrandLockup />
183
+ <Separator />
184
+ <Descriptions columns={3}>
185
+ <Descriptions.Item label="導入企業">
186
+ <Text size="lg" weight="bold" tabular>
187
+ 1,240
188
+ </Text>
189
+ </Descriptions.Item>
190
+ <Descriptions.Item label="稼働拠点">
191
+ <Text size="lg" weight="bold" tabular>
192
+ 8,600
193
+ </Text>
194
+ </Descriptions.Item>
195
+ <Descriptions.Item label="月間打刻">
196
+ <Text size="lg" weight="bold" tabular>
197
+ 21M
198
+ </Text>
199
+ </Descriptions.Item>
200
+ </Descriptions>
222
201
  </Flex>
223
- <CardTitle className="text-lg font-semibold">ログイン</CardTitle>
224
- <CardDescription className="text-muted-foreground text-xs">
225
- 勤怠管理プラットフォームへようこそ
226
- </CardDescription>
227
- </CardHeader>
202
+ </CardContent>
203
+ </Card>
204
+ </aside>
228
205
 
229
- <CardContent solo>
230
- <Flex direction="col" gap="lg">
231
- {/* SSO buttons — outline, full-width, 44px (comfortable). */}
232
- <Flex direction="col" gap="sm">
233
- <Button variant="outline" className="w-full justify-center">
234
- <GoogleMark />
235
- Google で続ける
236
- </Button>
237
- <Button variant="outline" className="w-full justify-center">
238
- シングルサインオン (SSO)
239
- </Button>
240
- </Flex>
206
+ {/* Auth card — the one surface allowed a resting shadow (shadow-lg). */}
207
+ <Card className="mx-auto w-full max-w-sm self-center shadow-lg">
208
+ <CardHeader className="text-center lg:text-start">
209
+ <Flex justify="center" className="lg:hidden">
210
+ <BrandLockup />
211
+ </Flex>
212
+ <CardTitle className="text-lg font-semibold">ログイン</CardTitle>
213
+ <CardDescription className="text-muted-foreground text-xs">
214
+ 勤怠管理プラットフォームへようこそ
215
+ </CardDescription>
216
+ </CardHeader>
241
217
 
242
- {/* Divider "または" — Separator pair + centered label. */}
243
- <Flex align="center" gap="md">
244
- <Separator className="flex-1" />
245
- <Text size="xs" tone="muted">
246
- または
247
- </Text>
248
- <Separator className="flex-1" />
249
- </Flex>
218
+ <CardContent solo>
219
+ <Flex direction="col" gap="lg">
220
+ {/* SSO buttons — outline, full-width, 44px (comfortable). */}
221
+ <Flex direction="col" gap="sm">
222
+ <Button variant="outline" className="w-full justify-center">
223
+ <GoogleMark />
224
+ Google で続ける
225
+ </Button>
226
+ <Button variant="outline" className="w-full justify-center">
227
+ シングルサインオン (SSO)
228
+ </Button>
229
+ </Flex>
250
230
 
251
- {/* Emailuncontrolled, seeded so the filled state shows at rest. */}
252
- <form
253
- onSubmit={(e) => {
254
- e.preventDefault();
255
- }}
256
- >
257
- <Flex direction="col" gap="md">
258
- <FormField id="login-email" label="メールアドレス" required>
259
- <Input
260
- type="email"
261
- name="email"
262
- autoComplete="email"
263
- inputMode="email"
264
- placeholder="name@example.com"
265
- defaultValue="m.tanaka@famgia.com"
266
- />
267
- </FormField>
231
+ {/* Divider "または" Separator pair + centered label. */}
232
+ <Flex align="center" gap="md">
233
+ <Separator className="flex-1" />
234
+ <Text size="xs" tone="muted">
235
+ または
236
+ </Text>
237
+ <Separator className="flex-1" />
238
+ </Flex>
268
239
 
269
- {/* PasswordlabelAddon hosts the right-aligned "忘れた場合" link. */}
270
- <FormField
271
- id="login-password"
272
- label="パスワード"
273
- required
274
- labelAddon={
275
- <Button type="button" variant="link" size="sm" className="ms-auto text-xs">
276
- お忘れの場合
277
- </Button>
278
- }
279
- >
280
- <PasswordInput
281
- name="password"
282
- autoComplete="current-password"
283
- placeholder="パスワードを入力"
284
- defaultValue="example-pass"
285
- />
286
- </FormField>
240
+ {/* Emailuncontrolled, seeded so the filled state shows at rest. */}
241
+ <form
242
+ onSubmit={(e) => {
243
+ e.preventDefault();
244
+ }}
245
+ >
246
+ <Flex direction="col" gap="md">
247
+ <FormField id="login-email" label="メールアドレス" required>
248
+ <Input
249
+ type="email"
250
+ name="email"
251
+ autoComplete="email"
252
+ inputMode="email"
253
+ placeholder="name@example.com"
254
+ defaultValue="m.tanaka@famgia.com"
255
+ />
256
+ </FormField>
287
257
 
288
- {/* The single --primary action of the view. */}
289
- <Button type="submit" className="w-full justify-center">
290
- ログイン
291
- </Button>
292
- </Flex>
293
- </form>
258
+ {/* Password labelAddon hosts the right-aligned "忘れた場合" link. */}
259
+ <FormField
260
+ id="login-password"
261
+ label="パスワード"
262
+ required
263
+ labelAddon={
264
+ <Button type="button" variant="link" size="sm" className="ms-auto text-xs">
265
+ お忘れの場合
266
+ </Button>
267
+ }
268
+ >
269
+ <PasswordInput
270
+ name="password"
271
+ autoComplete="current-password"
272
+ placeholder="パスワードを入力"
273
+ defaultValue="example-pass"
274
+ />
275
+ </FormField>
294
276
 
295
- <Text as="p" size="2xs" tone="muted" align="center" className="leading-relaxed">
296
- ログインすると{" "}
297
- <Button variant="link" size="sm" className="text-[var(--font-size-2xs)]">
298
- 利用規約
299
- </Button>{" "}
300
- ·{" "}
301
- <Button variant="link" size="sm" className="text-[var(--font-size-2xs)]">
302
- プライバシーポリシー
303
- </Button>{" "}
304
- に同意したものとみなされます。
305
- </Text>
306
- </Flex>
307
- </CardContent>
308
- </Card>
309
- </ResponsiveGrid>
310
- </Flex>
311
- </div>
277
+ {/* The single --primary action of the view. */}
278
+ <Button type="submit" className="w-full justify-center">
279
+ ログイン
280
+ </Button>
281
+ </Flex>
282
+ </form>
283
+
284
+ <Text as="p" size="2xs" tone="muted" align="center" className="leading-relaxed">
285
+ ログインすると{" "}
286
+ <Button variant="link" size="sm" className="text-[var(--font-size-2xs)]">
287
+ 利用規約
288
+ </Button>{" "}
289
+ ·{" "}
290
+ <Button variant="link" size="sm" className="text-[var(--font-size-2xs)]">
291
+ プライバシーポリシー
292
+ </Button>{" "}
293
+ に同意したものとみなされます。
294
+ </Text>
295
+ </Flex>
296
+ </CardContent>
297
+ </Card>
298
+ </ResponsiveGrid>
299
+ </AuthShell>
312
300
  );
313
301
  }