{"version":3,"file":"DOMOperations.mjs","sources":["../../../src/common/DOMOperations/DOMOperations.ts"],"sourcesContent":["/**\n * Defined in `Dimmer.less`\n */\nconst NO_SCROLL_CLASS = 'no-scroll';\n\n/**\n * Apply {@link NO_SCROLL_CLASS} that disables scroll on page (e.g use in Dimmer to disable scroll behind the component)\n *\n * CSS class needs to be applied for `html` and not `body`, as this doing both will break any position sticky in the document.\n */\nexport const addNoScrollClass = () => {\n  document.documentElement.classList.add(NO_SCROLL_CLASS);\n};\n\n/**\n * Clean up after {@link addNoScrollClass} function\n */\nexport const removeNoScrollClass = () => {\n  document.documentElement.classList.remove(NO_SCROLL_CLASS);\n};\n"],"names":["NO_SCROLL_CLASS","addNoScrollClass","document","documentElement","classList","add","removeNoScrollClass","remove"],"mappings":"AAAA;;AAEG;AACH,MAAMA,eAAe,GAAG,WAAW;AAEnC;;;;AAIG;AACI,MAAMC,gBAAgB,GAAGA,MAAK;EACnCC,QAAQ,CAACC,eAAe,CAACC,SAAS,CAACC,GAAG,CAACL,eAAe,CAAC;AACzD;AAEA;;AAEG;AACI,MAAMM,mBAAmB,GAAGA,MAAK;EACtCJ,QAAQ,CAACC,eAAe,CAACC,SAAS,CAACG,MAAM,CAACP,eAAe,CAAC;AAC5D;;;;"}