@spothero/ui 15.4.0 → 15.5.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.
- package/backlog/v1/utils/deprecate.js +2 -2
- package/package.json +1 -1
- package/styles/v1/utils/deprecate.js +2 -2
- package/styles/v2/components/ThemeProvider/ThemeProvider.jsx +13 -2
- package/styles/v2/components/ThemeProvider/ThemeProvider.stories.js +6 -0
- package/styles/v2/theme/base/typography.js +2 -2
- package/v1/index.js.map +1 -1
- package/v2/index.js +1 -1
- package/v2/index.js.map +1 -1
|
@@ -49,12 +49,12 @@ var deprecate = function deprecate(_ref) {
|
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
console.
|
|
52
|
+
console.groupCollapsed("fe-ui v1 ".concat(name, " Deprecation Warning: "));
|
|
53
53
|
console.log((0, _concat.default)(_context = "This component, ".concat(name, ", is now deprecated. Please use the v2 ")).call(_context, newName ? newName : name, " instead."));
|
|
54
54
|
changes.forEach(function (change) {
|
|
55
55
|
return console.log(change);
|
|
56
56
|
});
|
|
57
|
-
console.groupEnd(
|
|
57
|
+
console.groupEnd("fe-ui v1 ".concat(name, " Deprecation Warning: "));
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
var _default = deprecate;
|
package/package.json
CHANGED
|
@@ -32,14 +32,14 @@ const deprecate = ({name, newName, changes}) => {
|
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
console.
|
|
35
|
+
console.groupCollapsed(`fe-ui v1 ${name} Deprecation Warning: `);
|
|
36
36
|
console.log(
|
|
37
37
|
`This component, ${name}, is now deprecated. Please use the v2 ${
|
|
38
38
|
newName ? newName : name
|
|
39
39
|
} instead.`
|
|
40
40
|
);
|
|
41
41
|
changes.forEach(change => console.log(change));
|
|
42
|
-
console.groupEnd(
|
|
42
|
+
console.groupEnd(`fe-ui v1 ${name} Deprecation Warning: `);
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
export default deprecate;
|
|
@@ -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
|
-
(
|
|
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
|
};
|