@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.
38 lines (35 loc) • 1.14 kB
JavaScript
export const TYPEAHEAD_RESET_MS = 500;
export const PATIENT_CLICK_THRESHOLD = 500;
export const DISABLED_TRANSITIONS_STYLE = {
style: {
transition: 'none'
}
};
export { EMPTY_OBJECT, EMPTY_ARRAY } from '@base-ui-components/utils/empty';
export const CLICK_TRIGGER_IDENTIFIER = 'data-base-ui-click-trigger';
/**
* Used for dropdowns that usually strictly prefer top/bottom placements and
* use `var(--available-height)` to limit their height.
*/
export const DROPDOWN_COLLISION_AVOIDANCE = {
fallbackAxisSide: 'none'
};
/**
* Used by regular popups that usually aren't scrollable and are allowed to
* freely flip to any axis of placement.
*/
export const POPUP_COLLISION_AVOIDANCE = {
fallbackAxisSide: 'end'
};
/**
* Special visually hidden styles for the aria-owns owner element to ensure owned element
* accessibility in iOS/Safari/VoiceControl.
* The owner element is an empty span, so most of the common visually hidden styles are not needed.
* @see https://github.com/floating-ui/floating-ui/issues/3403
*/
export const ownerVisuallyHidden = {
clipPath: 'inset(50%)',
position: 'fixed',
top: 0,
left: 0
};