@godxjp/ui 18.4.0 → 18.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 (159) hide show
  1. package/README.md +16 -1
  2. package/dist/app/theme-axes.d.ts +11 -3
  3. package/dist/app/theme-axes.js +2 -1
  4. package/dist/components/charts/chart-frame.d.ts +17 -3
  5. package/dist/components/charts/chart-frame.js +7 -1
  6. package/dist/components/charts/chart-summary.d.ts +21 -0
  7. package/dist/components/charts/chart-summary.js +32 -5
  8. package/dist/components/charts/compact-bar-trend.d.ts +30 -0
  9. package/dist/components/charts/compact-bar-trend.js +74 -0
  10. package/dist/components/charts/index.d.ts +6 -0
  11. package/dist/components/charts/index.js +2 -0
  12. package/dist/components/data-display/badge.d.ts +8 -0
  13. package/dist/components/data-display/badge.js +7 -1
  14. package/dist/components/data-display/data-table.d.ts +40 -4
  15. package/dist/components/data-display/data-table.js +69 -2
  16. package/dist/components/data-display/empty-state.js +1 -1
  17. package/dist/components/data-display/index.d.ts +4 -2
  18. package/dist/components/data-display/index.js +10 -1
  19. package/dist/components/data-display/list-row.d.ts +41 -4
  20. package/dist/components/data-display/list-row.js +23 -3
  21. package/dist/components/data-display/qr-code.d.ts +1 -1
  22. package/dist/components/data-display/service-launcher-card.d.ts +40 -0
  23. package/dist/components/data-display/service-launcher-card.js +97 -0
  24. package/dist/components/data-display/table.d.ts +47 -2
  25. package/dist/components/data-display/table.js +29 -4
  26. package/dist/components/data-entry/command-palette.d.ts +37 -0
  27. package/dist/components/data-entry/command-palette.js +125 -0
  28. package/dist/components/data-entry/command.d.ts +10 -10
  29. package/dist/components/data-entry/index.d.ts +3 -0
  30. package/dist/components/data-entry/index.js +2 -0
  31. package/dist/components/data-entry/input-otp.d.ts +1 -0
  32. package/dist/components/feedback/dialog.d.ts +16 -1
  33. package/dist/components/feedback/dialog.js +46 -33
  34. package/dist/components/feedback/index.d.ts +5 -2
  35. package/dist/components/feedback/index.js +8 -2
  36. package/dist/components/feedback/sheet.d.ts +26 -4
  37. package/dist/components/feedback/sheet.js +54 -7
  38. package/dist/components/feedback/two-factor-setup.d.ts +31 -0
  39. package/dist/components/feedback/two-factor-setup.js +97 -0
  40. package/dist/components/general/index.d.ts +1 -1
  41. package/dist/components/general/logo.d.ts +49 -9
  42. package/dist/components/general/logo.js +67 -14
  43. package/dist/components/layout/app-shell.d.ts +1 -1
  44. package/dist/components/layout/app-shell.js +55 -30
  45. package/dist/components/layout/auth-account-summary.d.ts +5 -0
  46. package/dist/components/layout/auth-account-summary.js +31 -0
  47. package/dist/components/layout/auth-divider.d.ts +7 -0
  48. package/dist/components/layout/auth-divider.js +21 -0
  49. package/dist/components/layout/auth-footer.d.ts +5 -0
  50. package/dist/components/layout/auth-footer.js +24 -0
  51. package/dist/components/layout/auth-identity.d.ts +5 -0
  52. package/dist/components/layout/auth-identity.js +17 -0
  53. package/dist/components/layout/auth-shell.d.ts +9 -1
  54. package/dist/components/layout/auth-shell.js +25 -6
  55. package/dist/components/layout/auth-stack.d.ts +4 -0
  56. package/dist/components/layout/auth-stack.js +8 -0
  57. package/dist/components/layout/centered-shell.d.ts +5 -2
  58. package/dist/components/layout/centered-shell.js +29 -19
  59. package/dist/components/layout/error-surface.d.ts +35 -0
  60. package/dist/components/layout/error-surface.js +155 -0
  61. package/dist/components/layout/flex.d.ts +1 -1
  62. package/dist/components/layout/flex.js +4 -0
  63. package/dist/components/layout/index.d.ts +23 -3
  64. package/dist/components/layout/index.js +21 -2
  65. package/dist/components/layout/legal-document-shell.d.ts +34 -0
  66. package/dist/components/layout/legal-document-shell.js +186 -0
  67. package/dist/components/layout/master-detail.d.ts +24 -0
  68. package/dist/components/layout/master-detail.js +48 -0
  69. package/dist/components/layout/org-switcher.d.ts +9 -0
  70. package/dist/components/layout/org-switcher.js +218 -0
  71. package/dist/components/layout/page-container.d.ts +1 -1
  72. package/dist/components/layout/page-container.js +7 -2
  73. package/dist/components/layout/sidebar-link.d.ts +43 -0
  74. package/dist/components/layout/sidebar-link.js +13 -0
  75. package/dist/components/layout/sidebar.d.ts +42 -5
  76. package/dist/components/layout/sidebar.js +170 -85
  77. package/dist/components/navigation/app-setting-picker.js +17 -6
  78. package/dist/components/navigation/filter-bar.d.ts +12 -3
  79. package/dist/components/navigation/filter-bar.js +8 -2
  80. package/dist/components/navigation/index.d.ts +2 -2
  81. package/dist/components/navigation/index.js +3 -1
  82. package/dist/components/navigation/steps.js +38 -19
  83. package/dist/components/navigation/tabs-scroll.d.ts +70 -0
  84. package/dist/components/navigation/tabs-scroll.js +76 -0
  85. package/dist/components/navigation/tabs.js +47 -23
  86. package/dist/components/ui/avatar.d.ts +2 -1
  87. package/dist/components/ui/avatar.js +2 -1
  88. package/dist/components/ui/input-otp.d.ts +4 -1
  89. package/dist/components/ui/input-otp.js +2 -1
  90. package/dist/components/ui/toggle-group.d.ts +7 -4
  91. package/dist/components/ui/toggle-group.js +32 -21
  92. package/dist/email/brand-mark.d.ts +108 -0
  93. package/dist/email/brand-mark.js +88 -0
  94. package/dist/email/color.d.ts +53 -0
  95. package/dist/email/color.js +37 -0
  96. package/dist/email/geometry.d.ts +120 -0
  97. package/dist/email/geometry.js +90 -0
  98. package/dist/email/index.d.ts +83 -0
  99. package/dist/email/index.js +82 -0
  100. package/dist/email/inline-style.d.ts +27 -0
  101. package/dist/email/inline-style.js +26 -0
  102. package/dist/email/tokens.generated.d.ts +167 -0
  103. package/dist/email/tokens.generated.js +162 -0
  104. package/dist/email/urgency.d.ts +22 -0
  105. package/dist/email/urgency.js +14 -0
  106. package/dist/i18n/messages/en.json +36 -3
  107. package/dist/i18n/messages/ja.json +36 -3
  108. package/dist/i18n/messages/vi.json +36 -3
  109. package/dist/inertia/index.d.ts +50 -0
  110. package/dist/inertia/index.js +5 -0
  111. package/dist/props/components/app.prop.d.ts +11 -1
  112. package/dist/props/components/charts.prop.d.ts +40 -1
  113. package/dist/props/components/data-display.prop.d.ts +75 -1
  114. package/dist/props/components/data-entry.prop.d.ts +6 -0
  115. package/dist/props/components/feedback.prop.d.ts +10 -0
  116. package/dist/props/components/index.d.ts +3 -3
  117. package/dist/props/components/layout.prop.d.ts +560 -10
  118. package/dist/props/components/layout.prop.js +1 -0
  119. package/dist/props/components/navigation.prop.d.ts +24 -2
  120. package/dist/props/registry.d.ts +433 -8
  121. package/dist/props/registry.js +527 -9
  122. package/dist/props/vocabulary/data.prop.d.ts +27 -0
  123. package/dist/props/vocabulary/index.d.ts +3 -3
  124. package/dist/props/vocabulary/interaction.prop.d.ts +10 -1
  125. package/dist/props/vocabulary/layout.prop.d.ts +49 -0
  126. package/dist/styles/base.css +8 -2
  127. package/dist/styles/card-layout.css +161 -7
  128. package/dist/styles/chart-layout.css +97 -0
  129. package/dist/styles/control.css +76 -2
  130. package/dist/styles/data-display-layout.css +78 -6
  131. package/dist/styles/dialog-layout.css +105 -4
  132. package/dist/styles/fonts.css +15 -4
  133. package/dist/styles/index.css +11 -3
  134. package/dist/styles/layout.css +466 -1
  135. package/dist/styles/logo-layout.css +95 -0
  136. package/dist/styles/navigation-layout.css +152 -0
  137. package/dist/styles/shell-layout.css +790 -40
  138. package/dist/styles/table-layout.css +164 -1
  139. package/dist/theme/dxs.canonical.css +77 -0
  140. package/dist/tokens/axes.css +40 -0
  141. package/dist/tokens/base.css +6 -0
  142. package/dist/tokens/components/card.css +48 -0
  143. package/dist/tokens/components/chart.css +47 -0
  144. package/dist/tokens/components/control.css +16 -0
  145. package/dist/tokens/components/data-display.css +13 -0
  146. package/dist/tokens/components/email.css +93 -0
  147. package/dist/tokens/components/error-surface.css +36 -0
  148. package/dist/tokens/components/feedback.css +17 -0
  149. package/dist/tokens/components/legal-document.css +67 -0
  150. package/dist/tokens/components/list-row.css +43 -2
  151. package/dist/tokens/components/logo.css +74 -0
  152. package/dist/tokens/components/navigation.css +28 -0
  153. package/dist/tokens/components/sheet.css +19 -0
  154. package/dist/tokens/components/shell.css +210 -0
  155. package/dist/tokens/components/sidebar.css +33 -0
  156. package/dist/tokens/components/table.css +45 -0
  157. package/dist/tokens/foundation.css +31 -2
  158. package/dist/tokens/semantic/layout.css +69 -2
  159. package/package.json +22 -5
