{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "number-field-02",
  "type": "registry:item",
  "title": "Number Field 02",
  "description": "Integrated Base UI Number Field with increment/decrement buttons, label, helper text, and error states. Full keyboard and screen reader accessibility.",
  "dependencies": [
    "@base-ui-components/react",
    "@mui/icons-material",
    "@mui/material",
    "@emotion/react",
    "@emotion/styled"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/number-field-02/number-field-02.tsx",
      "target": "src/mui-treasury/components/number-field-02/number-field-02.tsx",
      "content": "'use client';\nimport * as React from 'react';\n\nimport { NumberField as BaseNumberField } from '@base-ui-components/react/number-field';\nimport KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';\nimport KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';\nimport FormControl from '@mui/material/FormControl';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport IconButton from '@mui/material/IconButton';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport InputLabel from '@mui/material/InputLabel';\nimport OutlinedInput from '@mui/material/OutlinedInput';\n\n/**\n * This component is a placeholder for FormControl to correctly set the shrink label state on SSR.\n */\nfunction SSRInitialFilled(_: BaseNumberField.Root.Props) {\n  return null;\n}\nSSRInitialFilled.muiName = 'Input';\n\nexport function NumberField({\n  id: idProp,\n  label,\n  error,\n  size = 'medium',\n  ...other\n}: BaseNumberField.Root.Props & {\n  label?: React.ReactNode;\n  size?: 'small' | 'medium';\n  error?: boolean;\n}) {\n  let id = React.useId();\n  if (idProp) {\n    id = idProp;\n  }\n  return (\n    <BaseNumberField.Root\n      {...other}\n      render={(props, state) => (\n        <FormControl\n          size={size}\n          ref={props.ref}\n          disabled={state.disabled}\n          required={state.required}\n          error={error}\n          variant=\"outlined\"\n        >\n          {props.children}\n        </FormControl>\n      )}\n    >\n      <SSRInitialFilled {...other} />\n      <InputLabel htmlFor={id}>{label}</InputLabel>\n      <BaseNumberField.Input\n        id={id}\n        render={(props, state) => (\n          <OutlinedInput\n            label={label}\n            inputRef={props.ref}\n            value={state.inputValue}\n            onBlur={props.onBlur}\n            onChange={props.onChange}\n            onKeyUp={props.onKeyUp}\n            onKeyDown={props.onKeyDown}\n            onFocus={props.onFocus}\n            slotProps={{\n              input: props,\n            }}\n            endAdornment={\n              <InputAdornment\n                position=\"end\"\n                sx={{\n                  flexDirection: 'column',\n                  maxHeight: 'unset',\n                  alignSelf: 'stretch',\n                  borderLeft: '1px solid',\n                  borderColor: 'divider',\n                  ml: 0,\n                  '& button': {\n                    py: 0,\n                    flex: 1,\n                    borderRadius: 0.5,\n                    '&.MuiIconButton-sizeSmall': {\n                      lineHeight: '17px',\n                    },\n                  },\n                }}\n              >\n                <BaseNumberField.Increment\n                  render={<IconButton size={size} aria-label=\"Increase\" />}\n                >\n                  <KeyboardArrowUpIcon\n                    fontSize={size}\n                    sx={{ transform: 'translateY(2px)' }}\n                  />\n                </BaseNumberField.Increment>\n\n                <BaseNumberField.Decrement\n                  render={<IconButton size={size} aria-label=\"Decrease\" />}\n                >\n                  <KeyboardArrowDownIcon\n                    fontSize={size}\n                    sx={{ transform: 'translateY(-2px)' }}\n                  />\n                </BaseNumberField.Decrement>\n              </InputAdornment>\n            }\n            sx={{ pr: 0 }}\n          />\n        )}\n      />\n      <FormHelperText sx={{ ml: 0, '&:empty': { mt: 0 } }}>\n        Enter value between 10 and 40\n      </FormHelperText>\n    </BaseNumberField.Root>\n  );\n}\n",
      "type": "registry:item"
    },
    {
      "path": "components/number-field-02/index.ts",
      "target": "src/mui-treasury/components/number-field-02/index.ts",
      "content": "export * from './number-field-02';\n",
      "type": "registry:item"
    }
  ],
  "meta": {
    "category": "primitive",
    "subcategory": "text-field",
    "exportName": "NumberField"
  }
}