@splunk/themes 0.10.1 → 0.13.0
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 +22 -0
- package/enterprise/comfortable.js +1 -1
- package/enterprise/compact.js +1 -1
- package/enterprise/light.js +18 -17
- package/mixins/index.js +59 -0
- package/mixins/tests/typography.unit.js +236 -0
- package/mixins/tests/utilityMixins.unit.js +138 -0
- package/mixins/typography.js +270 -0
- package/{mixins.js → mixins/utilityMixins.js} +2 -2
- package/package.json +20 -10
- package/prisma/base.js +9 -6
- package/prisma/comfortable.js +1 -1
- package/prisma/compact.js +1 -1
- package/prisma/dark.js +17 -17
- package/prisma/dataViz.js +507 -0
- package/prisma/light.js +18 -18
- package/storybook-addon-splunk-themes/ThemedDocsContainer.js +21 -9
- package/storybook-addon-splunk-themes/addParameter.js +1 -4
- package/storybook-addon-splunk-themes/themes.js +2 -2
- package/types/enterprise/comfortable.d.ts +1 -1
- package/types/enterprise/compact.d.ts +1 -1
- package/types/enterprise/dark.d.ts +1 -0
- package/types/enterprise/light.d.ts +1 -0
- package/types/mixins/index.d.ts +18 -0
- package/types/mixins/tests/typography.unit.d.ts +1 -0
- package/types/{tests/mixins.unit.d.ts → mixins/tests/utilityMixins.unit.d.ts} +0 -0
- package/types/mixins/typography.d.ts +83 -0
- package/types/{mixins.d.ts → mixins/utilityMixins.d.ts} +1 -1
- package/types/prisma/base.d.ts +215 -0
- package/types/prisma/comfortable.d.ts +1 -1
- package/types/prisma/compact.d.ts +1 -1
- package/types/prisma/dark.d.ts +1 -1
- package/types/prisma/dataViz.d.ts +432 -0
- package/types/prisma/light.d.ts +1 -1
- package/types/storybook-addon-splunk-themes/ThemedDocsContainer.d.ts +2 -2
- package/types/storybook-addon-splunk-themes/addDecorator.d.ts +4 -1
- package/types/storybook-addon-splunk-themes/addParameter.d.ts +1 -2
- package/types/storybook-addon-splunk-themes/themes.d.ts +1 -1
- package/types/storybook-addon-splunk-themes/withSplunkTheme.d.ts +4 -2
- package/types/withSplunkTheme.d.ts +1 -1
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.typographyVariants = exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = require("styled-components");
|
|
9
|
+
|
|
10
|
+
var _lodash = require("lodash");
|
|
11
|
+
|
|
12
|
+
var _variables = _interopRequireDefault(require("../variables"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
function _templateObject2() {
|
|
17
|
+
var data = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n "]);
|
|
18
|
+
|
|
19
|
+
_templateObject2 = function _templateObject2() {
|
|
20
|
+
return data;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return data;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function _templateObject() {
|
|
27
|
+
var data = _taggedTemplateLiteral(["\n ", "\n\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n "]);
|
|
28
|
+
|
|
29
|
+
_templateObject = function _templateObject() {
|
|
30
|
+
return data;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
37
|
+
|
|
38
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
39
|
+
|
|
40
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
41
|
+
|
|
42
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
43
|
+
|
|
44
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
45
|
+
|
|
46
|
+
var typographyVariants = ['body', 'title1', 'title2', 'title3', 'title4', 'title5', 'title6', 'title7', 'largeBody', 'smallBody', 'footnote', 'monoBody', 'monoSmallBody'];
|
|
47
|
+
exports.typographyVariants = typographyVariants;
|
|
48
|
+
|
|
49
|
+
function isTypographyVariant(s) {
|
|
50
|
+
if (typeof s !== 'string') {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return typographyVariants.includes(s);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function getStylesForVariant(variant) {
|
|
58
|
+
var color = _variables["default"].contentColorDefault;
|
|
59
|
+
var family = _variables["default"].fontFamily;
|
|
60
|
+
var lineHeight = _variables["default"].lineHeight; // eslint-disable-line prefer-destructuring
|
|
61
|
+
|
|
62
|
+
var size = _variables["default"].fontSize;
|
|
63
|
+
var weight = 'normal';
|
|
64
|
+
|
|
65
|
+
switch (variant) {
|
|
66
|
+
case 'title1':
|
|
67
|
+
color = _variables["default"].contentColorActive;
|
|
68
|
+
lineHeight = '40px';
|
|
69
|
+
size = '36px';
|
|
70
|
+
weight = _variables["default"].fontWeightBold;
|
|
71
|
+
break;
|
|
72
|
+
|
|
73
|
+
case 'title2':
|
|
74
|
+
color = _variables["default"].contentColorActive;
|
|
75
|
+
lineHeight = '48px';
|
|
76
|
+
size = _variables["default"].fontSizeXXLarge;
|
|
77
|
+
weight = _variables["default"].fontWeightBold;
|
|
78
|
+
break;
|
|
79
|
+
|
|
80
|
+
case 'title3':
|
|
81
|
+
color = _variables["default"].contentColorActive;
|
|
82
|
+
lineHeight = '24px';
|
|
83
|
+
size = '20px';
|
|
84
|
+
weight = _variables["default"].fontWeightBold;
|
|
85
|
+
break;
|
|
86
|
+
|
|
87
|
+
case 'title4':
|
|
88
|
+
color = _variables["default"].contentColorActive;
|
|
89
|
+
lineHeight = '22px';
|
|
90
|
+
size = _variables["default"].fontSizeLarge;
|
|
91
|
+
weight = _variables["default"].fontWeightBold;
|
|
92
|
+
break;
|
|
93
|
+
|
|
94
|
+
case 'title5':
|
|
95
|
+
color = _variables["default"].contentColorActive;
|
|
96
|
+
lineHeight = _variables["default"].lineHeight;
|
|
97
|
+
size = _variables["default"].fontSize;
|
|
98
|
+
weight = _variables["default"].fontWeightBold;
|
|
99
|
+
break;
|
|
100
|
+
|
|
101
|
+
case 'title6':
|
|
102
|
+
color = _variables["default"].contentColorActive;
|
|
103
|
+
lineHeight = _variables["default"].lineHeight;
|
|
104
|
+
size = _variables["default"].fontSize;
|
|
105
|
+
weight = _variables["default"].fontWeightSemiBold;
|
|
106
|
+
break;
|
|
107
|
+
|
|
108
|
+
case 'title7':
|
|
109
|
+
color = _variables["default"].contentColorActive;
|
|
110
|
+
lineHeight = '16px';
|
|
111
|
+
size = _variables["default"].fontSizeSmall;
|
|
112
|
+
weight = _variables["default"].fontWeightSemiBold;
|
|
113
|
+
break;
|
|
114
|
+
|
|
115
|
+
case 'largeBody':
|
|
116
|
+
color = _variables["default"].contentColorDefault;
|
|
117
|
+
lineHeight = '24px';
|
|
118
|
+
size = _variables["default"].fontSizeLarge;
|
|
119
|
+
weight = 'normal';
|
|
120
|
+
break;
|
|
121
|
+
|
|
122
|
+
case 'smallBody':
|
|
123
|
+
color = _variables["default"].contentColorDefault;
|
|
124
|
+
lineHeight = '16px';
|
|
125
|
+
size = _variables["default"].fontSizeSmall;
|
|
126
|
+
weight = 'normal';
|
|
127
|
+
break;
|
|
128
|
+
|
|
129
|
+
case 'footnote':
|
|
130
|
+
color = _variables["default"].contentColorDefault;
|
|
131
|
+
lineHeight = '13px';
|
|
132
|
+
size = '10px';
|
|
133
|
+
weight = 'normal';
|
|
134
|
+
break;
|
|
135
|
+
|
|
136
|
+
case 'monoBody':
|
|
137
|
+
family = _variables["default"].monoFontFamily;
|
|
138
|
+
break;
|
|
139
|
+
|
|
140
|
+
case 'monoSmallBody':
|
|
141
|
+
color = _variables["default"].contentColorDefault;
|
|
142
|
+
family = _variables["default"].monoFontFamily;
|
|
143
|
+
lineHeight = '16px';
|
|
144
|
+
size = _variables["default"].fontSizeSmall;
|
|
145
|
+
weight = 'normal';
|
|
146
|
+
break;
|
|
147
|
+
|
|
148
|
+
case 'body':
|
|
149
|
+
// Theme defaults set the 'body' style
|
|
150
|
+
break;
|
|
151
|
+
|
|
152
|
+
default:
|
|
153
|
+
{
|
|
154
|
+
if (false) {
|
|
155
|
+
// eslint-disable-line no-console
|
|
156
|
+
console.log("Unknown typography variant, ".concat(variant, ". Using default values for theme."));
|
|
157
|
+
} // Make sure this "never" happens https://www.typescriptlang.org/docs/handbook/2/narrowing.html#exhaustiveness-checking
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
var exhaustiveCheck = variant;
|
|
161
|
+
return exhaustiveCheck;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
color: color,
|
|
167
|
+
family: family,
|
|
168
|
+
size: size,
|
|
169
|
+
weight: weight,
|
|
170
|
+
lineHeight: lineHeight,
|
|
171
|
+
withReset: true
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
var colorPropToVariableMap = {
|
|
176
|
+
active: _variables["default"].contentColorActive,
|
|
177
|
+
"default": _variables["default"].contentColorDefault,
|
|
178
|
+
disabled: _variables["default"].contentColorDisabled,
|
|
179
|
+
inverted: _variables["default"].contentColorInverted,
|
|
180
|
+
muted: _variables["default"].contentColorMuted
|
|
181
|
+
};
|
|
182
|
+
var familyPropToVariableMap = {
|
|
183
|
+
sansSerif: _variables["default"].sansFontFamily,
|
|
184
|
+
monospace: _variables["default"].monoFontFamily
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* A mixin for styling text content using predefined typography variants
|
|
188
|
+
* and/or customizing font-settings with system parameters: e.g. size, weight, font-family.
|
|
189
|
+
*
|
|
190
|
+
* The default variant is `body` and will be used if no variant or settings
|
|
191
|
+
* are given: i.e. `typography()` or `typography({})`.
|
|
192
|
+
* Variants have the reset applied by default.
|
|
193
|
+
*
|
|
194
|
+
* ##### Example
|
|
195
|
+
* ```js
|
|
196
|
+
* import styled from 'styled-components';
|
|
197
|
+
* import { typography } from '@splunk/themes/mixins';
|
|
198
|
+
*
|
|
199
|
+
* const MyTitle = styled.h1`
|
|
200
|
+
* ${typography('title1')};
|
|
201
|
+
* `;
|
|
202
|
+
*
|
|
203
|
+
* const MyCustomizedTitle = styled.h1`
|
|
204
|
+
* ${typography('title1', { color: 'inverted' })};
|
|
205
|
+
* `;
|
|
206
|
+
*
|
|
207
|
+
* const CustomTitle = styled.h1`
|
|
208
|
+
* ${typography({size: 56, weight: 'light', color: 'inverted' })};
|
|
209
|
+
* `;
|
|
210
|
+
* ```
|
|
211
|
+
* @name typography
|
|
212
|
+
* @kind function
|
|
213
|
+
* @param {string} [variant] Use a predefined typography variant:
|
|
214
|
+
* `'body'`,
|
|
215
|
+
* `'title1'`,
|
|
216
|
+
* `'title2'`,
|
|
217
|
+
* `'title3'`,
|
|
218
|
+
* `'title4'`,
|
|
219
|
+
* `'title5'`,
|
|
220
|
+
* `'subtitle'`,
|
|
221
|
+
* `'smallSubtitle'`,
|
|
222
|
+
* `'largeBody'`,
|
|
223
|
+
* `'smallBody'`,
|
|
224
|
+
* `'footnote'`,
|
|
225
|
+
* `'monoBody'`, or
|
|
226
|
+
* `'monoSmallBody'`,
|
|
227
|
+
* @param {object} [typographyParams] Customize the font settings or element using system values for: `family`, `size`, `lineHeight`, `color`, and `weight`.
|
|
228
|
+
* Default margin and padding can be removed with `withReset`.
|
|
229
|
+
* @public
|
|
230
|
+
*/
|
|
231
|
+
|
|
232
|
+
function typography(variantOrParams, additionalParams) {
|
|
233
|
+
var variant = isTypographyVariant(variantOrParams) ? variantOrParams : undefined;
|
|
234
|
+
var params;
|
|
235
|
+
|
|
236
|
+
if (variant && additionalParams !== undefined) {
|
|
237
|
+
params = additionalParams;
|
|
238
|
+
} else if (variant === undefined && _typeof(variantOrParams) === 'object' && additionalParams === undefined) {
|
|
239
|
+
params = variantOrParams;
|
|
240
|
+
} else {
|
|
241
|
+
params = {};
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
var variantParams = variant ? getStylesForVariant(variant) : {}; // Transform params to be ready for css literal below: i.e size="24" -> "24px"
|
|
245
|
+
|
|
246
|
+
var transformedParams = _objectSpread(_objectSpread({}, params), {}, {
|
|
247
|
+
size: params.size ? "".concat(params.size, "px") : undefined,
|
|
248
|
+
lineHeight: params.lineHeight ? "".concat(params.lineHeight, "px") : undefined,
|
|
249
|
+
color: params.color ? colorPropToVariableMap[params.color] : undefined,
|
|
250
|
+
family: params.family ? familyPropToVariableMap[params.family] : undefined
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
var defaultTypographyParams = {
|
|
254
|
+
color: _variables["default"].contentColorDefault,
|
|
255
|
+
family: _variables["default"].fontFamily,
|
|
256
|
+
size: _variables["default"].fontSize,
|
|
257
|
+
weight: 'normal',
|
|
258
|
+
lineHeight: _variables["default"].lineHeight,
|
|
259
|
+
withReset: false
|
|
260
|
+
};
|
|
261
|
+
var finalParams = (0, _lodash.merge)(defaultTypographyParams, variantParams, transformedParams);
|
|
262
|
+
return function () {
|
|
263
|
+
return (0, _styledComponents.css)(_templateObject(), function () {
|
|
264
|
+
return finalParams.withReset && (0, _styledComponents.css)(_templateObject2());
|
|
265
|
+
}, finalParams.color, finalParams.family, finalParams.size, finalParams.weight, finalParams.lineHeight);
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
var _default = typography;
|
|
270
|
+
exports["default"] = _default;
|
|
@@ -20,9 +20,9 @@ var _styledComponents = require("styled-components");
|
|
|
20
20
|
|
|
21
21
|
var _colorBlend = require("color-blend");
|
|
22
22
|
|
|
23
|
-
var _variables = _interopRequireDefault(require("
|
|
23
|
+
var _variables = _interopRequireDefault(require("../variables"));
|
|
24
24
|
|
|
25
|
-
var _pick = _interopRequireDefault(require("
|
|
25
|
+
var _pick = _interopRequireDefault(require("../pick"));
|
|
26
26
|
|
|
27
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
28
28
|
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splunk/themes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Theme variables and mixins for the Splunk design language",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
6
|
+
"babel": "babel src -d . --ignore src/babel-plugin-base64-png,src/tests --ignore \"**/docs\" --extensions .js,.ts,.tsx",
|
|
7
|
+
"build": "cross-env NODE_ENV=production yarn babel && yarn types:build",
|
|
8
|
+
"docs": "NODE_ENV=production webpack --config docs.gen.webpack.config.js",
|
|
9
|
+
"docs:publish": "cicd-publish-docs docs --force",
|
|
10
|
+
"docs:start": "webpack serve --config docs.gen.webpack.config.js",
|
|
7
11
|
"lint": "eslint src --ext \".ts,.tsx,.js,.jsx\"",
|
|
8
12
|
"lint:ci": "yarn run lint -- -f junit -o test-reports/lint-results.xml",
|
|
9
|
-
"start": "babel
|
|
13
|
+
"start": "yarn babel --watch",
|
|
10
14
|
"test": "jest",
|
|
11
15
|
"test:ci": "JEST_JUNIT_OUTPUT_DIR=./test-reports JEST_JUNIT_OUTPUT_NAME=unit-results.xml JEST_JUNIT_CLASSNAME=unit yarn run test --ci --reporters=default jest-junit --coverage --coverageDirectory=coverage_report/coverage_maps_unit --coverageReporters=cobertura",
|
|
12
16
|
"test:watch": "jest --watch",
|
|
13
|
-
"types:build": "tsc",
|
|
17
|
+
"types:build": "tsc --emitDeclarationOnly --declaration",
|
|
14
18
|
"types:start": "yarn types:build --watch"
|
|
15
19
|
},
|
|
16
20
|
"peerDependencies": {
|
|
@@ -60,12 +64,13 @@
|
|
|
60
64
|
"@babel/cli": "^7.2.0",
|
|
61
65
|
"@babel/core": "^7.2.0",
|
|
62
66
|
"@splunk/babel-preset": "^3.0.0",
|
|
67
|
+
"@splunk/cicd-tools": "^0.4.0",
|
|
63
68
|
"@splunk/eslint-config": "^4.0.0",
|
|
64
|
-
"@storybook/addon-docs": "^6.
|
|
65
|
-
"@storybook/addons": "^6.
|
|
66
|
-
"@storybook/api": "^6.
|
|
67
|
-
"@storybook/components": "^6.
|
|
68
|
-
"@storybook/theming": "^6.
|
|
69
|
+
"@storybook/addon-docs": "^6.5.9",
|
|
70
|
+
"@storybook/addons": "^6.5.9",
|
|
71
|
+
"@storybook/api": "^6.5.9",
|
|
72
|
+
"@storybook/components": "^6.5.9",
|
|
73
|
+
"@storybook/theming": "^6.5.9",
|
|
69
74
|
"@typescript-eslint/eslint-plugin": "^3.4.0",
|
|
70
75
|
"@typescript-eslint/parser": "^3.4.0",
|
|
71
76
|
"babel-eslint": "^10.1.0",
|
|
@@ -82,9 +87,14 @@
|
|
|
82
87
|
"eslint-plugin-react": "^7.20.3",
|
|
83
88
|
"eslint-plugin-react-hooks": "^4.0.5",
|
|
84
89
|
"jest": "^25.1.0",
|
|
90
|
+
"jest-styled-components": "^7.0.8",
|
|
85
91
|
"react": "^16.12.0",
|
|
86
92
|
"styled-components": "5.1.1",
|
|
87
|
-
"typescript": "^4.0.5"
|
|
93
|
+
"typescript": "^4.0.5",
|
|
94
|
+
"webpack": "^4.16.2",
|
|
95
|
+
"webpack-cli": "^4.9.2",
|
|
96
|
+
"webpack-dev-server": "^4.7.4",
|
|
97
|
+
"webpack-merge": "^4.1.3"
|
|
88
98
|
},
|
|
89
99
|
"engines": {
|
|
90
100
|
"node": ">=6"
|
package/prisma/base.js
CHANGED
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _tinycolor = _interopRequireDefault(require("tinycolor2"));
|
|
9
9
|
|
|
10
|
+
var _dataViz = _interopRequireDefault(require("./dataViz"));
|
|
11
|
+
|
|
10
12
|
var _light = _interopRequireDefault(require("./light"));
|
|
11
13
|
|
|
12
14
|
var _dark = _interopRequireDefault(require("./dark"));
|
|
@@ -27,7 +29,7 @@ function createPrismaBase(_ref) {
|
|
|
27
29
|
dark: _dark["default"]
|
|
28
30
|
}[colorScheme];
|
|
29
31
|
/**
|
|
30
|
-
*
|
|
32
|
+
* ## Misc. colors
|
|
31
33
|
*
|
|
32
34
|
* @colorSet verbose
|
|
33
35
|
*/
|
|
@@ -38,7 +40,7 @@ function createPrismaBase(_ref) {
|
|
|
38
40
|
linkColor: colorSchemeVars.interactiveColorPrimary
|
|
39
41
|
};
|
|
40
42
|
/**
|
|
41
|
-
*
|
|
43
|
+
* ## Interactive state shadows
|
|
42
44
|
*
|
|
43
45
|
* @shadowSet
|
|
44
46
|
*
|
|
@@ -50,7 +52,7 @@ function createPrismaBase(_ref) {
|
|
|
50
52
|
focusShadowInset: "inset 0 0 0 3px ".concat(usageColors.focusColor)
|
|
51
53
|
};
|
|
52
54
|
/**
|
|
53
|
-
*
|
|
55
|
+
* ## Backgrounds
|
|
54
56
|
*
|
|
55
57
|
* @colorSet verbose
|
|
56
58
|
*/
|
|
@@ -60,7 +62,7 @@ function createPrismaBase(_ref) {
|
|
|
60
62
|
};
|
|
61
63
|
var sansFontFamily = "'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
62
64
|
/**
|
|
63
|
-
*
|
|
65
|
+
* ## Fonts
|
|
64
66
|
*
|
|
65
67
|
* @valueSet
|
|
66
68
|
*/
|
|
@@ -74,20 +76,21 @@ function createPrismaBase(_ref) {
|
|
|
74
76
|
fontWeightSemiBold: '500'
|
|
75
77
|
};
|
|
76
78
|
/**
|
|
77
|
-
*
|
|
79
|
+
* ## Layers
|
|
78
80
|
* If a variable does not suit your purpose, set a value relatively, such as zindexModal +1.
|
|
79
81
|
*
|
|
80
82
|
* @valueSet
|
|
81
83
|
*/
|
|
82
84
|
|
|
83
85
|
var zindexes = {
|
|
86
|
+
zindexLayer: 1000,
|
|
84
87
|
zindexFixedNavbar: 1030,
|
|
85
88
|
zindexModalBackdrop: 1040,
|
|
86
89
|
zindexModal: 1050,
|
|
87
90
|
zindexPopover: 1060,
|
|
88
91
|
zindexToastMessages: 2000
|
|
89
92
|
};
|
|
90
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, fonts), usageColors), shadows), backgrounds), zindexes);
|
|
93
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, fonts), usageColors), _dataViz["default"]), shadows), backgrounds), zindexes);
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
var _default = createPrismaBase;
|
package/prisma/comfortable.js
CHANGED
package/prisma/compact.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* ## Measures
|
|
10
10
|
* Spacing is used for margin on any element or padding on containers, but can be used for other
|
|
11
11
|
* properties that position elements.
|
|
12
12
|
* * Larger containers, such as `Card` or `Modal`, use `spacing`.
|
package/prisma/dark.js
CHANGED
|
@@ -12,7 +12,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
12
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* ## Background colors
|
|
16
16
|
* Background colors should be used only for backgrounds of higher level sections & containers of a UI.
|
|
17
17
|
*
|
|
18
18
|
* @colorSet verbose
|
|
@@ -28,7 +28,7 @@ var backgroundColors = {
|
|
|
28
28
|
backgroundColorScrim: 'rgba(0, 0, 0, 0.8)'
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* ## Content colors
|
|
32
32
|
* Content colors should be used for text, icons and dividers.
|
|
33
33
|
*
|
|
34
34
|
* @colorSet verbose
|
|
@@ -42,7 +42,7 @@ var contentColors = {
|
|
|
42
42
|
contentColorMuted: '#909090'
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* ## Interactive colors
|
|
46
46
|
* Interactive colors are specifically chosen for borders and backgrounds of controls and other interactive content.
|
|
47
47
|
* "Overlay" colors are intended to be placed over the default background color, such as interactiveColorPrimary.
|
|
48
48
|
* If the default background color is not transparent, the `blend` mixin can be used to create a new color that combines the two.
|
|
@@ -63,7 +63,7 @@ var interactiveColors = {
|
|
|
63
63
|
interactiveColorBackgroundDisabled: 'rgba(255, 255, 255, 0.15)'
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* ## Neutral colors
|
|
67
67
|
* Neutrals are used for dividers and as backup colors that can sparingly be used for cases, when the other defined colors are not enough.
|
|
68
68
|
*
|
|
69
69
|
* @colorSet verbose
|
|
@@ -79,20 +79,20 @@ var neutralColors = {
|
|
|
79
79
|
white: '#ffffff'
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
82
|
+
* ## Accent colors
|
|
83
83
|
* Accent colors aid and categorize the visual communication of the system response.
|
|
84
84
|
*
|
|
85
85
|
* @colorSet verbose
|
|
86
86
|
*/
|
|
87
87
|
|
|
88
88
|
var accentColors = {
|
|
89
|
-
accentColorPositive: '#
|
|
90
|
-
accentColorWarning: '#
|
|
91
|
-
accentColorAlert: '#
|
|
92
|
-
accentColorNegative: '#
|
|
89
|
+
accentColorPositive: '#85f415',
|
|
90
|
+
accentColorWarning: '#f49106',
|
|
91
|
+
accentColorAlert: '#f0581f',
|
|
92
|
+
accentColorNegative: '#ff4242'
|
|
93
93
|
};
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* ## Status colors
|
|
96
96
|
* Status colors are reserved for communicating urgency and severity associated with data objects.
|
|
97
97
|
*
|
|
98
98
|
* @colorSet verbose
|
|
@@ -100,14 +100,14 @@ var accentColors = {
|
|
|
100
100
|
|
|
101
101
|
var statusColors = {
|
|
102
102
|
statusColorInfo: '#61cafa',
|
|
103
|
-
statusColorNormal: '#
|
|
104
|
-
statusColorLow: '#
|
|
105
|
-
statusColorMedium: '#
|
|
106
|
-
statusColorHigh: '#
|
|
107
|
-
statusColorCritical: '#
|
|
103
|
+
statusColorNormal: '#85f415',
|
|
104
|
+
statusColorLow: '#2cbda3',
|
|
105
|
+
statusColorMedium: '#f49106',
|
|
106
|
+
statusColorHigh: '#ff4242',
|
|
107
|
+
statusColorCritical: '#ff3361'
|
|
108
108
|
};
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* ## Elevation shadows
|
|
111
111
|
*
|
|
112
112
|
* @shadowSet
|
|
113
113
|
*
|
|
@@ -120,7 +120,7 @@ var elevationShadows = {
|
|
|
120
120
|
modalShadow: '0px 50px 200px #000000, 0px 29px 66px rgba(0, 0, 0, 0.41), 0px 14px 47px rgba(0, 0, 0, 0.17), 0px 5px 10px rgba(0, 0, 0, 0.15)'
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* ## Syntax colors
|
|
124
124
|
* Syntax colors are used only for code blocks.
|
|
125
125
|
*
|
|
126
126
|
* @colorSet verbose alphabetical
|