{"version":3,"file":"InputBase.cjs","sources":["../../../src/components/InputBase/InputBase.tsx"],"sourcesContent":["import { BoxProps, polymorphicFactory, PolymorphicFactory, StylesApiProps } from '../../core';\nimport { __BaseInputProps, __InputStylesNames, Input, InputVariant, useInputProps } from '../Input';\n\nexport interface InputBaseProps\n  extends BoxProps,\n    __BaseInputProps,\n    StylesApiProps<InputBaseFactory> {\n  __staticSelector?: string;\n  __stylesApiProps?: Record<string, any>;\n\n  /** Props passed down to the root element (`Input.Wrapper` component) */\n  wrapperProps?: Record<string, any>;\n\n  /** Determines whether the input can have multiple lines, for example when `component=\"textarea\"`, `false` by default */\n  multiline?: boolean;\n\n  /** Determines whether `aria-` and other accessibility attributes should be added to the input, `true` by default */\n  withAria?: boolean;\n}\n\nexport type InputBaseFactory = PolymorphicFactory<{\n  props: InputBaseProps;\n  defaultRef: HTMLInputElement;\n  defaultComponent: 'input';\n  stylesNames: __InputStylesNames;\n  variant: InputVariant;\n}>;\n\nconst defaultProps: Partial<InputBaseProps> = {\n  __staticSelector: 'InputBase',\n  withAria: true,\n};\n\nexport const InputBase = polymorphicFactory<InputBaseFactory>((props, ref) => {\n  const { inputProps, wrapperProps, ...others } = useInputProps('InputBase', defaultProps, props);\n  return (\n    <Input.Wrapper {...wrapperProps}>\n      <Input {...inputProps} {...others} ref={ref} />\n    </Input.Wrapper>\n  );\n});\n\nInputBase.displayName = '@raikou/core/InputBase';\n"],"names":["polymorphicFactory","useInputProps","jsx","Input"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BA,MAAM,YAAwC,GAAA;AAAA,EAC5C,gBAAkB,EAAA,WAAA;AAAA,EAClB,QAAU,EAAA;AACZ,CAAA;AAEO,MAAM,SAAY,GAAAA,qCAAA,CAAqC,CAAC,KAAA,EAAO,GAAQ,KAAA;AAC5E,EAAM,MAAA,EAAE,YAAY,YAAc,EAAA,GAAG,QAAW,GAAAC,2BAAA,CAAc,WAAa,EAAA,YAAA,EAAc,KAAK,CAAA;AAC9F,EAAA,uBACGC,cAAA,CAAAC,WAAA,CAAM,OAAN,EAAA,EAAe,GAAG,YAAA,EACjB,QAAC,kBAAAD,cAAA,CAAAC,WAAA,EAAA,EAAO,GAAG,UAAA,EAAa,GAAG,MAAA,EAAQ,KAAU,CAC/C,EAAA,CAAA;AAEJ,CAAC;AAED,SAAA,CAAU,WAAc,GAAA,wBAAA;;;;"}