@occmundial/occ-atomic 3.0.0-beta.2 → 3.0.0-beta.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/CHANGELOG.md +168 -0
  2. package/build/Banner/Banner.js +30 -40
  3. package/build/Banner/Banner.test.js +64 -17
  4. package/build/Banner/__snapshots__/Banner.test.js.snap +0 -28
  5. package/build/Banner/index.js +1 -6
  6. package/build/Button/__snapshots__/Button.test.js.snap +18 -20
  7. package/build/Button/styles.js +6 -8
  8. package/build/Checkbox/Checkbox.js +48 -3
  9. package/build/Checkbox/__snapshots__/Checkbox.test.js.snap +81 -49
  10. package/build/Checkbox/styles.js +91 -48
  11. package/build/Pill/Choice/Choice.js +73 -81
  12. package/build/Pill/Choice/styles.js +64 -20
  13. package/build/Pill/Group/Group.js +5 -2
  14. package/build/Pill/Group/styles.js +31 -31
  15. package/build/Pill/Pill.js +4 -3
  16. package/build/Pill/Stack/Stack.js +7 -12
  17. package/build/Pill/Stack/styles.js +43 -33
  18. package/build/Pill/__snapshots__/Pill.test.js.snap +14 -24
  19. package/build/Pill/styles.js +22 -27
  20. package/build/Radio/Radio.js +42 -6
  21. package/build/Radio/__snapshots__/Radio.test.js.snap +81 -80
  22. package/build/Radio/styles.js +93 -85
  23. package/build/SlideToggle/SlideToggle.js +38 -6
  24. package/build/SlideToggle/SlideToggle.test.js +2 -2
  25. package/build/SlideToggle/__snapshots__/SlideToggle.test.js.snap +53 -37
  26. package/build/SlideToggle/styles.js +65 -45
  27. package/build/Text/Text.js +4 -2
  28. package/build/TextField/TextField.js +7 -6
  29. package/build/TextField/__snapshots__/TextField.test.js.snap +3 -0
  30. package/build/TextField/styles.js +3 -0
  31. package/build/Tip/Tip.js +51 -95
  32. package/build/Tip/Tip.test.js +29 -6
  33. package/build/Tip/TipText/index.js +32 -0
  34. package/build/Tip/__snapshots__/Tip.test.js.snap +90 -15
  35. package/build/Tip/styles.js +85 -31
  36. package/build/tokens/colors.json +3 -3
  37. package/package.json +4 -1
  38. package/build/Banner/styles.js +0 -41
@@ -4,44 +4,119 @@ exports[`Tip matches the snapshot 1`] = `ShallowWrapper {}`;
4
4
 
5
5
  exports[`Tip styles matches the snapshot 1`] = `
6
6
  Object {
7
+ "closeIconMargin": Object {
8
+ "marginLeft": "16px",
9
+ },
10
+ "closeIconSmallMargin": Object {
11
+ "marginLeft": "12px",
12
+ },
7
13
  "container": Object {
14
+ "@media screen and (min-width:576px)": Object {
15
+ "padding": Array [
16
+ "8px",
17
+ "16px",
18
+ ],
19
+ },
8
20
  "alignItems": "center",
9
- "borderRadius": 6,
10
- "padding": 16,
21
+ "borderRadius": "4px",
22
+ "minHeight": "56px",
23
+ "outlineOffset": "-1px",
24
+ "padding": "12px",
11
25
  },
12
26
  "cta": Object {
27
+ "alignSelf": "start",
13
28
  "cursor": "pointer",
29
+ "font": "400 14px/1.5 'OccText', sans-serif",
30
+ "margin": Array [
31
+ "8px",
32
+ 0,
33
+ 0,
34
+ ],
14
35
  "textDecoration": "underline",
36
+ "textWrap": "nowrap",
37
+ },
38
+ "ctaAlert": Object {
39
+ "alignSelf": "center",
40
+ "margin": Array [
41
+ 0,
42
+ 0,
43
+ 0,
44
+ "16px",
45
+ ],
46
+ },
47
+ "ctaBanner": Object {
48
+ "alignSelf": "center",
49
+ "margin": Array [
50
+ 0,
51
+ 0,
52
+ 0,
53
+ "8px",
54
+ ],
15
55
  },
16
56
  "error": Object {
17
- "backgroundColor": "#fcebeb",
57
+ "backgroundColor": "#fce8e8",
58
+ "outline": "1px solid #FBDFDF",
59
+ },
60
+ "growText": Object {
61
+ "flexGrow": 1,
18
62
  },
19
63
  "icon": Object {
20
- "marginRight": 8,
64
+ "flexShrink": 0,
65
+ "marginRight": "8px",
21
66
  },
22
67
  "info": Object {
23
- "backgroundColor": "#efebf7",
68
+ "backgroundColor": "#e3efff",
69
+ "outline": "1px solid #b9d7ff",
70
+ },
71
+ "maxWidth": Object {
72
+ "margin": Array [
73
+ 0,
74
+ "auto",
75
+ ],
76
+ "maxWidth": "1200px",
24
77
  },
25
78
  "noBorderRadius": Object {
26
79
  "borderRadius": 0,
27
80
  },
28
- "promote": Object {
29
- "backgroundColor": "#222222",
81
+ "normalText": Object {
82
+ "display": "inline-block",
83
+ "font": "400 14px/1.5 'OccText', sans-serif",
84
+ "margin": 0,
30
85
  },
31
- "spacedClose": Object {
32
- "marginRight": 48,
86
+ "promote": Object {
87
+ "backgroundColor": "#000",
88
+ "outline": "1px solid rgba(255,255,255,0.2)",
33
89
  },
34
90
  "success": Object {
35
- "backgroundColor": "#e6f5eb",
91
+ "backgroundColor": "#ebfbf1",
92
+ "outline": "1px solid #d7f6e3",
93
+ },
94
+ "textContainer": Object {
95
+ "flex": 1,
96
+ },
97
+ "textError": Object {
98
+ "color": "#8b1313",
99
+ "textDecorationColor": "#8b1313",
100
+ },
101
+ "textInfo": Object {
102
+ "color": "#083CAE",
103
+ "textDecorationColor": "#083CAE",
104
+ },
105
+ "textPromote": Object {
106
+ "color": "#fff",
107
+ "textDecorationColor": "#fff",
36
108
  },
37
- "text": Object {
38
- "maxWidth": "100%",
109
+ "textSuccess": Object {
110
+ "color": "#16542e",
111
+ "textDecorationColor": "#16542e",
39
112
  },
40
- "textWithIcon": Object {
41
- "maxWidth": "calc(100% - 32px)",
113
+ "textWarning": Object {
114
+ "color": "#664a0e",
115
+ "textDecorationColor": "#664a0e",
42
116
  },
43
117
  "warning": Object {
44
- "backgroundColor": "#fffaed",
118
+ "backgroundColor": "#fff8e9",
119
+ "outline": "1px solid #fff1d3",
45
120
  },
46
121
  }
47
122
  `;
