UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

1 lines 1.45 kB
{"version":3,"file":"input-addon.cjs","names":["createComponent","inputAddonStyle","useInputBorder"],"sources":["../../../../src/components/input/input-addon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { InputProps } from \"./input\"\nimport type { InputAddonStyle } from \"./input-addon.style\"\nimport { createComponent } from \"../../core\"\nimport { inputAddonStyle } from \"./input-addon.style\"\nimport { useInputBorder } from \"./use-input-border\"\n\nexport interface InputAddonProps\n extends HTMLStyledProps,\n ThemeProps<InputAddonStyle>,\n Pick<InputProps, \"errorBorderColor\" | \"focusBorderColor\"> {}\n\nconst {\n PropsContext: InputAddonPropsContext,\n usePropsContext: useInputAddonPropsContext,\n withContext,\n} = createComponent<InputAddonProps, InputAddonStyle>(\n \"input-addon\",\n inputAddonStyle,\n)\n\nexport { InputAddonPropsContext, useInputAddonPropsContext }\n\nexport const InputAddon = withContext(\"div\")(\n undefined,\n ({ errorBorderColor, focusBorderColor, ...rest }) => {\n const varProps = useInputBorder({ errorBorderColor, focusBorderColor })\n\n return { ...varProps, ...rest }\n },\n)\n"],"mappings":";;;;;;;;AAcA,MAAM,EACJ,cAAc,wBACd,iBAAiB,2BACjB,gBACEA,yCACF,eACAC,0CACD;AAID,MAAa,aAAa,YAAY,MAAM,CAC1C,SACC,EAAE,kBAAkB,iBAAkB,GAAG,WAAW;AAGnD,QAAO;EAAE,GAFQC,wCAAe;GAAE;GAAkB;GAAkB,CAAC;EAEjD,GAAG;EAAM;EAElC"}