{"version":3,"file":"index.cjs","names":["forwardRef"],"sources":["../../src/isolated-event-container/index.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, MouseEvent } from 'react';\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\nfunction stopPropagation( event: MouseEvent ) {\n\tevent.stopPropagation();\n}\n\ntype DivProps = ComponentPropsWithoutRef< 'div' >;\n\nconst IsolatedEventContainer = forwardRef< HTMLDivElement, DivProps >(\n\t( props, ref ) => {\n\t\tdeprecated( 'wp.components.IsolatedEventContainer', {\n\t\t\tsince: '5.7',\n\t\t} );\n\n\t\t// Disable reason: this stops certain events from propagating outside of the component.\n\t\t// - onMouseDown is disabled as this can cause interactions with other DOM elements.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\treturn <div { ...props } ref={ ref } onMouseDown={ stopPropagation } />;\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\t}\n);\n\nexport default IsolatedEventContainer;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,gBAAiB,OAAoB;CAC7C,MAAM,gBAAgB;AACvB;AAIA,MAAM,0BAAA,GAAyBA,mBAAAA,WAAAA,EAC5B,OAAO,QAAS;CACjB,CAAA,GAAA,sBAAA,QAAA,CAAY,wCAAwC,EACnD,OAAO,MACR,CAAE;CAKF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,GAAK;EAAc;EAAM,aAAc;CAAmB,CAAA;AAEvE,CACD"}