@godxjp/ui 30.8.0 → 31.0.2

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 (56) hide show
  1. package/README.md +25 -2
  2. package/agent/START-HERE.md +1 -1
  3. package/agent/components/PrefetchLink.json +3 -3
  4. package/agent/components-index.json +1 -1
  5. package/agent/components.json +3 -3
  6. package/agent/index.json +2 -2
  7. package/agent/llms.txt +3 -3
  8. package/agent/patterns/settings-page-responsive.json +1 -1
  9. package/agent/patterns.json +1 -1
  10. package/dist/components/query/index.d.ts +0 -2
  11. package/dist/components/query/index.js +0 -2
  12. package/dist/components/react-router/index.d.ts +2 -0
  13. package/dist/components/react-router/index.js +4 -0
  14. package/dist/contracts/measurement.json +1 -1
  15. package/dist/styles/alert-layout.css +4 -2
  16. package/dist/styles/layers.json +1182 -0
  17. package/dist/styles/vendor-day-picker.css +2 -0
  18. package/dist/styles/vendor-sonner.css +2 -0
  19. package/docs/CONSUMER-RULES.md +1 -1
  20. package/docs/data-display/permission-matrix.tsx +30 -28
  21. package/docs/data-entry/cascader.tsx +22 -20
  22. package/docs/data-entry/date-picker.tsx +47 -43
  23. package/docs/data-entry/form-field/examples/a11y-contract.tsx +80 -76
  24. package/docs/data-entry/form-field/examples/create-form.tsx +33 -31
  25. package/docs/data-entry/form-field/index.tsx +61 -57
  26. package/docs/data-entry/form.tsx +112 -106
  27. package/docs/data-entry/input.tsx +297 -270
  28. package/docs/data-entry/label.tsx +11 -9
  29. package/docs/data-entry/number-input.tsx +86 -78
  30. package/docs/data-entry/radio-group.tsx +33 -26
  31. package/docs/data-entry/rating.tsx +29 -25
  32. package/docs/data-entry/select-matrix.tsx +49 -47
  33. package/docs/data-entry/select.tsx +38 -35
  34. package/docs/data-entry/slider.tsx +45 -41
  35. package/docs/data-entry/textarea.tsx +44 -42
  36. package/docs/data-entry/time-picker.tsx +51 -47
  37. package/docs/feedback/sheet.tsx +84 -79
  38. package/docs/foundation/theme-editor.tsx +133 -124
  39. package/docs/general/button/examples/form-actions.tsx +17 -15
  40. package/docs/layout/auth-recovery/examples/password-recovery.tsx +31 -29
  41. package/docs/layout/auth-shell-registration.tsx +75 -72
  42. package/docs/layout/auth-shell-variants.tsx +55 -51
  43. package/docs/layout/space-compact.tsx +11 -8
  44. package/docs/{query → react-router}/prefetch-link.tsx +1 -1
  45. package/docs/showcase/caimono-price-comparison.tsx +59 -51
  46. package/docs/showcase/case3-approval-workflow.tsx +27 -25
  47. package/docs/showcase/case4-login.tsx +37 -34
  48. package/docs/showcase/permission-matrix.tsx +44 -42
  49. package/docs/showcase/theme-customization.tsx +108 -99
  50. package/package.json +10 -3
  51. package/scripts/cli.mjs +15 -0
  52. package/scripts/consumer-rule.md +14 -0
  53. package/scripts/prune-css.mjs +221 -0
  54. package/scripts/ui-audit.mjs +99 -2
  55. /package/dist/components/{query → react-router}/prefetch-link.d.ts +0 -0
  56. /package/dist/components/{query → react-router}/prefetch-link.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display";
2
- import { Checkbox, FormField, Input, Label, Switch, Textarea } from "@godxjp/ui/data-entry";
2
+ import { Form, Checkbox, FormField, Input, Label, Switch, Textarea } from "@godxjp/ui/data-entry";
3
3
  import { Flex, PageContainer } from "@godxjp/ui/layout";
4
4
 
