@occmundial/occ-atomic 2.0.0 → 3.0.0-beta.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/CHANGELOG.md +148 -0
  2. package/build/Autocomplete/Autocomplete.js +2 -5
  3. package/build/Autocomplete/Autocomplete.test.js +17 -9
  4. package/build/Autocomplete/styles.js +5 -5
  5. package/build/Banner/Banner.js +24 -38
  6. package/build/Button/Button.js +28 -7
  7. package/build/Button/__snapshots__/Button.test.js.snap +0 -2
  8. package/build/Button/styles.js +0 -2
  9. package/build/Checkbox/Checkbox.js +1 -0
  10. package/build/Checkbox/__snapshots__/Checkbox.test.js.snap +59 -24
  11. package/build/Checkbox/styles.js +68 -23
  12. package/build/Droplist/Droplist.js +37 -49
  13. package/build/Droplist/Droplist.test.js +2 -2
  14. package/build/Droplist/__snapshots__/Droplist.test.js.snap +57 -25
  15. package/build/Droplist/styles.js +62 -32
  16. package/build/Fab/__snapshots__/Fab.test.js.snap +1 -0
  17. package/build/Pill/Choice/Choice.js +71 -81
  18. package/build/Pill/Choice/styles.js +61 -20
  19. package/build/Pill/Group/Group.js +5 -2
  20. package/build/Pill/Group/styles.js +31 -31
  21. package/build/Pill/Pill.js +4 -3
  22. package/build/Pill/Stack/Stack.js +7 -12
  23. package/build/Pill/Stack/styles.js +46 -33
  24. package/build/Pill/__snapshots__/Pill.test.js.snap +14 -24
  25. package/build/Pill/styles.js +22 -27
  26. package/build/Radio/Radio.js +24 -3
  27. package/build/Radio/__snapshots__/Radio.test.js.snap +16 -7
  28. package/build/Radio/styles.js +23 -12
  29. package/build/SlideToggle/SlideToggle.js +1 -0
  30. package/build/SlideToggle/__snapshots__/SlideToggle.test.js.snap +30 -10
  31. package/build/SlideToggle/styles.js +38 -14
  32. package/build/Text/Text.js +4 -2
  33. package/build/Text/styles.js +2 -1
  34. package/build/TextField/TextField.js +77 -104
  35. package/build/TextField/TextField.test.js +7 -15
  36. package/build/TextField/__snapshots__/TextField.test.js.snap +59 -145
  37. package/build/TextField/styles.js +81 -149
  38. package/build/Tip/Tip.js +42 -88
  39. package/build/Tip/Tip.test.js +0 -6
  40. package/build/Tip/TipText/index.js +41 -0
  41. package/build/Tip/__snapshots__/Tip.test.js.snap +79 -12
  42. package/build/Tip/styles.js +79 -26
  43. package/build/tokens/colors.json +41 -14
  44. package/package.json +1 -1
@@ -4,44 +4,111 @@ exports[`Tip matches the snapshot 1`] = `ShallowWrapper {}`;
4
4
 