@@ -5,61 +5,115 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
 
8
- var _spacing = _interopRequireDefault(require("../subatomic/spacing"));
8
+ var _grid = _interopRequireDefault(require("../subatomic/grid"));
9
9
 
10
- var _colors = _interopRequireDefault(require("../subatomic/colors"));
10
+ var _colors = _interopRequireDefault(require("../tokens/colors.json"));
11
+
12
+ var _fonts = _interopRequireDefault(require("../tokens/fonts.json"));
13
+
14
+ var _spacing = _interopRequireDefault(require("../tokens/spacing.json"));
15
+
16
+ var _borderRadius = _interopRequireDefault(require("../tokens/borderRadius.json"));
17
+
18
+ var _styles = require("../Text/styles");
11
19
 
12
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
21
 
14
- var infoLight = _colors["default"].infoLight,
15
- warningLight = _colors["default"].warningLight,
16
- successLight = _colors["default"].successLight,
17
- errorLight = _colors["default"].errorLight,
18
- grey900 = _colors["default"].grey900;
19
- var radius = _spacing["default"].radius,
20
- large = _spacing["default"].large,
21
- medium = _spacing["default"].medium,
22
- small = _spacing["default"].small,
23
- tiny = _spacing["default"].tiny;
22
+ 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; }
23
+
24
24
  var _default = {
25
- container: {
26
- padding: small,
27
- borderRadius: radius,
28
- alignItems: 'center'
29
- },
25
+ container: _defineProperty({
26
+ padding: _spacing["default"]['size-3'],
27
+ borderRadius: _borderRadius["default"]['br-xs'],
28
+ minHeight: '56px',
29
+ alignItems: 'center',
30
+ outlineOffset: '-1px'
31
+ }, "@media screen and (min-width:".concat(_grid["default"].xs, "px)"), {
32
+ padding: [_spacing["default"]['size-2'], _spacing["default"]['size-4']]
33
+ }),
30
34
  noBorderRadius: {
31
35
  borderRadius: 0
32
36
  },
33
37
  info: {
34
- backgroundColor: infoLight
38
+ backgroundColor: _colors["default"].alert.info.bg,
39
+ outline: "1px solid ".concat(_colors["default"].alert.info.border)
35
40
  },
36
41
  warning: {
37
- backgroundColor: warningLight
42
+ backgroundColor: _colors["default"].alert.warning.bg,
43
+ outline: "1px solid ".concat(_colors["default"].alert.warning.border)
38
44
  },
39
45
  success: {
40
- backgroundColor: successLight
46
+ backgroundColor: _colors["default"].alert.success.bg,
47
+ outline: "1px solid ".concat(_colors["default"].alert.success.border)
41
48
  },
42
49
  error: {
43
- backgroundColor: errorLight
50
+ backgroundColor: _colors["default"].alert.error.bg,
51
+ outline: "1px solid ".concat(_colors["default"].alert.error.border)
44
52
  },
45
53
  promote: {
46
- backgroundColor: grey900
54
+ backgroundColor: _colors["default"].alert.neutral.bg,
55
+ outline: "1px solid ".concat(_colors["default"].alert.neutral.border)
47
56
  },
48
- icon: {
49
- marginRight: tiny
57
+ textInfo: {
58
+ color: _colors["default"].text.indigo.primary,
59
+ textDecorationColor: _colors["default"].text.indigo.primary
60
+ },
61
+ textWarning: {
62
+ color: _colors["default"].text.warning,
63
+ textDecorationColor: _colors["default"].text.warning
64
+ },
65
+ textSuccess: {
66
+ color: _colors["default"].text.success,
67
+ textDecorationColor: _colors["default"].text.success
50
68
  },
51
- text: {
52
- maxWidth: '100%'
69
+ textError: {
70
+ color: _colors["default"].text.error,
71
+ textDecorationColor: _colors["default"].text.error
53
72
  },
54
- textWithIcon: {
55
- maxWidth: "calc(100% - ".concat(medium, "px)")
73
+ textPromote: {
74
+ color: _colors["default"].text.white.primary,
75
+ textDecorationColor: _colors["default"].text.white.primary
56
76
  },
57
- spacedClose: {
58
- marginRight: large
77
+ icon: {
78
+ marginRight: _spacing["default"]['size-2'],
79
+ flexShrink: 0
80
+ },
81
+ closeIconMargin: {
82
+ marginLeft: _spacing["default"]['size-4']
83
+ },
84
+ closeIconSmallMargin: {
85
+ marginLeft: _spacing["default"]['size-3']
59
86
  },
60
87
  cta: {
61
88
  textDecoration: 'underline',
62
- cursor: 'pointer'
89
+ font: (0, _styles.parseFontValue)(_fonts["default"]['alert-default']),
90
+ cursor: 'pointer',
91
+ textWrap: 'nowrap',
92
+ margin: [_spacing["default"]['size-2'], 0, 0],
93
+ alignSelf: 'start'
94
+ },
95
+ ctaAlert: {
96
+ margin: [0, 0, 0, _spacing["default"]['size-4']],
97
+ alignSelf: 'center'
98
+ },
99
+ ctaBanner: {
100
+ margin: [0, 0, 0, _spacing["default"]['size-2']],
101
+ alignSelf: 'center'
102
+ },
103
+ normalText: {
104
+ font: (0, _styles.parseFontValue)(_fonts["default"]['alert-default']),
105
+ display: 'inline-block',
106
+ margin: 0
107
+ },
108
+ textContainer: {
109
+ flex: 1
110
+ },
111
+ growText: {
112
+ flexGrow: 1
113
+ },
114
+ maxWidth: {
115
+ maxWidth: '1200px',
116
+ margin: [0, 'auto']
63
117
  }
64
118
  };
65
119
  exports["default"] = _default;
@@ -343,7 +343,7 @@
343
343
  },
344
344
  "info": {
345
345
  "bg": "#e3efff",
346
- "border": "#e3efff"
346
+ "border": "#b9d7ff"
347
347
  },
348
348
  "neutral": {
349
349
  "bg": "#000",
@@ -402,7 +402,7 @@
402
402
  },
403
403
  "info": {
404
404
  "bg": "#e3efff",
405
- "border": "#e3efff"
405
+ "border": "#b9d7ff"
406
406
  },
407
407
  "featured": {
408
408
  "border": "rgba(255,255,255,0.2)",
@@ -567,7 +567,7 @@
567
567
  "subtle": "#d7f6e3"
568
568
  },
569
569
  "info": {
570
- "subtle": "#e3efff"
570
+ "subtle": "#b9d7ff"
571
571
  }
572
572
  },
573
573
  "text": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@occmundial/occ-atomic",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.20",
4
4
  "description": "Collection of shareable styled React components for OCC applications.",
5
5
  "homepage": "http://occmundial.github.io/occ-atomic",
6
6
  "main": "build/index.js",
@@ -120,5 +120,8 @@
120
120
  "roots": [
121
121
  "<rootDir>/lib/"
122
122
  ]
123
+ },
124
+ "volta": {
125
+ "node": "16.18.0"
123
126
  }
124
127
  }
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
-
8
- var _spacing = _interopRequireDefault(require("../subatomic/spacing"));
9
-
10
- var _colors = _interopRequireDefault(require("../subatomic/colors"));
11
-
12
- var _grid = _interopRequireDefault(require("../subatomic/grid"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
-
16
- 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; }
17
-
18
- var _default = {
19
- container: {
20
- padding: _spacing["default"].small,
21
- backgroundColor: _colors["default"].ink
22
- },
23
- textBanner: {
24
- display: 'inline-block'
25
- },
26
- textFlex: _defineProperty({
27
- textAlign: 'start'
28
- }, "@media screen and (min-width:".concat(_grid["default"].xs, "px)"), {
29
- textAlign: 'center'
30
- }),
31
- iconFlex: _defineProperty({
32
- paddingLeft: _spacing["default"].small,
33
- paddingTop: _spacing["default"].small
34
- }, "@media screen and (min-width:".concat(_grid["default"].xs, "px)"), {
35
- padding: 0
36
- }),
37
- icon: {
38
- cursor: 'pointer'
39
- }
40
- };
41
- exports["default"] = _default;