5
5
  /**
@@ -84,14 +84,16 @@ export default function Demo() {
84
84
  </CardDescription>
85
85
  </CardHeader>
86
86
  <CardContent>
87
- <Flex direction="col" gap="md">
88
- <FormField id="invoice-no" label="請求書番号" required helper="例: INV-2024-001">
89
- <Input id="invoice-no" placeholder="INV-2024-001" />
90
- </FormField>
91
- <FormField id="note" label="摘要" error="摘要は必須です">
92
- <Input id="note" defaultValue="" />
93
- </FormField>
94
- </Flex>
87
+ <Form>
88
+ <Flex direction="col" gap="md">
89
+ <FormField id="invoice-no" label="請求書番号" required helper="例: INV-2024-001">
90
+ <Input id="invoice-no" placeholder="INV-2024-001" />
91
+ </FormField>
92
+ <FormField id="note" label="摘要" error="摘要は必須です">
93
+ <Input id="note" defaultValue="" />
94
+ </FormField>
95
+ </Flex>
96
+ </Form>
95
97
  </CardContent>
96
98
  </Card>
97
99
  </Flex>
@@ -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, NumberInput } from "@godxjp/ui/data-entry";
4
+ import { Form, FormField, NumberInput } from "@godxjp/ui/data-entry";
5
5
  import { Flex, PageContainer } from "@godxjp/ui/layout";
6
6
  import { Heading, Text } from "@godxjp/ui/general";
7
7
 
@@ -117,32 +117,34 @@ export default function Demo() {
117
117
  </CardDescription>
118
118
  </CardHeader>
119
119
  <CardContent>
120
- <Flex direction="row" gap="md" wrap>
121
- <FormField id="ni-price" label="価格">
122
- <NumberInput
123
- id="ni-price"
124
- name="price"
125
- value={price}
126
- onValueChange={setPrice}
127
- prefix="¥"
128
- step={10}
129
- min={0}
130
- aria-label="価格"
131
- />
132
- </FormField>
133
- <FormField id="ni-discount" label="割引率">
134
- <NumberInput
135
- id="ni-discount"
136
- name="discount"
137
- value={discount}
138
- onValueChange={setDiscount}
139
- suffix="%"
140
- min={0}
141
- max={100}
142
- aria-label="割引率"
143
- />
144
- </FormField>
145
- </Flex>
120
+ <Form>
121
+ <Flex direction="row" gap="md" wrap>
122
+ <FormField id="ni-price" label="価格">
123
+ <NumberInput
124
+ id="ni-price"
125
+ name="price"
126
+ value={price}
127
+ onValueChange={setPrice}
128
+ prefix="¥"
129
+ step={10}
130
+ min={0}
131
+ aria-label="価格"
132
+ />
133
+ </FormField>
134
+ <FormField id="ni-discount" label="割引率">
135
+ <NumberInput
136
+ id="ni-discount"
137
+ name="discount"
138
+ value={discount}
139
+ onValueChange={setDiscount}
140
+ suffix="%"
141
+ min={0}
142
+ max={100}
143
+ aria-label="割引率"
144
+ />
145
+ </FormField>
146
+ </Flex>
147
+ </Form>
146
148
  </CardContent>
147
149
  </Card>
148
150
 
@@ -175,26 +177,28 @@ export default function Demo() {
175
177
  </CardDescription>
176
178
  </CardHeader>
177
179
  <CardContent>
178
- <Flex direction="row" gap="md" wrap>
179
- <FormField id="ni-disabled" label="確定数量 (disabled)">
180
- <NumberInput
181
- id="ni-disabled"
182
- name="locked_qty"
183
- value={3}
184
- disabled
185
- aria-label="確定数量"
186
- />
187
- </FormField>
188
- <FormField id="ni-readonly" label="参照値 (readOnly)">
189
- <NumberInput
190
- id="ni-readonly"
191
- name="ref_value"
192
- value={128}
193
- readOnly
194
- aria-label="参照値"
195
- />
196
- </FormField>
197
- </Flex>
180
+ <Form>
181
+ <Flex direction="row" gap="md" wrap>
182
+ <FormField id="ni-disabled" label="確定数量 (disabled)">
183
+ <NumberInput
184
+ id="ni-disabled"
185
+ name="locked_qty"
186
+ value={3}
187
+ disabled
188
+ aria-label="確定数量"
189
+ />
190
+ </FormField>
191
+ <FormField id="ni-readonly" label="参照値 (readOnly)">
192
+ <NumberInput
193
+ id="ni-readonly"
194
+ name="ref_value"
195
+ value={128}
196
+ readOnly
197
+ aria-label="参照値"
198
+ />
199
+ </FormField>
200
+ </Flex>
201
+ </Form>
198
202
  </CardContent>
199
203
  </Card>
200
204
 
@@ -206,20 +210,22 @@ export default function Demo() {
206
210
  </CardDescription>
207
211
  </CardHeader>
208
212
  <CardContent>
209
- <Flex direction="col" gap="md">
210
- <FormField id="ni-xs" label="xs">
211
- <NumberInput id="ni-xs" size="xs" defaultValue={1} aria-label="xs サイズ" />
212
- </FormField>
213
- <FormField id="ni-sm" label="sm">
214
- <NumberInput id="ni-sm" size="sm" defaultValue={2} aria-label="sm サイズ" />
215
- </FormField>
216
- <FormField id="ni-md" label="md (既定)">
217
- <NumberInput id="ni-md" size="md" defaultValue={3} aria-label="md サイズ" />
218
- </FormField>
219
- <FormField id="ni-lg" label="lg">
220
- <NumberInput id="ni-lg" size="lg" defaultValue={4} aria-label="lg サイズ" />
221
- </FormField>
222
- </Flex>
213
+ <Form>
214
+ <Flex direction="col" gap="md">
215
+ <FormField id="ni-xs" label="xs">
216
+ <NumberInput id="ni-xs" size="xs" defaultValue={1} aria-label="xs サイズ" />
217
+ </FormField>
218
+ <FormField id="ni-sm" label="sm">
219
+ <NumberInput id="ni-sm" size="sm" defaultValue={2} aria-label="sm サイズ" />
220
+ </FormField>
221
+ <FormField id="ni-md" label="md (既定)">
222
+ <NumberInput id="ni-md" size="md" defaultValue={3} aria-label="md サイズ" />
223
+ </FormField>
224
+ <FormField id="ni-lg" label="lg">
225
+ <NumberInput id="ni-lg" size="lg" defaultValue={4} aria-label="lg サイズ" />
226
+ </FormField>
227
+ </Flex>
228
+ </Form>
223
229
  </CardContent>
224
230
  </Card>
225
231
 
@@ -234,23 +240,25 @@ export default function Demo() {
234
240
  </CardDescription>
235
241
  </CardHeader>
236
242
  <CardContent>
237
- <Flex direction="col" gap="md" id="number-input-affixes">
238
- <FormField id="ni-prefix" label="金額(前置き)">
239
- <NumberInput id="ni-prefix" prefix="¥" defaultValue={1980} aria-label="金額" />
240
- </FormField>
241
- <FormField id="ni-suffix" label="日数(後置き)">
242
- <NumberInput id="ni-suffix" suffix="日" defaultValue={7} aria-label="日数" />
243
- </FormField>
244
- <FormField id="ni-both" label="率(前後)">
245
- <NumberInput
246
- id="ni-both"
247
- prefix="+"
248
- suffix="%"
249
- defaultValue={12}
250
- aria-label="率"
251
- />
252
- </FormField>
253
- </Flex>
243
+ <Form>
244
+ <Flex direction="col" gap="md" id="number-input-affixes">
245
+ <FormField id="ni-prefix" label="金額(前置き)">
246
+ <NumberInput id="ni-prefix" prefix="¥" defaultValue={1980} aria-label="金額" />
247
+ </FormField>
248
+ <FormField id="ni-suffix" label="日数(後置き)">
249
+ <NumberInput id="ni-suffix" suffix="日" defaultValue={7} aria-label="日数" />
250
+ </FormField>
251
+ <FormField id="ni-both" label="率(前後)">
252
+ <NumberInput
253
+ id="ni-both"
254
+ prefix="+"
255
+ suffix="%"
256
+ defaultValue={12}
257
+ aria-label="率"
258
+ />
259
+ </FormField>
260
+ </Flex>
261
+ </Form>
254
262
  </CardContent>
255
263
  </Card>
256
264
 
@@ -8,7 +8,7 @@ import {
8
8
  CardHeader,
9
9
  CardTitle,
10
10
  } from "@godxjp/ui/data-display";
11
- import { Field, FormField, RadioGroup, RadioItem } from "@godxjp/ui/data-entry";
11
+ import { Form, Field, FormField, RadioGroup, RadioItem } from "@godxjp/ui/data-entry";
12
12
  import { Flex, PageContainer } from "@godxjp/ui/layout";
13
13
 
14
14
  /** 配送時間帯 · 選択肢が2〜4個を超えたときの見え方を確かめるための実データ。 */
