@splunk/themes 0.21.0 → 0.23.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/SplunkThemeProvider.js +18 -31
  3. package/enterprise/comfortable.js +0 -1
  4. package/enterprise/compact.js +0 -1
  5. package/enterprise/dark.js +37 -17
  6. package/enterprise/index.js +8 -16
  7. package/enterprise/light.js +51 -31
  8. package/enterprise/prismaAliases.js +3 -17
  9. package/getSettingsFromThemedProps.js +4 -8
  10. package/getTheme.js +13 -26
  11. package/index.js +1 -13
  12. package/mixins/index.js +8 -18
  13. package/mixins/tests/typography.unit.js +39 -85
  14. package/mixins/tests/utilityMixins.unit.js +2 -10
  15. package/mixins/typography.js +21 -52
  16. package/mixins/utilityMixins.js +11 -34
  17. package/package.json +18 -10
  18. package/pick.js +7 -18
  19. package/pickVariant.js +1 -7
  20. package/prisma/base.js +13 -20
  21. package/prisma/comfortable.js +0 -1
  22. package/prisma/compact.js +0 -1
  23. package/prisma/dark.js +41 -26
  24. package/prisma/dataViz.js +38 -49
  25. package/prisma/index.js +8 -16
  26. package/prisma/light.js +41 -26
  27. package/storybook-addon-splunk-themes/SplunkThemesTool.js +30 -60
  28. package/storybook-addon-splunk-themes/ThemedDocsContainer.js +3 -13
  29. package/storybook-addon-splunk-themes/index.js +0 -4
  30. package/storybook-addon-splunk-themes/manager.js +1 -7
  31. package/storybook-addon-splunk-themes/preview.js +4 -8
  32. package/storybook-addon-splunk-themes/tests/util.unit.js +62 -0
  33. package/storybook-addon-splunk-themes/themeOptions.js +27 -0
  34. package/storybook-addon-splunk-themes/themes.js +4 -15
  35. package/storybook-addon-splunk-themes/util.js +48 -11
  36. package/storybook-addon-splunk-themes/withSplunkTheme.js +83 -11
  37. package/types/enterprise/dark.d.ts +18 -0
  38. package/types/enterprise/light.d.ts +18 -0
  39. package/types/enterprise/prismaAliases.d.ts +0 -6
  40. package/types/prisma/dark.d.ts +12 -6
  41. package/types/prisma/light.d.ts +12 -6
  42. package/types/storybook-addon-splunk-themes/SplunkThemesTool.d.ts +0 -8
  43. package/types/storybook-addon-splunk-themes/tests/util.unit.d.ts +1 -0
  44. package/types/storybook-addon-splunk-themes/themeOptions.d.ts +11 -0
  45. package/types/storybook-addon-splunk-themes/util.d.ts +9 -2
  46. package/useSplunkTheme.js +14 -22
  47. package/utils.js +25 -35
  48. package/variables.js +17 -31
  49. package/withSplunkTheme.js +26 -36
package/CHANGELOG.md CHANGED
@@ -1,9 +1,20 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 0.23.0 - February 5, 2025
5
+ ----------
6
+ Bug Fixes:
7
+ * Added peer dependencies needed to incorporate the themes package standalone (SUI-6874).
8
+
9
+ 0.22.0 - October 1, 2024
10
+ ----------
11
+ New Features:
12
+ * New Status Color tokens for weak and strong variants (SUI-6348).
13
+ * `@splunk/themes/storybook-addon-splunk-themes` now supports showing both versions of a single theme setting side by side (SUI-6281).
14
+
4
15
  0.21.0 - August 26, 2024
5
16
  ----------
6
- New Features:
17
+ New Features:
7
18
  * Prisma `focusColor` transparency removed to increase contrast and meet accessibility requirements (SUI-6519).
8
19
 
9
20
  0.20.0 - August 7, 2024
