@splunk/themes 0.23.0 → 1.0.0-beta.2

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 (66) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/CHANGELOG.v1.md +70 -0
  3. package/design-tokens/colors.js +495 -0
  4. package/design-tokens/dataViz.js +486 -0
  5. package/design-tokens/deprecated.js +249 -0
  6. package/design-tokens/elevation.js +44 -0
  7. package/design-tokens/index.js +23 -0
  8. package/design-tokens/spacing-sizing.js +39 -0
  9. package/design-tokens/typography.js +67 -0
  10. package/enterprise/comfortable.js +20 -10
  11. package/enterprise/compact.js +20 -14
  12. package/enterprise/dark.js +182 -40
  13. package/enterprise/dataViz.js +491 -0
  14. package/enterprise/index.js +1 -6
  15. package/enterprise/light.js +317 -265
  16. package/index.js +8 -0
  17. package/mixins/index.js +39 -1
  18. package/mixins/layout.js +42 -0
  19. package/mixins/prose.js +67 -0
  20. package/mixins/tests/prose.unit.js +49 -0
  21. package/mixins/tests/typography.unit.js +15 -18
  22. package/mixins/tests/utilityMixins.unit.js +1 -1
  23. package/mixins/typography.js +141 -144
  24. package/mixins/utilityMixins.js +2 -5
  25. package/package.json +5 -8
  26. package/prisma/base.js +22 -23
  27. package/prisma/comfortable.js +1 -7
  28. package/prisma/compact.js +1 -7
  29. package/prisma/dark.js +77 -19
  30. package/prisma/dataViz.js +33 -38
  31. package/prisma/light.js +78 -20
  32. package/splunk-magnetic/index.js +178 -0
  33. package/splunk-magnetic/magneticTokensDark.js +706 -0
  34. package/splunk-magnetic/magneticTokensLight.js +706 -0
  35. package/storybook-addon-splunk-themes/withSplunkTheme.js +8 -4
  36. package/types/design-tokens/colors.d.ts +875 -0
  37. package/types/design-tokens/dataViz.d.ts +433 -0
  38. package/types/design-tokens/deprecated.d.ts +468 -0
  39. package/types/design-tokens/elevation.d.ts +49 -0
  40. package/types/design-tokens/index.d.ts +541 -0
  41. package/types/design-tokens/spacing-sizing.d.ts +39 -0
  42. package/types/design-tokens/typography.d.ts +79 -0
  43. package/types/enterprise/comfortable.d.ts +11 -17
  44. package/types/enterprise/compact.d.ts +11 -21
  45. package/types/enterprise/dark.d.ts +412 -113
  46. package/types/enterprise/dataViz.d.ts +14 -0
  47. package/types/enterprise/index.d.ts +1 -2
  48. package/types/enterprise/light.d.ts +439 -139
  49. package/types/index.d.ts +1 -0
  50. package/types/mixins/index.d.ts +8 -0
  51. package/types/mixins/layout.d.ts +21 -0
  52. package/types/mixins/prose.d.ts +41 -0
  53. package/types/mixins/tests/prose.unit.d.ts +1 -0
  54. package/types/mixins/typography.d.ts +5 -12
  55. package/types/prisma/base.d.ts +12 -16
  56. package/types/prisma/comfortable.d.ts +2 -17
  57. package/types/prisma/compact.d.ts +2 -17
  58. package/types/prisma/dark.d.ts +60 -9
  59. package/types/prisma/dataViz.d.ts +8 -426
  60. package/types/prisma/light.d.ts +62 -11
  61. package/types/splunk-magnetic/index.d.ts +2941 -0
  62. package/types/splunk-magnetic/magneticTokensDark.d.ts +700 -0
  63. package/types/splunk-magnetic/magneticTokensLight.d.ts +700 -0
  64. package/types/storybook-addon-splunk-themes/SplunkThemesTool.d.ts +1 -1
  65. package/enterprise/prismaAliases.js +0 -95
  66. package/types/enterprise/prismaAliases.d.ts +0 -47
@@ -1,175 +1,384 @@
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); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports["default"] = void 0;
7
+ var _tinycolor = _interopRequireDefault(require("tinycolor2"));
8
+ var _dataViz = _interopRequireDefault(require("./dataViz"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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); }
8
11
  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
12
  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
