odaptos_design_system 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Molecules/StarRating/StarRating.d.ts +4 -1
- package/dist/odaptos_design_system.cjs.development.js +7 -4
- package/dist/odaptos_design_system.cjs.development.js.map +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js.map +1 -1
- package/dist/odaptos_design_system.esm.js +7 -4
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Molecules/StarRating/StarRating.tsx +18 -4
|
@@ -14367,9 +14367,12 @@ var styles$E = {"star_button":"StarRating-module_star_button__-Ow5-","on":"StarR
|
|
|
14367
14367
|
styleInject(css_248z$E);
|
|
14368
14368
|
|
|
14369
14369
|
const StarRating = ({
|
|
14370
|
-
|
|
14370
|
+
value,
|
|
14371
|
+
onClick,
|
|
14372
|
+
strokeColor,
|
|
14373
|
+
fillColor
|
|
14371
14374
|
}) => {
|
|
14372
|
-
const [rating, setRating] = useState(0);
|
|
14375
|
+
const [rating, setRating] = useState(value ?? 0);
|
|
14373
14376
|
const [hover, setHover] = useState(0);
|
|
14374
14377
|
return /*#__PURE__*/React.createElement("div", {
|
|
14375
14378
|
className: styles$E.star_rating
|
|
@@ -14396,8 +14399,8 @@ const StarRating = ({
|
|
|
14396
14399
|
clipPath: "url(#clip0_2837_24714)"
|
|
14397
14400
|
}, /*#__PURE__*/React.createElement("path", {
|
|
14398
14401
|
d: "M8.48489 0.800092L10.7156 5.21943L15.0089 5.64476C15.1111 5.65325 15.2087 5.69086 15.2902 5.75312C15.3717 5.81538 15.4337 5.89968 15.4688 5.99606C15.5038 6.09244 15.5106 6.19685 15.4881 6.29693C15.4657 6.39701 15.4151 6.48856 15.3422 6.56076L11.8089 10.0628L13.1189 14.8214C13.1457 14.9224 13.1428 15.0289 13.1105 15.1282C13.0782 15.2275 13.0178 15.3154 12.9368 15.3812C12.8557 15.4471 12.7574 15.4881 12.6535 15.4994C12.5497 15.5106 12.4449 15.4917 12.3516 15.4448L7.99889 13.2894L3.65222 15.4421C3.55892 15.489 3.45405 15.508 3.35023 15.4967C3.24641 15.4854 3.14805 15.4444 3.067 15.3786C2.98594 15.3127 2.92563 15.2248 2.89332 15.1255C2.86102 15.0262 2.85809 14.9197 2.88489 14.8188L4.19489 10.0601L0.65889 6.55809C0.586045 6.4859 0.535412 6.39434 0.512986 6.29426C0.490561 6.19418 0.497282 6.08977 0.532354 5.9934C0.567426 5.89702 0.62938 5.81271 0.71088 5.75045C0.792381 5.68819 0.890015 5.65059 0.992223 5.64209L5.28556 5.21676L7.51289 0.800092C7.5587 0.710626 7.62831 0.63554 7.71407 0.583107C7.79982 0.530674 7.89838 0.50293 7.99889 0.50293C8.0994 0.50293 8.19796 0.530674 8.28372 0.583107C8.36947 0.63554 8.43908 0.710626 8.48489 0.800092Z",
|
|
14399
|
-
fill: index <= hover || index <= rating ? '#f9dc4d' : 'none',
|
|
14400
|
-
stroke: index <= hover || index <= rating ? '#f9dc4d' : '#96989A',
|
|
14402
|
+
fill: index <= hover || index <= rating ? fillColor ?? '#f9dc4d' : 'none',
|
|
14403
|
+
stroke: index <= hover || index <= rating ? strokeColor ?? '#f9dc4d' : '#96989A',
|
|
14401
14404
|
strokeLinecap: "round",
|
|
14402
14405
|
strokeLinejoin: "round"
|
|
14403
14406
|
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|