@splunk/themes 0.22.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 (85) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/CHANGELOG.v1.md +70 -0
  3. package/SplunkThemeProvider.js +18 -31
  4. package/design-tokens/colors.js +495 -0
  5. package/design-tokens/dataViz.js +486 -0
  6. package/design-tokens/deprecated.js +249 -0
  7. package/design-tokens/elevation.js +44 -0
  8. package/design-tokens/index.js +23 -0
  9. package/design-tokens/spacing-sizing.js +39 -0
  10. package/design-tokens/typography.js +67 -0
  11. package/enterprise/comfortable.js +20 -11
  12. package/enterprise/compact.js +20 -15
  13. package/enterprise/dark.js +188 -53
  14. package/enterprise/dataViz.js +491 -0
  15. package/enterprise/index.js +9 -22
  16. package/enterprise/light.js +316 -271
  17. package/getSettingsFromThemedProps.js +4 -8
  18. package/getTheme.js +13 -26
  19. package/index.js +9 -13
  20. package/mixins/index.js +47 -19
  21. package/mixins/layout.js +42 -0
  22. package/mixins/prose.js +67 -0
  23. package/mixins/tests/prose.unit.js +49 -0
  24. package/mixins/tests/typography.unit.js +54 -103
  25. package/mixins/tests/utilityMixins.unit.js +3 -11
  26. package/mixins/typography.js +154 -188
  27. package/mixins/utilityMixins.js +13 -39
  28. package/package.json +22 -17
  29. package/pick.js +7 -18
  30. package/pickVariant.js +1 -7
  31. package/prisma/base.js +34 -42
  32. package/prisma/comfortable.js +1 -8
  33. package/prisma/compact.js +1 -8
  34. package/prisma/dark.js +90 -33
  35. package/prisma/dataViz.js +71 -87
  36. package/prisma/index.js +8 -16
  37. package/prisma/light.js +91 -34
  38. package/splunk-magnetic/index.js +178 -0
  39. package/splunk-magnetic/magneticTokensDark.js +706 -0
  40. package/splunk-magnetic/magneticTokensLight.js +706 -0
  41. package/storybook-addon-splunk-themes/SplunkThemesTool.js +20 -42
  42. package/storybook-addon-splunk-themes/ThemedDocsContainer.js +3 -13
  43. package/storybook-addon-splunk-themes/index.js +0 -4
  44. package/storybook-addon-splunk-themes/manager.js +1 -7
  45. package/storybook-addon-splunk-themes/preview.js +4 -8
  46. package/storybook-addon-splunk-themes/tests/util.unit.js +0 -1
  47. package/storybook-addon-splunk-themes/themeOptions.js +0 -1
  48. package/storybook-addon-splunk-themes/themes.js +4 -15
  49. package/storybook-addon-splunk-themes/util.js +21 -39
  50. package/storybook-addon-splunk-themes/withSplunkTheme.js +34 -68
  51. package/types/design-tokens/colors.d.ts +875 -0
  52. package/types/design-tokens/dataViz.d.ts +433 -0
  53. package/types/design-tokens/deprecated.d.ts +468 -0
  54. package/types/design-tokens/elevation.d.ts +49 -0
  55. package/types/design-tokens/index.d.ts +541 -0
  56. package/types/design-tokens/spacing-sizing.d.ts +39 -0
  57. package/types/design-tokens/typography.d.ts +79 -0
  58. package/types/enterprise/comfortable.d.ts +11 -17
  59. package/types/enterprise/compact.d.ts +11 -21
  60. package/types/enterprise/dark.d.ts +412 -113
  61. package/types/enterprise/dataViz.d.ts +14 -0
  62. package/types/enterprise/index.d.ts +1 -2
  63. package/types/enterprise/light.d.ts +439 -139
  64. package/types/index.d.ts +1 -0
  65. package/types/mixins/index.d.ts +8 -0
  66. package/types/mixins/layout.d.ts +21 -0
  67. package/types/mixins/prose.d.ts +41 -0
  68. package/types/mixins/tests/prose.unit.d.ts +1 -0
  69. package/types/mixins/typography.d.ts +5 -12
  70. package/types/prisma/base.d.ts +12 -16
  71. package/types/prisma/comfortable.d.ts +2 -17
  72. package/types/prisma/compact.d.ts +2 -17
  73. package/types/prisma/dark.d.ts +60 -9
  74. package/types/prisma/dataViz.d.ts +8 -426
  75. package/types/prisma/light.d.ts +62 -11
  76. package/types/splunk-magnetic/index.d.ts +2941 -0
  77. package/types/splunk-magnetic/magneticTokensDark.d.ts +700 -0
  78. package/types/splunk-magnetic/magneticTokensLight.d.ts +700 -0
  79. package/types/storybook-addon-splunk-themes/SplunkThemesTool.d.ts +1 -1
  80. package/useSplunkTheme.js +14 -22
  81. package/utils.js +25 -35
  82. package/variables.js +17 -31
  83. package/withSplunkTheme.js +26 -36
  84. package/enterprise/prismaAliases.js +0 -103
  85. package/types/enterprise/prismaAliases.d.ts +0 -47
