@livetiles/reach-components-react 0.4.0-preview.272 → 0.4.0-preview.273

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/index.esm2.js CHANGED
@@ -54428,16 +54428,19 @@ function getTheme$1(settings) {
54428
54428
  }
54429
54429
 
54430
54430
  function getTextColor(bgColor) {
54431
- var contrastWithBlack = s(bgColor, defaultDarkColor);
54432
- var contrastWithWhite = s(bgColor, defaultLightColor);
54433
-
54434
- if (contrastWithBlack > contrastWithWhite) {
54431
+ if (shouldUseDarkForegroundColor(bgColor)) {
54435
54432
  return defaultDarkColor;
54436
54433
  }
54437
54434
 
54438
54435
  return defaultLightColor;
54439
54436
  }
54440
54437
 
54438
+ function shouldUseDarkForegroundColor(bgColor) {
54439
+ var contrastWithBlack = s(bgColor, defaultDarkColor);
54440
+ var contrastWithWhite = s(bgColor, defaultLightColor);
54441
+ return contrastWithBlack > contrastWithWhite;
54442
+ }
54443
+
54441
54444
  var ThemeContext$1 = /*#__PURE__*/createContext(null);
54442
54445
 
54443
54446
  var ThemeContextProvider = function ThemeContextProvider(_a) {
@@ -87518,9 +87521,9 @@ var AuthenticationContextProvider = function AuthenticationContextProvider(_a) {
87518
87521
  }), void 0);
87519
87522
  };
87520
87523
 
87521
- var version$1 = "0.4.0-preview.272";
87522
- var buildId = "99871";
87523
- var commitId = "a088c3a3e74ad4f1dc686fe6785dcc318ed241fc";
87524
+ var version$1 = "0.4.0-preview.273";
87525
+ var buildId = "99884";
87526
+ var commitId = "0cf4fe9865c82987ee49fb057f6045269d89ddc2";
87524
87527
  var isCustomerBuild = false;
87525
87528
  var buildInfo = {
87526
87529
  version: version$1,
package/index.umd.js CHANGED
@@ -54284,16 +54284,19 @@
54284
54284
  }
54285
54285
 
54286
54286
  function getTextColor(bgColor) {
54287
- var contrastWithBlack = s(bgColor, defaultDarkColor);
54288
- var contrastWithWhite = s(bgColor, defaultLightColor);
54289
-
54290
- if (contrastWithBlack > contrastWithWhite) {
54287
+ if (shouldUseDarkForegroundColor(bgColor)) {
54291
54288
  return defaultDarkColor;
54292
54289
  }
54293
54290
 
54294
54291
  return defaultLightColor;
54295
54292
  }
54296
54293
 
54294
+ function shouldUseDarkForegroundColor(bgColor) {
54295
+ var contrastWithBlack = s(bgColor, defaultDarkColor);
54296
+ var contrastWithWhite = s(bgColor, defaultLightColor);
54297
+ return contrastWithBlack > contrastWithWhite;
54298
+ }
54299
+
54297
54300
  var ThemeContext$1 = /*#__PURE__*/React$d.createContext(null);
54298
54301
 
54299
54302
  var ThemeContextProvider = function ThemeContextProvider(_a) {
@@ -87374,9 +87377,9 @@
87374
87377
  }), void 0);
87375
87378
  };
87376
87379
 
87377
- var version$1 = "0.4.0-preview.272";
87378
- var buildId = "99871";
87379
- var commitId = "a088c3a3e74ad4f1dc686fe6785dcc318ed241fc";
87380
+ var version$1 = "0.4.0-preview.273";
87381
+ var buildId = "99884";
87382
+ var commitId = "0cf4fe9865c82987ee49fb057f6045269d89ddc2";
87380
87383
  var isCustomerBuild = false;
87381
87384
  var buildInfo = {
87382
87385
  version: version$1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@livetiles/reach-components-react",
3
3
  "description": "Provides React components to consume LiveTiles Reach data",
4
- "version": "0.4.0-preview.272",
4
+ "version": "0.4.0-preview.273",
5
5
  "peerDependencies": {
6
6
  "react": "^16.14.0 || ^17",
7
7
  "react-dom": "^16.14.0 || ^17",