@wordpress/components
Version:
UI components for WordPress.
8 lines (7 loc) • 1.4 kB
Source Map (JSON)
{
"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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAC3B,wBAAuB;AACvB,yBAA4B;AAC5B,SAAS,gBAAgB,OAAO;AAC9B,QAAM,gBAAgB;AACxB;AACA,IAAM,6BAAyB,2BAAW,CAAC,OAAO,QAAQ;AACxD,wBAAAA,SAAW,wCAAwC;AAAA,IACjD,OAAO;AAAA,EACT,CAAC;AAKD,SAAoB,uCAAAC,KAAK,OAAO;AAAA,IAC9B,GAAG;AAAA,IACH;AAAA,IACA,aAAa;AAAA,EACf,CAAC;AAEH,CAAC;AACD,IAAO,mCAAQ;",
"names": ["deprecated", "_jsx"]
}