UNPKG

3.32 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var panelHeight = '591px';
4var panelWidth = '450px';
5var collapsedHeaderHeight = '30px';
6var containerZIndex = 9999;
7var widgetCss = "\n #bb-help-container.bb-help-disable-transition {\n -webkit-transition: none !important;\n -moz-transition: none !important;\n -o-transition: none !important;\n transition: none !important;\n }\n\n .bb-help-hidden {\n display: none;\n }\n\n #bb-help-container.bb-help-closed {\n right: -" + panelWidth + ";\n }\n\n #bb-help-container {\n z-index: " + containerZIndex + ";\n line-height: normal;\n position: fixed;\n top: 0;\n right: 0;\n transition: right 250ms ease-in;\n height: " + panelHeight + ";\n width: " + panelWidth + ";\n box-sizing: border-box;\n }\n\n .bb-omnibar-collapsed #bb-help-container.bb-help-closed #bb-help-invoker:not(:hover) {\n height: " + collapsedHeaderHeight + ";\n border-bottom-left-radius: 25px;\n border-top-left-radius: 25px;\n width: 30px;\n padding: 2px 10px 7px 6px;\n }\n\n #bb-help-invoker {\n display: flex;\n justify-content: center;\n align-items: center;\n border-bottom-left-radius: 25px;\n border-top-left-radius: 25px;\n border: none;\n background: #71bf44;\n color: #fff;\n position: absolute;\n cursor: pointer;\n height: 50px;\n width: 40px;\n right: 100%;\n padding-left: 10px;\n border: none;\n }\n\n #bb-help-invoker > span {\n display: flex;\n justify-content: center;\n align-items: center;\n font-family: sans-serif;\n font-weight: 700;\n width: 2.5ex;\n height: 2.5ex;\n font-size: 14px;\n border-radius: 100%;\n border: 2px solid;\n box-sizing: content-box;\n }\n\n #bb-help-iframe {\n box-shadow: -1px 2px 9px 0 rgba(50,50,50,.41);\n height: 100%;\n width: 100%;\n border: none;\n }\n\n .bb-help-closed #bb-help-iframe {\n box-shadow: none;\n }\n";
8var omnibarCss = "\n .bb-omnibar-bar.bar {\n padding-right: 50px !important;\n }\n\n .bb-omnibar .bb-omnibar-desktop .bb-omnibar-accountflyout {\n right: 50px !important;\n }\n";
9var mobileCss = "\n .bb-help-container-mobile#bb-help-container {\n height: 100%;\n width: 100%;\n }\n\n .bb-help-container-mobile#bb-help-container.bb-help-closed {\n right: -100%;\n }\n\n .bb-help-container-mobile#bb-help-container #bb-help-invoker.bb-help-hide-on-mobile {\n display: none;\n }\n";
10var BBHelpStyleUtility = (function () {
11 function BBHelpStyleUtility() {
12 this.stylesLoaded = false;
13 }
14 BBHelpStyleUtility.prototype.addAllStyles = function () {
15 if (this.stylesLoaded) {
16 return;
17 }
18 this.addCssToHead(widgetCss);
19 this.addCssToHead(omnibarCss);
20 this.addCssToHead(mobileCss);
21 this.stylesLoaded = true;
22 };
23 BBHelpStyleUtility.prototype.addCssToHead = function (css) {
24 var styleEl = document.createElement('style');
25 styleEl.appendChild(document.createTextNode(css));
26 document.head.appendChild(styleEl);
27 return styleEl;
28 };
29 return BBHelpStyleUtility;
30}());
31exports.BBHelpStyleUtility = BBHelpStyleUtility;
32//# sourceMappingURL=help-widget-style-utility.js.map
\No newline at end of file