@visactor/react-vtable 1.17.1-alpha.9 → 1.17.2-alpha.0

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/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './tables';
2
2
  export * from './table-components';
3
3
  export * from './components';
4
- export declare const version = "1.17.1-alpha.9";
4
+ export declare const version = "1.17.2-alpha.0";
package/cjs/index.js CHANGED
@@ -18,5 +18,5 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
20
  }), exports.version = void 0, __exportStar(require("./tables"), exports), __exportStar(require("./table-components"), exports),
21
- __exportStar(require("./components"), exports), exports.version = "1.17.1-alpha.9";
21
+ __exportStar(require("./components"), exports), exports.version = "1.17.2-alpha.0";
22
22
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.17.1-alpha.9\";\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.17.2-alpha.0\";\n"]}
@@ -1393,6 +1393,8 @@
1393
1393
  return color.getLuminance2();
1394
1394
  case "lum3":
1395
1395
  return color.getLuminance3();
1396
+ case "wcag":
1397
+ return color.getLuminanceWCAG();
1396
1398
  }
1397
1399
  }
1398
1400
  static parseColorString(value) {
@@ -1494,6 +1496,14 @@
1494
1496
  getLuminance3() {
1495
1497
  return (.299 * this.color.r + .587 * this.color.g + .114 * this.color.b) / 255;
1496
1498
  }
1499
+ getLuminanceWCAG() {
1500
+ const RsRGB = this.color.r / 255,
1501
+ GsRGB = this.color.g / 255,
1502
+ BsRGB = this.color.b / 255;
1503
+ let R, G, B;
1504
+ R = RsRGB <= .03928 ? RsRGB / 12.92 : Math.pow((RsRGB + .055) / 1.055, 2.4), G = GsRGB <= .03928 ? GsRGB / 12.92 : Math.pow((GsRGB + .055) / 1.055, 2.4), B = BsRGB <= .03928 ? BsRGB / 12.92 : Math.pow((BsRGB + .055) / 1.055, 2.4);
1505
+ return .2126 * R + .7152 * G + .0722 * B;
1506
+ }
1497
1507
  clone() {
1498
1508
  return new Color(this.color.toString());
1499
1509
  }
@@ -19562,7 +19572,7 @@
19562
19572
  const Checkbox = React.forwardRef(CheckboxComponent);
19563
19573
  Checkbox.displayName = 'Checkbox';
19564
19574
 
19565
- const version = "1.17.1-alpha.9";
19575
+ const version = "1.17.2-alpha.0";
19566
19576
 
19567
19577
  Object.defineProperty(exports, 'register', {
19568
19578
  enumerable: true,