@iobroker/adapter-react-v5 4.13.11 → 4.13.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- {"version":3,"file":"withWidth.js","names":["_react","_interopRequireDefault","require","_styles","_material","useWidth","theme","useTheme","keys","_toConsumableArray2","breakpoints","reverse","reduce","output","key","matches","useMediaQuery","up","withWidth","WrappedComponent","props","width","createElement","_extends2","_default","exports"],"sources":["withWidth.js"],"sourcesContent":["import React from 'react';\nimport { useTheme } from '@mui/material/styles';\nimport { useMediaQuery } from '@mui/material';\n\nfunction useWidth() {\n const theme = useTheme();\n const keys = [...theme.breakpoints.keys].reverse();\n return keys.reduce((output, key) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const matches = useMediaQuery(theme.breakpoints.up(key));\n return !output && matches ? key : output;\n }, null) || 'xs';\n}\n\n// FIXME checkout https://mui.com/components/use-media-query/#migrating-from-withwidth\nconst withWidth = () => WrappedComponent => props => {\n const width = useWidth();\n return <WrappedComponent {...props} width={width} />;\n};\n\nexport default withWidth;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEA,SAASG,QAAQA,CAAA,EAAG;EAChB,IAAMC,KAAK,GAAG,IAAAC,gBAAQ,EAAC,CAAC;EACxB,IAAMC,IAAI,GAAG,IAAAC,mBAAA,aAAIH,KAAK,CAACI,WAAW,CAACF,IAAI,EAAEG,OAAO,CAAC,CAAC;EAClD,OAAOH,IAAI,CAACI,MAAM,CAAC,UAACC,MAAM,EAAEC,GAAG,EAAK;IAChC;IACA,IAAMC,OAAO,GAAG,IAAAC,uBAAa,EAACV,KAAK,CAACI,WAAW,CAACO,EAAE,CAACH,GAAG,CAAC,CAAC;IACxD,OAAO,CAACD,MAAM,IAAIE,OAAO,GAAGD,GAAG,GAAGD,MAAM;EAC5C,CAAC,EAAE,IAAI,CAAC,IAAI,IAAI;AACpB;;AAEA;AACA,IAAMK,SAAS,GAAG,SAAZA,SAASA,CAAA;EAAA,OAAS,UAAAC,gBAAgB;IAAA,OAAI,UAAAC,KAAK,EAAI;MACjD,IAAMC,KAAK,GAAGhB,QAAQ,CAAC,CAAC;MACxB,oBAAOL,MAAA,YAAAsB,aAAA,CAACH,gBAAgB,MAAAI,SAAA,iBAAKH,KAAK;QAAEC,KAAK,EAAEA;MAAM,EAAE,CAAC;IACxD,CAAC;EAAA;AAAA;AAAC,IAAAG,QAAA,GAAAC,OAAA,cAEaP,SAAS","ignoreList":[]}