@@ -218,33 +218,40 @@ export default function Demo() {
218
218
  </CardDescription>
219
219
  </CardHeader>
220
220
  <CardContent>
221
- <Flex direction="col" gap="md">
222
- <FormField id="closing-day" label="締め日" required error="締め日を選択してください">
223
- <RadioGroup
221
+ <Form>
222
+ <Flex direction="col" gap="md">
223
+ <FormField
224
224
  id="closing-day"
225
- name="closing_day"
226
- orientation="horizontal"
227
- options={CLOSING_DAYS.map((day) => ({ value: day, label: day }))}
228
- />
229
- </FormField>
230
- <FormField
231
- id="tax-rounding"
232
- label="消費税の端数処理"
233
- helper="取引先との契約に合わせて選びます"
234
- >
235
- <RadioGroup
225
+ label="締め日"
226
+ required
227
+ error="締め日を選択してください"
228
+ >
229
+ <RadioGroup
230
+ id="closing-day"
231
+ name="closing_day"
232
+ orientation="horizontal"
233
+ options={CLOSING_DAYS.map((day) => ({ value: day, label: day }))}
234
+ />
235
+ </FormField>
236
+ <FormField
236
237
  id="tax-rounding"
237
- name="tax_rounding"
238
- defaultValue="floor"
239
- orientation="horizontal"
240
- options={[
241
- { value: "round", label: "四捨五入" },
242
- { value: "floor", label: "切り捨て" },
243
- { value: "ceil", label: "切り上げ" },
244
- ]}
245
- />
246
- </FormField>
247
- </Flex>
238
+ label="消費税の端数処理"
239
+ helper="取引先との契約に合わせて選びます"
240
+ >
241
+ <RadioGroup
242
+ id="tax-rounding"
243
+ name="tax_rounding"
244
+ defaultValue="floor"
245
+ orientation="horizontal"
246
+ options={[
247
+ { value: "round", label: "四捨五入" },
248
+ { value: "floor", label: "切り捨て" },
249
+ { value: "ceil", label: "切り上げ" },
250
+ ]}
251
+ />
252
+ </FormField>
253
+ </Flex>
254
+ </Form>
248
255
  </CardContent>
249
256
  </Card>
250
257
 
@@ -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, Rating } from "@godxjp/ui/data-entry";
4
+ import { Form, FormField, Rating } from "@godxjp/ui/data-entry";
5
5
  import { Flex, PageContainer } from "@godxjp/ui/layout";