@@ -1,32 +1,22 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = SplunkThemeProvider;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _styledComponents = require("styled-components");
13
-
14
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
15
-
16
- 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; }
17
-
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
-
20
- 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; }
21
-
22
- 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; }
23
-
24
- 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; }
25
-
26
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
27
-
28
- 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; }
29
-
10
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) { if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } } return n["default"] = e, t && t.set(e, n), n; }
12
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
13
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) { o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
19
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } } return t; }
30
20
  /** SplunkThemeProvider defaults to `prisma` `dark` `comfortable`, unless the properties have already been set.
31
21
  *
32
22
  * For example, here the nested `SplunkThemeProvider` defaults to `enterprise` `light`:
@@ -42,16 +32,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
42
32
  */
43
33
  function SplunkThemeProvider(_ref) {
44
34
  var family = _ref.family,
45
- colorScheme = _ref.colorScheme,
46
- density = _ref.density,
47
- additionalThemeProperties = _ref.additionalThemeProperties,
48
- customizeTheme = _ref.customizeTheme,
49
- otherProps = _objectWithoutProperties(_ref, ["family", "colorScheme", "density", "additionalThemeProperties", "customizeTheme"]);
50
-
35
+ colorScheme = _ref.colorScheme,
36
+ density = _ref.density,
37
+ additionalThemeProperties = _ref.additionalThemeProperties,
38
+ customizeTheme = _ref.customizeTheme,
39
+ otherProps = _objectWithoutProperties(_ref, ["family", "colorScheme", "density", "additionalThemeProperties", "customizeTheme"]);
51
40
  var _ref2 = (0, _react.useContext)(_styledComponents.ThemeContext) || {},
52
- _ref2$splunkThemeV = _ref2.splunkThemeV1,
53
- splunkThemeV1 = _ref2$splunkThemeV === void 0 ? {} : _ref2$splunkThemeV;
54
-
41
+ _ref2$splunkThemeV = _ref2.splunkThemeV1,
42
+ splunkThemeV1 = _ref2$splunkThemeV === void 0 ? {} : _ref2$splunkThemeV;
55
43
  var composedTheme = _objectSpread(_objectSpread({}, additionalThemeProperties), {}, {
56
44
  splunkThemeV1: {
57
45
  family: family || splunkThemeV1.family || 'prisma',
@@ -60,7 +48,6 @@ function SplunkThemeProvider(_ref) {
60
48
  customizer: customizeTheme || splunkThemeV1.customizer
61
49
  }
62
50
  });
63
-
64
51
  return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, _extends({
65
52
  theme: composedTheme
66
53
  }, otherProps));
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  /**
9
8
  * ## Measures
10
9
  * Spacing is used for margin on any element or padding on containers, but can be used for other
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  /**
9
8
  * ## Measures
10
9
  * Spacing is used for margin on any element or padding on containers, but can be used for other
@@ -1,22 +1,18 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports["default"] = void 0;
7
-
8
8
  var _light = _interopRequireDefault(require("./light"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
-
12
- 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; }
13
-
14
- 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; }
15
-
16
- 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; }
17
-
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
15
  var dragHandleDark = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA1SURBVHgB7dKhEQAgDAPAhHmwSKZHYtmHVtZVVNTkXS53UeG57yPYazLmrB8o6h8QgPqBOAOboRAPJUGIOAAAAABJRU5ErkJggg=="; // see babel-plugin-base64-png
19
-
20
16
  var dark = {
21
17
  backgroundColor: _light["default"].gray20,
22
18
  backgroundColorHover: _light["default"].gray30,
@@ -35,13 +31,40 @@ var dark = {
35
31
  focusShadowInset: "inset 0 0 1px 1px ".concat(_light["default"].gray25, ", inset 0 0 0 3px ").concat(_light["default"].focusColor),
36
32
  draggableBackground: "url('data:image/png;base64,".concat(dragHandleDark, "') 0 0 / 8px 8px repeat")
37
33
  };
34
+
35
+ /**
36
+ * ## Status colors
37
+ * Status colors are reserved for communicating urgency and severity associated with data objects and to categorize the visual communication of system responses.
38
+ *
39
+ * @colorSet verbose
40
+ */
41
+ var statusColors = {
42
+ statusColorInfo: _light["default"].infoColorL10,
43
+ statusColorInfoWeak: _light["default"].infoColor,
44
+ statusColorInfoStrong: _light["default"].infoColorL20,
45
+ statusColorNormal: _light["default"].successColorL10,
46
+ statusColorNormalWeak: _light["default"].successColor,
47
+ statusColorNormalStrong: _light["default"].successColorL20,
48
+ statusColorLow: _light["default"].warningColorL10,
49
+ statusColorLowWeak: _light["default"].warningColor,
50
+ statusColorLowStrong: _light["default"].warningColorL20,
51
+ statusColorMedium: _light["default"].alertColorL10,
52
+ statusColorMediumWeak: _light["default"].alertColor,
53
+ statusColorMediumStrong: _light["default"].alertColorL20,
54
+ statusColorHigh: _light["default"].errorColorL10,
55
+ statusColorHighWeak: _light["default"].errorColor,
56
+ statusColorHighStrong: _light["default"].errorColorL20,
57
+ statusColorCritical: _light["default"].errorColorD20,
58
+ statusColorCriticalWeak: _light["default"].errorColorD30,
59
+ statusColorCriticalStrong: _light["default"].errorColorD10
60
+ };
61
+
38
62
  /**
39
63
  * ## Syntax colors
40
64
  * Syntax colors are used only for code blocks.
41
65
  *
42
66
  * @colorSet verbose alphabetical
43
67
  */
44
-
45
68
  var syntaxColors = {
46
69
  syntaxBlue: '#6cd0f0',
47
70
  syntaxBrown: '#fccf87',
@@ -53,20 +76,17 @@ var syntaxColors = {
53
76
  syntaxRed: '#fa94aa',
54
77
  syntaxTeal: '#45d4ba'
55
78
  };
79
+
56
80
  /**
57
81
  * ## Interactive borders
58
82
  *
59
83
  * @borderSet
60
84
  */
61
-
62
85
  var bordersInteractive = {
63
86
  activeBorder: "".concat(dark.borderActiveColor, " double")
64
87
  };
65
-
66
- var theme = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _light["default"]), dark), syntaxColors), bordersInteractive), {}, {
88
+ var theme = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _light["default"]), dark), statusColors), syntaxColors), bordersInteractive), {}, {
67
89
  borderLightColor: _light["default"].gray60 // @deprecated, SUI-5981
68
-
69
90
  });
