{"version":3,"file":"AccordionPanelItem.cjs","sources":["../../../src/components/AccordionPanel/AccordionPanelItem.tsx"],"sourcesContent":["'use client'\n\nimport {\n  type ComponentPropsWithoutRef,\n  type FC,\n  type PropsWithChildren,\n  createContext,\n  useMemo,\n} from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { Section } from '../SectioningContent'\n\ntype AbstractProps = PropsWithChildren<{\n  /** アイテムを識別するための名前 */\n  name: string\n}>\ntype Props = AbstractProps & Omit<ComponentPropsWithoutRef<'section'>, keyof AbstractProps>\n\nexport const AccordionPanelItemContext = createContext<{ name: string }>({\n  name: '',\n})\n\nconst classNameGenerator = tv({\n  base: ['smarthr-ui-AccordionPanel-item', '[&_+_&]:shr-border-t-shorthand'],\n})\n\nexport const AccordionPanelItem: FC<Props> = ({ name, className, ...rest }) => {\n  const actualClassName = useMemo(() => classNameGenerator({ className }), [className])\n\n  return (\n    <AccordionPanelItemContext.Provider\n      value={{\n        name,\n      }}\n    >\n      <Section {...rest} className={actualClassName} />\n    </AccordionPanelItemContext.Provider>\n  )\n}\n"],"names":[],"mappings":";;;;;;;;;;AAmBO;AACL;AACD;AAED;AACE;AACD;AAEM;AACL;AAEA;;;AASF;;;"}