UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

26 lines (25 loc) 672 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.translateOpenChangeReason = translateOpenChangeReason; function translateOpenChangeReason(nativeReason) { if (!nativeReason) { return undefined; } return { // Identical mappings click: 'click', hover: 'hover', focus: 'focus', 'focus-out': 'focus-out', 'escape-key': 'escape-key', 'outside-press': 'outside-press', // New mappings 'reference-press': 'trigger-press', 'safe-polygon': 'hover', 'ancestor-scroll': undefined, // Not supported 'list-navigation': undefined // Unnecessary to expose currently }[nativeReason]; }