diff --git a/.eslintignore b/.eslintignore index 13eafe92..2027c525 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ node_modules packages/*/build flow-typed +es diff --git a/.eslintrc.yml b/.eslintrc.yml index 926303f7..e98cafc0 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -12,7 +12,8 @@ globals: plugins: [ react-hooks, - emotion + emotion, + "@emotion/", ] rules: @@ -50,16 +51,17 @@ rules: eol-last: ['warn', 'always'] #badcode - no-unused-vars: ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }] + no-unused-vars: ['warn', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }] no-multi-assign: 'error' no-extra-semi: 'error' semi-style: 'error' no-unneeded-ternary: 'error' callback-return: 'error' - import/no-duplicates: 'error' + import/no-duplicates: 'warn' + import/first: 'warn' no-useless-computed-key: 'error' - no-var: 'error' - init-declarations: ['error', 'always'] + no-var: 'warn' + init-declarations: ['warn', 'always'] no-delete-var: 'error' no-restricted-globals: ['error'] no-use-before-define: 'error' @@ -69,10 +71,9 @@ rules: max-len: ['warn', { 'code': 150, 'ignoreComments': true, 'ignoreStrings': true, 'ignoreTemplateLiterals': true }] #es6 - no-const-assign: 'error' + no-const-assign: 'warn' object-shorthand: 'error' prefer-arrow-callback: 'error' - prefer-const: 'error' prefer-destructuring: ['error', { 'object': true }] prefer-numeric-literals: 'error' prefer-rest-params: 'warn' @@ -107,7 +108,6 @@ rules: react/jsx-no-duplicate-props: 'error' react/jsx-no-undef: ['warn', { allowGlobals: true }] react/jsx-pascal-case: 'warn' - react/jsx-tag-spacing: ['warn', 'always' ] react/jsx-uses-react: 'warn' react/jsx-uses-vars: 'warn' react/jsx-wrap-multilines: 'warn' @@ -121,3 +121,6 @@ rules: emotion/no-vanilla: "error" emotion/import-from-emotion: "error" emotion/styled-import: "error" + + #emotion plugin + "@emotion/pkg-renaming": "error" diff --git a/__mocks__/style-mock.js b/__mocks__/style-mock.js index a0995453..f053ebf7 100644 --- a/__mocks__/style-mock.js +++ b/__mocks__/style-mock.js @@ -1 +1 @@ -module.exports = {}; \ No newline at end of file +module.exports = {}; diff --git a/e2e/setup/setup.js b/e2e/setup/setup.js index 8b137891..e69de29b 100644 --- a/e2e/setup/setup.js +++ b/e2e/setup/setup.js @@ -1 +0,0 @@ - diff --git a/e2e/setup/setupTestFramework.js b/e2e/setup/setupTestFramework.js index d31b654d..f34f8403 100644 --- a/e2e/setup/setupTestFramework.js +++ b/e2e/setup/setupTestFramework.js @@ -10,4 +10,4 @@ if (E2E_DEBUG === 'true') { toMatchImageSnapshot = () => ({ pass: true }); } -expect.extend({ toMatchImageSnapshot }); \ No newline at end of file +expect.extend({ toMatchImageSnapshot }); diff --git a/e2e/setup/testEnvironment.js b/e2e/setup/testEnvironment.js index 9f50b3e4..cc66d027 100644 --- a/e2e/setup/testEnvironment.js +++ b/e2e/setup/testEnvironment.js @@ -34,7 +34,7 @@ class PuppeteerEnvironment extends NodeEnvironment { height: 960, }, }); - + this.global.__BROWSER_CONTEXT__ = await this.global.__BROWSER__.createIncognitoBrowserContext(); } diff --git a/es/BoostProvider.js b/es/BoostProvider.js index e5358477..68f807be 100644 --- a/es/BoostProvider.js +++ b/es/BoostProvider.js @@ -5,32 +5,25 @@ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; -import { ThemeProvider } from 'emotion-theming'; +import { ThemeProvider } from '@emotion/react'; import { IconsProvider } from './components/Icon/IconsProvider'; import { ModalProvider } from './components/Modal/ModalProvider'; import { createTheme, Globals } from './theme'; - -var BoostProvider = -/*#__PURE__*/ -function (_React$Component) { +var BoostProvider = /*#__PURE__*/function (_React$Component) { _inherits(BoostProvider, _React$Component); - function BoostProvider(props) { var _this; - _classCallCheck(this, BoostProvider); - _this = _possibleConstructorReturn(this, _getPrototypeOf(BoostProvider).call(this, props)); _this.theme = props.theme || createTheme(); return _this; } - _createClass(BoostProvider, [{ key: "render", value: function render() { var _this$props = this.props, - children = _this$props.children, - icons = _this$props.icons; + children = _this$props.children, + icons = _this$props.icons; return ___EmotionJSX(ThemeProvider, { theme: this.theme }, ___EmotionJSX(Globals, { @@ -40,8 +33,6 @@ function (_React$Component) { }, children))); } }]); - return BoostProvider; }(React.Component); - export { BoostProvider }; \ No newline at end of file diff --git a/es/BoostProvider.js.flow b/es/BoostProvider.js.flow index 0581a1fc..20c82749 100644 --- a/es/BoostProvider.js.flow +++ b/es/BoostProvider.js.flow @@ -1,7 +1,7 @@ // @flow import React from 'react'; -import { ThemeProvider } from 'emotion-theming'; +import { ThemeProvider } from '@emotion/react'; import { IconsProvider } from './components/Icon/IconsProvider'; import { ModalProvider } from './components/Modal/ModalProvider'; import { createTheme, type Theme, Globals } from './theme'; diff --git a/es/EightBaseBoostProvider.__deprecated.js b/es/EightBaseBoostProvider.__deprecated.js index a930b03a..f5ebde79 100644 --- a/es/EightBaseBoostProvider.__deprecated.js +++ b/es/EightBaseBoostProvider.__deprecated.js @@ -6,17 +6,12 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { BoostProvider } from './BoostProvider'; -export var EightBaseBoostProvider = -/*#__PURE__*/ -function (_React$Component) { +export var EightBaseBoostProvider = /*#__PURE__*/function (_React$Component) { _inherits(EightBaseBoostProvider, _React$Component); - function EightBaseBoostProvider() { _classCallCheck(this, EightBaseBoostProvider); - return _possibleConstructorReturn(this, _getPrototypeOf(EightBaseBoostProvider).apply(this, arguments)); } - _createClass(EightBaseBoostProvider, [{ key: "componentDidMount", value: function componentDidMount() { @@ -29,6 +24,5 @@ function (_React$Component) { return ___EmotionJSX(BoostProvider, this.props); } }]); - return EightBaseBoostProvider; }(React.Component); \ No newline at end of file diff --git a/es/common/Tag/Tag.js b/es/common/Tag/Tag.js index 2e0a664c..7b89124b 100644 --- a/es/common/Tag/Tag.js +++ b/es/common/Tag/Tag.js @@ -9,45 +9,33 @@ import React, { PureComponent } from 'react'; import pickBy from 'lodash/pickBy'; var COLLECTED_PROPS = ['accept', 'acceptCharset', 'accessKey', 'action', 'allowFullScreen', 'alt', 'aria-busy', 'async', 'autoComplete', 'autoFocus', 'autoPlay', 'capture', 'cellPadding', 'cellSpacing', 'challenge', 'charSet', 'checked', 'children', 'cite', 'classID', 'className', 'cols', 'colSpan', 'content', 'contentEditable', 'contextMenu', 'controls', 'controlsList', 'coords', 'crossOrigin', 'data', 'dateTime', 'default', 'defer', 'dir', 'disabled', 'download', 'draggable', 'encType', 'for', 'form', 'formAction', 'formEncType', 'formMethod', 'formNoValidate', 'formTarget', 'frameBorder', 'headers', 'height', 'hidden', 'high', 'href', 'hrefLang', 'htmlFor', 'httpEquiv', 'icon', 'id', 'inputMode', 'integrity', 'is', 'keyParams', 'keyType', 'kind', 'label', 'lang', 'list', 'loop', 'low', 'manifest', 'marginHeight', 'marginWidth', 'max', 'maxLength', 'media', 'mediaGroup', 'method', 'min', 'minLength', 'multiple', 'muted', 'name', 'nonce', 'noValidate', 'onBlur', 'onChange', 'onClick', 'onDoubleClick', 'onFocus', 'onKeyDown', 'onKeyUp', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onScroll', 'onSubmit', 'open', 'optimum', 'options', 'pattern', 'placeholder', 'poster', 'preload', 'profile', 'radioGroup', 'readOnly', 'rel', 'required', 'reversed', 'role', 'rows', 'rowSpan', 'sandbox', 'scope', 'scoped', 'scrolling', 'seamless', 'selected', 'shape', 'size', 'sizes', 'span', 'spellCheck', 'src', 'srcDoc', 'srcLang', 'srcSet', 'start', 'step', 'style', 'summary', 'tabIndex', 'target', 'title', 'to', 'type', 'useMap', 'value', 'width', 'wmode', 'wrap']; var HTML_TAGS = ['div', 'span', 'button', 'a', 'p', 'input', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'label', 'nav', 'img', 'pre', 'textarea']; - var collectProps = function collectProps(props) { return pickBy(props, function (value, name) { return COLLECTED_PROPS.indexOf(name) !== -1 || /^data-/.test(name); }); }; - -var Tag = -/*#__PURE__*/ -function (_PureComponent) { +var Tag = /*#__PURE__*/function (_PureComponent) { _inherits(Tag, _PureComponent); - function Tag() { _classCallCheck(this, Tag); - return _possibleConstructorReturn(this, _getPrototypeOf(Tag).apply(this, arguments)); } - _createClass(Tag, [{ key: "render", value: function render() { var _this$props = this.props, - TagComponent = _this$props.tagName, - modifiers = _this$props.modifiers, - props = _objectWithoutProperties(_this$props, ["tagName", "modifiers"]); - + TagComponent = _this$props.tagName, + modifiers = _this$props.modifiers, + props = _objectWithoutProperties(_this$props, ["tagName", "modifiers"]); var collectedProps = HTML_TAGS.indexOf(TagComponent) === -1 ? props : collectProps(props); - if (HTML_TAGS.indexOf(TagComponent) !== -1) { collectedProps.ref = props.insideRef; } - return ___EmotionJSX(TagComponent, collectedProps); } }]); - return Tag; }(PureComponent); - Tag.defaultProps = { tagName: 'div' }; diff --git a/es/components/AsyncContent/AsyncContent.js b/es/components/AsyncContent/AsyncContent.js index dc09b5e4..dbc6acee 100644 --- a/es/components/AsyncContent/AsyncContent.js +++ b/es/components/AsyncContent/AsyncContent.js @@ -2,17 +2,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { Loader } from '../Loader'; - var AsyncContent = function AsyncContent(_ref) { var loading = _ref.loading, - children = _ref.children, - props = _objectWithoutProperties(_ref, ["loading", "children"]); - + children = _ref.children, + props = _objectWithoutProperties(_ref, ["loading", "children"]); if (loading) { return ___EmotionJSX(Loader, props); } - return children; }; - export { AsyncContent }; \ No newline at end of file diff --git a/es/components/Avatar/Avatar.js b/es/components/Avatar/Avatar.js index da1875e3..4f31926f 100644 --- a/es/components/Avatar/Avatar.js +++ b/es/components/Avatar/Avatar.js @@ -13,23 +13,20 @@ var CAMERA_ICON_SIZE = { xl: '24px', xxl: '24px' }; - var getInitials = function getInitials(firstName, lastName) { if (firstName && lastName) return firstName.slice(0, 1) + lastName.slice(0, 1); if (firstName && !lastName) return firstName.slice(0, 1); if (!firstName && lastName) return lastName.slice(0, 1); return DEFAULT_INITIALS; }; - function Avatar(_ref) { var src = _ref.src, - firstName = _ref.firstName, - lastName = _ref.lastName, - onPick = _ref.onPick, - pickLabel = _ref.pickLabel, - pickVariant = _ref.pickVariant, - rest = _objectWithoutProperties(_ref, ["src", "firstName", "lastName", "onPick", "pickLabel", "pickVariant"]); - + firstName = _ref.firstName, + lastName = _ref.lastName, + onPick = _ref.onPick, + pickLabel = _ref.pickLabel, + pickVariant = _ref.pickVariant, + rest = _objectWithoutProperties(_ref, ["src", "firstName", "lastName", "onPick", "pickLabel", "pickVariant"]); var initials = getInitials(firstName, lastName); return ___EmotionJSX(AvatarTag, _extends({ transparent: !!src, @@ -56,7 +53,6 @@ function Avatar(_ref) { customSize: CAMERA_ICON_SIZE[rest.size || 'lg'] }), ___EmotionJSX("div", null, pickLabel)))); } - Avatar.defaultProps = { size: 'lg', variant: 'circle', diff --git a/es/components/Avatar/Avatar.stories.js b/es/components/Avatar/Avatar.stories.js index a3b87977..22115eea 100644 --- a/es/components/Avatar/Avatar.stories.js +++ b/es/components/Avatar/Avatar.stories.js @@ -1,6 +1,6 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; - /* eslint-disable no-alert */ + import React from 'react'; import { Avatar, Row, Column } from '../../'; export default { diff --git a/es/components/Avatar/Avatar.theme.js b/es/components/Avatar/Avatar.theme.js index a331702e..c5dd2dd6 100644 --- a/es/components/Avatar/Avatar.theme.js +++ b/es/components/Avatar/Avatar.theme.js @@ -1,225 +1,214 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'avatar'; var COLORS = ['#ffd012', '#a6e50f', '#00bb6e', '#9975d0', '#4da1ff', '#1968cb', '#ff6d4a', '#EB518E', '#eb4235']; - var getBackgroundColorByName = function getBackgroundColorByName(firstName) { var index = firstName ? Math.abs((firstName.charCodeAt(0) - 64) % COLORS.length) : 0; return COLORS[index]; }; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS; - return { - root: function root(props) { - return { - overflow: 'hidden', - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - position: 'relative', - backgroundColor: props.transparent ? 'transparent' : getBackgroundColorByName(props.firstName), - color: COLORS.WHITE, - fontWeight: 600 - }; - }, - modifiers: { - pickVariant: { - bottom: _defineProperty({}, "&:hover ".concat(AvatarHandleTag), { - bottom: '0' - }), - fullWidth: _defineProperty({}, "&:hover > ".concat(AvatarHandleFullWidthTag), _defineProperty({ - background: 'rgba(50, 60, 71, 0.7);' - }, "".concat(AvatarHandleIconContainerTag), { - opacity: 1 - })) - }, - variant: { - circle: { - borderRadius: '100%' - }, - square: { - borderRadius: '0%' - }, - rounded: { - borderRadius: '17%' - } + var COLORS = _ref.COLORS; + return { + root: function root(props) { + return { + overflow: 'hidden', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + position: 'relative', + backgroundColor: props.transparent ? 'transparent' : getBackgroundColorByName(props.firstName), + color: COLORS.WHITE, + fontWeight: 600 + }; }, - size: { - xs: { - width: '16px', - height: '16px', - fontSize: '1rem' - }, - sm: { - width: '32px', - height: '32px', - fontSize: '16px' - }, - md: { - width: '48px', - height: '48px', - fontSize: '20px' - }, - lg: { - width: '80px', - height: '80px', - fontSize: '24px' - }, - xl: { - width: '100px', - height: '100px', - fontSize: '32px' - }, - xxl: { - width: '120px', - height: '120px', - fontSize: '48px' + modifiers: { + pickVariant: { + bottom: _defineProperty({}, "&:hover ".concat(AvatarHandleTag), { + bottom: '0' + }), + fullWidth: _defineProperty({}, "&:hover > ".concat(AvatarHandleFullWidthTag), _defineProperty({ + background: 'rgba(50, 60, 71, 0.7);' + }, "".concat(AvatarHandleIconContainerTag), { + opacity: 1 + })) + }, + variant: { + circle: { + borderRadius: '100%' + }, + square: { + borderRadius: '0%' + }, + rounded: { + borderRadius: '17%' + } }, - stretch: { - width: '100%', - height: '100%' + size: { + xs: { + width: '16px', + height: '16px', + fontSize: '1rem' + }, + sm: { + width: '32px', + height: '32px', + fontSize: '16px' + }, + md: { + width: '48px', + height: '48px', + fontSize: '20px' + }, + lg: { + width: '80px', + height: '80px', + fontSize: '24px' + }, + xl: { + width: '100px', + height: '100px', + fontSize: '32px' + }, + xxl: { + width: '120px', + height: '120px', + fontSize: '48px' + }, + stretch: { + width: '100%', + height: '100%' + } } } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - AvatarTag = _createThemeTag2[0], - themeAvatar = _createThemeTag2[1]; - + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + AvatarTag = _createThemeTag2[0], + themeAvatar = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Handle"), function (_ref2) { - var COLORS = _ref2.COLORS; - return { - root: { - position: 'absolute', - bottom: '-30%', - left: '0', - right: '0', - height: '30%', - cursor: 'pointer', - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - textAlign: 'center', - background: 'rgba(0, 0, 0, .75)', - fontSize: '8px', - transition: 'all .15s ease-in-out', - userSelect: 'none', - color: COLORS.SECONDARY_TEXT_COLOR - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - AvatarHandleTag = _createThemeTag4[0], - themeHandle = _createThemeTag4[1]; - + var COLORS = _ref2.COLORS; + return { + root: { + position: 'absolute', + bottom: '-30%', + left: '0', + right: '0', + height: '30%', + cursor: 'pointer', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + textAlign: 'center', + background: 'rgba(0, 0, 0, .75)', + fontSize: '8px', + transition: 'all .15s ease-in-out', + userSelect: 'none', + color: COLORS.SECONDARY_TEXT_COLOR + } + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + AvatarHandleTag = _createThemeTag4[0], + themeHandle = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag("".concat(name, "HandleFullWidth"), function (_ref3) { - var COLORS = _ref3.COLORS; - return { - root: { - position: 'absolute', - top: '0', - left: '0', - right: '0', - height: '100%', - cursor: 'pointer', - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - textAlign: 'center', - background: 'rgba(50, 60, 71, 0)', - fontSize: '8px', - transition: 'all .15s ease-in-out', - userSelect: 'none', - color: COLORS.WHITE - }, - modifiers: { - variant: { - circle: { - borderRadius: '100%' - }, - square: { - borderRadius: '0%' - }, - rounded: { - borderRadius: '17%' + var COLORS = _ref3.COLORS; + return { + root: { + position: 'absolute', + top: '0', + left: '0', + right: '0', + height: '100%', + cursor: 'pointer', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + textAlign: 'center', + background: 'rgba(50, 60, 71, 0)', + fontSize: '8px', + transition: 'all .15s ease-in-out', + userSelect: 'none', + color: COLORS.WHITE + }, + modifiers: { + variant: { + circle: { + borderRadius: '100%' + }, + square: { + borderRadius: '0%' + }, + rounded: { + borderRadius: '17%' + } } } - } - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - AvatarHandleFullWidthTag = _createThemeTag6[0], - themeHandleFullWidth = _createThemeTag6[1]; - + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + AvatarHandleFullWidthTag = _createThemeTag6[0], + themeHandleFullWidth = _createThemeTag6[1]; var _createThemeTag7 = createThemeTag("".concat(name, "HandleIconContainer"), function (_ref4) { - var COLORS = _ref4.COLORS; - return { - root: { - color: COLORS.WHITE, - display: 'flex', - flexFlow: 'column', - alignItems: 'center', - '> div:nth-child(2)': { - paddingTop: '2px', - position: 'relative', - top: '1px' - }, - opacity: 0 - }, - modifiers: { - size: { - xs: { - '> div:nth-child(2)': { - display: 'none' - } + var COLORS = _ref4.COLORS; + return { + root: { + color: COLORS.WHITE, + display: 'flex', + flexFlow: 'column', + alignItems: 'center', + '> div:nth-child(2)': { + paddingTop: '2px', + position: 'relative', + top: '1px' }, - sm: { - '> div:nth-child(2)': { - display: 'none' + opacity: 0 + }, + modifiers: { + size: { + xs: { + '> div:nth-child(2)': { + display: 'none' + } + }, + sm: { + '> div:nth-child(2)': { + display: 'none' + } + }, + md: { + fontSize: '6px' + }, + lg: { + fontSize: '12px' + }, + xl: { + fontSize: '14px' + }, + xxl: { + fontSize: '14px' + }, + stretch: { + fontSize: '2rem' } - }, - md: { - fontSize: '6px' - }, - lg: { - fontSize: '12px' - }, - xl: { - fontSize: '14px' - }, - xxl: { - fontSize: '14px' - }, - stretch: { - fontSize: '2rem' } } - } - }; -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - AvatarHandleIconContainerTag = _createThemeTag8[0], - themeHandleIconContainer = _createThemeTag8[1]; - + }; + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + AvatarHandleIconContainerTag = _createThemeTag8[0], + themeHandleIconContainer = _createThemeTag8[1]; var _createThemeTag9 = createThemeTag("".concat(name, "Img"), { - root: { - width: '100%', - height: '100%', - objectFit: 'cover' - } -}), - _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), - AvatarImgTag = _createThemeTag10[0], - themeAvatarImg = _createThemeTag10[1]; - + root: { + width: '100%', + height: '100%', + objectFit: 'cover' + } + }), + _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), + AvatarImgTag = _createThemeTag10[0], + themeAvatarImg = _createThemeTag10[1]; var theme = _objectSpread({}, themeHandle, {}, themeAvatar, {}, themeAvatarImg, {}, themeHandleFullWidth, {}, themeHandleIconContainer); - export { theme, AvatarImgTag, AvatarTag, AvatarHandleTag, AvatarHandleFullWidthTag, themeHandleFullWidth, AvatarHandleIconContainerTag }; \ No newline at end of file diff --git a/es/components/Avatars/Avatars.js b/es/components/Avatars/Avatars.js index 8a6b3720..460e2c50 100644 --- a/es/components/Avatars/Avatars.js +++ b/es/components/Avatars/Avatars.js @@ -1,56 +1,50 @@ import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; +import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral"; import { jsx as ___EmotionJSX } from "@emotion/core"; - +function _templateObject2() { + var data = _taggedTemplateLiteral(["\n border: 2px solid #fff;\n cursor: pointer;\n"]); + _templateObject2 = function _templateObject2() { + return data; + }; + return data; +} +function _templateObject() { + var data = _taggedTemplateLiteral(["\n &:not(:first-of-type) {\n margin-left: -10px;\n }\n"]); + _templateObject = function _templateObject() { + return data; + }; + return data; +} /* eslint-disable react/jsx-key */ import React from 'react'; -import { css } from '@emotion/core'; +import { css } from '@emotion/react'; import { theme, AvatarsTag, AvatarsHandleTag, AvatarsCounterTag } from './Avatars.theme'; import { Tooltip } from '../Tooltip'; import { Avatar } from '../Avatar'; import { Icon } from '../Icon'; -var tooltipClassName = process.env.NODE_ENV === "production" ? { - name: "1suzby9", - styles: "&:not(:first-of-type){margin-left:-10px;}" -} : { - name: "1suzby9", - styles: "&:not(:first-of-type){margin-left:-10px;}", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhcnMvQXZhdGFycy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3QjRCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhcnMvQXZhdGFycy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG4vKiBlc2xpbnQtZGlzYWJsZSByZWFjdC9qc3gta2V5ICovXG5cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJztcbmltcG9ydCB7IHRoZW1lLCBBdmF0YXJzVGFnLCBBdmF0YXJzSGFuZGxlVGFnLCBBdmF0YXJzQ291bnRlclRhZyB9IGZyb20gJy4vQXZhdGFycy50aGVtZSc7XG5cbmltcG9ydCB7IFRvb2x0aXAgfSBmcm9tICcuLi9Ub29sdGlwJztcbmltcG9ydCB7IEF2YXRhciB9IGZyb20gJy4uL0F2YXRhcic7XG5pbXBvcnQgeyBJY29uIH0gZnJvbSAnLi4vSWNvbic7XG5cbnR5cGUgQXZhdGFyc1Byb3BzID0ge1xuICBzaXplPzogJ3hzJyB8ICdzbScgfCAnbWQnIHwgJ2xnJyB8ICd4bCcsXG4gIHVzZXJzOiBBcnJheTx7XG4gICA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AgICAgICBvbkNsaWNrPXsgb25BdmF0YXJzQ2xpY2sgfVxuICAgICAgICAgICAgICBjc3M9eyBjc3MoYXZhdGFyQ2xhc3NOYW1lKSB9XG4gICAgICAgICAgICAgIHN0eWxlPXt7IHpJbmRleDogTWF0aC5hYnMoaW5kZXggLSA3KSB9fVxuICAgICAgICAgICAgICBmaXJzdE5hbWU9eyBmaXJzdE5hbWUgfVxuICAgICAgICAgICAgICBsYXN0TmFtZT17IGxhc3ROYW1lIH1cbiAgICAgICAgICAgICAgc3JjPXsgYXZhdGFyVXJsIH1cbiAgICAgICAgICAgICAgc2l6ZT17IHNpemUgfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L1Rvb2x0aXA+XG4gICAgICAgICkpLFxuICAgICAgKSB9XG5cbiAgICAgIDxJZiBjb25kaXRpb249eyB1c2Vycy5sZW5ndGggPiA0IH0+XG4gICAgICAgIDxBdmF0YXJzQ291bnRlclRhZyBvbkNsaWNrPXsgb25Db3VudGVyQ2xpY2sgfSBzaXplPXsgc2l6ZSB9PisgeyB1c2Vycy5sZW5ndGggLSA0IH08L0F2YXRhcnNDb3VudGVyVGFnPlxuICAgICAgPC9JZj5cblxuICAgICAgPElmIGNvbmRpdGlvbj17ICEhd2l0aFBsdXNCdXR0b24gfSA+XG4gICAgICAgIDxBdmF0YXJzSGFuZGxlVGFnIG9uQ2xpY2s9eyBvblBsdXNDbGljayB9IHNpemU9eyBzaXplIH0+XG4gICAgICAgICAgPEljb24gbmFtZT1cIlBsdXNcIiBzaXplPVwieHNcIiBjb2xvcj1cIlBSSU1BUllcIiAvPlxuICAgICAgICA8L0F2YXRhcnNIYW5kbGVUYWc+XG4gICAgICA8L0lmPlxuICAgIDwvQXZhdGFyc1RhZz5cbiAgKTtcbn07XG5cbkF2YXRhcnMuZGVmYXVsdFByb3BzID0ge1xuICBzaXplOiAnbGcnLFxufTtcblxuZXhwb3J0IHsgQXZhdGFycywgdGhlbWUgfTtcbiJdfQ== */" -}; -var avatarClassName = process.env.NODE_ENV === "production" ? { - name: "1swkd8e", - styles: "border:2px solid #fff;cursor:pointer;" -} : { - name: "1swkd8e", - styles: "border:2px solid #fff;cursor:pointer;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhcnMvQXZhdGFycy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4QjJCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhcnMvQXZhdGFycy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG4vKiBlc2xpbnQtZGlzYWJsZSByZWFjdC9qc3gta2V5ICovXG5cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJztcbmltcG9ydCB7IHRoZW1lLCBBdmF0YXJzVGFnLCBBdmF0YXJzSGFuZGxlVGFnLCBBdmF0YXJzQ291bnRlclRhZyB9IGZyb20gJy4vQXZhdGFycy50aGVtZSc7XG5cbmltcG9ydCB7IFRvb2x0aXAgfSBmcm9tICcuLi9Ub29sdGlwJztcbmltcG9ydCB7IEF2YXRhciB9IGZyb20gJy4uL0F2YXRhcic7XG5pbXBvcnQgeyBJY29uIH0gZnJvbSAnLi4vSWNvbic7XG5cbnR5cGUgQXZhdGFyc1Byb3BzID0ge1xuICBzaXplPzogJ3hzJyB8ICdzbScgfCAnbWQnIHwgJ2xnJyB8ICd4bCcsXG4gIHVzZXJzOiBBcnJheTx7XG4gICAgZmlyc3ROYW1lOiBzdHJpbmcsXG4gICAgbGFzdE5hbWU6IHN0cmluZyxcbiAgICBhdmF0YXJVcmw6IHN0cmluZyxcbiAgfT4sXG4gIG9uQXZhdGFyc0NsaWNrPzogRnVuY3Rpb24sXG4gIG9uQ291bnRlckNsaWNrPzogRn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B9fVxuICAgICAgICAgICAgICBmaXJzdE5hbWU9eyBmaXJzdE5hbWUgfVxuICAgICAgICAgICAgICBsYXN0TmFtZT17IGxhc3ROYW1lIH1cbiAgICAgICAgICAgICAgc3JjPXsgYXZhdGFyVXJsIH1cbiAgICAgICAgICAgICAgc2l6ZT17IHNpemUgfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L1Rvb2x0aXA+XG4gICAgICAgICkpLFxuICAgICAgKSB9XG5cbiAgICAgIDxJZiBjb25kaXRpb249eyB1c2Vycy5sZW5ndGggPiA0IH0+XG4gICAgICAgIDxBdmF0YXJzQ291bnRlclRhZyBvbkNsaWNrPXsgb25Db3VudGVyQ2xpY2sgfSBzaXplPXsgc2l6ZSB9PisgeyB1c2Vycy5sZW5ndGggLSA0IH08L0F2YXRhcnNDb3VudGVyVGFnPlxuICAgICAgPC9JZj5cblxuICAgICAgPElmIGNvbmRpdGlvbj17ICEhd2l0aFBsdXNCdXR0b24gfSA+XG4gICAgICAgIDxBdmF0YXJzSGFuZGxlVGFnIG9uQ2xpY2s9eyBvblBsdXNDbGljayB9IHNpemU9eyBzaXplIH0+XG4gICAgICAgICAgPEljb24gbmFtZT1cIlBsdXNcIiBzaXplPVwieHNcIiBjb2xvcj1cIlBSSU1BUllcIiAvPlxuICAgICAgICA8L0F2YXRhcnNIYW5kbGVUYWc+XG4gICAgICA8L0lmPlxuICAgIDwvQXZhdGFyc1RhZz5cbiAgKTtcbn07XG5cbkF2YXRhcnMuZGVmYXVsdFByb3BzID0ge1xuICBzaXplOiAnbGcnLFxufTtcblxuZXhwb3J0IHsgQXZhdGFycywgdGhlbWUgfTtcbiJdfQ== */" -}; - +var tooltipClassName = css(_templateObject()); +var avatarClassName = css(_templateObject2()); var Avatars = function Avatars(_ref) { var users = _ref.users, - size = _ref.size, - onAvatarsClick = _ref.onAvatarsClick, - onCounterClick = _ref.onCounterClick, - onPlusClick = _ref.onPlusClick, - withPlusButton = _ref.withPlusButton, - rest = _objectWithoutProperties(_ref, ["users", "size", "onAvatarsClick", "onCounterClick", "onPlusClick", "withPlusButton"]); - + size = _ref.size, + onAvatarsClick = _ref.onAvatarsClick, + onCounterClick = _ref.onCounterClick, + onPlusClick = _ref.onPlusClick, + withPlusButton = _ref.withPlusButton, + rest = _objectWithoutProperties(_ref, ["users", "size", "onAvatarsClick", "onCounterClick", "onPlusClick", "withPlusButton"]); return ___EmotionJSX(AvatarsTag, _extends({}, rest, { tagName: "div" }), React.Children.toArray(users.slice(0, 4).map(function (_ref2, index) { var firstName = _ref2.firstName, - lastName = _ref2.lastName, - avatarUrl = _ref2.avatarUrl; + lastName = _ref2.lastName, + avatarUrl = _ref2.avatarUrl; return ___EmotionJSX(Tooltip, { - css: - /*#__PURE__*/ - css(tooltipClassName, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhcnMvQXZhdGFycy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRHlCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhcnMvQXZhdGFycy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG4vKiBlc2xpbnQtZGlzYWJsZSByZWFjdC9qc3gta2V5ICovXG5cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJztcbmltcG9ydCB7IHRoZW1lLCBBdmF0YXJzVGFnLCBBdmF0YXJzSGFuZGxlVGFnLCBBdmF0YXJzQ291bnRlclRhZyB9IGZyb20gJy4vQXZhdGFycy50aGVtZSc7XG5cbmltcG9ydCB7IFRvb2x0aXAgfSBmcm9tICcuLi9Ub29sdGlwJztcbmltcG9ydCB7IEF2YXRhciB9IGZyb20gJy4uL0F2YXRhcic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ICAgICA8L0lmPlxuICAgIDwvQXZhdGFyc1RhZz5cbiAgKTtcbn07XG5cbkF2YXRhcnMuZGVmYXVsdFByb3BzID0ge1xuICBzaXplOiAnbGcnLFxufTtcblxuZXhwb3J0IHsgQXZhdGFycywgdGhlbWUgfTtcbiJdfQ== */"), + css: css(tooltipClassName), message: "".concat(firstName, " ").concat(lastName) }, ___EmotionJSX(Avatar, { onClick: onAvatarsClick, - css: - /*#__PURE__*/ - css(avatarClassName, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhcnMvQXZhdGFycy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtRG9CIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F2YXRhcnMvQXZhdGFycy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG4vKiBlc2xpbnQtZGlzYWJsZSByZWFjdC9qc3gta2V5ICovXG5cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJztcbmltcG9ydCB7IHRoZW1lLCBBdmF0YXJzVGFnLCBBdmF0YXJzSGFuZGxlVGFnLCBBdmF0YXJzQ291bnRlclRhZyB9IGZyb20gJy4vQXZhdGFycy50aGVtZSc7XG5cbmltcG9ydCB7IFRvb2x0aXAgfSBmcm9tICcuLi9Ub29sdGlwJztcbmltcG9ydCB7IEF2YXRhciB9IGZyb20gJy4uL0F2YXRhcic7XG5pbXBvcnQgeyBJY29uIH0gZnJvbSAnLi4vSWNvbic7XG5cbnR5cGUgQXZhdGFyc1Byb3BzID0ge1xuICBzaXplPzogJ3hzJyB8ICdzbScgfCAnbWQnIHwgJ2xnJyB8ICd4bCcsXG4gIHVzZXJzOiBBcnJheTx7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+ css: css(avatarClassName), style: { zIndex: Math.abs(index - 7) }, @@ -71,7 +65,6 @@ var Avatars = function Avatars(_ref) { color: "PRIMARY" })) : null); }; - Avatars.defaultProps = { size: 'lg' }; diff --git a/es/components/Avatars/Avatars.js.flow b/es/components/Avatars/Avatars.js.flow index 2729478e..e3730a90 100644 --- a/es/components/Avatars/Avatars.js.flow +++ b/es/components/Avatars/Avatars.js.flow @@ -2,7 +2,7 @@ /* eslint-disable react/jsx-key */ import React from 'react'; -import { css } from '@emotion/core'; +import { css } from '@emotion/react'; import { theme, AvatarsTag, AvatarsHandleTag, AvatarsCounterTag } from './Avatars.theme'; import { Tooltip } from '../Tooltip'; diff --git a/es/components/Avatars/Avatars.stories.js b/es/components/Avatars/Avatars.stories.js index 9914188c..b0ad7e44 100644 --- a/es/components/Avatars/Avatars.stories.js +++ b/es/components/Avatars/Avatars.stories.js @@ -1,6 +1,6 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; - /* eslint-disable no-alert */ + import React from 'react'; import { Avatars, Column } from '../../'; var USERS = [{ diff --git a/es/components/Avatars/Avatars.theme.js b/es/components/Avatars/Avatars.theme.js index 69bab7c8..1344df27 100644 --- a/es/components/Avatars/Avatars.theme.js +++ b/es/components/Avatars/Avatars.theme.js @@ -1,137 +1,129 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'avatars'; - var _createThemeTag = createThemeTag(name, function () { - return { - root: function root() { - return { - display: 'flex', - justifyContent: 'center', - alignItems: 'center' - }; - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - AvatarsTag = _createThemeTag2[0], - themeAvatars = _createThemeTag2[1]; - + return { + root: function root() { + return { + display: 'flex', + justifyContent: 'center', + alignItems: 'center' + }; + } + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + AvatarsTag = _createThemeTag2[0], + themeAvatars = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Counter"), function (_ref) { - var COLORS = _ref.COLORS; - return { - root: function root() { - return { - borderRadius: '100%', - overflow: 'hidden', - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - position: 'relative', - backgroundColor: COLORS.BLUE_30, - color: COLORS.WHITE, - fontWeight: 600, - fontSize: '100%', - marginLeft: -10, - cursor: 'pointer', - zIndex: 2 - }; - }, - modifiers: { - size: { - xs: { - width: '16px', - height: '16px' - }, - sm: { - width: '32px', - height: '32px' - }, - md: { - width: '48px', - height: '48px' - }, - lg: { - width: '80px', - height: '80px' - }, - xl: { - width: '100px', - height: '100px' - }, - stretch: { - width: '100%', - height: '100%' + var COLORS = _ref.COLORS; + return { + root: function root() { + return { + borderRadius: '100%', + overflow: 'hidden', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + position: 'relative', + backgroundColor: COLORS.BLUE_30, + color: COLORS.WHITE, + fontWeight: 600, + fontSize: '100%', + marginLeft: -10, + cursor: 'pointer', + zIndex: 2 + }; + }, + modifiers: { + size: { + xs: { + width: '16px', + height: '16px' + }, + sm: { + width: '32px', + height: '32px' + }, + md: { + width: '48px', + height: '48px' + }, + lg: { + width: '80px', + height: '80px' + }, + xl: { + width: '100px', + height: '100px' + }, + stretch: { + width: '100%', + height: '100%' + } } } - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - AvatarsCounterTag = _createThemeTag4[0], - themeCounterAvatars = _createThemeTag4[1]; - + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + AvatarsCounterTag = _createThemeTag4[0], + themeCounterAvatars = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag("".concat(name, "Handle"), function (_ref2) { - var COLORS = _ref2.COLORS; - return { - root: function root() { - return { - borderRadius: '100%', - overflow: 'hidden', - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - position: 'relative', - border: "1px dashed ".concat(COLORS.SECONDARY_BORDER_COLOR), - color: COLORS.PRIMARY_TEXT_COLOR, - marginLeft: -10, - cursor: 'pointer', - zIndex: 1, - '&:hover': { - border: "1px dashed ".concat(COLORS.GRAY_40) - } - }; - }, - modifiers: { - size: { - xs: { - width: '16px', - height: '16px' - }, - sm: { - width: '32px', - height: '32px' - }, - md: { - width: '48px', - height: '48px' - }, - lg: { - width: '80px', - height: '80px' - }, - xl: { - width: '100px', - height: '100px' - }, - stretch: { - width: '100%', - height: '100%' + var COLORS = _ref2.COLORS; + return { + root: function root() { + return { + borderRadius: '100%', + overflow: 'hidden', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + position: 'relative', + border: "1px dashed ".concat(COLORS.SECONDARY_BORDER_COLOR), + color: COLORS.PRIMARY_TEXT_COLOR, + marginLeft: -10, + cursor: 'pointer', + zIndex: 1, + '&:hover': { + border: "1px dashed ".concat(COLORS.GRAY_40) + } + }; + }, + modifiers: { + size: { + xs: { + width: '16px', + height: '16px' + }, + sm: { + width: '32px', + height: '32px' + }, + md: { + width: '48px', + height: '48px' + }, + lg: { + width: '80px', + height: '80px' + }, + xl: { + width: '100px', + height: '100px' + }, + stretch: { + width: '100%', + height: '100%' + } } } - } - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - AvatarsHandleTag = _createThemeTag6[0], - themeHandleAvatars = _createThemeTag6[1]; - + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + AvatarsHandleTag = _createThemeTag6[0], + themeHandleAvatars = _createThemeTag6[1]; var theme = _objectSpread({}, themeAvatars, {}, themeHandleAvatars, {}, themeCounterAvatars); - export { theme, AvatarsTag, AvatarsHandleTag, AvatarsCounterTag }; \ No newline at end of file diff --git a/es/components/Breadcrumbs/Breadcrumbs.js b/es/components/Breadcrumbs/Breadcrumbs.js index 863b66cd..6423c729 100644 --- a/es/components/Breadcrumbs/Breadcrumbs.js +++ b/es/components/Breadcrumbs/Breadcrumbs.js @@ -8,11 +8,8 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable react/jsx-key */ import React, { Fragment, PureComponent } from 'react'; import { createThemeTag } from '../../theme/createThemeTag'; @@ -20,38 +17,30 @@ import { getBreadcrumbs } from './Breadcrumbs.utils'; import { BreadcrumbsItem } from './BreadcrumbsItem'; import { BreadcrumbsDividerTag } from './BreadcrumbsDivider'; var name = 'breadcrumbs'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var FONTS = _ref.FONTS; - return { - root: _objectSpread({}, FONTS.SUBTITLE_1) - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - BreadcrumbsTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - -var Breadcrumbs = -/*#__PURE__*/ -function (_PureComponent) { + var FONTS = _ref.FONTS; + return { + root: _objectSpread({}, FONTS.SUBTITLE_1) + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + BreadcrumbsTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; +var Breadcrumbs = /*#__PURE__*/function (_PureComponent) { _inherits(Breadcrumbs, _PureComponent); - function Breadcrumbs() { _classCallCheck(this, Breadcrumbs); - return _possibleConstructorReturn(this, _getPrototypeOf(Breadcrumbs).apply(this, arguments)); } - _createClass(Breadcrumbs, [{ key: "render", value: function render() { var _this$props = this.props, - itemTagName = _this$props.itemTagName, - pathname = _this$props.pathname, - routes = _this$props.routes, - matchPath = _this$props.matchPath, - rest = _objectWithoutProperties(_this$props, ["itemTagName", "pathname", "routes", "matchPath"]); - + itemTagName = _this$props.itemTagName, + pathname = _this$props.pathname, + routes = _this$props.routes, + matchPath = _this$props.matchPath, + rest = _objectWithoutProperties(_this$props, ["itemTagName", "pathname", "routes", "matchPath"]); var breadcrumbs = getBreadcrumbs(pathname, routes, matchPath); return ___EmotionJSX(BreadcrumbsTag, rest, React.Children.toArray(breadcrumbs.map(function (item, index) { return ___EmotionJSX(Fragment, null, ___EmotionJSX(BreadcrumbsItem, _extends({ @@ -64,8 +53,6 @@ function (_PureComponent) { }))); } }]); - return Breadcrumbs; }(PureComponent); - export { Breadcrumbs, theme }; \ No newline at end of file diff --git a/es/components/Breadcrumbs/Breadcrumbs.utils.js b/es/components/Breadcrumbs/Breadcrumbs.utils.js index 3202bfca..22374ecd 100644 --- a/es/components/Breadcrumbs/Breadcrumbs.utils.js +++ b/es/components/Breadcrumbs/Breadcrumbs.utils.js @@ -1,21 +1,16 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } var getPaths = function getPaths(pathname) { return pathname.replace(/\/$/, '').split('/').reduce(function (result, path, index) { return [].concat(_toConsumableArray(result), [index < 2 ? "/".concat(path) : "".concat(result[result.length - 1], "/").concat(path)]); }, []); }; - var matchPathDefault = function matchPathDefault(path) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; return path === options.path; }; - var getBreadcrumbs = function getBreadcrumbs(pathname, routes) { var matchPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : matchPathDefault; var paths = getPaths(pathname); @@ -25,7 +20,6 @@ var getBreadcrumbs = function getBreadcrumbs(pathname, routes) { path: route.path }, route.matchOptions || {})) : route.path === path; }); - if (matchedRoute) { var match = matchPath(path, _objectSpread({ path: matchedRoute.path @@ -35,10 +29,8 @@ var getBreadcrumbs = function getBreadcrumbs(pathname, routes) { match: match })]); } - return result; }, []); return breadcrumbs; }; - export { getBreadcrumbs }; \ No newline at end of file diff --git a/es/components/Breadcrumbs/BreadcrumbsDivider.js b/es/components/Breadcrumbs/BreadcrumbsDivider.js index d0903319..9e02b333 100644 --- a/es/components/Breadcrumbs/BreadcrumbsDivider.js +++ b/es/components/Breadcrumbs/BreadcrumbsDivider.js @@ -1,14 +1,12 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { createThemeTag } from '../../theme/createThemeTag'; var name = 'breadcrumbsDivider'; - var _createThemeTag = createThemeTag(name, { - root: { - padding: '0 8px' - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - BreadcrumbsDividerTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + root: { + padding: '0 8px' + } + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + BreadcrumbsDividerTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; export { BreadcrumbsDividerTag, theme }; \ No newline at end of file diff --git a/es/components/Breadcrumbs/BreadcrumbsItem.js b/es/components/Breadcrumbs/BreadcrumbsItem.js index fe4807a5..5d3afde0 100644 --- a/es/components/Breadcrumbs/BreadcrumbsItem.js +++ b/es/components/Breadcrumbs/BreadcrumbsItem.js @@ -3,14 +3,12 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { Link } from '../Link'; - var BreadcrumbsItem = function BreadcrumbsItem(_ref) { var tagName = _ref.tagName, - to = _ref.to, - label = _ref.label, - Component = _ref.component, - rest = _objectWithoutProperties(_ref, ["tagName", "to", "label", "component"]); - + to = _ref.to, + label = _ref.label, + Component = _ref.component, + rest = _objectWithoutProperties(_ref, ["tagName", "to", "label", "component"]); return React.createElement(tagName, { to: to }, Component ? ___EmotionJSX(Component, _extends({}, rest, { @@ -18,7 +16,6 @@ var BreadcrumbsItem = function BreadcrumbsItem(_ref) { label: label })) : label); }; - BreadcrumbsItem.defaultProps = { tagName: Link }; diff --git a/es/components/Breadcrumbs/index.js b/es/components/Breadcrumbs/index.js index 4e5b6881..ed1cc844 100644 --- a/es/components/Breadcrumbs/index.js +++ b/es/components/Breadcrumbs/index.js @@ -1,12 +1,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { Breadcrumbs, theme as breadcrumbsTheme } from './Breadcrumbs'; import { theme as breadcrumbsDividerTheme } from './BreadcrumbsDivider'; - var theme = _objectSpread({}, breadcrumbsTheme, {}, breadcrumbsDividerTheme); - export { Breadcrumbs, theme }; \ No newline at end of file diff --git a/es/components/Button/Button.js b/es/components/Button/Button.js index 13d29b6c..639d5ec4 100644 --- a/es/components/Button/Button.js +++ b/es/components/Button/Button.js @@ -8,45 +8,33 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { Component } from 'react'; import { ButtonTag } from './Button.theme'; - -var Button = -/*#__PURE__*/ -function (_Component) { +var Button = /*#__PURE__*/function (_Component) { _inherits(Button, _Component); - function Button() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, Button); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Button)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.onClick = function (event) { var _this$props = _this.props, - onClick = _this$props.onClick, - disabled = _this$props.disabled, - loading = _this$props.loading; + onClick = _this$props.onClick, + disabled = _this$props.disabled, + loading = _this$props.loading; !disabled && !loading && onClick && onClick(event); }; - return _this; } - _createClass(Button, [{ key: "render", value: function render() { var _this$props2 = this.props, - children = _this$props2.children, - tagName = _this$props2.tagName, - loading = _this$props2.loading, - rest = _objectWithoutProperties(_this$props2, ["children", "tagName", "loading"]); - + children = _this$props2.children, + tagName = _this$props2.tagName, + loading = _this$props2.loading, + rest = _objectWithoutProperties(_this$props2, ["children", "tagName", "loading"]); return ___EmotionJSX(ButtonTag, _extends({}, rest, { tagName: tagName, loading: loading, @@ -57,10 +45,8 @@ function (_Component) { })); } }]); - return Button; }(Component); - Button.defaultProps = { variant: 'raised', color: 'primary', diff --git a/es/components/Button/Button.theme.js b/es/components/Button/Button.theme.js index bf98a2ed..d646037a 100644 --- a/es/components/Button/Button.theme.js +++ b/es/components/Button/Button.theme.js @@ -1,22 +1,16 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _templateObject() { var data = _taggedTemplateLiteral(["\n from { transform: rotate(0deg) }\n to { transform: rotate(360deg) }\n"]); - _templateObject = function _templateObject() { return data; }; - return data; } - -import { keyframes } from '@emotion/core'; +import { keyframes } from '@emotion/react'; import { createThemeTag } from '../../theme/createThemeTag'; var BUTTON_HEIGHT_BY_SIZE = { sm: '36px', @@ -25,22 +19,17 @@ var BUTTON_HEIGHT_BY_SIZE = { }; var name = 'button'; var spinner = keyframes(_templateObject()); - var getLoading = function getLoading(props, COLORS) { var color = COLORS.WHITE; - if (props.color === 'warning') { color = COLORS.GRAY_60; } - if (props.color === 'neutral') { color = COLORS.PRIMARY_BORDER_COLOR; } - if (props.variant === 'ghost' || props.variant === 'outlined') { color = COLORS.PRIMARY_BORDER_COLOR; } - return props.loading ? { '&:after': { content: '""', @@ -60,7 +49,6 @@ var getLoading = function getLoading(props, COLORS) { } } : {}; }; - var getSquaredStyle = function getSquaredStyle(props) { if (props.squared && props.size) { return { @@ -69,13 +57,10 @@ var getSquaredStyle = function getSquaredStyle(props) { height: BUTTON_HEIGHT_BY_SIZE[props.size] }; } - return {}; }; - var boxShadowHover = '0 2px 4px 0 rgba(50,50,93,0.2)'; var boxShadowFocus = 'inset 0 1px 3px 0 rgba(50,50,93,0.14), inset 0 4px 6px 0 rgba(51,80,107,0.08)'; - var getLinkStyles = function getLinkStyles(props) { if (props.variant === 'link') { return { @@ -85,10 +70,8 @@ var getLinkStyles = function getLinkStyles(props) { height: 'auto !important' }; } - return {}; }; - var getSizeStyles = function getSizeStyles(props) { if (props.variant === 'link') { switch (props.size) { @@ -98,27 +81,23 @@ var getSizeStyles = function getSizeStyles(props) { lineHeight: '1.4rem', fontWeight: '400' }; - case 'lg': case 'md': default: return {}; } } - switch (props.size) { case 'sm': return { height: BUTTON_HEIGHT_BY_SIZE.sm, padding: '0 20px' }; - case 'lg': return { height: BUTTON_HEIGHT_BY_SIZE.lg, padding: '0 48px' }; - case 'md': default: return { @@ -127,7 +106,6 @@ var getSizeStyles = function getSizeStyles(props) { }; } }; - var getKindStyles = function getKindStyles(props, COLORS) { switch (props.variant) { case 'ghost': @@ -143,7 +121,6 @@ var getKindStyles = function getKindStyles(props, COLORS) { } }; } - case 'link': if (props.disabled) { return { @@ -154,7 +131,6 @@ var getKindStyles = function getKindStyles(props, COLORS) { } }; } - if (props.color === 'primary') { return { color: COLORS.PRIMARY, @@ -190,9 +166,7 @@ var getKindStyles = function getKindStyles(props, COLORS) { } }; } - break; - case 'outlined': if (props.disabled) { return { @@ -208,7 +182,6 @@ var getKindStyles = function getKindStyles(props, COLORS) { } }; } - if (props.color === 'primary') { return { backgroundColor: COLORS.WHITE, @@ -273,9 +246,7 @@ var getKindStyles = function getKindStyles(props, COLORS) { } }; } - break; - case 'raised': default: { @@ -293,7 +264,6 @@ var getKindStyles = function getKindStyles(props, COLORS) { } }; } - if (props.color === 'primary') { return { backgroundColor: COLORS.PRIMARY, @@ -373,73 +343,71 @@ var getKindStyles = function getKindStyles(props, COLORS) { } } }; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, SIZES = _ref.SIZES, FONTS = _ref.FONTS; - return { - root: function root(props) { - return _objectSpread({ - appearance: 'none', - outline: 'none', - textAlign: 'center', - textDecoration: 'none', - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - userSelect: 'none', - whiteSpace: 'nowrap' - }, FONTS.BUTTON, { - transition: 'all .15s ease-in-out', - cursor: 'pointer', - borderRadius: SIZES.MAIN_BORDER_RADIUS, - borderStyle: 'solid', - borderWidth: '1px' - }, getSquaredStyle(props), {}, getLoading(props, COLORS), {}, getLinkStyles(props), {}, getKindStyles(props, COLORS), {}, getSizeStyles(props), { - '& > *:not(:last-child)': { - marginRight: '8px' - } - }, props.withIconAutosize ? { - '& i': { - width: '20px', - height: '20px', - '&:not(:last-child)': { + return { + root: function root(props) { + return _objectSpread({ + appearance: 'none', + outline: 'none', + textAlign: 'center', + textDecoration: 'none', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + userSelect: 'none', + whiteSpace: 'nowrap' + }, FONTS.BUTTON, { + transition: 'all .15s ease-in-out', + cursor: 'pointer', + borderRadius: SIZES.MAIN_BORDER_RADIUS, + borderStyle: 'solid', + borderWidth: '1px' + }, getSquaredStyle(props), {}, getLoading(props, COLORS), {}, getLinkStyles(props), {}, getKindStyles(props, COLORS), {}, getSizeStyles(props), { + '& > *:not(:last-child)': { marginRight: '8px' } - } - } : {}, {}, props.withIconAutosize && props.variant === 'link' && props.size === 'sm' ? { - '& i': { - width: '16px', - height: '16px', - marginRight: '8px' - } - } : {}); - }, - modifiers: { - stretch: { - width: '100%' - }, - squared: { - padding: '0' - }, - rounded: { - borderRadius: '32px', - padding: '0 20px' + }, props.withIconAutosize ? { + '& i': { + width: '20px', + height: '20px', + '&:not(:last-child)': { + marginRight: '8px' + } + } + } : {}, {}, props.withIconAutosize && props.variant === 'link' && props.size === 'sm' ? { + '& i': { + width: '16px', + height: '16px', + marginRight: '8px' + } + } : {}); }, - loading: { - color: 'transparent', - position: 'relative', - pointerEvents: 'none', - '& > *': { - visibility: 'hidden' + modifiers: { + stretch: { + width: '100%' + }, + squared: { + padding: '0' + }, + rounded: { + borderRadius: '32px', + padding: '0 20px' + }, + loading: { + color: 'transparent', + position: 'relative', + pointerEvents: 'none', + '& > *': { + visibility: 'hidden' + } } } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - ButtonTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + ButtonTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; export { ButtonTag, theme }; \ No newline at end of file diff --git a/es/components/Button/Button.theme.js.flow b/es/components/Button/Button.theme.js.flow index d9a744c6..2b89eee0 100644 --- a/es/components/Button/Button.theme.js.flow +++ b/es/components/Button/Button.theme.js.flow @@ -1,6 +1,6 @@ // @flow -import { keyframes } from '@emotion/core'; +import { keyframes } from '@emotion/react'; import { createThemeTag } from '../../theme/createThemeTag'; diff --git a/es/components/ButtonGroup/ButtonGroup.js b/es/components/ButtonGroup/ButtonGroup.js index 32794163..863629e6 100644 --- a/es/components/ButtonGroup/ButtonGroup.js +++ b/es/components/ButtonGroup/ButtonGroup.js @@ -3,14 +3,11 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { ButtonGroupTag } from './ButtonGroup.theme'; - var ButtonGroup = function ButtonGroup(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(ButtonGroupTag, _extends({}, rest, { tagName: "div" }), children); }; - export { ButtonGroup }; \ No newline at end of file diff --git a/es/components/ButtonGroup/ButtonGroup.theme.js b/es/components/ButtonGroup/ButtonGroup.theme.js index e82dff55..33cbce27 100644 --- a/es/components/ButtonGroup/ButtonGroup.theme.js +++ b/es/components/ButtonGroup/ButtonGroup.theme.js @@ -1,35 +1,33 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { createThemeTag } from '../../theme/createThemeTag'; var name = 'buttonGroup'; - var _createThemeTag = createThemeTag(name, { - root: function root(props) { - return { - display: 'flex', - flexDirection: props.direction, - '& > *': { - '&:not(:last-child)': { - borderRightColor: 'none', - borderTopRightRadius: 0, - borderBottomRightRadius: 0 - }, - '&:not(:first-of-type)': { - borderLeftColor: 'none', - borderTopLeftRadius: 0, - borderBottomLeftRadius: 0, - marginLeft: '-1px' + root: function root(props) { + return { + display: 'flex', + flexDirection: props.direction, + '& > *': { + '&:not(:last-child)': { + borderRightColor: 'none', + borderTopRightRadius: 0, + borderBottomRightRadius: 0 + }, + '&:not(:first-of-type)': { + borderLeftColor: 'none', + borderTopLeftRadius: 0, + borderBottomLeftRadius: 0, + marginLeft: '-1px' + } } + }; + }, + modifiers: { + stretch: { + width: '100%' } - }; - }, - modifiers: { - stretch: { - width: '100%' } - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - ButtonGroupTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + ButtonGroupTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; export { theme, ButtonGroupTag }; \ No newline at end of file diff --git a/es/components/Card/Card.js b/es/components/Card/Card.js index ef117e60..591621b2 100644 --- a/es/components/Card/Card.js +++ b/es/components/Card/Card.js @@ -12,35 +12,26 @@ import { CardBody } from './CardBody'; import { CardSection } from './CardSection'; import { CardFooter } from './CardFooter'; import { Paper } from '../Paper'; - -var Card = -/*#__PURE__*/ -function (_PureComponent) { +var Card = /*#__PURE__*/function (_PureComponent) { _inherits(Card, _PureComponent); - function Card() { _classCallCheck(this, Card); - return _possibleConstructorReturn(this, _getPrototypeOf(Card).apply(this, arguments)); } - _createClass(Card, [{ key: "render", value: function render() { var _this$props = this.props, - children = _this$props.children, - paddingOuter = _this$props.paddingOuter, - rest = _objectWithoutProperties(_this$props, ["children", "paddingOuter"]); - + children = _this$props.children, + paddingOuter = _this$props.paddingOuter, + rest = _objectWithoutProperties(_this$props, ["children", "paddingOuter"]); return ___EmotionJSX(Paper, _extends({}, rest, { padding: paddingOuter }), typeof children === 'function' ? children(rest) : children); } }]); - return Card; }(PureComponent); - Card.Header = CardHeader; Card.Body = CardBody; Card.Section = CardSection; diff --git a/es/components/Card/Card.stories.js b/es/components/Card/Card.stories.js index ca46991c..38b32adf 100644 --- a/es/components/Card/Card.stories.js +++ b/es/components/Card/Card.stories.js @@ -1,11 +1,9 @@ import _styled from "@emotion/styled-base"; import { jsx as ___EmotionJSX } from "@emotion/core"; +function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } import React from 'react'; import { Card } from '../../'; - -var ShortDiv = -/*#__PURE__*/ -_styled('div', { +var ShortDiv = /*#__PURE__*/_styled('div', { target: "ejro7z50" })(process.env.NODE_ENV === "production" ? { name: "1gkdjtj", @@ -13,9 +11,9 @@ _styled('div', { } : { name: "1gkdjtj", styles: "height:300px;max-height:300px;& > *{max-height:100%;}", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0NhcmQvQ2FyZC5zdG9yaWVzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlpQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9DYXJkL0NhcmQuc3Rvcmllcy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvc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C5IZWFkZXI+SGVhZGVyPC9DYXJkLkhlYWRlcj5cbiAgICAgIDxDYXJkLkJvZHkgcGFkZGluZz1cIm5vbmVcIiBzY3JvbGxhYmxlPlxuICAgICAgICA8Q2FyZC5TZWN0aW9uPlxuICAgICAgICAgIFNlY3Rpb25cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgPC9DYXJkLlNlY3Rpb24+XG4gICAgICAgIDxDYXJkLlNlY3Rpb24+XG4gICAgICAgICAgU2VjdGlvblxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICA8L0NhcmQuU2VjdGlvbj5cbiAgICAgICAgPENhcmQuU2VjdGlvbj5cbiAgICAgICAgICBTZWN0aW9uXG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgIDwvQ2FyZC5TZWN0aW9uPlxuICAgICAgPC9DYXJkLkJvZHk+XG4gICAgICA8Q2FyZC5Gb290ZXI+Rm9vdGVyPC9DYXJkLkZvb3Rlcj5cbiAgICA8L0NhcmQ+XG4gIDwvU2hvcnREaXY+XG4pO1xuXG53aXRoU2Nyb2xsYWJsZUJvZHkuc3RvcnkgPSB7XG4gIG5hbWU6ICd3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Y+XG4gICAgPENhcmQ+XG4gICAgICA8Q2FyZC5IZWFkZXI+SGVhZGVyPC9DYXJkLkhlYWRlcj5cbiAgICAgIDxDYXJkLkJvZHkgcGFkZGluZz1cIm5vbmVcIiBzY3JvbGxhYmxlPlxuICAgICAgICA8Q2FyZC5TZWN0aW9uPlxuICAgICAgICAgIFNlY3Rpb25cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgICA8YnIgLz5cbiAgICAgICAgPC9DYXJkLlNlY3Rpb24+XG4gICAgICAgIDxDYXJkLlNlY3Rpb24+XG4gICAgICAgICAgU2VjdGlvblxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICAgIDxiciAvPlxuICAgICAgICA8L0NhcmQuU2VjdGlvbj5cbiAgICAgICAgPENhcmQuU2VjdGlvbj5cbiAgICAgICAgICBTZWN0aW9uXG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgICAgPGJyIC8+XG4gICAgICAgIDwvQ2FyZC5TZWN0aW9uPlxuICAgICAgPC9DYXJkLkJvZHk+XG4gICAgICA8Q2FyZC5Gb290ZXI+Rm9vdGVyPC9DYXJkLkZvb3Rlcj5cbiAgICA8L0NhcmQ+XG4gIDwvU2hvcnREaXY+XG4pO1xuXG53aXRoU2Nyb2xsYWJsZUJvZHkuc3RvcnkgPSB7XG4gIG5hbWU6ICd3aXRoIHNjcm9sbGFibGUgYm9keScsXG59O1xuXG5leHBvcnQgY29uc3Qgd2l0aG91dEZvb3RlciA9ICgpID0+IChcbiAgPENhcmQ+XG4gICAgPENhcmQuSGVhZGVyPkhlYWRlcjwvQ2FyZC5IZWFkZXI+XG4gICAgPENhcmQuQm9keT5cbiAgICAgIEJvZHlcbiAgICAgIDxiciAvPlxuICAgICAgPGJyIC8+XG4gICAgICA8YnIgLz5cbiAgICAgIDxiciAvPlxuICAgIDwvQ2FyZC5Cb2R5PlxuICA8L0NhcmQ+XG4pO1xuXG53aXRob3V0Rm9vdGVyLnN0b3J5ID0ge1xuICBuYW1lOiAnd2l0aG91dCBmb290ZXInLFxufTtcblxuZXhwb3J0IGNvbnN0IHdpdGhvdXRIZWFkZXIgPSAoKSA9PiAoXG4gIDxDYXJkPlxuICAgIDxDYXJkLkJvZHk+XG4gICAgICBCb2R5XG4gICAgICA8YnIgLz5cbiAgICAgIDxiciAvPlxuICAgICAgPGJyIC8+XG4gICAgICA8YnIgLz5cbiAgICA8L0NhcmQuQm9keT5cbiAgICA8Q2FyZC5Gb290ZXI+Rm9vdGVyPC9DYXJkLkZvb3Rlcj5cbiAgPC9DYXJkPlxuKTtcblxud2l0aG91dEhlYWRlci5zdG9yeSA9IHtcbiAgbmFtZTogJ3dpdGhvdXQgaGVhZGVyJyxcbn07XG4iXX0= */", + toString: _EMOTION_STRINGIFIED_CSS_ERROR__ }); - export default { title: 'Components/Card', component: Card diff --git a/es/components/Card/Card.theme.js b/es/components/Card/Card.theme.js index 27135f86..a1df005c 100644 --- a/es/components/Card/Card.theme.js +++ b/es/components/Card/Card.theme.js @@ -1,10 +1,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var offsetSizes = { none: '0', @@ -36,125 +33,119 @@ var offsetModifier = { } } }; - var _createThemeTag = createThemeTag('cardBody', { - root: function root(props) { - return { - overflow: props.scrollable && 'auto' - }; - }, - modifiers: { - stretch: { - display: 'flex', - flex: 1, - width: '100%' - }, - padding: { - none: { - padding: '0' - }, - xs: { - padding: '4px' - }, - sm: { - padding: '12px' - }, - md: { - padding: '24px' - }, - lg: { - padding: '32px' - }, - xl: { - padding: '40px' - } - } - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - CardBodyTag = _createThemeTag2[0], - cardBodyTheme = _createThemeTag2[1]; - -var _createThemeTag3 = createThemeTag('cardFooter', function (_ref) { - var COLORS = _ref.COLORS; - return { - root: { - flexShrink: 0, - borderTop: "1px solid ".concat(COLORS.SECONDARY_BORDER_COLOR) - }, - modifiers: _objectSpread({}, offsetModifier) - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - CardFooterTag = _createThemeTag4[0], - cardFooterTheme = _createThemeTag4[1]; - -var _createThemeTag5 = createThemeTag('cardSection', function (_ref2) { - var COLORS = _ref2.COLORS; - return { - root: { - '&:not(:last-child)': { - borderBottom: "1px solid ".concat(COLORS.SECONDARY_BORDER_COLOR) - } + root: function root(props) { + return { + overflow: props.scrollable && 'auto' + }; }, - modifiers: _objectSpread({ - hoverable: { - cursor: 'pointer', - '&:hover': { - boxShadow: '0 2px 10px 0 rgba(208, 215, 221, 0.6)' - } - }, + modifiers: { stretch: { display: 'flex', flex: 1, width: '100%' - } - }, offsetModifier) - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - CardSectionTag = _createThemeTag6[0], - cardSectionTheme = _createThemeTag6[1]; - -var _createThemeTag7 = createThemeTag('cardHeader', function (_ref3) { - var COLORS = _ref3.COLORS; - return { - root: { - display: 'flex', - alignItems: 'center', - position: 'relative', - flexShrink: 0, - height: '64px', - borderBottom: "1px solid ".concat(COLORS.SECONDARY_BORDER_COLOR) - }, - modifiers: { + }, padding: { none: { padding: '0' }, xs: { - padding: '0 4px' + padding: '4px' }, sm: { - padding: '0 12px' + padding: '12px' }, md: { - padding: '0 24px' + padding: '24px' }, lg: { - padding: '0 32px' + padding: '32px' }, xl: { - padding: '0 40px' + padding: '40px' } } } - }; -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - CardHeaderTag = _createThemeTag8[0], - cardHeaderTheme = _createThemeTag8[1]; - + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + CardBodyTag = _createThemeTag2[0], + cardBodyTheme = _createThemeTag2[1]; +var _createThemeTag3 = createThemeTag('cardFooter', function (_ref) { + var COLORS = _ref.COLORS; + return { + root: { + flexShrink: 0, + borderTop: "1px solid ".concat(COLORS.SECONDARY_BORDER_COLOR) + }, + modifiers: _objectSpread({}, offsetModifier) + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + CardFooterTag = _createThemeTag4[0], + cardFooterTheme = _createThemeTag4[1]; +var _createThemeTag5 = createThemeTag('cardSection', function (_ref2) { + var COLORS = _ref2.COLORS; + return { + root: { + '&:not(:last-child)': { + borderBottom: "1px solid ".concat(COLORS.SECONDARY_BORDER_COLOR) + } + }, + modifiers: _objectSpread({ + hoverable: { + cursor: 'pointer', + '&:hover': { + boxShadow: '0 2px 10px 0 rgba(208, 215, 221, 0.6)' + } + }, + stretch: { + display: 'flex', + flex: 1, + width: '100%' + } + }, offsetModifier) + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + CardSectionTag = _createThemeTag6[0], + cardSectionTheme = _createThemeTag6[1]; +var _createThemeTag7 = createThemeTag('cardHeader', function (_ref3) { + var COLORS = _ref3.COLORS; + return { + root: { + display: 'flex', + alignItems: 'center', + position: 'relative', + flexShrink: 0, + height: '64px', + borderBottom: "1px solid ".concat(COLORS.SECONDARY_BORDER_COLOR) + }, + modifiers: { + padding: { + none: { + padding: '0' + }, + xs: { + padding: '0 4px' + }, + sm: { + padding: '0 12px' + }, + md: { + padding: '0 24px' + }, + lg: { + padding: '0 32px' + }, + xl: { + padding: '0 40px' + } + } + } + }; + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + CardHeaderTag = _createThemeTag8[0], + cardHeaderTheme = _createThemeTag8[1]; var theme = _objectSpread({}, cardBodyTheme, {}, cardSectionTheme, {}, cardFooterTheme, {}, cardHeaderTheme); - export { theme, CardBodyTag, CardSectionTag, CardFooterTag, CardHeaderTag }; \ No newline at end of file diff --git a/es/components/Card/CardBody.js b/es/components/Card/CardBody.js index 52282fa1..a5ead403 100644 --- a/es/components/Card/CardBody.js +++ b/es/components/Card/CardBody.js @@ -8,34 +8,25 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { PureComponent } from 'react'; import { CardBodyTag } from './Card.theme'; - -var CardBody = -/*#__PURE__*/ -function (_PureComponent) { +var CardBody = /*#__PURE__*/function (_PureComponent) { _inherits(CardBody, _PureComponent); - function CardBody() { _classCallCheck(this, CardBody); - return _possibleConstructorReturn(this, _getPrototypeOf(CardBody).apply(this, arguments)); } - _createClass(CardBody, [{ key: "render", value: function render() { var _this$props = this.props, - children = _this$props.children, - rest = _objectWithoutProperties(_this$props, ["children"]); - + children = _this$props.children, + rest = _objectWithoutProperties(_this$props, ["children"]); return ___EmotionJSX(CardBodyTag, _extends({}, rest, { tagName: "div" }), children); } }]); - return CardBody; }(PureComponent); - CardBody.defaultProps = { padding: 'md', scrollable: true diff --git a/es/components/Card/CardFooter.js b/es/components/Card/CardFooter.js index e7df6166..c1562554 100644 --- a/es/components/Card/CardFooter.js +++ b/es/components/Card/CardFooter.js @@ -3,16 +3,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { CardFooterTag } from './Card.theme'; - var CardFooter = function CardFooter(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(CardFooterTag, _extends({}, rest, { tagName: "div" }), children); }; - CardFooter.defaultProps = { padding: 'md' }; diff --git a/es/components/Card/CardHeader.js b/es/components/Card/CardHeader.js index cdbf8697..78aee6f6 100644 --- a/es/components/Card/CardHeader.js +++ b/es/components/Card/CardHeader.js @@ -8,34 +8,25 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { PureComponent } from 'react'; import { CardHeaderTag } from './Card.theme'; - -var CardHeader = -/*#__PURE__*/ -function (_PureComponent) { +var CardHeader = /*#__PURE__*/function (_PureComponent) { _inherits(CardHeader, _PureComponent); - function CardHeader() { _classCallCheck(this, CardHeader); - return _possibleConstructorReturn(this, _getPrototypeOf(CardHeader).apply(this, arguments)); } - _createClass(CardHeader, [{ key: "render", value: function render() { var _this$props = this.props, - children = _this$props.children, - rest = _objectWithoutProperties(_this$props, ["children"]); - + children = _this$props.children, + rest = _objectWithoutProperties(_this$props, ["children"]); return ___EmotionJSX(CardHeaderTag, _extends({}, rest, { tagName: "div" }), children); } }]); - return CardHeader; }(PureComponent); - CardHeader.defaultProps = { padding: 'md' }; diff --git a/es/components/Card/CardSection.js b/es/components/Card/CardSection.js index 66d98066..5351e3e0 100644 --- a/es/components/Card/CardSection.js +++ b/es/components/Card/CardSection.js @@ -3,16 +3,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { CardSectionTag } from './Card.theme'; - var CardSection = function CardSection(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(CardSectionTag, _extends({}, rest, { tagName: "div" }), children); }; - CardSection.defaultProps = { padding: 'md' }; diff --git a/es/components/Checkbox/Checkbox.js b/es/components/Checkbox/Checkbox.js index 3425678f..ece4f5f5 100644 --- a/es/components/Checkbox/Checkbox.js +++ b/es/components/Checkbox/Checkbox.js @@ -7,48 +7,34 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React, { PureComponent } from 'react'; import { Icon } from '../Icon'; import { CheckboxSquareTag, CheckboxTag, CheckboxWrapperTag, CheckboxTextTag, CheckboxIconTag } from './Checkbox.theme'; - -var Checkbox = -/*#__PURE__*/ -function (_PureComponent) { +var Checkbox = /*#__PURE__*/function (_PureComponent) { _inherits(Checkbox, _PureComponent); - function Checkbox() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, Checkbox); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Checkbox)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { iconName: _this.props.indeterminate ? 'Minus' : 'Check' }; _this.inputRef = React.createRef(); - _this.onChange = function (event) { var checked = event.target.checked; var _this$props = _this.props, - onChange = _this$props.onChange, - disabled = _this$props.disabled; + onChange = _this$props.onChange, + disabled = _this$props.disabled; onChange && !disabled && onChange(checked, event); }; - return _this; } - _createClass(Checkbox, [{ key: "componentDidMount", value: function componentDidMount() { @@ -65,7 +51,6 @@ function (_PureComponent) { key: "handleIndeterminate", value: function handleIndeterminate() { var inputElement = this.inputRef.current; - if (inputElement) { inputElement.indeterminate = this.props.indeterminate; } @@ -74,14 +59,12 @@ function (_PureComponent) { key: "render", value: function render() { var _this$props2 = this.props, - onChange = _this$props2.onChange, - label = _this$props2.label, - rest = _objectWithoutProperties(_this$props2, ["onChange", "label"]); - + onChange = _this$props2.onChange, + label = _this$props2.label, + rest = _objectWithoutProperties(_this$props2, ["onChange", "label"]); var iconModifiers = _objectSpread({}, rest, { isShown: rest.checked || rest.indeterminate }); - return ___EmotionJSX(CheckboxWrapperTag, _extends({}, rest, { tagName: "label" }), ___EmotionJSX(CheckboxTag, { @@ -114,20 +97,16 @@ function (_PureComponent) { iconName: 'Minus' }; } - if (props.checked) { return { iconName: 'Check' }; } - return null; - } + } // $FlowFixMe }]); - return Checkbox; }(PureComponent); - Checkbox.defaultProps = { checked: false, hasError: false, diff --git a/es/components/Checkbox/Checkbox.stories.js b/es/components/Checkbox/Checkbox.stories.js index b5a6e169..3582e8d3 100644 --- a/es/components/Checkbox/Checkbox.stories.js +++ b/es/components/Checkbox/Checkbox.stories.js @@ -6,17 +6,12 @@ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import _styled from "@emotion/styled-base"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } +function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } import React, { Component } from 'react'; import { Checkbox, Column } from '../../'; - -var Container = -/*#__PURE__*/ -_styled('div', { +var Container = /*#__PURE__*/_styled('div', { target: "e1j6z9yy0" })(process.env.NODE_ENV === "production" ? { name: "1m2z7wn", @@ -24,39 +19,29 @@ _styled('div', { } : { name: "1m2z7wn", styles: "max-width:100px;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0NoZWNrYm94L0NoZWNrYm94LnN0b3JpZXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSytCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0NoZWNrYm94L0NoZWNrYm94LnN0b3JpZXMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QsIHsgQ29tcG9u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sgc3RhdGUsIG9uQ2hhbmdlLCBvbk9wdGlvbkNoYW5nZSB9KSA9PiAoXG4gICAgICA8Q29sdW1uPlxuICAgICAgICA8Q2hlY2tib3hcbiAgICAgICAgICBsYWJlbD1cIkZydWl0c1wiXG4gICAgICAgICAgb25DaGFuZ2U9eyBvbkNoYW5nZSB9XG4gICAgICAgICAgaW5kZXRlcm1pbmF0ZT17IHN0YXRlLmluZGV0ZXJtaW5hdGUgfVxuICAgICAgICAgIGNoZWNrZWQ9eyBzdGF0ZS5jaGVja2VkIH1cbiAgICAgICAgLz5cblxuICAgICAgICB7IHN0YXRlLm9wdGlvbnMubWFwKG9wdGlvbiA9PiAoXG4gICAgICAgICAgPENoZWNrYm94XG4gICAgICAgICAgICBrZXk9eyBvcHRpb24ubGFiZWwgfVxuICAgICAgICAgICAgbGFiZWw9eyBvcHRpb24ubGFiZWwgfVxuICAgICAgICAgICAgY2hlY2tlZD17IG9wdGlvbi5jaGVja2VkIH1cbiAgICAgICAgICAgIG9uQ2hhbmdlPXsgKCkgPT4gb25PcHRpb25DaGFuZ2Uob3B0aW9uKSB9XG4gICAgICAgICAgLz5cbiAgICAgICAgKSkgfVxuICAgICAgPC9Db2x1bW4+XG4gICAgKSB9XG4gIDwvQ2hlY2tib3hJbmRlcnRlbWluYXRlU3RhdGU+XG4pO1xuXG53aXRoSW5kZXRlcm1pbmF0ZS5zdG9yeSA9IHtcbiAgbmFtZTogJ3dpdGggaW5kZXRlcm1pbmF0ZScsXG59O1xuIl19 */", + toString: _EMOTION_STRINGIFIED_CSS_ERROR__ }); - -var CheckboxState = -/*#__PURE__*/ -function (_Component) { +var CheckboxState = /*#__PURE__*/function (_Component) { _inherits(CheckboxState, _Component); - function CheckboxState() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, CheckboxState); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CheckboxState)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { checked: false }; - _this.changeCheck = function (checked) { return _this.setState({ checked: checked }); }; - return _this; } - _createClass(CheckboxState, [{ key: "render", value: function render() { @@ -66,26 +51,17 @@ function (_Component) { }); } }]); - return CheckboxState; }(Component); - -var CheckboxInderteminateState = -/*#__PURE__*/ -function (_Component2) { +var CheckboxInderteminateState = /*#__PURE__*/function (_Component2) { _inherits(CheckboxInderteminateState, _Component2); - function CheckboxInderteminateState() { var _getPrototypeOf3; - var _this2; - _classCallCheck(this, CheckboxInderteminateState); - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } - _this2 = _possibleConstructorReturn(this, (_getPrototypeOf3 = _getPrototypeOf(CheckboxInderteminateState)).call.apply(_getPrototypeOf3, [this].concat(args))); _this2.state = { options: [{ @@ -98,7 +74,6 @@ function (_Component2) { indeterminate: true, checked: false }; - _this2.onChange = function () { if (_this2.state.indeterminate || _this2.state.checked) { _this2.setState(function (prevState) { @@ -107,7 +82,6 @@ function (_Component2) { checked: false }); }); - _this2.setAllOptionsTo(false); } else { _this2.setState(function (prevState) { @@ -116,11 +90,9 @@ function (_Component2) { checked: true }); }); - _this2.setAllOptionsTo(true); } }; - _this2.onOptionChange = function (option) { _this2.setState(function (prevState) { var newOptions = prevState.options.map(function (item) { @@ -141,10 +113,8 @@ function (_Component2) { }); }); }; - return _this2; } - _createClass(CheckboxInderteminateState, [{ key: "setAllOptionsTo", value: function setAllOptionsTo(checked) { @@ -168,10 +138,8 @@ function (_Component2) { }); } }]); - return CheckboxInderteminateState; }(Component); - export default { title: 'Components/Checkbox', component: Checkbox @@ -207,7 +175,7 @@ common.story = { export var withState = function withState() { return ___EmotionJSX(CheckboxState, null, function (_ref) { var checked = _ref.checked, - changeCheck = _ref.changeCheck; + changeCheck = _ref.changeCheck; return ___EmotionJSX(Checkbox, { label: "Checkbox", checked: checked, @@ -221,8 +189,8 @@ withState.story = { export var withIndeterminate = function withIndeterminate() { return ___EmotionJSX(CheckboxInderteminateState, null, function (_ref2) { var state = _ref2.state, - onChange = _ref2.onChange, - onOptionChange = _ref2.onOptionChange; + onChange = _ref2.onChange, + onOptionChange = _ref2.onOptionChange; return ___EmotionJSX(Column, null, ___EmotionJSX(Checkbox, { label: "Fruits", onChange: onChange, diff --git a/es/components/Checkbox/Checkbox.theme.js b/es/components/Checkbox/Checkbox.theme.js index 880c6253..5a51945e 100644 --- a/es/components/Checkbox/Checkbox.theme.js +++ b/es/components/Checkbox/Checkbox.theme.js @@ -1,119 +1,109 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'checkbox'; - var _createThemeTag = createThemeTag("".concat(name, "Square"), function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, SIZES = _ref.SIZES; - return { - root: { - position: 'relative', - width: '24px', - height: '24px', - transition: 'all .15s ease-in-out', - flexShrink: 0, - background: COLORS.WHITE, - border: "1px solid ".concat(COLORS.PRIMARY_BORDER_COLOR), - borderRadius: SIZES.MAIN_BORDER_RADIUS, - '&:hover': { - boxShadow: '0 1px 3px 0 rgba(50,50,93,0.14), 0 4px 6px 0 rgba(112,157,199,0.08)' - }, - 'input:focus + &': { - boxShadow: 'inset 0 1px 3px 0 rgba(50,50,93,0.14), inset 0 4px 6px 0 rgba(112,157,199,0.08)' + return { + root: { + position: 'relative', + width: '24px', + height: '24px', + transition: 'all .15s ease-in-out', + flexShrink: 0, + background: COLORS.WHITE, + border: "1px solid ".concat(COLORS.PRIMARY_BORDER_COLOR), + borderRadius: SIZES.MAIN_BORDER_RADIUS, + '&:hover': { + boxShadow: '0 1px 3px 0 rgba(50,50,93,0.14), 0 4px 6px 0 rgba(112,157,199,0.08)' + }, + 'input:focus + &': { + boxShadow: 'inset 0 1px 3px 0 rgba(50,50,93,0.14), inset 0 4px 6px 0 rgba(112,157,199,0.08)' + }, + 'input:active + &': { + boxShadow: 'inset 0 1px 3px 0 rgba(50,50,93,0.14), inset 0 4px 6px 0 rgba(112,157,199,0.08)' + } }, - 'input:active + &': { - boxShadow: 'inset 0 1px 3px 0 rgba(50,50,93,0.14), inset 0 4px 6px 0 rgba(112,157,199,0.08)' + modifiers: { + hasError: { + borderColor: COLORS.DANGER + }, + disabled: { + backgroundColor: COLORS.GRAY_20, + cursor: 'auto' + } } - }, - modifiers: { - hasError: { - borderColor: COLORS.DANGER + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + CheckboxSquareTag = _createThemeTag2[0], + themeSquare = _createThemeTag2[1]; +var _createThemeTag3 = createThemeTag("".concat(name, "Icon"), function (_ref2) { + var COLORS = _ref2.COLORS; + return { + root: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + position: 'absolute', + left: 0, + right: 0, + top: 0, + bottom: 0, + transition: 'all .15s ease-in-out', + color: COLORS.PRIMARY, + opacity: 0 }, - disabled: { - backgroundColor: COLORS.GRAY_20, - cursor: 'auto' + modifiers: { + isShown: { + opacity: 1 + } } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - CheckboxSquareTag = _createThemeTag2[0], - themeSquare = _createThemeTag2[1]; - -var _createThemeTag3 = createThemeTag("".concat(name, "Icon"), function (_ref2) { - var COLORS = _ref2.COLORS; - return { + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + CheckboxIconTag = _createThemeTag4[0], + themeIcon = _createThemeTag4[1]; +var _createThemeTag5 = createThemeTag("".concat(name, "Text"), function (_ref3) { + var FONTS = _ref3.FONTS; + return { + root: _objectSpread({ + paddingLeft: '12px', + cursor: 'pointer' + }, FONTS.BODY_2), + modifiers: { + nowrap: { + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis' + } + } + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + CheckboxTextTag = _createThemeTag6[0], + themeText = _createThemeTag6[1]; +var _createThemeTag7 = createThemeTag("".concat(name, "Wrapper"), { root: { display: 'flex', - justifyContent: 'center', alignItems: 'center', - position: 'absolute', - left: 0, - right: 0, - top: 0, - bottom: 0, - transition: 'all .15s ease-in-out', - color: COLORS.PRIMARY, - opacity: 0 - }, - modifiers: { - isShown: { - opacity: 1 - } - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - CheckboxIconTag = _createThemeTag4[0], - themeIcon = _createThemeTag4[1]; - -var _createThemeTag5 = createThemeTag("".concat(name, "Text"), function (_ref3) { - var FONTS = _ref3.FONTS; - return { - root: _objectSpread({ - paddingLeft: '12px', cursor: 'pointer' - }, FONTS.BODY_2), - modifiers: { - nowrap: { - whiteSpace: 'nowrap', - overflow: 'hidden', - textOverflow: 'ellipsis' - } } - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - CheckboxTextTag = _createThemeTag6[0], - themeText = _createThemeTag6[1]; - -var _createThemeTag7 = createThemeTag("".concat(name, "Wrapper"), { - root: { - display: 'flex', - alignItems: 'center', - cursor: 'pointer' - } -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - CheckboxWrapperTag = _createThemeTag8[0], - themeWrapper = _createThemeTag8[1]; - + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + CheckboxWrapperTag = _createThemeTag8[0], + themeWrapper = _createThemeTag8[1]; var _createThemeTag9 = createThemeTag("".concat(name, "Tag"), { - root: { - opacity: 0, - position: 'absolute' - } -}), - _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), - CheckboxTag = _createThemeTag10[0], - themeCheckbox = _createThemeTag10[1]; - + root: { + opacity: 0, + position: 'absolute' + } + }), + _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), + CheckboxTag = _createThemeTag10[0], + themeCheckbox = _createThemeTag10[1]; var theme = _objectSpread({}, themeWrapper, {}, themeCheckbox, {}, themeSquare, {}, themeIcon, {}, themeText); - export { theme, CheckboxSquareTag, CheckboxTag, CheckboxWrapperTag, CheckboxTextTag, CheckboxIconTag }; \ No newline at end of file diff --git a/es/components/CheckboxField/CheckboxField.js b/es/components/CheckboxField/CheckboxField.js index 7bb57ad1..e59a1a14 100644 --- a/es/components/CheckboxField/CheckboxField.js +++ b/es/components/CheckboxField/CheckboxField.js @@ -5,23 +5,21 @@ import React from 'react'; import * as formUtils from '../../utils/forms'; import { Checkbox } from '../Checkbox'; import { FormField } from '../Form/FormField'; - var CheckboxField = function CheckboxField(_ref) { var label = _ref.label, - stretch = _ref.stretch, - input = _ref.input, - meta = _ref.meta, - disabled = _ref.disabled, - color = _ref.color, - nowrap = _ref.nowrap, - showErrorOnTouched = _ref.showErrorOnTouched, - rest = _objectWithoutProperties(_ref, ["label", "stretch", "input", "meta", "disabled", "color", "nowrap", "showErrorOnTouched"]); - + stretch = _ref.stretch, + input = _ref.input, + meta = _ref.meta, + disabled = _ref.disabled, + color = _ref.color, + nowrap = _ref.nowrap, + showErrorOnTouched = _ref.showErrorOnTouched, + rest = _objectWithoutProperties(_ref, ["label", "stretch", "input", "meta", "disabled", "color", "nowrap", "showErrorOnTouched"]); var name = input.name, - value = input.value, - onChange = input.onChange, - onFocus = input.onFocus, - onBlur = input.onBlur; + value = input.value, + onChange = input.onChange, + onFocus = input.onFocus, + onBlur = input.onBlur; var hasError = formUtils.hasError(meta, showErrorOnTouched); return ___EmotionJSX(FormField, _extends({}, rest, { input: input, @@ -42,7 +40,6 @@ var CheckboxField = function CheckboxField(_ref) { indeterminate: value === null })); }; - CheckboxField.defaultProps = { showErrorOnTouched: true }; diff --git a/es/components/Code/Code.js b/es/components/Code/Code.js index a8841f35..9e1f5d97 100644 --- a/es/components/Code/Code.js +++ b/es/components/Code/Code.js @@ -8,84 +8,64 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { PureComponent } from 'react'; import { CodeNumberPlateTag, CodeWrapperTag, CodeBodyTag, CodeNumericTag, CodePlateTag, CodeLineCounterTag, CodeBodyWrapperTag, CodeNumberWrapperTag, CodeCopyButtonWrapper } from './Code.theme'; import { Button } from '../Button'; - -var Code = -/*#__PURE__*/ -function (_PureComponent) { +var Code = /*#__PURE__*/function (_PureComponent) { _inherits(Code, _PureComponent); - function Code() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, Code); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Code)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.setNumbersRef = function (ref) { return _this.numbersRef = ref; }; - _this.setBodyRef = function (ref) { return _this.bodyRef = ref; }; - _this.onBodyScroll = function () { _this.numbersRef.scrollTop = _this.bodyRef.scrollTop; }; - _this.getLinesCount = function (codeText) { return typeof codeText === 'string' ? codeText.replace(/\n$/, '').split(/\r\n|\r|\n/).length : 0; }; - _this.renderNumbs = function () { var linesCount = _this.getLinesCount(_this.props.children); - var counters = []; - for (var index = 0; index < linesCount; index++) { counters.push(___EmotionJSX(CodeLineCounterTag, { key: index + 1 }, index + 1)); } - return counters; }; - _this.handleCopyButtonClick = function () { var tempTextarea = document.createElement('TEXTAREA'); - var lastFocusedElement = document.activeElement; // $FlowIgnore - - tempTextarea.value = _this.bodyRef.innerText; // $FlowIgnore - - document.body.appendChild(tempTextarea); // $FlowIgnore + var lastFocusedElement = document.activeElement; + // $FlowIgnore + tempTextarea.value = _this.bodyRef.innerText; + // $FlowIgnore + document.body.appendChild(tempTextarea); + // $FlowIgnore tempTextarea.select(); - document.execCommand('copy'); // $FlowIgnore - + document.execCommand('copy'); + // $FlowIgnore document.body.removeChild(tempTextarea); - if (lastFocusedElement) { lastFocusedElement.focus(); } }; - return _this; } - _createClass(Code, [{ key: "render", value: function render() { var _this$props = this.props, - children = _this$props.children, - withCopyButton = _this$props.withCopyButton, - rest = _objectWithoutProperties(_this$props, ["children", "withCopyButton"]); - + children = _this$props.children, + withCopyButton = _this$props.withCopyButton, + rest = _objectWithoutProperties(_this$props, ["children", "withCopyButton"]); return ___EmotionJSX(CodeWrapperTag, rest, ___EmotionJSX(CodePlateTag, null, ___EmotionJSX(CodeNumberWrapperTag, { modifiers: rest }, ___EmotionJSX(CodeNumberPlateTag, { @@ -107,8 +87,6 @@ function (_PureComponent) { }, "Copy")) : null)); } }]); - return Code; }(PureComponent); - export { Code }; \ No newline at end of file diff --git a/es/components/Code/Code.theme.js b/es/components/Code/Code.theme.js index c24fcd34..409d1b32 100644 --- a/es/components/Code/Code.theme.js +++ b/es/components/Code/Code.theme.js @@ -1,148 +1,134 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'code'; - var _createThemeTag = createThemeTag("".concat(name, "Wrapper"), function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, SIZES = _ref.SIZES; - return { + return { + root: function root(props) { + return { + border: "1px solid ".concat(COLORS.PRIMARY_BORDER_COLOR), + borderRadius: SIZES.MAIN_BORDER_RADIUS, + height: props.height ? "".concat(props.height, "px") : '100%', + overflow: 'hidden' + }; + } + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + CodeWrapperTag = _createThemeTag2[0], + themeWrapper = _createThemeTag2[1]; +var _createThemeTag3 = createThemeTag("".concat(name, "Counter"), function (_ref2) { + var FONTS = _ref2.FONTS; + return { + root: _objectSpread({}, FONTS.BODY_1, { + fontFamily: 'Courier', + opacity: '0.5', + textAlign: 'center', + lineHeight: 2 + }) + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + CodeLineCounterTag = _createThemeTag4[0], + themeCounter = _createThemeTag4[1]; +var _createThemeTag5 = createThemeTag("".concat(name, "Body"), function (_ref3) { + var COLORS = _ref3.COLORS; + return { + root: { + color: COLORS.PRIMARY_TEXT_COLOR, + fontFamily: 'Courier', + overflow: 'auto', + height: '100%', + padding: '20px', + lineHeight: 2 + } + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + CodeBodyTag = _createThemeTag6[0], + themeBody = _createThemeTag6[1]; +var _createThemeTag7 = createThemeTag("".concat(name, "Numeric"), function (_ref4) { + var COLORS = _ref4.COLORS, + SIZES = _ref4.SIZES; + return { + root: function root(props) { + return { + height: props.height ? 'auto' : '100%', + backgroundColor: COLORS.GRAY_10, + borderRight: "1px solid ".concat(COLORS.PRIMARY_BORDER_COLOR), + padding: '20px 0 40px', + borderTopLeftRadius: SIZES.MAIN_BORDER_RADIUS, + borderBottomLeftRadius: SIZES.MAIN_BORDER_RADIUS + }; + } + }; + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + CodeNumericTag = _createThemeTag8[0], + themeNumeric = _createThemeTag8[1]; +var _createThemeTag9 = createThemeTag("".concat(name, "Plate"), { + root: { + display: 'flex', + width: '100%', + overflow: 'hidden', + alignItems: 'stretch', + position: 'relative' + } + }), + _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), + CodePlateTag = _createThemeTag10[0], + themePlate = _createThemeTag10[1]; +var _createThemeTag11 = createThemeTag("".concat(name, "NumberWrapper"), { root: function root(props) { return { - border: "1px solid ".concat(COLORS.PRIMARY_BORDER_COLOR), - borderRadius: SIZES.MAIN_BORDER_RADIUS, - height: props.height ? "".concat(props.height, "px") : '100%', - overflow: 'hidden' + height: props.height ? "".concat(props.height, "px") : 'auto', + display: 'block', + width: '32px', + flexShrink: 0, + position: 'relative' }; } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - CodeWrapperTag = _createThemeTag2[0], - themeWrapper = _createThemeTag2[1]; - -var _createThemeTag3 = createThemeTag("".concat(name, "Counter"), function (_ref2) { - var FONTS = _ref2.FONTS; - return { - root: _objectSpread({}, FONTS.BODY_1, { - fontFamily: 'Courier', - opacity: '0.5', - textAlign: 'center', - lineHeight: 2 - }) - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - CodeLineCounterTag = _createThemeTag4[0], - themeCounter = _createThemeTag4[1]; - -var _createThemeTag5 = createThemeTag("".concat(name, "Body"), function (_ref3) { - var COLORS = _ref3.COLORS; - return { + }), + _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), + CodeNumberWrapperTag = _createThemeTag12[0], + themeNumberWrapper = _createThemeTag12[1]; +var _createThemeTag13 = createThemeTag("".concat(name, "NumberPlate"), { root: { - color: COLORS.PRIMARY_TEXT_COLOR, - fontFamily: 'Courier', - overflow: 'auto', height: '100%', - padding: '20px', - lineHeight: 2 + display: 'block', + position: 'absolute', + overflow: 'hidden', + width: '32px' } - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - CodeBodyTag = _createThemeTag6[0], - themeBody = _createThemeTag6[1]; - -var _createThemeTag7 = createThemeTag("".concat(name, "Numeric"), function (_ref4) { - var COLORS = _ref4.COLORS, - SIZES = _ref4.SIZES; - return { + }), + _createThemeTag14 = _slicedToArray(_createThemeTag13, 2), + CodeNumberPlateTag = _createThemeTag14[0], + themeNumberPlate = _createThemeTag14[1]; +var _createThemeTag15 = createThemeTag("".concat(name, "BodyWrapper"), { root: function root(props) { return { - height: props.height ? 'auto' : '100%', - backgroundColor: COLORS.GRAY_10, - borderRight: "1px solid ".concat(COLORS.PRIMARY_BORDER_COLOR), - padding: '20px 0 40px', - borderTopLeftRadius: SIZES.MAIN_BORDER_RADIUS, - borderBottomLeftRadius: SIZES.MAIN_BORDER_RADIUS + overflow: 'hidden', + height: props.height ? "".concat(props.height, "px") : '100%', + width: '100%' }; } - }; -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - CodeNumericTag = _createThemeTag8[0], - themeNumeric = _createThemeTag8[1]; - -var _createThemeTag9 = createThemeTag("".concat(name, "Plate"), { - root: { - display: 'flex', - width: '100%', - overflow: 'hidden', - alignItems: 'stretch', - position: 'relative' - } -}), - _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), - CodePlateTag = _createThemeTag10[0], - themePlate = _createThemeTag10[1]; - -var _createThemeTag11 = createThemeTag("".concat(name, "NumberWrapper"), { - root: function root(props) { - return { - height: props.height ? "".concat(props.height, "px") : 'auto', - display: 'block', - width: '32px', - flexShrink: 0, - position: 'relative' - }; - } -}), - _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), - CodeNumberWrapperTag = _createThemeTag12[0], - themeNumberWrapper = _createThemeTag12[1]; - -var _createThemeTag13 = createThemeTag("".concat(name, "NumberPlate"), { - root: { - height: '100%', - display: 'block', - position: 'absolute', - overflow: 'hidden', - width: '32px' - } -}), - _createThemeTag14 = _slicedToArray(_createThemeTag13, 2), - CodeNumberPlateTag = _createThemeTag14[0], - themeNumberPlate = _createThemeTag14[1]; - -var _createThemeTag15 = createThemeTag("".concat(name, "BodyWrapper"), { - root: function root(props) { - return { - overflow: 'hidden', - height: props.height ? "".concat(props.height, "px") : '100%', - width: '100%' - }; - } -}), - _createThemeTag16 = _slicedToArray(_createThemeTag15, 2), - CodeBodyWrapperTag = _createThemeTag16[0], - themeBodyWrapper = _createThemeTag16[1]; - + }), + _createThemeTag16 = _slicedToArray(_createThemeTag15, 2), + CodeBodyWrapperTag = _createThemeTag16[0], + themeBodyWrapper = _createThemeTag16[1]; var _createThemeTag17 = createThemeTag("".concat(name, "CopyButtonWrapper"), { - root: { - position: 'absolute', - top: '10px', - right: '32px' - } -}), - _createThemeTag18 = _slicedToArray(_createThemeTag17, 2), - CodeCopyButtonWrapper = _createThemeTag18[0], - themeCopyButtonWrapper = _createThemeTag18[1]; - + root: { + position: 'absolute', + top: '10px', + right: '32px' + } + }), + _createThemeTag18 = _slicedToArray(_createThemeTag17, 2), + CodeCopyButtonWrapper = _createThemeTag18[0], + themeCopyButtonWrapper = _createThemeTag18[1]; var theme = _objectSpread({}, themeBodyWrapper, {}, themeNumberWrapper, {}, themeNumberPlate, {}, themePlate, {}, themeWrapper, {}, themeCounter, {}, themeBody, {}, themeNumeric, {}, themeCopyButtonWrapper); - export { theme, CodeBodyTag, CodeWrapperTag, CodeNumericTag, CodePlateTag, CodeLineCounterTag, CodeBodyWrapperTag, CodeNumberWrapperTag, CodeNumberPlateTag, CodeCopyButtonWrapper }; \ No newline at end of file diff --git a/es/components/DateInput/DateInput.js b/es/components/DateInput/DateInput.js index cba71e1a..6eccb100 100644 --- a/es/components/DateInput/DateInput.js +++ b/es/components/DateInput/DateInput.js @@ -7,11 +7,9 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React from 'react'; import DatePicker from 'react-datepicker'; import 'react-datepicker/dist/react-datepicker.css'; @@ -20,119 +18,90 @@ import { Dropdown } from '../Dropdown'; import { Icon } from '../Icon'; import { DateInputTag, DateInputCalendarTag } from './DateInput.theme'; import * as utils from './DateInput.utils'; - var _ref2 = process.env.NODE_ENV === "production" ? { name: "72fd9l", styles: "flex:0;" } : { name: "72fd9l", styles: "flex:0;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0RhdGVJbnB1dC9EYXRlSW5wdXQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0tVIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0RhdGVJbnB1dC9EYXRlSW5wdXQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuXG5pbXBvc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dGV4dFZhbHVlIH1cbiAgICAgICAgICBvbkNoYW5nZT17IHRoaXMub25DaGFuZ2VUZXh0IH1cbiAgICAgICAgICBvbkJsdXI9eyB0aGlzLm9uQmx1ciB9XG4gICAgICAgICAgY2xlYXJhYmxlPXsgY2xlYXJhYmxlIH1cbiAgICAgICAgICBkaXNhYmxlZD17IGRpc2FibGVkIH1cbiAgICAgICAgICBhdXRvRm9jdXM9eyBhdXRvRm9jdXMgfVxuICAgICAgICAvPlxuICAgICAgICA8RHJvcGRvd25cbiAgICAgICAgICBpc09wZW49eyBpc09wZW4gJiYgIWRpc2FibGVkIH1cbiAgICAgICAgICBzdHJldGNoPXsgc3RyZXRjaCB9XG4gICAgICAgICAgb25DbG9zZURyb3Bkb3duPXsgdGhpcy5jbG9zZSB9XG4gICAgICAgICAgb25PcGVuRHJvcGRvd249eyB0aGlzLm9wZW4gfVxuICAgICAgICAgIGNzcz17eyBmbGV4OiAwIH19XG4gICAgICAgID5cbiAgICAgICAgICA8RHJvcGRvd24uSGVhZCBvbkNsaWNrPXsgdGhpcy50b2dnbGUgfT5cbiAgICAgICAgICAgIDxEYXRlSW5wdXRDYWxlbmRhclRhZz5cbiAgICAgICAgICAgICAgPEljb24gbmFtZT1cIkNhbGVuZGFyXCIgLz5cbiAgICAgICAgICAgIDwvRGF0ZUlucHV0Q2FsZW5kYXJUYWc+XG4gICAgICAgICAgPC9Ecm9wZG93bi5IZWFkPlxuICAgICAgICAgIDxEcm9wZG93bi5Cb2R5IHdpdGhQb3J0YWw9eyB3aXRoUG9ydGFsIH0gcGxhY2VtZW50PVwiYm90dG9tLWVuZFwiIG1vZGlmaWVycz17e1xuICAgICAgICAgICAgcHJldmVudE92ZXJmbG93OiB7XG4gICAgICAgICAgICAgIGJvdW5kYXJpZXNFbGVtZW50OiAndmlld3BvcnQnLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9fT5cbiAgICAgICAgICAgIDxEYXRlUGlja2VyIHsgLi4uY29sbGVjdGVkU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DxEYXRlSW5wdXRDYWxlbmRhclRhZz5cbiAgICAgICAgICAgICAgPEljb24gbmFtZT1cIkNhbGVuZGFyXCIgLz5cbiAgICAgICAgICAgIDwvRGF0ZUlucHV0Q2FsZW5kYXJUYWc+XG4gICAgICAgICAgPC9Ecm9wZG93bi5IZWFkPlxuICAgICAgICAgIDxEcm9wZG93bi5Cb2R5IHdpdGhQb3J0YWw9eyB3aXRoUG9ydGFsIH0gcGxhY2VtZW50PVwiYm90dG9tLWVuZFwiIG1vZGlmaWVycz17e1xuICAgICAgICAgICAgcHJldmVudE92ZXJmbG93OiB7XG4gICAgICAgICAgICAgIGJvdW5kYXJpZXNFbGVtZW50OiAndmlld3BvcnQnLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9fT5cbiAgICAgICAgICAgIDxEYXRlUGlja2VyIHsgLi4uY29sbGVjdGVkUHJvcHMgfSAvPlxuICAgICAgICAgIDwvRHJvcGRvd24uQm9keT5cbiAgICAgICAgPC9Ecm9wZG93bj5cbiAgICAgIDwvRGF0ZUlucHV0VGFnPlxuICAgICk7XG4gIH1cbn1cblxuZXhwb3J0IHsgRGF0ZUlucHV0IH07XG4iXX0= */", + toString: _EMOTION_STRINGIFIED_CSS_ERROR__ }; - -var DateInput = -/*#__PURE__*/ -function (_React$Component) { +var DateInput = /*#__PURE__*/function (_React$Component) { _inherits(DateInput, _React$Component); - function DateInput(props) { var _this; - _classCallCheck(this, DateInput); - _this = _possibleConstructorReturn(this, _getPrototypeOf(DateInput).call(this, props)); - _this.onChangeText = function (_ref) { var value = _ref.target.value; var withTime = _this.props.withTime; - var dateFormat = _this.getDateFormat(); - _this.setState({ textValue: value }); - if (!value) { _this.props.onChange(null); - return; } else { var luxonValue = utils.fromViewFormatToLuxon(value, dateFormat); - if (luxonValue && luxonValue.isValid) { value = utils.fromLuxonToISO(luxonValue, withTime); - _this.props.onChange(value); } } }; - _this.onBlur = function () { var textValue = _this.state.textValue; - var dateFormat = _this.getDateFormat(); - var luxonValue = utils.fromViewFormatToLuxon(textValue, dateFormat); - if (luxonValue && !luxonValue.isValid) { _this.setState({ textValue: utils.fromISOToViewFormat(_this.props.value, dateFormat) }); } }; - _this.onChangeDate = function (selected) { var _this$props = _this.props, - withTime = _this$props.withTime, - value = _this$props.value; + withTime = _this$props.withTime, + value = _this$props.value; var isoValue = utils.fromJSDateToISO(selected, withTime); - _this.props.onChange(isoValue); - if (!withTime || Math.abs(selected - (value ? new Date(value) : 0)) <= 24 * 60 * 60 * 1000) { _this.close(); } }; - _this.toggle = function () { var isOpen = _this.state.isOpen; - _this.setState({ isOpen: !isOpen }); }; - _this.open = function () { var isOpen = _this.state.isOpen; - if (!isOpen) { _this.setState({ isOpen: true }); } }; - _this.close = function () { _this.setState({ isOpen: false }); }; - var _dateFormat = _this.getDateFormat(); - _this.state = { textValue: utils.fromISOToViewFormat(props.value, _dateFormat), isOpen: false }; return _this; } - _createClass(DateInput, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var value = this.props.value; var dateFormat = this.getDateFormat(); - if (value !== prevProps.value) { this.setState({ textValue: utils.fromISOToViewFormat(value, dateFormat) @@ -143,20 +112,19 @@ function (_React$Component) { key: "getDateFormat", value: function getDateFormat() { var _this$props2 = this.props, - isMonthPicker = _this$props2.isMonthPicker, - withTime = _this$props2.withTime; + isMonthPicker = _this$props2.isMonthPicker, + withTime = _this$props2.withTime; return isMonthPicker ? utils.YEAR_MONTH_FORMAT : withTime ? utils.DATETIME_FORMAT : utils.DATE_FORMAT; } }, { key: "collectProps", value: function collectProps() { var _this$props3 = this.props, - value = _this$props3.value, - withTime = _this$props3.withTime, - withPortal = _this$props3.withPortal, - isMonthPicker = _this$props3.isMonthPicker, - rest = _objectWithoutProperties(_this$props3, ["value", "withTime", "withPortal", "isMonthPicker"]); - + value = _this$props3.value, + withTime = _this$props3.withTime, + withPortal = _this$props3.withPortal, + isMonthPicker = _this$props3.isMonthPicker, + rest = _objectWithoutProperties(_this$props3, ["value", "withTime", "withPortal", "isMonthPicker"]); return _objectSpread({ selected: utils.fromISOtoJSDate(value), dateFormat: this.getDateFormat() @@ -172,23 +140,21 @@ function (_React$Component) { key: "render", value: function render() { var collectedProps = this.collectProps(); - var _this$props4 = this.props, - value = _this$props4.value, - withTime = _this$props4.withTime, - withPortal = _this$props4.withPortal, - stretch = _this$props4.stretch, - onChange = _this$props4.onChange, - clearable = _this$props4.clearable, - disabled = _this$props4.disabled, - placeholder = _this$props4.placeholder, - isMonthPicker = _this$props4.isMonthPicker, - autoFocus = _this$props4.autoFocus, - rest = _objectWithoutProperties(_this$props4, ["value", "withTime", "withPortal", "stretch", "onChange", "clearable", "disabled", "placeholder", "isMonthPicker", "autoFocus"]); - + value = _this$props4.value, + withTime = _this$props4.withTime, + withPortal = _this$props4.withPortal, + stretch = _this$props4.stretch, + onChange = _this$props4.onChange, + clearable = _this$props4.clearable, + disabled = _this$props4.disabled, + placeholder = _this$props4.placeholder, + isMonthPicker = _this$props4.isMonthPicker, + autoFocus = _this$props4.autoFocus, + rest = _objectWithoutProperties(_this$props4, ["value", "withTime", "withPortal", "stretch", "onChange", "clearable", "disabled", "placeholder", "isMonthPicker", "autoFocus"]); var _this$state = this.state, - textValue = _this$state.textValue, - isOpen = _this$state.isOpen; + textValue = _this$state.textValue, + isOpen = _this$state.isOpen; var mask = isMonthPicker ? utils.YEAR_MONTH_MASK : withTime ? utils.DATETIME_MASK : utils.DATE_MASK; return ___EmotionJSX(DateInputTag, _extends({ stretch: stretch @@ -222,10 +188,8 @@ function (_React$Component) { }, ___EmotionJSX(DatePicker, collectedProps)))); } }]); - return DateInput; }(React.Component); - DateInput.defaultProps = { stretch: true, withPortal: true diff --git a/es/components/DateInput/DateInput.theme.js b/es/components/DateInput/DateInput.theme.js index 131fab76..86e0914d 100644 --- a/es/components/DateInput/DateInput.theme.js +++ b/es/components/DateInput/DateInput.theme.js @@ -1,60 +1,61 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; +import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -import { css } from '@emotion/core'; -import { createThemeTag } from '../../theme/createThemeTag'; // eslint-disable-next-line - -var _createThemeTag = createThemeTag('dateInput', function (_ref) { - var COLORS = _ref.COLORS; - return { - root: { - display: 'flex', - flexDirection: 'row' - }, - modifiers: { - stretch: { - width: '100%' - } - }, - globals: - /*#__PURE__*/ - css(".react-datepicker{border:1px solid ", COLORS.PRIMARY_BORDER_COLOR, ";box-shadow:0 2px 10px 0 rgba(208,215,221,0.5);display:flex;padding-bottom:32px;font-size:12px;font-family:inherit;color:", COLORS.PRIMARY_TEXT_COLOR, ";}.react-datepicker__header,.react-datepicker__today-button{background-color:", COLORS.GRAY_10, ";}.react-datepicker__month-container{width:224px;}.react-datepicker__month{margin:0;}.react-datepicker__day-name{padding:0;width:32px;height:32px;margin:0;display:flex;justify-content:center;align-items:center;color:", COLORS.PRIMARY_TEXT_COLOR, ";}.react-datepicker__day{padding:0;width:24px;height:24px;margin:0;display:flex;justify-content:center;align-items:center;color:", COLORS.PRIMARY_TEXT_COLOR, ";margin-left:4px;margin-right:4px;}.react-datepicker__day:hover{border-radius:24px;}.react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected{background-color:", COLORS.BLUE_10, ";font-weight:600;}.react-datepicker__week{display:flex;padding-top:4px;padding-bottom:4px;}.react-datepicker__time-list{max-height:224px !important;height:auto !important;}.react-datepicker__time-container{position:initial;border:none;border-left:1px solid ", COLORS.PRIMARY_BORDER_COLOR, ";border-radius:0;}.react-datepicker__header--time{border-bottom:1px solid ", COLORS.PRIMARY_BORDER_COLOR, ";height:32px;}.react-datepicker-time__header{font-size:12px;color:", COLORS.PRIMARY_TEXT_COLOR, ";font-weight:600;}.react-datepicker__day--today{color:", COLORS.PRIMARY_TEXT_COLOR, ";font-weight:600;}.react-datepicker__day--selected{border-radius:24px;background-color:", COLORS.BLUE_10, ";color:", COLORS.LIGHT_PRIMARY_TEXT_COLOR, ";}.react-datepicker__today-button{position:absolute;bottom:0;width:100%;height:32px;font-weight:600;border-top:1px solid ", COLORS.PRIMARY_BORDER_COLOR, ";}.react-datepicker__header{border-bottom:1px solid ", COLORS.PRIMARY_BORDER_COLOR, ";padding-top:6px;}.react-datepicker__day-names{display:flex;margin-top:6px;}.react-datepicker-year-header{padding-bottom:6px;}.react-datepicker__current-month,.react-datepicker-year-header{font-size:13px;font-weight:600;color:", COLORS.PRIMARY_TEXT_COLOR, ";}.react-datepicker__month-wrapper{display:flex;}.react-datepicker__month-text{flex:1;padding:6px 0;}.react-datepicker__month--selected,.react-datepicker__month--in-selecting-range,.react-datepicker__month--in-range{background-color:", COLORS.BLUE_10, ";color:", COLORS.LIGHT_PRIMARY_TEXT_COLOR, ";}.react-datepicker__time-list-item{align-items:center;display:flex;height:32px !important;justify-content:center;padding:0 !important;}.react-datepicker__header--time,.react-datepicker__current-month{align-items:center;display:flex;justify-content:center;padding:0;}.react-datepicker__navigation--previous{border-right-color:", COLORS.PRIMARY_TEXT_COLOR, ";outline:none;}.react-datepicker__navigation--next{border-left-color:", COLORS.PRIMARY_TEXT_COLOR, ";outline:none;}.react-datepicker__navigation--next--with-time{right:80px;}.react-datepicker__day--disabled,.react-datepicker__time-list-item--disabled{color:", COLORS.DISABLED_TEXT_COLOR, ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0RhdGVJbnB1dC9EYXRlSW5wdXQudGhlbWUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZWMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvRGF0ZUlucHV0L0RhdGVJbnB1dC50aGVtZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnO1xuXG5pbXBvcnQgeyBjcmVhdGVUaGVtZVRhZyB9IGZyb20gJy4uLy4uL3RoZW1lL2NyZWF0ZVRoZW1lVGFnJztcblxuLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lXG5jb25zdCBbRGF0ZUlucHV0VGFnLCB0aGVtZURhdGVJbnB1dF0gPSBjcmVhdGVUaGVtZVRhZygnZGF0ZUlucHV0JywgKHsgQ09MT1JTIH06ICopID0+ICh7XG4gIHJvb3Q6IHtcbiAgICBkaXNwbGF5OiAnZmxleCcsXG4gICAgZmxleERpcmVjdGlvbjogJ3JvdycsXG4gIH0sXG4gIG1vZGlmaWVyczoge1xuICAgIHN0cmV0Y2g6IHtcbiAgICAgIHdpZHRoOiAnMTAwJScsXG4gICAgfSxcbiAgfSxcbiAgZ2xvYmFsczogY3NzYFxuICAgIC5yZWFjdC1kYXRlcGlja2VyIHtcbiAgICAgIGJvcmRlcjogMXB4IHNvbGlkICR7Q09MT1JTLlBSSU1BUllfQk9SREVSX0NPTE9SfTtcbiAgICAgIGJveC1zaGFkb3c6IDAgMnB4IDEwcHggMCByZ2JhKDIwOCwgMjE1LCAyMjEsIDAuNSk7XG4gICAgICBkaXN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0ZW0tLWRpc2FibGVkIHtcbiAgICAgIGNvbG9yOiAke0NPTE9SUy5ESVNBQkxFRF9URVhUX0NPTE9SfTtcbiAgICB9XG4gIGAsXG59KSk7XG5cbmNvbnN0IFtEYXRlSW5wdXRDYWxlbmRhclRhZywgdGhlbWVEYXRlSW5wdXRDYWxlbmRhcl0gPSBjcmVhdGVUaGVtZVRhZygnZGF0ZUlucHV0Q2FsZW5kYXInLCAoeyBDT0xPUlMsIFNJWkVTIH06ICopID0+ICh7XG4gIHJvb3Q6IHtcbiAgICBkaXNwbGF5OiAnZmxleCcsXG4gICAgZmxleERpcmVjdGlvbjogJ3JvdycsXG4gICAgbWF4SGVpZ2h0OiAzNixcbiAgICBtYXhXaWR0aDogMzYsXG4gICAgbWluSGVpZ2h0OiAzNixcbiAgICBtaW5XaWR0aDogMzYsXG4gICAgYWxpZ25JdGVtczogJ2NlbnRlcicsXG4gICAganVzdGlmeUNvbnRlbnQ6ICdjZW50ZXInLFxuICAgIGJvcmRlckNvbG9yOiBDT0xPUlMuUFJJTUFSWV9CT1JERVJfQ09MT1IsXG4gICAgYm9yZGVyVG9wUmlnaHRSYWRpdXM6IFNJWkVTLk1BSU5fQk9SREVSX1JBRElVUyxcbiAgICBib3JkZXJCb3R0b21SaWdodFJhZGl1czogU0laRVMuTUFJTl9CT1JERVJfUkFESVVTLFxuICAgIGJvcmRlcldpZHRoOiAxLFxuICAgIGJvcmRlclN0eWxlOiAnc29saWQnLFxuICAgIG1hcmdpbkxlZnQ6IC0xLFxuICB9LFxufSkpO1xuXG5jb25zdCB0aGVtZSA9IHtcbiAgLi4udGhlbWVEYXRlSW5wdXQsXG4gIC4uLnRoZW1lRGF0ZUlucHV0Q2FsZW5kYXIsXG59O1xuXG5leHBvcnQgeyB0aGVtZSwgRGF0ZUlucHV0VGFnLCBEYXRlSW5wdXRDYWxlbmRhclRhZyB9O1xuIl19 */")) +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } +function _templateObject() { + var data = _taggedTemplateLiteral(["\n .react-datepicker {\n border: 1px solid ", ";\n box-shadow: 0 2px 10px 0 rgba(208, 215, 221, 0.5);\n display: flex;\n padding-bottom: 32px;\n font-size: 12px;\n font-family: inherit;\n color: ", ";\n }\n\n .react-datepicker__header,\n .react-datepicker__today-button {\n background-color: ", ";\n }\n\n .react-datepicker__month-container {\n width: 224px;\n }\n\n .react-datepicker__month {\n margin: 0;\n }\n\n .react-datepicker__day-name {\n padding: 0;\n width: 32px;\n height: 32px;\n margin: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ", ";\n }\n\n .react-datepicker__day {\n padding: 0;\n width: 24px;\n height: 24px;\n margin: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ", ";\n margin-left: 4px;\n margin-right: 4px;\n }\n\n .react-datepicker__day:hover {\n border-radius: 24px;\n }\n\n .react-datepicker__time-container\n .react-datepicker__time\n .react-datepicker__time-box\n ul.react-datepicker__time-list\n li.react-datepicker__time-list-item--selected {\n background-color: ", ";\n font-weight: 600;\n }\n\n .react-datepicker__week {\n display: flex;\n padding-top: 4px;\n padding-bottom: 4px;\n }\n\n .react-datepicker__time-list {\n max-height: 224px !important;\n height: auto !important;\n }\n\n .react-datepicker__time-container {\n position: initial;\n border: none;\n border-left: 1px solid ", ";\n border-radius: 0;\n }\n\n .react-datepicker__header--time {\n border-bottom: 1px solid ", ";\n height: 32px;\n }\n\n .react-datepicker-time__header {\n font-size: 12px;\n color: ", ";\n font-weight: 600;\n }\n\n .react-datepicker__day--today {\n color: ", ";\n font-weight: 600;\n }\n\n .react-datepicker__day--selected {\n border-radius: 24px;\n background-color: ", ";\n color: ", ";\n }\n\n .react-datepicker__today-button {\n position: absolute;\n bottom: 0;\n width: 100%;\n height: 32px;\n font-weight: 600;\n border-top: 1px solid ", ";\n }\n\n .react-datepicker__header {\n border-bottom: 1px solid ", ";\n padding-top: 6px;\n }\n\n .react-datepicker__day-names {\n display: flex;\n margin-top: 6px;\n }\n\n .react-datepicker-year-header {\n padding-bottom: 6px;\n }\n\n .react-datepicker__current-month,\n .react-datepicker-year-header {\n font-size: 13px;\n font-weight: 600;\n color: ", ";\n }\n\n .react-datepicker__month-wrapper {\n display: flex;\n }\n\n .react-datepicker__month-text {\n flex: 1;\n padding: 6px 0;\n }\n\n .react-datepicker__month--selected,\n .react-datepicker__month--in-selecting-range,\n .react-datepicker__month--in-range {\n background-color: ", ";\n color: ", ";\n }\n\n .react-datepicker__time-list-item {\n align-items: center;\n display: flex;\n height: 32px !important;\n justify-content: center;\n padding: 0 !important;\n }\n\n .react-datepicker__header--time,\n .react-datepicker__current-month {\n align-items: center;\n display: flex;\n justify-content: center;\n padding: 0;\n }\n\n .react-datepicker__navigation--previous {\n border-right-color: ", ";\n outline: none;\n }\n\n .react-datepicker__navigation--next {\n border-left-color: ", ";\n outline: none;\n }\n\n .react-datepicker__navigation--next--with-time {\n right: 80px;\n }\n\n /* Disabled modifier */\n .react-datepicker__day--disabled,\n .react-datepicker__time-list-item--disabled {\n color: ", ";\n }\n "]); + _templateObject = function _templateObject() { + return data; }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - DateInputTag = _createThemeTag2[0], - themeDateInput = _createThemeTag2[1]; + return data; +} +import { css } from '@emotion/react'; +import { createThemeTag } from '../../theme/createThemeTag'; +// eslint-disable-next-line +var _createThemeTag = createThemeTag('dateInput', function (_ref) { + var COLORS = _ref.COLORS; + return { + root: { + display: 'flex', + flexDirection: 'row' + }, + modifiers: { + stretch: { + width: '100%' + } + }, + globals: css(_templateObject(), COLORS.PRIMARY_BORDER_COLOR, COLORS.PRIMARY_TEXT_COLOR, COLORS.GRAY_10, COLORS.PRIMARY_TEXT_COLOR, COLORS.PRIMARY_TEXT_COLOR, COLORS.BLUE_10, COLORS.PRIMARY_BORDER_COLOR, COLORS.PRIMARY_BORDER_COLOR, COLORS.PRIMARY_TEXT_COLOR, COLORS.PRIMARY_TEXT_COLOR, COLORS.BLUE_10, COLORS.LIGHT_PRIMARY_TEXT_COLOR, COLORS.PRIMARY_BORDER_COLOR, COLORS.PRIMARY_BORDER_COLOR, COLORS.PRIMARY_TEXT_COLOR, COLORS.BLUE_10, COLORS.LIGHT_PRIMARY_TEXT_COLOR, COLORS.PRIMARY_TEXT_COLOR, COLORS.PRIMARY_TEXT_COLOR, COLORS.DISABLED_TEXT_COLOR) + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + DateInputTag = _createThemeTag2[0], + themeDateInput = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag('dateInputCalendar', function (_ref2) { - var COLORS = _ref2.COLORS, + var COLORS = _ref2.COLORS, SIZES = _ref2.SIZES; - return { - root: { - display: 'flex', - flexDirection: 'row', - maxHeight: 36, - maxWidth: 36, - minHeight: 36, - minWidth: 36, - alignItems: 'center', - justifyContent: 'center', - borderColor: COLORS.PRIMARY_BORDER_COLOR, - borderTopRightRadius: SIZES.MAIN_BORDER_RADIUS, - borderBottomRightRadius: SIZES.MAIN_BORDER_RADIUS, - borderWidth: 1, - borderStyle: 'solid', - marginLeft: -1 - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - DateInputCalendarTag = _createThemeTag4[0], - themeDateInputCalendar = _createThemeTag4[1]; - + return { + root: { + display: 'flex', + flexDirection: 'row', + maxHeight: 36, + maxWidth: 36, + minHeight: 36, + minWidth: 36, + alignItems: 'center', + justifyContent: 'center', + borderColor: COLORS.PRIMARY_BORDER_COLOR, + borderTopRightRadius: SIZES.MAIN_BORDER_RADIUS, + borderBottomRightRadius: SIZES.MAIN_BORDER_RADIUS, + borderWidth: 1, + borderStyle: 'solid', + marginLeft: -1 + } + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + DateInputCalendarTag = _createThemeTag4[0], + themeDateInputCalendar = _createThemeTag4[1]; var theme = _objectSpread({}, themeDateInput, {}, themeDateInputCalendar); - export { theme, DateInputTag, DateInputCalendarTag }; \ No newline at end of file diff --git a/es/components/DateInput/DateInput.theme.js.flow b/es/components/DateInput/DateInput.theme.js.flow index 015dda98..ab557875 100644 --- a/es/components/DateInput/DateInput.theme.js.flow +++ b/es/components/DateInput/DateInput.theme.js.flow @@ -1,4 +1,4 @@ -import { css } from '@emotion/core'; +import { css } from '@emotion/react'; import { createThemeTag } from '../../theme/createThemeTag'; diff --git a/es/components/DateInput/DateInput.utils.js b/es/components/DateInput/DateInput.utils.js index 8b49b54d..19c72eb3 100644 --- a/es/components/DateInput/DateInput.utils.js +++ b/es/components/DateInput/DateInput.utils.js @@ -8,7 +8,6 @@ export var DATETIME_FORMAT = 'MM/dd/yyyy, hh:mm a'; export var fromISOToViewFormat = function fromISOToViewFormat(value, dateFormat) { if (value) { value = DateTime.fromISO(value); - if (value.isValid) { value = value.toFormat(dateFormat || DATE_FORMAT); } else { @@ -17,13 +16,11 @@ export var fromISOToViewFormat = function fromISOToViewFormat(value, dateFormat) } else { value = ''; } - return value; }; export var fromISOtoJSDate = function fromISOtoJSDate(value) { if (value) { value = DateTime.fromISO(value); - if (value.isValid) { value = value.toJSDate(); } else { @@ -32,7 +29,6 @@ export var fromISOtoJSDate = function fromISOtoJSDate(value) { } else { value = null; } - return value; }; export var fromJSDateToISO = function fromJSDateToISO(value, withTime) { @@ -42,7 +38,6 @@ export var fromJSDateToISO = function fromJSDateToISO(value, withTime) { } else { value = null; } - return value; }; export var fromViewFormatToLuxon = function fromViewFormatToLuxon(value, dateFormat) { @@ -51,7 +46,6 @@ export var fromViewFormatToLuxon = function fromViewFormatToLuxon(value, dateFor } else { value = null; } - return value; }; export var fromLuxonToISO = function fromLuxonToISO(value, withTime) { @@ -60,6 +54,5 @@ export var fromLuxonToISO = function fromLuxonToISO(value, withTime) { } else { value = null; } - return value; }; \ No newline at end of file diff --git a/es/components/DateInput/DateInputValue.js b/es/components/DateInput/DateInputValue.js index debb479a..54a005ef 100644 --- a/es/components/DateInput/DateInputValue.js +++ b/es/components/DateInput/DateInputValue.js @@ -1,23 +1,22 @@ import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; import { jsx as ___EmotionJSX } from "@emotion/core"; +function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } import React from 'react'; import { Input } from '../Input'; - var _ref2 = process.env.NODE_ENV === "production" ? { name: "gqnu2z", styles: "& > input{border-top-right-radius:0;border-bottom-right-radius:0;}" } : { name: "gqnu2z", styles: "& > input{border-top-right-radius:0;border-bottom-right-radius:0;}", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0RhdGVJbnB1dC9EYXRlSW5wdXRWYWx1ZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQlMiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvRGF0ZUlucHV0L0RhdGVJbnB1dFZhbHVlLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQGZsb3dcblxuaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcblxuaW1wb3J0IHsgSW5wdXQgfSBmcm9tICcuLi9JbnB1dCc7XG5cbnR5cGUgRGF0Z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VQcm9wcyA9IHtcbiAgb25DaGFuZ2U6ICh2YWx1ZTogT2JqZWN0KSA9PiB2b2lkLFxuICBvbkJsdXI6ICgpID0+IHZvaWQsXG4gIHZhbHVlOiA/c3RyaW5nLFxuICBtYXNrOiBzdHJpbmcsXG4gIGNsZWFyYWJsZT86IGJvb2xlYW4sXG4gIGRpc2FibGVkPzogYm9vbGVhbixcbn07XG5cbmNvbnN0IERhdGVJbnB1dFZhbHVlID0gKHsgdmFsdWUsIG9uQ2hhbmdlLCAuLi5wcm9wcyB9OiBEYXRlSW5wdXRWYWx1ZVByb3BzKSA9PiAoXG4gIDxJbnB1dCBjc3M9e3sgJyYgPiBpbnB1dCc6IHsgYm9yZGVyVG9wUmlnaHRSYWRpdXM6IDAsIGJvcmRlckJvdHRvbVJpZ2h0UmFkaXVzOiAwIH19fSBvbkNoYW5nZT17ICh2YWwpID0+IG9uQ2hhbmdlKHsgdGFyZ2V0OiB7IHZhbHVlOiB2YWwgfX0pIH0gdmFsdWU9eyB2YWx1ZSB9IHsgLi4ucHJvcHMgfSAvPlxuKTtcblxuZXhwb3J0IHsgRGF0ZUlucHV0VmFsdWUgfTtcbiJdfQ== */", + toString: _EMOTION_STRINGIFIED_CSS_ERROR__ }; - var DateInputValue = function DateInputValue(_ref) { var value = _ref.value, - _onChange = _ref.onChange, - props = _objectWithoutProperties(_ref, ["value", "onChange"]); - + _onChange = _ref.onChange, + props = _objectWithoutProperties(_ref, ["value", "onChange"]); return ___EmotionJSX(Input, _extends({ css: _ref2, onChange: function onChange(val) { @@ -30,5 +29,4 @@ var DateInputValue = function DateInputValue(_ref) { value: value }, props)); }; - export { DateInputValue }; \ No newline at end of file diff --git a/es/components/DateInputField/DateInputField.js b/es/components/DateInputField/DateInputField.js index 659168ab..bf9f3dca 100644 --- a/es/components/DateInputField/DateInputField.js +++ b/es/components/DateInputField/DateInputField.js @@ -4,18 +4,15 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { DateInput } from '../DateInput'; import { FormField } from '../Form/FormField'; - function DateInputField(_ref) { var label = _ref.label, - input = _ref.input, - meta = _ref.meta, - rest = _objectWithoutProperties(_ref, ["label", "input", "meta"]); - + input = _ref.input, + meta = _ref.meta, + rest = _objectWithoutProperties(_ref, ["label", "input", "meta"]); var _ref2 = input || {}, - name = _ref2.name, - value = _ref2.value, - onChange = _ref2.onChange; - + name = _ref2.name, + value = _ref2.value, + onChange = _ref2.onChange; return ___EmotionJSX(FormField, { label: label, input: input, @@ -26,5 +23,4 @@ function DateInputField(_ref) { onChange: onChange }))); } - export { DateInputField }; \ No newline at end of file diff --git a/es/components/Dialog/Dialog.js b/es/components/Dialog/Dialog.js index 479156ae..1376d959 100644 --- a/es/components/Dialog/Dialog.js +++ b/es/components/Dialog/Dialog.js @@ -8,22 +8,20 @@ import { DialogBody } from './DialogBody'; import { DialogFooter } from './DialogFooter'; import { DialogHeader } from './DialogHeader'; import { DialogTag, DialogInnerTag } from './Dialog.theme'; - var Dialog = function Dialog(_ref) { var children = _ref.children, - id = _ref.id, - isOpen = _ref.isOpen, - onOpen = _ref.onOpen, - onClose = _ref.onClose, - shouldCloseOnOverlayClick = _ref.shouldCloseOnOverlayClick, - shouldCloseOnEscPress = _ref.shouldCloseOnEscPress, - size = _ref.size, - args = _ref.args, - padding = _ref.padding, - tagName = _ref.tagName, - stretch = _ref.stretch, - rest = _objectWithoutProperties(_ref, ["children", "id", "isOpen", "onOpen", "onClose", "shouldCloseOnOverlayClick", "shouldCloseOnEscPress", "size", "args", "padding", "tagName", "stretch"]); - + id = _ref.id, + isOpen = _ref.isOpen, + onOpen = _ref.onOpen, + onClose = _ref.onClose, + shouldCloseOnOverlayClick = _ref.shouldCloseOnOverlayClick, + shouldCloseOnEscPress = _ref.shouldCloseOnEscPress, + size = _ref.size, + args = _ref.args, + padding = _ref.padding, + tagName = _ref.tagName, + stretch = _ref.stretch, + rest = _objectWithoutProperties(_ref, ["children", "id", "isOpen", "onOpen", "onClose", "shouldCloseOnOverlayClick", "shouldCloseOnEscPress", "size", "args", "padding", "tagName", "stretch"]); return ___EmotionJSX(Modal, _extends({}, rest, { id: id, isOpen: isOpen, @@ -35,7 +33,7 @@ var Dialog = function Dialog(_ref) { stretch: stretch }), function (_ref2) { var args = _ref2.args, - onClose = _ref2.onClose; + onClose = _ref2.onClose; return ___EmotionJSX(DialogTag, { tagName: tagName, size: size, @@ -50,7 +48,6 @@ var Dialog = function Dialog(_ref) { } : ___EmotionJSX(DialogInnerTag, null, children))); }); }; - Dialog.defaultProps = { size: 'md', padding: 'md', diff --git a/es/components/Dialog/Dialog.stories.js b/es/components/Dialog/Dialog.stories.js index 40677ede..9d7140f3 100644 --- a/es/components/Dialog/Dialog.stories.js +++ b/es/components/Dialog/Dialog.stories.js @@ -107,7 +107,7 @@ withScroll.story = { export var withState = function withState() { return ___EmotionJSX(ModalContext.Consumer, null, function (_ref) { var openModal = _ref.openModal, - closeModal = _ref.closeModal; + closeModal = _ref.closeModal; return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Dialog, { id: "ID", size: "sm", @@ -116,7 +116,7 @@ export var withState = function withState() { } }, function (_ref2) { var args = _ref2.args, - onClose = _ref2.onClose; + onClose = _ref2.onClose; return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Dialog.Header, { title: "Mark Job as Completed", onClose: onClose diff --git a/es/components/Dialog/Dialog.test.js b/es/components/Dialog/Dialog.test.js index bd083804..ca540e31 100644 --- a/es/components/Dialog/Dialog.test.js +++ b/es/components/Dialog/Dialog.test.js @@ -49,11 +49,9 @@ describe('', function () { args: args }; var wrapper = shallow(___EmotionJSX(Dialog, modalProps)); - var _wrapper$find$props = wrapper.find(Modal).props(), - children = _wrapper$find$props.children, - passedProps = _objectWithoutProperties(_wrapper$find$props, ["children"]); - + children = _wrapper$find$props.children, + passedProps = _objectWithoutProperties(_wrapper$find$props, ["children"]); expect(passedProps).toEqual(modalProps); }); it('should call onClose callback on overlay click', function () { diff --git a/es/components/Dialog/Dialog.theme.js b/es/components/Dialog/Dialog.theme.js index 0e5112e1..4acaf67b 100644 --- a/es/components/Dialog/Dialog.theme.js +++ b/es/components/Dialog/Dialog.theme.js @@ -1,94 +1,85 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; - var _createThemeTag = createThemeTag('dialogBody', { - root: { - display: 'flex', - flexDirection: 'column', - flexShrink: 1, - flexGrow: 1, - maxHeight: '100%' - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - DialogBodyTag = _createThemeTag2[0], - themeBody = _createThemeTag2[1]; - + root: { + display: 'flex', + flexDirection: 'column', + flexShrink: 1, + flexGrow: 1, + maxHeight: '100%' + } + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + DialogBodyTag = _createThemeTag2[0], + themeBody = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag('dialogHeaderClose', { - root: { - cursor: 'pointer', - userSelect: 'none', - position: 'absolute', - right: '20px', - display: 'flex', - '&:hover': { - color: '#8698a7' + root: { + cursor: 'pointer', + userSelect: 'none', + position: 'absolute', + right: '20px', + display: 'flex', + '&:hover': { + color: '#8698a7' + } } - } -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - HeaderCloseTag = _createThemeTag4[0], - themeHeaderClose = _createThemeTag4[1]; - + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + HeaderCloseTag = _createThemeTag4[0], + themeHeaderClose = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag('dialog', { - root: { - display: 'flex', - flexDirection: 'column', - justifyContent: 'center', - maxHeight: 'calc(100vh - 80px)' - }, - modifiers: { - stretch: { - height: '100%' + root: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + maxHeight: 'calc(100vh - 80px)' }, - size: { - xs: { - width: '300px' + modifiers: { + stretch: { + height: '100%' }, - sm: { - width: '400px' - }, - md: { - width: '500px' - }, - lg: { - width: '600px' - }, - xl: { - width: '800px' - }, - xxl: { - width: '1000px' + size: { + xs: { + width: '300px' + }, + sm: { + width: '400px' + }, + md: { + width: '500px' + }, + lg: { + width: '600px' + }, + xl: { + width: '800px' + }, + xxl: { + width: '1000px' + } } } - } -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - DialogTag = _createThemeTag6[0], - themeDialog = _createThemeTag6[1]; - + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + DialogTag = _createThemeTag6[0], + themeDialog = _createThemeTag6[1]; var _createThemeTag7 = createThemeTag('dialogInner', { - root: { - '&, & > form': { - display: 'flex', - flexDirection: 'column', - justifyContent: 'flex-start' + root: { + '&, & > form': { + display: 'flex', + flexDirection: 'column', + justifyContent: 'flex-start' + }, + height: '100%', + overflow: 'auto' }, - height: '100%', - overflow: 'auto' - }, - modifiers: {} -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - DialogInnerTag = _createThemeTag8[0], - themeDialogInner = _createThemeTag8[1]; - + modifiers: {} + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + DialogInnerTag = _createThemeTag8[0], + themeDialogInner = _createThemeTag8[1]; var theme = _objectSpread({}, themeDialog, {}, themeDialogInner, {}, themeBody, {}, themeHeaderClose); - export { theme, DialogTag, HeaderCloseTag, DialogBodyTag, DialogInnerTag }; \ No newline at end of file diff --git a/es/components/Dialog/DialogBody.js b/es/components/Dialog/DialogBody.js index f70f0c15..85b9d86b 100644 --- a/es/components/Dialog/DialogBody.js +++ b/es/components/Dialog/DialogBody.js @@ -4,16 +4,13 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { DialogBodyTag } from './Dialog.theme'; import { Card } from '../Card'; - var DialogBody = function DialogBody(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(DialogBodyTag, _extends({ tagName: Card.Body }, rest), children); }; - DialogBody.defaultProps = { scrollable: true }; diff --git a/es/components/Dialog/DialogFooter.js b/es/components/Dialog/DialogFooter.js index 4190c130..c6f05e87 100644 --- a/es/components/Dialog/DialogFooter.js +++ b/es/components/Dialog/DialogFooter.js @@ -4,16 +4,13 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { Card } from '../Card'; import { Row } from '../FlexLayout'; - function DialogFooter(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(Card.Footer, _extends({ offset: "lg" }, rest), ___EmotionJSX(Row, { justifyContent: "end" }, children)); } - export { DialogFooter }; \ No newline at end of file diff --git a/es/components/Dialog/DialogHeader.js b/es/components/Dialog/DialogHeader.js index 7bce2142..56bf1f17 100644 --- a/es/components/Dialog/DialogHeader.js +++ b/es/components/Dialog/DialogHeader.js @@ -6,12 +6,10 @@ import { HeaderCloseTag } from './Dialog.theme'; import { Card } from '../Card'; import { Text } from '../Text'; import { Icon } from '../Icon'; - function DialogHeader(_ref) { var title = _ref.title, - onClose = _ref.onClose, - rest = _objectWithoutProperties(_ref, ["title", "onClose"]); - + onClose = _ref.onClose, + rest = _objectWithoutProperties(_ref, ["title", "onClose"]); return ___EmotionJSX(Card.Header, _extends({ offset: "lg" }, rest), ___EmotionJSX(Text, { @@ -24,5 +22,4 @@ function DialogHeader(_ref) { title: "Close Dialog" }))); } - export { DialogHeader }; \ No newline at end of file diff --git a/es/components/Divider/Divider.js b/es/components/Divider/Divider.js index 4e83f4bc..b7d7f74c 100644 --- a/es/components/Divider/Divider.js +++ b/es/components/Divider/Divider.js @@ -3,13 +3,11 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { DividerOuter, DividerInner, DividerTitle } from './Divider.theme'; - var Divider = function Divider(_ref) { var children = _ref.children, - _ref$noOffset = _ref.noOffset, - noOffset = _ref$noOffset === void 0 ? false : _ref$noOffset, - rest = _objectWithoutProperties(_ref, ["children", "noOffset"]); - + _ref$noOffset = _ref.noOffset, + noOffset = _ref$noOffset === void 0 ? false : _ref$noOffset, + rest = _objectWithoutProperties(_ref, ["children", "noOffset"]); return ___EmotionJSX(DividerOuter, _extends({ noOffset: noOffset }, rest), !!children ? [___EmotionJSX(DividerInner, { @@ -20,5 +18,4 @@ var Divider = function Divider(_ref) { key: "2" })] : ___EmotionJSX(DividerInner, null)); }; - export { Divider }; \ No newline at end of file diff --git a/es/components/Divider/Divider.theme.js b/es/components/Divider/Divider.theme.js index 7eab5d42..e0bccc93 100644 --- a/es/components/Divider/Divider.theme.js +++ b/es/components/Divider/Divider.theme.js @@ -1,63 +1,55 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'divider'; - var _createThemeTag = createThemeTag(name, function () { - return { - root: function root(props) { - return { - width: '100%', - display: 'flex', - alignItems: 'center', - justifyContent: 'stretch', - marginTop: props.noOffset ? '0' : '24px', - marginBottom: props.noOffset ? '0' : '24px', - height: '18px' - }; - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - DividerOuter = _createThemeTag2[0], - themeOuter = _createThemeTag2[1]; - + return { + root: function root(props) { + return { + width: '100%', + display: 'flex', + alignItems: 'center', + justifyContent: 'stretch', + marginTop: props.noOffset ? '0' : '24px', + marginBottom: props.noOffset ? '0' : '24px', + height: '18px' + }; + } + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + DividerOuter = _createThemeTag2[0], + themeOuter = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Inner"), function (_ref) { - var COLORS = _ref.COLORS; - return { - root: { - height: '1px', - backgroundColor: COLORS.PRIMARY_BORDER_COLOR, - width: '100%' - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - DividerInner = _createThemeTag4[0], - themeInner = _createThemeTag4[1]; - + var COLORS = _ref.COLORS; + return { + root: { + height: '1px', + backgroundColor: COLORS.PRIMARY_BORDER_COLOR, + width: '100%' + } + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + DividerInner = _createThemeTag4[0], + themeInner = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag("".concat(name, "Title"), function (_ref2) { - var FONTS = _ref2.FONTS; - return { - root: _objectSpread({ - fontFamily: 'inherit' - }, FONTS.OVERLINE_2, { - whiteSpace: 'nowrap', - flexGrow: 2, - marginRight: '8px', - marginLeft: '8px' - }) - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - DividerTitle = _createThemeTag6[0], - themeTitle = _createThemeTag6[1]; - + var FONTS = _ref2.FONTS; + return { + root: _objectSpread({ + fontFamily: 'inherit' + }, FONTS.OVERLINE_2, { + whiteSpace: 'nowrap', + flexGrow: 2, + marginRight: '8px', + marginLeft: '8px' + }) + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + DividerTitle = _createThemeTag6[0], + themeTitle = _createThemeTag6[1]; var theme = _objectSpread({}, themeOuter, {}, themeInner, {}, themeTitle); - export { DividerOuter, DividerInner, DividerTitle, theme }; \ No newline at end of file diff --git a/es/components/Dropdown/Dropdown.js b/es/components/Dropdown/Dropdown.js index 4e1a8703..301f7eb6 100644 --- a/es/components/Dropdown/Dropdown.js +++ b/es/components/Dropdown/Dropdown.js @@ -6,9 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import _isNil from "lodash/fp/isNil"; - -var _class, _temp; - +var _class; import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { Component } from 'react'; import { compose, withStateHandlers, branch } from 'recompose'; @@ -17,7 +15,6 @@ import { DropdownContext } from './DropdownContext'; import { DropdownTag } from './Dropdown.theme'; import { DropdownHead } from './DropdownHead'; import { DropdownBody } from './DropdownBody'; - /** When component has defaultOpen prop then adds hoc with isOpen state */ var dropDownEnhancer = compose(branch(function (props) { return !_isNil(props.defaultOpen); @@ -41,53 +38,42 @@ var dropDownEnhancer = compose(branch(function (props) { }; } }))); -var DropdownPlate = dropDownEnhancer((_temp = _class = -/*#__PURE__*/ -function (_Component) { +var DropdownPlate = dropDownEnhancer((_class = /*#__PURE__*/function (_Component) { _inherits(DropdownPlate, _Component); - /** needs for the onclickoutside ignore target */ + function DropdownPlate(props) { var _this; - _classCallCheck(this, DropdownPlate); - _this = _possibleConstructorReturn(this, _getPrototypeOf(DropdownPlate).call(this, props)); - _this.toggleDropdown = function () { var _this$props = _this.props, - isOpen = _this$props.isOpen, - onOpenDropdown = _this$props.onOpenDropdown, - onCloseDropdown = _this$props.onCloseDropdown; + isOpen = _this$props.isOpen, + onOpenDropdown = _this$props.onOpenDropdown, + onCloseDropdown = _this$props.onCloseDropdown; isOpen ? onCloseDropdown && onCloseDropdown() : onOpenDropdown && onOpenDropdown(); }; - _this.setDropdownRef = function (ref) { _this.dropdownRef = ref; }; - _this.getDropdownWidth = function () { return _this.dropdownRef ? _this.dropdownRef.offsetWidth : undefined; }; - _this.getIgnoreClickOutsideClass = function () { return "ignore-react-onclickoutside-".concat(_this.instanceIndex); }; - _this.instanceIndex = DropdownPlate.instancesCount++; return _this; } - _createClass(DropdownPlate, [{ key: "render", value: function render() { var _this$props2 = this.props, - children = _this$props2.children, - onCloseDropdown = _this$props2.onCloseDropdown, - onOpenDropdown = _this$props2.onOpenDropdown, - isOpen = _this$props2.isOpen, - rest = _objectWithoutProperties(_this$props2, ["children", "onCloseDropdown", "onOpenDropdown", "isOpen"]); - + children = _this$props2.children, + onCloseDropdown = _this$props2.onCloseDropdown, + onOpenDropdown = _this$props2.onOpenDropdown, + isOpen = _this$props2.isOpen, + rest = _objectWithoutProperties(_this$props2, ["children", "onCloseDropdown", "onOpenDropdown", "isOpen"]); var contextData = { isOpen: isOpen, toggleDropdown: this.toggleDropdown, @@ -106,14 +92,11 @@ function (_Component) { }, children))); } }]); - return DropdownPlate; -}(Component), _class.instancesCount = 0, _temp)); - +}(Component), _class.instancesCount = 0, _class)); var Dropdown = function Dropdown(props) { return ___EmotionJSX(DropdownPlate, props); }; - Dropdown.displayName = 'Dropdown'; Dropdown.Head = DropdownHead; Dropdown.Body = DropdownBody; diff --git a/es/components/Dropdown/Dropdown.stories.js b/es/components/Dropdown/Dropdown.stories.js index e1beb5a2..d0c50aff 100644 --- a/es/components/Dropdown/Dropdown.stories.js +++ b/es/components/Dropdown/Dropdown.stories.js @@ -1,7 +1,6 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { Dropdown, Button, Icon, Menu, Column, Text, Row } from '../../'; - var BodyContent = function BodyContent() { return ___EmotionJSX("div", { style: { @@ -9,7 +8,6 @@ var BodyContent = function BodyContent() { } }, "Body"); }; - export default { title: 'Components/Dropdown', component: Dropdown diff --git a/es/components/Dropdown/Dropdown.theme.js b/es/components/Dropdown/Dropdown.theme.js index 170c7960..f106705b 100644 --- a/es/components/Dropdown/Dropdown.theme.js +++ b/es/components/Dropdown/Dropdown.theme.js @@ -1,28 +1,22 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; import { theme as dropdownHeadTheme } from './DropdownHead.theme'; import { theme as dropdownBodyTheme } from './DropdownBody.theme'; var name = 'dropdown'; - var _createThemeTag = createThemeTag(name, { - modifiers: { - stretch: { - height: '100%', - width: '100%' - } - }, - defaults: {} -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - DropdownTag = _createThemeTag2[0], - dropdownTheme = _createThemeTag2[1]; - + modifiers: { + stretch: { + height: '100%', + width: '100%' + } + }, + defaults: {} + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + DropdownTag = _createThemeTag2[0], + dropdownTheme = _createThemeTag2[1]; var theme = _objectSpread({}, dropdownTheme, {}, dropdownHeadTheme, {}, dropdownBodyTheme); - export { theme, DropdownTag }; \ No newline at end of file diff --git a/es/components/Dropdown/DropdownBody.js b/es/components/Dropdown/DropdownBody.js index 944e58da..8674329f 100644 --- a/es/components/Dropdown/DropdownBody.js +++ b/es/components/Dropdown/DropdownBody.js @@ -9,15 +9,10 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; import _pipe from "lodash/fp/pipe"; import _identity from "lodash/fp/identity"; import _merge from "lodash/fp/merge"; - -var _class, _temp; - +var _class; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React, { PureComponent, Fragment } from 'react'; import { compose, setDisplayName, withProps } from 'recompose'; import onClickOutside from 'react-onclickoutside'; @@ -26,7 +21,6 @@ import { Portal } from 'react-portal'; import { withDropdownContext } from './DropdownContext'; import { offsetSizes, DropdownBodyTag } from './DropdownBody.theme'; import { Z_INDEX } from '../../theme'; - var setPreventOverflow = function setPreventOverflow(preventOverflow) { return preventOverflow ? _merge({ preventOverflow: { @@ -37,7 +31,6 @@ var setPreventOverflow = function setPreventOverflow(preventOverflow) { } }) : _identity; }; - var setOffset = function setOffset(offset) { return offset && offset !== 'none' ? _merge({ offset: { @@ -46,78 +39,64 @@ var setOffset = function setOffset(offset) { } }) : _identity; }; - var setFlip = _merge({ flip: { behavior: ['bottom'], boundariesElement: 'viewport' } }); - var dropdownBodyEnhancer = compose(setDisplayName('Dropdown.Body'), withDropdownContext, withProps(function (_ref) { var outsideClickIgnoreClass = _ref.dropdown.outsideClickIgnoreClass; return { outsideClickIgnoreClass: outsideClickIgnoreClass }; }), onClickOutside); -var DropdownBody = dropdownBodyEnhancer((_temp = _class = -/*#__PURE__*/ -function (_PureComponent) { +var DropdownBody = dropdownBodyEnhancer((_class = /*#__PURE__*/function (_PureComponent) { _inherits(DropdownBodyBase, _PureComponent); - function DropdownBodyBase() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, DropdownBodyBase); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DropdownBodyBase)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.handleClickOutside = function () { var _this$props = _this.props, - closeOnClickOutside = _this$props.closeOnClickOutside, - closeDropdown = _this$props.dropdown.closeDropdown; + closeOnClickOutside = _this$props.closeOnClickOutside, + closeDropdown = _this$props.dropdown.closeDropdown; closeOnClickOutside && closeDropdown && closeDropdown(); }; - _this.getPopperPlacement = function () { var _this$props2 = _this.props, - pin = _this$props2.pin, - _this$props2$placemen = _this$props2.placement, - placement = _this$props2$placemen === void 0 ? '' : _this$props2$placemen; + pin = _this$props2.pin, + _this$props2$placemen = _this$props2.placement, + placement = _this$props2$placemen === void 0 ? '' : _this$props2$placemen; var popperPin = pin === 'left' ? 'start' : 'end'; return "".concat(placement, "-").concat(popperPin); }; - _this.getPopperModifiers = function () { var _this$props3 = _this.props, - preventOverflow = _this$props3.preventOverflow, - offset = _this$props3.offset, - modifiers = _this$props3.modifiers; + preventOverflow = _this$props3.preventOverflow, + offset = _this$props3.offset, + modifiers = _this$props3.modifiers; return _pipe(setFlip, setPreventOverflow(preventOverflow), setOffset(offset), _merge(modifiers))({}); }; - _this.getBodyWidth = function () { var _this$props4 = _this.props, - stretch = _this$props4.stretch, - targetWidth = _this$props4.dropdown.targetWidth, - width = _this$props4.width; + stretch = _this$props4.stretch, + targetWidth = _this$props4.dropdown.targetWidth, + width = _this$props4.width; return stretch ? targetWidth : width && "".concat(width, "px"); }; - _this.getBodyChildren = function () { var _this$props5 = _this.props, - children = _this$props5.children, - _this$props5$dropdown = _this$props5.dropdown, - toggleDropdown = _this$props5$dropdown.toggleDropdown, - closeDropdown = _this$props5$dropdown.closeDropdown, - openDropdown = _this$props5$dropdown.openDropdown, - isOpen = _this$props5$dropdown.isOpen; + children = _this$props5.children, + _this$props5$dropdown = _this$props5.dropdown, + toggleDropdown = _this$props5$dropdown.toggleDropdown, + closeDropdown = _this$props5$dropdown.closeDropdown, + openDropdown = _this$props5$dropdown.openDropdown, + isOpen = _this$props5$dropdown.isOpen; return typeof children === 'function' ? children({ toggleDropdown: toggleDropdown, closeDropdown: closeDropdown, @@ -125,20 +104,17 @@ function (_PureComponent) { isOpen: isOpen }) : children; }; - return _this; } - _createClass(DropdownBodyBase, [{ key: "render", value: function render() { var _this$props6 = this.props, - withPortal = _this$props6.withPortal, - forceRender = _this$props6.forceRender, - positionFixed = _this$props6.positionFixed, - isOpen = _this$props6.dropdown.isOpen, - rest = _objectWithoutProperties(_this$props6, ["withPortal", "forceRender", "positionFixed", "dropdown"]); - + withPortal = _this$props6.withPortal, + forceRender = _this$props6.forceRender, + positionFixed = _this$props6.positionFixed, + isOpen = _this$props6.dropdown.isOpen, + rest = _objectWithoutProperties(_this$props6, ["withPortal", "forceRender", "positionFixed", "dropdown"]); var popperPlacement = this.getPopperPlacement(); var popperModifiers = this.getPopperModifiers(); var bodyWidth = this.getBodyWidth(); @@ -150,8 +126,8 @@ function (_PureComponent) { positionFixed: positionFixed }, function (_ref2) { var ref = _ref2.ref, - style = _ref2.style, - placement = _ref2.placement; + style = _ref2.style, + placement = _ref2.placement; return ___EmotionJSX(DropdownBodyTag, _extends({}, rest, { insideRef: ref, "data-placement": placement, @@ -165,7 +141,6 @@ function (_PureComponent) { })) : null; } }]); - return DropdownBodyBase; }(PureComponent), _class.zIndex = Z_INDEX.DROPDOWN, _class.defaultProps = { background: 'none', @@ -179,5 +154,5 @@ function (_PureComponent) { withPortal: false, positionFixed: false, closeOnClickOutside: true -}, _temp)); +}, _class)); export { DropdownBody }; \ No newline at end of file diff --git a/es/components/Dropdown/DropdownBody.theme.js b/es/components/Dropdown/DropdownBody.theme.js index 4715b804..92de70c4 100644 --- a/es/components/Dropdown/DropdownBody.theme.js +++ b/es/components/Dropdown/DropdownBody.theme.js @@ -1,55 +1,53 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { createThemeTag } from '../../theme/createThemeTag'; var name = 'dropdownBody'; - var _createThemeTag = createThemeTag(name, { - root: { - borderRadius: '4px' - }, - modifiers: { - stretch: { - width: '100%' + root: { + borderRadius: '4px' }, - background: { - white: { - backgroundColor: '#fff', - border: '1px solid #d0d7dd', - boxShadow: '0 1px 3px 0 rgba(50,50,93,.14), 0 4px 6px 0 rgba(112,157,199,.08)' + modifiers: { + stretch: { + width: '100%' }, - dark: { - backgroundColor: '#323c47', - color: '#fff' + background: { + white: { + backgroundColor: '#fff', + border: '1px solid #d0d7dd', + boxShadow: '0 1px 3px 0 rgba(50,50,93,.14), 0 4px 6px 0 rgba(112,157,199,.08)' + }, + dark: { + backgroundColor: '#323c47', + color: '#fff' + }, + none: { + backgroundColor: 'transparent' + } }, - none: { - backgroundColor: 'transparent' - } - }, - padding: { - none: { - padding: '0' - }, - xs: { - padding: '4px' - }, - sm: { - padding: '8px' - }, - md: { - padding: '16px' - }, - lg: { - padding: '24px' - }, - xl: { - padding: '32px' + padding: { + none: { + padding: '0' + }, + xs: { + padding: '4px' + }, + sm: { + padding: '8px' + }, + md: { + padding: '16px' + }, + lg: { + padding: '24px' + }, + xl: { + padding: '32px' + } } } - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - DropdownBodyTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + DropdownBodyTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; var offsetSizes = { none: '0', xs: '0, 2px', diff --git a/es/components/Dropdown/DropdownContext.js b/es/components/Dropdown/DropdownContext.js index 8c11079b..5604203e 100644 --- a/es/components/Dropdown/DropdownContext.js +++ b/es/components/Dropdown/DropdownContext.js @@ -6,7 +6,6 @@ var DropdownContext = createContext({ outsideClickIgnoreClass: '' } }); - var withDropdownContext = function withDropdownContext(Component) { return function (props) { return ___EmotionJSX(DropdownContext.Consumer, null, function (dropdownData) { @@ -16,5 +15,4 @@ var withDropdownContext = function withDropdownContext(Component) { }); }; }; - export { DropdownContext, withDropdownContext }; \ No newline at end of file diff --git a/es/components/Dropdown/DropdownHead.js b/es/components/Dropdown/DropdownHead.js index b08fdb4f..3e3a31b6 100644 --- a/es/components/Dropdown/DropdownHead.js +++ b/es/components/Dropdown/DropdownHead.js @@ -5,9 +5,6 @@ import _createClass from "@babel/runtime/helpers/esm/createClass"; import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; - -var _temp; - import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { PureComponent } from 'react'; import { Reference } from 'react-popper'; @@ -15,54 +12,42 @@ import { compose, setDisplayName } from 'recompose'; import { withDropdownContext } from './DropdownContext'; import { DropdownHeadTag, DropdownPopperTarget } from './DropdownHead.theme'; var dropdownHeadEnhancer = compose(setDisplayName('Dropdown.Head'), withDropdownContext); -var DropdownHead = dropdownHeadEnhancer((_temp = -/*#__PURE__*/ -function (_PureComponent) { +var DropdownHead = dropdownHeadEnhancer(/*#__PURE__*/function (_PureComponent) { _inherits(DropdownHead, _PureComponent); - function DropdownHead() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, DropdownHead); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DropdownHead)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.onClick = function (event) { var _this$props = _this.props, - toggleDropdown = _this$props.dropdown.toggleDropdown, - disabled = _this$props.disabled, - stopClickPropagation = _this$props.stopClickPropagation, - onClick = _this$props.onClick, - children = _this$props.children; - + toggleDropdown = _this$props.dropdown.toggleDropdown, + disabled = _this$props.disabled, + stopClickPropagation = _this$props.stopClickPropagation, + onClick = _this$props.onClick, + children = _this$props.children; if (!!disabled || typeof children === 'function') { return; } - if (typeof onClick === 'function') { onClick(event); } else { toggleDropdown && toggleDropdown(); } - event.preventDefault(); stopClickPropagation && event.stopPropagation(); }; - _this.getHeadChildren = function () { var _this$props2 = _this.props, - children = _this$props2.children, - _this$props2$dropdown = _this$props2.dropdown, - toggleDropdown = _this$props2$dropdown.toggleDropdown, - closeDropdown = _this$props2$dropdown.closeDropdown, - openDropdown = _this$props2$dropdown.openDropdown, - isOpen = _this$props2$dropdown.isOpen; + children = _this$props2.children, + _this$props2$dropdown = _this$props2.dropdown, + toggleDropdown = _this$props2$dropdown.toggleDropdown, + closeDropdown = _this$props2$dropdown.closeDropdown, + openDropdown = _this$props2$dropdown.openDropdown, + isOpen = _this$props2$dropdown.isOpen; return typeof children === 'function' ? children({ toggleDropdown: toggleDropdown, closeDropdown: closeDropdown, @@ -70,18 +55,15 @@ function (_PureComponent) { isOpen: isOpen }) : children; }; - return _this; } - _createClass(DropdownHead, [{ key: "render", value: function render() { var _this$props3 = this.props, - outsideClickIgnoreClass = _this$props3.dropdown.outsideClickIgnoreClass, - children = _this$props3.children, - rest = _objectWithoutProperties(_this$props3, ["dropdown", "children"]); - + outsideClickIgnoreClass = _this$props3.dropdown.outsideClickIgnoreClass, + children = _this$props3.children, + rest = _objectWithoutProperties(_this$props3, ["dropdown", "children"]); var renderChildren = this.getHeadChildren(); return ___EmotionJSX(DropdownHeadTag, _extends({}, rest, { tagName: "div", @@ -96,7 +78,6 @@ function (_PureComponent) { })); } }]); - return DropdownHead; -}(PureComponent), _temp)); +}(PureComponent)); export { DropdownHead }; \ No newline at end of file diff --git a/es/components/Dropdown/DropdownHead.theme.js b/es/components/Dropdown/DropdownHead.theme.js index 00866737..a4a0d99e 100644 --- a/es/components/Dropdown/DropdownHead.theme.js +++ b/es/components/Dropdown/DropdownHead.theme.js @@ -1,44 +1,37 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'dropdownHead'; - var _createThemeTag = createThemeTag(name, { - root: { - cursor: 'pointer', - display: 'flex', - flexWrap: 'nowrap', - height: 'auto', - width: 'auto', - zIndex: 2 - }, - modifiers: { - stretch: { - height: '100%', - width: '100%' + root: { + cursor: 'pointer', + display: 'flex', + flexWrap: 'nowrap', + height: 'auto', + width: 'auto', + zIndex: 2 + }, + modifiers: { + stretch: { + height: '100%', + width: '100%' + } } - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - DropdownHeadTag = _createThemeTag2[0], - themeHead = _createThemeTag2[1]; - + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + DropdownHeadTag = _createThemeTag2[0], + themeHead = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Target"), { - root: { - display: 'flex', - width: '100%', - height: ' 100%' - } -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - DropdownPopperTarget = _createThemeTag4[0], - themePopperTarget = _createThemeTag4[1]; - + root: { + display: 'flex', + width: '100%', + height: ' 100%' + } + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + DropdownPopperTarget = _createThemeTag4[0], + themePopperTarget = _createThemeTag4[1]; var theme = _objectSpread({}, themeHead, {}, themePopperTarget); - export { theme, DropdownHeadTag, DropdownPopperTarget }; \ No newline at end of file diff --git a/es/components/FlexLayout/FlexLayout.js b/es/components/FlexLayout/FlexLayout.js index 0ebbd86a..a40cfa7e 100644 --- a/es/components/FlexLayout/FlexLayout.js +++ b/es/components/FlexLayout/FlexLayout.js @@ -4,15 +4,26 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { FlexLayoutTag } from './FlexLayout.theme'; +/** + * @prop {*} justifyContent css justify-content rule + * @prop {*} alignContent css align-content rule + * @prop {*} alignItems css align-items rule + * @prop {*} gap offset between children + * @prop {*} offsetX offset between the container and his parent + * @prop {*} offsetX offset between the container and his parent + * @prop {*} cursor cursor pointer + * @prop {*} stretch if true when stretch the container + * @prop {*} grow set flex-grow: 1 + * @prop {*} growChildren set flex-grow: 1 to all children + */ + var FlexLayout = function FlexLayout(_ref) { var tagName = _ref.tagName, - rest = _objectWithoutProperties(_ref, ["tagName"]); - + rest = _objectWithoutProperties(_ref, ["tagName"]); return ___EmotionJSX(FlexLayoutTag, _extends({}, rest, { tagName: tagName })); }; - FlexLayout.defaultProps = { tagName: 'div', gap: 'sm', @@ -28,17 +39,14 @@ FlexLayout.defaultProps = { grow: false, growChildren: false }; - var Row = function Row(props) { return ___EmotionJSX(FlexLayout, _extends({}, props, { direction: "row" })); }; - var Column = function Column(props) { return ___EmotionJSX(FlexLayout, _extends({}, props, { direction: "column" })); }; - export { Row, Column, FlexLayout }; \ No newline at end of file diff --git a/es/components/FlexLayout/FlexLayout.stories.js b/es/components/FlexLayout/FlexLayout.stories.js index 9294411b..54a1261c 100644 --- a/es/components/FlexLayout/FlexLayout.stories.js +++ b/es/components/FlexLayout/FlexLayout.stories.js @@ -1,11 +1,9 @@ import _styled from "@emotion/styled-base"; import { jsx as ___EmotionJSX } from "@emotion/core"; +function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } import React, { Fragment } from 'react'; import { Row, Column } from '../../'; - -var ColorBlock = -/*#__PURE__*/ -_styled('div', { +var ColorBlock = /*#__PURE__*/_styled('div', { target: "ek5mgdl0" })(function (props) { return { @@ -19,10 +17,7 @@ _styled('div', { border: '1px solid gray' }; }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0ZsZXhMYXlvdXQvRmxleExheW91dC5zdG9yaWVzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU9tQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9GbGV4TGF5b3V0L0ZsZXhMYXlvdXQuc3Rvcmllcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG5cbmltcG9ydCBSZWFjdCwgeyBGcmFnbWVudCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IFJvdywgQ29sdW1uIH0gZnJvbSAnLi4vLi4vJztcblxuXG5jb25zdCBDb2xvckJsb2NrID0gc3R5bGVkKCdkaXYnKShwcm9wcyA9PiAoe1xuICBkaXNwbGF5OiAnZmxleCcsXG4gIGFsaWduSXRlbXM6ICdjZW50ZXInLFxuICBqdXN0aWZ5Q29udGVudDogJ2NlbnRlcicsXG4gIG1pbldpZHRoOiAnMTAwcHgnLFxuICBwYWRkaW5nOiAnMCAxMHB4JyxcbiAgbWluSGVpZ2h0OiAnMzBweCcsXG4gIGJhY2tncm91bmRDb2xvcjogcHJvcHMuY29sb3IsXG4gIGJvcmRlcjogJzFweCBz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ICA8QmxvY2s+eGw8L0Jsb2NrPlxuICAgICAgPC9Sb3c+XG4gICAgPC9Cb3JkZXJCbG9jaz5cbiAgPC9Sb3c+XG4pO1xuXG53aXRoT2Zmc2V0LnN0b3J5ID0ge1xuICBuYW1lOiAnd2l0aCBvZmZzZXQnLFxufTtcblxuZXhwb3J0IGNvbnN0IHdpdGhHcm93Q2hpbGRyZW4gPSAoKSA9PiAoXG4gIDxSb3cgZ3Jvd0NoaWxkcmVuPlxuICAgIDxCbG9ja3M+Z3Jvd0NoaWxkcmVuPC9CbG9ja3M+XG4gIDwvUm93PlxuKTtcblxud2l0aEdyb3dDaGlsZHJlbi5zdG9yeSA9IHtcbiAgbmFtZTogJ3dpdGggZ3JvdyBjaGlsZHJlbicsXG59O1xuXG5leHBvcnQgY29uc3Qgd2l0aFBvaW50ZXJDdXJzb3IgPSAoKSA9PiAoXG4gIDxSb3cgY3Vyc29yPVwicG9pbnRlclwiPlxuICAgIDxCbG9ja3M+Y3Vyc29yPVwicG9pbnRlclwiPC9CbG9ja3M+XG4gIDwvUm93PlxuKTtcblxud2l0aFBvaW50ZXJDdXJzb3Iuc3RvcnkgPSB7XG4gIG5hbWU6ICd3aXRoIHBvaW50ZXIgY3Vyc29yJyxcbn07XG4iXX0= */"); - -var BorderBlock = -/*#__PURE__*/ -_styled('div', { +var BorderBlock = /*#__PURE__*/_styled('div', { target: "ek5mgdl1" })(process.env.NODE_ENV === "production" ? { name: "1l68nnx", @@ -30,9 +25,9 @@ _styled('div', { } : { name: "1l68nnx", styles: "border:1px solid gray;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0ZsZXhMYXlvdXQvRmxleExheW91dC5zdG9yaWVzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtCb0IiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHM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biAgbmFtZTogJ3dpdGggb2Zmc2V0Jyxcbn07XG5cbmV4cG9ydCBjb25zdCB3aXRoR3Jvd0NoaWxkcmVuID0gKCkgPT4gKFxuICA8Um93IGdyb3dDaGlsZHJlbj5cbiAgICA8QmxvY2tzPmdyb3dDaGlsZHJlbjwvQmxvY2tzPlxuICA8L1Jvdz5cbik7XG5cbndpdGhHcm93Q2hpbGRyZW4uc3RvcnkgPSB7XG4gIG5hbWU6ICd3aXRoIGdyb3cgY2hpbGRyZW4nLFxufTtcblxuZXhwb3J0IGNvbnN0IHdpdGhQb2ludGVyQ3Vyc29yID0gKCkgPT4gKFxuICA8Um93IGN1cnNvcj1cInBvaW50ZXJcIj5cbiAgICA8QmxvY2tzPmN1cnNvcj1cInBvaW50ZXJcIjwvQmxvY2tzPlxuICA8L1Jvdz5cbik7XG5cbndpdGhQb2ludGVyQ3Vyc29yLnN0b3J5ID0ge1xuICBuYW1lOiAnd2l0aCBwb2ludGVyIGN1cnNvcicsXG59O1xuIl19 */", + toString: _EMOTION_STRINGIFIED_CSS_ERROR__ }); - var Blocks = function Blocks(_ref) { var children = _ref.children; return ___EmotionJSX(Fragment, null, ___EmotionJSX(ColorBlock, { @@ -47,14 +42,12 @@ var Blocks = function Blocks(_ref) { color: "#e2e4e9" })); }; - var Block = function Block(_ref2) { var children = _ref2.children; return ___EmotionJSX(ColorBlock, { color: "#e2e4e9" }, children); }; - export default { title: 'Components/FlexLayout', component: Row diff --git a/es/components/FlexLayout/FlexLayout.theme.js b/es/components/FlexLayout/FlexLayout.theme.js index 146929f9..cde17bed 100644 --- a/es/components/FlexLayout/FlexLayout.theme.js +++ b/es/components/FlexLayout/FlexLayout.theme.js @@ -1,14 +1,10 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; import { paddingSizes, gapSizes, justifyContentStyles, alignContentStyles, alignItemsStyles } from '../../constants'; var name = 'flex-layout'; - var getGapStyle = function getGapStyle(direction, gapProp) { if (gapProp !== 'noSet') { return direction === 'row' ? { @@ -21,48 +17,44 @@ var getGapStyle = function getGapStyle(direction, gapProp) { } }; } - return {}; }; - var getGrowChildrenStyles = function getGrowChildrenStyles(growChildren) { return growChildren ? { flexGrow: '1' } : {}; }; - var _createThemeTag = createThemeTag(name, { - root: function root(props) { - return { - display: 'flex', - flexDirection: props.direction, - justifyContent: justifyContentStyles[props.justifyContent], - alignContent: alignContentStyles[props.alignContent], - alignItems: alignItemsStyles[props.alignItems], - flexWrap: props.flexWrap, - paddingLeft: paddingSizes[props.offsetX] || paddingSizes[props.offsetLeft], - paddingRight: paddingSizes[props.offsetX] || paddingSizes[props.offsetRight], - paddingTop: paddingSizes[props.offsetY] || paddingSizes[props.offsetTop], - paddingBottom: paddingSizes[props.offsetY] || paddingSizes[props.offsetBottom], - cursor: props.cursor, - '& > *': _objectSpread({}, getGapStyle(props.direction, props.gap), {}, getGrowChildrenStyles(props.growChildren)) - }; - }, - modifiers: { - stretch: { - width: '100%', - height: '100%' - }, - inline: { - display: 'inline-flex' + root: function root(props) { + return { + display: 'flex', + flexDirection: props.direction, + justifyContent: justifyContentStyles[props.justifyContent], + alignContent: alignContentStyles[props.alignContent], + alignItems: alignItemsStyles[props.alignItems], + flexWrap: props.flexWrap, + paddingLeft: paddingSizes[props.offsetX] || paddingSizes[props.offsetLeft], + paddingRight: paddingSizes[props.offsetX] || paddingSizes[props.offsetRight], + paddingTop: paddingSizes[props.offsetY] || paddingSizes[props.offsetTop], + paddingBottom: paddingSizes[props.offsetY] || paddingSizes[props.offsetBottom], + cursor: props.cursor, + '& > *': _objectSpread({}, getGapStyle(props.direction, props.gap), {}, getGrowChildrenStyles(props.growChildren)) + }; }, - grow: { - flexGrow: '1' + modifiers: { + stretch: { + width: '100%', + height: '100%' + }, + inline: { + display: 'inline-flex' + }, + grow: { + flexGrow: '1' + } } - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - FlexLayoutTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + FlexLayoutTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; export { FlexLayoutTag, justifyContentStyles, alignContentStyles, alignItemsStyles, theme }; \ No newline at end of file diff --git a/es/components/Form/Form.js b/es/components/Form/Form.js index f9e655e3..6a1045bb 100644 --- a/es/components/Form/Form.js +++ b/es/components/Form/Form.js @@ -2,11 +2,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React from 'react'; import { createThemeTag } from '../../theme/createThemeTag'; import { FlexLayout } from '../FlexLayout'; @@ -16,38 +13,33 @@ import { FormSectionBody } from './FormSectionBody'; import { FormError, theme as formErrorTheme } from './FormError'; import { FormSectionTitle, theme as formSectionTitleTheme } from './FormSectionTitle'; var name = 'form'; - var _createThemeTag = createThemeTag(name, { - root: { - flex: 1 - }, - modifiers: { - stretch: { - height: '100%', - width: '100%' + root: { + flex: 1 + }, + modifiers: { + stretch: { + height: '100%', + width: '100%' + } } - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - FormTag = _createThemeTag2[0], - formTheme = _createThemeTag2[1]; - + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + FormTag = _createThemeTag2[0], + formTheme = _createThemeTag2[1]; var theme = _objectSpread({}, formTheme, {}, formFieldTheme, {}, formSectionTitleTheme, {}, formErrorTheme); - var Form = function Form(_ref) { var children = _ref.children, - onSubmit = _ref.onSubmit, - component = _ref.component, - className = _ref.className, - rest = _objectWithoutProperties(_ref, ["children", "onSubmit", "component", "className"]); - + onSubmit = _ref.onSubmit, + component = _ref.component, + className = _ref.className, + rest = _objectWithoutProperties(_ref, ["children", "onSubmit", "component", "className"]); return ___EmotionJSX(FormTag, { tagName: component, onSubmit: onSubmit, className: className }, ___EmotionJSX(FlexLayout, rest, children)); }; - Form.defaultProps = { stretch: false, component: 'form', diff --git a/es/components/Form/Form.stories.js b/es/components/Form/Form.stories.js index dfc51d6b..65cd7ca8 100644 --- a/es/components/Form/Form.stories.js +++ b/es/components/Form/Form.stories.js @@ -1,11 +1,10 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { Form, InputField } from '../../'; - var FieldMock = function FieldMock(_ref) { var Component = _ref.component, - label = _ref.label, - name = _ref.name; + label = _ref.label, + name = _ref.name; return ___EmotionJSX(Component, { label: label, input: { @@ -13,7 +12,6 @@ var FieldMock = function FieldMock(_ref) { } }); }; - export default { title: 'Components/Form', component: Form diff --git a/es/components/Form/FormError.js b/es/components/Form/FormError.js index e176a180..a563fdeb 100644 --- a/es/components/Form/FormError.js +++ b/es/components/Form/FormError.js @@ -8,28 +8,25 @@ import { Row } from '../FlexLayout'; import { Text } from '../Text'; import { Icon } from '../Icon'; var name = 'formError'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, SIZES = _ref.SIZES; - return { - root: { - border: "1px solid ".concat(COLORS.DANGER), - borderRadius: SIZES.MAIN_BORDER_RADIUS, - padding: '16px' - }, - modifiers: {} - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - FormErrorPlateTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + return { + root: { + border: "1px solid ".concat(COLORS.DANGER), + borderRadius: SIZES.MAIN_BORDER_RADIUS, + padding: '16px' + }, + modifiers: {} + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + FormErrorPlateTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; function FormError(_ref2) { var error = _ref2.error, - children = _ref2.children, - rest = _objectWithoutProperties(_ref2, ["error", "children"]); - + children = _ref2.children, + rest = _objectWithoutProperties(_ref2, ["error", "children"]); var errorText = error || children; return errorText ? ___EmotionJSX(FormErrorPlateTag, _extends({ tagName: "div" @@ -42,7 +39,6 @@ function FormError(_ref2) { color: "SECONDARY_TEXT_COLOR" }, errorText))) : null; } - FormError.defaultProps = { component: 'form', direction: 'column' diff --git a/es/components/Form/FormField.js b/es/components/Form/FormField.js index ba75edbb..f26a387d 100644 --- a/es/components/Form/FormField.js +++ b/es/components/Form/FormField.js @@ -3,133 +3,119 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React from 'react'; import { createThemeTag } from '../../theme/createThemeTag'; import * as formUtils from '../../utils/forms'; var name = 'formField'; - var _createThemeTag = createThemeTag(name, { - root: function root(props) { - return { - position: 'relative', - display: 'inline-flex', - width: props.stretch ? '100%' : 'auto' - }; - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - FormFieldTag = _createThemeTag2[0], - themeField = _createThemeTag2[1]; - -var _createThemeTag3 = createThemeTag("".concat(name, "Label"), function (_ref) { - var FONTS = _ref.FONTS; - return { root: function root(props) { - return _objectSpread({}, FONTS.OVERLINE_1, { - marginLeft: props.direction === 'row' ? '8px' : 0, - marginBottom: '4px' - }); + return { + position: 'relative', + display: 'inline-flex', + width: props.stretch ? '100%' : 'auto' + }; } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - FormLabel = _createThemeTag4[0], - themeLabel = _createThemeTag4[1]; - + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + FormFieldTag = _createThemeTag2[0], + themeField = _createThemeTag2[1]; +var _createThemeTag3 = createThemeTag("".concat(name, "Label"), function (_ref) { + var FONTS = _ref.FONTS; + return { + root: function root(props) { + return _objectSpread({}, FONTS.OVERLINE_1, { + marginLeft: props.direction === 'row' ? '8px' : 0, + marginBottom: '4px' + }); + } + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + FormLabel = _createThemeTag4[0], + themeLabel = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag("".concat(name, "Error"), function (_ref2) { - var COLORS = _ref2.COLORS, + var COLORS = _ref2.COLORS, FONTS = _ref2.FONTS; - return { - root: _objectSpread({ - position: 'relative' - }, FONTS.SMALL_1, { - color: COLORS.DANGER, - overflow: 'hidden', - textOverflow: 'ellipsis', - whiteSpace: 'nowrap', - display: 'block', - maxWidth: '100%' - }) - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - ControlErrorTag = _createThemeTag6[0], - themeError = _createThemeTag6[1]; - + return { + root: _objectSpread({ + position: 'relative' + }, FONTS.SMALL_1, { + color: COLORS.DANGER, + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + display: 'block', + maxWidth: '100%' + }) + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + ControlErrorTag = _createThemeTag6[0], + themeError = _createThemeTag6[1]; var _createThemeTag7 = createThemeTag("".concat(name, "Note"), function (_ref3) { - var FONTS = _ref3.FONTS; - return { - root: _objectSpread({ - position: 'relative' - }, FONTS.SMALL_1, { - overflow: 'hidden', - textOverflow: 'ellipsis', - whiteSpace: 'nowrap', - display: 'block', - maxWidth: '100%', - marginTop: 4 - }) - }; -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - FormFieldNoteTag = _createThemeTag8[0], - themeNote = _createThemeTag8[1]; - -var _createThemeTag9 = createThemeTag("".concat(name, "Direction"), { - root: function root(props) { + var FONTS = _ref3.FONTS; return { - display: 'inline-flex', - flexDirection: props.direction === 'row' ? 'row-reverse' : 'column', - alignItems: props.direction === 'row' ? 'center' : 'flex-start', - justifyContent: props.direction === 'row' ? 'flex-end' : 'flex-start', - width: props.stretch ? '100%' : 'auto' + root: _objectSpread({ + position: 'relative' + }, FONTS.SMALL_1, { + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + display: 'block', + maxWidth: '100%', + marginTop: 4 + }) }; - } -}), - _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), - FormFieldDirectionTag = _createThemeTag10[0], - themeDirection = _createThemeTag10[1]; - + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + FormFieldNoteTag = _createThemeTag8[0], + themeNote = _createThemeTag8[1]; +var _createThemeTag9 = createThemeTag("".concat(name, "Direction"), { + root: function root(props) { + return { + display: 'inline-flex', + flexDirection: props.direction === 'row' ? 'row-reverse' : 'column', + alignItems: props.direction === 'row' ? 'center' : 'flex-start', + justifyContent: props.direction === 'row' ? 'flex-end' : 'flex-start', + width: props.stretch ? '100%' : 'auto' + }; + } + }), + _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), + FormFieldDirectionTag = _createThemeTag10[0], + themeDirection = _createThemeTag10[1]; var _createThemeTag11 = createThemeTag("".concat(name, "ErrorWrapper"), { - root: { - display: 'block', - position: 'absolute', - bottom: 0, - height: 0, - maxWidth: '100%' - } -}), - _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), - ControlErrorWrapperTag = _createThemeTag12[0], - themeErrorWrapper = _createThemeTag12[1]; - + root: { + display: 'block', + position: 'absolute', + bottom: 0, + height: 0, + maxWidth: '100%' + } + }), + _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), + ControlErrorWrapperTag = _createThemeTag12[0], + themeErrorWrapper = _createThemeTag12[1]; var theme = _objectSpread({}, themeErrorWrapper, {}, themeDirection, {}, themeLabel, {}, themeError, {}, themeField, {}, themeNote); - var FormField = function FormField(_ref4) { var _ref4$meta = _ref4.meta, - meta = _ref4$meta === void 0 ? {} : _ref4$meta, - label = _ref4.label, - note = _ref4.note, - children = _ref4.children, - hideErrorLabel = _ref4.hideErrorLabel, - showErrorOnTouched = _ref4.showErrorOnTouched, - rest = _objectWithoutProperties(_ref4, ["meta", "label", "note", "children", "hideErrorLabel", "showErrorOnTouched"]); - + meta = _ref4$meta === void 0 ? {} : _ref4$meta, + label = _ref4.label, + note = _ref4.note, + children = _ref4.children, + hideErrorLabel = _ref4.hideErrorLabel, + showErrorOnTouched = _ref4.showErrorOnTouched, + rest = _objectWithoutProperties(_ref4, ["meta", "label", "note", "children", "hideErrorLabel", "showErrorOnTouched"]); var hasError = formUtils.hasError(meta, showErrorOnTouched); var error = formUtils.getError(meta, showErrorOnTouched); var hasLabel = !!label; - if (typeof error === 'object') { error = Object.keys(error).map(function (key) { return error[key]; }); } - return ___EmotionJSX(FormFieldTag, _extends({}, rest, { tagName: "div" }), ___EmotionJSX(FormFieldDirectionTag, { @@ -151,7 +137,6 @@ var FormField = function FormField(_ref4) { title: error.toString() }, error.toString())) : null); }; - FormField.defaultProps = { hideErrorLabel: false, stretch: true, diff --git a/es/components/Form/FormSection.js b/es/components/Form/FormSection.js index 9f464a9b..8ee6e832 100644 --- a/es/components/Form/FormSection.js +++ b/es/components/Form/FormSection.js @@ -3,17 +3,14 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { FlexLayout } from '../FlexLayout'; - var FormSection = function FormSection(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(FlexLayout, _extends({}, rest, { stretch: true, direction: "column" }), children); }; - FormSection.defaultProps = { gap: 'sm' }; diff --git a/es/components/Form/FormSectionBody.js b/es/components/Form/FormSectionBody.js index c075ffc1..f1fa6f92 100644 --- a/es/components/Form/FormSectionBody.js +++ b/es/components/Form/FormSectionBody.js @@ -3,17 +3,14 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { FlexLayout } from '../FlexLayout'; - var FormSectionBody = function FormSectionBody(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(FlexLayout, _extends({}, rest, { stretch: true, direction: "column" }), children); }; - FormSectionBody.defaultProps = { alignItems: 'stretch', gap: 'md' diff --git a/es/components/Form/FormSectionTitle.js b/es/components/Form/FormSectionTitle.js index 28cd7576..65d50a36 100644 --- a/es/components/Form/FormSectionTitle.js +++ b/es/components/Form/FormSectionTitle.js @@ -3,37 +3,30 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React from 'react'; import { createThemeTag } from '../../theme/createThemeTag'; var name = 'formSectionTitle'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var FONTS = _ref.FONTS; - return { - root: _objectSpread({}, FONTS.H5, { - letterSpacing: '0.5px' - }), - modifiers: {}, - defaults: {} - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - FormSectionTitleTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + var FONTS = _ref.FONTS; + return { + root: _objectSpread({}, FONTS.H5, { + letterSpacing: '0.5px' + }), + modifiers: {}, + defaults: {} + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + FormSectionTitleTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; var FormSectionTitle = function FormSectionTitle(_ref2) { var children = _ref2.children, - text = _ref2.text, - rest = _objectWithoutProperties(_ref2, ["children", "text"]); - + text = _ref2.text, + rest = _objectWithoutProperties(_ref2, ["children", "text"]); return ___EmotionJSX(FormSectionTitleTag, _extends({}, rest, { tagName: "h5" }), children || text); }; - export { FormSectionTitle, theme }; \ No newline at end of file diff --git a/es/components/Grid/Grid.js b/es/components/Grid/Grid.js index 5b38bcc2..3a371ff0 100644 --- a/es/components/Grid/Grid.js +++ b/es/components/Grid/Grid.js @@ -1,16 +1,11 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { GridBox as Box, theme as gridBoxTheme } from './GridBox'; import { GridLayout as Layout, theme as gridLayoutTheme } from './GridLayout'; var Grid = { Box: Box, Layout: Layout }; - var theme = _objectSpread({}, gridBoxTheme, {}, gridLayoutTheme); - export { Grid, theme }; \ No newline at end of file diff --git a/es/components/Grid/Grid.stories.js b/es/components/Grid/Grid.stories.js index 62ca765f..f4e6843a 100644 --- a/es/components/Grid/Grid.stories.js +++ b/es/components/Grid/Grid.stories.js @@ -1,11 +1,9 @@ import _styled from "@emotion/styled-base"; import { jsx as ___EmotionJSX } from "@emotion/core"; +function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } import React from 'react'; import { Grid, Column, Row } from '../../'; - -var ColorBlock = -/*#__PURE__*/ -_styled('div', { +var ColorBlock = /*#__PURE__*/_styled('div', { target: "e137ef0i0" })(function (props) { return { @@ -18,10 +16,7 @@ _styled('div', { border: '1px solid gray' }; }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8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dcIj5cbiAgICAgIDxCbG9jaz5yYXRpbmc8L0Jsb2NrPlxuICAgIDwvR3JpZC5Cb3g+XG4gICAgPEdyaWQuQm94IGFyZWE9XCJyYXRlXCI+XG4gICAgICA8QmxvY2s+cmF0ZTwvQmxvY2s+XG4gICAgPC9HcmlkLkJveD5cbiAgICA8R3JpZC5Cb3ggYXJlYT1cImFjdGlvbnNcIj5cbiAgICAgIDxCbG9jaz5hY3Rpb25zPC9CbG9jaz5cbiAgICA8L0dyaWQuQm94PlxuICAgIDxHcmlkLkJveCBhcmVhPVwic2tpbGxzXCI+XG4gICAgICA8QmxvY2s+c2tpbGxzPC9CbG9jaz5cbiAgICA8L0dyaWQuQm94PlxuICA8L0dyaWQuTGF5b3V0PlxuKTtcblxud2l0aEdyaWRBcmVhcy5zdG9yeSA9IHtcbiAgbmFtZTogJ3dpdGggZ3JpZCBhcmVhcycsXG59O1xuIl19 */"); - -var BorderBlock = -/*#__PURE__*/ -_styled('div', { +var BorderBlock = /*#__PURE__*/_styled('div', { target: "e137ef0i1" })(process.env.NODE_ENV === "production" ? { name: "1l68nnx", @@ -29,16 +24,15 @@ _styled('div', { } : { name: "1l68nnx", styles: "border:1px solid gray;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0dyaWQvR3JpZC5zdG9yaWVzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNvQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9HcmlkL0dyaWQuc3Rvcmllcy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBHcmlkLCBDb2x1bW4sIFJvdyB9IGZyb20gJy4uLy4uLyc7XG5cb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AgIDxHcmlkLkJveCBhcmVhPVwiaW5mb1wiPlxuICAgICAgPEJsb2NrPmluZm88L0Jsb2NrPlxuICAgIDwvR3JpZC5Cb3g+XG4gICAgPEdyaWQuQm94IGFyZWE9XCJyYXRpbmdcIj5cbiAgICAgIDxCbG9jaz5yYXRpbmc8L0Jsb2NrPlxuICAgIDwvR3JpZC5Cb3g+XG4gICAgPEdyaWQuQm94IGFyZWE9XCJyYXRlXCI+XG4gICAgICA8QmxvY2s+cmF0ZTwvQmxvY2s+XG4gICAgPC9HcmlkLkJveD5cbiAgICA8R3JpZC5Cb3ggYXJlYT1cImFjdGlvbnNcIj5cbiAgICAgIDxCbG9jaz5hY3Rpb25zPC9CbG9jaz5cbiAgICA8L0dyaWQuQm94PlxuICAgIDxHcmlkLkJveCBhcmVhPVwic2tpbGxzXCI+XG4gICAgICA8QmxvY2s+c2tpbGxzPC9CbG9jaz5cbiAgICA8L0dyaWQuQm94PlxuICA8L0dyaWQuTGF5b3V0PlxuKTtcblxud2l0aEdyaWRBcmVhcy5zdG9yeSA9IHtcbiAgbmFtZTogJ3dpdGggZ3JpZCBhcmVhcycsXG59O1xuIl19 */", + toString: _EMOTION_STRINGIFIED_CSS_ERROR__ }); - var Block = function Block(_ref) { var children = _ref.children; return ___EmotionJSX(ColorBlock, { color: "#e2e4e9" }, children); }; - export default { title: 'Components/Grid', component: Grid diff --git a/es/components/Grid/GridBox.js b/es/components/Grid/GridBox.js index 58ab059a..ec9d8cf5 100644 --- a/es/components/Grid/GridBox.js +++ b/es/components/Grid/GridBox.js @@ -10,104 +10,82 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { PureComponent } from 'react'; import { createThemeTag } from '../../theme/createThemeTag'; var name = 'gridBox'; - var _createThemeTag = createThemeTag(name, { - root: function root(props) { - var style = { - display: 'flex', - position: 'relative' - }; - - if (props.columnStart) { - style.gridColumnStart = props.columnStart; - } - - if (props.columnEnd) { - style.gridColumnEnd = props.columnEnd; - } - - if (props.rowStart) { - style.gridRowStart = props.rowStart; - } - - if (props.rowEnd) { - style.gridRowEnd = props.rowEnd; - } - - if (props.column) { - style.gridColumn = props.column; - } - - if (props.row) { - style.gridRow = props.row; - } - - if (props.justifySelf) { - style.justifySelf = props.justifySelf; - } - - if (props.alignSelf) { - style.alignSelf = props.alignSelf; - } - - if (props.justifyContent) { - style.justifyContent = props.justifyContent; - } - - if (props.alignItems) { - style.alignItems = props.alignItems; - } - - if (props.alignContent) { - style.alignContent = props.alignContent; - } - - if (props.area) { - style.gridArea = props.area; - } - - if (props.textAlign) { - style.textAlign = props.textAlign; - } - - return style; - }, - modifiers: { - direction: { - column: { - flexDirection: 'column' - }, - row: { - flexDirection: 'row' + root: function root(props) { + var style = { + display: 'flex', + position: 'relative' + }; + if (props.columnStart) { + style.gridColumnStart = props.columnStart; + } + if (props.columnEnd) { + style.gridColumnEnd = props.columnEnd; + } + if (props.rowStart) { + style.gridRowStart = props.rowStart; + } + if (props.rowEnd) { + style.gridRowEnd = props.rowEnd; + } + if (props.column) { + style.gridColumn = props.column; + } + if (props.row) { + style.gridRow = props.row; + } + if (props.justifySelf) { + style.justifySelf = props.justifySelf; + } + if (props.alignSelf) { + style.alignSelf = props.alignSelf; + } + if (props.justifyContent) { + style.justifyContent = props.justifyContent; + } + if (props.alignItems) { + style.alignItems = props.alignItems; + } + if (props.alignContent) { + style.alignContent = props.alignContent; + } + if (props.area) { + style.gridArea = props.area; + } + if (props.textAlign) { + style.textAlign = props.textAlign; + } + return style; + }, + modifiers: { + direction: { + column: { + flexDirection: 'column' + }, + row: { + flexDirection: 'row' + } } } - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - GridBoxTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - -var GridBox = -/*#__PURE__*/ -function (_PureComponent) { + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + GridBoxTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; +var GridBox = /*#__PURE__*/function (_PureComponent) { _inherits(GridBox, _PureComponent); - function GridBox() { _classCallCheck(this, GridBox); - return _possibleConstructorReturn(this, _getPrototypeOf(GridBox).apply(this, arguments)); } - _createClass(GridBox, [{ key: "render", value: function render() { var _this$props = this.props, - children = _this$props.children, - scrollable = _this$props.scrollable, - _this$props$direction = _this$props.direction, - direction = _this$props$direction === void 0 ? 'column' : _this$props$direction, - rest = _objectWithoutProperties(_this$props, ["children", "scrollable", "direction"]); - + children = _this$props.children, + scrollable = _this$props.scrollable, + _this$props$direction = _this$props.direction, + direction = _this$props$direction === void 0 ? 'column' : _this$props$direction, + rest = _objectWithoutProperties(_this$props, ["children", "scrollable", "direction"]); if (scrollable) { return ___EmotionJSX(GridBoxTag, _extends({}, rest, { tagName: "div", @@ -124,17 +102,14 @@ function (_PureComponent) { } }, children)); } - return ___EmotionJSX(GridBoxTag, _extends({}, rest, { tagName: "div", direction: direction }), children); } }]); - return GridBox; }(PureComponent); - GridBox.defaultProps = { direction: 'column' }; diff --git a/es/components/Grid/GridLayout.js b/es/components/Grid/GridLayout.js index 1fd974b6..4fcda120 100644 --- a/es/components/Grid/GridLayout.js +++ b/es/components/Grid/GridLayout.js @@ -10,135 +10,115 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { createThemeTag } from '../../theme/createThemeTag'; var name = 'gridLayout'; - var _createThemeTag = createThemeTag(name, { - root: function root(props) { - var style = props.style || {}; - style.display = props.inline ? 'inline-grid' : 'grid'; - - if (props.columns) { - style.gridTemplateColumns = props.columns; - } - - if (props.rows) { - style.gridTemplateRows = props.rows; - } - - if (props.autoColumns) { - style.gridAutoColumns = props.autoColumns; - } - - if (props.areas) { - style.gridTemplateAreas = props.areas.map(function (item) { - return "\"".concat(item.join(' '), "\""); - }).join(' '); - } - - if (props.justifyContent) { - style.justifyContent = props.justifyContent; - } - - if (props.alignContent) { - style.alignContent = props.alignContent; - } - - if (props.justifyItems) { - style.justifyItems = props.justifyItems; - } - - if (props.alignItems) { - style.alignItems = props.alignItems; - } - - if (props.autoFlow) { - style.gridAutoFlow = props.autoFlow; - } - - return style; - }, - modifiers: function modifiers(props) { - return { - gap: { - xs: { - gridGap: '4px' - }, - sm: { - gridGap: '8px' - }, - md: { - gridGap: '16px' - }, - lg: { - gridGap: '24px' - }, - xl: { - gridGap: '32px' - }, - xxl: { - gridGap: '40px' - }, - none: {}, - custom: { - gridGap: props.customGap - } - }, - padding: { - none: {}, - xs: { - padding: '4px' - }, - sm: { - padding: '8px' - }, - md: { - padding: '12px' + root: function root(props) { + var style = props.style || {}; + style.display = props.inline ? 'inline-grid' : 'grid'; + if (props.columns) { + style.gridTemplateColumns = props.columns; + } + if (props.rows) { + style.gridTemplateRows = props.rows; + } + if (props.autoColumns) { + style.gridAutoColumns = props.autoColumns; + } + if (props.areas) { + style.gridTemplateAreas = props.areas.map(function (item) { + return "\"".concat(item.join(' '), "\""); + }).join(' '); + } + if (props.justifyContent) { + style.justifyContent = props.justifyContent; + } + if (props.alignContent) { + style.alignContent = props.alignContent; + } + if (props.justifyItems) { + style.justifyItems = props.justifyItems; + } + if (props.alignItems) { + style.alignItems = props.alignItems; + } + if (props.autoFlow) { + style.gridAutoFlow = props.autoFlow; + } + return style; + }, + modifiers: function modifiers(props) { + return { + gap: { + xs: { + gridGap: '4px' + }, + sm: { + gridGap: '8px' + }, + md: { + gridGap: '16px' + }, + lg: { + gridGap: '24px' + }, + xl: { + gridGap: '32px' + }, + xxl: { + gridGap: '40px' + }, + none: {}, + custom: { + gridGap: props.customGap + } }, - lg: { - padding: '20px' + padding: { + none: {}, + xs: { + padding: '4px' + }, + sm: { + padding: '8px' + }, + md: { + padding: '12px' + }, + lg: { + padding: '20px' + }, + xl: { + padding: '28px' + } }, - xl: { - padding: '28px' + stretch: { + flex: 1, + width: '100%', + maxWidth: '100%' } - }, - stretch: { - flex: 1, - width: '100%', - maxWidth: '100%' - } - }; - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - StyledTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - -var GridLayout = -/*#__PURE__*/ -function (_React$PureComponent) { + }; + } + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + StyledTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; +var GridLayout = /*#__PURE__*/function (_React$PureComponent) { _inherits(GridLayout, _React$PureComponent); - function GridLayout() { _classCallCheck(this, GridLayout); - return _possibleConstructorReturn(this, _getPrototypeOf(GridLayout).apply(this, arguments)); } - _createClass(GridLayout, [{ key: "render", value: function render() { var _this$props = this.props, - children = _this$props.children, - rest = _objectWithoutProperties(_this$props, ["children"]); - + children = _this$props.children, + rest = _objectWithoutProperties(_this$props, ["children"]); return ___EmotionJSX(StyledTag, _extends({}, rest, { tagName: "div" }), children); } }]); - return GridLayout; }(React.PureComponent); - GridLayout.defaultProps = { gap: 'none', padding: 'none' diff --git a/es/components/Heading/Heading.js b/es/components/Heading/Heading.js index 4c7e06bd..926a9df7 100644 --- a/es/components/Heading/Heading.js +++ b/es/components/Heading/Heading.js @@ -3,19 +3,16 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { HeadingTag } from './Heading.theme'; - function Heading(_ref) { var text = _ref.text, - children = _ref.children, - type = _ref.type, - rest = _objectWithoutProperties(_ref, ["text", "children", "type"]); - + children = _ref.children, + type = _ref.type, + rest = _objectWithoutProperties(_ref, ["text", "children", "type"]); return ___EmotionJSX(HeadingTag, _extends({}, rest, { tagName: type, type: type }), children || text); } - Heading.defaultProps = { kind: 'primary', weight: 'normal', diff --git a/es/components/Heading/Heading.theme.js b/es/components/Heading/Heading.theme.js index aebabfe4..60199504 100644 --- a/es/components/Heading/Heading.theme.js +++ b/es/components/Heading/Heading.theme.js @@ -1,37 +1,32 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'heading'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var FONTS = _ref.FONTS; - return { - root: { - margin: 0 - }, - modifiers: { - type: { - h1: _objectSpread({}, FONTS.H1), - h2: _objectSpread({}, FONTS.H2), - h3: _objectSpread({}, FONTS.H3), - h4: _objectSpread({}, FONTS.H4), - h5: _objectSpread({}, FONTS.H5) + var FONTS = _ref.FONTS; + return { + root: { + margin: 0 }, - ellipsis: { - textOverflow: 'ellipsis', - whiteSpace: 'nowrap', - overflow: 'hidden' + modifiers: { + type: { + h1: _objectSpread({}, FONTS.H1), + h2: _objectSpread({}, FONTS.H2), + h3: _objectSpread({}, FONTS.H3), + h4: _objectSpread({}, FONTS.H4), + h5: _objectSpread({}, FONTS.H5) + }, + ellipsis: { + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + overflow: 'hidden' + } } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - HeadingTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + HeadingTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; export { HeadingTag, theme }; \ No newline at end of file diff --git a/es/components/Icon/Icon.js b/es/components/Icon/Icon.js index d85c115a..b2ec9736 100644 --- a/es/components/Icon/Icon.js +++ b/es/components/Icon/Icon.js @@ -6,19 +6,16 @@ import { IconWrapperTag, IconFontTag, IconSvgTag } from './Icon.theme'; import { IconsConsumer } from './IconsProvider'; import { COLORS } from '../../theme'; import * as glyphs from './glyphs'; - var Icon = function Icon(_ref) { var name = _ref.name, - className = _ref.className, - children = _ref.children, - title = _ref.title, - rest = _objectWithoutProperties(_ref, ["name", "className", "children", "title"]); - + className = _ref.className, + children = _ref.children, + title = _ref.title, + rest = _objectWithoutProperties(_ref, ["name", "className", "children", "title"]); return ___EmotionJSX(IconsConsumer, null, function (_ref2) { var _ref2$icons = _ref2.icons, - icons = _ref2$icons === void 0 ? {} : _ref2$icons; + icons = _ref2$icons === void 0 ? {} : _ref2$icons; var Glyph = icons[name] || glyphs[name]; - if (typeof children === 'function') { return ___EmotionJSX(IconWrapperTag, _extends({ tagName: "span" @@ -29,7 +26,6 @@ var Icon = function Icon(_ref) { className: className }, children(Glyph))); } - return ___EmotionJSX(IconWrapperTag, _extends({ tagName: "span" }, rest), !!className && !Glyph ? ___EmotionJSX(IconFontTag, { @@ -44,7 +40,6 @@ var Icon = function Icon(_ref) { }, ___EmotionJSX(Glyph, null)) : null); }); }; - Icon.defaultProps = { size: 'md' }; diff --git a/es/components/Icon/Icon.theme.js b/es/components/Icon/Icon.theme.js index 4bbc177e..35ae1f17 100644 --- a/es/components/Icon/Icon.theme.js +++ b/es/components/Icon/Icon.theme.js @@ -1,114 +1,106 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import _mapValues from "lodash/fp/mapValues"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'icon'; - var _createThemeTag = createThemeTag("".concat(name, "Wrapper"), function (_ref) { - var COLORS = _ref.COLORS; - return { - root: function root(props) { - return { - display: 'inline-flex', - lineHeight: 1, - cursor: props.cursor - }; - }, - modifiers: { - color: _objectSpread({}, _mapValues(function (color) { + var COLORS = _ref.COLORS; + return { + root: function root(props) { return { - color: color + display: 'inline-flex', + lineHeight: 1, + cursor: props.cursor }; - }, COLORS)), - size: { - stretch: { - height: '100%', - width: '100%' + }, + modifiers: { + color: _objectSpread({}, _mapValues(function (color) { + return { + color: color + }; + }, COLORS)), + size: { + stretch: { + height: '100%', + width: '100%' + } } } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - IconWrapperTag = _createThemeTag2[0], - themeWrapper = _createThemeTag2[1]; - + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + IconWrapperTag = _createThemeTag2[0], + themeWrapper = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Svg"), { - root: { - '& > svg': { - height: '100%', - width: '100%' + root: { + '& > svg': { + height: '100%', + width: '100%' + } + }, + modifiers: function modifiers(props) { + return { + size: { + xs: { + width: '12px', + height: '12px' + }, + sm: { + width: '18px', + height: '18px' + }, + md: { + width: '24px', + height: '24px' + }, + lg: { + width: '36px', + height: '36px' + }, + xl: { + width: '48px', + height: '48px' + }, + stretch: { + height: '100%', + width: '100%' + }, + custom: { + height: props.customSize, + width: props.customSize + } + } + }; } - }, - modifiers: function modifiers(props) { - return { + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + IconSvgTag = _createThemeTag4[0], + themeSvg = _createThemeTag4[1]; +var _createThemeTag5 = createThemeTag("".concat(name, "Font"), { + modifiers: { size: { xs: { - width: '12px', - height: '12px' + fontSize: '12px' }, sm: { - width: '18px', - height: '18px' + fontSize: '18px' }, md: { - width: '24px', - height: '24px' + fontSize: '24px' }, lg: { - width: '36px', - height: '36px' + fontSize: '36px' }, xl: { - width: '48px', - height: '48px' - }, - stretch: { - height: '100%', - width: '100%' - }, - custom: { - height: props.customSize, - width: props.customSize + fontSize: '48px' } } - }; - } -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - IconSvgTag = _createThemeTag4[0], - themeSvg = _createThemeTag4[1]; - -var _createThemeTag5 = createThemeTag("".concat(name, "Font"), { - modifiers: { - size: { - xs: { - fontSize: '12px' - }, - sm: { - fontSize: '18px' - }, - md: { - fontSize: '24px' - }, - lg: { - fontSize: '36px' - }, - xl: { - fontSize: '48px' - } } - } -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - IconFontTag = _createThemeTag6[0], - themeFonts = _createThemeTag6[1]; - + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + IconFontTag = _createThemeTag6[0], + themeFonts = _createThemeTag6[1]; var theme = _objectSpread({}, themeWrapper, {}, themeFonts, {}, themeSvg); - export { theme, IconWrapperTag, IconSvgTag, IconFontTag }; \ No newline at end of file diff --git a/es/components/Icon/IconsProvider.js b/es/components/Icon/IconsProvider.js index 1f70c8e0..a1e3b283 100644 --- a/es/components/Icon/IconsProvider.js +++ b/es/components/Icon/IconsProvider.js @@ -1,8 +1,8 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; -import React from 'react'; // $FlowFixMe +import React from 'react'; +// $FlowFixMe var IconsContext = React.createContext({}); - var IconsProvider = function IconsProvider(props) { return ___EmotionJSX(IconsContext.Provider, { value: { @@ -10,6 +10,5 @@ var IconsProvider = function IconsProvider(props) { } }, props.children); }; - var IconsConsumer = IconsContext.Consumer; export { IconsProvider, IconsConsumer }; \ No newline at end of file diff --git a/es/components/Icon/glyphs/index.js b/es/components/Icon/glyphs/index.js index 486abfd4..6f40adb1 100644 --- a/es/components/Icon/glyphs/index.js +++ b/es/components/Icon/glyphs/index.js @@ -1,7 +1,6 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; // eslint-disable-next-line no-unused-vars import React from 'react'; - var Add = function Add(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -9,14 +8,12 @@ var Add = function Add(props) { d: "M12 24.003C5.384 24.003 0 18.619 0 12 0 5.384 5.384 0 12 0c6.618 0 12 5.384 12 12.001 0 6.618-5.382 12.002-12 12.002zm0-21.335c-5.147 0-9.333 4.187-9.333 9.333 0 5.147 4.186 9.334 9.333 9.334s9.333-4.187 9.333-9.334c0-5.146-4.186-9.333-9.333-9.333zm4.628 10.445h-3.294v3.295a1.334 1.334 0 0 1-2.668 0v-3.295H7.373a1.333 1.333 0 1 1 0-2.666h3.293V7.152a1.334 1.334 0 1 1 2.668 0v3.295h3.294a1.333 1.333 0 0 1 0 2.666z" })); }; - Add.defaultProps = { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }; - var Alert = function Alert(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -34,11 +31,9 @@ var Alert = function Alert(props) { y: "25" }, "!")))); }; - Alert.defaultProps = { viewBox: "0 0 35 31" }; - var APIToken = function APIToken(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { strokeWidth: "1.5", @@ -59,12 +54,10 @@ var APIToken = function APIToken(props) { fill: "currentColor" }))); }; - APIToken.defaultProps = { viewBox: "0 0 20 29", xmlns: "http://www.w3.org/2000/svg" }; - var Calendar = function Calendar(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -78,14 +71,12 @@ var Calendar = function Calendar(props) { d: "M18 4.5a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25H5.25A2.25 2.25 0 0 1 3 18V6.75A2.25 2.25 0 0 1 5.25 4.5m3 0H15M6.75 3v3m9.75-3v3M3 8.25h17.25" }))); }; - Calendar.defaultProps = { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }; - var Camera = function Camera(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { stroke: "currentColor", @@ -99,7 +90,6 @@ var Camera = function Camera(props) { strokeWidth: "2" })); }; - Camera.defaultProps = { width: "24", height: "24", @@ -107,7 +97,6 @@ Camera.defaultProps = { fill: "none", xmlns: "http://www.w3.org/2000/svg" }; - var Check = function Check(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -115,11 +104,9 @@ var Check = function Check(props) { d: "M12.845 3.657L11.178 5.35l-5 5.077a1.648 1.648 0 0 1-2.357 0L.488 7.042A1.699 1.699 0 0 1 0 5.846c0-.936.746-1.693 1.666-1.693.461 0 .877.189 1.179.496L5 6.837l3.821-3.881 1.667-1.692a1.648 1.648 0 0 1 1.178-.496c.921 0 1.667.758 1.667 1.692 0 .468-.186.891-.488 1.197z" })); }; - Check.defaultProps = { viewBox: "0 0 14 11" }; - var ChevronDown = function ChevronDown(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -127,14 +114,12 @@ var ChevronDown = function ChevronDown(props) { d: "M21.424 9.503l-7.425 7.741c-.65.677-2.78 1.371-4.304-.182l-7.14-7.444a2.033 2.033 0 0 1 0-2.792 1.837 1.837 0 0 1 2.676 0l6.597 6.876 6.811-7.1a1.913 1.913 0 0 1 2.785 0c.768.8.768 2.1 0 2.9z" })); }; - ChevronDown.defaultProps = { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }; - var ChevronLeft = function ChevronLeft(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -142,14 +127,12 @@ var ChevronLeft = function ChevronLeft(props) { d: "M14.497 21.424l-7.741-7.425c-.677-.65-1.371-2.78.182-4.304l7.444-7.14a2.033 2.033 0 0 1 2.792 0 1.837 1.837 0 0 1 0 2.676l-6.876 6.597 7.1 6.811a1.913 1.913 0 0 1 0 2.785c-.8.768-2.1.768-2.9 0z" })); }; - ChevronLeft.defaultProps = { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }; - var ChevronRight = function ChevronRight(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -157,14 +140,12 @@ var ChevronRight = function ChevronRight(props) { d: "M9.503 2.576l7.741 7.425c.677.65 1.371 2.78-.182 4.304l-7.444 7.14c-.772.74-2.022.74-2.792 0a1.837 1.837 0 0 1 0-2.676l6.876-6.597-7.1-6.811a1.913 1.913 0 0 1 0-2.785 2.114 2.114 0 0 1 2.9 0z" })); }; - ChevronRight.defaultProps = { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }; - var ChevronTop = function ChevronTop(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -172,14 +153,12 @@ var ChevronTop = function ChevronTop(props) { d: "M2.576 14.497l7.425-7.741c.65-.677 2.78-1.371 4.304.182l7.14 7.444c.74.772.74 2.022 0 2.792a1.837 1.837 0 0 1-2.676 0l-6.597-6.876-6.811 7.1a1.913 1.913 0 0 1-2.785 0 2.114 2.114 0 0 1 0-2.9z" })); }; - ChevronTop.defaultProps = { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }; - var CloudDatabase = function CloudDatabase(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -212,14 +191,12 @@ var CloudDatabase = function CloudDatabase(props) { strokeLinejoin: "round" }))); }; - CloudDatabase.defaultProps = { width: "24", height: "25", viewBox: "0 0 24 25", xmlns: "http://www.w3.org/2000/svg" }; - var Contract = function Contract(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -235,33 +212,27 @@ var Contract = function Contract(props) { d: "M14.5 11a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 1 0v7a.5.5 0 0 1-.5.5z" })); }; - Contract.defaultProps = { viewBox: "0 0 24 24" }; - var Customers = function Customers(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", d: "M7.01 15a.498.498 0 0 0 .353-.853l-2-2a.5.5 0 0 0-.707.707l2 2A.502.502 0 0 0 7.01 15zm4.002-4.501a2.722 2.722 0 0 0-2.065-2.645l-1.501-.375-.063-.251c.389-.43.666-.979.781-1.549.267-.138.46-.4.5-.715l.108-.87a.933.933 0 0 0-.405-.89l.025-.531.091-.091c.258-.274.607-.859.055-1.703C8.276.478 7.736 0 6.654 0c-.319 0-1.038 0-1.736.437-2.058.073-2.3 1.182-2.3 2.019 0 .165.03.474.058.732a.94.94 0 0 0-.427.906l.108.87a.915.915 0 0 0 .553.729c.112.545.374 1.073.739 1.492l-.073.294-1.501.375A2.724 2.724 0 0 0 .01 10.5a.498.498 0 0 0 .5.5l10.002-.001a.5.5 0 0 0 .5-.5zm-9.929-.5A1.73 1.73 0 0 1 2.32 8.823l1.792-.448a.502.502 0 0 0 .364-.364l.213-.853a.499.499 0 0 0-.144-.486 2.263 2.263 0 0 1-.689-1.431c-.021-.259-.243-.403-.504-.403l-.129-.796a.498.498 0 0 0 .496-.562 13.611 13.611 0 0 1-.099-1.024c0-.518 0-1.007 1.462-1.022a.5.5 0 0 0 .286-.093C5.844 1 6.392 1 6.655 1c.517 0 .859.139 1.047.426.203.311.12.399.064.46l-.217.217a.499.499 0 0 0-.146.329L7.35 3.52c-.006.136.01.231.103.33.094.099.19.119.326.12l-.064.813a.5.5 0 0 0-.498.46 2.286 2.286 0 0 1-.723 1.459.5.5 0 0 0-.151.493l.204.817c.045.179.184.32.364.364l1.792.448A1.725 1.725 0 0 1 9.937 10l-8.854-.001zm20.842-2.147l-1.501-.375-.063-.251c.389-.43.666-.978.78-1.548a.936.936 0 0 0 .501-.715l.108-.87a.932.932 0 0 0-.406-.89l.025-.53.092-.092c.258-.274.607-.859.054-1.703-.263-.4-.802-.878-1.883-.878-.318 0-1.037 0-1.735.437-2.058.073-2.3 1.182-2.3 2.019 0 .165.03.474.058.732a.933.933 0 0 0-.428.906l.109.87a.915.915 0 0 0 .553.729 3.32 3.32 0 0 0 .738 1.492l-.073.294-1.501.375a2.723 2.723 0 0 0-2.064 2.646.498.498 0 0 0 .5.5l10.001-.003a.5.5 0 0 0 .5-.5 2.722 2.722 0 0 0-2.065-2.645zm-7.863 2.147a1.729 1.729 0 0 1 1.234-1.176l1.792-.448a.499.499 0 0 0 .364-.363l.214-.853a.499.499 0 0 0-.144-.486 2.263 2.263 0 0 1-.689-1.431c-.021-.26-.243-.404-.504-.404l-.129-.796a.498.498 0 0 0 .496-.562 13.611 13.611 0 0 1-.099-1.024c0-.518 0-1.007 1.462-1.022a.5.5 0 0 0 .286-.093C18.821 1 19.369 1 19.632 1c.768 0 .978.321 1.048.426.203.311.12.399.064.459l-.218.217a.501.501 0 0 0-.146.33l-.053 1.088c-.006.136.01.231.104.33.093.099.19.119.326.12l-.065.813a.5.5 0 0 0-.498.461 2.28 2.28 0 0 1-.722 1.458.5.5 0 0 0-.151.493l.204.817c.045.179.184.32.364.364l1.792.448A1.725 1.725 0 0 1 22.915 10l-8.853-.001zm4.094 2.148l-2 2a.5.5 0 0 0 .707.707l2-2a.5.5 0 0 0-.707-.707zm-3.209 8.707l-1.501-.375-.063-.251c.389-.43.666-.979.781-1.549.267-.138.46-.4.5-.715l.108-.87a.933.933 0 0 0-.405-.89l.025-.531.091-.091c.258-.274.607-.859.055-1.703-.262-.401-.802-.879-1.884-.879-.319 0-1.038 0-1.736.437-2.058.073-2.3 1.182-2.3 2.019 0 .165.03.474.058.732a.94.94 0 0 0-.427.906l.108.87a.915.915 0 0 0 .553.729c.112.545.374 1.073.739 1.492l-.073.294-1.501.375A2.724 2.724 0 0 0 6.01 23.5a.498.498 0 0 0 .5.5l10.002-.001a.5.5 0 0 0 .5-.5 2.722 2.722 0 0 0-2.065-2.645zm-7.864 2.145a1.73 1.73 0 0 1 1.237-1.176l1.792-.448a.502.502 0 0 0 .364-.364l.213-.853a.499.499 0 0 0-.144-.486 2.263 2.263 0 0 1-.689-1.431c-.021-.259-.243-.403-.504-.403l-.129-.796a.498.498 0 0 0 .496-.562 13.611 13.611 0 0 1-.099-1.024c0-.518 0-1.007 1.462-1.022a.5.5 0 0 0 .286-.093C11.844 14 12.392 14 12.655 14c.517 0 .859.139 1.047.426.203.311.12.399.064.46l-.217.217a.499.499 0 0 0-.146.329l-.053 1.088c-.006.136.01.231.103.33.094.099.19.119.326.12l-.064.813a.5.5 0 0 0-.498.46 2.286 2.286 0 0 1-.723 1.459.5.5 0 0 0-.151.493l.204.817c.045.179.184.32.364.364l1.792.448A1.725 1.725 0 0 1 15.937 23l-8.854-.001z" })); }; - Customers.defaultProps = { viewBox: "0 0 24 24" }; - var Database = function Database(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", d: "M12 0C6.393 0 2 1.977 2 4.5v15C2 22.023 6.393 24 12 24s10-1.977 10-4.5v-15C22 1.977 17.607 0 12 0zm9 14.5c0 1.655-3.696 3.5-9 3.5s-9-1.845-9-3.5v-3.018C4.603 12.984 7.985 14 12 14s7.397-1.016 9-2.518V14.5zm0-5c0 1.655-3.696 3.5-9 3.5s-9-1.845-9-3.5V6.482C4.603 7.984 7.985 9 12 9s7.397-1.016 9-2.518V9.5zM12 1c5.304 0 9 1.845 9 3.5S17.304 8 12 8 3 6.155 3 4.5 6.696 1 12 1zm0 22c-5.304 0-9-1.845-9-3.5v-3.018C4.603 17.984 7.985 19 12 19s7.397-1.016 9-2.518V19.5c0 1.655-3.696 3.5-9 3.5z" })); }; - Database.defaultProps = { viewBox: "0 0 24 24" }; - var DataBuilder = function DataBuilder(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -294,14 +265,12 @@ var DataBuilder = function DataBuilder(props) { strokeLinejoin: "round" }))); }; - DataBuilder.defaultProps = { width: "24", height: "25", viewBox: "0 0 24 25", xmlns: "http://www.w3.org/2000/svg" }; - var DataRelation = function DataRelation(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -318,24 +287,20 @@ var DataRelation = function DataRelation(props) { d: "M8.804 16.223v5.303c0 .85-1.635 1.474-3.652 1.474-2.017 0-3.652-.624-3.652-1.474v-5.303M5.152 12V7.417a1.83 1.83 0 0 1 1.826-1.834h4.565l-.913-.916.913.916-.913.917m8.218 6.417V17.5a1.83 1.83 0 0 1-1.826 1.833h-4.565l.913.917-.913-.917.913-.916" }))); }; - DataRelation.defaultProps = { width: "24", height: "24", viewBox: "0 0 24 24" }; - var Delete = function Delete(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M11.707 10.293L16 6l1.414 1.414-4.293 4.293L17.414 16 16 17.414l-4.293-4.293-4.293 4.293L6 16l4.293-4.293L6 7.414 7.414 6l4.293 4.293z", fill: "currentColor" })); }; - Delete.defaultProps = { viewBox: "0 0 24 24" }; - var Diagram = function Diagram(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -379,14 +344,12 @@ var Diagram = function Diagram(props) { strokeLinecap: "square" })))); }; - Diagram.defaultProps = { width: "23", height: "25", viewBox: "0 0 23 25", xmlns: "http://www.w3.org/2000/svg" }; - var Discord = function Discord(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "currentColor", @@ -397,23 +360,19 @@ var Discord = function Discord(props) { d: "M18.891 2H5.11C3.946 2 3 2.966 3 4.163v14.196c0 1.197.946 2.163 2.109 2.163h11.664l-.546-1.942 1.317 1.249 1.245 1.176L21 23V4.163C21 2.966 20.054 2 18.891 2zm-3.97 13.713s-.37-.451-.679-.85c1.348-.389 1.862-1.25 1.862-1.25a5.842 5.842 0 0 1-1.183.62 6.666 6.666 0 0 1-1.491.451 7.06 7.06 0 0 1-2.664-.01 8.501 8.501 0 0 1-1.512-.452 5.971 5.971 0 0 1-.751-.357c-.031-.021-.062-.031-.093-.053a.142.142 0 0 1-.04-.031c-.186-.105-.289-.179-.289-.179s.494.84 1.8 1.24c-.308.399-.689.871-.689.871-2.273-.073-3.137-1.596-3.137-1.596 0-3.381 1.481-6.122 1.481-6.122 1.481-1.133 2.89-1.102 2.89-1.102l.103.126c-1.851.546-2.705 1.376-2.705 1.376s.226-.127.607-.305c1.1-.494 1.975-.63 2.335-.662.061-.01.113-.02.175-.02a8.527 8.527 0 0 1 2.077-.022c.977.116 2.027.41 3.096 1.009 0 0-.812-.788-2.56-1.334l.143-.168s1.41-.031 2.89 1.103c0 0 1.482 2.74 1.482 6.121 0 0-.875 1.522-3.148 1.596z" }))); }; - Discord.defaultProps = { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }; - var DismissData = function DismissData(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", d: "M13.283 22.743A20.798 20.798 0 0 1 10 23c-5.304 0-9-1.845-9-3.5v-3.018C2.602 17.984 5.985 19 10 19c.524 0 1.035-.021 1.537-.056a.5.5 0 1 0-.068-.998c-.48.033-.968.054-1.469.054-5.304 0-9-1.845-9-3.5v-3.018C2.602 12.984 5.985 14 10 14a21.38 21.38 0 0 0 4.127-.391.5.5 0 1 0-.194-.981A20.328 20.328 0 0 1 10 13c-5.304 0-9-1.845-9-3.5V6.482C2.602 7.984 5.985 9 10 9s7.397-1.016 9-2.518v3.024c-.003.676-.596 1.246-1.095 1.604a.5.5 0 0 0 .584.813c.193-.139.354-.287.511-.435v.092a.5.5 0 0 0 1 0V9.508l.001-.007L20 9.496V4.5C20 1.977 15.607 0 10 0S0 1.977 0 4.5v15C0 22.023 4.393 24 10 24c1.165 0 2.322-.091 3.44-.269a.5.5 0 0 0-.157-.988zM10 1c5.304 0 9 1.845 9 3.5S15.304 8 10 8 1 6.155 1 4.5 4.695 1 10 1zm8.501 12a5.483 5.483 0 0 0-3.879 1.605l-.01.007-.007.01a5.48 5.48 0 0 0-1.604 3.878c0 3.032 2.467 5.5 5.5 5.5 1.51 0 2.88-.613 3.875-1.602.004-.004.01-.005.014-.009.004-.004.005-.01.009-.014a5.483 5.483 0 0 0 1.602-3.875c0-3.032-2.467-5.5-5.5-5.5zm0 10a4.505 4.505 0 0 1-4.5-4.5c0-1.06.384-2.023 1-2.793L21.294 22c-.77.616-1.733 1-2.793 1zm3.5-1.707L15.707 15c.77-.616 1.733-1 2.794-1 2.482 0 4.5 2.019 4.5 4.5 0 1.06-.384 2.023-1 2.793z" })); }; - DismissData.defaultProps = { viewBox: "0 0 24 24" }; - var EditPencil = function EditPencil(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -428,12 +387,10 @@ var EditPencil = function EditPencil(props) { strokeLinejoin: "round" }))); }; - EditPencil.defaultProps = { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }; - var EightBase = function EightBase(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -446,25 +403,21 @@ var EightBase = function EightBase(props) { fillRule: "nonzero" }))); }; - EightBase.defaultProps = { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }; - var Environment = function Environment(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M4.164 13.568v4.176c0 1.56 1.176 2.808 2.592 2.808h1.608v1.896H6.828c-2.592 0-4.728-1.824-4.728-4.704v-4.176c0-.624-.672-1.224-1.464-1.224V10.4c.792 0 1.464-.6 1.464-1.224V4.952C2.076 2.072 4.236.272 6.828.272h1.536v1.896H6.756c-1.416 0-2.592 1.224-2.592 2.784v4.224c0 .84-.408 1.8-1.176 2.208.696.384 1.176 1.368 1.176 2.184zM19.836 17.744v-4.176c0-.816.48-1.8 1.176-2.184-.768-.408-1.176-1.368-1.176-2.208V4.952c0-1.56-1.176-2.784-2.592-2.784h-1.608V.272h1.536c2.592 0 4.752 1.8 4.728 4.68v4.224c0 .624.672 1.224 1.464 1.224v1.944c-.792 0-1.464.6-1.464 1.224v4.176c0 2.88-2.136 4.704-4.728 4.704h-1.536v-1.896h1.608c1.416 0 2.592-1.248 2.592-2.808z", fill: "currentColor" })); }; - Environment.defaultProps = { viewBox: "0 0 24 24" }; - var Expand = function Expand(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -477,13 +430,11 @@ var Expand = function Expand(props) { d: "M1 1l7.7 7.7M6.133 1H1v5.133M1 22.816l7.7-7.7M6.133 22.816H1v-5.133M22.816 1l-7.7 7.7M17.683 1h5.133v5.133M22.816 22.816l-7.7-7.7M17.683 22.816h5.133v-5.133" }))); }; - Expand.defaultProps = { width: "24", height: "24", viewBox: "0 0 24 24" }; - var FirewallOn = function FirewallOn(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M11 16a.502.502 0 0 1-.354-.146l-4-4a.5.5 0 0 1 .707-.707L11 14.793l6.646-6.646a.5.5 0 0 1 .707.707l-7 7A.498.498 0 0 1 11 16z", @@ -493,11 +444,9 @@ var FirewallOn = function FirewallOn(props) { fill: "currentColor" })); }; - FirewallOn.defaultProps = { viewBox: "0 0 24 24" }; - var Gear = function Gear(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M11.502 14.913c-2.217 0-4.022-1.756-4.022-3.913s1.805-3.913 4.022-3.913c2.218 0 4.023 1.756 4.023 3.913s-1.805 3.913-4.023 3.913zm7.638-2.933c.042-.32.073-.64.073-.98 0-.34-.031-.66-.073-.98l2.17-1.65a.496.496 0 0 0 .123-.64l-2.056-3.46c-.123-.22-.401-.3-.627-.22l-2.56 1c-.534-.4-1.11-.73-1.737-.98l-.391-2.65a.497.497 0 0 0-.503-.42H9.446a.498.498 0 0 0-.504.42l-.39 2.65c-.627.25-1.203.59-1.737.98l-2.56-1a.507.507 0 0 0-.627.22L1.572 7.73a.483.483 0 0 0 .123.64l2.169 1.65c-.041.32-.072.65-.072.98 0 .33.03.66.072.98l-2.169 1.65a.495.495 0 0 0-.123.64l2.056 3.46c.123.22.4.3.626.22l2.56-1c.535.4 1.11.73 1.738.98l.39 2.65c.032.24.247.42.504.42h4.113c.256 0 .472-.18.503-.42l.39-2.65a7.983 7.983 0 0 0 1.738-.98l2.56 1c.237.09.504 0 .627-.22l2.056-3.46a.496.496 0 0 0-.123-.64l-2.17-1.65z", @@ -509,13 +458,11 @@ var Gear = function Gear(props) { strokeLinejoin: "round" })); }; - Gear.defaultProps = { width: "23", height: "22", viewBox: "0 0 23 22" }; - var GraphQL = function GraphQL(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -523,22 +470,18 @@ var GraphQL = function GraphQL(props) { d: "M13.1 2.7l5 2.9c.2-.2.3-.3.5-.4 1.1-.6 2.4-.2 3 .8.6 1 .3 2.3-.8 2.9-.2.1-.4.2-.6.2v5.7l.6.3c1.1.6 1.4 1.9.8 2.9-.6 1-1.9 1.3-3 .8-.2-.2-.4-.3-.5-.5L13 21.2c.1.2.2.4.2.6 0 1.2-1 2.2-2.2 2.2-1.3 0-2.2-1-2.2-2.2 0-.2 0-.4.1-.6l-5.1-2.8c-.2.1-.3.3-.5.4-1.1.5-2.4.2-3-.8-.6-1-.2-2.3.8-2.9l.6-.3V9.1c-.2 0-.4-.1-.6-.2C0 8.3-.3 7 .3 6c.6-1 1.9-1.4 3-.8.2.1.3.2.5.4l5.1-2.9c-.1-.2-.1-.4-.1-.6C8.8 1 9.7 0 11 0c1.2 0 2.2 1 2.2 2.1 0 .2-.1.5-.1.6zm-.6.9l5.1 2.9c-.2.5-.1 1.1.2 1.6.3.6.8.9 1.4 1v5.7s-.1 0-.1.1L12.5 3.7v-.1zm-3.1.1L2.8 14.9c0-.1 0-.1-.1-.1V9.1c.6-.1 1.1-.4 1.4-1 .3-.5.4-1.1.2-1.6l5.1-2.9v.1zm2.2.5l6.6 11.2c-.2.1-.3.3-.4.4-.1.2-.2.4-.2.6H4.3c0-.2-.1-.4-.2-.6-.1-.1-.2-.3-.4-.4l6.6-11.2c.2 0 .5.1.7.1.2 0 .4-.1.6-.1zm1 16.2l5-2.8v-.2H4.3v.1l5.1 2.9c.4-.5 1-.7 1.6-.7.6 0 1.2.2 1.6.7z" })); }; - GraphQL.defaultProps = { viewBox: "0 0 22 24" }; - var Group = function Group(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M11.914 5c1.378 0 2.5-1.122 2.5-2.5S13.293 0 11.914 0c-1.378 0-2.5 1.122-2.5 2.5s1.122 2.5 2.5 2.5zm0-4c.827 0 1.5.673 1.5 1.5s-.673 1.5-1.5 1.5-1.5-.673-1.5-1.5.674-1.5 1.5-1.5zM19 6c1.378 0 2.5-1.122 2.5-2.5S20.379 1 19 1c-1.378 0-2.5 1.122-2.5 2.5S17.622 6 19 6zm0-4a1.501 1.501 0 1 1-1.5 1.5c0-.827.674-1.5 1.5-1.5zm-2.597 12.237l-.663-5.808C15.583 7.044 14.486 6 13.19 6h-2.553c-1.294 0-2.39 1.044-2.548 2.429l-.663 5.808a1.7 1.7 0 0 0 .411 1.323 1.48 1.48 0 0 0 1.027.505l.552 7.472a.5.5 0 0 0 .498.463h4c.262 0 .48-.202.498-.463l.552-7.472a1.478 1.478 0 0 0 1.027-.505c.318-.355.467-.837.412-1.323zm-1.156.657a.498.498 0 0 1-.366.173H14.5a.5.5 0 0 0-.499.463L13.45 23h-3.071l-.55-7.47a.5.5 0 0 0-.499-.463h-.38a.5.5 0 0 1-.366-.173.699.699 0 0 1-.164-.544l.663-5.808C9.183 7.663 9.852 7 10.639 7h2.553c.786 0 1.455.663 1.556 1.542l.663 5.808a.699.699 0 0 1-.164.544zm8.108-.579l-.641-5.124a2.502 2.502 0 0 0-2.48-2.19h-2.469c-.278 0-.558.049-.833.147a.5.5 0 0 0 .334.942c.167-.059.335-.089.499-.089h2.469c.755 0 1.394.565 1.488 1.314l.641 5.124c.018.144-.025.284-.121.393s-.229.169-.375.169H21.5a.5.5 0 0 0-.499.464l-.467 6.536h-3.069l-.36-5.037a.495.495 0 0 0-.534-.463.5.5 0 0 0-.463.534l.393 5.501c.02.261.238.464.499.464h4a.5.5 0 0 0 .498-.463l.467-6.539a1.5 1.5 0 0 0 1.39-1.683zm-15.933 2.3a.494.494 0 0 0-.534.463L6.536 22h-3.07L3 15.464A.501.501 0 0 0 2.5 15h-.367c-.146 0-.279-.06-.375-.169s-.139-.248-.121-.393l.641-5.124A1.5 1.5 0 0 1 3.766 8h2.469c.112 0 .231.017.377.056a.5.5 0 0 0 .254-.968A2.46 2.46 0 0 0 6.234 7H3.766a2.503 2.503 0 0 0-2.48 2.19l-.641 5.124a1.501 1.501 0 0 0 1.39 1.683l.467 6.539A.5.5 0 0 0 3 23h4a.5.5 0 0 0 .499-.464l.385-5.387a.5.5 0 0 0-.462-.534zM5 6c1.378 0 2.5-1.122 2.5-2.5S6.379 1 5 1C3.622 1 2.5 2.122 2.5 3.5S3.622 6 5 6zm0-4a1.501 1.501 0 1 1-1.5 1.5C3.5 2.673 4.174 2 5 2z", fill: "currentColor" })); }; - Group.defaultProps = { viewBox: "0 0 24 24" }; - var HelpCenter = function HelpCenter(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { transform: "translate(1 1)", @@ -556,13 +499,11 @@ var HelpCenter = function HelpCenter(props) { fill: "currentColor" }))); }; - HelpCenter.defaultProps = { width: "22", height: "22", viewBox: "0 0 22 22" }; - var Home = function Home(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M10.309 1.958l-8.892 8.873h1.67v10h5.01v-7.5h5.846v7.5h5.011v-10h1.671l-8.892-8.873a1.009 1.009 0 0 0-.711-.294h-.002c-.266 0-.523.106-.711.294z", @@ -574,35 +515,29 @@ var Home = function Home(props) { strokeLinejoin: "round" })); }; - Home.defaultProps = { width: "22", height: "22", viewBox: "0 0 22 22" }; - var House = function House(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", d: "M23.854 11.138L13.206.491c-.643-.644-1.767-.645-2.413 0L.146 11.138a.499.499 0 0 0 .354.854H2v11.5a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5v-8.5h6v8.5a.5.5 0 0 0 .5.5h6c.276 0 .5-.224.499-.5v-11.5h1.5a.5.5 0 0 0 .355-.854zm-2.354-.146a.5.5 0 0 0-.5.5v11.5h-4.999v-8.5a.5.5 0 0 0-.5-.5h-7a.5.5 0 0 0-.5.5v8.5h-5v-11.5a.5.5 0 0 0-.5-.5h-.793l9.793-9.793a.728.728 0 0 1 .999 0l9.793 9.793H21.5z" })); }; - House.defaultProps = { viewBox: "0 0 24 24" }; - var Lock = function Lock(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M18.5 10.051V6.5C18.5 2.916 15.584 0 12 0S5.5 2.916 5.5 6.5v3.551c-1.14.232-2 1.243-2 2.449v9C3.5 22.878 4.621 24 6 24h12c1.379 0 2.5-1.122 2.5-2.5v-9c0-1.207-.86-2.217-2-2.449zM6.5 6.5C6.5 3.467 8.968 1 12 1s5.5 2.467 5.5 5.5V10h-1V6.5C16.5 4.019 14.481 2 12 2S7.5 4.019 7.5 6.5V10h-1V6.5zm9 0V10h-7V6.5C8.5 4.57 10.07 3 12 3s3.5 1.57 3.5 3.5zm4 15c0 .827-.673 1.5-1.5 1.5H6c-.827 0-1.5-.673-1.5-1.5v-9c0-.827.673-1.5 1.5-1.5h12c.827 0 1.5.673 1.5 1.5v9zM12 13a2.503 2.503 0 0 0-2.5 2.5c0 .95.555 1.813 1.391 2.231l-.386 2.699A.497.497 0 0 0 11 21h2a.503.503 0 0 0 .495-.571l-.386-2.699A2.508 2.508 0 0 0 14.5 15.5c0-1.378-1.121-2.5-2.5-2.5zm.418 3.931a.501.501 0 0 0-.354.551l.36 2.518h-.848l.36-2.518a.5.5 0 0 0-.354-.551A1.485 1.485 0 0 1 10.5 15.5c0-.827.673-1.5 1.5-1.5s1.5.673 1.5 1.5c0 .667-.435 1.242-1.082 1.431z", fill: "currentColor" })); }; - Lock.defaultProps = { viewBox: "0 0 24 24" }; - var Logic = function Logic(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -646,14 +581,12 @@ var Logic = function Logic(props) { strokeLinecap: "square" })))); }; - Logic.defaultProps = { width: "23", height: "25", viewBox: "0 0 23 25", xmlns: "http://www.w3.org/2000/svg" }; - var Mail = function Mail(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M21.5 20h-19A2.503 2.503 0 0 1 0 17.5v-11C0 5.122 1.122 4 2.5 4h19C22.878 4 24 5.122 24 6.5v11c0 1.378-1.122 2.5-2.5 2.5zM2.5 5C1.673 5 1 5.673 1 6.5v11c0 .827.673 1.5 1.5 1.5h19c.827 0 1.5-.673 1.5-1.5v-11c0-.827-.673-1.5-1.5-1.5h-19z", @@ -663,18 +596,15 @@ var Mail = function Mail(props) { fill: "currentColor" })); }; - Mail.defaultProps = { viewBox: "0 0 24 24" }; - var Man = function Man(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M1.998 2a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm5.945 5.275l-.72-1.445A1.5 1.5 0 0 0 5.878 5h-3.76a1.5 1.5 0 0 0-1.345.83l-.72 1.445A.5.5 0 0 0 .498 8h7a.5.5 0 0 0 .445-.725z", fill: "#323C47" })); }; - Man.defaultProps = { width: "8", height: "8", @@ -682,7 +612,6 @@ Man.defaultProps = { fill: "none", xmlns: "http://www.w3.org/2000/svg" }; - var MapPin = function MapPin(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M12 14c-3.032 0-5.5-2.467-5.5-5.5S8.968 3 12 3s5.5 2.467 5.5 5.5S15.032 14 12 14zm0-10C9.519 4 7.5 6.019 7.5 8.5S9.519 13 12 13s4.5-2.019 4.5-4.5S14.481 4 12 4z", @@ -695,11 +624,9 @@ var MapPin = function MapPin(props) { fill: "currentColor" })); }; - MapPin.defaultProps = { viewBox: "0 0 24 24" }; - var Minus = function Minus(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("rect", { fill: "currentColor", @@ -711,14 +638,12 @@ var Minus = function Minus(props) { transform: "translate(0 4)" })); }; - Minus.defaultProps = { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12" }; - var More = function More(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -726,14 +651,12 @@ var More = function More(props) { d: "M5.372 10a2 2 0 1 1 0 4 2 2 0 0 1 0-4zm8.616 2a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm4.64-2a2 2 0 1 1 .001 4 2 2 0 0 1 0-4z" })); }; - More.defaultProps = { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }; - var MoreVertical = function MoreVertical(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -741,36 +664,30 @@ var MoreVertical = function MoreVertical(props) { d: "M10 18.628a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm2-8.616a2 2 0 1 1 0 4 2 2 0 0 1 0-4zm-2-4.64a2 2 0 1 1 4-.001 2 2 0 0 1-4 0z" })); }; - MoreVertical.defaultProps = { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }; - var PaperClip = function PaperClip(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M6.5 23h-4A2.503 2.503 0 0 1 0 20.5v-4c0-1.423.554-2.761 1.561-3.768l9.586-9.586a.5.5 0 0 1 .707.707l-9.586 9.586A4.3 4.3 0 0 0 1 16.5v4c0 .827.673 1.5 1.5 1.5h4a4.3 4.3 0 0 0 3.061-1.268L22.086 8.207C22.675 7.618 23 6.833 23 6s-.325-1.618-.914-2.207l-.879-.879c-1.179-1.179-3.235-1.179-4.414 0L5.561 14.146c-.357.357-.561.85-.561 1.354v2a.5.5 0 0 0 .5.5h2c.504 0 .997-.204 1.354-.561l8.293-8.293a.5.5 0 0 1 .707.707l-8.293 8.293A2.935 2.935 0 0 1 7.5 19h-2c-.827 0-1.5-.673-1.5-1.5v-2c0-.767.311-1.518.854-2.061L16.086 2.207C16.864 1.429 17.899 1 19 1s2.136.429 2.914 1.207l.879.879C23.571 3.864 24 4.899 24 6s-.429 2.136-1.207 2.914L10.268 21.439A5.293 5.293 0 0 1 6.5 23z", fill: "currentColor" })); }; - PaperClip.defaultProps = { viewBox: "0 0 24 24" }; - var Planet = function Planet(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M19.776 4.224A10.918 10.918 0 0 0 12 1a10.918 10.918 0 0 0-7.776 3.224A10.945 10.945 0 0 0 1 12c0 2.936 1.145 5.702 3.224 7.776A10.945 10.945 0 0 0 12 23c2.936 0 5.702-1.145 7.776-3.224A10.945 10.945 0 0 0 23 12c0-2.936-1.145-5.702-3.224-7.776zm2.227 7.282h-4.265c-.04-1.697-.278-3.331-.696-4.782a10.909 10.909 0 0 0 2.267-1.562 9.99 9.99 0 0 1 2.694 6.344zm-9.51.988h4.262c-.036 1.562-.252 3.057-.624 4.395a11.105 11.105 0 0 0-3.637-.79v-3.605zM18.6 4.475c-.575.507-1.203.938-1.868 1.298-.17-.476-.363-.925-.579-1.347-.426-.844-.911-1.536-1.446-2.066A9.972 9.972 0 0 1 18.6 4.475zM12.494 2.14c1.028.23 1.998 1.177 2.78 2.721.21.418.399.862.565 1.334a10.076 10.076 0 0 1-3.345.75V2.14zm3.641 5.002c.368 1.329.58 2.815.615 4.369h-4.256V7.937a11.11 11.11 0 0 0 3.641-.795zm-4.629 4.364h-4.26c.035-1.553.246-3.04.614-4.368 1.15.466 2.38.736 3.642.79v3.578h.004zm.005-9.366v4.804a10.05 10.05 0 0 1-3.345-.75c.166-.47.354-.915.565-1.333.782-1.544 1.751-2.492 2.78-2.72zm-2.214.22c-.534.53-1.019 1.226-1.446 2.066-.21.422-.404.87-.579 1.347-.664-.36-1.288-.79-1.868-1.298A9.972 9.972 0 0 1 9.297 2.36zM4.695 5.162c.696.62 1.455 1.14 2.267 1.562-.417 1.455-.66 3.085-.695 4.782H2a9.99 9.99 0 0 1 2.694-6.344zm-2.694 7.332h4.266c.04 1.71.282 3.35.704 4.808a10.81 10.81 0 0 0-2.258 1.554 9.974 9.974 0 0 1-2.712-6.362zm3.421 7.049a10.04 10.04 0 0 1 1.86-1.289c.17.463.358.907.57 1.32.426.844.91 1.536 1.445 2.07a10.021 10.021 0 0 1-3.875-2.101zm6.089 2.317c-1.029-.23-1.998-1.177-2.78-2.721a11.54 11.54 0 0 1-.556-1.307 9.91 9.91 0 0 1 3.336-.745v4.773zm-3.637-4.97c-.373-1.339-.588-2.834-.624-4.396h4.26v3.605a10.88 10.88 0 0 0-3.636.79zm4.624 4.97v-4.773a10.02 10.02 0 0 1 3.336.745c-.166.463-.35.898-.556 1.307-.782 1.544-1.751 2.492-2.78 2.72zm2.214-.22c.534-.53 1.019-1.226 1.446-2.07.21-.413.4-.858.57-1.32.66.354 1.284.786 1.859 1.288a9.905 9.905 0 0 1-3.875 2.102zm4.588-2.784a10.983 10.983 0 0 0-2.258-1.554c.422-1.459.665-3.102.705-4.808h4.265a10.021 10.021 0 0 1-2.712 6.362z", fill: "currentColor" })); }; - Planet.defaultProps = { viewBox: "0 0 24 24" }; - var Plus = function Plus(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { fill: "currentColor", @@ -778,12 +695,10 @@ var Plus = function Plus(props) { d: "M21.318 14.685h-6.633v6.631a2.684 2.684 0 0 1-5.37 0v-6.631h-6.63a2.683 2.683 0 1 1 0-5.367h6.63V2.686a2.685 2.685 0 1 1 5.37 0v6.632h6.633a2.684 2.684 0 0 1 0 5.367z" })); }; - Plus.defaultProps = { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }; - var Schema = function Schema(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -804,14 +719,12 @@ var Schema = function Schema(props) { strokeWidth: ".9" })))); }; - Schema.defaultProps = { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }; - var Screens = function Screens(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "currentColor", @@ -824,23 +737,19 @@ var Screens = function Screens(props) { d: "M4.958 8.792a.75.75 0 0 1-1.5 0V6.958a2.583 2.583 0 0 1 2.584-2.583h11a2.583 2.583 0 0 1 2.583 2.583v10.084a2.583 2.583 0 0 1-2.583 2.583h-.917a.75.75 0 1 1 0-1.5h.917c.598 0 1.083-.485 1.083-1.083V6.958c0-.598-.485-1.083-1.083-1.083h-11c-.599 0-1.084.485-1.084 1.083v1.834z" }))); }; - Screens.defaultProps = { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }; - var Search = function Search(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M23.854 23.146l-7.302-7.302A9.453 9.453 0 0 0 19 9.5C19 4.262 14.738 0 9.5 0S0 4.262 0 9.5 4.262 19 9.5 19c2.44 0 4.66-.932 6.344-2.449l7.302 7.302a.5.5 0 1 0 .708-.707zM9.5 18C4.813 18 1 14.187 1 9.5S4.813 1 9.5 1 18 4.813 18 9.5 14.187 18 9.5 18z", fill: "currentColor" })); }; - Search.defaultProps = { viewBox: "0 0 24 24" }; - var Settings = function Settings(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { transform: "translate(0 1)", @@ -878,14 +787,12 @@ var Settings = function Settings(props) { r: "2.5" }))); }; - Settings.defaultProps = { width: "26", height: "24", viewBox: "0 0 26 24", xmlns: "http://www.w3.org/2000/svg" }; - var SpeedMeter = function SpeedMeter(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M12 23.5C5.659 23.5.5 18.341.5 12S5.659.5 12 .5 23.5 5.659 23.5 12 18.341 23.5 12 23.5zm0-22C6.21 1.5 1.5 6.21 1.5 12S6.21 22.5 12 22.5 22.5 17.79 22.5 12 17.79 1.5 12 1.5z", @@ -901,11 +808,9 @@ var SpeedMeter = function SpeedMeter(props) { fill: "currentColor" })); }; - SpeedMeter.defaultProps = { viewBox: "0 0 24 24" }; - var Table = function Table(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -920,14 +825,12 @@ var Table = function Table(props) { d: "M2 19h20V5H2zM2 7.8h20M2 11.533h20M2 15.267h20M8.957 7.8V19M15.043 7.8V19" })))); }; - Table.defaultProps = { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }; - var Tables = function Tables(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("g", { fill: "none", @@ -942,14 +845,12 @@ var Tables = function Tables(props) { fillRule: "nonzero" }))); }; - Tables.defaultProps = { width: "24", height: "24", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }; - var Trashcan = function Trashcan(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M20.5 6h-17a.5.5 0 0 1-.5-.5v-1C3 3.122 4.121 2 5.5 2h2.691l.309-.618A2.486 2.486 0 0 1 10.736 0h2.527c.953 0 1.81.529 2.236 1.382l.31.618H18.5C19.879 2 21 3.122 21 4.5v1a.5.5 0 0 1-.5.5zM4 5h16v-.5c0-.827-.673-1.5-1.5-1.5h-3a.5.5 0 0 1-.447-.276l-.447-.895A1.493 1.493 0 0 0 13.264 1h-2.527a1.49 1.49 0 0 0-1.342.829l-.448.895A.5.5 0 0 1 8.5 3h-3C4.673 3 4 3.673 4 4.5V5z", @@ -962,11 +863,9 @@ var Trashcan = function Trashcan(props) { fill: "currentColor" })); }; - Trashcan.defaultProps = { viewBox: "0 0 24 24" }; - var TreeView = function TreeView(props) { return ___EmotionJSX("svg", props, ___EmotionJSX("path", { d: "M21.5.5h-19A2.503 2.503 0 0 0 0 3v18c0 1.378 1.121 2.5 2.5 2.5h19c1.379 0 2.5-1.122 2.5-2.5V3C24 1.622 22.879.5 21.5.5zm-19 1h19c.827 0 1.5.673 1.5 1.5v1.5H1V3c0-.827.673-1.5 1.5-1.5zm19 21h-19c-.827 0-1.5-.673-1.5-1.5V5.5h22V21c0 .827-.673 1.5-1.5 1.5z" @@ -986,7 +885,6 @@ var TreeView = function TreeView(props) { d: "M9.5 12.5h-2a.5.5 0 0 0-.5.5v.5H6v-3h.5A.5.5 0 0 0 7 10V8a.5.5 0 0 0-.5-.5h-2A.5.5 0 0 0 4 8v2a.5.5 0 0 0 .5.5H5V19a.5.5 0 0 0 .5.5H7v.5a.5.5 0 0 0 .5.5h2a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5v.5H6v-4h1v.5a.5.5 0 0 0 .5.5h2a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5zM5 8.5h1v1H5v-1zm3 10h1v1H8v-1zm1-4H8v-1h1v1zM9.5 9.5h7a.5.5 0 0 0 0-1h-7a.5.5 0 0 0 0 1zM19.5 13.5h-7a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1zM19.5 18.5h-7a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1z" })); }; - TreeView.defaultProps = { viewBox: "0 0 24 24" }; diff --git a/es/components/Indicator/Indicator.js b/es/components/Indicator/Indicator.js index 1aca90cf..86b96671 100644 --- a/es/components/Indicator/Indicator.js +++ b/es/components/Indicator/Indicator.js @@ -4,12 +4,10 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { IndicatorContainerTag, IndicatorTag } from './Indicator.theme'; import { Text } from '../Text'; - var Indicator = function Indicator(_ref) { var children = _ref.children, - status = _ref.status, - rest = _objectWithoutProperties(_ref, ["children", "status"]); - + status = _ref.status, + rest = _objectWithoutProperties(_ref, ["children", "status"]); return ___EmotionJSX(IndicatorContainerTag, _extends({ tagName: "span" }, rest), ___EmotionJSX(IndicatorTag, { @@ -17,7 +15,6 @@ var Indicator = function Indicator(_ref) { status: status }), ___EmotionJSX(Text, null, children)); }; - Indicator.defaultProps = { status: 'disabled' }; diff --git a/es/components/Indicator/Indicator.theme.js b/es/components/Indicator/Indicator.theme.js index 1806224e..a0cd58dc 100644 --- a/es/components/Indicator/Indicator.theme.js +++ b/es/components/Indicator/Indicator.theme.js @@ -1,50 +1,43 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'indicator'; - var _createThemeTag = createThemeTag("".concat(name, "Container"), function () { - return { - root: { - display: 'flex', - alignItems: 'center' - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - IndicatorContainerTag = _createThemeTag2[0], - themeContainer = _createThemeTag2[1]; - + return { + root: { + display: 'flex', + alignItems: 'center' + } + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + IndicatorContainerTag = _createThemeTag2[0], + themeContainer = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS; - return { - root: { - width: '12px', - height: '12px', - borderRadius: '50%', - marginRight: '8px' - }, - modifiers: { - status: { - enabled: { - backgroundColor: COLORS.GREEN_40 - }, - disabled: { - backgroundColor: COLORS.GRAY_30 + var COLORS = _ref.COLORS; + return { + root: { + width: '12px', + height: '12px', + borderRadius: '50%', + marginRight: '8px' + }, + modifiers: { + status: { + enabled: { + backgroundColor: COLORS.GREEN_40 + }, + disabled: { + backgroundColor: COLORS.GRAY_30 + } } } - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - IndicatorTag = _createThemeTag4[0], - themeIndicator = _createThemeTag4[1]; - + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + IndicatorTag = _createThemeTag4[0], + themeIndicator = _createThemeTag4[1]; var theme = _objectSpread({}, themeContainer, {}, themeIndicator); - export { IndicatorContainerTag, IndicatorTag, theme }; \ No newline at end of file diff --git a/es/components/Input/Input.js b/es/components/Input/Input.js index ddfd6e1f..e4968097 100644 --- a/es/components/Input/Input.js +++ b/es/components/Input/Input.js @@ -11,33 +11,23 @@ import React, { PureComponent } from 'react'; import InputMask from 'react-input-mask'; import { Icon } from '../Icon'; import { InputWrapperTag, InputTag, InputIndicatorTag, InputRightIconTag, InputLeftIconTag, InputClearButtonTag, InputArrowsTag, InputArrowTag } from './Input.theme'; - -var Input = -/*#__PURE__*/ -function (_PureComponent) { +var Input = /*#__PURE__*/function (_PureComponent) { _inherits(Input, _PureComponent); - function Input() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, Input); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Input)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.onChange = function (event) { var _this$props = _this.props, - onChange = _this$props.onChange, - type = _this$props.type, - maxLength = _this$props.maxLength; + onChange = _this$props.onChange, + type = _this$props.type, + maxLength = _this$props.maxLength; var value = event.target.value; var hasNotMaxLength = maxLength === undefined; - if (value.toString().length <= maxLength || hasNotMaxLength) { if (type === 'number') { onChange && onChange(!value ? value : Number(value), event); @@ -46,81 +36,72 @@ function (_PureComponent) { } } }; - _this.onArrowClick = function (changeNumber) { if (_this.props.type !== 'number') { return; } - var _this$props2 = _this.props, - onChange = _this$props2.onChange, - maxLength = _this$props2.maxLength; + onChange = _this$props2.onChange, + maxLength = _this$props2.maxLength; var value = _this.props.value || 0; - var hasNotMaxLength = maxLength === undefined; // $FlowFixMe thinks that maxLength can be undefined in second statement + var hasNotMaxLength = maxLength === undefined; + // $FlowFixMe thinks that maxLength can be undefined in second statement if (hasNotMaxLength || value.toString().length <= maxLength) { onChange && onChange(Number(value) + changeNumber); } }; - _this.onIncrementValue = function () { _this.onArrowClick(1); }; - _this.onDecrementValue = function () { _this.onArrowClick(-1); }; - _this.onClear = function () { var _this$props3 = _this.props, - onClear = _this$props3.onClear, - onChange = _this$props3.onChange; - + onClear = _this$props3.onClear, + onChange = _this$props3.onChange; if (typeof onChange === 'function') { onChange(''); } - if (typeof onClear === 'function') { onClear(); } }; - return _this; } - _createClass(Input, [{ key: "render", value: function render() { var _this$props4 = this.props, - align = _this$props4.align, - autoComplete = _this$props4.autoComplete, - errorText = _this$props4.errorText, - hasError = _this$props4.hasError, - hideErrorIndicator = _this$props4.hideErrorIndicator, - insideRef = _this$props4.insideRef, - leftIcon = _this$props4.leftIcon, - mask = _this$props4.mask, - onBlur = _this$props4.onBlur, - onFocus = _this$props4.onFocus, - placeholder = _this$props4.placeholder, - rightIcon = _this$props4.rightIcon, - width = _this$props4.width, - stretch = _this$props4.stretch, - type = _this$props4.type, - value = _this$props4.value, - name = _this$props4.name, - kind = _this$props4.kind, - disabled = _this$props4.disabled, - readOnly = _this$props4.readOnly, - clearable = _this$props4.clearable, - onClear = _this$props4.onClear, - autoFocus = _this$props4.autoFocus, - step = _this$props4.step, - min = _this$props4.min, - max = _this$props4.max, - hideNumberArrows = _this$props4.hideNumberArrows, - rest = _objectWithoutProperties(_this$props4, ["align", "autoComplete", "errorText", "hasError", "hideErrorIndicator", "insideRef", "leftIcon", "mask", "onBlur", "onFocus", "placeholder", "rightIcon", "width", "stretch", "type", "value", "name", "kind", "disabled", "readOnly", "clearable", "onClear", "autoFocus", "step", "min", "max", "hideNumberArrows"]); - + align = _this$props4.align, + autoComplete = _this$props4.autoComplete, + errorText = _this$props4.errorText, + hasError = _this$props4.hasError, + hideErrorIndicator = _this$props4.hideErrorIndicator, + insideRef = _this$props4.insideRef, + leftIcon = _this$props4.leftIcon, + mask = _this$props4.mask, + onBlur = _this$props4.onBlur, + onFocus = _this$props4.onFocus, + placeholder = _this$props4.placeholder, + rightIcon = _this$props4.rightIcon, + width = _this$props4.width, + stretch = _this$props4.stretch, + type = _this$props4.type, + value = _this$props4.value, + name = _this$props4.name, + kind = _this$props4.kind, + disabled = _this$props4.disabled, + readOnly = _this$props4.readOnly, + clearable = _this$props4.clearable, + onClear = _this$props4.onClear, + autoFocus = _this$props4.autoFocus, + step = _this$props4.step, + min = _this$props4.min, + max = _this$props4.max, + hideNumberArrows = _this$props4.hideNumberArrows, + rest = _objectWithoutProperties(_this$props4, ["align", "autoComplete", "errorText", "hasError", "hideErrorIndicator", "insideRef", "leftIcon", "mask", "onBlur", "onFocus", "placeholder", "rightIcon", "width", "stretch", "type", "value", "name", "kind", "disabled", "readOnly", "clearable", "onClear", "autoFocus", "step", "min", "max", "hideNumberArrows"]); var hasLeftIcon = !!leftIcon; var hasRightIcon = !!rightIcon; var inputProps = { @@ -193,10 +174,8 @@ function (_PureComponent) { }))) : null); } }]); - return Input; }(PureComponent); - Input.defaultProps = { align: 'left', autoComplete: false, diff --git a/es/components/Input/Input.test.js b/es/components/Input/Input.test.js index 2068afe3..f8eee8c1 100644 --- a/es/components/Input/Input.test.js +++ b/es/components/Input/Input.test.js @@ -93,11 +93,12 @@ describe('', function () { onChange: onChange, type: "number", hideNumberArrows: false - })); // From "" (0) to 1 + })); + // From "" (0) to 1 wrapper.find('Boost(inputArrow)').first().simulate('click'); - expect(onChange).toHaveBeenCalledWith(1); // From "" (0) to -1 - + expect(onChange).toHaveBeenCalledWith(1); + // From "" (0) to -1 wrapper.find('Boost(inputArrow)').last().simulate('click'); expect(onChange).toHaveBeenCalledWith(-1); }); diff --git a/es/components/Input/Input.theme.js b/es/components/Input/Input.theme.js index 0e285442..9b68b456 100644 --- a/es/components/Input/Input.theme.js +++ b/es/components/Input/Input.theme.js @@ -1,118 +1,111 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'input'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, SIZES = _ref.SIZES, FONTS = _ref.FONTS; - return { - root: function root(props) { - return _objectSpread({ - width: props.width ? "".concat(props.width, "rem") : props.stretch ? '100%' : SIZES.FIELD_WIDTH, - outline: 'none', - paddingTop: '1px', - paddingLeft: props.hasLeftIcon ? '36px' : '15px', - paddingRight: props.hasRightIcon || props.type === 'number' && !props.hideNumberArrows ? '48px' : '16px', - backgroundColor: props.disabled || props.readOnly ? COLORS.DISABLED_COLOR : COLORS.WHITE, - borderColor: COLORS.PRIMARY_BORDER_COLOR, - '&:focus': { - borderColor: props.disabled || props.readOnly ? COLORS.PRIMARY_BORDER_COLOR : COLORS.PRIMARY - }, - '&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': { - '-webkit-appearance': 'none', - margin: 0 - }, - '&[type=number]': { - '-moz-appearance': 'textfield' - }, - '&::-ms-clear': { - display: 'none' - } - }, FONTS.BODY_1, { - color: props.disabled ? COLORS.LIGHT_TEXT_COLOR : COLORS.PRIMARY_TEXT_COLOR, - height: '36px', - transition: 'all .15s ease-in-out', - '&::placeholder': { - color: COLORS.PLACEHOLDER_COLOR - } - }); - }, - modifiers: { - align: { - left: { - textAlign: 'left ' - }, - right: { - textAlign: 'right ' - }, - center: { - textAlign: 'center ' - } + return { + root: function root(props) { + return _objectSpread({ + width: props.width ? "".concat(props.width, "rem") : props.stretch ? '100%' : SIZES.FIELD_WIDTH, + outline: 'none', + paddingTop: '1px', + paddingLeft: props.hasLeftIcon ? '36px' : '15px', + paddingRight: props.hasRightIcon || props.type === 'number' && !props.hideNumberArrows ? '48px' : '16px', + backgroundColor: props.disabled || props.readOnly ? COLORS.DISABLED_COLOR : COLORS.WHITE, + borderColor: COLORS.PRIMARY_BORDER_COLOR, + '&:focus': { + borderColor: props.disabled || props.readOnly ? COLORS.PRIMARY_BORDER_COLOR : COLORS.PRIMARY + }, + '&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': { + '-webkit-appearance': 'none', + margin: 0 + }, + '&[type=number]': { + '-moz-appearance': 'textfield' + }, + '&::-ms-clear': { + display: 'none' + } + }, FONTS.BODY_1, { + color: props.disabled ? COLORS.LIGHT_TEXT_COLOR : COLORS.PRIMARY_TEXT_COLOR, + height: '36px', + transition: 'all .15s ease-in-out', + '&::placeholder': { + color: COLORS.PLACEHOLDER_COLOR + } + }); }, - kind: { - bordered: { - borderStyle: 'solid', - borderWidth: '1px', - borderRadius: '5px' + modifiers: { + align: { + left: { + textAlign: 'left ' + }, + right: { + textAlign: 'right ' + }, + center: { + textAlign: 'center ' + } + }, + kind: { + bordered: { + borderStyle: 'solid', + borderWidth: '1px', + borderRadius: '5px' + }, + underline: { + borderWidth: 0, + borderBottomStyle: 'solid', + borderBottomWidth: '1px' + } }, - underline: { - borderWidth: 0, - borderBottomStyle: 'solid', - borderBottomWidth: '1px' + hasError: { + borderColor: "".concat(COLORS.DANGER) } - }, - hasError: { - borderColor: "".concat(COLORS.DANGER) } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - InputTag = _createThemeTag2[0], - themeInput = _createThemeTag2[1]; - -var _createThemeTag3 = createThemeTag("".concat(name, "Wrapper"), { - root: function root(props) { - return { - display: 'inline-flex', - position: 'relative', - width: props.stretch && !props.width ? '100%' : 'auto' }; - } -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - InputWrapperTag = _createThemeTag4[0], - themeWrapper = _createThemeTag4[1]; - -var _createThemeTag5 = createThemeTag("".concat(name, "Indicator"), function (_ref2) { - var COLORS = _ref2.COLORS; - return { + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + InputTag = _createThemeTag2[0], + themeInput = _createThemeTag2[1]; +var _createThemeTag3 = createThemeTag("".concat(name, "Wrapper"), { root: function root(props) { return { - display: props.hasRightIcon ? 'none' : 'block', - position: 'absolute', - right: '8px', - top: '50%', - transform: 'translateY(-50%)', - width: '6px', - height: '6px', - backgroundColor: COLORS.DANGER, - borderRadius: '50%' + display: 'inline-flex', + position: 'relative', + width: props.stretch && !props.width ? '100%' : 'auto' }; } - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - InputIndicatorTag = _createThemeTag6[0], - themeIndicator = _createThemeTag6[1]; - + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + InputWrapperTag = _createThemeTag4[0], + themeWrapper = _createThemeTag4[1]; +var _createThemeTag5 = createThemeTag("".concat(name, "Indicator"), function (_ref2) { + var COLORS = _ref2.COLORS; + return { + root: function root(props) { + return { + display: props.hasRightIcon ? 'none' : 'block', + position: 'absolute', + right: '8px', + top: '50%', + transform: 'translateY(-50%)', + width: '6px', + height: '6px', + backgroundColor: COLORS.DANGER, + borderRadius: '50%' + }; + } + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + InputIndicatorTag = _createThemeTag6[0], + themeIndicator = _createThemeTag6[1]; var iconsStyles = { position: 'absolute', display: 'flex', @@ -121,75 +114,68 @@ var iconsStyles = { height: '100%', width: '32px' }; - var _createThemeTag7 = createThemeTag("".concat(name, "LeftIcon"), { - root: _objectSpread({}, iconsStyles, { - left: '8px' - }) -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - InputLeftIconTag = _createThemeTag8[0], - themeLeftIcon = _createThemeTag8[1]; - + root: _objectSpread({}, iconsStyles, { + left: '8px' + }) + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + InputLeftIconTag = _createThemeTag8[0], + themeLeftIcon = _createThemeTag8[1]; var _createThemeTag9 = createThemeTag("".concat(name, "RightIcon"), { - root: _objectSpread({}, iconsStyles, { - right: '8px' - }) -}), - _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), - InputRightIconTag = _createThemeTag10[0], - themeRightIcon = _createThemeTag10[1]; - + root: _objectSpread({}, iconsStyles, { + right: '8px' + }) + }), + _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), + InputRightIconTag = _createThemeTag10[0], + themeRightIcon = _createThemeTag10[1]; var _createThemeTag11 = createThemeTag("".concat(name, "ClearButton"), function (_ref3) { - var COLORS = _ref3.COLORS; - return { - root: { - position: 'absolute', - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - height: '100%', - right: '8px', - color: COLORS.PRIMARY_BORDER_COLOR, - cursor: 'pointer' - } - }; -}), - _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), - InputClearButtonTag = _createThemeTag12[0], - themeClearButton = _createThemeTag12[1]; - + var COLORS = _ref3.COLORS; + return { + root: { + position: 'absolute', + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + height: '100%', + right: '8px', + color: COLORS.PRIMARY_BORDER_COLOR, + cursor: 'pointer' + } + }; + }), + _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), + InputClearButtonTag = _createThemeTag12[0], + themeClearButton = _createThemeTag12[1]; var _createThemeTag13 = createThemeTag("".concat(name, "Arrows"), function () { - return { - root: { - position: 'absolute', - display: 'flex', - flexDirection: 'column', - height: '64%', - right: '8px', - top: '50%', - transform: 'translateY(-50%)' - } - }; -}), - _createThemeTag14 = _slicedToArray(_createThemeTag13, 2), - InputArrowsTag = _createThemeTag14[0], - themeInputArrows = _createThemeTag14[1]; - + return { + root: { + position: 'absolute', + display: 'flex', + flexDirection: 'column', + height: '64%', + right: '8px', + top: '50%', + transform: 'translateY(-50%)' + } + }; + }), + _createThemeTag14 = _slicedToArray(_createThemeTag13, 2), + InputArrowsTag = _createThemeTag14[0], + themeInputArrows = _createThemeTag14[1]; var _createThemeTag15 = createThemeTag("".concat(name, "Arrow"), function () { - return { - root: _objectSpread({}, iconsStyles, { - position: 'relative', - height: '50%', - cursor: 'pointer', - userSelect: 'none' - }) - }; -}), - _createThemeTag16 = _slicedToArray(_createThemeTag15, 2), - InputArrowTag = _createThemeTag16[0], - themeInputArrow = _createThemeTag16[1]; - + return { + root: _objectSpread({}, iconsStyles, { + position: 'relative', + height: '50%', + cursor: 'pointer', + userSelect: 'none' + }) + }; + }), + _createThemeTag16 = _slicedToArray(_createThemeTag15, 2), + InputArrowTag = _createThemeTag16[0], + themeInputArrow = _createThemeTag16[1]; var theme = _objectSpread({}, themeInput, {}, themeClearButton, {}, themeRightIcon, {}, themeLeftIcon, {}, themeIndicator, {}, themeWrapper, {}, themeInputArrows, {}, themeInputArrow); - export { InputWrapperTag, InputTag, InputIndicatorTag, InputRightIconTag, InputLeftIconTag, InputClearButtonTag, InputArrowsTag, InputArrowTag, theme }; \ No newline at end of file diff --git a/es/components/InputField/InputField.js b/es/components/InputField/InputField.js index 48567879..ad207cf0 100644 --- a/es/components/InputField/InputField.js +++ b/es/components/InputField/InputField.js @@ -5,42 +5,40 @@ import React from 'react'; import * as formUtils from '../../utils/forms'; import { Input } from '../Input'; import { FormField } from '../Form/FormField'; - var InputField = function InputField(_ref) { var align = _ref.align, - direction = _ref.direction, - hideErrorIndicator = _ref.hideErrorIndicator, - hideErrorLabel = _ref.hideErrorLabel, - input = _ref.input, - insideRef = _ref.insideRef, - label = _ref.label, - maxLength = _ref.maxLength, - meta = _ref.meta, - placeholder = _ref.placeholder, - square = _ref.square, - stretch = _ref.stretch, - clearable = _ref.clearable, - width = _ref.width, - type = _ref.type, - leftIcon = _ref.leftIcon, - rightIcon = _ref.rightIcon, - disabled = _ref.disabled, - readOnly = _ref.readOnly, - autoComplete = _ref.autoComplete, - autoFocus = _ref.autoFocus, - onClear = _ref.onClear, - step = _ref.step, - min = _ref.min, - max = _ref.max, - mask = _ref.mask, - showErrorOnTouched = _ref.showErrorOnTouched, - rest = _objectWithoutProperties(_ref, ["align", "direction", "hideErrorIndicator", "hideErrorLabel", "input", "insideRef", "label", "maxLength", "meta", "placeholder", "square", "stretch", "clearable", "width", "type", "leftIcon", "rightIcon", "disabled", "readOnly", "autoComplete", "autoFocus", "onClear", "step", "min", "max", "mask", "showErrorOnTouched"]); - + direction = _ref.direction, + hideErrorIndicator = _ref.hideErrorIndicator, + hideErrorLabel = _ref.hideErrorLabel, + input = _ref.input, + insideRef = _ref.insideRef, + label = _ref.label, + maxLength = _ref.maxLength, + meta = _ref.meta, + placeholder = _ref.placeholder, + square = _ref.square, + stretch = _ref.stretch, + clearable = _ref.clearable, + width = _ref.width, + type = _ref.type, + leftIcon = _ref.leftIcon, + rightIcon = _ref.rightIcon, + disabled = _ref.disabled, + readOnly = _ref.readOnly, + autoComplete = _ref.autoComplete, + autoFocus = _ref.autoFocus, + onClear = _ref.onClear, + step = _ref.step, + min = _ref.min, + max = _ref.max, + mask = _ref.mask, + showErrorOnTouched = _ref.showErrorOnTouched, + rest = _objectWithoutProperties(_ref, ["align", "direction", "hideErrorIndicator", "hideErrorLabel", "input", "insideRef", "label", "maxLength", "meta", "placeholder", "square", "stretch", "clearable", "width", "type", "leftIcon", "rightIcon", "disabled", "readOnly", "autoComplete", "autoFocus", "onClear", "step", "min", "max", "mask", "showErrorOnTouched"]); var name = input.name, - value = input.value, - onChange = input.onChange, - onFocus = input.onFocus, - onBlur = input.onBlur; + value = input.value, + onChange = input.onChange, + onFocus = input.onFocus, + onBlur = input.onBlur; var hasError = formUtils.hasError(meta, showErrorOnTouched); return ___EmotionJSX(FormField, _extends({}, rest, { label: label, @@ -80,7 +78,6 @@ var InputField = function InputField(_ref) { mask: mask })); }; - InputField.defaultProps = { stretch: true, type: 'text', diff --git a/es/components/InputField/InputField.stories.js b/es/components/InputField/InputField.stories.js index 5f9f0523..f40968aa 100644 --- a/es/components/InputField/InputField.stories.js +++ b/es/components/InputField/InputField.stories.js @@ -1,11 +1,9 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { InputField, Column, Grid, Icon } from '../../'; - var onChange = function onChange() { return null; }; - export default { title: 'Components/InputField', component: InputField diff --git a/es/components/Label/Label.js b/es/components/Label/Label.js index e9a7c280..28f8909c 100644 --- a/es/components/Label/Label.js +++ b/es/components/Label/Label.js @@ -3,17 +3,14 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { LabelTag } from './Label.theme'; - function Label(_ref) { var text = _ref.text, - children = _ref.children, - rest = _objectWithoutProperties(_ref, ["text", "children"]); - + children = _ref.children, + rest = _objectWithoutProperties(_ref, ["text", "children"]); return ___EmotionJSX(LabelTag, _extends({}, rest, { tagName: "label" }), children || text); } - Label.defaultProps = { kind: 'primary' }; diff --git a/es/components/Label/Label.theme.js b/es/components/Label/Label.theme.js index 9fdc0e7e..e00c77c8 100644 --- a/es/components/Label/Label.theme.js +++ b/es/components/Label/Label.theme.js @@ -1,37 +1,32 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'label'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, FONTS = _ref.FONTS; - return { - root: _objectSpread({}, FONTS.OVERLINE_1, { - margin: 0 - }), - modifiers: { - kind: { - primary: { - color: COLORS.PRIMARY_TEXT_COLOR - }, - secondary: { - color: COLORS.SECONDARY_TEXT_COLOR - }, - disabled: { - color: COLORS.DISABLED_TEXT_COLOR + return { + root: _objectSpread({}, FONTS.OVERLINE_1, { + margin: 0 + }), + modifiers: { + kind: { + primary: { + color: COLORS.PRIMARY_TEXT_COLOR + }, + secondary: { + color: COLORS.SECONDARY_TEXT_COLOR + }, + disabled: { + color: COLORS.DISABLED_TEXT_COLOR + } } } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - LabelTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + LabelTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; export { theme, LabelTag }; \ No newline at end of file diff --git a/es/components/Link/Link.js b/es/components/Link/Link.js index 2ffdc4db..653b4559 100644 --- a/es/components/Link/Link.js +++ b/es/components/Link/Link.js @@ -3,18 +3,15 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { LinkTag } from './Link.theme'; - function Link(_ref) { var text = _ref.text, - children = _ref.children, - tagName = _ref.tagName, - rest = _objectWithoutProperties(_ref, ["text", "children", "tagName"]); - + children = _ref.children, + tagName = _ref.tagName, + rest = _objectWithoutProperties(_ref, ["text", "children", "tagName"]); return ___EmotionJSX(LinkTag, _extends({}, rest, { tagName: tagName }), text || children); } - Link.defaultProps = { color: 'BLUE_30', underline: false, diff --git a/es/components/Link/Link.theme.js b/es/components/Link/Link.theme.js index 2ba09ed6..d4ef6b9b 100644 --- a/es/components/Link/Link.theme.js +++ b/es/components/Link/Link.theme.js @@ -1,47 +1,42 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import _mapValues from "lodash/fp/mapValues"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'link'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, FONTS = _ref.FONTS; - return { - root: function root(props) { - return _objectSpread({ - cursor: 'pointer' - }, FONTS.LINK, { - fontSize: 'inherit', - textDecoration: 'none', - '&:hover': { + return { + root: function root(props) { + return _objectSpread({ + cursor: 'pointer' + }, FONTS.LINK, { + fontSize: 'inherit', + textDecoration: 'none', + '&:hover': { + textDecoration: 'underline' + } + }, props.color === 'BLUE_30' || props.color === 'BLUE' || props.color === 'PRIMARY' ? { + '&:active': { + color: COLORS.BLUE_10 + } + } : {}); + }, + modifiers: { + color: _mapValues(function (color) { + return { + color: color + }; + }, COLORS), + underline: { textDecoration: 'underline' } - }, props.color === 'BLUE_30' || props.color === 'BLUE' || props.color === 'PRIMARY' ? { - '&:active': { - color: COLORS.BLUE_10 - } - } : {}); - }, - modifiers: { - color: _mapValues(function (color) { - return { - color: color - }; - }, COLORS), - underline: { - textDecoration: 'underline' } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - LinkTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + LinkTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; export { LinkTag, theme }; \ No newline at end of file diff --git a/es/components/Loader/Loader.js b/es/components/Loader/Loader.js index b52c817f..7ad6ff6d 100644 --- a/es/components/Loader/Loader.js +++ b/es/components/Loader/Loader.js @@ -3,7 +3,6 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { LoaderTag, LoaderWrapperTag, LoaderCircleTag } from './Loader.theme'; import { COLORS } from '../../theme'; - function Loader(props) { var uiLoader = ___EmotionJSX(LoaderTag, _extends({}, props, { tagName: "div", @@ -13,16 +12,13 @@ function Loader(props) { })), ___EmotionJSX(LoaderCircleTag, _extends({}, props, { delay: "0.9s" }))); - if (props.stretch) { return ___EmotionJSX(LoaderWrapperTag, { role: "loader" }, uiLoader); } - return uiLoader; } - Loader.defaultProps = { stretch: false, size: 'md', diff --git a/es/components/Loader/Loader.theme.js b/es/components/Loader/Loader.theme.js index 37f72bfd..ed22313a 100644 --- a/es/components/Loader/Loader.theme.js +++ b/es/components/Loader/Loader.theme.js @@ -2,107 +2,96 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral"; import _mapValues from "lodash/fp/mapValues"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _templateObject() { var data = _taggedTemplateLiteral(["\n 0% {\n width: 0;\n height: 0;\n opacity: 1;\n }\n 45% {\n opacity: 0.6;\n }\n 100% {\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n"]); - _templateObject = function _templateObject() { return data; }; - return data; } - -import { keyframes } from '@emotion/core'; +import { keyframes } from '@emotion/react'; import { createThemeTag } from '../../theme/createThemeTag'; var name = 'loader'; var pulse = keyframes(_templateObject()); - var _createThemeTag = createThemeTag(name, { - root: { - display: 'inline-flex', - position: 'relative' - }, - modifiers: { - size: { - sm: { - width: '32px', - height: '32px' - }, - md: { - width: '64px', - height: '64px' - }, - lg: { - width: '80px', - height: '80px' - } - } - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - LoaderTag = _createThemeTag2[0], - themeLoader = _createThemeTag2[1]; - -var _createThemeTag3 = createThemeTag("".concat(name, "Circle"), function (_ref) { - var COLORS = _ref.COLORS; - return { - root: function root(_ref2) { - var delay = _ref2.delay; - return { - borderRadius: '100%', - border: '4px solid #000', - position: 'absolute', - transform: 'translate(-50%, -50%)', - left: '50%', - top: '50%', - opacity: '0', - animation: "".concat(pulse, " 1.8s cubic-bezier(0.165, 0.84, 0.44, 1) ").concat(delay), - animationIterationCount: 'infinite' - }; + root: { + display: 'inline-flex', + position: 'relative' }, modifiers: { size: { sm: { - borderWidth: '1.6px' + width: '32px', + height: '32px' }, md: { - borderWidth: '3.2px' + width: '64px', + height: '64px' }, lg: { - borderWidth: '4px' + width: '80px', + height: '80px' } - }, - color: _mapValues(function (color) { + } + } + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + LoaderTag = _createThemeTag2[0], + themeLoader = _createThemeTag2[1]; +var _createThemeTag3 = createThemeTag("".concat(name, "Circle"), function (_ref) { + var COLORS = _ref.COLORS; + return { + root: function root(_ref2) { + var delay = _ref2.delay; return { - borderColor: color + borderRadius: '100%', + border: '4px solid #000', + position: 'absolute', + transform: 'translate(-50%, -50%)', + left: '50%', + top: '50%', + opacity: '0', + animation: "".concat(pulse, " 1.8s cubic-bezier(0.165, 0.84, 0.44, 1) ").concat(delay), + animationIterationCount: 'infinite' }; - }, COLORS) - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - LoaderCircleTag = _createThemeTag4[0], - themeLoaderCircle = _createThemeTag4[1]; - + }, + modifiers: { + size: { + sm: { + borderWidth: '1.6px' + }, + md: { + borderWidth: '3.2px' + }, + lg: { + borderWidth: '4px' + } + }, + color: _mapValues(function (color) { + return { + borderColor: color + }; + }, COLORS) + } + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + LoaderCircleTag = _createThemeTag4[0], + themeLoaderCircle = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag("".concat(name, "Wrapper"), { - root: { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - flex: 1, - width: '100%', - height: '100%' - } -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - LoaderWrapperTag = _createThemeTag6[0], - themeWrappers = _createThemeTag6[1]; - + root: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + flex: 1, + width: '100%', + height: '100%' + } + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + LoaderWrapperTag = _createThemeTag6[0], + themeWrappers = _createThemeTag6[1]; var theme = _objectSpread({}, themeLoader, {}, themeLoaderCircle, {}, themeWrappers); - export { LoaderTag, LoaderWrapperTag, LoaderCircleTag, theme }; \ No newline at end of file diff --git a/es/components/Loader/Loader.theme.js.flow b/es/components/Loader/Loader.theme.js.flow index a4b34ec9..04c6ec25 100644 --- a/es/components/Loader/Loader.theme.js.flow +++ b/es/components/Loader/Loader.theme.js.flow @@ -1,6 +1,6 @@ // @flow import fp from 'lodash/fp'; -import { keyframes } from '@emotion/core'; +import { keyframes } from '@emotion/react'; import { createThemeTag } from '../../theme/createThemeTag'; diff --git a/es/components/Logs/Logs.js b/es/components/Logs/Logs.js index 0d207aec..3a8bdb40 100644 --- a/es/components/Logs/Logs.js +++ b/es/components/Logs/Logs.js @@ -5,11 +5,10 @@ import React, { forwardRef } from 'react'; import { LogsContainerTag, LogMessageTag } from './Logs.theme'; var Logs = forwardRef(function (_ref, ref) { var _ref$messages = _ref.messages, - messages = _ref$messages === void 0 ? [] : _ref$messages, - stretch = _ref.stretch, - children = _ref.children, - rest = _objectWithoutProperties(_ref, ["messages", "stretch", "children"]); - + messages = _ref$messages === void 0 ? [] : _ref$messages, + stretch = _ref.stretch, + children = _ref.children, + rest = _objectWithoutProperties(_ref, ["messages", "stretch", "children"]); return ___EmotionJSX(LogsContainerTag, _extends({ stretch: stretch, insideRef: ref diff --git a/es/components/Logs/Logs.theme.js b/es/components/Logs/Logs.theme.js index df9fe6df..862caa0f 100644 --- a/es/components/Logs/Logs.theme.js +++ b/es/components/Logs/Logs.theme.js @@ -1,56 +1,49 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'logs'; - var _createThemeTag = createThemeTag(name, { - root: { - overflowX: 'auto', - backgroundColor: '#1C252E' - }, - modifiers: { - stretch: { - height: '100%', - width: '100%' - } - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - LogsContainerTag = _createThemeTag2[0], - themeLogsContainer = _createThemeTag2[1]; - -var _createThemeTag3 = createThemeTag("".concat(name, "Wrapper"), function (_ref) { - var COLORS = _ref.COLORS; - return { root: { - fontFamily: 'Courier', - color: COLORS.WHITE, - fontSize: '1.4rem', - lineHeight: 2, - backgroundColor: '#1C252E', - padding: '0 24px', - cursor: 'default', - '&:first-of-type': { - paddingTop: '24px' - }, - '&:last-child': { - paddingBottom: '24px' - }, - '&:hover': { - backgroundColor: '#202D3B' + overflowX: 'auto', + backgroundColor: '#1C252E' + }, + modifiers: { + stretch: { + height: '100%', + width: '100%' } } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - LogMessageTag = _createThemeTag4[0], - themeLogMessage = _createThemeTag4[1]; - + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + LogsContainerTag = _createThemeTag2[0], + themeLogsContainer = _createThemeTag2[1]; +var _createThemeTag3 = createThemeTag("".concat(name, "Wrapper"), function (_ref) { + var COLORS = _ref.COLORS; + return { + root: { + fontFamily: 'Courier', + color: COLORS.WHITE, + fontSize: '1.4rem', + lineHeight: 2, + backgroundColor: '#1C252E', + padding: '0 24px', + cursor: 'default', + '&:first-of-type': { + paddingTop: '24px' + }, + '&:last-child': { + paddingBottom: '24px' + }, + '&:hover': { + backgroundColor: '#202D3B' + } + } + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + LogMessageTag = _createThemeTag4[0], + themeLogMessage = _createThemeTag4[1]; var theme = _objectSpread({}, themeLogsContainer, {}, themeLogMessage); - export { LogsContainerTag, LogMessageTag, theme }; \ No newline at end of file diff --git a/es/components/Menu/Menu.js b/es/components/Menu/Menu.js index 7b116893..8a4e3aca 100644 --- a/es/components/Menu/Menu.js +++ b/es/components/Menu/Menu.js @@ -5,11 +5,9 @@ import React from 'react'; import { Paper } from '../Paper'; import { MenuItem } from './MenuItem'; import { MenuTag } from './Menu.theme'; - var Menu = function Menu(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(Paper, { padding: "none", borderRadius: "all" @@ -17,7 +15,6 @@ var Menu = function Menu(_ref) { tagName: "div" }, rest), children)); }; - Menu.displayName = 'Menu'; Menu.Item = MenuItem; export { Menu }; \ No newline at end of file diff --git a/es/components/Menu/Menu.theme.js b/es/components/Menu/Menu.theme.js index 5e04801f..86ada30b 100644 --- a/es/components/Menu/Menu.theme.js +++ b/es/components/Menu/Menu.theme.js @@ -1,58 +1,51 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'menu'; - var _createThemeTag = createThemeTag(name, { - root: { - display: 'flex', - flexDirection: 'column', - boxSizing: 'border-box', - overflow: 'hidden', - paddingTop: '8px', - paddingBottom: '8px' - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - MenuTag = _createThemeTag2[0], - themeMenu = _createThemeTag2[1]; - + root: { + display: 'flex', + flexDirection: 'column', + boxSizing: 'border-box', + overflow: 'hidden', + paddingTop: '8px', + paddingBottom: '8px' + } + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + MenuTag = _createThemeTag2[0], + themeMenu = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Item"), function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, FONTS = _ref.FONTS; - return { - root: _objectSpread({ - display: 'flex', - alignItems: 'center', - cursor: 'pointer', - whiteSpace: 'nowrap' - }, FONTS.BODY_3, { - height: '32px', - paddingRight: '16px', - paddingLeft: '16px', - '&:hover': { - backgroundColor: COLORS.PRIMARY_HOVER_GRAY_COLOR, - color: COLORS.BLACK + return { + root: _objectSpread({ + display: 'flex', + alignItems: 'center', + cursor: 'pointer', + whiteSpace: 'nowrap' + }, FONTS.BODY_3, { + height: '32px', + paddingRight: '16px', + paddingLeft: '16px', + '&:hover': { + backgroundColor: COLORS.PRIMARY_HOVER_GRAY_COLOR, + color: COLORS.BLACK + } + }), + modifiers: { + disabled: { + pointerEvents: 'none', + cursor: 'default', + color: COLORS.DISABLED_TEXT_COLOR + } } - }), - modifiers: { - disabled: { - pointerEvents: 'none', - cursor: 'default', - color: COLORS.DISABLED_TEXT_COLOR - } - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - MenuItemTag = _createThemeTag4[0], - themeMenuItem = _createThemeTag4[1]; - + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + MenuItemTag = _createThemeTag4[0], + themeMenuItem = _createThemeTag4[1]; var theme = _objectSpread({}, themeMenu, {}, themeMenuItem); - export { theme, MenuTag, MenuItemTag }; \ No newline at end of file diff --git a/es/components/Menu/MenuItem.js b/es/components/Menu/MenuItem.js index b476674c..bcf7d91b 100644 --- a/es/components/Menu/MenuItem.js +++ b/es/components/Menu/MenuItem.js @@ -3,15 +3,12 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { MenuItemTag } from './Menu.theme'; - var MenuItem = function MenuItem(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(MenuItemTag, _extends({ tagName: "div" }, rest), children); }; - MenuItem.displayName = 'Menu.Item'; export { MenuItem }; \ No newline at end of file diff --git a/es/components/Modal/Modal.js b/es/components/Modal/Modal.js index 02b27531..ed6c7b9c 100644 --- a/es/components/Modal/Modal.js +++ b/es/components/Modal/Modal.js @@ -10,58 +10,42 @@ import { Portal } from 'react-portal'; import { ModalTag, OverlayTag } from './Modal.theme'; import { withModalState } from './withModalState'; var ESCAPE_KEY = 'Escape'; - -var Modal = -/*#__PURE__*/ -function (_PureComponent) { +var Modal = /*#__PURE__*/function (_PureComponent) { _inherits(Modal, _PureComponent); - function Modal() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, Modal); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Modal)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.onClose = function () { if (typeof _this.props.onClose === 'function') { _this.props.onClose(); } }; - _this.addEscPressEventListener = function () { document.addEventListener('keydown', _this.onDocumentKeyPress); }; - _this.removeEscPressEventListener = function () { document.removeEventListener('keydown', _this.onDocumentKeyPress); }; - _this.onDocumentKeyPress = function (event) { if (_this.props.shouldCloseOnEscPress && event.key === ESCAPE_KEY) { _this.onClose(); } }; - _this.onOverlayMouseDown = function () { if (_this.props.shouldCloseOnOverlayClick) { _this.onClose(); } }; - _this.onModalMouseDown = function (event) { event.stopPropagation(); }; - return _this; } - _createClass(Modal, [{ key: "componentDidMount", value: function componentDidMount() { @@ -78,10 +62,9 @@ function (_PureComponent) { key: "render", value: function render() { var _this$props = this.props, - children = _this$props.children, - isOpen = _this$props.isOpen, - rest = _objectWithoutProperties(_this$props, ["children", "isOpen"]); - + children = _this$props.children, + isOpen = _this$props.isOpen, + rest = _objectWithoutProperties(_this$props, ["children", "isOpen"]); return isOpen ? ___EmotionJSX(Portal, null, ___EmotionJSX(OverlayTag, { modifiers: rest, tagName: "div", @@ -94,10 +77,8 @@ function (_PureComponent) { }, typeof children === 'function' ? children(rest) : children))) : null; } }]); - return Modal; }(PureComponent); - Modal.openedModals = 0; Modal.defaultProps = { shouldCloseOnOverlayClick: true, diff --git a/es/components/Modal/Modal.stories.js b/es/components/Modal/Modal.stories.js index 12f04b9a..0d27b905 100644 --- a/es/components/Modal/Modal.stories.js +++ b/es/components/Modal/Modal.stories.js @@ -1,7 +1,6 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { Modal, ModalContext, Button } from '../../'; - var CustomBackground = function CustomBackground(_ref) { var children = _ref.children; return ___EmotionJSX("div", { @@ -11,7 +10,6 @@ var CustomBackground = function CustomBackground(_ref) { } }, children); }; - export default { title: 'Components/Modal', component: Modal diff --git a/es/components/Modal/Modal.test.js b/es/components/Modal/Modal.test.js index 0cde6c66..a4e576ed 100644 --- a/es/components/Modal/Modal.test.js +++ b/es/components/Modal/Modal.test.js @@ -8,8 +8,9 @@ describe('', function () { // $FlowIgnore document.addEventListener = jest.fn(function (event, cb) { map[event] = cb; - }); // $FlowIgnore + }); + // $FlowIgnore document.removeEventListener = jest.fn(function (event) { map[event] = undefined; }); @@ -80,8 +81,8 @@ describe('', function () { }); it('should not call onClose callback on escape key with shouldCloseOnEscPress=false', function () { var onClose = jest.fn(); - var map = {}; // $FlowIgnore - + var map = {}; + // $FlowIgnore document.addEventListener = jest.fn(function (event, cb) { map[event] = cb; }); diff --git a/es/components/Modal/Modal.theme.js b/es/components/Modal/Modal.theme.js index 5badc9f0..c6755094 100644 --- a/es/components/Modal/Modal.theme.js +++ b/es/components/Modal/Modal.theme.js @@ -1,51 +1,44 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'modal'; - var _createThemeTag = createThemeTag("".concat(name, "Overlay"), function (_ref) { - var Z_INDEX = _ref.Z_INDEX; - return { + var Z_INDEX = _ref.Z_INDEX; + return { + root: { + alignItems: 'center', + bottom: 0, + display: 'flex', + justifyContent: 'center', + left: 0, + position: 'fixed', + right: 0, + top: 0, + background: 'rgba(60, 87, 118, 0.6)', + zIndex: Z_INDEX.MODAL + } + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + OverlayTag = _createThemeTag2[0], + themeOverlay = _createThemeTag2[1]; +var _createThemeTag3 = createThemeTag(name, { root: { - alignItems: 'center', - bottom: 0, display: 'flex', - justifyContent: 'center', - left: 0, - position: 'fixed', - right: 0, - top: 0, - background: 'rgba(60, 87, 118, 0.6)', - zIndex: Z_INDEX.MODAL - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - OverlayTag = _createThemeTag2[0], - themeOverlay = _createThemeTag2[1]; - -var _createThemeTag3 = createThemeTag(name, { - root: { - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - justifyContent: 'center' - }, - modifiers: { - stretch: { - height: '100%' + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center' + }, + modifiers: { + stretch: { + height: '100%' + } } - } -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - ModalTag = _createThemeTag4[0], - themeModal = _createThemeTag4[1]; - + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + ModalTag = _createThemeTag4[0], + themeModal = _createThemeTag4[1]; var theme = _objectSpread({}, themeOverlay, {}, themeModal); - export { ModalTag, OverlayTag, theme }; \ No newline at end of file diff --git a/es/components/Modal/ModalContext.test.js b/es/components/Modal/ModalContext.test.js index ba441b51..61617e03 100644 --- a/es/components/Modal/ModalContext.test.js +++ b/es/components/Modal/ModalContext.test.js @@ -8,7 +8,7 @@ import { withModal } from './withModal'; describe('', function () { var OpenCloseModal = function OpenCloseModal(_ref) { var openModal = _ref.openModal, - closeModal = _ref.closeModal; + closeModal = _ref.closeModal; return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Button, { onClick: function onClick() { return openModal('ID', { @@ -25,7 +25,6 @@ describe('', function () { className: "close-button" }, "Close"))); }; - it('should open and close modal by modal id', function () { var wrapper = mount(___EmotionJSX(ModalProvider, null, ___EmotionJSX(Modal, { id: "ID" @@ -36,7 +35,7 @@ describe('', function () { }, args.ff); }), ___EmotionJSX(ModalContext.Consumer, null, function (_ref3) { var openModal = _ref3.openModal, - closeModal = _ref3.closeModal; + closeModal = _ref3.closeModal; return ___EmotionJSX(OpenCloseModal, { openModal: openModal, closeModal: closeModal diff --git a/es/components/Modal/ModalProvider.js b/es/components/Modal/ModalProvider.js index a536fc6b..67c1bdb6 100644 --- a/es/components/Modal/ModalProvider.js +++ b/es/components/Modal/ModalProvider.js @@ -7,34 +7,24 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { Component } from 'react'; import { ModalContext } from './ModalContext'; - -var ModalProvider = -/*#__PURE__*/ -function (_Component) { +var ModalProvider = /*#__PURE__*/function (_Component) { _inherits(ModalProvider, _Component); - function ModalProvider(props) { var _this; - _classCallCheck(this, ModalProvider); - _this = _possibleConstructorReturn(this, _getPrototypeOf(ModalProvider).call(this, props)); - _this.openModal = function (id) { var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - _this.setState(_defineProperty({}, id, { isOpen: true, args: args })); }; - _this.closeModal = function (id) { _this.setState(_defineProperty({}, id, { isOpen: false })); }; - _this.collectContextValue = function () { return { openModal: _this.openModal, @@ -42,11 +32,9 @@ function (_Component) { state: _this.state }; }; - _this.state = {}; return _this; } - _createClass(ModalProvider, [{ key: "render", value: function render() { @@ -56,8 +44,6 @@ function (_Component) { }, this.props.children); } }]); - return ModalProvider; }(Component); - export { ModalProvider }; \ No newline at end of file diff --git a/es/components/Modal/useModal.js b/es/components/Modal/useModal.js index 0d78f30d..a1f7dce6 100644 --- a/es/components/Modal/useModal.js +++ b/es/components/Modal/useModal.js @@ -1,14 +1,10 @@ import _get from "lodash/get"; import { useContext } from 'react'; import { ModalContext } from './ModalContext'; - function useModal(id) { var dialogContext = useContext(ModalContext); - var args = _get(dialogContext, ['state', id, 'args'], {}); - var isOpen = _get(dialogContext, ['state', id, 'isOpen'], false); - return { openModal: dialogContext.openModal, closeModal: dialogContext.closeModal, @@ -16,5 +12,4 @@ function useModal(id) { isOpen: isOpen }; } - export { useModal }; \ No newline at end of file diff --git a/es/components/Modal/withModal.js b/es/components/Modal/withModal.js index 270e3880..5512e1f0 100644 --- a/es/components/Modal/withModal.js +++ b/es/components/Modal/withModal.js @@ -5,56 +5,38 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React from 'react'; import { ModalContext } from './ModalContext'; - var withModal = function withModal(BaseComponent) { - var ModalStateConsumer = - /*#__PURE__*/ - function (_React$Component) { + var ModalStateConsumer = /*#__PURE__*/function (_React$Component) { _inherits(ModalStateConsumer, _React$Component); - function ModalStateConsumer() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, ModalStateConsumer); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ModalStateConsumer)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.renderBaseComponent = function (dialogContext) { var props = _objectSpread({}, _this.props, { openModal: dialogContext.openModal, closeModal: dialogContext.closeModal }); - return ___EmotionJSX(BaseComponent, props); }; - return _this; } - _createClass(ModalStateConsumer, [{ key: "render", value: function render() { return ___EmotionJSX(ModalContext.Consumer, null, this.renderBaseComponent); } }]); - return ModalStateConsumer; }(React.Component); - return ModalStateConsumer; }; - export { withModal }; \ No newline at end of file diff --git a/es/components/Modal/withModalState.js b/es/components/Modal/withModalState.js index 3a036d8c..7a76ad56 100644 --- a/es/components/Modal/withModalState.js +++ b/es/components/Modal/withModalState.js @@ -6,36 +6,23 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React from 'react'; import { ModalContext } from './ModalContext'; - var withModalState = function withModalState(BaseComponent) { - var ModalStateConsumer = - /*#__PURE__*/ - function (_React$Component) { + var ModalStateConsumer = /*#__PURE__*/function (_React$Component) { _inherits(ModalStateConsumer, _React$Component); - function ModalStateConsumer() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, ModalStateConsumer); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ModalStateConsumer)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.renderBaseComponentWithModalProps = function (modalContext) { var id = _this.props.id; - var props = _objectSpread({ onClose: function onClose() { return modalContext.closeModal(id); @@ -44,32 +31,24 @@ var withModalState = function withModalState(BaseComponent) { isOpen: modalContext.state[id] ? modalContext.state[id].isOpen : false, args: modalContext.state[id] ? modalContext.state[id].args : undefined }); - return ___EmotionJSX(BaseComponent, props); }; - return _this; } - _createClass(ModalStateConsumer, [{ key: "render", value: function render() { var _this$props = this.props, - id = _this$props.id, - rest = _objectWithoutProperties(_this$props, ["id"]); - + id = _this$props.id, + rest = _objectWithoutProperties(_this$props, ["id"]); if (id) { return ___EmotionJSX(ModalContext.Consumer, null, this.renderBaseComponentWithModalProps); } - return ___EmotionJSX(BaseComponent, rest); } }]); - return ModalStateConsumer; }(React.Component); - return ModalStateConsumer; }; - export { withModalState }; \ No newline at end of file diff --git a/es/components/Navigation/Navigation.js b/es/components/Navigation/Navigation.js index 394fcc6f..bf0f3bcb 100644 --- a/es/components/Navigation/Navigation.js +++ b/es/components/Navigation/Navigation.js @@ -10,64 +10,47 @@ import React from 'react'; import { COLORS } from '../../theme'; import { NavigationTag } from './Navigation.theme'; import { NavigationItem } from './NavigationItem'; - -var Navigation = -/*#__PURE__*/ -function (_React$Component) { +var Navigation = /*#__PURE__*/function (_React$Component) { _inherits(Navigation, _React$Component); - function Navigation() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, Navigation); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Navigation)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { expandedWidth: _this.props.expandedWidth, expanded: false }; _this.navRef = React.createRef(); - _this.isControllable = function () { return typeof _this.props.expanded === 'boolean'; }; - _this.onMouseEnter = function () { if (_this.navRef.current) { _this.navRef.current.style.width = _this.state.expandedWidth; } - _this.setState({ expanded: true }); }; - _this.onMouseLeave = function () { if (_this.navRef.current) { _this.navRef.current.style.width = _this.props.collapsedWidth; } - _this.setState({ expanded: false }); }; - return _this; - } - + } // $FlowFixMe _createClass(Navigation, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; - var navElement = this.navRef.current; - if (navElement && !this.isControllable()) { requestAnimationFrame(function () { if (!_this2.props.expandedWidth) { @@ -75,7 +58,6 @@ function (_React$Component) { expandedWidth: getComputedStyle(navElement).width }); } - navElement.style.width = _this2.props.collapsedWidth; navElement.addEventListener('mouseenter', _this2.onMouseEnter); navElement.addEventListener('mouseleave', _this2.onMouseLeave); @@ -86,7 +68,6 @@ function (_React$Component) { key: "componentWillUnmount", value: function componentWillUnmount() { var navElement = this.navRef.current; - if (navElement && !this.isControllable()) { navElement.removeEventListener('mouseenter', this.onMouseEnter); navElement.removeEventListener('mouseleave', this.onMouseLeave); @@ -96,10 +77,9 @@ function (_React$Component) { key: "render", value: function render() { var _this$props = this.props, - color = _this$props.color, - children = _this$props.children, - rest = _objectWithoutProperties(_this$props, ["color", "children"]); - + color = _this$props.color, + children = _this$props.children, + rest = _objectWithoutProperties(_this$props, ["color", "children"]); var controllable = this.isControllable(); var expanded = controllable ? this.props.expanded : this.state.expanded; return ___EmotionJSX(NavigationTag, _extends({}, rest, { @@ -116,10 +96,8 @@ function (_React$Component) { })); } }]); - return Navigation; }(React.Component); - Navigation.displayName = 'Navigation'; Navigation.Item = NavigationItem; Navigation.defaultProps = { diff --git a/es/components/Navigation/Navigation.stories.js b/es/components/Navigation/Navigation.stories.js index a7cb3ac3..49659663 100644 --- a/es/components/Navigation/Navigation.stories.js +++ b/es/components/Navigation/Navigation.stories.js @@ -2,21 +2,17 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { useState } from 'react'; import { Navigation, Button } from '../../'; - var ExpandState = function ExpandState(_ref) { var children = _ref.children; - var _useState = useState(false), - _useState2 = _slicedToArray(_useState, 2), - expanded = _useState2[0], - setExpanded = _useState2[1]; - + _useState2 = _slicedToArray(_useState, 2), + expanded = _useState2[0], + setExpanded = _useState2[1]; return children({ expanded: expanded, setExpanded: setExpanded }); }; - export default { title: 'Components/Navigation', component: Navigation @@ -86,7 +82,7 @@ withoutIcons.story = { export var withExpandButton = function withExpandButton() { return ___EmotionJSX(ExpandState, null, function (_ref2) { var expanded = _ref2.expanded, - setExpanded = _ref2.setExpanded; + setExpanded = _ref2.setExpanded; return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Button, { onClick: function onClick() { return setExpanded(!expanded); diff --git a/es/components/Navigation/Navigation.test.js b/es/components/Navigation/Navigation.test.js index bd98c4cc..d1d35175 100644 --- a/es/components/Navigation/Navigation.test.js +++ b/es/components/Navigation/Navigation.test.js @@ -24,7 +24,6 @@ describe('', function () { var Link = function Link() { return null; }; - var wrapper = mount(___EmotionJSX(Navigation, { color: "GREEN_40" }, ___EmotionJSX(Navigation.Item, { diff --git a/es/components/Navigation/Navigation.theme.js b/es/components/Navigation/Navigation.theme.js index fb17c09d..e50d61a1 100644 --- a/es/components/Navigation/Navigation.theme.js +++ b/es/components/Navigation/Navigation.theme.js @@ -1,142 +1,132 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import _mapValues from "lodash/fp/mapValues"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import color from 'color'; import { createThemeTag } from '../../theme/createThemeTag'; var name = 'navigation'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS; - return { - root: function root(_ref2) { - var controllable = _ref2.controllable, + var COLORS = _ref.COLORS; + return { + root: function root(_ref2) { + var controllable = _ref2.controllable, expanded = _ref2.expanded, expandedWidth = _ref2.expandedWidth, collapsedWidth = _ref2.collapsedWidth; - return _objectSpread({ - display: 'flex', - flexDirection: 'column', - height: '100%', - transition: 'width 0.3s' - }, controllable ? _objectSpread({ - width: expanded ? expandedWidth : collapsedWidth - }, expanded ? { - '.NavigationItem-label': { - transitionDelay: '0.15s', - opacity: '1', - visibility: 'visible' - } - } : {}) : { - '&:hover': { + return _objectSpread({ + display: 'flex', + flexDirection: 'column', + height: '100%', + transition: 'width 0.3s' + }, controllable ? _objectSpread({ + width: expanded ? expandedWidth : collapsedWidth + }, expanded ? { '.NavigationItem-label': { transitionDelay: '0.15s', opacity: '1', visibility: 'visible' } - } - }); - }, - modifiers: { - color: _mapValues(function (color) { - return { - backgroundColor: color - }; - }, COLORS) - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - NavigationTag = _createThemeTag2[0], - themeNavigation = _createThemeTag2[1]; - + } : {}) : { + '&:hover': { + '.NavigationItem-label': { + transitionDelay: '0.15s', + opacity: '1', + visibility: 'visible' + } + } + }); + }, + modifiers: { + color: _mapValues(function (color) { + return { + backgroundColor: color + }; + }, COLORS) + } + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + NavigationTag = _createThemeTag2[0], + themeNavigation = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Item"), function (_ref3) { - var COLORS = _ref3.COLORS; - return { - root: function root(props) { - return { - cursor: 'pointer', - position: 'relative', - textDecoration: 'none', - userSelect: 'none', - display: 'flex', - color: COLORS.LIGHT_PRIMARY_TEXT_COLOR, - '&:hover, &.active': { - backgroundColor: color(COLORS[props.color]).darken(0.2).hex() - } - }; - }, - modifiers: { - color: _mapValues(function (color) { + var COLORS = _ref3.COLORS; + return { + root: function root(props) { return { - backgroundColor: color + cursor: 'pointer', + position: 'relative', + textDecoration: 'none', + userSelect: 'none', + display: 'flex', + color: COLORS.LIGHT_PRIMARY_TEXT_COLOR, + '&:hover, &.active': { + backgroundColor: color(COLORS[props.color]).darken(0.2).hex() + } }; - }, COLORS) - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - NavigationItemTag = _createThemeTag4[0], - themeItemMain = _createThemeTag4[1]; - + }, + modifiers: { + color: _mapValues(function (color) { + return { + backgroundColor: color + }; + }, COLORS) + } + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + NavigationItemTag = _createThemeTag4[0], + themeItemMain = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag("".concat(name, "ItemIcon"), function (_ref4) { - var COLORS = _ref4.COLORS; - return { - root: { - display: 'flex', - width: '60px', - height: '60px', - flexShrink: '0', - justifyContent: 'center', - alignItems: 'center', - color: COLORS.LIGHT_PRIMARY_TEXT_COLOR - } - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - NavigationItemIcon = _createThemeTag6[0], - themeItemIcon = _createThemeTag6[1]; - + var COLORS = _ref4.COLORS; + return { + root: { + display: 'flex', + width: '60px', + height: '60px', + flexShrink: '0', + justifyContent: 'center', + alignItems: 'center', + color: COLORS.LIGHT_PRIMARY_TEXT_COLOR + } + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + NavigationItemIcon = _createThemeTag6[0], + themeItemIcon = _createThemeTag6[1]; var _createThemeTag7 = createThemeTag("".concat(name, "ItemLabel"), function (_ref5) { - var COLORS = _ref5.COLORS, + var COLORS = _ref5.COLORS, FONTS = _ref5.FONTS; - return { - root: _objectSpread({ - display: 'flex', - alignItems: 'center', - paddingRight: '20px', - opacity: '0', - visibility: 'hidden', - transition: 'all 0.1s', - whiteSpace: 'nowrap' - }, FONTS.OVERLINE_2, { - color: COLORS.WHITE - }) - }; -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - NavigationItemLabel = _createThemeTag8[0], - themeItemLabel = _createThemeTag8[1]; - + return { + root: _objectSpread({ + display: 'flex', + alignItems: 'center', + paddingRight: '20px', + opacity: '0', + visibility: 'hidden', + transition: 'all 0.1s', + whiteSpace: 'nowrap' + }, FONTS.OVERLINE_2, { + color: COLORS.WHITE + }) + }; + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + NavigationItemLabel = _createThemeTag8[0], + themeItemLabel = _createThemeTag8[1]; var _createThemeTag9 = createThemeTag("".concat(name, "ItemLabelPreview"), function (_ref6) { - var COLORS = _ref6.COLORS, + var COLORS = _ref6.COLORS, FONTS = _ref6.FONTS; - return { - root: _objectSpread({ - alignItems: 'center' - }, FONTS.OVERLINE_2, { - color: COLORS.WHITE - }) - }; -}), - _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), - NavigationItemLabelPreview = _createThemeTag10[0], - themeItemLabelPreview = _createThemeTag10[1]; - + return { + root: _objectSpread({ + alignItems: 'center' + }, FONTS.OVERLINE_2, { + color: COLORS.WHITE + }) + }; + }), + _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), + NavigationItemLabelPreview = _createThemeTag10[0], + themeItemLabelPreview = _createThemeTag10[1]; var theme = _objectSpread({}, themeNavigation, {}, themeItemMain, {}, themeItemLabel, {}, themeItemIcon, {}, themeItemLabelPreview); - export { theme, NavigationTag, NavigationItemTag, NavigationItemLabel, NavigationItemIcon, NavigationItemLabelPreview }; \ No newline at end of file diff --git a/es/components/Navigation/NavigationItem.js b/es/components/Navigation/NavigationItem.js index b1bdcd0f..adc79a0a 100644 --- a/es/components/Navigation/NavigationItem.js +++ b/es/components/Navigation/NavigationItem.js @@ -4,13 +4,11 @@ import React from 'react'; import { Icon } from '../Icon'; import { NavigationItemTag, NavigationItemLabel, NavigationItemIcon, NavigationItemLabelPreview } from './Navigation.theme'; import { COLORS } from '../../theme'; - var NavigationItem = function NavigationItem(_ref) { var icon = _ref.icon, - label = _ref.label, - iconSize = _ref.iconSize, - rest = _objectWithoutProperties(_ref, ["icon", "label", "iconSize"]); - + label = _ref.label, + iconSize = _ref.iconSize, + rest = _objectWithoutProperties(_ref, ["icon", "label", "iconSize"]); return ___EmotionJSX(NavigationItemTag, rest, ___EmotionJSX(NavigationItemIcon, { modifiers: rest }, icon === undefined && typeof label === 'string' && label.length > 0 ? ___EmotionJSX(NavigationItemLabelPreview, null, label && label.charAt(0).toUpperCase()) : null, typeof icon === 'string' ? ___EmotionJSX(Icon, { @@ -22,7 +20,6 @@ var NavigationItem = function NavigationItem(_ref) { className: "NavigationItem-label" }, label)); }; - NavigationItem.defaultProps = { tagName: 'a' }; diff --git a/es/components/NoData/NoData.js b/es/components/NoData/NoData.js index 915c911d..c173c5c3 100644 --- a/es/components/NoData/NoData.js +++ b/es/components/NoData/NoData.js @@ -3,7 +3,6 @@ import React from 'react'; import { Icon } from '../Icon'; import { Column } from '../FlexLayout'; import { NoDataIconContainerTag, NoDataTextTag } from './NoData.theme'; - var NoData = function NoData(props) { return ___EmotionJSX(Column, { stretch: true, @@ -21,5 +20,4 @@ var NoData = function NoData(props) { modifiers: props }, "no data")); }; - export { NoData }; \ No newline at end of file diff --git a/es/components/NoData/NoData.theme.js b/es/components/NoData/NoData.theme.js index 60efab20..45ff14b8 100644 --- a/es/components/NoData/NoData.theme.js +++ b/es/components/NoData/NoData.theme.js @@ -1,37 +1,30 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'noData'; - var _createThemeTag = createThemeTag("".concat(name, "IconContainer"), { - root: { - height: '80px' - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - NoDataIconContainerTag = _createThemeTag2[0], - themeIconContainer = _createThemeTag2[1]; - -var _createThemeTag3 = createThemeTag("".concat(name, "Text"), function (_ref) { - var COLORS = _ref.COLORS; - return { root: { - color: COLORS.GRAY_30, - fontSize: '32px', - fontWeight: 500, - textTransform: 'uppercase' + height: '80px' } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - NoDataTextTag = _createThemeTag4[0], - themeText = _createThemeTag4[1]; - + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + NoDataIconContainerTag = _createThemeTag2[0], + themeIconContainer = _createThemeTag2[1]; +var _createThemeTag3 = createThemeTag("".concat(name, "Text"), function (_ref) { + var COLORS = _ref.COLORS; + return { + root: { + color: COLORS.GRAY_30, + fontSize: '32px', + fontWeight: 500, + textTransform: 'uppercase' + } + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + NoDataTextTag = _createThemeTag4[0], + themeText = _createThemeTag4[1]; var theme = _objectSpread({}, themeIconContainer, {}, themeText); - export { NoDataIconContainerTag, NoDataTextTag, theme }; \ No newline at end of file diff --git a/es/components/Pagination/Pagination.js b/es/components/Pagination/Pagination.js index e03a3417..bf4e8d74 100644 --- a/es/components/Pagination/Pagination.js +++ b/es/components/Pagination/Pagination.js @@ -1,3 +1,4 @@ +import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral"; import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; import _createClass from "@babel/runtime/helpers/esm/createClass"; @@ -5,9 +6,37 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; +function _templateObject4() { + var data = _taggedTemplateLiteral(["\n margin-left: 12px;\n "]); + _templateObject4 = function _templateObject4() { + return data; + }; + return data; +} +function _templateObject3() { + var data = _taggedTemplateLiteral(["\n width: 64px;\n margin-left: 12px;\n "]); + _templateObject3 = function _templateObject3() { + return data; + }; + return data; +} +function _templateObject2() { + var data = _taggedTemplateLiteral(["\n flex-shrink: 0;\n "]); + _templateObject2 = function _templateObject2() { + return data; + }; + return data; +} +function _templateObject() { + var data = _taggedTemplateLiteral(["\n flex-shrink: 0;\n "]); + _templateObject = function _templateObject() { + return data; + }; + return data; +} import React from 'react'; import memoize from 'lodash/memoize'; -import { css } from '@emotion/core'; +import { css } from '@emotion/react'; import { Select } from '../Select'; import { Button } from '../Button'; import { Icon } from '../Icon'; @@ -18,94 +47,46 @@ var formatter = new Intl.NumberFormat('en-EN', { useGrouping: true, maximumFractionDigits: 0 }); - -var _ref = process.env.NODE_ENV === "production" ? { - name: "6su6fj", - styles: "flex-shrink:0;" -} : { - name: "6su6fj", - styles: "flex-shrink:0;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1BhZ2luYXRpb24vUGFnaW5hdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0R21CIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1BhZ2luYXRpb24vUGFnaW5hdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG5cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgbWVtb2l6ZSBmcm9tICdsb2Rhc2gvbWVtb2l6ZSc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJztcblxuaW1wb3J0IHsgU2VsZWN0IH0gZnJvbSAnLi4vU2VsZWN0JztcbmltcG9ydCB7IEJ1dHRvbiB9IGZyb20gJy4uL0J1dHRvbic7XG5pbXBvcnQgeyBJY29uIH0gZnJvbSAnLi4vSWNvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vVGV4dCc7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uZGl0aW9uPXsgcmlnaHRTaWRlIDwgbnVtYmVyT2ZQYWdlcyB9PlxuICAgICAgICAgICAgPFBhZ2luYXRpb25JdGVtVGFnIGFjdGl2ZT17IHBhZ2UgPT09IG51bWJlck9mUGFnZXMgfSBvbkNsaWNrPXsgdGhpcy5jcmVhdGVPbkNoYW5nZShudW1iZXJPZlBhZ2VzKSB9PlxuICAgICAgICAgICAgICB7IG51bWJlck9mUGFnZXMgfVxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSXRlbVRhZz5cbiAgICAgICAgICA8L0lmPlxuICAgICAgICA8L1BhZ2luYXRpb25JdGVtc1RhZz5cblxuICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgc2l6ZT1cInNtXCJcbiAgICAgICAgICBjc3M9eyBjc3NgXG4gICAgICAgICAgICBmbGV4LXNocmluazogMDtcbiAgICAgICAgICBgIH1cbiAgICAgICAgICBvbkNsaWNrPXsgdGhpcy5jcmVhdGVPbkNoYW5nZShwYWdlICsgMSkgfVxuICAgICAgICAgIGNvbG9yPVwibmV1dHJhbFwiXG4gICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICBzcXVhcmVkXG4gICAgICAgICAgZGlzYWJsZWQ9eyBwYWdlID49IG51bWJlck9mUGFnZXMgfVxuICAgICAgICAgIHdpdGhJY29uQXV0b3NpemU9eyBmYWxzZSB9XG4gICAgICAgID5cbiAgICAgICAgICA8SWNvbiBuYW1lPVwiQ2hldnJvblJpZ2h0XCIgc2l6ZT1cInhzXCIgLz5cbiAgICAgICAgPC9CdXR0b24+XG5cbiAgICAgICAgPElmIGNvbmRpdGlvbj17ICEhc2hvd1NpemVDaGFuZ2VyIH0+XG4gICAgICAgICAgPFNlbGVjdFxuICAgICAgICAgICAgY3NzPXsgY3NzYFxuICAgICAgICAgICAgICB3aWR0aDogNjRweDtcbiAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IDEycHg7XG4gICAgICAgICAgICBgIH1cbiAgICAgICAgICAgIHZhbHVlPXsgcGFnZVNpemUgfVxuICAgICAgICAgICAgb3B0aW9ucz17IHRoaXMuZ2V0UGFnZVNpemVPcHRpb25zKHBhZ2VTaXplT3B0aW9ucykgfVxuICAgICAgICAgICAgb25DaGFuZ2U9eyB0aGlzLm9uQ2hhbmdlUGFnZVNpemUgfVxuICAgICAgICAgICAgaXNTZWFyY2hhYmxlPXsgZmFsc2UgfVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvSWY+XG5cbiAgICAgICAgPFRleHRcbiAgICAgICAgICBjc3M9eyBjc3NgXG4gICAgICAgICAgICBtYXJnaW4tbGVmdDogMTJweDtcbiAgICAgICAgICBgIH1cbiAgICAgICAgPlxuICAgICAgICAgIHsgZm9ybWF0dGVyLmZvcm1hdChmaXJzdFJlY29yZEluZGV4KSB9IC0geyBmb3JtYXR0ZXIuZm9ybWF0KGxhc3RSZWNvcmRJbmRleCkgfSBvZiB7IGZvcm1hdHRlci5mb3JtYXQodG90YWwpIH0gcmVjb3Jkc1xuICAgICAgICA8L1RleHQ+XG4gICAgICA8L1BhZ2luYXRpb25UYWc+XG4gICAgKTtcbiAgfVxufVxuXG5leHBvcnQgeyBQYWdpbmF0aW9uLCB0aGVtZSB9O1xuIl19 */" -}; - -var _ref2 = process.env.NODE_ENV === "production" ? { - name: "6su6fj", - styles: "flex-shrink:0;" -} : { - name: "6su6fj", - styles: "flex-shrink:0;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1BhZ2luYXRpb24vUGFnaW5hdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEySm1CIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1BhZ2luYXRpb24vUGFnaW5hdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG5cbmltcG9ydCB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4ICsgc3RhcnQgfVxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSXRlbVRhZz5cbiAgICAgICAgICApKSB9XG5cbiAgICAgICAgICA8SWYgY29uZGl0aW9uPXsgc2hvd1JpZ2h0TW9yZSB9PlxuICAgICAgICAgICAgPFBhZ2luYXRpb25JdGVtVGFnIGRpc2FibGVkPlxuICAgICAgICAgICAgICA8SWNvbiBuYW1lPVwiTW9yZVwiIC8+XG4gICAgICAgICAgICA8L1BhZ2luYXRpb25JdGVtVGFnPlxuICAgICAgICAgIDwvSWY+XG5cbiAgICAgICAgICA8SWYgY29uZGl0aW9uPXsgcmlnaHRTaWRlIDwgbnVtYmVyT2ZQYWdlcyB9PlxuICAgICAgICAgICAgPFBhZ2luYXRpb25JdGVtVGFnIGFjdGl2ZT17IHBhZ2UgPT09IG51bWJlck9mUGFnZXMgfSBvbkNsaWNrPXsgdGhpcy5jcmVhdGVPbkNoYW5nZShudW1iZXJPZlBhZ2VzKSB9PlxuICAgICAgICAgICAgICB7IG51bWJlck9mUGFnZXMgfVxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSXRlbVRhZz5cbiAgICAgICAgICA8L0lmPlxuICAgICAgICA8L1BhZ2luYXRpb25JdGVtc1RhZz5cblxuICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgc2l6ZT1cInNtXCJcbiAgICAgICAgICBjc3M9eyBjc3NgXG4gICAgICAgICAgICBmbGV4LXNocmluazogMDtcbiAgICAgICAgICBgIH1cbiAgICAgICAgICBvbkNsaWNrPXsgdGhpcy5jcmVhdGVPbkNoYW5nZShwYWdlICsgMSkgfVxuICAgICAgICAgIGNvbG9yPVwibmV1dHJhbFwiXG4gICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICBzcXVhcmVkXG4gICAgICAgICAgZGlzYWJsZWQ9eyBwYWdlID49IG51bWJlck9mUGFnZXMgfVxuICAgICAgICAgIHdpdGhJY29uQXV0b3NpemU9eyBmYWxzZSB9XG4gICAgICAgID5cbiAgICAgICAgICA8SWNvbiBuYW1lPVwiQ2hldnJvblJpZ2h0XCIgc2l6ZT1cInhzXCIgLz5cbiAgICAgICAgPC9CdXR0b24+XG5cbiAgICAgICAgPElmIGNvbmRpdGlvbj17ICEhc2hvd1NpemVDaGFuZ2VyIH0+XG4gICAgICAgICAgPFNlbGVjdFxuICAgICAgICAgICAgY3NzPXsgY3NzYFxuICAgICAgICAgICAgICB3aWR0aDogNjRweDtcbiAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IDEycHg7XG4gICAgICAgICAgICBgIH1cbiAgICAgICAgICAgIHZhbHVlPXsgcGFnZVNpemUgfVxuICAgICAgICAgICAgb3B0aW9ucz17IHRoaXMuZ2V0UGFnZVNpemVPcHRpb25zKHBhZ2VTaXplT3B0aW9ucykgfVxuICAgICAgICAgICAgb25DaGFuZ2U9eyB0aGlzLm9uQ2hhbmdlUGFnZVNpemUgfVxuICAgICAgICAgICAgaXNTZWFyY2hhYmxlPXsgZmFsc2UgfVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvSWY+XG5cbiAgICAgICAgPFRleHRcbiAgICAgICAgICBjc3M9eyBjc3NgXG4gICAgICAgICAgICBtYXJnaW4tbGVmdDogMTJweDtcbiAgICAgICAgICBgIH1cbiAgICAgICAgPlxuICAgICAgICAgIHsgZm9ybWF0dGVyLmZvcm1hdChmaXJzdFJlY29yZEluZGV4KSB9IC0geyBmb3JtYXR0ZXIuZm9ybWF0KGxhc3RSZWNvcmRJbmRleCkgfSBvZiB7IGZvcm1hdHRlci5mb3JtYXQodG90YWwpIH0gcmVjb3Jkc1xuICAgICAgICA8L1RleHQ+XG4gICAgICA8L1BhZ2luYXRpb25UYWc+XG4gICAgKTtcbiAgfVxufVxuXG5leHBvcnQgeyBQYWdpbmF0aW9uLCB0aGVtZSB9O1xuIl19 */" -}; - -var _ref3 = process.env.NODE_ENV === "production" ? { - name: "1ljvac", - styles: "width:64px;margin-left:12px;" -} : { - name: "1ljvac", - styles: "width:64px;margin-left:12px;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1BhZ2luYXRpb24vUGFnaW5hdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEwS3FCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1BhZ2luYXRpb24vUGFnaW5hdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG5cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgbWVtb2l6ZSBmcm9tICdsb2Rhc2gvbWVtb2l6ZSc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJztcblxuaW1wb3J0IHsgU2VsZWN0IH0gZnJvbSAnLi4vU2VsZWN0JztcbmltcG9ydCB7IEJ1dHRvbiB9IGZyb20gJy4uL0J1dHRvbic7XG5pbXBvcnQgeyBJY29uIH0gZnJvbSAnLi4vSWNvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vVGV4dCc7XG5pbXBvcnQgeyB0aGVtZSwgUGFnaW5hdGlvblRhZywgUGFnaW5hdGlvbkl0ZW1zVGFnLCBQYWdpbmF0aW9uSXRlbVRhZyB9IGZyb20gJy4vUGFnaW5hdGlvbi50aGVtZSc7XG5cbnR5cGUgUGFnaW5hdGlvblByb3BzID0ge1xuICBwYWdlPzogbnVtYmVyLFxuICBwYWdlU2l6ZT86IG51bWJlcixcbiAgZGVmYXVsdFBhZ2U6IG51bWJlcixcbiAgZGVmYXVsdFBhZ2VTaXplOiBudW1iZXIsXG4gIHRvdGFsOiBudW1iZXIsXG4gIHNob3dTaXplQ2hhbmdlcj86IGJvb2xlYW4sXG4gIHBhZ2VTaXplT3B0aW9ucz86IG51bWJlcltdLFxuICBvbkNoYW5nZT86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uc3QgbGFzdFJlY29yZEluZGV4ID0gTWF0aC5taW4odG90YWwsIHBhZ2UgKiBwYWdlU2l6ZSk7XG5cbiAgICByZXR1cm4gKFxuICAgICAgPFBhZ2luYXRpb25UYWcgdGFnTmFtZT1cImRpdlwiPlxuICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgc2l6ZT1cInNtXCJcbiAgICAgICAgICBjc3M9eyBjc3NgXG4gICAgICAgICAgICBmbGV4LXNocmluazogMDtcbiAgICAgICAgICBgIH1cbiAgICAgICAgICBvbkNsaWNrPXsgdGhpcy5jcmVhdGVPbkNoYW5nZShwYWdlIC0gMSkgfVxuICAgICAgICAgIGNvbG9yPVwibmV1dHJhbFwiXG4gICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICBzcXVhcmVkXG4gICAgICAgICAgZGlzYWJsZWQ9eyBwYWdlIDw9IDEgfVxuICAgICAgICAgIHdpdGhJY29uQXV0b3NpemU9eyBmYWxzZSB9XG4gICAgICAgID5cbiAgICAgICAgICA8SWNvbiBuYW1lPVwiQ2hldnJvbkxlZnRcIiBzaXplPVwieHNcIiAvPlxuICAgICAgICA8L0J1dHRvbj5cblxuICAgICAgICA8UGFnaW5hdGlvbkl0ZW1zVGFnPlxuICAgICAgICAgIDxJZiBjb25kaXRpb249eyBsZWZ0U2lkZSA+IDEgfT5cbiAgICAgICAgICAgIDxQYWdpbmF0aW9uSXRlbVRhZyBhY3RpdmU9eyBwYWdlID09PSAxIH0gb25DbGljaz17IHRoaXMuY3JlYXRlT25DaGFuZ2UoMSkgfT5cbiAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSXRlbVRhZz5cbiAgICAgICAgICA8L0lmPlxuXG4gICAgICAgICAgPElmIGNvbmRpdGlvbj17IHNob3dMZWZ0TW9yZSB9PlxuICAgICAgICAgICAgPFBhZ2luYXRpb25JdGVtVGFnIGRpc2FibGVkPlxuICAgICAgICAgICAgICA8SWNvbiBuY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3M9eyBjc3NgXG4gICAgICAgICAgICBmbGV4LXNocmluazogMDtcbiAgICAgICAgICBgIH1cbiAgICAgICAgICBvbkNsaWNrPXsgdGhpcy5jcmVhdGVPbkNoYW5nZShwYWdlICsgMSkgfVxuICAgICAgICAgIGNvbG9yPVwibmV1dHJhbFwiXG4gICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICBzcXVhcmVkXG4gICAgICAgICAgZGlzYWJsZWQ9eyBwYWdlID49IG51bWJlck9mUGFnZXMgfVxuICAgICAgICAgIHdpdGhJY29uQXV0b3NpemU9eyBmYWxzZSB9XG4gICAgICAgID5cbiAgICAgICAgICA8SWNvbiBuYW1lPVwiQ2hldnJvblJpZ2h0XCIgc2l6ZT1cInhzXCIgLz5cbiAgICAgICAgPC9CdXR0b24+XG5cbiAgICAgICAgPElmIGNvbmRpdGlvbj17ICEhc2hvd1NpemVDaGFuZ2VyIH0+XG4gICAgICAgICAgPFNlbGVjdFxuICAgICAgICAgICAgY3NzPXsgY3NzYFxuICAgICAgICAgICAgICB3aWR0aDogNjRweDtcbiAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IDEycHg7XG4gICAgICAgICAgICBgIH1cbiAgICAgICAgICAgIHZhbHVlPXsgcGFnZVNpemUgfVxuICAgICAgICAgICAgb3B0aW9ucz17IHRoaXMuZ2V0UGFnZVNpemVPcHRpb25zKHBhZ2VTaXplT3B0aW9ucykgfVxuICAgICAgICAgICAgb25DaGFuZ2U9eyB0aGlzLm9uQ2hhbmdlUGFnZVNpemUgfVxuICAgICAgICAgICAgaXNTZWFyY2hhYmxlPXsgZmFsc2UgfVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvSWY+XG5cbiAgICAgICAgPFRleHRcbiAgICAgICAgICBjc3M9eyBjc3NgXG4gICAgICAgICAgICBtYXJnaW4tbGVmdDogMTJweDtcbiAgICAgICAgICBgIH1cbiAgICAgICAgPlxuICAgICAgICAgIHsgZm9ybWF0dGVyLmZvcm1hdChmaXJzdFJlY29yZEluZGV4KSB9IC0geyBmb3JtYXR0ZXIuZm9ybWF0KGxhc3RSZWNvcmRJbmRleCkgfSBvZiB7IGZvcm1hdHRlci5mb3JtYXQodG90YWwpIH0gcmVjb3Jkc1xuICAgICAgICA8L1RleHQ+XG4gICAgICA8L1BhZ2luYXRpb25UYWc+XG4gICAgKTtcbiAgfVxufVxuXG5leHBvcnQgeyBQYWdpbmF0aW9uLCB0aGVtZSB9O1xuIl19 */" -}; - -var _ref4 = process.env.NODE_ENV === "production" ? { - name: "1qhmto6", - styles: "margin-left:12px;" -} : { - name: "1qhmto6", - styles: "margin-left:12px;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1BhZ2luYXRpb24vUGFnaW5hdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzTG1CIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1BhZ2luYXRpb24vUGFnaW5hdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEBmbG93XG5cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgbWVtb2l6ZSBmcm9tICdsb2Rhc2gvbWVtb2l6ZSc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJztcblxuaW1wb3J0IHsgU2VsZWN0IH0gZnJvbSAnLi4vU2VsZWN0JztcbmltcG9ydCB7IEJ1dHRvbiB9IGZyb20gJy4uL0J1dHRvbic7XG5pbXBvcnQgeyBJY29uIH0gZnJvbSAnLi4vSWNvbic7XG5pbXBvcnQgeyBUZXh0IH0gZnJvbSAnLi4vVGV4dCc7XG5pbXBvcnQgeyB0aGVtZSwgUGFnaW5hdGlvblRhZywgUGFnaW5hdGlvbkl0ZW1zVGFnLCBQYWdpbmF0aW9uS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tVGFnIGFjdGl2ZT17IHBhZ2UgPT09IG51bWJlck9mUGFnZXMgfSBvbkNsaWNrPXsgdGhpcy5jcmVhdGVPbkNoYW5nZShudW1iZXJPZlBhZ2VzKSB9PlxuICAgICAgICAgICAgICB7IG51bWJlck9mUGFnZXMgfVxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSXRlbVRhZz5cbiAgICAgICAgICA8L0lmPlxuICAgICAgICA8L1BhZ2luYXRpb25JdGVtc1RhZz5cblxuICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgc2l6ZT1cInNtXCJcbiAgICAgICAgICBjc3M9eyBjc3NgXG4gICAgICAgICAgICBmbGV4LXNocmluazogMDtcbiAgICAgICAgICBgIH1cbiAgICAgICAgICBvbkNsaWNrPXsgdGhpcy5jcmVhdGVPbkNoYW5nZShwYWdlICsgMSkgfVxuICAgICAgICAgIGNvbG9yPVwibmV1dHJhbFwiXG4gICAgICAgICAgdmFyaWFudD1cIm91dGxpbmVkXCJcbiAgICAgICAgICBzcXVhcmVkXG4gICAgICAgICAgZGlzYWJsZWQ9eyBwYWdlID49IG51bWJlck9mUGFnZXMgfVxuICAgICAgICAgIHdpdGhJY29uQXV0b3NpemU9eyBmYWxzZSB9XG4gICAgICAgID5cbiAgICAgICAgICA8SWNvbiBuYW1lPVwiQ2hldnJvblJpZ2h0XCIgc2l6ZT1cInhzXCIgLz5cbiAgICAgICAgPC9CdXR0b24+XG5cbiAgICAgICAgPElmIGNvbmRpdGlvbj17ICEhc2hvd1NpemVDaGFuZ2VyIH0+XG4gICAgICAgICAgPFNlbGVjdFxuICAgICAgICAgICAgY3NzPXsgY3NzYFxuICAgICAgICAgICAgICB3aWR0aDogNjRweDtcbiAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IDEycHg7XG4gICAgICAgICAgICBgIH1cbiAgICAgICAgICAgIHZhbHVlPXsgcGFnZVNpemUgfVxuICAgICAgICAgICAgb3B0aW9ucz17IHRoaXMuZ2V0UGFnZVNpemVPcHRpb25zKHBhZ2VTaXplT3B0aW9ucykgfVxuICAgICAgICAgICAgb25DaGFuZ2U9eyB0aGlzLm9uQ2hhbmdlUGFnZVNpemUgfVxuICAgICAgICAgICAgaXNTZWFyY2hhYmxlPXsgZmFsc2UgfVxuICAgICAgICAgIC8+XG4gICAgICAgIDwvSWY+XG5cbiAgICAgICAgPFRleHRcbiAgICAgICAgICBjc3M9eyBjc3NgXG4gICAgICAgICAgICBtYXJnaW4tbGVmdDogMTJweDtcbiAgICAgICAgICBgIH1cbiAgICAgICAgPlxuICAgICAgICAgIHsgZm9ybWF0dGVyLmZvcm1hdChmaXJzdFJlY29yZEluZGV4KSB9IC0geyBmb3JtYXR0ZXIuZm9ybWF0KGxhc3RSZWNvcmRJbmRleCkgfSBvZiB7IGZvcm1hdHRlci5mb3JtYXQodG90YWwpIH0gcmVjb3Jkc1xuICAgICAgICA8L1RleHQ+XG4gICAgICA8L1BhZ2luYXRpb25UYWc+XG4gICAgKTtcbiAgfVxufVxuXG5leHBvcnQgeyBQYWdpbmF0aW9uLCB0aGVtZSB9O1xuIl19 */" -}; - -var Pagination = -/*#__PURE__*/ -function (_React$Component) { +var Pagination = /*#__PURE__*/function (_React$Component) { _inherits(Pagination, _React$Component); - function Pagination(props) { var _this; - _classCallCheck(this, Pagination); - _this = _possibleConstructorReturn(this, _getPrototypeOf(Pagination).call(this, props)); _this.createOnChange = memoize(function (page) { return function () { var _this$props = _this.props, - onChange = _this$props.onChange, - pageSizeFormProps = _this$props.pageSize; + onChange = _this$props.onChange, + pageSizeFormProps = _this$props.pageSize; var pageSizeFromState = _this.state.pageSize; var pageSize = pageSizeFormProps || pageSizeFromState; - _this.setState(function () { return { page: page }; }); - if (typeof onChange === 'function') { onChange(page, pageSize); } }; }); - _this.onChangePageSize = function (value) { var pageSize = parseInt(value, 10); var _this$props2 = _this.props, - total = _this$props2.total, - onChange = _this$props2.onChange; + total = _this$props2.total, + onChange = _this$props2.onChange; var page = _this.state.page; var nextPage = Math.min(page, Math.ceil(total / pageSize)); - _this.setState(function () { return { pageSize: pageSize, page: nextPage }; }); - if (typeof onChange === 'function') { onChange(nextPage, pageSize); } }; - _this.getPageSizeOptions = function (pageSizeOptions) { return pageSizeOptions.map(function (value) { return { @@ -114,30 +95,30 @@ function (_React$Component) { }; }); }; - _this.state = { page: props.defaultPage, pageSize: props.defaultPageSize }; return _this; - } // $FlowFixMe + } + // $FlowFixMe + // $FlowFixMe _createClass(Pagination, [{ key: "render", value: function render() { var _this2 = this; - var _this$props3 = this.props, - pageFromProps = _this$props3.page, - pageSizeFormProps = _this$props3.pageSize, - total = _this$props3.total, - _this$props3$pageSize = _this$props3.pageSizeOptions, - pageSizeOptions = _this$props3$pageSize === void 0 ? [] : _this$props3$pageSize, - showSizeChanger = _this$props3.showSizeChanger; + pageFromProps = _this$props3.page, + pageSizeFormProps = _this$props3.pageSize, + total = _this$props3.total, + _this$props3$pageSize = _this$props3.pageSizeOptions, + pageSizeOptions = _this$props3$pageSize === void 0 ? [] : _this$props3$pageSize, + showSizeChanger = _this$props3.showSizeChanger; var _this$state = this.state, - pageFromState = _this$state.page, - pageSizeFromState = _this$state.pageSize; + pageFromState = _this$state.page, + pageSizeFromState = _this$state.pageSize; var page = pageFromProps || pageFromState; var pageSize = pageSizeFormProps || pageSizeFromState; var numberOfPages = Math.ceil(total / pageSize); @@ -146,16 +127,14 @@ function (_React$Component) { var showLeftMore = leftSide > 2; var showRightMore = rightSide < numberOfPages - 1; var start = leftSide > 1 ? leftSide : 1; - var pages = _toConsumableArray(Array(VISIBLE_RANGE * 2 + 1).keys()).slice(0, numberOfPages); - var firstRecordIndex = (page - 1) * pageSize + 1; var lastRecordIndex = Math.min(total, page * pageSize); return ___EmotionJSX(PaginationTag, { tagName: "div" }, ___EmotionJSX(Button, { size: "sm", - css: _ref, + css: css(_templateObject()), onClick: this.createOnChange(page - 1), color: "neutral", variant: "outlined", @@ -187,7 +166,7 @@ function (_React$Component) { onClick: this.createOnChange(numberOfPages) }, numberOfPages) : null), ___EmotionJSX(Button, { size: "sm", - css: _ref2, + css: css(_templateObject2()), onClick: this.createOnChange(page + 1), color: "neutral", variant: "outlined", @@ -198,20 +177,18 @@ function (_React$Component) { name: "ChevronRight", size: "xs" })), !!showSizeChanger ? ___EmotionJSX(Select, { - css: _ref3, + css: css(_templateObject3()), value: pageSize, options: this.getPageSizeOptions(pageSizeOptions), onChange: this.onChangePageSize, isSearchable: false }) : null, ___EmotionJSX(Text, { - css: _ref4 + css: css(_templateObject4()) }, formatter.format(firstRecordIndex), " - ", formatter.format(lastRecordIndex), " of ", formatter.format(total), " records")); } }]); - return Pagination; }(React.Component); - Pagination.defaultProps = { defaultPage: 1, defaultPageSize: 10, diff --git a/es/components/Pagination/Pagination.js.flow b/es/components/Pagination/Pagination.js.flow index e6be19e3..12d36f1d 100644 --- a/es/components/Pagination/Pagination.js.flow +++ b/es/components/Pagination/Pagination.js.flow @@ -2,7 +2,7 @@ import React from 'react'; import memoize from 'lodash/memoize'; -import { css } from '@emotion/core'; +import { css } from '@emotion/react'; import { Select } from '../Select'; import { Button } from '../Button'; diff --git a/es/components/Pagination/Pagination.stories.js b/es/components/Pagination/Pagination.stories.js index d1d8faa1..b795c02b 100644 --- a/es/components/Pagination/Pagination.stories.js +++ b/es/components/Pagination/Pagination.stories.js @@ -1,6 +1,6 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; - /* eslint-disable no-alert */ + import React from 'react'; import { Pagination, Column } from '../../'; export default { diff --git a/es/components/Pagination/Pagination.theme.js b/es/components/Pagination/Pagination.theme.js index 0042ea50..767c2914 100644 --- a/es/components/Pagination/Pagination.theme.js +++ b/es/components/Pagination/Pagination.theme.js @@ -1,90 +1,82 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'pagination'; - var _createThemeTag = createThemeTag(name, function () { - return { - root: { - display: 'flex', - alignItems: 'center' - }, - modifiers: {} - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - PaginationTag = _createThemeTag2[0], - themePagination = _createThemeTag2[1]; - + return { + root: { + display: 'flex', + alignItems: 'center' + }, + modifiers: {} + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + PaginationTag = _createThemeTag2[0], + themePagination = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Item"), function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, FONTS = _ref.FONTS; - return { - root: { - height: 36, - marginRight: 24, - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - position: 'relative', - flexShrink: 0, - color: COLORS.GRAY_40, - cursor: 'pointer', - userSelect: 'none', - '&:hover': { - color: COLORS.PRIMARY_TEXT_COLOR + return { + root: { + height: 36, + marginRight: 24, + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + position: 'relative', + flexShrink: 0, + color: COLORS.GRAY_40, + cursor: 'pointer', + userSelect: 'none', + '&:hover': { + color: COLORS.PRIMARY_TEXT_COLOR + }, + '&:last-child': { + marginRight: 0 + } }, - '&:last-child': { - marginRight: 0 - } - }, - modifiers: { - active: _objectSpread({}, FONTS.SUBTITLE, { - color: COLORS.WHITE, - pointerEvents: 'none', - '&:before': { - content: '\'\'', - backgroundColor: COLORS.PRIMARY, - borderRadius: 18, - position: 'absolute', - left: '- calc((28px - 100%) / 2)', - top: 4, - width: 28, - height: 28, - zIndex: -1 + modifiers: { + active: _objectSpread({}, FONTS.SUBTITLE, { + color: COLORS.WHITE, + pointerEvents: 'none', + '&:before': { + content: '\'\'', + backgroundColor: COLORS.PRIMARY, + borderRadius: 18, + position: 'absolute', + left: '- calc((28px - 100%) / 2)', + top: 4, + width: 28, + height: 28, + zIndex: -1 + } + }), + disabled: { + pointerEvents: 'none' } - }), - disabled: { - pointerEvents: 'none' } - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - PaginationItemTag = _createThemeTag4[0], - themePaginationItem = _createThemeTag4[1]; - + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + PaginationItemTag = _createThemeTag4[0], + themePaginationItem = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag("".concat(name, "Items"), function () { - return { - root: { - display: 'flex', - padding: '0 24px', - justifyContent: 'center', - alignItems: 'center', - zIndex: 1 - }, - modifiers: {} - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - PaginationItemsTag = _createThemeTag6[0], - themePaginationItems = _createThemeTag6[1]; - + return { + root: { + display: 'flex', + padding: '0 24px', + justifyContent: 'center', + alignItems: 'center', + zIndex: 1 + }, + modifiers: {} + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + PaginationItemsTag = _createThemeTag6[0], + themePaginationItems = _createThemeTag6[1]; var theme = _objectSpread({}, themePagination, {}, themePaginationItem, {}, themePaginationItems); - export { theme, PaginationTag, PaginationItemsTag, PaginationItemTag }; \ No newline at end of file diff --git a/es/components/Paper/Paper.js b/es/components/Paper/Paper.js index 9fcffbce..68655485 100644 --- a/es/components/Paper/Paper.js +++ b/es/components/Paper/Paper.js @@ -3,16 +3,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { PaperTag } from './Paper.theme'; - function Paper(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(PaperTag, _extends({ tagName: "div" }, rest), children); } - Paper.defaultProps = { padding: 'none', borderRadius: 'all' diff --git a/es/components/Paper/Paper.theme.js b/es/components/Paper/Paper.theme.js index e6556017..8d4cb7d0 100644 --- a/es/components/Paper/Paper.theme.js +++ b/es/components/Paper/Paper.theme.js @@ -1,68 +1,66 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { createThemeTag } from '../../theme/createThemeTag'; var name = 'paper'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, SIZES = _ref.SIZES; - return { - root: { - display: 'flex', - flexDirection: 'column', - maxHeight: '100%', - background: COLORS.WHITE, - color: COLORS.BLACK, - boxShadow: '0px 2px 10px rgb(50 60 71 / 10%)', - position: 'relative', - overflow: 'hidden' - }, - modifiers: { - padding: { - none: { - padding: '0' - }, - xs: { - padding: '4px' - }, - sm: { - padding: '8px' - }, - md: { - padding: '16px' - }, - lg: { - padding: '24px' - }, - xl: { - padding: '32px' - }, - xxl: { - padding: '48px' - } + return { + root: { + display: 'flex', + flexDirection: 'column', + maxHeight: '100%', + background: COLORS.WHITE, + color: COLORS.BLACK, + boxShadow: '0px 2px 10px rgb(50 60 71 / 10%)', + position: 'relative', + overflow: 'hidden' }, - borderRadius: { - top: { - borderTopLeftRadius: SIZES.MAIN_BORDER_RADIUS, - borderTopRightRadius: SIZES.MAIN_BORDER_RADIUS + modifiers: { + padding: { + none: { + padding: '0' + }, + xs: { + padding: '4px' + }, + sm: { + padding: '8px' + }, + md: { + padding: '16px' + }, + lg: { + padding: '24px' + }, + xl: { + padding: '32px' + }, + xxl: { + padding: '48px' + } }, - bottom: { - borderBottomLeftRadius: SIZES.MAIN_BORDER_RADIUS, - borderBottomhtRadius: SIZES.MAIN_BORDER_RADIUS + borderRadius: { + top: { + borderTopLeftRadius: SIZES.MAIN_BORDER_RADIUS, + borderTopRightRadius: SIZES.MAIN_BORDER_RADIUS + }, + bottom: { + borderBottomLeftRadius: SIZES.MAIN_BORDER_RADIUS, + borderBottomhtRadius: SIZES.MAIN_BORDER_RADIUS + }, + all: { + borderRadius: SIZES.MAIN_BORDER_RADIUS + } }, - all: { - borderRadius: SIZES.MAIN_BORDER_RADIUS + stretch: { + flex: 1, + width: '100%', + height: '100%' } - }, - stretch: { - flex: 1, - width: '100%', - height: '100%' } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - PaperTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + PaperTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; export { PaperTag, theme }; \ No newline at end of file diff --git a/es/components/Paragraph/Paragraph.js b/es/components/Paragraph/Paragraph.js index 8ec5f2f3..ed26246c 100644 --- a/es/components/Paragraph/Paragraph.js +++ b/es/components/Paragraph/Paragraph.js @@ -4,17 +4,14 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { ParagraphTag } from './Paragraph.theme'; import { COLORS } from '../../theme'; - var Paragraph = function Paragraph(_ref) { var text = _ref.text, - children = _ref.children, - rest = _objectWithoutProperties(_ref, ["text", "children"]); - + children = _ref.children, + rest = _objectWithoutProperties(_ref, ["text", "children"]); return ___EmotionJSX(ParagraphTag, _extends({}, rest, { tagName: "p" }), children || text); }; - Paragraph.defaultProps = { color: 'PRIMARY_TEXT_COLOR', weight: 'normal' diff --git a/es/components/Paragraph/Paragraph.theme.js b/es/components/Paragraph/Paragraph.theme.js index 010c2e82..d5c2eac2 100644 --- a/es/components/Paragraph/Paragraph.theme.js +++ b/es/components/Paragraph/Paragraph.theme.js @@ -1,65 +1,60 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import _mapValues from "lodash/fp/mapValues"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'paragraph'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS, + var COLORS = _ref.COLORS, FONTS = _ref.FONTS; - return { - root: function root(props) { - return _objectSpread({}, FONTS.BODY_1, { - margin: 0, - '& > *': { - verticalAlign: props.verticalAlign - } - }); - }, - modifiers: { - color: _mapValues(function (color) { - return { - color: color - }; - }, COLORS), - weight: { - light: { - fontWeight: 300 - }, - normal: { - fontWeight: 400 - }, - medium: { - fontWeight: 500 - }, - semibold: { - fontWeight: 600 - }, - bold: { - fontWeight: 700 - } + return { + root: function root(props) { + return _objectSpread({}, FONTS.BODY_1, { + margin: 0, + '& > *': { + verticalAlign: props.verticalAlign + } + }); }, - align: { - left: { - textAlign: 'left' - }, - right: { - textAlign: 'right' + modifiers: { + color: _mapValues(function (color) { + return { + color: color + }; + }, COLORS), + weight: { + light: { + fontWeight: 300 + }, + normal: { + fontWeight: 400 + }, + medium: { + fontWeight: 500 + }, + semibold: { + fontWeight: 600 + }, + bold: { + fontWeight: 700 + } }, - center: { - textAlign: 'center' + align: { + left: { + textAlign: 'left' + }, + right: { + textAlign: 'right' + }, + center: { + textAlign: 'center' + } } } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - ParagraphTag = _createThemeTag2[0], - theme = _createThemeTag2[1]; - + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + ParagraphTag = _createThemeTag2[0], + theme = _createThemeTag2[1]; export { ParagraphTag, theme }; \ No newline at end of file diff --git a/es/components/Progress/Progress.js b/es/components/Progress/Progress.js index 37ff9ba6..24f01d02 100644 --- a/es/components/Progress/Progress.js +++ b/es/components/Progress/Progress.js @@ -2,15 +2,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { ProgressTag, ProgressBodyTag, ProgressInnerTag, ProgressValueTag, ProgressSeparatorTag, ProgressTextTag, ProgressLabelTag, ProgressDescriptionTag } from './Progress.theme'; - var Progress = function Progress(_ref) { var value = _ref.value, - label = _ref.label, - valueText = _ref.valueText, - valueWidth = _ref.valueWidth, - description = _ref.description, - rest = _objectWithoutProperties(_ref, ["value", "label", "valueText", "valueWidth", "description"]); - + label = _ref.label, + valueText = _ref.valueText, + valueWidth = _ref.valueWidth, + description = _ref.description, + rest = _objectWithoutProperties(_ref, ["value", "label", "valueText", "valueWidth", "description"]); value = value > 100 ? value % 100 : value; return ___EmotionJSX(ProgressTag, rest, label && ___EmotionJSX(ProgressLabelTag, { modifiers: rest @@ -36,7 +34,6 @@ var Progress = function Progress(_ref) { modifiers: rest }, valueText ? valueText : "".concat(value, " %"))), description && ___EmotionJSX(ProgressDescriptionTag, null, " ", description, " ")); }; - Progress.defaultProps = { size: 'md', color: 'PRIMARY', diff --git a/es/components/Progress/Progress.theme.js b/es/components/Progress/Progress.theme.js index 5a5c8ed6..bab32292 100644 --- a/es/components/Progress/Progress.theme.js +++ b/es/components/Progress/Progress.theme.js @@ -1,35 +1,29 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'progress'; - var _createThemeTag = createThemeTag(name, { - root: { - width: '100%', - display: 'flex', - flexDirection: 'column' - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - ProgressTag = _createThemeTag2[0], - themeProgress = _createThemeTag2[1]; - + root: { + width: '100%', + display: 'flex', + flexDirection: 'column' + } + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + ProgressTag = _createThemeTag2[0], + themeProgress = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Body"), { - root: { - width: '100%', - display: 'flex', - alignItems: 'center' - } -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - ProgressBodyTag = _createThemeTag4[0], - themeBody = _createThemeTag4[1]; - + root: { + width: '100%', + display: 'flex', + alignItems: 'center' + } + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + ProgressBodyTag = _createThemeTag4[0], + themeBody = _createThemeTag4[1]; var HEIGHT_BY_SIZE = { xs: 4, sm: 8, @@ -48,103 +42,95 @@ var BORDER_RADIUS_BY_SIZE = { md: 8, lg: 12 }; - var _createThemeTag5 = createThemeTag("".concat(name, "Inner"), function (_ref) { - var COLORS = _ref.COLORS; - return { - root: function root(_ref2) { - var size = _ref2.size, + var COLORS = _ref.COLORS; + return { + root: function root(_ref2) { + var size = _ref2.size, backgroundColor = _ref2.backgroundColor; - return { - position: 'relative', - zIndex: 1, - flex: '1', - height: HEIGHT_BY_SIZE[size], - background: COLORS[backgroundColor], - borderRadius: BORDER_RADIUS_BY_SIZE[size] - }; - } - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - ProgressInnerTag = _createThemeTag6[0], - themeInner = _createThemeTag6[1]; - + return { + position: 'relative', + zIndex: 1, + flex: '1', + height: HEIGHT_BY_SIZE[size], + background: COLORS[backgroundColor], + borderRadius: BORDER_RADIUS_BY_SIZE[size] + }; + } + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + ProgressInnerTag = _createThemeTag6[0], + themeInner = _createThemeTag6[1]; var _createThemeTag7 = createThemeTag("".concat(name, "Value"), function (_ref3) { - var COLORS = _ref3.COLORS; - return { - root: function root(_ref4) { - var size = _ref4.size, + var COLORS = _ref3.COLORS; + return { + root: function root(_ref4) { + var size = _ref4.size, color = _ref4.color, showSeparator = _ref4.showSeparator; - return { - height: '100%', - backgroundColor: COLORS[color], - borderRadius: BORDER_RADIUS_BY_SIZE[size], - borderTopRightRadius: showSeparator ? 0 : BORDER_RADIUS_BY_SIZE[size], - borderBottomRightRadius: showSeparator ? 0 : BORDER_RADIUS_BY_SIZE[size] - }; - } - }; -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - ProgressValueTag = _createThemeTag8[0], - themeValue = _createThemeTag8[1]; - + return { + height: '100%', + backgroundColor: COLORS[color], + borderRadius: BORDER_RADIUS_BY_SIZE[size], + borderTopRightRadius: showSeparator ? 0 : BORDER_RADIUS_BY_SIZE[size], + borderBottomRightRadius: showSeparator ? 0 : BORDER_RADIUS_BY_SIZE[size] + }; + } + }; + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + ProgressValueTag = _createThemeTag8[0], + themeValue = _createThemeTag8[1]; var _createThemeTag9 = createThemeTag("".concat(name, "Separator"), function (_ref5) { - var COLORS = _ref5.COLORS; - return { - root: function root(_ref6) { - var size = _ref6.size; - return { - position: 'absolute', - width: '2px', - borderRadius: '1px', - backgroundColor: COLORS.GRAY_30, - height: HEIGHT_SEPARATOR_BY_SIZE[size], - top: '50%', - transform: 'translate(-50%, -50%)' - }; - } - }; -}), - _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), - ProgressSeparatorTag = _createThemeTag10[0], - themeSeparator = _createThemeTag10[1]; - + var COLORS = _ref5.COLORS; + return { + root: function root(_ref6) { + var size = _ref6.size; + return { + position: 'absolute', + width: '2px', + borderRadius: '1px', + backgroundColor: COLORS.GRAY_30, + height: HEIGHT_SEPARATOR_BY_SIZE[size], + top: '50%', + transform: 'translate(-50%, -50%)' + }; + } + }; + }), + _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), + ProgressSeparatorTag = _createThemeTag10[0], + themeSeparator = _createThemeTag10[1]; var _createThemeTag11 = createThemeTag("".concat(name, "Text"), function (_ref7) { - var FONTS = _ref7.FONTS; - return { - root: _objectSpread({ - marginLeft: '20px', - minWidth: '40px' - }, FONTS.BODY_3) - }; -}), - _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), - ProgressTextTag = _createThemeTag12[0], - themeText = _createThemeTag12[1]; - + var FONTS = _ref7.FONTS; + return { + root: _objectSpread({ + marginLeft: '20px', + minWidth: '40px' + }, FONTS.BODY_3) + }; + }), + _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), + ProgressTextTag = _createThemeTag12[0], + themeText = _createThemeTag12[1]; var _createThemeTag13 = createThemeTag("".concat(name, "Label"), function (_ref8) { - var FONTS = _ref8.FONTS; - return { - root: _objectSpread({}, FONTS.BODY_3) - }; -}), - _createThemeTag14 = _slicedToArray(_createThemeTag13, 2), - ProgressLabelTag = _createThemeTag14[0], - themeLabel = _createThemeTag14[1]; - + var FONTS = _ref8.FONTS; + return { + root: _objectSpread({}, FONTS.BODY_3) + }; + }), + _createThemeTag14 = _slicedToArray(_createThemeTag13, 2), + ProgressLabelTag = _createThemeTag14[0], + themeLabel = _createThemeTag14[1]; var _createThemeTag15 = createThemeTag("".concat(name, "Description"), function (_ref9) { - var FONTS = _ref9.FONTS; - return { - root: _objectSpread({}, FONTS.BODY_3) - }; -}), - _createThemeTag16 = _slicedToArray(_createThemeTag15, 2), - ProgressDescriptionTag = _createThemeTag16[0], - themeDescription = _createThemeTag16[1]; - + var FONTS = _ref9.FONTS; + return { + root: _objectSpread({}, FONTS.BODY_3) + }; + }), + _createThemeTag16 = _slicedToArray(_createThemeTag15, 2), + ProgressDescriptionTag = _createThemeTag16[0], + themeDescription = _createThemeTag16[1]; var theme = _objectSpread({}, themeProgress, {}, themeBody, {}, themeInner, {}, themeValue, {}, themeSeparator, {}, themeText, {}, themeLabel, {}, themeDescription); - export { theme, ProgressTag, ProgressBodyTag, ProgressInnerTag, ProgressValueTag, ProgressSeparatorTag, ProgressTextTag, ProgressLabelTag, ProgressDescriptionTag }; \ No newline at end of file diff --git a/es/components/Radio/Radio.stories.js b/es/components/Radio/Radio.stories.js index ff406967..85d27354 100644 --- a/es/components/Radio/Radio.stories.js +++ b/es/components/Radio/Radio.stories.js @@ -6,37 +6,26 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { Component } from 'react'; import { Radio, Column, Row } from '../../'; - -var RadioState = -/*#__PURE__*/ -function (_Component) { +var RadioState = /*#__PURE__*/function (_Component) { _inherits(RadioState, _Component); - function RadioState() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, RadioState); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(RadioState)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { value: 2 }; - _this.changeValue = function (value) { return _this.setState({ value: value }); }; - return _this; } - _createClass(RadioState, [{ key: "render", value: function render() { @@ -46,10 +35,8 @@ function (_Component) { }); } }]); - return RadioState; }(Component); - export default { title: 'Components/Radio', component: Radio @@ -76,7 +63,7 @@ common.story = { export var button = function button() { return ___EmotionJSX(RadioState, null, function (_ref) { var value = _ref.value, - changeValue = _ref.changeValue; + changeValue = _ref.changeValue; return ___EmotionJSX(Radio.Group, { value: value, onChange: changeValue, @@ -257,7 +244,7 @@ withRowDirection.story = { export var withState = function withState() { return ___EmotionJSX(RadioState, null, function (_ref2) { var value = _ref2.value, - changeValue = _ref2.changeValue; + changeValue = _ref2.changeValue; return ___EmotionJSX(Radio.Group, { value: value, onChange: changeValue diff --git a/es/components/Radio/Radio.theme.js b/es/components/Radio/Radio.theme.js index 2f9923c9..f4048e35 100644 --- a/es/components/Radio/Radio.theme.js +++ b/es/components/Radio/Radio.theme.js @@ -1,145 +1,134 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'radio'; - var _createThemeTag = createThemeTag("".concat(name, "Circle"), function (_ref) { - var COLORS = _ref.COLORS; - return { - root: { - position: 'relative', - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - flexShrink: 0, - width: '16px', - height: '16px', - borderRadius: '50%', - transition: 'opacity .3s ease', - background: COLORS.WHITE, - border: "1px solid ".concat(COLORS.PRIMARY_BORDER_COLOR), - '&:hover': { - boxShadow: '0 1px 2px 0 rgba(50,50,93,0.14), 0 3px 4px 0 rgba(112,157,199,0.08)' - }, - 'input:focus + &': { - boxShadow: 'inset 0 1px 2px 0 rgba(50,50,93,0.14), inset 0 3px 4px 0 rgba(112,157,199,0.08)' - }, - 'input:active + &': { - boxShadow: 'inset 0 1px 2px 0 rgba(50,50,93,0.14), inset 0 3px 4px 0 rgba(112,157,199,0.08)' - } - }, - modifiers: { - hasError: { - borderColor: COLORS.DANGER + var COLORS = _ref.COLORS; + return { + root: { + position: 'relative', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + flexShrink: 0, + width: '16px', + height: '16px', + borderRadius: '50%', + transition: 'opacity .3s ease', + background: COLORS.WHITE, + border: "1px solid ".concat(COLORS.PRIMARY_BORDER_COLOR), + '&:hover': { + boxShadow: '0 1px 2px 0 rgba(50,50,93,0.14), 0 3px 4px 0 rgba(112,157,199,0.08)' + }, + 'input:focus + &': { + boxShadow: 'inset 0 1px 2px 0 rgba(50,50,93,0.14), inset 0 3px 4px 0 rgba(112,157,199,0.08)' + }, + 'input:active + &': { + boxShadow: 'inset 0 1px 2px 0 rgba(50,50,93,0.14), inset 0 3px 4px 0 rgba(112,157,199,0.08)' + } }, - disabled: { - backgroundColor: COLORS.GRAY_10 + modifiers: { + hasError: { + borderColor: COLORS.DANGER + }, + disabled: { + backgroundColor: COLORS.GRAY_10 + } } - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - RadioCircleTag = _createThemeTag2[0], - themeCircle = _createThemeTag2[1]; - + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + RadioCircleTag = _createThemeTag2[0], + themeCircle = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "CircleInner"), function (_ref2) { - var COLORS = _ref2.COLORS; - return { - root: function root(props) { - return { - display: 'block', - position: 'absolute', - top: '50%', - left: '50%', - marginLeft: '-4px', - marginTop: '-4px', - width: '8px', - height: '8px', - borderRadius: '50%', - opacity: props.checked ? 1 : 0 - }; - }, - modifiers: { - color: { - primary: { - backgroundColor: COLORS.PRIMARY + var COLORS = _ref2.COLORS; + return { + root: function root(props) { + return { + display: 'block', + position: 'absolute', + top: '50%', + left: '50%', + marginLeft: '-4px', + marginTop: '-4px', + width: '8px', + height: '8px', + borderRadius: '50%', + opacity: props.checked ? 1 : 0 + }; + }, + modifiers: { + color: { + primary: { + backgroundColor: COLORS.PRIMARY + }, + secondary: { + backgroundColor: COLORS.SECONDARY + } }, - secondary: { - backgroundColor: COLORS.SECONDARY + disabled: { + backgroundColor: COLORS.GRAY_50 } - }, - disabled: { - backgroundColor: COLORS.GRAY_50 } - } - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - RadioCircleInnerTag = _createThemeTag4[0], - themeCircleInner = _createThemeTag4[1]; - + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + RadioCircleInnerTag = _createThemeTag4[0], + themeCircleInner = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag("".concat(name, "Text"), function (_ref3) { - var FONTS = _ref3.FONTS; - return { - root: _objectSpread({}, FONTS.BODY_2, { - cursor: 'pointer', - paddingLeft: '8px', - flex: 1 - }) - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - RadioTextTag = _createThemeTag6[0], - themeText = _createThemeTag6[1]; - + var FONTS = _ref3.FONTS; + return { + root: _objectSpread({}, FONTS.BODY_2, { + cursor: 'pointer', + paddingLeft: '8px', + flex: 1 + }) + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + RadioTextTag = _createThemeTag6[0], + themeText = _createThemeTag6[1]; var _createThemeTag7 = createThemeTag("".concat(name, "Wrapper"), { - root: { - display: 'flex', - alignItems: 'center', - cursor: 'pointer' - } -}), - _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), - RadioWrapperTag = _createThemeTag8[0], - themeRadioWrapper = _createThemeTag8[1]; - + root: { + display: 'flex', + alignItems: 'center', + cursor: 'pointer' + } + }), + _createThemeTag8 = _slicedToArray(_createThemeTag7, 2), + RadioWrapperTag = _createThemeTag8[0], + themeRadioWrapper = _createThemeTag8[1]; var _createThemeTag9 = createThemeTag("".concat(name, "Button"), { - root: { - flex: 1, - '&:first-of-type > *': { - borderRightStyle: 'unset', - borderTopRightRadius: 0, - borderBottomRightRadius: 0 - }, - '&:last-child > *': { - borderLeftStyle: 'unset', - borderTopLeftRadius: 0, - borderBottomLeftRadius: 0 - }, - '&:not(:first-of-type):not(:last-child) > *': { - borderRadius: 0 + root: { + flex: 1, + '&:first-of-type > *': { + borderRightStyle: 'unset', + borderTopRightRadius: 0, + borderBottomRightRadius: 0 + }, + '&:last-child > *': { + borderLeftStyle: 'unset', + borderTopLeftRadius: 0, + borderBottomLeftRadius: 0 + }, + '&:not(:first-of-type):not(:last-child) > *': { + borderRadius: 0 + } } - } -}), - _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), - RadioButtonTag = _createThemeTag10[0], - themeRadioButton = _createThemeTag10[1]; - + }), + _createThemeTag10 = _slicedToArray(_createThemeTag9, 2), + RadioButtonTag = _createThemeTag10[0], + themeRadioButton = _createThemeTag10[1]; var _createThemeTag11 = createThemeTag(name, { - root: { - opacity: 0, - position: 'absolute' - } -}), - _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), - RadioTag = _createThemeTag12[0], - themeRadio = _createThemeTag12[1]; - + root: { + opacity: 0, + position: 'absolute' + } + }), + _createThemeTag12 = _slicedToArray(_createThemeTag11, 2), + RadioTag = _createThemeTag12[0], + themeRadio = _createThemeTag12[1]; var theme = _objectSpread({}, themeCircle, {}, themeCircleInner, {}, themeText, {}, themeRadioWrapper, {}, themeRadioButton, {}, themeRadio); - export { theme, RadioCircleTag, RadioTag, RadioWrapperTag, RadioCircleInnerTag, RadioButtonTag, RadioTextTag }; \ No newline at end of file diff --git a/es/components/Radio/RadioButton.js b/es/components/Radio/RadioButton.js index 5d4f7d01..621d7572 100644 --- a/es/components/Radio/RadioButton.js +++ b/es/components/Radio/RadioButton.js @@ -4,22 +4,20 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { useCallback } from 'react'; import { RadioTag, RadioButtonTag } from './Radio.theme'; import { Button } from '../Button'; - var RadioButton = function RadioButton(_ref) { var onChange = _ref.onChange, - value = _ref.value, - disabled = _ref.disabled, - selectedValue = _ref.selectedValue, - _ref$equalsFunc = _ref.equalsFunc, - equalsFunc = _ref$equalsFunc === void 0 ? function (_ref2) { - var selectedValue = _ref2.selectedValue, + value = _ref.value, + disabled = _ref.disabled, + selectedValue = _ref.selectedValue, + _ref$equalsFunc = _ref.equalsFunc, + equalsFunc = _ref$equalsFunc === void 0 ? function (_ref2) { + var selectedValue = _ref2.selectedValue, value = _ref2.value; - return selectedValue === value; - } : _ref$equalsFunc, - name = _ref.name, - label = _ref.label, - rest = _objectWithoutProperties(_ref, ["onChange", "value", "disabled", "selectedValue", "equalsFunc", "name", "label"]); - + return selectedValue === value; + } : _ref$equalsFunc, + name = _ref.name, + label = _ref.label, + rest = _objectWithoutProperties(_ref, ["onChange", "value", "disabled", "selectedValue", "equalsFunc", "name", "label"]); var handleChange = useCallback(function (event) { if (typeof onChange === 'function' && !disabled) { onChange(value, event); @@ -45,5 +43,4 @@ var RadioButton = function RadioButton(_ref) { checked: checked }), label)); }; - export { RadioButton }; \ No newline at end of file diff --git a/es/components/Radio/RadioGroup.js b/es/components/Radio/RadioGroup.js index f793b454..4df4b5ba 100644 --- a/es/components/Radio/RadioGroup.js +++ b/es/components/Radio/RadioGroup.js @@ -7,52 +7,38 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConst import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React, { PureComponent } from 'react'; import { FlexLayout } from '../FlexLayout'; import { RadioItem } from './RadioItem'; - -var RadioGroup = -/*#__PURE__*/ -function (_PureComponent) { +var RadioGroup = /*#__PURE__*/function (_PureComponent) { _inherits(RadioGroup, _PureComponent); - function RadioGroup() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, RadioGroup); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(RadioGroup)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.getGroupName = function () { var name = _this.props.name; return name || "radio-group-".concat(RadioGroup.instanceCounter); }; - _this.renderChildren = function () { var _this$props = _this.props, - options = _this$props.options, - children = _this$props.children; - + options = _this$props.options, + children = _this$props.children; if (!options) { return children; - } // $FlowFixMe - + } + // $FlowFixMe return options.map(function (_ref) { var value = _ref.value, - label = _ref.label, - disabled = _ref.disabled; + label = _ref.label, + disabled = _ref.disabled; return ___EmotionJSX(RadioItem, { key: value, label: label, @@ -61,10 +47,8 @@ function (_PureComponent) { }); }); }; - return _this; } - _createClass(RadioGroup, [{ key: "UNSAFE_componentWillMount", value: function UNSAFE_componentWillMount() { @@ -74,18 +58,16 @@ function (_PureComponent) { key: "render", value: function render() { var _this2 = this; - var _this$props2 = this.props, - children = _this$props2.children, - value = _this$props2.value, - direction = _this$props2.direction, - gap = _this$props2.gap, - onChange = _this$props2.onChange, - hasError = _this$props2.hasError, - disabled = _this$props2.disabled, - stretch = _this$props2.stretch, - rest = _objectWithoutProperties(_this$props2, ["children", "value", "direction", "gap", "onChange", "hasError", "disabled", "stretch"]); - + children = _this$props2.children, + value = _this$props2.value, + direction = _this$props2.direction, + gap = _this$props2.gap, + onChange = _this$props2.onChange, + hasError = _this$props2.hasError, + disabled = _this$props2.disabled, + stretch = _this$props2.stretch, + rest = _objectWithoutProperties(_this$props2, ["children", "value", "direction", "gap", "onChange", "hasError", "disabled", "stretch"]); return ___EmotionJSX(FlexLayout, _extends({}, rest, { direction: direction, gap: gap, @@ -103,10 +85,8 @@ function (_PureComponent) { })); } }]); - return RadioGroup; }(PureComponent); - RadioGroup.instanceCounter = 0; RadioGroup.defaultProps = { direction: 'column', diff --git a/es/components/Radio/RadioItem.js b/es/components/Radio/RadioItem.js index 50811aab..39849561 100644 --- a/es/components/Radio/RadioItem.js +++ b/es/components/Radio/RadioItem.js @@ -8,49 +8,37 @@ import _inherits from "@babel/runtime/helpers/esm/inherits"; import { jsx as ___EmotionJSX } from "@emotion/core"; import React, { PureComponent } from 'react'; import { RadioCircleTag, RadioTag, RadioWrapperTag, RadioCircleInnerTag, RadioTextTag } from './Radio.theme'; - -var RadioItem = -/*#__PURE__*/ -function (_PureComponent) { +var RadioItem = /*#__PURE__*/function (_PureComponent) { _inherits(RadioItem, _PureComponent); - function RadioItem() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, RadioItem); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(RadioItem)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.onChange = function (event) { var _this$props = _this.props, - onChange = _this$props.onChange, - value = _this$props.value, - disabled = _this$props.disabled; + onChange = _this$props.onChange, + value = _this$props.value, + disabled = _this$props.disabled; onChange && !disabled && onChange(value, event); }; - return _this; } - _createClass(RadioItem, [{ key: "render", value: function render() { var _this$props2 = this.props, - name = _this$props2.name, - label = _this$props2.label, - value = _this$props2.value, - selectedValue = _this$props2.selectedValue, - equalsFunc = _this$props2.equalsFunc, - onChange = _this$props2.onChange, - children = _this$props2.children, - rest = _objectWithoutProperties(_this$props2, ["name", "label", "value", "selectedValue", "equalsFunc", "onChange", "children"]); - + name = _this$props2.name, + label = _this$props2.label, + value = _this$props2.value, + selectedValue = _this$props2.selectedValue, + equalsFunc = _this$props2.equalsFunc, + onChange = _this$props2.onChange, + children = _this$props2.children, + rest = _objectWithoutProperties(_this$props2, ["name", "label", "value", "selectedValue", "equalsFunc", "onChange", "children"]); var hasLabel = !!label; var checked = value !== undefined && equalsFunc && equalsFunc({ selectedValue: selectedValue, @@ -82,15 +70,13 @@ function (_PureComponent) { }, label) : null]); } }]); - return RadioItem; }(PureComponent); - RadioItem.defaultProps = { color: 'primary', equalsFunc: function equalsFunc(_ref) { var selectedValue = _ref.selectedValue, - value = _ref.value; + value = _ref.value; return selectedValue === value; } }; diff --git a/es/components/RadioGroupField/RadioGroupField.js b/es/components/RadioGroupField/RadioGroupField.js index 1bcf4b7c..72eca7a0 100644 --- a/es/components/RadioGroupField/RadioGroupField.js +++ b/es/components/RadioGroupField/RadioGroupField.js @@ -5,27 +5,25 @@ import React from 'react'; import * as formUtils from '../../utils/forms'; import { Radio } from '../Radio'; import { FormField } from '../Form/FormField'; - var RadioGroupField = function RadioGroupField(_ref) { var children = _ref.children, - direction = _ref.direction, - gap = _ref.gap, - hideErrorLabel = _ref.hideErrorLabel, - input = _ref.input, - meta = _ref.meta, - options = _ref.options, - disabled = _ref.disabled, - stretch = _ref.stretch, - justifyContent = _ref.justifyContent, - alignContent = _ref.alignContent, - alignItems = _ref.alignItems, - flexWrap = _ref.flexWrap, - showErrorOnTouched = _ref.showErrorOnTouched, - rest = _objectWithoutProperties(_ref, ["children", "direction", "gap", "hideErrorLabel", "input", "meta", "options", "disabled", "stretch", "justifyContent", "alignContent", "alignItems", "flexWrap", "showErrorOnTouched"]); - + direction = _ref.direction, + gap = _ref.gap, + hideErrorLabel = _ref.hideErrorLabel, + input = _ref.input, + meta = _ref.meta, + options = _ref.options, + disabled = _ref.disabled, + stretch = _ref.stretch, + justifyContent = _ref.justifyContent, + alignContent = _ref.alignContent, + alignItems = _ref.alignItems, + flexWrap = _ref.flexWrap, + showErrorOnTouched = _ref.showErrorOnTouched, + rest = _objectWithoutProperties(_ref, ["children", "direction", "gap", "hideErrorLabel", "input", "meta", "options", "disabled", "stretch", "justifyContent", "alignContent", "alignItems", "flexWrap", "showErrorOnTouched"]); var name = input.name, - value = input.value, - onChange = input.onChange; + value = input.value, + onChange = input.onChange; var hasError = formUtils.hasError(meta, showErrorOnTouched); return ___EmotionJSX(FormField, _extends({}, rest, { hideErrorLabel: hideErrorLabel, @@ -48,7 +46,6 @@ var RadioGroupField = function RadioGroupField(_ref) { flexWrap: flexWrap }, children)); }; - RadioGroupField.defaultProps = { showErrorOnTouched: true }; diff --git a/es/components/RadioGroupField/RadioGroupField.test.js b/es/components/RadioGroupField/RadioGroupField.test.js index 56889943..18391575 100644 --- a/es/components/RadioGroupField/RadioGroupField.test.js +++ b/es/components/RadioGroupField/RadioGroupField.test.js @@ -24,11 +24,9 @@ describe('', function () { input: input, options: options })); - var _wrapper$find$props = wrapper.find('FormField').props(), - children = _wrapper$find$props.children, - formFieldPassedProps = _objectWithoutProperties(_wrapper$find$props, ["children"]); - + children = _wrapper$find$props.children, + formFieldPassedProps = _objectWithoutProperties(_wrapper$find$props, ["children"]); expect(formFieldPassedProps).toEqual({ direction: 'column', hideErrorLabel: false, diff --git a/es/components/Scrollable/Scrollable.js b/es/components/Scrollable/Scrollable.js index dbc0379d..60e8747d 100644 --- a/es/components/Scrollable/Scrollable.js +++ b/es/components/Scrollable/Scrollable.js @@ -3,11 +3,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { ScrollableWrapper, ScrollableContent } from './Scrollable.theme'; - function Scrollable(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(ScrollableWrapper, _extends({}, rest, { tagName: "div" }), ___EmotionJSX(ScrollableContent, { @@ -15,5 +13,4 @@ function Scrollable(_ref) { tagName: "div" }, children)); } - export { Scrollable }; \ No newline at end of file diff --git a/es/components/Scrollable/Scrollable.theme.js b/es/components/Scrollable/Scrollable.theme.js index bc26ee48..716ee5b6 100644 --- a/es/components/Scrollable/Scrollable.theme.js +++ b/es/components/Scrollable/Scrollable.theme.js @@ -1,33 +1,26 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'scrollable'; - var _createThemeTag = createThemeTag(name, { - root: { - width: '100%', - height: '100%', - overflowY: 'auto' - } -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - ScrollableWrapper = _createThemeTag2[0], - themeWrapper = _createThemeTag2[1]; - + root: { + width: '100%', + height: '100%', + overflowY: 'auto' + } + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + ScrollableWrapper = _createThemeTag2[0], + themeWrapper = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Content"), { - root: { - height: '100%' - } -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - ScrollableContent = _createThemeTag4[0], - themeContent = _createThemeTag4[1]; - + root: { + height: '100%' + } + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + ScrollableContent = _createThemeTag4[0], + themeContent = _createThemeTag4[1]; var theme = _objectSpread({}, themeWrapper, {}, themeContent); - export { theme, ScrollableWrapper, ScrollableContent }; \ No newline at end of file diff --git a/es/components/SecondaryNavigation/SecondaryNavigation.js b/es/components/SecondaryNavigation/SecondaryNavigation.js index d50d9900..b7c088f9 100644 --- a/es/components/SecondaryNavigation/SecondaryNavigation.js +++ b/es/components/SecondaryNavigation/SecondaryNavigation.js @@ -4,16 +4,13 @@ import { jsx as ___EmotionJSX } from "@emotion/core"; import React from 'react'; import { SecondaryNavigationTag } from './SecondaryNavigation.theme'; import { SecondaryNavigationItem } from './SecondaryNavigationItem'; - var SecondaryNavigation = function SecondaryNavigation(_ref) { var children = _ref.children, - rest = _objectWithoutProperties(_ref, ["children"]); - + rest = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(SecondaryNavigationTag, _extends({}, rest, { tagName: "nav" }), children); }; - SecondaryNavigation.displayName = 'SecondaryNavigation'; SecondaryNavigation.Item = SecondaryNavigationItem; export { SecondaryNavigation }; \ No newline at end of file diff --git a/es/components/SecondaryNavigation/SecondaryNavigation.theme.js b/es/components/SecondaryNavigation/SecondaryNavigation.theme.js index 750710af..8da4d6dc 100644 --- a/es/components/SecondaryNavigation/SecondaryNavigation.theme.js +++ b/es/components/SecondaryNavigation/SecondaryNavigation.theme.js @@ -1,30 +1,24 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; import { theme as secondaryNavigationItemTheme } from './SecondaryNavigationItem'; var name = 'secondaryNavigation'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var COLORS = _ref.COLORS; - return { - root: { - display: 'flex', - flexDirection: 'column', - height: '100%', - width: 'auto', - backgroundColor: COLORS.GRAY_10 - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - SecondaryNavigationTag = _createThemeTag2[0], - secondaryNavigationTheme = _createThemeTag2[1]; - + var COLORS = _ref.COLORS; + return { + root: { + display: 'flex', + flexDirection: 'column', + height: '100%', + width: 'auto', + backgroundColor: COLORS.GRAY_10 + } + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + SecondaryNavigationTag = _createThemeTag2[0], + secondaryNavigationTheme = _createThemeTag2[1]; var theme = _objectSpread({}, secondaryNavigationTheme, {}, secondaryNavigationItemTheme); - export { theme, SecondaryNavigationTag }; \ No newline at end of file diff --git a/es/components/SecondaryNavigation/SecondaryNavigationItem.js b/es/components/SecondaryNavigation/SecondaryNavigationItem.js index 248b259d..14809e1a 100644 --- a/es/components/SecondaryNavigation/SecondaryNavigationItem.js +++ b/es/components/SecondaryNavigation/SecondaryNavigationItem.js @@ -11,84 +11,64 @@ import { Dropdown } from '../Dropdown'; import { Menu } from '../Menu'; import { Icon } from '../Icon'; import { SecondaryNavigationItemTag, SecondaryNavigationItemLabelTag, SecondaryNavigationItemActionsTag } from './SecondaryNavigationItem.theme'; - -var SecondaryNavigationItem = -/*#__PURE__*/ -function (_React$PureComponent) { +var SecondaryNavigationItem = /*#__PURE__*/function (_React$PureComponent) { _inherits(SecondaryNavigationItem, _React$PureComponent); - function SecondaryNavigationItem() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, SecondaryNavigationItem); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SecondaryNavigationItem)).call.apply(_getPrototypeOf2, [this].concat(args))); _this.state = { openedActions: false, hovered: false }; - _this.openActions = function () { _this.setState({ openedActions: true }); }; - _this.closeActions = function () { _this.setState({ openedActions: false }); }; - _this.onMouseLeave = function () { _this.setState({ hovered: false }); - var active = _this.props.active; - if (!active) { _this.closeActions(); } }; - _this.onMouseEnter = function () { _this.setState({ hovered: true }); }; - _this.createOnMenuItemClick = function (onClick) { return function (event) { event.stopPropagation(); onClick(event); - _this.closeActions(); }; }; - return _this; } - _createClass(SecondaryNavigationItem, [{ key: "render", value: function render() { var _this2 = this; - var _this$props = this.props, - label = _this$props.label, - actions = _this$props.actions, - rest = _objectWithoutProperties(_this$props, ["label", "actions"]); - + label = _this$props.label, + actions = _this$props.actions, + rest = _objectWithoutProperties(_this$props, ["label", "actions"]); var _this$state = this.state, - openedActions = _this$state.openedActions, - hovered = _this$state.hovered; + openedActions = _this$state.openedActions, + hovered = _this$state.hovered; var finalActions = typeof actions === 'function' ? actions(this.closeActions) : actions; return ___EmotionJSX(SecondaryNavigationItemTag, _extends({}, rest, { hovered: hovered, @@ -112,9 +92,8 @@ function (_React$PureComponent) { withPortal: true }, ___EmotionJSX(Menu, null, finalActions.map(function (_ref) { var label = _ref.label, - onClick = _ref.onClick, - rest = _objectWithoutProperties(_ref, ["label", "onClick"]); - + onClick = _ref.onClick, + rest = _objectWithoutProperties(_ref, ["label", "onClick"]); return ___EmotionJSX(Menu.Item, _extends({ key: label, onClick: _this2.createOnMenuItemClick(onClick) @@ -122,9 +101,7 @@ function (_React$PureComponent) { })))))); } }]); - return SecondaryNavigationItem; }(React.PureComponent); - export { SecondaryNavigationItem }; export { theme } from './SecondaryNavigationItem.theme'; \ No newline at end of file diff --git a/es/components/SecondaryNavigation/SecondaryNavigationItem.theme.js b/es/components/SecondaryNavigation/SecondaryNavigationItem.theme.js index 7d3ee66d..ad97bb97 100644 --- a/es/components/SecondaryNavigation/SecondaryNavigationItem.theme.js +++ b/es/components/SecondaryNavigation/SecondaryNavigationItem.theme.js @@ -1,82 +1,73 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import { createThemeTag } from '../../theme/createThemeTag'; var name = 'secondaryNavigationItem'; - var _createThemeTag = createThemeTag(name, function (_ref) { - var _root; - - var COLORS = _ref.COLORS; - return { - root: (_root = { - height: 28, - display: 'flex', - backgroundColor: 'inherit', - textDecoration: 'none', - userSelect: 'none', - position: 'relative', - paddingLeft: 4, - paddingRight: 20, - justifyContent: 'space-between', - alignItems: 'center' - }, _defineProperty(_root, "&.active ".concat(SecondaryNavigationItemActionsTag), { - visibility: 'visible' - }), _defineProperty(_root, '&.active', { - backgroundColor: COLORS.WHITE, - paddingLeft: 0, - borderLeft: "4px solid ".concat(COLORS.GRAY_70) - }), _root), - modifiers: { - hovered: _defineProperty({ - backgroundColor: COLORS.WHITE - }, "& ".concat(SecondaryNavigationItemActionsTag), { + var _root; + var COLORS = _ref.COLORS; + return { + root: (_root = { + height: 28, + display: 'flex', + backgroundColor: 'inherit', + textDecoration: 'none', + userSelect: 'none', + position: 'relative', + paddingLeft: 4, + paddingRight: 20, + justifyContent: 'space-between', + alignItems: 'center' + }, _defineProperty(_root, "&.active ".concat(SecondaryNavigationItemActionsTag), { visibility: 'visible' - }) - } - }; -}), - _createThemeTag2 = _slicedToArray(_createThemeTag, 2), - SecondaryNavigationItemTag = _createThemeTag2[0], - rootTheme = _createThemeTag2[1]; - + }), _defineProperty(_root, '&.active', { + backgroundColor: COLORS.WHITE, + paddingLeft: 0, + borderLeft: "4px solid ".concat(COLORS.GRAY_70) + }), _root), + modifiers: { + hovered: _defineProperty({ + backgroundColor: COLORS.WHITE + }, "& ".concat(SecondaryNavigationItemActionsTag), { + visibility: 'visible' + }) + } + }; + }), + _createThemeTag2 = _slicedToArray(_createThemeTag, 2), + SecondaryNavigationItemTag = _createThemeTag2[0], + rootTheme = _createThemeTag2[1]; var _createThemeTag3 = createThemeTag("".concat(name, "Label"), function (_ref2) { - var FONTS = _ref2.FONTS; - return { - root: _objectSpread({ - paddingLeft: '20px', - backgroundColor: 'inherit', - opacity: '0.9', - whiteSpace: 'nowrap', - overflow: 'hidden', - textOverflow: 'ellipsis', - minWidth: 0, - marginRight: 8 - }, FONTS.BODY_1) - }; -}), - _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), - SecondaryNavigationItemLabelTag = _createThemeTag4[0], - labelTheme = _createThemeTag4[1]; - + var FONTS = _ref2.FONTS; + return { + root: _objectSpread({ + paddingLeft: '20px', + backgroundColor: 'inherit', + opacity: '0.9', + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + minWidth: 0, + marginRight: 8 + }, FONTS.BODY_1) + }; + }), + _createThemeTag4 = _slicedToArray(_createThemeTag3, 2), + SecondaryNavigationItemLabelTag = _createThemeTag4[0], + labelTheme = _createThemeTag4[1]; var _createThemeTag5 = createThemeTag("".concat(name, "Actions"), function () { - return { - root: { - display: 'flex', - alignItems: 'center', - position: 'relative', - visibility: 'hidden' - } - }; -}), - _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), - SecondaryNavigationItemActionsTag = _createThemeTag6[0], - actionsTheme = _createThemeTag6[1]; - + return { + root: { + display: 'flex', + alignItems: 'center', + position: 'relative', + visibility: 'hidden' + } + }; + }), + _createThemeTag6 = _slicedToArray(_createThemeTag5, 2), + SecondaryNavigationItemActionsTag = _createThemeTag6[0], + actionsTheme = _createThemeTag6[1]; var theme = _objectSpread({}, rootTheme, {}, labelTheme, {}, actionsTheme); - export { theme, SecondaryNavigationItemTag, SecondaryNavigationItemLabelTag, SecondaryNavigationItemActionsTag }; \ No newline at end of file diff --git a/es/components/Select/Select.js b/es/components/Select/Select.js index eb36cc11..d1802fda 100644 --- a/es/components/Select/Select.js +++ b/es/components/Select/Select.js @@ -5,32 +5,43 @@ import _createClass from "@babel/runtime/helpers/esm/createClass"; import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; +import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral"; import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import { jsx as ___EmotionJSX } from "@emotion/core"; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - +function _templateObject2() { + var data = _taggedTemplateLiteral(["display: flex; align-items: center;"]); + _templateObject2 = function _templateObject2() { + return data; + }; + return data; +} +function _templateObject() { + var data = _taggedTemplateLiteral(["display: flex; align-items: center; height: 14px;"]); + _templateObject = function _templateObject() { + return data; + }; + return data; +} +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } import React from 'react'; import ReactSelect, { components } from 'react-select'; import CreatableSelect from 'react-select/creatable'; -import { withTheme } from 'emotion-theming'; -import { css } from '@emotion/core'; +import { withTheme } from '@emotion/react'; +import { css } from '@emotion/react'; import color from 'color'; import { SelectTag } from './Select.theme'; import { COLORS, Z_INDEX } from '../../theme'; import { Tooltip } from '../Tooltip'; - -var customStyles = function customStyles(_ref3) { - var hasError = _ref3.hasError, - _ref3$zIndex = _ref3.zIndex, - zIndex = _ref3$zIndex === void 0 ? Z_INDEX.DROPDOWN : _ref3$zIndex, - COLORS = _ref3.COLORS; +var customStyles = function customStyles(_ref) { + var hasError = _ref.hasError, + _ref$zIndex = _ref.zIndex, + zIndex = _ref$zIndex === void 0 ? Z_INDEX.DROPDOWN : _ref$zIndex, + COLORS = _ref.COLORS; return { - control: function control(style, _ref4) { - var isFocused = _ref4.isFocused, - isDisabled = _ref4.isDisabled; + control: function control(style, _ref2) { + var isFocused = _ref2.isFocused, + isDisabled = _ref2.isDisabled; return _objectSpread({}, style, { minHeight: '36px', backgroundColor: isDisabled ? COLORS.DISABLED_COLOR : COLORS.WHITE, @@ -93,10 +104,10 @@ var customStyles = function customStyles(_ref3) { padding: '0 8px' }); }, - option: function option(style, _ref5) { - var isFocused = _ref5.isFocused, - isDisabled = _ref5.isDisabled, - isSelected = _ref5.isSelected; + option: function option(style, _ref3) { + var isFocused = _ref3.isFocused, + isDisabled = _ref3.isDisabled, + isSelected = _ref3.isSelected; return _objectSpread({}, style, { textOverflow: 'ellipsis', overflow: 'hidden', @@ -109,39 +120,18 @@ var customStyles = function customStyles(_ref3) { } }; }; - -var _ref = process.env.NODE_ENV === "production" ? { - name: "p3cqjb", - styles: "display:flex;align-items:center;height:14px;" -} : { - name: "p3cqjb", - styles: "display:flex;align-items:center;height:14px;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1NlbGVjdC9TZWxlY3QuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUl1QyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQGZsb3dcblxuaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBSZWFjdFNlbGVjdCwgeyBjb21wb25lbnRzIH0gZnJvbSAncmVhY3Qtc2VsZWN0JztcbmltcG9ydCBDcmVhdGFibGVTZWxlY3QgZnJvbSAncmVhY3Qtc2VsZWN0L2NyZWF0YWJsZSc7XG5pbXBvcnQgeyB3aXRoVGhlbWUgfSBmcm9tICdlbW90aW9uLXRoZW1pbmcnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSc7XG5pbXBvcnQgeyB0eXBlIFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi91dGlscyc7XG5pbXBvcnQgY29sb3IgZnJvbSAnY29sb3InO1xuXG5pbXBvcnQgeyBTZWxlY3RUYWcgfSBmcm9tICcuL1NlbGVj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pbHRlck9wdGlvbiB9XG4gICAgICAgICAgZ2V0T3B0aW9uVmFsdWU9eyBnZXRPcHRpb25WYWx1ZSB9XG4gICAgICAgICAgZ2V0T3B0aW9uTGFiZWw9eyBnZXRPcHRpb25MYWJlbCB9XG4gICAgICAgICAgaXNTZWFyY2hhYmxlPXsgaXNTZWFyY2hhYmxlIH1cbiAgICAgICAgLz5cbiAgICAgIDwvU2VsZWN0VGFnPlxuICAgICk7XG4gIH1cbn1cblxuU2VsZWN0ID0gd2l0aFRoZW1lKFNlbGVjdCk7XG5cbmV4cG9ydCB7IFNlbGVjdCB9O1xuIl19 */" -}; - var MultiValueRemove = function MultiValueRemove(props) { return ___EmotionJSX(Tooltip, { message: "Remove", - css: _ref + css: css(_templateObject()) }, ___EmotionJSX(components.MultiValueRemove, props)); }; - -var _ref2 = process.env.NODE_ENV === "production" ? { - name: "70qvj9", - styles: "display:flex;align-items:center;" -} : { - name: "70qvj9", - styles: "display:flex;align-items:center;", - map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1NlbGVjdC9TZWxlY3QuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkkyQyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQGZsb3dcblxuaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBSZWFjdFNlbGVjdCwgeyBjb21wb25lbnRzIH0gZnJvbSAncmVhY3Qtc2VsZWN0JztcbmltcG9ydCBDcmVhdGFibGVTZWxlY3QgZnJvbSAncmVhY3Qtc2VsZWN0L2NyZWF0YWJsZSc7XG5pbXBvcnQgeyB3aXRoVGhlbWUgfSBmcm9tICdlbW90aW9uLXRoZW1pbmcnO1xuaW1wb3J0IHsgY3NzIH0g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W9uTGFiZWwgfVxuICAgICAgICAgIGlucHV0VmFsdWU9eyBpbnB1dFZhbHVlIH1cbiAgICAgICAgICBvbklucHV0Q2hhbmdlPXsgb25JbnB1dENoYW5nZSB9XG4gICAgICAgICAgbWVudUlzT3Blbj17IG1lbnVJc09wZW4gfVxuICAgICAgICAgIGZpbHRlck9wdGlvbj17IGZpbHRlck9wdGlvbiB9XG4gICAgICAgICAgZ2V0T3B0aW9uVmFsdWU9eyBnZXRPcHRpb25WYWx1ZSB9XG4gICAgICAgICAgZ2V0T3B0aW9uTGFiZWw9eyBnZXRPcHRpb25MYWJlbCB9XG4gICAgICAgICAgaXNTZWFyY2hhYmxlPXsgaXNTZWFyY2hhYmxlIH1cbiAgICAgICAgLz5cbiAgICAgIDwvU2VsZWN0VGFnPlxuICAgICk7XG4gIH1cbn1cblxuU2VsZWN0ID0gd2l0aFRoZW1lKFNlbGVjdCk7XG5cbmV4cG9ydCB7IFNlbGVjdCB9O1xuIl19 */" -}; - var ClearIndicator = function ClearIndicator(props) { return ___EmotionJSX(Tooltip, { message: "Remove All", - css: _ref2 + css: css(_templateObject2()) }, ___EmotionJSX(components.ClearIndicator, props)); }; - var getCreatableOptionByValue = function getCreatableOptionByValue(value) { if (Array.isArray(value)) { return value.map(function (valueItem) { @@ -154,14 +144,12 @@ var getCreatableOptionByValue = function getCreatableOptionByValue(value) { }; } }; - var getOptionByValue = function getOptionByValue(value, options) { if (Array.isArray(value)) { return value.map(function (valueItem) { return getOptionByValue(valueItem, options); }); } - var foundOption = options.reduce(function (result, option) { if (result === null) { if (option.value === value) { @@ -170,78 +158,63 @@ var getOptionByValue = function getOptionByValue(value, options) { return getOptionByValue(value, option.options); } } - return result; }, null); return foundOption; }; - -var Select = -/*#__PURE__*/ -function (_React$Component) { +var Select = /*#__PURE__*/function (_React$Component) { _inherits(Select, _React$Component); - function Select() { var _getPrototypeOf2; - var _this; - _classCallCheck(this, Select); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Select)).call.apply(_getPrototypeOf2, [this].concat(args))); - _this.onChange = function (option) { var isMulti = _this.props.isMulti; var value = null; - if (Array.isArray(option) || isMulti) { - value = (option || []).map(function (_ref6) { - var value = _ref6.value; + value = (option || []).map(function (_ref4) { + var value = _ref4.value; return value; }); } else if (option) { value = option.value; } - _this.props.onChange(value); }; - return _this; } - _createClass(Select, [{ key: "render", value: function render() { var _this$props = this.props, - value = _this$props.value, - loading = _this$props.loading, - clearable = _this$props.clearable, - disabled = _this$props.disabled, - multiple = _this$props.multiple, - isMulti = _this$props.isMulti, - options = _this$props.options, - placeholder = _this$props.placeholder, - valueComponent = _this$props.valueComponent, - components = _this$props.components, - onChange = _this$props.onChange, - withPortal = _this$props.withPortal, - theme = _this$props.theme, - formatOptionLabel = _this$props.formatOptionLabel, - inputValue = _this$props.inputValue, - onInputChange = _this$props.onInputChange, - menuIsOpen = _this$props.menuIsOpen, - autoFocus = _this$props.autoFocus, - filterOption = _this$props.filterOption, - getOptionValue = _this$props.getOptionValue, - getOptionLabel = _this$props.getOptionLabel, - isSearchable = _this$props.isSearchable, - creatable = _this$props.creatable, - rest = _objectWithoutProperties(_this$props, ["value", "loading", "clearable", "disabled", "multiple", "isMulti", "options", "placeholder", "valueComponent", "components", "onChange", "withPortal", "theme", "formatOptionLabel", "inputValue", "onInputChange", "menuIsOpen", "autoFocus", "filterOption", "getOptionValue", "getOptionLabel", "isSearchable", "creatable"]); - + value = _this$props.value, + loading = _this$props.loading, + clearable = _this$props.clearable, + disabled = _this$props.disabled, + multiple = _this$props.multiple, + isMulti = _this$props.isMulti, + options = _this$props.options, + placeholder = _this$props.placeholder, + valueComponent = _this$props.valueComponent, + components = _this$props.components, + onChange = _this$props.onChange, + withPortal = _this$props.withPortal, + theme = _this$props.theme, + formatOptionLabel = _this$props.formatOptionLabel, + inputValue = _this$props.inputValue, + onInputChange = _this$props.onInputChange, + menuIsOpen = _this$props.menuIsOpen, + autoFocus = _this$props.autoFocus, + filterOption = _this$props.filterOption, + getOptionValue = _this$props.getOptionValue, + getOptionLabel = _this$props.getOptionLabel, + isSearchable = _this$props.isSearchable, + creatable = _this$props.creatable, + rest = _objectWithoutProperties(_this$props, ["value", "loading", "clearable", "disabled", "multiple", "isMulti", "options", "placeholder", "valueComponent", "components", "onChange", "withPortal", "theme", "formatOptionLabel", "inputValue", "onInputChange", "menuIsOpen", "autoFocus", "filterOption", "getOptionValue", "getOptionLabel", "isSearchable", "creatable"]); var selectValue = creatable ? getCreatableOptionByValue(value) : getOptionByValue(value, options || []); var SelectComponent = creatable ? CreatableSelect : ReactSelect; return ___EmotionJSX(SelectTag, _extends({}, rest, { @@ -277,10 +250,8 @@ function (_React$Component) { })); } }]); - return Select; }(React.Component); - Select.components = components; Select.defaultProps = { withPortal: true, diff --git a/es/components/Select/Select.js.flow b/es/components/Select/Select.js.flow index d92fd034..26f339ab 100644 --- a/es/components/Select/Select.js.flow +++ b/es/components/Select/Select.js.flow @@ -3,8 +3,8 @@ import React from 'react'; import ReactSelect, { components } from 'react-select'; import CreatableSelect from 'react-select/creatable'; -import { withTheme } from 'emotion-theming'; -import { css } from '@emotion/core'; +import { withTheme } from '@emotion/react'; +import { css } from '@emotion/react'; import { type SerializedStyles } from '@emotion/utils'; import color from 'color'; diff --git a/es/components/Select/Select.stories.js b/es/components/Select/Select.stories.js index b2907de2..7da1b0ff 100644 --- a/es/components/Select/Select.stories.js +++ b/es/components/Select/Select.stories.js @@ -69,8 +69,7 @@ export var common = function common() { components: { MultiValueLabel: function MultiValueLabel(_ref) { var children = _ref.children, - props = _objectWithoutProperties(_ref, ["children"]); - + props = _objectWithoutProperties(_ref, ["children"]); return ___EmotionJSX(Select.components.MultiValueLabel, props, ___EmotionJSX(Row, null, ___EmotionJSX(Icon, { name: "Table", size: "sm" diff --git a/es/components/Select/Select.test.js b/es/components/Select/Select.test.js index 074c453d..918d5f47 100644 --- a/es/components/Select/Select.test.js +++ b/es/components/Select/Select.test.js @@ -31,18 +31,15 @@ describe('