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.

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