@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
package/docs/data-entry/form.tsx
CHANGED
|
@@ -36,9 +36,10 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godx
|
|
|
36
36
|
import { Button, Heading, Text } from "@godxjp/ui/general";
|
|
37
37
|
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
38
38
|
|
|
39
|
-
/**
|
|
39
|
+
/** Keep the upload lifecycle visible in the form example. */
|
|
40
40
|
async function noopUpload(_file: File, _item: UploadFileItem) {
|
|
41
|
-
|
|
41
|
+
await new Promise((resolve) => setTimeout(resolve, 800));
|
|
42
|
+
return { mediaId: crypto.randomUUID() };
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
/** Expense category tree for the Cascader field. */
|
|
@@ -107,6 +108,8 @@ export default function Demo() {
|
|
|
107
108
|
const [issueDate, setIssueDate] = useState<Date | undefined>(new Date(2026, 0, 15));
|
|
108
109
|
const [period, setPeriod] = useState<DateRange | undefined>();
|
|
109
110
|
const [closeTime, setCloseTime] = useState("17:30");
|
|
111
|
+
const [startTime, setStartTime] = useState("09:00");
|
|
112
|
+
const [endTime, setEndTime] = useState("");
|
|
110
113
|
const [score, setScore] = useState(4);
|
|
111
114
|
const [tags, setTags] = useState<string[]>(["優先"]);
|
|
112
115
|
const [otp, setOtp] = useState("");
|
|
@@ -119,6 +122,39 @@ export default function Demo() {
|
|
|
119
122
|
subtitle="全フィールド型 × 全レイアウト × 全状態 · 実画面のフォーム例 (real primitives only)"
|
|
120
123
|
>
|
|
121
124
|
<Flex direction="col" gap="lg">
|
|
125
|
+
<Card>
|
|
126
|
+
<CardHeader>
|
|
127
|
+
<CardTitle level={2}>Validation feedback</CardTitle>
|
|
128
|
+
<CardDescription>確認中・成功・注意・エラーを区別します。</CardDescription>
|
|
129
|
+
</CardHeader>
|
|
130
|
+
<CardContent>
|
|
131
|
+
<Form requiredMark="optional">
|
|
132
|
+
<FormField label="確認済み" hasFeedback validateStatus="success">
|
|
133
|
+
<Input defaultValue="verified@example.jp" />
|
|
134
|
+
</FormField>
|
|
135
|
+
<FormField label="確認中" hasFeedback validateStatus="validating">
|
|
136
|
+
<Input defaultValue="checking@example.jp" />
|
|
137
|
+
</FormField>
|
|
138
|
+
<FormField
|
|
139
|
+
label="注意"
|
|
140
|
+
hasFeedback
|
|
141
|
+
validateStatus="warning"
|
|
142
|
+
helper="内容を確認してください。"
|
|
143
|
+
>
|
|
144
|
+
<Input defaultValue="review@example.jp" />
|
|
145
|
+
</FormField>
|
|
146
|
+
<FormField
|
|
147
|
+
label="エラー"
|
|
148
|
+
required
|
|
149
|
+
hasFeedback
|
|
150
|
+
error="メールアドレスを入力してください。"
|
|
151
|
+
>
|
|
152
|
+
<Input />
|
|
153
|
+
</FormField>
|
|
154
|
+
</Form>
|
|
155
|
+
</CardContent>
|
|
156
|
+
</Card>
|
|
157
|
+
|
|
122
158
|
{/* ════════════════════ 1. EVERY FIELD TYPE ════════════════════ */}
|
|
123
159
|
<Heading level={2}>1. 全フィールド型 · すべての入力コントロール</Heading>
|
|
124
160
|
<Text tone="muted" size="sm">
|
|
@@ -414,12 +450,46 @@ export default function Demo() {
|
|
|
414
450
|
minuteStep={15}
|
|
415
451
|
/>
|
|
416
452
|
</FormField>
|
|
453
|
+
{/* 開始/終了 の対 — 終了は開始より前を選べない。`disabledTime` が列と
|
|
454
|
+
入力欄の両方を止めるので、キーボードから規則をすり抜けられない。 */}
|
|
455
|
+
<FormField id="f-start" label="開始時刻" required>
|
|
456
|
+
<TimePicker
|
|
457
|
+
id="f-start"
|
|
458
|
+
name="start_time"
|
|
459
|
+
value={startTime}
|
|
460
|
+
onValueChange={setStartTime}
|
|
461
|
+
minuteStep={15}
|
|
462
|
+
/>
|
|
463
|
+
</FormField>
|
|
464
|
+
<FormField id="f-end" label="終了時刻" required>
|
|
465
|
+
<TimePicker
|
|
466
|
+
id="f-end"
|
|
467
|
+
name="end_time"
|
|
468
|
+
value={endTime}
|
|
469
|
+
onValueChange={setEndTime}
|
|
470
|
+
minuteStep={15}
|
|
471
|
+
disabledTime={() => {
|
|
472
|
+
const [startHour, startMinute] = startTime.split(":").map(Number);
|
|
473
|
+
return {
|
|
474
|
+
disabledHours: () => Array.from({ length: startHour }, (_, hour) => hour),
|
|
475
|
+
disabledMinutes: (hour) =>
|
|
476
|
+
hour === startHour
|
|
477
|
+
? Array.from({ length: 60 }, (_, minute) => minute).filter(
|
|
478
|
+
(minute) => minute <= startMinute,
|
|
479
|
+
)
|
|
480
|
+
: [],
|
|
481
|
+
};
|
|
482
|
+
}}
|
|
483
|
+
/>
|
|
484
|
+
</FormField>
|
|
417
485
|
<FormField id="f-period" label="会計期間" colSpan={2}>
|
|
418
486
|
<DateRangePicker
|
|
419
487
|
id="f-period"
|
|
420
488
|
name="period"
|
|
421
489
|
value={period}
|
|
422
490
|
onValueChange={setPeriod}
|
|
491
|
+
// 土日は選べない。fromDate/toDate では表せない規則。
|
|
492
|
+
disabledDate={(date) => date.getDay() === 0 || date.getDay() === 6}
|
|
423
493
|
/>
|
|
424
494
|
</FormField>
|
|
425
495
|
</Form>
|
|
@@ -647,9 +717,9 @@ export default function Demo() {
|
|
|
647
717
|
<CardDescription>
|
|
648
718
|
Form に errors(Inertia の form.errors)を渡すと、name
|
|
649
719
|
を持つフィールドは自分のメッセージをバッグから自動解決してキーを消費(claim)する。
|
|
650
|
-
FormErrors は残り
|
|
720
|
+
FormErrors は残り ·
|
|
651
721
|
隠し・派生フィールド(action_mode、page…)に付いた、どのフィールドにも表示先が無いエラー
|
|
652
|
-
|
|
722
|
+
· だけを role=alert のバナーとして表示する。
|
|
653
723
|
</CardDescription>
|
|
654
724
|
</CardHeader>
|
|
655
725
|
<CardContent>
|
|
@@ -225,6 +225,30 @@ export default function Demo() {
|
|
|
225
225
|
</FormField>
|
|
226
226
|
</CardContent>
|
|
227
227
|
</Card>
|
|
228
|
+
<Card>
|
|
229
|
+
<CardHeader>
|
|
230
|
+
<CardTitle level={2}>マスク・入力の正規化</CardTitle>
|
|
231
|
+
<CardDescription>
|
|
232
|
+
入力と貼り付けを大文字に変換。マスクは表示だけに適用されます。
|
|
233
|
+
</CardDescription>
|
|
234
|
+
</CardHeader>
|
|
235
|
+
<CardContent>
|
|
236
|
+
<FormField id="masked-code" label="確認コード">
|
|
237
|
+
<InputOTP
|
|
238
|
+
maxLength={4}
|
|
239
|
+
defaultValue=""
|
|
240
|
+
mask
|
|
241
|
+
formatter={(value) => value.toUpperCase()}
|
|
242
|
+
>
|
|
243
|
+
<InputOTPGroup>
|
|
244
|
+
{[0, 1, 2, 3].map((index) => (
|
|
245
|
+
<InputOTPSlot key={index} index={index} />
|
|
246
|
+
))}
|
|
247
|
+
</InputOTPGroup>
|
|
248
|
+
</InputOTP>
|
|
249
|
+
</FormField>
|
|
250
|
+
</CardContent>
|
|
251
|
+
</Card>
|
|
228
252
|
</Flex>
|
|
229
253
|
</PageContainer>
|
|
230
254
|
);
|
|
@@ -107,7 +107,52 @@ export default function Demo() {
|
|
|
107
107
|
</Flex>
|
|
108
108
|
</CardContent>
|
|
109
109
|
</Card>
|
|
110
|
-
<
|
|
110
|
+
<Card>
|
|
111
|
+
<CardHeader>
|
|
112
|
+
<CardTitle level={2}>Ant Design axes · status, variant, size</CardTitle>
|
|
113
|
+
<CardDescription>
|
|
114
|
+
status is the validation state a form paints consistently (error also reports
|
|
115
|
+
aria-invalid; warning does not, because a warning is not a validity failure). variant
|
|
116
|
+
is how much chrome the field draws. size is the shared control-height ladder.
|
|
117
|
+
</CardDescription>
|
|
118
|
+
</CardHeader>
|
|
119
|
+
<CardContent>
|
|
120
|
+
<Flex direction="col" gap="md">
|
|
121
|
+
<Input aria-label="エラー状態" status="error" defaultValue="不正な値" />
|
|
122
|
+
<Input aria-label="警告状態" status="warning" defaultValue="確認してください" />
|
|
123
|
+
<Input aria-label="枠線あり" variant="outlined" defaultValue="outlined" />
|
|
124
|
+
<Input aria-label="塗りつぶし" variant="filled" defaultValue="filled" />
|
|
125
|
+
<Input aria-label="枠線なし" variant="borderless" defaultValue="borderless" />
|
|
126
|
+
<Input aria-label="小さいサイズ" size="sm" placeholder="Compact tier (sm)" />
|
|
127
|
+
<Input aria-label="標準サイズ" size="md" placeholder="Default tier (md)" />
|
|
128
|
+
<Input aria-label="大きいサイズ" size="lg" placeholder="Comfortable tier (lg)" />
|
|
129
|
+
</Flex>
|
|
130
|
+
</CardContent>
|
|
131
|
+
</Card>
|
|
132
|
+
|
|
133
|
+
<Card>
|
|
134
|
+
<CardHeader>
|
|
135
|
+
<CardTitle level={2}>Affixes · prefix / suffix inside, addons outside</CardTitle>
|
|
136
|
+
<CardDescription>
|
|
137
|
+
A prefix or suffix sits inside the field's own box, in its padding. An addon is a
|
|
138
|
+
separate surface welded to the outside of the border: a protocol, a currency, a unit.
|
|
139
|
+
The counter reports an overrun and never edits the value.
|
|
140
|
+
</CardDescription>
|
|
141
|
+
</CardHeader>
|
|
142
|
+
<CardContent>
|
|
143
|
+
<Flex direction="col" gap="md">
|
|
144
|
+
<Input aria-label="金額" prefix="¥" suffix="円" defaultValue="12000" />
|
|
145
|
+
<Input
|
|
146
|
+
aria-label="サイト"
|
|
147
|
+
addonBefore="https://"
|
|
148
|
+
addonAfter=".co.jp"
|
|
149
|
+
defaultValue="example"
|
|
150
|
+
/>
|
|
151
|
+
<Input aria-label="件名" count={{ max: 20 }} defaultValue="東京都の請求書" />
|
|
152
|
+
<Input aria-label="超過した件名" count={{ max: 5 }} defaultValue="長すぎる件名です" />
|
|
153
|
+
</Flex>
|
|
154
|
+
</CardContent>
|
|
155
|
+
</Card>
|
|
111
156
|
</Flex>
|
|
112
157
|
</PageContainer>
|
|
113
158
|
);
|
|
@@ -51,7 +51,7 @@ export default function Demo() {
|
|
|
51
51
|
<CardTitle level={2}>検索フィルター (未選択)</CardTitle>
|
|
52
52
|
<CardDescription>
|
|
53
53
|
初期値なし。確定済み範囲の上でもう一度選ぶと新しい範囲が開始される (reset-on-complete
|
|
54
|
-
|
|
54
|
+
· 開始月が固まって選び直せない、が起きない)。
|
|
55
55
|
</CardDescription>
|
|
56
56
|
</CardHeader>
|
|
57
57
|
<CardContent>
|
|
@@ -365,6 +365,33 @@ export default function Demo() {
|
|
|
365
365
|
</Flex>
|
|
366
366
|
</CardContent>
|
|
367
367
|
</Card>
|
|
368
|
+
<Card>
|
|
369
|
+
<CardHeader>
|
|
370
|
+
<CardTitle level={2}>複数選択・上限・検索</CardTitle>
|
|
371
|
+
<CardDescription>
|
|
372
|
+
最大 3 件を選択。選択行の再クリック・クリア・キーボード操作に対応。
|
|
373
|
+
</CardDescription>
|
|
374
|
+
</CardHeader>
|
|
375
|
+
<CardContent>
|
|
376
|
+
<FormField id="reviewers" label="レビュアー">
|
|
377
|
+
<Select
|
|
378
|
+
mode="multiple"
|
|
379
|
+
name="reviewers[]"
|
|
380
|
+
defaultValue={["tanaka"]}
|
|
381
|
+
showSearch
|
|
382
|
+
maxCount={3}
|
|
383
|
+
maxTagCount={2}
|
|
384
|
+
allowClear
|
|
385
|
+
options={[
|
|
386
|
+
{ value: "tanaka", label: "田中" },
|
|
387
|
+
{ value: "sato", label: "佐藤" },
|
|
388
|
+
{ value: "suzuki", label: "鈴木" },
|
|
389
|
+
{ value: "ito", label: "伊藤" },
|
|
390
|
+
]}
|
|
391
|
+
/>
|
|
392
|
+
</FormField>
|
|
393
|
+
</CardContent>
|
|
394
|
+
</Card>
|
|
368
395
|
</Flex>
|
|
369
396
|
</PageContainer>
|
|
370
397
|
);
|
|
@@ -61,6 +61,47 @@ export default function Demo() {
|
|
|
61
61
|
</Flex>
|
|
62
62
|
</CardContent>
|
|
63
63
|
</Card>
|
|
64
|
+
|
|
65
|
+
<Card>
|
|
66
|
+
<CardHeader>
|
|
67
|
+
<CardTitle level={2}>Ant Design axes · loading, checkedChildren</CardTitle>
|
|
68
|
+
<CardDescription>
|
|
69
|
+
loading は通信中の状態です。disabled ではなく aria-busy / aria-disabled
|
|
70
|
+
を使います。disabled はタブ順から外れるため、保存中にキーボードの
|
|
71
|
+
フォーカスが次の項目へ飛んでしまうからです。
|
|
72
|
+
</CardDescription>
|
|
73
|
+
</CardHeader>
|
|
74
|
+
<CardContent>
|
|
75
|
+
<Flex direction="col" gap="md">
|
|
76
|
+
<Field
|
|
77
|
+
id="sw-loading"
|
|
78
|
+
label="公開設定 (保存中)"
|
|
79
|
+
description="通信が終わるまで操作を受け付けません"
|
|
80
|
+
>
|
|
81
|
+
<Switch id="sw-loading" loading defaultChecked />
|
|
82
|
+
</Field>
|
|
83
|
+
<Field
|
|
84
|
+
id="sw-words-off"
|
|
85
|
+
label="ラベル付き (オフ)"
|
|
86
|
+
description="トラックの中に状態の語を表示します"
|
|
87
|
+
>
|
|
88
|
+
<Switch id="sw-words-off" checkedChildren="有効" unCheckedChildren="無効" />
|
|
89
|
+
</Field>
|
|
90
|
+
<Field
|
|
91
|
+
id="sw-words-on"
|
|
92
|
+
label="ラベル付き (オン)"
|
|
93
|
+
description="語が入ってもつまみは端まで届きます"
|
|
94
|
+
>
|
|
95
|
+
<Switch
|
|
96
|
+
id="sw-words-on"
|
|
97
|
+
checkedChildren="有効"
|
|
98
|
+
unCheckedChildren="無効"
|
|
99
|
+
defaultChecked
|
|
100
|
+
/>
|
|
101
|
+
</Field>
|
|
102
|
+
</Flex>
|
|
103
|
+
</CardContent>
|
|
104
|
+
</Card>
|
|
64
105
|
</Flex>
|
|
65
106
|
</PageContainer>
|
|
66
107
|
);
|
|
@@ -192,6 +192,44 @@ export default function Demo() {
|
|
|
192
192
|
</CardContent>
|
|
193
193
|
</Card>
|
|
194
194
|
|
|
195
|
+
<Card>
|
|
196
|
+
<CardHeader>
|
|
197
|
+
<CardTitle level={2}>
|
|
198
|
+
Ant Design axes · status, variant, size, count, autoSize
|
|
199
|
+
</CardTitle>
|
|
200
|
+
<CardDescription>
|
|
201
|
+
variant carries five accepted spellings for three states: outlined / filled /
|
|
202
|
+
borderless are Ant Design's, and this library's older default / ghost
|
|
203
|
+
resolve onto the first and the last. autoSize is autoGrow plus its row bounds in one
|
|
204
|
+
prop.
|
|
205
|
+
</CardDescription>
|
|
206
|
+
</CardHeader>
|
|
207
|
+
<CardContent>
|
|
208
|
+
<Flex direction="col" gap="md">
|
|
209
|
+
<Textarea aria-label="エラー状態" status="error" defaultValue="不正な値" />
|
|
210
|
+
<Textarea aria-label="警告状態" status="warning" defaultValue="確認してください" />
|
|
211
|
+
<Textarea aria-label="枠線あり" variant="outlined" defaultValue="outlined" />
|
|
212
|
+
<Textarea aria-label="塗りつぶし" variant="filled" defaultValue="filled" />
|
|
213
|
+
<Textarea aria-label="枠線なし" variant="borderless" defaultValue="borderless" />
|
|
214
|
+
<Textarea aria-label="既定 (旧称)" variant="default" defaultValue="default" />
|
|
215
|
+
<Textarea aria-label="ゴースト (旧称)" variant="ghost" defaultValue="ghost" />
|
|
216
|
+
<Textarea aria-label="小さいサイズ" size="sm" placeholder="sm" />
|
|
217
|
+
<Textarea aria-label="標準サイズ" size="md" placeholder="md" />
|
|
218
|
+
<Textarea aria-label="大きいサイズ" size="lg" placeholder="lg" />
|
|
219
|
+
<Textarea
|
|
220
|
+
aria-label="文字数カウンタ"
|
|
221
|
+
count={{ max: 140 }}
|
|
222
|
+
defaultValue="東京都の請求書について"
|
|
223
|
+
/>
|
|
224
|
+
<Textarea
|
|
225
|
+
aria-label="自動リサイズ"
|
|
226
|
+
autoSize={{ minRows: 2, maxRows: 6 }}
|
|
227
|
+
placeholder="2行から6行まで伸びます"
|
|
228
|
+
/>
|
|
229
|
+
</Flex>
|
|
230
|
+
</CardContent>
|
|
231
|
+
</Card>
|
|
232
|
+
|
|
195
233
|
<Card>
|
|
196
234
|
<CardHeader>
|
|
197
235
|
<CardTitle level={2}>In FormField</CardTitle>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
|
|
3
3
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
4
|
-
import { FormField, TimePicker } from "@godxjp/ui/data-entry";
|
|
4
|
+
import { FormField, TimePicker, TimeRangePicker } from "@godxjp/ui/data-entry";
|
|
5
5
|
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -93,6 +93,90 @@ export default function Demo() {
|
|
|
93
93
|
</FormField>
|
|
94
94
|
</CardContent>
|
|
95
95
|
</Card>
|
|
96
|
+
|
|
97
|
+
<Card>
|
|
98
|
+
<CardHeader>
|
|
99
|
+
<CardTitle level={2}>秒単位の締切</CardTitle>
|
|
100
|
+
</CardHeader>
|
|
101
|
+
<CardContent>
|
|
102
|
+
<FormField id="precision-time" label="締切時刻">
|
|
103
|
+
<TimePicker
|
|
104
|
+
id="precision-time"
|
|
105
|
+
name="precision"
|
|
106
|
+
defaultValue="17:50:15"
|
|
107
|
+
format="HH:mm:ss"
|
|
108
|
+
hourStep={2}
|
|
109
|
+
minuteStep={10}
|
|
110
|
+
secondStep={15}
|
|
111
|
+
changeOnScroll
|
|
112
|
+
needConfirm
|
|
113
|
+
/>
|
|
114
|
+
</FormField>
|
|
115
|
+
</CardContent>
|
|
116
|
+
</Card>
|
|
117
|
+
<Card>
|
|
118
|
+
<CardHeader>
|
|
119
|
+
<CardTitle level={2}>12時間表示</CardTitle>
|
|
120
|
+
</CardHeader>
|
|
121
|
+
<CardContent>
|
|
122
|
+
<FormField id="twelve-time" label="開始時刻">
|
|
123
|
+
<TimePicker
|
|
124
|
+
id="twelve-time"
|
|
125
|
+
name="twelve"
|
|
126
|
+
defaultValue="13:30"
|
|
127
|
+
format="h:mm A"
|
|
128
|
+
use12Hours
|
|
129
|
+
/>
|
|
130
|
+
</FormField>
|
|
131
|
+
</CardContent>
|
|
132
|
+
</Card>
|
|
133
|
+
<Card>
|
|
134
|
+
<CardHeader>
|
|
135
|
+
<CardTitle level={2}>入力状態</CardTitle>
|
|
136
|
+
</CardHeader>
|
|
137
|
+
<CardContent>
|
|
138
|
+
<Flex direction="col" gap="md">
|
|
139
|
+
<FormField id="readonly-time" label="選択のみ">
|
|
140
|
+
<TimePicker
|
|
141
|
+
id="readonly-time"
|
|
142
|
+
inputReadOnly
|
|
143
|
+
defaultValue="09:00"
|
|
144
|
+
allowClear={false}
|
|
145
|
+
size="sm"
|
|
146
|
+
variant="filled"
|
|
147
|
+
/>
|
|
148
|
+
</FormField>
|
|
149
|
+
<FormField id="invalid-time" label="入力を保持">
|
|
150
|
+
<TimePicker id="invalid-time" preserveInvalidOnBlur status="error" size="lg" />
|
|
151
|
+
</FormField>
|
|
152
|
+
<FormField id="quiet-time" label="任意時刻">
|
|
153
|
+
<TimePicker
|
|
154
|
+
id="quiet-time"
|
|
155
|
+
variant="borderless"
|
|
156
|
+
status="warning"
|
|
157
|
+
placement="top-start"
|
|
158
|
+
showNow={false}
|
|
159
|
+
/>
|
|
160
|
+
</FormField>
|
|
161
|
+
</Flex>
|
|
162
|
+
</CardContent>
|
|
163
|
+
</Card>
|
|
164
|
+
<Card>
|
|
165
|
+
<CardHeader>
|
|
166
|
+
<CardTitle level={2}>勤務時間帯</CardTitle>
|
|
167
|
+
</CardHeader>
|
|
168
|
+
<CardContent>
|
|
169
|
+
<FormField id="shift-range" label="勤務時間">
|
|
170
|
+
<TimeRangePicker
|
|
171
|
+
id="shift-range"
|
|
172
|
+
name="shift"
|
|
173
|
+
defaultValue={["09:00", "18:00"]}
|
|
174
|
+
allowEmpty={[false, true]}
|
|
175
|
+
minuteStep={15}
|
|
176
|
+
/>
|
|
177
|
+
</FormField>
|
|
178
|
+
</CardContent>
|
|
179
|
+
</Card>
|
|
96
180
|
</Flex>
|
|
97
181
|
</PageContainer>
|
|
98
182
|
);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { TimeRangePicker, FormField } from "@godxjp/ui/data-entry";
|
|
2
|
+
import { Card, CardContent, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
3
|
+
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
4
|
+
|
|
5
|
+
export default function Demo() {
|
|
6
|
+
return (
|
|
7
|
+
<PageContainer title="TimeRangePicker" subtitle="勤務時間と受付時間の範囲選択">
|
|
8
|
+
<Flex direction="col" gap="lg">
|
|
9
|
+
<Card>
|
|
10
|
+
<CardHeader>
|
|
11
|
+
<CardTitle level={2}>勤務時間</CardTitle>
|
|
12
|
+
</CardHeader>
|
|
13
|
+
<CardContent>
|
|
14
|
+
<FormField id="work-period" label="勤務時間">
|
|
15
|
+
<TimeRangePicker
|
|
16
|
+
id="work-period"
|
|
17
|
+
name="work"
|
|
18
|
+
defaultValue={["09:00", "18:00"]}
|
|
19
|
+
minuteStep={15}
|
|
20
|
+
allowEmpty={[false, false]}
|
|
21
|
+
/>
|
|
22
|
+
</FormField>
|
|
23
|
+
</CardContent>
|
|
24
|
+
</Card>
|
|
25
|
+
<Card>
|
|
26
|
+
<CardHeader>
|
|
27
|
+
<CardTitle level={2}>終了時刻は任意</CardTitle>
|
|
28
|
+
</CardHeader>
|
|
29
|
+
<CardContent>
|
|
30
|
+
<FormField id="optional-end" label="受付時間">
|
|
31
|
+
<TimeRangePicker
|
|
32
|
+
id="optional-end"
|
|
33
|
+
name="reception"
|
|
34
|
+
defaultValue={["09:00", ""]}
|
|
35
|
+
allowEmpty={[false, true]}
|
|
36
|
+
format="HH:mm:ss"
|
|
37
|
+
showSeconds
|
|
38
|
+
/>
|
|
39
|
+
</FormField>
|
|
40
|
+
</CardContent>
|
|
41
|
+
</Card>
|
|
42
|
+
<Card>
|
|
43
|
+
<CardHeader>
|
|
44
|
+
<CardTitle level={2}>日をまたぐ勤務</CardTitle>
|
|
45
|
+
</CardHeader>
|
|
46
|
+
<CardContent>
|
|
47
|
+
<FormField id="overnight" label="夜勤">
|
|
48
|
+
<TimeRangePicker id="overnight" defaultValue={["22:00", "06:00"]} order={false} />
|
|
49
|
+
</FormField>
|
|
50
|
+
</CardContent>
|
|
51
|
+
</Card>
|
|
52
|
+
</Flex>
|
|
53
|
+
</PageContainer>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -91,6 +91,23 @@ export default function Demo() {
|
|
|
91
91
|
/>
|
|
92
92
|
</CardContent>
|
|
93
93
|
</Card>
|
|
94
|
+
<Card>
|
|
95
|
+
<CardHeader>
|
|
96
|
+
<CardTitle level={2}>検索・ページ分割・初期値</CardTitle>
|
|
97
|
+
<CardDescription>
|
|
98
|
+
表示中の有効な行だけを一括選択。移動後も別ページの選択を保持します。
|
|
99
|
+
</CardDescription>
|
|
100
|
+
</CardHeader>
|
|
101
|
+
<CardContent>
|
|
102
|
+
<Transfer
|
|
103
|
+
dataSource={ALL_ACCOUNTS}
|
|
104
|
+
defaultValue={[]}
|
|
105
|
+
showSearch
|
|
106
|
+
pagination={{ pageSize: 3 }}
|
|
107
|
+
name="accounts[]"
|
|
108
|
+
/>
|
|
109
|
+
</CardContent>
|
|
110
|
+
</Card>
|
|
94
111
|
</Flex>
|
|
95
112
|
</PageContainer>
|
|
96
113
|
);
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
|
|
3
3
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
Form,
|
|
6
|
+
Upload,
|
|
7
|
+
type UploadFileItem,
|
|
8
|
+
type UploadRequestContext,
|
|
9
|
+
} from "@godxjp/ui/data-entry";
|
|
10
|
+
import { Button, Text } from "@godxjp/ui/general";
|
|
5
11
|
import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
6
12
|
|
|
7
13
|
/**
|
|
@@ -11,12 +17,19 @@ import { Flex, PageContainer } from "@godxjp/ui/layout";
|
|
|
11
17
|
* Composed only from real @godxjp/ui components.
|
|
12
18
|
*/
|
|
13
19
|
|
|
14
|
-
/**
|
|
15
|
-
async function
|
|
16
|
-
|
|
20
|
+
/** Simulated transport: progress, abort, and retry remain observable in the preview. */
|
|
21
|
+
async function demoUpload(file: File, _item: UploadFileItem, context: UploadRequestContext) {
|
|
22
|
+
for (let percent = 0; percent <= 100; percent += 20) {
|
|
23
|
+
await new Promise((resolve) => setTimeout(resolve, 180));
|
|
24
|
+
context.signal.throwIfAborted();
|
|
25
|
+
context.onProgress(percent);
|
|
26
|
+
}
|
|
27
|
+
if (file.name.startsWith("fail")) throw new Error("アップロードに失敗しました。再試行できます。");
|
|
28
|
+
return { mediaId: crypto.randomUUID() };
|
|
17
29
|
}
|
|
18
30
|
|
|
19
31
|
export default function Demo() {
|
|
32
|
+
const [submittedFiles, setSubmittedFiles] = useState<string[]>([]);
|
|
20
33
|
const [dropzoneItems, setDropzoneItems] = useState<UploadFileItem[]>([]);
|
|
21
34
|
const [buttonItems, setButtonItems] = useState<UploadFileItem[]>([]);
|
|
22
35
|
const [pictureCardItems, setPictureCardItems] = useState<UploadFileItem[]>([]);
|
|
@@ -40,6 +53,37 @@ export default function Demo() {
|
|
|
40
53
|
subtitle="ファイルアップロード · 6バリアント(dropzone / button / picture-card / picture / avatar / avatar-crop)"
|
|
41
54
|
>
|
|
42
55
|
<Flex direction="col" gap="lg">
|
|
56
|
+
<Card>
|
|
57
|
+
<CardHeader>
|
|
58
|
+
<CardTitle level={2}>Multipart form</CardTitle>
|
|
59
|
+
<CardDescription>
|
|
60
|
+
選択・ドロップ・貼り付けしたファイルをフォームでまとめて送信します。
|
|
61
|
+
</CardDescription>
|
|
62
|
+
</CardHeader>
|
|
63
|
+
<CardContent>
|
|
64
|
+
<Form
|
|
65
|
+
onReset={() => setSubmittedFiles([])}
|
|
66
|
+
onSubmit={(event) => {
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
const data = new FormData(event.currentTarget);
|
|
69
|
+
setSubmittedFiles(
|
|
70
|
+
data
|
|
71
|
+
.getAll("attachments[]")
|
|
72
|
+
.filter((value): value is File => value instanceof File)
|
|
73
|
+
.map((value) => value.name),
|
|
74
|
+
);
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
<Upload name="attachments[]" pastable maxCount={3} />
|
|
78
|
+
<Button type="submit">添付ファイルを確認</Button>
|
|
79
|
+
<Button type="reset" variant="outline">
|
|
80
|
+
リセット
|
|
81
|
+
</Button>
|
|
82
|
+
<Text>{submittedFiles.join("、")}</Text>
|
|
83
|
+
</Form>
|
|
84
|
+
</CardContent>
|
|
85
|
+
</Card>
|
|
86
|
+
|
|
43
87
|
<Card>
|
|
44
88
|
<CardHeader>
|
|
45
89
|
<CardTitle level={2}>Dropzone</CardTitle>
|
|
@@ -53,9 +97,10 @@ export default function Demo() {
|
|
|
53
97
|
value={dropzoneItems}
|
|
54
98
|
onValueChange={setDropzoneItems}
|
|
55
99
|
accept=".pdf,.xlsx,.csv"
|
|
100
|
+
pastable
|
|
56
101
|
maxCount={5}
|
|
57
102
|
maxSizeBytes={20 * 1024 * 1024}
|
|
58
|
-
onUpload={
|
|
103
|
+
onUpload={demoUpload}
|
|
59
104
|
/>
|
|
60
105
|
</CardContent>
|
|
61
106
|
</Card>
|
|
@@ -64,8 +109,7 @@ export default function Demo() {
|
|
|
64
109
|
<CardHeader>
|
|
65
110
|
<CardTitle level={2}>Error and recovery</CardTitle>
|
|
66
111
|
<CardDescription>
|
|
67
|
-
|
|
68
|
-
不正なファイルを削除して修正済みファイルを再選択する。
|
|
112
|
+
失敗したファイルは再試行できます。処理中のファイルはキャンセルできます。
|
|
69
113
|
</CardDescription>
|
|
70
114
|
</CardHeader>
|
|
71
115
|
<CardContent>
|
|
@@ -98,7 +142,7 @@ export default function Demo() {
|
|
|
98
142
|
value={buttonItems}
|
|
99
143
|
onValueChange={setButtonItems}
|
|
100
144
|
accept=".csv"
|
|
101
|
-
onUpload={
|
|
145
|
+
onUpload={demoUpload}
|
|
102
146
|
>
|
|
103
147
|
CSVをインポート
|
|
104
148
|
</Upload>
|
|
@@ -119,7 +163,7 @@ export default function Demo() {
|
|
|
119
163
|
onValueChange={setPictureCardItems}
|
|
120
164
|
accept="image/*"
|
|
121
165
|
maxCount={6}
|
|
122
|
-
onUpload={
|
|
166
|
+
onUpload={demoUpload}
|
|
123
167
|
/>
|
|
124
168
|
</CardContent>
|
|
125
169
|
</Card>
|
|
@@ -138,7 +182,7 @@ export default function Demo() {
|
|
|
138
182
|
onValueChange={setPictureItem}
|
|
139
183
|
accept="image/*"
|
|
140
184
|
maxCount={1}
|
|
141
|
-
onUpload={
|
|
185
|
+
onUpload={demoUpload}
|
|
142
186
|
/>
|
|
143
187
|
</CardContent>
|
|
144
188
|
</Card>
|
|
@@ -154,7 +198,7 @@ export default function Demo() {
|
|
|
154
198
|
value={avatarItem}
|
|
155
199
|
onValueChange={setAvatarItem}
|
|
156
200
|
accept="image/*"
|
|
157
|
-
onUpload={
|
|
201
|
+
onUpload={demoUpload}
|
|
158
202
|
/>
|
|
159
203
|
</CardContent>
|
|
160
204
|
</Card>
|
|
@@ -174,7 +218,7 @@ export default function Demo() {
|
|
|
174
218
|
onValueChange={setAvatarCropItem}
|
|
175
219
|
accept="image/*"
|
|
176
220
|
maxSizeBytes={5 * 1024 * 1024}
|
|
177
|
-
onUpload={
|
|
221
|
+
onUpload={demoUpload}
|
|
178
222
|
/>
|
|
179
223
|
</CardContent>
|
|
180
224
|
</Card>
|