6
6
 
7
7
  /**
@@ -29,19 +29,21 @@ export default function Demo() {
29
29
  </CardDescription>
30
30
  </CardHeader>
31
31
  <CardContent>
32
- <Flex direction="col" gap="md">
33
- <FormField id="vendor-rating" label="取引先評価">
34
- <Rating name="vendor_rating" value={vendorScore} onValueChange={setVendorScore} />
35
- </FormField>
36
- <FormField id="quality-rating" label="品質スコア">
37
- <Rating
38
- name="quality_score"
39
- value={qualityScore}
40
- onValueChange={setQualityScore}
41
- max={5}
42
- />
43
- </FormField>
44
- </Flex>
32
+ <Form>
33
+ <Flex direction="col" gap="md">
34
+ <FormField id="vendor-rating" label="取引先評価">
35
+ <Rating name="vendor_rating" value={vendorScore} onValueChange={setVendorScore} />
36
+ </FormField>
37
+ <FormField id="quality-rating" label="品質スコア">
38
+ <Rating
39
+ name="quality_score"
40
+ value={qualityScore}
41
+ onValueChange={setQualityScore}
42
+ max={5}
43
+ />
44
+ </FormField>
45
+ </Flex>
46
+ </Form>
45
47
  </CardContent>
46
48
  </Card>
47
49
 
@@ -54,17 +56,19 @@ export default function Demo() {
54
56
  </CardDescription>
55
57
  </CardHeader>
56
58
  <CardContent>
57
- <Flex direction="col" gap="md">
58
- <FormField id="avg-payment" label="支払い信頼性 (平均)">
59
- <Rating value={4} readOnly />
60
- </FormField>
61
- <FormField id="avg-response" label="対応速度 (平均)">
62
- <Rating value={3} readOnly />
63
- </FormField>
64
- <FormField id="avg-accuracy" label="請求正確性 (平均)">
65
- <Rating value={5} readOnly />
66
- </FormField>
67
- </Flex>
59
+ <Form>
60
+ <Flex direction="col" gap="md">
61
+ <FormField id="avg-payment" label="支払い信頼性 (平均)">
62
+ <Rating value={4} readOnly />
63
+ </FormField>
64
+ <FormField id="avg-response" label="対応速度 (平均)">
65
+ <Rating value={3} readOnly />
66
+ </FormField>
67
+ <FormField id="avg-accuracy" label="請求正確性 (平均)">
68
+ <Rating value={5} readOnly />
69
+ </FormField>
70
+ </Flex>
71
+ </Form>
68
72
  </CardContent>
69
73
  </Card>
70
74
 
@@ -40,55 +40,57 @@ export default function Demo() {
40
40
  {/* data-axe-open on the region: the gate presses the first `[role="combobox"]` inside it,
41
41
  which is the compound SelectTrigger. */}
