@splunk/themes 0.13.0 → 0.14.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.
- package/CHANGELOG.md +11 -2
- package/mixins/typography.js +5 -4
- package/mixins/utilityMixins.js +1 -1
- package/package.json +5 -3
- package/types/mixins/typography.d.ts +1 -1
- package/types/mixins/utilityMixins.d.ts +1 -1
- package/utils.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
0.14.0 - January 10, 2023
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* Added `inherit` option for `color` prop in `typography` mixin.
|
|
8
|
+
|
|
9
|
+
0.13.1 - December 6, 2022
|
|
10
|
+
----------
|
|
11
|
+
* Optimizes bundle sizes of consumers by reducing footprint of "lodash" (SUI-5090).
|
|
12
|
+
|
|
4
13
|
0.13.0 - September 6, 2022
|
|
5
14
|
----------
|
|
6
15
|
New Features:
|
|
@@ -32,7 +41,7 @@ Bug Fixes:
|
|
|
32
41
|
|
|
33
42
|
`styled-components@5.2.0` changed how selectors like `& + &` are compiled; [styled-components PR#3236](https://github.com/styled-components/styled-components/pull/3236).
|
|
34
43
|
This breaks styles that worked in previous versions of styled-components; [styled-components issue #3265](https://github.com/styled-components/styled-components/issues/3265).
|
|
35
|
-
|
|
44
|
+
|
|
36
45
|
**Until noted otherwise in a future release of `@splunk/themes` do not use `styled-components@^5.2.0` with` @splunk/themes`**.
|
|
37
46
|
|
|
38
47
|
0.10.0 - February 23, 2022
|
|
@@ -73,7 +82,7 @@ API Changes:
|
|
|
73
82
|
* `lite` theme removed. That is, the orange theme for the Splunk Light product was removed.
|
|
74
83
|
* New `SplunkThemeProvider`.
|
|
75
84
|
* New `pick()` function for switching css blocks and variables in styled-components templates.
|
|
76
|
-
* Individual themes are no longer exported directly.
|
|
85
|
+
* Individual themes are no longer exported directly.
|
|
77
86
|
* Use `useSplunkTheme()` for variables in React components;
|
|
78
87
|
* Use `variables` for variables in styled-components templates;
|
|
79
88
|
* Use `getTheme()` should you need a full list of theme variables for use outside of React and styled-components;
|
package/mixins/typography.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.typographyVariants = exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _styledComponents = require("styled-components");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _merge = _interopRequireDefault(require("lodash/merge"));
|
|
11
11
|
|
|
12
12
|
var _variables = _interopRequireDefault(require("../variables"));
|
|
13
13
|
|
|
@@ -152,7 +152,7 @@ function getStylesForVariant(variant) {
|
|
|
152
152
|
default:
|
|
153
153
|
{
|
|
154
154
|
if (false) {
|
|
155
|
-
// eslint-disable-line no-console
|
|
155
|
+
// eslint-disable-next-line no-console
|
|
156
156
|
console.log("Unknown typography variant, ".concat(variant, ". Using default values for theme."));
|
|
157
157
|
} // Make sure this "never" happens https://www.typescriptlang.org/docs/handbook/2/narrowing.html#exhaustiveness-checking
|
|
158
158
|
|
|
@@ -177,7 +177,8 @@ var colorPropToVariableMap = {
|
|
|
177
177
|
"default": _variables["default"].contentColorDefault,
|
|
178
178
|
disabled: _variables["default"].contentColorDisabled,
|
|
179
179
|
inverted: _variables["default"].contentColorInverted,
|
|
180
|
-
muted: _variables["default"].contentColorMuted
|
|
180
|
+
muted: _variables["default"].contentColorMuted,
|
|
181
|
+
inherit: 'inherit'
|
|
181
182
|
};
|
|
182
183
|
var familyPropToVariableMap = {
|
|
183
184
|
sansSerif: _variables["default"].sansFontFamily,
|
|
@@ -258,7 +259,7 @@ function typography(variantOrParams, additionalParams) {
|
|
|
258
259
|
lineHeight: _variables["default"].lineHeight,
|
|
259
260
|
withReset: false
|
|
260
261
|
};
|
|
261
|
-
var finalParams = (0,
|
|
262
|
+
var finalParams = (0, _merge["default"])(defaultTypographyParams, variantParams, transformedParams);
|
|
262
263
|
return function () {
|
|
263
264
|
return (0, _styledComponents.css)(_templateObject(), function () {
|
|
264
265
|
return finalParams.withReset && (0, _styledComponents.css)(_templateObject2());
|
package/mixins/utilityMixins.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splunk/themes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Theme variables and mixins for the Splunk design language",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"babel": "babel src -d . --ignore src/babel-plugin-base64-png,src/tests --ignore \"**/docs\" --extensions .js,.ts,.tsx",
|
|
7
7
|
"build": "cross-env NODE_ENV=production yarn babel && yarn types:build",
|
|
8
8
|
"docs": "NODE_ENV=production webpack --config docs.gen.webpack.config.js",
|
|
9
9
|
"docs:publish": "cicd-publish-docs docs --force",
|
|
10
|
-
"docs:
|
|
10
|
+
"docs:publish:external": "cicd-publish-docs docs-external --force --suffix=public",
|
|
11
|
+
"docs:start": "INTERNAL=true webpack serve --config docs.gen.webpack.config.js",
|
|
12
|
+
"docs:start:external": "webpack serve --config docs.gen.webpack.config.js",
|
|
11
13
|
"lint": "eslint src --ext \".ts,.tsx,.js,.jsx\"",
|
|
12
14
|
"lint:ci": "yarn run lint -- -f junit -o test-reports/lint-results.xml",
|
|
13
15
|
"start": "yarn babel --watch",
|
|
@@ -64,7 +66,7 @@
|
|
|
64
66
|
"@babel/cli": "^7.2.0",
|
|
65
67
|
"@babel/core": "^7.2.0",
|
|
66
68
|
"@splunk/babel-preset": "^3.0.0",
|
|
67
|
-
"@splunk/cicd-tools": "^0.
|
|
69
|
+
"@splunk/cicd-tools": "^0.5.0",
|
|
68
70
|
"@splunk/eslint-config": "^4.0.0",
|
|
69
71
|
"@storybook/addon-docs": "^6.5.9",
|
|
70
72
|
"@storybook/addons": "^6.5.9",
|
|
@@ -17,7 +17,7 @@ interface TypographyParams {
|
|
|
17
17
|
/**
|
|
18
18
|
* Set the color to a system-standard color: e.g. `active` for `@splunk/themes/variables.contentColorActive`.
|
|
19
19
|
*/
|
|
20
|
-
color?: 'active' | 'default' | 'disabled' | 'inverted' | 'muted';
|
|
20
|
+
color?: 'active' | 'default' | 'disabled' | 'inverted' | 'muted' | 'inherit';
|
|
21
21
|
/**
|
|
22
22
|
* Set the font-weight to a system-standard value.
|
|
23
23
|
*
|
package/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getCustomizedTheme = exports.addThemeDefaults = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _memoize = _interopRequireDefault(require("lodash/memoize"));
|
|
9
9
|
|
|
10
10
|
var _getTheme = _interopRequireDefault(require("./getTheme"));
|
|
11
11
|
|
|
@@ -66,7 +66,7 @@ function getCustomizedThemeUnmemo(settings, customizer) {
|
|
|
66
66
|
*/
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
var getCustomizedTheme = (0,
|
|
69
|
+
var getCustomizedTheme = (0, _memoize["default"])(getCustomizedThemeUnmemo, function () {
|
|
70
70
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
71
71
|
family = _ref2.family,
|
|
72
72
|
colorScheme = _ref2.colorScheme,
|