@@ -0,0 +1,162 @@
1
+ const EMAIL_COLOR_SOURCE = {
2
+ "background": {
3
+ "cssVar": "--background",
4
+ "hsl": "60 33% 99%"
5
+ },
6
+ "foreground": {
7
+ "cssVar": "--foreground",
8
+ "hsl": "48 8% 13%"
9
+ },
10
+ "surface": {
11
+ "cssVar": "--card",
12
+ "hsl": "60 33% 99%"
13
+ },
14
+ "surfaceForeground": {
15
+ "cssVar": "--card-foreground",
16
+ "hsl": "48 8% 13%"
17
+ },
18
+ "muted": {
19
+ "cssVar": "--muted",
20
+ "hsl": "45 15% 95%"
21
+ },
22
+ "mutedForeground": {
23
+ "cssVar": "--muted-foreground",
24
+ "hsl": "44 5% 42%"
25
+ },
26
+ "border": {
27
+ "cssVar": "--border",
28
+ "hsl": "30 7% 83%"
29
+ },
30
+ "primary": {
31
+ "cssVar": "--primary",
32
+ "hsl": "204 100% 39%"
33
+ },
34
+ "primaryForeground": {
35
+ "cssVar": "--primary-foreground",
36
+ "hsl": "60 33% 99%"
37
+ },
38
+ "focus": {
39
+ "cssVar": "--ring",
40
+ "hsl": "204 100% 39%"
41
+ },
42
+ "brand": {
43
+ "cssVar": "--brand",
44
+ "hsl": "160.5 100% 29.6%"
45
+ },
46
+ "brandForeground": {
47
+ "cssVar": "--brand-foreground",
48
+ "hsl": "60 33% 99%"
49
+ },
50
+ "urgency": {
51
+ "cssVar": "--attention",
52
+ "hsl": "25 99% 46%"
53
+ },
54
+ "urgencyForeground": {
55
+ "cssVar": "--attention-foreground",
56
+ "hsl": "60 33% 99%"
57
+ }
58
+ };
59
+ const EMAIL_COLOR_SOURCE_DARK = {
60
+ "background": {
61
+ "cssVar": "--background",
62
+ "hsl": "48 9% 9%"
63
+ },
64
+ "foreground": {
65
+ "cssVar": "--foreground",
66
+ "hsl": "60 20% 96%"
67
+ },
68
+ "surface": {
69
+ "cssVar": "--card",
70
+ "hsl": "48 8% 12%"
71
+ },
72
+ "surfaceForeground": {
73
+ "cssVar": "--card-foreground",
74
+ "hsl": "60 20% 96%"
75
+ },
76
+ "muted": {
77
+ "cssVar": "--muted",
78
+ "hsl": "45 6% 18%"
79
+ },
80
+ "mutedForeground": {
81
+ "cssVar": "--muted-foreground",
82
+ "hsl": "44 6% 64%"
83
+ },
84
+ "border": {
85
+ "cssVar": "--border",
86
+ "hsl": "45 6% 22%"
87
+ },
88
+ "primary": {
89
+ "cssVar": "--primary",
90
+ "hsl": "204 90% 60%"
91
+ },
92
+ "primaryForeground": {
93
+ "cssVar": "--primary-foreground",
94
+ "hsl": "48 9% 9%"
95
+ },
96
+ "focus": {
97
+ "cssVar": "--ring",
98
+ "hsl": "204 90% 60%"
99
+ },
100
+ "brand": {
101
+ "cssVar": "--brand",
102
+ "hsl": "160.5 100% 36%"
103
+ },
104
+ "brandForeground": {
105
+ "cssVar": "--brand-foreground",
106
+ "hsl": "48 9% 9%"
107
+ },
108
+ "urgency": {
109
+ "cssVar": "--attention",
110
+ "hsl": "25 95% 56%"
111
+ },
112
+ "urgencyForeground": {
113
+ "cssVar": "--attention-foreground",
114
+ "hsl": "48 9% 9%"
115
+ }
116
+ };
117
+ const EMAIL_GEOMETRY_SOURCE = {
118
+ "--email-shell-width": "480px",
119
+ "--email-shell-padding": "32px",
120
+ "--email-shell-page-padding": "24px",
121
+ "--email-shell-border-width": "1px",
122
+ "--email-card-radius": "10px",
123
+ "--email-card-reference-height": "407px",
124
+ "--email-stack-gap": "24px",
125
+ "--email-stack-gap-sm": "12px",
126
+ "--email-mark-width": "22px",
127
+ "--email-mark-height": "22px",
128
+ "--email-mark-gap": "8px",
129
+ "--email-wordmark-font-size": "13px",
130
+ "--email-wordmark-font-weight": "700",
131
+ "--email-font-family-sans": "'M PLUS 2', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic Medium', YuGothic, 'Noto Sans JP', Meiryo, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, Arial, sans-serif",
132
+ "--email-font-family-mono": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
133
+ "--email-body-font-size": "14px",
134
+ "--email-body-line-height": "1.9",
135
+ "--email-body-font-weight": "400",
136
+ "--email-heading-font-size": "17px",
137
+ "--email-heading-line-height": "1.7",
138
+ "--email-heading-font-weight": "500",
139
+ "--email-cta-height": "36px",
140
+ "--email-cta-line-height": "36px",
141
+ "--email-cta-padding-x": "16px",
142
+ "--email-cta-radius": "6px",
143
+ "--email-cta-font-size": "14px",
144
+ "--email-cta-font-weight": "500",
145
+ "--email-footer-font-size": "11px",
146
+ "--email-footer-line-height": "1.8",
147
+ "--email-footer-link-gap": "12px",
148
+ "--email-footer-padding-top": "20px",
149
+ "--email-footer-border-width": "1px",
150
+ "--email-focus-border-width": "2px",
151
+ "--email-mobile-max-width": "520px",
152
+ "--email-mobile-width": "100%",
153
+ "--email-mobile-padding": "20px",
154
+ "--email-mobile-page-padding": "12px",
155
+ "--email-mobile-heading-font-size": "16px",
156
+ "--email-mobile-cta-width": "100%"
157
+ };
158
+ export {
159
+ EMAIL_COLOR_SOURCE,
160
+ EMAIL_COLOR_SOURCE_DARK,
161
+ EMAIL_GEOMETRY_SOURCE
162
+ };
@@ -0,0 +1,22 @@
1
+ import { type EmailHex } from "./color.js";
2
+ /**
3
+ * Semantic action-required styling for transactional email.
4
+ *
5
+ * `accent` is the non-text rail/border color painted on the normal email surface. The solid pair
6
+ * is safe for icons and large or bold labels that satisfy the 3:1 contrast floor; it is not a
7
+ * replacement for normal body copy, which remains `EMAIL_COLORS.foreground` on
8
+ * `EMAIL_COLORS.surface`. This deliberately narrow contract prevents urgency from becoming an
9
+ * undocumented second CTA or a component-local palette.
10
+ */
11
+ export interface EmailUrgencyTokens {
12
+ /** Non-text action-required rail or border on the standard email surface. */
13
+ readonly accent: EmailHex;
14
+ /** Solid action-required fill for an icon or large/bold label. */
15
+ readonly solidBackground: EmailHex;
16
+ /** Foreground paired only with `solidBackground` under the usage restriction above. */
17
+ readonly solidForeground: EmailHex;
18
+ }
19
+ /** Light-scheme action-required email contract. */
20
+ export declare const EMAIL_URGENCY: Readonly<EmailUrgencyTokens>;
21
+ /** Dark-scheme action-required email contract for clients that honor dark-mode overrides. */
22
+ export declare const EMAIL_URGENCY_DARK: Readonly<EmailUrgencyTokens>;
@@ -0,0 +1,14 @@
1
+ import { EMAIL_COLORS, EMAIL_COLORS_DARK } from "./color.js";
2
+ function resolveUrgency(colors) {
3
+ return Object.freeze({
4
+ accent: colors.urgency,
5
+ solidBackground: colors.urgency,
6
+ solidForeground: colors.urgencyForeground
7
+ });
8
+ }
9
+ const EMAIL_URGENCY = resolveUrgency(EMAIL_COLORS);
10
+ const EMAIL_URGENCY_DARK = resolveUrgency(EMAIL_COLORS_DARK);
11
+ export {
12
+ EMAIL_URGENCY,
13
+ EMAIL_URGENCY_DARK
14
+ };
@@ -145,6 +145,19 @@
145
145
  "mainLabel": "Main content",
