@lotte-innovate/ui-component-test 0.0.152 → 0.0.153
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.
- package/dist/lib/components/SideBar/index.js +3 -3
- package/dist/lib/components/SideBar/index.mjs +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/useWindowSize.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/lib/utils/useWindowSize.mjs +0 -2
- package/dist/lib/utils/useWindowSize.mjs.map +0 -1
package/package.json
CHANGED
@@ -1,2 +0,0 @@
|
|
1
|
-
import{useState as n,useEffect as i}from"react";function e(){var e=n(250),o=e[0],t=e[1];return i((function(){function n(){if(null!=typeof window){var n=130+.15*window.innerWidth;n=Math.max(n,250),n=Math.min(n,300),t(n)}}return void 0!==typeof window&&window.addEventListener("resize",n),n(),function(){void 0!==typeof window&&window.removeEventListener("resize",n)}}),[]),o}export{e as useWindowSize};
|
2
|
-
//# sourceMappingURL=useWindowSize.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useWindowSize.mjs","sources":["../../lib/utils/useWindowSize.js"],"sourcesContent":["import { useState, useEffect } from 'react';\nvar MIN_SIZE = 250;\nexport function useWindowSize() {\n var _a = useState(MIN_SIZE), size = _a[0], setSize = _a[1];\n useEffect(function () {\n function handleResize() {\n if (typeof window == undefined)\n return;\n var width = 130 + window.innerWidth * 0.15;\n width = Math.max(width, MIN_SIZE);\n width = Math.min(width, 300);\n setSize(width);\n }\n if (typeof window !== undefined)\n window.addEventListener('resize', handleResize);\n handleResize();\n return function () {\n if (typeof window !== undefined)\n window.removeEventListener('resize', handleResize);\n };\n }, []);\n return size;\n}\n"],"names":["useWindowSize","_a","useState","size","setSize","useEffect","handleResize","undefined","window","width","innerWidth","Math","max","min","addEventListener","removeEventListener"],"mappings":"gDAEO,SAASA,IACZ,IAAIC,EAAKC,EAFE,KAEkBC,EAAOF,EAAG,GAAIG,EAAUH,EAAG,GAkBxD,OAjBAI,GAAU,WACN,SAASC,IACL,GAAqBC,aAAVC,OAAX,CAEA,IAAIC,EAAQ,IAA0B,IAApBD,OAAOE,WACzBD,EAAQE,KAAKC,IAAIH,EARd,KASHA,EAAQE,KAAKE,IAAIJ,EAAO,KACxBL,EAAQK,EAJG,CAKd,CAID,YAHsBF,WAAXC,QACPA,OAAOM,iBAAiB,SAAUR,GACtCA,IACO,gBACmBC,WAAXC,QACPA,OAAOO,oBAAoB,SAAUT,EACrD,CACK,GAAE,IACIH,CACX"}
|