@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.
- package/README.md +8 -2
- package/dist/app/app-provider.js +37 -21
- package/dist/app/index.d.ts +2 -0
- package/dist/app/index.js +2 -0
- package/dist/app/storage.d.ts +17 -0
- package/dist/app/storage.js +28 -0
- package/dist/app/theme-axes.d.ts +2 -0
- package/dist/app/theme-axes.js +45 -0
- package/dist/components/charts/chart-cartesian.d.ts +2 -1
- package/dist/components/charts/chart-cartesian.js +52 -3
- package/dist/components/charts/chart-category-axis.d.ts +55 -0
- package/dist/components/charts/chart-category-axis.js +93 -0
- package/dist/components/charts/chart-frame.d.ts +10 -1
- package/dist/components/charts/chart-frame.js +19 -3
- package/dist/components/charts/compact-bar-trend.d.ts +1 -1
- package/dist/components/charts/compact-bar-trend.js +2 -0
- package/dist/components/charts/pie-chart.d.ts +1 -1
- package/dist/components/charts/pie-chart.js +12 -1
- package/dist/components/charts/recharts-peer.d.ts +49 -0
- package/dist/components/charts/recharts-peer.js +45 -0
- package/dist/components/data-display/card.d.ts +12 -1
- package/dist/components/data-display/card.js +22 -4
- package/dist/components/data-display/code-block.js +6 -2
- package/dist/components/data-display/data-table.d.ts +39 -4
- package/dist/components/data-display/data-table.js +802 -270
- package/dist/components/data-display/descriptions.d.ts +27 -6
- package/dist/components/data-display/descriptions.js +58 -17
- package/dist/components/data-display/index.d.ts +2 -0
- package/dist/components/data-display/index.js +2 -0
- package/dist/components/data-display/list-row.d.ts +10 -1
- package/dist/components/data-display/list-row.js +7 -1
- package/dist/components/data-display/popover.d.ts +9 -3
- package/dist/components/data-display/popover.js +65 -11
- package/dist/components/data-display/range-timeline.d.ts +38 -0
- package/dist/components/data-display/range-timeline.js +161 -0
- package/dist/components/data-display/scroll-area.js +13 -2
- package/dist/components/data-display/service-launcher-card.js +14 -12
- package/dist/components/data-display/table.d.ts +71 -3
- package/dist/components/data-display/table.js +56 -18
- package/dist/components/data-display/tree-list.js +4 -9
- package/dist/components/data-entry/calendar.d.ts +2 -2
- package/dist/components/data-entry/calendar.js +23 -3
- package/dist/components/data-entry/cascader.d.ts +1 -1
- package/dist/components/data-entry/cascader.js +188 -24
- package/dist/components/data-entry/color-picker.d.ts +1 -1
- package/dist/components/data-entry/color-picker.js +17 -5
- package/dist/components/data-entry/control-appearance.d.ts +64 -0
- package/dist/components/data-entry/control-appearance.js +39 -0
- package/dist/components/data-entry/control-surface.d.ts +61 -0
- package/dist/components/data-entry/control-surface.js +39 -0
- package/dist/components/data-entry/date-picker.d.ts +1 -1
- package/dist/components/data-entry/date-picker.js +344 -113
- package/dist/components/data-entry/date-range-picker.d.ts +1 -1
- package/dist/components/data-entry/date-range-picker.js +278 -140
- package/dist/components/data-entry/form-field.d.ts +1 -1
- package/dist/components/data-entry/form-field.js +39 -4
- package/dist/components/data-entry/form.d.ts +4 -0
- package/dist/components/data-entry/form.js +4 -2
- package/dist/components/data-entry/index.d.ts +7 -3
- package/dist/components/data-entry/index.js +10 -1
- package/dist/components/data-entry/input-otp.d.ts +1 -1
- package/dist/components/data-entry/input.d.ts +12 -34
- package/dist/components/data-entry/input.js +92 -24
- package/dist/components/data-entry/month-picker.d.ts +1 -1
- package/dist/components/data-entry/month-picker.js +47 -10
- package/dist/components/data-entry/month-range-picker.d.ts +1 -1
- package/dist/components/data-entry/month-range-picker.js +51 -11
- package/dist/components/data-entry/number-input.d.ts +7 -0
- package/dist/components/data-entry/number-input.js +147 -98
- package/dist/components/data-entry/password-input.d.ts +1 -1
- package/dist/components/data-entry/radio.d.ts +1 -1
- package/dist/components/data-entry/radio.js +61 -13
- package/dist/components/data-entry/search-input.d.ts +1 -1
- package/dist/components/data-entry/search-input.js +16 -2
- package/dist/components/data-entry/search-select.d.ts +2 -2
- package/dist/components/data-entry/search-select.js +209 -78
- package/dist/components/data-entry/select.d.ts +22 -4
- package/dist/components/data-entry/select.js +215 -163
- package/dist/components/data-entry/slider.d.ts +9 -1
- package/dist/components/data-entry/slider.js +87 -9
- package/dist/components/data-entry/switch.d.ts +3 -0
- package/dist/components/data-entry/switch.js +29 -3
- package/dist/components/data-entry/textarea.d.ts +14 -56
- package/dist/components/data-entry/textarea.js +80 -33
- package/dist/components/data-entry/time-picker.d.ts +2 -2
- package/dist/components/data-entry/time-picker.js +333 -109
- package/dist/components/data-entry/time-range-picker.d.ts +5 -0
- package/dist/components/data-entry/time-range-picker.js +89 -0
- package/dist/components/data-entry/transfer.d.ts +1 -1
- package/dist/components/data-entry/transfer.js +86 -28
- package/dist/components/data-entry/tree-select.d.ts +1 -1
- package/dist/components/data-entry/tree-select.js +201 -113
- package/dist/components/data-entry/tree-utils.js +7 -14
- package/dist/components/data-entry/upload-files.d.ts +2 -0
- package/dist/components/data-entry/upload-files.js +31 -0
- package/dist/components/data-entry/upload-request.d.ts +4 -0
- package/dist/components/data-entry/upload-request.js +53 -0
- package/dist/components/data-entry/upload-types.d.ts +28 -0
- package/dist/components/data-entry/upload-types.js +2 -0
- package/dist/components/data-entry/upload.d.ts +2 -2
- package/dist/components/data-entry/upload.js +475 -115
- package/dist/components/feedback/dialog.js +19 -19
- package/dist/components/feedback/sheet.js +3 -0
- package/dist/components/feedback/tooltip.js +3 -0
- package/dist/components/general/button.d.ts +2 -1
- package/dist/components/general/button.js +7 -1
- package/dist/components/general/index.d.ts +1 -0
- package/dist/components/general/index.js +2 -0
- package/dist/components/general/typography.d.ts +3 -0
- package/dist/components/general/typography.js +15 -1
- package/dist/components/general/visually-hidden.d.ts +3 -0
- package/dist/components/general/visually-hidden.js +9 -0
- package/dist/components/layout/app-launcher.d.ts +34 -0
- package/dist/components/layout/app-launcher.js +261 -0
- package/dist/components/layout/app-shell.d.ts +3 -1
- package/dist/components/layout/app-shell.js +34 -14
- package/dist/components/layout/auth-shell.d.ts +1 -1
- package/dist/components/layout/auth-shell.js +2 -0
- package/dist/components/layout/breadcrumb.d.ts +14 -2
- package/dist/components/layout/breadcrumb.js +46 -4
- package/dist/components/layout/flex.d.ts +1 -1
- package/dist/components/layout/flex.js +23 -2
- package/dist/components/layout/index.d.ts +3 -0
- package/dist/components/layout/index.js +5 -1
- package/dist/components/layout/org-switcher.js +20 -1
- package/dist/components/layout/page-container.d.ts +1 -1
- package/dist/components/layout/page-container.js +5 -3
- package/dist/components/layout/responsive-grid.d.ts +16 -2
- package/dist/components/layout/responsive-grid.js +29 -2
- package/dist/components/layout/sidebar.js +2 -1
- package/dist/components/layout/topbar-item.d.ts +3 -0
- package/dist/components/layout/topbar-item.js +18 -3
- package/dist/components/layout/topbar.d.ts +1 -1
- package/dist/components/layout/topbar.js +27 -6
- package/dist/components/navigation/dropdown-menu.d.ts +30 -2
- package/dist/components/navigation/dropdown-menu.js +73 -11
- package/dist/components/navigation/pagination.d.ts +2 -2
- package/dist/components/navigation/pagination.js +155 -83
- package/dist/components/navigation/steps.d.ts +2 -2
- package/dist/components/navigation/steps.js +29 -4
- package/dist/components/navigation/tabs.d.ts +5 -33
- package/dist/components/navigation/tabs.js +232 -64
- package/dist/components/ui/hover-card.js +3 -0
- package/dist/components/ui/input-otp.d.ts +26 -28
- package/dist/components/ui/input-otp.js +50 -7
- package/dist/components/ui/password-input.d.ts +36 -2
- package/dist/components/ui/password-input.js +27 -7
- package/dist/components/ui/rating.d.ts +25 -0
- package/dist/components/ui/rating.js +67 -27
- package/dist/components/ui/segmented.d.ts +9 -0
- package/dist/components/ui/segmented.js +17 -2
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +13 -0
- package/dist/components/ui/tag-input.d.ts +45 -0
- package/dist/components/ui/tag-input.js +109 -27
- package/dist/form/form-context.d.ts +29 -0
- package/dist/form/form-context.js +44 -4
- package/dist/form/form-field-array.d.ts +22 -0
- package/dist/form/form-field-array.js +50 -0
- package/dist/form/form-field-control.d.ts +2 -1
- package/dist/form/form-field-control.js +116 -40
- package/dist/form/form-root.d.ts +2 -1
- package/dist/form/form-root.js +142 -23
- package/dist/form/index.d.ts +3 -1
- package/dist/form/index.js +12 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +3 -1
- package/dist/i18n/messages/en.json +59 -6
- package/dist/i18n/messages/ja.json +59 -6
- package/dist/i18n/messages/vi.json +59 -6
- package/dist/i18n/translate.d.ts +19 -0
- package/dist/i18n/translate.js +24 -0
- package/dist/inertia/index.d.ts +20 -0
- package/dist/inertia/index.js +60 -1
- package/dist/lib/control-styles.d.ts +25 -3
- package/dist/lib/control-styles.js +9 -3
- package/dist/lib/datetime/picker-format.d.ts +8 -0
- package/dist/lib/datetime/picker-format.js +54 -0
- package/dist/lib/overlay-portal.d.ts +18 -0
- package/dist/lib/overlay-portal.js +17 -0
- package/dist/props/components/app.prop.d.ts +13 -2
- package/dist/props/components/charts.prop.d.ts +21 -0
- package/dist/props/components/data-display.prop.d.ts +55 -4
- package/dist/props/components/data-entry.prop.d.ts +687 -43
- package/dist/props/components/form.prop.d.ts +142 -4
- package/dist/props/components/general.prop.d.ts +30 -1
- package/dist/props/components/index.d.ts +2 -2
- package/dist/props/components/layout.prop.d.ts +255 -8
- package/dist/props/components/navigation.prop.d.ts +113 -3
- package/dist/props/registry.d.ts +376 -10
- package/dist/props/registry.js +493 -9
- package/dist/props/vocabulary/data.prop.d.ts +179 -1
- package/dist/props/vocabulary/index.d.ts +4 -4
- package/dist/props/vocabulary/interaction.prop.d.ts +51 -2
- package/dist/props/vocabulary/navigation.prop.d.ts +40 -0
- package/dist/props/vocabulary/shared.prop.d.ts +33 -0
- package/dist/styles/badge-layout.css +2 -1
- package/dist/styles/card-layout.css +36 -5
- package/dist/styles/chart-layout.css +17 -1
- package/dist/styles/control.css +520 -14
- package/dist/styles/data-display-layout.css +248 -7
- package/dist/styles/data-entry-layout.css +13 -0
- package/dist/styles/layout.css +221 -4
- package/dist/styles/navigation-layout.css +230 -1
- package/dist/styles/shell-layout.css +690 -21
- package/dist/styles/table-layout.css +95 -6
- package/dist/styles/text-layout.css +5 -0
- package/dist/tokens/base.css +1 -0
- package/dist/tokens/components/badge.css +1 -0
- package/dist/tokens/components/chart.css +6 -0
- package/dist/tokens/components/control.css +81 -3
- package/dist/tokens/components/data-display.css +9 -0
- package/dist/tokens/components/descriptions.css +11 -0
- package/dist/tokens/components/flex.css +8 -0
- package/dist/tokens/components/navigation.css +55 -0
- package/dist/tokens/components/shell.css +100 -5
- package/dist/tokens/components/table.css +14 -0
- package/dist/tokens/foundation.css +2 -0
- package/dist/tokens/semantic/layout.css +9 -0
- package/docs/CONSUMER-RULES.md +13 -0
- package/docs/DESIGN-AUTHORITY.md +43 -6
- package/docs/DEVELOPMENT.md +4 -3
- package/docs/FORMS.md +151 -6
- package/docs/FRAME-COVERAGE-REPORT.md +29 -16
- package/docs/README.md +1 -1
- package/docs/STANDARDS-vocabulary-tokens.md +1 -1
- package/docs/TESTING.md +15 -6
- package/docs/charts/cjk-category-axis.tsx +81 -0
- package/docs/data-display/card/index.tsx +22 -0
- package/docs/data-display/data-table/examples/antd-parity.tsx +257 -0
- package/docs/data-display/data-table/index.tsx +23 -0
- package/docs/data-display/descriptions.tsx +41 -0
- package/docs/data-display/list-row.tsx +6 -6
- package/docs/data-display/scroll-area.tsx +31 -25
- package/docs/data-display/table.tsx +104 -45
- package/docs/data-display/timeline.tsx +41 -0
- package/docs/data-entry/date-picker.tsx +85 -0
- package/docs/data-entry/date-range-picker.tsx +26 -0
- package/docs/data-entry/form-dynamic-fields.tsx +199 -0
- package/docs/data-entry/form.tsx +74 -4
- package/docs/data-entry/input-otp.tsx +24 -0
- package/docs/data-entry/input.tsx +46 -1
- package/docs/data-entry/month-range-picker.tsx +1 -1
- package/docs/data-entry/select.tsx +27 -0
- package/docs/data-entry/switch.tsx +41 -0
- package/docs/data-entry/textarea.tsx +38 -0
- package/docs/data-entry/time-picker.tsx +85 -1
- package/docs/data-entry/time-range-picker.tsx +55 -0
- package/docs/data-entry/transfer.tsx +17 -0
- package/docs/data-entry/upload.tsx +56 -12
- package/docs/feedback/tooltip.tsx +1 -1
- package/docs/general/activity.tsx +2 -2
- package/docs/general/button/index.tsx +14 -1
- package/docs/general/typography.tsx +14 -1
- package/docs/layout/app-launcher.tsx +195 -0
- package/docs/layout/app-shell-arrangements.tsx +5 -5
- package/docs/layout/app-shell.tsx +11 -0
- package/docs/layout/flex.tsx +50 -0
- package/docs/layout/responsive-grid.tsx +21 -1
- package/docs/layout/topbar.tsx +5 -9
- package/docs/navigation/app-setting-picker.tsx +11 -0
- package/docs/navigation/breadcrumb.tsx +48 -0
- package/docs/navigation/dropdown-menu.tsx +21 -0
- package/docs/navigation/pagination.tsx +52 -0
- package/docs/navigation/steps.tsx +37 -0
- package/docs/navigation/tabs.tsx +97 -1
- package/docs/query/button-refetch.tsx +1 -0
- package/docs/showcase/settings-security-mfa.tsx +3 -3
- package/package.json +24 -4
- package/scripts/_agent-setup.mjs +76 -9
- package/scripts/init-guinea-pig.mjs +26 -4
- package/scripts/ui-audit.mjs +243 -30
- package/scripts/visual-audit.mjs +45 -7
|
@@ -46,31 +46,31 @@ export default function Demo() {
|
|
|
46
46
|
<TableHeader>
|
|
47
47
|
<TableRow>
|
|
48
48
|
<TableHead>勘定科目</TableHead>
|
|
49
|
-
<TableHead
|
|
50
|
-
<TableHead
|
|
49
|
+
<TableHead align="end">借方</TableHead>
|
|
50
|
+
<TableHead align="end">貸方</TableHead>
|
|
51
51
|
</TableRow>
|
|
52
52
|
</TableHeader>
|
|
53
53
|
<TableBody>
|
|
54
54
|
<TableRow>
|
|
55
55
|
<TableCell>売掛金</TableCell>
|
|
56
|
-
<TableCell
|
|
57
|
-
<TableCell
|
|
56
|
+
<TableCell numeric>¥482,000</TableCell>
|
|
57
|
+
<TableCell align="end">—</TableCell>
|
|
58
58
|
</TableRow>
|
|
59
59
|
{/* Built-in selected-row state — data-[state=selected]:bg-primary/[0.06]. */}
|
|
60
60
|
<TableRow data-state="selected">
|
|
61
61
|
<TableCell>売上高</TableCell>
|
|
62
|
-
<TableCell
|
|
63
|
-
<TableCell
|
|
62
|
+
<TableCell align="end">—</TableCell>
|
|
63
|
+
<TableCell numeric>¥438,182</TableCell>
|
|
64
64
|
</TableRow>
|
|
65
65
|
<TableRow>
|
|
66
66
|
<TableCell>仮受消費税</TableCell>
|
|
67
|
-
<TableCell
|
|
68
|
-
<TableCell
|
|
67
|
+
<TableCell align="end">—</TableCell>
|
|
68
|
+
<TableCell numeric>¥43,818</TableCell>
|
|
69
69
|
</TableRow>
|
|
70
70
|
<TableRow className="font-medium">
|
|
71
71
|
<TableCell>合計</TableCell>
|
|
72
|
-
<TableCell
|
|
73
|
-
<TableCell
|
|
72
|
+
<TableCell numeric>¥482,000</TableCell>
|
|
73
|
+
<TableCell numeric>¥482,000</TableCell>
|
|
74
74
|
</TableRow>
|
|
75
75
|
</TableBody>
|
|
76
76
|
</Table>
|
|
@@ -90,41 +90,41 @@ export default function Demo() {
|
|
|
90
90
|
<TableHeader>
|
|
91
91
|
<TableRow>
|
|
92
92
|
<TableHead>勘定科目</TableHead>
|
|
93
|
-
<TableHead
|
|
94
|
-
<TableHead
|
|
95
|
-
<TableHead
|
|
96
|
-
<TableHead
|
|
97
|
-
<TableHead
|
|
98
|
-
<TableHead
|
|
99
|
-
<TableHead
|
|
100
|
-
<TableHead
|
|
101
|
-
<TableHead
|
|
93
|
+
<TableHead align="end">1月</TableHead>
|
|
94
|
+
<TableHead align="end">2月</TableHead>
|
|
95
|
+
<TableHead align="end">3月</TableHead>
|
|
96
|
+
<TableHead align="end">4月</TableHead>
|
|
97
|
+
<TableHead align="end">5月</TableHead>
|
|
98
|
+
<TableHead align="end">6月</TableHead>
|
|
99
|
+
<TableHead align="end">7月</TableHead>
|
|
100
|
+
<TableHead align="end">8月</TableHead>
|
|
101
|
+
<TableHead align="end">9月</TableHead>
|
|
102
102
|
</TableRow>
|
|
103
103
|
</TableHeader>
|
|
104
104
|
<TableBody>
|
|
105
105
|
<TableRow>
|
|
106
106
|
<TableCell>売上高</TableCell>
|
|
107
|
-
<TableCell
|
|
108
|
-
<TableCell
|
|
109
|
-
<TableCell
|
|
110
|
-
<TableCell
|
|
111
|
-
<TableCell
|
|
112
|
-
<TableCell
|
|
113
|
-
<TableCell
|
|
114
|
-
<TableCell
|
|
115
|
-
<TableCell
|
|
107
|
+
<TableCell numeric>¥412,000</TableCell>
|
|
108
|
+
<TableCell numeric>¥438,182</TableCell>
|
|
109
|
+
<TableCell numeric>¥455,900</TableCell>
|
|
110
|
+
<TableCell numeric>¥471,300</TableCell>
|
|
111
|
+
<TableCell numeric>¥482,000</TableCell>
|
|
112
|
+
<TableCell numeric>¥499,540</TableCell>
|
|
113
|
+
<TableCell numeric>¥510,200</TableCell>
|
|
114
|
+
<TableCell numeric>¥528,770</TableCell>
|
|
115
|
+
<TableCell numeric>¥541,090</TableCell>
|
|
116
116
|
</TableRow>
|
|
117
117
|
<TableRow>
|
|
118
118
|
<TableCell>売上原価</TableCell>
|
|
119
|
-
<TableCell
|
|
120
|
-
<TableCell
|
|
121
|
-
<TableCell
|
|
122
|
-
<TableCell
|
|
123
|
-
<TableCell
|
|
124
|
-
<TableCell
|
|
125
|
-
<TableCell
|
|
126
|
-
<TableCell
|
|
127
|
-
<TableCell
|
|
119
|
+
<TableCell numeric>¥206,000</TableCell>
|
|
120
|
+
<TableCell numeric>¥219,091</TableCell>
|
|
121
|
+
<TableCell numeric>¥227,950</TableCell>
|
|
122
|
+
<TableCell numeric>¥235,650</TableCell>
|
|
123
|
+
<TableCell numeric>¥241,000</TableCell>
|
|
124
|
+
<TableCell numeric>¥249,770</TableCell>
|
|
125
|
+
<TableCell numeric>¥255,100</TableCell>
|
|
126
|
+
<TableCell numeric>¥264,385</TableCell>
|
|
127
|
+
<TableCell numeric>¥270,545</TableCell>
|
|
128
128
|
</TableRow>
|
|
129
129
|
</TableBody>
|
|
130
130
|
</Table>
|
|
@@ -150,23 +150,23 @@ export default function Demo() {
|
|
|
150
150
|
<TableRow>
|
|
151
151
|
<TableHead>倉庫</TableHead>
|
|
152
152
|
<TableHead>伝票番号</TableHead>
|
|
153
|
-
<TableHead
|
|
153
|
+
<TableHead align="end">個数</TableHead>
|
|
154
154
|
</TableRow>
|
|
155
155
|
</TableHeader>
|
|
156
156
|
<TableBody>
|
|
157
157
|
<TableRow>
|
|
158
158
|
<TableCell rowSpan={2}>東京第一</TableCell>
|
|
159
159
|
<TableCell>SH-2026-0412</TableCell>
|
|
160
|
-
<TableCell
|
|
160
|
+
<TableCell numeric>18</TableCell>
|
|
161
161
|
</TableRow>
|
|
162
162
|
<TableRow>
|
|
163
163
|
<TableCell>SH-2026-0413</TableCell>
|
|
164
|
-
<TableCell
|
|
164
|
+
<TableCell numeric>6</TableCell>
|
|
165
165
|
</TableRow>
|
|
166
166
|
<TableRow>
|
|
167
167
|
<TableCell>大阪南</TableCell>
|
|
168
168
|
<TableCell>SH-2026-0414</TableCell>
|
|
169
|
-
<TableCell
|
|
169
|
+
<TableCell numeric>24</TableCell>
|
|
170
170
|
</TableRow>
|
|
171
171
|
</TableBody>
|
|
172
172
|
</Table>
|
|
@@ -187,14 +187,14 @@ export default function Demo() {
|
|
|
187
187
|
<TableRow>
|
|
188
188
|
<TableHead>倉庫</TableHead>
|
|
189
189
|
<TableHead>伝票番号</TableHead>
|
|
190
|
-
<TableHead
|
|
190
|
+
<TableHead align="end">個数</TableHead>
|
|
191
191
|
</TableRow>
|
|
192
192
|
</TableHeader>
|
|
193
193
|
<TableBody>
|
|
194
194
|
<TableRow>
|
|
195
195
|
<TableCell>東京第一</TableCell>
|
|
196
196
|
<TableCell>SH-2026-0412</TableCell>
|
|
197
|
-
<TableCell
|
|
197
|
+
<TableCell numeric>18</TableCell>
|
|
198
198
|
</TableRow>
|
|
199
199
|
</TableBody>
|
|
200
200
|
</Table>
|
|
@@ -217,14 +217,73 @@ export default function Demo() {
|
|
|
217
217
|
<TableRow>
|
|
218
218
|
<TableHead>倉庫</TableHead>
|
|
219
219
|
<TableHead>伝票番号</TableHead>
|
|
220
|
-
<TableHead
|
|
220
|
+
<TableHead align="end">個数</TableHead>
|
|
221
221
|
</TableRow>
|
|
222
222
|
</TableHeader>
|
|
223
223
|
<TableBody>
|
|
224
224
|
<TableRow>
|
|
225
225
|
<TableCell>東京第一</TableCell>
|
|
226
226
|
<TableCell>SH-2026-0412</TableCell>
|
|
227
|
-
<TableCell
|
|
227
|
+
<TableCell numeric>18</TableCell>
|
|
228
|
+
</TableRow>
|
|
229
|
+
</TableBody>
|
|
230
|
+
</Table>
|
|
231
|
+
</CardContent>
|
|
232
|
+
</Card>
|
|
233
|
+
|
|
234
|
+
{/* ── The COLUMN AXES (gh#410) ──────────────────────────────────────
|
|
235
|
+
align · numeric · wrap · width. Every one of these was a className before, and the
|
|
236
|
+
alignment utility the catalog recommended was a physical direction this package lints
|
|
237
|
+
against. `wrap` is the one that is not cosmetic: a cell is `white-space: nowrap` by
|
|
238
|
+
default (right for a data grid) and that inherits into everything it holds, so a
|
|
239
|
+
free-text column can never break without it. */}
|
|
240
|
+
<Card>
|
|
241
|
+
<CardHeader>
|
|
242
|
+
<CardTitle level={2}>問い合わせ一覧 · column axes</CardTitle>
|
|
243
|
+
<CardDescription>
|
|
244
|
+
`width` fixes the id and status columns; the free-text subject takes `wrap` so a long
|
|
245
|
+
Japanese title breaks inside its cell instead of stretching the table into a scroll;
|
|
246
|
+
the count column takes `numeric`, which is tabular figures and end alignment as one
|
|
247
|
+
concept, and the status column takes `align="center"`.
|
|
248
|
+
</CardDescription>
|
|
249
|
+
</CardHeader>
|
|
250
|
+
<CardContent flush>
|
|
251
|
+
<Table>
|
|
252
|
+
<TableHeader>
|
|
253
|
+
<TableRow>
|
|
254
|
+
<TableHead width="7rem">受付番号</TableHead>
|
|
255
|
+
<TableHead wrap>件名</TableHead>
|
|
256
|
+
<TableHead width="6rem" align="center">
|
|
257
|
+
状態
|
|
258
|
+
</TableHead>
|
|
259
|
+
<TableHead width="5rem" numeric>
|
|
260
|
+
返信
|
|
261
|
+
</TableHead>
|
|
262
|
+
</TableRow>
|
|
263
|
+
</TableHeader>
|
|
264
|
+
<TableBody>
|
|
265
|
+
<TableRow>
|
|
266
|
+
<TableCell>INQ-2026-0188</TableCell>
|
|
267
|
+
<TableCell wrap>
|
|
268
|
+
請求書の宛名を法人名から屋号に変更したいのですが、過去分もまとめて再発行できますか
|
|
269
|
+
</TableCell>
|
|
270
|
+
<TableCell align="center">対応中</TableCell>
|
|
271
|
+
<TableCell numeric>3</TableCell>
|
|
272
|
+
</TableRow>
|
|
273
|
+
<TableRow>
|
|
274
|
+
<TableCell>INQ-2026-0189</TableCell>
|
|
275
|
+
<TableCell wrap>
|
|
276
|
+
ログイン時の二要素認証コードが届かない端末があるため、SMS
|
|
277
|
+
から認証アプリへ切り替える手順を知りたい
|
|
278
|
+
</TableCell>
|
|
279
|
+
<TableCell align="center">未対応</TableCell>
|
|
280
|
+
<TableCell numeric>0</TableCell>
|
|
281
|
+
</TableRow>
|
|
282
|
+
<TableRow>
|
|
283
|
+
<TableCell>INQ-2026-0190</TableCell>
|
|
284
|
+
<TableCell wrap>API のレート制限について</TableCell>
|
|
285
|
+
<TableCell align="center">完了</TableCell>
|
|
286
|
+
<TableCell numeric>12</TableCell>
|
|
228
287
|
</TableRow>
|
|
229
288
|
</TableBody>
|
|
230
289
|
</Table>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useTranslation } from "@godxjp/ui/i18n";
|
|
1
2
|
import {
|
|
2
3
|
Card,
|
|
3
4
|
CardContent,
|
|
@@ -5,6 +6,7 @@ import {
|
|
|
5
6
|
CardHeader,
|
|
6
7
|
CardTitle,
|
|
7
8
|
Timeline,
|
|
9
|
+
RangeTimeline,
|
|
8
10
|
type TimelineItem,
|
|
9
11
|
} from "@godxjp/ui/data-display";
|
|
10
12
|
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
@@ -52,6 +54,11 @@ const approvalItems: TimelineItem[] = [
|
|
|
52
54
|
];
|
|
53
55
|
|
|
54
56
|
export default function Demo() {
|
|
57
|
+
const { t, locale } = useTranslation();
|
|
58
|
+
const dayLabel = (day: number) =>
|
|
59
|
+
new Intl.DateTimeFormat(locale, { month: "short", day: "numeric", timeZone: "UTC" }).format(
|
|
60
|
+
Date.UTC(2026, 8, day),
|
|
61
|
+
);
|
|
55
62
|
return (
|
|
56
63
|
<PageContainer title="Timeline" subtitle="現在のステップを強調する縦型のイベント一覧">
|
|
57
64
|
<Flex direction="col" gap="lg">
|
|
@@ -106,6 +113,40 @@ export default function Demo() {
|
|
|
106
113
|
<Timeline variant="status" items={approvalItems} />
|
|
107
114
|
</CardContent>
|
|
108
115
|
</Card>
|
|
116
|
+
<Card>
|
|
117
|
+
<CardHeader>
|
|
118
|
+
<CardTitle level={2}>RangeTimeline</CardTitle>
|
|
119
|
+
</CardHeader>
|
|
120
|
+
<CardContent>
|
|
121
|
+
<RangeTimeline
|
|
122
|
+
label={t("rangeTimeline.schedule")}
|
|
123
|
+
bands={[
|
|
124
|
+
{
|
|
125
|
+
label: new Intl.DateTimeFormat(locale, {
|
|
126
|
+
year: "numeric",
|
|
127
|
+
month: "long",
|
|
128
|
+
timeZone: "UTC",
|
|
129
|
+
}).format(Date.UTC(2026, 8, 1)),
|
|
130
|
+
units: 7,
|
|
131
|
+
},
|
|
132
|
+
]}
|
|
133
|
+
columns={Array.from({ length: 7 }, (_, index) => ({
|
|
134
|
+
label: dayLabel(index + 1),
|
|
135
|
+
units: 1,
|
|
136
|
+
}))}
|
|
137
|
+
rows={[
|
|
138
|
+
{
|
|
139
|
+
id: "example",
|
|
140
|
+
label: "期日確認",
|
|
141
|
+
start: 1,
|
|
142
|
+
end: 4,
|
|
143
|
+
startLabel: dayLabel(2),
|
|
144
|
+
endLabel: dayLabel(5),
|
|
145
|
+
},
|
|
146
|
+
]}
|
|
147
|
+
/>
|
|
148
|
+
</CardContent>
|
|
149
|
+
</Card>
|
|
109
150
|
</Flex>
|
|
110
151
|
</PageContainer>
|
|
111
152
|
);
|
|
@@ -186,6 +186,91 @@ export default function Demo() {
|
|
|
186
186
|
</FormField>
|
|
187
187
|
</CardContent>
|
|
188
188
|
</Card>
|
|
189
|
+
|
|
190
|
+
<Card>
|
|
191
|
+
<CardHeader>
|
|
192
|
+
<CardTitle level={2}>表示形式と元号</CardTitle>
|
|
193
|
+
</CardHeader>
|
|
194
|
+
<CardContent>
|
|
195
|
+
<Flex direction="col" gap="md">
|
|
196
|
+
<FormField id="formatted-date" label="契約日">
|
|
197
|
+
<DatePicker
|
|
198
|
+
id="formatted-date"
|
|
199
|
+
name="contract"
|
|
200
|
+
defaultValue={new Date(2026, 8, 9)}
|
|
201
|
+
format="yyyy年MM月dd日"
|
|
202
|
+
/>
|
|
203
|
+
</FormField>
|
|
204
|
+
<FormField id="era-date" label="和暦">
|
|
205
|
+
<DatePicker
|
|
206
|
+
id="era-date"
|
|
207
|
+
name="era"
|
|
208
|
+
defaultValue={new Date(2026, 8, 9)}
|
|
209
|
+
format={{
|
|
210
|
+
calendar: "japanese",
|
|
211
|
+
era: "long",
|
|
212
|
+
year: "numeric",
|
|
213
|
+
month: "long",
|
|
214
|
+
day: "numeric",
|
|
215
|
+
}}
|
|
216
|
+
inputReadOnly
|
|
217
|
+
/>
|
|
218
|
+
</FormField>
|
|
219
|
+
</Flex>
|
|
220
|
+
</CardContent>
|
|
221
|
+
</Card>
|
|
222
|
+
<Card>
|
|
223
|
+
<CardHeader>
|
|
224
|
+
<CardTitle level={2}>日時の予約</CardTitle>
|
|
225
|
+
</CardHeader>
|
|
226
|
+
<CardContent>
|
|
227
|
+
<FormField id="appointment-date" label="予約日時">
|
|
228
|
+
<DatePicker
|
|
229
|
+
id="appointment-date"
|
|
230
|
+
name="appointment"
|
|
231
|
+
defaultValue={new Date(2026, 8, 9, 17, 30)}
|
|
232
|
+
showTime
|
|
233
|
+
needConfirm
|
|
234
|
+
presets={[{ label: "翌営業日", value: () => new Date(2026, 8, 10, 9, 0) }]}
|
|
235
|
+
/>
|
|
236
|
+
</FormField>
|
|
237
|
+
</CardContent>
|
|
238
|
+
</Card>
|
|
239
|
+
<Card>
|
|
240
|
+
<CardHeader>
|
|
241
|
+
<CardTitle level={2}>集計単位</CardTitle>
|
|
242
|
+
</CardHeader>
|
|
243
|
+
<CardContent>
|
|
244
|
+
<Flex direction="col" gap="md">
|
|
245
|
+
{(["week", "month", "quarter", "year"] as const).map((picker) => (
|
|
246
|
+
<FormField key={picker} id={`period-${picker}`} label={picker}>
|
|
247
|
+
<DatePicker
|
|
248
|
+
id={`period-${picker}`}
|
|
249
|
+
picker={picker}
|
|
250
|
+
defaultValue={new Date(2026, 8, 9)}
|
|
251
|
+
showWeek
|
|
252
|
+
/>
|
|
253
|
+
</FormField>
|
|
254
|
+
))}
|
|
255
|
+
</Flex>
|
|
256
|
+
</CardContent>
|
|
257
|
+
</Card>
|
|
258
|
+
<Card>
|
|
259
|
+
<CardHeader>
|
|
260
|
+
<CardTitle level={2}>複数日を確定</CardTitle>
|
|
261
|
+
</CardHeader>
|
|
262
|
+
<CardContent>
|
|
263
|
+
<FormField id="multiple-dates" label="出勤日">
|
|
264
|
+
<DatePicker
|
|
265
|
+
id="multiple-dates"
|
|
266
|
+
name="attendance"
|
|
267
|
+
multiple
|
|
268
|
+
needConfirm
|
|
269
|
+
defaultValue={[new Date(2026, 8, 9), new Date(2026, 8, 11)]}
|
|
270
|
+
/>
|
|
271
|
+
</FormField>
|
|
272
|
+
</CardContent>
|
|
273
|
+
</Card>
|
|
189
274
|
</Flex>
|
|
190
275
|
</PageContainer>
|
|
191
276
|
);
|
|
@@ -143,6 +143,32 @@ export default function Demo() {
|
|
|
143
143
|
</FormField>
|
|
144
144
|
</CardContent>
|
|
145
145
|
</Card>
|
|
146
|
+
|
|
147
|
+
<Card>
|
|
148
|
+
<CardHeader>
|
|
149
|
+
<CardTitle level={2}>期間プリセットと確定</CardTitle>
|
|
150
|
+
</CardHeader>
|
|
151
|
+
<CardContent>
|
|
152
|
+
<FormField id="preset-range" label="集計期間">
|
|
153
|
+
<DateRangePicker
|
|
154
|
+
id="preset-range"
|
|
155
|
+
name="report"
|
|
156
|
+
format="yyyy/MM/dd"
|
|
157
|
+
needConfirm
|
|
158
|
+
allowEmpty={[false, true]}
|
|
159
|
+
showWeek
|
|
160
|
+
minDate={new Date(2026, 0, 1)}
|
|
161
|
+
maxDate={new Date(2026, 11, 31)}
|
|
162
|
+
presets={[
|
|
163
|
+
{
|
|
164
|
+
label: "9月",
|
|
165
|
+
value: () => ({ from: new Date(2026, 8, 1), to: new Date(2026, 8, 30) }),
|
|
166
|
+
},
|
|
167
|
+
]}
|
|
168
|
+
/>
|
|
169
|
+
</FormField>
|
|
170
|
+
</CardContent>
|
|
171
|
+
</Card>
|
|
146
172
|
</Flex>
|
|
147
173
|
</PageContainer>
|
|
148
174
|
);
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { Alert, AlertDescription } from "@godxjp/ui/feedback";
|
|
4
|
+
import { Input, Select } from "@godxjp/ui/data-entry";
|
|
5
|
+
import { Button } from "@godxjp/ui/general";
|
|
6
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
7
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
8
|
+
import {
|
|
9
|
+
FormFieldArray,
|
|
10
|
+
FormFieldControl,
|
|
11
|
+
FormRoot,
|
|
12
|
+
useFormDisabled,
|
|
13
|
+
useFormWatch,
|
|
14
|
+
useZodForm,
|
|
15
|
+
} from "@godxjp/ui/form";
|
|
16
|
+
|
|
17
|
+
const schema = z.object({
|
|
18
|
+
plan: z.enum(["standard", "enterprise"]),
|
|
19
|
+
contacts: z
|
|
20
|
+
.array(
|
|
21
|
+
z.object({
|
|
22
|
+
name: z.string().min(1, "担当者名を入力してください"),
|
|
23
|
+
email: z.string().email("有効なメールアドレスを入力してください"),
|
|
24
|
+
}),
|
|
25
|
+
)
|
|
26
|
+
.min(1, "担当者を 1 名以上登録してください"),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
type Values = z.infer<typeof schema>;
|
|
30
|
+
|
|
31
|
+
const emptyContact = { name: "", email: "" };
|
|
32
|
+
|
|
33
|
+
/** Counter driven by useFormWatch — re-renders on `contacts` only, not on every keystroke elsewhere. */
|
|
34
|
+
function ContactCount() {
|
|
35
|
+
const contacts = useFormWatch<Values>("contacts");
|
|
36
|
+
return (
|
|
37
|
+
<CardDescription>
|
|
38
|
+
{`登録済み ${Array.isArray(contacts) ? contacts.length : 0} 名 · 行の追加・削除・並べ替えは送信値の順序にそのまま反映されます。`}
|
|
39
|
+
</CardDescription>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Action buttons are not fields, so they read the form-level disabled state themselves. */
|
|
44
|
+
function Actions({ onReset }: { onReset: () => void }) {
|
|
45
|
+
const disabled = useFormDisabled();
|
|
46
|
+
return (
|
|
47
|
+
<Flex gap="sm" wrap>
|
|
48
|
+
<Button type="submit" disabled={disabled}>
|
|
49
|
+
保存
|
|
50
|
+
</Button>
|
|
51
|
+
<Button type="reset" variant="outline" disabled={disabled} onClick={onReset}>
|
|
52
|
+
リセット
|
|
53
|
+
</Button>
|
|
54
|
+
</Flex>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default function Demo() {
|
|
59
|
+
const [status, setStatus] = useState<"idle" | "saved" | "failed">("idle");
|
|
60
|
+
const [locked, setLocked] = useState(false);
|
|
61
|
+
const form = useZodForm(schema, {
|
|
62
|
+
defaultValues: {
|
|
63
|
+
plan: "standard",
|
|
64
|
+
contacts: [{ name: "田中 花子", email: "tanaka@example.jp" }],
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<PageContainer
|
|
70
|
+
title="FormFieldArray"
|
|
71
|
+
subtitle="動的な繰り返しフィールド · watch / disabled / reset / 送信失敗"
|
|
72
|
+
>
|
|
73
|
+
<Card>
|
|
74
|
+
<CardHeader>
|
|
75
|
+
<CardTitle level={2}>請求先の担当者</CardTitle>
|
|
76
|
+
</CardHeader>
|
|
77
|
+
<CardContent>
|
|
78
|
+
<FormRoot
|
|
79
|
+
form={form}
|
|
80
|
+
layout="horizontal"
|
|
81
|
+
disabled={locked}
|
|
82
|
+
onSubmit={() => setStatus("saved")}
|
|
83
|
+
onSubmitFailed={() => setStatus("failed")}
|
|
84
|
+
onReset={() => setStatus("idle")}
|
|
85
|
+
>
|
|
86
|
+
<ContactCount />
|
|
87
|
+
{status === "failed" && (
|
|
88
|
+
<Alert tone="destructive">
|
|
89
|
+
<AlertDescription>
|
|
90
|
+
入力内容を確認してください。最初のエラー項目へ移動しました。
|
|
91
|
+
</AlertDescription>
|
|
92
|
+
</Alert>
|
|
93
|
+
)}
|
|
94
|
+
{status === "saved" && (
|
|
95
|
+
<Alert tone="success">
|
|
96
|
+
<AlertDescription>保存しました。</AlertDescription>
|
|
97
|
+
</Alert>
|
|
98
|
+
)}
|
|
99
|
+
|
|
100
|
+
<FormFieldControl<Values> name="plan" label="プラン">
|
|
101
|
+
{(field) => (
|
|
102
|
+
<Select
|
|
103
|
+
{...field}
|
|
104
|
+
value={typeof field.value === "string" ? field.value : "standard"}
|
|
105
|
+
onValueChange={field.onValueChange}
|
|
106
|
+
options={[
|
|
107
|
+
{ value: "standard", label: "スタンダード" },
|
|
108
|
+
{ value: "enterprise", label: "エンタープライズ" },
|
|
109
|
+
]}
|
|
110
|
+
/>
|
|
111
|
+
)}
|
|
112
|
+
</FormFieldControl>
|
|
113
|
+
|
|
114
|
+
<FormFieldArray<Values, "contacts"> name="contacts">
|
|
115
|
+
{({ fields, append, remove, move, error, disabled }) => (
|
|
116
|
+
<>
|
|
117
|
+
{error && (
|
|
118
|
+
<Alert tone="destructive">
|
|
119
|
+
<AlertDescription>{error}</AlertDescription>
|
|
120
|
+
</Alert>
|
|
121
|
+
)}
|
|
122
|
+
{fields.map((row, position) => (
|
|
123
|
+
<Card key={row.key} variant="outline">
|
|
124
|
+
<CardContent>
|
|
125
|
+
<Flex direction="col" gap="md">
|
|
126
|
+
<FormFieldControl<Values>
|
|
127
|
+
name={`${row.name}.name`}
|
|
128
|
+
label={`担当者 ${position + 1} · 氏名`}
|
|
129
|
+
required
|
|
130
|
+
>
|
|
131
|
+
{(field) => (
|
|
132
|
+
<Input
|
|
133
|
+
{...field}
|
|
134
|
+
value={typeof field.value === "string" ? field.value : ""}
|
|
135
|
+
/>
|
|
136
|
+
)}
|
|
137
|
+
</FormFieldControl>
|
|
138
|
+
<FormFieldControl<Values>
|
|
139
|
+
name={`${row.name}.email`}
|
|
140
|
+
label={`担当者 ${position + 1} · メール`}
|
|
141
|
+
required
|
|
142
|
+
>
|
|
143
|
+
{(field) => (
|
|
144
|
+
<Input
|
|
145
|
+
{...field}
|
|
146
|
+
type="email"
|
|
147
|
+
value={typeof field.value === "string" ? field.value : ""}
|
|
148
|
+
/>
|
|
149
|
+
)}
|
|
150
|
+
</FormFieldControl>
|
|
151
|
+
<Flex gap="sm" wrap>
|
|
152
|
+
<Button
|
|
153
|
+
type="button"
|
|
154
|
+
variant="outline"
|
|
155
|
+
size="sm"
|
|
156
|
+
disabled={disabled || position === 0}
|
|
157
|
+
onClick={() => move(row.index, row.index - 1)}
|
|
158
|
+
>
|
|
159
|
+
{`担当者 ${position + 1} を上へ`}
|
|
160
|
+
</Button>
|
|
161
|
+
<Button
|
|
162
|
+
type="button"
|
|
163
|
+
variant="destructive"
|
|
164
|
+
size="sm"
|
|
165
|
+
disabled={disabled || fields.length === 1}
|
|
166
|
+
onClick={() => remove(row.index)}
|
|
167
|
+
>
|
|
168
|
+
{`担当者 ${position + 1} を削除`}
|
|
169
|
+
</Button>
|
|
170
|
+
</Flex>
|
|
171
|
+
</Flex>
|
|
172
|
+
</CardContent>
|
|
173
|
+
</Card>
|
|
174
|
+
))}
|
|
175
|
+
<Button
|
|
176
|
+
type="button"
|
|
177
|
+
variant="outline"
|
|
178
|
+
disabled={disabled}
|
|
179
|
+
onClick={() => append(emptyContact)}
|
|
180
|
+
>
|
|
181
|
+
担当者を追加
|
|
182
|
+
</Button>
|
|
183
|
+
</>
|
|
184
|
+
)}
|
|
185
|
+
</FormFieldArray>
|
|
186
|
+
|
|
187
|
+
<Actions onReset={() => setStatus("idle")} />
|
|
188
|
+
</FormRoot>
|
|
189
|
+
</CardContent>
|
|
190
|
+
</Card>
|
|
191
|
+
|
|
192
|
+
<Flex gap="sm" wrap>
|
|
193
|
+
<Button type="button" variant="ghost" onClick={() => setLocked((value) => !value)}>
|
|
194
|
+
{locked ? "フォームのロックを解除" : "フォーム全体をロック (disabled)"}
|
|
195
|
+
</Button>
|
|
196
|
+
</Flex>
|
|
197
|
+
</PageContainer>
|
|
198
|
+
);
|
|
199
|
+
}
|