继续沉淀筛选工具条与裁剪弹窗壳层
新增共享 PlatformFilterToolbar 收口首页分类筛选与排序工具条 将 SquareImageCropModal 收口到 UnifiedModal 并补充薄能力透传 补充组件与调用侧回归测试并更新 PlatformUiKit 收口计划与共享决策记录
This commit is contained in:
@@ -7,8 +7,8 @@ import {
|
||||
} from 'react';
|
||||
|
||||
import { PlatformActionButton } from './PlatformActionButton';
|
||||
import { PlatformModalCloseButton } from './PlatformModalCloseButton';
|
||||
import { PlatformStatusMessage } from './PlatformStatusMessage';
|
||||
import { UnifiedModal } from './UnifiedModal';
|
||||
import {
|
||||
clampNumber,
|
||||
clampSquareImageCropRect,
|
||||
@@ -309,25 +309,35 @@ export function SquareImageCropModal({
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="platform-modal-backdrop fixed inset-0 z-[80] flex items-center justify-center px-4 py-6">
|
||||
<div
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-labelledby={titleId}
|
||||
className="platform-modal-shell platform-remap-surface w-full max-w-sm overflow-hidden rounded-[1.4rem]"
|
||||
>
|
||||
<div className="flex items-center justify-between border-b border-white/10 px-5 py-4">
|
||||
<div id={titleId} className="text-base font-black">
|
||||
{labels.title}
|
||||
</div>
|
||||
<PlatformModalCloseButton
|
||||
label={labels.close}
|
||||
variant="profileCompact"
|
||||
onClick={onClose}
|
||||
icon="×"
|
||||
/>
|
||||
<UnifiedModal
|
||||
open
|
||||
title={labels.title}
|
||||
titleId={titleId}
|
||||
onClose={onClose}
|
||||
closeOnBackdrop={false}
|
||||
closeOnEscape={false}
|
||||
closeLabel={labels.close}
|
||||
closeVariant="profileCompact"
|
||||
closeIcon="×"
|
||||
portal={false}
|
||||
zIndexClassName="z-[80]"
|
||||
panelClassName="platform-remap-surface max-w-sm rounded-[1.4rem]"
|
||||
headerClassName="border-white/10 px-5 py-4"
|
||||
titleClassName="font-black"
|
||||
bodyClassName="px-5 py-5"
|
||||
footerClassName="border-transparent px-5 pt-0 pb-5"
|
||||
footer={
|
||||
<div className="grid w-full grid-cols-2 gap-3">
|
||||
<PlatformActionButton tone="secondary" onClick={onClose}>
|
||||
{labels.cancel}
|
||||
</PlatformActionButton>
|
||||
<PlatformActionButton onClick={onSubmit} disabled={isSaving}>
|
||||
{isSaving ? labels.saving : labels.submit}
|
||||
</PlatformActionButton>
|
||||
</div>
|
||||
<div className="px-5 py-5">
|
||||
}
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
ref={previewRef}
|
||||
className="relative mx-auto overflow-hidden rounded-[1.2rem] border border-white/12 bg-black/35 select-none touch-none"
|
||||
@@ -388,19 +398,7 @@ export function SquareImageCropModal({
|
||||
{error}
|
||||
</PlatformStatusMessage>
|
||||
) : null}
|
||||
<div className="mt-5 grid grid-cols-2 gap-3">
|
||||
<PlatformActionButton tone="secondary" onClick={onClose}>
|
||||
{labels.cancel}
|
||||
</PlatformActionButton>
|
||||
<PlatformActionButton
|
||||
onClick={onSubmit}
|
||||
disabled={isSaving}
|
||||
>
|
||||
{isSaving ? labels.saving : labels.submit}
|
||||
</PlatformActionButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</UnifiedModal>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user