odaptos_design_system 2.0.2 → 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.
@@ -1,6 +1,9 @@
1
1
  import React from 'react';
2
2
  interface StarRatingProps {
3
+ value?: number;
3
4
  onClick: (index: number) => void;
5
+ strokeColor?: string;
6
+ fillColor?: string;
4
7
  }
5
- export declare const StarRating: ({ onClick }: StarRatingProps) => React.JSX.Element;
8
+ export declare const StarRating: ({ value, onClick, strokeColor, fillColor, }: StarRatingProps) => React.JSX.Element;
6
9
  export {};
@@ -8709,10 +8709,10 @@ function BulbIcon({
8709
8709
  viewBox: "0 0 20 20",
8710
8710
  fill: "none"
8711
8711
  }, /*#__PURE__*/React__default.createElement("g", {
8712
- "clip-path": "url(#clip0_6397_9266)"
8712
+ clipPath: "url(#clip0_6397_9266)"
8713
8713
  }, /*#__PURE__*/React__default.createElement("path", {
8714
- "fill-rule": "evenodd",
8715
- "clip-rule": "evenodd",
8714
+ fillRule: "evenodd",
8715
+ clipRule: "evenodd",
8716
8716
  d: "M10.708 0.707965C10.708 0.316967 10.391 0 10 0C9.609 0 9.29204 0.316967 9.29204 0.707965V2.0354C9.29204 2.4264 9.609 2.74336 10 2.74336C10.391 2.74336 10.708 2.4264 10.708 2.0354V0.707965ZM9.40312 3.99297C10.524 3.88124 11.6537 4.08634 12.6638 4.58496C13.6738 5.08357 14.5237 5.85567 15.1166 6.81342C15.7094 7.77098 16.0216 8.87568 16.0177 10.0019C16.0152 11.333 15.5705 12.6257 14.7534 13.6766C14.0505 14.5806 13.1064 15.2617 12.0354 15.6449V16.6372C12.0354 17.0282 11.7184 17.3451 11.3274 17.3451H8.67256C8.28156 17.3451 7.9646 17.0282 7.9646 16.6372V15.644C7.08421 15.3276 6.28716 14.8092 5.63901 14.1276C4.86283 13.3113 4.33135 12.2935 4.10504 11.19C3.87872 10.0866 3.96666 8.94174 4.35885 7.8858C4.75104 6.82985 5.43174 5.90518 6.32349 5.21699C7.21524 4.52879 8.28225 4.1047 9.40312 3.99297ZM16.0177 10.0019L16.0177 10.0012L15.3097 9.99999L16.0177 10.0025L16.0177 10.0019ZM12.037 5.85461C11.2646 5.47332 10.4007 5.31647 9.54357 5.40192C8.68643 5.48736 7.87049 5.81166 7.18856 6.33793C6.50663 6.86419 5.9861 7.57129 5.68619 8.37878C5.38628 9.18627 5.31903 10.0617 5.49209 10.9055C5.66516 11.7494 6.07158 12.5277 6.66513 13.1519C7.25869 13.7762 8.01553 14.2213 8.84956 14.4366C9.16214 14.5173 9.38053 14.7993 9.38053 15.1221V15.9292H10.6195V15.1221C10.6195 14.7988 10.8385 14.5166 11.1517 14.4363C12.1373 14.1837 13.0111 13.6108 13.6356 12.8075C14.2601 12.0042 14.6 11.0162 14.6018 9.99873L14.6018 9.99745C14.6049 9.13608 14.3661 8.29112 13.9127 7.55873C13.4593 6.82634 12.8094 6.23591 12.037 5.85461ZM7.9646 19.292C7.9646 18.901 8.28157 18.5841 8.67257 18.5841H11.3274C11.7184 18.5841 12.0354 18.901 12.0354 19.292C12.0354 19.683 11.7184 20 11.3274 20H8.67257C8.28157 20 7.9646 19.683 7.9646 19.292ZM17.2566 8.67257C17.2566 8.28157 17.5736 7.9646 17.9646 7.9646H19.292C19.683 7.9646 20 8.28157 20 8.67257C20 9.06356 19.683 9.38053 19.292 9.38053H17.9646C17.5736 9.38053 17.2566 9.06356 17.2566 8.67257ZM0.707965 9.29204C0.316967 9.29204 0 9.609 0 10C0 10.391 0.316967 10.708 0.707965 10.708H2.0354C2.4264 10.708 2.74336 10.391 2.74336 10C2.74336 9.609 2.4264 9.29204 2.0354 9.29204H0.707965ZM15.1313 14.4675C15.4077 14.1911 15.856 14.1911 16.1325 14.4675L17.0714 15.4065C17.3479 15.6829 17.3479 16.1312 17.0714 16.4077C16.7949 16.6842 16.3467 16.6842 16.0702 16.4077L15.1313 15.4687C14.8548 15.1923 14.8548 14.744 15.1313 14.4675ZM3.92981 2.26488C3.65333 1.9884 3.20507 1.9884 2.9286 2.26488C2.65212 2.54136 2.65212 2.98962 2.9286 3.26609L3.86753 4.20503C4.14401 4.48151 4.59227 4.48151 4.86875 4.20503C5.14523 3.92855 5.14523 3.4803 4.86875 3.20382L3.92981 2.26488ZM17.0714 2.26488C17.3479 2.54136 17.3479 2.98962 17.0714 3.26609L16.1325 4.20503C15.856 4.48151 15.4077 4.48151 15.1313 4.20503C14.8548 3.92855 14.8548 3.4803 15.1313 3.20382L16.0702 2.26488C16.3467 1.9884 16.7949 1.9884 17.0714 2.26488ZM4.86875 15.4687C5.14523 15.1923 5.14523 14.744 4.86875 14.4675C4.59227 14.1911 4.14401 14.1911 3.86753 14.4675L2.9286 15.4065C2.65212 15.6829 2.65212 16.1312 2.9286 16.4077C3.20507 16.6842 3.65333 16.6842 3.92981 16.4077L4.86875 15.4687Z",
8717
8717
  fill: fill
8718
8718
  })), /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("clipPath", {
@@ -9460,10 +9460,10 @@ function GoogleIcon$1({
9460
9460
  viewBox: "0 0 20 20",
9461
9461
  fill: "none"
9462
9462
  }, /*#__PURE__*/React__default.createElement("g", {
9463
- "clip-path": "url(#clip0_6397_9258)"
9463
+ clipPath: "url(#clip0_6397_9258)"
9464
9464
  }, /*#__PURE__*/React__default.createElement("path", {
9465
- "fill-rule": "evenodd",
9466
- "clip-rule": "evenodd",
9465
+ fillRule: "evenodd",
9466
+ clipRule: "evenodd",
9467
9467
  d: "M1.90871 1.32625C1.75465 1.32625 1.60689 1.38745 1.49795 1.49639C1.389 1.60534 1.3278 1.75309 1.3278 1.90716V6.88641C1.3278 7.25308 1.03056 7.55031 0.6639 7.55031C0.297238 7.55031 0 7.25308 0 6.88641V1.90716C0 1.40094 0.201096 0.91545 0.559049 0.557497C0.917002 0.199544 1.40249 -0.00155258 1.90871 -0.00155258H6.88797C7.25463 -0.00155258 7.55187 0.295686 7.55187 0.662348C7.55187 1.02901 7.25463 1.32625 6.88797 1.32625H1.90871ZM12.4481 0.662348C12.4481 0.295686 12.7454 -0.00155258 13.112 -0.00155258H18.0913C18.5975 -0.00155258 19.083 0.199543 19.441 0.557497C19.7989 0.91545 20 1.40094 20 1.90716V6.88641C20 7.25308 19.7028 7.55031 19.3361 7.55031C18.9694 7.55031 18.6722 7.25308 18.6722 6.88641V1.90716C18.6722 1.75309 18.611 1.60534 18.5021 1.49639C18.3931 1.38745 18.2454 1.32625 18.0913 1.32625H13.112C12.7454 1.32625 12.4481 1.02901 12.4481 0.662348ZM1.3278 13.1105C1.3278 12.7438 1.03056 12.4466 0.6639 12.4466C0.297238 12.4466 0 12.7438 0 13.1105V18.0897C0 18.596 0.201096 19.0814 0.559049 19.4394C0.917001 19.7973 1.40249 19.9984 1.90871 19.9984H6.88797C7.25463 19.9984 7.55187 19.7012 7.55187 19.3345C7.55187 18.9679 7.25463 18.6706 6.88797 18.6706H1.90871C1.75465 18.6706 1.60689 18.6094 1.49795 18.5005C1.389 18.3916 1.3278 18.2438 1.3278 18.0897V13.1105ZM19.3361 12.4466C19.7028 12.4466 20 12.7438 20 13.1105V18.0897C20 18.596 19.7989 19.0814 19.441 19.4394C19.083 19.7973 18.5975 19.9984 18.0913 19.9984H13.112C12.7454 19.9984 12.4481 19.7012 12.4481 19.3345C12.4481 18.9679 12.7454 18.6706 13.112 18.6706H18.0913C18.2454 18.6706 18.3931 18.6094 18.5021 18.5005C18.611 18.3916 18.6722 18.2438 18.6722 18.0897V13.1105C18.6722 12.7438 18.9694 12.4466 19.3361 12.4466ZM5.06224 14.3553V5.64806L5.06298 5.63541C5.06416 5.61903 5.06682 5.59128 5.07266 5.55624C5.08486 5.48302 5.10803 5.39554 5.14775 5.3161C5.18617 5.23926 5.23338 5.18261 5.29176 5.14369C5.34599 5.10754 5.44812 5.06069 5.64315 5.06069H14.3504L14.363 5.06143C14.3794 5.0626 14.4072 5.06527 14.4422 5.0711C14.5154 5.08331 14.6029 5.10648 14.6823 5.1462C14.7592 5.18462 14.8158 5.23183 14.8548 5.29021C14.8909 5.34443 14.9378 5.44657 14.9378 5.6416V14.3488L14.937 14.3615C14.9358 14.3779 14.9332 14.4056 14.9273 14.4407C14.9151 14.5139 14.892 14.6014 14.8522 14.6808C14.8138 14.7576 14.7666 14.8143 14.7082 14.8532C14.654 14.8894 14.5519 14.9362 14.3568 14.9362H5.64961L5.63697 14.9355C5.62058 14.9343 5.59283 14.9316 5.5578 14.9258C5.48458 14.9136 5.3971 14.8904 5.31765 14.8507C5.24081 14.8123 5.18416 14.7651 5.14524 14.7067C5.10909 14.6525 5.06224 14.5503 5.06224 14.3553ZM14.3568 3.73289V4.39679C14.3568 3.73289 14.3572 3.73289 14.3575 3.73289L14.3582 3.73289L14.3597 3.73289L14.363 3.73291L14.3711 3.73301L14.3929 3.73356C14.4099 3.73412 14.4317 3.73515 14.4576 3.73701C14.5093 3.7407 14.5788 3.74776 14.6605 3.76137C14.8207 3.78807 15.0444 3.8427 15.2762 3.95858C15.5105 4.07576 15.7651 4.26195 15.9596 4.55368C16.1568 4.84956 16.2656 5.21422 16.2656 5.6416V14.3553H15.6017C16.2656 14.3553 16.2656 14.3556 16.2656 14.356V14.3567L16.2656 14.3581L16.2655 14.3615L16.2654 14.3696L16.2649 14.3914C16.2643 14.4083 16.2633 14.4301 16.2614 14.4561C16.2577 14.5078 16.2507 14.5773 16.2371 14.6589C16.2104 14.8191 16.1558 15.0428 16.0399 15.2746C15.9227 15.509 15.7365 15.7635 15.4448 15.958C15.1489 16.1553 14.7842 16.264 14.3568 16.264H5.64315V15.6001C5.64315 16.264 5.64282 16.264 5.64249 16.264H5.6418L5.64031 16.264L5.63698 16.264L5.62888 16.2639L5.60706 16.2633C5.59011 16.2628 5.56832 16.2617 5.54236 16.2599C5.49068 16.2562 5.42117 16.2491 5.33951 16.2355C5.17933 16.2088 4.9556 16.1542 4.72384 16.0383C4.48948 15.9211 4.23493 15.7349 4.04044 15.4432C3.84319 15.1473 3.73444 14.7827 3.73444 14.3553V5.6416H4.39834C3.73444 5.6416 3.73444 5.64127 3.73444 5.64094L3.73444 5.64024L3.73445 5.63876L3.73447 5.63543L3.73456 5.62732L3.73511 5.6055C3.73568 5.58856 3.7367 5.56677 3.73856 5.54081C3.74225 5.48912 3.74931 5.41962 3.76292 5.33795C3.78962 5.17777 3.84425 4.95405 3.96013 4.72229C4.07731 4.48793 4.26351 4.23337 4.55523 4.03889C4.85111 3.84164 5.21578 3.73289 5.64315 3.73289H14.3568Z",
9468
9468
  fill: fill
9469
9469
  })), /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("clipPath", {
@@ -10449,7 +10449,7 @@ function TwoColumnIcon({
10449
10449
  viewBox: "0 0 24 24",
10450
10450
  fill: "none"
10451
10451
  }, /*#__PURE__*/React__default.createElement("g", {
10452
- "clip-path": "url(#clip0_7520_27704)"
10452
+ clipPath: "url(#clip0_7520_27704)"
10453
10453
  }, /*#__PURE__*/React__default.createElement("path", {
10454
10454
  fillRule: "evenodd",
10455
10455
  clipRule: "evenodd",
@@ -12404,7 +12404,7 @@ const Modal = ({
12404
12404
  fill: "black"
12405
12405
  }),
12406
12406
  onClick: () => onClose()
12407
- })), children, /*#__PURE__*/React__default.createElement("div", {
12407
+ })), children, (cancelText || onConfirm && validationText) && /*#__PURE__*/React__default.createElement("div", {
12408
12408
  className: styles$s.modal_buttons_container
12409
12409
  }, cancelText && onClose && /*#__PURE__*/React__default.createElement(Button, {
12410
12410
  text: cancelText,
@@ -14375,9 +14375,12 @@ var styles$E = {"star_button":"StarRating-module_star_button__-Ow5-","on":"StarR
14375
14375
  styleInject(css_248z$E);
14376
14376
 
14377
14377
  const StarRating = ({
14378
- onClick
14378
+ value,
14379
+ onClick,
14380
+ strokeColor,
14381
+ fillColor
14379
14382
  }) => {
14380
- const [rating, setRating] = React.useState(0);
14383
+ const [rating, setRating] = React.useState(value ?? 0);
14381
14384
  const [hover, setHover] = React.useState(0);
14382
14385
  return /*#__PURE__*/React__default.createElement("div", {
14383
14386
  className: styles$E.star_rating
@@ -14404,8 +14407,8 @@ const StarRating = ({
14404
14407
  clipPath: "url(#clip0_2837_24714)"
14405
14408
  }, /*#__PURE__*/React__default.createElement("path", {
14406
14409
  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",
14407
- fill: index <= hover || index <= rating ? '#f9dc4d' : 'none',
14408
- stroke: index <= hover || index <= rating ? '#f9dc4d' : '#96989A',
14410
+ fill: index <= hover || index <= rating ? fillColor ?? '#f9dc4d' : 'none',
14411
+ stroke: index <= hover || index <= rating ? strokeColor ?? '#f9dc4d' : '#96989A',
14409
14412
  strokeLinecap: "round",
14410
14413
  strokeLinejoin: "round"
14411
14414
  })), /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("clipPath", {