13
  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
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
12
15
  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); }
13
- var dragHandle = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA2SURBVHgB7dKhEQAgDAPAhDnxDMAcDIBnT1pZV1FRk3e53EWFc+2P4N3DmLN+oKh/QADqB+IMUKEQD/CeueAAAAAASUVORK5CYII="; // see babel-plugin-base64-pngimport {
16
+ var dragHandle = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA2SURBVHgB7dKhEQAgDAPAhDnxDMAcDIBnT1pZV1FRk3e53EWFc+2P4N3DmLN+oKh/QADqB+IMUKEQD/CeueAAAAAASUVORK5CYII="; // see babel-plugin-base64-pngimport
14
17
  /**
15
- * ## Brand colors
18
+ * To avoid duplicating hex codes and keeping them in sync, for deprecated tokens and
19
+ * colors that are used for themes 1.0 tokens, add this object to store the colors that
20
+ * are used across enterprise themes.
21
+ */
22
+ var deprecatedEnterpriseColors = {
23
+ gray30: '#3c444d',
24
+ gray45: '#5c6773',
25
+ gray60: '#818d99',
26
+ gray80: '#c3cbd4',
27
+ gray92: '#e1e6eb',
28
+ gray96: '#f2f4f5',
29
+ gray98: '#f7f8fa',
30
+ successColor: '#53a051',
31
+ warningColor: '#f8be34',
32
+ alertColor: '#f1813f',
33
+ errorColor: '#dc4e41',
34
+ accentColorD10: '#006eaa',
35
+ accentColor: '#007abd',
36
+ infoColor: '#006d9c',
37
+ infoColorL10: '#338ab0',
38
+ infoColorD10: '#00577c',
39
+ successColorL10: '#76b374',
40
+ successColorD10: '#479144',
41
+ warningColorL10: '#facb5d',
42
+ warningColorD10: '#e0ac16',
43
+ alertColorL10: '#f49b66',
44
+ alertColorD10: '#da742e',
45
+ errorColorL10: '#e37267',
46
+ errorColorD10: '#c84535',
47
+ errorColorD20: '#b23d30',
48
+ brandColor: '#5cc05c'
49
+ };
50
+
51
+ /**
52
+ * ## Neutral colors
53
+ * Neutrals are used for dividers and as backup colors that can sparingly be used for cases, when the other defined colors are not enough.
16
54
  *
17
- * @colorSet
55
+ * @colorSet verbose
18
56
  */