@@ -1,432 +1,14 @@
1
+ import { Categorical, DataViz, Divergent, HighLow, Sequential, StaticColors } from '../design-tokens/dataViz';
1
2
  /**
2
- * ## Data viz
3
- *
4
- * Colors should be used in their prescribed order.
5
- * Don't mix-and-match between sets in the same visualization.
6
- *
7
- * ### Static colors
3
+ * #### Static colors
8
4
  *
9
5
  * @colorSet verbose
10
6
  */
11
- declare const staticColors: {
12
- static1: string;
13
- static2: string;
14
- static3: string;
15
- static4: string;
16
- static5: string;
17
- static6: string;
18
- static7: string;
19
- static8: string;
20
- static9: string;
21
- static10: string;
22
- static11: string;
23
- static12: string;
24
- static13: string;
25
- static14: string;
26
- static15: string;
27
- static16: string;
28
- static17: string;
29
- static18: string;
30
- static19: string;
31
- static20: string;
32
- };
33
- declare const categorical: {
34
- categorical2L1: string;
35
- categorical2L2: string;
36
- categorical2L3: string;
37
- categorical2L4: string;
38
- categorical2L5: string;
39
- categorical2L6: string;
40
- categorical2L7: string;
41
- categorical2D1: string;
42
- categorical2D2: string;
43
- categorical2D3: string;
44
- categorical2D4: string;
45
- categorical2D5: string;
46
- categorical2D6: string;
47
- categorical2D7: string;
48
- categorical1L1: string;
49
- categorical1L2: string;
50
- categorical1L3: string;
51
- categorical1L4: string;
52
- categorical1L5: string;
53
- categorical1L6: string;
54
- categorical1L7: string;
55
- categorical1D1: string;
56
- categorical1D2: string;
57
- categorical1D3: string;
58
- categorical1D4: string;
59
- categorical1D5: string;
60
- categorical1D6: string;
61
- categorical1D7: string;
62
- };
63
- declare const divergent: {
64
- divergent4L1: string;
65
- divergent4L2: string;
66
- divergent4L3: string;
67
- divergent4L4: string;
68
- divergent4L5: string;
69
- divergent4L6: string;
70
- divergent4L7: string;
71
- divergent4D1: string;
72
- divergent4D2: string;
73
- divergent4D3: string;
74
- divergent4D4: string;
75
- divergent4D5: string;
76
- divergent4D6: string;
77
- divergent4D7: string;
78
- divergent3L1: string;
79
- divergent3L2: string;
80
- divergent3L3: string;
81
- divergent3L4: string;
82
- divergent3L5: string;
83
- divergent3L6: string;
84
- divergent3L7: string;
85
- divergent3D1: string;
86
- divergent3D2: string;
87
- divergent3D3: string;
88
- divergent3D4: string;
89
- divergent3D5: string;
90
- divergent3D6: string;
91
- divergent3D7: string;
92
- divergent2L1: string;
93
- divergent2L2: string;
94
- divergent2L3: string;
95
- divergent2L4: string;
96
- divergent2L5: string;
97
- divergent2L6: string;
98
- divergent2L7: string;
99
- divergent2D1: string;
100
- divergent2D2: string;
101
- divergent2D3: string;
102
- divergent2D4: string;
103
- divergent2D5: string;
104
- divergent2D6: string;
105
- divergent2D7: string;
106
- divergent1L1: string;
107
- divergent1L2: string;
108
- divergent1L3: string;
109
- divergent1L4: string;
110
- divergent1L5: string;
111
- divergent1L6: string;
112
- divergent1L7: string;
113
- divergent1D1: string;
114
- divergent1D2: string;
115
- divergent1D3: string;
116
- divergent1D4: string;
117
- divergent1D5: string;
118
- divergent1D6: string;
119
- divergent1D7: string;
120
- };
121
- declare const sequential: {
122
- sequential6L1: string;
123
- sequential6L2: string;
124
- sequential6L3: string;
125
- sequential6L4: string;
126
- sequential6L5: string;
127
- sequential6L6: string;
128
- sequential6L7: string;
129
- sequential6D1: string;
130
- sequential6D2: string;
131
- sequential6D3: string;
132
- sequential6D4: string;
133
- sequential6D5: string;
134
- sequential6D6: string;
135
- sequential6D7: string;
136
- sequential5L1: string;
137
- sequential5L2: string;
138
- sequential5L3: string;
139
- sequential5L4: string;
140
- sequential5L5: string;
141
- sequential5L6: string;
142
- sequential5L7: string;
143
- sequential5D1: string;
144
- sequential5D2: string;
145
- sequential5D3: string;
146
- sequential5D4: string;
147
- sequential5D5: string;
148
- sequential5D6: string;
149
- sequential5D7: string;
150
- sequential4L1: string;
151
- sequential4L2: string;
152
- sequential4L3: string;
153
- sequential4L4: string;
154
- sequential4L5: string;
155
- sequential4L6: string;
156
- sequential4L7: string;
157
- sequential4D1: string;
158
- sequential4D2: string;
159
- sequential4D3: string;
160
- sequential4D4: string;
161
- sequential4D5: string;
162
- sequential4D6: string;
163
- sequential4D7: string;
164
- sequential3L1: string;
165
- sequential3L2: string;
166
- sequential3L3: string;
167
- sequential3L4: string;
168
- sequential3L5: string;
169
- sequential3L6: string;
170
- sequential3L7: string;
171
- sequential3D1: string;
172
- sequential3D2: string;
173
- sequential3D3: string;
174
- sequential3D4: string;
175
- sequential3D5: string;
176
- sequential3D6: string;
177
- sequential3D7: string;
178
- sequential2L1: string;
179
- sequential2L2: string;
180
- sequential2L3: string;
181
- sequential2L4: string;
182
- sequential2L5: string;
183
- sequential2L6: string;
184
- sequential2L7: string;
185
- sequential2D1: string;
186
- sequential2D2: string;
187
- sequential2D3: string;
188
- sequential2D4: string;
189
- sequential2D5: string;
190
- sequential2D6: string;
191
- sequential2D7: string;
192
- sequential1L1: string;
193
- sequential1L2: string;
194
- sequential1L3: string;
195
- sequential1L4: string;
196
- sequential1L5: string;
197
- sequential1L6: string;
198
- sequential1L7: string;
199
- sequential1D1: string;
200
- sequential1D2: string;
201
- sequential1D3: string;
202
- sequential1D4: string;
203
- sequential1D5: string;
204
- sequential1D6: string;
205
- sequential1D7: string;
206
- };
207
- declare const highLow: {
208
- highLow4LHigh: string;
209
- highLow4LLow: string;
210
- highLow4DHigh: string;
211
- highLow4DLow: string;
212
- highLow3LHigh: string;
213
- highLow3LLow: string;
214
- highLow3DHigh: string;
215
- highLow3DLow: string;
216
- highLow2LHigh: string;
217
- highLow2LLow: string;
218
- highLow2DHigh: string;
219
- highLow2DLow: string;
220
- highLow1LHigh: string;
221
- highLow1LLow: string;
222
- highLow1DHigh: string;
223
- highLow1DLow: string;
224
- };
225
- declare const dataViz: {
226
- highLow4LHigh: string;
227
- highLow4LLow: string;
228
- highLow4DHigh: string;
229
- highLow4DLow: string;
230
- highLow3LHigh: string;
231
- highLow3LLow: string;
232
- highLow3DHigh: string;
233
- highLow3DLow: string;
234
- highLow2LHigh: string;
235
- highLow2LLow: string;
236
- highLow2DHigh: string;
237
- highLow2DLow: string;
238
- highLow1LHigh: string;
239
- highLow1LLow: string;
240
- highLow1DHigh: string;
241
- highLow1DLow: string;
242
- sequential6L1: string;
243
- sequential6L2: string;
244
- sequential6L3: string;
245
- sequential6L4: string;
246
- sequential6L5: string;
247
- sequential6L6: string;
248
- sequential6L7: string;
249
- sequential6D1: string;
250
- sequential6D2: string;
251
- sequential6D3: string;
252
- sequential6D4: string;
253
- sequential6D5: string;
254
- sequential6D6: string;
255
- sequential6D7: string;
256
- sequential5L1: string;
257
- sequential5L2: string;
258
- sequential5L3: string;
259
- sequential5L4: string;
260
- sequential5L5: string;
261
- sequential5L6: string;
262
- sequential5L7: string;
263
- sequential5D1: string;
264
- sequential5D2: string;
265
- sequential5D3: string;
266
- sequential5D4: string;
267
- sequential5D5: string;
268
- sequential5D6: string;
269
- sequential5D7: string;
270
- sequential4L1: string;
271
- sequential4L2: string;
272
- sequential4L3: string;
273
- sequential4L4: string;
274
- sequential4L5: string;
275
- sequential4L6: string;
276
- sequential4L7: string;
277
- sequential4D1: string;
278
- sequential4D2: string;
279
- sequential4D3: string;
280
- sequential4D4: string;
281
- sequential4D5: string;
282
- sequential4D6: string;
283
- sequential4D7: string;
284
- sequential3L1: string;
285
- sequential3L2: string;
286
- sequential3L3: string;
287
- sequential3L4: string;
288
- sequential3L5: string;
289
- sequential3L6: string;
290
- sequential3L7: string;
291
- sequential3D1: string;
292
- sequential3D2: string;
293
- sequential3D3: string;
294
- sequential3D4: string;
295
- sequential3D5: string;
296
- sequential3D6: string;
297
- sequential3D7: string;
298
- sequential2L1: string;
299
- sequential2L2: string;
300
- sequential2L3: string;
301
- sequential2L4: string;
302
- sequential2L5: string;
303
- sequential2L6: string;
304
- sequential2L7: string;
305
- sequential2D1: string;
306
- sequential2D2: string;
307
- sequential2D3: string;
308
- sequential2D4: string;
309
- sequential2D5: string;
310
- sequential2D6: string;
311
- sequential2D7: string;
312
- sequential1L1: string;
313
- sequential1L2: string;
314
- sequential1L3: string;
315
- sequential1L4: string;
316
- sequential1L5: string;
317
- sequential1L6: string;
318
- sequential1L7: string;
319
- sequential1D1: string;
320
- sequential1D2: string;
321
- sequential1D3: string;
322
- sequential1D4: string;
323
- sequential1D5: string;
324
- sequential1D6: string;
325
- sequential1D7: string;
326
- divergent4L1: string;
327
- divergent4L2: string;
328
- divergent4L3: string;
329
- divergent4L4: string;
330
- divergent4L5: string;
331
- divergent4L6: string;
332
- divergent4L7: string;
333
- divergent4D1: string;
334
- divergent4D2: string;
335
- divergent4D3: string;
336
- divergent4D4: string;
337
- divergent4D5: string;
338
- divergent4D6: string;
339
- divergent4D7: string;
340
- divergent3L1: string;
341
- divergent3L2: string;
342
- divergent3L3: string;
343
- divergent3L4: string;
344
- divergent3L5: string;
345
- divergent3L6: string;
346
- divergent3L7: string;
347
- divergent3D1: string;
348
- divergent3D2: string;
349
- divergent3D3: string;
350
- divergent3D4: string;
351
- divergent3D5: string;
352
- divergent3D6: string;
353
- divergent3D7: string;
354
- divergent2L1: string;
355
- divergent2L2: string;
356
- divergent2L3: string;
357
- divergent2L4: string;
358
- divergent2L5: string;
359
- divergent2L6: string;
360
- divergent2L7: string;
361
- divergent2D1: string;
362
- divergent2D2: string;
363
- divergent2D3: string;
364
- divergent2D4: string;
365
- divergent2D5: string;
366
- divergent2D6: string;
367
- divergent2D7: string;
368
- divergent1L1: string;
369
- divergent1L2: string;
370
- divergent1L3: string;
371
- divergent1L4: string;
372
- divergent1L5: string;
373
- divergent1L6: string;
374
- divergent1L7: string;
375
- divergent1D1: string;
376
- divergent1D2: string;
377
- divergent1D3: string;
378
- divergent1D4: string;
379
- divergent1D5: string;
380
- divergent1D6: string;
381
- divergent1D7: string;
382
- categorical2L1: string;
383
- categorical2L2: string;
384
- categorical2L3: string;
385
- categorical2L4: string;
386
- categorical2L5: string;
387
- categorical2L6: string;
388
- categorical2L7: string;
389
- categorical2D1: string;
390
- categorical2D2: string;
391
- categorical2D3: string;
392
- categorical2D4: string;
393
- categorical2D5: string;
394
- categorical2D6: string;
395
- categorical2D7: string;
396
- categorical1L1: string;
397
- categorical1L2: string;
398
- categorical1L3: string;
399
- categorical1L4: string;
400
- categorical1L5: string;
401
- categorical1L6: string;
402
- categorical1L7: string;
403
- categorical1D1: string;
404
- categorical1D2: string;
405
- categorical1D3: string;
406
- categorical1D4: string;
407
- categorical1D5: string;
408
- categorical1D6: string;
409
- categorical1D7: string;
410
- static1: string;
411
- static2: string;
412
- static3: string;
413
- static4: string;
414
- static5: string;
415
- static6: string;
416
- static7: string;
417
- static8: string;
418
- static9: string;
419
- static10: string;
420
- static11: string;
421
- static12: string;
422
- static13: string;
423
- static14: string;
424
- static15: string;
425
- static16: string;
426
- static17: string;
427
- static18: string;
428
- static19: string;
429
- static20: string;
430
- };
7
+ declare const staticColors: StaticColors;
8
+ declare const categorical: Categorical;
9
+ declare const divergent: Divergent;
10
+ declare const sequential: Sequential;
11
+ declare const highLow: HighLow;
12
+ declare const dataViz: DataViz;
431
13
  export { staticColors, categorical, divergent, sequential, highLow };
