@spaced-out/ui-design-system 0.1.56 → 0.1.57

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 (36) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/design-tokens/font/base-font.json +6 -0
  3. package/design-tokens/size/base-size.json +3 -0
  4. package/lib/components/Banner/Banner.js +6 -5
  5. package/lib/components/Banner/Banner.js.flow +2 -1
  6. package/lib/components/Icon/SemanticIcon.js +30 -0
  7. package/lib/components/Icon/SemanticIcon.js.flow +42 -0
  8. package/lib/components/Icon/SemanticIcon.module.css +47 -0
  9. package/lib/components/Icon/index.js +8 -1
  10. package/lib/components/Icon/index.js.flow +2 -0
  11. package/lib/components/InContextAlert/InContextAlert.js +13 -20
  12. package/lib/components/InContextAlert/InContextAlert.js.flow +2 -9
  13. package/lib/components/KPIBox/KPIBox.js +46 -0
  14. package/lib/components/KPIBox/KPIBox.js.flow +97 -0
  15. package/lib/components/KPIBox/KPIBox.module.css +47 -0
  16. package/lib/components/KPIBox/index.js +16 -0
  17. package/lib/components/KPIBox/index.js.flow +3 -0
  18. package/lib/components/Text/Text.js +53 -30
  19. package/lib/components/Text/Text.js.flow +35 -0
  20. package/lib/components/Text/index.js +6 -0
  21. package/lib/components/Text/index.js.flow +1 -0
  22. package/lib/components/index.js +11 -0
  23. package/lib/components/index.js.flow +1 -0
  24. package/lib/styles/index.css +6 -0
  25. package/lib/styles/index.js +8 -2
  26. package/lib/styles/index.js.flow +6 -0
  27. package/lib/styles/typography.module.css +9 -0
  28. package/lib/styles/variables/_font.css +4 -0
  29. package/lib/styles/variables/_font.js +5 -1
  30. package/lib/styles/variables/_font.js.flow +4 -0
  31. package/lib/styles/variables/_size.css +2 -0
  32. package/lib/styles/variables/_size.js +3 -1
  33. package/lib/styles/variables/_size.js.flow +2 -0
  34. package/lib/types/common.js +15 -0
  35. package/lib/types/common.js.flow +10 -0
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.57](https://github.com/spaced-out/ui-design-system/compare/v0.1.56...v0.1.57) (2023-10-04)
6
+
7
+
8
+ ### Features
9
+
10
+ * new KPIBox component, new JumboSmall typography component and new SemanticIcon component ([#145](https://github.com/spaced-out/ui-design-system/issues/145)) ([c433c3d](https://github.com/spaced-out/ui-design-system/commit/c433c3d48409461aa06d69dfe2d2485c7dd8d9df))
11
+
5
12
  ### [0.1.56](https://github.com/spaced-out/ui-design-system/compare/v0.1.55...v0.1.56) (2023-09-27)
6
13
 
7
14
 
@@ -29,6 +29,9 @@
29
29
  "18": {
30
30
  "value": "18px"
31
31
  },
32
+ "24": {
33
+ "value": "24px"
34
+ },
32
35
  "26": {
33
36
  "value": "26px"
34
37
  },
@@ -66,6 +69,9 @@
66
69
  "120%": {
67
70
  "value": "120%"
68
71
  },
72
+ "125%": {
73
+ "value": "125%"
74
+ },
69
75
  "130%": {
70
76
  "value": "130%"
71
77
  },
@@ -90,6 +90,9 @@
90
90
  "240": {
91
91
  "value": "240px"
92
92
  },
93
+ "252": {
94
+ "value": "252px"
95
+ },
93
96
  "260": {
94
97
  "value": "260px"
95
98
  },
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Banner = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
+ var _common = require("../../types/common");
8
9
  var _classify = _interopRequireDefault(require("../../utils/classify"));
9
10
  var _InContextAlert = require("../InContextAlert");
10
11
  var _BannerModule = _interopRequireDefault(require("./Banner.module.css"));
@@ -26,11 +27,11 @@ const Banner = /*#__PURE__*/React.forwardRef((_ref, ref) => {
26
27
  ref: ref,
27
28
  classNames: {
28
29
  wrapper: (0, _classify.default)(_BannerModule.default.bannerContainer, {
29
- [_BannerModule.default.neutral]: semantic === _InContextAlert.ALERT_SEMANTIC.neutral,
30
- [_BannerModule.default.success]: semantic === _InContextAlert.ALERT_SEMANTIC.success,
31
- [_BannerModule.default.information]: semantic === _InContextAlert.ALERT_SEMANTIC.information,
32
- [_BannerModule.default.warning]: semantic === _InContextAlert.ALERT_SEMANTIC.warning,
33
- [_BannerModule.default.danger]: semantic === _InContextAlert.ALERT_SEMANTIC.danger,
30
+ [_BannerModule.default.neutral]: semantic === _common.ALERT_SEMANTIC.neutral,
31
+ [_BannerModule.default.success]: semantic === _common.ALERT_SEMANTIC.success,
32
+ [_BannerModule.default.information]: semantic === _common.ALERT_SEMANTIC.information,
33
+ [_BannerModule.default.warning]: semantic === _common.ALERT_SEMANTIC.warning,
34
+ [_BannerModule.default.danger]: semantic === _common.ALERT_SEMANTIC.danger,
34
35
  [_BannerModule.default.topAligned]: alignment === 'top',
35
36
  [_BannerModule.default.bottomAligned]: alignment === 'bottom'
36
37
  }, classNames?.wrapper),
@@ -2,9 +2,10 @@
2
2
 
3
3
  import * as React from 'react';
4
4
 
5
+ import {ALERT_SEMANTIC} from '../../types/common';
5
6
  import classify from '../../utils/classify';
6
7
  import type {InContextAlertProps} from '../InContextAlert';
7
- import {ALERT_SEMANTIC, InContextAlert} from '../InContextAlert';
8
+ import {InContextAlert} from '../InContextAlert';
8
9
 
9
10
  import css from './Banner.module.css';
10
11
 
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SemanticIcon = void 0;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _typography = require("../../types/typography");
9
+ var _classify = _interopRequireDefault(require("../../utils/classify"));
10
+ var _Icon = require("./Icon");
11
+ var _SemanticIconModule = _interopRequireDefault(require("./SemanticIcon.module.css"));
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ const SemanticIcon = _ref => {
17
+ let {
18
+ semantic = 'neutral',
19
+ type = 'solid',
20
+ classNames,
21
+ ...iconProps
22
+ } = _ref;
23
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !!iconProps.name && /*#__PURE__*/React.createElement("div", {
24
+ className: (0, _classify.default)(_SemanticIconModule.default.iconContainer, _SemanticIconModule.default[semantic], classNames?.wrapper)
25
+ }, /*#__PURE__*/React.createElement(_Icon.Icon, _extends({}, iconProps, {
26
+ color: _typography.TEXT_COLORS[semantic],
27
+ type: type
28
+ }))));
29
+ };
30
+ exports.SemanticIcon = SemanticIcon;
@@ -0,0 +1,42 @@
1
+ // @flow strict
2
+
3
+ import * as React from 'react';
4
+
5
+ import type {AlertSemanticType} from '../../types/common';
6
+ import {TEXT_COLORS} from '../../types/typography';
7
+ import classify from '../../utils/classify';
8
+
9
+ import type {IconProps} from './Icon';
10
+ import {Icon} from './Icon';
11
+
12
+ import css from './SemanticIcon.module.css';
13
+
14
+
15
+ type ClassNames = $ReadOnly<{wrapper?: string, icon?: string}>;
16
+
17
+ export type SemanticIconProps = {
18
+ ...IconProps,
19
+ classNames?: ClassNames,
20
+ semantic?: AlertSemanticType,
21
+ };
22
+
23
+ export const SemanticIcon = ({
24
+ semantic = 'neutral',
25
+ type = 'solid',
26
+ classNames,
27
+ ...iconProps
28
+ }: SemanticIconProps): React.Node => (
29
+ <>
30
+ {!!iconProps.name && (
31
+ <div
32
+ className={classify(
33
+ css.iconContainer,
34
+ css[semantic],
35
+ classNames?.wrapper,
36
+ )}
37
+ >
38
+ <Icon {...iconProps} color={TEXT_COLORS[semantic]} type={type} />
39
+ </div>
40
+ )}
41
+ </>
42
+ );
@@ -0,0 +1,47 @@
1
+ @value (
2
+ colorNeutralLightest,
3
+ colorSuccessLightest,
4
+ colorInformationLightest,
5
+ colorWarningLightest,
6
+ colorDangerLightest
7
+ ) from '../../styles/variables/_color.css';
8
+
9
+ @value (
10
+ size60,
11
+ size24
12
+ ) from '../../styles/variables/_size.css';
13
+
14
+ @value (
15
+ borderRadiusMedium
16
+ ) from '../../styles/variables/_border.css';
17
+
18
+ .iconContainer {
19
+ display: flex;
20
+ width: fit-content;
21
+ min-width: size60;
22
+ min-height: size60;
23
+ justify-content: center;
24
+ align-items: center;
25
+ border-radius: borderRadiusMedium;
26
+ background-color: colorNeutralLightest;
27
+ }
28
+
29
+ .neutral {
30
+ background-color: colorNeutralLightest;
31
+ }
32
+
33
+ .success {
34
+ background-color: colorSuccessLightest;
35
+ }
36
+
37
+ .information {
38
+ background-color: colorInformationLightest;
39
+ }
40
+
41
+ .warning {
42
+ background-color: colorWarningLightest;
43
+ }
44
+
45
+ .danger {
46
+ background-color: colorDangerLightest;
47
+ }
@@ -21,5 +21,12 @@ Object.defineProperty(exports, "Icon", {
21
21
  return _Icon.Icon;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "SemanticIcon", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _SemanticIcon.SemanticIcon;
28
+ }
29
+ });
24
30
  var _ClickableIcon = require("./ClickableIcon");
25
- var _Icon = require("./Icon");
31
+ var _Icon = require("./Icon");
32
+ var _SemanticIcon = require("./SemanticIcon");
@@ -4,3 +4,5 @@ export type {CloseIconProps} from './ClickableIcon';
4
4
  export {ClickableIcon, CloseIcon} from './ClickableIcon';
5
5
  export type {IconProps, IconSize, IconType} from './Icon';
6
6
  export {Icon} from './Icon';
7
+ export type {SemanticIconProps} from './SemanticIcon';
8
+ export {SemanticIcon} from './SemanticIcon';
@@ -3,8 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.InContextAlert = exports.ALERT_SEMANTIC = void 0;
6
+ exports.InContextAlert = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
+ var _common = require("../../types/common");
8
9
  var _typography = require("../../types/typography");
9
10
  var _classify = require("../../utils/classify");
10
11
  var _Icon = require("../Icon");
@@ -16,14 +17,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
16
17
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
19
 
19
- const ALERT_SEMANTIC = Object.freeze({
20
- neutral: 'neutral',
21
- success: 'success',
22
- information: 'information',
23
- warning: 'warning',
24
- danger: 'danger'
25
- });
26
- exports.ALERT_SEMANTIC = ALERT_SEMANTIC;
27
20
  const AlertIcon = _ref => {
28
21
  let {
29
22
  semantic,
@@ -31,35 +24,35 @@ const AlertIcon = _ref => {
31
24
  leftIconType
32
25
  } = _ref;
33
26
  switch (semantic) {
34
- case ALERT_SEMANTIC.neutral:
27
+ case _common.ALERT_SEMANTIC.neutral:
35
28
  return /*#__PURE__*/React.createElement(_Icon.Icon, {
36
29
  color: _typography.TEXT_COLORS.neutral,
37
30
  name: leftIconName ? leftIconName : 'face-smile',
38
31
  size: "small",
39
32
  type: leftIconType
40
33
  });
41
- case ALERT_SEMANTIC.success:
34
+ case _common.ALERT_SEMANTIC.success:
42
35
  return /*#__PURE__*/React.createElement(_Icon.Icon, {
43
36
  name: leftIconName ? leftIconName : 'circle-check',
44
37
  size: "small",
45
38
  color: _typography.TEXT_COLORS.success,
46
39
  type: leftIconType
47
40
  });
48
- case ALERT_SEMANTIC.information:
41
+ case _common.ALERT_SEMANTIC.information:
49
42
  return /*#__PURE__*/React.createElement(_Icon.Icon, {
50
43
  name: leftIconName ? leftIconName : 'circle-info',
51
44
  size: "small",
52
45
  color: _typography.TEXT_COLORS.information,
53
46
  type: leftIconType
54
47
  });
55
- case ALERT_SEMANTIC.warning:
48
+ case _common.ALERT_SEMANTIC.warning:
56
49
  return /*#__PURE__*/React.createElement(_Icon.Icon, {
57
50
  name: leftIconName ? leftIconName : 'circle-exclamation',
58
51
  size: "small",
59
52
  color: _typography.TEXT_COLORS.warning,
60
53
  type: leftIconType
61
54
  });
62
- case ALERT_SEMANTIC.danger:
55
+ case _common.ALERT_SEMANTIC.danger:
63
56
  return /*#__PURE__*/React.createElement(_Icon.Icon, {
64
57
  name: leftIconName ? leftIconName : 'shield-exclamation',
65
58
  size: "small",
@@ -78,7 +71,7 @@ const AlertIcon = _ref => {
78
71
  const InContextAlert = /*#__PURE__*/React.forwardRef((props, ref) => {
79
72
  const {
80
73
  classNames,
81
- semantic = ALERT_SEMANTIC.neutral,
74
+ semantic = _common.ALERT_SEMANTIC.neutral,
82
75
  dismissable,
83
76
  children,
84
77
  selfDismiss = false,
@@ -95,11 +88,11 @@ const InContextAlert = /*#__PURE__*/React.forwardRef((props, ref) => {
95
88
  };
96
89
  return /*#__PURE__*/React.createElement(React.Fragment, null, !dismissed && /*#__PURE__*/React.createElement("div", {
97
90
  className: (0, _classify.classify)(_InContextAlertModule.default.alertContainer, {
98
- [_InContextAlertModule.default.neutral]: semantic === ALERT_SEMANTIC.neutral,
99
- [_InContextAlertModule.default.success]: semantic === ALERT_SEMANTIC.success,
100
- [_InContextAlertModule.default.information]: semantic === ALERT_SEMANTIC.information,
101
- [_InContextAlertModule.default.warning]: semantic === ALERT_SEMANTIC.warning,
102
- [_InContextAlertModule.default.danger]: semantic === ALERT_SEMANTIC.danger
91
+ [_InContextAlertModule.default.neutral]: semantic === _common.ALERT_SEMANTIC.neutral,
92
+ [_InContextAlertModule.default.success]: semantic === _common.ALERT_SEMANTIC.success,
93
+ [_InContextAlertModule.default.information]: semantic === _common.ALERT_SEMANTIC.information,
94
+ [_InContextAlertModule.default.warning]: semantic === _common.ALERT_SEMANTIC.warning,
95
+ [_InContextAlertModule.default.danger]: semantic === _common.ALERT_SEMANTIC.danger
103
96
  }, classNames?.wrapper),
104
97
  ref: ref
105
98
  }, /*#__PURE__*/React.createElement(AlertIcon, {
@@ -2,6 +2,8 @@
2
2
 
3
3
  import * as React from 'react';
4
4
 
5
+ import type {AlertSemanticType} from '../../types/common';
6
+ import {ALERT_SEMANTIC} from '../../types/common';
5
7
  import {TEXT_COLORS} from '../../types/typography';
6
8
  import {classify} from '../../utils/classify';
7
9
  import type {IconType} from '../Icon';
@@ -13,20 +15,11 @@ import {Truncate} from '../Truncate';
13
15
  import css from './InContextAlert.module.css';
14
16
 
15
17
 
16
- export const ALERT_SEMANTIC = Object.freeze({
17
- neutral: 'neutral',
18
- success: 'success',
19
- information: 'information',
20
- warning: 'warning',
21
- danger: 'danger',
22
- });
23
-
24
18
  type ClassNames = $ReadOnly<{
25
19
  wrapper?: string,
26
20
  alertText?: string,
27
21
  actionContainer?: string,
28
22
  }>;
29
- export type AlertSemanticType = $Values<typeof ALERT_SEMANTIC>;
30
23
 
31
24
  type InContextAlertBaseProps = {
32
25
  classNames?: ClassNames,
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.KPIBox = void 0;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _classify = _interopRequireDefault(require("../../utils/classify"));
9
+ var _Icon = require("../Icon");
10
+ var _KPIBoxModule = _interopRequireDefault(require("./KPIBox.module.css"));
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
+ const KPIBox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
16
+ let {
17
+ classNames,
18
+ semantic = 'neutral',
19
+ topContent,
20
+ middleContent,
21
+ bottomContent,
22
+ iconName,
23
+ iconSize,
24
+ iconType = 'solid',
25
+ ...props
26
+ } = _ref;
27
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
28
+ ref: ref,
29
+ "data-testid": "KPIBox",
30
+ className: (0, _classify.default)(_KPIBoxModule.default.wrapper, classNames?.wrapper)
31
+ }), !!iconName && /*#__PURE__*/React.createElement(_Icon.SemanticIcon, {
32
+ semantic: semantic,
33
+ name: iconName,
34
+ size: iconSize,
35
+ type: iconType
36
+ }), /*#__PURE__*/React.createElement("div", {
37
+ className: _KPIBoxModule.default.textContainer
38
+ }, !!topContent && /*#__PURE__*/React.createElement("div", {
39
+ className: (0, _classify.default)(_KPIBoxModule.default.topFoldContent, classNames?.topFoldContent)
40
+ }, topContent), !!middleContent && /*#__PURE__*/React.createElement("div", {
41
+ className: (0, _classify.default)(_KPIBoxModule.default.middleFoldContent, classNames?.middleFoldContent)
42
+ }, middleContent), !!bottomContent && /*#__PURE__*/React.createElement("div", {
43
+ className: (0, _classify.default)(_KPIBoxModule.default.bottomFoldContent, classNames?.bottomFoldContent)
44
+ }, bottomContent)));
45
+ });
46
+ exports.KPIBox = KPIBox;
@@ -0,0 +1,97 @@
1
+ // @flow strict
2
+
3
+ import * as React from 'react';
4
+
5
+ import type {AlertSemanticType} from '../../types/common';
6
+ import classify from '../../utils/classify';
7
+ import type {IconSize, IconType} from '../Icon';
8
+ import {SemanticIcon} from '../Icon';
9
+
10
+ import css from './KPIBox.module.css';
11
+
12
+
13
+ type ClassNames = $ReadOnly<{
14
+ wrapper?: string,
15
+ topFoldContent?: string,
16
+ middleFoldContent?: string,
17
+ bottomFoldContent?: string,
18
+ }>;
19
+
20
+ export type KPIBoxProps = {
21
+ classNames?: ClassNames,
22
+ semantic: AlertSemanticType,
23
+ topContent?: React.Node,
24
+ middleContent?: React.Node,
25
+ bottomContent?: React.Node,
26
+ iconName?: string,
27
+ iconSize?: IconSize,
28
+ iconType?: IconType,
29
+ ...
30
+ };
31
+
32
+ export const KPIBox: React$AbstractComponent<KPIBoxProps, HTMLDivElement> =
33
+ React.forwardRef<KPIBoxProps, HTMLDivElement>(
34
+ (
35
+ {
36
+ classNames,
37
+ semantic = 'neutral',
38
+ topContent,
39
+ middleContent,
40
+ bottomContent,
41
+ iconName,
42
+ iconSize,
43
+ iconType = 'solid',
44
+ ...props
45
+ }: KPIBoxProps,
46
+ ref,
47
+ ) => (
48
+ <div
49
+ {...props}
50
+ ref={ref}
51
+ data-testid="KPIBox"
52
+ className={classify(css.wrapper, classNames?.wrapper)}
53
+ >
54
+ {!!iconName && (
55
+ <SemanticIcon
56
+ semantic={semantic}
57
+ name={iconName}
58
+ size={iconSize}
59
+ type={iconType}
60
+ />
61
+ )}
62
+
63
+ <div className={css.textContainer}>
64
+ {!!topContent && (
65
+ <div
66
+ className={classify(
67
+ css.topFoldContent,
68
+ classNames?.topFoldContent,
69
+ )}
70
+ >
71
+ {topContent}
72
+ </div>
73
+ )}
74
+ {!!middleContent && (
75
+ <div
76
+ className={classify(
77
+ css.middleFoldContent,
78
+ classNames?.middleFoldContent,
79
+ )}
80
+ >
81
+ {middleContent}
82
+ </div>
83
+ )}
84
+ {!!bottomContent && (
85
+ <div
86
+ className={classify(
87
+ css.bottomFoldContent,
88
+ classNames?.bottomFoldContent,
89
+ )}
90
+ >
91
+ {bottomContent}
92
+ </div>
93
+ )}
94
+ </div>
95
+ </div>
96
+ ),
97
+ );
@@ -0,0 +1,47 @@
1
+ @value (
2
+ colorBackgroundTertiary,
3
+ colorTextSecondary,
4
+ colorTextPrimary
5
+ ) from '../../styles/variables/_color.css';
6
+ @value (spaceXXSmall, spaceSmall, spaceLarge, spaceMedium) from '../../styles/variables/_space.css';
7
+ @value (borderRadiusMedium) from '../../styles/variables/_border.css';
8
+ @value (size60, size140, size252) from '../../styles/variables/_size.css';
9
+
10
+ .wrapper {
11
+ display: flex;
12
+ composes: borderPrimary from '../../styles/border.module.css';
13
+ min-width: size252;
14
+ height: fit-content;
15
+ align-items: center;
16
+ gap: spaceSmall;
17
+ background-color: colorBackgroundTertiary;
18
+ border-radius: borderRadiusMedium;
19
+ padding: spaceLarge spaceMedium;
20
+ }
21
+
22
+ .textContainer {
23
+ display: flex;
24
+ flex-direction: column;
25
+ gap: spaceXXSmall;
26
+ }
27
+
28
+ .topFoldContent,
29
+ .middleFoldContent,
30
+ .bottomFoldContent {
31
+ display: flex;
32
+ }
33
+
34
+ .topFoldContent {
35
+ composes: formLabelSmall from '../../styles/typography.module.css';
36
+ color: colorTextSecondary;
37
+ }
38
+
39
+ .middleFoldContent {
40
+ composes: jumboSmall from '../../styles/typography.module.css';
41
+ color: colorTextPrimary;
42
+ }
43
+
44
+ .bottomFoldContent {
45
+ composes: bodySmall from '../../styles/typography.module.css';
46
+ color: colorTextSecondary;
47
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _KPIBox = require("./KPIBox");
7
+ Object.keys(_KPIBox).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _KPIBox[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _KPIBox[key];
14
+ }
15
+ });
16
+ });
@@ -0,0 +1,3 @@
1
+ // @flow strict
2
+
3
+ export * from './KPIBox';
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TitleMedium = exports.SubTitleSmall = exports.SubTitleMedium = exports.SubTitleLarge = exports.SubTitleExtraSmall = exports.JumboMedium = exports.FormLabelSmall = exports.FormLabelMedium = exports.FormInputSmall = exports.FormInputMedium = exports.ButtonTextSmall = exports.ButtonTextMedium = exports.ButtonTextExtraSmall = exports.BodySmall = exports.BodyMedium = exports.BodyLarge = void 0;
6
+ exports.TitleMedium = exports.SubTitleSmall = exports.SubTitleMedium = exports.SubTitleLarge = exports.SubTitleExtraSmall = exports.JumboSmall = exports.JumboMedium = exports.FormLabelSmall = exports.FormLabelMedium = exports.FormInputSmall = exports.FormInputMedium = exports.ButtonTextSmall = exports.ButtonTextMedium = exports.ButtonTextExtraSmall = exports.BodySmall = exports.BodyMedium = exports.BodyLarge = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _typography = require("../../types/typography");
9
9
  var _classify = _interopRequireDefault(require("../../utils/classify"));
@@ -62,7 +62,7 @@ const JumboMedium = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
62
62
  }) : children);
63
63
  });
64
64
  exports.JumboMedium = JumboMedium;
65
- const TitleMedium = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
65
+ const JumboSmall = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
66
66
  let {
67
67
  color = _typography.TEXT_COLORS.primary,
68
68
  children,
@@ -73,6 +73,29 @@ const TitleMedium = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
73
73
  highlightWithBackground,
74
74
  ...props
75
75
  } = _ref3;
76
+ return /*#__PURE__*/React.createElement("span", _extends({}, props, {
77
+ className: (0, _classify.default)(_typographyModule.default.jumboSmall, _typographyModule.default[color], className),
78
+ ref: ref
79
+ }), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
80
+ text: children,
81
+ highlight: highlightString,
82
+ caseSensitiveHighlighting: caseSensitiveHighlighting,
83
+ highlightClassName: highlightedTextClassName,
84
+ highlightWithBackground: highlightWithBackground
85
+ }) : children);
86
+ });
87
+ exports.JumboSmall = JumboSmall;
88
+ const TitleMedium = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
89
+ let {
90
+ color = _typography.TEXT_COLORS.primary,
91
+ children,
92
+ className,
93
+ highlightedTextClassName,
94
+ highlightString,
95
+ caseSensitiveHighlighting,
96
+ highlightWithBackground,
97
+ ...props
98
+ } = _ref4;
76
99
  return /*#__PURE__*/React.createElement("h1", _extends({}, props, {
77
100
  className: (0, _classify.default)(_typographyModule.default.titleMedium, _typographyModule.default[color], className),
78
101
  ref: ref
@@ -85,7 +108,7 @@ const TitleMedium = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
85
108
  }) : children);
86
109
  });
