@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
1 lines • 1.96 kB
Source Map (JSON)
{"version":3,"file":"DataListItemValue.cjs","names":["factory","useProps","useDataListContext","Box","classes"],"sources":["../../../../src/components/DataList/DataListItemValue/DataListItemValue.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '../../../core';\nimport { useDataListContext } from '../DataList.context';\nimport classes from '../DataList.module.css';\n\nexport type DataListItemValueStylesNames = 'itemValue';\n\nexport interface DataListItemValueProps\n extends BoxProps, CompoundStylesApiProps<DataListItemValueFactory>, ElementProps<'dd'> {\n /** Value content */\n children?: React.ReactNode;\n}\n\nexport type DataListItemValueFactory = Factory<{\n props: DataListItemValueProps;\n ref: HTMLElement;\n stylesNames: DataListItemValueStylesNames;\n compound: true;\n}>;\n\nexport const DataListItemValue = factory<DataListItemValueFactory>((_props) => {\n const props = useProps('DataListItemValue', null, _props);\n const { classNames, className, style, styles, vars, children, mod, ...others } = props;\n\n const ctx = useDataListContext();\n const stylesApiProps = { classNames, styles };\n\n return (\n <Box\n component=\"dd\"\n {...ctx.getStyles('itemValue', { ...stylesApiProps, className, style })}\n mod={mod}\n {...others}\n >\n {children}\n </Box>\n );\n});\n\nDataListItemValue.classes = classes;\nDataListItemValue.displayName = '@mantine/core/DataListItemValue';\n"],"mappings":";;;;;;;;AA2BA,MAAa,oBAAoBA,gBAAAA,SAAmC,WAAW;CAE7E,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,UAAU,KAAK,GAAG,WADxDC,kBAAAA,SAAS,qBAAqB,MAAM,MACmC;CAErF,MAAM,MAAMC,yBAAAA,mBAAmB;CAC/B,MAAM,iBAAiB;EAAE;EAAY;CAAO;CAE5C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,YAAAA,KAAD;EACE,WAAU;EACV,GAAI,IAAI,UAAU,aAAa;GAAE,GAAG;GAAgB;GAAW;EAAM,CAAC;EACjE;EACL,GAAI;EAEH;CACE,CAAA;AAET,CAAC;AAED,kBAAkB,UAAUC,wBAAAA;AAC5B,kBAAkB,cAAc"}