@godxjp/ui 23.3.0 → 23.4.1
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/dist/components/data-display/card.d.ts +87 -1
- package/dist/components/data-display/card.js +88 -15
- package/dist/components/data-display/index.d.ts +5 -1
- package/dist/components/data-display/index.js +5 -0
- package/dist/components/data-display/thought-chain.d.ts +42 -0
- package/dist/components/data-display/thought-chain.js +177 -0
- package/dist/components/data-display/welcome.d.ts +26 -0
- package/dist/components/data-display/welcome.js +37 -0
- package/dist/components/data-entry/attachments.d.ts +19 -0
- package/dist/components/data-entry/attachments.js +322 -0
- package/dist/components/data-entry/index.d.ts +2 -0
- package/dist/components/data-entry/index.js +2 -0
- package/dist/components/feedback/dialog.d.ts +10 -7
- package/dist/components/feedback/dialog.js +40 -17
- package/dist/components/feedback/index.d.ts +1 -1
- package/dist/components/general/actions.d.ts +59 -0
- package/dist/components/general/actions.js +253 -0
- package/dist/components/general/activity.js +1 -0
- package/dist/components/general/float-button.d.ts +41 -0
- package/dist/components/general/float-button.js +336 -0
- package/dist/components/general/index.d.ts +6 -2
- package/dist/components/general/index.js +12 -1
- package/dist/components/general/typography.d.ts +79 -4
- package/dist/components/general/typography.js +598 -54
- package/dist/components/layout/draggable-panel.d.ts +18 -0
- package/dist/components/layout/draggable-panel.js +189 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +2 -0
- package/dist/components/navigation/conversations.d.ts +39 -0
- package/dist/components/navigation/conversations.js +371 -0
- package/dist/components/navigation/index.d.ts +2 -0
- package/dist/components/navigation/index.js +2 -0
- package/dist/components/ui/card.js +1 -0
- package/dist/i18n/messages/en.json +53 -0
- package/dist/i18n/messages/ja.json +53 -0
- package/dist/i18n/messages/vi.json +53 -0
- package/dist/props/components/data-display.prop.d.ts +143 -1
- package/dist/props/components/data-entry.prop.d.ts +76 -0
- package/dist/props/components/feedback.prop.d.ts +34 -1
- package/dist/props/components/general.prop.d.ts +440 -3
- package/dist/props/components/index.d.ts +2 -2
- package/dist/props/components/layout.prop.d.ts +63 -1
- package/dist/props/components/navigation.prop.d.ts +150 -0
- package/dist/props/registry.d.ts +426 -0
- package/dist/props/registry.js +546 -0
- package/dist/props/vocabulary/index.d.ts +1 -1
- package/dist/props/vocabulary/interaction.prop.d.ts +113 -0
- package/dist/styles/card-layout.css +30 -0
- package/dist/styles/core.css +1 -0
- package/dist/styles/data-display-layout.css +236 -0
- package/dist/styles/float-button-layout.css +168 -0
- package/dist/styles/index.css +1 -0
- package/dist/styles/layout.css +196 -0
- package/dist/styles/navigation-layout.css +139 -0
- package/dist/styles/text-layout.css +156 -0
- package/dist/tokens/base.css +7 -0
- package/dist/tokens/components/actions.css +14 -0
- package/dist/tokens/components/attachments.css +15 -0
- package/dist/tokens/components/conversations.css +28 -0
- package/dist/tokens/components/draggable-panel.css +25 -0
- package/dist/tokens/components/float-button.css +39 -0
- package/dist/tokens/components/text.css +13 -0
- package/dist/tokens/components/thought-chain.css +31 -0
- package/dist/tokens/components/welcome.css +19 -0
- package/dist/tokens/foundation.css +2 -0
- package/docs/DESIGN-AUTHORITY.md +89 -0
- package/docs/FRAME-COVERAGE-REPORT.md +5 -2
- package/docs/data-display/card/examples/tab-list.tsx +97 -0
- package/docs/data-display/thought-chain.tsx +176 -0
- package/docs/data-display/welcome.tsx +115 -0
- package/docs/data-entry/attachments.tsx +160 -0
- package/docs/feedback/dialog.tsx +50 -0
- package/docs/general/actions.tsx +175 -0
- package/docs/general/float-button.tsx +133 -0
- package/docs/general/typography.tsx +63 -1
- package/docs/layout/draggable-panel.tsx +127 -0
- package/docs/navigation/conversations.tsx +176 -0
- package/docs/roadmap/parity-audit-layout-navigation-general.md +17 -16
- package/package.json +3 -3
- package/scripts/ui-audit.mjs +66 -2
|
@@ -178,6 +178,16 @@
|
|
|
178
178
|
"one": "{count} suggestion",
|
|
179
179
|
"other": "{count} suggestions"
|
|
180
180
|
}
|
|
181
|
+
},
|
|
182
|
+
"attachments": {
|
|
183
|
+
"placeholderTitle": "Upload files",
|
|
184
|
+
"placeholderDescription": "Click or drag files here",
|
|
185
|
+
"dropLabel": "Drop files ({type})",
|
|
186
|
+
"inputLabel": "Choose attachment files",
|
|
187
|
+
"add": "Add attachment",
|
|
188
|
+
"remove": "Remove {name}",
|
|
189
|
+
"uploading": "Uploading attachment",
|
|
190
|
+
"error": "Upload failed"
|
|
181
191
|
}
|
|
182
192
|
},
|
|
183
193
|
"feedback": {
|
|
@@ -263,6 +273,9 @@
|
|
|
263
273
|
"hintMove": "Move",
|
|
264
274
|
"hintSelect": "Select",
|
|
265
275
|
"hintClose": "Close"
|
|
276
|
+
},
|
|
277
|
+
"draggablePanel": {
|
|
278
|
+
"moveLabel": "Move panel. Use the arrow keys to move it, or hold Shift for larger steps."
|
|
266
279
|
}
|
|
267
280
|
},
|
|
268
281
|
"dataDisplay": {
|
|
@@ -317,6 +330,15 @@
|
|
|
317
330
|
"loading": "Loading child nodes…",
|
|
318
331
|
"empty": "Nothing to show",
|
|
319
332
|
"selected": "Selected"
|
|
333
|
+
},
|
|
334
|
+
"thoughtChain": {
|
|
335
|
+
"label": "Reasoning steps",
|
|
336
|
+
"status": {
|
|
337
|
+
"loading": "in progress",
|
|
338
|
+
"success": "done",
|
|
339
|
+
"error": "failed",
|
|
340
|
+
"abort": "stopped"
|
|
341
|
+
}
|
|
320
342
|
}
|
|
321
343
|
},
|
|
322
344
|
"ui": {
|
|
@@ -344,11 +366,22 @@
|
|
|
344
366
|
"download": "Download secret",
|
|
345
367
|
"acknowledge": "I've saved it"
|
|
346
368
|
},
|
|
369
|
+
"floatButton": {
|
|
370
|
+
"backTop": "Back to top",
|
|
371
|
+
"actions": "Actions"
|
|
372
|
+
},
|
|
347
373
|
"numberInput": {
|
|
348
374
|
"increment": "Increase",
|
|
349
375
|
"decrement": "Decrease",
|
|
350
376
|
"incrementField": "Increase {label}",
|
|
351
377
|
"decrementField": "Decrease {label}"
|
|
378
|
+
},
|
|
379
|
+
"typography": {
|
|
380
|
+
"copy": "Copy",
|
|
381
|
+
"copied": "Copied",
|
|
382
|
+
"edit": "Edit",
|
|
383
|
+
"expand": "Expand",
|
|
384
|
+
"collapse": "Collapse"
|
|
352
385
|
}
|
|
353
386
|
},
|
|
354
387
|
"navigation": {
|
|
@@ -437,6 +470,11 @@
|
|
|
437
470
|
},
|
|
438
471
|
"settingToggle": {
|
|
439
472
|
"label": "{setting}: {value}"
|
|
473
|
+
},
|
|
474
|
+
"conversations": {
|
|
475
|
+
"label": "Conversations",
|
|
476
|
+
"creation": "New conversation",
|
|
477
|
+
"rowActions": "More actions for {label}"
|
|
440
478
|
}
|
|
441
479
|
},
|
|
442
480
|
"locale": {
|
|
@@ -591,5 +629,20 @@
|
|
|
591
629
|
"other": "{count} new messages"
|
|
592
630
|
}
|
|
593
631
|
}
|
|
632
|
+
},
|
|
633
|
+
"general": {
|
|
634
|
+
"actions": {
|
|
635
|
+
"label": "Message actions",
|
|
636
|
+
"copy": "Copy",
|
|
637
|
+
"copied": "Copied",
|
|
638
|
+
"feedback": "Was this answer helpful?",
|
|
639
|
+
"like": "Helpful",
|
|
640
|
+
"dislike": "Not helpful",
|
|
641
|
+
"status": {
|
|
642
|
+
"running": "running",
|
|
643
|
+
"loading": "loading",
|
|
644
|
+
"error": "failed"
|
|
645
|
+
}
|
|
646
|
+
}
|
|
594
647
|
}
|
|
595
648
|
}
|
|
@@ -174,6 +174,16 @@
|
|
|
174
174
|
"count": {
|
|
175
175
|
"other": "候補 {count} 件"
|
|
176
176
|
}
|
|
177
|
+
},
|
|
178
|
+
"attachments": {
|
|
179
|
+
"placeholderTitle": "ファイルをアップロード",
|
|
180
|
+
"placeholderDescription": "クリックまたはドラッグしてファイルを追加",
|
|
181
|
+
"dropLabel": "ファイルをドロップ ({type})",
|
|
182
|
+
"inputLabel": "添付ファイルを選択",
|
|
183
|
+
"add": "添付を追加",
|
|
184
|
+
"remove": "{name} を削除",
|
|
185
|
+
"uploading": "添付をアップロード中",
|
|
186
|
+
"error": "アップロードに失敗しました"
|
|
177
187
|
}
|
|
178
188
|
},
|
|
179
189
|
"feedback": {
|
|
@@ -256,6 +266,9 @@
|
|
|
256
266
|
"hintMove": "移動",
|
|
257
267
|
"hintSelect": "選択",
|
|
258
268
|
"hintClose": "閉じる"
|
|
269
|
+
},
|
|
270
|
+
"draggablePanel": {
|
|
271
|
+
"moveLabel": "パネルを移動。矢印キーで移動、Shift キーを押しながらで大きく移動します。"
|
|
259
272
|
}
|
|
260
273
|
},
|
|
261
274
|
"dataDisplay": {
|
|
@@ -310,6 +323,15 @@
|
|
|
310
323
|
"loading": "子ノードを読み込み中…",
|
|
311
324
|
"empty": "表示する項目がありません",
|
|
312
325
|
"selected": "選択中"
|
|
326
|
+
},
|
|
327
|
+
"thoughtChain": {
|
|
328
|
+
"label": "思考の手順",
|
|
329
|
+
"status": {
|
|
330
|
+
"loading": "実行中",
|
|
331
|
+
"success": "完了",
|
|
332
|
+
"error": "失敗",
|
|
333
|
+
"abort": "中断"
|
|
334
|
+
}
|
|
313
335
|
}
|
|
314
336
|
},
|
|
315
337
|
"ui": {
|
|
@@ -337,11 +359,22 @@
|
|
|
337
359
|
"download": "シークレットをダウンロード",
|
|
338
360
|
"acknowledge": "保存しました"
|
|
339
361
|
},
|
|
362
|
+
"floatButton": {
|
|
363
|
+
"backTop": "トップへ戻る",
|
|
364
|
+
"actions": "アクション"
|
|
365
|
+
},
|
|
340
366
|
"numberInput": {
|
|
341
367
|
"increment": "増やす",
|
|
342
368
|
"decrement": "減らす",
|
|
343
369
|
"incrementField": "{label}を増やす",
|
|
344
370
|
"decrementField": "{label}を減らす"
|
|
371
|
+
},
|
|
372
|
+
"typography": {
|
|
373
|
+
"copy": "コピー",
|
|
374
|
+
"copied": "コピーしました",
|
|
375
|
+
"edit": "編集",
|
|
376
|
+
"expand": "展開",
|
|
377
|
+
"collapse": "折りたたむ"
|
|
345
378
|
}
|
|
346
379
|
},
|
|
347
380
|
"navigation": {
|
|
@@ -424,6 +457,11 @@
|
|
|
424
457
|
},
|
|
425
458
|
"settingToggle": {
|
|
426
459
|
"label": "{setting}:{value}"
|
|
460
|
+
},
|
|
461
|
+
"conversations": {
|
|
462
|
+
"label": "会話一覧",
|
|
463
|
+
"creation": "新しい会話",
|
|
464
|
+
"rowActions": "「{label}」のその他の操作"
|
|
427
465
|
}
|
|
428
466
|
},
|
|
429
467
|
"locale": {
|
|
@@ -577,5 +615,20 @@
|
|
|
577
615
|
"other": "新着 {count} 件"
|
|
578
616
|
}
|
|
579
617
|
}
|
|
618
|
+
},
|
|
619
|
+
"general": {
|
|
620
|
+
"actions": {
|
|
621
|
+
"label": "メッセージの操作",
|
|
622
|
+
"copy": "コピー",
|
|
623
|
+
"copied": "コピーしました",
|
|
624
|
+
"feedback": "この回答は役に立ちましたか",
|
|
625
|
+
"like": "役に立った",
|
|
626
|
+
"dislike": "役に立たなかった",
|
|
627
|
+
"status": {
|
|
628
|
+
"running": "実行中",
|
|
629
|
+
"loading": "読み込み中",
|
|
630
|
+
"error": "失敗"
|
|
631
|
+
}
|
|
632
|
+
}
|
|
580
633
|
}
|
|
581
634
|
}
|
|
@@ -175,6 +175,16 @@
|
|
|
175
175
|
"one": "{count} gợi ý",
|
|
176
176
|
"other": "{count} gợi ý"
|
|
177
177
|
}
|
|
178
|
+
},
|
|
179
|
+
"attachments": {
|
|
180
|
+
"placeholderTitle": "Tải tệp lên",
|
|
181
|
+
"placeholderDescription": "Nhấp hoặc kéo thả tệp vào đây",
|
|
182
|
+
"dropLabel": "Thả tệp ({type})",
|
|
183
|
+
"inputLabel": "Chọn tệp đính kèm",
|
|
184
|
+
"add": "Thêm tệp đính kèm",
|
|
185
|
+
"remove": "Xóa {name}",
|
|
186
|
+
"uploading": "Đang tải tệp đính kèm",
|
|
187
|
+
"error": "Tải lên thất bại"
|
|
178
188
|
}
|
|
179
189
|
},
|
|
180
190
|
"feedback": {
|
|
@@ -257,6 +267,9 @@
|
|
|
257
267
|
"hintMove": "Di chuyển",
|
|
258
268
|
"hintSelect": "Chọn",
|
|
259
269
|
"hintClose": "Đóng"
|
|
270
|
+
},
|
|
271
|
+
"draggablePanel": {
|
|
272
|
+
"moveLabel": "Di chuyển bảng. Dùng phím mũi tên để dời, giữ Shift để bước dài hơn."
|
|
260
273
|
}
|
|
261
274
|
},
|
|
262
275
|
"dataDisplay": {
|
|
@@ -311,6 +324,15 @@
|
|
|
311
324
|
"loading": "Đang tải nút con…",
|
|
312
325
|
"empty": "Không có gì để hiển thị",
|
|
313
326
|
"selected": "Đã chọn"
|
|
327
|
+
},
|
|
328
|
+
"thoughtChain": {
|
|
329
|
+
"label": "Các bước suy luận",
|
|
330
|
+
"status": {
|
|
331
|
+
"loading": "đang chạy",
|
|
332
|
+
"success": "xong",
|
|
333
|
+
"error": "thất bại",
|
|
334
|
+
"abort": "đã dừng"
|
|
335
|
+
}
|
|
314
336
|
}
|
|
315
337
|
},
|
|
316
338
|
"ui": {
|
|
@@ -338,11 +360,22 @@
|
|
|
338
360
|
"download": "Tải khóa bí mật",
|
|
339
361
|
"acknowledge": "Tôi đã lưu"
|
|
340
362
|
},
|
|
363
|
+
"floatButton": {
|
|
364
|
+
"backTop": "Về đầu trang",
|
|
365
|
+
"actions": "Hành động"
|
|
366
|
+
},
|
|
341
367
|
"numberInput": {
|
|
342
368
|
"increment": "Tăng",
|
|
343
369
|
"decrement": "Giảm",
|
|
344
370
|
"incrementField": "Tăng {label}",
|
|
345
371
|
"decrementField": "Giảm {label}"
|
|
372
|
+
},
|
|
373
|
+
"typography": {
|
|
374
|
+
"copy": "Sao chép",
|
|
375
|
+
"copied": "Đã sao chép",
|
|
376
|
+
"edit": "Sửa",
|
|
377
|
+
"expand": "Mở rộng",
|
|
378
|
+
"collapse": "Thu gọn"
|
|
346
379
|
}
|
|
347
380
|
},
|
|
348
381
|
"navigation": {
|
|
@@ -425,6 +458,11 @@
|
|
|
425
458
|
},
|
|
426
459
|
"settingToggle": {
|
|
427
460
|
"label": "{setting}: {value}"
|
|
461
|
+
},
|
|
462
|
+
"conversations": {
|
|
463
|
+
"label": "Danh sách hội thoại",
|
|
464
|
+
"creation": "Hội thoại mới",
|
|
465
|
+
"rowActions": "Thao tác khác cho {label}"
|
|
428
466
|
}
|
|
429
467
|
},
|
|
430
468
|
"locale": {
|
|
@@ -578,5 +616,20 @@
|
|
|
578
616
|
"other": "{count} tin nhắn mới"
|
|
579
617
|
}
|
|
580
618
|
}
|
|
619
|
+
},
|
|
620
|
+
"general": {
|
|
621
|
+
"actions": {
|
|
622
|
+
"label": "Thao tác với tin nhắn",
|
|
623
|
+
"copy": "Sao chép",
|
|
624
|
+
"copied": "Đã sao chép",
|
|
625
|
+
"feedback": "Câu trả lời này có hữu ích không",
|
|
626
|
+
"like": "Hữu ích",
|
|
627
|
+
"dislike": "Không hữu ích",
|
|
628
|
+
"status": {
|
|
629
|
+
"running": "đang chạy",
|
|
630
|
+
"loading": "đang tải",
|
|
631
|
+
"error": "thất bại"
|
|
632
|
+
}
|
|
633
|
+
}
|
|
581
634
|
}
|
|
582
635
|
}
|
|
@@ -28,7 +28,7 @@ export type ProseProp = {
|
|
|
28
28
|
className?: ClassNameProp;
|
|
29
29
|
children?: ChildrenProp;
|
|
30
30
|
};
|
|
31
|
-
import type { ActionProp, ClassNameProp, DescriptionProp, IconProp, TitleProp, ColumnDefProp, GetRowIdProp, GetRowLabelProp, OnRowClickProp, OnSelectChangeProp, OnSortChangeProp, OnTableDensityChangeProp, SelectedIdsProp, SortStateProp, TableDensityProp, TablePresetProp, BreakpointProp, DensityProp, ChildrenProp, PendingProp, ToneProp, AvatarShapeProp, HeadingLevelProp, HandlerProp, SizeProp, LabelProp, IdProp, DescriptionsLayoutProp, DescriptionsColumnProp, DescriptionsSpanProp, DescriptionsItemsProp, SortDirectionProp, OnColumnFilterChangeProp, OnRowProp, TableExpandableProp, TableRowSelectionProp, TableScrollProp, TableStickyProp, TableSummaryProp, DisabledProp, ValueProp, DefaultValueProp, OnValueChangeProp } from "../vocabulary/index.js";
|
|
31
|
+
import type { ActionProp, ClassNameProp, DescriptionProp, IconProp, TitleProp, ColumnDefProp, GetRowIdProp, GetRowLabelProp, OnRowClickProp, OnSelectChangeProp, OnSortChangeProp, OnTableDensityChangeProp, SelectedIdsProp, SortStateProp, TableDensityProp, TablePresetProp, BreakpointProp, DensityProp, ChildrenProp, PendingProp, ToneProp, AvatarShapeProp, HeadingLevelProp, HandlerProp, SizeProp, LabelProp, IdProp, DescriptionsLayoutProp, DescriptionsColumnProp, DescriptionsSpanProp, DescriptionsItemsProp, SortDirectionProp, OnColumnFilterChangeProp, OnRowProp, TableExpandableProp, TableRowSelectionProp, TableScrollProp, TableStickyProp, TableSummaryProp, DisabledProp, OnClickProp, ValueProp, DefaultValueProp, OnValueChangeProp } from "../vocabulary/index.js";
|
|
32
32
|
import type { TreeFieldNamesProp, TreeOptionProp } from "./data-entry.prop.js";
|
|
33
33
|
/**
|
|
34
34
|
* One key in a `Legend`: a tone, and the words that tone stands for.
|
|
@@ -789,3 +789,145 @@ export type ChatBubbleListProp = {
|
|
|
789
789
|
className?: ClassNameProp;
|
|
790
790
|
id?: IdProp;
|
|
791
791
|
};
|
|
792
|
+
/**
|
|
793
|
+
* Ant Design X `Welcome variant`. `filled` gives the block its own tinted ground; `borderless`
|
|
794
|
+
* lets it sit directly on the page.
|
|
795
|
+
* @see Welcome
|
|
796
|
+
*/
|
|
797
|
+
export type WelcomeVariantProp = "filled" | "borderless";
|
|
798
|
+
/**
|
|
799
|
+
* @see Welcome — the greeting block at the head of an empty conversation (Ant Design X `Welcome`).
|
|
800
|
+
*
|
|
801
|
+
* Ant X's own slots, field for field: `icon`, `title`, `description`, `extra`, `variant`. The one
|
|
802
|
+
* behaviour worth naming is the `icon` STRING: Ant renders a `string` beginning with `http` as an
|
|
803
|
+
* `<img>` rather than as text (`es/welcome/index.js`), and that is ported — with `alt=""`, because
|
|
804
|
+
* the glyph beside a title it duplicates is decorative, where Ant hardcodes `alt="icon"`.
|
|
805
|
+
*/
|
|
806
|
+
export type WelcomeProp = {
|
|
807
|
+
/** Leading glyph, or an `http(s)` URL rendered as a decorative image. Ant Design X `icon`. */
|
|
808
|
+
icon?: React.ReactNode;
|
|
809
|
+
/** The greeting itself. Ant Design X `title`. */
|
|
810
|
+
title?: React.ReactNode;
|
|
811
|
+
/** The line under it. Ant Design X `description`. */
|
|
812
|
+
description?: React.ReactNode;
|
|
813
|
+
/** Trailing slot on the title row — a dismiss button, a model picker. Ant Design X `extra`. */
|
|
814
|
+
extra?: React.ReactNode;
|
|
815
|
+
/** Ant Design X `variant`. Default `filled`. */
|
|
816
|
+
variant?: WelcomeVariantProp;
|
|
817
|
+
id?: IdProp;
|
|
818
|
+
className?: ClassNameProp;
|
|
819
|
+
};
|
|
820
|
+
/**
|
|
821
|
+
* Ant Design X `THOUGHT_CHAIN_ITEM_STATUS` — how one step of the chain ended, or that it has not.
|
|
822
|
+
* @see ThoughtChain
|
|
823
|
+
*/
|
|
824
|
+
export type ThoughtChainStatusProp = "loading" | "success" | "error" | "abort";
|
|
825
|
+
/**
|
|
826
|
+
* Ant Design X `ThoughtChainProps.line` — the connector drawn between two steps. `true` is the
|
|
827
|
+
* default solid rule, `false` draws none, and the three strings pick its stroke.
|
|
828
|
+
*
|
|
829
|
+
* Ant's own type spells the third `'dotted'` with a trailing U+200C ZERO WIDTH NON-JOINER
|
|
830
|
+
* (`es/thought-chain/interface.d.ts`), so `line="dotted"` does not type-check against it. The
|
|
831
|
+
* clean spelling is used here; that is a typo fix, not an API change.
|
|
832
|
+
* @see ThoughtChain
|
|
833
|
+
*/
|
|
834
|
+
export type ThoughtChainLineProp = boolean | "solid" | "dashed" | "dotted";
|
|
835
|
+
/**
|
|
836
|
+
* Ant Design X `ThoughtChainItemProps.variant` — the chrome of a STANDALONE step.
|
|
837
|
+
* @see ThoughtChainItem
|
|
838
|
+
*/
|
|
839
|
+
export type ThoughtChainVariantProp = "solid" | "outlined" | "text";
|
|
840
|
+
/** @see ThoughtChain — one step. Ant Design X `ThoughtChainItemType`, field for field. */
|
|
841
|
+
export type ThoughtChainItemsProp = {
|
|
842
|
+
/** Identity, and what `expandedKeys` addresses. Ant Design X `key`. */
|
|
843
|
+
key?: string;
|
|
844
|
+
/**
|
|
845
|
+
* The step's glyph. `false` removes it entirely; omitted, the step shows its 1-based ORDINAL,
|
|
846
|
+
* which is Ant's default (`es/thought-chain/Node.js`). Ant Design X `icon`.
|
|
847
|
+
*/
|
|
848
|
+
icon?: React.ReactNode | false;
|
|
849
|
+
/** Ant Design X `title`. */
|
|
850
|
+
title?: React.ReactNode;
|
|
851
|
+
/** The line under the title, always visible. Ant Design X `description`. */
|
|
852
|
+
description?: React.ReactNode;
|
|
853
|
+
/** The body the step collapses. Ant Design X `content`. */
|
|
854
|
+
content?: React.ReactNode;
|
|
855
|
+
/** Below the body, always visible. Ant Design X `footer`. */
|
|
856
|
+
footer?: React.ReactNode;
|
|
857
|
+
/** Ant Design X `status`. */
|
|
858
|
+
status?: ThoughtChainStatusProp;
|
|
859
|
+
/** Turn the title into a disclosure for `content`. Ant Design X `collapsible`. */
|
|
860
|
+
collapsible?: boolean;
|
|
861
|
+
/** Pulse the title and body while the step is still being written. Ant Design X `blink`. */
|
|
862
|
+
blink?: boolean;
|
|
863
|
+
/** Unmount the body while collapsed. Default `true`, as in Ant. Ant Design X `destroyOnHidden`. */
|
|
864
|
+
destroyOnHidden?: boolean;
|
|
865
|
+
};
|
|
866
|
+
/**
|
|
867
|
+
* @see ThoughtChain — the assistant's reasoning, step by step (Ant Design X `ThoughtChain`).
|
|
868
|
+
*
|
|
869
|
+
* An ordered list: each step carries an ordinal or a glyph, a status, a title, and a body it can
|
|
870
|
+
* collapse. `Timeline` is the neighbour to check first — it is the same vertical rail for EVENTS
|
|
871
|
+
* that already happened; a thought chain is a run in progress, which is why a step has `loading`
|
|
872
|
+
* and `abort` states and a body that opens.
|
|
873
|
+
*/
|
|
874
|
+
export type ThoughtChainProp = {
|
|
875
|
+
/** The steps, in order. Ant Design X `items`. */
|
|
876
|
+
items?: readonly ThoughtChainItemsProp[];
|
|
877
|
+
/** Uncontrolled initially-open steps. Ant Design X `defaultExpandedKeys`. */
|
|
878
|
+
defaultExpandedKeys?: readonly string[];
|
|
879
|
+
/** Controlled open steps. Ant Design X `expandedKeys`. */
|
|
880
|
+
expandedKeys?: readonly string[];
|
|
881
|
+
/** Fires with the next open set. Ant Design X `onExpand`. */
|
|
882
|
+
onExpand?: (keys: string[]) => void;
|
|
883
|
+
/** The connector between steps. Default `true`. Ant Design X `line`. */
|
|
884
|
+
line?: ThoughtChainLineProp;
|
|
885
|
+
/**
|
|
886
|
+
* Accessible name of the chain — a plain STRING (it lands on `aria-label`). Ant X has no
|
|
887
|
+
* equivalent; a localized default applies when omitted.
|
|
888
|
+
*/
|
|
889
|
+
label?: string;
|
|
890
|
+
id?: IdProp;
|
|
891
|
+
className?: ClassNameProp;
|
|
892
|
+
};
|
|
893
|
+
/**
|
|
894
|
+
* @see ThoughtChainItem — one step OUTSIDE a chain (Ant Design X `ThoughtChain.Item`): the chip an
|
|
895
|
+
* assistant drops inline to say which tool it just reached for.
|
|
896
|
+
*
|
|
897
|
+
* Ant renders it as a `<div onClick>`; here an item with `onClick` renders a real `<button>`, so
|
|
898
|
+
* the one interactive shape this component has is reachable by keyboard.
|
|
899
|
+
*/
|
|
900
|
+
export type ThoughtChainItemProp = {
|
|
901
|
+
title?: React.ReactNode;
|
|
902
|
+
description?: React.ReactNode;
|
|
903
|
+
icon?: React.ReactNode;
|
|
904
|
+
status?: ThoughtChainStatusProp;
|
|
905
|
+
/** Ant Design X `variant`. Default `solid`. */
|
|
906
|
+
variant?: ThoughtChainVariantProp;
|
|
907
|
+
/** Ant Design X `blink`. */
|
|
908
|
+
blink?: boolean;
|
|
909
|
+
disabled?: DisabledProp;
|
|
910
|
+
onClick?: OnClickProp;
|
|
911
|
+
id?: IdProp;
|
|
912
|
+
className?: ClassNameProp;
|
|
913
|
+
};
|
|
914
|
+
/**
|
|
915
|
+
* @see Card — one entry in the card-head tab strip. Ant Design `CardTabListType`, field for
|
|
916
|
+
* field: `key`, `tab`, `disabled`.
|
|
917
|
+
*
|
|
918
|
+
* IT KEEPS ANTD'S SPELLING, and that is the standing rule rather than an oversight
|
|
919
|
+
* (docs/DESIGN-AUTHORITY.md — "where antd names a capability, this library takes antd's name and
|
|
920
|
+
* antd's semantics"). It therefore does NOT read `TabItemProp`, whose `value`/`label`/`content`
|
|
921
|
+
* are the `Tabs` component's own API: that item carries the PANEL as well as the trigger, and a
|
|
922
|
+
* card-head tab carries only the trigger — the panel is the card body. Two different shapes, and
|
|
923
|
+
* folding them into one would mean publishing a `content` field on a card tab that the card can
|
|
924
|
+
* never render.
|
|
925
|
+
*/
|
|
926
|
+
export type CardTabItemProp = {
|
|
927
|
+
/** Ant Design `key` — the tab's identity, and what `activeTabKey` / `onTabChange` speak in. */
|
|
928
|
+
key: string;
|
|
929
|
+
/** Ant Design `tab` — the trigger's label. Any node. */
|
|
930
|
+
tab: React.ReactNode;
|
|
931
|
+
/** Ant Design `disabled` — the tab stays in the strip and in the roving focus, unselectable. */
|
|
932
|
+
disabled?: boolean;
|
|
933
|
+
};
|
|
@@ -1888,3 +1888,79 @@ export type ChatSuggestionProp = {
|
|
|
1888
1888
|
id?: IdProp;
|
|
1889
1889
|
className?: ClassNameProp;
|
|
1890
1890
|
};
|
|
1891
|
+
/** Ant Design X `Attachments` overflow modes — how the card list behaves when it exceeds its box. */
|
|
1892
|
+
export type AttachmentsOverflowProp = "wrap" | "scrollX" | "scrollY";
|
|
1893
|
+
/** Placeholder copy/icon when the attachment list is empty. Ant Design X `PlaceholderType`. */
|
|
1894
|
+
export type AttachmentsPlaceholderProp = {
|
|
1895
|
+
icon?: React.ReactNode;
|
|
1896
|
+
title?: React.ReactNode;
|
|
1897
|
+
description?: React.ReactNode;
|
|
1898
|
+
};
|
|
1899
|
+
/**
|
|
1900
|
+
* One attachment row — Ant Design X `Attachment`, which extends antd `UploadFile` plus optional
|
|
1901
|
+
* `description` and `cardType`. Field names are antd's (`thumbUrl`, `originFileObj`, …) so an Ant
|
|
1902
|
+
* X call site compiles unchanged; internally the upload engine maps them to `UploadFileItem`.
|
|
1903
|
+
*
|
|
1904
|
+
* @see Attachments
|
|
1905
|
+
*/
|
|
1906
|
+
export type AttachmentsItemProp = {
|
|
1907
|
+
uid: string;
|
|
1908
|
+
name: string;
|
|
1909
|
+
size?: number;
|
|
1910
|
+
status?: "uploading" | "done" | "error" | "removed";
|
|
1911
|
+
percent?: number;
|
|
1912
|
+
url?: string;
|
|
1913
|
+
thumbUrl?: string;
|
|
1914
|
+
originFileObj?: File;
|
|
1915
|
+
response?: unknown;
|
|
1916
|
+
error?: unknown;
|
|
1917
|
+
description?: React.ReactNode;
|
|
1918
|
+
cardType?: string;
|
|
1919
|
+
};
|
|
1920
|
+
/** Semantic slots Ant Design X exposes on `Attachments`. */
|
|
1921
|
+
export type AttachmentsSemanticProp = "list" | "placeholder" | "upload" | "root" | "card" | "file";
|
|
1922
|
+
/**
|
|
1923
|
+
* @see Attachments — the chat-surface attachment collection (Ant Design X `Attachments`).
|
|
1924
|
+
*
|
|
1925
|
+
* Inherits antd Upload behaviour (`accept`, `beforeUpload`, `customRequest`, …) but names the file
|
|
1926
|
+
* list `items` (not `fileList`) and fires `onChange` with antd's `{ file, fileList }` shape. The
|
|
1927
|
+
* ref exposes `nativeElement`, `fileNativeElement`, `upload(file)` and `select({ accept, multiple
|
|
1928
|
+
* })` exactly as Ant X documents.
|
|
1929
|
+
*/
|
|
1930
|
+
export type AttachmentsProp = Omit<UploadProp, "value" | "defaultValue" | "onValueChange" | "variant" | "showUploadList" | "children" | "onRemove"> & {
|
|
1931
|
+
/** Controlled attachment list. Ant Design X `items` (= antd Upload `fileList`). */
|
|
1932
|
+
items?: readonly AttachmentsItemProp[];
|
|
1933
|
+
/** Fires when the list changes. Ant Design X / antd Upload `onChange`. */
|
|
1934
|
+
onChange?: (info: {
|
|
1935
|
+
file: AttachmentsItemProp;
|
|
1936
|
+
fileList: AttachmentsItemProp[];
|
|
1937
|
+
}) => void;
|
|
1938
|
+
/** antd Upload `onRemove` — receives the attachment row being removed. */
|
|
1939
|
+
onRemove?: (item: AttachmentsItemProp) => boolean | void | Promise<boolean | void>;
|
|
1940
|
+
/** How overflowing cards layout. Ant Design X `overflow`. */
|
|
1941
|
+
overflow?: AttachmentsOverflowProp;
|
|
1942
|
+
/** Empty-state copy, or a function for inline vs drop variants. Ant Design X `placeholder`. */
|
|
1943
|
+
placeholder?: AttachmentsPlaceholderProp | ((type: "inline" | "drop") => AttachmentsPlaceholderProp);
|
|
1944
|
+
/** Host element for a full-screen drop overlay. Ant Design X `getDropContainer`. */
|
|
1945
|
+
getDropContainer?: (() => HTMLElement | null | undefined) | null;
|
|
1946
|
+
/** Semantic class names. Ant Design X `classNames`. */
|
|
1947
|
+
classNames?: Partial<Record<AttachmentsSemanticProp, string>>;
|
|
1948
|
+
/** Semantic inline styles. Ant Design X `styles`. */
|
|
1949
|
+
styles?: Partial<Record<AttachmentsSemanticProp, React.CSSProperties>>;
|
|
1950
|
+
/** Root class on the outermost node. Ant Design X `rootClassName`. */
|
|
1951
|
+
rootClassName?: ClassNameProp;
|
|
1952
|
+
/** Child mode: the visible trigger; upload runs through a hidden input beside it. Ant Design X `children`. */
|
|
1953
|
+
children?: React.ReactElement;
|
|
1954
|
+
/** Passthrough to the preview image. Ant Design X `imageProps` — reserved; no Image primitive yet. */
|
|
1955
|
+
imageProps?: Record<string, unknown>;
|
|
1956
|
+
};
|
|
1957
|
+
/** Imperative handle Ant Design X documents on `Attachments` ref. */
|
|
1958
|
+
export type AttachmentsRefProp = {
|
|
1959
|
+
nativeElement?: HTMLDivElement | null;
|
|
1960
|
+
fileNativeElement?: HTMLInputElement | null;
|
|
1961
|
+
upload: (file: File) => void;
|
|
1962
|
+
select: (options?: {
|
|
1963
|
+
accept?: string;
|
|
1964
|
+
multiple?: boolean;
|
|
1965
|
+
}) => void;
|
|
1966
|
+
};
|
|
@@ -1,7 +1,40 @@
|
|
|
1
1
|
/** Feedback component prop types — @see docs/COMPONENTS.md#feedback */
|
|
2
2
|
import type * as React from "react";
|
|
3
3
|
import type { QueryErrorCategory } from "../../lib/query-error.js";
|
|
4
|
-
import type { AlertVariantProp, AvatarShapeProp, CancelLabelProp, ChildrenProp, ClassNameProp, ConfirmLabelProp, ConfirmVariantProp, DescriptionProp, HandlerProp, IconProp, OpenProp, OnOpenChangeProp, PendingProp, ShapeProp, SizeProp, ToneProp, TitleProp } from "../vocabulary/index.js";
|
|
4
|
+
import type { AlertVariantProp, AvatarShapeProp, CancelLabelProp, ChildrenProp, ClassNameProp, ConfirmLabelProp, ConfirmVariantProp, DefaultOpenProp, DescriptionProp, HandlerProp, IconProp, OpenProp, OnOpenChangeProp, PendingProp, ShapeProp, SizeProp, ToneProp, TitleProp } from "../vocabulary/index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @see Dialog — the compound modal ROOT.
|
|
7
|
+
*
|
|
8
|
+
* `variant` is the one prop that answers gh#567: it decides the ARIA role, whether an
|
|
9
|
+
* outside click dismisses, and the primary action's emphasis together, because those three
|
|
10
|
+
* always travel together. Set it here to cover the whole tree, or on `DialogContent` for one
|
|
11
|
+
* surface. `variant="destructive"` IS the 12 `AlertDialog*` exports, which stay for
|
|
12
|
+
* compatibility — see the file header of `components/feedback/dialog.tsx`.
|
|
13
|
+
*/
|
|
14
|
+
export type DialogProp = {
|
|
15
|
+
open?: OpenProp;
|
|
16
|
+
defaultOpen?: DefaultOpenProp;
|
|
17
|
+
onOpenChange?: OnOpenChangeProp;
|
|
18
|
+
variant?: ConfirmVariantProp;
|
|
19
|
+
/** Kept from Radix. RAC's `Modal` always locks scroll, so `false` no longer turns that off. */
|
|
20
|
+
modal?: boolean;
|
|
21
|
+
children?: ChildrenProp;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @see DialogContent — the modal surface. `variant` overrides the root's for this surface and
|
|
25
|
+
* is what actually resolves `role`, outside-click dismissal and the ✕ default.
|
|
26
|
+
*/
|
|
27
|
+
export type DialogContentProp = {
|
|
28
|
+
variant?: ConfirmVariantProp;
|
|
29
|
+
/** Show the corner ✕. Defaults to `true`, or `false` under `variant="destructive"`. */
|
|
30
|
+
showCloseButton?: boolean;
|
|
31
|
+
/** shadcn-era spelling of `showCloseButton`; kept working. */
|
|
32
|
+
showClose?: boolean;
|
|
33
|
+
/** Semantic class for the scrim the surface owns (RAC nests overlay → modal → dialog). */
|
|
34
|
+
overlayClassName?: ClassNameProp;
|
|
35
|
+
className?: ClassNameProp;
|
|
36
|
+
children?: ChildrenProp;
|
|
37
|
+
};
|
|
5
38
|
/** @see AlertDialog */
|
|
6
39
|
export type AlertDialogProp = {
|
|
7
40
|
open: OpenProp;
|