Rebuild Share and Delete Account from the privacy designs.

Share asks the person who holds the pen to confirm their community agreed before a link turns on, and deleting an account lists each owned Rule with PDF and RULE.md export. Case-study Share copies the page link instead of opening the privacy modal, and the sign-in banner stays below the header so Share remains clickable.
This commit is contained in:
adilallo committed 2026-11-09 19:54:09 -07:00
1 parent 5cbda35e32
commit b6795c1f18
28 files changed
+1467 -377

No files matched your search

@@ -12,6 +12,8 @@ const backdropOverlayClasses: Record<CreateModalBackdropVariant, string> = {
"fixed inset-0 z-[9998] bg-[var(--color-surface-invert-brand-primary)]/85 backdrop-blur-md supports-[backdrop-filter]:bg-[var(--color-surface-invert-brand-primary)]/75",
};
export type CreateModalPresentationValue = "dialog" | "sheet";
export type CreateModalFrameViewProps = {
isOpen: boolean;
onOverlayClick: () => void;
@@ -24,6 +26,11 @@ export type CreateModalFrameViewProps = {
children: ReactNode;
/** Rendered below the dialog card on the backdrop (e.g. “Back to home”). */
belowCard?: ReactNode;
/**
* `sheet` is full-viewport below `md` (Figma 320–639) and a 546px dialog
* from `md`. `dialog` is the centered card used by Create and Dialog.
*/
presentation?: CreateModalPresentationValue;
};
/**
@@ -40,13 +47,22 @@ export function CreateModalFrameView({
dialogRef,
children,
belowCard,
presentation = "dialog",
}: CreateModalFrameViewProps) {
if (!isOpen) return null;
const isSheet = presentation === "sheet";
const overlayLayout = isSheet
? "flex flex-col items-stretch justify-end overflow-hidden p-0 md:items-center md:justify-center md:gap-6 md:overflow-y-auto md:px-4 md:py-8"
: "flex flex-col items-center justify-center gap-6 overflow-y-auto px-4 py-8";
const dialogShell = isSheet
? "flex h-dvh max-h-dvh min-h-0 w-full shrink-0 flex-col overflow-hidden rounded-none bg-[var(--color-surface-default-primary)] shadow-[0px_0px_48px_0px_rgba(0,0,0,0.1)] z-[9999] md:h-auto md:max-h-[90vh] md:w-[546px] md:max-w-[546px] md:rounded-[var(--radius-500)]"
: "flex min-h-0 max-h-[90vh] w-full max-w-[560px] shrink-0 flex-col overflow-hidden rounded-[var(--radius-500)] bg-[var(--color-surface-default-primary)] shadow-[0px_0px_48px_0px_rgba(0,0,0,0.1)] z-[9999]";
const content = (
<div
ref={overlayRef}
className={`${backdropOverlayClasses[backdropVariant]} flex flex-col items-center justify-center gap-6 overflow-y-auto px-4 py-8`}
className={`${backdropOverlayClasses[backdropVariant]} ${overlayLayout}`}
onClick={onOverlayClick}
role="presentation"
>
@@ -56,7 +72,7 @@ export function CreateModalFrameView({
aria-modal="true"
aria-label={ariaLabel}
aria-labelledby={ariaLabelledBy}
className={`flex min-h-0 max-h-[90vh] w-full max-w-[560px] shrink-0 flex-col overflow-hidden rounded-[var(--radius-500)] bg-[var(--color-surface-default-primary)] shadow-[0px_0px_48px_0px_rgba(0,0,0,0.1)] z-[9999] ${className}`}
className={`${dialogShell} ${className}`}
onClick={(e) => e.stopPropagation()}
>
{children}