{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-CJBSU3XB.cjs","../src/components/ui/button/button.tsx","../src/components/ui/button/button-styles.ts","../src/components/ui/button/split-button.tsx"],"names":["cva","jsx","jsxs"],"mappings":"AAAA,yRAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACNA,iDAAqB;AACrB,kEAAuC;AACvC,4EAAkB;ADQlB;AACA;AERO,IAAM,qBAAA,EAAuB;AAAA,EAClC,MAAA,EACE,oJAAA;AAAA,EACF,OAAA,EACE,qMAAA;AAAA,EACF,WAAA,EACE,8MAAA;AAAA,EACF,WAAA,EACE,iJAAA;AAAA,EACF,OAAA,EACE,uJAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMF,KAAA,EACE,2MAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,OAAA,EACE;AACJ,CAAA;AAEO,IAAM,qBAAA,EACX,mJAAA;AAWK,IAAM,sBAAA,EAAwB,uDAAA;AAW9B,IAAM,qBAAA,EAAuB;AAAA,EAClC,OAAA,EAAS,qBAAA;AAAA,EACT,KAAA,EAAO;AACT,CAAA;AAGO,IAAM,yBAAA,EAA2B;AAAA,EACtC,MAAA,EAAQ,0BAAA;AAAA,EACR,OAAA,EAAS,mBAAA;AAAA,EACT,WAAA,EAAa,mBAAA;AAAA,EACb,WAAA,EAAa,yBAAA;AAAA,EACb,OAAA,EAAS;AACX,CAAA;AFrBA;AACA;ACwME,+CAAA;AAvOF,IAAM,eAAA,EAAiB,yCAAA;AAAA,EACrB;AAAA,IACE,kFAAA;AAAA,IACA,8BAAA;AAAA,IACA,gCAAA;AAAA,IACA,8EAAA;AAAA,IACA,8BAAA;AAAA,IACA;AAAA,EACF,CAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,MAAA,EAAQ,oBAAA,CAAqB,MAAA;AAAA,Q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C4C,QAAA;AACxD,QAAA;AAEC,QAAA;AAAA,MAAA;AACH,IAAA;AAEJ,EAAA;AAIK,EAAA;AAGP;AAGE;AACY,EAAA;AACH,EAAA;AACK,EAAA;AACZ,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACc,EAAA;AACd,EAAA;AAGF;AACkC,EAAA;AAGhCC,EAAAA;AAAC,IAAA;AAAA,IAAA;AACC,MAAA;AACK,MAAA;AACO,MAAA;AAC+D,MAAA;AAE3E,MAAA;AAAAA,wBAAAA;AAAC,UAAA;AAAA,UAAA;AACC,YAAA;AACA,YAAA;AACK,YAAA;AACL,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACsB,YAAA;AAChB,YAAA;AACN,YAAA;AACA,YAAA;AAEC,YAAA;AAAiE,cAAA;AAClD,8BAAA;AACoD,cAAA;AAAA,YAAA;AAAA,UAAA;AACtE,QAAA;AACAD,wBAAAA;AAAC,UAAA;AAAA,UAAA;AACC,YAAA;AACA,YAAA;AACK,YAAA;AACL,YAAA;AACiB,YAAA;AACQ,YAAA;AACJ,YAAA;AACD,YAAA;AACa,YAAA;AACC,YAAA;AAE0B,YAAA;AAAA,UAAA;AAC9D,QAAA;AAAA,MAAA;AAAA,IAAA;AACF,EAAA;AAEH;AACyB;AHyT8F;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-CJBSU3XB.cjs","sourcesContent":[null,"'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport React from 'react';\nimport Link from '../../../embed-shims/next-link';\nimport { cn } from '../../../utils/cn';\nimport {\n  buttonSurfaceClasses,\n  outlineBorderClasses,\n  splitDividerColorClasses,\n  splitGlyphSizeBySize,\n} from './button-styles';\n\n// Default layout: centered single content area, padding/gap on the button itself.\nconst buttonVariants = cva(\n  [\n    'relative inline-flex items-center justify-center gap-[var(--spacing-system-xsf)]',\n    'whitespace-nowrap rounded-md',\n    'transition-colors duration-200',\n    'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus',\n    'disabled:pointer-events-none',\n    '[&_svg]:pointer-events-none [&_svg]:h-5 [&_svg]:w-5 [&_svg]:shrink-0',\n  ],\n  {\n    variants: {\n      variant: {\n        accent: buttonSurfaceClasses.accent,\n        outline: cn(buttonSurfaceClasses.outline, outlineBorderClasses),\n        transparent: buttonSurfaceClasses.transparent,\n        destructive: buttonSurfaceClasses.destructive,\n        warning: buttonSurfaceClasses.warning,\n        glyph: buttonSurfaceClasses.glyph,\n        overlay: buttonSurfaceClasses.overlay,\n      },\n      size: {\n        default: 'h-11 px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)] text-h3 md:h-12',\n        small: 'h-6 p-[var(--spacing-system-xs)] text-h5 md:h-8',\n        // The CHILD is the affordance (a badge, a chip, a thumbnail): the button\n        // contributes the hit target, the focus ring and the keyboard/ARIA\n        // semantics, and NO box of its own. Without this, call sites reached for\n        // a `className=\"h-auto p-0\"` override to cancel the default box.\n        wrap: 'h-auto p-0',\n        'small-legacy': 'h-10 px-[var(--spacing-system-m)] py-[var(--spacing-system-xs)] text-[14px] font-bold', // Temporary alias for \"small\" — deprecated; grep size=\"small-legacy\" (lib + hub) and migrate the remaining consumers before removal\n        // 24px pill for slim strips (announcement/promo bars, inline banner\n        // actions — Primer banner / Polaris banner / Vercel-bar convention).\n        // The label matches the strip's MESSAGE type ramp exactly (DM Sans\n        // regular, 13px -> md:14px, snug leading — the announcement bar's\n        // subtitle styling): in-strip CTAs must never read louder than the\n        // message beside them, so this deliberately uses neither the\n        // mono-uppercase control style of \"small\" nor a heavier weight.\n        // Pinned h-6 across breakpoints (24px = the WCAG 2.5.8 target-size\n        // floor) with horizontal-dominant padding and a 14px glyph.\n        compact: 'h-6 px-[var(--spacing-system-sf)] py-0 font-normal text-h6 [&_svg]:h-3.5 [&_svg]:w-3.5',\n        icon: 'h-11 w-11 p-[var(--spacing-system-sf)] md:h-12 md:w-12 [&_svg]:h-4 [&_svg]:w-4 md:[&_svg]:h-6 md:[&_svg]:w-6',\n        // Quiet 32px icon target with a 16px glyph, fixed across breakpoints\n        // (Carbon ghost sm / Primer medium / shadcn icon-sm all pin 32px;\n        // ≥ the 24px WCAG 2.5.8 target floor). For icon actions that read as\n        // metadata rather than CTAs — author-page social rows, share rows.\n        // Pair with variant=\"transparent\" for the ghost treatment.\n        'icon-sm': 'h-8 w-8 p-[var(--spacing-system-xxs)] [&_svg]:h-4 [&_svg]:w-4',\n        // 20px inline glyph for affordances that sit INSIDE a line of text —\n        // an info hint beside a badge, a copy glyph after an id. `icon-sm`'s\n        // 32px target is correct for a metadata row but visually swamps a\n        // 10px badge or a 14px label, so hosts were reaching for className\n        // overrides to shrink it. Below the WCAG 2.5.8 target floor on purpose:\n        // this is only for glyphs whose information is ALSO available another\n        // way (tooltip content mirrored into an aria-describedby node), never\n        // for a sole means of performing an action.\n        'icon-inline': 'h-5 min-h-0 w-5 min-w-0 shrink-0 p-0 [&_svg]:h-3.5 [&_svg]:w-3.5',\n        // Bare 56px media glyph (play / unmute over video). A size variant so\n        // hosts stop re-implementing a <button> to escape the 20px svg cap.\n        'icon-glyph': 'h-14 w-14 p-0 [&_svg]:h-14 [&_svg]:w-14',\n      },\n      // Label typography axis (Figma 133-740). `bold` is the classic h3-bold\n      // label; `regular` swaps the DEFAULT size's label to the h4 step\n      // (DM Sans 500, neutral tracking) — added for navigation buttons.\n      // `small` keeps its mono-uppercase h5 label on both fonts per the spec.\n      font: {\n        bold: '',\n        regular: '',\n      },\n      fullWidth: {\n        true: 'w-full',\n        false: '',\n      },\n      noPaddingX: {\n        true: 'px-0',\n        false: '',\n      },\n    },\n    compoundVariants: [\n      { size: 'small', class: '[&_svg]:h-4 [&_svg]:w-4' },\n      // Comes after the size classes, so cn()'s tailwind-merge resolves the\n      // ods-typography group in favour of text-h4.\n      { size: 'default', font: 'regular', class: 'text-h4' },\n    ],\n    defaultVariants: {\n      variant: 'accent',\n      size: 'default',\n      font: 'bold',\n      fullWidth: false,\n      noPaddingX: false,\n    },\n  },\n);\n\n// Split layout (used when `splitIcon` is provided): outer button has no padding;\n// inner slots own padding/gap so the divider can span full button height.\nconst splitShellVariants = cva(\n  [\n    'group relative inline-flex items-stretch overflow-hidden whitespace-nowrap rounded-md',\n    'transition-colors duration-200',\n    'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus',\n    'disabled:pointer-events-none',\n  ],\n  {\n    variants: {\n      variant: {\n        accent: buttonSurfaceClasses.accent,\n        outline: cn(buttonSurfaceClasses.outline, outlineBorderClasses),\n        transparent: buttonSurfaceClasses.transparent,\n        destructive: buttonSurfaceClasses.destructive,\n        warning: buttonSurfaceClasses.warning,\n      },\n      size: {\n        default: 'h-12',\n        small: 'h-6 text-h5 md:h-8',\n      },\n      // Same label-typography axis as the normal layout — `regular` swaps the\n      // default size's h3-bold label for the h4 (DM Sans 500) step.\n      font: { bold: '', regular: '' },\n      fullWidth: { true: 'w-full', false: '' },\n    },\n    compoundVariants: [\n      { size: 'default', font: 'bold', class: 'text-h3' },\n      { size: 'default', font: 'regular', class: 'text-h4' },\n    ],\n    defaultVariants: { variant: 'accent', size: 'default', font: 'bold', fullWidth: false },\n  },\n);\n\nconst splitSlotVariants = cva(\n  // Glyph size lives per-size, not in the base: cva concatenates base + variant\n  // without tailwind-merge, so a base `[&_svg]:h-5` and a variant `[&_svg]:h-4`\n  // would both ship and the winner would come down to stylesheet order.\n  ['inline-flex items-center justify-center', '[&_svg]:shrink-0'],\n  {\n    variants: {\n      slot: {\n        main: 'gap-[var(--spacing-system-xsf)]',\n        icon: 'border-l',\n      },\n      size: splitGlyphSizeBySize,\n      variant: { accent: '', outline: '', transparent: '', destructive: '', warning: '' },\n      fullWidth: { true: '', false: '' },\n    },\n    compoundVariants: [\n      { slot: 'main', size: 'default', class: 'px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)]' },\n      { slot: 'main', size: 'small', class: 'px-[var(--spacing-system-xs)]' },\n      // `fullWidth` stretches the SHELL, not its children, so without this the main\n      // half stays content-sized and the icon half floats mid-button with dead space\n      // after it instead of sitting flush against the trailing edge. Keyed on\n      // `fullWidth` to match `SplitButton`, which grows its main half on exactly the\n      // same condition (`grow={fullWidth}`) — the two split layouts render side by\n      // side in the same rows and must not disagree. Callers that stretch the shell\n      // some other way (a `flex-1` className, a grid cell) keep the old behaviour.\n      { slot: 'main', fullWidth: true, class: 'flex-1' },\n      { slot: 'icon', size: 'default', class: 'w-10' },\n      { slot: 'icon', size: 'small', class: 'w-6 md:w-8' },\n      {\n        slot: 'icon',\n        variant: 'accent',\n        class: cn(\n          splitDividerColorClasses.accent,\n          'group-disabled:border-ods-disabled group-aria-disabled:border-ods-disabled',\n        ),\n      },\n      { slot: 'icon', variant: 'outline', class: splitDividerColorClasses.outline },\n      { slot: 'icon', variant: 'transparent', class: splitDividerColorClasses.transparent },\n      {\n        slot: 'icon',\n        variant: 'destructive',\n        class: cn(\n          splitDividerColorClasses.destructive,\n          'group-disabled:border-ods-disabled group-aria-disabled:border-ods-disabled',\n        ),\n      },\n      {\n        slot: 'icon',\n        variant: 'warning',\n        class: cn(\n          splitDividerColorClasses.warning,\n          'group-disabled:border-ods-disabled group-aria-disabled:border-ods-disabled',\n        ),\n      },\n    ],\n    defaultVariants: { slot: 'main', size: 'default', variant: 'accent', fullWidth: false },\n  },\n);\n\n/** @deprecated Use `size=\"small\"` instead. Temporary alias kept for backward compatibility; will be removed in the future. */\ntype DeprecatedButtonSize = 'small-legacy';\n\ntype ButtonSize =\n  Exclude<VariantProps<typeof buttonVariants>['size'], 'small-legacy' | null | undefined> | DeprecatedButtonSize;\n\ninterface ButtonProps\n  extends React.ButtonHTMLAttributes<HTMLButtonElement>, Omit<VariantProps<typeof buttonVariants>, 'size'> {\n  asChild?: boolean;\n  href?: string;\n  openInNewTab?: boolean;\n  prefetch?: boolean;\n  /**\n   * Pre-resolved anchor bundle (from `useNavLink({ href, targetPlatform })`).\n   * When set, renders the Button as `<Link>` with `href` / `target` / `rel`\n   * / `onClick` spread from this object. Lets callers thread the unified\n   * nav decision directly without `<Button asChild><a {...linkProps}/>`\n   * gymnastics. Wins over the separate `href` / `openInNewTab` props.\n   */\n  /**\n   * Render a plain `<a href download>` instead of a Next `<Link>`.\n   * A download is a RESOURCE fetch, not a route change: `<Link>` would try to\n   * prefetch/route it. Only meaningful together with `href`.\n   */\n  download?: boolean | string;\n  linkProps?: {\n    href: string;\n    target?: '_blank';\n    rel?: 'noopener noreferrer';\n    onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n  } | null;\n  leftIcon?: React.ReactNode;\n  rightIcon?: React.ReactNode;\n  /**\n   * Renders a vertical divider and trailing icon area inside the button.\n   * The whole button stays a single click target — the icon is decorative\n   * (`aria-hidden`). For two independent click targets, use `<SplitButton>`.\n   * Only honored when `size` is `\"default\"` or `\"small\"`.\n   */\n  splitIcon?: React.ReactNode;\n  loading?: boolean;\n  size?: ButtonSize;\n}\n\nconst Spinner = () => (\n  <svg className=\"animate-spin\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n    <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n    <path\n      className=\"opacity-75\"\n      fill=\"currentColor\"\n      d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n    />\n  </svg>\n);\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function ButtonImpl(\n  {\n    className,\n    variant,\n    size,\n    font,\n    fullWidth,\n    noPaddingX,\n    asChild,\n    href,\n    openInNewTab,\n    prefetch,\n    linkProps,\n    download,\n    leftIcon,\n    rightIcon,\n    splitIcon,\n    loading,\n    children,\n    disabled,\n    onClick,\n    ...props\n  },\n  ref,\n) {\n  const isDisabled = disabled || loading;\n\n  // splitIcon is only supported for default/small sizes. With other sizes\n  // (icon, small-legacy) we silently fall back to the normal layout.\n  const useSplitLayout = !!splitIcon && (size === 'default' || size === 'small' || size === undefined);\n\n  if (useSplitLayout) {\n    const safeSize = size ?? 'default';\n    const safeVariant = (variant ?? 'accent') as 'accent' | 'outline' | 'transparent' | 'destructive' | 'warning';\n    const shellClasses = cn(splitShellVariants({ variant: safeVariant, size: safeSize, font, fullWidth }), className);\n    const mainSlotClass = splitSlotVariants({ slot: 'main', size: safeSize, variant: safeVariant, fullWidth });\n    const iconSlotClass = splitSlotVariants({ slot: 'icon', size: safeSize, variant: safeVariant });\n\n    const splitContent = (\n      <>\n        <span className={cn('contents', loading && 'invisible')}>\n          <span className={mainSlotClass}>\n            {leftIcon && <span className=\"inline-flex items-center\">{leftIcon}</span>}\n            {children}\n            {rightIcon && <span className=\"inline-flex items-center\">{rightIcon}</span>}\n          </span>\n          <span aria-hidden=\"true\" className={iconSlotClass}>\n            {splitIcon}\n          </span>\n        </span>\n        {loading && (\n          // Carries the glyph scale itself: this overlay is a SIBLING of the slots, so\n          // it inherits neither their `[&_svg]` sizing nor a shell base rule (the shell\n          // deliberately has none — see `splitSlotVariants`). Without it the spinner\n          // renders unconstrained and fills the button. Reads the same per-size ramp the\n          // slots do, so it matches the glyphs it covers at both breakpoints.\n          <span\n            className={cn(\n              'absolute inset-0 inline-flex items-center justify-center text-ods-text-primary',\n              splitGlyphSizeBySize[safeSize],\n            )}\n          >\n            <Spinner />\n          </span>\n        )}\n      </>\n    );\n\n    // A download is a resource fetch, not a route change: same `Link` as every\n    // other anchor branch (so a host that registered `next/link` keeps ONE\n    // anchor implementation), with prefetch off — there is no route to warm,\n    // and prefetching would fetch the file itself. Checked BEFORE the\n    // linkProps/href resolution.\n    if (download && href) {\n      return (\n        <Link\n          href={href}\n          download={download}\n          prefetch={false}\n          className={cn(shellClasses, isDisabled && 'pointer-events-none')}\n          aria-label={props['aria-label']}\n        >\n          {splitContent}\n        </Link>\n      );\n    }\n\n    // `linkProps` (the pre-resolved bundle from `useNavLink({ href, targetPlatform })`)\n    // wins over the legacy `href` + `openInNewTab` props so callers can thread\n    // the unified nav decision directly. Either path produces the same `<Link>`.\n    const splitAnchor =\n      linkProps ??\n      (href\n        ? {\n            href,\n            target: openInNewTab ? ('_blank' as const) : undefined,\n            rel: openInNewTab ? ('noopener noreferrer' as const) : undefined,\n            onClick: onClick as unknown as React.MouseEventHandler<HTMLAnchorElement> | undefined,\n          }\n        : null);\n    if (splitAnchor) {\n      return (\n        <Link\n          href={splitAnchor.href}\n          prefetch={prefetch}\n          target={splitAnchor.target}\n          rel={splitAnchor.rel}\n          // The Link branches don't spread {...props} (button attrs don't\n          // belong on an anchor), but the accessible name MUST survive —\n          // icon-only link buttons have no text content.\n          aria-label={props['aria-label']}\n          aria-disabled={isDisabled || undefined}\n          tabIndex={isDisabled ? -1 : undefined}\n          className={cn(shellClasses, isDisabled && 'pointer-events-none')}\n          onClick={splitAnchor.onClick}\n        >\n          {splitContent}\n        </Link>\n      );\n    }\n\n    return (\n      <button ref={ref} className={shellClasses} disabled={isDisabled} onClick={onClick} {...props}>\n        {splitContent}\n      </button>\n    );\n  }\n\n  const classes = cn(buttonVariants({ variant, size, font, fullWidth, noPaddingX }), className);\n\n  // asChild: consumer fully controls the rendered element; we just stamp our classes.\n  if (asChild) {\n    return (\n      <Slot ref={ref} className={classes} {...props}>\n        {children}\n      </Slot>\n    );\n  }\n\n  // Real content stays in layout (preserving width) but goes invisible while loading.\n  // The spinner is absolutely positioned so it never shifts the button's size.\n  const content = (\n    <>\n      <span className={cn('contents', loading && 'invisible')}>\n        {leftIcon && <span className=\"inline-flex items-center\">{leftIcon}</span>}\n        {children}\n        {rightIcon && <span className=\"inline-flex items-center\">{rightIcon}</span>}\n      </span>\n      {loading && (\n        <span className=\"absolute inset-0 inline-flex items-center justify-center text-ods-text-primary\">\n          <Spinner />\n        </span>\n      )}\n    </>\n  );\n\n  // Same download short-circuit as the splitIcon branch.\n  if (download && href) {\n    return (\n      <Link\n        href={href}\n        download={download}\n        prefetch={false}\n        className={cn(classes, isDisabled && 'pointer-events-none')}\n        aria-label={props['aria-label']}\n      >\n        {content}\n      </Link>\n    );\n  }\n\n  // Same `linkProps`-wins-over-href resolution as the splitIcon branch.\n  const anchor =\n    linkProps ??\n    (href\n      ? {\n          href,\n          target: openInNewTab ? ('_blank' as const) : undefined,\n          rel: openInNewTab ? ('noopener noreferrer' as const) : undefined,\n          onClick: onClick as unknown as React.MouseEventHandler<HTMLAnchorElement> | undefined,\n        }\n      : null);\n  if (anchor) {\n    return (\n      <Link\n        href={anchor.href}\n        prefetch={prefetch}\n        target={anchor.target}\n        rel={anchor.rel}\n        // See the splitAnchor branch — keep the accessible name on the\n        // anchor render (icon-only link buttons have no text content).\n        aria-label={props['aria-label']}\n        aria-disabled={isDisabled || undefined}\n        tabIndex={isDisabled ? -1 : undefined}\n        className={cn(classes, isDisabled && 'pointer-events-none')}\n        onClick={anchor.onClick}\n      >\n        {content}\n      </Link>\n    );\n  }\n\n  return (\n    <button ref={ref} className={classes} disabled={isDisabled} onClick={onClick} {...props}>\n      {content}\n    </button>\n  );\n});\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants, type ButtonProps };\n","// Shared style atoms for `Button` and `SplitButton`. Extracted to keep a single\n// source of truth for surface colors, outline borders, and split-divider colors.\n\n// Each variant pairs `disabled:` (real `<button disabled>`) with `aria-disabled:`\n// (used for `<Link aria-disabled>` since anchors don't support `:disabled`).\nexport const buttonSurfaceClasses = {\n  accent:\n    'bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover active:bg-ods-accent-active disabled:bg-ods-disabled aria-disabled:bg-ods-disabled',\n  outline:\n    'bg-ods-card text-ods-text-primary hover:bg-ods-bg-hover active:bg-ods-bg-active disabled:bg-ods-card disabled:text-ods-text-disabled aria-disabled:bg-ods-card aria-disabled:text-ods-text-disabled',\n  transparent:\n    'bg-transparent text-ods-text-primary hover:bg-ods-bg-hover active:bg-ods-bg-active disabled:bg-transparent disabled:text-ods-text-disabled aria-disabled:bg-transparent aria-disabled:text-ods-text-disabled',\n  destructive:\n    'bg-ods-error text-ods-text-on-accent hover:bg-ods-error-hover active:bg-ods-error-active disabled:bg-ods-disabled aria-disabled:bg-ods-disabled',\n  warning:\n    'bg-ods-warning text-ods-text-on-accent hover:bg-ods-warning-hover active:bg-ods-warning-active disabled:bg-ods-disabled aria-disabled:bg-ods-disabled',\n  // A self-contained glyph (play badge, unmute glyph) that already carries its\n  // own scrim: no button surface at all, in any state. Distinct from\n  // `transparent`, whose hover/active fills would paint a rectangle behind the\n  // glyph — which is why call sites were undoing them with\n  // `hover:bg-transparent active:bg-transparent`.\n  glyph:\n    'bg-transparent text-ods-text-primary hover:bg-transparent active:bg-transparent disabled:bg-transparent disabled:text-ods-text-disabled aria-disabled:bg-transparent aria-disabled:text-ods-text-disabled',\n  // Chrome that sits ON media (video cards, image lightboxes): a scrim disc so\n  // the glyph stays legible over an arbitrary frame. Promoted to a variant\n  // because the walkthrough card, its theater and the bite cards were each\n  // stacking the same classes at the call site.\n  overlay:\n    'rounded-full bg-ods-overlay text-ods-text-primary backdrop-blur-sm hover:text-ods-accent active:text-ods-accent-active disabled:text-ods-text-disabled aria-disabled:text-ods-text-disabled',\n} as const;\n\nexport const outlineBorderClasses =\n  'border border-ods-border hover:border-ods-border-hover active:border-ods-border-active disabled:border-ods-border aria-disabled:border-ods-border';\n\n// Glyph scale for the split-layout button family: 16px below md, 24px from md.\n//\n// Shared because the same page-header action renders through EITHER of the two\n// split layouts depending on its shape — `SplitButton` for two click targets, and\n// `Button` + `splitIcon` for one with a decorative trailing glyph — and the two sit\n// side by side in the same row. They used to disagree: `SplitButton` carried this\n// responsive scale while the `Button` split slots re-declared a flat 20px, so a\n// \"submenu\" action's icons rendered 4px smaller than its neighbour's on desktop.\n// `Button`'s own flat `[&_svg]:h-5` stays as it is for ordinary (non-split) buttons.\nexport const splitGlyphSizeClasses = '[&_svg]:h-4 [&_svg]:w-4 md:[&_svg]:h-6 md:[&_svg]:w-6';\n\n// Per-size glyph scale for `Button`'s split slots AND the loading overlay that\n// covers them, so those two read from ONE place — the overlay sits outside both\n// slots and inherits neither their sizing nor a shell base rule, so without this it\n// would have to restate a number, which is the divergence described above.\n//\n// Scoped to `Button` on purpose: `SplitButton` keeps its own `small` ramp\n// (12px → 16px, vs the flat 16px here) and only shares the `default` step through\n// `splitGlyphSizeClasses`. Aligning `small` too is a visible design change, so it is\n// not folded in here silently.\nexport const splitGlyphSizeBySize = {\n  default: splitGlyphSizeClasses,\n  small: '[&_svg]:h-4 [&_svg]:w-4',\n} as const;\n\n// Color of the vertical seam between the main and icon halves (split layouts).\nexport const splitDividerColorClasses = {\n  accent: 'border-ods-accent-active',\n  outline: 'border-ods-border',\n  transparent: 'border-ods-border',\n  destructive: 'border-ods-error-active',\n  warning: 'border-ods-warning-active',\n} as const;\n\nexport type ButtonSurfaceVariant = keyof typeof buttonSurfaceClasses;\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport React from 'react';\nimport Link from '../../../embed-shims/next-link';\nimport { cn } from '../../../utils/cn';\nimport { buttonSurfaceClasses, splitDividerColorClasses, splitGlyphSizeClasses } from './button-styles';\n\n// Two independent interactive halves: each a `<button>` or `<a>`. The seam is\n// a 1px border on the left edge of the icon half, colored per variant. For a\n// single-target variant (decorative trailing icon), use `<Button splitIcon>`.\n\nconst splitHalfBase = [\n  'relative inline-flex items-center justify-center gap-[var(--spacing-system-xsf)]',\n  'whitespace-nowrap transition-colors duration-200',\n  'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus focus-visible:z-10',\n  'disabled:pointer-events-none',\n  '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n];\n\nconst splitHalfVariants = cva(splitHalfBase, {\n  variants: {\n    variant: {\n      accent: buttonSurfaceClasses.accent,\n      outline: buttonSurfaceClasses.outline, // Outline border lives in compoundVariants so we can omit the seam edge.\n      transparent: buttonSurfaceClasses.transparent,\n      destructive: buttonSurfaceClasses.destructive,\n      warning: buttonSurfaceClasses.warning,\n    },\n    size: {\n      default: `h-10 px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)] text-h3 md:h-12 ${splitGlyphSizeClasses}`,\n      small: 'h-6 px-[var(--spacing-system-xs)] text-h5 md:h-8 [&_svg]:h-3 [&_svg]:w-3 md:[&_svg]:h-4 md:[&_svg]:w-4',\n    },\n    side: { main: '', icon: '' },\n    soloOnMobile: { true: '', false: '' },\n  },\n  compoundVariants: [\n    // Rounded corners + per-variant seam. The icon-side's left border is the divider.\n    { variant: 'accent', side: 'main', class: 'rounded-l-md' },\n    {\n      variant: 'accent',\n      side: 'icon',\n      class: cn(\n        'rounded-r-md border-l',\n        splitDividerColorClasses.accent,\n        'disabled:border-ods-disabled aria-disabled:border-ods-disabled',\n      ),\n    },\n    { variant: 'destructive', side: 'main', class: 'rounded-l-md' },\n    {\n      variant: 'destructive',\n      side: 'icon',\n      class: cn(\n        'rounded-r-md border-l',\n        splitDividerColorClasses.destructive,\n        'disabled:border-ods-disabled aria-disabled:border-ods-disabled',\n      ),\n    },\n    { variant: 'warning', side: 'main', class: 'rounded-l-md' },\n    {\n      variant: 'warning',\n      side: 'icon',\n      class: cn(\n        'rounded-r-md border-l',\n        splitDividerColorClasses.warning,\n        'disabled:border-ods-disabled aria-disabled:border-ods-disabled',\n      ),\n    },\n    { variant: 'outline', side: 'main', class: 'rounded-l-md border-y border-l border-ods-border' },\n    { variant: 'outline', side: 'icon', class: 'rounded-r-md border border-ods-border' },\n    { variant: 'transparent', side: 'main', class: 'rounded-md' },\n    { variant: 'transparent', side: 'icon', class: cn('rounded-md', splitDividerColorClasses.transparent) },\n\n    // Icon half: per Figma, narrower than main height (default: 40×48; small: 32×32).\n    { side: 'icon', size: 'default', class: 'w-10 px-0' },\n    { side: 'icon', size: 'small', class: 'w-6 px-0 md:w-8' },\n\n    { side: 'icon', soloOnMobile: true, class: 'max-md:hidden' },\n    { side: 'main', soloOnMobile: true, class: 'max-md:rounded-r-md' },\n    { variant: 'outline', side: 'main', soloOnMobile: true, class: 'max-md:border-r' },\n  ],\n  defaultVariants: { variant: 'accent', size: 'default', side: 'main', soloOnMobile: false },\n});\n\ntype SplitButtonVariant = NonNullable<VariantProps<typeof splitHalfVariants>['variant']>;\ntype SplitButtonSize = NonNullable<VariantProps<typeof splitHalfVariants>['size']>;\n\ninterface SplitButtonIconAction {\n  icon: React.ReactNode;\n  /** The icon half is interactive but has no visible text — needs an accessible name. */\n  'aria-label': string;\n  onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n  href?: string;\n  /**\n   * Opens `href` with `target=\"_blank\"`. Also marks the half as a new-tab\n   * affordance, which hides it below `md` (set it for `onClick` handlers that\n   * open a new tab/window themselves).\n   */\n  openInNewTab?: boolean;\n  prefetch?: boolean;\n  disabled?: boolean;\n}\n\ninterface SplitButtonProps {\n  variant?: SplitButtonVariant;\n  size?: SplitButtonSize;\n  fullWidth?: boolean;\n  className?: string;\n\n  children: React.ReactNode;\n  onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n  href?: string;\n  openInNewTab?: boolean;\n  prefetch?: boolean;\n  leftIcon?: React.ReactNode;\n  rightIcon?: React.ReactNode;\n  /** Disables both halves. Equivalent to `mainDisabled && iconAction.disabled`. */\n  disabled?: boolean;\n  /** Disables only the main half. Combine with `iconAction.disabled` for finer control. */\n  mainDisabled?: boolean;\n  type?: 'button' | 'submit' | 'reset';\n  'aria-label'?: string;\n  groupAriaLabel?: string;\n\n  iconAction: SplitButtonIconAction;\n}\n\ninterface HalfOptions {\n  variant: SplitButtonVariant;\n  size: SplitButtonSize;\n  side: 'main' | 'icon';\n  soloOnMobile?: boolean;\n  href?: string;\n  openInNewTab?: boolean;\n  prefetch?: boolean;\n  onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n  disabled?: boolean;\n  /** Stretch this half to fill the group's free space (the icon half stays fixed-width). */\n  grow?: boolean;\n  type?: 'button' | 'submit' | 'reset';\n  ariaLabel?: string;\n  children: React.ReactNode;\n}\n\nfunction Half({\n  variant,\n  size,\n  side,\n  soloOnMobile,\n  href,\n  openInNewTab,\n  prefetch,\n  onClick,\n  disabled,\n  grow,\n  type = 'button',\n  ariaLabel,\n  children,\n}: HalfOptions) {\n  const classes = cn(splitHalfVariants({ variant, size, side, soloOnMobile }), grow && 'flex-1');\n\n  if (href) {\n    return (\n      <Link\n        href={href}\n        prefetch={prefetch}\n        target={openInNewTab ? '_blank' : undefined}\n        rel={openInNewTab ? 'noopener noreferrer' : undefined}\n        aria-disabled={disabled || undefined}\n        tabIndex={disabled ? -1 : undefined}\n        aria-label={ariaLabel}\n        className={cn(classes, disabled && 'pointer-events-none')}\n        onClick={onClick}\n      >\n        {children}\n      </Link>\n    );\n  }\n\n  return (\n    <button type={type} className={classes} disabled={disabled} aria-label={ariaLabel} onClick={onClick}>\n      {children}\n    </button>\n  );\n}\n\nconst SplitButton = React.forwardRef<HTMLDivElement, SplitButtonProps>(function SplitButtonImpl(\n  {\n    variant = 'accent',\n    size = 'default',\n    fullWidth = false,\n    className,\n    children,\n    onClick,\n    href,\n    openInNewTab,\n    prefetch,\n    leftIcon,\n    rightIcon,\n    disabled,\n    mainDisabled,\n    type,\n    iconAction,\n    'aria-label': ariaLabel,\n    groupAriaLabel,\n  },\n  ref,\n) {\n  const soloOnMobile = !!iconAction.openInNewTab;\n\n  return (\n    <div\n      ref={ref}\n      role=\"group\"\n      aria-label={groupAriaLabel}\n      className={cn('inline-flex items-stretch', fullWidth && 'w-full', className)}\n    >\n      <Half\n        variant={variant}\n        size={size}\n        side=\"main\"\n        soloOnMobile={soloOnMobile}\n        href={href}\n        openInNewTab={openInNewTab}\n        prefetch={prefetch}\n        onClick={onClick}\n        disabled={disabled || mainDisabled}\n        grow={fullWidth}\n        type={type}\n        ariaLabel={ariaLabel}\n      >\n        {leftIcon && <span className=\"inline-flex items-center\">{leftIcon}</span>}\n        <span>{children}</span>\n        {rightIcon && <span className=\"inline-flex items-center\">{rightIcon}</span>}\n      </Half>\n      <Half\n        variant={variant}\n        size={size}\n        side=\"icon\"\n        soloOnMobile={soloOnMobile}\n        href={iconAction.href}\n        openInNewTab={iconAction.openInNewTab}\n        prefetch={iconAction.prefetch}\n        onClick={iconAction.onClick}\n        disabled={disabled || iconAction.disabled}\n        ariaLabel={iconAction['aria-label']}\n      >\n        <span className=\"inline-flex items-center\">{iconAction.icon}</span>\n      </Half>\n    </div>\n  );\n});\nSplitButton.displayName = 'SplitButton';\n\nexport { SplitButton, type SplitButtonProps, type SplitButtonIconAction };\n"]}