@covet-pics/covet-pics-widget 0.155.2 → 0.155.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.
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
8
8
  const index = require('./index-9d75b529.js');
9
9
  const utils = require('./utils-cd98b07f.js');
10
10
 
11
- const covetPicsStarRatingCss = ":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-pics-star-size);height:var(--covet-pics-star-size);margin-right:var(--covet-pics-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-pics-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-pics-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-pics-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-pics-empty-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .half-star path{fill:var(--covet-pics-star-color)}";
11
+ const covetPicsStarRatingCss = ":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-star-size);height:var(--covet-star-size);margin-right:var(--covet-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-empty-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .half-star path{fill:var(--covet-star-color)}";
12
12
  const CovetPicsStarRatingStyle0 = covetPicsStarRatingCss;
13
13
 
14
14
  const CovetPicsStarRating = class {
@@ -34,13 +34,13 @@ const CovetPicsStarRating = class {
34
34
  }
35
35
  setCSSVariables() {
36
36
  return {
37
- "--covet-pics-star-size": `${this.starSize}px`,
38
- "--covet-pics-star-space-stars": `${this.spaceStars}px`,
39
- "--covet-pics-star-space-stars-text": `${this.spaceStarsText}px`,
40
- "--covet-pics-star-color": `${this.starColor}`,
41
- "--covet-pics-empty-star-color": `${this.emptyStarColor}`,
42
- "--covet-pics-star-border-color": `${this.starBorderColor}`,
43
- "--covet-pics-star-border-width": `${this.starBorderWidth}`
37
+ "--covet-star-size": `${this.starSize}px`,
38
+ "--covet-star-space-stars": `${this.spaceStars}px`,
39
+ "--covet-star-space-stars-text": `${this.spaceStarsText}px`,
40
+ "--covet-star-color": `${this.starColor}`,
41
+ "--covet-empty-star-color": `${this.emptyStarColor}`,
42
+ "--covet-star-border-color": `${this.starBorderColor}`,
43
+ "--covet-star-border-width": `${this.starBorderWidth}`
44
44
  };
45
45
  }
46
46
  roundRating() {
@@ -60,7 +60,7 @@ const CovetPicsStarRating = class {
60
60
  return lebelUpdated;
61
61
  }
62
62
  render() {
63
- return (index.h(index.Host, { key: '29d77720ea0145a30d6adab9aa67f285485ad512', style: this.setCSSVariables(), role: "radiogroup", "aria-label": "star rating" }, this.renderStarRating(), this.showLabel && index.h("span", { key: '9d938e07b44611f0d104a9a3747a0ca74f186ef9', class: "star-rating-count" }, this.convertedLabel())));
63
+ return (index.h(index.Host, { key: '52b31268f8ecc7bd1c4a07603ed1ba06d0a2ac77', style: this.setCSSVariables(), role: "radiogroup", "aria-label": "star rating" }, this.renderStarRating(), this.showLabel && index.h("span", { key: 'e3e5c728b660ac44c7ad63c17ad36e05592799a7', class: "star-rating-count" }, this.convertedLabel())));
64
64
  }
65
65
  get el() {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UAAU,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC9E,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QACzE,OAAO,YAAY,CAAC;KACrB;IAED,MAAM;QACJ,QACEA,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAC,YAAY,gBAAY,aAAa,IAC5E,IAAI,CAAC,gBAAgB,EAAE,EACvB,IAAI,CAAC,SAAS,IAAID,mEAAM,KAAK,EAAC,mBAAmB,IAAE,IAAI,CAAC,cAAc,EAAE,CAAQ,CAC5E,EACP;KACH;;;;;;;","names":["getRandomId","index","h","Host"],"sources":["src/components/covet-pics-star-rating/covet-pics-star-rating.scss?tag=covet-pics-star-rating&encapsulation=shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-pics-star-size);\r\n height: var(--covet-pics-star-size);\r\n margin-right: var(--covet-pics-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-pics-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-pics-empty-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n})\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-pics-star-size\": `${this.starSize}px`,\r\n \"--covet-pics-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-pics-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-pics-star-color\": `${this.starColor}`,\r\n \"--covet-pics-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-pics-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-pics-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"version":3}
1
+ {"file":"covet-pics-star-rating.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,+4BAA+4B,CAAC;AAC/6B,kCAAe,sBAAsB;;MCQxB,mBAAmB;;;;2BAWF,CAAC;yBAKD,SAAS;8BAKJ,SAAS;+BAKR,SAAS;+BAKT,CAAC;wBAKR,EAAE;0BAKA,CAAC;8BAKG,CAAC;yBAKL,IAAI;qBAMT,YAAY;;IAE5B,gBAAgB;QACtB,MAAM,UAAU,GAAG,CAAC,CAAC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CAAC,SAAS,IAAID,mEAAM,KAAK,EAAC,mBAAmB,IAAE,IAAI,CAAC,cAAc,EAAE,CAAQ,CAC5E,EACP;KACH;;;;;;;","names":["getRandomId","index","h","Host"],"sources":["src/components/covet-pics-star-rating/covet-pics-star-rating.scss?tag=covet-pics-star-rating&encapsulation=shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-star-size);\r\n height: var(--covet-star-size);\r\n margin-right: var(--covet-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-empty-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n })\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-star-size\": `${this.starSize}px`,\r\n \"--covet-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-star-color\": `${this.starColor}`,\r\n \"--covet-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"version":3}
@@ -8,30 +8,30 @@
8
8
  flex: none;
9
9
  display: flex;
10
10
  justify-content: center;
11
- width: var(--covet-pics-star-size);
12
- height: var(--covet-pics-star-size);
13
- margin-right: var(--covet-pics-star-space-stars);
11
+ width: var(--covet-star-size);
12
+ height: var(--covet-star-size);
13
+ margin-right: var(--covet-star-space-stars);
14
14
  }
15
15
  :host .icon-star:nth-of-type(5) {
16
- margin-right: var(--covet-pics-star-space-stars-text);
16
+ margin-right: var(--covet-star-space-stars-text);
17
17
  }
18
18
  :host .icon-star.active .svg-star path {
19
- fill: var(--covet-pics-star-color);
20
- stroke: var(--covet-pics-star-border-color);
21
- stroke-width: var(--covet-pics-star-border-width);
19
+ fill: var(--covet-star-color);
20
+ stroke: var(--covet-star-border-color);
21
+ stroke-width: var(--covet-star-border-width);
22
22
  }
23
23
  :host .icon-star.active .half-star path {
24
- fill: var(--covet-pics-star-color);
24
+ fill: var(--covet-star-color);
25
25
  }
26
26
  :host .svg-star {
27
27
  width: 100%;
28
28
  height: 100%;
29
29
  }
30
30
  :host .svg-star path {
31
- fill: var(--covet-pics-empty-star-color);
32
- stroke: var(--covet-pics-star-border-color);
33
- stroke-width: var(--covet-pics-star-border-width);
31
+ fill: var(--covet-empty-star-color);
32
+ stroke: var(--covet-star-border-color);
33
+ stroke-width: var(--covet-star-border-width);
34
34
  }
35
35
  :host .half-star path {
36
- fill: var(--covet-pics-star-color);
36
+ fill: var(--covet-star-color);
37
37
  }
@@ -25,13 +25,13 @@ export class CovetPicsStarRating {
25
25
  }
26
26
  setCSSVariables() {
27
27
  return {
28
- "--covet-pics-star-size": `${this.starSize}px`,
29
- "--covet-pics-star-space-stars": `${this.spaceStars}px`,
30
- "--covet-pics-star-space-stars-text": `${this.spaceStarsText}px`,
31
- "--covet-pics-star-color": `${this.starColor}`,
32
- "--covet-pics-empty-star-color": `${this.emptyStarColor}`,
33
- "--covet-pics-star-border-color": `${this.starBorderColor}`,
34
- "--covet-pics-star-border-width": `${this.starBorderWidth}`
28
+ "--covet-star-size": `${this.starSize}px`,
29
+ "--covet-star-space-stars": `${this.spaceStars}px`,
30
+ "--covet-star-space-stars-text": `${this.spaceStarsText}px`,
31
+ "--covet-star-color": `${this.starColor}`,
32
+ "--covet-empty-star-color": `${this.emptyStarColor}`,
33
+ "--covet-star-border-color": `${this.starBorderColor}`,
34
+ "--covet-star-border-width": `${this.starBorderWidth}`
35
35
  };
36
36
  }
37
37
  roundRating() {
@@ -51,7 +51,7 @@ export class CovetPicsStarRating {
51
51
  return lebelUpdated;
52
52
  }
53
53
  render() {
54
- return (h(Host, { key: '29d77720ea0145a30d6adab9aa67f285485ad512', style: this.setCSSVariables(), role: "radiogroup", "aria-label": "star rating" }, this.renderStarRating(), this.showLabel && h("span", { key: '9d938e07b44611f0d104a9a3747a0ca74f186ef9', class: "star-rating-count" }, this.convertedLabel())));
54
+ return (h(Host, { key: '52b31268f8ecc7bd1c4a07603ed1ba06d0a2ac77', style: this.setCSSVariables(), role: "radiogroup", "aria-label": "star rating" }, this.renderStarRating(), this.showLabel && h("span", { key: 'e3e5c728b660ac44c7ad63c17ad36e05592799a7', class: "star-rating-count" }, this.convertedLabel())));
55
55
  }
56
56
  static get is() { return "covet-pics-star-rating"; }
57
57
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"covet-pics-star-rating.js","sourceRoot":"","sources":["../../../src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQhD,MAAM,OAAO,mBAAmB;;;2BAWF,CAAC;yBAKD,SAAS;8BAKJ,SAAS;+BAKR,SAAS;+BAKT,CAAC;wBAKR,EAAE;0BAKA,CAAC;8BAKG,CAAC;yBAKL,IAAI;qBAMT,YAAY;;IAE5B,gBAAgB;QACtB,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,WAAW,EAAE,CAAC;QAC7B,OAAO,CACL,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAC,KAAK,EAAE,EAAE,CAC1B,YAAM,KAAK,EAAE,aAAa,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAC,OAAO,kBAAe,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,gBAAc,QAAQ,EAAE,IAAI,UAAU,CAAC,MAAM,EAAE;YACpK,WAAK,KAAK,EAAC,UAAU,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,iBAAa,MAAM,EAAC,IAAI,EAAC,cAAc;gBAC/H,YAAM,SAAS,EAAC,kBAAkB,EAAC,CAAC,EAAC,ipBAAipB,GAA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C;YAC/B,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAEO,cAAc;QACpB,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC9E,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QACzE,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAC,YAAY,gBAAY,aAAa;YAC5E,IAAI,CAAC,gBAAgB,EAAE;YACvB,IAAI,CAAC,SAAS,IAAI,6DAAM,KAAK,EAAC,mBAAmB,IAAE,IAAI,CAAC,cAAc,EAAE,CAAQ,CAC5E,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n})\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-pics-star-size\": `${this.starSize}px`,\r\n \"--covet-pics-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-pics-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-pics-star-color\": `${this.starColor}`,\r\n \"--covet-pics-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-pics-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-pics-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"]}
1
+ {"version":3,"file":"covet-pics-star-rating.js","sourceRoot":"","sources":["../../../src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQhD,MAAM,OAAO,mBAAmB;;;2BAWF,CAAC;yBAKD,SAAS;8BAKJ,SAAS;+BAKR,SAAS;+BAKT,CAAC;wBAKR,EAAE;0BAKA,CAAC;8BAKG,CAAC;yBAKL,IAAI;qBAMT,YAAY;;IAE5B,gBAAgB;QACtB,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EA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,6DAAM,KAAK,EAAC,mBAAmB,IAAE,IAAI,CAAC,cAAc,EAAE,CAAQ,CAC5E,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n })\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-star-size\": `${this.starSize}px`,\r\n \"--covet-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-star-color\": `${this.starColor}`,\r\n \"--covet-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"]}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Copyright by Space Squirrel Ltd.
3
3
  */
4
- import{p as e,b as t}from"./p-12084d8d.js";export{s as setNonce}from"./p-12084d8d.js";import{g as i}from"./p-1d9dbfd4.js";const a=()=>{const t=import.meta.url;const i={};if(t!==""){i.resourcesUrl=new URL(".",t).href}return e(i)};a().then((async e=>{await i();return t([["p-1557a81f",[[0,"covet-pics-highlighted-page",{thumbnailUrl:[1,"thumbnail-url"],thumbnailAlt:[1,"thumbnail-alt"],ariaLabel:[1,"aria-label"],thumbnailLayout:[1,"thumbnail-layout"],videoUrl:[1,"video-url"],videoPoster:[1,"video-poster"],thumbnailCarouselImages:[16],productLinks:[16],productBaseImgAlt:[1,"product-base-img-alt"],reverseClass:[1,"reverse-class"],isMobile:[4,"is-mobile"],pageIndex:[2,"page-index"],caption:[1],rating:[2],createdTime:[1,"created-time"],userName:[1,"user-name"],mainSliderIndex:[2,"main-slider-index"],pageId:[2,"page-id"],appStore:[16],hideHotspots:[32],activeProductIndex:[32],hoverHotspot:[32]},[[0,"changeActiveHotspot","onChangeActiveHotspot"]]],[0,"covet-pics-highlighted-hotspots",{links:[16],activeHotspot:[2,"active-hotspot"],thumbnailUrl:[1,"thumbnail-url"],hoverHotspot:[2,"hover-hotspot"],isMobile:[4,"is-mobile"],productBaseImgAlt:[1,"product-base-img-alt"],pageId:[2,"page-id"],appStore:[16]},null,{thumbnailUrl:["refreshHotspot"],activeHotspot:["activeHotspotHandler"]}]]],["p-26698e63",[[0,"covet-pics-crop-text",{text:[1],textClass:[1,"text-class"],textColor:[1,"text-color"],ratio:[16],cropCSS:[32]}]]],["p-400bcc16",[[1,"covet-pics-star-rating",{rating:[2],ratingCount:[2,"rating-count"],starColor:[1,"star-color"],emptyStarColor:[1,"empty-star-color"],starBorderColor:[1,"star-border-color"],starBorderWidth:[2,"star-border-width"],starSize:[2,"star-size"],spaceStars:[2,"space-stars"],spaceStarsText:[2,"space-stars-text"],showLabel:[4,"show-label"],label:[1]}]]],["p-b232da3a",[[1,"covet-pics-direct-buy",{product:[8],moneyFormat:[1,"money-format"],appStore:[16],selectedOptions:[32],settings:[32]}],[0,"covet-pics-hotspots",{links:[16],backgroundColor:[1,"background-color"],textColor:[1,"text-color"],showNumbers:[4,"show-numbers"]},[[0,"linkInactivate","linkInactivateHandler"],[0,"linkActivate","linkActivateHandler"]]],[0,"covet-pics-popup-links",{links:[16],greyBorderClass:[1,"grey-border-class"],itemCreatedTime:[1,"item-created-time"],appStore:[16],settings:[32]}],[0,"covet-pics-popup-review",{rating:[2],caption:[1],username:[1],itemType:[1,"item-type"],verified:[4],createdTime:[1,"created-time"],reviewCSS:[32]},null,{caption:["watchPropHandler"]}],[0,"covet-pics-popup-shared-links",{item:[16],galleryEmbedId:[2,"gallery-embed-id"],showShareLink:[32],copyLinkCopied:[32]}],[0,"covet-pics-popup-slider",{item:[16],getSwiperState:[64]}]]],["p-ffff6e1c",[[0,"covet-pics-gallery-header",{rating:[2],productTitle:[1,"product-title"],breakdown:[16],appStore:[16],showBreakdownDropdown:[32],showSortDropdown:[32],isDesktopScreen:[32]}],[1,"covet-pics-popup",{appStore:[16],item:[32],product:[32],directBuyIsOpen:[32],popupTabIndex:[32],settings:[32],isPreviousEnable:[32],openPopup:[64],closePopup:[64]},[[4,"addToCart:covetPics","addToCartHandler"],[16,"productLinkClicked","productLinkClickedHandler"]],{item:["itemChangedHandler"]}],[0,"covet-pics-gallery-item",{altTag:[1,"alt-tag"],highlighted:[4],imageUrl:[1,"image-url"],rating:[2],itemWidth:[2,"item-width"],userName:[1,"user-name"],createdTime:[1,"created-time"],caption:[1],itemType:[1,"item-type"],imageHighResolutionUrl:[1,"image-high-resolution-url"],imageResponsiveSizes:[1,"image-responsive-sizes"],itemId:[1,"item-id"],itemSource:[1,"item-source"],links:[16],url:[1],videoUrl:[1,"video-url"],itemIndex:[2,"item-index"],itemSize:[1,"item-size"],appStore:[16],tabIndex:[32],sliderIndex:[32],showImageAsVideoPoster:[32]},[[10,"updateUploadWidgetCover","updateUploadWidgetCoverHandler"]],{sliderIndex:["autoPlayVideos"]}],[0,"covet-pics-gallery-item-detail",{altTag:[1,"alt-tag"],highlighted:[4],verified:[4],imageUrl:[1,"image-url"],imageHighResolutionUrl:[1,"image-high-resolution-url"],imageResponsiveSizes:[1,"image-responsive-sizes"],videoUrl:[1,"video-url"],itemId:[1,"item-id"],itemSource:[1,"item-source"],itemType:[1,"item-type"],links:[16],url:[1],rating:[2],userName:[1,"user-name"],caption:[1],createdTime:[1,"created-time"],itemIndex:[2,"item-index"],itemSize:[1,"item-size"],appStore:[16],tabIndex:[32],captionCSS:[32],reviewClass:[32],starOnlyClass:[32],highlightedClass:[32],sliderIndex:[32],showImageAsVideoPoster:[32]},[[10,"updateUploadWidgetCover","updateUploadWidgetCoverHandler"],[8,"elementResize","elementResizeHandler"]],{sliderIndex:["autoPlayVideos"]}],[1,"covet-pics-upload",{standalone:[4],appStore:[16],starRating:[32],isFormValid:[32],showFormWarning:[32],thumbnailLinks:[32],toShowLinks:[32],dropedImagesNumber:[32],isAnimating:[32],notificationMessage:[32],isNotificationActive:[32],widgetWidth:[32],uploadTabIndex:[32],openUpload:[64]}]]],["p-725e29a6",[[0,"covet-pics-gallery-grid",{items:[16],breakdown:[16],productTitle:[1,"product-title"],rating:[2],filtersEnabled:[4,"filters-enabled"],filters:[16],showLoadMore:[4,"show-load-more"],appStore:[16],sharedItemId:[1,"shared-item-id"],isLoading:[32],showSort:[32],isGridDisabled:[32],isDesktopScreen:[32],itemSize:[32]},[[0,"imageLoaded","imagesLoadedHandler"],[0,"itemClicked","itemClickedHandler"],[8,"previousPopupEvent","prevPopupHandler"],[8,"nextPopupEvent","nextPopupHandler"],[8,"elementResize","elementResizeHandler"]],{items:["itemsChangeHandler"]}],[0,"covet-pics-gallery-slider",{items:[16],sharedItemId:[1,"shared-item-id"],sliderStyle:[1,"slider-style"],appStore:[16],itemSize:[32]},[[0,"imageLoaded","imagesLoadedHandler"],[0,"itemClicked","itemClickedHandler"],[8,"previousPopupEvent","prevPopupHandler"],[8,"nextPopupEvent","nextPopupHandler"],[8,"elementResize","elementResizeHandler"]],{items:["itemsChangeHandler"]}],[0,"covet-pics-highlighted",{numberOfPages:[2,"number-of-pages"],items:[16],appStore:[16],productLinks:[32],mainSliderIndex:[32],mainSliderAnimatingSlides:[32],windowHeight:[32],isDesktopScreen:[32]}]]],["p-ec0e7aca",[[1,"covet-pics-widget",{shop:[1],galleryEmbedId:[2,"gallery-embed-id"],shopifyProductId:[2,"shopify-product-id"],environment:[1],customSettings:[1,"custom-settings"],hideElements:[1,"hide-elements"],previewMode:[4,"preview-mode"],photoRequestId:[2,"photo-request-id"],isLoading:[32],minNumberOfPhotos:[32],items:[32],appStore:[32],fetchingError:[32],updateUploadWidgetCoverPreview:[64],updatePreviewSettings:[64]},[[0,"sortUpdated","sortUpdatedHandler"],[0,"filtersUpdated","filtersUpdatedHandler"],[0,"nextPage","nextPageHandler"]]]]],["p-0e4dcc60",[[0,"covet-pics-gallery-item-caption",{caption:[1],captionClass:[1,"caption-class"],itemStyle:[1,"item-style"],layoutType:[1,"layout-type"],reviewCSS:[32]},[[16,"sliderInit:covetPics","initSize"],[16,"sliderUpdate:covetPics","updateSize"]]]]]],e)}));
4
+ import{p as e,b as t}from"./p-12084d8d.js";export{s as setNonce}from"./p-12084d8d.js";import{g as i}from"./p-1d9dbfd4.js";const a=()=>{const t=import.meta.url;const i={};if(t!==""){i.resourcesUrl=new URL(".",t).href}return e(i)};a().then((async e=>{await i();return t([["p-1557a81f",[[0,"covet-pics-highlighted-page",{thumbnailUrl:[1,"thumbnail-url"],thumbnailAlt:[1,"thumbnail-alt"],ariaLabel:[1,"aria-label"],thumbnailLayout:[1,"thumbnail-layout"],videoUrl:[1,"video-url"],videoPoster:[1,"video-poster"],thumbnailCarouselImages:[16],productLinks:[16],productBaseImgAlt:[1,"product-base-img-alt"],reverseClass:[1,"reverse-class"],isMobile:[4,"is-mobile"],pageIndex:[2,"page-index"],caption:[1],rating:[2],createdTime:[1,"created-time"],userName:[1,"user-name"],mainSliderIndex:[2,"main-slider-index"],pageId:[2,"page-id"],appStore:[16],hideHotspots:[32],activeProductIndex:[32],hoverHotspot:[32]},[[0,"changeActiveHotspot","onChangeActiveHotspot"]]],[0,"covet-pics-highlighted-hotspots",{links:[16],activeHotspot:[2,"active-hotspot"],thumbnailUrl:[1,"thumbnail-url"],hoverHotspot:[2,"hover-hotspot"],isMobile:[4,"is-mobile"],productBaseImgAlt:[1,"product-base-img-alt"],pageId:[2,"page-id"],appStore:[16]},null,{thumbnailUrl:["refreshHotspot"],activeHotspot:["activeHotspotHandler"]}]]],["p-26698e63",[[0,"covet-pics-crop-text",{text:[1],textClass:[1,"text-class"],textColor:[1,"text-color"],ratio:[16],cropCSS:[32]}]]],["p-66409a38",[[1,"covet-pics-star-rating",{rating:[2],ratingCount:[2,"rating-count"],starColor:[1,"star-color"],emptyStarColor:[1,"empty-star-color"],starBorderColor:[1,"star-border-color"],starBorderWidth:[2,"star-border-width"],starSize:[2,"star-size"],spaceStars:[2,"space-stars"],spaceStarsText:[2,"space-stars-text"],showLabel:[4,"show-label"],label:[1]}]]],["p-b232da3a",[[1,"covet-pics-direct-buy",{product:[8],moneyFormat:[1,"money-format"],appStore:[16],selectedOptions:[32],settings:[32]}],[0,"covet-pics-hotspots",{links:[16],backgroundColor:[1,"background-color"],textColor:[1,"text-color"],showNumbers:[4,"show-numbers"]},[[0,"linkInactivate","linkInactivateHandler"],[0,"linkActivate","linkActivateHandler"]]],[0,"covet-pics-popup-links",{links:[16],greyBorderClass:[1,"grey-border-class"],itemCreatedTime:[1,"item-created-time"],appStore:[16],settings:[32]}],[0,"covet-pics-popup-review",{rating:[2],caption:[1],username:[1],itemType:[1,"item-type"],verified:[4],createdTime:[1,"created-time"],reviewCSS:[32]},null,{caption:["watchPropHandler"]}],[0,"covet-pics-popup-shared-links",{item:[16],galleryEmbedId:[2,"gallery-embed-id"],showShareLink:[32],copyLinkCopied:[32]}],[0,"covet-pics-popup-slider",{item:[16],getSwiperState:[64]}]]],["p-ffff6e1c",[[0,"covet-pics-gallery-header",{rating:[2],productTitle:[1,"product-title"],breakdown:[16],appStore:[16],showBreakdownDropdown:[32],showSortDropdown:[32],isDesktopScreen:[32]}],[1,"covet-pics-popup",{appStore:[16],item:[32],product:[32],directBuyIsOpen:[32],popupTabIndex:[32],settings:[32],isPreviousEnable:[32],openPopup:[64],closePopup:[64]},[[4,"addToCart:covetPics","addToCartHandler"],[16,"productLinkClicked","productLinkClickedHandler"]],{item:["itemChangedHandler"]}],[0,"covet-pics-gallery-item",{altTag:[1,"alt-tag"],highlighted:[4],imageUrl:[1,"image-url"],rating:[2],itemWidth:[2,"item-width"],userName:[1,"user-name"],createdTime:[1,"created-time"],caption:[1],itemType:[1,"item-type"],imageHighResolutionUrl:[1,"image-high-resolution-url"],imageResponsiveSizes:[1,"image-responsive-sizes"],itemId:[1,"item-id"],itemSource:[1,"item-source"],links:[16],url:[1],videoUrl:[1,"video-url"],itemIndex:[2,"item-index"],itemSize:[1,"item-size"],appStore:[16],tabIndex:[32],sliderIndex:[32],showImageAsVideoPoster:[32]},[[10,"updateUploadWidgetCover","updateUploadWidgetCoverHandler"]],{sliderIndex:["autoPlayVideos"]}],[0,"covet-pics-gallery-item-detail",{altTag:[1,"alt-tag"],highlighted:[4],verified:[4],imageUrl:[1,"image-url"],imageHighResolutionUrl:[1,"image-high-resolution-url"],imageResponsiveSizes:[1,"image-responsive-sizes"],videoUrl:[1,"video-url"],itemId:[1,"item-id"],itemSource:[1,"item-source"],itemType:[1,"item-type"],links:[16],url:[1],rating:[2],userName:[1,"user-name"],caption:[1],createdTime:[1,"created-time"],itemIndex:[2,"item-index"],itemSize:[1,"item-size"],appStore:[16],tabIndex:[32],captionCSS:[32],reviewClass:[32],starOnlyClass:[32],highlightedClass:[32],sliderIndex:[32],showImageAsVideoPoster:[32]},[[10,"updateUploadWidgetCover","updateUploadWidgetCoverHandler"],[8,"elementResize","elementResizeHandler"]],{sliderIndex:["autoPlayVideos"]}],[1,"covet-pics-upload",{standalone:[4],appStore:[16],starRating:[32],isFormValid:[32],showFormWarning:[32],thumbnailLinks:[32],toShowLinks:[32],dropedImagesNumber:[32],isAnimating:[32],notificationMessage:[32],isNotificationActive:[32],widgetWidth:[32],uploadTabIndex:[32],openUpload:[64]}]]],["p-725e29a6",[[0,"covet-pics-gallery-grid",{items:[16],breakdown:[16],productTitle:[1,"product-title"],rating:[2],filtersEnabled:[4,"filters-enabled"],filters:[16],showLoadMore:[4,"show-load-more"],appStore:[16],sharedItemId:[1,"shared-item-id"],isLoading:[32],showSort:[32],isGridDisabled:[32],isDesktopScreen:[32],itemSize:[32]},[[0,"imageLoaded","imagesLoadedHandler"],[0,"itemClicked","itemClickedHandler"],[8,"previousPopupEvent","prevPopupHandler"],[8,"nextPopupEvent","nextPopupHandler"],[8,"elementResize","elementResizeHandler"]],{items:["itemsChangeHandler"]}],[0,"covet-pics-gallery-slider",{items:[16],sharedItemId:[1,"shared-item-id"],sliderStyle:[1,"slider-style"],appStore:[16],itemSize:[32]},[[0,"imageLoaded","imagesLoadedHandler"],[0,"itemClicked","itemClickedHandler"],[8,"previousPopupEvent","prevPopupHandler"],[8,"nextPopupEvent","nextPopupHandler"],[8,"elementResize","elementResizeHandler"]],{items:["itemsChangeHandler"]}],[0,"covet-pics-highlighted",{numberOfPages:[2,"number-of-pages"],items:[16],appStore:[16],productLinks:[32],mainSliderIndex:[32],mainSliderAnimatingSlides:[32],windowHeight:[32],isDesktopScreen:[32]}]]],["p-ec0e7aca",[[1,"covet-pics-widget",{shop:[1],galleryEmbedId:[2,"gallery-embed-id"],shopifyProductId:[2,"shopify-product-id"],environment:[1],customSettings:[1,"custom-settings"],hideElements:[1,"hide-elements"],previewMode:[4,"preview-mode"],photoRequestId:[2,"photo-request-id"],isLoading:[32],minNumberOfPhotos:[32],items:[32],appStore:[32],fetchingError:[32],updateUploadWidgetCoverPreview:[64],updatePreviewSettings:[64]},[[0,"sortUpdated","sortUpdatedHandler"],[0,"filtersUpdated","filtersUpdatedHandler"],[0,"nextPage","nextPageHandler"]]]]],["p-0e4dcc60",[[0,"covet-pics-gallery-item-caption",{caption:[1],captionClass:[1,"caption-class"],itemStyle:[1,"item-style"],layoutType:[1,"layout-type"],reviewCSS:[32]},[[16,"sliderInit:covetPics","initSize"],[16,"sliderUpdate:covetPics","updateSize"]]]]]],e)}));
5
5
  //# sourceMappingURL=covet-pics-widget.esm.js.map
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Copyright by Space Squirrel Ltd.
3
+ */
4
+ System.register(["./p-c95a507d.system.js","./p-f976b6df.system.js"],(function(t){"use strict";var s,r,e,a,i;return{setters:[function(t){s=t.r;r=t.h;e=t.H;a=t.g},function(t){i=t.i}],execute:function(){var o=":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-star-size);height:var(--covet-star-size);margin-right:var(--covet-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-empty-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .half-star path{fill:var(--covet-star-color)}";var n=o;var c=t("covet_pics_star_rating",function(){function t(t){s(this,t);this.rating=undefined;this.ratingCount=0;this.starColor="#fec500";this.emptyStarColor="#e5e5e5";this.starBorderColor="#000000";this.starBorderWidth=0;this.starSize=20;this.spaceStars=0;this.spaceStarsText=0;this.showLabel=true;this.label="(%RATING%)"}t.prototype.renderStarRating=function(){var t=this;var s=[1,2,3,4,5];var e=Math.round(this.roundRating());var a=i();return s.map((function(i,o){return r("span",{class:"icon-star ".concat(i<=t.roundRating()?"active":""),role:"radio","aria-checked":"".concat(i<=t.rating),"aria-label":"star ".concat(i,"/").concat(s.length)},r("svg",{class:"svg-star",viewBox:"0 0 110 110",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"presentation"},r("path",{transform:"translate(13,13)",d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}),r("mask",{id:"mask-".concat(o,"-").concat(a),maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"45",height:"85"},r("rect",{width:"45",height:"85",fill:"white"})),r("g",{class:"".concat(o<e?"half-star":""),transform:"translate(13,13)",mask:"url(#mask-".concat(o,"-").concat(a,")")},r("path",{d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}))))}))};t.prototype.setCSSVariables=function(){return{"--covet-star-size":"".concat(this.starSize,"px"),"--covet-star-space-stars":"".concat(this.spaceStars,"px"),"--covet-star-space-stars-text":"".concat(this.spaceStarsText,"px"),"--covet-star-color":"".concat(this.starColor),"--covet-empty-star-color":"".concat(this.emptyStarColor),"--covet-star-border-color":"".concat(this.starBorderColor),"--covet-star-border-width":"".concat(this.starBorderWidth)}};t.prototype.roundRating=function(){if(isNaN(this.rating))return null;if(this.rating>5)return 5;var t="".concat(this.rating);if(t.indexOf(".")!==-1){t=t.slice(0,t.indexOf(".")+3)}return parseFloat(t)};t.prototype.convertedLabel=function(){var t=this.label.replaceAll("%RATING%","".concat(this.roundRating()));t=t.replaceAll("%COUNT%","".concat(this.ratingCount));return t};t.prototype.render=function(){return r(e,{key:"52b31268f8ecc7bd1c4a07603ed1ba06d0a2ac77",style:this.setCSSVariables(),role:"radiogroup","aria-label":"star rating"},this.renderStarRating(),this.showLabel&&r("span",{key:"e3e5c728b660ac44c7ad63c17ad36e05592799a7",class:"star-rating-count"},this.convertedLabel()))};Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());c.style=n}}}));
5
+ //# sourceMappingURL=p-2e286cc7.system.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["covetPicsStarRatingCss","CovetPicsStarRatingStyle0","CovetPicsStarRating","exports","class_1","prototype","renderStarRating","_this","this","starsArray","halfStar","Math","round","roundRating","maskId","getRandomId","map","el","index","h","class","concat","role","rating","length","viewBox","fill","xmlns","transform","d","id","maskUnits","x","y","width","height","mask","setCSSVariables","starSize","spaceStars","spaceStarsText","starColor","emptyStarColor","starBorderColor","starBorderWidth","isNaN","number","indexOf","slice","parseFloat","convertedLabel","lebelUpdated","label","replaceAll","ratingCount","render","Host","key","style","showLabel"],"sources":["src/components/covet-pics-star-rating/covet-pics-star-rating.scss?tag=covet-pics-star-rating&encapsulation=shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-star-size);\r\n height: var(--covet-star-size);\r\n margin-right: var(--covet-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-empty-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n })\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-star-size\": `${this.starSize}px`,\r\n \"--covet-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-star-color\": `${this.starColor}`,\r\n \"--covet-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"mappings":";;;wMAAA,IAAMA,EAAyB,g5BAC/B,IAAAC,EAAeD,E,ICQFE,EAAmBC,EAAA,oC,+DAWF,E,eAKA,U,oBAKK,U,qBAKC,U,qBAKA,E,cAKP,G,gBAKE,E,oBAKI,E,eAKJ,K,WAML,Y,CAEhBC,EAAAC,UAAAC,iBAAA,eAAAC,EAAAC,KACN,IAAMC,EAAa,CAAC,EAAG,EAAG,EAAG,EAAG,GAChC,IAAMC,EAAWC,KAAKC,MAAMJ,KAAKK,eACjC,IAAMC,EAASC,IACf,OACEN,EAAWO,KAAI,SAACC,EAAGC,GACjB,OAAAC,EAAA,QAAMC,MAAO,aAAAC,OAAaJ,GAAMV,EAAKM,cAAgB,SAAW,IAAMS,KAAK,QAAO,eAAe,GAAAD,OAAGJ,GAAMV,EAAKgB,QAAQ,aAAc,QAAAF,OAAQJ,EAAE,KAAAI,OAAIZ,EAAWe,SAC5JL,EAAA,OAAKC,MAAM,WAAWK,QAAQ,cAAcC,KAAK,OAAOC,MAAM,6BAA4B,cAAa,OAAOL,KAAK,gBACjHH,EAAA,QAAMS,UAAU,mBAAmBC,EAAE,opBACrCV,EAAA,QAAMW,GAAI,QAAAT,OAAQH,EAAK,KAAAG,OAAIP,GAAUiB,UAAU,iBAAiBC,EAAE,IAAIC,EAAE,IAAIC,MAAM,KAAKC,OAA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AAK0C,kB,uHAhHjC,I"}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Copyright by Space Squirrel Ltd.
3
+ */
4
+ import{r as t,h as s,H as r,g as e}from"./p-12084d8d.js";import{i as a}from"./p-c1de5870.js";const i=":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-star-size);height:var(--covet-star-size);margin-right:var(--covet-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-empty-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .half-star path{fill:var(--covet-star-color)}";const o=i;const c=class{constructor(s){t(this,s);this.rating=undefined;this.ratingCount=0;this.starColor="#fec500";this.emptyStarColor="#e5e5e5";this.starBorderColor="#000000";this.starBorderWidth=0;this.starSize=20;this.spaceStars=0;this.spaceStarsText=0;this.showLabel=true;this.label="(%RATING%)"}renderStarRating(){const t=[1,2,3,4,5];const r=Math.round(this.roundRating());const e=a();return t.map(((a,i)=>s("span",{class:`icon-star ${a<=this.roundRating()?"active":""}`,role:"radio","aria-checked":`${a<=this.rating}`,"aria-label":`star ${a}/${t.length}`},s("svg",{class:"svg-star",viewBox:"0 0 110 110",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"presentation"},s("path",{transform:"translate(13,13)",d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}),s("mask",{id:`mask-${i}-${e}`,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"45",height:"85"},s("rect",{width:"45",height:"85",fill:"white"})),s("g",{class:`${i<r?"half-star":""}`,transform:"translate(13,13)",mask:`url(#mask-${i}-${e})`},s("path",{d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}))))))}setCSSVariables(){return{"--covet-star-size":`${this.starSize}px`,"--covet-star-space-stars":`${this.spaceStars}px`,"--covet-star-space-stars-text":`${this.spaceStarsText}px`,"--covet-star-color":`${this.starColor}`,"--covet-empty-star-color":`${this.emptyStarColor}`,"--covet-star-border-color":`${this.starBorderColor}`,"--covet-star-border-width":`${this.starBorderWidth}`}}roundRating(){if(isNaN(this.rating))return null;if(this.rating>5)return 5;let t=`${this.rating}`;if(t.indexOf(".")!==-1){t=t.slice(0,t.indexOf(".")+3)}return parseFloat(t)}convertedLabel(){let t=this.label.replaceAll("%RATING%",`${this.roundRating()}`);t=t.replaceAll("%COUNT%",`${this.ratingCount}`);return t}render(){return s(r,{key:"52b31268f8ecc7bd1c4a07603ed1ba06d0a2ac77",style:this.setCSSVariables(),role:"radiogroup","aria-label":"star rating"},this.renderStarRating(),this.showLabel&&s("span",{key:"e3e5c728b660ac44c7ad63c17ad36e05592799a7",class:"star-rating-count"},this.convertedLabel()))}get el(){return e(this)}};c.style=o;export{c as covet_pics_star_rating};
5
+ //# sourceMappingURL=p-66409a38.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["covetPicsStarRatingCss","CovetPicsStarRatingStyle0","CovetPicsStarRating","renderStarRating","starsArray","halfStar","Math","round","this","roundRating","maskId","getRandomId","map","el","index","h","class","role","rating","length","viewBox","fill","xmlns","transform","d","id","maskUnits","x","y","width","height","mask","setCSSVariables","starSize","spaceStars","spaceStarsText","starColor","emptyStarColor","starBorderColor","starBorderWidth","isNaN","number","indexOf","slice","parseFloat","convertedLabel","lebelUpdated","label","replaceAll","ratingCount","render","Host","key","style","showLabel"],"sources":["src/components/covet-pics-star-rating/covet-pics-star-rating.scss?tag=covet-pics-star-rating&encapsulation=shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-star-size);\r\n height: var(--covet-star-size);\r\n margin-right: var(--covet-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-empty-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n })\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-star-size\": `${this.starSize}px`,\r\n \"--covet-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-star-color\": `${this.starColor}`,\r\n \"--covet-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"mappings":";;;6FAAA,MAAMA,EAAyB,g5BAC/B,MAAAC,EAAeD,E,MCQFE,EAAmB,M,gEAWF,E,eAKA,U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,QAAQ,QAAU,EAAG,CAC9BD,EAASA,EAAOE,MAAM,EAAGF,EAAOC,QAAQ,KAAO,E,CAEjD,OAAOE,WAAWH,E,CAGZ,cAAAI,GACN,IAAIC,EAAetC,KAAKuC,MAAMC,WAAW,WAAY,GAAGxC,KAAKC,iBAC7DqC,EAAeA,EAAaE,WAAW,UAAW,GAAGxC,KAAKyC,eAC1D,OAAOH,C,CAGT,MAAAI,GACE,OACEnC,EAACoC,EAAI,CAAAC,IAAA,2CAACC,MAAO7C,KAAKwB,kBAAmBf,KAAK,aAAY,aAAY,eAC/DT,KAAKL,mBACLK,KAAK8C,WAAavC,EAAA,QAAAqC,IAAA,2CAAMpC,MAAM,qBAAqBR,KAAKqC,kB"}
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,i,r){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function s(e){try{d(r.next(e))}catch(e){a(e)}}function n(e){try{d(r["throw"](e))}catch(e){a(e)}}function d(e){e.done?i(e.value):o(e.value).then(s,n)}d((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return d([e,t])}}function d(n){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(i=0)),i)try{if(r=1,o&&(a=n[0]&2?o["return"]:n[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;if(o=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;o=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){i.label=n[1];break}if(n[0]===6&&i.label<a[1]){i.label=a[1];a=n;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(n);break}if(a[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];o=0}finally{r=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Copyright by Space Squirrel Ltd.
4
- */System.register(["./p-c95a507d.system.js","./p-67c6fa2f.system.js"],(function(e,t){"use strict";var i,r,o;return{setters:[function(t){i=t.p;r=t.b;e("setNonce",t.s)},function(e){o=e.g}],execute:function(){var e=this;var a=function(){var e=t.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return i(r)};a().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,o()];case 1:e.sent();return[2,r([["p-efe2be12.system",[[0,"covet-pics-highlighted-page",{thumbnailUrl:[1,"thumbnail-url"],thumbnailAlt:[1,"thumbnail-alt"],ariaLabel:[1,"aria-label"],thumbnailLayout:[1,"thumbnail-layout"],videoUrl:[1,"video-url"],videoPoster:[1,"video-poster"],thumbnailCarouselImages:[16],productLinks:[16],productBaseImgAlt:[1,"product-base-img-alt"],reverseClass:[1,"reverse-class"],isMobile:[4,"is-mobile"],pageIndex:[2,"page-index"],caption:[1],rating:[2],createdTime:[1,"created-time"],userName:[1,"user-name"],mainSliderIndex:[2,"main-slider-index"],pageId:[2,"page-id"],appStore:[16],hideHotspots:[32],activeProductIndex:[32],hoverHotspot:[32]},[[0,"changeActiveHotspot","onChangeActiveHotspot"]]],[0,"covet-pics-highlighted-hotspots",{links:[16],activeHotspot:[2,"active-hotspot"],thumbnailUrl:[1,"thumbnail-url"],hoverHotspot:[2,"hover-hotspot"],isMobile:[4,"is-mobile"],productBaseImgAlt:[1,"product-base-img-alt"],pageId:[2,"page-id"],appStore:[16]},null,{thumbnailUrl:["refreshHotspot"],activeHotspot:["activeHotspotHandler"]}]]],["p-32f6f7e0.system",[[0,"covet-pics-crop-text",{text:[1],textClass:[1,"text-class"],textColor:[1,"text-color"],ratio:[16],cropCSS:[32]}]]],["p-c039f946.system",[[1,"covet-pics-star-rating",{rating:[2],ratingCount:[2,"rating-count"],starColor:[1,"star-color"],emptyStarColor:[1,"empty-star-color"],starBorderColor:[1,"star-border-color"],starBorderWidth:[2,"star-border-width"],starSize:[2,"star-size"],spaceStars:[2,"space-stars"],spaceStarsText:[2,"space-stars-text"],showLabel:[4,"show-label"],label:[1]}]]],["p-6212f7ae.system",[[1,"covet-pics-direct-buy",{product:[8],moneyFormat:[1,"money-format"],appStore:[16],selectedOptions:[32],settings:[32]}],[0,"covet-pics-hotspots",{links:[16],backgroundColor:[1,"background-color"],textColor:[1,"text-color"],showNumbers:[4,"show-numbers"]},[[0,"linkInactivate","linkInactivateHandler"],[0,"linkActivate","linkActivateHandler"]]],[0,"covet-pics-popup-links",{links:[16],greyBorderClass:[1,"grey-border-class"],itemCreatedTime:[1,"item-created-time"],appStore:[16],settings:[32]}],[0,"covet-pics-popup-review",{rating:[2],caption:[1],username:[1],itemType:[1,"item-type"],verified:[4],createdTime:[1,"created-time"],reviewCSS:[32]},null,{caption:["watchPropHandler"]}],[0,"covet-pics-popup-shared-links",{item:[16],galleryEmbedId:[2,"gallery-embed-id"],showShareLink:[32],copyLinkCopied:[32]}],[0,"covet-pics-popup-slider",{item:[16],getSwiperState:[64]}]]],["p-30f32dbd.system",[[0,"covet-pics-gallery-header",{rating:[2],productTitle:[1,"product-title"],breakdown:[16],appStore:[16],showBreakdownDropdown:[32],showSortDropdown:[32],isDesktopScreen:[32]}],[1,"covet-pics-popup",{appStore:[16],item:[32],product:[32],directBuyIsOpen:[32],popupTabIndex:[32],settings:[32],isPreviousEnable:[32],openPopup:[64],closePopup:[64]},[[4,"addToCart:covetPics","addToCartHandler"],[16,"productLinkClicked","productLinkClickedHandler"]],{item:["itemChangedHandler"]}],[0,"covet-pics-gallery-item",{altTag:[1,"alt-tag"],highlighted:[4],imageUrl:[1,"image-url"],rating:[2],itemWidth:[2,"item-width"],userName:[1,"user-name"],createdTime:[1,"created-time"],caption:[1],itemType:[1,"item-type"],imageHighResolutionUrl:[1,"image-high-resolution-url"],imageResponsiveSizes:[1,"image-responsive-sizes"],itemId:[1,"item-id"],itemSource:[1,"item-source"],links:[16],url:[1],videoUrl:[1,"video-url"],itemIndex:[2,"item-index"],itemSize:[1,"item-size"],appStore:[16],tabIndex:[32],sliderIndex:[32],showImageAsVideoPoster:[32]},[[10,"updateUploadWidgetCover","updateUploadWidgetCoverHandler"]],{sliderIndex:["autoPlayVideos"]}],[0,"covet-pics-gallery-item-detail",{altTag:[1,"alt-tag"],highlighted:[4],verified:[4],imageUrl:[1,"image-url"],imageHighResolutionUrl:[1,"image-high-resolution-url"],imageResponsiveSizes:[1,"image-responsive-sizes"],videoUrl:[1,"video-url"],itemId:[1,"item-id"],itemSource:[1,"item-source"],itemType:[1,"item-type"],links:[16],url:[1],rating:[2],userName:[1,"user-name"],caption:[1],createdTime:[1,"created-time"],itemIndex:[2,"item-index"],itemSize:[1,"item-size"],appStore:[16],tabIndex:[32],captionCSS:[32],reviewClass:[32],starOnlyClass:[32],highlightedClass:[32],sliderIndex:[32],showImageAsVideoPoster:[32]},[[10,"updateUploadWidgetCover","updateUploadWidgetCoverHandler"],[8,"elementResize","elementResizeHandler"]],{sliderIndex:["autoPlayVideos"]}],[1,"covet-pics-upload",{standalone:[4],appStore:[16],starRating:[32],isFormValid:[32],showFormWarning:[32],thumbnailLinks:[32],toShowLinks:[32],dropedImagesNumber:[32],isAnimating:[32],notificationMessage:[32],isNotificationActive:[32],widgetWidth:[32],uploadTabIndex:[32],openUpload:[64]}]]],["p-8772d5b0.system",[[0,"covet-pics-gallery-grid",{items:[16],breakdown:[16],productTitle:[1,"product-title"],rating:[2],filtersEnabled:[4,"filters-enabled"],filters:[16],showLoadMore:[4,"show-load-more"],appStore:[16],sharedItemId:[1,"shared-item-id"],isLoading:[32],showSort:[32],isGridDisabled:[32],isDesktopScreen:[32],itemSize:[32]},[[0,"imageLoaded","imagesLoadedHandler"],[0,"itemClicked","itemClickedHandler"],[8,"previousPopupEvent","prevPopupHandler"],[8,"nextPopupEvent","nextPopupHandler"],[8,"elementResize","elementResizeHandler"]],{items:["itemsChangeHandler"]}],[0,"covet-pics-gallery-slider",{items:[16],sharedItemId:[1,"shared-item-id"],sliderStyle:[1,"slider-style"],appStore:[16],itemSize:[32]},[[0,"imageLoaded","imagesLoadedHandler"],[0,"itemClicked","itemClickedHandler"],[8,"previousPopupEvent","prevPopupHandler"],[8,"nextPopupEvent","nextPopupHandler"],[8,"elementResize","elementResizeHandler"]],{items:["itemsChangeHandler"]}],[0,"covet-pics-highlighted",{numberOfPages:[2,"number-of-pages"],items:[16],appStore:[16],productLinks:[32],mainSliderIndex:[32],mainSliderAnimatingSlides:[32],windowHeight:[32],isDesktopScreen:[32]}]]],["p-0f82ac6d.system",[[1,"covet-pics-widget",{shop:[1],galleryEmbedId:[2,"gallery-embed-id"],shopifyProductId:[2,"shopify-product-id"],environment:[1],customSettings:[1,"custom-settings"],hideElements:[1,"hide-elements"],previewMode:[4,"preview-mode"],photoRequestId:[2,"photo-request-id"],isLoading:[32],minNumberOfPhotos:[32],items:[32],appStore:[32],fetchingError:[32],updateUploadWidgetCoverPreview:[64],updatePreviewSettings:[64]},[[0,"sortUpdated","sortUpdatedHandler"],[0,"filtersUpdated","filtersUpdatedHandler"],[0,"nextPage","nextPageHandler"]]]]],["p-f929bd16.system",[[0,"covet-pics-gallery-item-caption",{caption:[1],captionClass:[1,"caption-class"],itemStyle:[1,"item-style"],layoutType:[1,"layout-type"],reviewCSS:[32]},[[16,"sliderInit:covetPics","initSize"],[16,"sliderUpdate:covetPics","updateSize"]]]]]],t)]}}))}))}))}}}));
4
+ */System.register(["./p-c95a507d.system.js","./p-67c6fa2f.system.js"],(function(e,t){"use strict";var i,r,o;return{setters:[function(t){i=t.p;r=t.b;e("setNonce",t.s)},function(e){o=e.g}],execute:function(){var e=this;var a=function(){var e=t.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return i(r)};a().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,o()];case 1:e.sent();return[2,r([["p-efe2be12.system",[[0,"covet-pics-highlighted-page",{thumbnailUrl:[1,"thumbnail-url"],thumbnailAlt:[1,"thumbnail-alt"],ariaLabel:[1,"aria-label"],thumbnailLayout:[1,"thumbnail-layout"],videoUrl:[1,"video-url"],videoPoster:[1,"video-poster"],thumbnailCarouselImages:[16],productLinks:[16],productBaseImgAlt:[1,"product-base-img-alt"],reverseClass:[1,"reverse-class"],isMobile:[4,"is-mobile"],pageIndex:[2,"page-index"],caption:[1],rating:[2],createdTime:[1,"created-time"],userName:[1,"user-name"],mainSliderIndex:[2,"main-slider-index"],pageId:[2,"page-id"],appStore:[16],hideHotspots:[32],activeProductIndex:[32],hoverHotspot:[32]},[[0,"changeActiveHotspot","onChangeActiveHotspot"]]],[0,"covet-pics-highlighted-hotspots",{links:[16],activeHotspot:[2,"active-hotspot"],thumbnailUrl:[1,"thumbnail-url"],hoverHotspot:[2,"hover-hotspot"],isMobile:[4,"is-mobile"],productBaseImgAlt:[1,"product-base-img-alt"],pageId:[2,"page-id"],appStore:[16]},null,{thumbnailUrl:["refreshHotspot"],activeHotspot:["activeHotspotHandler"]}]]],["p-32f6f7e0.system",[[0,"covet-pics-crop-text",{text:[1],textClass:[1,"text-class"],textColor:[1,"text-color"],ratio:[16],cropCSS:[32]}]]],["p-2e286cc7.system",[[1,"covet-pics-star-rating",{rating:[2],ratingCount:[2,"rating-count"],starColor:[1,"star-color"],emptyStarColor:[1,"empty-star-color"],starBorderColor:[1,"star-border-color"],starBorderWidth:[2,"star-border-width"],starSize:[2,"star-size"],spaceStars:[2,"space-stars"],spaceStarsText:[2,"space-stars-text"],showLabel:[4,"show-label"],label:[1]}]]],["p-6212f7ae.system",[[1,"covet-pics-direct-buy",{product:[8],moneyFormat:[1,"money-format"],appStore:[16],selectedOptions:[32],settings:[32]}],[0,"covet-pics-hotspots",{links:[16],backgroundColor:[1,"background-color"],textColor:[1,"text-color"],showNumbers:[4,"show-numbers"]},[[0,"linkInactivate","linkInactivateHandler"],[0,"linkActivate","linkActivateHandler"]]],[0,"covet-pics-popup-links",{links:[16],greyBorderClass:[1,"grey-border-class"],itemCreatedTime:[1,"item-created-time"],appStore:[16],settings:[32]}],[0,"covet-pics-popup-review",{rating:[2],caption:[1],username:[1],itemType:[1,"item-type"],verified:[4],createdTime:[1,"created-time"],reviewCSS:[32]},null,{caption:["watchPropHandler"]}],[0,"covet-pics-popup-shared-links",{item:[16],galleryEmbedId:[2,"gallery-embed-id"],showShareLink:[32],copyLinkCopied:[32]}],[0,"covet-pics-popup-slider",{item:[16],getSwiperState:[64]}]]],["p-30f32dbd.system",[[0,"covet-pics-gallery-header",{rating:[2],productTitle:[1,"product-title"],breakdown:[16],appStore:[16],showBreakdownDropdown:[32],showSortDropdown:[32],isDesktopScreen:[32]}],[1,"covet-pics-popup",{appStore:[16],item:[32],product:[32],directBuyIsOpen:[32],popupTabIndex:[32],settings:[32],isPreviousEnable:[32],openPopup:[64],closePopup:[64]},[[4,"addToCart:covetPics","addToCartHandler"],[16,"productLinkClicked","productLinkClickedHandler"]],{item:["itemChangedHandler"]}],[0,"covet-pics-gallery-item",{altTag:[1,"alt-tag"],highlighted:[4],imageUrl:[1,"image-url"],rating:[2],itemWidth:[2,"item-width"],userName:[1,"user-name"],createdTime:[1,"created-time"],caption:[1],itemType:[1,"item-type"],imageHighResolutionUrl:[1,"image-high-resolution-url"],imageResponsiveSizes:[1,"image-responsive-sizes"],itemId:[1,"item-id"],itemSource:[1,"item-source"],links:[16],url:[1],videoUrl:[1,"video-url"],itemIndex:[2,"item-index"],itemSize:[1,"item-size"],appStore:[16],tabIndex:[32],sliderIndex:[32],showImageAsVideoPoster:[32]},[[10,"updateUploadWidgetCover","updateUploadWidgetCoverHandler"]],{sliderIndex:["autoPlayVideos"]}],[0,"covet-pics-gallery-item-detail",{altTag:[1,"alt-tag"],highlighted:[4],verified:[4],imageUrl:[1,"image-url"],imageHighResolutionUrl:[1,"image-high-resolution-url"],imageResponsiveSizes:[1,"image-responsive-sizes"],videoUrl:[1,"video-url"],itemId:[1,"item-id"],itemSource:[1,"item-source"],itemType:[1,"item-type"],links:[16],url:[1],rating:[2],userName:[1,"user-name"],caption:[1],createdTime:[1,"created-time"],itemIndex:[2,"item-index"],itemSize:[1,"item-size"],appStore:[16],tabIndex:[32],captionCSS:[32],reviewClass:[32],starOnlyClass:[32],highlightedClass:[32],sliderIndex:[32],showImageAsVideoPoster:[32]},[[10,"updateUploadWidgetCover","updateUploadWidgetCoverHandler"],[8,"elementResize","elementResizeHandler"]],{sliderIndex:["autoPlayVideos"]}],[1,"covet-pics-upload",{standalone:[4],appStore:[16],starRating:[32],isFormValid:[32],showFormWarning:[32],thumbnailLinks:[32],toShowLinks:[32],dropedImagesNumber:[32],isAnimating:[32],notificationMessage:[32],isNotificationActive:[32],widgetWidth:[32],uploadTabIndex:[32],openUpload:[64]}]]],["p-8772d5b0.system",[[0,"covet-pics-gallery-grid",{items:[16],breakdown:[16],productTitle:[1,"product-title"],rating:[2],filtersEnabled:[4,"filters-enabled"],filters:[16],showLoadMore:[4,"show-load-more"],appStore:[16],sharedItemId:[1,"shared-item-id"],isLoading:[32],showSort:[32],isGridDisabled:[32],isDesktopScreen:[32],itemSize:[32]},[[0,"imageLoaded","imagesLoadedHandler"],[0,"itemClicked","itemClickedHandler"],[8,"previousPopupEvent","prevPopupHandler"],[8,"nextPopupEvent","nextPopupHandler"],[8,"elementResize","elementResizeHandler"]],{items:["itemsChangeHandler"]}],[0,"covet-pics-gallery-slider",{items:[16],sharedItemId:[1,"shared-item-id"],sliderStyle:[1,"slider-style"],appStore:[16],itemSize:[32]},[[0,"imageLoaded","imagesLoadedHandler"],[0,"itemClicked","itemClickedHandler"],[8,"previousPopupEvent","prevPopupHandler"],[8,"nextPopupEvent","nextPopupHandler"],[8,"elementResize","elementResizeHandler"]],{items:["itemsChangeHandler"]}],[0,"covet-pics-highlighted",{numberOfPages:[2,"number-of-pages"],items:[16],appStore:[16],productLinks:[32],mainSliderIndex:[32],mainSliderAnimatingSlides:[32],windowHeight:[32],isDesktopScreen:[32]}]]],["p-0f82ac6d.system",[[1,"covet-pics-widget",{shop:[1],galleryEmbedId:[2,"gallery-embed-id"],shopifyProductId:[2,"shopify-product-id"],environment:[1],customSettings:[1,"custom-settings"],hideElements:[1,"hide-elements"],previewMode:[4,"preview-mode"],photoRequestId:[2,"photo-request-id"],isLoading:[32],minNumberOfPhotos:[32],items:[32],appStore:[32],fetchingError:[32],updateUploadWidgetCoverPreview:[64],updatePreviewSettings:[64]},[[0,"sortUpdated","sortUpdatedHandler"],[0,"filtersUpdated","filtersUpdatedHandler"],[0,"nextPage","nextPageHandler"]]]]],["p-f929bd16.system",[[0,"covet-pics-gallery-item-caption",{caption:[1],captionClass:[1,"caption-class"],itemStyle:[1,"item-style"],layoutType:[1,"layout-type"],reviewCSS:[32]},[[16,"sliderInit:covetPics","initSize"],[16,"sliderUpdate:covetPics","updateSize"]]]]]],t)]}}))}))}))}}}));
5
5
  //# sourceMappingURL=p-7884e86b.system.js.map
