| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- "use strict";
- var _a;
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.POPTIP_STYLE = exports.CLASS_NAME = exports.POPTIP_ID = void 0;
- exports.POPTIP_ID = 'gui-poptip';
- /**
- * 默认类名
- */
- exports.CLASS_NAME = {
- CONTAINER: 'gui-poptip',
- ARROW: 'gui-poptip-arrow',
- TEXT: 'gui-poptip-text',
- };
- /**
- * 默认 style
- */
- exports.POPTIP_STYLE = (_a = {},
- // 容器 默认 style
- _a[".".concat(exports.CLASS_NAME.CONTAINER)] = {
- visibility: 'visible',
- position: 'absolute',
- 'background-color': 'rgba(0, 0, 0)',
- 'box-shadow': '0px 0px 10px #aeaeae',
- 'border-radius': '3px',
- color: '#fff',
- opacity: 0.8,
- 'font-size': '12px',
- padding: '4px 6px',
- display: 'flex',
- 'justify-content': 'center',
- 'align-items': 'center',
- 'z-index': 8,
- transition: 'visibility 50ms',
- },
- // 文本内容 默认 style
- _a[".".concat(exports.CLASS_NAME.TEXT)] = {
- 'text-align': 'center',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top']")] = {
- transform: "translate(-50%, -100%)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left']")] = {
- transform: "translate(-100%, -50%)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right']")] = {
- transform: "translate(0, -50%)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom']")] = {
- transform: "translate(-50%, 0)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top-left']")] = {
- transform: "translate(0,-100%)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top-right']")] = {
- transform: "translate(-100%,-100%)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left-top']")] = {
- transform: "translate(-100%, 0)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left-bottom']")] = {
- transform: "translate(-100%, -100%)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right-top']")] = {
- transform: "translate(0, 0)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right-bottom']")] = {
- transform: "translate(0, -100%)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom-left']")] = {
- transform: "translate(0, 0)",
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom-right']")] = {
- transform: "translate(-100%, 0)",
- },
- _a[".".concat(exports.CLASS_NAME.ARROW)] = {
- width: '4px',
- height: '4px',
- transform: 'rotate(45deg)',
- 'background-color': 'rgba(0, 0, 0)',
- position: 'absolute',
- 'z-index': -1,
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top']")] = {
- transform: "translate(-50%, calc(-100% - 5px))",
- },
- _a["[data-position='top'] .".concat(exports.CLASS_NAME.ARROW)] = {
- bottom: '-2px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left']")] = {
- transform: "translate(calc(-100% - 5px), -50%)",
- },
- _a["[data-position='left'] .".concat(exports.CLASS_NAME.ARROW)] = {
- right: '-2px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right']")] = {
- transform: "translate(5px, -50%)",
- },
- _a["[data-position='right'] .".concat(exports.CLASS_NAME.ARROW)] = {
- left: '-2px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom']")] = {
- transform: "translate(-50%, 5px)",
- },
- _a["[data-position='bottom'] .".concat(exports.CLASS_NAME.ARROW)] = {
- top: '-2px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top-left']")] = {
- transform: "translate(0, calc(-100% - 5px))",
- },
- _a["[data-position='top-left'] .".concat(exports.CLASS_NAME.ARROW)] = {
- left: '10px',
- bottom: '-2px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='top-right']")] = {
- transform: "translate(-100%, calc(-100% - 5px))",
- },
- _a["[data-position='top-right'] .".concat(exports.CLASS_NAME.ARROW)] = {
- right: '10px',
- bottom: '-2px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left-top']")] = {
- transform: "translate(calc(-100% - 5px), 0)",
- },
- _a["[data-position='left-top'] .".concat(exports.CLASS_NAME.ARROW)] = {
- right: '-2px',
- top: '8px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='left-bottom']")] = {
- transform: "translate(calc(-100% - 5px), -100%)",
- },
- _a["[data-position='left-bottom'] .".concat(exports.CLASS_NAME.ARROW)] = {
- right: '-2px',
- bottom: '8px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right-top']")] = {
- transform: "translate(5px, 0)",
- },
- _a["[data-position='right-top'] .".concat(exports.CLASS_NAME.ARROW)] = {
- left: '-2px',
- top: '8px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='right-bottom']")] = {
- transform: "translate(5px, -100%)",
- },
- _a["[data-position='right-bottom'] .".concat(exports.CLASS_NAME.ARROW)] = {
- left: '-2px',
- bottom: '8px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom-left']")] = {
- transform: "translate(0, 5px)",
- },
- _a["[data-position='bottom-left'] .".concat(exports.CLASS_NAME.ARROW)] = {
- top: '-2px',
- left: '8px',
- },
- _a[".".concat(exports.CLASS_NAME.CONTAINER, "[data-position='bottom-right']")] = {
- transform: "translate(-100%, 5px)",
- },
- _a["[data-position='bottom-right'] .".concat(exports.CLASS_NAME.ARROW)] = {
- top: '-2px',
- right: '8px',
- },
- _a);
- //# sourceMappingURL=constant.js.map
|