{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A narrow number field between a minus and a plus ghost icon button, drawn as one control (4px inside its ring). Static markup: the buttons carry no logic; the page wires them.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/number-field.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/input\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// NumberFieldProps are the props of NumberField; the values are the JSON shapes of the TypeScript props.\ntype NumberFieldProps struct {\n\tValue any `json:\"value\"`\n\tName any `json:\"name\"`\n\tMin any `json:\"min\"`\n\tLabel any `json:\"label\"`\n\tDecrease any `json:\"decrease\"`\n\tIncrease any `json:\"increase\"`\n}\n\n// A narrow number field between a minus and a plus ghost icon button, drawn as one control (4px inside its ring). Static markup: the buttons carry no logic; the page wires them.\ntempl NumberField(p NumberFieldProps) {\n\t{{ vValue := uiutils.Def(p.Value, \"\") }}\n\t{{ vName := uiutils.Def(p.Name, \"\") }}\n\t{{ vMin := uiutils.Def(p.Min, \"\") }}\n\t{{ vLabel := p.Label }}\n\t{{ vDecrease := p.Decrease }}\n\t{{ vIncrease := p.Increase }}\n\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"inline-flex h-10 items-center gap-1 rounded bg-background p-1 inset-ring inset-ring-input\", Attrs: uiutils.Attrs(\"data-slot\", \"number-field\")}}) {\n\t\t@compose.Button(compose.ButtonProps{Variant: \"ghost\", Size: \"sm\", Layout: \"icon\", ButtonProps: button.ButtonProps{Type: \"button\", AriaLabel: uiutils.S(vDecrease)}}) {\n\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"minus\", Size: 16})\n\t\t}\n\t\t@compose.Input(compose.InputProps{Size: \"sm\", InputProps: input.InputProps{Type: \"number\", Name: uiutils.S(vName), Value: uiutils.SP(vValue), Min: uiutils.S(vMin), Class: \"number-bare w-8 bg-transparent px-0 text-center inset-ring-0\", Attrs: uiutils.Attrs(\"aria-label\", vLabel)}})\n\t\t@compose.Button(compose.ButtonProps{Variant: \"ghost\", Size: \"sm\", Layout: \"icon\", ButtonProps: button.ButtonProps{Type: \"button\", AriaLabel: uiutils.S(vIncrease)}}) {\n\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"plus\", Size: 16})\n\t\t}\n\t}\n}\n",
      "path": "blocks/number-field.templ",
      "target": "blocks/number-field.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "number-field",
  "registryDependencies": [
    "box",
    "button",
    "input",
    "kit-box",
    "kit-button",
    "kit-input",
    "lucide-icon",
    "utils"
  ],
  "runtime": "templ",
  "title": "Number Field",
  "type": "registry:component"
}
