travelcircus-styleguide 2.0.17 → 2.1.1

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.
@@ -51,7 +51,7 @@ var IconChecker = function IconChecker(_ref) {
51
51
  mt: checked ? '10px' : '0'
52
52
  })), /*#__PURE__*/_react.default.createElement(_index.Text, {
53
53
  fontSize: "14px",
54
- fontWeight: "extraLight",
54
+ fontWeight: "light",
55
55
  textAlign: "center",
56
56
  color: _colors.default.blackTwo,
57
57
  mt: 2
@@ -30,7 +30,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
30
30
  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; }
31
31
 
32
32
  function _templateObject() {
33
- var data = _taggedTemplateLiteral(["\n font-family: poppins-light;\n width: ", ";\n\n .", "__control {\n border: 1px solid\n ", ";\n border-radius: 5px;\n background-color: ", ";\n\n &:hover {\n border-color: black;\n box-shadow: none !important;\n }\n\n &--is-focused {\n border-color: ", ";\n box-shadow: none !important;\n }\n }\n\n .", "__value-container {\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n font-size: ", ";\n height: ", ";\n line-height: 1.2em;\n\n .", "__single-value {\n color: ", ";\n }\n\n & > div[class*='Input'] {\n margin: 0 !important;\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n height: 1em;\n }\n }\n\n .", "__indicator-separator {\n display: none;\n }\n\n .", "__dropdown-indicator {\n color: ", ";\n padding-right: ", ";\n }\n\n .", "__menu {\n z-index: 100;\n margin-top: 4px;\n font-size: ", ";\n }\n\n .", "__option {\n cursor: pointer;\n\n &:hover,\n &--is-focused,\n &--is-selected {\n color: ", ";\n background: ", ";\n }\n }\n .react-select__placeholder {\n color: ", ";\n }\n"]);
33
+ var data = _taggedTemplateLiteral(["\n width: ", ";\n\n .", "__control {\n border: 1px solid\n ", ";\n border-radius: 5px;\n background-color: ", ";\n\n &:hover {\n border-color: black;\n box-shadow: none !important;\n }\n\n &--is-focused {\n border-color: ", ";\n box-shadow: none !important;\n }\n }\n\n .", "__value-container {\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n font-size: ", ";\n height: ", ";\n line-height: 1.2em;\n\n .", "__single-value {\n color: ", ";\n }\n\n & > div[class*='Input'] {\n margin: 0 !important;\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n height: 1em;\n }\n }\n\n .", "__indicator-separator {\n display: none;\n }\n\n .", "__dropdown-indicator {\n color: ", ";\n padding-right: ", ";\n }\n\n .", "__menu {\n z-index: 100;\n margin-top: 4px;\n font-size: ", ";\n }\n\n .", "__option {\n cursor: pointer;\n\n &:hover,\n &--is-focused,\n &--is-selected {\n color: ", ";\n background: ", ";\n }\n }\n .react-select__placeholder {\n color: ", ";\n }\n"]);
34
34
 
35
35
  _templateObject = function _templateObject() {
36
36
  return data;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Title = exports.Subtitle = exports.isLight = void 0;
6
+ exports.Title = exports.Subtitle = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
@@ -32,7 +32,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
32
32
  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; }
33
33
 
34
34
  function _templateObject() {
35
- var data = _taggedTemplateLiteral(["\n font-family: ", ";\n border-bottom: 1px solid ", ";\n line-height: 1.5;\n color: ", ";\n margin: 0;\n text-transform: uppercase;\n ", ";\n"]);
35
+ var data = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n line-height: 1.5;\n color: ", ";\n margin: 0;\n text-transform: uppercase;\n"]);
36
36
 
37
37
  _templateObject = function _templateObject() {
38
38
  return data;
@@ -43,12 +43,7 @@ function _templateObject() {
43
43
 
44
44
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
45
45
 
46
- var isLight = function isLight(props) {
47
- return props.isLight ? "font-weight: ".concat(_theme.fontWeights.extraLight) : "font-weight: ".concat(_theme.fontWeights.normal);
48
- };
49
-
50
- exports.isLight = isLight;
51
- var StyledTitle = (0, _styledComponents.default)(_components.Text)(_templateObject(), _theme.fontFamilies.poppins, _colors.default.black, _colors.default.black, isLight);
46
+ var StyledTitle = (0, _styledComponents.default)(_components.Text)(_templateObject(), _colors.default.black, _colors.default.black);
52
47
 
53
48
  var Title = function Title(_ref) {
54
49
  var children = _ref.children,
@@ -61,6 +56,6 @@ exports.Title = Title;
61
56
  Title.displayName = 'UnderlinedTitle';
62
57
  var Subtitle = (0, _styledComponents.default)(_components.Text).attrs({
63
58
  as: 'p'
64
- })(_templateObject2(), _colors.default.black, _theme.fontWeights.extraLight);
59
+ })(_templateObject2(), _colors.default.black, _theme.fontWeights.light);
65
60
  exports.Subtitle = Subtitle;
66
61
  Subtitle.displayName = 'UnderlinedSubtitle';
@@ -56,13 +56,13 @@ function _templateObject() {
56
56
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
57
57
 
58
58
  var caps = function caps(props) {
59
- return props.caps && "text-transform: uppercase;";
59
+ return props.caps && 'text-transform: uppercase;';
60
60
  };
61
61
 
62
62
  exports.caps = caps;
63
63
 
64
64
  var lower = function lower(props) {
65
- return props.lower && "text-transform: lowercase;";
65
+ return props.lower && 'text-transform: lowercase;';
66
66
  };
67
67
 
68
68
  exports.lower = lower;
@@ -77,152 +77,97 @@ var truncate = function truncate(props) {
77
77
  }
78
78
 
79
79
  if (props.truncate === true) {
80
- return (0, _ellipsis.default)("100%");
80
+ return (0, _ellipsis.default)('100%');
81
81
  }
82
82
 
83
83
  return (0, _ellipsis.default)(props.truncate);
84
84
  };
85
85
 
86
86
  var whiteSpace = (0, _styledSystem.style)({
87
- prop: "whiteSpace",
88
- cssProperty: "white-space"
87
+ prop: 'whiteSpace',
88
+ cssProperty: 'white-space'
89
89
  });
90
90
  var textDecoration = (0, _styledSystem.style)({
91
- prop: "textDecoration",
92
- cssProperty: "text-decoration"
91
+ prop: 'textDecoration',
92
+ cssProperty: 'text-decoration'
93
93
  });
94
94
  var textTransform = (0, _styledSystem.style)({
95
- prop: "textTransform",
96
- cssProperty: "text-transform"
95
+ prop: 'textTransform',
96
+ cssProperty: 'text-transform'
97
97
  });
98
- var fontWeight = (0, _styledSystem.style)({
99
- prop: "fontWeight",
100
- cssProperty: "font-weight"
101
- });
102
-
103
- var getFont = function getFont(_ref) {
104
- var _theme$italicFonts, _theme$custom, _theme$italicFonts2, _theme$custom2, _theme$italicFonts3, _theme$boldFonts, _theme$custom3, _theme$boldFonts2, _theme$custom4, _theme$boldFonts3, _theme$semiBoldFonts, _theme$custom5, _theme$semiBoldFonts2, _theme$custom6, _theme$semiBoldFonts3, _theme$semiBoldItalic, _theme$custom7, _theme$semiBoldItalic2, _theme$custom8, _theme$semiBoldItalic3, _theme$lightFonts, _theme$custom9, _theme$lightFonts2, _theme$custom10, _theme$lightFonts3, _theme$fontFamilies;
105
-
106
- var type = _ref.type,
107
- theme = _ref.theme;
108
-
109
- switch (type) {
110
- case "italic":
111
- return theme !== null && theme !== void 0 && (_theme$italicFonts = theme.italicFonts) !== null && _theme$italicFonts !== void 0 && _theme$italicFonts[theme === null || theme === void 0 ? void 0 : (_theme$custom = theme.custom) === null || _theme$custom === void 0 ? void 0 : _theme$custom.font] ? "".concat(theme === null || theme === void 0 ? void 0 : (_theme$italicFonts2 = theme.italicFonts) === null || _theme$italicFonts2 === void 0 ? void 0 : _theme$italicFonts2[theme === null || theme === void 0 ? void 0 : (_theme$custom2 = theme.custom) === null || _theme$custom2 === void 0 ? void 0 : _theme$custom2.font], " !important") : "".concat(theme === null || theme === void 0 ? void 0 : (_theme$italicFonts3 = theme.italicFonts) === null || _theme$italicFonts3 === void 0 ? void 0 : _theme$italicFonts3.default, " !important");
112
-
113
- case "bold":
114
- return theme !== null && theme !== void 0 && (_theme$boldFonts = theme.boldFonts) !== null && _theme$boldFonts !== void 0 && _theme$boldFonts[theme === null || theme === void 0 ? void 0 : (_theme$custom3 = theme.custom) === null || _theme$custom3 === void 0 ? void 0 : _theme$custom3.font] ? "".concat(theme === null || theme === void 0 ? void 0 : (_theme$boldFonts2 = theme.boldFonts) === null || _theme$boldFonts2 === void 0 ? void 0 : _theme$boldFonts2[theme === null || theme === void 0 ? void 0 : (_theme$custom4 = theme.custom) === null || _theme$custom4 === void 0 ? void 0 : _theme$custom4.font], " !important") : "".concat(theme === null || theme === void 0 ? void 0 : (_theme$boldFonts3 = theme.boldFonts) === null || _theme$boldFonts3 === void 0 ? void 0 : _theme$boldFonts3.default, " !important");
115
-
116
- case "semiBold":
117
- return theme !== null && theme !== void 0 && (_theme$semiBoldFonts = theme.semiBoldFonts) !== null && _theme$semiBoldFonts !== void 0 && _theme$semiBoldFonts[theme === null || theme === void 0 ? void 0 : (_theme$custom5 = theme.custom) === null || _theme$custom5 === void 0 ? void 0 : _theme$custom5.font] ? "".concat(theme === null || theme === void 0 ? void 0 : (_theme$semiBoldFonts2 = theme.semiBoldFonts) === null || _theme$semiBoldFonts2 === void 0 ? void 0 : _theme$semiBoldFonts2[theme === null || theme === void 0 ? void 0 : (_theme$custom6 = theme.custom) === null || _theme$custom6 === void 0 ? void 0 : _theme$custom6.font], " !important") : "".concat(theme === null || theme === void 0 ? void 0 : (_theme$semiBoldFonts3 = theme.semiBoldFonts) === null || _theme$semiBoldFonts3 === void 0 ? void 0 : _theme$semiBoldFonts3.default, " !important");
118
-
119
- case "semiBoldItalic":
120
- return theme !== null && theme !== void 0 && (_theme$semiBoldItalic = theme.semiBoldItalicFonts) !== null && _theme$semiBoldItalic !== void 0 && _theme$semiBoldItalic[theme === null || theme === void 0 ? void 0 : (_theme$custom7 = theme.custom) === null || _theme$custom7 === void 0 ? void 0 : _theme$custom7.font] ? "".concat(theme === null || theme === void 0 ? void 0 : (_theme$semiBoldItalic2 = theme.semiBoldItalicFonts) === null || _theme$semiBoldItalic2 === void 0 ? void 0 : _theme$semiBoldItalic2[theme === null || theme === void 0 ? void 0 : (_theme$custom8 = theme.custom) === null || _theme$custom8 === void 0 ? void 0 : _theme$custom8.font], " !important") : "".concat(theme === null || theme === void 0 ? void 0 : (_theme$semiBoldItalic3 = theme.semiBoldItalicFonts) === null || _theme$semiBoldItalic3 === void 0 ? void 0 : _theme$semiBoldItalic3.default, " !important");
121
-
122
- case "light":
123
- return theme !== null && theme !== void 0 && (_theme$lightFonts = theme.lightFonts) !== null && _theme$lightFonts !== void 0 && _theme$lightFonts[theme === null || theme === void 0 ? void 0 : (_theme$custom9 = theme.custom) === null || _theme$custom9 === void 0 ? void 0 : _theme$custom9.font] ? "".concat(theme === null || theme === void 0 ? void 0 : (_theme$lightFonts2 = theme.lightFonts) === null || _theme$lightFonts2 === void 0 ? void 0 : _theme$lightFonts2[theme === null || theme === void 0 ? void 0 : (_theme$custom10 = theme.custom) === null || _theme$custom10 === void 0 ? void 0 : _theme$custom10.font], " !important") : "".concat(theme === null || theme === void 0 ? void 0 : (_theme$lightFonts3 = theme.lightFonts) === null || _theme$lightFonts3 === void 0 ? void 0 : _theme$lightFonts3.default, " !important");
124
-
125
- default:
126
- return theme === null || theme === void 0 ? void 0 : (_theme$fontFamilies = theme.fontFamilies) === null || _theme$fontFamilies === void 0 ? void 0 : _theme$fontFamilies.default;
127
- }
128
- };
129
98
 
130
99
  var italic = function italic(props) {
131
100
  return props.italic ? {
132
- fontFamily: getFont({
133
- type: "italic",
134
- theme: props === null || props === void 0 ? void 0 : props.theme
135
- }),
136
- fontStyle: "italic"
101
+ fontStyle: 'italic'
137
102
  } : null;
138
103
  };
139
104
 
140
105
  var bold = function bold(props) {
141
106
  return props.bold ? {
142
- fontFamily: getFont({
143
- type: "bold",
144
- theme: props === null || props === void 0 ? void 0 : props.theme
145
- }),
146
- fontWeight: "bold",
147
- fontSynthesis: "none",
148
- WebkitFontSmoothing: "antialiased",
149
- MozOsxFontSmoothing: "grayscale",
150
- fontSmoothing: "antialiased",
107
+ fontWeight: 700,
108
+ fontSynthesis: 'none',
109
+ WebkitFontSmoothing: 'antialiased',
110
+ MozOsxFontSmoothing: 'grayscale',
111
+ fontSmoothing: 'antialiased',
151
112
  // Text rendering
152
- textRendering: "optimizeLegibility"
113
+ textRendering: 'optimizeLegibility'
153
114
  } : null;
154
115
  };
155
116
 
156
117
  var semiBold = function semiBold(props) {
157
118
  return props.semiBold ? {
158
- fontFamily: getFont({
159
- type: "semiBold",
160
- theme: props === null || props === void 0 ? void 0 : props.theme
161
- }),
162
119
  fontWeight: 600,
163
- fontSynthesis: "none",
120
+ fontSynthesis: 'none',
164
121
  // Font smoothing
165
- WebkitFontSmoothing: "antialiased",
166
- MozOsxFontSmoothing: "grayscale",
167
- fontSmoothing: "antialiased",
122
+ WebkitFontSmoothing: 'antialiased',
123
+ MozOsxFontSmoothing: 'grayscale',
124
+ fontSmoothing: 'antialiased',
168
125
  // Text rendering
169
- textRendering: "optimizeLegibility"
126
+ textRendering: 'optimizeLegibility'
170
127
  } : null;
171
128
  };
172
129
 
173
130
  var light = function light(props) {
174
131
  return props.light ? {
175
- fontFamily: getFont({
176
- type: "light",
177
- theme: props === null || props === void 0 ? void 0 : props.theme
178
- }),
179
132
  fontWeight: 300
180
133
  } : null;
181
134
  };
182
135
 
183
136
  var boldItalic = function boldItalic(props) {
184
137
  return props.bold && props.italic ? {
185
- fontFamily: getFont({
186
- type: "bold",
187
- theme: props === null || props === void 0 ? void 0 : props.theme
188
- }),
189
- fontStyle: "italic",
190
- fontWeight: "bold",
191
- fontSynthesis: "none",
138
+ fontStyle: 'italic',
139
+ fontWeight: 700,
140
+ fontSynthesis: 'none',
192
141
  // Font smoothing
193
- WebkitFontSmoothing: "antialiased",
194
- MozOsxFontSmoothing: "grayscale",
195
- fontSmoothing: "antialiased",
142
+ WebkitFontSmoothing: 'antialiased',
143
+ MozOsxFontSmoothing: 'grayscale',
144
+ fontSmoothing: 'antialiased',
196
145
  // Text rendering
197
- textRendering: "optimizeLegibility"
146
+ textRendering: 'optimizeLegibility'
198
147
  } : null;
199
148
  };
200
149
 
201
150
  var semiBoldItalic = function semiBoldItalic(props) {
202
151
  return props.semiBold && props.italic ? {
203
- fontFamily: getFont({
204
- type: "semiBoldItalic",
205
- theme: props === null || props === void 0 ? void 0 : props.theme
206
- }),
207
- fontStyle: "italic",
152
+ fontStyle: 'italic',
208
153
  fontWeight: 600,
209
- fontSynthesis: "none",
154
+ fontSynthesis: 'none',
210
155
  // Font smoothing
211
- WebkitFontSmoothing: "antialiased",
212
- MozOsxFontSmoothing: "grayscale",
213
- fontSmoothing: "antialiased",
156
+ WebkitFontSmoothing: 'antialiased',
157
+ MozOsxFontSmoothing: 'grayscale',
158
+ fontSmoothing: 'antialiased',
214
159
  // Text rendering
215
- textRendering: "optimizeLegibility"
160
+ textRendering: 'optimizeLegibility'
216
161
  } : null;
217
162
  };
218
163
 
219
- var styledText = (0, _styledComponents.css)(_templateObject2(), italic, bold, semiBold, boldItalic, semiBoldItalic, light, _styledSystem.fontSize, caps, lower, _styledSystem.fontFamily, _styledSystem.fontStyle, _styledSystem.letterSpacing, _styledSystem.lineHeight, inheritHoverColor, truncate, whiteSpace, textDecoration, textTransform, fontWeight);
164
+ var styledText = (0, _styledComponents.css)(_templateObject2(), italic, bold, semiBold, boldItalic, semiBoldItalic, light, _styledSystem.fontSize, caps, lower, _styledSystem.fontFamily, _styledSystem.fontStyle, _styledSystem.letterSpacing, _styledSystem.lineHeight, inheritHoverColor, truncate, whiteSpace, textDecoration, textTransform, _styledSystem.fontWeight);
220
165
  var Text = (0, _styledComponents.default)(_Box.default).attrs(function (props) {
221
166
  return {
222
167
  as: props.as ? props.as : _Box.default.target
223
168
  };
224
169
  })(_templateObject3(), styledText);
225
170
  exports.Text = Text;
226
- Text.displayName = "Text";
171
+ Text.displayName = 'Text';
227
172
  var _default = Text;
228
173
  exports.default = _default;
@@ -19,44 +19,8 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
19
19
 
20
20
  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; }
21
21
 
22
- function _templateObject4() {
23
- var data = _taggedTemplateLiteral(["\n ", ";\n\n * {\n box-sizing: border-box;\n }\n"]);
24
-
25
- _templateObject4 = function _templateObject4() {
26
- return data;
27
- };
28
-
29
- return data;
30
- }
31
-
32
- 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; }
33
-
34
- 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; }
35
-
36
- 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; }
37
-
38
- function _templateObject3() {
39
- var data = _taggedTemplateLiteral(["\n font-family: ", ";\n line-height: 1.4;\n "]);
40
-
41
- _templateObject3 = function _templateObject3() {
42
- return data;
43
- };
44
-
45
- return data;
46
- }
47
-
48
- function _templateObject2() {
49
- var data = _taggedTemplateLiteral(["\n font-family: ", ";\n line-height: 1.4;\n\n .wf-active & {\n font-family: ", ";\n }\n "]);
50
-
51
- _templateObject2 = function _templateObject2() {
52
- return data;
53
- };
54
-
55
- return data;
56
- }
57
-
58
22
  function _templateObject() {
59
- var data = _taggedTemplateLiteral(["\n * {\n font-family: ", " !important;\n line-height: 1.4;\n }\n "]);
23
+ var data = _taggedTemplateLiteral(["\n * {\n box-sizing: border-box;\n }\n"]);
60
24
 
61
25
  _templateObject = function _templateObject() {
62
26
  return data;
@@ -67,23 +31,11 @@ function _templateObject() {
67
31
 
68
32
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
69
33
 
70
- var handleFontFamily = function handleFontFamily(props) {
71
- var _props$theme, _props$theme2, _props$theme2$custom, _props$theme5, _props$theme5$fontFam;
72
-
73
- var customFont = props === null || props === void 0 ? void 0 : (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.fontFamilies[props === null || props === void 0 ? void 0 : (_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : (_props$theme2$custom = _props$theme2.custom) === null || _props$theme2$custom === void 0 ? void 0 : _props$theme2$custom.font];
74
-
75
- if (customFont) {
76
- return (0, _styledComponents.css)(_templateObject(), customFont);
77
- }
78
-
79
- if (props.webfontLoader) {
80
- var _props$theme3, _props$theme3$fontFam, _props$theme4, _props$theme4$fontFam;
34
+ 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; }
81
35
 
82
- return (0, _styledComponents.css)(_templateObject2(), props === null || props === void 0 ? void 0 : (_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : (_props$theme3$fontFam = _props$theme3.fontFamilies) === null || _props$theme3$fontFam === void 0 ? void 0 : _props$theme3$fontFam.helvetica, props === null || props === void 0 ? void 0 : (_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : (_props$theme4$fontFam = _props$theme4.fontFamilies) === null || _props$theme4$fontFam === void 0 ? void 0 : _props$theme4$fontFam.poppins);
83
- }
36
+ 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; }
84
37
 
85
- return (0, _styledComponents.css)(_templateObject3(), props === null || props === void 0 ? void 0 : (_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : (_props$theme5$fontFam = _props$theme5.fontFamilies) === null || _props$theme5$fontFam === void 0 ? void 0 : _props$theme5$fontFam.poppins);
86
- };
38
+ 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; }
87
39
 
88
40
  var getCustom = function getCustom(props, originalTheme) {
89
41
  if (props.custom && !originalTheme.custom) {
@@ -95,7 +47,7 @@ var getCustom = function getCustom(props, originalTheme) {
95
47
  return _theme.default;
96
48
  };
97
49
 
98
- var Base = _styledComponents.default.div(_templateObject4(), handleFontFamily);
50
+ var Base = _styledComponents.default.div(_templateObject());
99
51
  /**
100
52
  * @param { custom: { color: { primary } } } props
101
53
  */
@@ -11,8 +11,6 @@ var _colors = _interopRequireDefault(require("./colors"));
11
11
 
12
12
  var _browser = _interopRequireDefault(require("./browser"));
13
13
 
14
- var _theme = require("./theme");
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
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; }
@@ -27,7 +25,6 @@ var commonStyle = {
27
25
  borderWidth: '1px',
28
26
  borderRadius: '5px',
29
27
  color: 'white',
30
- fontFamily: _theme.fontFamilies.default,
31
28
  transition: 'border-color 0.1s ease, background-color 0.1s ease, color 0.1s ease',
32
29
  '&:disabled': {
33
30
  cursor: 'not-allowed',
@@ -44,8 +41,7 @@ var variants = (0, _styledSystem.variant)({
44
41
  borderColor: _colors.default.tealish,
45
42
  padding: '13px 38px 15px',
46
43
  fontSize: '15px',
47
- fontFamily: _theme.semiBoldFonts.default,
48
- fontWeight: 'normal'
44
+ fontWeight: 300
49
45
  }, _browser.default.hover({
50
46
  '&:hover': {
51
47
  borderColor: _colors.default.blueGreen,
@@ -23,7 +23,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
23
23
 
24
24
  var commonStyle = {
25
25
  fontFamily: 'inherit',
26
- fontWeight: 'normal',
26
+ fontWeight: 300,
27
27
  appearance: 'none',
28
28
  textAlign: 'center',
29
29
  borderWidth: '1px',
@@ -18,16 +18,16 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
18
18
  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; }
19
19
 
20
20
  var commonStyle = {
21
- fontFamily: "inherit",
22
- fontWeight: "400",
23
- appearance: "none",
24
- textAlign: "left",
25
- borderWidth: "1px",
26
- borderStyle: "solid",
21
+ fontFamily: 'inherit',
22
+ fontWeight: 300,
23
+ appearance: 'none',
24
+ textAlign: 'left',
25
+ borderWidth: '1px',
26
+ borderStyle: 'solid',
27
27
  borderRadius: 0,
28
- boxShadow: "none !important",
29
- transition: "border-color 0.1s ease, background-color 0.1s ease",
30
- "&:disabled": {
28
+ boxShadow: 'none !important',
29
+ transition: 'border-color 0.1s ease, background-color 0.1s ease',
30
+ '&:disabled': {
31
31
  color: "".concat(_colors.default.hotelDarkGrey, " !important"),
32
32
  backgroundColor: "".concat(_colors.default.hotelSilver, " !important"),
33
33
  borderColor: "".concat(_colors.default.hotelSilver, " !important")
@@ -40,7 +40,7 @@ var commonVariants = {
40
40
  backgroundColor: "".concat(_colors.default.white, " !important"),
41
41
  borderColor: "".concat(_colors.default.hotelSilver, " !important"),
42
42
  color: "".concat(_colors.default.hotelDarkGrey, " !important"),
43
- ":focus": {
43
+ ':focus': {
44
44
  borderColor: "".concat(_colors.default.tealish, " !important")
45
45
  }
46
46
  },
@@ -52,27 +52,27 @@ var commonVariants = {
52
52
  },
53
53
  size: {
54
54
  small: {
55
- paddingTop: "12px !important",
56
- paddingRight: "14px !important",
57
- paddingBottom: "12px !important",
58
- paddingLeft: "14px !important",
59
- fontSize: "12px !important",
60
- lineHeight: "1.2 !important",
61
- height: "43px !important"
55
+ paddingTop: '12px !important',
56
+ paddingRight: '14px !important',
57
+ paddingBottom: '12px !important',
58
+ paddingLeft: '14px !important',
59
+ fontSize: '12px !important',
60
+ lineHeight: '1.2 !important',
61
+ height: '43px !important'
62
62
  },
63
63
  medium: {
64
- paddingTop: "15px !important",
65
- paddingRight: "14px !important",
66
- paddingBottom: "15px !important",
67
- paddingLeft: "14px !important",
68
- fontSize: "14px !important",
69
- lineHeight: "1.24 !important",
70
- height: "47px !important"
64
+ paddingTop: '15px !important',
65
+ paddingRight: '14px !important',
66
+ paddingBottom: '15px !important',
67
+ paddingLeft: '14px !important',
68
+ fontSize: '14px !important',
69
+ lineHeight: '1.24 !important',
70
+ height: '47px !important'
71
71
  }
72
72
  },
73
73
  length: {
74
74
  long: {
75
- width: "100% !important"
75
+ width: '100% !important'
76
76
  }
77
77
  }
78
78
  };
@@ -11,8 +11,6 @@ var _colors = _interopRequireDefault(require("./colors"));
11
11
 
12
12
  var _browser = _interopRequireDefault(require("./browser"));
13
13
 
14
- var _theme = require("./theme");
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
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; }
@@ -22,7 +20,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
22
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; }
23
21
 
24
22
  var commonStyle = {
25
- fontFamily: _theme.mediumFonts.default,
26
23
  fontWeight: '400',
27
24
  appearance: 'none',
28
25
  textAlign: 'center',
@@ -19,7 +19,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
19
19
 
20
20
  var commonStyle = {
21
21
  fontFamily: 'inherit',
22
- fontWeight: '400',
22
+ fontWeight: 300,
23
23
  appearance: 'none',
24
24
  textAlign: 'left',
25
25
  borderWidth: '1px',
@@ -18,22 +18,22 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
18
18
  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; }
19
19
 
20
20
  var commonStyle = {
21
- fontFamily: "inherit",
22
- fontWeight: "400",
23
- appearance: "none",
24
- textAlign: "left",
25
- borderWidth: "1px",
26
- borderStyle: "solid",
27
- borderRadius: "5px",
28
- boxShadow: "none",
29
- transition: "border-color 0.1s ease",
30
- resize: "none",
21
+ fontFamily: 'inherit',
22
+ fontWeight: 300,
23
+ appearance: 'none',
24
+ textAlign: 'left',
25
+ borderWidth: '1px',
26
+ borderStyle: 'solid',
27
+ borderRadius: '5px',
28
+ boxShadow: 'none',
29
+ transition: 'border-color 0.1s ease',
30
+ resize: 'none',
31
31
  width: '100%',
32
- "&:disabled": {
32
+ '&:disabled': {
33
33
  color: _colors.default.hotelSmoke,
34
34
  borderColor: _colors.default.hotelSmoke
35
35
  },
36
- "&::placeholder": {
36
+ '&::placeholder': {
37
37
  color: "".concat(_colors.default.lightGrey)
38
38
  }
39
39
  };
@@ -44,31 +44,31 @@ var commonVariants = {
44
44
  backgroundColor: _colors.default.white,
45
45
  borderColor: _colors.default.hotelSmoke,
46
46
  color: _colors.default.hotelDarkGrey,
47
- ":hover": {
47
+ ':hover': {
48
48
  borderColor: _colors.default.hotelDarkGrey
49
49
  },
50
- ":focus": {
51
- outline: "none",
50
+ ':focus': {
51
+ outline: 'none',
52
52
  borderColor: _colors.default.hotelDarkGrey
53
53
  }
54
54
  }
55
55
  },
56
56
  size: {
57
57
  small: {
58
- paddingTop: "12px",
59
- paddingRight: "14px",
60
- paddingBottom: "12px",
61
- paddingLeft: "14px",
62
- fontSize: "14px",
63
- lineHeight: "21px"
58
+ paddingTop: '12px',
59
+ paddingRight: '14px',
60
+ paddingBottom: '12px',
61
+ paddingLeft: '14px',
62
+ fontSize: '14px',
63
+ lineHeight: '21px'
64
64
  },
65
65
  medium: {
66
- paddingTop: "15px",
67
- paddingRight: "17px",
68
- paddingBottom: "15px",
69
- paddingLeft: "17px",
70
- fontSize: "15px",
71
- lineHeight: "15px"
66
+ paddingTop: '15px',
67
+ paddingRight: '17px',
68
+ paddingBottom: '15px',
69
+ paddingLeft: '17px',
70
+ fontSize: '15px',
71
+ lineHeight: '15px'
72
72
  }
73
73
  }
74
74
  };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.shadows = exports.fontWeights = exports.extraBold = exports.bolder = exports.bold = exports.semiBold = exports.medium = exports.normal = exports.light = exports.extraLight = exports.fontSizes = exports.semiBoldItalicFonts = exports.lightFonts = exports.mediumFonts = exports.semiBoldFonts = exports.boldFonts = exports.italicFonts = exports.fontFamilies = exports.space = exports.breakpoints = void 0;
6
+ exports.default = exports.shadows = exports.fontWeights = exports.bold = exports.semiBold = exports.medium = exports.light = exports.fontSizes = exports.space = exports.breakpoints = void 0;
7
7
 
8
8
  var _colors = _interopRequireDefault(require("./colors"));
9
9
 
@@ -28,92 +28,23 @@ var aliases = ['sm', 'smPh', 'ph', 'tb', 'dt', 'bg', 'bgg'];
28
28
  addAliases(breakpoints, aliases);
29
29
  var space = [0, 4, 8, 16, 24, 32, 40, 48, 64, 128];
30
30
  exports.space = space;
31
- var fontFamilies = {
32
- default: "'poppins-light', sans-serif",
33
- poppins: "'poppins-light', sans-serif",
34
- helvetica: 'Helvetica, sans-serif',
35
- poppinsFallback: 'sans-serif',
36
- lato: "'Lato-Regular', sans-serif",
37
- cabin: "'Cabin-Regular', sans-serif",
38
- cako: "'cako', serif"
39
- };
40
- exports.fontFamilies = fontFamilies;
41
- var italicFonts = {
42
- default: "'poppins-light-it', sans-serif",
43
- lato: "'Lato-Italic', sans-serif",
44
- poppins: "'poppins-light-it', sans-serif",
45
- cabin: "'Cabin-Italic', sans-serif",
46
- cako: "'cako', serif"
47
- };
48
- exports.italicFonts = italicFonts;
49
- var boldFonts = {
50
- default: "'poppins-bold', sans-serif",
51
- lato: "'Lato-Bold', sans-serif",
52
- cabin: "'Cabin-Bold', sans-serif",
53
- poppins: "'poppins-bold', sans-serif",
54
- cako: "'cako', serif"
55
- };
56
- exports.boldFonts = boldFonts;
57
- var semiBoldFonts = {
58
- default: "'poppins-semibold', sans-serif",
59
- lato: "'Lato-Semibold', sans-serif",
60
- cabin: "'Cabin-Semibold', sans-serif",
61
- poppins: "'poppins-semibold', sans-serif",
62
- cako: "'cako', serif"
63
- };
64
- exports.semiBoldFonts = semiBoldFonts;
65
- var mediumFonts = {
66
- default: "'poppins-medium', sans-serif",
67
- lato: "'Lato-Regular', sans-serif",
68
- cabin: "'Cabin-Regular', sans-serif",
69
- poppins: "'poppins-medium', sans-serif",
70
- cako: "'cako', serif"
71
- };
72
- exports.mediumFonts = mediumFonts;
73
- var lightFonts = {
74
- default: "'poppins-light', sans-serif",
75
- cabin: "'Cabin-Light', sans-serif",
76
- poppins: "'poppins-light', sans-serif",
77
- cako: "'cako', serif"
78
- };
79
- exports.lightFonts = lightFonts;
80
- var semiBoldItalicFonts = {
81
- default: "'poppins-semibold', sans-serif",
82
- lato: "'Lato-Semibold-Italic'",
83
- cabin: "'Cabin-Semibold-Italic'",
84
- poppins: "'poppins-semibold', sans-serif",
85
- cako: "'cako', serif"
86
- };
87
- exports.semiBoldItalicFonts = semiBoldItalicFonts;
88
31
  var fontSizes = [11, 12, 13, 14, 16, 18, 22, 28, 32]; // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Common_weight_name_mapping
89
32
 
90
33
  exports.fontSizes = fontSizes;
91
- var extraLight = 200;
92
- exports.extraLight = extraLight;
93
34
  var light = 300;
94
35
  exports.light = light;
95
- var normal = 400;
96
- exports.normal = normal;
97
36
  var medium = 500;
98
37
  exports.medium = medium;
99
38
  var semiBold = 600;
100
39
  exports.semiBold = semiBold;
101
- var bold = 700;
102
- exports.bold = bold;
103
- var bolder = 'bolder';
104
- exports.bolder = bolder;
105
- var extraBold = 800; // styled-system's `fontWeight` function can hook into the `fontWeights` object
40
+ var bold = 700; // styled-system's `fontWeight` function can hook into the `fontWeights` object
106
41
 
107
- exports.extraBold = extraBold;
42
+ exports.bold = bold;
108
43
  var fontWeights = {
109
- extraLight: extraLight,
110
44
  light: light,
111
- normal: normal,
112
45
  medium: medium,
113
46
  semiBold: semiBold,
114
- bold: bold,
115
- bolder: bolder,
116
- extraBold: extraBold
47
+ bold: bold
117
48
  };
118
49
  exports.fontWeights = fontWeights;
119
50
  var letterSpacings = {
@@ -128,13 +59,6 @@ exports.shadows = shadows;
128
59
  var theme = {
129
60
  breakpoints: breakpoints,
130
61
  space: space,
131
- fontFamilies: fontFamilies,
132
- italicFonts: italicFonts,
133
- boldFonts: boldFonts,
134
- semiBoldFonts: semiBoldFonts,
135
- mediumFonts: mediumFonts,
136
- lightFonts: lightFonts,
137
- semiBoldItalicFonts: semiBoldItalicFonts,
138
62
  fontSizes: fontSizes,
139
63
  fontWeights: fontWeights,
140
64
  letterSpacings: letterSpacings,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "travelcircus-styleguide",
3
- "version": "2.0.17",
3
+ "version": "2.1.1",
4
4
  "description": "Components Styleguide for a TravelCircus web services",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {