react-pur
Version:
React UI component library (using styled-components)
1,975 lines (1,619 loc) • 266 kB
JavaScript
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 69);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.associate = associate;
exports.background = background;
exports.border = border;
exports.borderColor = borderColor;
exports.color = color;
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function associate(_ref, _ref2) {
var theme = _ref.theme,
props = _objectWithoutProperties(_ref, ['theme']);
var property = _ref2.property,
_ref2$filter = _ref2.filter,
filter = _ref2$filter === undefined ? function (value) {
return value;
} : _ref2$filter;
var toStyle = function toStyle(type) {
var fromTheme = theme.colors[type][property];
return filter(fromTheme);
};
if (props.danger) return toStyle('danger');
if (props.info) return toStyle('info');
if (props.neutral) return toStyle('neutral');
if (props.success) return toStyle('success');
if (props.warning) return toStyle('warning');
if (props.primary) return filter(theme.colors.primary);
if (props.secondary) return filter(theme.colors.secondary);
}
function background(props, filter) {
return associate(props, { property: 'background', filter: filter });
}
function border(props, filter) {
return associate(props, { property: 'color', filter: filter });
}
function borderColor(props, filter) {
return associate(props, { property: 'color', filter: filter });
}
function color(props, filter) {
return associate(props, { property: 'color', filter: filter });
}
/***/ }),
/* 1 */
/***/ (function(module, exports) {
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
} ())
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch(e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch(e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) { return [] }
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var _require = __webpack_require__(5),
breakpoints = _require.breakpoints;
var is = function is(n) {
return n !== undefined && n !== null;
};
var num = function num(n) {
return typeof n === 'number' && !isNaN(n);
};
var px = function px(n) {
return num(n) ? n + 'px' : n;
};
var neg = function neg(n) {
return n < 0;
};
var arr = function arr(n) {
return Array.isArray(n) ? n : [n];
};
var idx = function idx(p, obj) {
return p.reduce(function (a, b) {
return a && a[b] ? a[b] : null;
}, obj);
};
var mq = function mq(n) {
return '@media screen and (min-width: ' + n + 'em)';
};
var breaks = function breaks(props) {
return [null].concat(_toConsumableArray((idx(['theme', 'breakpoints'], props) || breakpoints).map(mq)));
};
var dec = function dec(props) {
return function (val) {
return arr(props).reduce(function (acc, prop) {
return acc[prop] = val, acc;
}, {});
};
};
var media = function media(bp) {
return function (d, i) {
return is(d) ? bp[i] ? _defineProperty({}, bp[i], d) : d : null;
};
};
var merge = function merge(a, b) {
return Object.assign({}, a, b, Object.keys(b).reduce(function (obj, key) {
return Object.assign(obj, _defineProperty({}, key, a[key] !== null && _typeof(a[key]) === 'object' ? merge(a[key], b[key]) : b[key]));
}, {}));
};
module.exports = {
is: is,
px: px,
neg: neg,
num: num,
arr: arr,
idx: idx,
breaks: breaks,
media: media,
dec: dec,
merge: merge,
mq: mq
};
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _styledComponents = __webpack_require__(64);
var _styledComponents2 = _interopRequireDefault(_styledComponents);
var _styledSystem = __webpack_require__(86);
var _extraStyledSystem = __webpack_require__(67);
var _recompose = __webpack_require__(82);
var _tagHoc = __webpack_require__(96);
var _tagHoc2 = _interopRequireDefault(_tagHoc);
var _styleProps = __webpack_require__(71);
var _styleProps2 = _interopRequireDefault(_styleProps);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function withStyle(style, props) {
return function (Component) {
var Base = (0, _styledComponents2.default)(Component)([], style);
var Comp = (0, _styledComponents2.default)(Base).attrs(props)([], _extraStyledSystem.background, _styledSystem.color, _extraStyledSystem.commonCSS, _styledSystem.fontSize, _extraStyledSystem.float, _extraStyledSystem.flexbox, _extraStyledSystem.height, _styledSystem.space, _styledSystem.width, _extraStyledSystem.themeColors, _extraStyledSystem.position, _extraStyledSystem.fontWeight, _extraStyledSystem.mediaQueries);
return Comp;
};
}
var Tag = (0, _tagHoc2.default)(_styleProps2.default);
function mount(_ref) {
var name = _ref.name,
_ref$props = _ref.props,
props = _ref$props === undefined ? {} : _ref$props,
_ref$style = _ref.style,
style = _ref$style === undefined ? function () {} : _ref$style,
_ref$type = _ref.type,
type = _ref$type === undefined ? 'div' : _ref$type;
return (0, _recompose.compose)(withStyle(style, props), Tag)(type);
}
exports.default = mount;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _mount = __webpack_require__(3);
var _mount2 = _interopRequireDefault(_mount);
var _properties = __webpack_require__(0);
var _Submit = __webpack_require__(8);
var _Submit2 = _interopRequireDefault(_Submit);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'Input',
type: 'input',
style: function style(_ref) {
var disabled = _ref.disabled,
focused = _ref.focused,
pill = _ref.pill,
small = _ref.small,
type = _ref.type,
props = _objectWithoutProperties(_ref, ['disabled', 'focused', 'pill', 'small', 'type']);
if (type === 'submit') {
return (0, _mount2.default)(_Submit2.default).style(_extends({ disabled: disabled }, props));
}
return Object.assign({
border: '1px solid #eeeeee',
borderRadius: '4px',
padding: '10px',
margin: 0,
fontSize: '14px',
width: 'calc(100% - 20px)',
display: 'block',
outline: 'none',
'&:focus, &:active': {
borderColor: (0, _properties.color)(props) || props.theme.colors.primary
}
}, disabled && {
opacity: '.6'
}, pill && {
borderRadius: '20px'
}, focused && {
borderColor: (0, _properties.color)(props) || props.theme.colors.primary
}, small && {
padding: '5px 10px',
fontSize: '12px'
});
}
};
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var breakpoints = [40, 52, 64];
var space = [0, 8, 16, 32, 64];
var fontSizes = [12, 14, 16, 20, 24, 32, 48, 64, 72];
module.exports = {
breakpoints: breakpoints,
space: space,
fontSizes: fontSizes
};
/***/ }),
/* 6 */
/***/ (function(module, exports) {
module.exports = require("react");
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'Small',
type: 'small',
style: function style(props) {
return {
display: 'inline-block',
fontSize: '12px',
lineHeight: '12px',
alignItems: 'center',
color: (0, _properties.color)(props) || props.theme.colors.disabled
};
}
};
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'Submit',
type: 'input',
style: function style(_ref) {
var block = _ref.block,
disabled = _ref.disabled,
props = _objectWithoutProperties(_ref, ['block', 'disabled']);
return Object.assign({
border: '1px solid ' + ((0, _properties.background)(props) || props.theme.colors.primary),
backgroundColor: (0, _properties.background)(props) || props.theme.colors.primary,
color: '#ffffff',
borderRadius: '4px',
padding: '10px',
fontSize: '14px',
display: 'block',
outline: 'none',
'&:hover, &:focus, &:active': {
opacity: '.8',
cursor: 'pointer'
}
}, block && {
width: '100%'
}, disabled && {
opacity: '.6'
});
},
props: {
type: 'submit'
}
};
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
function makeEmptyFunction(arg) {
return function () {
return arg;
};
}
/**
* This function accepts and discards inputs; it has no side effects. This is
* primarily useful idiomatically for overridable function endpoints which
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
*/
var emptyFunction = function emptyFunction() {};
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function () {
return this;
};
emptyFunction.thatReturnsArgument = function (arg) {
return arg;
};
module.exports = emptyFunction;
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var validateFormat = function validateFormat(format) {};
if (process.env.NODE_ENV !== 'production') {
validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
};
}
function invariant(condition, format, a, b, c, d, e, f) {
validateFormat(format);
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
module.exports = invariant;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'A',
type: 'a',
style: function style(_ref) {
var underlined = _ref.underlined,
noHover = _ref.noHover,
props = _objectWithoutProperties(_ref, ['underlined', 'noHover']);
return Object.assign({
textDecoration: 'none',
color: (0, _properties.color)(props) || props.theme.colors.primary,
opacity: 1
}, !noHover && {
'&:hover': {
opacity: .8
}
}, underlined && {
textDecoration: 'underline',
textDecorationSkip: 'ink'
});
},
props: {
rel: 'noopener noreferer'
}
};
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'Alert',
type: 'div',
style: function style(props) {
return {
padding: '8px 10px',
fontSize: '14px',
fontWeight: 500,
borderRadius: '3px',
marginBottom: '1rem',
color: (0, _properties.color)(props) || props.theme.colors.default.text,
backgroundColor: (0, _properties.background)(props) || props.theme.colors.default.background
};
}
};
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'Badge',
type: 'span',
style: function style(_ref) {
var _ref2;
var pill = _ref.pill,
props = _objectWithoutProperties(_ref, ['pill']);
return _ref2 = {
fontSize: '10px',
fontWeight: 700,
display: 'inline-block',
color: '#fff',
padding: '5px 8px',
borderRadius: pill ? '10rem' : '4px'
}, _defineProperty(_ref2, 'color', (0, _properties.color)(props) || props.theme.colors.neutral.text), _defineProperty(_ref2, 'backgroundColor', (0, _properties.background)(props) || props.theme.colors.neutral.background), _ref2;
}
};
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
name: 'Brand',
type: 'div',
style: function style(props) {
return {
display: 'inline-block',
fontWeight: 700,
padding: '12px',
paddingRight: '24px',
paddingLeft: 0
};
}
};
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
name: 'Breadcrumb',
type: 'div',
style: function style(props) {
return {
fontSize: '14px',
fontWeight: 500,
padding: '5px 0'
};
}
};
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'BreadcrumbItem',
type: 'div',
style: function style(_ref) {
var active = _ref.active,
props = _objectWithoutProperties(_ref, ['active']);
return Object.assign({
color: '#333',
display: 'inline-block',
position: 'relative',
'&::after': {
content: '"›"',
margin: '0 8px'
},
'&:last-child': {
'&::after': {
display: 'none'
}
}
}, active && { color: '#777' });
}
};
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
var _filters = __webpack_require__(68);
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function buttonFontSize(_ref) {
var large = _ref.large,
small = _ref.small;
if (large) return '1.25rem';
if (small) return '12px';
return '14px';
}
function buttonPadding(_ref2) {
var large = _ref2.large,
small = _ref2.small;
if (large) return '.75rem 1.5rem';
if (small) return '.25rem .5rem';
return '8px';
}
exports.default = {
name: 'Button',
type: 'button',
style: function style(_ref3) {
var block = _ref3.block,
disabled = _ref3.disabled,
large = _ref3.large,
outline = _ref3.outline,
pill = _ref3.pill,
small = _ref3.small,
props = _objectWithoutProperties(_ref3, ['block', 'disabled', 'large', 'outline', 'pill', 'small']);
return Object.assign({
fontSize: buttonFontSize({ small: small, large: large }),
padding: buttonPadding({ small: small, large: large }),
borderRadius: '4px',
fontWeight: small ? 500 : 'bold',
textAlign: 'center',
border: 0,
margin: 0,
width: block ? '100%' : 'auto',
color: (0, _properties.color)(props) || '#ffffff',
backgroundColor: (0, _properties.background)(props) || props.theme.colors.primary,
'&:hover': {
backgroundColor: (0, _properties.background)(props, _filters.darken) || props.theme.colors.primary
}
}, pill && {
borderRadius: '10rem'
}, outline && {
fontWeight: 500,
backgroundColor: '#ffffff',
border: '1px solid ' + ((0, _properties.border)(props) || props.theme.colors.default.color),
'&:hover': {
opacity: '.6'
}
}, disabled && {
cursor: 'not-allowed',
opacity: '.5'
});
}
};
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function hasNoBorder(_ref) {
var border = _ref.border,
noBorder = _ref.noBorder;
return border === 0 || noBorder ? 0 : '1px solid #eee';
}
exports.default = {
name: 'ButtonGroup',
type: 'div',
style: function style(_ref2) {
var vertical = _ref2.vertical,
props = _objectWithoutProperties(_ref2, ['vertical']);
return {
display: 'inline-flex',
flexDirection: vertical ? 'column' : 'initial',
'& > *': {
borderRadius: 0,
border: hasNoBorder(props),
borderLeft: vertical ? 'auto' : 0,
borderTop: vertical ? 0 : 'auto',
'&:first-child': {
borderRadius: vertical ? '4px 4px 0 0' : '4px 0 0 4px',
borderLeft: hasNoBorder(props),
borderTop: hasNoBorder(props)
},
'&:last-child': {
borderRadius: vertical ? '0 0 4px 4px' : '0 4px 4px 0'
}
}
};
}
};
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'Card',
type: 'div',
style: function style(_ref) {
var border = _ref.border,
fluid = _ref.fluid,
rounded = _ref.rounded,
shadowed = _ref.shadowed,
props = _objectWithoutProperties(_ref, ['border', 'fluid', 'rounded', 'shadowed']);
return Object.assign({
display: 'flex',
flexDirection: 'column',
'& > img': {
maxWidth: '100%'
},
'h1': {
lineHeight: 'inherit !important'
}
}, border && {
border: '1px solid #eeeeee'
}, fluid && {
height: border ? 'calc(100% - 2px)' : '100%'
}, rounded && {
borderRadius: !isNaN(rounded) ? rounded + 'px' : '4px'
}, shadowed && {
boxShadow: '0px 12px 30px -6px rgba(147, 147, 147, .5)'
});
}
};
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'CardContent',
type: 'div',
style: function style(_ref) {
var backgroundImage = _ref.backgroundImage,
shadowed = _ref.shadowed,
props = _objectWithoutProperties(_ref, ['backgroundImage', 'shadowed']);
return Object.assign({
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
backgroundSize: 'cover',
backgroundPosition: 'center',
borderRadius: '5px',
position: 'relative',
padding: '20px',
'& *': {
position: 'relative',
zIndex: 2,
color: '#ffffff !important'
},
'& *:not(p)': {
margin: '0'
},
'& h2': {
opacity: '.7',
fontWeight: 500,
fontSize: '14px',
marginBottom: '8px !important'
},
'& p': {
opacity: '.9',
fontWeight: 300,
fontSize: '14px',
marginTop: '10px !important'
}
}, shadowed && {
'&::after': {
content: '" "',
position: 'absolute',
borderRadius: '5px',
top: 0,
left: 0,
right: 0,
bottom: 0,
backgroundColor: 'rgba(100, 100, 100, .3)',
zIndex: 1
}
});
}
};
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
name: 'CardFooter',
type: 'div',
style: function style(props) {
return {
backgroundColor: '#ffffff',
borderRadius: '0 0 5px 5px',
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
fontWeight: 300,
color: '#939393',
fontSize: '14px',
position: 'relative',
zIndex: 2,
'& *:not(p,h1)': {
margin: '0'
},
'& h1': {
color: '#000000'
},
'& h2': {
color: '#8d8c92',
fontWeight: 500,
fontSize: '13px',
marginBottom: '8px !important'
},
'& p': {
marginTop: '10px !important'
}
};
},
props: {
p: '20px',
mt: '-5px'
}
};
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
name: 'Code',
type: 'code',
style: function style(props) {
return {
backgroundColor: '#eeeeee',
padding: '12px',
display: 'block'
};
}
};
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
name: 'Cover',
type: 'div',
style: function style(props) {
return {
backgroundSize: 'cover',
backgroundPosition: 'center'
};
}
};
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'Fixed',
type: 'div',
style: function style(_ref) {
var bottom = _ref.bottom,
left = _ref.left,
right = _ref.right,
top = _ref.top,
props = _objectWithoutProperties(_ref, ['bottom', 'left', 'right', 'top']);
return Object.assign({
position: 'fixed'
}, bottom && { bottom: bottom || 0 }, left && { left: left || 0 }, right && { right: right || 0 }, top && { top: top || 0 });
}
};
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'H1',
type: 'h1',
style: function style(props) {
return {
fontSize: '28px',
lineHeight: '28px',
fontWeight: 700,
margin: 0,
color: (0, _properties.color)(props) || props.theme.colors.default.text,
'& > *': {
lineHeight: '28px !important'
}
};
}
};
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'H2',
type: 'h2',
style: function style(props) {
return {
fontSize: '26px',
lineHeight: '26px',
fontWeight: 700,
margin: 0,
color: (0, _properties.color)(props) || props.theme.colors.default.text,
'& > *': {
lineHeight: '26px !important'
}
};
}
};
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'H3',
type: 'h3',
style: function style(props) {
return {
fontSize: '22px',
lineHeight: '22px',
fontWeight: 700,
margin: 0,
color: (0, _properties.color)(props) || props.theme.colors.default.text,
'& > *': {
lineHeight: '22px !important'
}
};
}
};
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'H4',
type: 'h4',
style: function style(props) {
return {
fontSize: '20px',
lineHeight: '20px',
fontWeight: 700,
margin: 0,
color: (0, _properties.color)(props) || props.theme.colors.default.text,
'& > *': {
lineHeight: '20px !important'
}
};
}
};
/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'H5',
type: 'h5',
style: function style(props) {
return {
fontSize: '18px',
lineHeight: '18px',
fontWeight: 700,
margin: 0,
color: (0, _properties.color)(props) || props.theme.colors.default.text,
'& > *': {
lineHeight: '18px !important'
}
};
}
};
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'H6',
type: 'h6',
style: function style(props) {
return {
fontSize: '16px',
lineHeight: '16px',
fontWeight: 700,
margin: 0,
color: (0, _properties.color)(props) || props.theme.colors.default.text,
'& > *': {
lineHeight: '16px !important'
}
};
}
};
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'Heading',
type: 'h1',
style: function style(props) {
return {
fontSize: '28px',
fontWeight: 700,
lineHeight: '28px',
marginBottom: '10px',
color: (0, _properties.color)(props) || props.theme.colors.default.text,
'& > *': {
lineHeight: '28px !important'
}
};
}
};
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
name: 'Img',
type: 'img'
};
/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'InputGroup',
type: 'div',
style: function style(_ref) {
var shadowed = _ref.shadowed,
props = _objectWithoutProperties(_ref, ['shadowed']);
return Object.assign({
display: 'inline-flex',
borderRadius: '4px',
'& > *': {
borderRadius: 0,
'&:first-child': {
borderRadius: '4px 0 0 4px'
},
'&:last-child': {
borderRadius: '0 4px 4px 0'
}
}
}, shadowed && {
boxShadow: '0 1px 3px 0px rgba(0, 0, 0, .08)'
});
}
};
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _mount = __webpack_require__(3);
var _mount2 = _interopRequireDefault(_mount);
var _Small = __webpack_require__(7);
var _Small2 = _interopRequireDefault(_Small);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = {
name: 'InputHelp',
type: 'small',
style: function style(props) {
return _extends({}, (0, _mount2.default)(_Small2.default).style(props), {
marginTop: '.25rem'
});
}
};
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var initialLabel = function initialLabel(_ref) {
var uppercased = _ref.uppercased;
return Object.assign({
fontSize: '14px',
transition: 'opacity 250ms, top 250ms',
position: 'relative',
color: '#555555',
display: 'block',
marginTop: '3px',
marginBottom: '5px',
fontWeight: 700
}, uppercased && {
textTransform: 'uppercase',
fontSize: '12px'
});
};
exports.default = {
name: 'Label',
type: 'label',
style: function style(_ref2) {
var invisible = _ref2.invisible,
props = _objectWithoutProperties(_ref2, ['invisible']);
return Object.assign(_extends({}, initialLabel(props), {
opacity: 1,
top: '-3px'
}),
// NOTE: Sadly, I couldn't use 'hidden' here :(
invisible && _extends({}, initialLabel(props), {
opacity: 0,
top: 0
}));
}
};
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'ListGroup',
type: 'ul',
style: function style(_ref) {
var hovered = _ref.hovered,
props = _objectWithoutProperties(_ref, ['hovered']);
return Object.assign({
listStyleType: 'none',
margin: 0,
padding: 0
}, hovered && {
'& > li:hover': {
backgroundColor: 'rgb(245, 245, 245)'
}
});
}
};
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'ListItem',
type: 'li',
style: function style(_ref) {
var active = _ref.active,
disabled = _ref.disabled,
isHeader = _ref.isHeader,
props = _objectWithoutProperties(_ref, ['active', 'disabled', 'isHeader']);
return Object.assign({
display: 'flex',
justifyContent: 'space-between',
borderTop: '1px solid ' + ((0, _properties.background)(props) || '#eeeeee'),
fontSize: '14px',
alignItems: 'center',
padding: '8px 0',
'&:first-child': {
borderTop: 0
}
}, active && {
backgroundColor: (0, _properties.background)(props) || '#eeeeee',
marginBottom: '-1px',
borderTop: 0
}, disabled && {
color: props.theme.colors.disabled,
cursor: 'not-allowed'
}, isHeader && {
fontSize: '80%',
opacity: .8,
borderTop: 0,
marginTop: '6px',
fontWeight: 500,
textTransform: 'uppercase',
'&:hover': {
backgroundColor: 'initial !important'
}
});
}
};
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
exports.default = {
name: 'NavBadge',
type: 'div',
style: function style(props) {
return {
position: 'absolute',
top: '50%',
right: '-8px',
height: '6px',
width: '6px',
borderRadius: '50%',
backgroundColor: (0, _properties.background)(props) || props.theme.colors.primary,
marginTop: '-14px'
};
}
};
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
name: 'NavBar',
type: 'div',
style: function style(props) {
return {
display: 'flex',
alignItems: 'center'
};
}
};
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'NavItem',
type: 'li',
style: function style(_ref) {
var active = _ref.active,
cursor = _ref.cursor,
filled = _ref.filled,
underlined = _ref.underlined,
props = _objectWithoutProperties(_ref, ['active', 'cursor', 'filled', 'underlined']);
return Object.assign({
display: 'inline-block',
transition: 'opacity 250ms',
margin: '0 12px',
padding: '12px 0',
textAlign: 'center',
position: 'relative',
lineHeight: '100%'
}, active && {
color: (0, _properties.color)(props) || props.theme.colors.primary,
backgroundColor: '#ffffff !important'
}, cursor && {
'&:hover': {
opacity: '.6',
cursor: 'pointer'
}
}, underlined && {
borderBottom: '1px solid ' + ((0, _properties.color)(props) || props.theme.colors.primary),
marginBottom: '-1px'
}, filled && {
color: '#ffffff',
padding: '6px',
margin: '6px',
borderRadius: '4px',
backgroundColor: (0, _properties.background)(props) || props.theme.colors.primary
});
}
};
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'Navigation',
type: 'ul',
style: function style(_ref) {
var inverse = _ref.inverse,
fluid = _ref.fluid,
underlined = _ref.underlined,
props = _objectWithoutProperties(_ref, ['inverse', 'fluid', 'underlined']);
return Object.assign({
display: 'inline-flex',
listStyleType: 'none',
margin: 0,
padding: 0,
alignItems: 'center',
'& > *:first-child': {
marginLeft: 0
},
'& > *:last-child': {
marginRight: 0
}
}, inverse && {
padding: '1px',
backgroundColor: '#eeeeee',
borderRadius: '4px',
'& > li': {
backgroundColor: '#eeeeee',
padding: '12px',
margin: 0,
flex: 1
},
'& > li:first-child': {
borderTopLeftRadius: '4px',
borderBottomLeftRadius: '4px'
},
'& > li:last-child': {
borderTopRightRadius: '4px',
borderBottomRightRadius: '4px'
}
}, !inverse && underlined && {
borderBottom: '1px solid #eeeeee'
}, fluid && {
width: '100%'
});
}
};
/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
name: 'P',
type: 'p',
style: function style(props) {
return {
margin: 0,
padding: 0
};
}
};
/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _properties = __webpack_require__(0);
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
exports.default = {
name: 'PageItem',
type: 'li',
style: function style(_ref) {
var active = _ref.active,
disabled = _ref.disabled,
props = _objectWithoutProperties(_ref, ['active', 'disabled']);
return Object.assign({
display: 'inline-block',
border: '1px solid #eeeeee',
borderRightWidth: 0,
padding: '8px',
'&:first-child': {
borderTopLeftRadius: '4px',
borderBottomLeftRadius: '4px'
},
'&:last-child': {
borderTopRightRadius: '4px',
borderBottomRightRadius: '4px',
borderRightWidth: '1px'
}
}, active && {
color: (0, _properties.color)(props) || props.theme.colors.primary
}, disabled && {
color: props.theme.colors.disabled
}, !disabled && !active && {
'&:hover': {
cursor: 'pointer',
backgroundColor: 'rgb(245, 245, 245)'
}
});
}
};
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = {
name: 'Pagination',
type: 'ul',