{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "action-button",
  "type": "registry:item",
  "title": "Action Button",
  "description": "A button in six variants and three sizes, on a native <button> (or <a> with `href`), so it submits forms, takes `type`, and works with the keyboard and screen readers as the browser's own. `loading` keeps its size, shows a spinner, marks it busy and stops it being pressed again.",
  "dependencies": [
    "@zubra/runtime@^5.13.1"
  ],
  "categories": [
    "input"
  ],
  "registryDependencies": [
    "https://zubra-js.github.io/zubra-ui/r/theme.json"
  ],
  "files": [
    {
      "path": "components/action-button.js",
      "type": "registry:file",
      "target": "~/src/components/zubra/action-button.js",
      "content": "// Generated by zubra from action-button.zb. Do not edit.\nimport { $define, $r, $t } from \"@zubra/runtime\";\n\nexport const tag = \"action-button\";\n\nexport default $define(tag, {\n  props: {\n    \"variant\": { attribute: \"variant\", default: \"primary\", required: false },\n    \"size\": { attribute: \"size\", default: \"md\", required: false },\n    \"type\": { attribute: \"type\", default: \"button\", required: false },\n    \"disabled\": { attribute: \"disabled\", default: false, required: false },\n    \"loading\": { attribute: \"loading\", default: false, required: false },\n    \"name\": { attribute: \"name\", default: \"\", required: false },\n    \"value\": { attribute: \"value\", default: \"\", required: false },\n    \"label\": { attribute: \"label\", default: \"\", required: false },\n    \"href\": { attribute: \"href\", default: \"\", required: false },\n    \"target\": { attribute: \"target\", default: \"\", required: false },\n  },\n  abi: 3,\n  shadow: false,\n  form: false,\n  slots: [\"default\"],\n  events: [],\n  roots: [\"a\", \"button\"],\n  styled: true,\n  styles: \"@layer theme, base, components, utilities;\\n@layer components {\\n@scope (action-button) to ([data-zb-slotted=\\\"action-button\\\"]) {\\n  :scope { display: inline-block; }\\n  .action-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 2.5rem; padding: 0 1rem; border: 1px solid transparent; border-radius: calc(var(--radius, 0.625rem) - 2px); background: var(--primary, #18181b); color: var(--primary-foreground, #fafafa); font: inherit; font-size: 0.925rem; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--duration-fast, 150ms), border-color var(--duration-fast, 150ms), box-shadow var(--duration-fast, 150ms); }\\n  .action-button:hover { background: color-mix(in oklab, var(--primary, #18181b) 88%, var(--background, #fff)); }\\n  .action-button:focus-visible { outline: 2px solid var(--ring, #a1a1aa); outline-offset: 2px; }\\n  .action-button:active { transform: translateY(1px); }\\n  .action-secondary { background: var(--secondary, #f4f4f5); color: var(--secondary-foreground, #18181b); }\\n  .action-secondary:hover { background: color-mix(in oklab, var(--secondary, #f4f4f5) 85%, var(--foreground, #18181b)); }\\n  .action-outline { border-color: var(--border, #e4e4e7); background: var(--background, #fff); color: var(--foreground, #18181b); }\\n  .action-outline:hover, .action-ghost:hover { background: var(--accent, #f4f4f5); color: var(--accent-foreground, #18181b); }\\n  .action-ghost { background: none; color: var(--foreground, #18181b); }\\n  /* Darkened, so white text reads on the lighter reds that dark themes use. */\\n  .action-destructive { background: color-mix(in oklab, var(--destructive, #dc2626) 78%, #000); color: #fff; }\\n  .action-destructive:hover { background: color-mix(in oklab, var(--destructive, #dc2626) 68%, #000); }\\n  .action-link { height: auto; padding: 0; background: none; color: var(--primary, #18181b); text-decoration: underline; text-underline-offset: 3px; }\\n  .action-link:hover { background: none; text-decoration-thickness: 2px; }\\n  .action-sm { height: 2rem; padding: 0 0.75rem; font-size: 0.85rem; }\\n  .action-lg { height: 2.875rem; padding: 0 1.4rem; font-size: 1rem; }\\n  .action-link.action-sm, .action-link.action-lg { height: auto; padding: 0; }\\n  .action-button[aria-disabled=true], .action-button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }\\n  .action-button[aria-busy=true] { cursor: progress; }\\n  .action-spinner { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }\\n  @keyframes spin { to { transform: rotate(1turn); } }\\n  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; } }\\n}\\n}\\n\",\n  template: \"\\n  <!--[--><!--]-->\\n\",\n  setup($p, $emit) {\n    return [\n      { path: [0], when: () => $p.href, blocks: [{ template: \"<a><!--[--><!--]--></a>\", parts: () => [{ path: [0], attribute: \"class\", value: () => \"action-button action-\" + $t($p.variant) + \" action-\" + $t($p.size) }, { path: [0], attribute: \"href\", url: true, value: () => ($p.disabled ? null : $p.href) }, { path: [0], attribute: \"target\", value: () => ($p.target || null) }, { path: [0], attribute: \"aria-disabled\", value: () => ($p.disabled ? \"true\" : null) }, { path: [0], attribute: \"aria-label\", value: () => ($p.label || null) }, { path: [0, 0], slot: \"default\", fallback: null }] }, { template: \"<button>\\n    <!--[--><!--]-->\\n    <!--[--><!--]-->\\n  </button>\", parts: () => [{ path: [0], attribute: \"class\", value: () => \"action-button action-\" + $t($p.variant) + \" action-\" + $t($p.size) }, { path: [0], attribute: \"type\", value: () => $p.type }, { path: [0], attribute: \"name\", value: () => ($p.name || null) }, { path: [0], attribute: \"value\", value: () => ($p.value || null) }, { path: [0], attribute: \"disabled\", boolean: true, value: () => $p.disabled }, { path: [0], attribute: \"aria-disabled\", value: () => ($p.loading ? \"true\" : null) }, { path: [0], attribute: \"aria-busy\", value: () => ($p.loading ? \"true\" : null) }, { path: [0], attribute: \"aria-label\", value: () => ($p.label || null) }, { path: [0], on: \"click\", handler: () => ((event) => $p.loading && (event.preventDefault(), event.stopPropagation())) }, { path: [0, 0], when: () => $p.loading, blocks: [{ template: \"<span class=\\\"action-spinner\\\" aria-hidden=\\\"true\\\"></span>\", parts: () => [] }, null] }, { path: [0, 1], slot: \"default\", fallback: null }] }] },\n    ];\n  },\n});\n"
    }
  ]
}
