{"version":3,"sources":["../../../../src/components/molecules/FieldGroup/FieldGroup.tsx"],"names":["cva","jsx","Label"],"mappings":";;;;;;AAGA,MAAM,kBAAA,GAAqBA,2BAAI,aAAA,EAAe;AAAA,EAC5C,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,MACT,GAAA,EAAK,4BAAA;AAAA,MACL,GAAA,EAAK,UAAA;AAAA,MACL,QAAA,EAAU;AAAA;AACZ,GACF;AAAA,EACA,eAAA,EAAiB,EAAE,SAAA,EAAW,KAAA;AAChC,CAAC,CAAA;AAQM,SAAS,UAAA,CAAW;AAAA,EACzB,SAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF,CAAA,EAAoB;AAClB,EAAA,MAAM,aAAa,SAAA,KAAc,UAAA;AACjC,EAAA,uCACG,KAAA,EAAA,EAAI,SAAA,EAAW,mBAAmB,EAAE,SAAA,EAAW,CAAA,EAC7C,QAAA,EAAA;AAAA,IAAA,CAAC,UAAA,oBACAC,cAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,QAAA,EACb,QAAA,kBAAAA,cAAA,CAACC,WAAA,EAAA,EAAM,SAAA,EAAU,qBAAA,EAAsB,OAAA,EAAS,IAAA,EAC7C,QAAA,EAAA,KAAA,EACH,CAAA,EACF,CAAA;AAAA,oBAEFD,cAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,QAAA,EAAU,QAAA,EAAS;AAAA,GAAA,EACpC,CAAA;AAEJ","file":"FieldGroup.cjs","sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { Label } from \"../../atoms/Label\";\n\nconst fieldGroupVariants = cva(\"flex flex-1\", {\n  variants: {\n    direction: {\n      row: \"flex-row items-end gap-x-2\",\n      col: \"flex-col\",\n      floating: null,\n    },\n  },\n  defaultVariants: { direction: \"col\" },\n});\n\nexport type FieldGroupProps = VariantProps<typeof fieldGroupVariants> & {\n  name?: string;\n  label: string;\n  children?: React.ReactNode;\n};\n\nexport function FieldGroup({\n  direction,\n  label,\n  children,\n  name,\n}: FieldGroupProps) {\n  const isFloating = direction === \"floating\";\n  return (\n    <div className={fieldGroupVariants({ direction })}>\n      {!isFloating && (\n        <div className=\"flex-1\">\n          <Label className=\"text-xs font-medium\" htmlFor={name}>\n            {label}\n          </Label>\n        </div>\n      )}\n      <div className=\"flex-1\">{children}</div>\n    </div>\n  );\n}\n"]}