{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "lib-bem",
  "type": "registry:lib",
  "title": "lib/bem",
  "description": "ATOM 클래스 이름 규칙: atom-{block}__{element}--{modifier}_{value}",
  "files": [
    {
      "path": "poc/design-system/implement/src/lib/bem.ts",
      "content": "/**\n * ATOM 클래스 이름 규칙: atom-{block}__{element}--{modifier}_{value}\n * (03_ASSET_GUIDE/README.md \"이름 규칙\", registry.json conventions.classNaming)\n *\n * Props 값은 camelCase(brandSolid), CSS 값은 kebab-case(brand-solid) 입니다.\n * 기본값은 대개 클래스가 없으므로(defaultHasNoClass) 각 컴포넌트가 \"클래스가 있는 값\"만\n * 넘기도록 합니다. 어떤 값에 클래스가 있는지는 components/<slug>.md \"클래스 계약\" 을 따릅니다.\n */\n\n/** brandSolid → brand-solid, iconOnly → icon-only */\nexport function kebab(value: string): string {\n  return value.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\n}\n\n/**\n * atom-button + (\"variant\", \"brandSolid\") → \"atom-button--variant_brand-solid\"\n * value 가 없거나 skip(기본값) 과 같으면 undefined\n */\nexport function mod(block: string, name: string, value: string | null | undefined, skip?: string): string | undefined {\n  if (value == null || value === skip) return undefined;\n  return `${block}--${name}_${kebab(value)}`;\n}\n\n/** atom-field + (\"invalid\", true) → \"atom-field--invalid\" */\nexport function flag(block: string, name: string, on: boolean | undefined): string | undefined {\n  return on ? `${block}--${name}` : undefined;\n}\n\n/** atom-button + \"icon\" → \"atom-button__icon\" */\nexport function elem(block: string, element: string): string {\n  return `${block}__${element}`;\n}\n",
      "type": "registry:lib",
      "target": "components/lib/bem.ts"
    }
  ],
  "categories": [
    "internal"
  ],
  "meta": {
    "version": "0.1.0"
  }
}