@@ -4,7 +4,7 @@
4
4
  import { r as registerInstance, h, H as Host, g as getElement } from './index-0e420d24.js';
5
5
  import { i as getRandomId } from './utils-01a65b8b.js';
6
6
 
7
- const covetPicsStarRatingCss = ":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-pics-star-size);height:var(--covet-pics-star-size);margin-right:var(--covet-pics-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-pics-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-pics-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-pics-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-pics-empty-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .half-star path{fill:var(--covet-pics-star-color)}";
7
+ const covetPicsStarRatingCss = ":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-star-size);height:var(--covet-star-size);margin-right:var(--covet-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-empty-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .half-star path{fill:var(--covet-star-color)}";
8
8
  const CovetPicsStarRatingStyle0 = covetPicsStarRatingCss;
9
9
 
10
10
  const CovetPicsStarRating = class {
@@ -30,13 +30,13 @@ const CovetPicsStarRating = class {
30
30
  }
31
31
  setCSSVariables() {
32
32
  return {
33
- "--covet-pics-star-size": `${this.starSize}px`,
34
- "--covet-pics-star-space-stars": `${this.spaceStars}px`,
35
- "--covet-pics-star-space-stars-text": `${this.spaceStarsText}px`,
36
- "--covet-pics-star-color": `${this.starColor}`,
37
- "--covet-pics-empty-star-color": `${this.emptyStarColor}`,
38
- "--covet-pics-star-border-color": `${this.starBorderColor}`,
39
- "--covet-pics-star-border-width": `${this.starBorderWidth}`
33
+ "--covet-star-size": `${this.starSize}px`,
34
+ "--covet-star-space-stars": `${this.spaceStars}px`,
35
+ "--covet-star-space-stars-text": `${this.spaceStarsText}px`,
36
+ "--covet-star-color": `${this.starColor}`,
37
+ "--covet-empty-star-color": `${this.emptyStarColor}`,
38
+ "--covet-star-border-color": `${this.starBorderColor}`,
39
+ "--covet-star-border-width": `${this.starBorderWidth}`
40
40
  };
41
41
  }
42
42
  roundRating() {
@@ -56,7 +56,7 @@ const CovetPicsStarRating = class {
56
56
  return lebelUpdated;
57
57
  }
58
58
  render() {
59
- return (h(Host, { key: '29d77720ea0145a30d6adab9aa67f285485ad512', style: this.setCSSVariables(), role: "radiogroup", "aria-label": "star rating" }, this.renderStarRating(), this.showLabel && h("span", { key: '9d938e07b44611f0d104a9a3747a0ca74f186ef9', class: "star-rating-count" }, this.convertedLabel())));
59
+ return (h(Host, { key: '52b31268f8ecc7bd1c4a07603ed1ba06d0a2ac77', style: this.setCSSVariables(), role: "radiogroup", "aria-label": "star rating" }, this.renderStarRating(), this.showLabel && h("span", { key: 'e3e5c728b660ac44c7ad63c17ad36e05592799a7', class: "star-rating-count" }, this.convertedLabel())));
60
60
  }
61
61
  get el() { return getElement(this); }
62
62
  };
@@ -1 +1 @@
1
- {"file":"covet-pics-star-rating.entry.js","mappings":";;;;;;AAAA,MAAM,sBAAsB,GAAG,28BAA28B,CAAC;AAC3+B,kCAAe,sBAAsB;;MCQxB,mBAAmB;;;;2BAWF,CAAC;yBAKD,SAAS;8BAKJ,SAAS;+BAKR,SAAS;+BAKT,CAAC;wBAKR,EAAE;0BAKA,CAAC;8BAKG,CAAC;yBAKL,IAAI;qBAMT,YAAY;;IAE5B,gBAAgB;QACtB,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAChD,MAAM,M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shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-pics-star-size);\r\n height: var(--covet-pics-star-size);\r\n margin-right: var(--covet-pics-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-pics-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-pics-empty-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n})\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-pics-star-size\": `${this.starSize}px`,\r\n \"--covet-pics-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-pics-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-pics-star-color\": `${this.starColor}`,\r\n \"--covet-pics-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-pics-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-pics-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"version":3}
1
+ {"file":"covet-pics-star-rating.entry.js","mappings":";;;;;;AAAA,MAAM,sBAAsB,GAAG,+4BAA+4B,CAAC;AAC/6B,kCAAe,sBAAsB;;MCQxB,mBAAmB;;;;2BAWF,CAAC;yBAKD,SAAS;8BAKJ,SAAS;+BAKR,SAAS;+BAKT,CAAC;wBAKR,EAAE;0BAKA,CAAC;8BAKG,CAAC;yBAKL,IAAI;qBAMT,YAAY;;IAE5B,gBAAgB;QACtB,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,WAAW,EAAE,CAAC;QAC7B,QACE,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAC,KAAK,KACtB,YAAM,KAAK,EAAE,aAAa,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,GAAG,QAAQ,GAAG,EAAE,EAAE,EAAE,IAAI,EAAC,OAAO,kBAAe,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,gBAAc,QAAQ,EAAE,IAAI,UAAU,CAAC,MAAM,EAAE,IACpK,WAAK,KAAK,EAAC,UAAU,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAA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M,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC9B,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,GAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;SACpD;QACD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;KAC3B;IAEO,cAAc;QACpB,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC9E,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QACzE,OAAO,YAAY,CAAC;KACrB;IAED,MAAM;QACJ,QACE,EAAC,IAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAC,YAAY,gBAAY,aAAa,IAC5E,IAAI,CAAC,gBAAgB,EAAE,EACvB,IAAI,CAAC,SAAS,IAAI,6DAAM,KAAK,EAAC,mBAAmB,IAAE,IAAI,CAAC,cAAc,EAAE,CAAQ,CAC5E,EACP;KACH;;;;;;;","names":[],"sources":["src/components/covet-pics-star-rating/covet-pics-star-rating.scss?tag=covet-pics-star-rating&encapsulation=shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-star-size);\r\n height: var(--covet-star-size);\r\n margin-right: var(--covet-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-empty-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n })\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-star-size\": `${this.starSize}px`,\r\n \"--covet-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-star-color\": `${this.starColor}`,\r\n \"--covet-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Copyright by Space Squirrel Ltd.
3
3
  */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-0e420d24.js";import{i as getRandomId}from"./utils-01a65b8b.js";var covetPicsStarRatingCss=":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-pics-star-size);height:var(--covet-pics-star-size);margin-right:var(--covet-pics-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-pics-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-pics-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-pics-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-pics-empty-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .half-star path{fill:var(--covet-pics-star-color)}";var CovetPicsStarRatingStyle0=covetPicsStarRatingCss;var CovetPicsStarRating=function(){function t(t){registerInstance(this,t);this.rating=undefined;this.ratingCount=0;this.starColor="#fec500";this.emptyStarColor="#e5e5e5";this.starBorderColor="#000000";this.starBorderWidth=0;this.starSize=20;this.spaceStars=0;this.spaceStarsText=0;this.showLabel=true;this.label="(%RATING%)"}t.prototype.renderStarRating=function(){var t=this;var s=[1,2,3,4,5];var r=Math.round(this.roundRating());var a=getRandomId();return s.map((function(i,e){return h("span",{class:"icon-star ".concat(i<=t.roundRating()?"active":""),role:"radio","aria-checked":"".concat(i<=t.rating),"aria-label":"star ".concat(i,"/").concat(s.length)},h("svg",{class:"svg-star",viewBox:"0 0 110 110",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"presentation"},h("path",{transform:"translate(13,13)",d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}),h("mask",{id:"mask-".concat(e,"-").concat(a),maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"45",height:"85"},h("rect",{width:"45",height:"85",fill:"white"})),h("g",{class:"".concat(e<r?"half-star":""),transform:"translate(13,13)",mask:"url(#mask-".concat(e,"-").concat(a,")")},h("path",{d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}))))}))};t.prototype.setCSSVariables=function(){return{"--covet-pics-star-size":"".concat(this.starSize,"px"),"--covet-pics-star-space-stars":"".concat(this.spaceStars,"px"),"--covet-pics-star-space-stars-text":"".concat(this.spaceStarsText,"px"),"--covet-pics-star-color":"".concat(this.starColor),"--covet-pics-empty-star-color":"".concat(this.emptyStarColor),"--covet-pics-star-border-color":"".concat(this.starBorderColor),"--covet-pics-star-border-width":"".concat(this.starBorderWidth)}};t.prototype.roundRating=function(){if(isNaN(this.rating))return null;if(this.rating>5)return 5;var t="".concat(this.rating);if(t.indexOf(".")!==-1){t=t.slice(0,t.indexOf(".")+3)}return parseFloat(t)};t.prototype.convertedLabel=function(){var t=this.label.replaceAll("%RATING%","".concat(this.roundRating()));t=t.replaceAll("%COUNT%","".concat(this.ratingCount));return t};t.prototype.render=function(){return h(Host,{key:"29d77720ea0145a30d6adab9aa67f285485ad512",style:this.setCSSVariables(),role:"radiogroup","aria-label":"star rating"},this.renderStarRating(),this.showLabel&&h("span",{key:"9d938e07b44611f0d104a9a3747a0ca74f186ef9",class:"star-rating-count"},this.convertedLabel()))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CovetPicsStarRating.style=CovetPicsStarRatingStyle0;export{CovetPicsStarRating as covet_pics_star_rating};
4
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-0e420d24.js";import{i as getRandomId}from"./utils-01a65b8b.js";var covetPicsStarRatingCss=":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-star-size);height:var(--covet-star-size);margin-right:var(--covet-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-empty-star-color);stroke:var(--covet-star-border-color);stroke-width:var(--covet-star-border-width)}:host .half-star path{fill:var(--covet-star-color)}";var CovetPicsStarRatingStyle0=covetPicsStarRatingCss;var CovetPicsStarRating=function(){function t(t){registerInstance(this,t);this.rating=undefined;this.ratingCount=0;this.starColor="#fec500";this.emptyStarColor="#e5e5e5";this.starBorderColor="#000000";this.starBorderWidth=0;this.starSize=20;this.spaceStars=0;this.spaceStarsText=0;this.showLabel=true;this.label="(%RATING%)"}t.prototype.renderStarRating=function(){var t=this;var s=[1,2,3,4,5];var r=Math.round(this.roundRating());var a=getRandomId();return s.map((function(e,i){return h("span",{class:"icon-star ".concat(e<=t.roundRating()?"active":""),role:"radio","aria-checked":"".concat(e<=t.rating),"aria-label":"star ".concat(e,"/").concat(s.length)},h("svg",{class:"svg-star",viewBox:"0 0 110 110",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"presentation"},h("path",{transform:"translate(13,13)",d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}),h("mask",{id:"mask-".concat(i,"-").concat(a),maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"45",height:"85"},h("rect",{width:"45",height:"85",fill:"white"})),h("g",{class:"".concat(i<r?"half-star":""),transform:"translate(13,13)",mask:"url(#mask-".concat(i,"-").concat(a,")")},h("path",{d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}))))}))};t.prototype.setCSSVariables=function(){return{"--covet-star-size":"".concat(this.starSize,"px"),"--covet-star-space-stars":"".concat(this.spaceStars,"px"),"--covet-star-space-stars-text":"".concat(this.spaceStarsText,"px"),"--covet-star-color":"".concat(this.starColor),"--covet-empty-star-color":"".concat(this.emptyStarColor),"--covet-star-border-color":"".concat(this.starBorderColor),"--covet-star-border-width":"".concat(this.starBorderWidth)}};t.prototype.roundRating=function(){if(isNaN(this.rating))return null;if(this.rating>5)return 5;var t="".concat(this.rating);if(t.indexOf(".")!==-1){t=t.slice(0,t.indexOf(".")+3)}return parseFloat(t)};t.prototype.convertedLabel=function(){var t=this.label.replaceAll("%RATING%","".concat(this.roundRating()));t=t.replaceAll("%COUNT%","".concat(this.ratingCount));return t};t.prototype.render=function(){return h(Host,{key:"52b31268f8ecc7bd1c4a07603ed1ba06d0a2ac77",style:this.setCSSVariables(),role:"radiogroup","aria-label":"star rating"},this.renderStarRating(),this.showLabel&&h("span",{key:"e3e5c728b660ac44c7ad63c17ad36e05592799a7",class:"star-rating-count"},this.convertedLabel()))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CovetPicsStarRating.style=CovetPicsStarRatingStyle0;export{CovetPicsStarRating as covet_pics_star_rating};
5
5
  //# sourceMappingURL=covet-pics-star-rating.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["covetPicsStarRatingCss","CovetPicsStarRatingStyle0","CovetPicsStarRating","prototype","renderStarRating","_this","this","starsArray","halfStar","Math","round","roundRating","maskId","getRandomId","map","el","index","h","class","concat","role","rating","length","viewBox","fill","xmlns","transform","d","id","maskUnits","x","y","width","height","mask","setCSSVariables","starSize","spaceStars","spaceStarsText","starColor","emptyStarColor","starBorderColor","starBorderWidth","isNaN","number","indexOf","slice","parseFloat","convertedLabel","lebelUpdated","label","replaceAll","ratingCount","render","Host","key","style","showLabel"],"sources":["src/components/covet-pics-star-rating/covet-pics-star-rating.scss?tag=covet-pics-star-rating&encapsulation=shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-pics-star-size);\r\n height: var(--covet-pics-star-size);\r\n margin-right: var(--covet-pics-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-pics-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-pics-empty-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n})\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-pics-star-size\": `${this.starSize}px`,\r\n \"--covet-pics-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-pics-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-pics-star-color\": `${this.starColor}`,\r\n \"--covet-pics-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-pics-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-pics-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"mappings":";;;qIAAA,IAAMA,uBAAyB,48BAC/B,IAAAC,0BAAeD,uB,ICQFE,oBAAmB,W,8EAWF,E,eAKA,U,oBAKK,U,qBAKC,U,qBAKA,E,cAKP,G,gBAKE,E,oBAKI,E,eAKJ,K,WAML,Y,CAEhBA,EAAAC,UAAAC,iBAAA,eAAAC,EAAAC,KACN,IAAMC,EAAa,CAAC,EAAG,EAAG,EAAG,EAAG,GAChC,IAAMC,EAAWC,KAAKC,MAAMJ,KAAKK,eACjC,IAAMC,EAASC,cACf,OACEN,EAAWO,KAAI,SAACC,EAAGC,GACjB,OAAAC,EAAA,QAAMC,MAAO,aAAAC,OAAaJ,GAAMV,EAAKM,cAAgB,SAAW,IAAMS,KAAK,QAAO,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,eAAA,WACN,IAAIC,EAAe3C,KAAK4C,MAAMC,WAAW,WAAY,GAAAhC,OAAGb,KAAKK,gBAC7DsC,EAAeA,EAAaE,WAAW,UAAW,GAAAhC,OAAGb,KAAK8C,cAC1D,OAAOH,C,EAGT/C,EAAAC,UAAAkD,OAAA,WACE,OACEpC,EAACqC,KAAI,CAAAC,IAAA,2CAACC,MAAOlD,KAAK6B,kBAAmBf,KAAK,aAAY,aAAY,eAC/Dd,KAAKF,mBACLE,KAAKmD,WAAaxC,EAAA,QAAAsC,IAAA,2CAAMrC,MAAM,qBAAqBZ,KAAK0C,kB,gIAhHjC,G"}
1
+ {"version":3,"names":["covetPicsStarRatingCss","CovetPicsStarRatingStyle0","CovetPicsStarRating","prototype","renderStarRating","_this","this","starsArray","halfStar","Math","round","roundRating","maskId","getRandomId","map","el","index","h","class","concat","role","rating","length","viewBox","fill","xmlns","transform","d","id","maskUnits","x","y","width","height","mask","setCSSVariables","starSize","spaceStars","spaceStarsText","starColor","emptyStarColor","starBorderColor","starBorderWidth","isNaN","number","indexOf","slice","parseFloat","convertedLabel","lebelUpdated","label","replaceAll","ratingCount","render","Host","key","style","showLabel"],"sources":["src/components/covet-pics-star-rating/covet-pics-star-rating.scss?tag=covet-pics-star-rating&encapsulation=shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-star-size);\r\n height: var(--covet-star-size);\r\n margin-right: var(--covet-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-empty-star-color);\r\n stroke: var(--covet-star-border-color);\r\n stroke-width: var(--covet-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n })\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-star-size\": `${this.starSize}px`,\r\n \"--covet-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-star-color\": `${this.starColor}`,\r\n \"--covet-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"mappings":";;;qIAAA,IAAMA,uBAAyB,g5BAC/B,IAAAC,0BAAeD,uB,ICQFE,oBAAmB,W,8EAWF,E,eAKA,U,oBAKK,U,qBAKC,U,qBAKA,E,cAKP,G,gBAKE,E,oBAKI,E,eAKJ,K,WAML,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AC,UAAAQ,YAAA,WACN,GAAIgC,MAAMrC,KAAKe,QAAS,OAAO,KAC/B,GAAIf,KAAKe,OAAS,EAAG,OAAO,EAE5B,IAAIuB,EAAS,GAAAzB,OAAGb,KAAKe,QACrB,GAAIuB,EAAOC,QAAQ,QAAU,EAAG,CAC9BD,EAASA,EAAOE,MAAM,EAAGF,EAAOC,QAAQ,KAAO,E,CAEjD,OAAOE,WAAWH,E,EAGZ1C,EAAAC,UAAA6C,eAAA,WACN,IAAIC,EAAe3C,KAAK4C,MAAMC,WAAW,WAAY,GAAAhC,OAAGb,KAAKK,gBAC7DsC,EAAeA,EAAaE,WAAW,UAAW,GAAAhC,OAAGb,KAAK8C,cAC1D,OAAOH,C,EAGT/C,EAAAC,UAAAkD,OAAA,WACE,OACEpC,EAACqC,KAAI,CAAAC,IAAA,2CAACC,MAAOlD,KAAK6B,kBAAmBf,KAAK,aAAY,aAAY,eAC/Dd,KAAKF,mBACLE,KAAKmD,WAAaxC,EAAA,QAAAsC,IAAA,2CAAMrC,MAAM,qBAAqBZ,KAAK0C,kB,gIAhHjC,G"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covet-pics/covet-pics-widget",
3
- "version": "0.155.2",
3
+ "version": "0.155.3",
4
4
  "description": "Covet.pics Widget System",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,5 +0,0 @@
1
- /*!
2
- * Copyright by Space Squirrel Ltd.
3
- */
4
- import{r as t,h as s,H as r,g as a}from"./p-12084d8d.js";import{i as e}from"./p-c1de5870.js";const i=":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-pics-star-size);height:var(--covet-pics-star-size);margin-right:var(--covet-pics-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-pics-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-pics-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-pics-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-pics-empty-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .half-star path{fill:var(--covet-pics-star-color)}";const o=i;const c=class{constructor(s){t(this,s);this.rating=undefined;this.ratingCount=0;this.starColor="#fec500";this.emptyStarColor="#e5e5e5";this.starBorderColor="#000000";this.starBorderWidth=0;this.starSize=20;this.spaceStars=0;this.spaceStarsText=0;this.showLabel=true;this.label="(%RATING%)"}renderStarRating(){const t=[1,2,3,4,5];const r=Math.round(this.roundRating());const a=e();return t.map(((e,i)=>s("span",{class:`icon-star ${e<=this.roundRating()?"active":""}`,role:"radio","aria-checked":`${e<=this.rating}`,"aria-label":`star ${e}/${t.length}`},s("svg",{class:"svg-star",viewBox:"0 0 110 110",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"presentation"},s("path",{transform:"translate(13,13)",d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}),s("mask",{id:`mask-${i}-${a}`,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"45",height:"85"},s("rect",{width:"45",height:"85",fill:"white"})),s("g",{class:`${i<r?"half-star":""}`,transform:"translate(13,13)",mask:`url(#mask-${i}-${a})`},s("path",{d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}))))))}setCSSVariables(){return{"--covet-pics-star-size":`${this.starSize}px`,"--covet-pics-star-space-stars":`${this.spaceStars}px`,"--covet-pics-star-space-stars-text":`${this.spaceStarsText}px`,"--covet-pics-star-color":`${this.starColor}`,"--covet-pics-empty-star-color":`${this.emptyStarColor}`,"--covet-pics-star-border-color":`${this.starBorderColor}`,"--covet-pics-star-border-width":`${this.starBorderWidth}`}}roundRating(){if(isNaN(this.rating))return null;if(this.rating>5)return 5;let t=`${this.rating}`;if(t.indexOf(".")!==-1){t=t.slice(0,t.indexOf(".")+3)}return parseFloat(t)}convertedLabel(){let t=this.label.replaceAll("%RATING%",`${this.roundRating()}`);t=t.replaceAll("%COUNT%",`${this.ratingCount}`);return t}render(){return s(r,{key:"29d77720ea0145a30d6adab9aa67f285485ad512",style:this.setCSSVariables(),role:"radiogroup","aria-label":"star rating"},this.renderStarRating(),this.showLabel&&s("span",{key:"9d938e07b44611f0d104a9a3747a0ca74f186ef9",class:"star-rating-count"},this.convertedLabel()))}get el(){return a(this)}};c.style=o;export{c as covet_pics_star_rating};
5
- //# sourceMappingURL=p-400bcc16.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["covetPicsStarRatingCss","CovetPicsStarRatingStyle0","CovetPicsStarRating","renderStarRating","starsArray","halfStar","Math","round","this","roundRating","maskId","getRandomId","map","el","index","h","class","role","rating","length","viewBox","fill","xmlns","transform","d","id","maskUnits","x","y","width","height","mask","setCSSVariables","starSize","spaceStars","spaceStarsText","starColor","emptyStarColor","starBorderColor","starBorderWidth","isNaN","number","indexOf","slice","parseFloat","convertedLabel","lebelUpdated","label","replaceAll","ratingCount","render","Host","key","style","showLabel"],"sources":["src/components/covet-pics-star-rating/covet-pics-star-rating.scss?tag=covet-pics-star-rating&encapsulation=shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-pics-star-size);\r\n height: var(--covet-pics-star-size);\r\n margin-right: var(--covet-pics-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-pics-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-pics-empty-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n})\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-pics-star-size\": `${this.starSize}px`,\r\n \"--covet-pics-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-pics-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-pics-star-color\": `${this.starColor}`,\r\n \"--covet-pics-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-pics-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-pics-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"mappings":";;;6FAAA,MAAMA,EAAyB,48BAC/B,MAAAC,EAAeD,E,MCQFE,EAAmB,M,gEAWF,E,eAKA,U,oBAKK,U,qBAKC,U,qBAKA,E,cAKP,G,gBAKE,E,oBAKI,E,eAKJ,K,WAML,Y,CAEhB,gBAAAC,GACN,MAAMC,EAAa,CAAC,EAAG,EAAG,EAAG,EAAG,GAChC,MAAMC,EAAWC,KAAKC,MAAMC,KAAKC,eACjC,MAAMC,EAASC,IACf,OACEP,EAAWQ,KAAI,CAACC,EAAGC,IACjBC,EAAA,QAAMC,MAAO,aAAaH,GAA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AACoC,EAAI,CAAAC,IAAA,2CAACC,MAAO7C,KAAKwB,kBAAmBf,KAAK,aAAY,aAAY,eAC/DT,KAAKL,mBACLK,KAAK8C,WAAavC,EAAA,QAAAqC,IAAA,2CAAMpC,MAAM,qBAAqBR,KAAKqC,kB"}
@@ -1,5 +0,0 @@
1
- /*!
2
- * Copyright by Space Squirrel Ltd.
3
- */
4
- System.register(["./p-c95a507d.system.js","./p-f976b6df.system.js"],(function(t){"use strict";var s,r,i,a,e;return{setters:[function(t){s=t.r;r=t.h;i=t.H;a=t.g},function(t){e=t.i}],execute:function(){var o=":host{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.4}:host .icon-star{-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:var(--covet-pics-star-size);height:var(--covet-pics-star-size);margin-right:var(--covet-pics-star-space-stars)}:host .icon-star:nth-of-type(5){margin-right:var(--covet-pics-star-space-stars-text)}:host .icon-star.active .svg-star path{fill:var(--covet-pics-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .icon-star.active .half-star path{fill:var(--covet-pics-star-color)}:host .svg-star{width:100%;height:100%}:host .svg-star path{fill:var(--covet-pics-empty-star-color);stroke:var(--covet-pics-star-border-color);stroke-width:var(--covet-pics-star-border-width)}:host .half-star path{fill:var(--covet-pics-star-color)}";var c=o;var n=t("covet_pics_star_rating",function(){function t(t){s(this,t);this.rating=undefined;this.ratingCount=0;this.starColor="#fec500";this.emptyStarColor="#e5e5e5";this.starBorderColor="#000000";this.starBorderWidth=0;this.starSize=20;this.spaceStars=0;this.spaceStarsText=0;this.showLabel=true;this.label="(%RATING%)"}t.prototype.renderStarRating=function(){var t=this;var s=[1,2,3,4,5];var i=Math.round(this.roundRating());var a=e();return s.map((function(e,o){return r("span",{class:"icon-star ".concat(e<=t.roundRating()?"active":""),role:"radio","aria-checked":"".concat(e<=t.rating),"aria-label":"star ".concat(e,"/").concat(s.length)},r("svg",{class:"svg-star",viewBox:"0 0 110 110",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"presentation"},r("path",{transform:"translate(13,13)",d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}),r("mask",{id:"mask-".concat(o,"-").concat(a),maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"45",height:"85"},r("rect",{width:"45",height:"85",fill:"white"})),r("g",{class:"".concat(o<i?"half-star":""),transform:"translate(13,13)",mask:"url(#mask-".concat(o,"-").concat(a,")")},r("path",{d:"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z"}))))}))};t.prototype.setCSSVariables=function(){return{"--covet-pics-star-size":"".concat(this.starSize,"px"),"--covet-pics-star-space-stars":"".concat(this.spaceStars,"px"),"--covet-pics-star-space-stars-text":"".concat(this.spaceStarsText,"px"),"--covet-pics-star-color":"".concat(this.starColor),"--covet-pics-empty-star-color":"".concat(this.emptyStarColor),"--covet-pics-star-border-color":"".concat(this.starBorderColor),"--covet-pics-star-border-width":"".concat(this.starBorderWidth)}};t.prototype.roundRating=function(){if(isNaN(this.rating))return null;if(this.rating>5)return 5;var t="".concat(this.rating);if(t.indexOf(".")!==-1){t=t.slice(0,t.indexOf(".")+3)}return parseFloat(t)};t.prototype.convertedLabel=function(){var t=this.label.replaceAll("%RATING%","".concat(this.roundRating()));t=t.replaceAll("%COUNT%","".concat(this.ratingCount));return t};t.prototype.render=function(){return r(i,{key:"29d77720ea0145a30d6adab9aa67f285485ad512",style:this.setCSSVariables(),role:"radiogroup","aria-label":"star rating"},this.renderStarRating(),this.showLabel&&r("span",{key:"9d938e07b44611f0d104a9a3747a0ca74f186ef9",class:"star-rating-count"},this.convertedLabel()))};Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());n.style=c}}}));
5
- //# sourceMappingURL=p-c039f946.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["covetPicsStarRatingCss","CovetPicsStarRatingStyle0","CovetPicsStarRating","exports","class_1","prototype","renderStarRating","_this","this","starsArray","halfStar","Math","round","roundRating","maskId","getRandomId","map","el","index","h","class","concat","role","rating","length","viewBox","fill","xmlns","transform","d","id","maskUnits","x","y","width","height","mask","setCSSVariables","starSize","spaceStars","spaceStarsText","starColor","emptyStarColor","starBorderColor","starBorderWidth","isNaN","number","indexOf","slice","parseFloat","convertedLabel","lebelUpdated","label","replaceAll","ratingCount","render","Host","key","style","showLabel"],"sources":["src/components/covet-pics-star-rating/covet-pics-star-rating.scss?tag=covet-pics-star-rating&encapsulation=shadow","src/components/covet-pics-star-rating/covet-pics-star-rating.tsx"],"sourcesContent":["\r\n:host {\r\n display: inline-flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n line-height: 1.4;\r\n\r\n .icon-star {\r\n flex: none;\r\n display: flex;\r\n justify-content: center;\r\n width: var(--covet-pics-star-size);\r\n height: var(--covet-pics-star-size);\r\n margin-right: var(--covet-pics-star-space-stars);\r\n &:nth-of-type(5) { // TODO check this selector\r\n margin-right: var(--covet-pics-star-space-stars-text);\r\n } \r\n \r\n &.active {\r\n .svg-star\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width);\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n } \r\n }\r\n }\r\n\r\n .svg-star {\r\n width: 100%;\r\n height: 100%;\r\n path {\r\n fill: var(--covet-pics-empty-star-color);\r\n stroke: var(--covet-pics-star-border-color);\r\n stroke-width: var(--covet-pics-star-border-width)\r\n }\r\n }\r\n .half-star {\r\n path {\r\n fill: var(--covet-pics-star-color);\r\n }\r\n }\r\n\r\n}\r\n","import { Component, Element, Prop, h, Host } from \"@stencil/core\";\r\nimport { getRandomId } from \"../../utils/utils\";\r\n\r\n@Component({\r\n tag: \"covet-pics-star-rating\",\r\n styleUrl: \"covet-pics-star-rating.scss\",\r\n shadow: true\r\n})\r\n\r\nexport class CovetPicsStarRating {\r\n @Element() el: HTMLCovetPicsStarRatingElement;\r\n\r\n /**\r\n * Rating (float from 1-5)\r\n */\r\n @Prop() rating: number;\r\n\r\n /**\r\n * Rating count\r\n */\r\n @Prop() ratingCount: number=0;\r\n\r\n /**\r\n * Color of star\r\n */\r\n @Prop() starColor: string = \"#fec500\";\r\n\r\n /**\r\n * Color of empty star\r\n */\r\n @Prop() emptyStarColor: string = \"#e5e5e5\";\r\n\r\n /**\r\n * Color of star border\r\n */\r\n @Prop() starBorderColor: string = \"#000000\";\r\n\r\n /**\r\n * Width of star border\r\n */\r\n @Prop() starBorderWidth: number = 0;\r\n\r\n /**\r\n * Width/height of star in px.\r\n */\r\n @Prop() starSize: number = 20;\r\n \r\n /**\r\n * Space (margin) above in px\r\n */\r\n @Prop() spaceStars: number = 0;\r\n\r\n /**\r\n * Space (margin) below in px\r\n */\r\n @Prop() spaceStarsText: number = 0;\r\n\r\n /**\r\n * show Label or not\r\n */\r\n @Prop() showLabel: boolean = true;\r\n\r\n /**\r\n * Label next to star rating\r\n * available dynamic variables: %RATING% %COUNT%\r\n */\r\n @Prop() label: string = \"(%RATING%)\";\r\n\r\n private renderStarRating() {\r\n const starsArray = [1, 2, 3, 4, 5];\r\n const halfStar = Math.round(this.roundRating());\r\n const maskId = getRandomId();\r\n return (\r\n starsArray.map((el,index) =>\r\n <span class={`icon-star ${el <= this.roundRating() ? \"active\" : \"\"}`} role=\"radio\" aria-checked={`${el <= this.rating}`} aria-label={`star ${el}/${starsArray.length}`}>\r\n <svg class=\"svg-star\" viewBox=\"0 0 110 110\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" role=\"presentation\">\r\n <path transform=\"translate(13,13)\" d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n <mask id={`mask-${index}-${maskId}`} maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"45\" height=\"85\">\r\n <rect width=\"45\" height=\"85\" fill=\"white\"/>\r\n </mask>\r\n <g class={`${index < halfStar ? \"half-star\" : \"\"}`} transform=\"translate(13,13)\" mask={`url(#mask-${index}-${maskId})`}>\r\n <path d=\"M42.756 1.23194C43.4392 -0.410645 45.7661 -0.410647 46.4493 1.23194L57.3587 27.4613C57.6467 28.1537 58.2979 28.6269 59.0455 28.6868L87.3623 30.957C89.1356 31.0991 89.8546 33.3121 88.5035 34.4695L66.9292 52.9502C66.3596 53.4381 66.1108 54.2037 66.2848 54.9332L72.8762 82.5656C73.289 84.296 71.4065 85.6638 69.8883 84.7364L45.6451 69.9288C45.0051 69.5379 44.2002 69.5379 43.5601 69.9288L19.317 84.7364C17.7988 85.6638 15.9163 84.296 16.3291 82.5656L22.9204 54.9332C23.0944 54.2037 22.8457 53.4381 22.2761 52.9502L0.701718 34.4695C-0.649356 33.3121 0.069695 31.0991 1.843 30.957L30.1598 28.6868C30.9074 28.6269 31.5586 28.1537 31.8466 27.4613L42.756 1.23194Z\"/>\r\n </g>\r\n </svg>\r\n </span>\r\n )\r\n );\r\n }\r\n\r\n private setCSSVariables() {\r\n return {\r\n \"--covet-pics-star-size\": `${this.starSize}px`,\r\n \"--covet-pics-star-space-stars\": `${this.spaceStars}px`,\r\n \"--covet-pics-star-space-stars-text\": `${this.spaceStarsText}px`,\r\n \"--covet-pics-star-color\": `${this.starColor}`,\r\n \"--covet-pics-empty-star-color\": `${this.emptyStarColor}`,\r\n \"--covet-pics-star-border-color\": `${this.starBorderColor}`,\r\n \"--covet-pics-star-border-width\": `${this.starBorderWidth}`\r\n };\r\n }\r\n private roundRating() {\r\n if (isNaN(this.rating)) return null; \r\n if (this.rating > 5) return 5;\r\n \r\n let number = `${this.rating}`;\r\n if (number.indexOf(\".\") !== -1) { \r\n number = number.slice(0,(number.indexOf(\".\") + 3));\r\n } \r\n return parseFloat(number);\r\n }\r\n\r\n private convertedLabel() {\r\n let lebelUpdated = this.label.replaceAll(\"%RATING%\", `${this.roundRating()}`);\r\n lebelUpdated = lebelUpdated.replaceAll(\"%COUNT%\", `${this.ratingCount}`);\r\n return lebelUpdated;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host style={this.setCSSVariables()} role=\"radiogroup\" aria-label=\"star rating\">\r\n {this.renderStarRating()}\r\n {this.showLabel && <span class=\"star-rating-count\">{this.convertedLabel()}</span>}\r\n </Host>\r\n );\r\n }\r\n\r\n}\r\n"],"mappings":";;;wMAAA,IAAMA,EAAyB,48BAC/B,IAAAC,EAAeD,E,ICQFE,EAAmBC,EAAA,oC,+DAWF,E,eAKA,U,oBAKK,U,qBAKC,U,qBAKA,E,cAKP,G,gBAKE,E,oBAKI,E,eAKJ,K,WAML,Y,CAEhBC,EAAAC,UAAAC,iBAAA,eAAAC,EAAAC,KACN,IAAMC,EAAa,CAAC,EAAG,EAAG,EAAG,EAAG,GAChC,IAAMC,EAAWC,KAAKC,MAAMJ,KAAKK,eACjC,IAAMC,EAASC,IACf,OACEN,EAAWO,KAAI,SAACC,EAAGC,GACjB,OAAAC,EAAA,QAAMC,MAAO,aAAAC,OAAaJ,GAAMV,EAAKM,cAAgB,SAAW,IAAMS,KAAK,QAAO,eAAe,GAAAD,OAAGJ,GAAMV,EAAKgB,QAAQ,aAAc,QAAAF,OAAQJ,EAAE,KAAAI,OAAIZ,EAAWe,SAC5JL,EAAA,OAAKC,MAAM,WAAWK,QAAQ,cAAcC,KAAK,OAAOC,MAAM,6BAA4B,cAAa,OAAOL,KAAK,gBACjHH,EAAA,QAAMS,UAAU,mBAAmBC,EAAE,opBACrCV,EAAA,QAAMW,GAAI,QAAAT,OAAQH,EAAK,KAAAG,OAAIP,GAAUiB,UAAU,iBAAiBC,EAAE,IAAIC,EAAE,IAAIC,MAAM,K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