432
14
  export default dataViz;
@@ -1,4 +1,8 @@
1
1
  declare const theme: {
2
+ accentColorPositive: string;
3
+ accentColorWarning: string;
4
+ accentColorAlert: string;
5
+ accentColorNegative: string;
2
6
  syntaxBlue: string;
3
7
  syntaxBrown: string;
4
8
  syntaxGray: string;
@@ -19,25 +23,43 @@ declare const theme: {
19
23
  interactiveColorOverlayDrag: string;
20
24
  interactiveColorBackground: string;
21
25
  interactiveColorBackgroundDisabled: string;
22
- white: string;
26
+ interactiveColorAccent: string;
27
+ interactiveColorAccentError: string;
28
+ interactiveColorAccentErrorStrong: string;
29
+ black: string;
23
30
  neutral100: string;
24
31
  neutral200: string;
25
32
  neutral300: string;
26
33
  neutral400: string;
27
34
  neutral500: string;
28
- black: string;
35
+ white: string;
36
+ transparent: string;
37
+ contentBackgroundColorNegativeWeak: string;
38
+ contentColorLink: string;
39
+ contentColorAccent: string;
40
+ contentColorAccentStrong: string;
41
+ contentColorAccentWeak: string;
29
42
  contentColorActive: string;
30
43
  contentColorDefault: string;
31
44
  contentColorDisabled: string;
45
+ contentColorInfo: string;
32
46
  contentColorInverted: string;
33
47
  contentColorMuted: string;
34
- backgroundColorPopup: string;
35
- backgroundColorSection: string;
36
- backgroundColorSidebar: string;
37
- backgroundColorPage: string;
48
+ contentColorNegative: string;
49
+ contentColorNegativeStrong: string;
50
+ contentColorNegativeWeak: string;
51
+ contentColorPositive: string;
52
+ contentColorWarning: string;
53
+ borderColor: string;
54
+ borderColorWeak: string;
55
+ borderColorStrong: string;
38
56
  backgroundColorNavigation: string;
39
- backgroundColorFloating: string;
57
+ backgroundColorPage: string;
58
+ backgroundColorSidebar: string;
59
+ backgroundColorSection: string;
40
60
  backgroundColorDialog: string;
61
+ backgroundColorPopup: string;
62
+ backgroundColorFloating: string;
41
63
  backgroundColorScrim: string;
42
64
  embossShadow: string;
43
65
  overlayShadow: string;
@@ -61,10 +83,39 @@ declare const theme: {
61
83
  statusColorCritical: string;
62
84
  statusColorCriticalWeak: string;
63
85
  statusColorCriticalStrong: string;
64
- accentColorPositive: string;
65
- accentColorWarning: string;
66
- accentColorAlert: string;
67
- accentColorNegative: string;
86
+ actionColorBackgroundPrimary: string; /**
87
+ * ## Background colors
88
+ * Background colors should be used only for backgrounds of higher level sections & containers of a UI.
89
+ *
90
+ * @colorSet verbose
91
+ */
92
+ actionColorBackgroundPrimaryActive: string;
93
+ actionColorBackgroundPrimaryDisabled: string;
94
+ actionColorBackgroundPrimaryHover: string;
95
+ actionColorBackgroundSecondary: string;
96
+ actionColorBackgroundSecondaryActive: string;
97
+ actionColorBackgroundSecondaryDisabled: string;
98
+ actionColorBackgroundSecondaryHover: string;
99
+ actionColorBackgroundSubtle: string;
100
+ actionColorBackgroundSubtleActive: string;
101
+ actionColorBackgroundSubtleDisabled: string;
102
+ actionColorBackgroundSubtleHover: string;
103
+ actionColorBackgroundDestructive: string;
104
+ actionColorBackgroundDestructiveActive: string;
105
+ actionColorBackgroundDestructiveDisabled: string;
106
+ actionColorBackgroundDestructiveHover: string;
107
+ actionColorBackgroundDestructiveSecondary: string;
108
+ actionColorBackgroundDestructiveSecondaryActive: string;
109
+ actionColorBackgroundDestructiveSecondaryDisabled: string;
110
+ actionColorBackgroundDestructiveSecondaryHover: string;
111
+ actionColorBorderSecondary: string;
112
+ actionColorBorderSecondaryActive: string;
113
+ actionColorBorderSecondaryDisabled: string;
114
+ actionColorBorderSecondaryHover: string;
115
+ actionColorBorderDestructiveSecondary: string;
116
+ actionColorBorderDestructiveSecondaryActive: string;
117
+ actionColorBorderDestructiveSecondaryDisabled: string;
118
+ actionColorBorderDestructiveSecondaryHover: string;
68
119
  };
69
120
  type Light = typeof theme;
70
121
  export default theme;