19
- var brandColors = {
57
+
58
+ var neutralColors = {
59
+ white: '#ffffff',
60
+ neutral100: deprecatedEnterpriseColors.gray98,
61
+ neutral200: deprecatedEnterpriseColors.gray96,
62
+ neutral300: deprecatedEnterpriseColors.gray92,
63
+ neutral400: _tinycolor["default"].mix(deprecatedEnterpriseColors.gray92, deprecatedEnterpriseColors.gray80).toRgbString(),
64
+ neutral500: deprecatedEnterpriseColors.gray80,
65
+ black: '#000000',
66
+ transparent: 'transparent'
67
+ };
68
+
69
+ /**
70
+ * ## Usage-based colors
71
+ *
72
+ * @colorSet verbose
73
+ */
74
+ var usageColors = {
75
+ borderActiveColor: "rgba(0,0,0, 0.5)",
76
+ borderColor: '#8c8c8c',
77
+ borderColorWeak: '#d6d6d6',
78
+ borderColorStrong: '#666666',
79
+ focusColor: deprecatedEnterpriseColors.accentColorD10,
80
+ backgroundColorHover: deprecatedEnterpriseColors.gray96
81
+ };
82
+
83
+ /**
84
+ * ## Status colors
85
+ * Status colors are reserved for communicating urgency and severity associated with data objects and to categorize the visual communication of system responses.
86
+ *
87
+ * @colorSet verbose
88
+ */
89
+ var statusColors = {
90
+ statusColorInfo: deprecatedEnterpriseColors.infoColor,
91
+ statusColorInfoWeak: deprecatedEnterpriseColors.infoColorL10,
92
+ statusColorInfoStrong: deprecatedEnterpriseColors.infoColorD10,
93
+ statusColorNormal: deprecatedEnterpriseColors.successColor,
94
+ statusColorNormalWeak: deprecatedEnterpriseColors.successColorL10,
95
+ statusColorNormalStrong: deprecatedEnterpriseColors.successColorD10,
96
+ statusColorLow: deprecatedEnterpriseColors.warningColor,
97
+ statusColorLowWeak: deprecatedEnterpriseColors.warningColorL10,
98
+ statusColorLowStrong: deprecatedEnterpriseColors.warningColorD10,
99
+ statusColorMedium: deprecatedEnterpriseColors.alertColor,
100
+ statusColorMediumWeak: deprecatedEnterpriseColors.alertColorL10,
101
+ statusColorMediumStrong: deprecatedEnterpriseColors.alertColorD10,
102
+ statusColorHigh: deprecatedEnterpriseColors.errorColor,
103
+ statusColorHighWeak: deprecatedEnterpriseColors.errorColorL10,
104
+ statusColorHighStrong: deprecatedEnterpriseColors.errorColorD10,
105
+ statusColorCritical: deprecatedEnterpriseColors.errorColorD10,
106
+ statusColorCriticalWeak: deprecatedEnterpriseColors.errorColor,
107
+ statusColorCriticalStrong: deprecatedEnterpriseColors.errorColorD20
108
+ };
109
+
110
+ /**
111
+ * ## Elevation shadows
112
+ *
113
+ * @shadowSet
114
+ *
115
+ */
116
+ var elevationShadows = {
117
+ embossShadow: '0px 1px 5px rgba(0, 0, 0, 0.07), 0px 0px 1px rgba(0, 0, 0, 0.07)',
118
+ overlayShadow: '0px 26px 103px rgba(0, 0, 0, 0.13), 0px 11px 18px rgba(0, 0, 0, 0.06), 0px 3px 6px rgba(0, 0, 0, 0.06)',
119
+ dragShadow: '0px 26px 103px rgba(0, 0, 0, 0.13), 0px 11px 18px rgba(0, 0, 0, 0.06), 0px 3px 6px rgba(0, 0, 0, 0.06)',
120
+ modalShadow: '0px 50px 200px rgba(0, 0, 0, 0.3), 0px 29px 66px rgba(0, 0, 0, 0.08), 0px 29px 47px rgba(0, 0, 0, 0.08), 0px 5px 10px rgba(0, 0, 0, 0.03)'
121
+ };
122
+
123
+ /**
124
+ * ## Syntax colors
125
+ * The following colors should only be used for syntax coloring of code.
126
+ *
127
+ * @colorSet verbose alphabetical
128
+ */
129
+ var syntaxColors = {
130
+ syntaxBlue: '#006aa3',
131
+ syntaxBrown: '#905b04',
132
+ syntaxGray: '#5c6773',
133
+ syntaxGreen: '#2f612e',
134
+ syntaxOrange: '#a44b0e',
135
+ syntaxPink: '#b9139e',
136
+ syntaxPurple: '#5317f2',
137
+ syntaxRed: '#ca163d',
138
+ syntaxTeal: '#1a7060'
139
+ };
140
+
141
+ /**
142
+ * ## Background colors
143
+ * Background colors should be used only for backgrounds of higher level sections & containers of a UI.
144
+ *
145
+ * @colorSet verbose
146
+ */
147
+ var backgroundColors = {
148
+ backgroundColorDialog: neutralColors.white,
149
+ backgroundColorFloating: neutralColors.black,
150
+ backgroundColorNavigation: deprecatedEnterpriseColors.gray96,
151
+ backgroundColorPage: neutralColors.white,
152
+ backgroundColorPopup: neutralColors.white,
153
+ backgroundColorScrim: "rgba(255, 255, 255, 0.75)",
154
+ backgroundColorSection: neutralColors.white,
155
+ backgroundColorSidebar: deprecatedEnterpriseColors.gray98
156
+ };
157
+
158
+ /**
159
+ * ## Interactive state shadows
160
+ *
161
+ * @shadowSet
162
+ */
163
+ var shadows = {
164
+ focusShadow: "0 0 0 2px ".concat(backgroundColors.backgroundColorPage, ", 0 0 0 5px ").concat(usageColors.focusColor),
165
+ focusShadowInset: "inset 0 0 0 3px ".concat(usageColors.focusColor)
166
+ };
167
+
168
+ /**
169
+ * ## Content colors
170
+ * Content colors should be used for text, icons and dividers.
171
+ *
172
+ * @colorSet verbose
173
+ */
174
+ var contentColors = {
175
+ contentBackgroundColorNegativeWeak: 'rgba(235, 70, 81, 0.20)',
176
+ contentColorActive: deprecatedEnterpriseColors.gray30,
177
+ contentColorDefault: deprecatedEnterpriseColors.gray45,
178
+ contentColorDisabled: deprecatedEnterpriseColors.gray80,
179
+ contentColorInverted: neutralColors.white,
180
+ contentColorMuted: deprecatedEnterpriseColors.gray60,
181
+ contentColorAccent: '#1a8929',
182
+ contentColorAccentStrong: '#0d4515',
183
+ contentColorAccentWeak: '#b5e3b5',
184
+ contentColorInfo: '#006d9c',
185
+ contentColorNegative: '#c84535',
186
+ contentColorNegativeStrong: '#812d22',
187
+ contentColorNegativeWeak: '#f5aca3',
188
+ contentColorPositive: '#307b30',
189
+ contentColorWarning: '#7d600f',
190
+ contentColorLink: deprecatedEnterpriseColors.accentColorD10
191
+ };
192
+
193
+ /**
194
+ * ## Action colors
195
+ * Action colors should be used for buttons.
196
+ *
197
+ * @colorSet verbose
198
+ */
199
+
200
+ var actionColors = {
201
+ actionColorBackgroundPrimary: '#1a8929',
202
+ actionColorBackgroundPrimaryActive: '#125e1c',
203
+ actionColorBackgroundPrimaryDisabled: '#98d798',
204
+ actionColorBackgroundPrimaryHover: '#125e1c',
205
+ actionColorBackgroundSecondary: 'transparent',
206
+ actionColorBackgroundSecondaryActive: '#d2d6da',
207
+ actionColorBackgroundSecondaryDisabled: 'transparent',
208
+ actionColorBackgroundSecondaryHover: '#d2d6da',
209
+ actionColorBackgroundSubtle: 'transparent',
210
+ actionColorBackgroundSubtleActive: '#d8f3dc',
211
+ actionColorBackgroundSubtleDisabled: 'transparent',
212
+ actionColorBackgroundSubtleHover: '#d8f3dc',
213
+ actionColorBackgroundDestructive: '#c84535',
214
+ actionColorBackgroundDestructiveActive: '#a1382b',
215
+ actionColorBackgroundDestructiveDisabled: '#f5aca3',
216
+ actionColorBackgroundDestructiveHover: '#a1382b',
217
+ actionColorBackgroundDestructiveSecondary: 'transparent',
218
+ actionColorBackgroundDestructiveSecondaryActive: '#fad6d1',
219
+ actionColorBackgroundDestructiveSecondaryDisabled: 'transparent',
220
+ actionColorBackgroundDestructiveSecondaryHover: '#fad6d1',
221
+ actionColorBorderSecondary: '#818d99',
222
+ actionColorBorderSecondaryActive: '#49525a',
223
+ actionColorBorderSecondaryDisabled: '#d2d6da',
224
+ actionColorBorderSecondaryHover: '#49525a',
225
+ actionColorBorderDestructiveSecondary: '#c84535',
226
+ actionColorBorderDestructiveSecondaryActive: '#a1382b',
227
+ actionColorBorderDestructiveSecondaryDisabled: '#f5aca3',
228
+ actionColorBorderDestructiveSecondaryHover: '#a1382b'
229
+ };
230
+
231
+ /**
232
+ * ## Interactive colors
233
+ * Interactive colors are specifically chosen for borders and backgrounds of controls and other interactive content.
234
+ *
235
+ * @colorSet verbose
236
+ */
237
+ var interactiveColors = {
238
+ interactiveColorPrimary: deprecatedEnterpriseColors.brandColor,
239
+ interactiveColorBorder: deprecatedEnterpriseColors.gray60,
240
+ interactiveColorBorderActive: deprecatedEnterpriseColors.gray45,
241
+ interactiveColorBorderHover: 'rgba(0, 0, 0, 0.6)',
242
+ interactiveColorBorderDisabled: deprecatedEnterpriseColors.gray80,
243
+ interactiveColorOverlaySelected: 'rgba(0, 0, 0, 0.04)',
244
+ interactiveColorOverlayHover: 'rgba(0, 0, 0, 0.03)',
245
+ interactiveColorOverlayActive: 'rgba(0, 0, 0, 0.07)',
246
+ interactiveColorOverlayDrag: 'rgba(2, 100, 215, 0.16)',
247
+ interactiveColorBackground: neutralColors.white,
248
+ interactiveColorBackgroundDisabled: deprecatedEnterpriseColors.gray96,
249
+ interactiveColorAccent: '#1A8929',
250
+ interactiveColorAccentError: deprecatedEnterpriseColors.errorColorD20,
251
+ interactiveColorAccentErrorStrong: '#852d24'
252
+ };
253
+
254
+ /**
255
+ * ## Backgrounds
256
+ *
257
+ * @colorSet verbose
258
+ */
259
+ var backgrounds = {
260
+ draggableBackground: "url('data:image/png;base64,".concat(dragHandle, "') 0 0 / 8px 8px repeat")
261
+ };
262
+ var sansFontFamily = "'Splunk Platform Sans', 'Proxima Nova', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
263
+
264
+ /**
265
+ * ## Typography
266
+ *
267
+ * @private
268
+ */
269
+ var typography = {
270
+ sansFontFamily: sansFontFamily,
271
+ serifFontFamily: "Georgia, 'Times New Roman', Times, serif",
272
+ monoFontFamily: "'Splunk Platform Mono', Inconsolata, Consolas, 'Droid Sans Mono', Monaco, 'Courier New', Courier, monospace",
273
+ fontFamily: sansFontFamily,
274
+ fontFamilyTitle: sansFontFamily,
275
+ fontSizeSmall: '0.75rem',
276
+ fontSize: '0.875rem',
277
+ fontSizeLarge: '1rem',
278
+ fontSizeXLarge: '1.25rem',
279
+ fontSizeXXLarge: '1.5rem',
280
+ fontWeightLight: 300,
281
+ fontWeightNormal: 400,
282
+ fontWeightSemiBold: 500,
283
+ fontWeightBold: 700,
284
+ fontWeightHeavy: 800,
285
+ fontWeightExtraBold: 900,
286
+ lineHeight: '1.5',
287
+ lineLength: '80ch'
288
+ };
289
+
290
+ /**
291
+ * ## Layers
292
+ * If a variable does not suit your purpose, set a value relatively, such as zindexModal +1.
293
+ *
294
+ * @valueSet
295
+ */
296
+ var zindexes = {
297
+ zindexLayer: 1000,
298
+ zindexFixedNavbar: 1030,
299
+ zindexModalBackdrop: 1040,
300
+ zindexModal: 1050,
301
+ zindexPopover: 1060,
302
+ zindexToastMessages: 2000
303
+ };
304
+ var deprecated = {
305
+ backgroundColor: neutralColors.white,
306
+ // @deprecated SUI-6656
307
+ borderLightColor: deprecatedEnterpriseColors.gray92,
308
+ // @deprecated SUI-5981
309
+ // @deprecated SUI-6160
310
+ textColor: deprecatedEnterpriseColors.gray30,
311
+ textGray: '#6b7785',
312
+ textDisabledColor: deprecatedEnterpriseColors.gray80,
313
+ // deprecated
314
+ accentColorPositive: deprecatedEnterpriseColors.successColor,
315
+ accentColorWarning: deprecatedEnterpriseColors.warningColor,
316
+ accentColorAlert: deprecatedEnterpriseColors.alertColor,
317
+ accentColorNegative: deprecatedEnterpriseColors.errorColor,
318
+ linkColor: deprecatedEnterpriseColors.accentColorD10,
319
+ linkColorHover: deprecatedEnterpriseColors.accentColor,
320
+ border: "1px solid ".concat(usageColors.borderColor),
20
321
  brandColorL50: '#f5fbf5',
21
322
  brandColorL40: '#dff2df',
22
323
  brandColorL30: '#bee6be',
23
324
  brandColorL20: '#9ed99e',
24
325
  brandColorL10: '#7ecd7e',
25
- brandColor: '#5cc05c',
26
326
  brandColorD10: '#49b849',
27
327
  brandColorD20: '#40a540',
28
328
  brandColorD30: '#389038',
29
329
  brandColorD40: '#307b30',
30
- brandColorD50: '#286728'
31
- };
32
-
33
- /**
34
- * ## Grayscale colors
35
- *
36
- * @colorSet
37
- */
38
- var grays = {
39
- white: '#ffffff',
40
- gray98: '#f7f8fa',
41
- gray96: '#f2f4f5',
42
- gray92: '#e1e6eb',
43
- gray80: '#c3cbd4',
44
- gray60: '#818d99',
45
- gray45: '#5c6773',
46
- gray30: '#3c444d',
330
+ brandColorD50: '#286728',
47
331
  gray25: '#31373e',
48
332
  gray22: '#2b3033',
49
333
  gray20: '#171d21',
50
- black: '#000000'
51
- };
52
-
53
- /**
54
- * ## Accent colors
55
- *
56
- * @colorSet
57
- */
58
- var accentColors = {
59
334
  accentColorL50: '#ecf8ff',
60
335
  accentColorL40: '#bfe9ff',
61
336
  accentColorL30: '#7ed2ff',
62
337
  accentColorL20: '#3ebcff',
63
338
  accentColorL10: '#00a4fd',
64
- accentColor: '#007abd',
65
- accentColorD10: '#006eaa',
66
339
  accentColorD20: '#006297',
67
340
  accentColorD30: '#005684',
68
341
  accentColorD40: '#004a71',
69
- accentColorD50: '#003d5e'
70
- };
71
-
72
- /**
73
- * ## Error Colors
74
- *
75
- * @colorSet
76
- */
77
- var errorColors = {
342
+ accentColorD50: '#003d5e',
78
343
  errorColorL50: '#fcedec',
79
344
  errorColorL40: '#f8dcd9',
80
345
  errorColorL30: '#f1b9b3',
81
346
  errorColorL20: '#ea958d',
82
- errorColorL10: '#e37267',
83
- errorColor: '#dc4e41',
84
- errorColorD10: '#c84535',
85
- errorColorD20: '#b23d30',
86
347
  errorColorD30: '#9c3529',
87
348
  errorColorD40: '#852d24',
88
- errorColorD50: '#6f261d'
89
- };
90
-
91
- /**
92
- * ## Alert colors
93
- *
94
- * @colorSet
95
- * */
96
- var alertColors = {
349
+ errorColorD50: '#6f261d',
97
350
  alertColorL50: '#fef3ec',
98
351
  alertColorL40: '#fde6d9',
99
352
  alertColorL30: '#facdb3',
100
353
  alertColorL20: '#f7b48c',
101
- alertColorL10: '#f49b66',
102
- alertColor: '#f1813f',
103
- alertColorD10: '#da742e',
104
354
  alertColorD20: '#c2672a',
105
355
  alertColorD30: '#aa5a25',
106
356
  alertColorD40: '#914d1f',
107
- alertColorD50: '#79401a'
108
- };
109
-
110
- /**
111
- * ## Warning colors
112
- *
113
- * @colorSet
114
- */
115
- var warningColors = {
357
+ alertColorD50: '#79401a',
116
358
  warningColorL50: '#fff9eb',
117
359
  warningColorL40: '#fef2d7',
118
360
  warningColorL30: '#fde5ae',
119
361
  warningColorL20: '#fbd886',
120
- warningColorL10: '#facb5d',
121
- warningColor: '#f8be34',
122
- warningColorD10: '#e0ac16',
123
362
  warningColorD20: '#c79915',
124
363
  warningColorD30: '#ae8613',
125
364
  warningColorD40: '#957312',
126
- warningColorD50: '#7d600f'
127
- };
128
-
129
- /**
130
- * ## Success colors
131
- *
132
- * @colorSet
133
- */
134
- var successColors = {
365
+ warningColorD50: '#7d600f',
135
366
  successColorL50: '#eef6ee',
136
367
  successColorL40: '#ddecdd',
137
368
  successColorL30: '#bbd9ba',
138
369
  successColorL20: '#98c697',
139
- successColorL10: '#76b374',
140
- successColor: '#53a051',
141
- successColorD10: '#479144',
142
370
  successColorD20: '#40813d',
143
371
  successColorD30: '#387135',
144
372
  successColorD40: '#2f612e',
145
- successColorD50: '#275126'
146
- };
147
-
148
- /**
149
- * ## Info colors
150
- *
151
- * @colorSet
152
- */
153
- var infoColors = {
373
+ successColorD50: '#275126',
154
374
  infoColorL50: '#e5f0f5',
155
375
  infoColorL40: '#cce2eb',
156
376
  infoColorL30: '#99c5d7',
157
377
  infoColorL20: '#66a7c4',
158
- infoColorL10: '#338ab0',
159
- infoColor: '#006d9c',
160
- infoColorD10: '#00577c',
161
378
  infoColorD20: '#004c6c',
162
379
  infoColorD30: '#00415d',
163
380
  infoColorD40: '#00364d',
164
- infoColorD50: '#002b3e'
165
- };
166
-
167
- /**
168
- * ## Diverging colors
169
- *
170
- * @colorSet alphabetical
171
- */
172
- var divergingColors = {
381
+ infoColorD50: '#002b3e',
173
382
  diverging1ColorA: '#006d9c',
174
383
  diverging1ColorB: '#ec9960',
175
384
  diverging2ColorA: '#af575a',
@@ -179,15 +388,7 @@ var divergingColors = {
179
388
  diverging4ColorA: '#5a4575',
180
389
  diverging4ColorB: '#708794',
181
390
  diverging5ColorA: '#294e70',
182
- diverging5ColorB: '#b6c75a'
183
- };
184
-
185
- /**
186
- * ## Categorical Colors
187
- *
188
- * @colorSet alphabetical
189
- */
190
- var categoricalColors = {
391
+ diverging5ColorB: '#b6c75a',
191
392
  cat1Color: '#297ba5',
192
393
  cat1ColorL: '#78b9d6',
193
394
  cat2Color: '#4fa484',
@@ -247,161 +448,12 @@ var categoricalColors = {
247
448
  cat29Color: '#7672a4',
248
449
  cat29ColorL: '#ada9c8',
249
450
  cat30Color: '#184b81',
250
- cat30ColorL: '#a4bbe0'
251
- };
252
-
253
- /**
254
- * ## Usage-based colors
255
- *
256
- * @colorSet verbose
257
- */
258
- var usageColors = {
259
- textColor: grays.gray30,
260
- textGray: '#6b7785',
261
- textDisabledColor: grays.gray80,
262
- linkColor: accentColors.accentColorD10,
263
- linkColorHover: accentColors.accentColor,
264
- borderActiveColor: "rgba(0,0,0, 0.5)",
265
- borderColor: grays.gray80,
266
- borderColorWeak: grays.gray92,
267
- borderColorStrong: grays.gray60,
268
- focusColor: accentColors.accentColorD10,
269
- backgroundColorHover: grays.gray96,
270
- backgroundColor: grays.white,
271
- transparent: 'transparent'
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
-
301
- /**
302
- * ## Syntax colors
303
- * The following colors should only be used for syntax coloring of code.
304
- *
305
- * @colorSet verbose alphabetical
306
- */
307
- var syntaxColors = {
308
- syntaxBlue: '#006aa3',
451
+ cat30ColorL: '#a4bbe0',
309
452
  syntaxBlueLight: '#006d9c',
310
- syntaxBrown: '#905b04',
311
- syntaxGray: '#5c6773',
312
- syntaxGreen: '#2f612e',
313
453
  syntaxGreenLight: '#5ba383',
314
- syntaxOrange: '#a44b0e',
315
- syntaxPink: '#b9139e',
316
- syntaxPurple: '#5317f2',
317
454
  syntaxPurpleLight: '#b19cd9',
318
- syntaxRed: '#ca163d',
319
- syntaxRedLight: '#af575a',
320
- syntaxTeal: '#1a7060'
321
- };
322
-
323
- /**
324
- * ## Shadows
325
- *
326
- * @shadowSet
327
- */
328
- var shadows = {
329
- focusShadow: "0 0 1px 3px ".concat(usageColors.focusColor),
330
- focusShadowInset: "inset 0 0 1px 1px ".concat(grays.white, ", inset 0 0 0 3px ").concat(usageColors.focusColor),
331
- overlayShadow: '0 4px 8px rgba(0, 0, 0, 0.2)'
332
- };
333
-
334
- /**
335
- * ## Interactive borders
336
- *
337
- * @borderSet
338
- */
339
- var bordersInteractive = {
340
- activeBorder: "".concat(usageColors.borderActiveColor, " double")
341
- };
342
-
343
- /**
344
- * ## Backgrounds
345
- *
346
- * @colorSet verbose
347
- */
348
- var backgrounds = {
349
- draggableBackground: "url('data:image/png;base64,".concat(dragHandle, "') 0 0 / 8px 8px repeat")
350
- };
351
-
352
- /**
353
- * ## Border
354
- *
355
- * @valueSet
356
- */
357
- var borders = {
358
- border: "1px solid ".concat(usageColors.borderColor)
359
- };
360
- var sansFontFamily = "'Splunk Platform Sans', 'Proxima Nova', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
361
- /**
362
- * ## Font family
363
- *
364
- * @valueSet
365
- */
366
- var fontFamily = {
367
- sansFontFamily: sansFontFamily,
368
- serifFontFamily: "Georgia, 'Times New Roman', Times, serif",
369
- monoFontFamily: "'Splunk Platform Mono', Inconsolata, Consolas, 'Droid Sans Mono', Monaco, 'Courier New', Courier, monospace",
370
- fontFamily: sansFontFamily
371
- };
372
-
373
- /**
374
- * ## Font weights
375
- *
376
- * Based on [common weight name mappings](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#common_weight_name_mapping)
377
- *
378
- * @valueSet
379
- */
380
- var fontWeights = {
381
- fontWeightLight: 300,
382
- fontWeightNormal: 400,
383
- fontWeightSemiBold: 500,
384
- fontWeightBold: 700,
385
- fontWeightHeavy: 800,
386
- fontWeightExtraBold: 900
387
- };
388
-
389
- /**
390
- * ## Layers
391
- * If a variable does not suit your purpose, set a value relatively, such as zindexModal +1.
392
- *
393
- * @valueSet
394
- */
395
- var zindexes = {
396
- zindexLayer: 1000,
397
- zindexFixedNavbar: 1030,
398
- zindexModalBackdrop: 1040,
399
- zindexModal: 1050,
400
- zindexPopover: 1060,
401
- zindexToastMessages: 2000
455
+ syntaxRedLight: '#af575a'
402
456
  };
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), {}, {
404
- borderLightColor: grays.gray92 // @deprecated SUI-5981
405
- });
457
+ var theme = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, deprecatedEnterpriseColors), backgroundColors), actionColors), neutralColors), statusColors), elevationShadows), syntaxColors), usageColors), backgrounds), shadows), typography), contentColors), interactiveColors), zindexes), _dataViz["default"]), deprecated);
406
458
  var _default = theme;
