UNPKG

@atlaskit/theme

Version:

Theme contains solutions for global theming, colors, and other useful mixins.

100 lines (99 loc) 3 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.colorPalette8 = exports.colorPalette24 = exports.colorPalette16 = exports.colorPalette = void 0; var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); var colors = _interopRequireWildcard(require("./colors")); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } // Jira Portfolio var colorPalette8 = exports.colorPalette8 = [{ background: colors.N800, text: colors.N0 }, { background: colors.R400, text: colors.N0 }, { background: colors.P400, text: colors.P50 }, { background: colors.B400, text: colors.B75 }, { background: colors.T300, text: colors.N800 }, { background: colors.G400, text: colors.N0 }, { background: colors.Y400, text: colors.N800 }, { background: colors.N70, text: colors.N800 }]; var colorPalette16 = exports.colorPalette16 = [].concat(colorPalette8, [{ background: colors.N500, text: colors.N0 }, { background: colors.R100, text: colors.N800 }, { background: colors.P75, text: colors.N800 }, { background: colors.B100, text: colors.N800 }, { background: colors.T100, text: colors.N800 }, { background: colors.G100, text: colors.G500 }, { background: colors.Y200, text: colors.N800 }, { background: colors.N0, text: colors.N800 }]); var colorPalette24 = exports.colorPalette24 = [].concat((0, _toConsumableArray2.default)(colorPalette16), [{ background: colors.N100, text: colors.N0 }, { background: colors.N40, text: colors.N800 }, { background: colors.N50, text: colors.R500 }, { background: colors.P50, text: colors.P500 }, { background: colors.B50, text: colors.B500 }, { background: colors.T75, text: colors.N800 }, { background: colors.G50, text: colors.G500 }, { background: colors.Y75, text: colors.N800 }]); var colorPalette = exports.colorPalette = function colorPalette() { var palette = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '8'; switch (palette) { case '8': return colorPalette8; case '16': return colorPalette16; case '24': return colorPalette24; default: throw new Error('The only available color palette is 8, 16, 24'); } };