87
110
  exports.TitleMedium = TitleMedium;
88
- const SubTitleLarge = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
111
+ const SubTitleLarge = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
89
112
  let {
90
113
  color = _typography.TEXT_COLORS.primary,
91
114
  children,
@@ -95,7 +118,7 @@ const SubTitleLarge = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
95
118
  caseSensitiveHighlighting,
96
119
  highlightWithBackground,
97
120
  ...props
98
- } = _ref4;
121
+ } = _ref5;
99
122
  return /*#__PURE__*/React.createElement("h2", _extends({}, props, {
100
123
  className: (0, _classify.default)(_typographyModule.default.subTitleLarge, _typographyModule.default[color], className),
101
124
  ref: ref
@@ -108,7 +131,7 @@ const SubTitleLarge = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
108
131
  }) : children);
109
132
  });
110
133
  exports.SubTitleLarge = SubTitleLarge;
111
- const SubTitleMedium = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
134
+ const SubTitleMedium = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
112
135
  let {
113
136
  color = _typography.TEXT_COLORS.primary,
114
137
  children,
@@ -118,7 +141,7 @@ const SubTitleMedium = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
118
141
  caseSensitiveHighlighting,
119
142
  highlightWithBackground,
120
143
  ...props
121
- } = _ref5;
144
+ } = _ref6;
122
145
  return /*#__PURE__*/React.createElement("h3", _extends({}, props, {
123
146
  className: (0, _classify.default)(_typographyModule.default.subTitleMedium, _typographyModule.default[color], className),
124
147
  ref: ref
@@ -131,7 +154,7 @@ const SubTitleMedium = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
131
154
  }) : children);
