@r3l/app
Version:
223 lines (209 loc) • 6.84 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.theme = exports.lh = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _fonts = require("./fonts");
var colors = _interopRequireWildcard(require("./colors"));
var _common = require("@r3l/common");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var gs = function gs(n) {
return "hsl(0, 0%, ".concat(n, "%)");
};
var lh = 1.4;
exports.lh = lh;
var c = {
text: gs(0),
black: gs(0),
background: gs(100),
white: gs(100),
blue: '#0000ff',
grey: gs(50),
lightGrey: gs(87),
lightGreyBg: gs(98),
lightBorder: gs(85),
textOverlay: gs(100),
shadowBorder: gs(70),
twitterBlue: colors.twitterBlue,
uniswap: colors.uniswap
};
var theme = {
initialColorModeName: 'light',
useLocalStorage: false,
useBodyStyles: true,
useCustomProperties: false,
colors: _objectSpread(_objectSpread(_objectSpread({}, c), colors.colors), {}, {
modes: {
light: _objectSpread(_objectSpread({}, c), colors.colors),
dark: _objectSpread({
text: gs(100),
black: gs(100),
background: gs(8),
white: gs(8),
blue: '#0088ff',
lightGrey: gs(13),
lightGreyBg: gs(5),
lightBorder: gs(20),
textOverlay: gs(100),
shadowBorder: gs(30)
}, colors.colors)
}
}),
cursor: _objectSpread({}, !_common.IS_NATIVE ? {
userSelect: 'none',
cursor: 'pointer'
} : {}),
buttons: {
shadow: {
boxShadow: '0 2px 6px hsl(240,0%,70%);'
}
},
borders: {
default: {
borderColor: 'lightBorder',
borderWidth: 1
},
navBorder: {
// border: '0px solid lightBorder',
// borderBottomColor: 'lightBorder',
borderColor: 'lightBorder'
},
input: {
borderStyle: 'solid',
borderColor: 'lightBorder',
borderWidth: 1,
':focus': {
borderColor: 'blue'
},
outline: 'none !important'
},
popupBorder: {
boxShadow: "0px 0px 0px .5px ".concat(c.shadowBorder, ", 0 0px 20px -10px grey;")
},
shadowBorderBottom: {
boxShadow: "0px .5px 0px 0px ".concat(c.shadowBorder, ";")
}
},
fonts: {
body: _fonts.HELVETICA_REGULAR,
serif: _fonts.GEORGIA,
title: _fonts.HELVETICA_NEUE_CONDENSED_BOLD,
heading: _fonts.HELVETICA_NEUE_BOLD,
link: _fonts.HELVETICA_NEUE_MEDIUM
},
lineHeights: [8, 12 * 1.5, 14 * 1.5, 20 * 1.4, 24 * 1.4, 36 * 1.3, 42 * 1.3, 50 * 1.3],
breakpoints: ['740px'],
// important this must match dripsy default breaks (see the dripsy patch)
space: [0, 8, 16, 24, 32, 40, 48, 54, 64, 72, 80, 88, 96],
sizes: [0, 12, 14, 16, 24, 32, 40, 48, 54, 64, 72, 80, 88, 96],
fontSizes: [8, 12, 14, 20, 24, 36, 42, 50],
styles: {
root: {
color: 'black',
background: 'white'
},
h1: {
variant: 'text.title'
},
h2: {
variant: 'text.heading'
},
p: {
variant: 'text.commentText'
}
},
input: {},
text: {
body: {
fontSize: 2,
lineHeight: 2,
fontFamily: 'body',
color: 'black'
},
number: {
fontFamily: 'title',
fontSize: 2,
lineHeight: 2,
color: 'black'
},
bigNumber: {
fontFamily: 'title',
fontSize: 3,
lineHeight: 3,
color: 'black'
},
smallGrey: {
fontSize: 1,
lineHeight: 1,
fontFamily: 'body',
color: 'grey'
},
smallBlack: {
fontSize: 1,
lineHeight: 1,
fontFamily: 'body',
color: 'black'
},
commentText: {
fontFamily: 'serif',
fontSize: 2,
lineHeight: 2,
color: 'black'
},
heading: {
fontFamily: 'heading',
fontSize: 3,
lineHeight: 3,
color: 'black'
},
title: {
fontFamily: 'title',
fontSize: 4,
lineHeight: 3,
color: 'black'
},
link: {
fontFamily: 'link',
fontSize: 1,
lineHeight: 1,
color: 'grey' // textDecoration: 'underline',
},
altLink: {
variant: 'text.link',
textDecorationLine: 'underline'
},
communityLink: {
fontFamily: 'body',
fontSize: 2,
lineHeight: 2,
color: 'grey'
},
highlight: {
fontFamily: 'serif',
fontStyle: 'italic',
color: 'block',
fontSize: 3,
lineHeight: 3
},
CTALink: {
fontFamily: 'body',
fontSize: 1,
lineHeight: 1,
color: 'blue'
},
buttonText: {
fontFamily: 'link',
fontSize: 1,
lineHeight: 1,
color: 'white'
}
}
};
exports.theme = theme;
//# sourceMappingURL=theme.js.map