{"version":3,"file":"RulerBadge.CAPTO4om.mjs","names":["forwardRef","Badge"],"sources":["https:/asset.29cm.co.kr/contents/framer/components/ruler/Badge/Badge.constants.js","https:/asset.29cm.co.kr/contents/framer/components/ruler/Badge/Badge.utils.js","https:/asset.29cm.co.kr/contents/framer/components/ruler/Badge/Badge.js","https:/asset.29cm.co.kr/contents/framer/components/ruler/Badge/Badge.types.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/badge.js","https:/asset.29cm.co.kr/contents/framer/components/systems/Badge/Badge.js","https:/asset.29cm.co.kr/contents/framer/components/systems/Badge/index.js","https:/framerusercontent.com/modules/ujMK2tuF8Uh4yfdgJfeZ/IubTds5GYI6HTrke7tQJ/RulerBadge.js"],"sourcesContent":["import \"react/jsx-runtime\";\nimport { plus } from \"../../@shared/Icon/assets/plus.js\";\nimport { heart } from \"../../@shared/Icon/assets/heart.js\";\nimport { bell } from \"../../@shared/Icon/assets/bell.js\";\nimport { gift } from \"../../@shared/Icon/assets/gift.js\";\nimport { share } from \"../../@shared/Icon/assets/share.js\";\nimport { scrap } from \"../../@shared/Icon/assets/scrap.js\";\nimport { lock } from \"../../@shared/Icon/assets/lock.js\";\nimport { lockOff } from \"../../@shared/Icon/assets/lockOff.js\";\nconst UNSET_COLOR = {\n  backgroundColor: \"#000000\",\n  color: \"#FFFFFF\"\n};\nconst prefixIconAssets = {\n  plus,\n  scrap,\n  lock,\n  lockOff,\n  heart,\n  bell,\n  gift,\n  share\n};\nconst BADGE_PREFIX_ICON_OPTIONS = Object.keys(prefixIconAssets);\nexport {\n  BADGE_PREFIX_ICON_OPTIONS,\n  UNSET_COLOR\n};\n","const getBadgeBackgroundColor = (backgroundColor, isBlur) => {\n  if (typeof backgroundColor === \"string\") {\n    return backgroundColor;\n  }\n  if (isBlur) {\n    return backgroundColor.hasBlur;\n  }\n  return backgroundColor.default;\n};\nconst getBadgeTextColor = (color, isBlur) => {\n  if (typeof color === \"string\") {\n    return color;\n  }\n  if (isBlur) {\n    return color.hasBlur;\n  }\n  return color.default;\n};\nexport {\n  getBadgeBackgroundColor,\n  getBadgeTextColor\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { Icon } from \"../../@shared/Icon/Icon.js\";\nimport { typography } from \"../../../styles/typography.js\";\nimport { UNSET_COLOR } from \"./Badge.constants.js\";\nimport { getBadgeBackgroundColor, getBadgeTextColor } from \"./Badge.utils.js\";\nconst Badge = forwardRef(({\n  variant = \"system\",\n  priority = \"primary\",\n  tone = \"default\",\n  size = \"small\",\n  isWhite = false,\n  isBlur = false,\n  prefixIcon,\n  label = \"Label\",\n  customBackgroundColor = \"#000000\",\n  customTextColor = \"#FFFFFF\",\n  style,\n  ...rest\n}, ref) => {\n  var _a;\n  const theme = isWhite ? \"light\" : \"dark\";\n  const customizedBadgeColor = {\n    backgroundColor: customBackgroundColor,\n    color: customTextColor\n  };\n  const configuredBadgeColors = ((_a = badgeStyleByVariant[priority][tone]) == null ? void 0 : _a[theme]) ?? UNSET_COLOR;\n  const {\n    backgroundColor,\n    color\n  } = variant === \"custom\" ? customizedBadgeColor : configuredBadgeColors;\n  const badgeBackgroundColor = getBadgeBackgroundColor(backgroundColor, isBlur);\n  const badgeTextColor = getBadgeTextColor(color, isBlur);\n  const badgePadding = prefixIcon ? badgeStyleBySize[size].padding.withPrefixIcon : badgeStyleBySize[size].padding.default;\n  const badgeStyle = {\n    ...baseBadgeStyle,\n    ...badgeStyleBySize[size],\n    padding: badgePadding,\n    backgroundColor: badgeBackgroundColor,\n    color: badgeTextColor\n  };\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    ...badgeStyle,\n    ...style\n  }, ref, ...rest, children: [\n    prefixIcon ? /* @__PURE__ */ jsx(Icon, { type: prefixIcon, fill: true, size: iconSizeByBadgeSize[size], color: badgeTextColor, weight: \"bold\" }) : null,\n    /* @__PURE__ */ jsx(\"span\", { children: label })\n  ] });\n});\nconst baseBadgeStyle = {\n  display: \"flex\",\n  gap: \"2px\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n  borderRadius: \"2px\",\n  whiteSpace: \"nowrap\"\n};\nconst badgeStyleBySize = {\n  medium: {\n    ...typography(12, 500, \"16.32px\"),\n    padding: {\n      default: \"4px 8px\",\n      withPrefixIcon: \"4px 8px 4px 6px\"\n    }\n  },\n  small: {\n    ...typography(10, 500, \"12px\"),\n    padding: {\n      default: \"2px 6px\",\n      withPrefixIcon: \"2px 6px 2px 4px\"\n    }\n  }\n};\nconst badgeStyleByVariant = {\n  primary: {\n    default: {\n      light: {\n        backgroundColor: \"#FFFFFF\",\n        color: \"#000000\"\n      },\n      dark: {\n        backgroundColor: \"#000000\",\n        color: \"#FFFFFF\"\n      }\n    },\n    information: {\n      dark: {\n        backgroundColor: \"#375FFF\",\n        color: \"#FFFFFF\"\n      }\n    },\n    positive: {\n      dark: {\n        backgroundColor: \"#12BA23\",\n        color: \"#FFFFFF\"\n      }\n    },\n    negative: {\n      dark: {\n        backgroundColor: \"#D53F00\",\n        color: \"#FFFFFF\"\n      }\n    }\n  },\n  secondary: {\n    default: {\n      dark: {\n        backgroundColor: {\n          default: \"#F4F4F4\",\n          hasBlur: \"#5D5D5D80\"\n        },\n        color: {\n          default: \"#474747\",\n          hasBlur: \"#FFFFFF\"\n        }\n      }\n    },\n    information: {\n      dark: {\n        backgroundColor: \"#345FFF14\",\n        color: \"#375FFF\"\n      }\n    },\n    positive: {\n      dark: {\n        backgroundColor: \"#16BA2214\",\n        color: \"#12BA23\"\n      }\n    },\n    negative: {\n      dark: {\n        backgroundColor: \"#FF480014\",\n        color: \"#D53F00\"\n      }\n    }\n  },\n  tertiary: {\n    default: {\n      dark: {\n        backgroundColor: \"#F4F4F4\",\n        color: \"#A0A0A0\"\n      }\n    }\n  }\n};\nconst iconSizeByBadgeSize = {\n  medium: 12,\n  small: 10\n};\nexport {\n  Badge\n};\n","var BadgeVariant = /* @__PURE__ */ ((BadgeVariant2) => {\n  BadgeVariant2[\"CUSTOM\"] = \"custom\";\n  BadgeVariant2[\"SYSTEM\"] = \"system\";\n  return BadgeVariant2;\n})(BadgeVariant || {});\nvar BadgePriority = /* @__PURE__ */ ((BadgePriority2) => {\n  BadgePriority2[\"PRIMARY\"] = \"primary\";\n  BadgePriority2[\"SECONDARY\"] = \"secondary\";\n  BadgePriority2[\"TERTIARY\"] = \"tertiary\";\n  return BadgePriority2;\n})(BadgePriority || {});\nvar BadgeTone = /* @__PURE__ */ ((BadgeTone2) => {\n  BadgeTone2[\"DEFAULT\"] = \"default\";\n  BadgeTone2[\"INFORMATION\"] = \"information\";\n  BadgeTone2[\"POSITIVE\"] = \"positive\";\n  BadgeTone2[\"NEGATIVE\"] = \"negative\";\n  return BadgeTone2;\n})(BadgeTone || {});\nvar BadgeSize = /* @__PURE__ */ ((BadgeSize2) => {\n  BadgeSize2[\"SMALL\"] = \"small\";\n  BadgeSize2[\"medium\"] = \"medium\";\n  return BadgeSize2;\n})(BadgeSize || {});\nexport {\n  BadgePriority,\n  BadgeSize,\n  BadgeTone,\n  BadgeVariant\n};\n","import { ControlType } from \"framer\";\nimport { BADGE_PREFIX_ICON_OPTIONS } from \"../../components/ruler/Badge/Badge.constants.js\";\nimport { BadgeVariant, BadgePriority, BadgeTone, BadgeSize } from \"../../components/ruler/Badge/Badge.types.js\";\nconst BADGE_CONTROL_ITEMS = {\n  variant: {\n    type: ControlType.Enum,\n    title: \"variant\",\n    options: [BadgeVariant.SYSTEM, BadgeVariant.CUSTOM],\n    defaultValue: BadgeVariant.SYSTEM\n  },\n  priority: {\n    type: ControlType.Enum,\n    title: \"priority\",\n    options: [BadgePriority.PRIMARY, BadgePriority.SECONDARY, BadgePriority.TERTIARY],\n    defaultValue: BadgePriority.PRIMARY\n  },\n  customBackgroundColor: {\n    hidden: ({\n      variant\n    }) => variant !== BadgeVariant.CUSTOM,\n    type: ControlType.Color,\n    title: \"배경 색상\",\n    defaultValue: \"#000000\"\n  },\n  customTextColor: {\n    hidden: ({\n      variant\n    }) => variant !== BadgeVariant.CUSTOM,\n    type: ControlType.Color,\n    title: \"텍스트 색상\",\n    defaultValue: \"#FFFFFF\"\n  },\n  tone: {\n    hidden: ({\n      variant\n    }) => variant === BadgeVariant.CUSTOM,\n    type: ControlType.Enum,\n    title: \"tone\",\n    options: [BadgeTone.DEFAULT, BadgeTone.INFORMATION, BadgeTone.NEGATIVE, BadgeTone.POSITIVE],\n    defaultValue: BadgeTone.DEFAULT\n  },\n  size: {\n    type: ControlType.Enum,\n    title: \"크기\",\n    options: [BadgeSize.SMALL, BadgeSize.medium],\n    defaultValue: BadgeSize.SMALL\n  },\n  isWhite: {\n    hidden: ({\n      variant\n    }) => variant === BadgeVariant.CUSTOM,\n    type: ControlType.Boolean,\n    defaultValue: false,\n    title: \"화이트 속성 여부\"\n  },\n  isBlur: {\n    hidden: ({\n      variant\n    }) => variant === BadgeVariant.CUSTOM,\n    type: ControlType.Boolean,\n    defaultValue: false,\n    title: \"투명도 여부\"\n  },\n  prefixIcon: {\n    type: ControlType.Enum,\n    title: \"좌측 아이콘\",\n    options: [void 0, ...BADGE_PREFIX_ICON_OPTIONS],\n    optionTitles: [\"선택 안 함\", ...BADGE_PREFIX_ICON_OPTIONS],\n    defaultValue: void 0\n  },\n  label: {\n    type: ControlType.String,\n    defaultValue: \"라벨 텍스트\",\n    title: \"라벨\"\n  }\n};\nconst BADGE_CONTROLS = {\n  badge: ControlType.Object,\n  title: \"뱃지\",\n  controls: BADGE_CONTROL_ITEMS\n};\nexport {\n  BADGE_CONTROLS,\n  BADGE_CONTROL_ITEMS\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls } from \"framer\";\nimport { Badge } from \"../../ruler/Badge/Badge.js\";\nimport { BADGE_CONTROL_ITEMS } from \"../../../libs/property-controls/badge.js\";\nconst FramerBadge = (props) => {\n  return /* @__PURE__ */ jsx(Badge, { ...props });\n};\naddPropertyControls(FramerBadge, {\n  ...BADGE_CONTROL_ITEMS\n});\nexport {\n  FramerBadge\n};\n","import { FramerBadge } from \"./Badge.js\";\nexport {\n  FramerBadge as Badge\n};\n","/** local */// import { Badge } from \"https://localhost:4173/components/systems/Badge/Badge.js\"\n/** dev */// import { Badge } from \"https://asset.29cm.co.kr/contents/framer/dev/components/systems/Badge/Badge.js\"\n/** production */import{Badge}from\"https://asset.29cm.co.kr/contents/framer/components/systems/Badge/index.js\";/**\n * @framerDisableUnlink\n */export default Badge;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Badge\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RulerBadge.map"],"mappings":"+YAA2B,IAC8B,IACE,IACF,IACA,IACE,IACA,IACF,IACM,CACzD,EAAc,CAClB,gBAAiB,UACjB,MAAO,UACR,CACK,EAAmB,CACvB,OACA,QACA,OACA,UACA,QACA,OACA,OACA,QACD,CACK,EAA4B,OAAO,KAAK,EAAiB,kBCvBzD,GAA2B,EAAiB,IAC5C,OAAO,GAAoB,SACtB,EAEL,EACK,EAAgB,QAElB,EAAgB,QAEnB,GAAqB,EAAO,IAC5B,OAAO,GAAU,SACZ,EAEL,EACK,EAAM,QAER,EAAM,kCChB+B,IACX,IACe,IACS,IACR,IAC2B,CACxE,EAAQA,GAAY,CACxB,UAAU,SACV,WAAW,UACX,OAAO,UACP,OAAO,QACP,UAAU,GACV,SAAS,GACT,aACA,QAAQ,QACR,wBAAwB,UACxB,kBAAkB,UAClB,QACA,GAAG,GACF,IAAQ,CAET,IAAM,EAAQ,EAAU,QAAU,OAC5B,EAAuB,CAC3B,gBAAiB,EACjB,MAAO,EACR,CACK,EAA+B,EAAoB,GAAU,KAA6B,IAAW,EACrG,CACJ,kBACA,SACE,IAAY,SAAW,EAAuB,EAC5C,EAAuB,EAAwB,EAAiB,EAAO,CACvE,EAAiB,EAAkB,EAAO,EAAO,CACjD,EAAe,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