Merge remote-tracking branch 'origin/worktree-llm-web-config' into worktree/onboarding-deepseek-config

# Conflicts:
#	packages/client/ui-models/README.i18n.yaml
#	packages/client/ui-primitives/src/Modal.tsx
#	packages/client/ui-settings/README.i18n.yaml
This commit is contained in:
Yichen Jiang
2026-07-30 18:43:06 +08:00
1380 changed files with 59709 additions and 10238 deletions
+26 -14
View File
@@ -12,14 +12,19 @@ import css from './Modal.module.css'
* Render a centered modal over a blurred page mask.
* @param props.open - whether the dialog is showing.
* @param props.onClose - Escape or mask click.
* @param props.title - dialog heading.
* @param props.title - dialog heading (aria-label in every mode).
* @param props.closeLabel - accessible close-button label.
* @param props.description - optional supporting sentence under the title.
* @param props.children - body (inputs, etc.).
* @param props.footer - action row (Cancel / Create).
* @param props.headless - render children directly in the card (no default
* header/close/body chrome) for dialogs whose figma frame owns its own
* header structure; mask, card, Escape, and aria-label remain.
* @returns null when closed; otherwise the overlay tree.
*/
export function Modal({ open, onClose, title, closeLabel = 'Close', description, children, footer, className }: {
export function Modal({
open, onClose, title, closeLabel = 'Close', description, children, footer, className, headless = false,
}: {
open: boolean
onClose: () => void
title: string
@@ -28,6 +33,7 @@ export function Modal({ open, onClose, title, closeLabel = 'Close', description,
children?: ReactNode
footer?: ReactNode
className?: string
headless?: boolean
}) {
useEffect(() => {
if (!open) return
@@ -49,19 +55,25 @@ export function Modal({ open, onClose, title, closeLabel = 'Close', description,
aria-modal="true"
aria-label={title}
>
<div className={css.content}>
<div className={css.header}>
<h2 className={css.title}>{title}</h2>
<button type="button" className={css.close} aria-label={closeLabel} onClick={onClose}>
<IconCloseOutline16 size={14} />
</button>
</div>
{description !== undefined && description !== '' && (
<p className={css.description}>{description}</p>
{headless
? children
: (
<>
<div className={css.content}>
<div className={css.header}>
<h2 className={css.title}>{title}</h2>
<button type="button" className={css.close} aria-label={closeLabel} onClick={onClose}>
<IconCloseOutline16 size={14} />
</button>
</div>
{description !== undefined && description !== '' && (
<p className={css.description}>{description}</p>
)}
{children !== undefined && <div className={css.body}>{children}</div>}
</div>
{footer !== undefined && <div className={css.footer}>{footer}</div>}
</>
)}
{children !== undefined && <div className={css.body}>{children}</div>}
</div>
{footer !== undefined && <div className={css.footer}>{footer}</div>}
</div>
</div>
)