132
155
  });
133
156
  exports.SubTitleMedium = SubTitleMedium;
134
- const SubTitleSmall = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
157
+ const SubTitleSmall = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
135
158
  let {
136
159
  color = _typography.TEXT_COLORS.primary,
137
160
  children,
@@ -141,7 +164,7 @@ const SubTitleSmall = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
141
164
  caseSensitiveHighlighting,
142
165
  highlightWithBackground,
143
166
  ...props
144
- } = _ref6;
167
+ } = _ref7;
145
168
  return /*#__PURE__*/React.createElement("h4", _extends({}, props, {
146
169
  className: (0, _classify.default)(_typographyModule.default.subTitleSmall, _typographyModule.default[color], className),
147
170
  ref: ref
@@ -154,7 +177,7 @@ const SubTitleSmall = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
154
177
  }) : children);
155
178
  });
156
179
  exports.SubTitleSmall = SubTitleSmall;
157
- const SubTitleExtraSmall = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
180
+ const SubTitleExtraSmall = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
158
181
  let {
159
182
  color = _typography.TEXT_COLORS.primary,
160
183
  children,
@@ -164,7 +187,7 @@ const SubTitleExtraSmall = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
164
187
  caseSensitiveHighlighting,
165
188
  highlightWithBackground,
166
189
  ...props
167
- } = _ref7;
190
+ } = _ref8;
168
191
  return /*#__PURE__*/React.createElement("h5", _extends({}, props, {
169
192
  className: (0, _classify.default)(_typographyModule.default.subTitleExtraSmall, _typographyModule.default[color], className),
170
193
  ref: ref
@@ -177,7 +200,7 @@ const SubTitleExtraSmall = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
177
200
  }) : children);
