@heathmont/moon-components
Advanced tools
Comparing version 2.32.0 to 2.33.0
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -30,7 +24,7 @@ }, component); | ||
test('renders correctly', function () { | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Badge["default"], null, "Active"))); | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Badge["default"], null, "Active"))); | ||
expect(badge).toMatchSnapshot(); | ||
}); | ||
test('renders correctly with color', function () { | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Badge["default"], { | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Badge["default"], { | ||
color: "red" | ||
@@ -41,3 +35,3 @@ }, "Red badge"))); | ||
test('renders correctly with background color', function () { | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Badge["default"], { | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Badge["default"], { | ||
backgroundColor: "red" | ||
@@ -48,3 +42,3 @@ }, "Red background badge"))); | ||
test('renders correctly default size', function () { | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Badge["default"], { | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Badge["default"], { | ||
backgroundColor: "red" | ||
@@ -55,3 +49,3 @@ }, "Default size badge"))); | ||
test('renders correctly small size', function () { | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Badge["default"], { | ||
var badge = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Badge["default"], { | ||
backgroundColor: "red", | ||
@@ -58,0 +52,0 @@ size: "small" |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
declare type BannerProps = { | ||
@@ -3,0 +3,0 @@ message: any; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -27,6 +25,2 @@ var _moonUtils = require("@heathmont/moon-utils"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
@@ -105,3 +99,3 @@ | ||
var _React$useState = React.useState(true), | ||
var _React$useState = _react["default"].useState(true), | ||
_React$useState2 = _slicedToArray(_React$useState, 2), | ||
@@ -119,11 +113,11 @@ visible = _React$useState2[0], | ||
return /*#__PURE__*/React.createElement(BannerWrapper, null, status === 'error' && /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(_IconError["default"], { | ||
return /*#__PURE__*/_react["default"].createElement(BannerWrapper, null, status === 'error' && /*#__PURE__*/_react["default"].createElement(IconWrapper, null, /*#__PURE__*/_react["default"].createElement(_IconError["default"], { | ||
fontSize: "1.5rem" | ||
})), status === 'warning' && /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(_IconWarning["default"], { | ||
})), status === 'warning' && /*#__PURE__*/_react["default"].createElement(IconWrapper, null, /*#__PURE__*/_react["default"].createElement(_IconWarning["default"], { | ||
fontSize: "1.5rem", | ||
color: "krillin.100" | ||
})), status === 'info' && /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(_IconBannerInfo["default"], { | ||
})), status === 'info' && /*#__PURE__*/_react["default"].createElement(IconWrapper, null, /*#__PURE__*/_react["default"].createElement(_IconBannerInfo["default"], { | ||
fontSize: "1.5rem", | ||
color: "krillin.100" | ||
})), message && message, isCloseable && /*#__PURE__*/React.createElement(IconCloseWrapper, { | ||
})), message && message, isCloseable && /*#__PURE__*/_react["default"].createElement(IconCloseWrapper, { | ||
onClick: function onClick() { | ||
@@ -136,3 +130,3 @@ if (onClose && typeof onClose === 'function') { | ||
} | ||
}, /*#__PURE__*/React.createElement(_IconCloseSmall["default"], { | ||
}, /*#__PURE__*/_react["default"].createElement(_IconCloseSmall["default"], { | ||
fontSize: "1rem", | ||
@@ -139,0 +133,0 @@ color: "trunks.100" |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -30,3 +24,3 @@ }, component); | ||
test('renders correctly', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "primary" | ||
@@ -37,3 +31,3 @@ }, "Primary Button"))); | ||
test('renders as fullWidth', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "primary", | ||
@@ -45,3 +39,3 @@ fullWidth: true | ||
test('renders as disabled', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "primary", | ||
@@ -53,3 +47,3 @@ disabled: true | ||
test('renders as an anchor tag', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "primary", | ||
@@ -63,3 +57,3 @@ as: "a", | ||
test('renders as primary', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "primary" | ||
@@ -70,3 +64,3 @@ }, "Primary Button"))); | ||
test('renders as highlight', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "highlight" | ||
@@ -77,3 +71,3 @@ }, "Secondary Button"))); | ||
test('renders as secondary', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "secondary" | ||
@@ -84,3 +78,3 @@ }, "Secondary Button"))); | ||
test('renders as default', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], null, "Default Button"))); | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], null, "Default Button"))); | ||
expect(button).toMatchSnapshot(); | ||
@@ -90,3 +84,3 @@ }); | ||
test('Primary renders with hover', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "primary", | ||
@@ -98,3 +92,3 @@ mockState: "hover" | ||
test('Primary renders as active', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "primary", | ||
@@ -106,3 +100,3 @@ mockState: "active" | ||
test('Highlight renders with hover', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "highlight", | ||
@@ -114,3 +108,3 @@ mockState: "hover" | ||
test('Highlight renders as active', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "highlight", | ||
@@ -122,3 +116,3 @@ mockState: "active" | ||
test('Secondary renders with hover', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "secondary", | ||
@@ -130,3 +124,3 @@ mockState: "hover" | ||
test('Secondary renders as active', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "secondary", | ||
@@ -138,3 +132,3 @@ mockState: "active" | ||
test('Default renders with hover', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
mockState: "hover" | ||
@@ -145,3 +139,3 @@ }, "Hover Default Button"))); | ||
test('Default renders as active', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
mockState: "active" | ||
@@ -156,3 +150,3 @@ }, "Active Default Button"))); | ||
test('Highlight outline renders as active', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "highlight", | ||
@@ -164,3 +158,3 @@ mockState: "active" | ||
test('Secondary renders with hover', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "secondary", | ||
@@ -172,3 +166,3 @@ mockState: "hover" | ||
test('Secondary renders as active', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
variant: "secondary", | ||
@@ -180,3 +174,3 @@ mockState: "active" | ||
test('Default renders with hover', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
mockState: "hover" | ||
@@ -187,3 +181,3 @@ }, "Hover Default Button"))); | ||
test('Default renders as active', function () { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Button["default"], { | ||
var button = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Button["default"], { | ||
mockState: "active" | ||
@@ -190,0 +184,0 @@ }, "Active Default Button"))); |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ButtonVariants } from './variants'; | ||
@@ -3,0 +3,0 @@ import { ButtonSizes } from './size'; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -12,3 +10,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -33,6 +31,2 @@ var _moonUtils = require("@heathmont/moon-utils"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -291,6 +285,6 @@ | ||
if (progress) { | ||
content = /*#__PURE__*/React.createElement(_StyledDiv, null, /*#__PURE__*/React.createElement(_StyledDiv2, null, children), /*#__PURE__*/React.createElement(_StyledDiv3, { | ||
content = /*#__PURE__*/_react["default"].createElement(_StyledDiv, null, /*#__PURE__*/_react["default"].createElement(_StyledDiv2, null, children), /*#__PURE__*/_react["default"].createElement(_StyledDiv3, { | ||
_css: "calc(50% - ".concat((0, _moonUtils.rem)(space.small), ")"), | ||
_css2: (0, _moonUtils.rem)(space["default"]) | ||
}, /*#__PURE__*/React.createElement(_Loader["default"], { | ||
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], { | ||
color: color.bulma[100] | ||
@@ -301,9 +295,9 @@ }))); | ||
if (success) { | ||
content = /*#__PURE__*/React.createElement(_StyledDiv4, null, /*#__PURE__*/React.createElement(_StyledDiv5, null, children), /*#__PURE__*/React.createElement(_StyledDiv6, { | ||
content = /*#__PURE__*/_react["default"].createElement(_StyledDiv4, null, /*#__PURE__*/_react["default"].createElement(_StyledDiv5, null, children), /*#__PURE__*/_react["default"].createElement(_StyledDiv6, { | ||
_css3: "calc(50% - ".concat((0, _moonUtils.rem)(space.small), ")"), | ||
_css4: (0, _moonUtils.rem)(space["default"]) | ||
}, /*#__PURE__*/React.createElement(_IconSuccess["default"], null))); | ||
}, /*#__PURE__*/_react["default"].createElement(_IconSuccess["default"], null))); | ||
} | ||
return /*#__PURE__*/React.createElement(StyledButton, _extends({ | ||
return /*#__PURE__*/_react["default"].createElement(StyledButton, _extends({ | ||
oops: oops, | ||
@@ -315,6 +309,6 @@ className: mockState && (0, _states.buttonMockStateClass)(mockState), | ||
fullWidth: fullWidth | ||
}, props), iconLeft && /*#__PURE__*/React.createElement(IconLeftWrapper, { | ||
}, props), iconLeft && /*#__PURE__*/_react["default"].createElement(IconLeftWrapper, { | ||
size: size, | ||
fullWidth: fullWidth | ||
}, iconLeft), content, iconRight && /*#__PURE__*/React.createElement(IconRightWrapper, { | ||
}, iconLeft), content, iconRight && /*#__PURE__*/_react["default"].createElement(IconRightWrapper, { | ||
size: size, | ||
@@ -321,0 +315,0 @@ fullWidth: fullWidth |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -31,7 +25,7 @@ }, component); | ||
test('renders as <span> by default', function () { | ||
var caption = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Caption["default"], null, "Caption"))); | ||
var caption = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Caption["default"], null, "Caption"))); | ||
expect(caption).toMatchSnapshot(); | ||
}); | ||
test('renders as an element if "as" prop provided', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Caption["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Caption["default"], { | ||
as: "p" | ||
@@ -43,7 +37,7 @@ }, "Caption with Paragraph tag"))); | ||
test('renders default color', function () { | ||
var caption = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Caption["default"], null, "Caption"))); | ||
var caption = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Caption["default"], null, "Caption"))); | ||
expect(caption).toMatchSnapshot(); | ||
}); | ||
test('renders with a color', function () { | ||
var caption = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Caption["default"], { | ||
var caption = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Caption["default"], { | ||
color: "piccolo.100" | ||
@@ -50,0 +44,0 @@ }, "Caption"))); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -19,8 +17,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -32,6 +26,6 @@ }, component); | ||
test('renders with flex layout', function () { | ||
var card = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Card["default"], { | ||
var card = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Card["default"], { | ||
template: "front", | ||
flex: true | ||
}, /*#__PURE__*/React.createElement("p", null, "Some content"), /*#__PURE__*/React.createElement("p", null, "Some other content")))); | ||
}, /*#__PURE__*/_react["default"].createElement("p", null, "Some content"), /*#__PURE__*/_react["default"].createElement("p", null, "Some other content")))); | ||
expect(card).toMatchSnapshot(); | ||
@@ -41,18 +35,18 @@ }); | ||
test('renders as front', function () { | ||
var card = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Card["default"], { | ||
var card = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Card["default"], { | ||
template: "front" | ||
}, /*#__PURE__*/React.createElement("p", null, "Some content")))); | ||
}, /*#__PURE__*/_react["default"].createElement("p", null, "Some content")))); | ||
expect(card).toMatchSnapshot(); | ||
}); | ||
test('renders as front with backgroundIcon', function () { | ||
var card = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Card["default"], { | ||
var card = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Card["default"], { | ||
template: "front", | ||
backgroundIcon: /*#__PURE__*/React.createElement(_moonAssets.IconCurrencyBtc, null) | ||
}, /*#__PURE__*/React.createElement("p", null, "Some content")))); | ||
backgroundIcon: /*#__PURE__*/_react["default"].createElement(_moonAssets.IconCurrencyBtc, null) | ||
}, /*#__PURE__*/_react["default"].createElement("p", null, "Some content")))); | ||
expect(card).toMatchSnapshot(); | ||
}); | ||
test('renders as outline', function () { | ||
var card = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Card["default"], { | ||
var card = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Card["default"], { | ||
template: "outline" | ||
}, /*#__PURE__*/React.createElement("p", null, "Some content")))); | ||
}, /*#__PURE__*/_react["default"].createElement("p", null, "Some content")))); | ||
expect(card).toMatchSnapshot(); | ||
@@ -59,0 +53,0 @@ }); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -23,6 +21,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
@@ -35,5 +29,5 @@ | ||
var backgroundSvg = function backgroundSvg(backgroundIcon) { | ||
return backgroundIcon && React.isValidElement(backgroundIcon) && { | ||
return backgroundIcon && _react["default"].isValidElement(backgroundIcon) && { | ||
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */ | ||
backgroundImage: (0, _moonUtils.inlineSvg)(React.cloneElement(backgroundIcon, { | ||
backgroundImage: (0, _moonUtils.inlineSvg)(_react["default"].cloneElement(backgroundIcon, { | ||
/** | ||
@@ -40,0 +34,0 @@ * By setting the icon to white with `0.05` opacity, we can use |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -19,8 +17,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -32,3 +26,3 @@ }, component); | ||
test('renders correctly', function () { | ||
var balance = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_CardBalance["default"], { | ||
var balance = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_CardBalance["default"], { | ||
from: { | ||
@@ -44,3 +38,3 @@ currency: 'Bitcoin', | ||
test('renders with currency if no unitTitle provided', function () { | ||
var balance = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_CardBalance["default"], { | ||
var balance = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_CardBalance["default"], { | ||
from: { | ||
@@ -55,4 +49,4 @@ currency: 'Bitcoin', | ||
test('renders correctly with a badge', function () { | ||
var balance = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_CardBalance["default"], { | ||
badge: /*#__PURE__*/React.createElement(_Badge["default"], null, "Active"), | ||
var balance = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_CardBalance["default"], { | ||
badge: /*#__PURE__*/_react["default"].createElement(_Badge["default"], null, "Active"), | ||
from: { | ||
@@ -59,0 +53,0 @@ currency: 'Bitcoin', |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
declare type Balance = { | ||
@@ -3,0 +3,0 @@ currency: string; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -21,6 +19,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
/** | ||
@@ -63,6 +57,6 @@ * Styles | ||
var from = _ref2.from; | ||
return /*#__PURE__*/React.createElement(_Stack["default"], { | ||
return /*#__PURE__*/_react["default"].createElement(_Stack["default"], { | ||
as: "section", | ||
space: 0 | ||
}, /*#__PURE__*/React.createElement(Text, null, from.currency), /*#__PURE__*/React.createElement(Title, null, "".concat(from.value, " "), /*#__PURE__*/React.createElement(Unit, { | ||
}, /*#__PURE__*/_react["default"].createElement(Text, null, from.currency), /*#__PURE__*/_react["default"].createElement(Title, null, "".concat(from.value, " "), /*#__PURE__*/_react["default"].createElement(Unit, { | ||
title: from.unitTitle || from.currency | ||
@@ -79,5 +73,5 @@ }, from.unit))); | ||
badge = _ref3.badge; | ||
return badge ? /*#__PURE__*/React.createElement(_Stack["default"], null, badge && /*#__PURE__*/React.createElement("span", null, badge), /*#__PURE__*/React.createElement(Balance, { | ||
return badge ? /*#__PURE__*/_react["default"].createElement(_Stack["default"], null, badge && /*#__PURE__*/_react["default"].createElement("span", null, badge), /*#__PURE__*/_react["default"].createElement(Balance, { | ||
from: from | ||
})) : /*#__PURE__*/React.createElement(Balance, { | ||
})) : /*#__PURE__*/_react["default"].createElement(Balance, { | ||
from: from | ||
@@ -84,0 +78,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { CSSObject } from 'styled-components'; | ||
@@ -3,0 +3,0 @@ import { SpaceProps } from '@heathmont/moon-themes'; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -25,6 +23,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
@@ -110,3 +104,3 @@ | ||
return disabled ? null : /*#__PURE__*/React.createElement(_control.CarouselControl, rest, /*#__PURE__*/React.createElement(_control.CarouselControlCaption, null, scrollLeftCaption), /*#__PURE__*/React.createElement(_IconChevronLeft["default"], null)); | ||
return disabled ? null : /*#__PURE__*/_react["default"].createElement(_control.CarouselControl, rest, /*#__PURE__*/_react["default"].createElement(_control.CarouselControlCaption, null, scrollLeftCaption), /*#__PURE__*/_react["default"].createElement(_IconChevronLeft["default"], null)); | ||
}; | ||
@@ -121,3 +115,3 @@ | ||
return disabled ? null : /*#__PURE__*/React.createElement(_control.CarouselControl, rest, /*#__PURE__*/React.createElement(_control.CarouselControlCaption, null, scrollRightCaption), /*#__PURE__*/React.createElement(_IconChevronLeft["default"], null)); | ||
return disabled ? null : /*#__PURE__*/_react["default"].createElement(_control.CarouselControl, rest, /*#__PURE__*/_react["default"].createElement(_control.CarouselControlCaption, null, scrollRightCaption), /*#__PURE__*/_react["default"].createElement(_IconChevronLeft["default"], null)); | ||
}; | ||
@@ -146,3 +140,3 @@ | ||
React.useEffect(function () { | ||
_react["default"].useEffect(function () { | ||
if (!scrollTo) { | ||
@@ -165,10 +159,11 @@ return; | ||
}, []); | ||
return /*#__PURE__*/React.createElement(CarouselWrapper, null, scrollToLeftButton ? scrollToLeftButton({ | ||
return /*#__PURE__*/_react["default"].createElement(CarouselWrapper, null, scrollToLeftButton ? scrollToLeftButton({ | ||
scrollToStep: scrollLeftToStep, | ||
disabled: !canScrollLeft | ||
}) : /*#__PURE__*/React.createElement(DefaultScrollToLeftButton, { | ||
}) : /*#__PURE__*/_react["default"].createElement(DefaultScrollToLeftButton, { | ||
onClick: scrollLeftToStep, | ||
disabled: !canScrollLeft, | ||
scrollLeftCaption: scrollLeftCaption | ||
}), /*#__PURE__*/React.createElement(ItemsScrollWrapper, { | ||
}), /*#__PURE__*/_react["default"].createElement(ItemsScrollWrapper, { | ||
space: space, | ||
@@ -180,3 +175,3 @@ ref: containerRef | ||
// eslint-disable-next-line react/no-array-index-key | ||
React.createElement(CarouselScrollItem, { | ||
_react["default"].createElement(CarouselScrollItem, { | ||
key: index, | ||
@@ -189,3 +184,3 @@ ref: itemRef | ||
disabled: !canScrollRight | ||
}) : /*#__PURE__*/React.createElement(DefaultScrollToRightButton, { | ||
}) : /*#__PURE__*/_react["default"].createElement(DefaultScrollToRightButton, { | ||
onClick: scrollRightToStep, | ||
@@ -192,0 +187,0 @@ disabled: !canScrollRight, |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,10 +15,6 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -35,3 +29,3 @@ }, component); | ||
test('renders by default', function () { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Checkbox["default"], _extends({ | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], _extends({ | ||
id: "Checkbox-Test1" | ||
@@ -42,3 +36,3 @@ }, testProps)))); | ||
test('renders as disabled', function () { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Checkbox["default"], _extends({ | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], _extends({ | ||
id: "Checkbox-Test2", | ||
@@ -50,3 +44,3 @@ disabled: true | ||
test('renders with hidden aria-label', function () { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Checkbox["default"], { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], { | ||
id: "Checkbox-Test3", | ||
@@ -58,5 +52,5 @@ ariaLabel: "This label is hidden" | ||
test('renders label with HTML', function () { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Checkbox["default"], { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], { | ||
id: "Checkbox-Test4", | ||
label: /*#__PURE__*/React.createElement("span", null, "This is a label with a ", /*#__PURE__*/React.createElement("a", { | ||
label: /*#__PURE__*/_react["default"].createElement("span", null, "This is a label with a ", /*#__PURE__*/_react["default"].createElement("a", { | ||
href: "#test" | ||
@@ -63,0 +57,0 @@ }, "link"), ".") |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { LabelText } from '../private/label/label'; | ||
@@ -3,0 +3,0 @@ /** |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -25,6 +23,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
@@ -156,3 +150,3 @@ | ||
'&:checked + span::after': { | ||
backgroundImage: (0, _moonUtils.inlineSvg)( /*#__PURE__*/React.createElement(_icon.CheckboxIcon, { | ||
backgroundImage: (0, _moonUtils.inlineSvg)( /*#__PURE__*/_react["default"].createElement(_icon.CheckboxIcon, { | ||
color: theme.color.piccolo[100] | ||
@@ -188,5 +182,5 @@ })), | ||
var autoId = id || "Checkbox-".concat((0, _moonUtils.uniqueId)()); | ||
return /*#__PURE__*/React.createElement(CheckboxLabel, { | ||
return /*#__PURE__*/_react["default"].createElement(CheckboxLabel, { | ||
htmlFor: autoId | ||
}, /*#__PURE__*/React.createElement(CheckboxInput, _extends({ | ||
}, /*#__PURE__*/_react["default"].createElement(CheckboxInput, _extends({ | ||
id: autoId, | ||
@@ -196,3 +190,3 @@ disabled: disabled, | ||
"aria-label": ariaLabel && ariaLabel | ||
}, inputProps)), /*#__PURE__*/React.createElement(CheckboxCaption, null, label)); | ||
}, inputProps)), /*#__PURE__*/_react["default"].createElement(CheckboxCaption, null, label)); | ||
}; | ||
@@ -199,0 +193,0 @@ |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
export declare const CheckboxIcon: React.FC<{ | ||
@@ -3,0 +3,0 @@ color: string | undefined; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,11 +8,9 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var CheckboxIcon = function CheckboxIcon(_ref) { | ||
var color = _ref.color; | ||
return /*#__PURE__*/React.createElement("svg", { | ||
return /*#__PURE__*/_react["default"].createElement("svg", { | ||
xmlns: "http://www.w3.org/2000/svg", | ||
@@ -25,3 +21,3 @@ width: "100%", | ||
viewBox: "0 0 20 14" | ||
}, /*#__PURE__*/React.createElement("path", { | ||
}, /*#__PURE__*/_react["default"].createElement("path", { | ||
fill: color, | ||
@@ -28,0 +24,0 @@ fillRule: "evenodd", |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -19,6 +17,2 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var Global = (0, _styledComponents.createGlobalStyle)({ | ||
@@ -38,13 +32,13 @@ '&:root': { | ||
var children = _ref.children; | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Global, null), children)); | ||
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(Global, null), children)); | ||
}; | ||
var ExampleHeading = function ExampleHeading() { | ||
return /*#__PURE__*/React.createElement("h1", null, "Lorem ipsum dolor sit amet."); | ||
return /*#__PURE__*/_react["default"].createElement("h1", null, "Lorem ipsum dolor sit amet."); | ||
}; | ||
var ExampleText = function ExampleText() { | ||
return /*#__PURE__*/React.createElement("p", null, "Consectetur adipiscing elit. Phasellus eget vulputate nibh, nec laoreet lectus. Proin at lacus quis justo mattis porta. Nulla sed nisl volutpat, varius enim eu, semper augue."); | ||
return /*#__PURE__*/_react["default"].createElement("p", null, "Consectetur adipiscing elit. Phasellus eget vulputate nibh, nec laoreet lectus. Proin at lacus quis justo mattis porta. Nulla sed nisl volutpat, varius enim eu, semper augue."); | ||
}; | ||
@@ -60,3 +54,3 @@ /** | ||
ref = _ref2.ref; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return /*#__PURE__*/_react["default"].createElement("div", { | ||
ref: ref | ||
@@ -70,3 +64,3 @@ }, children); | ||
ref = _ref3.ref; | ||
return /*#__PURE__*/React.createElement("div", { | ||
return /*#__PURE__*/_react["default"].createElement("div", { | ||
ref: ref, | ||
@@ -94,3 +88,3 @@ style: {} | ||
test('renders as hidden', function () { | ||
var dialog = (0, _reactTestRenderer.create)( /*#__PURE__*/React.createElement(Setup, null, /*#__PURE__*/React.createElement(_Dialog["default"], null, /*#__PURE__*/React.createElement(ExampleHeading, null), /*#__PURE__*/React.createElement(ExampleText, null)))); | ||
var dialog = (0, _reactTestRenderer.create)( /*#__PURE__*/_react["default"].createElement(Setup, null, /*#__PURE__*/_react["default"].createElement(_Dialog["default"], null, /*#__PURE__*/_react["default"].createElement(ExampleHeading, null), /*#__PURE__*/_react["default"].createElement(ExampleText, null)))); | ||
expect(dialog).toMatchSnapshot(); | ||
@@ -97,0 +91,0 @@ }); // test('renders as visible when `showDialog` is set to `true`', () => { |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { DialogProps as ReachDialogProps } from '@reach/dialog'; | ||
@@ -3,0 +3,0 @@ import { DialogPosition, DialogMaxWidth } from './private/types'; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -21,6 +19,2 @@ var _IconClose = _interopRequireDefault(require("../private/icons/IconClose")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var Dialog = function Dialog(_ref) { | ||
@@ -34,12 +28,12 @@ var children = _ref.children, | ||
position = _ref$position === void 0 ? 'CENTER' : _ref$position; | ||
return /*#__PURE__*/React.createElement(_layout.DialogOverlay, { | ||
return /*#__PURE__*/_react["default"].createElement(_layout.DialogOverlay, { | ||
isOpen: isOpen && isOpen, | ||
onDismiss: onDismiss && onDismiss | ||
}, /*#__PURE__*/React.createElement(_layout.DialogContent, { | ||
}, /*#__PURE__*/_react["default"].createElement(_layout.DialogContent, { | ||
maxWidth: maxWidth, | ||
position: position | ||
}, /*#__PURE__*/React.createElement(_layout.DialogContainer, null, /*#__PURE__*/React.createElement(_toggle.DialogToggle, { | ||
}, /*#__PURE__*/_react["default"].createElement(_layout.DialogContainer, null, /*#__PURE__*/_react["default"].createElement(_toggle.DialogToggle, { | ||
type: "button", | ||
onClick: onDismiss && onDismiss | ||
}, /*#__PURE__*/React.createElement(_IconClose["default"], null), /*#__PURE__*/React.createElement(_toggle.DialogToggleText, null, "Close dialog")), /*#__PURE__*/React.createElement(_layout.DialogMain, null, children)))); | ||
}, /*#__PURE__*/_react["default"].createElement(_IconClose["default"], null), /*#__PURE__*/_react["default"].createElement(_toggle.DialogToggleText, null, "Close dialog")), /*#__PURE__*/_react["default"].createElement(_layout.DialogMain, null, children)))); | ||
}; | ||
@@ -46,0 +40,0 @@ |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
declare type EmptyStateProps = { | ||
@@ -3,0 +3,0 @@ title: any; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,6 +17,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _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; } | ||
@@ -130,3 +124,3 @@ | ||
action = _ref12.action; | ||
return /*#__PURE__*/React.createElement(Wrapper, null, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), (title || message) && /*#__PURE__*/React.createElement(TextWrapper, null, title && /*#__PURE__*/React.createElement(TitleWrapper, null, title), message && /*#__PURE__*/React.createElement(MessageWrapper, null, message)), action && /*#__PURE__*/React.createElement(ActionWrapper, null, action)); | ||
return /*#__PURE__*/_react["default"].createElement(Wrapper, null, icon && /*#__PURE__*/_react["default"].createElement(IconWrapper, null, icon), (title || message) && /*#__PURE__*/_react["default"].createElement(TextWrapper, null, title && /*#__PURE__*/_react["default"].createElement(TitleWrapper, null, title), message && /*#__PURE__*/_react["default"].createElement(MessageWrapper, null, message)), action && /*#__PURE__*/_react["default"].createElement(ActionWrapper, null, action)); | ||
}; | ||
@@ -133,0 +127,0 @@ |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -13,3 +13,3 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { rem } from '@heathmont/moon-utils'; | ||
@@ -16,0 +16,0 @@ import styled from 'styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
@@ -20,3 +20,3 @@ import _styled6 from "styled-components"; | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -23,0 +23,0 @@ import { disabled, rem } from '@heathmont/moon-utils'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -7,3 +7,3 @@ 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; } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -10,0 +10,0 @@ import padding from 'polished/lib/shorthands/padding'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -3,0 +3,0 @@ import { rem } from '@heathmont/moon-utils'; |
@@ -7,3 +7,3 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -10,0 +10,0 @@ import IconChevronLeft from '../private/icons/IconChevronLeft'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -5,0 +5,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
@@ -13,3 +13,3 @@ function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -16,0 +16,0 @@ import hideVisually from 'polished/lib/mixins/hideVisually'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
export var CheckboxIcon = function CheckboxIcon(_ref) { | ||
@@ -3,0 +3,0 @@ var color = _ref.color; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import { createGlobalStyle } from 'styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import IconClose from '../private/icons/IconClose'; | ||
@@ -3,0 +3,0 @@ import { DialogToggle, DialogToggleText } from './private/toggle'; |
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; } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { rem, mq } from '@heathmont/moon-utils'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
@@ -9,3 +9,3 @@ import _styled from "styled-components"; | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -12,0 +12,0 @@ import hideVisually from 'polished/lib/mixins/hideVisually'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
@@ -10,3 +10,3 @@ import _styled2 from "styled-components"; | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -13,0 +13,0 @@ import hideVisually from 'polished/lib/mixins/hideVisually'; |
@@ -8,3 +8,3 @@ function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
/* eslint-disable no-console */ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -11,0 +11,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
@@ -11,3 +11,3 @@ import _styled from "styled-components"; | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import hideVisually from 'polished/lib/mixins/hideVisually'; | ||
@@ -14,0 +14,0 @@ import { rem } from '@heathmont/moon-utils'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -17,3 +17,3 @@ import _styled16 from "styled-components"; | ||
import _styled from "styled-components"; | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -20,0 +20,0 @@ import 'jest-styled-components'; |
@@ -17,3 +17,3 @@ import _styled16 from "styled-components"; | ||
import _styled from "styled-components"; | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -20,0 +20,0 @@ import { create } from 'react-test-renderer'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled, { css, keyframes } from 'styled-components'; | ||
@@ -3,0 +3,0 @@ import { rem, themed } from '@heathmont/moon-utils'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { themed } from '@heathmont/moon-utils'; |
@@ -13,3 +13,3 @@ function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -16,0 +16,0 @@ import { mq, rem } from '@heathmont/moon-utils'; |
@@ -7,3 +7,3 @@ 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; } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
export var VIEWBOX_CENTER_X = 50; | ||
@@ -10,0 +10,0 @@ export var VIEWBOX_CENTER_Y = 50; |
@@ -7,3 +7,3 @@ function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { useTheme } from '@heathmont/moon-themes'; | ||
@@ -10,0 +10,0 @@ import Path from './Path'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -3,0 +3,0 @@ import { rem, themed } from '@heathmont/moon-utils'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
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; } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -5,0 +5,0 @@ import { inlineSvg, mq, rem } from '@heathmont/moon-utils'; |
@@ -7,3 +7,3 @@ function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { Label } from '../private/label/label'; | ||
@@ -10,0 +10,0 @@ import { SelectElement } from './private/element'; |
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; } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { rem, mq } from '@heathmont/moon-utils'; | ||
@@ -5,0 +5,0 @@ import styled from 'styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -13,3 +13,3 @@ import _styled from "styled-components"; | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -16,0 +16,0 @@ import { rem, uniqueId, inlineSvg } from '@heathmont/moon-utils'; |
@@ -8,3 +8,3 @@ function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
/* eslint-disable no-console */ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -11,0 +11,0 @@ import 'jest-styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -7,3 +7,3 @@ 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; } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -10,0 +10,0 @@ import hideVisually from 'polished/lib/mixins/hideVisually'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import 'jest-styled-components'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
@@ -13,3 +13,3 @@ function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -16,0 +16,0 @@ import { Label } from '../private/label/label'; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -3,0 +3,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
function _extends() { _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; }; return _extends.apply(this, arguments); } | ||
/* eslint-disable no-console */ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { create } from 'react-test-renderer'; | ||
@@ -6,0 +6,0 @@ import { sportsbetDark, ThemeProvider } from '@heathmont/moon-themes'; |
@@ -12,3 +12,3 @@ import _styled2 from "styled-components"; | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import styled, { css } from 'styled-components'; | ||
@@ -15,0 +15,0 @@ import { rem } from '@heathmont/moon-utils'; |
@@ -17,3 +17,3 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import Snackbar from '../snackbar/Snackbar'; | ||
@@ -20,0 +20,0 @@ |
@@ -13,3 +13,3 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import scrollIntoView from 'scroll-into-view-if-needed'; | ||
@@ -16,0 +16,0 @@ import smoothScrollIntoView from 'smooth-scroll-into-view-if-needed'; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -30,3 +24,3 @@ }, component); | ||
test('renders a file input with default placeholder', function () { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_FileInput["default"], { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_FileInput["default"], { | ||
id: "fileInput1" | ||
@@ -37,3 +31,3 @@ }))); | ||
test('renders a file input with custom placeholder', function () { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_FileInput["default"], { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_FileInput["default"], { | ||
id: "fileInput2", | ||
@@ -45,3 +39,3 @@ placeholder: "Choose a photo\u2026" | ||
test('renders a file input with custom label', function () { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_FileInput["default"], { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_FileInput["default"], { | ||
id: "fileInput3", | ||
@@ -53,3 +47,3 @@ label: "ID, passport, etc." | ||
test('renders a file input with custom label and placeholder', function () { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_FileInput["default"], { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_FileInput["default"], { | ||
id: "fileInput4", | ||
@@ -62,3 +56,3 @@ label: "Upload photo", | ||
test('renders as error', function () { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_FileInput["default"], { | ||
var fileInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_FileInput["default"], { | ||
id: "fileInput5", | ||
@@ -65,0 +59,0 @@ error: true |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Types & Settings |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -12,3 +10,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -25,6 +23,2 @@ var _hideVisually = _interopRequireDefault(require("polished/lib/mixins/hideVisually")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -74,3 +68,3 @@ | ||
cursor: 'pointer', | ||
backgroundImage: (0, _moonUtils.inlineSvg)( /*#__PURE__*/React.createElement(_IconUpload["default"], { | ||
backgroundImage: (0, _moonUtils.inlineSvg)( /*#__PURE__*/_react["default"].createElement(_IconUpload["default"], { | ||
color: (0, _settings.inputColors)('label')(theme) | ||
@@ -104,8 +98,8 @@ })), | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FileInputLabel, { | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(FileInputLabel, { | ||
id: labelID(id) | ||
}, label), /*#__PURE__*/React.createElement(FileInputElement, { | ||
}, label), /*#__PURE__*/_react["default"].createElement(FileInputElement, { | ||
withIcon: true, | ||
error: error | ||
}, /*#__PURE__*/React.createElement("span", null, placeholder), /*#__PURE__*/React.createElement(_StyledInput, _extends({ | ||
}, /*#__PURE__*/_react["default"].createElement("span", null, placeholder), /*#__PURE__*/_react["default"].createElement(_StyledInput, _extends({ | ||
id: id, | ||
@@ -112,0 +106,0 @@ type: "file", |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -29,8 +27,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -41,16 +35,16 @@ }, component); | ||
var TestFormItems = function TestFormItems() { | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_FormItem["default"], null, /*#__PURE__*/React.createElement("label", { | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_FormItem["default"], null, /*#__PURE__*/_react["default"].createElement("label", { | ||
htmlFor: "testInput1" | ||
}, "Name", /*#__PURE__*/React.createElement("input", { | ||
}, "Name", /*#__PURE__*/_react["default"].createElement("input", { | ||
id: "testInput1", | ||
type: "text", | ||
placeholder: "e.g. John Appleseed" | ||
}))), /*#__PURE__*/React.createElement(_FormItem["default"], null, /*#__PURE__*/React.createElement("label", { | ||
}))), /*#__PURE__*/_react["default"].createElement(_FormItem["default"], null, /*#__PURE__*/_react["default"].createElement("label", { | ||
htmlFor: "testInput1" | ||
}, "Password", /*#__PURE__*/React.createElement("input", { | ||
}, "Password", /*#__PURE__*/_react["default"].createElement("input", { | ||
id: "testInput1", | ||
type: "password" | ||
})), /*#__PURE__*/React.createElement(_FormError["default"], null, "Please enter a valid password.")), /*#__PURE__*/React.createElement(_FormItem["default"], null, /*#__PURE__*/React.createElement("label", { | ||
})), /*#__PURE__*/_react["default"].createElement(_FormError["default"], null, "Please enter a valid password.")), /*#__PURE__*/_react["default"].createElement(_FormItem["default"], null, /*#__PURE__*/_react["default"].createElement("label", { | ||
htmlFor: "testInput2" | ||
}, /*#__PURE__*/React.createElement("input", { | ||
}, /*#__PURE__*/_react["default"].createElement("input", { | ||
id: "testInput2", | ||
@@ -60,3 +54,3 @@ type: "checkbox", | ||
value: "terms" | ||
}), "I agree to the terms and conditions.")), /*#__PURE__*/React.createElement(_FormItem["default"], null, /*#__PURE__*/React.createElement("button", { | ||
}), "I agree to the terms and conditions.")), /*#__PURE__*/_react["default"].createElement(_FormItem["default"], null, /*#__PURE__*/_react["default"].createElement("button", { | ||
type: "submit", | ||
@@ -69,9 +63,9 @@ value: "submit" | ||
test('renders correctly', function () { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Form["default"], { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Form["default"], { | ||
legend: "Sign up" | ||
}, /*#__PURE__*/React.createElement(TestFormItems, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestFormItems, null)))); | ||
expect(form).toMatchSnapshot(); | ||
}); | ||
test('renders with HTML form attributes', function () { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Form["default"], { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Form["default"], { | ||
legend: "Sign up", | ||
@@ -81,27 +75,27 @@ action: "#", | ||
autocomplete: "on" | ||
}, /*#__PURE__*/React.createElement(TestFormItems, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestFormItems, null)))); | ||
expect(form).toMatchSnapshot(); | ||
}); | ||
test('renders with custom maxWidth', function () { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Form["default"], { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Form["default"], { | ||
legend: "Sign up", | ||
maxWidth: "30rem" | ||
}, /*#__PURE__*/React.createElement(TestFormItems, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestFormItems, null)))); | ||
expect(form).toMatchSnapshot(); | ||
}); | ||
test('renders with custom fullWidth', function () { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Form["default"], { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Form["default"], { | ||
legend: "Sign up", | ||
fullWidth: true | ||
}, /*#__PURE__*/React.createElement(TestFormItems, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestFormItems, null)))); | ||
expect(form).toMatchSnapshot(); | ||
}); | ||
test('renders a form combo', function () { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Form["default"], { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Form["default"], { | ||
legend: "2FA", | ||
maxWidth: "25rem" | ||
}, /*#__PURE__*/React.createElement(_FormItem["default"], null, /*#__PURE__*/React.createElement(_FormCombo["default"], null, /*#__PURE__*/React.createElement(_FormComboInput["default"], null, /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}, /*#__PURE__*/_react["default"].createElement(_FormItem["default"], null, /*#__PURE__*/_react["default"].createElement(_FormCombo["default"], null, /*#__PURE__*/_react["default"].createElement(_FormComboInput["default"], null, /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Enable Two Factor Authentication", | ||
placeholder: "Enter code" | ||
})), /*#__PURE__*/React.createElement(_FormComboButton["default"], null, /*#__PURE__*/React.createElement("button", { | ||
})), /*#__PURE__*/_react["default"].createElement(_FormComboButton["default"], null, /*#__PURE__*/_react["default"].createElement("button", { | ||
type: "submit" | ||
@@ -112,8 +106,8 @@ }, "Submit"))))))); | ||
test('renders a form combo without a label', function () { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Form["default"], { | ||
var form = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Form["default"], { | ||
legend: "2FA", | ||
maxWidth: "25rem" | ||
}, /*#__PURE__*/React.createElement(_FormItem["default"], null, /*#__PURE__*/React.createElement(_FormCombo["default"], null, /*#__PURE__*/React.createElement(_FormComboInput["default"], null, /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}, /*#__PURE__*/_react["default"].createElement(_FormItem["default"], null, /*#__PURE__*/_react["default"].createElement(_FormCombo["default"], null, /*#__PURE__*/_react["default"].createElement(_FormComboInput["default"], null, /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
placeholder: "Enter code" | ||
})), /*#__PURE__*/React.createElement(_FormComboButton["default"], null, /*#__PURE__*/React.createElement("button", { | ||
})), /*#__PURE__*/_react["default"].createElement(_FormComboButton["default"], null, /*#__PURE__*/_react["default"].createElement("button", { | ||
type: "submit" | ||
@@ -120,0 +114,0 @@ }, "Submit"))))))); |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Types |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -12,3 +10,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,6 +17,2 @@ var _hideVisually = _interopRequireDefault(require("polished/lib/mixins/hideVisually")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -67,8 +61,8 @@ | ||
return /*#__PURE__*/React.createElement(_StyledForm, _extends({}, props, { | ||
return /*#__PURE__*/_react["default"].createElement(_StyledForm, _extends({}, props, { | ||
_css: maxWidth, | ||
_css2: fullWidth ? '100%' : 'auto' | ||
}), /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(_StyledLegend, { | ||
}), /*#__PURE__*/_react["default"].createElement(Fieldset, null, /*#__PURE__*/_react["default"].createElement(_StyledLegend, { | ||
_css3: (0, _hideVisually["default"])() | ||
}, legend), /*#__PURE__*/React.createElement(_Stack["default"], { | ||
}, legend), /*#__PURE__*/_react["default"].createElement(_Stack["default"], { | ||
as: "ul" | ||
@@ -75,0 +69,0 @@ }, children))); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,6 +15,2 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
@@ -29,3 +23,3 @@ | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -39,3 +33,3 @@ }, component); | ||
return /*#__PURE__*/React.createElement("a", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("a", _extends({ | ||
id: "test-link" | ||
@@ -47,3 +41,3 @@ }, props), children); | ||
test('renders as an anchor by default', function () { | ||
var headerBack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_HeaderBack["default"], { | ||
var headerBack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_HeaderBack["default"], { | ||
href: "#" | ||
@@ -54,3 +48,3 @@ }, "Sample link"))); | ||
test('renders as a button', function () { | ||
var headerBack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_HeaderBack["default"], { | ||
var headerBack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_HeaderBack["default"], { | ||
element: "button", | ||
@@ -64,3 +58,3 @@ onClick: function onClick() { | ||
test('renders as a component', function () { | ||
var headerBack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_HeaderBack["default"], { | ||
var headerBack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_HeaderBack["default"], { | ||
element: TestLink | ||
@@ -67,0 +61,0 @@ }, "Sample link"))); |
@@ -5,3 +5,3 @@ "use strict"; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -18,4 +18,2 @@ var _reactTestRenderer = require("react-test-renderer"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
@@ -25,4 +23,6 @@ | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -34,9 +34,9 @@ }, component); | ||
test('renders correctly with title', function () { | ||
var header = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Header["default"], null, /*#__PURE__*/React.createElement(_Header.HeaderTitle, null, "Page Title")))); | ||
var header = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Header["default"], null, /*#__PURE__*/_react["default"].createElement(_Header.HeaderTitle, null, "Page Title")))); | ||
expect(header).toMatchSnapshot(); | ||
}); | ||
test('renders correctly with title and back button', function () { | ||
var header = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Header["default"], null, /*#__PURE__*/React.createElement(_HeaderBack["default"], { | ||
var header = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Header["default"], null, /*#__PURE__*/_react["default"].createElement(_HeaderBack["default"], { | ||
href: "../" | ||
}, "Back to Cashier"), /*#__PURE__*/React.createElement(_Header.HeaderTitle, null, "Page Title")))); | ||
}, "Back to Cashier"), /*#__PURE__*/_react["default"].createElement(_Header.HeaderTitle, null, "Page Title")))); | ||
expect(header).toMatchSnapshot(); | ||
@@ -43,0 +43,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Types |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -12,3 +10,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -21,6 +19,2 @@ var _hideVisually = _interopRequireDefault(require("polished/lib/mixins/hideVisually")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -75,5 +69,5 @@ | ||
return /*#__PURE__*/React.createElement(HeaderBackLink, _extends({ | ||
return /*#__PURE__*/_react["default"].createElement(HeaderBackLink, _extends({ | ||
as: element | ||
}, props), /*#__PURE__*/React.createElement(_IconArrowLeft["default"], null), /*#__PURE__*/React.createElement(_StyledSpan, { | ||
}, props), /*#__PURE__*/_react["default"].createElement(_IconArrowLeft["default"], null), /*#__PURE__*/_react["default"].createElement(_StyledSpan, { | ||
_css: (0, _hideVisually["default"])() | ||
@@ -80,0 +74,0 @@ }, children)); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -31,7 +25,7 @@ }, component); | ||
test('renders as <h3> if no "as" prop provided', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], null, "Text"))); | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], null, "Text"))); | ||
expect(heading).toMatchSnapshot(); | ||
}); | ||
test('renders as an element if "as" prop provided', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
as: "h6" | ||
@@ -44,7 +38,7 @@ }, "Heading"))); | ||
test('renders default font size', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], null, "Heading"))); | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], null, "Heading"))); | ||
expect(heading).toMatchSnapshot(); | ||
}); | ||
test('16rem size renders properly', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
size: 16 | ||
@@ -55,3 +49,3 @@ }, "Heading"))); | ||
test('18rem size renders properly', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
size: 18 | ||
@@ -62,3 +56,3 @@ }, "Heading"))); | ||
test('20rem size renders properly', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
size: 20 | ||
@@ -69,3 +63,3 @@ }, "Heading"))); | ||
test('24rem size renders properly', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
size: 24 | ||
@@ -76,3 +70,3 @@ }, "Heading"))); | ||
test('32rem size renders properly', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
size: 32 | ||
@@ -83,3 +77,3 @@ }, "Heading"))); | ||
test('48rem size renders properly', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
size: 48 | ||
@@ -90,3 +84,3 @@ }, "Heading"))); | ||
test('56rem size renders properly', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
size: 56 | ||
@@ -97,3 +91,3 @@ }, "Heading"))); | ||
test('64rem size renders properly', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
size: 64 | ||
@@ -104,3 +98,3 @@ }, "Heading"))); | ||
test('72rem size renders properly', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
size: 72 | ||
@@ -112,7 +106,7 @@ }, "Heading"))); | ||
test('renders default color', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], null, "Heading"))); | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], null, "Heading"))); | ||
expect(heading).toMatchSnapshot(); | ||
}); | ||
test('renders with a color', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
color: "piccolo.100" | ||
@@ -125,7 +119,7 @@ }, "Heading"))); | ||
test('renders default boldness', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], null, "Heading"))); | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], null, "Heading"))); | ||
expect(heading).toMatchSnapshot(); | ||
}); | ||
test('renders with regular font weight', function () { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Heading["default"], { | ||
var heading = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Heading["default"], { | ||
isRegular: true | ||
@@ -132,0 +126,0 @@ }, "Heading"))); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -29,7 +23,7 @@ }, component); | ||
var TestItems = function TestItems() { | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", { | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("button", { | ||
type: "button" | ||
}, "Button 1"), /*#__PURE__*/React.createElement("button", { | ||
}, "Button 1"), /*#__PURE__*/_react["default"].createElement("button", { | ||
type: "button" | ||
}, "Button 2"), /*#__PURE__*/React.createElement("button", { | ||
}, "Button 2"), /*#__PURE__*/_react["default"].createElement("button", { | ||
type: "button" | ||
@@ -41,25 +35,25 @@ }, "Button 3")); | ||
test('renders with `default` spacing', function () { | ||
var inline = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Inline["default"], null, /*#__PURE__*/React.createElement(TestItems, null)))); | ||
var inline = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Inline["default"], null, /*#__PURE__*/_react["default"].createElement(TestItems, null)))); | ||
expect(inline).toMatchSnapshot(); | ||
}); | ||
test('renders with adjusted spacing', function () { | ||
var inline = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Inline["default"], { | ||
var inline = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Inline["default"], { | ||
space: 30 | ||
}, /*#__PURE__*/React.createElement(TestItems, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestItems, null)))); | ||
expect(inline).toMatchSnapshot(); | ||
}); | ||
test('renders with custom font-size', function () { | ||
var inline = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Inline["default"], { | ||
var inline = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Inline["default"], { | ||
fontSize: 16 | ||
}, /*#__PURE__*/React.createElement(TestItems, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestItems, null)))); | ||
expect(inline).toMatchSnapshot(); | ||
}); | ||
test('renders child list items correctly', function () { | ||
var inline = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Inline["default"], { | ||
var inline = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Inline["default"], { | ||
as: "ul" | ||
}, /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("button", { | ||
}, /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement("button", { | ||
type: "button" | ||
}, "Button 1")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("button", { | ||
}, "Button 1")), /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement("button", { | ||
type: "button" | ||
}, "Button 2")), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("button", { | ||
}, "Button 2")), /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement("button", { | ||
type: "button" | ||
@@ -66,0 +60,0 @@ }, "Button 3"))))); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -30,3 +24,3 @@ }, component); | ||
test('renders as a link by default', function () { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Link["default"], { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Link["default"], { | ||
href: "#test" | ||
@@ -41,3 +35,3 @@ }, "I look like a link"))); | ||
/* eslint-disable jsx-a11y/anchor-is-valid */ | ||
React.createElement(_Link["default"], { | ||
_react["default"].createElement(_Link["default"], { | ||
as: "button" | ||
@@ -48,3 +42,3 @@ }, "I look like a link, but really I'm a button"))); | ||
test('renders as a anchor when `href` defined', function () { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Link["default"], { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Link["default"], { | ||
href: "#test" | ||
@@ -55,3 +49,3 @@ }, "I'm a link"))); | ||
test('renders as a secondary', function () { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Link["default"], { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Link["default"], { | ||
href: "#test", | ||
@@ -63,3 +57,3 @@ secondary: true | ||
test('renders as a optional', function () { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Link["default"], { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Link["default"], { | ||
href: "#test", | ||
@@ -72,3 +66,3 @@ optional: true | ||
test('for anchor elements', function () { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Link["default"], { | ||
var link = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Link["default"], { | ||
href: "#test", | ||
@@ -84,3 +78,3 @@ disabled: true | ||
/* eslint-disable jsx-a11y/anchor-is-valid */ | ||
React.createElement(_Link["default"], { | ||
_react["default"].createElement(_Link["default"], { | ||
as: "button", | ||
@@ -87,0 +81,0 @@ disabled: true |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -15,6 +13,2 @@ require("jest-styled-components"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -113,17 +107,17 @@ | ||
test('resets list-style-type correctly', function () { | ||
var list = (0, _reactTestRenderer.create)( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_StyledExample, { | ||
var list = (0, _reactTestRenderer.create)( /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_StyledExample, { | ||
as: "ul" | ||
}, /*#__PURE__*/React.createElement(_StyledExample2, { | ||
}, /*#__PURE__*/_react["default"].createElement(_StyledExample2, { | ||
as: "li" | ||
}, "Item 1"), /*#__PURE__*/React.createElement(_StyledExample3, { | ||
}, "Item 1"), /*#__PURE__*/_react["default"].createElement(_StyledExample3, { | ||
as: "li" | ||
}, "Item 2"), /*#__PURE__*/React.createElement(_StyledExample4, { | ||
}, "Item 2"), /*#__PURE__*/_react["default"].createElement(_StyledExample4, { | ||
as: "li" | ||
}, "Item 3")), /*#__PURE__*/React.createElement(_StyledExample5, { | ||
}, "Item 3")), /*#__PURE__*/_react["default"].createElement(_StyledExample5, { | ||
as: "ol" | ||
}, /*#__PURE__*/React.createElement(_StyledExample6, { | ||
}, /*#__PURE__*/_react["default"].createElement(_StyledExample6, { | ||
as: "li" | ||
}, "Item 1"), /*#__PURE__*/React.createElement(_StyledExample7, { | ||
}, "Item 1"), /*#__PURE__*/_react["default"].createElement(_StyledExample7, { | ||
as: "li" | ||
}, "Item 2"), /*#__PURE__*/React.createElement(_StyledExample8, { | ||
}, "Item 2"), /*#__PURE__*/_react["default"].createElement(_StyledExample8, { | ||
as: "li" | ||
@@ -136,17 +130,17 @@ }, "Item 3")))); | ||
test('renders lists inline', function () { | ||
var list = (0, _reactTestRenderer.create)( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_StyledExample9, { | ||
var list = (0, _reactTestRenderer.create)( /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_StyledExample9, { | ||
as: "ul" | ||
}, /*#__PURE__*/React.createElement(_StyledExample10, { | ||
}, /*#__PURE__*/_react["default"].createElement(_StyledExample10, { | ||
as: "li" | ||
}, "Item 1"), /*#__PURE__*/React.createElement(_StyledExample11, { | ||
}, "Item 1"), /*#__PURE__*/_react["default"].createElement(_StyledExample11, { | ||
as: "li" | ||
}, "Item 2"), /*#__PURE__*/React.createElement(_StyledExample12, { | ||
}, "Item 2"), /*#__PURE__*/_react["default"].createElement(_StyledExample12, { | ||
as: "li" | ||
}, "Item 3")), /*#__PURE__*/React.createElement(_StyledExample13, { | ||
}, "Item 3")), /*#__PURE__*/_react["default"].createElement(_StyledExample13, { | ||
as: "ol" | ||
}, /*#__PURE__*/React.createElement(_StyledExample14, { | ||
}, /*#__PURE__*/_react["default"].createElement(_StyledExample14, { | ||
as: "li" | ||
}, "Item 1"), /*#__PURE__*/React.createElement(_StyledExample15, { | ||
}, "Item 1"), /*#__PURE__*/_react["default"].createElement(_StyledExample15, { | ||
as: "li" | ||
}, "Item 2"), /*#__PURE__*/React.createElement(_StyledExample16, { | ||
}, "Item 2"), /*#__PURE__*/_react["default"].createElement(_StyledExample16, { | ||
as: "li" | ||
@@ -153,0 +147,0 @@ }, "Item 3")))); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -21,6 +19,2 @@ var _reactTestRenderer = require("react-test-renderer"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -119,17 +113,17 @@ | ||
test('resets list-style-type correctly', function () { | ||
var list = (0, _reactTestRenderer.create)( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_StyledExample, { | ||
var list = (0, _reactTestRenderer.create)( /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_StyledExample, { | ||
as: "ul" | ||
}, /*#__PURE__*/React.createElement(_StyledExample2, { | ||
}, /*#__PURE__*/_react["default"].createElement(_StyledExample2, { | ||
as: "li" | ||
}, "Item 1"), /*#__PURE__*/React.createElement(_StyledExample3, { | ||
}, "Item 1"), /*#__PURE__*/_react["default"].createElement(_StyledExample3, { | ||
as: "li" | ||
}, "Item 2"), /*#__PURE__*/React.createElement(_StyledExample4, { | ||
}, "Item 2"), /*#__PURE__*/_react["default"].createElement(_StyledExample4, { | ||
as: "li" | ||
}, "Item 3")), /*#__PURE__*/React.createElement(_StyledExample5, { | ||
}, "Item 3")), /*#__PURE__*/_react["default"].createElement(_StyledExample5, { | ||
as: "ol" | ||
}, /*#__PURE__*/React.createElement(_StyledExample6, { | ||
}, /*#__PURE__*/_react["default"].createElement(_StyledExample6, { | ||
as: "li" | ||
}, "Item 1"), /*#__PURE__*/React.createElement(_StyledExample7, { | ||
}, "Item 1"), /*#__PURE__*/_react["default"].createElement(_StyledExample7, { | ||
as: "li" | ||
}, "Item 2"), /*#__PURE__*/React.createElement(_StyledExample8, { | ||
}, "Item 2"), /*#__PURE__*/_react["default"].createElement(_StyledExample8, { | ||
as: "li" | ||
@@ -142,17 +136,17 @@ }, "Item 3")))); | ||
test('renders lists inline', function () { | ||
var list = (0, _reactTestRenderer.create)( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_StyledExample9, { | ||
var list = (0, _reactTestRenderer.create)( /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_StyledExample9, { | ||
as: "ul" | ||
}, /*#__PURE__*/React.createElement(_StyledExample10, { | ||
}, /*#__PURE__*/_react["default"].createElement(_StyledExample10, { | ||
as: "li" | ||
}, "Item 1"), /*#__PURE__*/React.createElement(_StyledExample11, { | ||
}, "Item 1"), /*#__PURE__*/_react["default"].createElement(_StyledExample11, { | ||
as: "li" | ||
}, "Item 2"), /*#__PURE__*/React.createElement(_StyledExample12, { | ||
}, "Item 2"), /*#__PURE__*/_react["default"].createElement(_StyledExample12, { | ||
as: "li" | ||
}, "Item 3")), /*#__PURE__*/React.createElement(_StyledExample13, { | ||
}, "Item 3")), /*#__PURE__*/_react["default"].createElement(_StyledExample13, { | ||
as: "ol" | ||
}, /*#__PURE__*/React.createElement(_StyledExample14, { | ||
}, /*#__PURE__*/_react["default"].createElement(_StyledExample14, { | ||
as: "li" | ||
}, "Item 1"), /*#__PURE__*/React.createElement(_StyledExample15, { | ||
}, "Item 1"), /*#__PURE__*/_react["default"].createElement(_StyledExample15, { | ||
as: "li" | ||
}, "Item 2"), /*#__PURE__*/React.createElement(_StyledExample16, { | ||
}, "Item 2"), /*#__PURE__*/_react["default"].createElement(_StyledExample16, { | ||
as: "li" | ||
@@ -159,0 +153,0 @@ }, "Item 3")))); |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ /** |
@@ -10,3 +10,3 @@ "use strict"; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -21,2 +21,4 @@ var _styledComponents = _interopRequireWildcard(require("styled-components")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
/** | ||
@@ -84,6 +86,6 @@ * Animation | ||
var color = _ref5.color; | ||
return /*#__PURE__*/React.createElement(LoaderContainer, { | ||
return /*#__PURE__*/_react["default"].createElement(LoaderContainer, { | ||
role: "progressbar" | ||
}, ['-0.45s', '-0.3s', '-0.15s', '0s'].map(function (delay) { | ||
return /*#__PURE__*/React.createElement(LoaderRing, { | ||
return /*#__PURE__*/_react["default"].createElement(LoaderRing, { | ||
key: "loader-".concat(delay), | ||
@@ -90,0 +92,0 @@ color: color, |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -30,51 +24,51 @@ }, component); | ||
test('renders with `default` settings', function () { | ||
var mediaObject = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_MediaObject["default"], null, /*#__PURE__*/React.createElement("img", { | ||
var mediaObject = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_MediaObject["default"], null, /*#__PURE__*/_react["default"].createElement("img", { | ||
alt: "Example", | ||
src: "https://via.placeholder.com/50C" | ||
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Live chat"), /*#__PURE__*/React.createElement("p", null, "We offer 24/7 support"))))); | ||
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "Live chat"), /*#__PURE__*/_react["default"].createElement("p", null, "We offer 24/7 support"))))); | ||
expect(mediaObject).toMatchSnapshot(); | ||
}); | ||
test('renders with custom CSS grid props', function () { | ||
var mediaObject = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_MediaObject["default"], { | ||
var mediaObject = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_MediaObject["default"], { | ||
gridGap: "2rem", | ||
alignItems: "top" | ||
}, /*#__PURE__*/React.createElement("img", { | ||
}, /*#__PURE__*/_react["default"].createElement("img", { | ||
alt: "Example", | ||
src: "https://via.placeholder.com/50C" | ||
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Live chat"), /*#__PURE__*/React.createElement("p", null, "We offer 24/7 support"))), /*#__PURE__*/React.createElement(_MediaObject["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "Live chat"), /*#__PURE__*/_react["default"].createElement("p", null, "We offer 24/7 support"))), /*#__PURE__*/_react["default"].createElement(_MediaObject["default"], { | ||
gridGap: "large", | ||
alignItems: "top" | ||
}, /*#__PURE__*/React.createElement("img", { | ||
}, /*#__PURE__*/_react["default"].createElement("img", { | ||
alt: "Example", | ||
src: "https://via.placeholder.com/50C" | ||
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Live chat"), /*#__PURE__*/React.createElement("p", null, "We offer 24/7 support")))))); | ||
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "Live chat"), /*#__PURE__*/_react["default"].createElement("p", null, "We offer 24/7 support")))))); | ||
expect(mediaObject).toMatchSnapshot(); | ||
}); | ||
test('renders with custom media size', function () { | ||
var mediaObject = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_MediaObject["default"], { | ||
var mediaObject = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_MediaObject["default"], { | ||
mediaWidth: "40px" | ||
}, /*#__PURE__*/React.createElement("img", { | ||
}, /*#__PURE__*/_react["default"].createElement("img", { | ||
alt: "Example", | ||
src: "https://via.placeholder.com/50C" | ||
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Live chat"), /*#__PURE__*/React.createElement("p", null, "We offer 24/7 support"))), /*#__PURE__*/React.createElement(_MediaObject["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "Live chat"), /*#__PURE__*/_react["default"].createElement("p", null, "We offer 24/7 support"))), /*#__PURE__*/_react["default"].createElement(_MediaObject["default"], { | ||
mediaWidth: "xlarge" | ||
}, /*#__PURE__*/React.createElement("img", { | ||
}, /*#__PURE__*/_react["default"].createElement("img", { | ||
alt: "Example", | ||
src: "https://via.placeholder.com/50C" | ||
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Live chat"), /*#__PURE__*/React.createElement("p", null, "We offer 24/7 support")))))); | ||
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "Live chat"), /*#__PURE__*/_react["default"].createElement("p", null, "We offer 24/7 support")))))); | ||
expect(mediaObject).toMatchSnapshot(); | ||
}); | ||
test('renders in reverse', function () { | ||
var mediaObject = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_MediaObject["default"], { | ||
var mediaObject = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_MediaObject["default"], { | ||
reverse: true | ||
}, /*#__PURE__*/React.createElement("img", { | ||
}, /*#__PURE__*/_react["default"].createElement("img", { | ||
alt: "Example", | ||
src: "https://via.placeholder.com/50C" | ||
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Live chat"), /*#__PURE__*/React.createElement("p", null, "We offer 24/7 support"))), /*#__PURE__*/React.createElement(_MediaObject["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "Live chat"), /*#__PURE__*/_react["default"].createElement("p", null, "We offer 24/7 support"))), /*#__PURE__*/_react["default"].createElement(_MediaObject["default"], { | ||
reverse: true, | ||
textAlign: "right" | ||
}, /*#__PURE__*/React.createElement("img", { | ||
}, /*#__PURE__*/_react["default"].createElement("img", { | ||
alt: "Example", | ||
src: "https://via.placeholder.com/50C" | ||
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Live chat"), /*#__PURE__*/React.createElement("p", null, "We offer 24/7 support")))))); | ||
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "Live chat"), /*#__PURE__*/_react["default"].createElement("p", null, "We offer 24/7 support")))))); | ||
expect(mediaObject).toMatchSnapshot(); | ||
@@ -81,0 +75,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -32,3 +26,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M5.08 8V4.8H20V3.2H5.08V0L0 4z", | ||
@@ -35,0 +29,0 @@ fill: "currentColor", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -33,3 +27,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("rect", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("rect", { | ||
x: 2, | ||
@@ -41,3 +35,3 @@ y: 2, | ||
fill: "#1084F2" | ||
}), /*#__PURE__*/React.createElement("path", { | ||
}), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M12.234 8.46c-.392 0-.667-.08-.826-.238a.825.825 0 01-.224-.588V7.34c0-.233.075-.43.224-.588.159-.159.43-.238.812-.238.392 0 .663.08.812.238a.799.799 0 01.238.588v.294c0 .233-.08.43-.238.588-.15.159-.415.238-.798.238zM9 15.768h2.464v-4.76H9V9.776h3.99v5.992h2.31V17H9v-1.232z", | ||
@@ -44,0 +38,0 @@ fill: "#fff" |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -32,3 +26,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M17.377 0L10 7.014 2.624 0 0 2.5 10 12l10-9.502z", | ||
@@ -35,0 +29,0 @@ fill: "currentColor", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -32,3 +26,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M12 17.377L4.986 10 12 2.624 9.5 0 0 10l9.502 10z", | ||
@@ -35,0 +29,0 @@ fill: "currentColor", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -32,3 +26,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M12.609 10L20 17.391 17.391 20 10 12.609 2.609 20 0 17.391 7.391 10 0 2.609 2.609 0 10 7.391 17.391 0 20 2.609z", | ||
@@ -35,0 +29,0 @@ fill: "currentColor", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -33,3 +27,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M12 6l-6 6M6 6l6 6", | ||
@@ -36,0 +30,0 @@ stroke: "currentColor", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -33,3 +27,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("rect", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("rect", { | ||
x: 2, | ||
@@ -41,3 +35,3 @@ y: 2, | ||
fill: "#FF4E64" | ||
}), /*#__PURE__*/React.createElement("rect", { | ||
}), /*#__PURE__*/_react["default"].createElement("rect", { | ||
x: 6, | ||
@@ -44,0 +38,0 @@ y: 10, |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -33,3 +27,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M21.017 15.137a8.357 8.357 0 01-7.644 4.902 8.367 8.367 0 01-8.344-8.402 8.357 8.357 0 014.954-7.61 8.292 8.292 0 00-.759 3.443 8.374 8.374 0 008.345 8.402 8.293 8.293 0 003.448-.735zM3.548 6.005a.5.5 0 10.003-1 .5.5 0 00-.003 1zM14.044 7.041a1 1 0 10.007-2 1 1 0 00-.007 2zM18.53 11.056a.5.5 0 10.004-1 .5.5 0 00-.003 1zM3.003 19.003a1 1 0 10.007-2 1 1 0 00-.007 2z", | ||
@@ -36,0 +30,0 @@ fill: "#8697A2" |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -33,3 +27,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("rect", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("rect", { | ||
width: 20, | ||
@@ -40,3 +34,3 @@ height: 20, | ||
fill: "#0CD664" | ||
}), /*#__PURE__*/React.createElement("path", { | ||
}), /*#__PURE__*/_react["default"].createElement("path", { | ||
fillRule: "evenodd", | ||
@@ -43,0 +37,0 @@ clipRule: "evenodd", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -32,3 +26,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M7.143 14L0 7.27l2-1.885 5.143 4.846L18 0l2 1.885z", | ||
@@ -35,0 +29,0 @@ fill: "currentColor", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -33,6 +27,6 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M2.152 11.717H.717a.717.717 0 110-1.434h1.435a.717.717 0 110 1.434zM21.283 11.717h-1.435a.717.717 0 110-1.434h1.435a.717.717 0 010 1.434zM11 22a.717.717 0 01-.717-.717v-1.435a.717.717 0 111.434 0v1.435A.717.717 0 0111 22zM11 2.87a.717.717 0 01-.717-.718V.717a.717.717 0 111.434 0v1.435A.717.717 0 0111 2.87zM16.142 20.623a.717.717 0 01-.622-.36l-.717-1.242a.717.717 0 111.242-.717l.717 1.242a.717.717 0 01-.62 1.077zM6.577 4.055a.717.717 0 01-.622-.359l-.717-1.242a.717.717 0 111.242-.718l.717 1.243a.717.717 0 01-.62 1.076zM19.904 16.859a.712.712 0 01-.357-.097l-1.243-.717a.717.717 0 11.717-1.242l1.243.717a.717.717 0 01-.36 1.339zM3.337 7.294a.712.712 0 01-.358-.097L1.736 6.48a.717.717 0 11.718-1.243l1.242.718a.717.717 0 01-.36 1.339zM18.663 7.294a.717.717 0 01-.36-1.339l1.243-.717a.717.717 0 11.718 1.242l-1.243.717a.713.713 0 01-.358.097zM2.096 16.859a.717.717 0 01-.36-1.339l1.243-.717a.717.717 0 11.717 1.242l-1.242.717a.713.713 0 01-.358.097zM15.423 4.055a.717.717 0 01-.62-1.076l.717-1.243a.718.718 0 011.242.718l-.717 1.242a.717.717 0 01-.622.36zM5.858 20.623a.717.717 0 01-.62-1.076l.717-1.243a.717.717 0 111.242.717l-.717 1.243a.717.717 0 01-.622.359z", | ||
fill: "#FFB319" | ||
}), /*#__PURE__*/React.createElement("path", { | ||
}), /*#__PURE__*/_react["default"].createElement("path", { | ||
fillRule: "evenodd", | ||
@@ -39,0 +33,0 @@ clipRule: "evenodd", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -32,3 +26,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
d: "M10.902 18H9.098V8.423l-2.78 2.69L5 9.838 10 5l5 4.838-1.318 1.275-2.78-2.69V18zM1.81 1.861V6H0V0h20v6h-1.84V1.861H1.81z", | ||
@@ -35,0 +29,0 @@ fill: "currentColor", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { ColorProps } from '@heathmont/moon-themes'; | ||
@@ -3,0 +3,0 @@ declare type IconProps = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,10 +17,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var Svg = function Svg(props) { | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
width: "1em", | ||
@@ -33,3 +27,3 @@ height: "1em", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
}, props), /*#__PURE__*/React.createElement("path", { | ||
}, props), /*#__PURE__*/_react["default"].createElement("path", { | ||
fillRule: "evenodd", | ||
@@ -36,0 +30,0 @@ clipRule: "evenodd", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
declare type LabelSizing = { | ||
@@ -3,0 +3,0 @@ flex?: boolean; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -25,6 +23,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
@@ -98,9 +92,9 @@ | ||
/* eslint-disable jsx-a11y/label-has-associated-control */ | ||
return inline ? /*#__PURE__*/React.createElement("label", props, text) : /*#__PURE__*/React.createElement(LabelFlex, _extends({ | ||
return inline ? /*#__PURE__*/_react["default"].createElement("label", props, text) : /*#__PURE__*/_react["default"].createElement(LabelFlex, _extends({ | ||
flex: flex, | ||
inputGrow: inputGrow | ||
}, props), /*#__PURE__*/React.createElement(LabelContent, { | ||
}, props), /*#__PURE__*/_react["default"].createElement(LabelContent, { | ||
disabled: disabled, | ||
flex: flex | ||
}, text), React.Children.only(children)); | ||
}, text), _react["default"].Children.only(children)); | ||
/* eslint-enable jsx-a11y/label-has-associated-control */ | ||
@@ -107,0 +101,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
export declare const VIEWBOX_CENTER_X = 50; | ||
@@ -3,0 +3,0 @@ export declare const VIEWBOX_CENTER_Y = 50; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,8 +8,6 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
@@ -53,3 +49,3 @@ | ||
center = _ref2.center; | ||
return /*#__PURE__*/React.createElement("path", { | ||
return /*#__PURE__*/_react["default"].createElement("path", { | ||
style: _objectSpread(_objectSpread({}, style), getDashStyle({ | ||
@@ -56,0 +52,0 @@ pathRadius: pathRadius, |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
export declare type CircularProgressbarProps = { | ||
@@ -3,0 +3,0 @@ value: number; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,6 +17,2 @@ var _moonThemes = require("@heathmont/moon-themes"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
@@ -50,3 +44,3 @@ | ||
var pathRatio = getPathRatio(value); | ||
return /*#__PURE__*/React.createElement("svg", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("svg", _extends({ | ||
style: { | ||
@@ -58,3 +52,3 @@ width: '1em', | ||
viewBox: "0 0 ".concat(VIEWBOX_WIDTH, " ").concat(VIEWBOX_HEIGHT) | ||
}, props), /*#__PURE__*/React.createElement(_Path["default"], { | ||
}, props), /*#__PURE__*/_react["default"].createElement(_Path["default"], { | ||
dashRatio: 1, | ||
@@ -66,3 +60,3 @@ pathRadius: PATH_RADIUS, | ||
} | ||
}), /*#__PURE__*/React.createElement(_Path["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_Path["default"], { | ||
dashRatio: pathRatio, | ||
@@ -69,0 +63,0 @@ pathRadius: PATH_RADIUS, |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
declare type ProgressbarProps = { | ||
@@ -3,0 +3,0 @@ value: number; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,6 +17,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var ProgressBarWrapper = _styledComponents["default"].div.withConfig({ | ||
@@ -82,6 +76,6 @@ displayName: "ProgressLinear__ProgressBarWrapper", | ||
backgroundColor = _ref3.backgroundColor; | ||
return /*#__PURE__*/React.createElement(ProgressBarWrapper, null, /*#__PURE__*/React.createElement(Progress, { | ||
return /*#__PURE__*/_react["default"].createElement(ProgressBarWrapper, null, /*#__PURE__*/_react["default"].createElement(Progress, { | ||
value: value, | ||
backgroundColor: backgroundColor | ||
}), /*#__PURE__*/React.createElement(CurrentProgress, null, text)); | ||
}), /*#__PURE__*/_react["default"].createElement(CurrentProgress, null, text)); | ||
}; | ||
@@ -88,0 +82,0 @@ |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -36,4 +30,4 @@ }, component); | ||
test('renders with defaults', function () { | ||
var reel = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Reel["default"], null, items.map(function (item) { | ||
return /*#__PURE__*/React.createElement("div", { | ||
var reel = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Reel["default"], null, items.map(function (item) { | ||
return /*#__PURE__*/_react["default"].createElement("div", { | ||
key: item | ||
@@ -45,6 +39,6 @@ }, "Item ", item); | ||
test('renders with custom space', function () { | ||
var reel = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Reel["default"], { | ||
var reel = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Reel["default"], { | ||
space: 30 | ||
}, items.map(function (item) { | ||
return /*#__PURE__*/React.createElement("div", { | ||
return /*#__PURE__*/_react["default"].createElement("div", { | ||
key: item | ||
@@ -56,6 +50,6 @@ }, "Item ", item); | ||
test('renders child images correctly with custom height', function () { | ||
var reel = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Reel["default"], { | ||
var reel = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Reel["default"], { | ||
height: "10vh" | ||
}, items.map(function (item) { | ||
return /*#__PURE__*/React.createElement("img", { | ||
return /*#__PURE__*/_react["default"].createElement("img", { | ||
key: item, | ||
@@ -69,6 +63,6 @@ alt: "Test ".concat(item), | ||
test('renders child list items correctly', function () { | ||
var reel = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Reel["default"], { | ||
var reel = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Reel["default"], { | ||
as: "ul" | ||
}, items.map(function (item) { | ||
return /*#__PURE__*/React.createElement("li", { | ||
return /*#__PURE__*/_react["default"].createElement("li", { | ||
key: item | ||
@@ -75,0 +69,0 @@ }, "Item ", item); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -29,9 +23,9 @@ }, component); | ||
var TestOptions = function TestOptions() { | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("option", { | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("option", { | ||
value: "" | ||
}, "Select an option"), /*#__PURE__*/React.createElement("option", { | ||
}, "Select an option"), /*#__PURE__*/_react["default"].createElement("option", { | ||
value: "never-gonna" | ||
}, "Never gonna"), /*#__PURE__*/React.createElement("option", { | ||
}, "Never gonna"), /*#__PURE__*/_react["default"].createElement("option", { | ||
value: "give-you-up" | ||
}, "give you up"), /*#__PURE__*/React.createElement("option", { | ||
}, "give you up"), /*#__PURE__*/_react["default"].createElement("option", { | ||
value: "let-you-down" | ||
@@ -43,3 +37,3 @@ }, "let you down")); | ||
test('renders a select input with options', function () { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Select["default"], null, /*#__PURE__*/React.createElement(TestOptions, null)))); | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Select["default"], null, /*#__PURE__*/_react["default"].createElement(TestOptions, null)))); | ||
expect(select).toMatchSnapshot(); | ||
@@ -49,5 +43,5 @@ }); | ||
test('above the input', function () { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Select["default"], { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Select["default"], { | ||
label: "Example label" | ||
}, /*#__PURE__*/React.createElement(TestOptions, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestOptions, null)))); | ||
expect(select).toMatchSnapshot(); | ||
@@ -57,14 +51,14 @@ }); | ||
test('evenly spaced by default', function () { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Select["default"], { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Select["default"], { | ||
label: "Example label", | ||
flex: true | ||
}, /*#__PURE__*/React.createElement(TestOptions, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestOptions, null)))); | ||
expect(select).toMatchSnapshot(); | ||
}); | ||
test('with adjusted input size', function () { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Select["default"], { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Select["default"], { | ||
label: "Example label", | ||
flex: true, | ||
inputGrow: 2 | ||
}, /*#__PURE__*/React.createElement(TestOptions, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestOptions, null)))); | ||
expect(select).toMatchSnapshot(); | ||
@@ -76,5 +70,5 @@ }); | ||
test('for default select input', function () { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Select["default"], { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Select["default"], { | ||
disabled: true | ||
}, /*#__PURE__*/React.createElement(TestOptions, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestOptions, null)))); | ||
expect(select).toMatchSnapshot(); | ||
@@ -85,5 +79,5 @@ }); | ||
test('for default select input', function () { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Select["default"], { | ||
var select = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Select["default"], { | ||
fullWidth: true | ||
}, /*#__PURE__*/React.createElement(TestOptions, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestOptions, null)))); | ||
expect(select).toMatchSnapshot(); | ||
@@ -90,0 +84,0 @@ }); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -25,6 +23,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _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; } | ||
@@ -49,3 +43,3 @@ | ||
color: (0, _settings.inputColors)('label')(theme), | ||
backgroundImage: (0, _moonUtils.inlineSvg)( /*#__PURE__*/React.createElement(_IconChevronDown["default"], { | ||
backgroundImage: (0, _moonUtils.inlineSvg)( /*#__PURE__*/_react["default"].createElement(_IconChevronDown["default"], { | ||
color: (0, _settings.inputColors)('icon')(theme) | ||
@@ -52,0 +46,0 @@ })), |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
import { LabelSizing } from '../private/label/label'; | ||
@@ -3,0 +3,0 @@ import { SelectElementProps } from './private/element'; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -17,6 +15,4 @@ var _label = require("../private/label/label"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
@@ -40,3 +36,3 @@ | ||
var SelectInput = /*#__PURE__*/React.createElement(_element.SelectElement, _extends({ | ||
var SelectInput = /*#__PURE__*/_react["default"].createElement(_element.SelectElement, _extends({ | ||
withIcon: true, | ||
@@ -46,3 +42,4 @@ fullWidth: fullWidth, | ||
}, props), children); | ||
return label ? /*#__PURE__*/React.createElement(_label.Label, { | ||
return label ? /*#__PURE__*/_react["default"].createElement(_label.Label, { | ||
disabled: disabled, | ||
@@ -49,0 +46,0 @@ text: label, |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
declare type SnackbarProps = { | ||
@@ -3,0 +3,0 @@ message: any; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -27,6 +25,2 @@ var _moonUtils = require("@heathmont/moon-utils"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _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; } | ||
@@ -106,16 +100,16 @@ | ||
status = _ref4.status; | ||
return /*#__PURE__*/React.createElement(SnackbarWrapper, { | ||
return /*#__PURE__*/_react["default"].createElement(SnackbarWrapper, { | ||
position: position | ||
}, status === 'error' && /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(_IconError["default"], { | ||
}, status === 'error' && /*#__PURE__*/_react["default"].createElement(IconWrapper, null, /*#__PURE__*/_react["default"].createElement(_IconError["default"], { | ||
fontSize: "1.5rem" | ||
})), status === 'warning' && /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(_IconWarning["default"], { | ||
})), status === 'warning' && /*#__PURE__*/_react["default"].createElement(IconWrapper, null, /*#__PURE__*/_react["default"].createElement(_IconWarning["default"], { | ||
fontSize: "1.5rem", | ||
color: "krillin.100" | ||
})), status === 'info' && /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(_IconBannerInfo["default"], { | ||
})), status === 'info' && /*#__PURE__*/_react["default"].createElement(IconWrapper, null, /*#__PURE__*/_react["default"].createElement(_IconBannerInfo["default"], { | ||
fontSize: "1.5rem", | ||
color: "krillin.100" | ||
})), status === 'success' && /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(_IconSnackbarSuccess["default"], { | ||
})), status === 'success' && /*#__PURE__*/_react["default"].createElement(IconWrapper, null, /*#__PURE__*/_react["default"].createElement(_IconSnackbarSuccess["default"], { | ||
fontSize: "1.5rem", | ||
color: "krillin.100" | ||
})), message && /*#__PURE__*/React.createElement(MessageWrapper, null, message), action && action); | ||
})), message && /*#__PURE__*/_react["default"].createElement(MessageWrapper, null, message), action && action); | ||
}; | ||
@@ -122,0 +116,0 @@ |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -29,3 +23,3 @@ }, component); | ||
var TestItems = function TestItems() { | ||
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h1", null, "Lorem Ipsum Dolor Sit Amet."), /*#__PURE__*/React.createElement("p", null, "Consectetur adipiscing elit. Nullam gravida ex tempor, ornare sapien a, sodales velit. Curabitur ac ultrices massa, eu scelerisque mauris."), /*#__PURE__*/React.createElement("p", null, "Donec maximus purus at tempor elementum. Donec commodo aliquam metus, et vestibulum felis venenatis pellentesque."), /*#__PURE__*/React.createElement("p", null, "Phasellus felis sem, convallis eget pretium vel, faucibus sit amet nulla. Fusce auctor nibh non libero sagittis, semper sagittis ipsum euismod."), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "Donec maximus purus at tempor elementum. Donec commodo aliquam metus, et vestibulum felis venenatis pellentesque."), /*#__PURE__*/React.createElement("p", null, "Phasellus felis sem, convallis eget pretium vel, faucibus sit amet nulla. Fusce auctor nibh non libero sagittis, semper sagittis ipsum euismod."))); | ||
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("h1", null, "Lorem Ipsum Dolor Sit Amet."), /*#__PURE__*/_react["default"].createElement("p", null, "Consectetur adipiscing elit. Nullam gravida ex tempor, ornare sapien a, sodales velit. Curabitur ac ultrices massa, eu scelerisque mauris."), /*#__PURE__*/_react["default"].createElement("p", null, "Donec maximus purus at tempor elementum. Donec commodo aliquam metus, et vestibulum felis venenatis pellentesque."), /*#__PURE__*/_react["default"].createElement("p", null, "Phasellus felis sem, convallis eget pretium vel, faucibus sit amet nulla. Fusce auctor nibh non libero sagittis, semper sagittis ipsum euismod."), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "Donec maximus purus at tempor elementum. Donec commodo aliquam metus, et vestibulum felis venenatis pellentesque."), /*#__PURE__*/_react["default"].createElement("p", null, "Phasellus felis sem, convallis eget pretium vel, faucibus sit amet nulla. Fusce auctor nibh non libero sagittis, semper sagittis ipsum euismod."))); | ||
}; | ||
@@ -35,15 +29,15 @@ | ||
test('renders with `default` spacing', function () { | ||
var stack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Stack["default"], null, /*#__PURE__*/React.createElement(TestItems, null)))); | ||
var stack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Stack["default"], null, /*#__PURE__*/_react["default"].createElement(TestItems, null)))); | ||
expect(stack).toMatchSnapshot(); | ||
}); | ||
test('renders with adjusted spacing', function () { | ||
var stack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Stack["default"], { | ||
var stack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Stack["default"], { | ||
space: 30 | ||
}, /*#__PURE__*/React.createElement(TestItems, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestItems, null)))); | ||
expect(stack).toMatchSnapshot(); | ||
}); | ||
test('renders with theme key', function () { | ||
var stack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Stack["default"], { | ||
var stack = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Stack["default"], { | ||
space: "large" | ||
}, /*#__PURE__*/React.createElement(TestItems, null)))); | ||
}, /*#__PURE__*/_react["default"].createElement(TestItems, null)))); | ||
expect(stack).toMatchSnapshot(); | ||
@@ -50,0 +44,0 @@ }); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -15,8 +13,6 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -28,3 +24,3 @@ }, component); | ||
test('renders by default', function () { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Switch.Switch, { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Switch.Switch, { | ||
id: "test-switch-1" | ||
@@ -35,3 +31,3 @@ }))); | ||
test('renders as checked', function () { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Switch.Switch, { | ||
var checkbox = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Switch.Switch, { | ||
id: "test-switch-2", | ||
@@ -38,0 +34,0 @@ checked: true |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
declare type SliderColorScheme = { | ||
@@ -3,0 +3,0 @@ colorScheme?: boolean; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -12,3 +10,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -25,6 +23,2 @@ var _moonUtils = require("@heathmont/moon-utils"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -84,3 +78,3 @@ | ||
backgroundColor: colorScheme ? color.gohan[100] : color.goku[80], | ||
backgroundImage: colorScheme ? "".concat((0, _moonUtils.inlineSvg)( /*#__PURE__*/React.createElement(_IconMoon["default"], null)), ", ").concat((0, _moonUtils.inlineSvg)( /*#__PURE__*/React.createElement(_IconSun["default"], null))) : undefined, | ||
backgroundImage: colorScheme ? "".concat((0, _moonUtils.inlineSvg)( /*#__PURE__*/_react["default"].createElement(_IconMoon["default"], null)), ", ").concat((0, _moonUtils.inlineSvg)( /*#__PURE__*/_react["default"].createElement(_IconSun["default"], null))) : undefined, | ||
backgroundPosition: "left ".concat((0, _moonUtils.rem)(space.small), " center, right ").concat((0, _moonUtils.rem)(space.small), " center"), | ||
@@ -171,8 +165,8 @@ backgroundRepeat: 'no-repeat', | ||
if (!captionUnchecked && !captionChecked) { | ||
return /*#__PURE__*/React.createElement(Label, labelProps, /*#__PURE__*/React.createElement(Input, inputProps), /*#__PURE__*/React.createElement(Slider, sliderProps)); | ||
return /*#__PURE__*/_react["default"].createElement(Label, labelProps, /*#__PURE__*/_react["default"].createElement(Input, inputProps), /*#__PURE__*/_react["default"].createElement(Slider, sliderProps)); | ||
} | ||
return /*#__PURE__*/React.createElement(_StyledInline, { | ||
return /*#__PURE__*/_react["default"].createElement(_StyledInline, { | ||
space: "small" | ||
}, captionUnchecked && /*#__PURE__*/React.createElement(Caption, null, captionUnchecked), /*#__PURE__*/React.createElement(Label, labelProps, /*#__PURE__*/React.createElement(Input, inputProps), /*#__PURE__*/React.createElement(Slider, sliderProps)), captionChecked && /*#__PURE__*/React.createElement(Caption, null, captionChecked)); | ||
}, captionUnchecked && /*#__PURE__*/_react["default"].createElement(Caption, null, captionUnchecked), /*#__PURE__*/_react["default"].createElement(Label, labelProps, /*#__PURE__*/_react["default"].createElement(Input, inputProps), /*#__PURE__*/_react["default"].createElement(Slider, sliderProps)), captionChecked && /*#__PURE__*/_react["default"].createElement(Caption, null, captionChecked)); | ||
}; | ||
@@ -179,0 +173,0 @@ |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,6 +15,2 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
@@ -29,3 +23,3 @@ | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -39,3 +33,3 @@ }, component); | ||
return /*#__PURE__*/React.createElement("a", _extends({ | ||
return /*#__PURE__*/_react["default"].createElement("a", _extends({ | ||
id: "test-link" | ||
@@ -47,3 +41,3 @@ }, props), children); | ||
test('renders as an anchor by default', function () { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_TabLink["default"], { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_TabLink["default"], { | ||
href: "#" | ||
@@ -54,3 +48,3 @@ }, "Sample link"))); | ||
test('renders as active', function () { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_TabLink["default"], { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_TabLink["default"], { | ||
className: "active" | ||
@@ -61,3 +55,3 @@ }, "Sample link"))); | ||
test('renders as a component', function () { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_TabLink["default"], { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_TabLink["default"], { | ||
as: TestLink | ||
@@ -68,3 +62,3 @@ }, "Sample link"))); | ||
test('renders as active', function () { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_TabLink["default"], { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_TabLink["default"], { | ||
href: "#" | ||
@@ -71,0 +65,0 @@ }, "Sample link"))); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -30,3 +24,3 @@ }, component); | ||
test('renders correctly', function () { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Tabs["default"], { | ||
var tabLink = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Tabs["default"], { | ||
id: "test-tabs", | ||
@@ -33,0 +27,0 @@ items: [0, 1, 2, 3, 4] |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
declare type TabsProps = { | ||
@@ -3,0 +3,0 @@ id?: string; |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -27,6 +25,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
@@ -100,11 +94,11 @@ | ||
return /*#__PURE__*/React.createElement(TabNav, null, /*#__PURE__*/React.createElement(SkipLink, { | ||
return /*#__PURE__*/_react["default"].createElement(TabNav, null, /*#__PURE__*/_react["default"].createElement(SkipLink, { | ||
href: "#".concat(autoId) | ||
}, "Skip to content"), /*#__PURE__*/React.createElement(TabList, { | ||
}, "Skip to content"), /*#__PURE__*/_react["default"].createElement(TabList, { | ||
space: (0, _moonUtils.rem)(space.medium) | ||
}, Array.isArray(nonEmptyTabs) && nonEmptyTabs.map(function (tab, index) { | ||
return /*#__PURE__*/React.createElement(Tab, { | ||
return /*#__PURE__*/_react["default"].createElement(Tab, { | ||
key: index | ||
}, tab); | ||
})), /*#__PURE__*/React.createElement("span", { | ||
})), /*#__PURE__*/_react["default"].createElement("span", { | ||
id: autoId | ||
@@ -111,0 +105,0 @@ })); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -31,7 +25,7 @@ }, component); | ||
test('renders as <p> if no "as" prop provided', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], null, "Text"))); | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], null, "Text"))); | ||
expect(text).toMatchSnapshot(); | ||
}); | ||
test('renders as an element if "as" prop provided', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
as: "span" | ||
@@ -44,7 +38,7 @@ }, "Text"))); | ||
test('renders default font size', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], null, "Text"))); | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], null, "Text"))); | ||
expect(text).toMatchSnapshot(); | ||
}); | ||
test('10rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 10 | ||
@@ -55,3 +49,3 @@ }, "Text"))); | ||
test('12rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 12 | ||
@@ -62,3 +56,3 @@ }, "Text"))); | ||
test('14rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 14 | ||
@@ -69,3 +63,3 @@ }, "Text"))); | ||
test('16rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 16 | ||
@@ -76,3 +70,3 @@ }, "Text"))); | ||
test('18rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 18 | ||
@@ -83,3 +77,3 @@ }, "Text"))); | ||
test('20rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 20 | ||
@@ -90,3 +84,3 @@ }, "Text"))); | ||
test('24rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 24 | ||
@@ -97,3 +91,3 @@ }, "Text"))); | ||
test('32rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 32 | ||
@@ -104,3 +98,3 @@ }, "Text"))); | ||
test('48rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 48 | ||
@@ -111,3 +105,3 @@ }, "Text"))); | ||
test('56rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 56 | ||
@@ -118,3 +112,3 @@ }, "Text"))); | ||
test('64rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 64 | ||
@@ -125,3 +119,3 @@ }, "Text"))); | ||
test('72rem size renders properly', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
size: 72 | ||
@@ -133,7 +127,7 @@ }, "Text"))); | ||
test('renders default color', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], null, "Text"))); | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], null, "Text"))); | ||
expect(text).toMatchSnapshot(); | ||
}); | ||
test('renders with a color', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
color: "piccolo.100" | ||
@@ -146,7 +140,7 @@ }, "Text"))); | ||
test('renders default boldness', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], null, "Text"))); | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], null, "Text"))); | ||
expect(text).toMatchSnapshot(); | ||
}); | ||
test('renders with semibold font weight', function () { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Text["default"], { | ||
var text = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Text["default"], { | ||
isBold: true | ||
@@ -153,0 +147,0 @@ }, "Text"))); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -30,3 +24,3 @@ }, component); | ||
test('renders correctly with `text` type by default', function () { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Example Input" | ||
@@ -37,3 +31,3 @@ }))); | ||
test('renders correctly without a label', function () { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
placeholder: "Enter code" | ||
@@ -44,31 +38,31 @@ }))); | ||
test('renders correctly for other types', function () { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement("fieldset", null, /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement("fieldset", null, /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Text", | ||
type: "text", | ||
required: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Date", | ||
type: "date", | ||
required: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Email", | ||
type: "email", | ||
required: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Number", | ||
type: "number", | ||
required: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Password", | ||
type: "password", | ||
required: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Search", | ||
type: "search", | ||
required: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Telephone", | ||
type: "tel", | ||
required: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "URL", | ||
@@ -81,31 +75,31 @@ type: "url", | ||
test('renders as `disabled` when defined', function () { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement("fieldset", null, /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement("fieldset", null, /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Text", | ||
type: "text", | ||
disabled: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Date", | ||
type: "date", | ||
disabled: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Email", | ||
type: "email", | ||
disabled: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Number", | ||
type: "number", | ||
disabled: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Password", | ||
type: "password", | ||
disabled: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Search", | ||
type: "search", | ||
disabled: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Telephone", | ||
type: "tel", | ||
disabled: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "URL", | ||
@@ -118,31 +112,31 @@ type: "url", | ||
test('renders as an `error` when defined', function () { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement("fieldset", null, /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement("fieldset", null, /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Text", | ||
type: "text", | ||
error: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Date", | ||
type: "date", | ||
error: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Email", | ||
type: "email", | ||
error: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Number", | ||
type: "number", | ||
error: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Password", | ||
type: "password", | ||
error: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Search", | ||
type: "search", | ||
error: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "Telephone", | ||
type: "tel", | ||
error: true | ||
}), /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
}), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
label: "URL", | ||
@@ -155,3 +149,3 @@ type: "url", | ||
test('renders with rounded prop', function () { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_TextInput["default"], { | ||
var textInput = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_TextInput["default"], { | ||
rounded: true, | ||
@@ -158,0 +152,0 @@ label: "Text", |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Types & Settings |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -23,6 +21,2 @@ var _styledComponents = _interopRequireDefault(require("styled-components")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
@@ -78,3 +72,3 @@ | ||
var TextInputInner = function TextInputInner() { | ||
return /*#__PURE__*/React.createElement(TextInputElem, _extends({ | ||
return /*#__PURE__*/_react["default"].createElement(TextInputElem, _extends({ | ||
rounded: !!rounded, | ||
@@ -89,6 +83,6 @@ error: !!error | ||
return /*#__PURE__*/React.createElement(_label.Label, { | ||
return /*#__PURE__*/_react["default"].createElement(_label.Label, { | ||
text: label, | ||
disabled: disabled | ||
}, /*#__PURE__*/React.createElement(React.Fragment, null, TextInputInner(), error && /*#__PURE__*/React.createElement(_Error.InputError, null, error))); | ||
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, TextInputInner(), error && /*#__PURE__*/_react["default"].createElement(_Error.InputError, null, error))); | ||
}; | ||
@@ -95,0 +89,0 @@ |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,8 +15,4 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -30,7 +24,7 @@ }, component); | ||
test('renders correctly', function () { | ||
var toggle = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Toggle["default"], null))); | ||
var toggle = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Toggle["default"], null))); | ||
expect(toggle).toMatchSnapshot(); | ||
}); | ||
test('positioned static when "topRight=false"', function () { | ||
var toggle = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Toggle["default"], { | ||
var toggle = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Toggle["default"], { | ||
topRight: false | ||
@@ -37,0 +31,0 @@ }))); |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var _react = _interopRequireDefault(require("react")); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactTestRenderer = require("react-test-renderer"); | ||
@@ -17,10 +15,6 @@ | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _extends() { _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; }; return _extends.apply(this, arguments); } | ||
var renderWithTheme = function renderWithTheme(component) { | ||
return /*#__PURE__*/React.createElement(_moonThemes.ThemeProvider, { | ||
return /*#__PURE__*/_react["default"].createElement(_moonThemes.ThemeProvider, { | ||
theme: _moonThemes.sportsbetDark | ||
@@ -31,3 +25,3 @@ }, component); | ||
var Caption = function Caption() { | ||
return /*#__PURE__*/React.createElement("p", null, "Hi, I'm a Tooltip"); | ||
return /*#__PURE__*/_react["default"].createElement("p", null, "Hi, I'm a Tooltip"); | ||
}; | ||
@@ -40,9 +34,9 @@ | ||
test('renders hidden and left-aligned by default', function () { | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Tooltip["default"], testProps, /*#__PURE__*/React.createElement(Caption, null)))); | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], testProps, /*#__PURE__*/_react["default"].createElement(Caption, null)))); | ||
expect(tooltip).toMatchSnapshot(); | ||
}); | ||
test('renders as active when defined', function () { | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Tooltip["default"], _extends({ | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], _extends({ | ||
active: true | ||
}, testProps), /*#__PURE__*/React.createElement(Caption, null)))); | ||
}, testProps), /*#__PURE__*/_react["default"].createElement(Caption, null)))); | ||
expect(tooltip).toMatchSnapshot(); | ||
@@ -52,6 +46,6 @@ }); | ||
test('right-aligned', function () { | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Tooltip["default"], _extends({ | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], _extends({ | ||
active: true, | ||
align: "right" | ||
}, testProps), /*#__PURE__*/React.createElement(Caption, null)))); | ||
}, testProps), /*#__PURE__*/_react["default"].createElement(Caption, null)))); | ||
expect(tooltip).toMatchSnapshot(); | ||
@@ -62,7 +56,7 @@ }); | ||
test('closeable', function () { | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Tooltip["default"], _extends({ | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], _extends({ | ||
onClose: function onClose() { | ||
console.log('Closed'); | ||
} | ||
}, testProps), /*#__PURE__*/React.createElement(Caption, null)))); | ||
}, testProps), /*#__PURE__*/_react["default"].createElement(Caption, null)))); | ||
expect(tooltip).toMatchSnapshot(); | ||
@@ -72,6 +66,6 @@ }); | ||
test('renders as an error', function () { | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/React.createElement(_Tooltip["default"], _extends({ | ||
var tooltip = (0, _reactTestRenderer.create)(renderWithTheme( /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], _extends({ | ||
active: true, | ||
error: true | ||
}, testProps), /*#__PURE__*/React.createElement(Caption, null)))); | ||
}, testProps), /*#__PURE__*/_react["default"].createElement(Caption, null)))); | ||
expect(tooltip).toMatchSnapshot(); | ||
@@ -78,0 +72,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Types |
@@ -12,3 +12,3 @@ "use strict"; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -118,13 +118,13 @@ var _moonUtils = require("@heathmont/moon-utils"); | ||
return /*#__PURE__*/React.createElement(_StyledDiv, { | ||
return /*#__PURE__*/_react["default"].createElement(_StyledDiv, { | ||
"aria-hidden": !active, | ||
role: "tooltip", | ||
id: id | ||
}, /*#__PURE__*/React.createElement(TooltipBubble, _extends({ | ||
}, /*#__PURE__*/_react["default"].createElement(TooltipBubble, _extends({ | ||
active: active | ||
}, props), /*#__PURE__*/React.createElement(TooltipCaption, { | ||
}, props), /*#__PURE__*/_react["default"].createElement(TooltipCaption, { | ||
onClose: onClose | ||
}, children, typeof onClose === 'function' && /*#__PURE__*/React.createElement(_StyledToggle, { | ||
}, children, typeof onClose === 'function' && /*#__PURE__*/_react["default"].createElement(_StyledToggle, { | ||
topRight: false | ||
}, /*#__PURE__*/React.createElement(_IconClose["default"], { | ||
}, /*#__PURE__*/_react["default"].createElement(_IconClose["default"], { | ||
onClick: onClose, | ||
@@ -131,0 +131,0 @@ fontSize: "inherit" |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -17,6 +15,2 @@ var _Snackbar = _interopRequireDefault(require("../snackbar/Snackbar")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
@@ -42,3 +36,3 @@ | ||
var _React$useState = React.useState(false), | ||
var _React$useState = _react["default"].useState(false), | ||
_React$useState2 = _slicedToArray(_React$useState, 2), | ||
@@ -57,3 +51,4 @@ visible = _React$useState2[0], | ||
var SnackbarWithTimeout = visible && /*#__PURE__*/React.createElement(_Snackbar["default"], rest); | ||
var SnackbarWithTimeout = visible && /*#__PURE__*/_react["default"].createElement(_Snackbar["default"], rest); | ||
return [SnackbarWithTimeout, displaySnackbar]; | ||
@@ -60,0 +55,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import * as React from 'react'; | ||
import React from 'react'; | ||
export declare const THRESHOLD = 0.75; | ||
@@ -3,0 +3,0 @@ declare type Options = { |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -10,3 +8,3 @@ value: true | ||
var React = _interopRequireWildcard(require("react")); | ||
var _react = _interopRequireDefault(require("react")); | ||
@@ -19,6 +17,2 @@ var _scrollIntoViewIfNeeded = _interopRequireDefault(require("scroll-into-view-if-needed")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
@@ -94,3 +88,3 @@ | ||
var withHorizontalScroll = function withHorizontalScroll(options) { | ||
var _React$useState = React.useState(false), | ||
var _React$useState = _react["default"].useState(false), | ||
_React$useState2 = _slicedToArray(_React$useState, 2), | ||
@@ -100,3 +94,3 @@ leftIndicator = _React$useState2[0], | ||
var _React$useState3 = React.useState(false), | ||
var _React$useState3 = _react["default"].useState(false), | ||
_React$useState4 = _slicedToArray(_React$useState3, 2), | ||
@@ -106,7 +100,9 @@ rightIndicator = _React$useState4[0], | ||
var containerRef = React.useRef(null); | ||
var containerRef = _react["default"].useRef(null); | ||
var scrollStep = options.scrollStep; | ||
var itemRefs = []; | ||
var scrollIntoViewSmoothly = _scrollIntoViewIfNeeded["default"]; | ||
React.useEffect(function () { | ||
_react["default"].useEffect(function () { | ||
var observer = new IntersectionObserver(function (entries) { | ||
@@ -125,3 +121,4 @@ entries.forEach(function (entry) { | ||
}, []); | ||
React.useEffect(function () { | ||
_react["default"].useEffect(function () { | ||
if (document) { | ||
@@ -128,0 +125,0 @@ scrollIntoViewSmoothly = 'scrollBehavior' in document.documentElement.style ? _scrollIntoViewIfNeeded["default"] : _smoothScrollIntoViewIfNeeded["default"]; |
{ | ||
"name": "@heathmont/moon-components", | ||
"sideEffects": false, | ||
"version": "2.32.0", | ||
"version": "2.33.0", | ||
"files": [ | ||
@@ -18,5 +18,5 @@ "lib" | ||
"dependencies": { | ||
"@heathmont/moon-assets": "^2.32.0", | ||
"@heathmont/moon-themes": "^2.31.0", | ||
"@heathmont/moon-utils": "^2.31.0", | ||
"@heathmont/moon-assets": "^2.33.0", | ||
"@heathmont/moon-themes": "^2.33.0", | ||
"@heathmont/moon-utils": "^2.33.0", | ||
"@reach/dialog": "0.3.0", | ||
@@ -35,3 +35,3 @@ "polished": "3.4.1", | ||
}, | ||
"gitHead": "78f3822f54055df83475ff53d20b960ae1cdaab0" | ||
"gitHead": "b92240b1685cb1046379cb9b2d72f19ade7ff6dd" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1599818
16247