{"version":3,"file":"MantineClasses.mjs","names":[],"sources":["../../../../src/core/MantineProvider/MantineClasses/MantineClasses.tsx"],"sourcesContent":["import { em, keys, px } from '../../utils';\nimport { useMantineStyleNonce } from '../Mantine.context';\nimport { useMantineTheme } from '../MantineThemeProvider';\n\nexport function MantineClasses() {\n  const theme = useMantineTheme();\n  const nonce = useMantineStyleNonce();\n\n  const classes = keys(theme.breakpoints).reduce<string>((acc, breakpoint) => {\n    const isPxBreakpoint = theme.breakpoints[breakpoint].includes('px');\n    const pxValue = px(theme.breakpoints[breakpoint]) as number;\n    const maxWidthBreakpoint = isPxBreakpoint ? `${pxValue - 0.1}px` : em(pxValue - 0.1);\n    const minWidthBreakpoint = isPxBreakpoint ? `${pxValue}px` : em(pxValue);\n\n    return `${acc}@media (max-width: ${maxWidthBreakpoint}) {.mantine-visible-from-${breakpoint} {display: none !important;}}@media (min-width: ${minWidthBreakpoint}) {.mantine-hidden-from-${breakpoint} {display: none !important;}}`;\n  }, '');\n\n  return (\n    <style\n      data-mantine-styles=\"classes\"\n      nonce={nonce?.()}\n      dangerouslySetInnerHTML={{ __html: classes }}\n    />\n  );\n}\n"],"mappings":";;;;;;;;AAIA,SAAgB,iBAAiB;CAC/B,MAAM,QAAQ,gBAAgB;CAC9B,MAAM,QAAQ,qBAAqB;CAEnC,MAAM,UAAU,KAAK,MAAM,WAAW,CAAC,CAAC,QAAgB,KAAK,eAAe;EAC1E,MAAM,iBAAiB,MAAM,YAAY,WAAW,CAAC,SAAS,IAAI;EAClE,MAAM,UAAU,GAAG,MAAM,YAAY,WAAW;EAIhD,OAAO,GAAG,IAAI,qBAHa,iBAAiB,GAAG,UAAU,GAAI,MAAM,GAAG,UAAU,EAAG,EAG7B,2BAA2B,WAAW,kDAFjE,iBAAiB,GAAG,QAAQ,MAAM,GAAG,OAAO,EAE0F,0BAA0B,WAAW;CACxM,GAAG,EAAE;CAEL,OACE,oBAAC,SAAD;EACE,uBAAoB;EACpB,OAAO,QAAQ;EACf,yBAAyB,EAAE,QAAQ,QAAQ;CAC5C,CAAA;AAEL"}