178
201
  });
179
202
  exports.SubTitleExtraSmall = SubTitleExtraSmall;
180
- const ButtonTextMedium = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
203
+ const ButtonTextMedium = /*#__PURE__*/React.forwardRef((_ref9, ref) => {
181
204
  let {
182
205
  color = _typography.TEXT_COLORS.primary,
183
206
  children,
@@ -187,7 +210,7 @@ const ButtonTextMedium = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
187
210
  caseSensitiveHighlighting,
188
211
  highlightWithBackground,
189
212
  ...props
190
- } = _ref8;
213
+ } = _ref9;
191
214
  return /*#__PURE__*/React.createElement("span", _extends({}, props, {
192
215
  className: (0, _classify.default)(_typographyModule.default.buttonTextMedium, _typographyModule.default[color], className),
193
216
  ref: ref
@@ -200,7 +223,7 @@ const ButtonTextMedium = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
200
223
  }) : children);
201
224
  });
202
225
  exports.ButtonTextMedium = ButtonTextMedium;
203
- const ButtonTextSmall = /*#__PURE__*/React.forwardRef((_ref9, ref) => {
226
+ const ButtonTextSmall = /*#__PURE__*/React.forwardRef((_ref10, ref) => {
204
227
  let {
205
228
  color = _typography.TEXT_COLORS.primary,
206
229
  children,
@@ -210,7 +233,7 @@ const ButtonTextSmall = /*#__PURE__*/React.forwardRef((_ref9, ref) => {
210
233
  caseSensitiveHighlighting,
211
234
  highlightWithBackground,
212
235
  ...props
213
- } = _ref9;
236
+ } = _ref10;
214
237
  return /*#__PURE__*/React.createElement("span", _extends({}, props, {
215
238
  className: (0, _classify.default)(_typographyModule.default.buttonTextSmall, _typographyModule.default[color], className),
216
239
  ref: ref
@@ -223,7 +246,7 @@ const ButtonTextSmall = /*#__PURE__*/React.forwardRef((_ref9, ref) => {
223
246
  }) : children);
224
247
  });
225
248
  exports.ButtonTextSmall = ButtonTextSmall;
226
- const ButtonTextExtraSmall = /*#__PURE__*/React.forwardRef((_ref10, ref) => {
249
+ const ButtonTextExtraSmall = /*#__PURE__*/React.forwardRef((_ref11, ref) => {
227
250
  let {
228
251
  color = _typography.TEXT_COLORS.primary,
229
252
  children,
@@ -233,7 +256,7 @@ const ButtonTextExtraSmall = /*#__PURE__*/React.forwardRef((_ref10, ref) => {
233
256
  caseSensitiveHighlighting,
234
257
  highlightWithBackground,
235
258
  ...props
236
- } = _ref10;
259
+ } = _ref11;
237
260
  return /*#__PURE__*/React.createElement("span", _extends({}, props, {
238
261
  className: (0, _classify.default)(_typographyModule.default.buttonTextExtraSmall, _typographyModule.default[color], className),
239
262
  ref: ref
@@ -246,7 +269,7 @@ const ButtonTextExtraSmall = /*#__PURE__*/React.forwardRef((_ref10, ref) => {
246
269
  }) : children);
247
270
  });
248
271
  exports.ButtonTextExtraSmall = ButtonTextExtraSmall;
249
- const FormInputMedium = /*#__PURE__*/React.forwardRef((_ref11, ref) => {
272
+ const FormInputMedium = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
250
273
  let {
251
274
  color = _typography.TEXT_COLORS.primary,
252
275
  children,
@@ -256,7 +279,7 @@ const FormInputMedium = /*#__PURE__*/React.forwardRef((_ref11, ref) => {
256
279
  caseSensitiveHighlighting,
257
280
  highlightWithBackground,
258
281
  ...props
259
- } = _ref11;
282
+ } = _ref12;
260
283
  return /*#__PURE__*/React.createElement("p", _extends({}, props, {
261
284
  className: (0, _classify.default)(_typographyModule.default.formInputMedium, _typographyModule.default[color], className),
262
285
  ref: ref
@@ -269,7 +292,7 @@ const FormInputMedium = /*#__PURE__*/React.forwardRef((_ref11, ref) => {
269
292
  }) : children);
270
293
  });
271
294
  exports.FormInputMedium = FormInputMedium;
272
- const FormInputSmall = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
295
+ const FormInputSmall = /*#__PURE__*/React.forwardRef((_ref13, ref) => {
273
296
  let {
274
297
  color = _typography.TEXT_COLORS.primary,
275
298
  children,
@@ -279,7 +302,7 @@ const FormInputSmall = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
279
302
  caseSensitiveHighlighting,
280
303
  highlightWithBackground,
281
304
  ...props
282
- } = _ref12;
305
+ } = _ref13;
283
306
  return /*#__PURE__*/React.createElement("p", _extends({}, props, {
284
307
  className: (0, _classify.default)(_typographyModule.default.formInputSmall, _typographyModule.default[color], className),
285
308
  ref: ref
@@ -292,7 +315,7 @@ const FormInputSmall = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
292
315
  }) : children);
293
316
  });
294
317
  exports.FormInputSmall = FormInputSmall;
295
- const BodyLarge = /*#__PURE__*/React.forwardRef((_ref13, ref) => {
318
+ const BodyLarge = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
296
319
  let {
297
320
  color = _typography.TEXT_COLORS.primary,
298
321
  children,
@@ -302,7 +325,7 @@ const BodyLarge = /*#__PURE__*/React.forwardRef((_ref13, ref) => {
302
325
  caseSensitiveHighlighting,
303
326
  highlightWithBackground,
304
327
  ...props
305
- } = _ref13;
328
+ } = _ref14;
306
329
  return /*#__PURE__*/React.createElement("p", _extends({}, props, {
307
330
  className: (0, _classify.default)(_typographyModule.default.bodyLarge, _typographyModule.default[color], className),
308
331
  ref: ref
@@ -315,7 +338,7 @@ const BodyLarge = /*#__PURE__*/React.forwardRef((_ref13, ref) => {
315
338
  }) : children);
316
339
  });
317
340
  exports.BodyLarge = BodyLarge;
318
- const BodyMedium = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
341
+ const BodyMedium = /*#__PURE__*/React.forwardRef((_ref15, ref) => {
319
342
  let {
320
343
  color = _typography.TEXT_COLORS.primary,
321
344
  children,
@@ -325,7 +348,7 @@ const BodyMedium = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
325
348
  caseSensitiveHighlighting,
326
349
  highlightWithBackground,
327
350
  ...props
328
- } = _ref14;
351
+ } = _ref15;
329
352
  return /*#__PURE__*/React.createElement("p", _extends({}, props, {
330
353
  className: (0, _classify.default)(_typographyModule.default.bodyMedium, _typographyModule.default[color], className),
331
354
  ref: ref
@@ -338,7 +361,7 @@ const BodyMedium = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
338
361
  }) : children);
339
362
  });
340
363
  exports.BodyMedium = BodyMedium;
341
- const BodySmall = /*#__PURE__*/React.forwardRef((_ref15, ref) => {
364
+ const BodySmall = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
342
365
  let {
343
366
  color = _typography.TEXT_COLORS.primary,
344
367
  children,
@@ -348,7 +371,7 @@ const BodySmall = /*#__PURE__*/React.forwardRef((_ref15, ref) => {
348
371
  caseSensitiveHighlighting,
349
372
  highlightWithBackground,
350
373
  ...props
351
- } = _ref15;
374
+ } = _ref16;
352
375
  return /*#__PURE__*/React.createElement("p", _extends({}, props, {
353
376
  className: (0, _classify.default)(_typographyModule.default.bodySmall, _typographyModule.default[color], className),
354
377
  ref: ref
@@ -361,7 +384,7 @@ const BodySmall = /*#__PURE__*/React.forwardRef((_ref15, ref) => {
361
384
  }) : children);
362
385
  });
363
386
  exports.BodySmall = BodySmall;
364
- const FormLabelMedium = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
387
+ const FormLabelMedium = /*#__PURE__*/React.forwardRef((_ref17, ref) => {
365
388
  let {
366
389
  color = _typography.TEXT_COLORS.primary,
367
390
  children,
@@ -371,7 +394,7 @@ const FormLabelMedium = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
371
394
  caseSensitiveHighlighting,
372
395
  highlightWithBackground,
373
396
  ...props
374
- } = _ref16;
397
+ } = _ref17;
375
398
  return /*#__PURE__*/React.createElement("span", _extends({}, props, {
376
399
  className: (0, _classify.default)(_typographyModule.default.formLabelMedium, _typographyModule.default[color], className),
377
400
  ref: ref
@@ -384,7 +407,7 @@ const FormLabelMedium = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
384
407
  }) : children);
385
408
  });
386
409
  exports.FormLabelMedium = FormLabelMedium;
387
- const FormLabelSmall = /*#__PURE__*/React.forwardRef((_ref17, ref) => {
410
+ const FormLabelSmall = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
388
411
  let {
389
412
  color = _typography.TEXT_COLORS.primary,
390
413
  children,
@@ -394,7 +417,7 @@ const FormLabelSmall = /*#__PURE__*/React.forwardRef((_ref17, ref) => {
394
417
  caseSensitiveHighlighting,
395
418
  highlightWithBackground,
396
419
  ...props
397
- } = _ref17;
420
+ } = _ref18;
398
421
  return /*#__PURE__*/React.createElement("span", _extends({}, props, {
399
422
  className: (0, _classify.default)(_typographyModule.default.formLabelSmall, _typographyModule.default[color], className),
400
423
  ref: ref
@@ -123,6 +123,41 @@ export const JumboMedium: React$AbstractComponent<TextProps, HTMLSpanElement> =
123
123
  ),
124
124
  );
125
125
 
126
+ export const JumboSmall: React$AbstractComponent<TextProps, HTMLSpanElement> =
127
+ React.forwardRef<TextProps, HTMLSpanElement>(
128
+ (
129
+ {
130
+ color = TEXT_COLORS.primary,
131
+ children,
132
+ className,
133
+ highlightedTextClassName,
134
+ highlightString,
135
+ caseSensitiveHighlighting,
136
+ highlightWithBackground,
137
+ ...props
138
+ }: TextProps,
139
+ ref,
140
+ ): React.Node => (
141
+ <span
142
+ {...props}
143
+ className={classify(css.jumboSmall, css[color], className)}
144
+ ref={ref}
145
+ >
146
+ {!!highlightString?.length && typeof children === 'string' ? (
147
+ <HighlightText
148
+ text={children}
149
+ highlight={highlightString}
150
+ caseSensitiveHighlighting={caseSensitiveHighlighting}
151
+ highlightClassName={highlightedTextClassName}
152
+ highlightWithBackground={highlightWithBackground}
153
+ />
154
+ ) : (
155
+ children
156
+ )}
157
+ </span>
158
+ ),
159
+ );
160
+
126
161
  export const TitleMedium: React$AbstractComponent<
127
162
  TextProps,
128
163
  HTMLHeadingElement,
@@ -69,6 +69,12 @@ Object.defineProperty(exports, "JumboMedium", {
69
69
  return _Text.JumboMedium;
70
70
  }
71
71
  });
72
+ Object.defineProperty(exports, "JumboSmall", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _Text.JumboSmall;
76
+ }
77
+ });
72
78
  Object.defineProperty(exports, "SubTitleExtraSmall", {
73
79
  enumerable: true,
74
80
  get: function () {
@@ -14,6 +14,7 @@ export {
14
14
  FormLabelMedium,
15
15
  FormLabelSmall,
16
16
  JumboMedium,
17
+ JumboSmall,
17
18
  SubTitleExtraSmall,
18
19
  SubTitleLarge,
19
20
  SubTitleMedium,
@@ -289,6 +289,17 @@ Object.keys(_Input).forEach(function (key) {
289
289
  }
290
290
  });
291
291
  });
292
+ var _KPIBox = require("./KPIBox");
293
+ Object.keys(_KPIBox).forEach(function (key) {
294
+ if (key === "default" || key === "__esModule") return;
295
+ if (key in exports && exports[key] === _KPIBox[key]) return;
296
+ Object.defineProperty(exports, key, {
297
+ enumerable: true,
298
+ get: function () {
299
+ return _KPIBox[key];
300
+ }
301
+ });
302
+ });
292
303
  var _LinearLoader = require("./LinearLoader");
293
304
  Object.keys(_LinearLoader).forEach(function (key) {
294
305
  if (key === "default" || key === "__esModule") return;
@@ -26,6 +26,7 @@ export * from './Icon';
26
26
  export * from './InContextAlert';
27
27
  export * from './InlineDropdown';
28
28
  export * from './Input';
29
+ export * from './KPIBox';
29
30
  export * from './LinearLoader';
30
31
  export * from './Link';
31
32
  export * from './Menu';
@@ -200,6 +200,8 @@
200
200
 
201
201
  @value fontSize18: 18px;
202
202
 
203
+ @value fontSize24: 24px;
204
+
203
205
  @value fontSize26: 26px;
204
206
 
205
207
  @value fontSize46: 46px;
@@ -222,6 +224,8 @@
222
224
 
223
225
  @value fontLineHeight120: 120%;
224
226
 
227
+ @value fontLineHeight125: 125%;
228
+
225
229
  @value fontLineHeight130: 130%;
226
230
 
227
231
  @value fontLineHeight140: 140%;
@@ -386,6 +390,8 @@
386
390
 
387
391
  @value size240: 240px;
388
392
 
393
+ @value size252: 252px;
394
+
389
395
  @value size260: 260px;
390
396
 
391
397
  @value size276: 276px;
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.fontLetterSpacingMinus2 = exports.fontLetterSpacingMinus1 = exports.fontLetterSpacing4 = exports.fontLetterSpacing2 = exports.fontLetterSpacing1 = exports.fontLetterSpacing0 = exports.fontFamilyCentra = exports.elevationTooltip = exports.elevationToast = exports.elevationNone = exports.elevationModal = exports.elevationMenu = exports.elevationCard = exports.elevationBackdrop = exports.colorWarningLightest = exports.colorWarningLight = exports.colorWarningDarkest = exports.colorWarningDark = exports.colorWarning = exports.colorTooltipFill = exports.colorTextWarning = exports.colorTextTertiary = exports.colorTextSuccess = exports.colorTextSecondary = exports.colorTextPrimary = exports.colorTextNeutral = exports.colorTextInverseSecondary = exports.colorTextInversePrimary = exports.colorTextInformation = exports.colorTextDisabled = exports.colorTextDanger = exports.colorTextClickable = exports.colorSuccessLightest = exports.colorSuccessLight = exports.colorSuccessDarkest = exports.colorSuccessDark = exports.colorSuccess = exports.colorSubMenuStar = exports.colorSubMenuBackgroundDefault = exports.colorSideMenuIconDefault = exports.colorSideMenuIconActive = exports.colorNeutralLightest = exports.colorNeutralLight = exports.colorNeutralDarkest = exports.colorNeutralDark = exports.colorNeutral = exports.colorInformationLightest = exports.colorInformationLight = exports.colorInformationDarkest = exports.colorInformationDark = exports.colorInformation = exports.colorGrayLightest = exports.colorFocusPrimary = exports.colorFocusDanger = exports.colorFillSecondary = exports.colorFillPrimary = exports.colorFillNone = exports.colorFillInversePrimary = exports.colorFillDisabled = exports.colorDangerLightest = exports.colorDangerLight = exports.colorDangerDarkest = exports.colorDangerDark = exports.colorDanger = exports.colorButtonFillTertiaryPressed = exports.colorButtonFillTertiaryHovered = exports.colorButtonFillTertiaryEnabled = exports.colorButtonFillSecondaryPressed = exports.colorButtonFillSecondaryHovered = exports.colorButtonFillSecondaryEnabled = exports.colorButtonFillPrimaryPressed = exports.colorButtonFillPrimaryHovered = exports.colorButtonFillPrimaryEnabled = exports.colorButtonFillGhostPressed = exports.colorButtonFillGhostHovered = exports.colorButtonFillGhostEnabled = exports.colorButtonFillDangerPressed = exports.colorButtonFillDangerHovered = exports.colorButtonFillDangerEnabled = exports.colorBorderTertiary = exports.colorBorderSecondary = exports.colorBorderPrimary = exports.colorBorderDanger = exports.colorBackgroundTertiary = exports.colorBackgroundSecondary = exports.colorBackgroundPrimary = exports.colorBackgroundBrand = exports.colorBackdropFill = exports.borderWidthTertiary = exports.borderWidthSecondary = exports.borderWidthPrimary = exports.borderWidthNone = exports.borderRadiusXSmall = exports.borderRadiusXLarge = exports.borderRadiusSmall = exports.borderRadiusRadioButton = exports.borderRadiusNone = exports.borderRadiusMedium = exports.borderRadiusLarge = exports.borderRadiusCircle = void 0;
7
- exports.size60 = exports.size580 = exports.size58 = exports.size500 = exports.size50 = exports.size5 = exports.size480 = exports.size48 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size320 = exports.size300 = exports.size30 = exports.size276 = exports.size260 = exports.size26 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size20 = exports.size2 = exports.size18 = exports.size160 = exports.size140 = exports.size125 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = exports.shadowBoxShadow4Y = exports.shadowBoxShadow4X = exports.shadowBoxShadow4Type = exports.shadowBoxShadow4Spread = exports.shadowBoxShadow4Color = exports.shadowBoxShadow4Blur = exports.shadowBoxShadow3Y = exports.shadowBoxShadow3X = exports.shadowBoxShadow3Type = exports.shadowBoxShadow3Spread = exports.shadowBoxShadow3Color = exports.shadowBoxShadow3Blur = exports.shadowBoxShadow2Y = exports.shadowBoxShadow2X = exports.shadowBoxShadow2Type = exports.shadowBoxShadow2Spread = exports.shadowBoxShadow2Color = exports.shadowBoxShadow2Blur = exports.shadowBoxShadow1Y = exports.shadowBoxShadow1X = exports.shadowBoxShadow1Type = exports.shadowBoxShadow1Spread = exports.shadowBoxShadow1Color = exports.shadowBoxShadow1Blur = exports.opacity95 = exports.opacity90 = exports.opacity85 = exports.opacity80 = exports.opacity70 = exports.opacity60 = exports.opacity50 = exports.opacity5 = exports.opacity40 = exports.opacity30 = exports.opacity20 = exports.opacity15 = exports.opacity100 = exports.opacity10 = exports.opacity0 = exports.motionEaseInEaseOut = exports.motionDurationSlowest = exports.motionDurationSlower = exports.motionDurationSlow = exports.motionDurationNormal = exports.motionDurationFast = exports.fontWeightMedium = exports.fontWeightBook = exports.fontTextDecorationNone = exports.fontTextCaseNone = exports.fontSize46 = exports.fontSize26 = exports.fontSize18 = exports.fontSize16 = exports.fontSize14 = exports.fontSize13 = exports.fontSize12 = exports.fontParagraphSpacing0 = exports.fontLineHeight170 = exports.fontLineHeight150 = exports.fontLineHeight140 = exports.fontLineHeight130 = exports.fontLineHeight120 = exports.fontLineHeight100 = exports.fontLetterSpacingMinus4 = void 0;
8
- exports.spaceXXSmall = exports.spaceXXLarge = exports.spaceXSmall = exports.spaceXLarge = exports.spaceSmall = exports.spaceNone = exports.spaceNegHalfFluid = exports.spaceNegFluid = exports.spaceMedium = exports.spaceLarge = exports.spaceHalfFluid = exports.spaceFluid = exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size8 = exports.size720 = exports.size70 = exports.size640 = void 0;
7
+ exports.size500 = exports.size50 = exports.size5 = exports.size480 = exports.size48 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size320 = exports.size300 = exports.size30 = exports.size276 = exports.size260 = exports.size26 = exports.size252 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size20 = exports.size2 = exports.size18 = exports.size160 = exports.size140 = exports.size125 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = exports.shadowBoxShadow4Y = exports.shadowBoxShadow4X = exports.shadowBoxShadow4Type = exports.shadowBoxShadow4Spread = exports.shadowBoxShadow4Color = exports.shadowBoxShadow4Blur = exports.shadowBoxShadow3Y = exports.shadowBoxShadow3X = exports.shadowBoxShadow3Type = exports.shadowBoxShadow3Spread = exports.shadowBoxShadow3Color = exports.shadowBoxShadow3Blur = exports.shadowBoxShadow2Y = exports.shadowBoxShadow2X = exports.shadowBoxShadow2Type = exports.shadowBoxShadow2Spread = exports.shadowBoxShadow2Color = exports.shadowBoxShadow2Blur = exports.shadowBoxShadow1Y = exports.shadowBoxShadow1X = exports.shadowBoxShadow1Type = exports.shadowBoxShadow1Spread = exports.shadowBoxShadow1Color = exports.shadowBoxShadow1Blur = exports.opacity95 = exports.opacity90 = exports.opacity85 = exports.opacity80 = exports.opacity70 = exports.opacity60 = exports.opacity50 = exports.opacity5 = exports.opacity40 = exports.opacity30 = exports.opacity20 = exports.opacity15 = exports.opacity100 = exports.opacity10 = exports.opacity0 = exports.motionEaseInEaseOut = exports.motionDurationSlowest = exports.motionDurationSlower = exports.motionDurationSlow = exports.motionDurationNormal = exports.motionDurationFast = exports.fontWeightMedium = exports.fontWeightBook = exports.fontTextDecorationNone = exports.fontTextCaseNone = exports.fontSize46 = exports.fontSize26 = exports.fontSize24 = exports.fontSize18 = exports.fontSize16 = exports.fontSize14 = exports.fontSize13 = exports.fontSize12 = exports.fontParagraphSpacing0 = exports.fontLineHeight170 = exports.fontLineHeight150 = exports.fontLineHeight140 = exports.fontLineHeight130 = exports.fontLineHeight125 = exports.fontLineHeight120 = exports.fontLineHeight100 = exports.fontLetterSpacingMinus4 = void 0;
8
+ exports.spaceXXSmall = exports.spaceXXLarge = exports.spaceXSmall = exports.spaceXLarge = exports.spaceSmall = exports.spaceNone = exports.spaceNegHalfFluid = exports.spaceNegFluid = exports.spaceMedium = exports.spaceLarge = exports.spaceHalfFluid = exports.spaceFluid = exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size8 = exports.size720 = exports.size70 = exports.size640 = exports.size60 = exports.size580 = exports.size58 = void 0;
9
9
 
10
10
  const borderWidthNone = '0px';
11
11
  exports.borderWidthNone = borderWidthNone;
@@ -209,6 +209,8 @@ const fontSize16 = '16px';
209
209
  exports.fontSize16 = fontSize16;
210
210
  const fontSize18 = '18px';
211
211
  exports.fontSize18 = fontSize18;
212
+ const fontSize24 = '24px';
213
+ exports.fontSize24 = fontSize24;
212
214
  const fontSize26 = '26px';
213
215
  exports.fontSize26 = fontSize26;
214
216
  const fontSize46 = '46px';
@@ -231,6 +233,8 @@ const fontLineHeight100 = '100%';
231
233
  exports.fontLineHeight100 = fontLineHeight100;
232
234
  const fontLineHeight120 = '120%';
233
235
  exports.fontLineHeight120 = fontLineHeight120;
236
+ const fontLineHeight125 = '125%';
237
+ exports.fontLineHeight125 = fontLineHeight125;
234
238
  const fontLineHeight130 = '130%';
235
239
  exports.fontLineHeight130 = fontLineHeight130;
236
240
  const fontLineHeight140 = '140%';
@@ -395,6 +399,8 @@ const size228 = '228px';
395
399
  exports.size228 = size228;
396
400
  const size240 = '240px';
397
401
  exports.size240 = size240;
402
+ const size252 = '252px';
403
+ exports.size252 = size252;
398
404
  const size260 = '260px';
399
405
  exports.size260 = size260;
400
406
  const size276 = '276px';
@@ -202,6 +202,8 @@ export const fontSize16 = '16px';
202
202
 
203
203
  export const fontSize18 = '18px';
204
204
 
205
+ export const fontSize24 = '24px';
206
+
205
207
  export const fontSize26 = '26px';
206
208
 
207
209
  export const fontSize46 = '46px';
@@ -224,6 +226,8 @@ export const fontLineHeight100 = '100%';
224
226
 
225
227
  export const fontLineHeight120 = '120%';
226
228
 
229
+ export const fontLineHeight125 = '125%';
230
+
227
231
  export const fontLineHeight130 = '130%';
228
232
 
229
233
  export const fontLineHeight140 = '140%';
@@ -388,6 +392,8 @@ export const size228 = '228px';
388
392
 
389
393
  export const size240 = '240px';
390
394
 
395
+ export const size252 = '252px';
396
+
391
397
  export const size260 = '260px';
392
398
 
393
399
  export const size276 = '276px';
@@ -18,6 +18,7 @@
18
18
  @value (
19
19
  fontFamilyCentra,
20
20
  fontSize46,
21
+ fontSize24,
21
22
  fontSize26,
22
23
  fontSize18,
23
24
  fontSize16,
@@ -28,6 +29,7 @@
28
29
  fontWeightBook,
29
30
  fontLineHeight100,
30
31
  fontLineHeight120,
32
+ fontLineHeight125,
31
33
  fontLineHeight140,
32
34
  fontLineHeight150,
33
35
  fontLineHeight170,
@@ -66,6 +68,13 @@
66
68
  letter-spacing: fontLetterSpacingMinus4;
67
69
  }
68
70
 
71
+ .jumboSmall {
72
+ composes: baseType;
73
+ font-size: fontSize24;
74
+ line-height: fontLineHeight125;
75
+ letter-spacing: fontLetterSpacingMinus2;
76
+ }
77
+
69
78
  .titleMedium {
70
79
  composes: baseType;
71
80
  font-size: fontSize26;
@@ -14,6 +14,8 @@
14
14
 
15
15
  @value fontSize18: 18px;
16
16
 
17
+ @value fontSize24: 24px;
18
+
17
19
  @value fontSize26: 26px;
18
20
 
19
21
  @value fontSize46: 46px;
@@ -36,6 +38,8 @@
36
38
 
37
39
  @value fontLineHeight120: 120%;
38
40
 
41
+ @value fontLineHeight125: 125%;
42
+
39
43
  @value fontLineHeight130: 130%;
40
44
 
41
45
  @value fontLineHeight140: 140%;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.fontWeightMedium = exports.fontWeightBook = exports.fontTextDecorationNone = exports.fontTextCaseNone = exports.fontSize46 = exports.fontSize26 = exports.fontSize18 = exports.fontSize16 = exports.fontSize14 = exports.fontSize13 = exports.fontSize12 = exports.fontParagraphSpacing0 = exports.fontLineHeight170 = exports.fontLineHeight150 = exports.fontLineHeight140 = exports.fontLineHeight130 = exports.fontLineHeight120 = exports.fontLineHeight100 = exports.fontLetterSpacingMinus4 = exports.fontLetterSpacingMinus2 = exports.fontLetterSpacingMinus1 = exports.fontLetterSpacing4 = exports.fontLetterSpacing2 = exports.fontLetterSpacing1 = exports.fontLetterSpacing0 = exports.fontFamilyCentra = void 0;
6
+ exports.fontWeightMedium = exports.fontWeightBook = exports.fontTextDecorationNone = exports.fontTextCaseNone = exports.fontSize46 = exports.fontSize26 = exports.fontSize24 = exports.fontSize18 = exports.fontSize16 = exports.fontSize14 = exports.fontSize13 = exports.fontSize12 = exports.fontParagraphSpacing0 = exports.fontLineHeight170 = exports.fontLineHeight150 = exports.fontLineHeight140 = exports.fontLineHeight130 = exports.fontLineHeight125 = exports.fontLineHeight120 = exports.fontLineHeight100 = exports.fontLetterSpacingMinus4 = exports.fontLetterSpacingMinus2 = exports.fontLetterSpacingMinus1 = exports.fontLetterSpacing4 = exports.fontLetterSpacing2 = exports.fontLetterSpacing1 = exports.fontLetterSpacing0 = exports.fontFamilyCentra = void 0;
7
7
 
8
8
  const fontFamilyCentra = '"Centra No2"';
9
9
  exports.fontFamilyCentra = fontFamilyCentra;
@@ -21,6 +21,8 @@ const fontSize16 = '16px';
21
21
  exports.fontSize16 = fontSize16;
22
22
  const fontSize18 = '18px';
23
23
  exports.fontSize18 = fontSize18;
24
+ const fontSize24 = '24px';
25
+ exports.fontSize24 = fontSize24;
24
26
  const fontSize26 = '26px';
25
27
  exports.fontSize26 = fontSize26;
26
28
  const fontSize46 = '46px';
@@ -43,6 +45,8 @@ const fontLineHeight100 = '100%';
43
45
  exports.fontLineHeight100 = fontLineHeight100;
44
46
  const fontLineHeight120 = '120%';
45
47
  exports.fontLineHeight120 = fontLineHeight120;
48
+ const fontLineHeight125 = '125%';
49
+ exports.fontLineHeight125 = fontLineHeight125;
46
50
  const fontLineHeight130 = '130%';
47
51
  exports.fontLineHeight130 = fontLineHeight130;
48
52
  const fontLineHeight140 = '140%';
@@ -16,6 +16,8 @@ export const fontSize16 = '16px';
16
16
 
17
17
  export const fontSize18 = '18px';
18
18
 
19
+ export const fontSize24 = '24px';
20
+
19
21
  export const fontSize26 = '26px';
20
22
 
21
23
  export const fontSize46 = '46px';
@@ -38,6 +40,8 @@ export const fontLineHeight100 = '100%';
38
40
 
39
41
  export const fontLineHeight120 = '120%';
40
42
 
43
+ export const fontLineHeight125 = '125%';
44
+
41
45
  export const fontLineHeight130 = '130%';
42
46
 
43
47
  export const fontLineHeight140 = '140%';
@@ -58,6 +58,8 @@
58
58
 
59
59
  @value size240: 240px;
60
60
 
61
+ @value size252: 252px;
62
+
61
63
  @value size260: 260px;
62
64
 
63
65
  @value size276: 276px;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size8 = exports.size720 = exports.size70 = exports.size640 = exports.size60 = exports.size580 = exports.size58 = exports.size500 = exports.size50 = exports.size5 = exports.size480 = exports.size48 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size320 = exports.size300 = exports.size30 = exports.size276 = exports.size260 = exports.size26 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size20 = exports.size2 = exports.size18 = exports.size160 = exports.size140 = exports.size125 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = void 0;
6
+ exports.sizeFullViewportWidth = exports.sizeFullViewportHeight = exports.sizeFluid = exports.size960 = exports.size90 = exports.size8 = exports.size720 = exports.size70 = exports.size640 = exports.size60 = exports.size580 = exports.size58 = exports.size500 = exports.size50 = exports.size5 = exports.size480 = exports.size48 = exports.size42 = exports.size400 = exports.size40 = exports.size4 = exports.size380 = exports.size38 = exports.size36 = exports.size34 = exports.size320 = exports.size300 = exports.size30 = exports.size276 = exports.size260 = exports.size26 = exports.size252 = exports.size240 = exports.size24 = exports.size228 = exports.size22 = exports.size20 = exports.size2 = exports.size18 = exports.size160 = exports.size140 = exports.size125 = exports.size12 = exports.size110 = exports.size100 = exports.size10 = void 0;
7
7
 
8
8
  const size2 = '2px';
9
9
  exports.size2 = size2;
@@ -65,6 +65,8 @@ const size228 = '228px';
65
65
  exports.size228 = size228;
66
66
  const size240 = '240px';
67
67
  exports.size240 = size240;
68
+ const size252 = '252px';
69
+ exports.size252 = size252;
68
70
  const size260 = '260px';
69
71
  exports.size260 = size260;
70
72
  const size276 = '276px';
@@ -60,6 +60,8 @@ export const size228 = '228px';
60
60
 
61
61
  export const size240 = '240px';
62
62
 
63
+ export const size252 = '252px';
64
+
63
65
  export const size260 = '260px';
64
66
 
65
67
  export const size276 = '276px';
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ALERT_SEMANTIC = void 0;
7
+
8
+ const ALERT_SEMANTIC = Object.freeze({
9
+ neutral: 'neutral',
10
+ success: 'success',
11
+ information: 'information',
12
+ warning: 'warning',
13
+ danger: 'danger'
14
+ });
15
+ exports.ALERT_SEMANTIC = ALERT_SEMANTIC;
@@ -1,3 +1,13 @@
1
1
  // @flow strict
2
2
 
3
3
  export type GroupAlign = 'vertical' | 'horizontal-fixed' | 'horizontal-fluid';
4
+
5
+ export const ALERT_SEMANTIC = Object.freeze({
6
+ neutral: 'neutral',
7
+ success: 'success',
8
+ information: 'information',
9
+ warning: 'warning',
10
+ danger: 'danger',
11
+ });
12
+
13
+ export type AlertSemanticType = $Values<typeof ALERT_SEMANTIC>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {