@splunk/themes 1.2.1 → 1.4.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  Change Log
2
2
  ============
3
+ 1.4.0 - November 4, 2025
4
+ ----------
5
+ New Features:
6
+ * New `contentColorLinkDisabled`, `contentColorLinkVisited`, and `contentColorLinkVisitedDisabled` tokens (SUI-8244).
7
+
8
+ 1.3.0 - October 7, 2025
9
+ ----------
10
+ New Features:
11
+ * New `actionColorContent*` tokens (SUI-8101).
12
+ * `@splunk/themes/storybook-addon-splunk-themes` now supports enabling the Splunk Magnetic theme family as an option by using the `enableSplunkMagneticOption` storybook param (SUI-8283).
13
+
14
+ Bug Fixes:
15
+ * Fix incorrect action content colors in Magnetic theme customizer (SUI-8101).
16
+
17
+ Deprecations:
18
+ * `contentColorInfo`, `contentColorNegativeStrong`, `contentColorPositive` and `contentColorWarning` have been deprecated (SUI-8251)
19
+ * `@splunk/themes/storybook-addon-splunk-themes`'s `disableDualTheme` storybook param is deprecated, use `disableMultiThemeOptions` instead (SUI-8283).
20
+ * `@splunk/themes/storybook-addon-splunk-themes`'s theme configuration options `both` value deprecated, use `all` instead (SUI-8283).
3
21
 
4
22
  1.2.1 - September 2, 2025
5
23
  ----------
@@ -130,7 +130,91 @@ var actionColors = {
130
130
  /**
131
131
  * Hover border color for Destructive Secondary Buttons.
132
132
  */
133
- actionColorBorderDestructiveSecondaryHover: ''
133
+ actionColorBorderDestructiveSecondaryHover: '',
134
+ /**
135
+ * Default text color for Primary Buttons.
136
+ *
137
+ * @categoryFont
138
+ */
139
+ actionColorContentPrimary: '',
140
+ /**
141
+ * Disabled text color for Primary Buttons.
142
+ *
143
+ * @categoryFont
144
+ */
145
+ actionColorContentPrimaryDisabled: '',
146
+ /**
147
+ * Default text color for Secondary Buttons.
148
+ *
149
+ * @categoryFont
150
+ */
151
+ actionColorContentSecondary: '',
152
+ /**
153
+ * Disabled text color for Secondary Buttons.
154
+ *
155
+ * @categoryFont
156
+ */
157
+ actionColorContentSecondaryDisabled: '',
158
+ /**
159
+ * Active text color for Subtle Buttons.
160
+ *
161
+ * @categoryFont
162
+ */
163
+ actionColorContentSubtleActive: '',
164
+ /**
165
+ * Hover text color for Subtle Buttons.
166
+ *
167
+ * @categoryFont
168
+ */
169
+ actionColorContentSubtleHover: '',
170
+ /**
171
+ * Default text color for Standalone Buttons.
172
+ *
173
+ * @categoryFont
174
+ */
175
+ actionColorContentStandalone: '',
176
+ /**
177
+ * Active (pressed) text color for Standalone Buttons.
178
+ *
179
+ * @categoryFont
180
+ */
181
+ actionColorContentStandaloneActive: '',
182
+ /**
183
+ * Disabled text color for Standalone Buttons.
184
+ *
185
+ * @categoryFont
186
+ */
187
+ actionColorContentStandaloneDisabled: '',
188
+ /**
189
+ * Hover text color for Standalone Buttons.
190
+ *
191
+ * @categoryFont
192
+ */
193
+ actionColorContentStandaloneHover: '',
194
+ /**
195
+ * Default text color for Destructive Buttons.
196
+ *
197
+ * @categoryFont
198
+ */
199
+ actionColorContentDestructive: '',
200
+ /**
201
+ * Disabled text color for Destructive Buttons.
202
+ *
203
+ * @categoryFont
204
+ */
205
+ actionColorContentDestructiveDisabled: '',
206
+ /**
207
+ * Default text color for Destructive Secondary Buttons.
208
+ *
209
+ * @categoryFont
210
+ */
211
+ actionColorContentDestructiveSecondary: '',
212
+ /**
213
+ * Disabled text color for Destructive Secondary Buttons.
214
+ *
215
+ * @categoryFont
216
+ */
217
+ actionColorContentDestructiveSecondaryDisabled: ''
134
218
  };
135
219
 
136
220
  /**
@@ -301,6 +385,18 @@ var contentColors = {
301
385
  * Text color for links.
302
386
  */
303
387
  contentColorLink: '',
388
+ /**
389
+ * Text color for visited links.
390
+ */
391
+ contentColorLinkVisited: '',
392
+ /**
393
+ * Text color for disabled links.
394
+ */
395
+ contentColorLinkDisabled: '',
396
+ /**
397
+ * Text color for visited links in a disabled state.
398
+ */
399
+ contentColorLinkVisitedDisabled: '',
304
400
  /**
305
401
  * Brand accent text color.
306
402
  */
