wini-web-components 1.7.2 → 1.7.3

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.
@@ -1,5 +1,4 @@
1
1
  import React, { CSSProperties } from "react";
2
- import './rating.css';
3
2
  interface RatingProps {
4
3
  id?: string;
5
4
  /**
@@ -7,7 +6,7 @@ interface RatingProps {
7
6
  */
8
7
  value?: number;
9
8
  size?: number | string;
10
- onChange?: (e: number) => {};
9
+ onChange?: (e: number) => void;
11
10
  className?: string;
12
11
  style?: CSSProperties;
13
12
  strokeColor?: string;
@@ -20,10 +20,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.Rating = void 0;
22
22
  var react_1 = __importDefault(require("react"));
23
- require("./rating.css");
24
- var autoKeyId = function () { return ("".concat(1e7 + -1e3 + -4e3 + -8e3 + -1e11)).replace(/[018]/g, function (c) {
25
- return (parseFloat(c) ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (parseFloat(c) / 4)))).toString(16);
26
- }); };
23
+ var rating_module_css_1 = __importDefault(require("./rating.module.css"));
24
+ var autoKeyId = function () { return window.crypto.randomUUID().replace(/-/g, ''); };
27
25
  var Rating = /** @class */ (function (_super) {
28
26
  __extends(Rating, _super);
29
27
  function Rating() {
@@ -44,7 +42,7 @@ var Rating = /** @class */ (function (_super) {
44
42
  Rating.prototype.render = function () {
45
43
  var _this = this;
46
44
  var _a;
47
- return react_1.default.createElement("div", { id: this.props.id, className: "row rating-container ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : ''), style: this.props.style }, Array.from({ length: 5 }).map(function (_, i) {
45
+ return react_1.default.createElement("div", { id: this.props.id, className: "row ".concat(rating_module_css_1.default['rating-container'], " ").concat((_a = this.props.className) !== null && _a !== void 0 ? _a : ''), style: this.props.style }, Array.from({ length: 5 }).map(function (_, i) {
48
46
  var _a, _b, _c, _d, _e;
49
47
  var uniqueId = 'rating-star-grad-0';
50
48
  var stopValue = 0;