70
-
71
91
  var _default = theme;
72
92
  exports["default"] = _default;
@@ -4,28 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _light = _interopRequireDefault(require("./light"));
9
-
10
8
  var _dark = _interopRequireDefault(require("./dark"));
11
-
12
9
  var _compact = _interopRequireDefault(require("./compact"));
13
-
14
10
  var _comfortable = _interopRequireDefault(require("./comfortable"));
15
-
16
11
  var _prismaAliases = _interopRequireDefault(require("./prismaAliases"));
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- 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; }
21
-
22
- 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; }
23
-
24
- 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; }
25
-
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
14
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
26
19
  function createEnterpriseTheme(_ref) {
27
20
  var colorScheme = _ref.colorScheme,
28
- density = _ref.density;
21
+ density = _ref.density;
29
22
  var cs = {
30
23
  light: _light["default"],
31
24
  dark: _dark["default"]
@@ -40,6 +33,5 @@ function createEnterpriseTheme(_ref) {
40
33
  });
41
34
  return _objectSpread(_objectSpread(_objectSpread({}, cs), d), pa);
42
35
  }
43
-
44
36
  var _default = createEnterpriseTheme;
45
37
  exports["default"] = _default;
@@ -1,24 +1,21 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports["default"] = void 0;
7
-
8
- 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; }
9
-
10
- 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; }
11
-
12
- 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; }
13
-
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
12
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
13
  var dragHandle = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA2SURBVHgB7dKhEQAgDAPAhDnxDMAcDIBnT1pZV1FRk3e53EWFc+2P4N3DmLN+oKh/QADqB+IMUKEQD/CeueAAAAAASUVORK5CYII="; // see babel-plugin-base64-pngimport {
15
-
16
14
  /**
17
15
  * ## Brand colors
18
16
  *
19
17
  * @colorSet
20
18
  */
