@spothero/ui 15.4.0-beta.1 → 15.5.0

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 _map2 = _interopRequireDefault(require("lodash/map"));
51
51
 
52
52
  var _some = _interopRequireDefault(require("lodash/some"));
53
53
 
54
- var _orderBy = _interopRequireDefault(require("lodash/orderBy"));
54
+ var _sortBy = _interopRequireDefault(require("lodash/sortBy"));
55
55
 
56
56
  var _react = _interopRequireWildcard(require("react"));
57
57
 
@@ -169,7 +169,7 @@ var Table = /*#__PURE__*/function (_Component) {
169
169
 
170
170
  if (sorting) {
171
171
  var sort = (0, _isFunction.default)(sorting) ? [sorting] : (0, _toConsumableArray2.default)(sorting);
172
- sortedData = (0, _orderBy.default)(data, sort, sortOrder);
172
+ sortedData = (0, _sortBy.default)(data, sort);
173
173
  }
174
174
 
175
175
  return /*#__PURE__*/_react.default.createElement("tbody", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spothero/ui",
3
- "version": "15.4.0-beta.1",
3
+ "version": "15.5.0",
4
4
  "description": "SpotHero's React component UI library.",
5
5
  "main": "v2/index.js",
6
6
  "repository": "https://github.com/spothero/fe-monorepo",
@@ -4,7 +4,7 @@ import isNumber from 'lodash/isNumber';
4
4
  import isObject from 'lodash/isObject';
5
5
  import map from 'lodash/map';
6
6
  import some from 'lodash/some';
7
- import orderBy from 'lodash/orderBy'
7
+ import sortBy from 'lodash/sortBy';
8
8
  import React, {Component} from 'react';
9
9
  import PropTypes from 'prop-types';
10
10
  import classNames from 'classnames';
@@ -248,7 +248,7 @@ export default class Table extends Component {
248
248
  if (sorting) {
249
249
  const sort = isFunction(sorting) ? [sorting] : [...sorting];
250
250
 
251
- sortedData = orderBy(data, sort, sortOrder);
251
+ sortedData = sortBy(data, sort);
252
252
  }
253
253
 
254
254
  return (
@@ -3,4 +3,8 @@ export default {
3
3
  zIndex: 'layer8',
4
4
  justifyContent: 'center',
5
5
  alignItems: {base: 'flex-end', tablet: 'center'},
6
+ height: '100%',
7
+ minHeight: '-moz-available',
8
+ minHeight: '-webkit-fill-available',
9
+ minHeight: 'fill-available',
6
10
  };
@@ -7,9 +7,18 @@ import {Fonts, LegacyOverrides} from 'v2/theme/global';
7
7
  import merge from 'lodash/merge';
8
8
 
9
9
  const ThemeProvider = forwardRef(
10
- ({theme, useLegacyOverrides, children, ...props}, ref) => (
10
+ (
11
+ {
12
+ theme,
13
+ useLegacyOverrides,
14
+ disableExternalFonts = false,
15
+ children,
16
+ ...props
17
+ },
18
+ ref
19
+ ) => (
11
20
  <ChakraProvider {...props} ref={ref} theme={merge(THEME, theme)}>
12
- <Fonts />
21
+ {disableExternalFonts ? null : <Fonts />}
13
22
  <LegacyOverrides useLegacyOverrides={useLegacyOverrides} />
14
23
  {children}
15
24
  </ChakraProvider>
@@ -19,6 +28,8 @@ const ThemeProvider = forwardRef(
19
28
  ThemeProvider.propTypes = {
20
29
  /** If true, this will use the old `spothero-html` base styles */
21
30
  useLegacyOverrides: PropTypes.bool,
31
+ /** If true, this will not load the `Fonts` global styles */
32
+ disableExternalFonts: PropTypes.bool,
22
33
  /** The React node (generally your entire App) that will be provided the theme */
23
34
  children: PropTypes.node,
24
35
  /** Adds additional themeing on top of SpotHero's default configuration */
@@ -64,6 +64,12 @@ const Template = (props, {hasDarkBackground}) => {
64
64
  a boolean. If true, the ThemeProvider will insert the typography
65
65
  styling from .spothero-html
66
66
  </Text>{' '}
67
+ <Text mb={8} color={contentTextColor}>
68
+ ThemeProvider also has a <Code>disableExternalFonts</Code> prop
69
+ that is a boolean. If true, the ThemeProvider will not load the
70
+ font files from Google's CDN, and you will be able to handle
71
+ fonts on a project-level.
72
+ </Text>{' '}
67
73
  </Box>
68
74
  );
69
75
  };
@@ -1,6 +1,6 @@
1
1
  export const fonts = {
2
- heading: `'Open Sans', sans-serif`,
3
- body: `'Open Sans', sans-serif`,
2
+ heading: `"Open Sans", sans-serif`,
3
+ body: `"Open Sans", sans-serif`,
4
4
  };
5
5
 
6
6
  export const fontSizes = {
@@ -23,12 +23,14 @@ export default global;
23
23
  export const Fonts = () => (
24
24
  <Global
25
25
  styles={`
26
+ @import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');
27
+ /* Copied from https://fonts.googleapis.com/css2?family=Open+Sans:wght@700&display=swap */
26
28
  /* latin-ext */
27
29
  @font-face {
28
30
  font-family: 'Open Sans';
29
31
  font-style: normal;
30
32
  font-weight: 700;
31
- src: url(./fonts/OpenSans-Bold.ttf) format('ttf');
33
+ src: url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN7rgOXOhpKKSTj5PW.woff2) format('woff2');
32
34
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
33
35
  }
34
36
  /* latin-ext */
@@ -36,7 +38,7 @@ export const Fonts = () => (
36
38
  font-family: 'Open Sans';
37
39
  font-style: normal;
38
40
  font-weight: 600;
39
- src: url(./fonts/OpenSans-SemiBold.ttf) format('ttf');
41
+ src: url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOXOhpKKSTj5PW.woff2) format('woff2');
40
42
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
41
43
  }
42
44
  /* latin-ext */
@@ -44,7 +46,7 @@ export const Fonts = () => (
44
46
  font-family: 'Open Sans';
45
47
  font-style: normal;
46
48
  font-weight: 400;
47
- src: url(./fonts/OpenSans-Regular.ttf) format('ttf');
49
+ src: url(https://fonts.gstatic.com/s/opensans/v18/mem8YaGs126MiZpBA-UFW50bf8pkAp6a.woff2) format('woff2');
48
50
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
49
51
  }
50
52
  /* latin-ext */
@@ -52,7 +54,7 @@ export const Fonts = () => (
52
54
  font-family: 'Open Sans';
53
55
  font-style: normal;
54
56
  font-weight: 300;
55
- src: url(./fonts/OpenSans-Light.ttf) format('ttf');
57
+ src: url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OXOhpKKSTj5PW.woff2) format('woff2');
56
58
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
57
59
  }
58
60
  `}