UNPKG

vevet

Version:

Vevet is a JavaScript library for creative development that simplifies crafting rich interactions like split text animations, carousels, marquees, preloading, and more.

16 lines 1.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createCursorStyles = createCursorStyles; var env_1 = require("../../internal/env"); var prependStyles_1 = require("../../internal/prependStyles"); var style = null; function createCursorStyles(prefix) { if (style) { return style; } style = env_1.doc.createElement('style'); (0, prependStyles_1.prependStyles)(style); style.innerHTML = "\n .".concat(prefix, "-container.").concat(prefix, "-hide-default,\n .").concat(prefix, "-container.").concat(prefix, "-hide-default * {\n cursor: none;\n }\n\n .").concat(prefix, " {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n z-index: 999;\n pointer-events: none;\n\n transition: opacity 0.25s;\n opacity: 0;\n\n --cursor-w: 50px;\n --cursor-h: 50px;\n }\n \n .").concat(prefix, "-in-window {\n position: fixed;\n }\n \n .").concat(prefix, "-visible {\n opacity: 1;\n }\n\n .").concat(prefix, "-disabled {\n opacity: 0;\n }\n\n .").concat(prefix, "__inner {\n position: relative;\n width: var(--cursor-w);\n height: var(--cursor-h);\n margin-left: calc(var(--cursor-w) / -2);\n margin-top: calc(var(--cursor-h) / -2);\n\n background-color: rgba(0, 0, 0, 0.25);\n }\n\n .").concat(prefix, "_rtl .").concat(prefix, "__inner {\n margin-right: calc(var(--cursor-w) / -2);\n }\n\n .").concat(prefix, "__inner > * {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: opacity 0.25s linear;\n }\n\n .").concat(prefix, "__inner > *.active {\n opacity: 1;\n }\n "); return style; } //# sourceMappingURL=styles.js.map