You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.3 KiB

7 months ago
  1. export var top = 'top';
  2. export var bottom = 'bottom';
  3. export var right = 'right';
  4. export var left = 'left';
  5. export var auto = 'auto';
  6. export var basePlacements = [top, bottom, right, left];
  7. export var start = 'start';
  8. export var end = 'end';
  9. export var clippingParents = 'clippingParents';
  10. export var viewport = 'viewport';
  11. export var popper = 'popper';
  12. export var reference = 'reference';
  13. export var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
  14. return acc.concat([placement + "-" + start, placement + "-" + end]);
  15. }, []);
  16. export var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
  17. return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
  18. }, []); // modifiers that need to read the DOM
  19. export var beforeRead = 'beforeRead';
  20. export var read = 'read';
  21. export var afterRead = 'afterRead'; // pure-logic modifiers
  22. export var beforeMain = 'beforeMain';
  23. export var main = 'main';
  24. export var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
  25. export var beforeWrite = 'beforeWrite';
  26. export var write = 'write';
  27. export var afterWrite = 'afterWrite';
  28. export var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];