@wow-two-beta/fe 0.0.26 → 0.0.28

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.
Files changed (82) hide show
  1. package/README.md +15 -3
  2. package/dist/chunks/{AppSwitcherMenu.vue_vue_type_script_setup_true_lang-DVqdOOst.js → AccountMenu.vue_vue_type_script_setup_true_lang-CWsiHHiy.js} +700 -283
  3. package/dist/chunks/AccountMenu.vue_vue_type_script_setup_true_lang-CWsiHHiy.js.map +1 -0
  4. package/dist/chunks/Avatar.vue_vue_type_script_setup_true_lang-BIoaOjCh.js +267 -0
  5. package/dist/chunks/Avatar.vue_vue_type_script_setup_true_lang-BIoaOjCh.js.map +1 -0
  6. package/dist/chunks/{BackToTopButton.vue_vue_type_script_setup_true_lang-CNMcUYtR.js → BackToTopButton.vue_vue_type_script_setup_true_lang-6tfkqsrZ.js} +2 -2
  7. package/dist/chunks/{BackToTopButton.vue_vue_type_script_setup_true_lang-CNMcUYtR.js.map → BackToTopButton.vue_vue_type_script_setup_true_lang-6tfkqsrZ.js.map} +1 -1
  8. package/dist/chunks/{Button.vue_vue_type_script_setup_true_lang-BrgCAsgC.js → Button.vue_vue_type_script_setup_true_lang-Cw0QS_Mm.js} +2 -3
  9. package/dist/chunks/{Button.vue_vue_type_script_setup_true_lang-BrgCAsgC.js.map → Button.vue_vue_type_script_setup_true_lang-Cw0QS_Mm.js.map} +1 -1
  10. package/dist/chunks/{DrawerContent.vue_vue_type_script_setup_true_lang-CZQnfNGk.js → DrawerContent.vue_vue_type_script_setup_true_lang-BA-au7LC.js} +2 -2
  11. package/dist/chunks/{DrawerContent.vue_vue_type_script_setup_true_lang-CZQnfNGk.js.map → DrawerContent.vue_vue_type_script_setup_true_lang-BA-au7LC.js.map} +1 -1
  12. package/dist/chunks/{ErrorBoundary.vue_vue_type_script_setup_true_lang-LRQbVAiW.js → ErrorBoundary.vue_vue_type_script_setup_true_lang-DzqE0ZF8.js} +4 -4
  13. package/dist/chunks/{ErrorBoundary.vue_vue_type_script_setup_true_lang-LRQbVAiW.js.map → ErrorBoundary.vue_vue_type_script_setup_true_lang-DzqE0ZF8.js.map} +1 -1
  14. package/dist/chunks/{FieldHelperText.vue_vue_type_script_setup_true_lang-eqG5AyoV.js → FieldHelperText.vue_vue_type_script_setup_true_lang-DuMcXUch.js} +2 -2
  15. package/dist/chunks/{FieldHelperText.vue_vue_type_script_setup_true_lang-eqG5AyoV.js.map → FieldHelperText.vue_vue_type_script_setup_true_lang-DuMcXUch.js.map} +1 -1
  16. package/dist/chunks/{KanbanCard.vue_vue_type_script_setup_true_lang-BCnquIre.js → KanbanCard.vue_vue_type_script_setup_true_lang-CyXb4ZZw.js} +169 -427
  17. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-CyXb4ZZw.js.map +1 -0
  18. package/dist/chunks/{LightboxModal.vue_vue_type_script_setup_true_lang-Dm79L1eK.js → LightboxModal.vue_vue_type_script_setup_true_lang-BxdSYLYf.js} +6 -6
  19. package/dist/chunks/{LightboxModal.vue_vue_type_script_setup_true_lang-Dm79L1eK.js.map → LightboxModal.vue_vue_type_script_setup_true_lang-BxdSYLYf.js.map} +1 -1
  20. package/dist/chunks/{MasonryLayout.vue_vue_type_script_setup_true_lang-TuNWahLw.js → MasonryLayout.vue_vue_type_script_setup_true_lang-DD_jRzkM.js} +22 -7
  21. package/dist/chunks/MasonryLayout.vue_vue_type_script_setup_true_lang-DD_jRzkM.js.map +1 -0
  22. package/dist/chunks/{MentionInput.vue_vue_type_script_setup_true_lang-DdT24dkW.js → MentionInput.vue_vue_type_script_setup_true_lang-hYD3uP3P.js} +6 -6
  23. package/dist/chunks/{MentionInput.vue_vue_type_script_setup_true_lang-DdT24dkW.js.map → MentionInput.vue_vue_type_script_setup_true_lang-hYD3uP3P.js.map} +1 -1
  24. package/dist/chunks/{OverlayCloseButton.vue_vue_type_script_setup_true_lang-D01KYAAn.js → OverlayCloseButton.vue_vue_type_script_setup_true_lang-Df9raD_m.js} +2 -2
  25. package/dist/chunks/{OverlayCloseButton.vue_vue_type_script_setup_true_lang-D01KYAAn.js.map → OverlayCloseButton.vue_vue_type_script_setup_true_lang-Df9raD_m.js.map} +1 -1
  26. package/dist/chunks/{PopoverContent.vue_vue_type_script_setup_true_lang-BIHYpwzT.js → PopoverContent.vue_vue_type_script_setup_true_lang-C6YKEo3H.js} +2 -2
  27. package/dist/chunks/{PopoverContent.vue_vue_type_script_setup_true_lang-BIHYpwzT.js.map → PopoverContent.vue_vue_type_script_setup_true_lang-C6YKEo3H.js.map} +1 -1
  28. package/dist/chunks/{ReportAction.vue_vue_type_script_setup_true_lang-l4DjtcpM.js → ReportAction.vue_vue_type_script_setup_true_lang-DCnPCczd.js} +2 -2
  29. package/dist/chunks/{ReportAction.vue_vue_type_script_setup_true_lang-l4DjtcpM.js.map → ReportAction.vue_vue_type_script_setup_true_lang-DCnPCczd.js.map} +1 -1
  30. package/dist/chunks/{SurfaceStyles-B8KNkFsm.js → SurfaceStyles-BYvRlsWe.js} +2 -2
  31. package/dist/chunks/{SurfaceStyles-B8KNkFsm.js.map → SurfaceStyles-BYvRlsWe.js.map} +1 -1
  32. package/dist/chunks/{ToastHost.vue_vue_type_script_setup_true_lang-p0bfXJ9l.js → ToastHost.vue_vue_type_script_setup_true_lang-J1ZPZXn3.js} +3 -3
  33. package/dist/chunks/{ToastHost.vue_vue_type_script_setup_true_lang-p0bfXJ9l.js.map → ToastHost.vue_vue_type_script_setup_true_lang-J1ZPZXn3.js.map} +1 -1
  34. package/dist/chunks/{Tones-CQu-OvAk.js → Tones-Bcz8dIo3.js} +159 -1
  35. package/dist/chunks/Tones-Bcz8dIo3.js.map +1 -0
  36. package/dist/chunks/UseScrollActivity-D8MC5xgH.js +37 -0
  37. package/dist/chunks/UseScrollActivity-D8MC5xgH.js.map +1 -0
  38. package/dist/chunks/{index-C-r59Hob.js → index-CGIXFfl9.js} +3 -4
  39. package/dist/chunks/{index-C-r59Hob.js.map → index-CGIXFfl9.js.map} +1 -1
  40. package/dist/chunks/{index-rh4HVTr5.js → index-COgbQxBT.js} +5 -1
  41. package/dist/chunks/{index-rh4HVTr5.js.map → index-COgbQxBT.js.map} +1 -1
  42. package/dist/chunks/{index-CuiXILXc.js → index-Dp6L9sX7.js} +6 -2
  43. package/dist/chunks/index-Dp6L9sX7.js.map +1 -0
  44. package/dist/foundation/config/ConfigSource.d.ts +12 -5
  45. package/dist/foundation/config/DefineConfig.d.ts +9 -4
  46. package/dist/foundation/config/index.d.ts +1 -1
  47. package/dist/foundation/config/index.js +12 -9
  48. package/dist/foundation/config/index.js.map +1 -1
  49. package/dist/foundation/dom/hooks/UseScrollActivity.d.ts +15 -0
  50. package/dist/foundation/dom/index.d.ts +1 -0
  51. package/dist/foundation/dom/index.js +7 -3
  52. package/dist/foundation/dom/index.js.map +1 -1
  53. package/dist/foundation/primitives/index.js +1 -1
  54. package/dist/foundation/primitives/scrollViewport/ScrollViewport.vue.d.ts +9 -0
  55. package/dist/foundation/styles/index.js +9 -10
  56. package/dist/foundation/styles/index.js.map +1 -1
  57. package/dist/index.css +83 -36
  58. package/dist/index.js +467 -465
  59. package/dist/index.js.map +1 -1
  60. package/dist/presentation/actions/index.js +2 -2
  61. package/dist/presentation/display/index.js +178 -177
  62. package/dist/presentation/display/index.js.map +1 -1
  63. package/dist/presentation/feedback/index.js +3 -3
  64. package/dist/presentation/feedback/toastHost/index.js +1 -1
  65. package/dist/presentation/forms/index.js +2 -2
  66. package/dist/presentation/layout/appShell/AppShellMain.vue.d.ts +14 -5
  67. package/dist/presentation/layout/index.js +1 -1
  68. package/dist/presentation/layout/scrollArea/ScrollArea.vue.d.ts +7 -0
  69. package/dist/presentation/layout/virtualScrollArea/VirtualScrollArea.vue.d.ts +6 -0
  70. package/dist/presentation/nav/accountMenu/AccountMenu.vue.d.ts +131 -0
  71. package/dist/presentation/nav/accountMenu/index.d.ts +1 -0
  72. package/dist/presentation/nav/index.d.ts +1 -0
  73. package/dist/presentation/nav/index.js +72 -71
  74. package/dist/presentation/overlays/index.js +4 -4
  75. package/package.json +1 -1
  76. package/dist/chunks/AppSwitcherMenu.vue_vue_type_script_setup_true_lang-DVqdOOst.js.map +0 -1
  77. package/dist/chunks/CssExtensions-ctGVlfYU.js +0 -161
  78. package/dist/chunks/CssExtensions-ctGVlfYU.js.map +0 -1
  79. package/dist/chunks/KanbanCard.vue_vue_type_script_setup_true_lang-BCnquIre.js.map +0 -1
  80. package/dist/chunks/MasonryLayout.vue_vue_type_script_setup_true_lang-TuNWahLw.js.map +0 -1
  81. package/dist/chunks/Tones-CQu-OvAk.js.map +0 -1
  82. package/dist/chunks/index-CuiXILXc.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Button.vue_vue_type_script_setup_true_lang-BrgCAsgC.js","sources":["../../src/presentation/actions/button/Button.variants.ts","../../src/presentation/actions/button/Button.vue"],"sourcesContent":["import { tv, Tones, ColorTone, type VariantProps } from '../../../foundation/styles';\n\n/** Defines the Button visual surface style. */\nexport const ButtonVariant = {\n /** Refers to an opaque, filled surface. */\n Solid: 'solid',\n /** Refers to a muted/tinted fill. */\n Soft: 'soft',\n /** Refers to a subtle tinted fill + tone-colored border. */\n Surface: 'surface',\n /** Refers to a transparent fill + tone border. */\n Outline: 'outline',\n /** Refers to a borderless, transparent-at-rest button. */\n Ghost: 'ghost',\n /** Refers to a borderless button that reveals a bordered chip on hover/focus. */\n Reveal: 'reveal',\n /** Refers to an inline text link. */\n Link: 'link',\n /** Refers to a translucent glass wash + blur. */\n Glass: 'glass',\n /** Refers to a glass surface with a hairline border. */\n GlassSurface: 'glass-surface',\n} as const;\n\nexport type ButtonVariant = (typeof ButtonVariant)[keyof typeof ButtonVariant];\n\n/** Defines the Button silhouette. */\nexport const ButtonShape = {\n /** Refers to the default (text-width) shape. */\n Default: 'default',\n /** Refers to a square (1:1) icon shape. */\n Square: 'square',\n /** Refers to a circular icon shape. */\n Circle: 'circle',\n} as const;\n\nexport type ButtonShape = (typeof ButtonShape)[keyof typeof ButtonShape];\n\n/** Button visual surface — see Button.standard.md + Button.spec.md. */\nexport const buttonVariants = tv({\n base: [\n // layout\n 'group inline-flex items-center justify-center gap-2',\n // typography\n 'font-medium align-middle',\n // borders (forced-colors fallback)\n 'border border-transparent',\n 'forced-colors:border-[ButtonBorder]',\n // transitions (color only)\n 'transition-colors duration-150 ease-out',\n 'motion-reduce:transition-none',\n // focus\n 'outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background',\n // disabled (native attr handles click-blocking; pointer-events-none would\n // suppress the cursor visual, so we don't add it here)\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n // loading — dimmed and busy, but still focusable (clicks are swallowed in the handler)\n 'data-[state=loading]:opacity-70 data-[state=loading]:cursor-progress',\n // skeleton state — wins over everything; the box keeps its size and radius, motion only when allowed\n 'data-[state=skeleton]:bg-muted! data-[state=skeleton]:bg-none! data-[state=skeleton]:shadow-none! data-[state=skeleton]:text-transparent! data-[state=skeleton]:border-transparent! data-[state=skeleton]:cursor-default! data-[state=skeleton]:!pointer-events-none data-[state=skeleton]:motion-safe:animate-pulse',\n 'data-[state=skeleton]:[&>*]:!invisible',\n // forced colours repaint the fill and show the label — the placeholder keeps a `GrayText` outline instead\n 'data-[state=skeleton]:forced-colors:[forced-color-adjust:none] data-[state=skeleton]:forced-colors:bg-[color:Canvas]! data-[state=skeleton]:forced-colors:outline-1 data-[state=skeleton]:forced-colors:outline-solid data-[state=skeleton]:forced-colors:-outline-offset-1 data-[state=skeleton]:forced-colors:outline-[color:GrayText]',\n ],\n variants: {\n variant: {\n solid: '',\n soft: '',\n surface: '',\n outline: 'bg-transparent',\n ghost: 'bg-transparent',\n // Borderless + transparent at rest; on hover / focus-visible a bordered chip is\n // revealed (border + bg + foreground text). Per-tone reveal target set via\n // compoundVariants below. Pairs with `hoverSlot` for the icon-swap affordance.\n reveal: 'bg-transparent border-transparent',\n link: 'bg-transparent h-auto! p-0! rounded-none! underline-offset-4 hover:underline focus-visible:ring-offset-0',\n // Base = neutral/default tone: dark image-overlay wash + blur. Non-neutral tones resolve\n // through the shared `Tones.glass` palette via compoundVariants below (so tone + color\n // overrides apply). `backdrop-blur-md` stays here for every tone.\n glass: 'backdrop-blur-md',\n 'glass-surface': 'backdrop-blur-md border-white/10',\n },\n tone: {\n primary: '',\n neutral: '',\n danger: '',\n success: '',\n warning: '',\n },\n size: {\n // min-h/min-w floor keeps the hit-target ≥ 24×24 (WCAG 2.2 SC 2.5.8) even when\n // --ui-density-scale < 1 would otherwise shrink it below the floor. Applies to\n // square/circle xs too (the min-h sets the box height; min-w the width).\n xs: 'h-[calc(1.5rem*var(--ui-density-scale,1))] min-h-6 min-w-6 px-[calc(0.5rem*var(--ui-density-scale,1))] text-xs rounded-sm gap-1',\n sm: 'h-[calc(2rem*var(--ui-density-scale,1))] px-[calc(0.75rem*var(--ui-density-scale,1))] text-sm rounded-md gap-1.5',\n md: 'h-[calc(2.5rem*var(--ui-density-scale,1))] px-[calc(1rem*var(--ui-density-scale,1))] text-sm rounded-md gap-2',\n lg: 'h-[calc(3rem*var(--ui-density-scale,1))] px-[calc(1.5rem*var(--ui-density-scale,1))] text-base rounded-lg gap-2',\n xl: 'h-[calc(3.5rem*var(--ui-density-scale,1))] px-[calc(2rem*var(--ui-density-scale,1))] text-base rounded-lg gap-2.5',\n },\n shape: {\n default: '',\n square: 'aspect-square px-0!',\n circle: 'aspect-square px-0! rounded-full!',\n },\n fullWidth: {\n true: 'w-full',\n false: '',\n },\n wrap: {\n true: 'whitespace-normal text-left',\n false: 'whitespace-nowrap text-ellipsis overflow-hidden',\n },\n },\n compoundVariants: [\n // === SOLID × tone ===\n {\n variant: 'solid',\n tone: 'primary',\n class: 'bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/95',\n },\n { variant: 'solid', tone: 'neutral', class: 'bg-muted text-foreground hover:bg-muted/80 active:bg-muted/85' },\n {\n variant: 'solid',\n tone: 'danger',\n class: 'bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/95',\n },\n {\n variant: 'solid',\n tone: 'success',\n class: 'bg-success text-success-foreground hover:bg-success/90 active:bg-success/95',\n },\n {\n variant: 'solid',\n tone: 'warning',\n class: 'bg-warning text-warning-foreground hover:bg-warning/90 active:bg-warning/95',\n },\n\n // === SOFT × tone ===\n {\n variant: 'soft',\n tone: 'primary',\n class: 'bg-primary-soft text-primary-soft-foreground hover:bg-primary-soft/80 active:bg-primary-soft/85',\n },\n { variant: 'soft', tone: 'neutral', class: 'bg-muted/60 text-foreground hover:bg-muted/80 active:bg-muted/85' },\n {\n variant: 'soft',\n tone: 'danger',\n class:\n 'bg-destructive-soft text-destructive-soft-foreground hover:bg-destructive-soft/80 active:bg-destructive-soft/85',\n },\n {\n variant: 'soft',\n tone: 'success',\n class: 'bg-success-soft text-success-soft-foreground hover:bg-success-soft/80 active:bg-success-soft/85',\n },\n {\n variant: 'soft',\n tone: 'warning',\n class: 'bg-warning-soft text-warning-soft-foreground hover:bg-warning-soft/80 active:bg-warning-soft/85',\n },\n\n /*\n * `text-{tone}-soft-foreground`, not `text-{tone}`, everywhere the fill is transparent or\n * a light tint (surface · outline · ghost · reveal · link below).\n *\n * `text-{tone}` is the SOLID-fill accent: it is picked to carry the tone at full strength\n * against its own opaque background, and on a light surface it is simply too light —\n * `outline/warning` measured 1.85:1 and `surface/warning` 1.72:1 on this file's own\n * `theme-smart-qr` card. `--color-{tone}-soft-foreground` is the token minted for exactly\n * this pairing, and the `soft` rows below have always used it; these rows were the ones\n * that were missed. Borders stay full-strength `{tone}` so the tone still reads.\n * Matches `foundation/styles/constants/Tones.ts`, which routes `soft` + `outline` the same way.\n */\n // === SURFACE × tone (subtle tinted bg + visible tone-colored border) ===\n {\n variant: 'surface',\n tone: 'primary',\n class: 'bg-primary/5 border-primary/40 text-primary-soft-foreground hover:bg-primary/10 active:bg-primary/15',\n },\n {\n variant: 'surface',\n tone: 'neutral',\n class: 'bg-muted/30 border-border-strong text-foreground hover:bg-muted/50 active:bg-muted/70',\n },\n {\n variant: 'surface',\n tone: 'danger',\n class:\n 'bg-destructive/5 border-destructive/40 text-destructive-soft-foreground hover:bg-destructive/10 active:bg-destructive/15',\n },\n {\n variant: 'surface',\n tone: 'success',\n class: 'bg-success/5 border-success/40 text-success-soft-foreground hover:bg-success/10 active:bg-success/15',\n },\n {\n variant: 'surface',\n tone: 'warning',\n class: 'bg-warning/10 border-warning/40 text-warning-soft-foreground hover:bg-warning/15 active:bg-warning/20',\n },\n\n // === OUTLINE × tone ===\n {\n variant: 'outline',\n tone: 'primary',\n class: 'border-primary/50 text-primary-soft-foreground hover:bg-primary/10 active:bg-primary/15',\n },\n {\n variant: 'outline',\n tone: 'neutral',\n class: 'border-border-strong text-foreground hover:bg-muted/50 active:bg-muted/70',\n },\n {\n variant: 'outline',\n tone: 'danger',\n class: 'border-destructive/50 text-destructive-soft-foreground hover:bg-destructive/10 active:bg-destructive/15',\n },\n {\n variant: 'outline',\n tone: 'success',\n class: 'border-success/50 text-success-soft-foreground hover:bg-success/10 active:bg-success/15',\n },\n {\n variant: 'outline',\n tone: 'warning',\n class: 'border-warning/60 text-warning-soft-foreground hover:bg-warning/10 active:bg-warning/15',\n },\n\n // === GHOST × tone ===\n {\n variant: 'ghost',\n tone: 'primary',\n class: 'text-primary-soft-foreground hover:bg-primary/10 active:bg-primary/15',\n },\n { variant: 'ghost', tone: 'neutral', class: 'text-foreground hover:bg-foreground/10 active:bg-foreground/15' },\n {\n variant: 'ghost',\n tone: 'danger',\n class: 'text-destructive-soft-foreground hover:bg-destructive/10 active:bg-destructive/15',\n },\n {\n variant: 'ghost',\n tone: 'success',\n class: 'text-success-soft-foreground hover:bg-success/10 active:bg-success/15',\n },\n {\n variant: 'ghost',\n tone: 'warning',\n class: 'text-warning-soft-foreground hover:bg-warning/10 active:bg-warning/15',\n },\n\n // === REVEAL × tone (idle: muted transparent · hover/focus-visible: bordered chip revealed) ===\n // Idle text sits at reduced emphasis (muted-foreground / tone-tinted); hover & focus-visible\n // resolve the border + a surface background + full-emphasis foreground so a bordered chip\n // \"appears\". neutral is the common case (borderless icon affordance).\n /* The `/70` idle alpha is the intended de-emphasis and is kept; only the token under it\n changes, which is what lifts idle `warning` off 1.56:1. */\n {\n variant: 'reveal',\n tone: 'primary',\n class:\n 'text-primary-soft-foreground/70 hover:border-border hover:bg-background hover:text-primary-soft-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-primary-soft-foreground active:bg-muted/70',\n },\n {\n variant: 'reveal',\n tone: 'neutral',\n class:\n 'text-muted-foreground hover:border-border hover:bg-background hover:text-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-foreground active:bg-muted/70',\n },\n {\n variant: 'reveal',\n tone: 'danger',\n class:\n 'text-destructive-soft-foreground/70 hover:border-border hover:bg-background hover:text-destructive-soft-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-destructive-soft-foreground active:bg-muted/70',\n },\n {\n variant: 'reveal',\n tone: 'success',\n class:\n 'text-success-soft-foreground/70 hover:border-border hover:bg-background hover:text-success-soft-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-success-soft-foreground active:bg-muted/70',\n },\n {\n variant: 'reveal',\n tone: 'warning',\n class:\n 'text-warning-soft-foreground/70 hover:border-border hover:bg-background hover:text-warning-soft-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-warning-soft-foreground active:bg-muted/70',\n },\n\n // === LINK × tone (h/padding/radius cleared by variant) ===\n { variant: 'link', tone: 'primary', class: 'text-primary-soft-foreground' },\n { variant: 'link', tone: 'neutral', class: 'text-foreground' },\n { variant: 'link', tone: 'danger', class: 'text-destructive-soft-foreground' },\n { variant: 'link', tone: 'success', class: 'text-success-soft-foreground' },\n { variant: 'link', tone: 'warning', class: 'text-warning-soft-foreground' },\n\n // === GLASS / GLASS-SURFACE × tone ===\n // neutral = the image-overlay default: fixed dark wash + light text (reads over any imagery).\n {\n variant: ['glass', 'glass-surface'],\n tone: 'neutral',\n class: 'bg-black/45 text-white/70 hover:bg-black/65 hover:text-white active:bg-black/75',\n },\n // Every other tone resolves through the shared `Tones.glass` palette (`bg-{tone}/30 text-{tone}-foreground`)\n // so `tone=\"success\"` and per-instance `color` apply, plus a tone-matched hover / active wash.\n {\n variant: ['glass', 'glass-surface'],\n tone: 'primary',\n class: `${Tones.glass.primary} hover:bg-primary/45 active:bg-primary/55`,\n },\n {\n variant: ['glass', 'glass-surface'],\n tone: 'danger',\n class: `${Tones.glass.danger} hover:bg-destructive/45 active:bg-destructive/55`,\n },\n {\n variant: ['glass', 'glass-surface'],\n tone: 'success',\n class: `${Tones.glass.success} hover:bg-success/45 active:bg-success/55`,\n },\n {\n variant: ['glass', 'glass-surface'],\n tone: 'warning',\n class: `${Tones.glass.warning} hover:bg-warning/45 active:bg-warning/55`,\n },\n // glass-surface non-neutral tones swap the white hairline for a tone-accent border (50% alpha).\n { variant: 'glass-surface', tone: 'primary', class: 'border-primary/50' },\n { variant: 'glass-surface', tone: 'danger', class: 'border-destructive/50' },\n { variant: 'glass-surface', tone: 'success', class: 'border-success/50' },\n { variant: 'glass-surface', tone: 'warning', class: 'border-warning/50' },\n ],\n defaultVariants: {\n variant: 'solid',\n tone: 'primary',\n size: 'md',\n shape: 'default',\n fullWidth: false,\n wrap: false,\n },\n});\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\n/* Compile-time lock: enum values ≡ tv variant/tone/shape value-sets (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertButtonVariant: AssertExact<\n ButtonVariant,\n NonNullable<VariantProps<typeof buttonVariants>['variant']>\n> = true;\nconst _assertButtonTone: AssertExact<ColorTone, NonNullable<VariantProps<typeof buttonVariants>['tone']>> = true;\nconst _assertButtonShape: AssertExact<ButtonShape, NonNullable<VariantProps<typeof buttonVariants>['shape']>> = true;\nvoid _assertButtonVariant;\nvoid _assertButtonTone;\nvoid _assertButtonShape;\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes, VNodeChild } from 'vue';\nimport type {\n ColorProp,\n ColorTone,\n PaddingProp,\n RadiusProp,\n SizePreset,\n SizeUnion,\n SizeValue,\n} from '../../../foundation/styles';\nimport type { ButtonVariant, ButtonShape, ButtonVariants } from './Button.variants';\n\n/* Named size presets for variant lookup. Any other string / number / object flows to box-overrides. */\ntype ButtonSizePreset = Extract<SizePreset, 'xs' | 'sm' | 'md' | 'lg' | 'xl'>;\n\n/* `size`: preset (variant class) | number/string (square inline dims) | `{width,height,minWidth,minHeight,boxSize}`.\n Raw/object forms set inline dims only — pair with `padding` if text-bearing. */\nexport type ButtonSize = SizeUnion<ButtonSizePreset>;\n\n/** @internal The type-only surface `ButtonProps` inherits — native attributes plus the variant keys. `onClick` stays\n typed so `@click` compiles under strict templates; the button still gates it at runtime (see `handleClick`). */\ntype ButtonAttributes = Omit<ButtonHTMLAttributes, 'type' | 'disabled' | 'color'> &\n Omit<ButtonVariants, 'size' | 'variant' | 'tone' | 'shape'>;\n\n/** Defines props for the button. */\nexport interface ButtonProps extends /* @vue-ignore */ ButtonAttributes {\n /** The visual surface style. */\n readonly variant?: ButtonVariant;\n\n /** The semantic tone palette. */\n readonly tone?: ColorTone;\n\n /** The button silhouette (default · square · circle). */\n readonly shape?: ButtonShape;\n\n /** The size — preset name OR raw value OR explicit dim object; see `ButtonSize` for details. */\n readonly size?: ButtonSize;\n\n /** The per-instance color override for `tone` — a string derives all slots, an object sets each. */\n readonly color?: ColorProp;\n\n /** The slot before children. Prefer the `leading` named slot. */\n readonly leadingSlot?: VNodeChild;\n\n /** The slot after children. Prefer the `trailing` named slot. */\n readonly trailingSlot?: VNodeChild;\n\n /** The content shown in place of children on hover / focus-visible (CSS-only swap — no JS hover state).\n Idle → children visible; hover/focus-visible → `hoverSlot` visible. Pairs with `variant=\"reveal\"`\n for a reveal-on-hover icon swap. When undefined (and no `hover` slot), children render normally. */\n readonly hoverSlot?: VNodeChild;\n\n /** The indicator replacing the built-in `<Spinner/>` while loading. Prefer the `loading` slot. */\n readonly loadingSlot?: VNodeChild;\n\n /** The action-loading state — a spinner replaces the leading icon, the label stays, it dims and blocks clicks. */\n readonly isLoading?: boolean;\n\n /** The text that replaces the label while loading; omit it to keep the label. Consumer-supplied (i18n). */\n readonly loadingText?: string;\n\n /** The content-loading state — keeps size and radius, masks content; follows a `DataRegion` first load. */\n readonly isSkeleton?: boolean;\n\n /** The disabled state — drops focus order and clicks. Inherited from an enclosing `Field`. */\n readonly isDisabled?: boolean;\n\n /** The full-width state — stretches to fill container width. */\n readonly isFullWidth?: boolean;\n\n /** The multi-line state — allows label wrap; default truncates to single line. */\n readonly isMultiline?: boolean;\n\n /** The as-child flag — renders as the single child element via `Primitive`'s `asChild` merge. */\n readonly asChild?: boolean;\n\n /** The independent padding override (preset token or `{x, y}` object). */\n readonly padding?: PaddingProp;\n\n /** The independent radius override (preset token or raw value). */\n readonly radius?: RadiusProp;\n\n /** The explicit width override. Number = px; string = any CSS unit. */\n readonly width?: SizeValue;\n\n /** The explicit height override. Number = px; string = any CSS unit. */\n readonly height?: SizeValue;\n\n /** The min width reserved so the button doesn't reflow when its label morphs. */\n readonly minWidth?: SizeValue;\n\n /** The min height reserved — symmetric with `minWidth`. */\n readonly minHeight?: SizeValue;\n\n /** The square-size shorthand — fallback for `width` and `height`, which win when both are set. */\n readonly boxSize?: SizeValue;\n\n /** The button type. Default `ButtonType.Button` — NOT browser-default `'submit'`. */\n readonly type?: ButtonType;\n\n /** The long-press duration (ms). Default 500. Out-of-range values trigger a dev warning. */\n readonly longPressDelay?: number;\n\n /** The click-throttle window (ms) — first wins; subsequent swallowed via `preventDefault()`. */\n readonly debounceMs?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n normalizeStyle,\n onBeforeUnmount,\n useAttrs,\n useTemplateRef,\n watch,\n watchEffect,\n type ComponentPublicInstance,\n type StyleValue,\n} from 'vue';\nimport type { ClassValue } from 'clsx';\nimport {\n AriaAttribute,\n composeEventHandlers,\n ButtonType,\n HtmlElement,\n Key,\n PressExtensions,\n type PressEvent,\n} from '../../../foundation/dom';\nimport { cn, ColorExtensions, CssExtensions, type BoxSizeOverrides } from '../../../foundation/styles';\nimport { IsDevelopment } from '../../../foundation/config';\nimport { OptionalExtensions } from '../../../foundation/optionals';\nimport { Primitive } from '../../../foundation/primitives';\nimport { useFormControl } from '../../../foundation/primitives/formControlContext/FormControlContext';\nimport { Spinner } from '../../../foundation/icons';\nimport { useDebounceHandler } from '../../../foundation/async';\nimport { useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { buttonVariants } from './Button.variants';\n\nconst ComponentName = 'Button';\n\nconst ButtonSizePresets: ReadonlySet<string> = new Set<ButtonSizePreset>(['xs', 'sm', 'md', 'lg', 'xl']);\n\n/* Observable state surfaced via the `data-state` DOM attribute. */\nconst ButtonDataState = {\n Loading: 'loading',\n Skeleton: 'skeleton',\n Disabled: 'disabled',\n} as const;\ntype ButtonDataState = (typeof ButtonDataState)[keyof typeof ButtonDataState];\n\n/* `inheritAttrs: false` because three attrs are *owned*, not forwarded: `class` and `style` fold\n into the component's own `cn()` / style resolution so consumer values still win last (plain\n fallthrough would append outside `cn()`, losing tailwind-merge conflict resolution), and\n `onClick` is intercepted so loading / skeleton / long-press / the debounce window can swallow a\n click before the consumer's handler sees it. Everything else passes straight through. */\n/* The name is spelled out, not `ComponentName`: `defineOptions()` is hoisted out of `setup()`,\n so it cannot reference a locally declared const. */\n/** Renders a button that runs one command, carrying tone and size variants plus loading and skeleton states. */\ndefineOptions({ name: 'Button', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ButtonProps>(), {\n type: ButtonType.Button,\n longPressDelay: PressExtensions.longPressDelay.default,\n /* Explicit `undefined` defaults keep Vue's boolean casting from turning an absent prop into\n `false` — `isDisabled` must stay undefined to inherit from an enclosing `Field`. */\n isDisabled: undefined,\n isLoading: undefined,\n isSkeleton: undefined,\n isFullWidth: undefined,\n isMultiline: undefined,\n asChild: false,\n /* `VNodeChild` includes `boolean`, so Vue's boolean casting turns an absent node-valued prop\n into `false` rather than `undefined` — which reads as \"supplied\" at every `!== undefined`\n check. An explicit `undefined` default suppresses the cast. */\n leadingSlot: undefined,\n trailingSlot: undefined,\n hoverSlot: undefined,\n loadingSlot: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the press begins — pointer-down OR Space/Enter keydown (first event in a gesture). */\n 'press-start': [event: PressEvent<HTMLButtonElement>];\n\n /** Fires when the press ends — pointer-up/cancel OR Space/Enter keyup. */\n 'press-end': [event: PressEvent<HTMLButtonElement>];\n\n /** Fires when the pointer is held for `longPressDelay` ms. Suppresses the next click. */\n 'long-press': [event: PressEvent<HTMLButtonElement>];\n}>();\n\nconst slots = defineSlots<{\n /** The button's own label. Under `asChild`, the single element the button merges onto. */\n default?(): unknown;\n\n /** The indicator shown while loading. Falls back to `loadingSlot`, then to the built-in `Spinner`. */\n loading?(): unknown;\n\n /** Rendered before the label, for an icon. Falls back to `leadingSlot`. */\n leading?(): unknown;\n\n /** Rendered after the label, for an icon. Falls back to `trailingSlot`. */\n trailing?(): unknown;\n\n /** The content swapped in on hover / focus-visible, overlaying the label. Falls back to `hoverSlot`. */\n hover?(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* Stable render-only wrappers for the node-valued props, so each can render as the fallback of its\n named-slot twin. Stable identity (created once) keeps them from remounting on every render. */\nconst nodeProp = (read: () => VNodeChild) => defineComponent({ render: read });\nconst LeadingSlotProp = nodeProp(() => props.leadingSlot);\nconst TrailingSlotProp = nodeProp(() => props.trailingSlot);\nconst HoverSlotProp = nodeProp(() => props.hoverSlot);\nconst LoadingSlotProp = nodeProp(() => props.loadingSlot);\n\n/* Inherit disabled-state from an enclosing `Field` when the local prop is omitted; standalone when\n no context. Bound to the object, never destructured — every field on it is a live getter. */\nconst formControl = useFormControl();\nconst resolvedDisabled = computed(() => props.isDisabled ?? formControl?.isDisabled ?? false);\n\n/* An absent `isSkeleton` follows the nearest `DataRegion` first load; an explicit one wins either way. */\nconst skeleton = useSkeletonState(() => props.isSkeleton);\nconst skeletonActive = computed(() => skeleton.isSkeleton.value);\nconst loadingActive = computed(() => !skeletonActive.value && !!props.isLoading);\nconst isInactive = computed(() => loadingActive.value || skeletonActive.value || resolvedDisabled.value);\n\n/* The spinner swaps with a leading icon when there is one; without one it centers over the label, whose\n box keeps the button's width. */\nfunction hasLeading(): boolean {\n return slots.leading !== undefined || props.leadingSlot !== undefined;\n}\n\nconst dataState = computed<ButtonDataState | undefined>(() =>\n skeletonActive.value\n ? ButtonDataState.Skeleton\n : loadingActive.value\n ? ButtonDataState.Loading\n : resolvedDisabled.value\n ? ButtonDataState.Disabled\n : undefined,\n);\n\nconst safeLongPressDelay = computed(() =>\n !Number.isFinite(props.longPressDelay) ||\n props.longPressDelay < PressExtensions.longPressDelay.min ||\n props.longPressDelay > PressExtensions.longPressDelay.max\n ? PressExtensions.longPressDelay.default\n : props.longPressDelay,\n);\n\nwatchEffect(() => {\n if (!IsDevelopment) return;\n if (props.isLoading && props.isSkeleton) {\n console.warn(\n `[${ComponentName}] \\`isLoading\\` and \\`isSkeleton\\` are mutually exclusive — \\`isSkeleton\\` takes precedence.`,\n );\n }\n if (safeLongPressDelay.value !== props.longPressDelay) {\n console.warn(\n `[${ComponentName}] longPressDelay=${props.longPressDelay}ms is outside reasonable range (${PressExtensions.longPressDelay.min}–${PressExtensions.longPressDelay.max}ms). Falling back to ${PressExtensions.longPressDelay.default}ms.`,\n );\n }\n if (\n slots.default === undefined &&\n attrs[AriaAttribute.Label] === undefined &&\n attrs[AriaAttribute.LabelledBy] === undefined\n ) {\n console.warn(\n `[${ComponentName}] icon-only button (no text children) is missing an accessible name — pass \\`aria-label\\` or \\`aria-labelledby\\` (Button.standard.md rule 12).`,\n );\n }\n});\n\n/* Parse the union-typed `size` prop into preset (for variant lookup) + box overrides (for inline dims). */\nconst parsedSize = computed(() => CssExtensions.parseSizeUnion<ButtonSizePreset>(props.size, ButtonSizePresets));\n\nconst rootClass = computed(() =>\n cn(\n buttonVariants({\n variant: props.variant,\n tone: props.tone,\n size: parsedSize.value.preset,\n shape: props.shape,\n fullWidth: props.isFullWidth,\n wrap: props.isMultiline,\n }),\n attrs.class as ClassValue,\n ),\n);\n\nconst overrideStyle = computed<StyleValue | undefined>(() => {\n const padStyle = CssExtensions.resolvePadding(props.padding);\n const radStyle = CssExtensions.resolveRadius(props.radius);\n /* BoxLayout overrides — `size` is the base; flat width / height / minWidth / minHeight / boxSize win. */\n const composedBox: BoxSizeOverrides = {\n ...(parsedSize.value.box ?? {}),\n ...(props.width !== undefined ? { width: props.width } : {}),\n ...(props.height !== undefined ? { height: props.height } : {}),\n ...(props.minWidth !== undefined ? { minWidth: props.minWidth } : {}),\n ...(props.minHeight !== undefined ? { minHeight: props.minHeight } : {}),\n ...(props.boxSize !== undefined ? { boxSize: props.boxSize } : {}),\n };\n const boxStyle = CssExtensions.resolveBoxSize(composedBox);\n /* Per-instance color override → sets CSS vars on element, scoped locally. */\n const colorStyle = ColorExtensions.toneColorOverride(props.color, props.tone);\n const consumerStyle = attrs.style as StyleValue | undefined;\n if (!padStyle && !radStyle && !boxStyle && !colorStyle && !consumerStyle) return undefined;\n return normalizeStyle([colorStyle, padStyle, radStyle, boxStyle, consumerStyle]);\n});\n\n// ---------------------------------------------------------------------------\n// Press / long-press / debounce wiring.\n// ---------------------------------------------------------------------------\n\nlet isPressing = false;\nlet longPressTimer: ReturnType<typeof setTimeout> | undefined;\nlet longPressFired = false;\n\nconst instance = getCurrentInstance();\n\n/* React armed the long-press timer only when an `onLongPress` prop was passed. A declared emit has\n no such signal — `emit()` on an unlistened event is a silent no-op, but the fired flag would\n still swallow the following click on every long hold. The listener is read off the incoming\n vnode props at event time (declared-emit listeners are stripped from `attrs`), so an unlistened\n button never arms the timer at all. */\nfunction hasLongPressListener(): boolean {\n return instance?.vnode.props?.onLongPress !== undefined;\n}\n\nonBeforeUnmount(() => {\n if (longPressTimer !== undefined) clearTimeout(longPressTimer);\n});\n\nfunction cancelLongPress(): void {\n if (longPressTimer !== undefined) {\n clearTimeout(longPressTimer);\n longPressTimer = undefined;\n }\n}\n\nwatch(isInactive, (inactive) => {\n if (!inactive) return;\n cancelLongPress();\n isPressing = false;\n longPressFired = false;\n});\n\nfunction endPress(event: PressEvent<HTMLButtonElement>): void {\n if (isPressing) {\n isPressing = false;\n emit('press-end', event);\n }\n}\n\nfunction handlePointerDown(event: PointerEvent): void {\n if (isInactive.value || event.defaultPrevented || (event.button != null && event.button !== 0)) return;\n // Cancel any pending timer, then arm only on the first pointer of a gesture — a second\n // pointer-down must not stack a second long-press timer.\n cancelLongPress();\n if (!isPressing) {\n const pressEvent = event as PressEvent<HTMLButtonElement>;\n isPressing = true;\n longPressFired = false;\n emit('press-start', pressEvent);\n if (hasLongPressListener()) {\n longPressTimer = setTimeout(() => {\n if (isInactive.value) return;\n longPressFired = true;\n emit('long-press', pressEvent);\n longPressTimer = undefined;\n }, safeLongPressDelay.value);\n }\n }\n}\n\nfunction handlePointerUp(event: PointerEvent): void {\n cancelLongPress();\n endPress(event as PressEvent<HTMLButtonElement>);\n}\n\nfunction handlePointerCancel(event: PointerEvent): void {\n cancelLongPress();\n endPress(event as PressEvent<HTMLButtonElement>);\n}\n\nfunction handlePointerLeave(event: PointerEvent): void {\n // The subsequent pointerup may target elsewhere; release this gesture at its boundary.\n cancelLongPress();\n endPress(event as PressEvent<HTMLButtonElement>);\n}\n\nconst isActivationKey = (event: KeyboardEvent) => event.key === Key.Space || event.key === Key.Enter;\n\nfunction handleKeyDown(event: KeyboardEvent): void {\n if (isInactive.value || event.defaultPrevented || event.isComposing) return;\n if (isActivationKey(event) && !event.repeat && !isPressing) {\n isPressing = true;\n longPressFired = false;\n emit('press-start', event as PressEvent<HTMLButtonElement>);\n }\n}\n\nfunction handleKeyUp(event: KeyboardEvent): void {\n if (isActivationKey(event) && isPressing) {\n isPressing = false;\n emit('press-end', event as PressEvent<HTMLButtonElement>);\n }\n}\n\n/**\n * The consumer's listener for one attr, normalised. Vue merges several listeners for the same\n * event into an array (a wrapper component that binds `@click` on top of a forwarded `onClick`\n * produces exactly that), so the raw attr is not always callable.\n */\nfunction toHandler<E extends Event>(value: unknown): ((event: E) => void) | undefined {\n if (typeof value === 'function') return value as (event: E) => void;\n if (!Array.isArray(value)) return undefined;\n const handlers = value.filter((entry): entry is (event: E) => void => typeof entry === 'function');\n if (handlers.length === 0) return undefined;\n return (event) => {\n for (const handler of handlers) handler(event);\n };\n}\n\n// Long-press suppression happens BEFORE this — a suppressed click does NOT advance the throttle window.\nconst debouncedOnClick = useDebounceHandler(\n (event: MouseEvent) => toHandler<MouseEvent>(attrs.onClick)?.(event),\n () => props.debounceMs,\n);\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n if (isInactive.value) {\n // Block native activation too — e.g. `type=\"submit\"` must not submit while loading.\n event.preventDefault();\n return;\n }\n if (longPressFired) {\n longPressFired = false;\n event.preventDefault();\n return;\n }\n debouncedOnClick(event);\n}\n\n/* The attrs the component owns rather than forwards — see the `inheritAttrs: false` note above.\n Event names carry the single casing Vue's runtime understands (`on` + the event name with only\n its first letter capitalised); `onPointerDown` would bind a `pointer-down` listener. */\nconst OwnedAttributes: ReadonlySet<string> = new Set([\n 'class',\n 'style',\n 'onClick',\n 'onPointerdown',\n 'onPointerup',\n 'onPointercancel',\n 'onPointerleave',\n 'onKeydown',\n 'onKeyup',\n]);\n\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\n/** The consumer's own listener for an owned event, so it can be chained ahead of the component's. */\nfunction consumerHandler<E extends Event>(name: string): ((event: E) => void) | undefined {\n return toHandler<E>(attrs[name]);\n}\n\n/* Assembled in the React original's spread order: the component's own attributes first, its event\n chain next, consumer attrs last so they still win. */\nconst rootProps = computed(() => ({\n type: props.asChild ? undefined : props.type,\n class: rootClass.value,\n style: overrideStyle.value,\n disabled: OptionalExtensions.from(resolvedDisabled.value, true),\n [AriaAttribute.Busy]: OptionalExtensions.from(loadingActive.value || skeletonActive.value, true),\n [AriaAttribute.Disabled]: OptionalExtensions.from(isInactive.value, true),\n tabindex: OptionalExtensions.from(skeletonActive.value || resolvedDisabled.value, -1),\n 'data-state': dataState.value,\n onClick: handleClick,\n onPointerdown: composeEventHandlers(consumerHandler<PointerEvent>('onPointerdown'), handlePointerDown),\n onPointerup: composeEventHandlers(consumerHandler<PointerEvent>('onPointerup'), handlePointerUp),\n onPointercancel: composeEventHandlers(consumerHandler<PointerEvent>('onPointercancel'), handlePointerCancel),\n onPointerleave: composeEventHandlers(consumerHandler<PointerEvent>('onPointerleave'), handlePointerLeave),\n onKeydown: composeEventHandlers(consumerHandler<KeyboardEvent>('onKeydown'), handleKeyDown),\n onKeyup: composeEventHandlers(consumerHandler<KeyboardEvent>('onKeyup'), handleKeyUp),\n ...passthroughAttrs.value,\n}));\n\nconst root = useTemplateRef<ComponentPublicInstance>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\nconst el = computed<HTMLElement | null>(() => {\n const node = root.value?.$el;\n return node instanceof HTMLElement ? node : null;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Renders an action button — for text and/or icon content. -->\n <Primitive ref=\"root\" :as=\"HtmlElement.Button\" :as-child=\"asChild\" v-bind=\"rootProps\">\n <!-- asChild → the merge target owns its children; leading/trailing/loading chrome is not rendered. -->\n <slot v-if=\"asChild\" />\n\n <template v-else-if=\"loadingActive && (hasLeading() || loadingText !== undefined)\">\n <!-- The spinner stands where the leading icon was; the label (or loadingText) stays readable. -->\n <slot name=\"loading\">\n <LoadingSlotProp v-if=\"loadingSlot !== undefined\" />\n <Spinner v-else />\n </slot>\n <span v-if=\"loadingText !== undefined\">{{ loadingText }}</span>\n <slot v-else />\n <slot name=\"trailing\"><TrailingSlotProp v-if=\"trailingSlot !== undefined\" /></slot>\n </template>\n\n <template v-else-if=\"loadingActive\">\n <!-- No icon to swap: the label turns transparent, keeping the width and the accessible name, and the\n spinner centers over it. -->\n <span class=\"relative inline-flex items-center justify-center\">\n <span class=\"inline-flex items-center gap-2 opacity-0\">\n <slot />\n <slot name=\"trailing\"><TrailingSlotProp v-if=\"trailingSlot !== undefined\" /></slot>\n </span>\n <span class=\"absolute inset-0 inline-flex items-center justify-center\">\n <slot name=\"loading\">\n <LoadingSlotProp v-if=\"loadingSlot !== undefined\" />\n <Spinner v-else />\n </slot>\n </span>\n </span>\n </template>\n\n <template v-else-if=\"hoverSlot !== undefined || $slots.hover\">\n <slot name=\"leading\"><LeadingSlotProp v-if=\"leadingSlot !== undefined\" /></slot>\n <!-- CSS-only hover/focus-visible swap: children occupy the box and reserve its size;\n the hover content overlays it centered. Toggle via `group-hover`/`group-focus-visible`\n on the root `group` — no JS hover state. `aria-hidden` on the hidden layer so AT\n reads one label. -->\n <span class=\"relative inline-flex items-center justify-center\">\n <span class=\"inline-flex items-center justify-center group-hover:invisible group-focus-visible:invisible\">\n <slot />\n </span>\n <span\n aria-hidden=\"true\"\n class=\"invisible absolute inset-0 inline-flex items-center justify-center group-hover:visible group-focus-visible:visible\"\n >\n <slot name=\"hover\"><HoverSlotProp v-if=\"hoverSlot !== undefined\" /></slot>\n </span>\n </span>\n <slot name=\"trailing\"><TrailingSlotProp v-if=\"trailingSlot !== undefined\" /></slot>\n </template>\n\n <template v-else>\n <slot name=\"leading\"><LeadingSlotProp v-if=\"leadingSlot !== undefined\" /></slot>\n <slot />\n <slot name=\"trailing\"><TrailingSlotProp v-if=\"trailingSlot !== undefined\" /></slot>\n </template>\n </Primitive>\n</template>\n"],"names":["_useSlots","_openBlock","_createBlock","_unref","_mergeProps","_renderSlot","_createElementBlock","_Fragment","Spinner","_createElementVNode","$slots"],"mappings":";;;;;;;;;;;;;;;;;;AAGO,MAAM,gBAAgB;AAAA;AAAA,EAE3B,OAAO;AAAA;AAAA,EAEP,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A,EAAA,KAAA,EAAA,CAAA;;;;;;;;;"}
1
+ {"version":3,"file":"Button.vue_vue_type_script_setup_true_lang-Cw0QS_Mm.js","sources":["../../src/presentation/actions/button/Button.variants.ts","../../src/presentation/actions/button/Button.vue"],"sourcesContent":["import { tv, Tones, ColorTone, type VariantProps } from '../../../foundation/styles';\n\n/** Defines the Button visual surface style. */\nexport const ButtonVariant = {\n /** Refers to an opaque, filled surface. */\n Solid: 'solid',\n /** Refers to a muted/tinted fill. */\n Soft: 'soft',\n /** Refers to a subtle tinted fill + tone-colored border. */\n Surface: 'surface',\n /** Refers to a transparent fill + tone border. */\n Outline: 'outline',\n /** Refers to a borderless, transparent-at-rest button. */\n Ghost: 'ghost',\n /** Refers to a borderless button that reveals a bordered chip on hover/focus. */\n Reveal: 'reveal',\n /** Refers to an inline text link. */\n Link: 'link',\n /** Refers to a translucent glass wash + blur. */\n Glass: 'glass',\n /** Refers to a glass surface with a hairline border. */\n GlassSurface: 'glass-surface',\n} as const;\n\nexport type ButtonVariant = (typeof ButtonVariant)[keyof typeof ButtonVariant];\n\n/** Defines the Button silhouette. */\nexport const ButtonShape = {\n /** Refers to the default (text-width) shape. */\n Default: 'default',\n /** Refers to a square (1:1) icon shape. */\n Square: 'square',\n /** Refers to a circular icon shape. */\n Circle: 'circle',\n} as const;\n\nexport type ButtonShape = (typeof ButtonShape)[keyof typeof ButtonShape];\n\n/** Button visual surface — see Button.standard.md + Button.spec.md. */\nexport const buttonVariants = tv({\n base: [\n // layout\n 'group inline-flex items-center justify-center gap-2',\n // typography\n 'font-medium align-middle',\n // borders (forced-colors fallback)\n 'border border-transparent',\n 'forced-colors:border-[ButtonBorder]',\n // transitions (color only)\n 'transition-colors duration-150 ease-out',\n 'motion-reduce:transition-none',\n // focus\n 'outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background',\n // disabled (native attr handles click-blocking; pointer-events-none would\n // suppress the cursor visual, so we don't add it here)\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n // loading — dimmed and busy, but still focusable (clicks are swallowed in the handler)\n 'data-[state=loading]:opacity-70 data-[state=loading]:cursor-progress',\n // skeleton state — wins over everything; the box keeps its size and radius, motion only when allowed\n 'data-[state=skeleton]:bg-muted! data-[state=skeleton]:bg-none! data-[state=skeleton]:shadow-none! data-[state=skeleton]:text-transparent! data-[state=skeleton]:border-transparent! data-[state=skeleton]:cursor-default! data-[state=skeleton]:!pointer-events-none data-[state=skeleton]:motion-safe:animate-pulse',\n 'data-[state=skeleton]:[&>*]:!invisible',\n // forced colours repaint the fill and show the label — the placeholder keeps a `GrayText` outline instead\n 'data-[state=skeleton]:forced-colors:[forced-color-adjust:none] data-[state=skeleton]:forced-colors:bg-[color:Canvas]! data-[state=skeleton]:forced-colors:outline-1 data-[state=skeleton]:forced-colors:outline-solid data-[state=skeleton]:forced-colors:-outline-offset-1 data-[state=skeleton]:forced-colors:outline-[color:GrayText]',\n ],\n variants: {\n variant: {\n solid: '',\n soft: '',\n surface: '',\n outline: 'bg-transparent',\n ghost: 'bg-transparent',\n // Borderless + transparent at rest; on hover / focus-visible a bordered chip is\n // revealed (border + bg + foreground text). Per-tone reveal target set via\n // compoundVariants below. Pairs with `hoverSlot` for the icon-swap affordance.\n reveal: 'bg-transparent border-transparent',\n link: 'bg-transparent h-auto! p-0! rounded-none! underline-offset-4 hover:underline focus-visible:ring-offset-0',\n // Base = neutral/default tone: dark image-overlay wash + blur. Non-neutral tones resolve\n // through the shared `Tones.glass` palette via compoundVariants below (so tone + color\n // overrides apply). `backdrop-blur-md` stays here for every tone.\n glass: 'backdrop-blur-md',\n 'glass-surface': 'backdrop-blur-md border-white/10',\n },\n tone: {\n primary: '',\n neutral: '',\n danger: '',\n success: '',\n warning: '',\n },\n size: {\n // min-h/min-w floor keeps the hit-target ≥ 24×24 (WCAG 2.2 SC 2.5.8) even when\n // --ui-density-scale < 1 would otherwise shrink it below the floor. Applies to\n // square/circle xs too (the min-h sets the box height; min-w the width).\n xs: 'h-[calc(1.5rem*var(--ui-density-scale,1))] min-h-6 min-w-6 px-[calc(0.5rem*var(--ui-density-scale,1))] text-xs rounded-sm gap-1',\n sm: 'h-[calc(2rem*var(--ui-density-scale,1))] px-[calc(0.75rem*var(--ui-density-scale,1))] text-sm rounded-md gap-1.5',\n md: 'h-[calc(2.5rem*var(--ui-density-scale,1))] px-[calc(1rem*var(--ui-density-scale,1))] text-sm rounded-md gap-2',\n lg: 'h-[calc(3rem*var(--ui-density-scale,1))] px-[calc(1.5rem*var(--ui-density-scale,1))] text-base rounded-lg gap-2',\n xl: 'h-[calc(3.5rem*var(--ui-density-scale,1))] px-[calc(2rem*var(--ui-density-scale,1))] text-base rounded-lg gap-2.5',\n },\n shape: {\n default: '',\n square: 'aspect-square px-0!',\n circle: 'aspect-square px-0! rounded-full!',\n },\n fullWidth: {\n true: 'w-full',\n false: '',\n },\n wrap: {\n true: 'whitespace-normal text-left',\n false: 'whitespace-nowrap text-ellipsis overflow-hidden',\n },\n },\n compoundVariants: [\n // === SOLID × tone ===\n {\n variant: 'solid',\n tone: 'primary',\n class: 'bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/95',\n },\n { variant: 'solid', tone: 'neutral', class: 'bg-muted text-foreground hover:bg-muted/80 active:bg-muted/85' },\n {\n variant: 'solid',\n tone: 'danger',\n class: 'bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/95',\n },\n {\n variant: 'solid',\n tone: 'success',\n class: 'bg-success text-success-foreground hover:bg-success/90 active:bg-success/95',\n },\n {\n variant: 'solid',\n tone: 'warning',\n class: 'bg-warning text-warning-foreground hover:bg-warning/90 active:bg-warning/95',\n },\n\n // === SOFT × tone ===\n {\n variant: 'soft',\n tone: 'primary',\n class: 'bg-primary-soft text-primary-soft-foreground hover:bg-primary-soft/80 active:bg-primary-soft/85',\n },\n { variant: 'soft', tone: 'neutral', class: 'bg-muted/60 text-foreground hover:bg-muted/80 active:bg-muted/85' },\n {\n variant: 'soft',\n tone: 'danger',\n class:\n 'bg-destructive-soft text-destructive-soft-foreground hover:bg-destructive-soft/80 active:bg-destructive-soft/85',\n },\n {\n variant: 'soft',\n tone: 'success',\n class: 'bg-success-soft text-success-soft-foreground hover:bg-success-soft/80 active:bg-success-soft/85',\n },\n {\n variant: 'soft',\n tone: 'warning',\n class: 'bg-warning-soft text-warning-soft-foreground hover:bg-warning-soft/80 active:bg-warning-soft/85',\n },\n\n /*\n * `text-{tone}-soft-foreground`, not `text-{tone}`, everywhere the fill is transparent or\n * a light tint (surface · outline · ghost · reveal · link below).\n *\n * `text-{tone}` is the SOLID-fill accent: it is picked to carry the tone at full strength\n * against its own opaque background, and on a light surface it is simply too light —\n * `outline/warning` measured 1.85:1 and `surface/warning` 1.72:1 on this file's own\n * `theme-smart-qr` card. `--color-{tone}-soft-foreground` is the token minted for exactly\n * this pairing, and the `soft` rows below have always used it; these rows were the ones\n * that were missed. Borders stay full-strength `{tone}` so the tone still reads.\n * Matches `foundation/styles/constants/Tones.ts`, which routes `soft` + `outline` the same way.\n */\n // === SURFACE × tone (subtle tinted bg + visible tone-colored border) ===\n {\n variant: 'surface',\n tone: 'primary',\n class: 'bg-primary/5 border-primary/40 text-primary-soft-foreground hover:bg-primary/10 active:bg-primary/15',\n },\n {\n variant: 'surface',\n tone: 'neutral',\n class: 'bg-muted/30 border-border-strong text-foreground hover:bg-muted/50 active:bg-muted/70',\n },\n {\n variant: 'surface',\n tone: 'danger',\n class:\n 'bg-destructive/5 border-destructive/40 text-destructive-soft-foreground hover:bg-destructive/10 active:bg-destructive/15',\n },\n {\n variant: 'surface',\n tone: 'success',\n class: 'bg-success/5 border-success/40 text-success-soft-foreground hover:bg-success/10 active:bg-success/15',\n },\n {\n variant: 'surface',\n tone: 'warning',\n class: 'bg-warning/10 border-warning/40 text-warning-soft-foreground hover:bg-warning/15 active:bg-warning/20',\n },\n\n // === OUTLINE × tone ===\n {\n variant: 'outline',\n tone: 'primary',\n class: 'border-primary/50 text-primary-soft-foreground hover:bg-primary/10 active:bg-primary/15',\n },\n {\n variant: 'outline',\n tone: 'neutral',\n class: 'border-border-strong text-foreground hover:bg-muted/50 active:bg-muted/70',\n },\n {\n variant: 'outline',\n tone: 'danger',\n class: 'border-destructive/50 text-destructive-soft-foreground hover:bg-destructive/10 active:bg-destructive/15',\n },\n {\n variant: 'outline',\n tone: 'success',\n class: 'border-success/50 text-success-soft-foreground hover:bg-success/10 active:bg-success/15',\n },\n {\n variant: 'outline',\n tone: 'warning',\n class: 'border-warning/60 text-warning-soft-foreground hover:bg-warning/10 active:bg-warning/15',\n },\n\n // === GHOST × tone ===\n {\n variant: 'ghost',\n tone: 'primary',\n class: 'text-primary-soft-foreground hover:bg-primary/10 active:bg-primary/15',\n },\n { variant: 'ghost', tone: 'neutral', class: 'text-foreground hover:bg-foreground/10 active:bg-foreground/15' },\n {\n variant: 'ghost',\n tone: 'danger',\n class: 'text-destructive-soft-foreground hover:bg-destructive/10 active:bg-destructive/15',\n },\n {\n variant: 'ghost',\n tone: 'success',\n class: 'text-success-soft-foreground hover:bg-success/10 active:bg-success/15',\n },\n {\n variant: 'ghost',\n tone: 'warning',\n class: 'text-warning-soft-foreground hover:bg-warning/10 active:bg-warning/15',\n },\n\n // === REVEAL × tone (idle: muted transparent · hover/focus-visible: bordered chip revealed) ===\n // Idle text sits at reduced emphasis (muted-foreground / tone-tinted); hover & focus-visible\n // resolve the border + a surface background + full-emphasis foreground so a bordered chip\n // \"appears\". neutral is the common case (borderless icon affordance).\n /* The `/70` idle alpha is the intended de-emphasis and is kept; only the token under it\n changes, which is what lifts idle `warning` off 1.56:1. */\n {\n variant: 'reveal',\n tone: 'primary',\n class:\n 'text-primary-soft-foreground/70 hover:border-border hover:bg-background hover:text-primary-soft-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-primary-soft-foreground active:bg-muted/70',\n },\n {\n variant: 'reveal',\n tone: 'neutral',\n class:\n 'text-muted-foreground hover:border-border hover:bg-background hover:text-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-foreground active:bg-muted/70',\n },\n {\n variant: 'reveal',\n tone: 'danger',\n class:\n 'text-destructive-soft-foreground/70 hover:border-border hover:bg-background hover:text-destructive-soft-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-destructive-soft-foreground active:bg-muted/70',\n },\n {\n variant: 'reveal',\n tone: 'success',\n class:\n 'text-success-soft-foreground/70 hover:border-border hover:bg-background hover:text-success-soft-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-success-soft-foreground active:bg-muted/70',\n },\n {\n variant: 'reveal',\n tone: 'warning',\n class:\n 'text-warning-soft-foreground/70 hover:border-border hover:bg-background hover:text-warning-soft-foreground focus-visible:border-border focus-visible:bg-background focus-visible:text-warning-soft-foreground active:bg-muted/70',\n },\n\n // === LINK × tone (h/padding/radius cleared by variant) ===\n { variant: 'link', tone: 'primary', class: 'text-primary-soft-foreground' },\n { variant: 'link', tone: 'neutral', class: 'text-foreground' },\n { variant: 'link', tone: 'danger', class: 'text-destructive-soft-foreground' },\n { variant: 'link', tone: 'success', class: 'text-success-soft-foreground' },\n { variant: 'link', tone: 'warning', class: 'text-warning-soft-foreground' },\n\n // === GLASS / GLASS-SURFACE × tone ===\n // neutral = the image-overlay default: fixed dark wash + light text (reads over any imagery).\n {\n variant: ['glass', 'glass-surface'],\n tone: 'neutral',\n class: 'bg-black/45 text-white/70 hover:bg-black/65 hover:text-white active:bg-black/75',\n },\n // Every other tone resolves through the shared `Tones.glass` palette (`bg-{tone}/30 text-{tone}-foreground`)\n // so `tone=\"success\"` and per-instance `color` apply, plus a tone-matched hover / active wash.\n {\n variant: ['glass', 'glass-surface'],\n tone: 'primary',\n class: `${Tones.glass.primary} hover:bg-primary/45 active:bg-primary/55`,\n },\n {\n variant: ['glass', 'glass-surface'],\n tone: 'danger',\n class: `${Tones.glass.danger} hover:bg-destructive/45 active:bg-destructive/55`,\n },\n {\n variant: ['glass', 'glass-surface'],\n tone: 'success',\n class: `${Tones.glass.success} hover:bg-success/45 active:bg-success/55`,\n },\n {\n variant: ['glass', 'glass-surface'],\n tone: 'warning',\n class: `${Tones.glass.warning} hover:bg-warning/45 active:bg-warning/55`,\n },\n // glass-surface non-neutral tones swap the white hairline for a tone-accent border (50% alpha).\n { variant: 'glass-surface', tone: 'primary', class: 'border-primary/50' },\n { variant: 'glass-surface', tone: 'danger', class: 'border-destructive/50' },\n { variant: 'glass-surface', tone: 'success', class: 'border-success/50' },\n { variant: 'glass-surface', tone: 'warning', class: 'border-warning/50' },\n ],\n defaultVariants: {\n variant: 'solid',\n tone: 'primary',\n size: 'md',\n shape: 'default',\n fullWidth: false,\n wrap: false,\n },\n});\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\n/* Compile-time lock: enum values ≡ tv variant/tone/shape value-sets (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertButtonVariant: AssertExact<\n ButtonVariant,\n NonNullable<VariantProps<typeof buttonVariants>['variant']>\n> = true;\nconst _assertButtonTone: AssertExact<ColorTone, NonNullable<VariantProps<typeof buttonVariants>['tone']>> = true;\nconst _assertButtonShape: AssertExact<ButtonShape, NonNullable<VariantProps<typeof buttonVariants>['shape']>> = true;\nvoid _assertButtonVariant;\nvoid _assertButtonTone;\nvoid _assertButtonShape;\n","<script lang=\"ts\">\nimport type { ButtonHTMLAttributes, VNodeChild } from 'vue';\nimport type {\n ColorProp,\n ColorTone,\n PaddingProp,\n RadiusProp,\n SizePreset,\n SizeUnion,\n SizeValue,\n} from '../../../foundation/styles';\nimport type { ButtonVariant, ButtonShape, ButtonVariants } from './Button.variants';\n\n/* Named size presets for variant lookup. Any other string / number / object flows to box-overrides. */\ntype ButtonSizePreset = Extract<SizePreset, 'xs' | 'sm' | 'md' | 'lg' | 'xl'>;\n\n/* `size`: preset (variant class) | number/string (square inline dims) | `{width,height,minWidth,minHeight,boxSize}`.\n Raw/object forms set inline dims only — pair with `padding` if text-bearing. */\nexport type ButtonSize = SizeUnion<ButtonSizePreset>;\n\n/** @internal The type-only surface `ButtonProps` inherits — native attributes plus the variant keys. `onClick` stays\n typed so `@click` compiles under strict templates; the button still gates it at runtime (see `handleClick`). */\ntype ButtonAttributes = Omit<ButtonHTMLAttributes, 'type' | 'disabled' | 'color'> &\n Omit<ButtonVariants, 'size' | 'variant' | 'tone' | 'shape'>;\n\n/** Defines props for the button. */\nexport interface ButtonProps extends /* @vue-ignore */ ButtonAttributes {\n /** The visual surface style. */\n readonly variant?: ButtonVariant;\n\n /** The semantic tone palette. */\n readonly tone?: ColorTone;\n\n /** The button silhouette (default · square · circle). */\n readonly shape?: ButtonShape;\n\n /** The size — preset name OR raw value OR explicit dim object; see `ButtonSize` for details. */\n readonly size?: ButtonSize;\n\n /** The per-instance color override for `tone` — a string derives all slots, an object sets each. */\n readonly color?: ColorProp;\n\n /** The slot before children. Prefer the `leading` named slot. */\n readonly leadingSlot?: VNodeChild;\n\n /** The slot after children. Prefer the `trailing` named slot. */\n readonly trailingSlot?: VNodeChild;\n\n /** The content shown in place of children on hover / focus-visible (CSS-only swap — no JS hover state).\n Idle → children visible; hover/focus-visible → `hoverSlot` visible. Pairs with `variant=\"reveal\"`\n for a reveal-on-hover icon swap. When undefined (and no `hover` slot), children render normally. */\n readonly hoverSlot?: VNodeChild;\n\n /** The indicator replacing the built-in `<Spinner/>` while loading. Prefer the `loading` slot. */\n readonly loadingSlot?: VNodeChild;\n\n /** The action-loading state — a spinner replaces the leading icon, the label stays, it dims and blocks clicks. */\n readonly isLoading?: boolean;\n\n /** The text that replaces the label while loading; omit it to keep the label. Consumer-supplied (i18n). */\n readonly loadingText?: string;\n\n /** The content-loading state — keeps size and radius, masks content; follows a `DataRegion` first load. */\n readonly isSkeleton?: boolean;\n\n /** The disabled state — drops focus order and clicks. Inherited from an enclosing `Field`. */\n readonly isDisabled?: boolean;\n\n /** The full-width state — stretches to fill container width. */\n readonly isFullWidth?: boolean;\n\n /** The multi-line state — allows label wrap; default truncates to single line. */\n readonly isMultiline?: boolean;\n\n /** The as-child flag — renders as the single child element via `Primitive`'s `asChild` merge. */\n readonly asChild?: boolean;\n\n /** The independent padding override (preset token or `{x, y}` object). */\n readonly padding?: PaddingProp;\n\n /** The independent radius override (preset token or raw value). */\n readonly radius?: RadiusProp;\n\n /** The explicit width override. Number = px; string = any CSS unit. */\n readonly width?: SizeValue;\n\n /** The explicit height override. Number = px; string = any CSS unit. */\n readonly height?: SizeValue;\n\n /** The min width reserved so the button doesn't reflow when its label morphs. */\n readonly minWidth?: SizeValue;\n\n /** The min height reserved — symmetric with `minWidth`. */\n readonly minHeight?: SizeValue;\n\n /** The square-size shorthand — fallback for `width` and `height`, which win when both are set. */\n readonly boxSize?: SizeValue;\n\n /** The button type. Default `ButtonType.Button` — NOT browser-default `'submit'`. */\n readonly type?: ButtonType;\n\n /** The long-press duration (ms). Default 500. Out-of-range values trigger a dev warning. */\n readonly longPressDelay?: number;\n\n /** The click-throttle window (ms) — first wins; subsequent swallowed via `preventDefault()`. */\n readonly debounceMs?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n normalizeStyle,\n onBeforeUnmount,\n useAttrs,\n useTemplateRef,\n watch,\n watchEffect,\n type ComponentPublicInstance,\n type StyleValue,\n} from 'vue';\nimport type { ClassValue } from 'clsx';\nimport {\n AriaAttribute,\n composeEventHandlers,\n ButtonType,\n HtmlElement,\n Key,\n PressExtensions,\n type PressEvent,\n} from '../../../foundation/dom';\nimport { cn, ColorExtensions, CssExtensions, type BoxSizeOverrides } from '../../../foundation/styles';\nimport { IsDevelopment } from '../../../foundation/config';\nimport { OptionalExtensions } from '../../../foundation/optionals';\nimport { Primitive } from '../../../foundation/primitives';\nimport { useFormControl } from '../../../foundation/primitives/formControlContext/FormControlContext';\nimport { Spinner } from '../../../foundation/icons';\nimport { useDebounceHandler } from '../../../foundation/async';\nimport { useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { buttonVariants } from './Button.variants';\n\nconst ComponentName = 'Button';\n\nconst ButtonSizePresets: ReadonlySet<string> = new Set<ButtonSizePreset>(['xs', 'sm', 'md', 'lg', 'xl']);\n\n/* Observable state surfaced via the `data-state` DOM attribute. */\nconst ButtonDataState = {\n Loading: 'loading',\n Skeleton: 'skeleton',\n Disabled: 'disabled',\n} as const;\ntype ButtonDataState = (typeof ButtonDataState)[keyof typeof ButtonDataState];\n\n/* `inheritAttrs: false` because three attrs are *owned*, not forwarded: `class` and `style` fold\n into the component's own `cn()` / style resolution so consumer values still win last (plain\n fallthrough would append outside `cn()`, losing tailwind-merge conflict resolution), and\n `onClick` is intercepted so loading / skeleton / long-press / the debounce window can swallow a\n click before the consumer's handler sees it. Everything else passes straight through. */\n/* The name is spelled out, not `ComponentName`: `defineOptions()` is hoisted out of `setup()`,\n so it cannot reference a locally declared const. */\n/** Renders a button that runs one command, carrying tone and size variants plus loading and skeleton states. */\ndefineOptions({ name: 'Button', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ButtonProps>(), {\n type: ButtonType.Button,\n longPressDelay: PressExtensions.longPressDelay.default,\n /* Explicit `undefined` defaults keep Vue's boolean casting from turning an absent prop into\n `false` — `isDisabled` must stay undefined to inherit from an enclosing `Field`. */\n isDisabled: undefined,\n isLoading: undefined,\n isSkeleton: undefined,\n isFullWidth: undefined,\n isMultiline: undefined,\n asChild: false,\n /* `VNodeChild` includes `boolean`, so Vue's boolean casting turns an absent node-valued prop\n into `false` rather than `undefined` — which reads as \"supplied\" at every `!== undefined`\n check. An explicit `undefined` default suppresses the cast. */\n leadingSlot: undefined,\n trailingSlot: undefined,\n hoverSlot: undefined,\n loadingSlot: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the press begins — pointer-down OR Space/Enter keydown (first event in a gesture). */\n 'press-start': [event: PressEvent<HTMLButtonElement>];\n\n /** Fires when the press ends — pointer-up/cancel OR Space/Enter keyup. */\n 'press-end': [event: PressEvent<HTMLButtonElement>];\n\n /** Fires when the pointer is held for `longPressDelay` ms. Suppresses the next click. */\n 'long-press': [event: PressEvent<HTMLButtonElement>];\n}>();\n\nconst slots = defineSlots<{\n /** The button's own label. Under `asChild`, the single element the button merges onto. */\n default?(): unknown;\n\n /** The indicator shown while loading. Falls back to `loadingSlot`, then to the built-in `Spinner`. */\n loading?(): unknown;\n\n /** Rendered before the label, for an icon. Falls back to `leadingSlot`. */\n leading?(): unknown;\n\n /** Rendered after the label, for an icon. Falls back to `trailingSlot`. */\n trailing?(): unknown;\n\n /** The content swapped in on hover / focus-visible, overlaying the label. Falls back to `hoverSlot`. */\n hover?(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* Stable render-only wrappers for the node-valued props, so each can render as the fallback of its\n named-slot twin. Stable identity (created once) keeps them from remounting on every render. */\nconst nodeProp = (read: () => VNodeChild) => defineComponent({ render: read });\nconst LeadingSlotProp = nodeProp(() => props.leadingSlot);\nconst TrailingSlotProp = nodeProp(() => props.trailingSlot);\nconst HoverSlotProp = nodeProp(() => props.hoverSlot);\nconst LoadingSlotProp = nodeProp(() => props.loadingSlot);\n\n/* Inherit disabled-state from an enclosing `Field` when the local prop is omitted; standalone when\n no context. Bound to the object, never destructured — every field on it is a live getter. */\nconst formControl = useFormControl();\nconst resolvedDisabled = computed(() => props.isDisabled ?? formControl?.isDisabled ?? false);\n\n/* An absent `isSkeleton` follows the nearest `DataRegion` first load; an explicit one wins either way. */\nconst skeleton = useSkeletonState(() => props.isSkeleton);\nconst skeletonActive = computed(() => skeleton.isSkeleton.value);\nconst loadingActive = computed(() => !skeletonActive.value && !!props.isLoading);\nconst isInactive = computed(() => loadingActive.value || skeletonActive.value || resolvedDisabled.value);\n\n/* The spinner swaps with a leading icon when there is one; without one it centers over the label, whose\n box keeps the button's width. */\nfunction hasLeading(): boolean {\n return slots.leading !== undefined || props.leadingSlot !== undefined;\n}\n\nconst dataState = computed<ButtonDataState | undefined>(() =>\n skeletonActive.value\n ? ButtonDataState.Skeleton\n : loadingActive.value\n ? ButtonDataState.Loading\n : resolvedDisabled.value\n ? ButtonDataState.Disabled\n : undefined,\n);\n\nconst safeLongPressDelay = computed(() =>\n !Number.isFinite(props.longPressDelay) ||\n props.longPressDelay < PressExtensions.longPressDelay.min ||\n props.longPressDelay > PressExtensions.longPressDelay.max\n ? PressExtensions.longPressDelay.default\n : props.longPressDelay,\n);\n\nwatchEffect(() => {\n if (!IsDevelopment) return;\n if (props.isLoading && props.isSkeleton) {\n console.warn(\n `[${ComponentName}] \\`isLoading\\` and \\`isSkeleton\\` are mutually exclusive — \\`isSkeleton\\` takes precedence.`,\n );\n }\n if (safeLongPressDelay.value !== props.longPressDelay) {\n console.warn(\n `[${ComponentName}] longPressDelay=${props.longPressDelay}ms is outside reasonable range (${PressExtensions.longPressDelay.min}–${PressExtensions.longPressDelay.max}ms). Falling back to ${PressExtensions.longPressDelay.default}ms.`,\n );\n }\n if (\n slots.default === undefined &&\n attrs[AriaAttribute.Label] === undefined &&\n attrs[AriaAttribute.LabelledBy] === undefined\n ) {\n console.warn(\n `[${ComponentName}] icon-only button (no text children) is missing an accessible name — pass \\`aria-label\\` or \\`aria-labelledby\\` (Button.standard.md rule 12).`,\n );\n }\n});\n\n/* Parse the union-typed `size` prop into preset (for variant lookup) + box overrides (for inline dims). */\nconst parsedSize = computed(() => CssExtensions.parseSizeUnion<ButtonSizePreset>(props.size, ButtonSizePresets));\n\nconst rootClass = computed(() =>\n cn(\n buttonVariants({\n variant: props.variant,\n tone: props.tone,\n size: parsedSize.value.preset,\n shape: props.shape,\n fullWidth: props.isFullWidth,\n wrap: props.isMultiline,\n }),\n attrs.class as ClassValue,\n ),\n);\n\nconst overrideStyle = computed<StyleValue | undefined>(() => {\n const padStyle = CssExtensions.resolvePadding(props.padding);\n const radStyle = CssExtensions.resolveRadius(props.radius);\n /* BoxLayout overrides — `size` is the base; flat width / height / minWidth / minHeight / boxSize win. */\n const composedBox: BoxSizeOverrides = {\n ...(parsedSize.value.box ?? {}),\n ...(props.width !== undefined ? { width: props.width } : {}),\n ...(props.height !== undefined ? { height: props.height } : {}),\n ...(props.minWidth !== undefined ? { minWidth: props.minWidth } : {}),\n ...(props.minHeight !== undefined ? { minHeight: props.minHeight } : {}),\n ...(props.boxSize !== undefined ? { boxSize: props.boxSize } : {}),\n };\n const boxStyle = CssExtensions.resolveBoxSize(composedBox);\n /* Per-instance color override → sets CSS vars on element, scoped locally. */\n const colorStyle = ColorExtensions.toneColorOverride(props.color, props.tone);\n const consumerStyle = attrs.style as StyleValue | undefined;\n if (!padStyle && !radStyle && !boxStyle && !colorStyle && !consumerStyle) return undefined;\n return normalizeStyle([colorStyle, padStyle, radStyle, boxStyle, consumerStyle]);\n});\n\n// ---------------------------------------------------------------------------\n// Press / long-press / debounce wiring.\n// ---------------------------------------------------------------------------\n\nlet isPressing = false;\nlet longPressTimer: ReturnType<typeof setTimeout> | undefined;\nlet longPressFired = false;\n\nconst instance = getCurrentInstance();\n\n/* React armed the long-press timer only when an `onLongPress` prop was passed. A declared emit has\n no such signal — `emit()` on an unlistened event is a silent no-op, but the fired flag would\n still swallow the following click on every long hold. The listener is read off the incoming\n vnode props at event time (declared-emit listeners are stripped from `attrs`), so an unlistened\n button never arms the timer at all. */\nfunction hasLongPressListener(): boolean {\n return instance?.vnode.props?.onLongPress !== undefined;\n}\n\nonBeforeUnmount(() => {\n if (longPressTimer !== undefined) clearTimeout(longPressTimer);\n});\n\nfunction cancelLongPress(): void {\n if (longPressTimer !== undefined) {\n clearTimeout(longPressTimer);\n longPressTimer = undefined;\n }\n}\n\nwatch(isInactive, (inactive) => {\n if (!inactive) return;\n cancelLongPress();\n isPressing = false;\n longPressFired = false;\n});\n\nfunction endPress(event: PressEvent<HTMLButtonElement>): void {\n if (isPressing) {\n isPressing = false;\n emit('press-end', event);\n }\n}\n\nfunction handlePointerDown(event: PointerEvent): void {\n if (isInactive.value || event.defaultPrevented || (event.button != null && event.button !== 0)) return;\n // Cancel any pending timer, then arm only on the first pointer of a gesture — a second\n // pointer-down must not stack a second long-press timer.\n cancelLongPress();\n if (!isPressing) {\n const pressEvent = event as PressEvent<HTMLButtonElement>;\n isPressing = true;\n longPressFired = false;\n emit('press-start', pressEvent);\n if (hasLongPressListener()) {\n longPressTimer = setTimeout(() => {\n if (isInactive.value) return;\n longPressFired = true;\n emit('long-press', pressEvent);\n longPressTimer = undefined;\n }, safeLongPressDelay.value);\n }\n }\n}\n\nfunction handlePointerUp(event: PointerEvent): void {\n cancelLongPress();\n endPress(event as PressEvent<HTMLButtonElement>);\n}\n\nfunction handlePointerCancel(event: PointerEvent): void {\n cancelLongPress();\n endPress(event as PressEvent<HTMLButtonElement>);\n}\n\nfunction handlePointerLeave(event: PointerEvent): void {\n // The subsequent pointerup may target elsewhere; release this gesture at its boundary.\n cancelLongPress();\n endPress(event as PressEvent<HTMLButtonElement>);\n}\n\nconst isActivationKey = (event: KeyboardEvent) => event.key === Key.Space || event.key === Key.Enter;\n\nfunction handleKeyDown(event: KeyboardEvent): void {\n if (isInactive.value || event.defaultPrevented || event.isComposing) return;\n if (isActivationKey(event) && !event.repeat && !isPressing) {\n isPressing = true;\n longPressFired = false;\n emit('press-start', event as PressEvent<HTMLButtonElement>);\n }\n}\n\nfunction handleKeyUp(event: KeyboardEvent): void {\n if (isActivationKey(event) && isPressing) {\n isPressing = false;\n emit('press-end', event as PressEvent<HTMLButtonElement>);\n }\n}\n\n/**\n * The consumer's listener for one attr, normalised. Vue merges several listeners for the same\n * event into an array (a wrapper component that binds `@click` on top of a forwarded `onClick`\n * produces exactly that), so the raw attr is not always callable.\n */\nfunction toHandler<E extends Event>(value: unknown): ((event: E) => void) | undefined {\n if (typeof value === 'function') return value as (event: E) => void;\n if (!Array.isArray(value)) return undefined;\n const handlers = value.filter((entry): entry is (event: E) => void => typeof entry === 'function');\n if (handlers.length === 0) return undefined;\n return (event) => {\n for (const handler of handlers) handler(event);\n };\n}\n\n// Long-press suppression happens BEFORE this — a suppressed click does NOT advance the throttle window.\nconst debouncedOnClick = useDebounceHandler(\n (event: MouseEvent) => toHandler<MouseEvent>(attrs.onClick)?.(event),\n () => props.debounceMs,\n);\n\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n if (isInactive.value) {\n // Block native activation too — e.g. `type=\"submit\"` must not submit while loading.\n event.preventDefault();\n return;\n }\n if (longPressFired) {\n longPressFired = false;\n event.preventDefault();\n return;\n }\n debouncedOnClick(event);\n}\n\n/* The attrs the component owns rather than forwards — see the `inheritAttrs: false` note above.\n Event names carry the single casing Vue's runtime understands (`on` + the event name with only\n its first letter capitalised); `onPointerDown` would bind a `pointer-down` listener. */\nconst OwnedAttributes: ReadonlySet<string> = new Set([\n 'class',\n 'style',\n 'onClick',\n 'onPointerdown',\n 'onPointerup',\n 'onPointercancel',\n 'onPointerleave',\n 'onKeydown',\n 'onKeyup',\n]);\n\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OwnedAttributes.has(key))),\n);\n\n/** The consumer's own listener for an owned event, so it can be chained ahead of the component's. */\nfunction consumerHandler<E extends Event>(name: string): ((event: E) => void) | undefined {\n return toHandler<E>(attrs[name]);\n}\n\n/* Assembled in the React original's spread order: the component's own attributes first, its event\n chain next, consumer attrs last so they still win. */\nconst rootProps = computed(() => ({\n type: props.asChild ? undefined : props.type,\n class: rootClass.value,\n style: overrideStyle.value,\n disabled: OptionalExtensions.from(resolvedDisabled.value, true),\n [AriaAttribute.Busy]: OptionalExtensions.from(loadingActive.value || skeletonActive.value, true),\n [AriaAttribute.Disabled]: OptionalExtensions.from(isInactive.value, true),\n tabindex: OptionalExtensions.from(skeletonActive.value || resolvedDisabled.value, -1),\n 'data-state': dataState.value,\n onClick: handleClick,\n onPointerdown: composeEventHandlers(consumerHandler<PointerEvent>('onPointerdown'), handlePointerDown),\n onPointerup: composeEventHandlers(consumerHandler<PointerEvent>('onPointerup'), handlePointerUp),\n onPointercancel: composeEventHandlers(consumerHandler<PointerEvent>('onPointercancel'), handlePointerCancel),\n onPointerleave: composeEventHandlers(consumerHandler<PointerEvent>('onPointerleave'), handlePointerLeave),\n onKeydown: composeEventHandlers(consumerHandler<KeyboardEvent>('onKeydown'), handleKeyDown),\n onKeyup: composeEventHandlers(consumerHandler<KeyboardEvent>('onKeyup'), handleKeyUp),\n ...passthroughAttrs.value,\n}));\n\nconst root = useTemplateRef<ComponentPublicInstance>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\nconst el = computed<HTMLElement | null>(() => {\n const node = root.value?.$el;\n return node instanceof HTMLElement ? node : null;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Renders an action button — for text and/or icon content. -->\n <Primitive ref=\"root\" :as=\"HtmlElement.Button\" :as-child=\"asChild\" v-bind=\"rootProps\">\n <!-- asChild → the merge target owns its children; leading/trailing/loading chrome is not rendered. -->\n <slot v-if=\"asChild\" />\n\n <template v-else-if=\"loadingActive && (hasLeading() || loadingText !== undefined)\">\n <!-- The spinner stands where the leading icon was; the label (or loadingText) stays readable. -->\n <slot name=\"loading\">\n <LoadingSlotProp v-if=\"loadingSlot !== undefined\" />\n <Spinner v-else />\n </slot>\n <span v-if=\"loadingText !== undefined\">{{ loadingText }}</span>\n <slot v-else />\n <slot name=\"trailing\"><TrailingSlotProp v-if=\"trailingSlot !== undefined\" /></slot>\n </template>\n\n <template v-else-if=\"loadingActive\">\n <!-- No icon to swap: the label turns transparent, keeping the width and the accessible name, and the\n spinner centers over it. -->\n <span class=\"relative inline-flex items-center justify-center\">\n <span class=\"inline-flex items-center gap-2 opacity-0\">\n <slot />\n <slot name=\"trailing\"><TrailingSlotProp v-if=\"trailingSlot !== undefined\" /></slot>\n </span>\n <span class=\"absolute inset-0 inline-flex items-center justify-center\">\n <slot name=\"loading\">\n <LoadingSlotProp v-if=\"loadingSlot !== undefined\" />\n <Spinner v-else />\n </slot>\n </span>\n </span>\n </template>\n\n <template v-else-if=\"hoverSlot !== undefined || $slots.hover\">\n <slot name=\"leading\"><LeadingSlotProp v-if=\"leadingSlot !== undefined\" /></slot>\n <!-- CSS-only hover/focus-visible swap: children occupy the box and reserve its size;\n the hover content overlays it centered. Toggle via `group-hover`/`group-focus-visible`\n on the root `group` — no JS hover state. `aria-hidden` on the hidden layer so AT\n reads one label. -->\n <span class=\"relative inline-flex items-center justify-center\">\n <span class=\"inline-flex items-center justify-center group-hover:invisible group-focus-visible:invisible\">\n <slot />\n </span>\n <span\n aria-hidden=\"true\"\n class=\"invisible absolute inset-0 inline-flex items-center justify-center group-hover:visible group-focus-visible:visible\"\n >\n <slot name=\"hover\"><HoverSlotProp v-if=\"hoverSlot !== undefined\" /></slot>\n </span>\n </span>\n <slot name=\"trailing\"><TrailingSlotProp v-if=\"trailingSlot !== undefined\" /></slot>\n </template>\n\n <template v-else>\n <slot name=\"leading\"><LeadingSlotProp v-if=\"leadingSlot !== undefined\" /></slot>\n <slot />\n <slot name=\"trailing\"><TrailingSlotProp v-if=\"trailingSlot !== undefined\" /></slot>\n </template>\n </Primitive>\n</template>\n"],"names":["_useSlots","_openBlock","_createBlock","_unref","_mergeProps","_renderSlot","_createElementBlock","_Fragment","Spinner","_createElementVNode","$slots"],"mappings":";;;;;;;;;;;;;;;;;AAGO,MAAM,gBAAgB;AAAA;AAAA,EAE3B,OAAO;AAAA;AAAA,EAEP,MAAM;AAAA;AAAA,EAEN,SAAS;AAAA;AAAA,EAET,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,QAAQ;AAAA;AAAA,EAER,MAAM;AAAA;AAAA,EAEN,OAAO;AAAA;AAAA,EAEP,cAAc;AAChB;AAKO,MAAM,cAAc;AAAA;AAAA,EAEzB,SAAS;AAAA;AAAA,EAET,QAAQ;AAAA;AAAA,EAER,QAAQ;AACV;AAKO,MAAM,iBAAiB,GAAG;AAAA,EAC/B,MAAM;AAAA;AAAA,IAEJ;AAAA;AAAA,IAEA;AAAA;AAAA,IAEA;AAAA,IACA;AAAA;AAAA,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kBWC,UAAA,EAAA,KAAA,KAAA;AAAA,YAjBTF,WAAgF,4BAAhF,MAAgF;AAAA,cAApC,QAAA,gBAAgB,uBAAvCH,YAAoDC,MAAA,eAAA,GAAA,EAAA,KAAA,EAAA,CAAA;;YAKzEM,mBAUO,QAVP,YAUO;AAAA,cATLA,mBAEO,QAFP,YAEO;AAAA,gBADLJ,WAAQ,KAAA,QAAA,SAAA;AAAA,cAAA;cAEVI,mBAKO,QALP,YAKO;AAAA,gBADLJ,WAA0E,0BAA1E,MAA0E;AAAA,kBAAlC,QAAA,cAAc,uBAAnCH,YAAgDC,MAAA,aAAA,GAAA,EAAA,KAAA,EAAA,CAAA;;;;YAGvEE,WAAmF,6BAAnF,MAAmF;AAAA,cAArC,QAAA,iBAAiB,uBAAzCH,YAAsDC,MAAA,gBAAA,GAAA,EAAA,KAAA,EAAA,CAAA;;kCAG9EG,mBAIWC,UAAA,EAAA,KAAA,KAAA;AAAA,YAHTF,WAAgF,4BAAhF,MAAgF;AAAA,cAApC,QAAA,gBAAgB,uBAAvCH,YAAoDC,MAAA,eAAA,GAAA,EAAA,KAAA,EAAA,CAAA;;YACzEE,WAAQ,KAAA,QAAA,SAAA;AAAA,YACRA,WAAmF,6BAAnF,MAAmF;AAAA,cAArC,QAAA,iBAAiB,uBAAzCH,YAAsDC,MAAA,gBAAA,GAAA,EAAA,KAAA,EAAA,CAAA;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, shallowRef, provide, computed, renderSlot, inject, useAttrs, openBlock, createBlock, unref, withCtx, createVNode, normalizeClass, createCommentVNode, createElementVNode, withModifiers, mergeProps } from "vue";
2
2
  import { c as cn } from "./Cn-C7De6POU.js";
3
- import { s as surfaceVariants } from "./SurfaceStyles-B8KNkFsm.js";
3
+ import { s as surfaceVariants } from "./SurfaceStyles-BYvRlsWe.js";
4
4
  import { _ as _sfc_main$4 } from "./BackdropOverlay.vue_vue_type_script_setup_true_lang-BsjQoWDM.js";
5
5
  import { o as overlayChromeContextKey } from "./OverlayChrome-BqRpuYX5.js";
6
6
  import { u as useControlled } from "./UseControlled-BQneb7BW.js";
@@ -211,4 +211,4 @@ export {
211
211
  _sfc_main as a,
212
212
  useDrawerContext as u
213
213
  };
214
- //# sourceMappingURL=DrawerContent.vue_vue_type_script_setup_true_lang-CZQnfNGk.js.map
214
+ //# sourceMappingURL=DrawerContent.vue_vue_type_script_setup_true_lang-BA-au7LC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerContent.vue_vue_type_script_setup_true_lang-CZQnfNGk.js","sources":["../../src/presentation/overlays/drawer/Drawer.vue","../../src/presentation/overlays/drawer/DrawerContent.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { inject, type ComputedRef, type InjectionKey, type Ref, type ShallowRef } from 'vue';\nimport type { Side } from '../../../foundation/styles';\n\n/**\n * The value shared with `DrawerTrigger` / `DrawerContent`.\n *\n * React's context held plain values re-created on every render; here the\n * reactive fields stay refs so a child reads the live value without the root\n * re-rendering it.\n */\nexport interface DrawerContextValue {\n /** The resolved open state. Writable — an assignment routes through `setOpen`. */\n open: Ref<boolean>;\n setOpen: (open: boolean) => void;\n /** The trigger element — the focus-return target when the drawer closes. */\n triggerEl: ShallowRef<HTMLElement | null>;\n titleId: string;\n descriptionId: string;\n side: ComputedRef<Side>;\n dismissOnOutsideClick: ComputedRef<boolean>;\n dismissOnEscape: ComputedRef<boolean>;\n}\n\nexport const drawerContextKey: InjectionKey<DrawerContextValue> = Symbol('wow-two.drawer');\n\nexport function useDrawerContext(): DrawerContextValue {\n const context = inject(drawerContextKey, null);\n if (!context) throw new Error('Drawer.* must be used inside <Drawer>');\n return context;\n}\n\n/** Controlled axes use their canonical Vue model names; each update event requests caller state. */\nexport interface DrawerProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The edge the panel slides in from. Default `right`. */\n readonly side?: Side;\n\n /** The outside-click dismissal toggle. Default `true`. */\n readonly canDismissOnOutsideClick?: boolean;\n /** @deprecated Use `canDismissOnOutsideClick`; this alias is removed next release. */\n readonly dismissOnOutsideClick?: boolean;\n\n /** The Escape dismissal toggle. Default `true`. */\n readonly canDismissOnEscape?: boolean;\n /** @deprecated Use `canDismissOnEscape`; this alias is removed next release. */\n readonly dismissOnEscape?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, shallowRef } from 'vue';\nimport { useControlled } from '../../../foundation/state';\nimport { useId } from '../../../foundation/identifiers';\n\n/**\n * Renders only its slot, owning the open state and a11y ids of the Drawer tree below it.\n * React returned a bare context Provider, which has no element of its own.\n */\ndefineOptions({ name: 'Drawer', inheritAttrs: false });\n\n/** The Drawer tree — `DrawerTrigger` and `DrawerContent`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/**\n * `open: undefined` / `open: undefined` are load-bearing: Vue coerces an\n * absent `Boolean` prop to `false` unless the declaration *owns* a `default`\n * key, which would strand the uncontrolled path behind a permanently-closed\n * controlled one.\n */\nconst props = withDefaults(defineProps<DrawerProps>(), {\n open: undefined,\n defaultOpen: false,\n side: 'right',\n canDismissOnOutsideClick: undefined,\n dismissOnOutsideClick: undefined,\n canDismissOnEscape: undefined,\n dismissOnEscape: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the drawer opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\nconst triggerEl = shallowRef<HTMLElement | null>(null);\nconst titleId = useId('drawer-title');\nconst descriptionId = useId('drawer-description');\n\nprovide(drawerContextKey, {\n open: controlled.value,\n setOpen: controlled.setValue,\n triggerEl,\n titleId,\n descriptionId,\n side: computed(() => props.side),\n dismissOnOutsideClick: computed(() => props.canDismissOnOutsideClick ?? props.dismissOnOutsideClick ?? true),\n dismissOnEscape: computed(() => props.canDismissOnEscape ?? props.dismissOnEscape ?? true),\n});\n</script>\n\n<template>\n <slot />\n</template>\n","<script lang=\"ts\">\nimport type {\n Side,\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/styles';\n\n/** Defines the max-size token for a `DrawerContent` panel. */\nexport const DrawerSize = {\n /** Refers to the small panel size. */\n Sm: 'sm',\n /** Refers to the medium panel size. */\n Md: 'md',\n /** Refers to the large panel size. */\n Lg: 'lg',\n /** Refers to the extra-large panel size. */\n Xl: 'xl',\n /** Refers to a panel that fills its cross-axis. */\n Full: 'full',\n} as const;\n\nexport type DrawerSize = (typeof DrawerSize)[keyof typeof DrawerSize];\n\n// Full-edge slide: the panel rests at translate-0 when open and is pushed\n// fully off its own edge when closed. `transition-transform` (gated on\n// `motion-safe:`) animates both enter and exit via Presence's data-state flip.\nconst SideBase: Record<Side, string> = {\n right:\n 'inset-y-0 right-0 h-full w-full border-l ' +\n 'motion-safe:transition-transform motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) ' +\n 'data-[state=closed]:translate-x-full',\n left:\n 'inset-y-0 left-0 h-full w-full border-r ' +\n 'motion-safe:transition-transform motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) ' +\n 'data-[state=closed]:-translate-x-full',\n top:\n 'inset-x-0 top-0 w-full border-b ' +\n 'motion-safe:transition-transform motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) ' +\n 'data-[state=closed]:-translate-y-full',\n bottom:\n 'inset-x-0 bottom-0 w-full border-t ' +\n 'motion-safe:transition-transform motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) ' +\n 'data-[state=closed]:translate-y-full',\n};\n\nconst HorizontalSize: Record<DrawerSize, string> = {\n sm: 'sm:max-w-sm',\n md: 'sm:max-w-md',\n lg: 'sm:max-w-lg',\n xl: 'sm:max-w-2xl',\n full: '',\n};\n\nconst VerticalSize: Record<DrawerSize, string> = {\n sm: 'max-h-[40vh]',\n md: 'max-h-[60vh]',\n lg: 'max-h-[75vh]',\n xl: 'max-h-[85vh]',\n full: 'max-h-screen',\n};\n\n/**\n * Represents the prop surface of `DrawerContent`.\n *\n * React declared the surface axes by `extends SurfaceLayoutVariants`; they are\n * spelled out here because the SFC compiler's type resolver cannot follow a\n * `VariantProps<typeof …>` base and fails the build on it. The aliases below\n * are the canonical ones from `foundation/styles`, already locked against the\n * `surfaceVariants` config there, so the two cannot drift.\n */\nexport interface DrawerContentProps {\n /** Shows the default backdrop behind the panel. Default `true`. */\n readonly showBackdrop?: boolean;\n /** @deprecated Use `showBackdrop` (inverted); this alias is removed next release. */\n readonly hideBackdrop?: boolean;\n\n /** The backdrop-blur toggle. */\n readonly isBlurred?: boolean;\n\n /** The per-side max-size token. Default `md`. */\n readonly size?: DrawerSize;\n\n /** The visual recipe. Default `elevated`. */\n readonly variant?: SurfaceVariant;\n\n /** The color tone the recipe is tinted with. */\n readonly tone?: SurfaceTone;\n\n /** The corner rounding. Default `none`. */\n readonly radius?: SurfaceRadius;\n\n /** The inner spacing step. Default `xl`. */\n readonly padding?: SurfacePadding;\n\n /** The shadow depth. Default `3`. */\n readonly elevation?: SurfaceElevation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs } from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport { DismissableLayer, FocusScope, Portal, Presence, ScrollLockProvider } from '../../../foundation/primitives';\nimport BackdropOverlay from '../backdropOverlay/BackdropOverlay.vue';\nimport { overlayChromeContextKey } from '../OverlayChrome';\nimport { useDrawerContext } from './Drawer.vue';\n\n/** Renders the portalled edge panel — scrim, focus trap, scroll lock, and the sliding a11y surface. */\ndefineOptions({ name: 'DrawerContent', inheritAttrs: false });\n\n/** The panel content — chrome subcomponents and the drawer body. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<DrawerContentProps>(), {\n size: 'md',\n showBackdrop: undefined,\n hideBackdrop: undefined,\n});\n\n/** `showBackdrop` first, then the inverted deprecated `hideBackdrop`. */\nconst hasBackdrop = computed(() => props.showBackdrop ?? !(props.hideBackdrop ?? false));\n\nconst attrs = useAttrs();\nconst context = useDrawerContext();\n\n/* Refs lifted to setup consts so the template auto-unwraps them (a plain injected object does not). */\nconst isOpen = context.open;\nconst side = context.side;\nconst dismissOnEscape = context.dismissOnEscape;\n\nfunction close(): void {\n context.setOpen(false);\n}\n\nprovide(overlayChromeContextKey, {\n titleId: context.titleId,\n descriptionId: context.descriptionId,\n close,\n});\n\nconst isHorizontal = computed(() => side.value === 'right' || side.value === 'left');\nconst sizeClass = computed(() => (isHorizontal.value ? HorizontalSize[props.size] : VerticalSize[props.size]));\n\nconst classes = computed(() =>\n cn(\n 'fixed z-modal flex flex-col gap-4 outline-hidden',\n surfaceVariants({\n variant: props.variant ?? 'elevated',\n tone: props.tone,\n radius: props.radius ?? 'none',\n padding: props.padding ?? 'xl',\n elevation: props.elevation ?? 3,\n }),\n SideBase[side.value],\n sizeClass.value,\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** The scrim's fade runs in lock-step with the slide — same token duration on both. */\nconst backdropClasses =\n 'motion-safe:transition-opacity motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) data-[state=closed]:opacity-0';\n\n/**\n * The outside layer spans the window above the scrim and holds the panel. The panel's modal FocusScope marks every\n * body branch outside it inert, the scrim beside it included, so a click on the scrim reached nothing; an ancestor of\n * the panel stays live, so clicks outside the panel land on this layer. Closed, it lets every pointer through.\n */\nconst outsideClasses = computed(() => cn('fixed inset-0 z-modal', !isOpen.value && 'pointer-events-none'));\n\n/** A click on the outside layer itself (`.self`), not on the panel inside it. */\nfunction handleOutsideClick(): void {\n if (context.dismissOnOutsideClick.value) context.setOpen(false);\n}\n\nfunction handleEscape(): void {\n context.setOpen(false);\n}\n</script>\n\n<template>\n <!--\n React nested `Portal` + `ScrollLockProvider` *inside* the Presence-cloned\n surface and forwarded the injected `ref` past them onto the panel with\n `forwardRef`. Vue resolves a cloned `ref` through `$el`, and a Teleport /\n renderless root has no element, so the portal and the lock are hoisted above\n `Presence` and the lock now follows open state rather than mount — the shape\n React's own `ModalContent` already used. Presence's cloned child is the panel\n itself, which is what has to carry `data-state` and the slide it times against.\n -->\n <Portal>\n <ScrollLockProvider :is-enabled=\"isOpen\">\n <!-- The scrim runs on `BackdropOverlay`'s own `Presence` (its `isOpen` prop); React\n mirrored the panel's `data-state` onto it by hand for the same effect. It is inert while the panel is up;\n the outside layer takes the clicks. -->\n <BackdropOverlay\n v-if=\"hasBackdrop\"\n is-inline\n :is-open=\"isOpen\"\n :is-blurred=\"props.isBlurred\"\n :class=\"backdropClasses\"\n />\n <div :class=\"outsideClasses\" data-drawer-outside @click.self=\"handleOutsideClick\">\n <Presence :is-present=\"isOpen\">\n <!--\n `FocusScope as-child` merges into `DismissableLayer`, whose own root div\n *is* the dialog panel — React kept the layer div and the panel div\n separate and forwarded `data-state` down to the inner one. Collapsing\n them keeps every attribute of React's panel (`role`, `aria-modal`,\n `aria-labelledby`, `aria-describedby`, `data-state`, `data-side`, the\n surface classes) on one node, which is also the node `Presence` clones\n and whose `transition-transform` end defers the unmount.\n -->\n <FocusScope as-child is-trapped can-loop is-modal>\n <DismissableLayer\n :is-escape-disabled=\"!dismissOnEscape\"\n is-outside-click-disabled\n :on-escape=\"handleEscape\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-labelledby=\"context.titleId\"\n :aria-describedby=\"context.descriptionId\"\n :data-side=\"side\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <slot />\n </DismissableLayer>\n </FocusScope>\n </Presence>\n </div>\n </ScrollLockProvider>\n </Portal>\n</template>\n"],"names":["_renderSlot","_createBlock","_unref","Portal","_createVNode","ScrollLockProvider","BackdropOverlay","_createElementVNode","FocusScope","_mergeProps"],"mappings":";;;;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BA-au7LC.js","sources":["../../src/presentation/overlays/drawer/Drawer.vue","../../src/presentation/overlays/drawer/DrawerContent.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { inject, type ComputedRef, type InjectionKey, type Ref, type ShallowRef } from 'vue';\nimport type { Side } from '../../../foundation/styles';\n\n/**\n * The value shared with `DrawerTrigger` / `DrawerContent`.\n *\n * React's context held plain values re-created on every render; here the\n * reactive fields stay refs so a child reads the live value without the root\n * re-rendering it.\n */\nexport interface DrawerContextValue {\n /** The resolved open state. Writable — an assignment routes through `setOpen`. */\n open: Ref<boolean>;\n setOpen: (open: boolean) => void;\n /** The trigger element — the focus-return target when the drawer closes. */\n triggerEl: ShallowRef<HTMLElement | null>;\n titleId: string;\n descriptionId: string;\n side: ComputedRef<Side>;\n dismissOnOutsideClick: ComputedRef<boolean>;\n dismissOnEscape: ComputedRef<boolean>;\n}\n\nexport const drawerContextKey: InjectionKey<DrawerContextValue> = Symbol('wow-two.drawer');\n\nexport function useDrawerContext(): DrawerContextValue {\n const context = inject(drawerContextKey, null);\n if (!context) throw new Error('Drawer.* must be used inside <Drawer>');\n return context;\n}\n\n/** Controlled axes use their canonical Vue model names; each update event requests caller state. */\nexport interface DrawerProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n\n /** The edge the panel slides in from. Default `right`. */\n readonly side?: Side;\n\n /** The outside-click dismissal toggle. Default `true`. */\n readonly canDismissOnOutsideClick?: boolean;\n /** @deprecated Use `canDismissOnOutsideClick`; this alias is removed next release. */\n readonly dismissOnOutsideClick?: boolean;\n\n /** The Escape dismissal toggle. Default `true`. */\n readonly canDismissOnEscape?: boolean;\n /** @deprecated Use `canDismissOnEscape`; this alias is removed next release. */\n readonly dismissOnEscape?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, shallowRef } from 'vue';\nimport { useControlled } from '../../../foundation/state';\nimport { useId } from '../../../foundation/identifiers';\n\n/**\n * Renders only its slot, owning the open state and a11y ids of the Drawer tree below it.\n * React returned a bare context Provider, which has no element of its own.\n */\ndefineOptions({ name: 'Drawer', inheritAttrs: false });\n\n/** The Drawer tree — `DrawerTrigger` and `DrawerContent`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/**\n * `open: undefined` / `open: undefined` are load-bearing: Vue coerces an\n * absent `Boolean` prop to `false` unless the declaration *owns* a `default`\n * key, which would strand the uncontrolled path behind a permanently-closed\n * controlled one.\n */\nconst props = withDefaults(defineProps<DrawerProps>(), {\n open: undefined,\n defaultOpen: false,\n side: 'right',\n canDismissOnOutsideClick: undefined,\n dismissOnOutsideClick: undefined,\n canDismissOnEscape: undefined,\n dismissOnEscape: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the drawer opens or closes — the `v-model:open` half. */\n 'update:open': [open: boolean];\n}>();\n\nconst controlled = useControlled<boolean>({\n controlled: () => props.open,\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n },\n});\n\nconst triggerEl = shallowRef<HTMLElement | null>(null);\nconst titleId = useId('drawer-title');\nconst descriptionId = useId('drawer-description');\n\nprovide(drawerContextKey, {\n open: controlled.value,\n setOpen: controlled.setValue,\n triggerEl,\n titleId,\n descriptionId,\n side: computed(() => props.side),\n dismissOnOutsideClick: computed(() => props.canDismissOnOutsideClick ?? props.dismissOnOutsideClick ?? true),\n dismissOnEscape: computed(() => props.canDismissOnEscape ?? props.dismissOnEscape ?? true),\n});\n</script>\n\n<template>\n <slot />\n</template>\n","<script lang=\"ts\">\nimport type {\n Side,\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/styles';\n\n/** Defines the max-size token for a `DrawerContent` panel. */\nexport const DrawerSize = {\n /** Refers to the small panel size. */\n Sm: 'sm',\n /** Refers to the medium panel size. */\n Md: 'md',\n /** Refers to the large panel size. */\n Lg: 'lg',\n /** Refers to the extra-large panel size. */\n Xl: 'xl',\n /** Refers to a panel that fills its cross-axis. */\n Full: 'full',\n} as const;\n\nexport type DrawerSize = (typeof DrawerSize)[keyof typeof DrawerSize];\n\n// Full-edge slide: the panel rests at translate-0 when open and is pushed\n// fully off its own edge when closed. `transition-transform` (gated on\n// `motion-safe:`) animates both enter and exit via Presence's data-state flip.\nconst SideBase: Record<Side, string> = {\n right:\n 'inset-y-0 right-0 h-full w-full border-l ' +\n 'motion-safe:transition-transform motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) ' +\n 'data-[state=closed]:translate-x-full',\n left:\n 'inset-y-0 left-0 h-full w-full border-r ' +\n 'motion-safe:transition-transform motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) ' +\n 'data-[state=closed]:-translate-x-full',\n top:\n 'inset-x-0 top-0 w-full border-b ' +\n 'motion-safe:transition-transform motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) ' +\n 'data-[state=closed]:-translate-y-full',\n bottom:\n 'inset-x-0 bottom-0 w-full border-t ' +\n 'motion-safe:transition-transform motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) ' +\n 'data-[state=closed]:translate-y-full',\n};\n\nconst HorizontalSize: Record<DrawerSize, string> = {\n sm: 'sm:max-w-sm',\n md: 'sm:max-w-md',\n lg: 'sm:max-w-lg',\n xl: 'sm:max-w-2xl',\n full: '',\n};\n\nconst VerticalSize: Record<DrawerSize, string> = {\n sm: 'max-h-[40vh]',\n md: 'max-h-[60vh]',\n lg: 'max-h-[75vh]',\n xl: 'max-h-[85vh]',\n full: 'max-h-screen',\n};\n\n/**\n * Represents the prop surface of `DrawerContent`.\n *\n * React declared the surface axes by `extends SurfaceLayoutVariants`; they are\n * spelled out here because the SFC compiler's type resolver cannot follow a\n * `VariantProps<typeof …>` base and fails the build on it. The aliases below\n * are the canonical ones from `foundation/styles`, already locked against the\n * `surfaceVariants` config there, so the two cannot drift.\n */\nexport interface DrawerContentProps {\n /** Shows the default backdrop behind the panel. Default `true`. */\n readonly showBackdrop?: boolean;\n /** @deprecated Use `showBackdrop` (inverted); this alias is removed next release. */\n readonly hideBackdrop?: boolean;\n\n /** The backdrop-blur toggle. */\n readonly isBlurred?: boolean;\n\n /** The per-side max-size token. Default `md`. */\n readonly size?: DrawerSize;\n\n /** The visual recipe. Default `elevated`. */\n readonly variant?: SurfaceVariant;\n\n /** The color tone the recipe is tinted with. */\n readonly tone?: SurfaceTone;\n\n /** The corner rounding. Default `none`. */\n readonly radius?: SurfaceRadius;\n\n /** The inner spacing step. Default `xl`. */\n readonly padding?: SurfacePadding;\n\n /** The shadow depth. Default `3`. */\n readonly elevation?: SurfaceElevation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs } from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport { DismissableLayer, FocusScope, Portal, Presence, ScrollLockProvider } from '../../../foundation/primitives';\nimport BackdropOverlay from '../backdropOverlay/BackdropOverlay.vue';\nimport { overlayChromeContextKey } from '../OverlayChrome';\nimport { useDrawerContext } from './Drawer.vue';\n\n/** Renders the portalled edge panel — scrim, focus trap, scroll lock, and the sliding a11y surface. */\ndefineOptions({ name: 'DrawerContent', inheritAttrs: false });\n\n/** The panel content — chrome subcomponents and the drawer body. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<DrawerContentProps>(), {\n size: 'md',\n showBackdrop: undefined,\n hideBackdrop: undefined,\n});\n\n/** `showBackdrop` first, then the inverted deprecated `hideBackdrop`. */\nconst hasBackdrop = computed(() => props.showBackdrop ?? !(props.hideBackdrop ?? false));\n\nconst attrs = useAttrs();\nconst context = useDrawerContext();\n\n/* Refs lifted to setup consts so the template auto-unwraps them (a plain injected object does not). */\nconst isOpen = context.open;\nconst side = context.side;\nconst dismissOnEscape = context.dismissOnEscape;\n\nfunction close(): void {\n context.setOpen(false);\n}\n\nprovide(overlayChromeContextKey, {\n titleId: context.titleId,\n descriptionId: context.descriptionId,\n close,\n});\n\nconst isHorizontal = computed(() => side.value === 'right' || side.value === 'left');\nconst sizeClass = computed(() => (isHorizontal.value ? HorizontalSize[props.size] : VerticalSize[props.size]));\n\nconst classes = computed(() =>\n cn(\n 'fixed z-modal flex flex-col gap-4 outline-hidden',\n surfaceVariants({\n variant: props.variant ?? 'elevated',\n tone: props.tone,\n radius: props.radius ?? 'none',\n padding: props.padding ?? 'xl',\n elevation: props.elevation ?? 3,\n }),\n SideBase[side.value],\n sizeClass.value,\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** The scrim's fade runs in lock-step with the slide — same token duration on both. */\nconst backdropClasses =\n 'motion-safe:transition-opacity motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) data-[state=closed]:opacity-0';\n\n/**\n * The outside layer spans the window above the scrim and holds the panel. The panel's modal FocusScope marks every\n * body branch outside it inert, the scrim beside it included, so a click on the scrim reached nothing; an ancestor of\n * the panel stays live, so clicks outside the panel land on this layer. Closed, it lets every pointer through.\n */\nconst outsideClasses = computed(() => cn('fixed inset-0 z-modal', !isOpen.value && 'pointer-events-none'));\n\n/** A click on the outside layer itself (`.self`), not on the panel inside it. */\nfunction handleOutsideClick(): void {\n if (context.dismissOnOutsideClick.value) context.setOpen(false);\n}\n\nfunction handleEscape(): void {\n context.setOpen(false);\n}\n</script>\n\n<template>\n <!--\n React nested `Portal` + `ScrollLockProvider` *inside* the Presence-cloned\n surface and forwarded the injected `ref` past them onto the panel with\n `forwardRef`. Vue resolves a cloned `ref` through `$el`, and a Teleport /\n renderless root has no element, so the portal and the lock are hoisted above\n `Presence` and the lock now follows open state rather than mount — the shape\n React's own `ModalContent` already used. Presence's cloned child is the panel\n itself, which is what has to carry `data-state` and the slide it times against.\n -->\n <Portal>\n <ScrollLockProvider :is-enabled=\"isOpen\">\n <!-- The scrim runs on `BackdropOverlay`'s own `Presence` (its `isOpen` prop); React\n mirrored the panel's `data-state` onto it by hand for the same effect. It is inert while the panel is up;\n the outside layer takes the clicks. -->\n <BackdropOverlay\n v-if=\"hasBackdrop\"\n is-inline\n :is-open=\"isOpen\"\n :is-blurred=\"props.isBlurred\"\n :class=\"backdropClasses\"\n />\n <div :class=\"outsideClasses\" data-drawer-outside @click.self=\"handleOutsideClick\">\n <Presence :is-present=\"isOpen\">\n <!--\n `FocusScope as-child` merges into `DismissableLayer`, whose own root div\n *is* the dialog panel — React kept the layer div and the panel div\n separate and forwarded `data-state` down to the inner one. Collapsing\n them keeps every attribute of React's panel (`role`, `aria-modal`,\n `aria-labelledby`, `aria-describedby`, `data-state`, `data-side`, the\n surface classes) on one node, which is also the node `Presence` clones\n and whose `transition-transform` end defers the unmount.\n -->\n <FocusScope as-child is-trapped can-loop is-modal>\n <DismissableLayer\n :is-escape-disabled=\"!dismissOnEscape\"\n is-outside-click-disabled\n :on-escape=\"handleEscape\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-labelledby=\"context.titleId\"\n :aria-describedby=\"context.descriptionId\"\n :data-side=\"side\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <slot />\n </DismissableLayer>\n </FocusScope>\n </Presence>\n </div>\n </ScrollLockProvider>\n </Portal>\n</template>\n"],"names":["_renderSlot","_createBlock","_unref","Portal","_createVNode","ScrollLockProvider","BackdropOverlay","_createElementVNode","FocusScope","_mergeProps"],"mappings":";;;;;;;;;;;;AAwBO,MAAM,mBAAqD,OAAO,gBAAgB;AAElF,SAAS,mBAAuC;AACrD,QAAM,UAAU,OAAO,kBAAkB,IAAI;AAC7C,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,uCAAuC;AACrE,SAAO;AACT;;;;;;;;;;;;;;;AA6CA,UAAM,QAAQ;AAUd,UAAM,OAAO;AAKb,UAAM,aAAa,cAAuB;AAAA,MACxC,YAAY,MAAM,MAAM;AAAA,MACxB,SAAS,MAAM,MAAM;AAAA,MACrB,UAAU,CAA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AY,MAAM;AAAA,gBAClB,sBAAO,eAAe;AAAA,cAAA;cAEzBK,mBA4BM,OAAA;AAAA,gBA5BA,sBAAO,eAAA,KAAc;AAAA,gBAAE,uBAAA;AAAA,gBAAqB,uBAAY,oBAAkB,CAAA,MAAA,CAAA;AAAA,cAAA;gBAC9EH,YA0BWF,MAAA,QAAA,GAAA,EA1BA,cAAYA,MAAA,MAAA,KAAM;AAAA,mCAU3B,MAea;AAAA,oBAfbE,YAeaF,MAAAM,WAAA,GAAA;AAAA,sBAfD,YAAA;AAAA,sBAAS,cAAA;AAAA,sBAAW,YAAA;AAAA,sBAAS,YAAA;AAAA,oBAAA;uCACvC,MAamB;AAAA,wBAbnBJ,YAamBF,oBAbnBO,WAamB;AAAA,0BAZhB,uBAAqBP,MAAA,eAAA;AAAA,0BACtB,6BAAA;AAAA,0BACC,aAAW;AAAA,0BACZ,MAAK;AAAA,0BACL,cAAW;AAAA,0BACV,mBAAiBA,MAAA,OAAA,EAAQ;AAAA,0BACzB,oBAAkBA,MAAA,OAAA,EAAQ;AAAA,0BAC1B,aAAWA,MAAA,IAAA;AAAA,wBAAA,GACJ,KAAA,OAAI,EACX,OAAO,QAAA,MAAA,CAAO,GAAA;AAAA,2CAEf,MAAQ;AAAA,4BAARF,WAAQ,KAAA,QAAA,SAAA;AAAA,0BAAA;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import { defineComponent, useAttrs, useTemplateRef, computed, openBlock, createE
2
2
  import { c as cn } from "./Cn-C7De6POU.js";
3
3
  import { f as useSkeletonStateGroup, e as skeletonVariants, d as skeletonSlotVariants, g as skeletonStateGroupKey, u as useSkeletonState } from "./SkeletonStateContext-tVYMa6xt.js";
4
4
  import { u as useLocale } from "./LocaleContext-B7vUZmX-.js";
5
- import { _ as _sfc_main$t } from "./Button.vue_vue_type_script_setup_true_lang-BrgCAsgC.js";
5
+ import { _ as _sfc_main$t } from "./Button.vue_vue_type_script_setup_true_lang-Cw0QS_Mm.js";
6
6
  import { _ as _sfc_main$s } from "./EmptyState.vue_vue_type_script_setup_true_lang-DHwwGzyu.js";
7
7
  import { P as ProgressTone } from "./ProgressTone-BpLPUptx.js";
8
8
  import { tv } from "tailwind-variants";
@@ -18,11 +18,11 @@ import { u as useLocaleFormatters } from "./LocaleFormatters-DadF2y7-.js";
18
18
  import { u as useId } from "./UseId-CtgAhGrn.js";
19
19
  import { S as SkeletonStateLine } from "./SkeletonStateLine-anGWn2Vm.js";
20
20
  import { f as feedbackBus, a as NoticeCategory } from "./FeedbackBus-Xc9EjV9K.js";
21
- import { t as toastHost, a as _sfc_main$w } from "./ToastHost.vue_vue_type_script_setup_true_lang-p0bfXJ9l.js";
21
+ import { t as toastHost, a as _sfc_main$w } from "./ToastHost.vue_vue_type_script_setup_true_lang-J1ZPZXn3.js";
22
22
  import { _ as _sfc_main$x } from "./BackdropOverlay.vue_vue_type_script_setup_true_lang-BsjQoWDM.js";
23
23
  import { P as Presence } from "./Presence-DDk0ZtAr.js";
24
24
  import { _ as _sfc_main$y } from "./FocusScope.vue_vue_type_script_setup_true_lang-C4XeQoxg.js";
25
- import { s as surfaceVariants } from "./SurfaceStyles-B8KNkFsm.js";
25
+ import { s as surfaceVariants } from "./SurfaceStyles-BYvRlsWe.js";
26
26
  import { O as OverlayPosition } from "./OverlayPosition-BNybkMGG.js";
27
27
  import { _ as _sfc_main$z } from "./Portal.vue_vue_type_script_setup_true_lang-C2_xSIMy.js";
28
28
  import { u as useReducedMotion } from "./UseReducedMotion-NZ5fg-Xb.js";
@@ -2226,4 +2226,4 @@ export {
2226
2226
  _sfc_main$a as y,
2227
2227
  _sfc_main$5 as z
2228
2228
  };
2229
- //# sourceMappingURL=ErrorBoundary.vue_vue_type_script_setup_true_lang-LRQbVAiW.js.map
2229
+ //# sourceMappingURL=ErrorBoundary.vue_vue_type_script_setup_true_lang-DzqE0ZF8.js.map