@foodpilot/foods 2.14.2 → 2.15.1
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/assets/illustrations/almost-there.svg.js +1 -1
- package/dist/assets/illustrations/animal-welfare.svg.js +1 -1
- package/dist/assets/illustrations/arrows.svg.js +1 -1
- package/dist/assets/illustrations/building-1.svg.js +1 -1
- package/dist/assets/illustrations/building-2.svg.js +1 -1
- package/dist/assets/illustrations/carbon-emissions-reduction.svg.js +1 -1
- package/dist/assets/illustrations/carbon-neutrality.svg.js +1 -1
- package/dist/assets/illustrations/coming-soon.svg.js +1 -1
- package/dist/assets/illustrations/congratulations.svg.js +1 -1
- package/dist/assets/illustrations/contact-support.svg.js +1 -1
- package/dist/assets/illustrations/data-analysis.svg.js +1 -1
- package/dist/assets/illustrations/diagnostic-and-questionnaire.svg.js +1 -1
- package/dist/assets/illustrations/diamond.svg.js +1 -1
- package/dist/assets/illustrations/economy.svg.js +1 -1
- package/dist/assets/illustrations/empty-basket.svg.js +1 -1
- package/dist/assets/illustrations/empty-folder.svg.js +1 -1
- package/dist/assets/illustrations/environment.svg.js +1 -1
- package/dist/assets/illustrations/governance.svg.js +1 -1
- package/dist/assets/illustrations/group-of-people.svg.js +1 -1
- package/dist/assets/illustrations/growing-plant.svg.js +1 -1
- package/dist/assets/illustrations/health-and-nutrition.svg.js +1 -1
- package/dist/assets/illustrations/informations.svg.js +1 -1
- package/dist/assets/illustrations/inputs-and-chemicals.svg.js +1 -1
- package/dist/assets/illustrations/keep-going.svg.js +1 -1
- package/dist/assets/illustrations/lock.svg.js +1 -1
- package/dist/assets/illustrations/missing-datas.svg.js +1 -1
- package/dist/assets/illustrations/motivation.svg.js +1 -1
- package/dist/assets/illustrations/no-access.svg.js +1 -1
- package/dist/assets/illustrations/packaging.svg.js +1 -1
- package/dist/assets/illustrations/product-simulation.svg.js +1 -1
- package/dist/assets/illustrations/recipe.svg.js +1 -1
- package/dist/assets/illustrations/rocket.svg.js +1 -1
- package/dist/assets/illustrations/scores-and-indicators.svg.js +1 -1
- package/dist/assets/illustrations/select-action.svg.js +1 -1
- package/dist/assets/illustrations/social.svg.js +1 -1
- package/dist/assets/illustrations/start.svg.js +1 -1
- package/dist/assets/illustrations/suppliers.svg.js +1 -1
- package/dist/assets/illustrations/target-1.svg.js +1 -1
- package/dist/assets/illustrations/target-2.svg.js +1 -1
- package/dist/assets/illustrations/terms-and-conditions.svg.js +1 -1
- package/dist/assets/illustrations/territory.svg.js +1 -1
- package/dist/assets/illustrations/trajectory-and-actions-plans.svg.js +1 -1
- package/dist/assets/illustrations/under-construction.svg.js +1 -1
- package/dist/assets/illustrations/waving-hand.svg.js +1 -1
- package/dist/components/Chart/HorizontalGauge/HorizontalGaugeChart.js +6 -6
- package/dist/components/Chart/HorizontalGauge/components/GaugeBorders.d.ts +1 -1
- package/dist/components/Chart/HorizontalGauge/components/GaugeBorders.js +6 -6
- package/dist/components/Chart/HorizontalGauge/components/GaugeLabels.d.ts +1 -1
- package/dist/components/Chart/HorizontalGauge/components/GaugeLabels.js +9 -4
- package/dist/components/Chart/HorizontalGauge/components/GaugeMarkers.js +8 -8
- package/dist/components/Chart/HorizontalGauge/constants.d.ts +9 -4
- package/dist/components/Chart/HorizontalGauge/constants.js +1 -1
- package/dist/components/Chart/HorizontalGauge/hooks/useGaugeCalculations.js +1 -1
- package/dist/components/Chart/HorizontalGauge/types.d.ts +14 -5
- package/dist/components/Chart/HorizontalGauge/utils/utils.d.ts +0 -1
- package/dist/components/Chart/HorizontalGauge/utils/utils.js +1 -1
- package/dist/components/Chart/TrajectoryChart/TrajectoryLegend/LegendBlockComponent.js +1 -1
- package/dist/components/ComparisonBlock/ComparisonBlock.d.ts +2 -0
- package/dist/components/ComparisonBlock/ComparisonBlock.js +4 -4
- package/dist/components/ComparisonBlock/useColorAndArrow.d.ts +7 -1
- package/dist/components/ComparisonBlock/useColorAndArrow.js +1 -1
- package/dist/components/ComparisonBlock/useColorAndArrow.test.d.ts +1 -0
- package/dist/main.js +1 -1
- package/dist/themes/common/custom.d.ts +9 -0
- package/dist/themes/common/custom.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";const
|
|
1
|
+
import*as e from"react";const t=t=>/* @__PURE__ */e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...t},/* @__PURE__ */e.createElement("circle",{cx:56,cy:56,r:56,fill:"#edf9fa"}),/* @__PURE__ */e.createElement("g",{clipPath:"url(#clip0_10619_6253)"},/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"M59.14 34.55h-5.28v-7.9a2.64 2.64 0 1 1 5.28 0z"}),/* @__PURE__ */e.createElement("path",{fill:"#025155",d:"M53.86 28.62v5.93h5.28v-5.93a28 28 0 0 0-5.28 0"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"M34.55 53.86v5.28h-7.9a2.64 2.64 0 0 1 0-5.28z"}),/* @__PURE__ */e.createElement("path",{fill:"#025155",d:"M28.62 59.14h5.93v-5.28h-5.93a28 28 0 0 0 0 5.28"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"M53.86 78.45h5.28v7.9a2.64 2.64 0 0 1-5.28 0z"}),/* @__PURE__ */e.createElement("path",{fill:"#025155",d:"M59.14 84.38v-5.93h-5.28v5.93a28 28 0 0 0 5.28 0"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"M78.45 59.14v-5.28h7.9a2.64 2.64 0 1 1 0 5.28z"}),/* @__PURE__ */e.createElement("path",{fill:"#025155",d:"M84.38 53.86h-5.93v5.28h5.93a28 28 0 0 0 0-5.28"}),/* @__PURE__ */e.createElement("path",{fill:"#018990",d:"M56.5 32.2c-13.4 0-24.3 10.9-24.3 24.3s10.9 24.3 24.3 24.3 24.3-10.9 24.3-24.3-10.9-24.3-24.3-24.3m0 43.32A19.05 19.05 0 0 1 37.48 56.5 19.05 19.05 0 0 1 56.5 37.48 19.05 19.05 0 0 1 75.52 56.5 19.04 19.04 0 0 1 56.5 75.52"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"M72.5 38.22a24.2 24.2 0 0 1 6.03 16c0 13.4-10.9 24.3-24.31 24.3a24.2 24.2 0 0 1-16-6.02c4.45 5.09 11 8.3 18.28 8.3 13.4 0 24.3-10.9 24.3-24.3 0-7.28-3.21-13.83-8.3-18.28"}),/* @__PURE__ */e.createElement("path",{fill:"#00c0ca",d:"M37.21 24H26.64A2.64 2.64 0 0 0 24 26.64v10.57a2.64 2.64 0 0 0 5.28 0v-7.93h7.93a2.64 2.64 0 0 0 0-5.28m38.58 0h10.57A2.64 2.64 0 0 1 89 26.64v10.57a2.64 2.64 0 0 1-5.28 0v-7.93h-7.93a2.64 2.64 0 0 1 0-5.28M37.21 89H26.64A2.64 2.64 0 0 1 24 86.36V75.79a2.64 2.64 0 0 1 5.28 0v7.93h7.93a2.64 2.64 0 0 1 0 5.28m38.58 0h10.57A2.64 2.64 0 0 0 89 86.36V75.79a2.64 2.64 0 0 0-5.28 0v7.93h-7.93a2.64 2.64 0 0 0 0 5.28"}),/* @__PURE__ */e.createElement("path",{fill:"#2fcbd4",d:"M56.5 71.02a14.52 14.52 0 1 0 0-29.04 14.52 14.52 0 0 0 0 29.04"}),/* @__PURE__ */e.createElement("path",{fill:"#8ee2e7",d:"M56.5 41.98c-8.02 0-14.52 6.5-14.52 14.52H56.5z"})),/* @__PURE__ */e.createElement("defs",null,/* @__PURE__ */e.createElement("clipPath",{id:"clip0_10619_6253"},/* @__PURE__ */e.createElement("path",{fill:"#fff",d:"M24 24h65v65H24z"}))));export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as a from"react";const l=l=>/* @__PURE__ */a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */a.createElement("circle",{cx:56,cy:56,r:56,fill:"#edf9fa"}),/* @__PURE__ */a.createElement("path",{fill:"#5fd7dd",d:"
|
|
1
|
+
import*as a from"react";const l=l=>/* @__PURE__ */a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */a.createElement("circle",{cx:56,cy:56,r:56,fill:"#edf9fa"}),/* @__PURE__ */a.createElement("path",{fill:"#5fd7dd",d:"m36.52 97.23 54.79-10.2a2.54 2.54 0 0 0 2.03-2.94l-11.06-59.4-14.76-10.07-44.83 8.35a2.54 2.54 0 0 0-2.03 2.94l12.9 69.3a2.5 2.5 0 0 0 2.96 2.02"}),/* @__PURE__ */a.createElement("path",{fill:"#01a4ad",d:"m72.31 26.54 9.97-1.86-14.76-10.06 1.84 9.9a2.5 2.5 0 0 0 2.95 2.02"}),/* @__PURE__ */a.createElement("path",{fill:"#fff",d:"m75.9 52.76-37.35 6.96a1.27 1.27 0 0 1-1.47-1.01 1.25 1.25 0 0 1 1.01-1.47l37.36-6.96a1.27 1.27 0 0 1 1.47 1.01 1.26 1.26 0 0 1-1.01 1.47m-19.56 12.6-16.18 3.02a1.27 1.27 0 0 1-1.48-1 1.26 1.26 0 0 1 1.01-1.48l16.2-3.01a1.27 1.27 0 0 1 1.47 1 1.26 1.26 0 0 1-1.02 1.47m16.84-3.33-10.48 1.7a1.27 1.27 0 0 1-1.48-1.01 1.26 1.26 0 0 1 1.02-1.47l10.48-1.7a1.27 1.27 0 0 1 1.47 1 1.26 1.26 0 0 1-1.01 1.48m-4 10.5-27.41 4.51a1.27 1.27 0 0 1-1.48-1 1.26 1.26 0 0 1 1.02-1.47l27.4-4.52a1.27 1.27 0 0 1 1.48 1 1.26 1.26 0 0 1-1.01 1.48m5.41 8.09-31.2 5.09a1.27 1.27 0 0 1-1.48-1 1.26 1.26 0 0 1 1.01-1.48l31.2-5.09a1.27 1.27 0 0 1 1.48 1.01 1.25 1.25 0 0 1-1.01 1.47m-.3-36.52-18.68 3.47a1.27 1.27 0 0 1-1.48-1 1.25 1.25 0 0 1 1.02-1.47l18.67-3.48a1.27 1.27 0 0 1 1.48 1 1.25 1.25 0 0 1-1.02 1.48m-26.14 4.87-11.21 2.08a1.27 1.27 0 0 1-1.48-1 1.25 1.25 0 0 1 1.02-1.47l11.2-2.09a1.27 1.27 0 0 1 1.48 1 1.26 1.26 0 0 1-1.01 1.48m24.53-13.54L35.33 42.4a1.27 1.27 0 0 1-1.48-1 1.26 1.26 0 0 1 1.01-1.48l37.36-6.95a1.27 1.27 0 0 1 1.48 1 1.26 1.26 0 0 1-1.02 1.47m-19.04-5.42-19.93 3.7a1.27 1.27 0 0 1-1.47-1 1.26 1.26 0 0 1 1.01-1.47l19.93-3.71a1.27 1.27 0 0 1 1.47 1 1.25 1.25 0 0 1-1.01 1.48"}),/* @__PURE__ */a.createElement("path",{fill:"#026d72",d:"M87.65 78.66a10.1 10.1 0 0 0 8.12-11.76 10.1 10.1 0 0 0-11.8-8.05 10.1 10.1 0 0 0-8.13 11.76 10.1 10.1 0 0 0 11.8 8.05"}),/* @__PURE__ */a.createElement("path",{fill:"#fff",d:"M85.52 74.61c-.33.06-.67-.01-.94-.2l-4.34-2.94a1.26 1.26 0 0 1 .99-2.28q.25.05.45.2l3.28 2.24 4.43-6.4a1.27 1.27 0 0 1 1.76-.34 1.25 1.25 0 0 1 .33 1.75l-5.15 7.45a1.3 1.3 0 0 1-.81.52"}));export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";const l=l=>/* @__PURE__ */e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */e.createElement("rect",{width:112,height:112,fill:"#edf9fa",rx:56}),/* @__PURE__ */e.createElement("g",{fillRule:"evenodd",clipPath:"url(#clip0_9177_567)",clipRule:"evenodd"},/* @__PURE__ */e.createElement("path",{fill:"#b18651",d:"M18.
|
|
1
|
+
import*as e from"react";const l=l=>/* @__PURE__ */e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */e.createElement("rect",{width:112,height:112,fill:"#edf9fa",rx:56}),/* @__PURE__ */e.createElement("g",{fillRule:"evenodd",clipPath:"url(#clip0_9177_567)",clipRule:"evenodd"},/* @__PURE__ */e.createElement("path",{fill:"#b18651",d:"M18.73 24.1c24.37 4.63 49.25 4.53 74.65 0 .8-.14 1.52.62 1.52 1.43v55.25c0 .76-.71 1.22-1.53 1.42-24.88 6.4-49.76 6.8-74.64 0-.82-.2-1.53-.6-1.53-1.42V25.53c0-.76.71-1.57 1.53-1.42"}),/* @__PURE__ */e.createElement("path",{fill:"#01a4ad",d:"M27.92 53.77c.05-2.34.35-3.86.66-5.23.3-1.38.56-2.6.56-4.32s-3.05-3.5-6.5-5.54c-1.93-1.16-4.02-2.38-5.49-3.4v3.86c1.22.81 2.6 1.57 3.86 2.34 2.6 1.52 4.88 2.64 4.88 2.74 0 1.42-.26 2.44-.51 3.6-.36 1.53-.71 3.2-.76 5.9 0 .96-.2 1.42-.3 1.67-.41 1.02-.62 1.47.45 2.34.36.3.71.4 1.37.6.86.26 2.49.77 5.43 2.04a12 12 0 0 0-2.94 2.74c-1.27 1.88-1.68 4.06-.4 6.9 2.33 5.34 2.28 5.44 1.92 5.8-.86.96-2.28 2.48-2.69 8.42l3.2.61v-.25c.3-4.98 1.27-6 1.83-6.65 1.47-1.58 1.88-1.98-1.32-9.3-.71-1.62-.56-2.79.1-3.75.76-1.12 2.18-2.03 3.8-3 2.95 1.32 5.34 1.98 9-.35.7-.46 1.11-.36 1.32 0 1.06 1.62 1.22 5.43 1.32 7.4v.57c.05 1.22.8 2.9 1.77 4.21.97 1.27 2.29 2.24 3.56 2.29 1.01.05 2.34-.4 3.86-1.12 1.17-.56 2.49-1.22 3.76-1.88a55 55 0 0 1 3.86-1.93l.5-.2a26 26 0 0 0 6.5-4.17c2.34-2.13 3.86-4.77 2.7-7.61-.06-.15-.06-.1-.06-.15a25 25 0 0 1-1.57-4.17 12.7 12.7 0 0 0 7.57-.91c1.22-.51 2.13.76 3.14 2.23 1.68 2.34 3.56 4.98 7.47 4.88 1.93-.05 3.55.5 5.08 1.37v-3.66a11.6 11.6 0 0 0-5.13-.96c-2.24.05-3.56-1.83-4.77-3.5-1.83-2.55-3.46-4.83-7.01-3.36-1.58.66-2.8.86-4.06.86-1.07 0-2.24-.2-3.61-.5-.61-.77-1.68-1.73-3.76-3.71l-.35-.36-.71-.66a5.6 5.6 0 0 1-1.88-3.6 6.6 6.6 0 0 1 1.57-4.27c.05-.05.5.05 1.57-.3 1.43-.46 3.25-.92 4.98-1.12 1.47-.15 2.85-.1 3.5.4q.24.16.31.46a11.6 11.6 0 0 0 5.08 6.5 10 10 0 0 0 7.92 1.07c1.42-.35 1.83-.5 2.18-.6a52 52 0 0 1 4.12-1.02v-3.3c-1.63.3-2.95.66-4.98 1.21-.91.26-1.93.51-2.18.61-1.93.51-3.86.2-5.44-.76a8.2 8.2 0 0 1-3.6-4.67 4 4 0 0 0-1.47-2.08c-1.43-1.07-3.61-1.27-5.8-1.07-1.97.2-4.06.76-5.63 1.22-1.73.56-3.1 1.32-3.2 1.42a9.6 9.6 0 0 0-2.23 6.35 8.3 8.3 0 0 0 2.89 5.84l.71.66.36.35c2.54 2.4 3.4 3.2 3.7 3.66q.07.15.16.61c.15.97.45 2.49 2.08 6.14.05.1 0 0 .05.06.5 1.21-.46 2.64-1.88 3.96a24 24 0 0 1-6.04 3.8c-1.22.51-2.64 1.27-4.12 2.04l-2.23 1.16c-1.68.87-3.1 1.48-3.76 1.48-.2 0-.66-.46-1.12-1.02-.6-.81-1.11-1.78-1.11-2.39v-.55c-.1-2.24-.3-6.7-1.83-9.04-1.27-1.93-3.1-2.7-5.79-.97-2.59 1.68-4.42.81-7-.4-.47-.2-.92-.46-1.38-.61a56 56 0 0 0-6.2-2.44c.1-.46.16-.97.16-1.68z"}),/* @__PURE__ */e.createElement("path",{fill:"#8ee2e7",d:"M68.04 53.71c-.26-.45-1.17-1.32-3.71-3.65l-.36-.36-.7-.66a8.5 8.5 0 0 1-2.9-5.84 9.6 9.6 0 0 1 2.23-6.34c.1-.16 1.47-.92 3.2-1.43 1.58-.5 3.6-1.01 5.64-1.22 2.23-.25 4.36-.05 5.79 1.07q1 .73 1.47 2.08a8.3 8.3 0 0 0 3.6 4.68 7.2 7.2 0 0 0 5.44.76c.25-.05 1.27-.36 2.18-.61 2.03-.56 3.3-.92 4.98-1.22V25.53c0-.76-.71-1.52-1.53-1.42-25.39 4.52-50.27 4.62-74.64 0-.82-.15-1.53.6-1.53 1.42v9.75a70 70 0 0 0 5.49 3.4c3.45 2.03 6.5 3.86 6.5 5.54 0 1.73-.26 2.94-.56 4.32-.3 1.37-.66 2.89-.66 5.23 0 .7-.1 1.21-.15 1.67 1.11.36 3.04 1.02 6.2 2.44l1.36.6c2.6 1.23 4.47 2.09 7.01.41 2.7-1.77 4.57-1.01 5.79.97 1.52 2.34 1.73 6.8 1.83 9.04v.56c.05.6.5 1.57 1.12 2.38.45.56.86 1.02 1.11 1.02.66 0 2.08-.61 3.76-1.47q1.08-.55 2.23-1.17c1.48-.76 2.9-1.52 4.12-2.03.05 0 .2-.1.4-.2a23 23 0 0 0 5.64-3.61c1.42-1.27 2.39-2.74 1.88-3.96-.05-.05 0 .05-.05-.05-1.63-3.66-1.93-5.18-2.08-6.15a3 3 0 0 0-.16-.6z"}),/* @__PURE__ */e.createElement("path",{fill:"#9b6b3c",d:"M28.27 70.07c-1.22-2.85-.86-5.03.41-6.91a10 10 0 0 1 2.95-2.74 46 46 0 0 0-5.44-2.03c-.66-.2-1.01-.3-1.37-.61-1.07-.87-.86-1.32-.46-2.34.1-.25.3-.7.3-1.67.06-2.7.41-4.37.77-5.9.25-1.16.5-2.18.5-3.6 0-.15-2.28-1.22-4.87-2.74-1.27-.76-2.59-1.53-3.86-2.34v41.64c0 .76.71 1.17 1.53 1.42q4.39 1.23 8.78 2.14c.4-5.94 1.83-7.47 2.7-8.43.3-.36.4-.46-1.94-5.8z"}),/* @__PURE__ */e.createElement("path",{fill:"#beeef0",d:"M52.14 76.16c-1.32-.05-2.59-1.02-3.55-2.28-.97-1.27-1.73-3-1.78-4.22v-.56c-.1-1.93-.26-5.79-1.32-7.41-.26-.36-.66-.46-1.32 0-3.6 2.33-6 1.67-8.99.35-1.63.92-3 1.88-3.8 3-.67.96-.82 2.13-.11 3.76 3.2 7.26 2.8 7.72 1.32 9.29-.61.66-1.52 1.68-1.83 6.65V85c20.87 3.8 41.74 2.64 62.61-2.75.82-.2 1.53-.6 1.53-1.42V62.6a9.4 9.4 0 0 0-5.08-1.37c-3.91.1-5.79-2.54-7.46-4.87-1.02-1.48-1.93-2.75-3.15-2.24a14 14 0 0 1-5.33 1.12c-.77 0-1.48-.1-2.24-.2.25.86.66 2.13 1.57 4.16 0 .05 0 0 .06.15 1.21 2.85-.36 5.49-2.7 7.62a28 28 0 0 1-6.5 4.16l-.5.2a54 54 0 0 0-3.86 1.94c-1.27.66-2.54 1.32-3.76 1.87-1.52.66-2.84 1.17-3.86 1.12z"}),/* @__PURE__ */e.createElement("path",{fill:"#5fd7dd",d:"M94.9 58.84V44.22c-1.27.25-2.44.56-4.11 1.01-.36.1-.82.2-2.19.61-2.84.77-5.64.26-7.92-1.06a11.6 11.6 0 0 1-5.08-6.5.7.7 0 0 0-.3-.46c-.66-.5-2.03-.56-3.5-.4-1.73.2-3.56.65-4.98 1.11-1.12.36-1.53.26-1.58.3a6.6 6.6 0 0 0-1.57 4.27 5.2 5.2 0 0 0 1.88 3.6l.7.67.36.35a43 43 0 0 1 3.76 3.71c1.37.3 2.54.5 3.6.5 1.28 0 2.55-.2 4.07-.86 3.55-1.47 5.18.82 7 3.36 1.23 1.67 2.55 3.55 4.78 3.5 1.98-.05 3.66.3 5.13.96z"}),/* @__PURE__ */e.createElement("path",{fill:"#3c2517",d:"M30 31.07a2.4 2.4 0 0 0-2.44 2.43L30 39l2.44-5.49A2.4 2.4 0 0 0 30 31.07"}),/* @__PURE__ */e.createElement("path",{fill:"#82000a",d:"M47.52 41.73a2.4 2.4 0 0 0-2.44 2.44l2.44 5.48 2.44-5.48a2.4 2.4 0 0 0-2.44-2.44"}),/* @__PURE__ */e.createElement("path",{fill:"#8ee2e7",d:"M86.37 62.55A2.4 2.4 0 0 1 88.8 65l-2.43 5.48L83.93 65a2.4 2.4 0 0 1 2.44-2.44"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"M68.85 73.21a2.4 2.4 0 0 1 2.44 2.44l-2.44 5.49-2.44-5.49a2.4 2.4 0 0 1 2.44-2.44"}),/* @__PURE__ */e.createElement("path",{fill:"#025155",d:"M83.57 32.59a2.4 2.4 0 0 1 2.44 2.44l-2.44 5.48-2.43-5.48a2.4 2.4 0 0 1 2.43-2.44"}),/* @__PURE__ */e.createElement("path",{fill:"#fac227",d:"M23.65 60.01a2.4 2.4 0 0 1 2.44 2.44l-2.44 5.48-2.44-5.48A2.4 2.4 0 0 1 23.65 60"}),/* @__PURE__ */e.createElement("path",{fill:"#a67d4c",d:"M18.73 24.1a195 195 0 0 0 37.32 3.41v59.57a137 137 0 0 1-37.32-4.98c-.82-.2-1.53-.6-1.53-1.42V25.43c0-.76.71-1.57 1.53-1.42z"}),/* @__PURE__ */e.createElement("path",{fill:"#01a4ad",d:"M27.92 53.77c.05-2.34.35-3.86.66-5.23.3-1.38.56-2.6.56-4.32s-3.05-3.5-6.5-5.54c-1.93-1.16-4.02-2.38-5.49-3.4v3.86c1.22.81 2.6 1.57 3.86 2.34 2.6 1.52 4.88 2.64 4.88 2.74 0 1.42-.26 2.44-.51 3.6-.36 1.53-.71 3.2-.76 5.9 0 .96-.2 1.42-.3 1.67-.41 1.02-.62 1.47.45 2.34.36.3.71.4 1.37.6.86.26 2.49.77 5.43 2.04a12 12 0 0 0-2.94 2.74c-1.27 1.88-1.68 4.06-.4 6.9 2.33 5.34 2.28 5.44 1.92 5.8-.86.96-2.28 2.48-2.69 8.42l3.2.61v-.25c.3-4.98 1.27-6 1.83-6.65 1.47-1.58 1.88-1.98-1.32-9.3-.71-1.62-.56-2.79.1-3.75.76-1.12 2.18-2.03 3.8-3 2.95 1.32 5.34 1.98 9-.35.7-.46 1.11-.36 1.32 0 1.06 1.62 1.22 5.43 1.32 7.4v.57c.05 1.22.8 2.9 1.77 4.21.97 1.27 2.29 2.24 3.56 2.29 1.01.05 2.34-.4 3.86-1.12l.05-.05v-3.6l-.05.05c-1.68.86-3.1 1.47-3.76 1.47-.2 0-.66-.46-1.12-1.02-.6-.81-1.11-1.78-1.11-2.38v-.56c-.1-2.24-.3-6.7-1.83-9.04-1.27-1.93-3.1-2.7-5.8-.97-2.58 1.68-4.4.82-7-.4-.46-.2-.91-.46-1.37-.61a56 56 0 0 0-6.2-2.44c.1-.46.16-.97.16-1.68z"}),/* @__PURE__ */e.createElement("path",{fill:"#5fd7dd",d:"M56.05 27.51q-18.9.1-37.32-3.4c-.82-.15-1.53.6-1.53 1.42v9.75a70 70 0 0 0 5.49 3.4c3.45 2.03 6.5 3.86 6.5 5.54 0 1.73-.26 2.94-.56 4.32-.3 1.37-.66 2.89-.66 5.23 0 .7-.1 1.21-.15 1.67 1.11.36 3.04 1.02 6.2 2.44l1.36.6c2.6 1.23 4.47 2.09 7.01.41 2.7-1.77 4.57-1.01 5.79.97 1.52 2.34 1.73 6.8 1.83 9.04v.56c.05.6.5 1.57 1.12 2.38.45.56.86 1.02 1.11 1.02.66 0 2.08-.61 3.76-1.47l.05-.05V27.46z"}),/* @__PURE__ */e.createElement("path",{fill:"#00c0ca",d:"M28.27 70.07c-1.22-2.85-.86-5.03.41-6.91a10 10 0 0 1 2.95-2.74 46 46 0 0 0-5.44-2.03c-.66-.2-1.01-.3-1.37-.61-1.07-.87-.86-1.32-.46-2.34.1-.25.3-.7.3-1.67.06-2.7.41-4.37.77-5.9.25-1.16.5-2.18.5-3.6 0-.15-2.28-1.22-4.87-2.74-1.27-.76-2.59-1.53-3.86-2.34v41.64c0 .76.71 1.17 1.53 1.42q4.39 1.23 8.78 2.14c.4-5.94 1.83-7.47 2.7-8.43.3-.36.4-.46-1.94-5.8z"}),/* @__PURE__ */e.createElement("path",{fill:"#8ee2e7",d:"M52.14 76.16c-1.32-.05-2.59-1.02-3.55-2.28-.97-1.27-1.73-3-1.78-4.22v-.56c-.1-1.93-.26-5.79-1.32-7.41-.26-.36-.66-.46-1.32 0-3.6 2.33-6 1.67-8.99.35-1.63.92-3 1.88-3.8 3-.67.96-.82 2.13-.11 3.76 3.2 7.26 2.8 7.72 1.32 9.29-.61.66-1.52 1.68-1.83 6.65V85a142 142 0 0 0 25.3 2.23V75.09l-.06.05c-1.52.66-2.84 1.17-3.86 1.12z"}),/* @__PURE__ */e.createElement("path",{fill:"#00c0ca",d:"M30 31.07a2.4 2.4 0 0 0-2.44 2.43L30 39l2.44-5.49A2.4 2.4 0 0 0 30 31.07"}),/* @__PURE__ */e.createElement("path",{fill:"#beeef0",d:"M47.52 41.73a2.4 2.4 0 0 0-2.44 2.44l2.44 5.48 2.44-5.48a2.4 2.4 0 0 0-2.44-2.44"}),/* @__PURE__ */e.createElement("path",{fill:"#018990",d:"M23.65 60.01a2.4 2.4 0 0 1 2.44 2.44l-2.44 5.48-2.44-5.48A2.4 2.4 0 0 1 23.65 60"})),/* @__PURE__ */e.createElement("defs",null,/* @__PURE__ */e.createElement("clipPath",{id:"clip0_9177_567"},/* @__PURE__ */e.createElement("path",{fill:"#fff",d:"M4 4h104v104H4z"}))));export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";const l=l=>/* @__PURE__ */e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */e.createElement("circle",{cx:56,cy:56,r:56,fill:"#edf9fa"}),/* @__PURE__ */e.createElement("path",{fill:"#8ee2e7",d:"M19 25a4 4 0 0 1 4-4h35l13 14v48a4 4 0 0 1-4 4H23a4 4 0 0 1-4-4z"}),/* @__PURE__ */e.createElement("path",{fill:"#2fcbd4",d:"M71 35 58 21v14z"}),/* @__PURE__ */e.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M62.
|
|
1
|
+
import*as e from"react";const l=l=>/* @__PURE__ */e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */e.createElement("circle",{cx:56,cy:56,r:56,fill:"#edf9fa"}),/* @__PURE__ */e.createElement("path",{fill:"#8ee2e7",d:"M19 25a4 4 0 0 1 4-4h35l13 14v48a4 4 0 0 1-4 4H23a4 4 0 0 1-4-4z"}),/* @__PURE__ */e.createElement("path",{fill:"#2fcbd4",d:"M71 35 58 21v14z"}),/* @__PURE__ */e.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M62.56 44H40.44c-.8 0-1.44-.65-1.44-1.44v-.12c0-.8.65-1.44 1.44-1.44h22.12c.8 0 1.44.65 1.44 1.44v.12c0 .8-.65 1.44-1.44 1.44m0 11H40.44c-.8 0-1.44-.65-1.44-1.44v-.12c0-.8.65-1.44 1.44-1.44h22.12c.8 0 1.44.65 1.44 1.44v.12c0 .8-.65 1.44-1.44 1.44m0 11H40.44c-.8 0-1.44-.65-1.44-1.44v-.12c0-.8.65-1.44 1.44-1.44h22.12c.8 0 1.44.65 1.44 1.44v.12c0 .8-.65 1.44-1.44 1.44m0 11H40.44c-.8 0-1.44-.65-1.44-1.44v-.12c0-.8.65-1.44 1.44-1.44h22.12c.8 0 1.44.65 1.44 1.44v.12c0 .8-.65 1.44-1.44 1.44",clipRule:"evenodd"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"m29.87 44.57 3.17-3.17-.63-.63-2.54 2.54-1.28-1.28-.63.63zM30.5 47a4.4 4.4 0 0 1-3.18-1.32 4.5 4.5 0 0 1-.97-4.94A4.5 4.5 0 0 1 30.5 38a4.4 4.4 0 0 1 3.18 1.32 4.6 4.6 0 0 1 .97 4.94 4.6 4.6 0 0 1-2.4 2.39q-.81.35-1.75.35m-.63 8.57 3.17-3.17-.63-.63-2.54 2.54-1.28-1.28-.63.63zM30.5 58a4.4 4.4 0 0 1-3.18-1.32 4.5 4.5 0 0 1-.97-4.94A4.5 4.5 0 0 1 30.5 49a4.4 4.4 0 0 1 3.18 1.32 4.6 4.6 0 0 1 .97 4.94 4.6 4.6 0 0 1-2.4 2.39q-.81.35-1.75.35m-.63 8.57 3.17-3.17-.63-.63-2.54 2.54-1.28-1.28-.63.63zM30.5 69a4.4 4.4 0 0 1-3.18-1.32 4.5 4.5 0 0 1-.97-4.94A4.5 4.5 0 0 1 30.5 60a4.4 4.4 0 0 1 3.18 1.32 4.6 4.6 0 0 1 .97 4.93 4.6 4.6 0 0 1-2.4 2.4q-.81.35-1.75.35m-.63 8.57 3.17-3.17-.63-.63-2.54 2.54-1.28-1.28-.63.63zM30.5 80a4.4 4.4 0 0 1-3.18-1.32 4.5 4.5 0 0 1-.97-4.94A4.5 4.5 0 0 1 30.5 71a4.4 4.4 0 0 1 3.18 1.32 4.6 4.6 0 0 1 .97 4.94 4.6 4.6 0 0 1-2.4 2.39q-.81.35-1.75.35"}),/* @__PURE__ */e.createElement("path",{fill:"#00c0ca",d:"M79.02 84.3a22.5 22.5 0 1 0 0-45.02 22.5 22.5 0 0 0 0 45.01"}),/* @__PURE__ */e.createElement("path",{fill:"#fff",d:"M79 79.39a17.38 17.38 0 1 0 0-34.77 17.38 17.38 0 0 0 0 34.77"}),/* @__PURE__ */e.createElement("path",{fill:"#00c0ca",d:"M79 73.26a11.25 11.25 0 1 0 0-22.5 11.25 11.25 0 0 0 0 22.5"}),/* @__PURE__ */e.createElement("path",{fill:"#fff",d:"M79 67.12a5.1 5.1 0 1 0 0-10.22 5.1 5.1 0 0 0 0 10.22"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"M98.65 42.35V35.4l-3.93 3.93v6.94h6.94l3.94-3.93z"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"M92.1 48.9v-6.94l-3.92 3.93v6.93h6.93l3.93-3.93z"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",d:"M79 62.4a.4.4 0 0 1-.29-.11.4.4 0 0 1 0-.59l23.32-23.3a.4.4 0 0 1 .59 0c.16.15.16.4 0 .58L79.3 62.3a.4.4 0 0 1-.3.12z"}));export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";const l=l=>/* @__PURE__ */e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */e.createElement("circle",{cx:56,cy:56,r:56,fill:"#edf9fa"}),/* @__PURE__ */e.createElement("path",{fill:"#018990",fillRule:"evenodd",d:"M42.
|
|
1
|
+
import*as e from"react";const l=l=>/* @__PURE__ */e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */e.createElement("circle",{cx:56,cy:56,r:56,fill:"#edf9fa"}),/* @__PURE__ */e.createElement("path",{fill:"#018990",fillRule:"evenodd",d:"M42.68 51.04a6.24 6.24 0 0 1-6.23-6.26 6.24 6.24 0 0 1 6.23-6.26c3.44 0 6.22 2.8 6.22 6.26a6.24 6.24 0 0 1-6.22 6.26m18.68-3.43v-5.66l-4.44-1.13a15 15 0 0 0-1.39-3.36l2.35-3.96-3.99-4-3.93 2.35a15 15 0 0 0-3.34-1.39L45.5 26h-5.63l-1.12 4.46q-1.77.5-3.34 1.4l-3.94-2.36-3.98 4 2.34 3.96a15 15 0 0 0-1.38 3.36L24 41.95v5.66l4.44 1.13q.5 1.79 1.38 3.36l-2.34 3.96 3.98 4 3.94-2.35q1.57.89 3.34 1.39l1.12 4.46h5.63l1.13-4.46q1.77-.5 3.34-1.4l3.93 2.36 3.99-4-2.35-3.96a15 15 0 0 0 1.39-3.36z",clipRule:"evenodd"}),/* @__PURE__ */e.createElement("path",{fill:"#026d72",fillRule:"evenodd",d:"M70.65 74.37a5.8 5.8 0 0 1-5.78-5.82 5.8 5.8 0 0 1 5.78-5.81 5.8 5.8 0 0 1 5.78 5.81 5.8 5.8 0 0 1-5.78 5.82M88 71.18v-5.26l-4.12-1.05q-.46-1.66-1.29-3.12l2.18-3.67-3.7-3.72-3.66 2.18q-1.45-.82-3.1-1.29l-1.05-4.14h-5.23l-1.05 4.14q-1.64.45-3.1 1.3l-3.65-2.2-3.7 3.73 2.17 3.67q-.83 1.46-1.28 3.12l-4.13 1.05v5.26l4.13 1.06q.45 1.65 1.28 3.11l-2.17 3.68 3.7 3.72 3.65-2.19q1.46.84 3.1 1.3L68.03 86h5.23l1.05-4.15q1.65-.46 3.1-1.29l3.66 2.19 3.7-3.72-2.18-3.68q.83-1.46 1.29-3.11z",clipRule:"evenodd"}),/* @__PURE__ */e.createElement("path",{fill:"#8ee2e7",fillRule:"evenodd",d:"m72.52 43.09-6.86-1.33 7.26-8.28q-.97-.15-1.99-.15a12.5 12.5 0 0 0-12.46 12.53 12.5 12.5 0 0 0 12.46 12.53 12.5 12.5 0 0 0 12.38-13.97z",clipRule:"evenodd"}),/* @__PURE__ */e.createElement("path",{fill:"#8ee2e7",fillRule:"evenodd",d:"m72.52 43.09-12.9-2.5a12.5 12.5 0 0 0-.21 10.06l-27.66 25.8a6.8 6.8 0 0 0 8.67 8.5l.36-.12 25.48-27.35q2.18.9 4.67.91A12.5 12.5 0 0 0 83.4 45.86c0-3.76-1.65-7.13-4.26-9.43z",clipRule:"evenodd"}),/* @__PURE__ */e.createElement("path",{fill:"#01a4ad",fillRule:"evenodd",d:"m59.38 60.1-2.7-2.73 2.7-2.73 2.72 2.73z",clipRule:"evenodd"}));export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as a from"react";const l=l=>/* @__PURE__ */a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */a.createElement("circle",{cx:56,cy:56,r:56,fill:"#edf9fa"}),/* @__PURE__ */a.createElement("path",{fill:"#01a4ad",d:"M62.2 27.
|
|
1
|
+
import*as a from"react";const l=l=>/* @__PURE__ */a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:112,height:112,fill:"none",viewBox:"0 0 112 112",...l},/* @__PURE__ */a.createElement("circle",{cx:56,cy:56,r:56,fill:"#edf9fa"}),/* @__PURE__ */a.createElement("path",{fill:"#01a4ad",d:"M62.2 27.12a.9.9 0 0 1 1.3-.22l-.54.75.54-.75.03.02.08.06A15 15 0 0 1 64.85 28c.8.71 1.87 1.76 2.98 3.1a22.5 22.5 0 0 1 5.1 11.1l.06.46.01.1a.93.93 0 0 1-1.85.1c-.5-4.44-2.67-8.05-4.75-10.58a26 26 0 0 0-3.9-3.82l-.06-.04-.02-.01a.9.9 0 0 1-.21-1.3m2.27-5.44a.9.9 0 0 1 1.26-.35l-.4.7.4-.7h.02q0 .02.03.02l.47.3q.5.3 1.33.9a32 32 0 0 1 4.07 3.5c3 3.07 6.23 7.67 6.84 13.65a.93.93 0 1 1-1.84.18c-.55-5.4-3.47-9.63-6.32-12.54a30 30 0 0 0-5.4-4.33l-.08-.05-.02-.02a.9.9 0 0 1-.36-1.26M24.52 65.33c.5-.11 1 .2 1.1.7l.03.08.09.31q.11.41.4 1.14c.37.96.98 2.25 1.9 3.58A14 14 0 0 0 38 77.23a.93.93 0 0 1-.24 1.83 15.8 15.8 0 0 1-11.23-6.86 20 20 0 0 1-2.68-5.71l-.01-.03v-.01l.9-.22-.9.21a.9.9 0 0 1 .69-1.1m-6.64 3.23c.5-.13 1 .17 1.13.67v.02l.16.5q.17.54.57 1.48a23 23 0 0 0 2.68 4.63 19.4 19.4 0 0 0 13.8 7.79.93.93 0 0 1-.2 1.84 21.2 21.2 0 0 1-15.08-8.52 25 25 0 0 1-3.67-7.1l-.04-.13v-.03l-.01-.01.9-.24-.9.23c-.13-.5.17-1 .66-1.13"}),/* @__PURE__ */a.createElement("path",{fill:"#2fcbd4",d:"M51.77 56.28c.46.61.12.94-.16 1.23-.55.56-.94.22-1.1.05L34.4 41.39a3.9 3.9 0 0 0-4.84-.6 3.8 3.8 0 0 0-.6 5.81l15.98 16.03c.42.43.42 1-.13 1.53-.54.53-.91.56-1.37.2l-10.29-8.41a3.86 3.86 0 0 0-4.87-.1 3.8 3.8 0 0 0 0 5.84l10.76 8.8 8.16 8.25c5.67 5.28 8.3 10.36 15.5 11.07 7.18.72 14.67-5.18 20.13-11.07 5.47-5.9 5.66-13.83 4.46-18.08-1.48-5.21-.28-14.21.27-17.63.17-1.04-.46-2.1-1.48-2.3-2.26-.44-5.29 1.41-8.17 5.63-3.72 5.4-2.15 13.08-3.77 11.45-1.62-1.62-7.09-9.22-7.09-9.22L55.44 29.13a3.9 3.9 0 0 0-4.55-1.77 3.8 3.8 0 0 0-1.98 5.5l10.68 17.92c.22.37.09.88-.5 1.25-.6.37-1.02.12-1.26-.2L42.39 31.15a3.9 3.9 0 0 0-4.71-1.28 3.8 3.8 0 0 0-1.4 5.67z"}),/* @__PURE__ */a.createElement("path",{fill:"#01a4ad",d:"M82.83 78.75c-5.47 5.89-12.95 11.78-20.14 11.07-5.13-.5-7.94-3.24-11.2-6.7 2.38 2.2 4.9 3.8 8.7 4.18 7.19.7 14.67-5.18 20.14-11.07S86 62.4 84.8 58.15c-1.45-5.12-.32-13.91.25-17.45q.54-.05 1.04.04c1.02.2 1.64 1.26 1.48 2.3-.55 3.42-1.75 12.42-.27 17.63 1.2 4.25 1.01 12.2-4.46 18.08"}),/* @__PURE__ */a.createElement("path",{fill:"#01a4ad",d:"M68.86 60.7a.93.93 0 0 1 1.6.91v.02l-.16.3q-.16.31-.42.92c-.32.8-.71 1.91-.94 3.19-.46 2.48-.32 5.44 1.77 7.91l.21.24.06.07a.92.92 0 0 1-1.42 1.17c-2.84-3.11-2.97-6.87-2.44-9.73a18 18 0 0 1 1.67-4.89l.05-.08v-.02z"}));export{l as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as a,jsxs as e}from"react/jsx-runtime";import{GAUGE_CONSTANTS as
|
|
2
|
-
return a(
|
|
3
|
-
/* @__PURE__ */a(
|
|
4
|
-
/* @__PURE__ */a(
|
|
5
|
-
/* @__PURE__ */a(
|
|
6
|
-
/* @__PURE__ */a(
|
|
1
|
+
import{jsx as a,jsxs as e}from"react/jsx-runtime";import{GAUGE_CONSTANTS as i}from"./constants.js";import{useGaugeCalculations as o}from"./hooks/useGaugeCalculations.js";import{GaugeBorders as r}from"./components/GaugeBorders.js";import{GaugeMarkers as l}from"./components/GaugeMarkers.js";import{GaugeLabels as m}from"./components/GaugeLabels.js";import{GaugeBackground as n}from"./components/GaugeBackground.js";import{Box as t}from"@mui/material";import{useContainerWidth as s}from"./hooks/useContainerWidth.js";import{useTheme as u}from"@mui/material/styles";const p=p=>{const c=u(),{minValue:g,maxValue:d,medianValue:b,averageValue:h,companyValue:v,labelAverage:A=i.TEXT.DEFAULT_AVERAGE_LABEL,labelCompany:E=i.TEXT.DEFAULT_COMPANY_LABEL,labelMinimum:V=i.TEXT.DEFAULT_MINIMUM_LABEL,labelMedian:L=i.TEXT.DEFAULT_MEDIAN_LABEL,labelMaximum:M=i.TEXT.DEFAULT_MAXIMUM_LABEL,width:T,height:y=i.DEFAULT_HEIGHT,label:f,animated:k=!1,backgroundProps:F,precision:P=0,unit:_="",ariaLabel:D,valueFormatter:U=c.numbers.valueFormatterFn}=p,{containerRef:Y,containerWidth:j}=s(),x=j||T||i.DEFAULT_WIDTH,{scale:B,companyPosition:w,averagePosition:C,gaugeBackgroundProps:G,markerY:I,companyMarkerY:X,averageMarkerY:H,labelY:N,labelPositions:W}=o({minValue:g,maxValue:d,companyValue:v,averageValue:h,labelCompany:E,labelAverage:A,width:x,height:y});/* @__PURE__ */
|
|
2
|
+
return a(t,{ref:Y,width:T||"100%",height:y,position:"relative",children:/* @__PURE__ */e("svg",{width:j,height:y,style:{overflow:"visible"},role:D?"img":void 0,"aria-label":D,"aria-hidden":!D||void 0,children:[
|
|
3
|
+
/* @__PURE__ */a(r,{width:j,height:y,scale:B,medianValue:b,animated:k}),
|
|
4
|
+
/* @__PURE__ */a(n,{...G,backgroundProps:F,animated:k}),
|
|
5
|
+
/* @__PURE__ */a(l,{width:j,scale:B,companyValue:v,averageValue:h,markersYPosition:I,companyMarkerY:X,averageMarkerY:H,minValue:g,maxValue:d,animated:k,precision:P,unit:_,labelCompany:E,labelAverage:A,valueFormatter:U}),
|
|
6
|
+
/* @__PURE__ */a(m,{minValue:g,maxValue:d,medianValue:b,companyValue:v,averageValue:h,companyPosition:w,averagePosition:C,labelCompany:E,labelAverage:A,labelMinimum:V,labelMedian:L,labelMaximum:M,labelYPositions:N,labelPositions:W,animated:k,precision:P,unit:_,valueFormatter:U})]})})};export{p as HorizontalGaugeChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GaugeBordersProps } from '../types';
|
|
2
|
-
export declare const GaugeBorders: ({ width, height,
|
|
2
|
+
export declare const GaugeBorders: ({ width, height, medianValue, scale, animated }: GaugeBordersProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useRef as
|
|
2
|
-
/* @__PURE__ */r("line",{x1:
|
|
3
|
-
/* @__PURE__ */r("line",{x1:
|
|
4
|
-
/* @__PURE__ */r("line",{x1:
|
|
5
|
-
/* @__PURE__ */r("line",{x1:
|
|
6
|
-
/* @__PURE__ */r("line",{x1:
|
|
1
|
+
import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useRef as e,useEffect as D}from"react";import{GAUGE_CONSTANTS as E}from"../constants.js";const G=({width:G,height:s,medianValue:a,scale:o,animated:i=!1})=>{const A=e(null);return D(()=>{if(A.current&&i){const t=A.current;t.style.opacity="0",setTimeout(()=>{t.style.transition="all 0.5s linear",t.style.opacity="1"},300)}},[i]),/* @__PURE__ */t("g",{ref:A,style:{opacity:i?"0":"1"},children:[
|
|
2
|
+
/* @__PURE__ */r("line",{x1:E.GAUGE_PADDING,y1:1,x2:G-E.GAUGE_PADDING,y2:1,stroke:E.COLORS.BORDER,strokeWidth:"1",strokeDasharray:E.BORDER_DASH_PATTERN}),
|
|
3
|
+
/* @__PURE__ */r("line",{x1:E.GAUGE_PADDING,y1:s-E.LEGEND_HEIGHT,x2:G-E.GAUGE_PADDING,y2:s-E.LEGEND_HEIGHT,stroke:E.COLORS.BORDER,strokeWidth:"1",strokeDasharray:E.BORDER_DASH_PATTERN}),
|
|
4
|
+
/* @__PURE__ */r("line",{x1:E.GAUGE_PADDING,y1:0,x2:E.GAUGE_PADDING,y2:s-E.LEGEND_HEIGHT,stroke:E.COLORS.BORDER,strokeWidth:"1",strokeDasharray:E.BORDER_DASH_PATTERN}),
|
|
5
|
+
/* @__PURE__ */r("line",{x1:G-E.GAUGE_PADDING,y1:0,x2:G-E.GAUGE_PADDING,y2:s-E.LEGEND_HEIGHT,stroke:E.COLORS.BORDER,strokeWidth:"1",strokeDasharray:E.BORDER_DASH_PATTERN}),
|
|
6
|
+
/* @__PURE__ */r("line",{"data-testid":"horizontal-gauge-median-guide",x1:o(a)+E.GAUGE_PADDING,y1:0,x2:o(a)+E.GAUGE_PADDING,y2:s-E.LEGEND_HEIGHT,stroke:E.COLORS.BORDER,strokeWidth:"1",strokeDasharray:E.BORDER_DASH_PATTERN})]})};export{G as GaugeBorders};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GaugeLabelsProps } from '../types';
|
|
2
|
-
export declare const GaugeLabels: ({ minValue, maxValue, companyValue, averageValue, companyPosition, averagePosition, labelCompany, labelAverage, labelYPositions, labelPositions, animated, precision, unit, valueFormatter, }: GaugeLabelsProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const GaugeLabels: ({ minValue, maxValue, medianValue, companyValue, averageValue, companyPosition, averagePosition, labelCompany, labelAverage, labelMinimum, labelMedian, labelMaximum, labelYPositions, labelPositions, animated, precision, unit, valueFormatter, }: GaugeLabelsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import{jsxs as
|
|
2
|
-
/* @__PURE__ */
|
|
3
|
-
/* @__PURE__ */e("text",{
|
|
4
|
-
/* @__PURE__ */
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as i,useEffect as n}from"react";import{FoodsTooltip as l}from"../../../Tooltip/FoodsTooltip.js";import{GaugeTooltip as a}from"./GaugeTooltip.js";import{formatValue as o}from"../utils/formatters.js";import{useTheme as r}from"@mui/material";const m=({minValue:m,maxValue:s,medianValue:d,companyValue:c,averageValue:h,companyPosition:u,averagePosition:f,labelCompany:x,labelAverage:p,labelMinimum:y,labelMedian:g,labelMaximum:b,labelYPositions:v,labelPositions:W,animated:A,precision:z=0,unit:B="",valueFormatter:S})=>{const V=r(),j=i(null),F={transition:A?"transform 0.3s linear":"none"},P=V.custom.grey[2800],T=e=>e>=m&&e<=s;return n(()=>{if(j.current&&A){const e=j.current;e.style.opacity="0",setTimeout(()=>{e.style.transition="all 0.5s linear",e.style.opacity="1"},300)}},[A]),/* @__PURE__ */e("g",{ref:j,children:[
|
|
2
|
+
/* @__PURE__ */e("g",{children:[
|
|
3
|
+
/* @__PURE__ */e("text",{x:W.min.x,y:v.values,fill:P,fontSize:"12",fontWeight:"bold",textAnchor:W.min.anchor,dominantBaseline:"middle",style:F,children:[S?S(m):o(m,z),
|
|
4
|
+
/* @__PURE__ */e("tspan",{x:W.min.x,y:v.legend,fontWeight:"400","aria-hidden":"true",children:["(",y,")"]})]}),
|
|
5
|
+
/* @__PURE__ */e("text",{x:W.median.x,y:v.values,fill:P,fontSize:"12",fontWeight:"bold",textAnchor:W.median.anchor,dominantBaseline:"middle",style:F,children:[S?S(d):o(d,z),
|
|
6
|
+
/* @__PURE__ */e("tspan",{x:W.median.x,y:v.legend,fontWeight:"400","aria-hidden":"true",children:["(",g,")"]})]}),
|
|
7
|
+
/* @__PURE__ */e("text",{x:W.max.x,y:v.values,fill:P,fontSize:"12",fontWeight:"bold",textAnchor:W.max.anchor,dominantBaseline:"middle",style:F,children:[S?S(s):o(s,z),
|
|
8
|
+
/* @__PURE__ */e("tspan",{x:W.max.x,y:v.legend,fontWeight:"400","aria-hidden":"true",children:["(",b,")"]})]})]}),
|
|
9
|
+
/* @__PURE__ */e("g",{cursor:"default",children:[T(c)&&/* @__PURE__ */t(l,{width:"unset",title:/* @__PURE__ */t(a,{label:x,value:c,unit:B,precision:z,valueFormatter:S}),children:/* @__PURE__ */t("text",{transform:`translate(${u.x}, ${v.company})`,fill:P,textAnchor:u.anchor,dominantBaseline:"middle",fontWeight:"700",fontSize:"12",style:F,children:x})}),T(h)&&/* @__PURE__ */t(l,{width:"unset",title:/* @__PURE__ */t(a,{label:p,value:h,unit:B,precision:z,valueFormatter:S}),children:/* @__PURE__ */t("text",{transform:`translate(${f.x}, ${v.average})`,fill:P,fontSize:"12",fontWeight:"500",textAnchor:f.anchor,dominantBaseline:"middle",style:F,children:p})})]})]})};export{m as GaugeLabels};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsxs as
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as r,useEffect as a}from"react";import{GAUGE_CONSTANTS as o}from"../constants.js";import{FoodsTooltip as i}from"../../../Tooltip/FoodsTooltip.js";import{GaugeTooltip as l}from"./GaugeTooltip.js";import{useTheme as n}from"@mui/material";const s=({scale:s,companyValue:m,averageValue:c,markersYPosition:u,companyMarkerY:A,averageMarkerY:p,animated:y=!1,minValue:d,maxValue:E,precision:G=2,unit:R="",labelCompany:h="",labelAverage:f="",valueFormatter:k})=>{const g=n(),D=r(null),_={transition:y?"transform 0.3s linear":"none"},I=g.custom.grey[2800],T=e=>e>=d&&e<=E;return a(()=>{if(D.current&&y){const e=D.current;e.style.opacity="0",setTimeout(()=>{e.style.transition="all 0.5s linear",e.style.opacity="1"},300)}},[y]),/* @__PURE__ */e("g",{ref:D,children:[[d,E].map((r,a)=>{const i=`edge-${a}`,l=o.GAUGE_PADDING+s(r);/* @__PURE__ */
|
|
2
|
+
return e("g",{transform:`translate(${l}, 0)`,style:_,children:[
|
|
3
|
+
/* @__PURE__ */t("circle",{cy:u,r:o.MARKER.EDGE_RADIUS,fill:I}),
|
|
4
|
+
/* @__PURE__ */t("line",{y1:u-o.GAUGE_HEIGHT/2,y2:u+o.GAUGE_HEIGHT/2,stroke:I,strokeWidth:"2"})]},i)}),T(m)&&/* @__PURE__ */t(i,{width:"unset",title:/* @__PURE__ */t(l,{label:h,value:m,unit:R,precision:G,valueFormatter:k}),children:/* @__PURE__ */e("g",{transform:`translate(${o.GAUGE_PADDING+s(m)}, 0)`,style:_,children:[
|
|
5
|
+
/* @__PURE__ */t("line",{y1:A.start,y2:A.end,stroke:I,strokeWidth:"1"}),
|
|
6
|
+
/* @__PURE__ */t("circle",{cy:u,r:o.MARKER.COMPANY_RADIUS,stroke:I,strokeWidth:o.MARKER.COMPANY_STROKE_WIDTH,fill:g.palette.common.white})]})}),T(c)&&/* @__PURE__ */t(i,{width:"unset",title:/* @__PURE__ */t(l,{label:f,value:c,unit:R,precision:G,valueFormatter:k}),children:/* @__PURE__ */e("g",{"data-testid":"horizontal-gauge-average-marker",transform:`translate(${o.GAUGE_PADDING+s(c)}, 0)`,style:_,children:[
|
|
7
|
+
/* @__PURE__ */t("line",{y1:p.start,y2:p.end,stroke:I,strokeWidth:"1"}),
|
|
8
|
+
/* @__PURE__ */t("circle",{cy:u,r:o.MARKER.AVERAGE_RADIUS,fill:g.palette.common.white,stroke:I,strokeWidth:o.MARKER.AVERAGE_STROKE_WIDTH})]})})]})};export{s as GaugeMarkers};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const GAUGE_CONSTANTS: {
|
|
2
2
|
readonly DEFAULT_WIDTH: 500;
|
|
3
|
-
readonly DEFAULT_HEIGHT:
|
|
3
|
+
readonly DEFAULT_HEIGHT: 220;
|
|
4
4
|
readonly GAUGE_HEIGHT: 28;
|
|
5
5
|
readonly GAUGE_PADDING: 8;
|
|
6
|
-
readonly
|
|
6
|
+
readonly LEGEND_HEIGHT: 48;
|
|
7
7
|
readonly FONT_SIZE: {
|
|
8
8
|
readonly DEFAULT: 12;
|
|
9
9
|
readonly LABEL: 14;
|
|
@@ -16,7 +16,7 @@ export declare const GAUGE_CONSTANTS: {
|
|
|
16
16
|
readonly EDGE_RADIUS: 3;
|
|
17
17
|
};
|
|
18
18
|
readonly COLORS: {
|
|
19
|
-
readonly BORDER: "#
|
|
19
|
+
readonly BORDER: "#E0DEDD";
|
|
20
20
|
readonly TEXT: "#393A36";
|
|
21
21
|
readonly MARKER: "#393A36";
|
|
22
22
|
readonly GRADIENT: {
|
|
@@ -24,9 +24,13 @@ export declare const GAUGE_CONSTANTS: {
|
|
|
24
24
|
readonly END: "#EB9411";
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
readonly BORDER_DASH_PATTERN: "4 4";
|
|
27
28
|
readonly TEXT: {
|
|
28
29
|
readonly DEFAULT_COMPANY_LABEL: "";
|
|
29
30
|
readonly DEFAULT_AVERAGE_LABEL: "";
|
|
31
|
+
readonly DEFAULT_MINIMUM_LABEL: "Min";
|
|
32
|
+
readonly DEFAULT_MEDIAN_LABEL: "Median";
|
|
33
|
+
readonly DEFAULT_MAXIMUM_LABEL: "Max";
|
|
30
34
|
};
|
|
31
35
|
readonly LAYOUT: {
|
|
32
36
|
readonly COMPANY_MARKER_OFFSET: 18;
|
|
@@ -37,6 +41,7 @@ export declare const GAUGE_CONSTANTS: {
|
|
|
37
41
|
readonly COMPANY_LABEL_OFFSET: 8;
|
|
38
42
|
readonly AVERAGE_LABEL_OFFSET: 12;
|
|
39
43
|
readonly TITLE_OFFSET: 35;
|
|
40
|
-
readonly VALUES_LABEL_OFFSET:
|
|
44
|
+
readonly VALUES_LABEL_OFFSET: 28;
|
|
45
|
+
readonly LEGEND_LABEL_OFFSET: 8;
|
|
41
46
|
};
|
|
42
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const E={DEFAULT_WIDTH:500,DEFAULT_HEIGHT:
|
|
1
|
+
const E={DEFAULT_WIDTH:500,DEFAULT_HEIGHT:220,GAUGE_HEIGHT:28,GAUGE_PADDING:8,LEGEND_HEIGHT:48,FONT_SIZE:{DEFAULT:12},MARKER:{COMPANY_RADIUS:5,COMPANY_STROKE_WIDTH:3,AVERAGE_RADIUS:3,AVERAGE_STROKE_WIDTH:2,EDGE_RADIUS:3},COLORS:{BORDER:"#E0DEDD",GRADIENT:{START:"#F0DF46",END:"#EB9411"}},BORDER_DASH_PATTERN:"4 4",TEXT:{DEFAULT_COMPANY_LABEL:"",DEFAULT_AVERAGE_LABEL:"",DEFAULT_MINIMUM_LABEL:"Min",DEFAULT_MEDIAN_LABEL:"Median",DEFAULT_MAXIMUM_LABEL:"Max"},LAYOUT:{COMPANY_MARKER_OFFSET:18,AVERAGE_MARKER_TOP_OFFSET:12,AVERAGE_MARKER_BOTTOM_OFFSET:4,COMPANY_LABEL_VERTICAL_RATIO:.25,AVERAGE_LABEL_VERTICAL_RATIO:.75,COMPANY_LABEL_OFFSET:8,AVERAGE_LABEL_OFFSET:12,TITLE_OFFSET:35,VALUES_LABEL_OFFSET:28,LEGEND_LABEL_OFFSET:8}};export{E as GAUGE_CONSTANTS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GAUGE_CONSTANTS as A}from"../constants.js";import{getLabelPosition as E,
|
|
1
|
+
import{GAUGE_CONSTANTS as A}from"../constants.js";import{getLabelPosition as E,createScale as a}from"../utils/utils.js";const e=({minValue:e,maxValue:T,companyValue:_,averageValue:G,labelCompany:O,labelAverage:L,width:r,height:n})=>{const o=a(e,T,r),t=E(_,O,o,r),i=E(G,L,o,r),l=n/2,U=l-A.GAUGE_HEIGHT,m=U+A.GAUGE_HEIGHT/2,Y={start:l-A.LAYOUT.COMPANY_MARKER_OFFSET,end:U-A.LAYOUT.COMPANY_MARKER_OFFSET},F={start:l-A.LAYOUT.AVERAGE_MARKER_TOP_OFFSET,end:l+A.GAUGE_HEIGHT-A.LAYOUT.AVERAGE_MARKER_BOTTOM_OFFSET},s={company:n*A.LAYOUT.COMPANY_LABEL_VERTICAL_RATIO-A.LAYOUT.COMPANY_LABEL_OFFSET,average:n*A.LAYOUT.AVERAGE_LABEL_VERTICAL_RATIO-A.LAYOUT.AVERAGE_LABEL_OFFSET,title:U-A.LAYOUT.TITLE_OFFSET,values:n-A.LAYOUT.VALUES_LABEL_OFFSET,legend:n-A.LAYOUT.LEGEND_LABEL_OFFSET},R={min:{x:A.GAUGE_PADDING,anchor:"middle"},median:{x:r/2,anchor:"middle"},max:{x:r-A.GAUGE_PADDING,anchor:"middle"}};return{scale:o,companyPosition:t,averagePosition:i,gaugeBackgroundProps:{x:A.GAUGE_PADDING,y:m-A.GAUGE_HEIGHT/2,width:r-2*A.GAUGE_PADDING,height:A.GAUGE_HEIGHT,animated:!1},markerY:m,companyMarkerY:Y,averageMarkerY:F,labelY:s,labelPositions:R}};export{e as useGaugeCalculations};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export type HorizontalGaugeChartProps = {
|
|
2
2
|
minValue: number;
|
|
3
3
|
maxValue: number;
|
|
4
|
+
medianValue: number;
|
|
4
5
|
companyValue: number;
|
|
5
6
|
averageValue: number;
|
|
7
|
+
labelMinimum?: string;
|
|
8
|
+
labelMedian?: string;
|
|
9
|
+
labelMaximum?: string;
|
|
6
10
|
labelAverage?: string;
|
|
7
11
|
labelCompany?: string;
|
|
8
12
|
width?: number;
|
|
@@ -12,6 +16,7 @@ export type HorizontalGaugeChartProps = {
|
|
|
12
16
|
backgroundProps?: BackgroundProps;
|
|
13
17
|
precision?: number;
|
|
14
18
|
unit?: string;
|
|
19
|
+
ariaLabel?: string;
|
|
15
20
|
valueFormatter?: (value: number, precision?: number) => string;
|
|
16
21
|
};
|
|
17
22
|
export type TextAnchor = "start" | "middle" | "end";
|
|
@@ -47,11 +52,12 @@ export type LabelYPositions = {
|
|
|
47
52
|
average: number;
|
|
48
53
|
title: number;
|
|
49
54
|
values: number;
|
|
55
|
+
legend: number;
|
|
50
56
|
};
|
|
51
57
|
export type LabelXPositions = {
|
|
52
|
-
min:
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
min: LabelPosition;
|
|
59
|
+
median: LabelPosition;
|
|
60
|
+
max: LabelPosition;
|
|
55
61
|
};
|
|
56
62
|
export type GaugeCalculationProps = {
|
|
57
63
|
minValue: number;
|
|
@@ -66,7 +72,6 @@ export type GaugeCalculationProps = {
|
|
|
66
72
|
};
|
|
67
73
|
export type GaugeCalculations = {
|
|
68
74
|
scale: (value: number) => number;
|
|
69
|
-
averageValueBoundaries: number;
|
|
70
75
|
companyPosition: LabelPosition;
|
|
71
76
|
averagePosition: LabelPosition;
|
|
72
77
|
gaugeBackgroundProps: GaugeBackgroundProps;
|
|
@@ -79,7 +84,7 @@ export type GaugeCalculations = {
|
|
|
79
84
|
export type GaugeBordersProps = {
|
|
80
85
|
width: number;
|
|
81
86
|
height: number;
|
|
82
|
-
|
|
87
|
+
medianValue: number;
|
|
83
88
|
scale: (value: number) => number;
|
|
84
89
|
animated: boolean;
|
|
85
90
|
};
|
|
@@ -103,12 +108,16 @@ export type GaugeMarkersProps = {
|
|
|
103
108
|
export type GaugeLabelsProps = {
|
|
104
109
|
minValue: number;
|
|
105
110
|
maxValue: number;
|
|
111
|
+
medianValue: number;
|
|
106
112
|
companyValue: number;
|
|
107
113
|
averageValue: number;
|
|
108
114
|
companyPosition: LabelPosition;
|
|
109
115
|
averagePosition: LabelPosition;
|
|
110
116
|
labelCompany: string;
|
|
111
117
|
labelAverage: string;
|
|
118
|
+
labelMinimum: string;
|
|
119
|
+
labelMedian: string;
|
|
120
|
+
labelMaximum: string;
|
|
112
121
|
labelYPositions: LabelYPositions;
|
|
113
122
|
labelPositions: LabelXPositions;
|
|
114
123
|
animated: boolean;
|
|
@@ -2,5 +2,4 @@ import { LabelPosition } from '../types';
|
|
|
2
2
|
export declare const createScale: (minValue: number, maxValue: number, width: number) => (value: number) => number;
|
|
3
3
|
export declare const approximateTextWidth: (text: string, fontSize?: 12) => number;
|
|
4
4
|
export declare const getLabelPosition: (value: number, text: string, scale: (value: number) => number, width: number, fontSize?: 12) => LabelPosition;
|
|
5
|
-
export declare const calculateAverageBoundary: (minValue: number, maxValue: number) => number;
|
|
6
5
|
export declare const getMarkerPositions: (width: number) => number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GAUGE_CONSTANTS as G}from"../constants.js";const A=(A,D,E)=>A===D?()=>(E-2*G.GAUGE_PADDING)/2:n=>(n-A)/(D-A)*(E-2*G.GAUGE_PADDING),D=(A,D=G.FONT_SIZE.DEFAULT)=>A.length*(.6*D),E=(A,E,n,t,o=G.FONT_SIZE.DEFAULT)=>{const r=G.GAUGE_PADDING+n(A),I=D(E,o)/2;return r-I<G.GAUGE_PADDING?{x:G.GAUGE_PADDING,anchor:"start"}:r+I>t-G.GAUGE_PADDING?{x:t-G.GAUGE_PADDING,anchor:"end"}:{x:r,anchor:"middle"}}
|
|
1
|
+
import{GAUGE_CONSTANTS as G}from"../constants.js";const A=(A,D,E)=>A===D?()=>(E-2*G.GAUGE_PADDING)/2:n=>(n-A)/(D-A)*(E-2*G.GAUGE_PADDING),D=(A,D=G.FONT_SIZE.DEFAULT)=>A.length*(.6*D),E=(A,E,n,t,o=G.FONT_SIZE.DEFAULT)=>{const r=G.GAUGE_PADDING+n(A),I=D(E,o)/2;return r-I<G.GAUGE_PADDING?{x:G.GAUGE_PADDING,anchor:"start"}:r+I>t-G.GAUGE_PADDING?{x:t-G.GAUGE_PADDING,anchor:"end"}:{x:r,anchor:"middle"}};export{D as approximateTextWidth,A as createScale,E as getLabelPosition};
|
|
@@ -3,7 +3,7 @@ return e(a,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",pa
|
|
|
3
3
|
/* @__PURE__ */e(n,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",spacing:h.spacing(2),minHeight:h.spacing(4),sx:{width:"100%"},children:[
|
|
4
4
|
/* @__PURE__ */e(n,{direction:"row",alignItems:"flex-start",spacing:1.5,children:[p.isLine?/* @__PURE__ */i(a,{sx:{width:h.spacing(2),transform:`translateY(${h.spacing(1)})`,height:h.spacing(.25),backgroundColor:p.color}}):/* @__PURE__ */i(a,{sx:{minWidth:h.spacing(2),transform:`translateY(${h.spacing(.25)})`,height:h.spacing(2),backgroundColor:p.color,borderRadius:h.spacing(.5)}}),
|
|
5
5
|
/* @__PURE__ */i(r,{variant:"body2",sx:{fontWeight:h.typography.fontWeightBold},children:p.label})]}),
|
|
6
|
-
/* @__PURE__ */i(n,{children:p.complete&&/* @__PURE__ */i(s,{startIcon:"circleCheck",variant:"tags-green",label:m.complete||"",disabled:!0})})]}),p.dataPoints&&p.dataPoints.length>0&&/* @__PURE__ */i(n,{spacing:2,sx:{mt:p.dataPoints[0].startValue&&p.dataPoints[0].endValue?h.spacing(1):0},children:p.dataPoints.map((t,a)=>/* @__PURE__ */e(n,{direction:"row",alignItems:"center",spacing:.5,children:[!!t.startValue&&!!t.endValue&&/* @__PURE__ */i(c,{currentValue:t.endValue,comparedTo:{value:t.startValue,label:t.label},improvement:g,layout:{direction:"horizontal",size:"M"},disableText:!0}),
|
|
6
|
+
/* @__PURE__ */i(n,{children:p.complete&&/* @__PURE__ */i(s,{startIcon:"circleCheck",variant:"tags-green",label:m.complete||"",disabled:!0})})]}),p.dataPoints&&p.dataPoints.length>0&&/* @__PURE__ */i(n,{spacing:2,sx:{mt:p.dataPoints[0].startValue&&p.dataPoints[0].endValue?h.spacing(1):0},children:p.dataPoints.map((t,a)=>/* @__PURE__ */e(n,{direction:"row",alignItems:"center",spacing:.5,children:[!!t.startValue&&!!t.endValue&&/* @__PURE__ */i(c,{currentValue:t.endValue,comparedTo:{value:t.startValue,label:t.label},improvement:g,layout:{direction:"horizontal",size:"M"},mode:"difference",disableText:!0}),
|
|
7
7
|
/* @__PURE__ */i(n,{direction:"column",alignItems:"flex-start",spacing:1,children:t.label&&/* @__PURE__ */i(r,{variant:"small",children:t.label})})]},`${p.key}-${a}`))}),
|
|
8
8
|
/* @__PURE__ */i(a,{children:p.dataPoints&&p.dataPoints.map((t,a)=>t.link&&/* @__PURE__ */i(o,{href:t.link.url,target:"_blank",rel:"noopener noreferrer",sx:{display:"flex",alignItems:"center",textDecoration:"none",gap:h.spacing(1),cursor:"pointer"},children:/* @__PURE__ */e(n,{direction:"row",alignItems:"center",spacing:h.spacing(1),color:h.palette.primary.main,mt:h.spacing(2),sx:{"&:hover":{opacity:.8}},children:[
|
|
9
9
|
/* @__PURE__ */i(l,{icon:t.link.icon,size:1}),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type Improvement = "increase" | "decrease";
|
|
2
|
+
export type ComparisonMode = "performance" | "difference";
|
|
2
3
|
type Horizontal2RowsLayout = {
|
|
3
4
|
direction: "horizontal-2-rows";
|
|
4
5
|
size: "M";
|
|
@@ -25,6 +26,7 @@ type ComparisonBlockProps = {
|
|
|
25
26
|
comparisonText?: string;
|
|
26
27
|
layout?: Layout;
|
|
27
28
|
locale?: string;
|
|
29
|
+
mode?: ComparisonMode;
|
|
28
30
|
};
|
|
29
31
|
export declare const ComparisonBlock: (props: ComparisonBlockProps) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
30
32
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as o,jsx as r}from"react/jsx-runtime";import e from"@mui/material/Box";import{HorizontalMediumBlock as i}from"./Blocks/HorizontalMediumBlock.js";import{useColorAndArrowIcon as t}from"./useColorAndArrow.js";import{VerticalLargeBlock as a}from"./Blocks/VerticalLargeBlock.js";import{VerticalMediumBlock as l}from"./Blocks/VerticalMediumBlock.js";import{HorizontalLargeBlock as c}from"./Blocks/HorizontalLargeBlock.js";import{HorizontalSmallBlock as n}from"./Blocks/HorizontalSmallBlock.js";import{Horizontal2RowsBlock as m}from"./Blocks/Horizontal2RowsBlock.js";const s=s=>{const{currentValue:p,comparedTo:u,comparisonText:d="par rapport à",improvement:f,layout:k={direction:"vertical",size:"L"},disableText:x=!1,locale:z}=s,
|
|
2
|
-
return o(e,{sx:{borderRadius:"12px",background:
|
|
3
|
-
return r(e,{sx:{borderRadius:"12px",background:
|
|
4
|
-
return r(i,{...
|
|
1
|
+
import{jsxs as o,jsx as r}from"react/jsx-runtime";import e from"@mui/material/Box";import{HorizontalMediumBlock as i}from"./Blocks/HorizontalMediumBlock.js";import{useColorAndArrowIcon as t}from"./useColorAndArrow.js";import{VerticalLargeBlock as a}from"./Blocks/VerticalLargeBlock.js";import{VerticalMediumBlock as l}from"./Blocks/VerticalMediumBlock.js";import{HorizontalLargeBlock as c}from"./Blocks/HorizontalLargeBlock.js";import{HorizontalSmallBlock as n}from"./Blocks/HorizontalSmallBlock.js";import{Horizontal2RowsBlock as m}from"./Blocks/Horizontal2RowsBlock.js";const s=s=>{const{currentValue:p,comparedTo:u,comparisonText:d="par rapport à",improvement:f,layout:k={direction:"vertical",size:"L"},disableText:x=!1,locale:z,mode:B="performance"}=s,b=Number(u.value),y=t({currentValue:p,previousValue:b,improvement:f,layout:k,mode:B}),g=b>0?Math.abs(100-p/b*100):null,w=null!==g?new Intl.NumberFormat(z,{style:"percent",notation:"compact",minimumFractionDigits:0,maximumFractionDigits:0}).format(g/100):"",h=new Intl.NumberFormat(z).format(b),j={comparisonText:d,percentageDifference:w,comparedTo:{...u,value:h},iconName:y.icon,colors:y.color,disableText:x};if("vertical"===k.direction)/* @__PURE__ */
|
|
2
|
+
return o(e,{sx:{borderRadius:"12px",background:y.color.secondaryColor,width:"fit-content",padding:"M"===s.layout?.size?"8px":"16px"},className:"comparison-block-wrapper",children:["L"===s.layout?.size&&/* @__PURE__ */r(a,{...j}),"M"===s.layout?.size&&/* @__PURE__ */r(l,{...j})]});if("horizontal"===k.direction){if("L"===s.layout?.size)/* @__PURE__ */
|
|
3
|
+
return r(e,{sx:{borderRadius:"12px",background:y.color.secondaryColor,width:"fit-content",padding:"24px 16px"},className:"comparison-block-wrapper",children:/* @__PURE__ */r(c,{...j})});if("M"===s.layout?.size)/* @__PURE__ */
|
|
4
|
+
return r(i,{...j})}return"horizontal-2-rows"===k.direction&&"M"===k.size?/* @__PURE__ */r(e,{children:/* @__PURE__ */r(m,{...j})}):"S"===s.layout?.size?/* @__PURE__ */r(n,{...j}):void 0};export{s as ComparisonBlock};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconMapping } from '../Icons/index.ts';
|
|
2
|
-
import { Improvement, Layout } from './ComparisonBlock.tsx';
|
|
2
|
+
import { ComparisonMode, Improvement, Layout } from './ComparisonBlock.tsx';
|
|
3
3
|
export type ColorSet = {
|
|
4
4
|
primaryColor: string;
|
|
5
5
|
secondaryColor: string;
|
|
@@ -13,6 +13,12 @@ type Options = {
|
|
|
13
13
|
previousValue: number;
|
|
14
14
|
improvement: Improvement;
|
|
15
15
|
layout: Layout;
|
|
16
|
+
mode?: ComparisonMode;
|
|
16
17
|
};
|
|
18
|
+
type Indicator = {
|
|
19
|
+
icon: keyof IconMapping;
|
|
20
|
+
tone: "good" | "bad" | "neutral";
|
|
21
|
+
};
|
|
22
|
+
export declare const getComparisonIndicator: (options: Options) => Indicator;
|
|
17
23
|
export declare const useColorAndArrowIcon: (options: Options) => IconAndColor;
|
|
18
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme as o}from"@mui/material";const r=
|
|
1
|
+
import{useTheme as o}from"@mui/material";const r=o=>{const{currentValue:r,previousValue:e,improvement:n,layout:t,mode:i="performance"}=o;if(r===e)return{icon:"equal",tone:"neutral"};const a=r>e;if("difference"===i)return{icon:a?"plus":"minus",tone:"neutral"};const c="M"===t.size&&"horizontal"===t.direction;return{icon:a?c?"plus":"arrowUpRight":c?"minus":"arrowDownRight",tone:("increase"===n?a:!a)?"good":"bad"}},e=e=>{const n=o(),t={primaryColor:n.custom.green[500],secondaryColor:n.custom.green[100]},i={primaryColor:n.custom.red[500],secondaryColor:n.custom.red[100]},a={primaryColor:n.palette.primary[700],secondaryColor:n.palette.primary[100]},c={primaryColor:n.custom.grey[2800],secondaryColor:n.custom.grey[300]},m=r(e);return{color:"good"===m.tone?t:"bad"===m.tone?i:"difference"===e.mode?a:c,icon:m.icon}};export{r as getComparisonIndicator,e as useColorAndArrowIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|