@@ -325,10 +421,6 @@ var contentColors = {
325
421
  * Text color for disabled content that does not pass 4.5:1 contrast.
326
422
  */
327
423
  contentColorDisabled: '',
328
- /**
329
- * Text color used to convey informational context or status.
330
- */
331
- contentColorInfo: '',
332
424
  /**
333
425
  * Text color used on top of inverted backgrounds.
334
426
  */
@@ -341,22 +433,10 @@ var contentColors = {
341
433
  * Text color for error or negative status messaging.
342
434
  */
343
435
  contentColorNegative: '',
344
- /**
345
- * Stronger negative text color for greater emphasis.
346
- */
347
- contentColorNegativeStrong: '',
348
436
  /**
349
437
  * Disabled negative text color that does not pass 4.5:1 contrast.
350
438
  */
351
- contentColorNegativeWeak: '',
352
- /**
353
- * Text color for success or positive status messaging.
354
- */
355
- contentColorPositive: '',
356
- /**
357
- * Text color for cautionary or warning status messaging.
358
- */
359
- contentColorWarning: ''
439
+ contentColorNegativeWeak: ''
360
440
  };
361
441
 
362
442
  /**
@@ -16,6 +16,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
16
16
  * @categoryValue
17
17
  */
18
18
  var deprecated = {
19
+ contentColorInfo: '',
20
+ contentColorWarning: '',
21
+ contentColorPositive: '',
22
+ contentColorNegativeStrong: '',
19
23
  /**
20
24
  * Use a more specific token based on the semantic use case:
21
25
  * [`interactiveColorAccent`](#interactiveColorAccent), [`contentColorAccent`](#contentColorAccent), or [`focusColor`](#focusColor).
@@ -63,13 +63,12 @@ var contentColors = {
63
63
  contentColorAccent: '#20ac33',
64
64
  contentColorAccentStrong: '#a4e9ae',
65
65
  contentColorAccentWeak: '#0b4613',
66
- contentColorInfo: '#66a7c4',
67
66
  contentColorNegative: '#e37267',
68
- contentColorNegativeStrong: '#ffa69e',
69
67
  contentColorNegativeWeak: '#562a25',
70
- contentColorPositive: '#7ecd7e',
71
- contentColorWarning: '#f8be34',
72
- contentColorLink: _light["default"].accentColorL10
68
+ contentColorLink: _light["default"].accentColorL10,
69
+ contentColorLinkDisabled: _light["default"].accentColorD30,
70
+ contentColorLinkVisited: '#a974f7',
71
+ contentColorLinkVisitedDisabled: '#6732b8'
73
72
  };
74
73
  var actionColors = {
75
74
  actionColorBackgroundPrimary: '#1a8929',
@@ -99,7 +98,21 @@ var actionColors = {
99
98
  actionColorBorderDestructiveSecondary: '#ff776b',
100
99
  actionColorBorderDestructiveSecondaryActive: '#ff8a80',
101
100
  actionColorBorderDestructiveSecondaryDisabled: '#562a25',
102
- actionColorBorderDestructiveSecondaryHover: '#ff8a80'
101
+ actionColorBorderDestructiveSecondaryHover: '#ff8a80',
102
+ actionColorContentPrimary: contentColors.contentColorInverted,
103
+ actionColorContentPrimaryDisabled: contentColors.contentColorInverted,
104
+ actionColorContentSecondary: contentColors.contentColorActive,
105
+ actionColorContentSecondaryDisabled: contentColors.contentColorDisabled,
106
+ actionColorContentSubtleActive: contentColors.contentColorAccentStrong,
107
+ actionColorContentSubtleHover: contentColors.contentColorAccentStrong,
108
+ actionColorContentStandalone: contentColors.contentColorAccent,
109
+ actionColorContentStandaloneActive: contentColors.contentColorAccentStrong,
110
+ actionColorContentStandaloneDisabled: contentColors.contentColorAccentWeak,
111
+ actionColorContentStandaloneHover: contentColors.contentColorAccentStrong,
112
+ actionColorContentDestructive: contentColors.contentColorInverted,
113
+ actionColorContentDestructiveDisabled: contentColors.contentColorInverted,
114
+ actionColorContentDestructiveSecondary: contentColors.contentColorNegative,
115
+ actionColorContentDestructiveSecondaryDisabled: contentColors.contentColorNegativeWeak
103
116
  };
104
117
  var interactiveColors = {
105
118
  interactiveColorBorder: _light["default"].gray60,
@@ -150,6 +163,11 @@ var shadows = {
150
163
  modalShadow: '0px 50px 200px #000000, 0px 29px 66px rgba(0, 0, 0, 0.41), 0px 14px 47px rgba(0, 0, 0, 0.17), 0px 5px 10px rgba(0, 0, 0, 0.15)'
151
164
  };
152
165
  var deprecated = {
166
+ contentColorInfo: '#66a7c4',
167
+ // @deprecated, SUI-8251
168
+ contentColorNegativeStrong: '#ffa69e',
169
+ contentColorPositive: '#7ecd7e',
170
+ contentColorWarning: '#f8be34',
153
171
  backgroundColor: _light["default"].gray20,
154
172
  // @deprecated SUI-6656
155
173
  backgroundColorHover: _light["default"].gray30,
@@ -32,6 +32,7 @@ var deprecatedEnterpriseColors = {
32
32
  errorColor: '#dc4e41',
33
33
  accentColorD10: '#006eaa',
34
34
  accentColor: '#007abd',
35
+ accentColorL30: '#7ed2ff',
35
36
  infoColor: '#006d9c',
36
37
  infoColorL10: '#338ab0',
37
38
  infoColorD10: '#00577c',
@@ -128,13 +129,12 @@ var contentColors = {
128
129
  contentColorAccent: '#1a8929',
129
130
  contentColorAccentStrong: '#0d4515',
130
131
  contentColorAccentWeak: '#b5e3b5',
131
- contentColorInfo: '#006d9c',
132
132
  contentColorNegative: '#c84535',
133
- contentColorNegativeStrong: '#812d22',
134
133
  contentColorNegativeWeak: '#f5aca3',
135
- contentColorPositive: '#307b30',
136
- contentColorWarning: '#7d600f',
137
- contentColorLink: deprecatedEnterpriseColors.accentColorD10
134
+ contentColorLink: deprecatedEnterpriseColors.accentColorD10,
135
+ contentColorLinkDisabled: deprecatedEnterpriseColors.accentColorL30,
136
+ contentColorLinkVisited: '#864ae0',
137
+ contentColorLinkVisitedDisabled: '#e0ccff'
138
138
  };
139
139
  var actionColors = {
140
140
  actionColorBackgroundPrimary: '#1a8929',
@@ -164,7 +164,21 @@ var actionColors = {
164
164
  actionColorBorderDestructiveSecondary: '#c84535',
165
165
  actionColorBorderDestructiveSecondaryActive: '#a1382b',
166
166
  actionColorBorderDestructiveSecondaryDisabled: '#f5aca3',
167
- actionColorBorderDestructiveSecondaryHover: '#a1382b'
167
+ actionColorBorderDestructiveSecondaryHover: '#a1382b',
168
+ actionColorContentPrimary: contentColors.contentColorInverted,
169
+ actionColorContentPrimaryDisabled: contentColors.contentColorInverted,
170
+ actionColorContentSecondary: contentColors.contentColorActive,
171
+ actionColorContentSecondaryDisabled: contentColors.contentColorDisabled,
172
+ actionColorContentSubtleActive: contentColors.contentColorAccentStrong,
173
+ actionColorContentSubtleHover: contentColors.contentColorAccentStrong,
174
+ actionColorContentStandalone: contentColors.contentColorAccent,
175
+ actionColorContentStandaloneActive: contentColors.contentColorAccentStrong,
176
+ actionColorContentStandaloneDisabled: contentColors.contentColorAccentWeak,
177
+ actionColorContentStandaloneHover: contentColors.contentColorAccentStrong,
178
+ actionColorContentDestructive: contentColors.contentColorInverted,
179
+ actionColorContentDestructiveDisabled: contentColors.contentColorInverted,
180
+ actionColorContentDestructiveSecondary: contentColors.contentColorNegative,
181
+ actionColorContentDestructiveSecondaryDisabled: contentColors.contentColorNegativeWeak
168
182
  };
169
183
  var interactiveColors = {
170
184
  interactiveColorBorder: deprecatedEnterpriseColors.gray60,
@@ -222,6 +236,11 @@ var zindexes = {
222
236
  zindexToastMessages: 2000
223
237
  };
224
238
  var deprecated = {
239
+ contentColorInfo: '#006d9c',
240
+ // @eprecated, SUI-8251
241
+ contentColorNegativeStrong: '#812d22',
242
+ contentColorPositive: '#307b30',
243
+ contentColorWarning: '#7d600f',
225
244
  backgroundColor: neutralColors.white,
226
245
  // @deprecated SUI-6656
227
246
  backgroundColorHover: deprecatedEnterpriseColors.gray96,
@@ -255,7 +274,6 @@ var deprecated = {
255
274
  gray20: '#171d21',
256
275
  accentColorL50: '#ecf8ff',
257
276
  accentColorL40: '#bfe9ff',
258
- accentColorL30: '#7ed2ff',
259
277
  accentColorL20: '#3ebcff',
260
278
  accentColorL10: '#00a4fd',
261
279
  accentColorD20: '#006297',
package/index.js CHANGED
@@ -14,7 +14,14 @@ var _exportNames = {
14
14
  useSplunkTheme: true,
15
15
  withSplunkTheme: true,
16
16
  variables: true,
17
- clearAllCaches: true
17
+ clearAllCaches: true,
18
+ unstable_designTokens: true,
19
+ unstable_designTokensColors: true,
20
+ unstable_designTokensDataViz: true,
21
+ unstable_designTokensDeprecated: true,
22
+ unstable_designTokensElevation: true,
23
+ unstable_designTokensSpacingSizing: true,
24
+ unstable_designTokensTypography: true
18
25
  };
19
26
  Object.defineProperty(exports, "getSettingsFromThemedProps", {
20
27
  enumerable: true,
@@ -82,6 +89,48 @@ Object.defineProperty(exports, "clearAllCaches", {
82
89
  return _clearAllCaches.clearAllCaches;
83
90
  }
84
91
  });
92
+ Object.defineProperty(exports, "unstable_designTokens", {
93
+ enumerable: true,
94
+ get: function get() {
95
+ return _designTokens["default"];
96
+ }
97
+ });
98
+ Object.defineProperty(exports, "unstable_designTokensColors", {
99
+ enumerable: true,
100
+ get: function get() {
101
+ return _colors["default"];
102
+ }
103
+ });
104
+ Object.defineProperty(exports, "unstable_designTokensDataViz", {
105
+ enumerable: true,
106
+ get: function get() {
107
+ return _dataViz["default"];
108
+ }
109
+ });
110
+ Object.defineProperty(exports, "unstable_designTokensDeprecated", {
111
+ enumerable: true,
112
+ get: function get() {
113
+ return _deprecated["default"];
114
+ }
115
+ });
116
+ Object.defineProperty(exports, "unstable_designTokensElevation", {
117
+ enumerable: true,
118
+ get: function get() {
119
+ return _elevation["default"];
120
+ }
121
+ });
122
+ Object.defineProperty(exports, "unstable_designTokensSpacingSizing", {
123
+ enumerable: true,
124
+ get: function get() {
125
+ return _spacingSizing["default"];
126
+ }
127
+ });
128
+ Object.defineProperty(exports, "unstable_designTokensTypography", {
129
+ enumerable: true,
130
+ get: function get() {
131
+ return _typography["default"];
132
+ }
133
+ });
85
134
  var _getSettingsFromThemedProps = _interopRequireDefault(require("./getSettingsFromThemedProps"));
86
135
  var _getTheme = _interopRequireDefault(require("./getTheme"));
87
136
  var _mixins = _interopRequireDefault(require("./mixins"));
@@ -104,4 +153,11 @@ Object.keys(_types).forEach(function (key) {
104
153
  }
105
154
  });
106
155
  });
156
+ var _designTokens = _interopRequireDefault(require("./design-tokens"));
157
+ var _colors = _interopRequireDefault(require("./design-tokens/colors"));
158
+ var _dataViz = _interopRequireDefault(require("./design-tokens/dataViz"));
159
+ var _deprecated = _interopRequireDefault(require("./design-tokens/deprecated"));
160
+ var _elevation = _interopRequireDefault(require("./design-tokens/elevation"));
161
+ var _spacingSizing = _interopRequireDefault(require("./design-tokens/spacing-sizing"));
162
+ var _typography = _interopRequireDefault(require("./design-tokens/typography"));
107
163
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
package/mixins/prose.js CHANGED
@@ -9,7 +9,7 @@ var _variables = _interopRequireDefault(require("../variables"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  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); }
11
11
  function _templateObject() {
12
- var data = _taggedTemplateLiteral(["\n /* TODO: should this also be a variable? */\n min-width: 34ch;\n max-width: ", ";\n\n /*\n * Word spacing: 0.16em\n * Letter spacing (i.e., tracking): 0.12em\n */\n\n /*\n * Style all block-level elements to be 1.5 margin-bottom by default\n * wcag requirement 1.4.12\n */\n & *:is(", "):not(:last-child) {\n margin-block-end: 1lh;\n }\n\n /*\n * Separate h1 and h2 into individual rules to avoid ts-styled-plugin\u2019s parser\n * error on comma-separated, multi-line interpolations at the start of a selector.\n */\n ", ":where(h1):not(:first-child){\n margin-block-start: 1lh;\n }\n\n ", ":where(h2):not(:first-child) {\n margin-block-start: 1lh;\n }\n\n ", ":where(img) {\n max-width: 100%;\n }\n\n ", ":where(ol), ", ":where(ul) {\n padding-inline-start: 2rem;\n }\n "]);
12
+ var data = _taggedTemplateLiteral(["\n /* TODO: should this also be a variable? */\n min-width: 34ch;\n max-width: ", ";\n\n /*\n * Word spacing: 0.16em\n * Letter spacing (i.e., tracking): 0.12em\n */\n\n /*\n * Style all block-level elements to be 1.5 margin-bottom by default\n * wcag requirement 1.4.12\n */\n & *:is(", "):not(:last-child) {\n margin-block-end: 1lh;\n }\n\n /*\n * Separate h1 and h2 into individual rules to avoid ts-styled-plugin\u2019s parser\n * error on comma-separated, multi-line interpolations at the start of a selector.\n */\n ", ":where(h1):not(:first-child) {\n margin-block-start: 1lh;\n }\n\n ", ":where(h2):not(:first-child) {\n margin-block-start: 1lh;\n }\n\n ", ":where(img) {\n max-width: 100%;\n }\n\n ", ":where(ol), ", ":where(ul) {\n padding-inline-start: 2rem;\n }\n "]);
13
13
  _templateObject = function _templateObject() {
14
14
  return data;
15
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splunk/themes",
3
- "version": "1.2.1",
3
+ "version": "1.4.0",
4
4
  "description": "Theme variables and mixins for the Splunk design language",
5
5
  "main": "./index.js",
6
6
  "types": "./types/index.d.ts",
@@ -14,6 +14,7 @@
14
14
  "docs:start:external": "webpack serve --config docs.gen.webpack.config.js",
15
15
  "lint": "eslint src --ext \".ts,.tsx,.js,.jsx\"",
16
16
  "lint:ci": "yarn run lint -- -f junit -o test-reports/lint-results.xml",
17
+ "lint:fix": "yarn run lint --fix",
17
18
  "start": "yarn babel --watch",
18
19
  "test": "jest",
19
20
  "test:watch": "jest --watch",
@@ -78,7 +79,7 @@
78
79
  "@storybook/manager-api": "^7.6.20",
79
80
  "@storybook/react": "^7.6.20",
80
81
  "@storybook/theming": "^7.6.20",
81
- "@testing-library/dom": "^10.4.0",
82
+ "@testing-library/dom": "^10.4.1",
82
83
  "@testing-library/jest-dom": "^6.6.3",
83
84
  "@testing-library/react": "^16.3.0",
84
85
  "@types/react": "^18.2.0",
@@ -92,11 +93,14 @@
92
93
  "eslint-config-prettier": "^9.1.0",
93
94
  "eslint-import-resolver-webpack": "^0.13.4",
94
95
  "eslint-plugin-import": "^2.30.1",
96
+ "eslint-plugin-jest": "^28.8.3",
97
+ "eslint-plugin-jest-dom": "^5.4.0",
95
98
  "eslint-plugin-jsx-a11y": "^6.10.0",
96
99
  "eslint-plugin-react": "^7.36.1",
97
100
  "eslint-plugin-react-hooks": "^4.6.2",
98
- "jest": "^29.7.0",
99
- "jest-environment-jsdom": "^29.7.0",
101
+ "eslint-plugin-testing-library": "^6.3.0",
102
+ "jest": "^30.1.3",
103
+ "jest-environment-jsdom": "^30.1.2",
100
104
  "jest-styled-components": "^7.0.8",
101
105
  "react": "^18.2.0",
102
106
  "styled-components": "^5.3.10",
package/prisma/dark.js CHANGED
@@ -34,15 +34,14 @@ var contentColors = {
34
34
  contentColorActive: '#fafafa',
35
35
  contentColorDefault: '#b5b5b5',
36
36
  contentColorDisabled: '#6b6b6b',
37
- contentColorInfo: '#61cafa',
38
37
  contentColorInverted: '#000000',
39
38
  contentColorMuted: '#909090',
40
39
  contentColorNegative: '#ff5252',
41
- contentColorNegativeStrong: '#ff9e9e',
42
40
  contentColorNegativeWeak: '#561a1a',
43
- contentColorPositive: '#85f415',
44
- contentColorWarning: '#f49106',
45
- contentColorLink: '#3993ff'
41
+ contentColorLink: '#3993ff',
42
+ contentColorLinkDisabled: '#14437b',
43
+ contentColorLinkVisited: '#a974f7',
44
+ contentColorLinkVisitedDisabled: '#6732B8'
46
45
  };
47
46
  var actionColors = {
48
47
  actionColorBackgroundPrimary: '#3993ff',
@@ -72,7 +71,21 @@ var actionColors = {
72
71
  actionColorBorderDestructiveSecondary: '#ff4242',
73
72
  actionColorBorderDestructiveSecondaryActive: '#ff6b6b',
74
73
  actionColorBorderDestructiveSecondaryDisabled: '#561a1a',
75
- actionColorBorderDestructiveSecondaryHover: '#ff6b6b'
74
+ actionColorBorderDestructiveSecondaryHover: '#ff6b6b',
75
+ actionColorContentPrimary: contentColors.contentColorInverted,
76
+ actionColorContentPrimaryDisabled: contentColors.contentColorInverted,
77
+ actionColorContentSecondary: contentColors.contentColorActive,
78
+ actionColorContentSecondaryDisabled: contentColors.contentColorDisabled,
79
+ actionColorContentSubtleActive: contentColors.contentColorAccentStrong,
80
+ actionColorContentSubtleHover: contentColors.contentColorAccentStrong,
81
+ actionColorContentStandalone: contentColors.contentColorAccent,
82
+ actionColorContentStandaloneActive: contentColors.contentColorAccentStrong,
83
+ actionColorContentStandaloneDisabled: contentColors.contentColorAccentWeak,
84
+ actionColorContentStandaloneHover: contentColors.contentColorAccentStrong,
85
+ actionColorContentDestructive: contentColors.contentColorInverted,
86
+ actionColorContentDestructiveDisabled: contentColors.contentColorInverted,
87
+ actionColorContentDestructiveSecondary: contentColors.contentColorNegative,
88
+ actionColorContentDestructiveSecondaryDisabled: contentColors.contentColorNegativeWeak
76
89
  };
77
90
  var interactiveColors = {
78
91
  interactiveColorBorder: 'rgba(255, 255, 255, 0.5)',
@@ -144,6 +157,11 @@ var syntaxColors = {
144
157
  syntaxTeal: '#45d4ba'
145
158
  };
146
159
  var deprecated = {
160
+ contentColorInfo: '#61cafa',
161
+ // @deprecated, SUI-8251
162
+ contentColorNegativeStrong: '#ff9e9e',
163
+ contentColorPositive: '#85f415',
164
+ contentColorWarning: '#f49106',
147
165
  accentColorPositive: '#85f415',
148
166
  // statusColorNormal
149
167
  accentColorWarning: '#f49106',
package/prisma/light.js CHANGED
@@ -34,15 +34,14 @@ var contentColors = {
34
34
  contentColorActive: '#2c2c2c',
35
35
  contentColorDefault: '#4d4d4d',
36
36
  contentColorDisabled: '#878787',
37
- contentColorInfo: '#006be5',
38
37
  contentColorInverted: '#ffffff',
39
38
  contentColorMuted: '#6b6b6b',
40
39
  contentColorNegative: '#e00000',
41
- contentColorNegativeStrong: '#7a0000',
42
40
  contentColorNegativeWeak: '#ff9999',
43
- contentColorPositive: '#407a06',
44
- contentColorWarning: '#c97705',
45
- contentColorLink: '#0264d7'
41
+ contentColorLink: '#0264d7',
42
+ contentColorLinkDisabled: '#b3d6fe',
43
+ contentColorLinkVisited: '#864ae0',
44
+ contentColorLinkVisitedDisabled: '#e0ccff'
46
45
  };
47
46
  var actionColors = {
48
47
  actionColorBackgroundPrimary: '#0264d7',
@@ -72,7 +71,21 @@ var actionColors = {
72
71
  actionColorBorderDestructiveSecondary: '#e00000',
73
72
  actionColorBorderDestructiveSecondaryActive: '#a30000',
74
73
  actionColorBorderDestructiveSecondaryDisabled: '#ff9999',
75
- actionColorBorderDestructiveSecondaryHover: '#a30000'
74
+ actionColorBorderDestructiveSecondaryHover: '#a30000',
75
+ actionColorContentPrimary: contentColors.contentColorInverted,
76
+ actionColorContentPrimaryDisabled: contentColors.contentColorInverted,
77
+ actionColorContentSecondary: contentColors.contentColorActive,
78
+ actionColorContentSecondaryDisabled: contentColors.contentColorDisabled,
79
+ actionColorContentSubtleActive: contentColors.contentColorAccentStrong,
80
+ actionColorContentSubtleHover: contentColors.contentColorAccentStrong,
81
+ actionColorContentStandalone: contentColors.contentColorAccent,
82
+ actionColorContentStandaloneActive: contentColors.contentColorAccentStrong,
83
+ actionColorContentStandaloneDisabled: contentColors.contentColorAccentWeak,
84
+ actionColorContentStandaloneHover: contentColors.contentColorAccentStrong,
85
+ actionColorContentDestructive: contentColors.contentColorInverted,
86
+ actionColorContentDestructiveDisabled: contentColors.contentColorInverted,
87
+ actionColorContentDestructiveSecondary: contentColors.contentColorNegative,
88
+ actionColorContentDestructiveSecondaryDisabled: contentColors.contentColorNegativeWeak
76
89
  };
77
90
  var interactiveColors = {
78
91
  interactiveColorBorder: 'rgba(0, 0, 0, 0.48)',
@@ -144,6 +157,11 @@ var syntaxColors = {
144
157
  syntaxTeal: '#1b7464'
145
158
  };
146
159
  var deprecated = {
160
+ contentColorInfo: '#006be5',
161
+ // @deprecated, SUI-8251
162
+ contentColorNegativeStrong: '#7a0000',
163
+ contentColorPositive: '#407a06',
164
+ contentColorWarning: '#c97705',
147
165
  accentColorPositive: '#407a06',
148
166
  // statusColorNormal
149
167
  accentColorWarning: '#c97705',
@@ -128,6 +128,20 @@ var splunkMagneticThemeCustomizer = function splunkMagneticThemeCustomizer(curre
128
128
  actionColorDestructive: pickMagnetic('negative-bg-default'),
129
129
  actionColorDestructiveStrong: pickMagnetic('negative-bg-strong-default'),
130
130
  actionColorDestructiveWeak: pickMagnetic('negative-bg-weak-default'),
131
+ actionColorContentPrimary: pickMagnetic('interact-text-in-default'),
132
+ actionColorContentPrimaryDisabled: pickMagnetic('interact-text-in-disabled'),
133
+ actionColorContentSecondary: pickMagnetic('interact-text-default'),
134
+ actionColorContentSecondaryDisabled: pickMagnetic('interact-text-disabled'),
135
+ actionColorContentSubtleActive: pickMagnetic('interact-text-active'),
136
+ actionColorContentSubtleHover: pickMagnetic('interact-text-hover'),
137
+ actionColorContentStandalone: pickMagnetic('interact-text-default'),
138
+ actionColorContentStandaloneActive: pickMagnetic('interact-text-active'),
139
+ actionColorContentStandaloneDisabled: pickMagnetic('interact-text-disabled'),
140
+ actionColorContentStandaloneHover: pickMagnetic('interact-text-hover'),
141
+ actionColorContentDestructive: pickMagnetic('negative-text-in-default'),
142
+ actionColorContentDestructiveDisabled: pickMagnetic('negative-text-in-disabled'),
143
+ actionColorContentDestructiveSecondary: pickMagnetic('negative-text-default'),
144
+ actionColorContentDestructiveSecondaryDisabled: pickMagnetic('negative-text-disabled'),
131
145
  backgroundColorDialog: pickMagnetic('control-bg-weak-default'),
132
146
  backgroundColorInverted: pickMagnetic('inverse-bg-default'),
133
147
  backgroundColorPage: pickMagnetic('base-bg-default'),
@@ -142,8 +156,8 @@ var splunkMagneticThemeCustomizer = function splunkMagneticThemeCustomizer(curre
142
156
  borderRadius: '6px',
143
157
  contentColorActive: pickMagnetic('base-text-default'),
144
158
  contentColorDefault: pickMagnetic('base-text-default'),
145
- contentColorDisabled: pickMagnetic('interact-text-in-disabled'),
146
- contentColorInverted: pickMagnetic('interact-text-in-default'),
159
+ contentColorDisabled: pickMagnetic('base-text-disabled'),
160
+ contentColorInverted: pickMagnetic('base-text-in-default'),
147
161
  contentColorMuted: pickMagnetic('base-text-weak-default'),
148
162
  contentColorNegative: pickMagnetic('negative-text-default'),
149
163
  embossShadow: '0px 2px 5px 0px rgba(0, 0, 0, 0.05)',
@@ -151,7 +165,7 @@ var splunkMagneticThemeCustomizer = function splunkMagneticThemeCustomizer(curre
151
165
  focusShadow: currentTheme.colorScheme === 'light' ? "0 0 0 2px ".concat(_magneticTokensLight["default"]['interact-bg-weak-active'], ",0 0 0 4px ").concat(_magneticTokensLight["default"]['control-border-focus']) : "0 0 0 2px ".concat(_magneticTokensDark["default"]['interact-bg-weak-active'], ",0 0 0 4px ").concat(_magneticTokensDark["default"]['control-border-focus']),
152
166
  inputBorderWidth: '2px',
153
167
  interactiveColorAccent: pickMagnetic('control-bg-strong-default'),
154
- interactiveColorAccentError: pickMagnetic('negative-bg-medium-default'),
168
+ interactiveColorAccentError: pickMagnetic('negative-border-medium-default'),
155
169
  interactiveColorAccentErrorStrong: pickMagnetic('negative-bg-strong-default'),
156
170
  interactiveColorAccentErrorWeak: pickMagnetic('negative-bg-weak-default'),
157
171
  interactiveColorBackground: pickMagnetic('control-bg-default'),
@@ -168,6 +182,9 @@ var splunkMagneticThemeCustomizer = function splunkMagneticThemeCustomizer(curre
168
182
  neutral300: currentTheme.colorScheme === 'light' ? _magneticTokensCore["default"]['neutral-85'] : _magneticTokensCore["default"]['neutral-40'],
169
183
  neutral400: currentTheme.colorScheme === 'light' ? _magneticTokensCore["default"]['neutral-80'] : _magneticTokensCore["default"]['neutral-50'],
170
184
  neutral500: currentTheme.colorScheme === 'light' ? _magneticTokensCore["default"]['neutral-70'] : _magneticTokensCore["default"]['neutral-60'],
185
+ notificationColorNegativeWeak: pickMagnetic('negative-bg-weak-default'),
186
+ notificationColorNegativeStrong: pickMagnetic('negative-bg-strong-default'),
187
+ notificationColorNegative: pickMagnetic('negative-bg-default'),
171
188
  overlayShadow: '0px 4px 12px 0px rgba(0,0,0,0.18)',
172
189
  statusColorHigh: pickMagnetic('negative-icon-default'),
173
190
  statusColorHighStrong: pickMagnetic('negative-border-strong-default'),
@@ -17,6 +17,8 @@ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArra
17
17
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
18
18
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
19
19
  function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
20
+ 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; }
21
+ 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; }
20
22
  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; }
21
23
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
22
24
  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); }
@@ -36,19 +38,14 @@ var SplunkThemesTool = /*#__PURE__*/(0, _react.memo)(function () {
36
38
  globals = _useGlobals2[0],
37
39
  updateGlobals = _useGlobals2[1];
38
40
  var params = (0, _managerApi.useParameter)(_constants.PARAM_KEY, {});
39
- var disableDualTheme = (0, _managerApi.useParameter)(_constants.DISABLE_DUAL_THEME_KEY, false);
41
+ var hasEnabledSplunkMagneticOption = (0, _managerApi.useParameter)(_constants.ENABLE_SPLUNK_MAGNETIC_KEY, false);
42
+ var hasDisabledMultiThemeOptions = (0, _managerApi.useParameter)(_constants.DISABLE_MULTI_THEME_OPTIONS_KEY, false);
40
43
  var globalsTheme = globals[_constants.PARAM_KEY] || undefined;
41
44
  var currentTheme = (0, _util.normalizeThemeOptions)(params, globalsTheme);
42
45
  var updateTheme = (0, _react.useCallback)(function (newTheme) {
43
46
  var mergedTheme = (0, _util.getMergedTheme)(globalsTheme, newTheme);
44
47
  updateGlobals(_defineProperty({}, _constants.PARAM_KEY, mergedTheme));
45
48
  }, [globalsTheme, updateGlobals]);
46
- (0, _react.useEffect)(function () {
47
- if (disableDualTheme) {
48
- // eslint-disable-next-line no-console
49
- console.warn("This story has 'disableDualTheme' set to 'true', so 'both' option will not show in theme dropdown.");
50
- }
51
- }, [disableDualTheme]);
52
49
  return /*#__PURE__*/_react["default"].createElement(_components.WithTooltip, {
53
50
  placement: "top",
54
51
  trigger: "click",
@@ -56,23 +53,26 @@ var SplunkThemesTool = /*#__PURE__*/(0, _react.memo)(function () {
56
53
  return Object.keys(_themeOptions.themeOptions).map(function (themeOptionKey) {
57
54
  var themeOptionValues = _themeOptions.themeOptions[themeOptionKey];
58
55
 
59
- // if story is passing disableDualTheme: true, don't display 'both' option in theme picker
60
- var dualThemeOptions = disableDualTheme ? [] : ['both'];
56
+ // Add splunk magnetic to family options if enabled
57
+ var effectiveValues = themeOptionKey === 'family' && hasEnabledSplunkMagneticOption ? _objectSpread(_objectSpread({}, themeOptionValues), {}, {
58
+ values: [].concat(_toConsumableArray(themeOptionValues.values), ['splunk-magnetic'])
59
+ }) : themeOptionValues;
60
+ var multiThemeOptions = hasDisabledMultiThemeOptions ? [] : ['all'];
61
61
  return /*#__PURE__*/_react["default"].createElement(_react.Fragment, {
62
62
  key: themeOptionKey
63
- }, /*#__PURE__*/_react["default"].createElement(_themes.TooltipSectionTitle, null, themeOptionValues.name), /*#__PURE__*/_react["default"].createElement(_components.TooltipLinkList, {
64
- links: [].concat(_toConsumableArray(themeOptionValues.values), dualThemeOptions).map(function (themeValue) {
63
+ }, /*#__PURE__*/_react["default"].createElement(_themes.TooltipSectionTitle, null, effectiveValues.name), /*#__PURE__*/_react["default"].createElement(_components.TooltipLinkList, {
64
+ links: [].concat(_toConsumableArray(effectiveValues.values), multiThemeOptions).map(function (themeValue) {
65
65
  var active = currentTheme[themeOptionKey] === themeValue;
66
66
  return {
67
67
  active: active,
68
68
  id: themeValue,
69
- onClick: function onClick(e, clickProps) {
70
- updateTheme(_defineProperty({}, themeOptionKey, clickProps.title));
69
+ onClick: function onClick() {
70
+ updateTheme(_defineProperty({}, themeOptionKey, themeValue));
71
71
  },
72
72
  right: active && /*#__PURE__*/_react["default"].createElement(_components.Icons, {
73
73
  icon: "check"
74
74
  }),
75
- title: themeValue
75
+ title: themeValue === 'splunk-magnetic' ? 'splunk magnetic' : themeValue
76
76
  };
77
77
  })
78
78
  }));