@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
1 lines • 2.19 kB
Source Map (JSON)
{"version":3,"file":"AppShellNavbar.cjs","names":["factory","useProps","useAppShellContext","Box","classes"],"sources":["../../../../src/components/AppShell/AppShellNavbar/AppShellNavbar.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n} from '../../../core';\nimport { useAppShellContext } from '../AppShell.context';\nimport type { AppShellCompoundProps } from '../AppShell.types';\nimport classes from '../AppShell.module.css';\n\nexport type AppShellNavbarStylesNames = 'navbar';\n\nexport interface AppShellNavbarProps\n extends\n BoxProps,\n AppShellCompoundProps,\n StylesApiProps<AppShellNavbarFactory>,\n ElementProps<'div'> {}\n\nexport type AppShellNavbarFactory = Factory<{\n props: AppShellNavbarProps;\n ref: HTMLElement;\n stylesNames: AppShellNavbarStylesNames;\n}>;\n\nexport const AppShellNavbar = factory<AppShellNavbarFactory>((_props) => {\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n withBorder,\n zIndex,\n mod,\n ...others\n } = useProps('AppShellNavbar', null, _props);\n\n const ctx = useAppShellContext();\n\n if (ctx.disabled) {\n return null;\n }\n\n return (\n <Box\n component=\"nav\"\n mod={[{ 'with-border': withBorder ?? ctx.withBorder }, mod]}\n {...ctx.getStyles('navbar', { className, classNames, styles, style })}\n {...others}\n __vars={{ '--app-shell-navbar-z-index': `calc(${zIndex ?? ctx.zIndex} + 1)` }}\n />\n );\n});\n\nAppShellNavbar.classes = classes;\nAppShellNavbar.displayName = '@mantine/core/AppShellNavbar';\n"],"mappings":";;;;;;;;;;;AA6BA,MAAa,iBAAiBA,gBAAAA,SAAgC,WAAW;CACvE,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,YACA,QACA,KACA,GAAG,WACDC,kBAAAA,SAAS,kBAAkB,MAAM,OAAO;CAE5C,MAAM,MAAMC,yBAAAA,oBAAoB;AAEhC,KAAI,IAAI,SACN,QAAO;AAGT,QACE,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EACE,WAAU;EACV,KAAK,CAAC,EAAE,eAAe,cAAc,IAAI,YAAY,EAAE,IAAI;EAC3D,GAAI,IAAI,UAAU,UAAU;GAAE;GAAW;GAAY;GAAQ;GAAO,CAAC;EACrE,GAAI;EACJ,QAAQ,EAAE,8BAA8B,QAAQ,UAAU,IAAI,OAAO,QAAQ;EAC7E,CAAA;EAEJ;AAEF,eAAe,UAAUC,wBAAAA;AACzB,eAAe,cAAc"}