42
42
  <CardContent data-axe-open>
43
- <Flex direction="col" gap="md">
44
- <FormField
45
- id="compound-controlled"
46
- label="Controlled priority"
47
- helper="Arrow keys move between enabled options"
48
- >
49
- <Select value={controlled} onValueChange={setControlled}>
50
- <SelectTrigger id="compound-controlled" size="sm">
51
- <SelectValue placeholder="選択" />
52
- </SelectTrigger>
53
- <SelectContent collisionPadding={16}>
54
- <SelectGroup>
55
- <SelectLabel>日本</SelectLabel>
43
+ <Form>
44
+ <Flex direction="col" gap="md">
45
+ <FormField
46
+ id="compound-controlled"
47
+ label="Controlled priority"
48
+ helper="Arrow keys move between enabled options"
49
+ >
50
+ <Select value={controlled} onValueChange={setControlled}>
51
+ <SelectTrigger id="compound-controlled" size="sm">
52
+ <SelectValue placeholder="選択" />
53
+ </SelectTrigger>
54
+ <SelectContent collisionPadding={16}>
55
+ <SelectGroup>
56
+ <SelectLabel>日本</SelectLabel>
57
+ <SelectItem value="tokyo">東京</SelectItem>
58
+ <SelectItem value="osaka">大阪</SelectItem>
59
+ </SelectGroup>
60
+ <SelectSeparator />
61
+ <SelectGroup>
62
+ <SelectLabel>Việt Nam</SelectLabel>
63
+ <SelectItem value="hcm">Thành phố Hồ Chí Minh</SelectItem>
64
+ <SelectItem value="danang" disabled>
65
+ Đà Nẵng(利用不可)
66
+ </SelectItem>
67
+ </SelectGroup>
68
+ </SelectContent>
69
+ </Select>
70
+ </FormField>
71
+ <FormField id="compound-uncontrolled" label="Uncontrolled default">
72
+ <Select defaultValue="osaka">
73
+ <SelectTrigger id="compound-uncontrolled" size="md">
74
+ <SelectValue />
75
+ </SelectTrigger>
76
+ <SelectContent position="popper" sideOffset={8} collisionPadding={24}>
56
77
  <SelectItem value="tokyo">東京</SelectItem>
57
78
  <SelectItem value="osaka">大阪</SelectItem>
58
- </SelectGroup>
59
- <SelectSeparator />
60
- <SelectGroup>
61
- <SelectLabel>Việt Nam</SelectLabel>
62
- <SelectItem value="hcm">Thành phố Hồ Chí Minh</SelectItem>
63
- <SelectItem value="danang" disabled>
64
- Đà Nẵng(利用不可)
65
- </SelectItem>
66
- </SelectGroup>
67
- </SelectContent>
68
- </Select>
69
- </FormField>
70
- <FormField id="compound-uncontrolled" label="Uncontrolled default">
71
- <Select defaultValue="osaka">
72
- <SelectTrigger id="compound-uncontrolled" size="md">
73
- <SelectValue />
74
- </SelectTrigger>
75
- <SelectContent position="popper" sideOffset={8} collisionPadding={24}>
76
- <SelectItem value="tokyo">東京</SelectItem>
77
- <SelectItem value="osaka">大阪</SelectItem>
78
- </SelectContent>
79
- </Select>
80
- </FormField>
81
- <FormField id="compound-disabled" label="Disabled control">
82
- <Select defaultValue="tokyo" disabled>
83
- <SelectTrigger id="compound-disabled">
84
- <SelectValue />
85
- </SelectTrigger>
86
- <SelectContent>
87
- <SelectItem value="tokyo">東京</SelectItem>
88
- </SelectContent>
89
- </Select>
90
- </FormField>
91
- </Flex>
79
+ </SelectContent>
80
+ </Select>
81
+ </FormField>
82
+ <FormField id="compound-disabled" label="Disabled control">
83
+ <Select defaultValue="tokyo" disabled>
84
+ <SelectTrigger id="compound-disabled">
85
+ <SelectValue />
86
+ </SelectTrigger>
87
+ <SelectContent>
88
+ <SelectItem value="tokyo">東京</SelectItem>
89
+ </SelectContent>
90
+ </Select>
91
+ </FormField>
92
+ </Flex>
93
+ </Form>
92
94
  </CardContent>
