constant.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. "use strict";
  2. var _a;
  3. Object.defineProperty(exports, "__esModule", { value: true });
  4. exports.POPTIP_STYLE = exports.CLASS_NAME = exports.POPTIP_ID = void 0;
  5. exports.POPTIP_ID = 'gui-poptip';
  6. /**
  7. * 默认类名
  8. */
  9. exports.CLASS_NAME = {
  10. CONTAINER: 'gui-poptip',
  11. ARROW: 'gui-poptip-arrow',
  12. TEXT: 'gui-poptip-text',
  13. };
  14. /**
  15. * 默认 style
  16. */
  17. exports.POPTIP_STYLE = (_a = {},
  18. // 容器 默认 style
  19. _a[".".concat(exports.CLASS_NAME.CONTAINER)] = {
  20. visibility: 'visible',
  21. position: 'absolute',
  22. 'background-color': 'rgba(0, 0, 0)',
  23. 'box-shadow': '0px 0px 10px #aeaeae',
  24. 'border-radius': '3px',
  25. color: '#fff',
  26. opacity: 0.8,
  27. 'font-size': '12px',
  28. padding: '4px 6px',
  29. display: 'flex',
  30. 'justify-content': 'center',
  31. 'align-items': 'center',
  32. 'z-index': 8,
  33. transition: 'visibility 50ms',
  34. },
  35. // 文本内容 默认 style
  36. _a[".".concat(exports.CLASS_NAME.TEXT)] = {
  37. 'text-align': 'center',
  38. },
  39. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top']")] = {
  40. transform: "translate(-50%, -100%)",
  41. },
  42. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left']")] = {
  43. transform: "translate(-100%, -50%)",
  44. },
  45. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right']")] = {
  46. transform: "translate(0, -50%)",
  47. },
  48. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom']")] = {
  49. transform: "translate(-50%, 0)",
  50. },
  51. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top-left']")] = {
  52. transform: "translate(0,-100%)",
  53. },
  54. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top-right']")] = {
  55. transform: "translate(-100%,-100%)",
  56. },
  57. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left-top']")] = {
  58. transform: "translate(-100%, 0)",
  59. },
  60. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left-bottom']")] = {
  61. transform: "translate(-100%, -100%)",
  62. },
  63. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right-top']")] = {
  64. transform: "translate(0, 0)",
  65. },
  66. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right-bottom']")] = {
  67. transform: "translate(0, -100%)",
  68. },
  69. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom-left']")] = {
  70. transform: "translate(0, 0)",
  71. },
  72. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom-right']")] = {
  73. transform: "translate(-100%, 0)",
  74. },
  75. _a[".".concat(exports.CLASS_NAME.ARROW)] = {
  76. width: '4px',
  77. height: '4px',
  78. transform: 'rotate(45deg)',
  79. 'background-color': 'rgba(0, 0, 0)',
  80. position: 'absolute',
  81. 'z-index': -1,
  82. },
  83. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top']")] = {
  84. transform: "translate(-50%, calc(-100% - 5px))",
  85. },
  86. _a["[data-position='top'] .".concat(exports.CLASS_NAME.ARROW)] = {
  87. bottom: '-2px',
  88. },
  89. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left']")] = {
  90. transform: "translate(calc(-100% - 5px), -50%)",
  91. },
  92. _a["[data-position='left'] .".concat(exports.CLASS_NAME.ARROW)] = {
  93. right: '-2px',
  94. },
  95. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right']")] = {
  96. transform: "translate(5px, -50%)",
  97. },
  98. _a["[data-position='right'] .".concat(exports.CLASS_NAME.ARROW)] = {
  99. left: '-2px',
  100. },
  101. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom']")] = {
  102. transform: "translate(-50%, 5px)",
  103. },
  104. _a["[data-position='bottom'] .".concat(exports.CLASS_NAME.ARROW)] = {
  105. top: '-2px',
  106. },
  107. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top-left']")] = {
  108. transform: "translate(0, calc(-100% - 5px))",
  109. },
  110. _a["[data-position='top-left'] .".concat(exports.CLASS_NAME.ARROW)] = {
  111. left: '10px',
  112. bottom: '-2px',
  113. },
  114. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top-right']")] = {
  115. transform: "translate(-100%, calc(-100% - 5px))",
  116. },
  117. _a["[data-position='top-right'] .".concat(exports.CLASS_NAME.ARROW)] = {
  118. right: '10px',
  119. bottom: '-2px',
  120. },
  121. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left-top']")] = {
  122. transform: "translate(calc(-100% - 5px), 0)",
  123. },
  124. _a["[data-position='left-top'] .".concat(exports.CLASS_NAME.ARROW)] = {
  125. right: '-2px',
  126. top: '8px',
  127. },
  128. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left-bottom']")] = {
  129. transform: "translate(calc(-100% - 5px), -100%)",
  130. },
  131. _a["[data-position='left-bottom'] .".concat(exports.CLASS_NAME.ARROW)] = {
  132. right: '-2px',
  133. bottom: '8px',
  134. },
  135. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right-top']")] = {
  136. transform: "translate(5px, 0)",
  137. },
  138. _a["[data-position='right-top'] .".concat(exports.CLASS_NAME.ARROW)] = {
  139. left: '-2px',
  140. top: '8px',
  141. },
  142. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right-bottom']")] = {
  143. transform: "translate(5px, -100%)",
  144. },
  145. _a["[data-position='right-bottom'] .".concat(exports.CLASS_NAME.ARROW)] = {
  146. left: '-2px',
  147. bottom: '8px',
  148. },
  149. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom-left']")] = {
  150. transform: "translate(0, 5px)",
  151. },
  152. _a["[data-position='bottom-left'] .".concat(exports.CLASS_NAME.ARROW)] = {
  153. top: '-2px',
  154. left: '8px',
  155. },
  156. _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom-right']")] = {
  157. transform: "translate(-100%, 5px)",
  158. },
  159. _a["[data-position='bottom-right'] .".concat(exports.CLASS_NAME.ARROW)] = {
  160. top: '-2px',
  161. right: '8px',
  162. },
  163. _a);
  164. //# sourceMappingURL=constant.js.map