@splunk/themes 1.0.0-beta.3 → 1.0.0-beta.5
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 +5 -0
- package/CHANGELOG.v1.md +25 -0
- package/design-tokens/colors.js +6 -84
- package/design-tokens/deprecated.js +70 -0
- package/design-tokens/elevation.js +0 -1
- package/design-tokens/spacing-sizing.js +1 -0
- package/design-tokens/typography.js +4 -0
- package/enterprise/comfortable.js +1 -0
- package/enterprise/compact.js +1 -0
- package/enterprise/dark.js +25 -26
- package/enterprise/light.js +25 -26
- package/mixins/prose.js +1 -1
- package/mixins/tests/prose.unit.js +2 -2
- package/mixins/tests/typography.unit.js +43 -8
- package/mixins/typography.js +12 -7
- package/mixins/utilityMixins.js +3 -2
- package/package.json +6 -4
- package/prisma/base.js +1 -1
- package/prisma/comfortable.js +1 -0
- package/prisma/compact.js +1 -0
- package/prisma/dark.js +28 -26
- package/prisma/light.js +28 -26
- package/splunk-magnetic/index.js +3 -1
- package/types/design-tokens/colors.d.ts +9 -155
- package/types/design-tokens/deprecated.d.ts +140 -0
- package/types/design-tokens/elevation.d.ts +0 -2
- package/types/design-tokens/index.d.ts +21 -19
- package/types/design-tokens/spacing-sizing.d.ts +2 -0
- package/types/design-tokens/typography.d.ts +8 -0
- package/types/enterprise/comfortable.d.ts +1 -0
- package/types/enterprise/compact.d.ts +1 -0
- package/types/enterprise/dark.d.ts +21 -20
- package/types/enterprise/light.d.ts +21 -20
- package/types/getTheme.d.ts +0 -1
- package/types/mixins/index.d.ts +1 -1
- package/types/mixins/typography.d.ts +7 -2
- package/types/mixins/utilityMixins.d.ts +2 -2
- package/types/prisma/base.d.ts +1 -1
- package/types/prisma/dark.d.ts +19 -18
- package/types/prisma/light.d.ts +19 -18
- package/types/splunk-magnetic/index.d.ts +58 -52
- package/types/storybook-addon-splunk-themes/constants.d.ts +4 -4
- package/types/storybook-addon-splunk-themes/preview.d.ts +4 -4
- package/types/storybook-addon-splunk-themes/themes.d.ts +3 -4
- package/types/storybook-addon-splunk-themes/withSplunkTheme.d.ts +1 -1
- package/types/utils.d.ts +0 -1
package/CHANGELOG.md
CHANGED
package/CHANGELOG.v1.md
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
1.0.0-beta.5 - May 7, 2025
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* New `interactiveColorAccentErrorWeak` variable (SUI-7757).
|
|
8
|
+
* `typography` has reintroduced the `withReset` prop, which defaults to `false`. When set to `true`, it removes all browser-default styles and applies theme-specific defaults (SUI-7638).
|
|
9
|
+
|
|
10
|
+
1.0.0-beta.4 - April 22, 2025
|
|
11
|
+
----------
|
|
12
|
+
New Features:
|
|
13
|
+
* New `inputBorderWidth` variable (SUI-7384).
|
|
14
|
+
|
|
15
|
+
Bug Fixes:
|
|
16
|
+
* Fixes broken CSS for Splunk Magnetic's `backgroundColorNavigation` override (SUI-7653).
|
|
17
|
+
|
|
18
|
+
Deprecations:
|
|
19
|
+
* `statusColor*`s have been deprecated. Instead use the appropriate `notificationColor*` or `severityColor*`(SUI-7303)
|
|
20
|
+
|
|
21
|
+
API Changes:
|
|
22
|
+
* `typescript` version is now `^5.8.3` (SUI-7601).
|
|
23
|
+
* `borderActiveColor` has been deprecated. (SUI-7633).
|
|
24
|
+
* Use `interactiveColorBorderActive` for Data Entry components or `actionColorBorderSecondaryActive` for Buttons.
|
|
25
|
+
* `backgroundColorHover` have been deprecated. (SUI-7633).
|
|
26
|
+
* Use `interactiveColorOverlayHover` for Data Entry components or `actionColorBackgroundSecondaryHover` for Buttons.
|
|
27
|
+
* `hoverShadow` has been deprecated. See notes on `backgroundColorHover` for hover affordances. (SUI-7621)
|
|
28
|
+
|
|
4
29
|
1.0.0-beta.3 - April 2, 2025
|
|
5
30
|
----------
|
|
6
31
|
New Features:
|
package/design-tokens/colors.js
CHANGED
|
@@ -195,7 +195,11 @@ var interactiveColors = {
|
|
|
195
195
|
/**
|
|
196
196
|
* Stronger error color for emphasis in Data Entry components. Used for hover interaction.
|
|
197
197
|
*/
|
|
198
|
-
interactiveColorAccentErrorStrong: ''
|
|
198
|
+
interactiveColorAccentErrorStrong: '',
|
|
199
|
+
/**
|
|
200
|
+
* Weaker error color for emphasis in Data Entry components. Used for hover interaction.
|
|
201
|
+
*/
|
|
202
|
+
interactiveColorAccentErrorWeak: ''
|
|
199
203
|
};
|
|
200
204
|
|
|
201
205
|
/**
|
|
@@ -414,88 +418,6 @@ var severityColors = {
|
|
|
414
418
|
severityColorEmergency: ''
|
|
415
419
|
};
|
|
416
420
|
|
|
417
|
-
/**
|
|
418
|
-
* #### Status colors
|
|
419
|
-
* Use status colors to convey informative, positive, caution or negative content status.
|
|
420
|
-
* Weak variants do not meet graphical or text contrast and should only be used decoratively.
|
|
421
|
-
*
|
|
422
|
-
* @categoryColor
|
|
423
|
-
*/
|
|
424
|
-
var statusColors = {
|
|
425
|
-
/**
|
|
426
|
-
* Default color for informational messages and notifications.
|
|
427
|
-
*/
|
|
428
|
-
statusColorInfo: '',
|
|
429
|
-
/**
|
|
430
|
-
* Weaker, less prominent informational color, does not pass 3:1 graphical or 4.5:1 text contrast.
|
|
431
|
-
*/
|
|
432
|
-
statusColorInfoWeak: '',
|
|
433
|
-
/**
|
|
434
|
-
* Brighter, more prominent informational color.
|
|
435
|
-
*/
|
|
436
|
-
statusColorInfoStrong: '',
|
|
437
|
-
/**
|
|
438
|
-
* Default color for neutral or standard status messages.
|
|
439
|
-
*/
|
|
440
|
-
statusColorNormal: '',
|
|
441
|
-
/**
|
|
442
|
-
* Weaker, less prominent normal color, does not pass 3:1 graphical or 4.5:1 text contrast.
|
|
443
|
-
*/
|
|
444
|
-
statusColorNormalWeak: '',
|
|
445
|
-
/**
|
|
446
|
-
* Brighter, more prominent normal color.
|
|
447
|
-
*/
|
|
448
|
-
statusColorNormalStrong: '',
|
|
449
|
-
/**
|
|
450
|
-
* Default color for low-priority status messages.
|
|
451
|
-
*/
|
|
452
|
-
statusColorLow: '',
|
|
453
|
-
/**
|
|
454
|
-
* Weaker, less prominent low-priority color, does not pass 3:1 graphical or 4.5:1 text contrast.
|
|
455
|
-
*/
|
|
456
|
-
statusColorLowWeak: '',
|
|
457
|
-
/**
|
|
458
|
-
* Brighter, more prominent low-priority color.
|
|
459
|
-
*/
|
|
460
|
-
statusColorLowStrong: '',
|
|
461
|
-
/**
|
|
462
|
-
* Default color for medium-priority status messages.
|
|
463
|
-
*/
|
|
464
|
-
statusColorMedium: '',
|
|
465
|
-
/**
|
|
466
|
-
* Weaker, less prominent medium-priority color, does not pass 3:1 graphical or 4.5:1 text contrast.
|
|
467
|
-
*/
|
|
468
|
-
statusColorMediumWeak: '',
|
|
469
|
-
/**
|
|
470
|
-
* Brighter, more prominent medium-priority color.
|
|
471
|
-
*/
|
|
472
|
-
statusColorMediumStrong: '',
|
|
473
|
-
/**
|
|
474
|
-
* Default color for high-priority status messages.
|
|
475
|
-
*/
|
|
476
|
-
statusColorHigh: '',
|
|
477
|
-
/**
|
|
478
|
-
* Weaker, less prominent high-priority color, does not pass 3:1 graphical or 4.5:1 text contrast.
|
|
479
|
-
*/
|
|
480
|
-
statusColorHighWeak: '',
|
|
481
|
-
/**
|
|
482
|
-
* Brighter, more prominent high-priority color.
|
|
483
|
-
*/
|
|
484
|
-
statusColorHighStrong: '',
|
|
485
|
-
/**
|
|
486
|
-
* Default color for critical alerts or urgent messages.
|
|
487
|
-
*/
|
|
488
|
-
statusColorCritical: '',
|
|
489
|
-
/**
|
|
490
|
-
* Weaker, less prominent critical color, does not pass 3:1 graphical or 4.5:1 text contrast.
|
|
491
|
-
*/
|
|
492
|
-
statusColorCriticalWeak: '',
|
|
493
|
-
/**
|
|
494
|
-
* Brighter, more prominent critical color.
|
|
495
|
-
*/
|
|
496
|
-
statusColorCriticalStrong: ''
|
|
497
|
-
};
|
|
498
|
-
|
|
499
421
|
/**
|
|
500
422
|
* #### Syntax colors
|
|
501
423
|
*
|
|
@@ -539,6 +461,6 @@ var borderColors = {
|
|
|
539
461
|
*/
|
|
540
462
|
borderColorStrong: ''
|
|
541
463
|
};
|
|
542
|
-
var colors = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(
|
|
464
|
+
var colors = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, actionColors), interactiveColors), neutralColors), backgroundColors), contentColors), uiColors), notificationColors), severityColors), syntaxColors), borderColors);
|
|
543
465
|
var _default = colors;
|
|
544
466
|
exports["default"] = _default;
|
|
@@ -88,6 +88,76 @@ var deprecated = {
|
|
|
88
88
|
* Use `interactiveColorOverlayHover` for Data Entry components or `actionColorBackgroundSecondaryHover` for Buttons.
|
|
89
89
|
*/
|
|
90
90
|
backgroundColorHover: '',
|
|
91
|
+
/**
|
|
92
|
+
* Don't use hover shadows - see notes on backgroundColorHover for hover affordances.
|
|
93
|
+
*/
|
|
94
|
+
hoverShadow: '',
|
|
95
|
+
/**
|
|
96
|
+
* Use `notificationColorInfo` or `severityColorInfo`
|
|
97
|
+
*/
|
|
98
|
+
statusColorInfo: '',
|
|
99
|
+
/**
|
|
100
|
+
* Use `notificationColorInfoWeak`
|
|
101
|
+
*/
|
|
102
|
+
statusColorInfoWeak: '',
|
|
103
|
+
/**
|
|
104
|
+
* Use `notificationColorInfoStrong`
|
|
105
|
+
*/
|
|
106
|
+
statusColorInfoStrong: '',
|
|
107
|
+
/**
|
|
108
|
+
* Use `notificationColorPositive` or `severityColorNormal`
|
|
109
|
+
*/
|
|
110
|
+
statusColorNormal: '',
|
|
111
|
+
/**
|
|
112
|
+
* Use `notificationColorPositiveWeak`
|
|
113
|
+
*/
|
|
114
|
+
statusColorNormalWeak: '',
|
|
115
|
+
/**
|
|
116
|
+
* Use `notificationColorPositiveStrong`
|
|
117
|
+
*/
|
|
118
|
+
statusColorNormalStrong: '',
|
|
119
|
+
/**
|
|
120
|
+
* Use `notificationColorCaution` or `severityColorNotice`
|
|
121
|
+
*/
|
|
122
|
+
statusColorLow: '',
|
|
123
|
+
/**
|
|
124
|
+
* Use `notificationColorCautionWeak`
|
|
125
|
+
*/
|
|
126
|
+
statusColorLowWeak: '',
|
|
127
|
+
/**
|
|
128
|
+
* Use `notificationColorCautionStrong`
|
|
129
|
+
*/
|
|
130
|
+
statusColorLowStrong: '',
|
|
131
|
+
/**
|
|
132
|
+
* Use `severityColorWarning`
|
|
133
|
+
*/
|
|
134
|
+
statusColorMedium: '',
|
|
135
|
+
statusColorMediumWeak: '',
|
|
136
|
+
statusColorMediumStrong: '',
|
|
137
|
+
/**
|
|
138
|
+
* Use `notificationColorNegative` or `severityColorAlert`
|
|
139
|
+
*/
|
|
140
|
+
statusColorHigh: '',
|
|
141
|
+
/**
|
|
142
|
+
* Use `notificationColorNegativeWeak`
|
|
143
|
+
*/
|
|
144
|
+
statusColorHighWeak: '',
|
|
145
|
+
/**
|
|
146
|
+
* Use `notificationColorNegativeStrong`
|
|
147
|
+
*/
|
|
148
|
+
statusColorHighStrong: '',
|
|
149
|
+
/**
|
|
150
|
+
* Default color for critical alerts or urgent messages.
|
|
151
|
+
*/
|
|
152
|
+
statusColorCritical: '',
|
|
153
|
+
/**
|
|
154
|
+
* Weaker, less prominent critical color, does not pass 3:1 graphical or 4.5:1 text contrast.
|
|
155
|
+
*/
|
|
156
|
+
statusColorCriticalWeak: '',
|
|
157
|
+
/**
|
|
158
|
+
* Brighter, more prominent critical color.
|
|
159
|
+
*/
|
|
160
|
+
statusColorCriticalStrong: '',
|
|
91
161
|
brandColorL50: '',
|
|
92
162
|
brandColorL40: '',
|
|
93
163
|
brandColorL30: '',
|
|
@@ -59,6 +59,10 @@ var fontSize = {
|
|
|
59
59
|
* @categoryValue
|
|
60
60
|
*/
|
|
61
61
|
var fontMeasures = {
|
|
62
|
+
/**
|
|
63
|
+
* Use to improve readability and [accessibility](https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html)
|
|
64
|
+
* in blocks of text by preventing overly long lines.
|
|
65
|
+
*/
|
|
62
66
|
lineLength: '',
|
|
63
67
|
lineHeight: '1.5'
|
|
64
68
|
};
|
package/enterprise/compact.js
CHANGED
package/enterprise/dark.js
CHANGED
|
@@ -14,11 +14,9 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
14
14
|
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); }
|
|
15
15
|
var dragHandleDark = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA1SURBVHgB7dKhEQAgDAPAhHmwSKZHYtmHVtZVVNTkXS53UeG57yPYazLmrB8o6h8QgPqBOAOboRAPJUGIOAAAAABJRU5ErkJggg=="; // see babel-plugin-base64-png
|
|
16
16
|
var dark = {
|
|
17
|
-
backgroundColorHover: _light["default"].gray30,
|
|
18
17
|
borderColor: '#75797a',
|
|
19
18
|
borderColorWeak: '#404547',
|
|
20
|
-
borderColorStrong: '#9c9fa0'
|
|
21
|
-
borderActiveColor: "rgba(225,225,225, 0.5)"
|
|
19
|
+
borderColorStrong: '#9c9fa0'
|
|
22
20
|
};
|
|
23
21
|
var notificationColors = {
|
|
24
22
|
notificationColorInfoWeak: '#2E1B4B',
|
|
@@ -45,26 +43,6 @@ var severityColors = {
|
|
|
45
43
|
severityColorCritical: '#F2638C',
|
|
46
44
|
severityColorEmergency: '#E85FC6'
|
|
47
45
|
};
|
|
48
|
-
var statusColors = {
|
|
49
|
-
statusColorInfo: _light["default"].infoColor,
|
|
50
|
-
statusColorInfoWeak: _light["default"].infoColorD10,
|
|
51
|
-
statusColorInfoStrong: _light["default"].infoColorL10,
|
|
52
|
-
statusColorNormal: _light["default"].successColor,
|
|
53
|
-
statusColorNormalWeak: _light["default"].successColorD10,
|
|
54
|
-
statusColorNormalStrong: _light["default"].successColorL10,
|
|
55
|
-
statusColorLow: _light["default"].warningColor,
|
|
56
|
-
statusColorLowWeak: _light["default"].warningColorD10,
|
|
57
|
-
statusColorLowStrong: _light["default"].warningColorL10,
|
|
58
|
-
statusColorMedium: _light["default"].alertColor,
|
|
59
|
-
statusColorMediumWeak: _light["default"].alertColorD10,
|
|
60
|
-
statusColorMediumStrong: _light["default"].alertColorL10,
|
|
61
|
-
statusColorHigh: _light["default"].errorColor,
|
|
62
|
-
statusColorHighWeak: _light["default"].errorColorD10,
|
|
63
|
-
statusColorHighStrong: _light["default"].errorColorL10,
|
|
64
|
-
statusColorCritical: _light["default"].errorColorD10,
|
|
65
|
-
statusColorCriticalWeak: _light["default"].errorColorD20,
|
|
66
|
-
statusColorCriticalStrong: _light["default"].errorColor
|
|
67
|
-
};
|
|
68
46
|
var syntaxColors = {
|
|
69
47
|
syntaxBlue: '#6cd0f0',
|
|
70
48
|
syntaxBrown: '#fccf87',
|
|
@@ -137,7 +115,8 @@ var interactiveColors = {
|
|
|
137
115
|
interactiveColorBackgroundDisabled: 'transparent',
|
|
138
116
|
interactiveColorAccent: '#1A8929',
|
|
139
117
|
interactiveColorAccentError: _light["default"].errorColorL10,
|
|
140
|
-
interactiveColorAccentErrorStrong: '#f1b9b3'
|
|
118
|
+
interactiveColorAccentErrorStrong: '#f1b9b3',
|
|
119
|
+
interactiveColorAccentErrorWeak: '#6f261d'
|
|
141
120
|
};
|
|
142
121
|
var neutralColors = {
|
|
143
122
|
white: '#ffffff',
|
|
@@ -174,6 +153,8 @@ var shadows = {
|
|
|
174
153
|
var deprecated = {
|
|
175
154
|
backgroundColor: _light["default"].gray20,
|
|
176
155
|
// @deprecated SUI-6656
|
|
156
|
+
backgroundColorHover: _light["default"].gray30,
|
|
157
|
+
borderActiveColor: "rgba(225,225,225, 0.5)",
|
|
177
158
|
borderLightColor: _light["default"].gray60,
|
|
178
159
|
// @deprecated, SUI-5981
|
|
179
160
|
// @deprecated, SUI-6160
|
|
@@ -190,8 +171,26 @@ var deprecated = {
|
|
|
190
171
|
border: "1px solid ".concat(_light["default"].gray22),
|
|
191
172
|
borderDark: "1px solid ".concat(_light["default"].black),
|
|
192
173
|
borderLight: "1px solid ".concat(_light["default"].gray60),
|
|
193
|
-
interactiveColorPrimary: _light["default"].brandColor
|
|
174
|
+
interactiveColorPrimary: _light["default"].brandColor,
|
|
175
|
+
statusColorInfo: _light["default"].infoColor,
|
|
176
|
+
statusColorInfoWeak: _light["default"].infoColorD10,
|
|
177
|
+
statusColorInfoStrong: _light["default"].infoColorL10,
|
|
178
|
+
statusColorNormal: _light["default"].successColor,
|
|
179
|
+
statusColorNormalWeak: _light["default"].successColorD10,
|
|
180
|
+
statusColorNormalStrong: _light["default"].successColorL10,
|
|
181
|
+
statusColorLow: _light["default"].warningColor,
|
|
182
|
+
statusColorLowWeak: _light["default"].warningColorD10,
|
|
183
|
+
statusColorLowStrong: _light["default"].warningColorL10,
|
|
184
|
+
statusColorMedium: _light["default"].alertColor,
|
|
185
|
+
statusColorMediumWeak: _light["default"].alertColorD10,
|
|
186
|
+
statusColorMediumStrong: _light["default"].alertColorL10,
|
|
187
|
+
statusColorHigh: _light["default"].errorColor,
|
|
188
|
+
statusColorHighWeak: _light["default"].errorColorD10,
|
|
189
|
+
statusColorHighStrong: _light["default"].errorColorL10,
|
|
190
|
+
statusColorCritical: _light["default"].errorColorD10,
|
|
191
|
+
statusColorCriticalWeak: _light["default"].errorColorD20,
|
|
192
|
+
statusColorCriticalStrong: _light["default"].errorColor
|
|
194
193
|
};
|
|
195
|
-
var theme = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(
|
|
194
|
+
var theme = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _light["default"]), dark), actionColors), notificationColors), severityColors), backgroundColors), neutralColors), syntaxColors), contentColors), shadows), interactiveColors), deprecated), backgrounds);
|
|
196
195
|
var _default = theme;
|
|
197
196
|
exports["default"] = _default;
|
package/enterprise/light.js
CHANGED
|
@@ -59,12 +59,10 @@ var neutralColors = {
|
|
|
59
59
|
transparent: 'transparent'
|
|
60
60
|
};
|
|
61
61
|
var usageColors = {
|
|
62
|
-
borderActiveColor: "rgba(0,0,0, 0.5)",
|
|
63
62
|
borderColor: '#8c8c8c',
|
|
64
63
|
borderColorWeak: '#d6d6d6',
|
|
65
64
|
borderColorStrong: '#666666',
|
|
66
|
-
focusColor: deprecatedEnterpriseColors.accentColorD10
|
|
67
|
-
backgroundColorHover: deprecatedEnterpriseColors.gray96
|
|
65
|
+
focusColor: deprecatedEnterpriseColors.accentColorD10
|
|
68
66
|
};
|
|
69
67
|
var notificationColors = {
|
|
70
68
|
notificationColorInfoWeak: '#F0E5FF',
|
|
@@ -91,26 +89,6 @@ var severityColors = {
|
|
|
91
89
|
severityColorCritical: '#C2306F',
|
|
92
90
|
severityColorEmergency: '#B53394'
|
|
93
91
|
};
|
|
94
|
-
var statusColors = {
|
|
95
|
-
statusColorInfo: deprecatedEnterpriseColors.infoColor,
|
|
96
|
-
statusColorInfoWeak: deprecatedEnterpriseColors.infoColorL10,
|
|
97
|
-
statusColorInfoStrong: deprecatedEnterpriseColors.infoColorD10,
|
|
98
|
-
statusColorNormal: deprecatedEnterpriseColors.successColor,
|
|
99
|
-
statusColorNormalWeak: deprecatedEnterpriseColors.successColorL10,
|
|
100
|
-
statusColorNormalStrong: deprecatedEnterpriseColors.successColorD10,
|
|
101
|
-
statusColorLow: deprecatedEnterpriseColors.warningColor,
|
|
102
|
-
statusColorLowWeak: deprecatedEnterpriseColors.warningColorL10,
|
|
103
|
-
statusColorLowStrong: deprecatedEnterpriseColors.warningColorD10,
|
|
104
|
-
statusColorMedium: deprecatedEnterpriseColors.alertColor,
|
|
105
|
-
statusColorMediumWeak: deprecatedEnterpriseColors.alertColorL10,
|
|
106
|
-
statusColorMediumStrong: deprecatedEnterpriseColors.alertColorD10,
|
|
107
|
-
statusColorHigh: deprecatedEnterpriseColors.errorColor,
|
|
108
|
-
statusColorHighWeak: deprecatedEnterpriseColors.errorColorL10,
|
|
109
|
-
statusColorHighStrong: deprecatedEnterpriseColors.errorColorD10,
|
|
110
|
-
statusColorCritical: deprecatedEnterpriseColors.errorColorD10,
|
|
111
|
-
statusColorCriticalWeak: deprecatedEnterpriseColors.errorColor,
|
|
112
|
-
statusColorCriticalStrong: deprecatedEnterpriseColors.errorColorD20
|
|
113
|
-
};
|
|
114
92
|
var elevationShadows = {
|
|
115
93
|
embossShadow: '0px 1px 5px rgba(0, 0, 0, 0.07), 0px 0px 1px rgba(0, 0, 0, 0.07)',
|
|
116
94
|
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)',
|
|
@@ -203,7 +181,8 @@ var interactiveColors = {
|
|
|
203
181
|
interactiveColorBackgroundDisabled: 'transparent',
|
|
204
182
|
interactiveColorAccent: '#1A8929',
|
|
205
183
|
interactiveColorAccentError: deprecatedEnterpriseColors.errorColorD20,
|
|
206
|
-
interactiveColorAccentErrorStrong: '#852d24'
|
|
184
|
+
interactiveColorAccentErrorStrong: '#852d24',
|
|
185
|
+
interactiveColorAccentErrorWeak: '#ea958d'
|
|
207
186
|
};
|
|
208
187
|
var backgrounds = {
|
|
209
188
|
draggableBackground: "url('data:image/png;base64,".concat(dragHandle, "') 0 0 / 8px 8px repeat")
|
|
@@ -240,6 +219,8 @@ var zindexes = {
|
|
|
240
219
|
var deprecated = {
|
|
241
220
|
backgroundColor: neutralColors.white,
|
|
242
221
|
// @deprecated SUI-6656
|
|
222
|
+
backgroundColorHover: deprecatedEnterpriseColors.gray96,
|
|
223
|
+
borderActiveColor: "rgba(0,0,0, 0.5)",
|
|
243
224
|
borderLightColor: deprecatedEnterpriseColors.gray92,
|
|
244
225
|
// @deprecated SUI-5981
|
|
245
226
|
// @deprecated SUI-6160
|
|
@@ -389,8 +370,26 @@ var deprecated = {
|
|
|
389
370
|
syntaxGreenLight: '#5ba383',
|
|
390
371
|
syntaxPurpleLight: '#b19cd9',
|
|
391
372
|
syntaxRedLight: '#af575a',
|
|
392
|
-
interactiveColorPrimary: deprecatedEnterpriseColors.brandColor
|
|
373
|
+
interactiveColorPrimary: deprecatedEnterpriseColors.brandColor,
|
|
374
|
+
statusColorInfo: deprecatedEnterpriseColors.infoColor,
|
|
375
|
+
statusColorInfoWeak: deprecatedEnterpriseColors.infoColorL10,
|
|
376
|
+
statusColorInfoStrong: deprecatedEnterpriseColors.infoColorD10,
|
|
377
|
+
statusColorNormal: deprecatedEnterpriseColors.successColor,
|
|
378
|
+
statusColorNormalWeak: deprecatedEnterpriseColors.successColorL10,
|
|
379
|
+
statusColorNormalStrong: deprecatedEnterpriseColors.successColorD10,
|
|
380
|
+
statusColorLow: deprecatedEnterpriseColors.warningColor,
|
|
381
|
+
statusColorLowWeak: deprecatedEnterpriseColors.warningColorL10,
|
|
382
|
+
statusColorLowStrong: deprecatedEnterpriseColors.warningColorD10,
|
|
383
|
+
statusColorMedium: deprecatedEnterpriseColors.alertColor,
|
|
384
|
+
statusColorMediumWeak: deprecatedEnterpriseColors.alertColorL10,
|
|
385
|
+
statusColorMediumStrong: deprecatedEnterpriseColors.alertColorD10,
|
|
386
|
+
statusColorHigh: deprecatedEnterpriseColors.errorColor,
|
|
387
|
+
statusColorHighWeak: deprecatedEnterpriseColors.errorColorL10,
|
|
388
|
+
statusColorHighStrong: deprecatedEnterpriseColors.errorColorD10,
|
|
389
|
+
statusColorCritical: deprecatedEnterpriseColors.errorColorD10,
|
|
390
|
+
statusColorCriticalWeak: deprecatedEnterpriseColors.errorColor,
|
|
391
|
+
statusColorCriticalStrong: deprecatedEnterpriseColors.errorColorD20
|
|
393
392
|
};
|
|
394
|
-
var theme = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(
|
|
393
|
+
var theme = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, deprecatedEnterpriseColors), backgroundColors), actionColors), neutralColors), notificationColors), severityColors), elevationShadows), syntaxColors), usageColors), backgrounds), shadows), typography), contentColors), interactiveColors), zindexes), _dataViz["default"]), deprecated);
|
|
395
394
|
var _default = theme;
|
|
396
395
|
exports["default"] = _default;
|
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
|
|
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
|
};
|
|
@@ -26,7 +26,7 @@ describe('prose', function () {
|
|
|
26
26
|
var Component = _styledComponents["default"].p(_templateObject(), (0, _prose["default"])());
|
|
27
27
|
var _render = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(Component, null)),
|
|
28
28
|
container = _render.container;
|
|
29
|
-
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n min-width: 34ch;\n max-width: 80ch;\n }\n\n .c0 *:is(h1,h2,h3,h4,h5,h6,ul,ol,dl,p,figure,img,pre,table,fieldset,hr,blockquote) {\n margin-block-end:
|
|
29
|
+
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n min-width: 34ch;\n max-width: 80ch;\n }\n\n .c0 *:is(h1,h2,h3,h4,h5,h6,ul,ol,dl,p,figure,img,pre,table,fieldset,hr,blockquote):not(:last-child) {\n margin-block-end: 1lh;\n }\n\n .c0 h1:where(h1):not(:first-child) {\n margin-block-start: 1lh;\n }\n\n .c0 h2:where(h2):not(:first-child) {\n margin-block-start: 1lh;\n }\n\n .c0 img:where(img) {\n max-width: 100%;\n }\n\n .c0 ol:where(ol),\n .c0 ul:where(ul) {\n padding-inline-start: 2rem;\n }\n\n <p\n class=\"c0\"\n />\n ");
|
|
30
30
|
});
|
|
31
31
|
it('supports custom element selectors', function () {
|
|
32
32
|
var Component = _styledComponents["default"].p(_templateObject2(), (0, _prose["default"])({
|
|
@@ -36,7 +36,7 @@ describe('prose', function () {
|
|
|
36
36
|
}));
|
|
37
37
|
var _render2 = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(Component, null)),
|
|
38
38
|
container = _render2.container;
|
|
39
|
-
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n min-width: 34ch;\n max-width: 80ch;\n }\n\n .c0 *:is(.foo,h2,h3,h4,h5,h6,ul,ol,dl,p,figure,img,pre,table,fieldset,hr,blockquote) {\n margin-block-end:
|
|
39
|
+
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n min-width: 34ch;\n max-width: 80ch;\n }\n\n .c0 *:is(.foo,h2,h3,h4,h5,h6,ul,ol,dl,p,figure,img,pre,table,fieldset,hr,blockquote):not(:last-child) {\n margin-block-end: 1lh;\n }\n\n .c0 .foo:where(h1):not(:first-child) {\n margin-block-start: 1lh;\n }\n\n .c0 h2:where(h2):not(:first-child) {\n margin-block-start: 1lh;\n }\n\n .c0 img:where(img) {\n max-width: 100%;\n }\n\n .c0 ol:where(ol),\n .c0 ul:where(ul) {\n padding-inline-start: 2rem;\n }\n\n <p\n class=\"c0\"\n />\n ");
|
|
40
40
|
});
|
|
41
41
|
it.skip('passes TS verification', function () {
|
|
42
42
|
(0, _prose["default"])();
|
|
@@ -10,8 +10,22 @@ var _typography = _interopRequireWildcard(require("../typography"));
|
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) { if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
-
function
|
|
13
|
+
function _templateObject9() {
|
|
14
14
|
var data = _taggedTemplateLiteral(["\n ", "\n ", ";\n ", ";\n "]);
|
|
15
|
+
_templateObject9 = function _templateObject9() {
|
|
16
|
+
return data;
|
|
17
|
+
};
|
|
18
|
+
return data;
|
|
19
|
+
}
|
|
20
|
+
function _templateObject8() {
|
|
21
|
+
var data = _taggedTemplateLiteral(["\n position: relative;\n\n ", "\n "]);
|
|
22
|
+
_templateObject8 = function _templateObject8() {
|
|
23
|
+
return data;
|
|
24
|
+
};
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
function _templateObject7() {
|
|
28
|
+
var data = _taggedTemplateLiteral(["\n margin: 8px;\n padding: 12px;\n\n ", "\n "]);
|
|
15
29
|
_templateObject7 = function _templateObject7() {
|
|
16
30
|
return data;
|
|
17
31
|
};
|
|
@@ -90,7 +104,7 @@ describe('typography', function () {
|
|
|
90
104
|
component: Component
|
|
91
105
|
})),
|
|
92
106
|
container = _render.container;
|
|
93
|
-
expect(container).toMatchInlineSnapshot("\n .c0 {\n font-family: 'Splunk Platform Sans','Splunk Data Sans',Roboto,Droid,'Helvetica Neue',Helvetica,Arial,sans-serif;\n
|
|
107
|
+
expect(container).toMatchInlineSnapshot("\n .c0 {\n color: #b5b5b5;\n font-family: 'Splunk Platform Sans','Splunk Data Sans',Roboto,Droid,'Helvetica Neue',Helvetica,Arial,sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.429;\n }\n\n .c1 {\n color: #4d4d4d;\n font-family: 'Splunk Platform Sans','Splunk Data Sans',Roboto,Droid,'Helvetica Neue',Helvetica,Arial,sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.429;\n }\n\n <div>\n <p\n class=\"c0\"\n >\n prisma\n dark comfortable\n </p>\n <p\n class=\"c1\"\n >\n prisma\n light comfortable\n </p>\n <p\n class=\"c0\"\n >\n prisma\n dark compact\n </p>\n <p\n class=\"c1\"\n >\n prisma\n light compact\n </p>\n </div>\n ");
|
|
94
108
|
});
|
|
95
109
|
it('enterprise', function () {
|
|
96
110
|
var _render2 = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(ThemeSettingsList, {
|
|
@@ -98,7 +112,7 @@ describe('typography', function () {
|
|
|
98
112
|
component: Component
|
|
99
113
|
})),
|
|
100
114
|
container = _render2.container;
|
|
101
|
-
expect(container).toMatchInlineSnapshot("\n .c0 {\n font-family: 'Splunk Platform Sans','Proxima Nova',Roboto,Droid,'Helvetica Neue',Helvetica,Arial,sans-serif;\n
|
|
115
|
+
expect(container).toMatchInlineSnapshot("\n .c0 {\n color: #e1e6eb;\n font-family: 'Splunk Platform Sans','Proxima Nova',Roboto,Droid,'Helvetica Neue',Helvetica,Arial,sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.429;\n }\n\n .c1 {\n color: #5c6773;\n font-family: 'Splunk Platform Sans','Proxima Nova',Roboto,Droid,'Helvetica Neue',Helvetica,Arial,sans-serif;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.429;\n }\n\n <div>\n <p\n class=\"c0\"\n >\n enterprise\n dark comfortable\n </p>\n <p\n class=\"c1\"\n >\n enterprise\n light comfortable\n </p>\n <p\n class=\"c0\"\n >\n enterprise\n dark compact\n </p>\n <p\n class=\"c1\"\n >\n enterprise\n light compact\n </p>\n </div>\n ");
|
|
102
116
|
});
|
|
103
117
|
});
|
|
104
118
|
describe('support variants in each theme', function () {
|
|
@@ -131,7 +145,7 @@ describe('typography', function () {
|
|
|
131
145
|
}));
|
|
132
146
|
var _render4 = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(Component, null)),
|
|
133
147
|
container = _render4.container;
|
|
134
|
-
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n font-family: 'Splunk Platform Mono','Roboto Mono',Consolas,'Droid Sans Mono',Monaco,'Courier New',Courier,monospace;\n
|
|
148
|
+
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n color: #909090;\n font-family: 'Splunk Platform Mono','Roboto Mono',Consolas,'Droid Sans Mono',Monaco,'Courier New',Courier,monospace;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.429;\n }\n\n <p\n class=\"c0\"\n />\n ");
|
|
135
149
|
});
|
|
136
150
|
it('allows a variants values to be overridden', function () {
|
|
137
151
|
var Component = _styledComponents["default"].p(_templateObject4(), (0, _typography["default"])('body', {
|
|
@@ -143,7 +157,7 @@ describe('typography', function () {
|
|
|
143
157
|
}));
|
|
144
158
|
var _render5 = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(Component, null)),
|
|
145
159
|
container = _render5.container;
|
|
146
|
-
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n font-family: 'Splunk Platform Mono','Roboto Mono',Consolas,'Droid Sans Mono',Monaco,'Courier New',Courier,monospace;\n
|
|
160
|
+
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n color: #909090;\n font-family: 'Splunk Platform Mono','Roboto Mono',Consolas,'Droid Sans Mono',Monaco,'Courier New',Courier,monospace;\n font-size: 1.5rem;\n font-weight: 900;\n line-height: 1;\n }\n\n <p\n class=\"c0\"\n />\n ");
|
|
147
161
|
});
|
|
148
162
|
it('allows default values to be overridden with params', function () {
|
|
149
163
|
var Component = _styledComponents["default"].p(_templateObject5(), (0, _typography["default"])({
|
|
@@ -155,7 +169,7 @@ describe('typography', function () {
|
|
|
155
169
|
}));
|
|
156
170
|
var _render6 = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(Component, null)),
|
|
157
171
|
container = _render6.container;
|
|
158
|
-
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n font-family: 'Splunk Platform Mono','Roboto Mono',Consolas,'Droid Sans Mono',Monaco,'Courier New',Courier,monospace;\n
|
|
172
|
+
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n color: #909090;\n font-family: 'Splunk Platform Mono','Roboto Mono',Consolas,'Droid Sans Mono',Monaco,'Courier New',Courier,monospace;\n font-size: 1.5rem;\n font-weight: 900;\n line-height: 1;\n }\n\n <p\n class=\"c0\"\n />\n ");
|
|
159
173
|
});
|
|
160
174
|
it('transforms params that are shorthand properly to CSS', function () {
|
|
161
175
|
var Component = _styledComponents["default"].p(_templateObject6(), (0, _typography["default"])({
|
|
@@ -167,7 +181,28 @@ describe('typography', function () {
|
|
|
167
181
|
}));
|
|
168
182
|
var _render7 = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(Component, null)),
|
|
169
183
|
container = _render7.container;
|
|
170
|
-
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n font-family: 'Splunk Platform Mono','Roboto Mono',Consolas,'Droid Sans Mono',Monaco,'Courier New',Courier,monospace;\n
|
|
184
|
+
expect(container.firstChild).toMatchInlineSnapshot("\n .c0 {\n color: #909090;\n font-family: 'Splunk Platform Mono','Roboto Mono',Consolas,'Droid Sans Mono',Monaco,'Courier New',Courier,monospace;\n font-size: 1.5rem;\n font-weight: 900;\n line-height: 1;\n }\n\n <p\n class=\"c0\"\n />\n ");
|
|
185
|
+
});
|
|
186
|
+
describe('withReset parameter', function () {
|
|
187
|
+
it('applies reset when `withReset` is true', function () {
|
|
188
|
+
var Component = _styledComponents["default"].p(_templateObject7(), (0, _typography["default"])({
|
|
189
|
+
withReset: true
|
|
190
|
+
}));
|
|
191
|
+
var _render8 = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(Component, null, "hello")),
|
|
192
|
+
container = _render8.container;
|
|
193
|
+
var node = container.firstChild;
|
|
194
|
+
expect(node).toHaveStyleRule('margin', '0');
|
|
195
|
+
expect(node).toHaveStyleRule('padding', '0');
|
|
196
|
+
});
|
|
197
|
+
it('preserves existing style when `withReset` is false', function () {
|
|
198
|
+
var Component = _styledComponents["default"].p(_templateObject8(), (0, _typography["default"])({
|
|
199
|
+
withReset: false
|
|
200
|
+
}));
|
|
201
|
+
var _render9 = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(Component, null, "hello")),
|
|
202
|
+
container = _render9.container;
|
|
203
|
+
var node = container.firstChild;
|
|
204
|
+
expect(node).toHaveStyleRule('position', 'relative');
|
|
205
|
+
});
|
|
171
206
|
});
|
|
172
207
|
it.skip('passes TS verification', function () {
|
|
173
208
|
(0, _typography["default"])();
|
|
@@ -203,7 +238,7 @@ describe('typography', function () {
|
|
|
203
238
|
describe('passes TS verification', function () {
|
|
204
239
|
it.skip('allows mixins in styled-components css', function () {
|
|
205
240
|
/* eslint-disable-next-line @typescript-eslint/no-unused-expressions */
|
|
206
|
-
(0, _styledComponents.css)(
|
|
241
|
+
(0, _styledComponents.css)(_templateObject9(), (0, _typography["default"])('title1'), (0, _typography["default"])('title1', {
|
|
207
242
|
color: 'disabled'
|
|
208
243
|
}), (0, _typography["default"])({
|
|
209
244
|
family: 'monospace'
|