From 32598d7cf3bac5ceff8bfa40501bb04c0641b731 Mon Sep 17 00:00:00 2001 From: dev Date: Sat, 23 May 2026 13:41:18 +0200 Subject: [PATCH] fix(alert-dialog): narrow Action.variant to canonical SelectionVariant (3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stops the chip-count drift introduced in \`c98510af\`. AlertDialog.Action was exposing all 6 ButtonVariant chips, breaking the 3-chip rhythm the rest of UIX follows. Per DEMO_AUTHORING_GUIDE §12.7 every chip-group must enumerate the full union the type declares — so the fix is to narrow the *type*, not truncate the chips. \`AlertDialogActionVariant = Extract\` imports the canonical set from \`eidos/lib/types.ts\` (`solid | outline | ghost`), which is the right shape for a primary action button: - keeps 'solid' as the CTA default - 3-chip parity with Cancel (ControlVariant), DropdownMenu.Trigger (ControlVariant), and the rest of the form-control surface - no invented vocab — uses the existing canon set named for exactly this use case ("selection chips / toggles" semantically maps to "selection / action buttons") Demo array drops from 6 to 3 chips; API row updated to reflect the narrowing. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/uix/eidos/components/alert-dialog/types.ts | 17 +++++++++++------ .../uix/components/alert-dialog/+page.svelte | 13 ++++++------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/uix/eidos/components/alert-dialog/types.ts b/src/uix/eidos/components/alert-dialog/types.ts index 050c57cc9..72a8a831a 100644 --- a/src/uix/eidos/components/alert-dialog/types.ts +++ b/src/uix/eidos/components/alert-dialog/types.ts @@ -9,7 +9,7 @@ import type { ButtonRounded, ButtonProps as EidosButtonProps } from '$uix/eidos/components/button'; -import type { ControlVariant, ResponsiveProp } from '$uix/eidos/lib/types'; +import type { ControlVariant, SelectionVariant, ResponsiveProp } from '$uix/eidos/lib/types'; /** * Eidos `` — visual wrapper over `soma/alert-dialog`. A @@ -45,13 +45,18 @@ export type AlertDialogProps = ProviderProps; * Action button. Renders an eidos `