93
95
  </Card>
94
96
 
@@ -11,6 +11,7 @@ import {
11
11
  CardTitle,
12
12
  } from "@godxjp/ui/data-display";
13
13
  import {
14
+ Form,
14
15
  FormField,
15
16
  Select,
16
17
  SelectContent,
@@ -334,44 +335,46 @@ export default function Demo() {
334
335
  </CardDescription>
335
336
  </CardHeader>
336
337
  <CardContent>
337
- <Flex direction="col" gap="md">
338
- <FormField id="priority-md" label="優先度 (size=md)">
339
- <Select value={priorityMd} onValueChange={setPriorityMd}>
340
- <SelectTrigger size="md" id="priority-md" aria-labelledby="priority-md-label">
341
- <SelectValue placeholder="優先度" />
342
- </SelectTrigger>
343
- <SelectContent>
344
- <SelectItem value="high">高</SelectItem>
345
- <SelectItem value="medium">中</SelectItem>
346
- <SelectItem value="low">低</SelectItem>
347
- </SelectContent>
348
- </Select>
349
- </FormField>
350
- <FormField id="priority" label="優先度 (size=sm)">
351
- <Select value={priority} onValueChange={setPriority}>
352
- <SelectTrigger size="sm" id="priority" aria-labelledby="priority-label">
353
- <SelectValue placeholder="優先度" />
354
- </SelectTrigger>
355
- <SelectContent>
356
- <SelectGroup>
357
- <SelectLabel>標準</SelectLabel>
338
+ <Form>
339
+ <Flex direction="col" gap="md">
340
+ <FormField id="priority-md" label="優先度 (size=md)">
341
+ <Select value={priorityMd} onValueChange={setPriorityMd}>
342
+ <SelectTrigger size="md" id="priority-md" aria-labelledby="priority-md-label">
343
+ <SelectValue placeholder="優先度" />
344
+ </SelectTrigger>
345
+ <SelectContent>
358
346
  <SelectItem value="high">高</SelectItem>
359
347
  <SelectItem value="medium">中</SelectItem>
360
348
  <SelectItem value="low">低</SelectItem>
361
- </SelectGroup>
362
- <SelectSeparator />
363
- <SelectGroup>
364
- <SelectLabel>追加レベル</SelectLabel>
365
- {Array.from({ length: 24 }, (_, index) => (
366
- <SelectItem key={index} value={`level-${index + 1}`}>
367
- レベル {index + 1}
368
- </SelectItem>
369
- ))}
370
- </SelectGroup>
371
- </SelectContent>
372
- </Select>
373
- </FormField>
374
- </Flex>
349
+ </SelectContent>
350
+ </Select>
351
+ </FormField>
352
+ <FormField id="priority" label="優先度 (size=sm)">
353
+ <Select value={priority} onValueChange={setPriority}>
354
+ <SelectTrigger size="sm" id="priority" aria-labelledby="priority-label">
355
+ <SelectValue placeholder="優先度" />
356
+ </SelectTrigger>
357
+ <SelectContent>
358
+ <SelectGroup>
359
+ <SelectLabel>標準</SelectLabel>
360
+ <SelectItem value="high">高</SelectItem>
361
+ <SelectItem value="medium">中</SelectItem>
362
+ <SelectItem value="low">低</SelectItem>
363
+ </SelectGroup>
364
+ <SelectSeparator />
365
+ <SelectGroup>
366
+ <SelectLabel>追加レベル</SelectLabel>
367
+ {Array.from({ length: 24 }, (_, index) => (
368
+ <SelectItem key={index} value={`level-${index + 1}`}>
369
+ レベル {index + 1}
370
+ </SelectItem>
371
+ ))}
372
+ </SelectGroup>
373
+ </SelectContent>
374
+ </Select>
375
+ </FormField>
376
+ </Flex>
377
+ </Form>
375
378
  </CardContent>
376
379
  </Card>
377
380
  <Card>