UNPKG

@atlaskit/theme

Version:

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

103 lines (101 loc) 3.24 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 _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */ // 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'); } };