@cloudflare/component-notifications 3.6.61 → 3.6.65

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 CHANGED
@@ -3,6 +3,42 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.6.65](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-notifications@3.6.64...@cloudflare/component-notifications@3.6.65) (2021-09-22)
7
+
8
+ **Note:** Version bump only for package @cloudflare/component-notifications
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.6.64](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-notifications@3.6.63...@cloudflare/component-notifications@3.6.64) (2021-09-21)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **component-notifications:** UI-4629 Dark mode colors ([e08fc18](http://stash.cfops.it:7999/fe/stratus/commits/e08fc18))
20
+ * **component-notifications:** UI-4629 Fix switch ([0255ce3](http://stash.cfops.it:7999/fe/stratus/commits/0255ce3))
21
+
22
+
23
+
24
+
25
+
26
+ ## [3.6.63](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-notifications@3.6.62...@cloudflare/component-notifications@3.6.63) (2021-09-20)
27
+
28
+ **Note:** Version bump only for package @cloudflare/component-notifications
29
+
30
+
31
+
32
+
33
+
34
+ ## [3.6.62](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-notifications@3.6.61...@cloudflare/component-notifications@3.6.62) (2021-09-17)
35
+
36
+ **Note:** Version bump only for package @cloudflare/component-notifications
37
+
38
+
39
+
40
+
41
+
6
42
  ## [3.6.61](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-notifications@3.6.59...@cloudflare/component-notifications@3.6.61) (2021-09-15)
7
43
 
8
44
  **Note:** Version bump only for package @cloudflare/component-notifications
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { isDarkMode } from '@cloudflare/style-const';
3
4
  import raf from 'raf';
4
5
  import { createComponent } from '@cloudflare/style-container';
5
6
  import { Icon } from '@cloudflare/component-icon';
@@ -24,17 +25,17 @@ const getBorderColor = (type, theme) => {
24
25
  const getBackgroundColor = (type, theme) => {
25
26
  switch (type) {
26
27
  case 'success':
27
- return theme.colors.green[6];
28
+ return theme.colors.green[isDarkMode() ? 3 : 6];
28
29
 
29
30
  case 'warning':
30
- return theme.colors.orange[6];
31
+ return theme.colors.orange[isDarkMode() ? 3 : 6];
31
32
 
32
33
  case 'error':
33
34
  return theme.colors.red[3];
34
35
 
35
36
  case 'info':
36
37
  default:
37
- return theme.colors.blue[4];
38
+ return theme.colors.blue[isDarkMode() ? 3 : 6];
38
39
  }
39
40
  };
40
41
 
@@ -11,6 +11,8 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
+ var _styleConst = require("@cloudflare/style-const");
15
+
14
16
  var _raf = _interopRequireDefault(require("raf"));
15
17
 
16
18
  var _styleContainer = require("@cloudflare/style-container");
@@ -55,17 +57,17 @@ var getBorderColor = function getBorderColor(type, theme) {
55
57
  var getBackgroundColor = function getBackgroundColor(type, theme) {
56
58
  switch (type) {
57
59
  case 'success':
58
- return theme.colors.green[6];
60
+ return theme.colors.green[(0, _styleConst.isDarkMode)() ? 3 : 6];
59
61
 
60
62
  case 'warning':
61
- return theme.colors.orange[6];
63
+ return theme.colors.orange[(0, _styleConst.isDarkMode)() ? 3 : 6];
62
64
 
63
65
  case 'error':
64
66
  return theme.colors.red[3];
65
67
 
66
68
  case 'info':
67
69
  default:
68
- return theme.colors.blue[4];
70
+ return theme.colors.blue[(0, _styleConst.isDarkMode)() ? 3 : 6];
69
71
  }
70
72
  };
71
73
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudflare/component-notifications",
3
3
  "description": "Cloudflare Notifications Component",
4
- "version": "3.6.61",
4
+ "version": "3.6.65",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
7
7
  "author": "James Kyle <jkyle@cloudflare.com>",
@@ -11,8 +11,9 @@
11
11
  "access": "public"
12
12
  },
13
13
  "dependencies": {
14
- "@cloudflare/component-icon": "^6.3.0",
15
- "@cloudflare/style-container": "^7.3.56",
14
+ "@cloudflare/component-icon": "^6.4.2",
15
+ "@cloudflare/style-const": "^3.0.3",
16
+ "@cloudflare/style-container": "^7.4.2",
16
17
  "prop-types": "^15.6.0",
17
18
  "raf": "^3.3.2"
18
19
  },
@@ -30,5 +31,5 @@
30
31
  "test-coverage": "stratus test --coverage --muteErrorsFixWeNeedToSolveThis",
31
32
  "test-watch": "stratus test --watch"
32
33
  },
33
- "gitHead": "bbfa3ad5116787409a6d0cc5432f17fcda963ad3"
34
+ "gitHead": "00ec7166ecfe3a7e207b8900d53d97f1eb58728f"
34
35
  }
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { isDarkMode } from '@cloudflare/style-const';
3
4
  import raf from 'raf';
4
5
  import { createComponent } from '@cloudflare/style-container';
5
6
 
@@ -22,14 +23,14 @@ const getBorderColor = (type, theme) => {
22
23
  const getBackgroundColor = (type, theme) => {
23
24
  switch (type) {
24
25
  case 'success':
25
- return theme.colors.green[6];
26
+ return theme.colors.green[isDarkMode() ? 3 : 6];
26
27
  case 'warning':
27
- return theme.colors.orange[6];
28
+ return theme.colors.orange[isDarkMode() ? 3 : 6];
28
29
  case 'error':
29
30
  return theme.colors.red[3];
30
31
  case 'info':
31
32
  default:
32
- return theme.colors.blue[4];
33
+ return theme.colors.blue[isDarkMode() ? 3 : 6];
33
34
  }
34
35
  };
35
36