146
146
  "footerLabel": "Footer"
147
147
  },
148
+ "legalDocumentShell": {
149
+ "contents": "Contents",
150
+ "version": "Version {version}",
151
+ "effectiveDate": "Effective {date}"
152
+ },
153
+ "errorSurface": {
154
+ "statusLabel": "HTTP status {status}",
155
+ "requestId": "Request ID",
156
+ "permission": "Required permission",
157
+ "organization": "Organization",
158
+ "maintenanceWindow": "Scheduled maintenance",
159
+ "maintenanceProgress": "Maintenance progress {percent}"
160
+ },
148
161
  "topbar": {
149
162
  "toggleSidebar": "Toggle sidebar",
150
163
  "search": "Search",
@@ -162,6 +175,10 @@
162
175
  "next": "Next",
163
176
  "dotsLabel": "Choose slide",
164
177
  "goToSlide": "Go to slide {index}"
178
+ },
179
+ "listRow": {
180
+ "unread": "Unread",
181
+ "read": "Read"
165
182
  }
166
183
  },
167
184
  "ui": {
@@ -196,7 +213,13 @@
196
213
  },
197
214
  "navigation": {
198
215
  "steps": {
199
- "ariaLabel": "Progress"
216
+ "ariaLabel": "Progress",
217
+ "status": {
218
+ "wait": "Waiting",
219
+ "process": "Current step",
220
+ "finish": "Completed",
221
+ "error": "Error"
222
+ }
200
223
  },
201
224
  "breadcrumb": {
202
225
  "ariaLabel": "Breadcrumb"
@@ -292,7 +315,11 @@
292
315
  "densitySwitch": "Switch to {density} density",
293
316
  "rowActions": "Row actions",
294
317
  "empty": "No data",
295
- "loading": "Loading…"
318
+ "loading": "Loading…",
319
+ "error": "Couldn't load this list",
320
+ "errorDescription": "The data could not be retrieved. Try again in a moment.",
321
+ "denied": "You don't have access to this list",
322
+ "deniedDescription": "Ask an administrator to grant you permission to view these records."
296
323
  },
297
324
  "dataGrid": {
298
325
  "search": "Search",
@@ -304,6 +331,10 @@
304
331
  },
305
332
  "status": {
306
333
  "active": "Active",
334
+ "trialing": "Trialing",
335
+ "past_due": "Past due",
336
+ "incomplete": "Incomplete",
337
+ "canceled": "Canceled",
307
338
  "completed": "Completed",
308
339
  "delivered": "Delivered",
309
340
  "done": "Done",
@@ -353,6 +384,8 @@
353
384
  "chart": {
354
385
  "empty": "No data to display",
355
386
  "summaryCartesian": "Chart with {series} series across {points} data points",
356
- "summaryPie": "Pie chart with {slices} slices"
387
+ "summaryPie": "Pie chart with {slices} slices",
388
+ "summaryTrend": "Bar trend with {points} data points",
389
+ "trendCurrent": "current"
357
390
  }
358
391
  }
@@ -145,6 +145,19 @@
145
145
  "mainLabel": "メインコンテンツ",
146
146
  "footerLabel": "フッター"
147
147
  },