5
5
  exports[`Tip styles matches the snapshot 1`] = `
6
6
  Object {
7
+ "bannerContent": Object {
8
+ "margin": "auto",
9
+ "maxWidth": "1200px",
10
+ },
11
+ "closeIcon": Object {
12
+ "marginLeft": "16px",
13
+ },
7
14
  "container": Object {
8
15
  "alignItems": "center",
9
- "borderRadius": 6,
10
- "padding": 16,
16
+ "borderRadius": "4px",
17
+ "minHeight": "56px",
18
+ "outlineOffset": "-1px",
19
+ "padding": Array [
20
+ "8px",
21
+ "16px",
22
+ ],
11
23
  },
12
24
  "cta": Object {
13
25
  "cursor": "pointer",
26
+ "font": "400 14px/1.5 'OccText', sans-serif",
14
27
  "textDecoration": "underline",
28
+ "textWrap": "nowrap",
29
+ },
30
+ "ctaLarge": Object {
31
+ "alignSelf": "center",
32
+ "marginLeft": "16px",
33
+ },
34
+ "ctaSmall": Object {
35
+ "alignSelf": "start",
36
+ "margin": Array [
37
+ "8px",
38
+ 0,
39
+ 0,
40
+ ],
15
41
  },
16
42
  "error": Object {
17
- "backgroundColor": "#fcebeb",
43
+ "backgroundColor": "#fce8e8",
44
+ "outline": "1px solid #FBDFDF",
18
45
  },
19
46
  "icon": Object {
20
- "marginRight": 8,
47
+ "flexShrink": 0,
48
+ "marginRight": "8px",
21
49
  },
22
50
  "info": Object {
23
- "backgroundColor": "#efebf7",
51
+ "backgroundColor": "#e3efff",
52
+ "outline": "1px solid #b9d7ff",
53
+ },
54
+ "largePadding": Object {
55
+ "padding": "12px",
24
56
  },
25
57
  "noBorderRadius": Object {
26
58
  "borderRadius": 0,
27
59
  },
60
+ "normalText": Object {
61
+ "display": "inline-block",
62
+ "font": "400 14px/1.5 'OccText', sans-serif",
63
+ "margin": 0,
64
+ },
28
65
  "promote": Object {
29
- "backgroundColor": "#222222",
66
+ "backgroundColor": "#000",
67
+ "outline": "1px solid rgba(255,255,255,0.2)",
30
68
  },
31
- "spacedClose": Object {
32
- "marginRight": 48,
69
+ "small": Object {
70
+ "maxWidth": 360,
71
+ "padding": "12px",
72
+ },
73
+ "smallPadding": Object {
74
+ "padding": "8px",
33
75
  },
34
76
  "success": Object {
35
- "backgroundColor": "#e6f5eb",
77
+ "backgroundColor": "#ebfbf1",
78
+ "outline": "1px solid #d7f6e3",
36
79
  },
37
80
  "text": Object {
38
81
  "maxWidth": "100%",
39
82
  },
40
- "textWithIcon": Object {
41
- "maxWidth": "calc(100% - 32px)",
83
+ "textContainer": Object {
84
+ "padding": Array [
85
+ "12px",
86
+ 0,
87
+ ],
88
+ },
89
+ "textError": Object {
90
+ "color": "#8b1313",
91
+ "textDecorationColor": "#8b1313",
92
+ },
93
+ "textInfo": Object {
94
+ "color": "#083CAE",
95
+ "textDecorationColor": "#083CAE",
96
+ },
97
+ "textPromote": Object {
98
+ "color": "#fff",
99
+ "textDecorationColor": "#fff",
100
+ },
101
+ "textSuccess": Object {
102
+ "color": "#16542e",
103
+ "textDecorationColor": "#16542e",
104
+ },
105
+ "textWarning": Object {
106
+ "color": "#664a0e",
107
+ "textDecorationColor": "#664a0e",
42
108
  },
43
109
  "warning": Object {
44
- "backgroundColor": "#fffaed",
110
+ "backgroundColor": "#fff8e9",
111
+ "outline": "1px solid #fff1d3",
45
112
  },
46
113
  }
47
114
  `;
@@ -5,61 +5,114 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
 
8
- var _spacing = _interopRequireDefault(require("../subatomic/spacing"));
8
+ var _colors = _interopRequireDefault(require("../tokens/colors.json"));
9
9
 
10
- var _colors = _interopRequireDefault(require("../subatomic/colors"));
10
+ var _fonts = _interopRequireDefault(require("../tokens/fonts.json"));
11
+
12
+ var _spacing = _interopRequireDefault(require("../tokens/spacing.json"));
13
+
14
+ var _borderRadius = _interopRequireDefault(require("../tokens/borderRadius.json"));
15
+
16
+ var _styles = require("../Text/styles");
11
17
 
