UNPKG

@wordpress/components

Version:
8 lines (7 loc) 1.33 kB
{ "version": 3, "sources": ["../../src/isolated-event-container/index.tsx"], "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction stopPropagation(event) {\n event.stopPropagation();\n}\nconst IsolatedEventContainer = forwardRef((props, ref) => {\n deprecated('wp.components.IsolatedEventContainer', {\n since: '5.7'\n });\n\n // Disable reason: this stops certain events from propagating outside of the component.\n // - onMouseDown is disabled as this can cause interactions with other DOM elements.\n /* eslint-disable jsx-a11y/no-static-element-interactions */\n return /*#__PURE__*/_jsx(\"div\", {\n ...props,\n ref: ref,\n onMouseDown: stopPropagation\n });\n /* eslint-enable jsx-a11y/no-static-element-interactions */\n});\nexport default IsolatedEventContainer;"], "mappings": ";AAOA,SAAS,kBAAkB;AAC3B,OAAO,gBAAgB;AACvB,SAAS,OAAO,YAAY;AAC5B,SAAS,gBAAgB,OAAO;AAC9B,QAAM,gBAAgB;AACxB;AACA,IAAM,yBAAyB,WAAW,CAAC,OAAO,QAAQ;AACxD,aAAW,wCAAwC;AAAA,IACjD,OAAO;AAAA,EACT,CAAC;AAKD,SAAoB,qBAAK,OAAO;AAAA,IAC9B,GAAG;AAAA,IACH;AAAA,IACA,aAAa;AAAA,EACf,CAAC;AAEH,CAAC;AACD,IAAO,mCAAQ;", "names": [] }