all files / range-navigator/utils/ theme.js

100% Statements 22/22
92.86% Branches 26/28
100% Functions 3/3
100% Lines 22/22
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74                             185× 185× 185× 185×                               185×                                       171× 171×   185×      
define(["require", "exports", "@syncfusion/ej2-base"], function (require, exports, ej2_base_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var RangeNavigatorTheme;
    (function (RangeNavigatorTheme) {
        RangeNavigatorTheme.axisLabelFont = {
            size: '12px',
            fontWeight: 'Normal',
            color: null,
            fontStyle: 'Normal',
            fontFamily: 'Segoe UI'
        };
        RangeNavigatorTheme.tooltipLabelFont = {
            size: '12px',
            fontWeight: 'Normal',
            color: null,
            fontStyle: 'Normal',
            fontFamily: 'Segoe UI'
        };
    })(RangeNavigatorTheme = exports.RangeNavigatorTheme || (exports.RangeNavigatorTheme = {}));
    function getRangeThemeColor(theme, range) {
        var thumbSize = range.navigatorStyleSettings.thumb;
        var thumbWidth = ej2_base_1.isNullOrUndefined(thumbSize.width) ? (ej2_base_1.Browser.isDevice ? 15 : 20) : thumbSize.width;
        var thumbHeight = ej2_base_1.isNullOrUndefined(thumbSize.height) ? (ej2_base_1.Browser.isDevice ? 15 : 20) : thumbSize.height;
        var style = {
            gridLineColor: '#E0E0E0',
            axisLineColor: '#000000',
            labelFontColor: '#686868',
            unselectedRectColor: range.series.length ? 'rgba(255, 255, 255, 0.6)' : '#EEEEEE',
            thumpLineColor: 'rgba(189, 189, 189, 1)',
            thumbBackground: 'rgba(250, 250, 250, 1)',
            gripColor: '#757575',
            background: '#FFFFFF',
            thumbHoverColor: '#EEEEEE',
            selectedRegionColor: range.series.length ? 'transparent' : '#FF4081',
            tooltipBackground: 'rgb(0, 8, 22)',
            tooltipFontColor: '#dbdbdb',
            thumbWidth: thumbWidth,
            thumbHeight: thumbHeight
        };
        switch (theme) {
            case 'Fabric':
                style.selectedRegionColor = range.series.length ? 'transparent' : '#007897';
                break;
            case 'Bootstrap':
                style.selectedRegionColor = range.series.length ? 'transparent' : '#428BCA';
                break;
            case 'Highcontrast':
                style = {
                    gridLineColor: '#bdbdbd',
                    axisLineColor: '#969696',
                    labelFontColor: '#ffffff',
                    unselectedRectColor: range.series.length ? 'rgba(255, 255, 255, 0.3)' : '#EEEEEE',
                    thumpLineColor: '#ffffff',
                    thumbBackground: '#262626',
                    gripColor: '#ffffff',
                    background: '#000000',
                    thumbHoverColor: '#BFBFBF',
                    selectedRegionColor: range.series.length ? 'transparent' : '#FFD939',
                    tooltipBackground: '#ffffff',
                    tooltipFontColor: '#000000',
                    thumbWidth: thumbWidth,
                    thumbHeight: thumbHeight
                };
                break;
            default:
                style.selectedRegionColor = range.series.length ? 'transparent' : '#FF4081';
                break;
        }
        return style;
    }
    exports.getRangeThemeColor = getRangeThemeColor;
});