@q1travel/design-system 0.14.0 → 0.15.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/contracts/overlay-foundation.md +5 -1
- package/dist-pkg/design-system.d.ts +5 -1
- package/dist-pkg/design-system.js +1270 -1242
- package/dist-pkg/style.css +13 -1
- package/package.json +2 -2
|
@@ -156,7 +156,7 @@ type OverlayRecord = {
|
|
|
156
156
|
| --- | --- | --- | --- |
|
|
157
157
|
| Modal | 公开 props、尺寸/布局、关闭策略、文档示例 | portal、stack、focus、blocking lock、统一 Escape/outside ownership | Foundation |
|
|
158
158
|
| DestructiveActionModal | destructive/loading/confirm 语义与提交状态 | 同上;loading 时由 policy 禁止关闭 | Foundation |
|
|
159
|
-
| Sheet |
|
|
159
|
+
| Sheet | side、persistent-context 语义;blocking=true、outside pointer=false;dismissable 默认 true,false 禁用 Escape 并隐藏内置关闭按钮 | 同上;不能让 CSS 注释与 ARIA 语义继续冲突 | Foundation |
|
|
160
160
|
| Drawer | mobile bottom、gesture、outside/Escape 语义 | 同上;gesture 关闭仍必须服从 top-most 与 loading policy | Foundation |
|
|
161
161
|
|
|
162
162
|
组件接入不得一次性重写四个组件,也不得在未有单独 contract 的情况下改变公开 DOM、默认 dismissal 或 accessibility tier。
|
|
@@ -259,3 +259,7 @@ D7 q1travel-web adoption/migration
|
|
|
259
259
|
- 宿主每次 open 对应一次登记/释放;改变 blocking 策略应重新登记。idempotent disposer 支持 StrictMode 清理。不同 document 完全隔离。
|
|
260
260
|
|
|
261
261
|
回归入口:`node --test scripts/check-overlay-coordination.test.mjs`;真实跨 root 的 Escape、焦点、快捷键与滚动锁由 Web consumer 浏览器测试验证。
|
|
262
|
+
|
|
263
|
+
### Sheet sizing and dismissal
|
|
264
|
+
|
|
265
|
+
Sheet accepts optional `size: 'sm' | 'md' | 'lg' | 'xl'` for left/right panel widths of 360/480/640/860px, capped by the existing viewport gutters. Omitting size retains 512px. Top/bottom geometry, `title: string`, children, footer, and side remain unchanged. Dismissal policy updates take effect in the same commit as visible close controls, before consumer layout effects. `dismissable=false` retains its blocking coordinator entry, focus trap, inert background, and scroll lock; Escape cannot dismiss it or the underlying host overlay. Outside pointer never closes Sheet. Consumers retain ownership of controlled open and footer actions and restore dismissal when the temporary busy state ends.
|
|
@@ -1392,17 +1392,21 @@ export declare function Separator({ orientation, decorative, className, }: {
|
|
|
1392
1392
|
|
|
1393
1393
|
export declare type SeparatorOrientation = 'horizontal' | 'vertical';
|
|
1394
1394
|
|
|
1395
|
-
export declare function Sheet({ open, onClose, title, side, children, footer }: {
|
|
1395
|
+
export declare function Sheet({ open, onClose, title, side, size, dismissable, children, footer }: {
|
|
1396
1396
|
open: boolean;
|
|
1397
1397
|
onClose: () => void;
|
|
1398
1398
|
title: string;
|
|
1399
1399
|
side?: SheetSide;
|
|
1400
|
+
size?: SheetSize;
|
|
1401
|
+
dismissable?: boolean;
|
|
1400
1402
|
children: ReactNode;
|
|
1401
1403
|
footer?: ReactNode;
|
|
1402
1404
|
}): ReactNode;
|
|
1403
1405
|
|
|
1404
1406
|
export declare type SheetSide = 'top' | 'right' | 'bottom' | 'left';
|
|
1405
1407
|
|
|
1408
|
+
export declare type SheetSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
1409
|
+
|
|
1406
1410
|
export declare function ShowMore({ items, initial, noBorder, initialExpanded, }: {
|
|
1407
1411
|
items: string[];
|
|
1408
1412
|
initial?: number;
|