@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,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const SplunkThemesTool: React.MemoExoticComponent<() => JSX.Element>;
2
+ export declare const SplunkThemesTool: React.MemoExoticComponent<() => React.JSX.Element>;
@@ -1,95 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _tinycolor = _interopRequireDefault(require("tinycolor2"));
8
- var _light = _interopRequireDefault(require("./light"));
9
- var _dark = _interopRequireDefault(require("./dark"));
10
- var _compact = _interopRequireDefault(require("./compact"));
11
- var _comfortable = _interopRequireDefault(require("./comfortable"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
14
- function createPrismaAliases(_ref) {
15
- var colorScheme = _ref.colorScheme,
16
- density = _ref.density;
17
- var cs = {
18
- light: _light["default"],
19
- dark: _dark["default"]
20
- }[colorScheme];
21
- var d = {
22
- compact: _compact["default"],
23
- comfortable: _comfortable["default"]
24
- }[density];
25
-
26
- /**
27
- * # Prisma Aliases
28
- * The following aliases for prisma variables are provided for convenience. Just because an alias is provided,
29
- * does not mean it is ideal for enterprise themes in all scenarios.
30
- *
31
- * They cover all values except most `interactiveColor*` variables.
32
- *
33
- *
34
- * For example, use
35
- * ``` css
36
- * const myClickable = styled(Clickable)`
37
- * color: ${variables.contentColorDefault};
38
- * }
39
- * ```
40
- * instead of
41
- * ``` css
42
- * const myClickable = styled(Clickable)`
43
- * color: ${pick({
44
- * enterprise: variables.textColor;
45
- * prisma: variables.contentColorDefault;
46
- * })};
47
- * }
48
- * ```
49
- *
50
- * @valueSet
51
- */
52
- var prismaAliases = {
53
- accentColorPositive: cs.successColor,
54
- accentColorWarning: cs.warningColor,
55
- accentColorAlert: cs.alertColor,
56
- accentColorNegative: cs.errorColor,
57
- embossShadow: cs.overlayShadow,
58
- dragShadow: cs.overlayShadow,
59
- modalShadow: cs.overlayShadow,
60
- backgroundColorPopup: cs.backgroundColor,
61
- backgroundColorSection: cs.backgroundColor,
62
- backgroundColorSidebar: cs.backgroundColor,
63
- backgroundColorPage: cs.backgroundColor,
64
- backgroundColorNavigation: cs.backgroundColor,
65
- backgroundColorFloating: cs.backgroundColor,
66
- backgroundColorDialog: cs.backgroundColor,
67
- backgroundColorScrim: (0, _tinycolor["default"])(cs.gray30).setAlpha(0.8).toRgbString(),
68
- contentColorActive: cs.textColor,
69
- contentColorDefault: cs.textColor,
70
- contentColorMuted: cs.textGray,
71
- contentColorDisabled: cs.textDisabledColor,
72
- contentColorInverted: colorScheme === 'dark' ? cs.gray30 : cs.gray30,
73
- neutral100: colorScheme === 'dark' ? cs.gray25 : cs.gray98,
74
- neutral200: colorScheme === 'dark' ? cs.gray30 : cs.gray96,
75
- neutral300: colorScheme === 'dark' ? cs.gray45 : cs.gray92,
76
- neutral400: colorScheme === 'dark' ? cs.gray60 : _tinycolor["default"].mix(cs.gray92, cs.gray80).toRgbString(),
77
- neutral500: cs.gray80,
78
- interactiveColorPrimary: cs.brandColor,
79
- interactiveColorBorder: colorScheme === 'dark' ? cs.gray20 : cs.gray60,
80
- interactiveColorBorderActive: colorScheme === 'dark' ? cs.gray20 : cs.gray60,
81
- interactiveColorBorderHover: colorScheme === 'dark' ? cs.gray20 : cs.gray60,
82
- interactiveColorBorderDisabled: colorScheme === 'dark' ? cs.gray30 : cs.gray92,
83
- interactiveColorBackgroundDisabled: colorScheme === 'dark' ? cs.gray22 : cs.gray96,
84
- spacingXSmall: d.spacingQuarter,
85
- spacingSmall: d.spacingHalf,
86
- spacingMedium: "calc(".concat(d.spacing, " * 0.75)"),
87
- spacingLarge: d.spacing,
88
- spacingXLarge: "calc(".concat(d.spacing, " * 1.5)"),
89
- spacingXXLarge: "calc(".concat(d.spacing, " * 2)"),
90
- spacingXXXLarge: "calc(".concat(d.spacing, " * 2.5)")
91
- };
92
- return prismaAliases;
93
- }
94
- var _default = createPrismaAliases;
95
- exports["default"] = _default;
@@ -1,47 +0,0 @@
1
- import { ColorScheme, Density } from '../types';
2
- declare function createPrismaAliases({ colorScheme, density, }: {
3
- colorScheme: ColorScheme;
4
- density: Density;
5
- }): {
6
- accentColorPositive: string;
7
- accentColorWarning: string;
8
- accentColorAlert: string;
9
- accentColorNegative: string;
10
- embossShadow: string;
11
- dragShadow: string;
12
- modalShadow: string;
13
- backgroundColorPopup: string;
14
- backgroundColorSection: string;
15
- backgroundColorSidebar: string;
16
- backgroundColorPage: string;
17
- backgroundColorNavigation: string;
18
- backgroundColorFloating: string;
19
- backgroundColorDialog: string;
20
- backgroundColorScrim: string;
21
- contentColorActive: string;
22
- contentColorDefault: string;
23
- contentColorMuted: string;
24
- contentColorDisabled: string;
25
- contentColorInverted: string;
26
- neutral100: string;
27
- neutral200: string;
28
- neutral300: string;
29
- neutral400: string;
30
- neutral500: string;
31
- interactiveColorPrimary: string;
32
- interactiveColorBorder: string;
33
- interactiveColorBorderActive: string;
34
- interactiveColorBorderHover: string;
35
- interactiveColorBorderDisabled: string;
36
- interactiveColorBackgroundDisabled: string;
37
- spacingXSmall: string;
38
- spacingSmall: string;
39
- spacingMedium: string;
40
- spacingLarge: string;
41
- spacingXLarge: string;
42
- spacingXXLarge: string;
43
- spacingXXXLarge: string;
44
- };
45
- type PrismaAliases = ReturnType<typeof createPrismaAliases>;
46
- export default createPrismaAliases;
47
- export { PrismaAliases };