{"version":3,"sources":["../../../src/Radio/RadioGroup/RadioGroup.tsx","../../../src/utilities/Clay/Clay.tsx","../../../src/utilities/Flex/Flex.tsx","../../../src/Label/Label.tsx","../../../src/Typography/Typography.tsx","../../../src/Radio/RadioGroup/RadioGroup.provider.tsx"],"names":["vars","useId","forwardRef","jsx","Clay","_a","ref","_b","children","className","_hover","_active","_after","_before","_focus","size","width","height","shape","sx","as","native","props","__objRest","__spreadProps","__spreadValues","ClayNameSpace","_Flex","Flex","_FlexCenter","FlexCenter","_FlexColumn","FlexColumn","FlexNameSpace","jsxs","_Label","type","text","bold","Typography","Label","classNames","_Typography","semanticToken","variant","colorToken","whiteSpace","numOfLine","textAlign","createContext","useContext","RadioGroupValueContext","RadioGroupNameContext","RadioGroupActionContext","RadioGroupProvider","value","onChangeValue","name","RadioGroup","label","labelProps","direction","legend","id","deprecatedLabel"],"mappings":";+kBAAA,OAAS,QAAAA,MAAY,sBACrB,OAAS,SAAAC,OAAa,QCCtB,OAAS,QAAAD,MAAY,sBAErB,OAAS,cAAAE,MAAkB,QAiCrB,cAAAC,MAAA,6BAxBN,IAAMC,EAAsBF,EAC1B,CACEG,GAiBAC,IACG,CAlBH,IAAAC,EAAAF,GACE,UAAAG,EACA,UAAAC,EACA,OAAAC,EACA,QAAAC,EACA,OAAAC,EACA,QAAAC,EACA,OAAAC,EACA,KAAAC,EACA,MAAAC,EACA,OAAAC,EACA,MAAAC,EACA,GAAAC,EACA,GAAAC,EACA,OAAAC,CA7BN,EAeId,EAeKe,EAAAC,EAfLhB,EAeK,CAdH,WACA,YACA,SACA,UACA,SACA,UACA,SACA,OACA,QACA,SACA,QACA,KACA,KACA,WAOF,OACEJ,EAHciB,GAAM,MAGnBI,EAAAC,EAAA,CACC,IAAKnB,EACL,UAAWG,EACX,IAAKgB,IAAAD,EAAAC,EAAA,CACH,MAAOV,GAAQC,EACf,OAAQD,GAAQE,GACZC,IAAU,UAAY,CACxB,aAAclB,EAAK,QAAQ,IAC7B,GALG,C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xB,CAAiC,MAAOG,EACvC,SAAArD,EAACiD,GAAsB,SAAtB,CAA+B,MAAOK,EACrC,SAAAtD,EAACgD,GAAuB,SAAvB,CAAgC,MAAOI,EAAQ,SAAA/C,EAAS,EAC3D,EACF,ELGE,OAEI,OAAAL,EAFJ,QAAA+B,OAAA,oBAlBC,IAAMwB,GAAa,CAAK,CAC7B,SAAAlD,EACA,MAAAmD,EACA,WAAAC,EACA,UAAAC,EAAY,SACZ,UAAApD,EACA,GAAAU,EACA,MAAAoC,EACA,cAAAC,EACA,GAAApC,EACA,OAAAC,EACA,OAAAyC,CACF,IAA0B,CACxB,IAAMC,EAAK9D,GAAM,EACX+D,EAAkBL,GAASG,EAEjC,OACE3D,EAACmD,EAAA,CAAmB,MAAOC,EAAO,cAAeC,EAAe,KAAMO,EACpE,SAAA7B,GAACD,EAAK,OAAL,CAAY,IAAKjC,EAAK,QAAQ,CAAC,EAAG,UAAWS,EAAW,GAAIU,EAAI,GAAIC,EAAI,OAAQC,EAC9E,UAAA2C,GAAmB,OAAOA,GAAoB,SAC7C7D,EAACqC,EAAAf,EAAA,CAAM,KAAMuC,GAAqBJ,EAAY,EAE9CI,EAGF7D,EAAC8B,EAAK,OAAL,CAAY,cAAe4B,EAAW,IAAK7D,EAAK,QAAQ6D,IAAc,SAAW,EAAI,CAAC,EACpF,SAAArD,EACH,GACF,EACF,CAEJ","sourcesContent":["import { vars } from \"@imwebme/clay-token\";\nimport { useId } from \"react\";\nimport { Flex, Label } from \"../..\";\nimport { RadioGroupProvider } from \"./RadioGroup.provider\";\nimport type { RadioGroupProps } from \"./RadioGroup.types\";\n\nexport const RadioGroup = <T,>({\n  children,\n  label,\n  labelProps,\n  direction = \"column\",\n  className,\n  sx,\n  value,\n  onChangeValue,\n  as,\n  native,\n  legend,\n}: RadioGroupProps<T>) => {\n  const id = useId();\n  const deprecatedLabel = label || legend;\n\n  return (\n    <RadioGroupProvider value={value} onChangeValue={onChangeValue} name={id}>\n      <Flex.Column gap={vars.spacing[1]} className={className} sx={sx} as={as} native={native}>\n        {deprecatedLabel && typeof deprecatedLabel === \"string\" ? (\n          <Label text={deprecatedLabel} {...labelProps} />\n        ) : (\n          deprecatedLabel\n        )}\n\n        <Flex.Column flexDirection={direction} gap={vars.spacing[direction === \"column\" ? 1 : 6]}>\n          {children}\n        </Flex.Column>\n      </Flex.Column>\n    </RadioGroupProvider>\n  );\n};\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","import type { ComponentPropsWithRef, ElementType } from \"react\";\nimport { forwardRef } from \"react\";\nimport { Clay } from \"../Clay\";\nimport type { ClayComponent, ClayProps } from \"../Clay/Clay.types\";\n\nconst _Flex: ClayComponent = forwardRef(\n  <Element extends ElementType>(\n    props: ClayProps<Element>,\n    ref: ComponentPropsWithRef<Element>[\"ref\"],\n  ) => <Clay ref={ref} display=\"flex\" {...props} />,\n);\n\nconst Flex = Object.assign(_Flex, { displayName: \"Flex\" });\n\nconst _FlexCenter: ClayComponent = forwardRef(\n  <Element extends ElementType>(\n    props: ClayProps<Element>,\n    ref: ComponentPropsWithRef<Element>[\"ref\"],\n  ) => <Flex ref={ref} alignItems=\"center\" justifyContent=\"center\" {...props} />,\n);\n\nconst FlexCenter = Object.assign(_FlexCenter, { displayName: \"Flex.Center\" });\n\nconst _FlexColumn: ClayComponent = forwardRef(\n  <Element extends ElementType>(\n    { as = \"div\" as any, ...props }: ClayProps<Element>,\n    ref: ComponentPropsWithRef<Element>[\"ref\"],\n  ) => <Flex ref={ref} as={as} flexDirection=\"column\" {...props} />,\n);\n\nconst FlexColumn = Object.assign(_FlexColumn, { displayName: \"Flex.Column\" });\n\n/**\n * @deprecated Use `Flex.Column` instead\n */\nexport const Stack = FlexColumn;\n\nconst FlexNameSpace = Object.assign(Flex, { Center: FlexCenter, Column: FlexColumn });\n\nexport { FlexNameSpace as Flex };\n","/** @jsxImportSource @emotion/react */\n\nimport { vars } from \"@imwebme/clay-token\";\nimport type { ElementType, Ref } from \"react\";\nimport { forwardRef } from \"react\";\nimport { Typography } from \"..\";\nimport type { LabelProps } from \"./Label.types\";\n\nconst _Label = <Element extends ElementType>(\n  { type = \"primary\", className, text, bold = true, sx, as, children }: LabelProps<Element>,\n  ref: Ref<HTMLElement>,\n) => {\n  const Element = as || \"label\";\n\n  return (\n    <Element\n      ref={ref as any}\n      className={className}\n      css={{\n        display: \"flex\",\n        gap: vars.spacing[1],\n        alignItems: \"center\",\n        sx,\n      }}\n    >\n      <Typography\n        variant={bold ? \"label-medium-bold\" : \"label-medium\"}\n        colorToken={type === \"primary\" ? \"text\" : \"textSub\"}\n      >\n        {text}\n      </Typography>\n\n      {children}\n    </Element>\n  );\n};\n\nexport const Label = forwardRef(_Label);\n\nLabel.displayName = \"Label\";\n","/** @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","import type { PropsWithChildren } from \"react\";\nimport { createContext, useContext } from \"react\";\nimport type { RadioGroupProps } from \"./RadioGroup.types\";\n\nconst RadioGroupValueContext = createContext<any>(null);\nconst RadioGroupNameContext = createContext<string | null>(null);\nconst RadioGroupActionContext = createContext<undefined | ((val: any) => void)>(undefined);\n\nexport const RadioGroupProvider = <T,>({\n  value,\n  onChangeValue,\n  children,\n  name,\n}: PropsWithChildren<Pick<RadioGroupProps<T>, \"value\" | \"onChangeValue\">> & {\n  name: string | null;\n}) => {\n  return (\n    <RadioGroupActionContext.Provider value={onChangeValue}>\n      <RadioGroupNameContext.Provider value={name}>\n        <RadioGroupValueContext.Provider value={value}>{children}</RadioGroupValueContext.Provider>\n      </RadioGroupNameContext.Provider>\n    </RadioGroupActionContext.Provider>\n  );\n};\n\nexport const useRadioGroupValue = () => useContext(RadioGroupValueContext);\nexport const useRadioGroupAction = () => useContext(RadioGroupActionContext);\nexport const useRadioGroupName = () => useContext(RadioGroupNameContext);\n"]}