travelcircus-styleguide 1.1.21 → 1.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/dist/components/Button.js +0 -97
  3. package/dist/components/EmptyState/EmptyState.js +0 -35
  4. package/dist/components/EmptyState/index.js +0 -13
  5. package/dist/components/FlatButton.js +0 -153
  6. package/dist/components/FlatInput.js +0 -75
  7. package/dist/components/IconChecker/IconChecker.js +0 -62
  8. package/dist/components/IconChecker/images.js +0 -8
  9. package/dist/components/IconChecker/index.js +0 -15
  10. package/dist/components/RoundedButton.js +0 -191
  11. package/dist/components/RoundedInput.js +0 -94
  12. package/dist/components/RoundedTextarea.js +0 -80
  13. package/dist/components/Stepper/Stepper.js +0 -43
  14. package/dist/components/Stepper/StepperElements.js +0 -91
  15. package/dist/components/Stepper/index.js +0 -15
  16. package/dist/components/Switch.js +0 -90
  17. package/dist/components/UnderlinedHeading/UnderlinedHeading.js +0 -56
  18. package/dist/components/UnderlinedHeading/UnderlinedHeadingElements.js +0 -66
  19. package/dist/components/UnderlinedHeading/index.js +0 -29
  20. package/dist/components/basic/Box.js +0 -22
  21. package/dist/components/basic/Button.js +0 -55
  22. package/dist/components/basic/Card.js +0 -36
  23. package/dist/components/basic/Flex.js +0 -38
  24. package/dist/components/basic/Icon.js +0 -62
  25. package/dist/components/basic/Input.js +0 -38
  26. package/dist/components/basic/PositionBox.js +0 -22
  27. package/dist/components/basic/Text.js +0 -150
  28. package/dist/components/index.js +0 -203
  29. package/dist/icons.js +0 -9
  30. package/dist/index.js +0 -79
  31. package/dist/theme/ThemeProvider.js +0 -94
  32. package/dist/theme/browser.js +0 -49
  33. package/dist/theme/button.js +0 -221
  34. package/dist/theme/colors.js +0 -174
  35. package/dist/theme/flatButton.js +0 -163
  36. package/dist/theme/flatInput.js +0 -91
  37. package/dist/theme/index.js +0 -59
  38. package/dist/theme/media.js +0 -49
  39. package/dist/theme/roundedButton.js +0 -234
  40. package/dist/theme/roundedInput.js +0 -93
  41. package/dist/theme/roundedTextarea.js +0 -81
  42. package/dist/theme/theme.js +0 -89
  43. package/dist/utils/number.js +0 -35
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "travelcircus-styleguide",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "Components Styleguide for a TravelCircus web services",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,97 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ButtonRouter = exports.ButtonBlock = exports.ButtonLink = exports.default = exports.Button = exports.ButtonVariant = void 0;
7
-
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _reactRouterDom = require("react-router-dom");
11
-
12
- var _button = require("../theme/button");
13
-
14
- var _Button = require("./basic/Button");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _templateObject2() {
19
- var data = _taggedTemplateLiteral([""]);
20
-
21
- _templateObject2 = function _templateObject2() {
22
- return data;
23
- };
24
-
25
- return data;
26
- }
27
-
28
- function _templateObject() {
29
- var data = _taggedTemplateLiteral([""]);
30
-
31
- _templateObject = function _templateObject() {
32
- return data;
33
- };
34
-
35
- return data;
36
- }
37
-
38
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
39
-
40
- 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; }
41
-
42
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
43
-
44
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
45
-
46
- var ButtonVariant = {
47
- PRIMARY: "primary",
48
- PRIMARY_ACCENT: "primaryAccent",
49
- PRIMARY_ACTIVE: "primaryActive",
50
- PRIMARY_SMALL: "primarySmall",
51
- PRIMARY_SMALL_ACTIVE: "primarySmallActive",
52
- PRIMARY_LONG: "primaryLong",
53
- PRIMARY_LONG_ACCENT: "primaryLongAccent",
54
- SECONDARY: "secondary",
55
- SECONDARY_SMALL: "secondarySmall",
56
- PRIMARY_TEXT: "primaryText",
57
- PRIMARY_TEXT_ACCENT: "primaryTextAccent",
58
- PRIMARY_ACCENT_DEFAULT: "primaryAccentDefault"
59
- };
60
- exports.ButtonVariant = ButtonVariant;
61
- var defaultProps = {
62
- variant: ButtonVariant.PRIMARY
63
- };
64
- /* ================================================== *
65
- * Button (pure HTML button)
66
- * ================================================== */
67
-
68
- var Button = (0, _styledComponents.default)(_Button.Button)(_button.commonStyle, _button.variants);
69
- exports.default = exports.Button = Button;
70
- Button.displayName = "Button";
71
- Button.defaultProps = _objectSpread({}, defaultProps);
72
- /* ================================================== *
73
- * <a> styled as a Button (HTML anchor)
74
- * ================================================== */
75
-
76
- var ButtonLink = (0, _styledComponents.default)(Button).attrs({
77
- as: "a"
78
- })(_templateObject());
79
- exports.ButtonLink = ButtonLink;
80
- ButtonLink.displayName = "ButtonLink";
81
- /* ================================================== *
82
- * <div> styled as a Button (non-W3C compliant)
83
- * ================================================== */
84
-
85
- var ButtonBlock = (0, _styledComponents.default)(Button).attrs({
86
- as: "div"
87
- })(_templateObject2());
88
- exports.ButtonBlock = ButtonBlock;
89
- ButtonBlock.displayName = "ButtonBlock";
90
- /* ================================================== *
91
- * React Router Link component styled as a Button
92
- * ================================================== */
93
-
94
- var ButtonRouter = (0, _styledComponents.default)(_reactRouterDom.Link)(_objectSpread(_objectSpread({}, _Button.style), _button.commonStyle), _button.variants);
95
- exports.ButtonRouter = ButtonRouter;
96
- ButtonRouter.displayName = "ButtonRouter";
97
- ButtonRouter.defaultProps = _objectSpread({}, defaultProps);
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.EmptyState = void 0;
9
-
10
- var React = _interopRequireWildcard(require("react"));
11
-
12
- var _components = require("../../components");
13
-
14
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
15
-
16
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
18
- var EmptyState = function EmptyState() {
19
- return /*#__PURE__*/React.createElement(_components.Box, null, /*#__PURE__*/React.createElement(_components.Text, {
20
- as: "h1",
21
- textAlign: "center",
22
- mb: "8px"
23
- }, "\uD83E\uDD17"), /*#__PURE__*/React.createElement(_components.Text, {
24
- as: "h2",
25
- textAlign: "center",
26
- mt: "0",
27
- mb: "0"
28
- }, "Nothing to see here!"), /*#__PURE__*/React.createElement(_components.Text, {
29
- as: "p",
30
- textAlign: "center",
31
- mt: "0"
32
- }, "This variant is missing but it could be implemented upon necessity."));
33
- };
34
-
35
- exports.EmptyState = EmptyState;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "default", {
7
- enumerable: true,
8
- get: function get() {
9
- return _EmptyState.EmptyState;
10
- }
11
- });
12
-
13
- var _EmptyState = require("./EmptyState");
@@ -1,153 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.FlatButton = exports.FlatButtonVariant = void 0;
7
-
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _darken = _interopRequireDefault(require("polished/lib/color/darken"));
11
-
12
- var _colors = _interopRequireDefault(require("../theme/colors"));
13
-
14
- var _flatButton = require("../theme/flatButton");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- 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; }
19
-
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
21
-
22
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
-
24
- var variantGroups = {
25
- primary: {
26
- PRIMARY: "primary",
27
- PRIMARY_X_SMALL: "primaryXSmall",
28
- PRIMARY_SMALL: "primarySmall",
29
- PRIMARY_MEDIUM: "primaryMedium",
30
- PRIMARY_LARGE: "primaryLarge",
31
- PRIMARY_X_LARGE: "primaryXLarge"
32
- },
33
- primaryLong: {
34
- PRIMARY_LONG: "primaryLong",
35
- PRIMARY_X_SMALL_LONG: "primaryXSmallLong",
36
- PRIMARY_SMALL_LONG: "primarySmallLong",
37
- PRIMARY_MEDIUM_LONG: "primaryMediumLong",
38
- PRIMARY_LARGE_LONG: "primaryLargeLong",
39
- PRIMARY_X_LARGE_LONG: "primaryXLargeLong"
40
- },
41
- secondary: {
42
- SECONDARY: "secondary",
43
- SECONDARY_X_SMALL: "secondaryXSmall",
44
- SECONDARY_SMALL: "secondarySmall",
45
- SECONDARY_MEDIUM: "secondaryMedium",
46
- SECONDARY_LARGE: "secondaryLarge",
47
- SECONDARY_X_LARGE: "secondaryXLarge"
48
- },
49
- secondaryLong: {
50
- SECONDARY_LONG: "secondaryLong",
51
- SECONDARY_X_SMALL_LONG: "secondaryXSmallLong",
52
- SECONDARY_SMALL_LONG: "secondarySmallLong",
53
- SECONDARY_MEDIUM_LONG: "secondaryMediumLong",
54
- SECONDARY_LARGE_LONG: "secondaryLargeLong",
55
- SECONDARY_X_LARGE_LONG: "secondaryXLargeLong"
56
- },
57
- tertiary: {
58
- TERTIARY: "tertiary",
59
- TERTIARY_X_SMALL: "tertiaryXSmall",
60
- TERTIARY_SMALL: "tertiarySmall",
61
- TERTIARY_MEDIUM: "tertiaryMedium",
62
- TERTIARY_LARGE: "tertiaryLarge",
63
- TERTIARY_X_LARGE: "tertiaryXLarge"
64
- },
65
- tertiaryLong: {
66
- TERTIARY_LONG: "tertiaryLong",
67
- TERTIARY_X_SMALL_LONG: "tertiaryXSmallLong",
68
- TERTIARY_SMALL_LONG: "tertiarySmallLong",
69
- TERTIARY_MEDIUM_LONG: "tertiaryMediumLong",
70
- TERTIARY_LARGE_LONG: "tertiaryLargeLong",
71
- TERTIARY_X_LARGE_LONG: "tertiaryXLargeLong"
72
- }
73
- };
74
-
75
- var FlatButtonVariant = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, variantGroups.primary), variantGroups.primaryLong), variantGroups.secondary), variantGroups.secondaryLong), variantGroups.tertiary), variantGroups.tertiaryLong);
76
-
77
- exports.FlatButtonVariant = FlatButtonVariant;
78
- var defaultProps = {
79
- variant: FlatButtonVariant.PRIMARY
80
- };
81
-
82
- var getCustomPrimaryStyle = function getCustomPrimaryStyle(_ref) {
83
- var primary = _ref.color.primary;
84
- return {
85
- backgroundColor: "".concat(primary, " !important"),
86
- borderColor: "".concat(primary, " !important"),
87
- ":hover": {
88
- backgroundColor: "".concat((0, _darken.default)(0.05, primary), " !important"),
89
- borderColor: "".concat((0, _darken.default)(0.05, primary), " !important")
90
- }
91
- };
92
- };
93
-
94
- var getCustomSecondaryStyle = function getCustomSecondaryStyle(_ref2) {
95
- var primary = _ref2.color.primary;
96
- return {
97
- color: "".concat(primary, " !important"),
98
- borderColor: "".concat(primary, " !important"),
99
- backgroundColor: "".concat(_colors.default.white, " !important"),
100
- ":hover": {
101
- color: "".concat(_colors.default.white, " !important"),
102
- backgroundColor: "".concat(primary, " !important"),
103
- borderColor: "".concat(primary, " !important")
104
- }
105
- };
106
- };
107
-
108
- var getCustomStyles = function getCustomStyles(_ref3) {
109
- var variant = _ref3.variant,
110
- custom = _ref3.theme.custom;
111
-
112
- if (variant.indexOf(FlatButtonVariant.PRIMARY) === 0) {
113
- return getCustomPrimaryStyle(custom);
114
- } else if (variant.indexOf(FlatButtonVariant.SECONDARY) === 0) {
115
- return getCustomSecondaryStyle(custom);
116
- }
117
-
118
- return "";
119
- };
120
-
121
- var whiteSpace = function whiteSpace(props) {
122
- return props.whiteSpace ? {
123
- whiteSpace: props.whiteSpace
124
- } : {};
125
- };
126
-
127
- var fontSize = function fontSize(props) {
128
- return props.fontSize ? {
129
- fontSize: "".concat(props.fontSize, " !important")
130
- } : {};
131
- };
132
-
133
- var fontWeight = function fontWeight(props) {
134
- return props.fontWeight ? {
135
- fontWeight: "".concat(props.fontWeight, " !important")
136
- } : {};
137
- };
138
-
139
- var lineHeight = function lineHeight(props) {
140
- return props.lineHeight ? {
141
- lineHeight: "".concat(props.lineHeight, " !important")
142
- } : {};
143
- };
144
-
145
- var handleCustom = function handleCustom(props) {
146
- return props.theme.custom ? getCustomStyles(props) : {};
147
- };
148
-
149
- var FlatButton = _styledComponents.default.button(_flatButton.commonStyle, _flatButton.variants, whiteSpace, fontSize, fontWeight, lineHeight, handleCustom);
150
-
151
- exports.default = exports.FlatButton = FlatButton;
152
- FlatButton.displayName = "FlatButton";
153
- FlatButton.defaultProps = _objectSpread({}, defaultProps);
@@ -1,75 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.FlatInput = exports.FlatInputVariant = void 0;
7
-
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _flatInput = require("../theme/flatInput");
11
-
12
- var _Input = require("./basic/Input");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- 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; }
17
-
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19
-
20
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
-
22
- var variantGroups = {
23
- default: {
24
- DEFAULT: "default",
25
- DEFAULT_SMALL: "defaultSmall"
26
- },
27
- defaultLong: {
28
- DEFAULT_LONG: "defaultLong",
29
- DEFAULT_SMALL_LONG: "defaultSmallLong"
30
- },
31
- error: {
32
- ERROR: "error",
33
- ERROR_SMALL: "errorSmall"
34
- },
35
- errorLong: {
36
- ERROR_LONG: "errorLong",
37
- ERROR_SMALL_LONG: "errorSmallLong"
38
- }
39
- };
40
-
41
- var FlatInputVariant = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, variantGroups.default), variantGroups.defaultLong), variantGroups.error), variantGroups.errorLong);
42
-
43
- exports.FlatInputVariant = FlatInputVariant;
44
- var defaultProps = {
45
- variant: FlatInputVariant.DEFAULT
46
- };
47
-
48
- var getCustomDefaultStyle = function getCustomDefaultStyle(_ref) {
49
- var primary = _ref.color.primary;
50
- return {
51
- ":focus": {
52
- borderColor: "".concat(primary, " !important")
53
- }
54
- };
55
- };
56
-
57
- var getCustomStyles = function getCustomStyles(_ref2) {
58
- var variant = _ref2.variant,
59
- custom = _ref2.theme.custom;
60
-
61
- if (variant.indexOf(FlatInputVariant.DEFAULT) === 0) {
62
- return getCustomDefaultStyle(custom);
63
- }
64
-
65
- return "";
66
- };
67
-
68
- var handleCustom = function handleCustom(props) {
69
- return props.theme.custom ? getCustomStyles(props) : {};
70
- };
71
-
72
- var FlatInput = (0, _styledComponents.default)(_Input.Input)(_flatInput.commonStyle, _flatInput.variants, handleCustom);
73
- exports.default = exports.FlatInput = FlatInput;
74
- FlatInput.displayName = "FlatInput";
75
- FlatInput.defaultProps = _objectSpread({}, defaultProps);
@@ -1,62 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _index = require("../index");
11
-
12
- var _colors = _interopRequireDefault(require("../../theme/colors"));
13
-
14
- var _images = require("./images");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
-
20
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
21
-
22
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
23
-
24
- var IconChecker = function IconChecker(_ref) {
25
- var children = _ref.children,
26
- _ref$checked = _ref.checked,
27
- checked = _ref$checked === void 0 ? false : _ref$checked,
28
- _ref$icon = _ref.icon,
29
- icon = _ref$icon === void 0 ? "theater" : _ref$icon,
30
- rest = _objectWithoutProperties(_ref, ["children", "checked", "icon"]);
31
-
32
- return /*#__PURE__*/_react.default.createElement(_index.Box, _extends({
33
- mx: "auto",
34
- cursor: "pointer"
35
- }, rest), /*#__PURE__*/_react.default.createElement(_index.Flex, {
36
- justifyContent: "center",
37
- alignItems: checked ? "baseline" : "center",
38
- boxSizing: "border-box",
39
- border: checked ? "none" : "1px solid ".concat(_colors.default.tealish),
40
- borderRadius: checked ? "0" : "100%",
41
- width: "58px",
42
- height: "58px",
43
- mx: "auto",
44
- backgroundImage: checked ? "url(".concat(_images.active, ")") : "none"
45
- }, /*#__PURE__*/_react.default.createElement(_index.Icon, {
46
- as: "div",
47
- name: icon,
48
- color: _colors.default.tealish,
49
- checked: checked,
50
- size: "30px",
51
- mt: checked ? "10px" : "0"
52
- })), /*#__PURE__*/_react.default.createElement(_index.Text, {
53
- fontSize: "14px",
54
- fontWeight: "extraLight",
55
- textAlign: "center",
56
- color: _colors.default.blackTwo,
57
- mt: 2
58
- }, children));
59
- };
60
-
61
- var _default = IconChecker;
62
- exports.default = _default;
@@ -1,8 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.active = void 0;
7
- var active = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1OCIgaGVpZ2h0PSI1OCIgdmlld0JveD0iMCAwIDU4IDU4Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMSAxKSI+CiAgICAgICAgPGNpcmNsZSBjeD0iMjgiIGN5PSIyOCIgcj0iMjgiIGZpbGw9IiNEOUYzRUYiIHN0cm9rZT0iIzIwQTk5NCIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPgogICAgICAgIDxwYXRoIGZpbGw9IiMyMEE5OTQiIGQ9Ik00OC44NTcgNDYuMjIyYy0xNi4xNjggMC0xMC4wNDMtNy42MDItMjAuODM1LTcuNjAyLTEwLjc5MSAwLTQuNyA3LjYwMi0yMC44MzQgNy42MDIgNS4zMzIgNi4yMSAxMi4yNzcgOS4zMTYgMjAuODM0IDkuMzE2IDguNTU4IDAgMTUuNTAzLTMuMTA1IDIwLjgzNS05LjMxNnoiLz4KICAgICAgICA8cGF0aCBzdHJva2U9IiNGRkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTIzLjA1OSA0Ny44MThMMjUuODc2IDUwLjk4IDMyLjk0MSA0My45MjIiLz4KICAgIDwvZz4KPC9zdmc+Cg==";
8
- exports.active = active;
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "default", {
7
- enumerable: true,
8
- get: function get() {
9
- return _IconChecker.default;
10
- }
11
- });
12
-
13
- var _IconChecker = _interopRequireDefault(require("./IconChecker"));
14
-
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,191 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.RoundedButton = exports.RoundedButtonVariant = void 0;
7
-
8
- var _styledComponents = _interopRequireDefault(require("styled-components"));
9
-
10
- var _colors = _interopRequireDefault(require("../theme/colors"));
11
-
12
- var _roundedButton = require("../theme/roundedButton");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- 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; }
17
-
18
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19
-
20
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
-
22
- var variantGroups = {
23
- primary: {
24
- PRIMARY: "primary",
25
- PRIMARY_X_SMALL: "primaryXSmall",
26
- PRIMARY_SMALL: "primarySmall",
27
- PRIMARY_SMALLISH: "primarySmallish",
28
- PRIMARY_MEDIUM: "primaryMedium",
29
- PRIMARY_LARGE: "primaryLarge",
30
- PRIMARY_X_LARGE: "primaryXLarge",
31
- PRIMARY_X_X_LARGE: "primaryXXLarge"
32
- },
33
- primaryLong: {
34
- PRIMARY_LONG: "primaryLong",
35
- PRIMARY_X_SMALL_LONG: "primaryXSmallLong",
36
- PRIMARY_SMALL_LONG: "primarySmallLong",
37
- PRIMARY_MEDIUM_LONG: "primaryMediumLong",
38
- PRIMARY_LARGE_LONG: "primaryLargeLong",
39
- PRIMARY_X_LARGE_LONG: "primaryXLargeLong",
40
- PRIMARY_X_X_LARGE_LONG: "primaryXXLargeLong"
41
- },
42
- secondary: {
43
- SECONDARY: "secondary",
44
- SECONDARY_X_SMALL: "secondaryXSmall",
45
- SECONDARY_SMALL: "secondarySmall",
46
- SECONDARY_MEDIUM: "secondaryMedium",
47
- SECONDARY_LARGE: "secondaryLarge",
48
- SECONDARY_X_LARGE: "secondaryXLarge",
49
- SECONDARY_X_X_LARGE: "secondaryXXLarge"
50
- },
51
- secondaryLong: {
52
- SECONDARY_LONG: "secondaryLong",
53
- SECONDARY_X_SMALL_LONG: "secondaryXSmallLong",
54
- SECONDARY_SMALL_LONG: "secondarySmallLong",
55
- SECONDARY_MEDIUM_LONG: "secondaryMediumLong",
56
- SECONDARY_LARGE_LONG: "secondaryLargeLong",
57
- SECONDARY_X_LARGE_LONG: "secondaryXLargeLong",
58
- SECONDARY_X_X_LARGE_LONG: "secondaryXXLargeLong"
59
- },
60
- tertiary: {
61
- TERTIARY: "tertiary",
62
- TERTIARY_X_SMALL: "tertiaryXSmall",
63
- TERTIARY_SMALL: "tertiarySmall",
64
- TERTIARY_MEDIUM: "tertiaryMedium",
65
- TERTIARY_LARGE: "tertiaryLarge",
66
- TERTIARY_X_LARGE: "tertiaryXLarge",
67
- TERTIARY_X_X_LARGE: "tertiaryXXLarge"
68
- },
69
- tertiaryLong: {
70
- TERTIARY_LONG: "tertiaryLong",
71
- TERTIARY_X_SMALL_LONG: "tertiaryXSmallLong",
72
- TERTIARY_SMALL_LONG: "tertiarySmallLong",
73
- TERTIARY_MEDIUM_LONG: "tertiaryMediumLong",
74
- TERTIARY_LARGE_LONG: "tertiaryLargeLong",
75
- TERTIARY_X_LARGE_LONG: "tertiaryXLargeLong",
76
- TERTIARY_X_X_LARGE_LONG: "tertiaryXXLargeLong"
77
- },
78
- quaternary: {
79
- QUATERNARY: "quaternary",
80
- QUATERNARY_X_SMALL: "quaternaryXSmall",
81
- QUATERNARY_SMALL: "quaternarySmall",
82
- QUATERNARY_MEDIUM: "quaternaryMedium",
83
- QUATERNARY_LARGE: "quaternaryLarge",
84
- QUATERNARY_X_LARGE: "quaternaryXLarge",
85
- QUATERNARY_X_X_LARGE: "quaternaryXXLarge"
86
- },
87
- quaternaryLong: {
88
- QUATERNARY_LONG: "quaternaryLong",
89
- QUATERNARY_X_SMALL_LONG: "quaternaryXSmallLong",
90
- QUATERNARY_SMALL_LONG: "quaternarySmallLong",
91
- QUATERNARY_MEDIUM_LONG: "quaternaryMediumLong",
92
- QUATERNARY_LARGE_LONG: "quaternaryLargeLong",
93
- QUATERNARY_X_LARGE_LONG: "quaternaryXLargeLong",
94
- QUATERNARY_X_X_LARGE_LONG: "quaternaryXXLargeLong"
95
- },
96
- secondaryCta: {
97
- SECONDARY_CTA: "secondaryCta"
98
- },
99
- secondaryCtaSmallish: {
100
- SECONDARY_CTA_SMALLISH: "secondaryCtaSmallish"
101
- },
102
- secondaryCtaMedium: {
103
- SECONDARY_CTA_MEDIUM: "secondaryCtaMedium"
104
- }
105
- };
106
-
107
- var RoundedButtonVariant = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, variantGroups.primary), variantGroups.primaryLong), variantGroups.secondary), variantGroups.secondaryLong), variantGroups.tertiary), variantGroups.tertiaryLong), variantGroups.quaternary), variantGroups.quaternaryLong), variantGroups.secondaryCta), variantGroups.secondaryCtaSmallish), variantGroups.secondaryCtaMedium);
108
-
109
- exports.RoundedButtonVariant = RoundedButtonVariant;
110
- var defaultProps = {
111
- variant: RoundedButtonVariant.PRIMARY
112
- };
113
-
114
- var getCustomPrimaryStyle = function getCustomPrimaryStyle(_ref) {
115
- var primary = _ref.color.primary;
116
- return {
117
- backgroundColor: "".concat(primary, " !important"),
118
- borderColor: "".concat(primary, " !important"),
119
- ":hover": {
120
- backgroundColor: "".concat(primary, " !important"),
121
- borderColor: "".concat(primary, " !important")
122
- }
123
- };
124
- };
125
-
126
- var getCustomSecondaryStyle = function getCustomSecondaryStyle(_ref2) {
127
- var primary = _ref2.color.primary;
128
- return {
129
- color: "".concat(primary, " !important"),
130
- borderColor: "".concat(primary, " !important"),
131
- backgroundColor: "".concat(_colors.default.white, " !important"),
132
- ":hover": {
133
- color: "".concat(_colors.default.white, " !important"),
134
- backgroundColor: "".concat(primary, " !important"),
135
- borderColor: "".concat(primary, " !important")
136
- }
137
- };
138
- };
139
-
140
- var getCustomStyles = function getCustomStyles(_ref3) {
141
- var variant = _ref3.variant,
142
- custom = _ref3.theme.custom;
143
-
144
- if (variant.indexOf(RoundedButtonVariant.PRIMARY) === 0) {
145
- return getCustomPrimaryStyle(custom);
146
- } else if (variant.indexOf(RoundedButtonVariant.SECONDARY) === 0) {
147
- return getCustomSecondaryStyle(custom);
148
- }
149
-
150
- return "";
151
- };
152
-
153
- var whiteSpace = function whiteSpace(props) {
154
- return props.whiteSpace ? {
155
- whiteSpace: props.whiteSpace
156
- } : {};
157
- };
158
-
159
- var fontSize = function fontSize(props) {
160
- return props.fontSize ? {
161
- fontSize: "".concat(props.fontSize, " !important")
162
- } : {};
163
- };
164
-
165
- var fontWeight = function fontWeight(props) {
166
- return props.fontWeight ? {
167
- fontWeight: "".concat(props.fontWeight, " !important")
168
- } : {};
169
- };
170
-
171
- var lineHeight = function lineHeight(props) {
172
- return props.lineHeight ? {
173
- lineHeight: "".concat(props.lineHeight, " !important")
174
- } : {};
175
- };
176
-
177
- var width = function width(props) {
178
- return props.width ? {
179
- width: props.width
180
- } : {};
181
- };
182
-
183
- var handleCustom = function handleCustom(props) {
184
- return props.theme.custom ? getCustomStyles(props) : {};
185
- };
186
-
187
- var RoundedButton = _styledComponents.default.button(_roundedButton.commonStyle, _roundedButton.variants, whiteSpace, fontSize, fontWeight, lineHeight, handleCustom, width);
188
-
189
- exports.default = exports.RoundedButton = RoundedButton;
190
- RoundedButton.displayName = "RoundedButton";
191
- RoundedButton.defaultProps = _objectSpread({}, defaultProps);