21
-
22
19
  var brandColors = {
23
20
  brandColorL50: '#f5fbf5',
24
21
  brandColorL40: '#dff2df',
@@ -32,12 +29,12 @@ var brandColors = {
32
29
  brandColorD40: '#307b30',
33
30
  brandColorD50: '#286728'
34
31
  };
32
+
35
33
  /**
36
34
  * ## Grayscale colors
37
35
  *
38
36
  * @colorSet
39
37
  */
40
-
41
38
  var grays = {
42
39
  white: '#ffffff',
43
40
  gray98: '#f7f8fa',
@@ -52,12 +49,12 @@ var grays = {
52
49
  gray20: '#171d21',
53
50
  black: '#000000'
54
51
  };
52
+
55
53
  /**
56
54
  * ## Accent colors
57
55
  *
58
56
  * @colorSet
59
57
  */
60
-
61
58
  var accentColors = {
62
59
  accentColorL50: '#ecf8ff',
63
60
  accentColorL40: '#bfe9ff',
@@ -71,12 +68,12 @@ var accentColors = {
71
68
  accentColorD40: '#004a71',
72
69
  accentColorD50: '#003d5e'
73
70
  };
71
+
74
72
  /**
75
73
  * ## Error Colors
76
74
  *
77
75
  * @colorSet
78
76
  */
79
-
80
77
  var errorColors = {
81
78
  errorColorL50: '#fcedec',
82
79
  errorColorL40: '#f8dcd9',
@@ -90,12 +87,12 @@ var errorColors = {
90
87
  errorColorD40: '#852d24',
91
88
  errorColorD50: '#6f261d'
92
89
  };
90
+
93
91
  /**
94
92
  * ## Alert colors
95
93
  *
96
94
  * @colorSet
97
95
  * */
98
-
99
96
  var alertColors = {
100
97
  alertColorL50: '#fef3ec',
101
98
  alertColorL40: '#fde6d9',
@@ -109,12 +106,12 @@ var alertColors = {
109
106
  alertColorD40: '#914d1f',
110
107
  alertColorD50: '#79401a'
111
108
  };
109
+
112
110
  /**
113
111
  * ## Warning colors
114
112
  *
115
113
  * @colorSet
116
114
  */
117
-
118
115
  var warningColors = {
119
116
  warningColorL50: '#fff9eb',
120
117
  warningColorL40: '#fef2d7',
@@ -128,12 +125,12 @@ var warningColors = {
128
125
  warningColorD40: '#957312',
129
126
  warningColorD50: '#7d600f'
130
127
  };
128
+
131
129
  /**
132
130
  * ## Success colors
133
131
  *
134
132
  * @colorSet
135
133
  */
136
-
137
134
  var successColors = {
138
135
  successColorL50: '#eef6ee',
139
136
  successColorL40: '#ddecdd',
@@ -147,12 +144,12 @@ var successColors = {
147
144
  successColorD40: '#2f612e',
148
145
  successColorD50: '#275126'
149
146
  };
147
+
150
148
  /**
151
149
  * ## Info colors
152
150
  *
153
151
  * @colorSet
154
152
  */
155
-
156
153
  var infoColors = {
157
154
  infoColorL50: '#e5f0f5',
158
155
  infoColorL40: '#cce2eb',
@@ -166,12 +163,12 @@ var infoColors = {
166
163
  infoColorD40: '#00364d',
167
164
  infoColorD50: '#002b3e'
168
165
  };
166
+
169
167
  /**
170
168
  * ## Diverging colors
171
169
  *
172
170
  * @colorSet alphabetical
173
171
  */
174
-
175
172
  var divergingColors = {
176
173
  diverging1ColorA: '#006d9c',
177
174
  diverging1ColorB: '#ec9960',
@@ -184,12 +181,12 @@ var divergingColors = {
184
181
  diverging5ColorA: '#294e70',
185
182
  diverging5ColorB: '#b6c75a'
186
183
  };
184
+
187
185
  /**
188
186
  * ## Categorical Colors
189
187
  *
190
188
  * @colorSet alphabetical
191
189
  */
192
-
193
190
  var categoricalColors = {
194
191
  cat1Color: '#297ba5',
195
192
  cat1ColorL: '#78b9d6',
@@ -252,12 +249,12 @@ var categoricalColors = {
252
249
  cat30Color: '#184b81',
253
250
  cat30ColorL: '#a4bbe0'
254
251
  };
252
+
255
253
  /**
256
254
  * ## Usage-based colors
257
255
  *
258
256
  * @colorSet verbose
259
257
  */
260
-
261
258
  var usageColors = {
262
259
  textColor: grays.gray30,
263
260
  textGray: '#6b7785',
@@ -273,13 +270,40 @@ var usageColors = {
273
270
  backgroundColor: grays.white,
274
271
  transparent: 'transparent'
275
272
  };
273
+
274
+ /**
275
+ * ## Status colors
276
+ * Status colors are reserved for communicating urgency and severity associated with data objects and to categorize the visual communication of system responses.
277
+ *
278
+ * @colorSet verbose
279
+ */
280
+ var statusColors = {
281
+ statusColorInfo: infoColors.infoColorL10,
282
+ statusColorInfoWeak: infoColors.infoColorL20,
283
+ statusColorInfoStrong: infoColors.infoColor,
284
+ statusColorNormal: successColors.successColorL10,
285
+ statusColorNormalWeak: successColors.successColorL20,
286
+ statusColorNormalStrong: successColors.successColor,
287
+ statusColorLow: warningColors.warningColorL10,
288
+ statusColorLowWeak: warningColors.warningColorL20,
289
+ statusColorLowStrong: warningColors.warningColor,
290
+ statusColorMedium: alertColors.alertColorL10,
291
+ statusColorMediumWeak: alertColors.alertColorL20,
292
+ statusColorMediumStrong: alertColors.alertColor,
293
+ statusColorHigh: errorColors.errorColorL10,
294
+ statusColorHighWeak: errorColors.errorColorL20,
295
+ statusColorHighStrong: errorColors.errorColor,
296
+ statusColorCritical: errorColors.errorColorD20,
297
+ statusColorCriticalWeak: errorColors.errorColorD30,
298
+ statusColorCriticalStrong: errorColors.errorColorD10
299
+ };
300
+
276
301
  /**
277
302
  * ## Syntax colors
278
303
  * The following colors should only be used for syntax coloring of code.
279
304
  *
280
305
  * @colorSet verbose alphabetical
281
306
  */
282
-
283
307
  var syntaxColors = {
284
308
  syntaxBlue: '#006aa3',
285
309
  syntaxBlueLight: '#006d9c',
@@ -295,41 +319,41 @@ var syntaxColors = {
295
319
  syntaxRedLight: '#af575a',
296
320
  syntaxTeal: '#1a7060'
297
321
  };
322
+
298
323
  /**
299
324
  * ## Shadows
300
325
  *
301
326
  * @shadowSet
302
327
  */
303
-
304
328
  var shadows = {
305
329
  focusShadow: "0 0 1px 3px ".concat(usageColors.focusColor),
306
330
  focusShadowInset: "inset 0 0 1px 1px ".concat(grays.white, ", inset 0 0 0 3px ").concat(usageColors.focusColor),
307
331
  overlayShadow: '0 4px 8px rgba(0, 0, 0, 0.2)'
308
332
  };
333
+
309
334
  /**
310
335
  * ## Interactive borders
311
336
  *
312
337
  * @borderSet
313
338
  */
314
-
315
339
  var bordersInteractive = {
316
340
  activeBorder: "".concat(usageColors.borderActiveColor, " double")
317
341
  };
342
+
318
343
  /**
319
344
  * ## Backgrounds
320
345
  *
321
346
  * @colorSet verbose
322
347
  */
323
-
324
348
  var backgrounds = {
325
349
  draggableBackground: "url('data:image/png;base64,".concat(dragHandle, "') 0 0 / 8px 8px repeat")
326
350
  };
351
+
327
352
  /**
328
353
  * ## Border
329
354
  *
330
355
  * @valueSet
331
356
  */
332
-
333
357
  var borders = {
334
358
  border: "1px solid ".concat(usageColors.borderColor)
335
359
  };
@@ -339,13 +363,13 @@ var sansFontFamily = "'Splunk Platform Sans', 'Proxima Nova', Roboto, Droid, 'He
339
363
  *
340
364
  * @valueSet
341
365
  */
342
-
343
366
  var fontFamily = {
344
367
  sansFontFamily: sansFontFamily,
345
368
  serifFontFamily: "Georgia, 'Times New Roman', Times, serif",
346
369
  monoFontFamily: "'Splunk Platform Mono', Inconsolata, Consolas, 'Droid Sans Mono', Monaco, 'Courier New', Courier, monospace",
347
370
  fontFamily: sansFontFamily
348
371
  };
372
+
349
373
  /**
350
374
  * ## Font weights
351
375
  *
@@ -353,7 +377,6 @@ var fontFamily = {
353
377
  *
354
378
  * @valueSet
355
379
  */
356
-
357
380
  var fontWeights = {
358
381
  fontWeightLight: 300,
359
382
  fontWeightNormal: 400,
@@ -362,13 +385,13 @@ var fontWeights = {
362
385
  fontWeightHeavy: 800,
363
386
  fontWeightExtraBold: 900
364
387
  };
388
+
365
389
  /**
366
390
  * ## Layers
367
391
  * If a variable does not suit your purpose, set a value relatively, such as zindexModal +1.
368
392
  *
369
393
  * @valueSet
370
394
  */
371
-
372
395
  var zindexes = {
373
396
  zindexLayer: 1000,
374
397
  zindexFixedNavbar: 1030,
@@ -377,11 +400,8 @@ var zindexes = {
377
400
  zindexPopover: 1060,
378
401
  zindexToastMessages: 2000
379
402
  };
380
-
381
- var theme = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, brandColors), grays), accentColors), errorColors), alertColors), warningColors), successColors), infoColors), categoricalColors), divergingColors), syntaxColors), fontFamily), fontWeights), usageColors), backgrounds), shadows), bordersInteractive), borders), zindexes), {}, {
403
+ var theme = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, brandColors), grays), accentColors), errorColors), alertColors), warningColors), successColors), infoColors), categoricalColors), divergingColors), statusColors), syntaxColors), fontFamily), fontWeights), usageColors), backgrounds), shadows), bordersInteractive), borders), zindexes), {}, {
382
404
  borderLightColor: grays.gray92 // @deprecated SUI-5981
383
-
384
405
  });
