@momentum-ui/react-collaboration
Version:
Cisco Momentum UI Framework for React Collaboration Applications
48 lines • 1.69 kB
JavaScript
import { PLACEMENTS } from '../ModalArrow/ModalArrow.constants';
import { COLORS } from '../ModalContainer/ModalContainer.constants';
import { MODAL_CONTAINER_CONSTANTS } from '../ModalContainer/index';
var CLASS_PREFIX = 'md-popover';
var BACKDROP_CLASS = 'tippy-backdrop';
var BOUNDARIES = {
VIEWPORT: 'viewport',
WINDOW: 'window',
PARENT: 'scrollParent',
};
var CLOSE_BUTTON_PLACEMENTS = {
TOP_LEFT: 'top-left',
TOP_RIGHT: 'top-right',
NONE: 'none',
};
var DEFAULTS = {
VARIANT: 'small',
TRIGGER: 'click',
PLACEMENT: PLACEMENTS.AUTO,
OFFSET_DISTANCE: 5,
OFFSET_SKIDDING: 0,
SHOW_ARROW: true,
INTERACTIVE: false,
COLOR: COLORS.PRIMARY,
BOUNDARY: BOUNDARIES.PARENT,
HIDE_ON_ESC: true,
HIDE_ON_BLUR: false,
IS_CHILD_POPOVER_OPEN: false,
CLOSE_BUTTON_PLACEMENT: CLOSE_BUTTON_PLACEMENTS.NONE,
FOCUS_BACK_ON_TRIGGER_COMPONENT_INTERACTIVE: true,
FOCUS_BACK_ON_TRIGGER_COMPONENT_NON_INTERACTIVE: false,
AUTO_FOCUS: true,
STRATEGY: 'absolute',
ADD_BACKDROP: true,
ROLE: MODAL_CONTAINER_CONSTANTS.DEFAULTS.ROLE,
APPEND_TO: 'parent',
DISABLE_FOCUS_LOCK: false,
};
var STYLE = {
wrapper: "".concat(CLASS_PREFIX, "-wrapper"),
arrowWrapper: "".concat(CLASS_PREFIX, "-arrow-wrapper"),
closeButton: "".concat(CLASS_PREFIX, "-close-button"),
backdrop: "".concat(CLASS_PREFIX, "-backdrop"),
};
// padding between the edge of the popover and the arrow, to ensure the arrow doesn't get pushed outside.
var ARROW_PADDING = 5;
export { CLASS_PREFIX, DEFAULTS, STYLE, ARROW_PADDING, BOUNDARIES, CLOSE_BUTTON_PLACEMENTS, BACKDROP_CLASS, };
//# sourceMappingURL=Popover.constants.js.map