Standardize create-flow option steps on one question-and-options layout and Selection sizes.
Method cards, chips, and the right rail now share the two-column shell; last options clear the footer fade, See all stays under the stack, and the left heading no longer jumps when the list expands. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2fc7fbf818
commit
24a9615c0c
26 files changed
+354
-245
No files matched your search
@@ -31,6 +31,12 @@ export const CREATE_FLOW_SCROLL_REGION_CLASS = "scrollbar-design";
|
||||
export const CREATE_FLOW_FOOTER_SCRIM_CLASS =
|
||||
"pointer-events-none absolute inset-x-0 top-0 z-[1] h-8 -translate-y-full bg-gradient-to-t from-[var(--color-surface-default-primary,#000)] to-transparent";
|
||||
|
||||
/**
|
||||
* Bottom padding in create-flow option scrollports so the last control can
|
||||
* rest above the footer scrim (`h-8`) instead of sitting in the fade.
|
||||
*/
|
||||
export const CREATE_FLOW_SCROLL_END_PAD_CLASS = "pb-12";
|
||||
|
||||
/**
|
||||
* Single column: full width below `lg` so tablet widths use available space;
|
||||
* 640px from `--breakpoint-lg` up (two-column layouts start at `lg`).
|
||||
@@ -46,7 +52,9 @@ export const CREATE_FLOW_MD_UP_GRID_CELL_CLASS =
|
||||
export const CREATE_FLOW_TWO_COLUMN_MAX_WIDTH_CLASS =
|
||||
"w-full min-w-0 lg:max-w-[1328px]";
|
||||
|
||||
/** Review / card-stack frames (Figma Flow — Review max 1440). */
|
||||
/**
|
||||
* Review frames (Figma Flow — Review max 1440).
|
||||
*/
|
||||
export const CREATE_FLOW_WIDE_MAX_CLASS = "w-full min-w-0 lg:max-w-[1440px]";
|
||||
|
||||
/**
|
||||
@@ -62,14 +70,6 @@ export const CREATE_FLOW_MD_CENTERED_MAIN_CLASS =
|
||||
*/
|
||||
export const CREATE_FLOW_MD_CENTERED_SHELL_CLASS = "md:my-auto md:pt-0";
|
||||
|
||||
/**
|
||||
* Card-stack steps only (Figma compact card stack): wider than header lockup so the card grid /
|
||||
* pyramid fits (max 860px). Header lockup stays {@link CREATE_FLOW_MD_UP_COLUMN_MAX_CLASS}.
|
||||
* Card–card gap uses `gap-2` in `CardStack` (same on mobile and md+).
|
||||
*/
|
||||
export const CREATE_FLOW_CARD_STACK_AREA_MAX_CLASS =
|
||||
"w-full min-w-0 md:max-w-[min(100%,860px)]";
|
||||
|
||||
/**
|
||||
* Inner max-width for step content and the action bar, so the primary button
|
||||
* lines up with the nearest content column above 1440.
|
||||
@@ -88,11 +88,10 @@ export function getCreateFlowContentMaxClass(options: {
|
||||
switch (CREATE_FLOW_SCREEN_REGISTRY[options.step].layoutKind) {
|
||||
case "select":
|
||||
case "right-rail":
|
||||
case "card":
|
||||
case "completed":
|
||||
case "review":
|
||||
return CREATE_FLOW_TWO_COLUMN_MAX_WIDTH_CLASS;
|
||||
case "card":
|
||||
return CREATE_FLOW_WIDE_MAX_CLASS;
|
||||
default:
|
||||
return CREATE_FLOW_MD_UP_COLUMN_MAX_CLASS;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user