148
+ "legalDocumentShell": {
149
+ "contents": "目次",
150
+ "version": "バージョン {version}",
151
+ "effectiveDate": "施行日 {date}"
152
+ },
153
+ "errorSurface": {
154
+ "statusLabel": "HTTP ステータス {status}",
155
+ "requestId": "リクエスト ID",
156
+ "permission": "必要な権限",
157
+ "organization": "組織",
158
+ "maintenanceWindow": "計画メンテナンス",
159
+ "maintenanceProgress": "メンテナンス進捗 {percent}"
160
+ },
148
161
  "topbar": {
149
162
  "toggleSidebar": "サイドバーの切り替え",
150
163
  "search": "検索",
@@ -162,6 +175,10 @@
162
175
  "next": "次へ",
163
176
  "dotsLabel": "スライドを選択",
164
177
  "goToSlide": "{index} 番目のスライドへ"
178
+ },
179
+ "listRow": {
180
+ "unread": "未読",
181
+ "read": "既読"
165
182
  }
166
183
  },
167
184
  "ui": {
@@ -196,7 +213,13 @@
196
213
  },
197
214
  "navigation": {
198
215
  "steps": {
199
- "ariaLabel": "進行状況"
216
+ "ariaLabel": "進行状況",
217
+ "status": {
218
+ "wait": "未完了",
219
+ "process": "現在のステップ",
220
+ "finish": "完了",
221
+ "error": "エラー"
222
+ }
200
223
  },
201
224
  "breadcrumb": {
202
225
  "ariaLabel": "パンくずリスト"
@@ -289,7 +312,11 @@
289
312
  "densitySwitch": "{density} 表示に切り替え",
290
313
  "rowActions": "行の操作",
291
314
  "empty": "データがありません",
292
- "loading": "読み込み中…"
315
+ "loading": "読み込み中…",
316
+ "error": "一覧を取得できませんでした",
317
+ "errorDescription": "データを取得できませんでした。時間をおいて再試行してください。",
318
+ "denied": "この一覧を表示する権限がありません",
319
+ "deniedDescription": "閲覧するには管理者に権限の付与を依頼してください。"
293
320
  },
294
321
  "dataGrid": {
295
322
  "search": "検索",
@@ -301,6 +328,10 @@
301
328
  },
302
329
  "status": {
303
330
  "active": "有効",
331
+ "trialing": "試用中",
332
+ "past_due": "支払期限超過",
333
+ "incomplete": "未完了",
334
+ "canceled": "解約済み",
304
335
  "completed": "完了",
305
336
  "delivered": "配達済み",
306
337
  "done": "完了",
@@ -350,6 +381,8 @@
350
381
  "chart": {
351
382
  "empty": "データがありません",
352
383
  "summaryCartesian": "{series}系列・{points}データ点のグラフ",
353
- "summaryPie": "{slices}区分の円グラフ"
384
+ "summaryPie": "{slices}区分の円グラフ",
385
+ "summaryTrend": "{points}データ点の推移棒グラフ",
386
+ "trendCurrent": "現在"
354
387
  }
355
388
  }
@@ -145,6 +145,19 @@
145
145
  "mainLabel": "Nội dung chính",
146
146
  "footerLabel": "Chân trang"
147
147
  },