385
-
386
406
  var _default = theme;
387
407
  exports["default"] = _default;
@@ -4,23 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _tinycolor = _interopRequireDefault(require("tinycolor2"));
9
-
10
8
  var _light = _interopRequireDefault(require("./light"));
11
-
12
9
  var _dark = _interopRequireDefault(require("./dark"));
13
-
14
10
  var _compact = _interopRequireDefault(require("./compact"));
15
-
16
11
  var _comfortable = _interopRequireDefault(require("./comfortable"));
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
20
13
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
21
14
  function createPrismaAliases(_ref) {
22
15
  var colorScheme = _ref.colorScheme,
23
- density = _ref.density;
16
+ density = _ref.density;
24
17
  var cs = {
25
18
  light: _light["default"],
26
19
  dark: _dark["default"]
@@ -29,6 +22,7 @@ function createPrismaAliases(_ref) {
29
22
  compact: _compact["default"],
30
23
  comfortable: _comfortable["default"]
31
24
  }[density];
25
+
32
26
  /**
33
27
  * # Prisma Aliases
34
28
  * The following aliases for prisma variables are provided for convenience. Just because an alias is provided,
@@ -55,18 +49,11 @@ function createPrismaAliases(_ref) {
55
49
  *
56
50
  * @valueSet
57
51
  */
58
-
59
52
  var prismaAliases = {
60
53
  accentColorPositive: cs.successColor,
61
54
  accentColorWarning: cs.warningColor,
62
55
  accentColorAlert: cs.alertColor,
63
56
  accentColorNegative: cs.errorColor,
64
- statusColorInfo: cs.infoColorL10,
65
- statusColorNormal: cs.successColorL10,
66
- statusColorLow: cs.warningColorL10,
67
- statusColorMedium: cs.alertColorL10,
68
- statusColorHigh: cs.errorColorL10,
69
- statusColorCritical: cs.errorColorD20,
70
57
  embossShadow: cs.overlayShadow,
71
58
  dragShadow: cs.overlayShadow,
72
59
  modalShadow: cs.overlayShadow,
@@ -104,6 +91,5 @@ function createPrismaAliases(_ref) {
104
91
  };
105
92
  return prismaAliases;
106
93
  }
107
-
108
94
  var _default = createPrismaAliases;
109
95
  exports["default"] = _default;