{"version":3,"sources":["../../../src/Typography/Typography.tsx","../../../src/utilities/Clay/Clay.tsx","../../../src/Textarea/components/CharacterCount.tsx"],"names":["classNames","vars","forwardRef","jsx","_Typography","as","semanticToken","variant","className","colorToken","children","whiteSpace","numOfLine","sx","textAlign","native","ref","__spreadProps","__spreadValues","Typography","Clay","_a","_b","_hover","_active","_after","_before","_focus","size","width","height","shape","props","__objRest","ClayNameSpace","CharacterCount","value","maxLength","clayProps"],"mappings":";+kBAEA,OAAS,cAAAA,EAAY,QAAAC,MAAY,sBAEjC,OAAS,cAAAC,MAAkB,QA0BvB,cAAAC,MAAA,6BAnBJ,IAAMC,EAAc,CAClB,CACE,GAAAC,EACA,cAAAC,EACA,QAAAC,EAAU,cACV,UAAAC,EAAY,GACZ,WAAAC,EAAa,OACb,SAAAC,EACA,WAAAC,EACA,UAAAC,EACA,GAAAC,EACA,UAAAC,EACA,OAAAC,CACF,EACAC,IAKEb,EAHcE,GAAM,IAGnBY,EAAAC,EAAA,CACC,UAAW,GAAGlB,EAAW,WAAWM,GAAiBC,CAAO,CAAC,IAAIC,CAAS,GAC1E,IAAKQ,EACL,IAAKE,EAAAD,EAAAC,EAAA,CACH,MAAOjB,EAAK,SAAS,MAAMQ,CAAU,GACjCG,GAAa,CACf,QAAS,cACT,SAAU,SACV,aAAc,WACd,gBAAiB,WACjB,gBAAiBA,CACnB,GARG,CASH,WAAAD,EACA,UAAAG,IACGD,IAEDE,GAhBL,CAkBE,SAAAL,GACH,EAISS,EAAajB,EAAWE,CAAW,EAEhDe,EAAW,YAAc,aCrDzB,OAAS,QAAAlB,MAAY,sBAErB,OAAS,cAAAC,MAAkB,QAiCrB,cAAAC,MAAA,6BAxBN,IAAMiB,EAAsBlB,EAC1B,CACEmB,EAiBAL,IACG,CAlBH,IAAAM,EAAAD,EACE,UAAAX,EACA,UAAAF,EACA,OAAAe,EACA,QAAAC,EACA,OAAAC,EACA,QAAAC,EACA,OAAAC,EACA,KAAAC,EACA,MAAAC,EACA,OAAAC,EACA,MAAAC,EACA,GAAAlB,EACA,GAAAR,EACA,OAAAU,CA7BN,EAeIO,EAeKU,EAAAC,EAfLX,EAeK,CAdH,WACA,YACA,SACA,UACA,SACA,UACA,SACA,OACA,QACA,SACA,QACA,KACA,KACA,WAOF,OACEnB,EAHcE,GAAM,MAGnBY,EAAAC,EAAA,CACC,IAAKF,EACL,UAAWR,EACX,IAAKU,IAAAD,EAAAC,EAAA,CACH,MAAOU,GAAQC,EACf,OAAQD,GAAQE,GACZC,IAAU,UAAY,CACxB,aAAc9B,EAAK,QAAQ,IAC7B,GALG,CAMH,UAAWsB,EACX,WAAYC,EACZ,UAAWC,EACX,WAAYC,EACZ,UAAWC,IACRK,GACAnB,IAEDE,GAjBL,CAmBE,SAAAL,GACH,CAEJ,CACF,EAEMwB,EAAgB,OAAO,OAAOd,EAAM,CAAE,YAAa,MAAO,CAAC,EClD3D,cAAAjB,MAAA,6BAHC,IAAMgC,EAAkBd,GAA4D,CAA5D,IAAAC,EAAAD,EAAE,OAAAe,EAAO,UAAAC,CATxC,EAS+Bf,EAAuBgB,EAAAL,EAAvBX,EAAuB,CAArB,QAAO,cACtC,OACEnB,EAAC+B,EAAAjB,EAAAC,EAAA,CAAK,GAAG,OAAUoB,GAAlB,CACC,SAAAnC,EAACgB,EAAA,CAAW,WAAW,UACpB,YAAGiB,EAAQA,EAAM,OAAS,CAAC,GAAGC,EAAY,IAAIA,CAAS,GAAK,EAAE,GACjE,GACF,CAEJ","sourcesContent":["/** @jsxImportSource @emotion/react */\n\nimport { classNames, vars } from \"@imwebme/clay-token\";\nimport type { ElementType, Ref } from \"react\";\nimport { forwardRef } from \"react\";\nimport type { TypographyProps } from \"./Typography.types\";\n\n/**\n * token은 두 가지 방법으로 넣어줄 수 있습니다. semanticToken, variant\n * 값은 body-medium이 default 입니다.\n */\nconst _Typography = <Element extends ElementType>(\n  {\n    as,\n    semanticToken,\n    variant = \"body-medium\",\n    className = \"\",\n    colorToken = \"text\",\n    children,\n    whiteSpace,\n    numOfLine,\n    sx,\n    textAlign,\n    native,\n  }: TypographyProps<Element>,\n  ref: Ref<HTMLElement>,\n) => {\n  const Element = as || \"p\";\n\n  return (\n    <Element\n      className={`${classNames.typography[semanticToken || variant]} ${className}`}\n      ref={ref as any}\n      css={{\n        color: vars.semantic.color[colorToken],\n        ...(numOfLine && {\n          display: \"-webkit-box\",\n          overflow: \"hidden\",\n          textOverflow: \"ellipsis\",\n          WebkitBoxOrient: \"vertical\",\n          WebkitLineClamp: numOfLine,\n        }),\n        whiteSpace,\n        textAlign,\n        ...sx,\n      }}\n      {...native}\n    >\n      {children}\n    </Element>\n  );\n};\n\nexport const Typography = forwardRef(_Typography);\n\nTypography.displayName = \"Typography\";\n","/** @jsxImportSource @emotion/react */\n\nimport { vars } from \"@imwebme/clay-token\";\nimport type { ComponentPropsWithRef, ElementType, ReactElement } from \"react\";\nimport { forwardRef } from \"react\";\nimport type { ClayProps } from \"./Clay.types\";\n\nexport type ClayComponent = <C extends ElementType = \"div\">(\n  props: ClayProps<C> & {\n    ref?: ComponentPropsWithRef<C>[\"ref\"];\n  },\n) => ReactElement | null;\n\nconst Clay: ClayComponent = forwardRef(\n  <E extends ElementType>(\n    {\n      children,\n      className,\n      _hover,\n      _active,\n      _after,\n      _before,\n      _focus,\n      size,\n      width,\n      height,\n      shape,\n      sx,\n      as,\n      native,\n      ...props\n    }: ClayProps<E>,\n    ref: ComponentPropsWithRef<E>[\"ref\"],\n  ) => {\n    const Element = as || \"div\";\n\n    return (\n      <Element\n        ref={ref}\n        className={className}\n        css={{\n          width: size || width,\n          height: size || height,\n          ...(shape === \"circle\" && {\n            borderRadius: vars.rounded.full,\n          }),\n          \"&:hover\": _hover,\n          \"&:active\": _active,\n          \"&:after\": _after,\n          \"&:before\": _before,\n          \"&:focus\": _focus,\n          ...props,\n          ...sx,\n        }}\n        {...native}\n      >\n        {children}\n      </Element>\n    );\n  },\n);\n\nconst ClayNameSpace = Object.assign(Clay, { displayName: \"Clay\" });\n\nexport { ClayNameSpace as Clay };\n","/** @jsxImportSource @emotion/react */\n\nimport { Typography } from \"../../Typography\";\nimport { Clay } from \"../../utilities\";\nimport type { ClayProps } from \"../../utilities/Clay/Clay.types\";\nimport type { TextareaCoreProps } from \"../Textarea.types\";\n\nexport type CharacterCountProps = Pick<TextareaCoreProps, \"maxLength\" | \"value\"> & ClayProps<\"div\">;\n\nexport const CharacterCount = ({ value, maxLength, ...clayProps }: CharacterCountProps) => {\n  return (\n    <Clay as=\"div\" {...clayProps}>\n      <Typography colorToken=\"textSub\">\n        {`${value ? value.length : 0}${maxLength ? `/${maxLength}` : \"\"}`}\n      </Typography>\n    </Clay>\n  );\n};\n"]}