148
+ "legalDocumentShell": {
149
+ "contents": "Mục lục",
150
+ "version": "Phiên bản {version}",
151
+ "effectiveDate": "Hiệu lực từ {date}"
152
+ },
153
+ "errorSurface": {
154
+ "statusLabel": "Trạng thái HTTP {status}",
155
+ "requestId": "Mã yêu cầu",
156
+ "permission": "Quyền yêu cầu",
157
+ "organization": "Tổ chức",
158
+ "maintenanceWindow": "Bảo trì theo lịch",
159
+ "maintenanceProgress": "Tiến độ bảo trì {percent}"
160
+ },
148
161
  "topbar": {
149
162
  "toggleSidebar": "Bật/tắt thanh bên",
150
163
  "search": "Tìm kiếm",
@@ -162,6 +175,10 @@
162
175
  "next": "Sau",
163
176
  "dotsLabel": "Chọn slide",
164
177
  "goToSlide": "Đến slide {index}"
178
+ },
179
+ "listRow": {
180
+ "unread": "Chưa đọc",
181
+ "read": "Đã đọc"
165
182
  }
166
183
  },
167
184
  "ui": {
@@ -196,7 +213,13 @@
196
213
  },
197
214
  "navigation": {
198
215
  "steps": {
199
- "ariaLabel": "Tiến trình"
216
+ "ariaLabel": "Tiến trình",
217
+ "status": {
218
+ "wait": "Đang chờ",
219
+ "process": "Bước hiện tại",
220
+ "finish": "Đã hoàn tất",
221
+ "error": "Lỗi"
222
+ }
200
223
  },
201
224
  "breadcrumb": {
202
225
  "ariaLabel": "Đường dẫn"
@@ -289,7 +312,11 @@
289
312
  "densitySwitch": "Chuyển sang mật độ {density}",
290
313
  "rowActions": "Thao tác dòng",
291
314
  "empty": "Chưa có dữ liệu",
292
- "loading": "Đang tải…"
315
+ "loading": "Đang tải…",
316
+ "error": "Không tải được danh sách này",
317
+ "errorDescription": "Không lấy được dữ liệu. Vui lòng thử lại sau giây lát.",
318
+ "denied": "Bạn không có quyền xem danh sách này",
319
+ "deniedDescription": "Hãy đề nghị quản trị viên cấp quyền xem các bản ghi này."
293
320
  },
294
321
  "dataGrid": {
295
322
  "search": "Tìm kiếm",
@@ -301,6 +328,10 @@
301
328
  },
302
329
  "status": {
303
330
  "active": "Đang hoạt động",
331
+ "trialing": "Đang dùng thử",
332
+ "past_due": "Quá hạn thanh toán",
333
+ "incomplete": "Chưa hoàn tất",
334
+ "canceled": "Đã huỷ",
304
335
  "completed": "Hoàn thành",
305
336
  "delivered": "Đã giao",
306
337
  "done": "Xong",
@@ -350,6 +381,8 @@
350
381
  "chart": {
351
382
  "empty": "Không có dữ liệu",
352
383
  "summaryCartesian": "Biểu đồ gồm {series} chuỗi trên {points} điểm dữ liệu",
353
- "summaryPie": "Biểu đồ tròn gồm {slices} phần"
384
+ "summaryPie": "Biểu đồ tròn gồm {slices} phần",
385
+ "summaryTrend": "Biểu đồ cột xu hướng gồm {points} điểm dữ liệu",
386
+ "trendCurrent": "hiện tại"
354
387
  }
355
388
  }
@@ -1,4 +1,6 @@
1
+ import type { ComponentType, ReactNode } from "react";
1
2
  import type { FormStateAdapter } from "../props/components/form.prop.js";
3
+ import type { SidebarLinkComponentProp } from "../props/components/layout.prop.js";
2
4
  /**
3
5
  * Structural shape of Inertia's `useForm` return that the adapter needs. Duck-typed on purpose —
4
6
  * `@godxjp/ui` keeps ZERO dependency on `@inertiajs/react`; the real `useForm()` object satisfies
@@ -63,3 +65,51 @@ export declare function useInertiaField<TData extends Record<string, unknown>>(f
63
65
  };
64
66
  }) => void;
65
67
  };
68
+ /**
69
+ * Structural shape of Inertia's `<Link>` that the Sidebar adapter needs. Duck-typed on purpose —
70
+ * `@godxjp/ui` keeps ZERO dependency on `@inertiajs/react`; the real `Link` satisfies this shape,
71
+ * so a consumer passes it directly with no import from this package.
72
+ */
73
+ export interface InertiaLinkLike {
74
+ href: string;
75
+ className?: string;
76
+ children?: ReactNode;
77
+ }
78
+ /**
79
+ * Bind Inertia's `<Link>` as the Sidebar's row element (gh#213).
80
+ *
81
+ * The LIBRARY still composes every row — the 16px icon slot, the label, the badge, `data-active` /
82
+ * `aria-current`, the icon-only collapsed rail and its tooltip name — and hands it to the link as
83
+ * `children`. The consumer supplies ONLY the element, so the class of production regression where a
84
+ * consumer `renderItem` returned `<Link>{item.label}</Link>` and silently dropped every sidebar icon
85
+ * is no longer expressible.
86
+ *
87
+ * A disabled row has no destination; Inertia's `Link` requires a string `href` and would visit `""`,
88
+ * so the adapter renders an inert `<a>` for that case while keeping the canonical row class and
89
+ * `aria-disabled`.
90
+ *
91
+ * React Router / TanStack Router use `to` instead of `href` — use
92
+ * `createSidebarLink(Link, "to")` from `@godxjp/ui/layout` for those.
93
+ *
94
+ * @example
95
+ * ```tsx
96
+ * import { Link } from "@inertiajs/react";
97
+ * import { Sidebar } from "@godxjp/ui/layout";
98
+ * import { inertiaSidebarLink } from "@godxjp/ui/inertia";
99
+ *
100
+ * const NavLink = inertiaSidebarLink(Link);
101
+ *
102
+ * <Sidebar
103
+ * activeId={page.component}
104
+ * linkComponent={NavLink}
105
+ * sections={[
106
+ * { label: "Operations", items: [
107
+ * { id: "dashboard", label: t("nav.dashboard"), icon: LayoutDashboard, href: "/dashboard" },
108
+ * { id: "invoices", label: t("nav.invoices"), icon: Receipt, href: "/invoices",
109
+ * badge: <Badge tone="info">{unread}</Badge> },
110
+ * ] },
111
+ * ]}
112
+ * />;
113
+ * ```
114
+ */
115
+ export declare function inertiaSidebarLink<P extends InertiaLinkLike>(Link: ComponentType<P>): SidebarLinkComponentProp;
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { createSidebarLink } from "../components/layout/sidebar-link.js";
2
3
  function inertiaAdapter(form) {
3
4
  return {
4
5
  getValue: (name) => form.data[name],
@@ -16,7 +17,11 @@ function useInertiaField(form, name) {
16
17
  onChange: (event) => form.setData(name, event?.target?.value)
17
18
  };
18
19
  }
20
+ function inertiaSidebarLink(Link) {
21
+ return createSidebarLink(Link, "href");
22
+ }
19
23
  export {
20
24
  inertiaAdapter,
25
+ inertiaSidebarLink,
21
26
  useInertiaField
22
27
  };
@@ -73,13 +73,23 @@ export type AppSettingPickerProp = {
73
73
  * sized to the setting. `"icon"` renders a supported square, icon-only topbar trigger (e.g. a
74
74
  * globe language switcher): it structurally drops the value text and the picker's owned width —
75
75
  * no descendant-selector CSS overrides needed — while always keeping the localized `aria-label`,
76
- * so an icon-only trigger can never ship without an accessible name.
76
+ * so an icon-only trigger can never ship without an accessible name. `"inline"` renders the
77
+ * selected value as a compact text trigger for legal/auth footers without a field-like box.
77
78
  *
78
79
  * Default is kind-dependent: `kind="locale"` defaults to `"icon"` (its product contract is the
79
80
  * compact language switcher); every other kind defaults to `"labeled"`. Override explicitly for
80
81
  * e.g. a labeled locale row inside a settings form (`appearance="labeled"`).
81
82
  */
82
83
  appearance?: AppSettingPickerAppearanceProp;
84
+ /**
85
+ * Compact presentation (gh#217) — re-tiers the trigger box to `--control-height-sm` and drops the
86
+ * picker's owned per-kind width so a LABELLED trigger hugs its value. Use it for an auth/legal
87
+ * footer locale switch (`kind="locale" appearance="labeled" compact`), where the square icon-only
88
+ * default reads as a stray button and the full labelled trigger is too tall. All geometry is
89
+ * tokenized (`--app-setting-picker-compact-*`). No effect on `appearance="inline"`, which is
90
+ * already chrome-less. Default `false`.
91
+ */
92
+ compact?: boolean;
83
93
  className?: ClassNameProp;
84
94
  disabled?: DisabledProp;
85
95
  id?: IdProp;
@@ -1,5 +1,6 @@
1
1
  /** Charts component prop types — @see docs/COMPONENTS.md#charts (tree-shaken `@godxjp/ui/charts`). */
2
- import type { ClassNameProp, DescriptionProp, EmptyMessageProp, IdProp, LabelProp, SizeProp } from "../vocabulary/index.js";
2
+ import type * as React from "react";
3
+ import type { ClassNameProp, DescriptionProp, EmptyMessageProp, FooterProp, IdProp, LabelProp, SizeProp } from "../vocabulary/index.js";
3
4
  /** A single row of chart data — category accessor + one numeric value per series. */
4
5
  export type ChartDatum = Record<string, string | number | null | undefined>;
5
6
  /** One plotted series — `dataKey` accesses the value, `label` is the already-translated legend text. */
@@ -50,6 +51,44 @@ export type BarChartProp = ChartCartesianBase & {
50
51
  /** Lay bars out horizontally (category on the y-axis). */
51
52
  horizontal?: boolean;
52
53
  };
54
+ /**
55
+ * @see CompactBarTrend
56
+ *
57
+ * Dependency-free (no `recharts`) compact vertical bar trend: N category/value
58
+ * pairs, muted marks plus ONE emphasized "current" mark. Every dimension resolves
59
+ * from `--chart-trend-*` tokens, so a screen never writes CSS or an inline height.
60
+ */
61
+ export type CompactBarTrendProp = {
62
+ /** Row data — one bar per row. Not limited to seven points. */
63
+ data: ChartDatum[];
64
+ /** Key into each datum holding the category (tick) label. */
65
+ categoryKey: string;
66
+ /** Key into each datum holding the plotted numeric value. */
67
+ valueKey: string;
68
+ /** Accessible name + visible caption for the chart. REQUIRED (role="img" needs a name). */
69
+ label: LabelProp;
70
+ /** Extra context appended to the screen-reader description. */
71
+ description?: DescriptionProp;
72
+ /** Plot-height tier — `xs|sm|md|lg`. Defaults to `xs` (dashboard summary-card density). */
73
+ size?: SizeProp;
74
+ /**
75
+ * Index of the emphasized ("current") bar. Negative counts from the end
76
+ * (`-1` = the latest datum); out of range = no emphasis. Never colour-only —
77
+ * the emphasized row is annotated in the screen-reader text alternative.
78
+ */
79
+ emphasizedIndex?: number;
80
+ /** Render the category tick labels under the plot. */
81
+ showCategoryLabels?: boolean;
82
+ /** `Intl.NumberFormat` options for the values in the text alternative (locale is automatic). */
83
+ numberFormat?: Intl.NumberFormatOptions;
84
+ /** Activity footer slot rendered below the plot, outside the `role="img"` graphic. */
85
+ footer?: FooterProp;
86
+ /** Message shown when `data` is empty. Defaults to a localized "no data". */
87
+ emptyMessage?: EmptyMessageProp;
88
+ className?: ClassNameProp;
89
+ id?: IdProp;
90
+ ref?: React.Ref<HTMLElement>;
91
+ };
53
92
  /** @see AreaChart */
54
93
  export type AreaChartProp = ChartCartesianBase & {
55
94
  /** Stack series areas instead of overlaying them. */