@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,20 +1,20 @@
1
1
  import { AnyTheme, Interpolation, ThemedProps } from '../types';
2
- declare const typographyVariants: readonly ["body", "title1", "title2", "title3", "title4", "title5", "title6", "title7", "largeBody", "smallBody", "footnote", "monoBody", "monoSmallBody"];
2
+ declare const typographyVariants: readonly ["body", "title1", "title2", "title3", "title4", "title5", "title6", "largeBody", "smallBody", "monoBody", "monoSmallBody"];
3
3
  type TypographyVariant = typeof typographyVariants[number];
4
4
  type TypographyTitleVariant = Extract<TypographyVariant, 'title1' | 'title2' | 'title3' | 'title4' | 'title5' | 'title6' | 'title7'>;
5
5
  interface TypographyParams {
6
6
  /**
7
7
  * Set the font-family to sans-serif or monospace based on current theme.
8
8
  */
9
- family?: 'sansSerif' | 'monospace';
9
+ family?: 'sansSerif' | 'monospace' | 'title';
10
10
  /**
11
11
  * Set the size to a system-standard size.
12
12
  */
13
- size?: 56 | 36 | 32 | 24 | 20 | 18 | 16 | 14 | 12 | 10;
13
+ size?: 24 | 20 | 18 | 16 | 14 | 12;
14
14
  /**
15
15
  * Set the line-height to a system-standard size.
16
16
  */
17
- lineHeight?: 64 | 40 | 32 | 28 | 24 | 22 | 20 | 16 | 13;
17
+ lineHeight?: 'single' | 'tight' | 'snug' | 'comfortable' | 'relaxed' | 'spacious' | 'normal';
18
18
  /**
19
19
  * Set the color to a system-standard color: e.g. `active` for `@splunk/themes/variables.contentColorActive`.
20
20
  */
@@ -23,10 +23,6 @@ interface TypographyParams {
23
23
  * Set the font-weight to a system-standard value.
24
24
  */
25
25
  weight?: 'light' | 'normal' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
26
- /**
27
- * Apply a reset to the element's margin and padding. This defaults to true if using a `variant`.
28
- */
29
- withReset?: boolean;
30
26
  }
31
27
  /**
32
28
  * A mixin for styling text content using predefined typography variants
@@ -63,19 +59,16 @@ interface TypographyParams {
63
59
  * `'title4'`,
64
60
  * `'title5'`,
65
61
  * `'title6'`,
66
- * `'title7'`,
67
62
  * `'largeBody'`,
68
63
  * `'smallBody'`,
69
- * `'footnote'`,
70
64
  * `'monoBody'`, or
71
65
  * `'monoSmallBody'`,
72
66
  * @param {object} [typographyParams] Customize the font settings or element using system values for: `family`, `size`, `lineHeight`, `color`, and `weight`.
73
- * Default margin and padding can be removed with `withReset`.
74
67
  * @public
75
68
  */
76
69
  declare function typography<T extends AnyTheme, A extends ThemedProps>(): Interpolation<T, A>;
77
70
  declare function typography<T extends AnyTheme, A extends ThemedProps>(variant: TypographyVariant): Interpolation<T, A>;
78
- declare function typography<T extends AnyTheme, A extends ThemedProps>({ family, size, lineHeight, color, weight, withReset, }: TypographyParams): Interpolation<T, A>;
71
+ declare function typography<T extends AnyTheme, A extends ThemedProps>({ family, size, lineHeight, color, weight, }: TypographyParams): Interpolation<T, A>;
79
72
  declare function typography<T extends AnyTheme, A extends ThemedProps>(variant: TypographyVariant, additionalParams: TypographyParams): Interpolation<T, A>;
80
73
  export default typography;
81
74
  export { typographyVariants, TypographyTitleVariant, TypographyVariant, TypographyParams };
@@ -2,6 +2,7 @@ import { ColorScheme } from '../types';
2
2
  declare function createPrismaBase({ colorScheme }: {
3
3
  colorScheme: ColorScheme;
4
4
  }): {
5
+ linkColor: string;
5
6
  zindexLayer: number;
6
7
  zindexFixedNavbar: number;
7
8
  zindexModalBackdrop: number;
@@ -9,13 +10,12 @@ declare function createPrismaBase({ colorScheme }: {
9
10
  zindexPopover: number;
10
11
  zindexToastMessages: number;
11
12
  draggableBackground: string;
12
- activeBorder: string;
13
13
  borderColor: string;
14
14
  borderColorWeak: string;
15
15
  borderColorStrong: string;
16
- hoverShadow: string;
17
16
  focusShadow: string;
18
17
  focusShadowInset: string;
18
+ hoverShadow: string;
19
19
  highLow4LHigh: string;
20
20
  highLow4LLow: string;
21
21
  highLow4DHigh: string;
@@ -175,11 +175,7 @@ declare function createPrismaBase({ colorScheme }: {
175
175
  categorical2L1: string;
176
176
  categorical2L2: string;
177
177
  categorical2L3: string;
178
- categorical2L4: string; /**
179
- * ## Font family
180
- *
181
- * @valueSet
182
- */
178
+ categorical2L4: string;
183
179
  categorical2L5: string;
184
180
  categorical2L6: string;
185
181
  categorical2L7: string;
@@ -220,29 +216,29 @@ declare function createPrismaBase({ colorScheme }: {
220
216
  static14: string;
221
217
  static15: string;
222
218
  static16: string;
223
- /**
224
- * ## Interactive state shadows
225
- *
226
- * @shadowSet
227
- *
228
- */
229
219
  static17: string;
230
220
  static18: string;
231
221
  static19: string;
232
222
  static20: string;
233
223
  focusColor: string;
234
- transparent: string;
235
- linkColor: string;
224
+ lineLength: string;
225
+ lineHeight: string;
226
+ fontSizeSmall: string;
227
+ fontSize: string;
228
+ fontSizeLarge: string;
229
+ fontSizeXLarge: string;
230
+ fontSizeXXLarge: string;
236
231
  fontWeightLight: number;
237
232
  fontWeightNormal: number;
238
233
  fontWeightSemiBold: number;
239
234
  fontWeightBold: number;
240
235
  fontWeightHeavy: number;
241
236
  fontWeightExtraBold: number;
237
+ fontFamily: string;
238
+ fontFamilyTitle: string;
242
239
  sansFontFamily: string;
243
240
  serifFontFamily: string;
244
241
  monoFontFamily: string;
245
- fontFamily: string;
246
242
  };
247
243
  type PrismaBase = ReturnType<typeof createPrismaBase>;
248
244
  export default createPrismaBase;
@@ -1,3 +1,4 @@
1
+ import { SpacingSizing } from '../design-tokens';
1
2
  /**
2
3
  * ## Measures
3
4
  * Spacing is used for margin on any element or padding on containers, but can be used for other
@@ -5,23 +6,7 @@
5
6
  *
6
7
  * @valueSet
7
8
  */
8
- declare const measures: {
9
- spacingXSmall: string;
10
- spacingSmall: string;
11
- spacingMedium: string;
12
- spacingLarge: string;
13
- spacingXLarge: string;
14
- spacingXXLarge: string;
15
- spacingXXXLarge: string;
16
- fontSizeSmall: string;
17
- fontSize: string;
18
- fontSizeLarge: string;
19
- fontSizeXLarge: string;
20
- fontSizeXXLarge: string;
21
- lineHeight: string;
22
- inputHeight: string;
23
- borderRadius: string;
24
- };
9
+ declare const measures: SpacingSizing;
25
10
  type Comfortable = typeof measures;
26
11
  export default measures;
27
12
  export { Comfortable };
@@ -1,3 +1,4 @@
1
+ import { SpacingSizing } from '../design-tokens';
1
2
  /**
2
3
  * ## Measures
3
4
  * Spacing is used for margin on any element or padding on containers, but can be used for other
@@ -9,23 +10,7 @@
9
10
  *
10
11
  * @valueSet
11
12
  */
12
- declare const measures: {
13
- spacingXSmall: string;
14
- spacingSmall: string;
15
- spacingMedium: string;
16
- spacingLarge: string;
17
- spacingXLarge: string;
18
- spacingXXLarge: string;
19
- spacingXXXLarge: string;
20
- fontSizeSmall: string;
21
- fontSize: string;
22
- fontSizeLarge: string;
23
- fontSizeXLarge: string;
24
- fontSizeXXLarge: string;
25
- lineHeight: string;
26
- inputHeight: string;
27
- borderRadius: string;
28
- };
13
+ declare const measures: SpacingSizing;
29
14
  type Compact = typeof measures;
30
15
  export default measures;
31
16
  export { Compact };
@@ -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,6 +23,9 @@ declare const theme: {
19
23
  interactiveColorOverlayDrag: string;
20
24
  interactiveColorBackground: string;
21
25
  interactiveColorBackgroundDisabled: string;
26
+ interactiveColorAccent: string;
27
+ interactiveColorAccentError: string;
28
+ interactiveColorAccentErrorStrong: string;
22
29
  black: string;
23
30
  neutral100: string;
24
31
  neutral200: string;
@@ -26,18 +33,33 @@ declare const theme: {
26
33
  neutral400: string;
27
34
  neutral500: string;
28
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 Dark = typeof theme;
70
121
  export default theme;