@splunk/themes 0.13.0 → 0.13.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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 0.13.1 - December 6, 2022
5
+ ----------
6
+ * Optimizes bundle sizes of consumers by reducing footprint of "lodash" (SUI-5090).
7
+
4
8
  0.13.0 - September 6, 2022
5
9
  ----------
6
10
  New Features:
@@ -32,7 +36,7 @@ Bug Fixes:
32
36
 
33
37
  `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
38
  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
-
39
+
36
40
  **Until noted otherwise in a future release of `@splunk/themes` do not use `styled-components@^5.2.0` with` @splunk/themes`**.
37
41
 
38
42
  0.10.0 - February 23, 2022
@@ -73,7 +77,7 @@ API Changes:
73
77
  * `lite` theme removed. That is, the orange theme for the Splunk Light product was removed.
74
78
  * New `SplunkThemeProvider`.
75
79
  * New `pick()` function for switching css blocks and variables in styled-components templates.
76
- * Individual themes are no longer exported directly.
80
+ * Individual themes are no longer exported directly.
77
81
  * Use `useSplunkTheme()` for variables in React components;
78
82
  * Use `variables` for variables in styled-components templates;
79
83
  * Use `getTheme()` should you need a full list of theme variables for use outside of React and styled-components;
@@ -7,7 +7,7 @@ exports.typographyVariants = exports["default"] = void 0;
7
7
 
8
8
  var _styledComponents = require("styled-components");
9
9
 
10
- var _lodash = require("lodash");
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
 
@@ -258,7 +258,7 @@ function typography(variantOrParams, additionalParams) {
258
258
  lineHeight: _variables["default"].lineHeight,
259
259
  withReset: false
260
260
  };
261
- var finalParams = (0, _lodash.merge)(defaultTypographyParams, variantParams, transformedParams);
261
+ var finalParams = (0, _merge["default"])(defaultTypographyParams, variantParams, transformedParams);
262
262
  return function () {
263
263
  return (0, _styledComponents.css)(_templateObject(), function () {
264
264
  return finalParams.withReset && (0, _styledComponents.css)(_templateObject2());
@@ -108,7 +108,7 @@ function clearfix() {
108
108
  * import { ellipsis } from '@splunk/themes/mixins';
109
109
  *
110
110
  * const myBlock = styled.div`
111
- * ${clearfix()};
111
+ * ${ellipsis()};
112
112
  * width: 300px;
113
113
  * `
114
114
  * ```
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@splunk/themes",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
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:start": "webpack serve --config docs.gen.webpack.config.js",
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.4.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",
@@ -51,7 +51,7 @@ export declare function clearfix(): {
51
51
  * import { ellipsis } from '@splunk/themes/mixins';
52
52
  *
53
53
  * const myBlock = styled.div`
54
- * ${clearfix()};
54
+ * ${ellipsis()};
55
55
  * width: 300px;
56
56
  * `
57
57
  * ```
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 _lodash = require("lodash");
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, _lodash.memoize)(getCustomizedThemeUnmemo, function () {
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,