407
459
  exports["default"] = _default;
package/index.js CHANGED
@@ -10,6 +10,7 @@ var _exportNames = {
10
10
  pick: true,
11
11
  pickVariant: true,
12
12
  SplunkThemeProvider: true,
13
+ unstable_splunkMagneticThemeCustomizer: true,
13
14
  useSplunkTheme: true,
14
15
  withSplunkTheme: true,
15
16
  variables: true
@@ -50,6 +51,12 @@ Object.defineProperty(exports, "SplunkThemeProvider", {
50
51
  return _SplunkThemeProvider["default"];
51
52
  }
52
53
  });
54
+ Object.defineProperty(exports, "unstable_splunkMagneticThemeCustomizer", {
55
+ enumerable: true,
56
+ get: function get() {
57
+ return _splunkMagnetic["default"];
58
+ }
59
+ });
53
60
  Object.defineProperty(exports, "useSplunkTheme", {
54
61
  enumerable: true,
55
62
  get: function get() {
@@ -74,6 +81,7 @@ var _mixins = _interopRequireDefault(require("./mixins"));
74
81
  var _pick = _interopRequireDefault(require("./pick"));
75
82
  var _pickVariant = _interopRequireDefault(require("./pickVariant"));
76
83
  var _SplunkThemeProvider = _interopRequireDefault(require("./SplunkThemeProvider"));
84
+ var _splunkMagnetic = _interopRequireDefault(require("./splunk-magnetic"));
77
85
  var _useSplunkTheme = _interopRequireDefault(require("./useSplunkTheme"));
78
86
  var _withSplunkTheme = _interopRequireDefault(require("./withSplunkTheme"));
79
87
  var _variables = _interopRequireDefault(require("./variables"));