12
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
19
 
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;
24
20
  var _default = {
25
21
  container: {
26
- padding: small,
27
- borderRadius: radius,
28
- alignItems: 'center'
22
+ padding: [_spacing["default"]['size-2'], _spacing["default"]['size-4']],
23
+ borderRadius: _borderRadius["default"]['br-xs'],
24
+ minHeight: '56px',
25
+ alignItems: 'center',
26
+ outlineOffset: '-1px'
29
27
  },
30
28
  noBorderRadius: {
31
29
  borderRadius: 0
32
30
  },
33
31
  info: {
34
- backgroundColor: infoLight
32
+ backgroundColor: _colors["default"].alert.info.bg,
33
+ outline: "1px solid ".concat(_colors["default"].alert.info.border)
35
34
  },
36
35
  warning: {
37
- backgroundColor: warningLight
36
+ backgroundColor: _colors["default"].alert.warning.bg,
37
+ outline: "1px solid ".concat(_colors["default"].alert.warning.border)
38
38
  },
39
39
  success: {
40
- backgroundColor: successLight
40
+ backgroundColor: _colors["default"].alert.success.bg,
41
+ outline: "1px solid ".concat(_colors["default"].alert.success.border)
41
42
  },
42
43
  error: {
43
- backgroundColor: errorLight
44
+ backgroundColor: _colors["default"].alert.error.bg,
45
+ outline: "1px solid ".concat(_colors["default"].alert.error.border)
44
46
  },
45
47
  promote: {
46
- backgroundColor: grey900
48
+ backgroundColor: _colors["default"].alert.neutral.bg,
49
+ outline: "1px solid ".concat(_colors["default"].alert.neutral.border)
50
+ },
51
+ textInfo: {
52
+ color: _colors["default"].text.indigo.primary,
53
+ textDecorationColor: _colors["default"].text.indigo.primary
54
+ },
55
+ textWarning: {
56
+ color: _colors["default"].text.warning,
57
+ textDecorationColor: _colors["default"].text.warning
58
+ },
59
+ textSuccess: {
60
+ color: _colors["default"].text.success,
61
+ textDecorationColor: _colors["default"].text.success
62
+ },
63
+ textError: {
64
+ color: _colors["default"].text.error,
65
+ textDecorationColor: _colors["default"].text.error
66
+ },
67
+ textPromote: {
68
+ color: _colors["default"].text.white.primary,
69
+ textDecorationColor: _colors["default"].text.white.primary
47
70
  },
48
71
  icon: {
49
- marginRight: tiny
72
+ marginRight: _spacing["default"]['size-2'],
73
+ flexShrink: 0
50
74
  },
51
75
  text: {
52
76
  maxWidth: '100%'
53
77
  },
54
- textWithIcon: {
55
- maxWidth: "calc(100% - ".concat(medium, "px)")
78
+ closeIcon: {
79
+ marginLeft: _spacing["default"]['size-4']
56
80
  },
57
- spacedClose: {
58
- marginRight: large
81
+ smallPadding: {
82
+ padding: _spacing["default"]['size-2']
83
+ },
84
+ largePadding: {
85
+ padding: _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
+ },
93
+ ctaLarge: {
94
+ marginLeft: _spacing["default"]['size-4'],
95
+ alignSelf: 'center'
96
+ },
97
+ ctaSmall: {
98
+ margin: [_spacing["default"]['size-2'], 0, 0],
99
+ alignSelf: 'start'
100
+ },
101
+ normalText: {
102
+ font: (0, _styles.parseFontValue)(_fonts["default"]['alert-default']),
103
+ display: 'inline-block',
104
+ margin: 0
105
+ },
106
+ textContainer: {
107
+ padding: [_spacing["default"]['size-3'], 0]
108
+ },
109
+ small: {
110
+ maxWidth: 360,
111
+ padding: _spacing["default"]['size-3']
112
+ },
113
+ bannerContent: {
114
+ maxWidth: '1200px',
115
+ margin: 'auto'
63
116
  }
64
117
  };
65
118
  exports["default"] = _default;
@@ -257,7 +257,7 @@
257
257
  "selected": {
258
258
  "bg": {
259
259
  "default": "#0059CD",
260
- "hover": "#0047A5"
260
+ "hover": "#083CAE"
261
261
  }
262
262
  },
263
263
  "bg": {
@@ -279,7 +279,7 @@
279
279
  "selected": {
280
280
  "bg": {
281
281
  "default": "#0059CD",
282
- "hover": "#0047A5",
282
+ "hover": "#083CAE",
283
283
  "disabled": "#8DA5DA"
284
284
  },
285
285
  "border": {
@@ -310,7 +310,7 @@
310
310
  "selected": {
311
311
  "bg": {
312
312
  "default": "#0059CD",
313
- "hover": "#0047A5",
313
+ "hover": "#083CAE",
314
314
  "disabled": "hsl(221 91.2% 35.7% / 0.1)"
315
315
  },
316
316
  "border": {
@@ -342,8 +342,8 @@
342
342
  "border": "#d7f6e3"
343
343
  },
344
344
  "info": {
345
- "bg": "#f7faff",
346
- "border": "#e3efff"
345
+ "bg": "#e3efff",
346
+ "border": "#b9d7ff"
347
347
  },
348
348
  "neutral": {
349
349
  "bg": "#000",
@@ -354,7 +354,7 @@
354
354
  "track": {
355
355
  "bg": {
356
356
  "default": "#0059CD",
357
- "hover": "#0047A5",
357
+ "hover": "#083CAE",
358
358
  "disabled": "#8DA5DA"
359
359
  }
360
360
  },
@@ -379,7 +379,7 @@
379
379
  "selected": {
380
380
  "bg": {
381
381
  "default": "#0059CD",
382
- "hover": "#0047A5",
382
+ "hover": "#083CAE",
383
383
  "disabled": "#8DA5DA"
384
384
  },
385
385
  "border": {
@@ -401,8 +401,8 @@
401
401
  "border": "#fff1d3"
402
402
  },
403
403
  "info": {
404
- "bg": "#f7faff",
405
- "border": "#e3efff"
404
+ "bg": "#e3efff",
405
+ "border": "#b9d7ff"
406
406
  },
407
407
  "featured": {
408
408
  "border": "rgba(255,255,255,0.2)",
@@ -439,6 +439,30 @@
439
439
  }
440
440
  }
441
441
  },
442
+ "nav": {
443
+ "bg": {
444
+ "inverse": "#083CAE",
445
+ "default": "#fff"
446
+ }
447
+ },
448
+ "pill": {
449
+ "selected": {
450
+ "bg": {
451
+ "default": "#0059CD",
452
+ "hover": "#083CAE",
453
+ "active": "#06308A",
454
+ "disabled": "#8DA5DA"
455
+ }
456
+ },
457
+ "unselected": {
458
+ "bg": {
459
+ "default": "hsl(221 91.2% 35.7% / 0.05)",
460
+ "hover": "hsl(221 91.2% 35.7% / 0.1)",
461
+ "active": "hsl(221 91.2% 35.7% / 0.2)",
462
+ "disabled": "hsl(221 91.2% 35.7% / 0.1)"
463
+ }
464
+ }
465
+ },
442
466
  "bg": {
443
467
  "action": {
444
468
  "primary": {
@@ -469,11 +493,13 @@
469
493
  },
470
494
  "brand": {
471
495
  "default": "#0059CD",
472
- "hover": "#0047A5",
496
+ "hover": "#083CAE",
497
+ "active": "#06308A",
473
498
  "disabled": "#8DA5DA",
474
499
  "subtle": {
475
500
  "default": "#E9EEF8",
476
- "hover": "#CAD5EE"
501
+ "hover": "#CAD5EE",
502
+ "active": "#ABBDE4"
477
503
  }
478
504
  },
479
505
  "ghost": {
@@ -490,7 +516,7 @@
490
516
  "warning": "#fff8e9",
491
517
  "error": "#fce8e8",
492
518
  "success": "#ebfbf1",
493
- "info": "#f7faff",
519
+ "info": "#e3efff",
494
520
  "overlay": "rgba(0,0,0,0.8)",
495
521
  "neutral": "#000"
496
522
  },
@@ -515,7 +541,8 @@
515
541
  },
516
542
  "border": {
517
543
  "inverse": {
518
- "default": "#fff",
544
+ "bold": "#fff",
545
+ "default": "rgba(255,255,255,0.5)",
519
546
  "subtle": "rgba(255,255,255,0.2)"
520
547
  },
521
548
  "default": {
@@ -540,7 +567,7 @@
540
567
  "subtle": "#d7f6e3"
541
568
  },
542
569
  "info": {
543
- "subtle": "#e3efff"
570
+ "subtle": "#b9d7ff"
544
571
  }
545
572
  },
546
573
  "text": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@occmundial/occ-atomic",
3
- "version": "2.0.0",
3
+ "version": "3.0.0-beta.10",
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",