@lanaco/lnc-react-ui 4.0.73 → 4.0.74

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,10 +1,10 @@
1
- "use strict";const e=require("react/jsx-runtime"),o=require("react"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-CtNoHdBj.cjs"),z=require("./Button.cjs"),I=require("./index-BPVoEhTF.cjs"),L=require("./RangeSlider.cjs"),F=require("./DropdownItem.cjs"),X=require("./DropdownMenu.cjs"),Z=require("./IconButton.cjs"),V=require("./BannerSectionWithList.cjs"),H=require("./utils-BXPz9bck.cjs"),D=b.styled.div`
1
+ "use strict";const t=require("react/jsx-runtime"),d=require("react"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),y=require("./consts-CtNoHdBj.cjs"),z=require("./Button.cjs"),I=require("./index-BPVoEhTF.cjs"),L=require("./RangeSlider.cjs"),F=require("./DropdownItem.cjs"),X=require("./DropdownMenu.cjs"),Z=require("./IconButton.cjs"),V=require("./BannerSectionWithList.cjs"),H=require("./utils-BXPz9bck.cjs"),D=b.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
5
5
  gap: 2.25rem;
6
6
 
7
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
7
+ @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
8
8
  gap: 2rem;
9
9
  }
10
10
  `,Y=b.styled.div`
@@ -25,7 +25,7 @@
25
25
  font-weight: 500;
26
26
  }
27
27
 
28
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
28
+ @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
29
29
  }
30
30
  `;b.styled.div`
31
31
  display: flex;
@@ -57,7 +57,7 @@
57
57
  }
58
58
  }
59
59
 
60
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
60
+ @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
61
61
  gap: 2rem;
62
62
  & .btns-footer {
63
63
  width: 100%;
@@ -133,7 +133,7 @@
133
133
  padding-top: 0 !important;
134
134
  }
135
135
 
136
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
136
+ @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
137
137
  gap: 0.25rem;
138
138
  grid-template-columns: auto;
139
139
 
@@ -186,7 +186,7 @@
186
186
  margin: 0 0.62rem;
187
187
  }
188
188
 
189
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
189
+ @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
190
190
  padding: 0.75rem;
191
191
  gap: 0.75rem;
192
192
 
@@ -206,7 +206,7 @@
206
206
  gap: 1rem;
207
207
  flex: 1;
208
208
 
209
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
209
+ @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
210
210
  grid-template-columns: repeat(2, 1fr);
211
211
  gap: 0.75rem;
212
212
  }
@@ -236,7 +236,7 @@
236
236
  font-size: 3rem;
237
237
  }
238
238
 
239
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
239
+ @media (max-width: ${y.MOBILE_SIZE_PX+"px"}) {
240
240
  flex-direction: row;
241
241
  gap: 0.25rem;
242
242
  font-size: 0.875rem;
@@ -266,7 +266,7 @@
266
266
  font-family: Arial, sans-serif;
267
267
  font-weight: bold;
268
268
  font-size: 1rem;
269
- color: var(--gray-950, #14161A);
269
+ color: var(--gray-950, #14161a);
270
270
  transition: background-color 0.3s;
271
271
  min-height: 2.5rem;
272
272
  max-height: 2.5rem;
@@ -289,7 +289,7 @@
289
289
  position: absolute;
290
290
  top: 0;
291
291
  bottom: 0;
292
- left: ${c=>c.checked?"3rem":"3px"};
292
+ left: ${c=>c.checked?"4.6875rem":"0"};
293
293
  background: var(--success-600, #059669);
294
294
  border-radius: 30px;
295
295
  transition: left 0.3s;
@@ -305,6 +305,15 @@
305
305
  min-height: 2.5rem;
306
306
  max-height: 2.5rem;
307
307
  border: 1px solid var(--success-600, #059669);
308
+
309
+ & .cont {
310
+ min-width: 6.25rem;
311
+ }
312
+ }
313
+
314
+ & .cont {
315
+ min-width: 4.6875rem;
316
+ justify-content: center;
308
317
  }
309
318
 
310
319
  .text {
@@ -329,4 +338,4 @@
329
338
  align-items: center;
330
339
  gap: 0.38rem;
331
340
  }
332
- `,E=o.forwardRef((c,v)=>{var g,m,x,p,h,f,N,y;const{onChange:d=()=>{},items:a=[{name:"Male",icon:"mng-lnc-male-02",value:"male"},{name:"Female",value:"female",icon:"mng-lnc-female-02"}],...l}=c,s=e.jsxs("div",{className:"cont",children:[e.jsx("i",{className:(g=a==null?void 0:a.at(0))==null?void 0:g.icon}),e.jsx("span",{children:(m=a==null?void 0:a.at(0))==null?void 0:m.name})]}),n=e.jsxs("div",{className:"cont",children:[e.jsx("span",{children:(x=a==null?void 0:a.at(1))==null?void 0:x.name}),e.jsx("i",{className:(p=a==null?void 0:a.at(1))==null?void 0:p.icon})]}),[t,r]=o.useState(!1),i=u=>{var C,T;r(u.target.checked),d&&d(u.target.checked===!0?(C=a==null?void 0:a.at(1))==null?void 0:C.value:(T=a==null?void 0:a.at(0))==null?void 0:T.value)};return e.jsxs(ee,{ref:v,checked:t,...l,children:[e.jsx("input",{type:"checkbox",checked:t,onChange:i}),e.jsx("span",{className:"knob",children:t?n:s}),e.jsxs("span",{className:"text",children:[e.jsxs("div",{className:"cont",children:[e.jsx("i",{className:(h=a==null?void 0:a.at(0))==null?void 0:h.icon}),t===!0&&e.jsx("span",{className:"hidden-txt",children:(f=a==null?void 0:a.at(0))==null?void 0:f.name})]}),e.jsxs("div",{className:"cont",children:[t!==!0&&e.jsx("span",{className:"hidden-txt",children:(N=a==null?void 0:a.at(1))==null?void 0:N.name}),e.jsx("i",{className:(y=a==null?void 0:a.at(1))==null?void 0:y.icon})]})]})]})});E.propTypes={value:I.PropTypes.any,handleClick:I.PropTypes.func,color:I.PropTypes.string};const te=o.forwardRef((c,v)=>{var y;const{yearsText:d,heightText:a,weightText:l,genderText:s="Gender",calculateText:n="Calculate",closeText:t="Close calculator",onClose:r=()=>{},genders:i=[{name:"Male",icon:"mng-lnc-male-02",value:"male"},{name:"Female",value:"female",icon:"mng-lnc-female-02"}],activityLevels:g=[{name:"Very low",code:"veryLow"},{name:"Moderate",code:"moderate"},{name:"Very active",code:"veryActive"}],activityLevelText:m,goalText:x,goals:p=[{name:"Lose weight",code:"loseWeight",icon:"mng-lnc-weight-scale"},{name:"Maintaining",code:"maintaining",icon:"mng-lnc-move"},{name:"Gain muscle",code:"gainMuscle",icon:"mng-lnc-muscule"}],onCalculate:h=()=>{}}=c,f=o.useRef({year:null,height:null,weight:null,gender:(y=i==null?void 0:i.at(0))==null?void 0:y.value,activityLevel:null,goal:null}),N=()=>{h==null||h(f==null?void 0:f.current)};return e.jsxs(K,{children:[e.jsxs(J,{className:"calorie-calculating",children:[e.jsx("div",{className:"grid-label",children:s}),e.jsx("div",{children:e.jsx(E,{items:i,onChange:u=>f.current.gender=u})}),e.jsx(ae,{text:d,onChange:u=>f.current.year=u}),e.jsx(ne,{text:a,onChange:u=>f.current.height=u}),e.jsx(re,{text:l,onChange:u=>f.current.weight=u}),e.jsx(ie,{text:m,activityLevels:g,onChange:u=>f.current.activityLevel=u}),e.jsx(le,{text:x,goals:p,onChange:u=>f.current.goal=u})]}),e.jsxs("div",{className:"btns-footer",children:[e.jsx(z,{type:"button",color:"neutral",size:"medium",onClick:()=>{N()},children:n}),e.jsx(z,{type:"button",btnType:"basic",color:"gray",size:"medium",onClick:()=>r==null?void 0:r(),children:t})]})]})}),ae=o.forwardRef((c,v)=>{const{text:d="Years",onChange:a=()=>{}}=c,[l,s]=o.useState(1);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid-label",children:d}),e.jsxs("div",{className:"caluclating-group",children:[e.jsx(L,{className:"range-input-lnc",max:115,min:0,step:1,value:l,color:"success",defaultValue:0,onChange:n=>{var t,r;s((t=n==null?void 0:n.target)==null?void 0:t.value),a==null||a((r=n==null?void 0:n.target)==null?void 0:r.value)}}),e.jsx("input",{tabIndex:2,type:"text",className:"calculating-input",onChange:n=>{var t,r,i,g,m,x,p;!isNaN((t=n==null?void 0:n.target)==null?void 0:t.value)&&+((r=n==null?void 0:n.target)==null?void 0:r.value)>=0&&s(((g=(i=n==null?void 0:n.target)==null?void 0:i.value)==null?void 0:g.length)>1?(x=(m=n==null?void 0:n.target)==null?void 0:m.value)==null?void 0:x.replace(/^0+/,""):(p=n==null?void 0:n.target)==null?void 0:p.value)},value:l==null?void 0:l.toString()})]})]})}),ne=o.forwardRef((c,v)=>{const{text:d="Height",unitText:a="cm",onChange:l=()=>{}}=c,[s,n]=o.useState(1);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid-label",children:[d," ",e.jsx("span",{className:"unit",children:`(${a})`})]}),e.jsxs("div",{className:"caluclating-group",children:[e.jsx(L,{className:"range-input-lnc",max:273,min:0,step:1,value:s,defaultValue:0,color:"success",onChange:t=>{var r,i;n((r=t==null?void 0:t.target)==null?void 0:r.value),l==null||l((i=t==null?void 0:t.target)==null?void 0:i.value)}}),e.jsx("input",{type:"text",tabIndex:2,className:"calculating-input",onChange:t=>{var r,i,g,m,x,p,h;!isNaN((r=t==null?void 0:t.target)==null?void 0:r.value)&&+((i=t==null?void 0:t.target)==null?void 0:i.value)>=0&&n(((m=(g=t==null?void 0:t.target)==null?void 0:g.value)==null?void 0:m.length)>1?(p=(x=t==null?void 0:t.target)==null?void 0:x.value)==null?void 0:p.replace(/^0+/,""):(h=t==null?void 0:t.target)==null?void 0:h.value)},value:s==null?void 0:s.toString()})]})]})}),re=o.forwardRef((c,v)=>{const{text:d="Weight",unitText:a="cm",onChange:l=()=>{}}=c,[s,n]=o.useState(1);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid-label",children:[d," ",e.jsx("span",{className:"unit",children:`(${a})`})]}),e.jsxs("div",{className:"caluclating-group",children:[e.jsx(L,{className:"range-input-lnc",max:400,min:0,step:1,value:s,color:"success",defaultValue:0,onChange:t=>{var r,i;n((r=t==null?void 0:t.target)==null?void 0:r.value),l==null||l((i=t==null?void 0:t.target)==null?void 0:i.value)}}),e.jsx("input",{tabIndex:2,type:"text",className:"calculating-input",onChange:t=>{var r,i,g,m,x,p,h;!isNaN((r=t==null?void 0:t.target)==null?void 0:r.value)&&+((i=t==null?void 0:t.target)==null?void 0:i.value)>=0&&n(((m=(g=t==null?void 0:t.target)==null?void 0:g.value)==null?void 0:m.length)>1?(p=(x=t==null?void 0:t.target)==null?void 0:x.value)==null?void 0:p.replace(/^0+/,""):(h=t==null?void 0:t.target)==null?void 0:h.value)},value:s==null?void 0:s.toString()})]})]})}),ie=o.forwardRef((c,v)=>{const{text:d="Activity level",activityLevels:a,onChange:l=()=>{}}=c,[s,n]=o.useState(null);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid-label",children:d}),e.jsx("div",{className:"caluclating-group",children:a==null?void 0:a.map((t,r)=>e.jsx(z,{type:"button",btnType:s===(t==null?void 0:t.code)?"filled":"tinted",color:"neutral",borderRadius:"curved",onClick:()=>{n(t==null?void 0:t.code),l(t==null?void 0:t.code)},children:t==null?void 0:t.name},r))})]})}),le=o.forwardRef((c,v)=>{const{text:d="Goal",goals:a,onChange:l=()=>{}}=c,[s,n]=o.useState(null);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid-label",children:d}),e.jsx("div",{className:"caluclating-group group-activity",children:a==null?void 0:a.map((t,r)=>e.jsx(z,{type:"button",btnType:s===(t==null?void 0:t.code)?"filled":"tinted",color:"neutral",borderRadius:"curved",onClick:()=>{n(t==null?void 0:t.code),l(t==null?void 0:t.code)},children:e.jsxs("div",{className:"btn-cnt",children:[e.jsx("i",{className:t==null?void 0:t.icon}),e.jsx("span",{children:t==null?void 0:t.name})]})},r))})]})}),se=o.forwardRef((c,v)=>{const{caloriesText:d="Calories",carbsText:a="Carbs",proteinText:l="Protein",fatsText:s="Fats",calculateAgainText:n="Calculate again",calories:t,carbs:r,protein:i,fats:g,onGoBack:m=()=>{}}=c;return e.jsxs(Q,{children:[e.jsxs(U,{children:[e.jsxs(S,{color:"var(--warning-600)",children:[e.jsx("i",{className:"mng-lnc-fire"}),e.jsxs("div",{className:"subgroup",children:[e.jsxs("div",{children:[t," kcal"]}),e.jsx("div",{className:"subtext",children:d})]})]}),e.jsxs(S,{color:"var(--secondary-400)",children:[e.jsx("i",{className:"mng-lnc-leaf"}),e.jsxs("div",{className:"subgroup",children:[e.jsxs("div",{children:[r,"g"]}),e.jsx("div",{className:"subtext",children:a})]})]}),e.jsxs(S,{color:"var(--info-500)",children:[e.jsx("i",{className:"mng-lnc-meat"}),e.jsxs("div",{className:"subgroup",children:[e.jsxs("div",{children:[i,"g"]}),e.jsx("div",{className:"subtext",children:l})]})]}),e.jsxs(S,{color:"var(--warning-300)",children:[e.jsx("i",{className:"mng-lnc-meat"}),e.jsxs("div",{className:"subgroup",children:[e.jsxs("div",{children:[g,"g"]}),e.jsx("div",{className:"subtext",children:s})]})]})]}),e.jsxs("div",{className:"dropdown-group",children:[e.jsx("div",{className:"vertical-line"}),e.jsx(X,{color:"neutral",control:e.jsx(Z,{borderRadius:"curved",btnType:"basic",className:"dropdown-btn",color:"neutral",icon:"ellipsis",type:"button"}),offsetValue:-10,placement:"bottom-end",children:e.jsx(F,{icon:"star",onClick:m,children:n})})]})]})}),ce=o.forwardRef((c,v)=>{const{caloriesText:d,carbsText:a,proteinText:l,fatsText:s,calculateAgainText:n,yearsText:t,heightText:r,weightText:i,genderText:g,calculateText:m,closeText:x,genders:p,activityLevels:h,activityLevelText:f,goalText:N,goals:y,title:u="Daily calorie calculator",subtitle:C="Lorem ipsum dolor sit amet",list:T=["Ovdje može pisati zašto je bitno da znamo kolika nam je dnevna kalorijska potreba.","Ovdje može pisati zašto je bitno da znamo kolikanam je dnevna kalorijska potreba.","From certified dealers from all over Europe"],buttonText:_="Calculate calorie needs"}=c,[R,k]=o.useState(1),[j,B]=o.useState(0),M=({gender:q,year:O,height:P,weight:W,activityLevel:$,goal:A})=>{const G=H.calculateCalories({gender:q,age:O,heightCm:P,weightKg:W,activityLevel:$,goal:A});B(G),k(3)};return e.jsxs(D,{ref:v,children:[e.jsxs(Y,{children:[e.jsx("div",{className:"header-title",children:u}),e.jsx("div",{className:"header-subtitle",children:C})]}),R===1&&e.jsx(V,{buttonText:_,onButtonAction:()=>{k(2)},list:T}),R===2&&e.jsx(te,{yearsText:t,heightText:r,weightText:i,genderText:g,calculateText:m,closeText:x,onClose:()=>k(1),genders:p,activityLevels:h,activityLevelText:f,goalText:N,goals:y,onCalculate:M}),R===3&&e.jsx(se,{caloriesText:d,carbsText:a,proteinText:l,fatsText:s,calculateAgainText:n,onGoBack:()=>k(2),calories:j==null?void 0:j.calories,fats:j==null?void 0:j.fat,carbs:j==null?void 0:j.carbs,protein:j==null?void 0:j.protein})]})}),oe=o.forwardRef((c,v)=>e.jsx(ce,{ref:v,...c}));module.exports=oe;
341
+ `,E=d.forwardRef((c,v)=>{var u,g,h,f,x,o,N,w;const{onChange:m=()=>{},items:a=[{name:"Male",icon:"mng-lnc-male-02",value:"male"},{name:"Female",value:"female",icon:"mng-lnc-female-02"}],...i}=c,s=t.jsxs("div",{className:"cont",children:[t.jsx("i",{className:(u=a==null?void 0:a.at(0))==null?void 0:u.icon}),t.jsx("span",{children:(g=a==null?void 0:a.at(0))==null?void 0:g.name})]}),n=t.jsxs("div",{className:"cont",children:[t.jsx("span",{children:(h=a==null?void 0:a.at(1))==null?void 0:h.name}),t.jsx("i",{className:(f=a==null?void 0:a.at(1))==null?void 0:f.icon})]}),[e,r]=d.useState(!1),l=p=>{var T,k;r(p.target.checked),m&&m(p.target.checked===!0?(T=a==null?void 0:a.at(1))==null?void 0:T.value:(k=a==null?void 0:a.at(0))==null?void 0:k.value)};return t.jsxs(ee,{ref:v,checked:e,...i,children:[t.jsx("input",{type:"checkbox",checked:e,onChange:l}),t.jsx("span",{className:"knob",children:e?n:s}),t.jsxs("span",{className:"text",children:[t.jsxs("div",{className:"cont",children:[t.jsx("i",{className:(x=a==null?void 0:a.at(0))==null?void 0:x.icon}),e===!0&&t.jsx("span",{className:"hidden-txt",children:(o=a==null?void 0:a.at(0))==null?void 0:o.name})]}),t.jsxs("div",{className:"cont",children:[e!==!0&&t.jsx("span",{className:"hidden-txt",children:(N=a==null?void 0:a.at(1))==null?void 0:N.name}),t.jsx("i",{className:(w=a==null?void 0:a.at(1))==null?void 0:w.icon})]})]})]})});E.propTypes={value:I.PropTypes.any,handleClick:I.PropTypes.func,color:I.PropTypes.string};const te=d.forwardRef((c,v)=>{var w;const{yearsText:m,heightText:a,weightText:i,genderText:s="Gender",calculateText:n="Calculate",closeText:e="Close calculator",onClose:r=()=>{},genders:l=[{name:"Male",icon:"mng-lnc-male-02",value:"male"},{name:"Female",value:"female",icon:"mng-lnc-female-02"}],activityLevels:u=[{name:"Very low",code:"veryLow"},{name:"Moderate",code:"moderate"},{name:"Very active",code:"veryActive"}],activityLevelText:g,goalText:h,goals:f=[{name:"Lose weight",code:"loseWeight",icon:"mng-lnc-weight-scale"},{name:"Maintaining",code:"maintaining",icon:"mng-lnc-move"},{name:"Gain muscle",code:"gainMuscle",icon:"mng-lnc-muscule"}],onCalculate:x=()=>{}}=c,o=d.useRef({year:null,height:null,weight:null,gender:(w=l==null?void 0:l.at(0))==null?void 0:w.value,activityLevel:null,goal:null}),N=()=>{x==null||x(o==null?void 0:o.current)};return t.jsxs(K,{children:[t.jsxs(J,{className:"calorie-calculating",children:[t.jsx("div",{className:"grid-label",children:s}),t.jsx("div",{children:t.jsx(E,{items:l,onChange:p=>o.current.gender=p})}),t.jsx(ae,{text:m,onChange:p=>o.current.year=p}),t.jsx(ne,{text:a,onChange:p=>o.current.height=p}),t.jsx(re,{text:i,onChange:p=>o.current.weight=p}),t.jsx(ie,{text:g,activityLevels:u,onChange:p=>o.current.activityLevel=p}),t.jsx(le,{text:h,goals:f,onChange:p=>o.current.goal=p})]}),t.jsxs("div",{className:"btns-footer",children:[t.jsx(z,{type:"button",color:"neutral",size:"medium",onClick:()=>{N()},children:n}),t.jsx(z,{type:"button",btnType:"basic",color:"gray",size:"medium",onClick:()=>r==null?void 0:r(),children:e})]})]})}),ae=d.forwardRef((c,v)=>{const{text:m="Years",onChange:a=()=>{}}=c,[i,s]=d.useState(1);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"grid-label",children:m}),t.jsxs("div",{className:"caluclating-group",children:[t.jsx(L,{className:"range-input-lnc",max:115,min:0,step:1,value:i,color:"success",defaultValue:0,onChange:n=>{var e,r;s((e=n==null?void 0:n.target)==null?void 0:e.value),a==null||a((r=n==null?void 0:n.target)==null?void 0:r.value)}}),t.jsx("input",{tabIndex:2,type:"text",className:"calculating-input",onChange:n=>{var e,r,l,u,g,h,f,x;!isNaN((e=n==null?void 0:n.target)==null?void 0:e.value)&&+((r=n==null?void 0:n.target)==null?void 0:r.value)>=0&&(s(((u=(l=n==null?void 0:n.target)==null?void 0:l.value)==null?void 0:u.length)>1?(h=(g=n==null?void 0:n.target)==null?void 0:g.value)==null?void 0:h.replace(/^0+/,""):(f=n==null?void 0:n.target)==null?void 0:f.value),a==null||a((x=n==null?void 0:n.target)==null?void 0:x.value))},value:i==null?void 0:i.toString()})]})]})}),ne=d.forwardRef((c,v)=>{const{text:m="Height",unitText:a="cm",onChange:i=()=>{}}=c,[s,n]=d.useState(1);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid-label",children:[m," ",t.jsx("span",{className:"unit",children:`(${a})`})]}),t.jsxs("div",{className:"caluclating-group",children:[t.jsx(L,{className:"range-input-lnc",max:273,min:0,step:1,value:s,defaultValue:0,color:"success",onChange:e=>{var r,l;n((r=e==null?void 0:e.target)==null?void 0:r.value),i==null||i((l=e==null?void 0:e.target)==null?void 0:l.value)}}),t.jsx("input",{type:"text",tabIndex:2,className:"calculating-input",onChange:e=>{var r,l,u,g,h,f,x,o;!isNaN((r=e==null?void 0:e.target)==null?void 0:r.value)&&+((l=e==null?void 0:e.target)==null?void 0:l.value)>=0&&(n(((g=(u=e==null?void 0:e.target)==null?void 0:u.value)==null?void 0:g.length)>1?(f=(h=e==null?void 0:e.target)==null?void 0:h.value)==null?void 0:f.replace(/^0+/,""):(x=e==null?void 0:e.target)==null?void 0:x.value),i==null||i((o=e==null?void 0:e.target)==null?void 0:o.value))},value:s==null?void 0:s.toString()})]})]})}),re=d.forwardRef((c,v)=>{const{text:m="Weight",unitText:a="cm",onChange:i=()=>{}}=c,[s,n]=d.useState(1);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid-label",children:[m," ",t.jsx("span",{className:"unit",children:`(${a})`})]}),t.jsxs("div",{className:"caluclating-group",children:[t.jsx(L,{className:"range-input-lnc",max:400,min:0,step:1,value:s,color:"success",defaultValue:0,onChange:e=>{var r,l;n((r=e==null?void 0:e.target)==null?void 0:r.value),i==null||i((l=e==null?void 0:e.target)==null?void 0:l.value)}}),t.jsx("input",{tabIndex:2,type:"text",className:"calculating-input",onChange:e=>{var r,l,u,g,h,f,x,o;!isNaN((r=e==null?void 0:e.target)==null?void 0:r.value)&&+((l=e==null?void 0:e.target)==null?void 0:l.value)>=0&&(n(((g=(u=e==null?void 0:e.target)==null?void 0:u.value)==null?void 0:g.length)>1?(f=(h=e==null?void 0:e.target)==null?void 0:h.value)==null?void 0:f.replace(/^0+/,""):(x=e==null?void 0:e.target)==null?void 0:x.value),i==null||i((o=e==null?void 0:e.target)==null?void 0:o.value))},value:s==null?void 0:s.toString()})]})]})}),ie=d.forwardRef((c,v)=>{const{text:m="Activity level",activityLevels:a,onChange:i=()=>{}}=c,[s,n]=d.useState(null);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"grid-label",children:m}),t.jsx("div",{className:"caluclating-group",children:a==null?void 0:a.map((e,r)=>t.jsx(z,{type:"button",btnType:s===(e==null?void 0:e.code)?"filled":"tinted",color:"neutral",borderRadius:"curved",onClick:()=>{n(e==null?void 0:e.code),i(e==null?void 0:e.code)},children:e==null?void 0:e.name},r))})]})}),le=d.forwardRef((c,v)=>{const{text:m="Goal",goals:a,onChange:i=()=>{}}=c,[s,n]=d.useState(null);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"grid-label",children:m}),t.jsx("div",{className:"caluclating-group group-activity",children:a==null?void 0:a.map((e,r)=>t.jsx(z,{type:"button",btnType:s===(e==null?void 0:e.code)?"filled":"tinted",color:"neutral",borderRadius:"curved",onClick:()=>{n(e==null?void 0:e.code),i(e==null?void 0:e.code)},children:t.jsxs("div",{className:"btn-cnt",children:[t.jsx("i",{className:e==null?void 0:e.icon}),t.jsx("span",{children:e==null?void 0:e.name})]})},r))})]})}),se=d.forwardRef((c,v)=>{const{caloriesText:m="Calories",carbsText:a="Carbs",proteinText:i="Protein",fatsText:s="Fats",calculateAgainText:n="Calculate again",calories:e,carbs:r,protein:l,fats:u,onGoBack:g=()=>{}}=c;return t.jsxs(Q,{children:[t.jsxs(U,{children:[t.jsxs(S,{color:"var(--warning-600)",children:[t.jsx("i",{className:"mng-lnc-fire"}),t.jsxs("div",{className:"subgroup",children:[t.jsxs("div",{children:[e," kcal"]}),t.jsx("div",{className:"subtext",children:m})]})]}),t.jsxs(S,{color:"var(--secondary-400)",children:[t.jsx("i",{className:"mng-lnc-leaf"}),t.jsxs("div",{className:"subgroup",children:[t.jsxs("div",{children:[r,"g"]}),t.jsx("div",{className:"subtext",children:a})]})]}),t.jsxs(S,{color:"var(--info-500)",children:[t.jsx("i",{className:"mng-lnc-meat"}),t.jsxs("div",{className:"subgroup",children:[t.jsxs("div",{children:[l,"g"]}),t.jsx("div",{className:"subtext",children:i})]})]}),t.jsxs(S,{color:"var(--warning-300)",children:[t.jsx("i",{className:"mng-lnc-meat"}),t.jsxs("div",{className:"subgroup",children:[t.jsxs("div",{children:[u,"g"]}),t.jsx("div",{className:"subtext",children:s})]})]})]}),t.jsxs("div",{className:"dropdown-group",children:[t.jsx("div",{className:"vertical-line"}),t.jsx(X,{color:"neutral",control:t.jsx(Z,{borderRadius:"curved",btnType:"basic",className:"dropdown-btn",color:"neutral",icon:"ellipsis",type:"button"}),offsetValue:-10,placement:"bottom-end",children:t.jsx(F,{icon:"star",onClick:g,children:n})})]})]})}),ce=d.forwardRef((c,v)=>{const{caloriesText:m,carbsText:a,proteinText:i,fatsText:s,calculateAgainText:n,yearsText:e,heightText:r,weightText:l,genderText:u,calculateText:g,closeText:h,genders:f,activityLevels:x,activityLevelText:o,goalText:N,goals:w,title:p="Daily calorie calculator",subtitle:T="Lorem ipsum dolor sit amet",list:k=["Ovdje može pisati zašto je bitno da znamo kolika nam je dnevna kalorijska potreba.","Ovdje može pisati zašto je bitno da znamo kolikanam je dnevna kalorijska potreba.","From certified dealers from all over Europe"],buttonText:_="Calculate calorie needs"}=c,[R,C]=d.useState(1),[j,B]=d.useState(0),M=({gender:q,year:O,height:P,weight:W,activityLevel:$,goal:G})=>{const A=H.calculateCalories({gender:q,age:O,heightCm:P,weightKg:W,activityLevel:$,goal:G});B(A),C(3)};return t.jsxs(D,{ref:v,children:[t.jsxs(Y,{children:[t.jsx("div",{className:"header-title",children:p}),t.jsx("div",{className:"header-subtitle",children:T})]}),R===1&&t.jsx(V,{buttonText:_,onButtonAction:()=>{C(2)},list:k}),R===2&&t.jsx(te,{yearsText:e,heightText:r,weightText:l,genderText:u,calculateText:g,closeText:h,onClose:()=>C(1),genders:f,activityLevels:x,activityLevelText:o,goalText:N,goals:w,onCalculate:M}),R===3&&t.jsx(se,{caloriesText:m,carbsText:a,proteinText:i,fatsText:s,calculateAgainText:n,onGoBack:()=>C(2),calories:j==null?void 0:j.calories,fats:j==null?void 0:j.fat,carbs:j==null?void 0:j.carbs,protein:j==null?void 0:j.protein})]})}),oe=d.forwardRef((c,v)=>t.jsx(ce,{ref:v,...c}));module.exports=oe;
@@ -1,10 +1,10 @@
1
- import { jsxs as i, jsx as t, Fragment as z } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as a, Fragment as z } from "react/jsx-runtime";
2
2
  import { forwardRef as w, useState as N, useRef as Y } from "react";
3
3
  import { s as y } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M as T } from "./consts-C1uHV4xc.js";
4
+ import { M as C } from "./consts-C1uHV4xc.js";
5
5
  import S from "./Button.js";
6
- import { P as A } from "./index-S5Cd7WrG.js";
7
- import G from "./RangeSlider.js";
6
+ import { P as G } from "./index-S5Cd7WrG.js";
7
+ import A from "./RangeSlider.js";
8
8
  import _ from "./DropdownItem.js";
9
9
  import K from "./DropdownMenu.js";
10
10
  import X from "./IconButton.js";
@@ -16,7 +16,7 @@ const J = y.div`
16
16
  width: 100%;
17
17
  gap: 2.25rem;
18
18
 
19
- @media (max-width: ${T + "px"}) {
19
+ @media (max-width: ${C + "px"}) {
20
20
  gap: 2rem;
21
21
  }
22
22
  `, Q = y.div`
@@ -37,7 +37,7 @@ const J = y.div`
37
37
  font-weight: 500;
38
38
  }
39
39
 
40
- @media (max-width: ${T + "px"}) {
40
+ @media (max-width: ${C + "px"}) {
41
41
  }
42
42
  `;
43
43
  y.div`
@@ -71,7 +71,7 @@ const U = y.div`
71
71
  }
72
72
  }
73
73
 
74
- @media (max-width: ${T + "px"}) {
74
+ @media (max-width: ${C + "px"}) {
75
75
  gap: 2rem;
76
76
  & .btns-footer {
77
77
  width: 100%;
@@ -147,7 +147,7 @@ const U = y.div`
147
147
  padding-top: 0 !important;
148
148
  }
149
149
 
150
- @media (max-width: ${T + "px"}) {
150
+ @media (max-width: ${C + "px"}) {
151
151
  gap: 0.25rem;
152
152
  grid-template-columns: auto;
153
153
 
@@ -200,7 +200,7 @@ const U = y.div`
200
200
  margin: 0 0.62rem;
201
201
  }
202
202
 
203
- @media (max-width: ${T + "px"}) {
203
+ @media (max-width: ${C + "px"}) {
204
204
  padding: 0.75rem;
205
205
  gap: 0.75rem;
206
206
 
@@ -220,7 +220,7 @@ const U = y.div`
220
220
  gap: 1rem;
221
221
  flex: 1;
222
222
 
223
- @media (max-width: ${T + "px"}) {
223
+ @media (max-width: ${C + "px"}) {
224
224
  grid-template-columns: repeat(2, 1fr);
225
225
  gap: 0.75rem;
226
226
  }
@@ -250,7 +250,7 @@ const U = y.div`
250
250
  font-size: 3rem;
251
251
  }
252
252
 
253
- @media (max-width: ${T + "px"}) {
253
+ @media (max-width: ${C + "px"}) {
254
254
  flex-direction: row;
255
255
  gap: 0.25rem;
256
256
  font-size: 0.875rem;
@@ -280,7 +280,7 @@ const U = y.div`
280
280
  font-family: Arial, sans-serif;
281
281
  font-weight: bold;
282
282
  font-size: 1rem;
283
- color: var(--gray-950, #14161A);
283
+ color: var(--gray-950, #14161a);
284
284
  transition: background-color 0.3s;
285
285
  min-height: 2.5rem;
286
286
  max-height: 2.5rem;
@@ -303,7 +303,7 @@ const U = y.div`
303
303
  position: absolute;
304
304
  top: 0;
305
305
  bottom: 0;
306
- left: ${(s) => s.checked ? "3rem" : "3px"};
306
+ left: ${(s) => s.checked ? "4.6875rem" : "0"};
307
307
  background: var(--success-600, #059669);
308
308
  border-radius: 30px;
309
309
  transition: left 0.3s;
@@ -319,6 +319,15 @@ const U = y.div`
319
319
  min-height: 2.5rem;
320
320
  max-height: 2.5rem;
321
321
  border: 1px solid var(--success-600, #059669);
322
+
323
+ & .cont {
324
+ min-width: 6.25rem;
325
+ }
326
+ }
327
+
328
+ & .cont {
329
+ min-width: 4.6875rem;
330
+ justify-content: center;
322
331
  }
323
332
 
324
333
  .text {
@@ -343,53 +352,53 @@ const U = y.div`
343
352
  align-items: center;
344
353
  gap: 0.38rem;
345
354
  }
346
- `, I = w((s, f) => {
347
- var m, g, p, h, v, x, k, C;
355
+ `, I = w((s, x) => {
356
+ var g, u, v, f, p, d, k, T;
348
357
  const {
349
- onChange: d = () => {
358
+ onChange: m = () => {
350
359
  },
351
- items: a = [
360
+ items: t = [
352
361
  { name: "Male", icon: "mng-lnc-male-02", value: "male" },
353
362
  { name: "Female", value: "female", icon: "mng-lnc-female-02" }
354
363
  ],
355
364
  ...l
356
365
  } = s, c = /* @__PURE__ */ i("div", { className: "cont", children: [
357
- /* @__PURE__ */ t("i", { className: (m = a == null ? void 0 : a.at(0)) == null ? void 0 : m.icon }),
358
- /* @__PURE__ */ t("span", { children: (g = a == null ? void 0 : a.at(0)) == null ? void 0 : g.name })
366
+ /* @__PURE__ */ a("i", { className: (g = t == null ? void 0 : t.at(0)) == null ? void 0 : g.icon }),
367
+ /* @__PURE__ */ a("span", { children: (u = t == null ? void 0 : t.at(0)) == null ? void 0 : u.name })
359
368
  ] }), n = /* @__PURE__ */ i("div", { className: "cont", children: [
360
- /* @__PURE__ */ t("span", { children: (p = a == null ? void 0 : a.at(1)) == null ? void 0 : p.name }),
361
- /* @__PURE__ */ t("i", { className: (h = a == null ? void 0 : a.at(1)) == null ? void 0 : h.icon })
369
+ /* @__PURE__ */ a("span", { children: (v = t == null ? void 0 : t.at(1)) == null ? void 0 : v.name }),
370
+ /* @__PURE__ */ a("i", { className: (f = t == null ? void 0 : t.at(1)) == null ? void 0 : f.icon })
362
371
  ] }), [e, r] = N(!1);
363
- return /* @__PURE__ */ i(ne, { ref: f, checked: e, ...l, children: [
364
- /* @__PURE__ */ t("input", { type: "checkbox", checked: e, onChange: (u) => {
365
- var L, j;
366
- r(u.target.checked), d && d(
367
- u.target.checked === !0 ? (L = a == null ? void 0 : a.at(1)) == null ? void 0 : L.value : (j = a == null ? void 0 : a.at(0)) == null ? void 0 : j.value
372
+ return /* @__PURE__ */ i(ne, { ref: x, checked: e, ...l, children: [
373
+ /* @__PURE__ */ a("input", { type: "checkbox", checked: e, onChange: (h) => {
374
+ var j, L;
375
+ r(h.target.checked), m && m(
376
+ h.target.checked === !0 ? (j = t == null ? void 0 : t.at(1)) == null ? void 0 : j.value : (L = t == null ? void 0 : t.at(0)) == null ? void 0 : L.value
368
377
  );
369
378
  } }),
370
- /* @__PURE__ */ t("span", { className: "knob", children: e ? n : c }),
379
+ /* @__PURE__ */ a("span", { className: "knob", children: e ? n : c }),
371
380
  /* @__PURE__ */ i("span", { className: "text", children: [
372
381
  /* @__PURE__ */ i("div", { className: "cont", children: [
373
- /* @__PURE__ */ t("i", { className: (v = a == null ? void 0 : a.at(0)) == null ? void 0 : v.icon }),
374
- e === !0 && /* @__PURE__ */ t("span", { className: "hidden-txt", children: (x = a == null ? void 0 : a.at(0)) == null ? void 0 : x.name })
382
+ /* @__PURE__ */ a("i", { className: (p = t == null ? void 0 : t.at(0)) == null ? void 0 : p.icon }),
383
+ e === !0 && /* @__PURE__ */ a("span", { className: "hidden-txt", children: (d = t == null ? void 0 : t.at(0)) == null ? void 0 : d.name })
375
384
  ] }),
376
385
  /* @__PURE__ */ i("div", { className: "cont", children: [
377
- e !== !0 && /* @__PURE__ */ t("span", { className: "hidden-txt", children: (k = a == null ? void 0 : a.at(1)) == null ? void 0 : k.name }),
378
- /* @__PURE__ */ t("i", { className: (C = a == null ? void 0 : a.at(1)) == null ? void 0 : C.icon })
386
+ e !== !0 && /* @__PURE__ */ a("span", { className: "hidden-txt", children: (k = t == null ? void 0 : t.at(1)) == null ? void 0 : k.name }),
387
+ /* @__PURE__ */ a("i", { className: (T = t == null ? void 0 : t.at(1)) == null ? void 0 : T.icon })
379
388
  ] })
380
389
  ] })
381
390
  ] });
382
391
  });
383
392
  I.propTypes = {
384
- value: A.any,
385
- handleClick: A.func,
386
- color: A.string
393
+ value: G.any,
394
+ handleClick: G.func,
395
+ color: G.string
387
396
  };
388
- const ie = w((s, f) => {
389
- var C;
397
+ const ie = w((s, x) => {
398
+ var T;
390
399
  const {
391
- yearsText: d,
392
- heightText: a,
400
+ yearsText: m,
401
+ heightText: t,
393
402
  weightText: l,
394
403
  genderText: c = "Gender",
395
404
  calculateText: n = "Calculate",
@@ -400,80 +409,80 @@ const ie = w((s, f) => {
400
409
  { name: "Male", icon: "mng-lnc-male-02", value: "male" },
401
410
  { name: "Female", value: "female", icon: "mng-lnc-female-02" }
402
411
  ],
403
- activityLevels: m = [
412
+ activityLevels: g = [
404
413
  { name: "Very low", code: "veryLow" },
405
414
  { name: "Moderate", code: "moderate" },
406
415
  { name: "Very active", code: "veryActive" }
407
416
  ],
408
- activityLevelText: g,
409
- goalText: p,
410
- goals: h = [
417
+ activityLevelText: u,
418
+ goalText: v,
419
+ goals: f = [
411
420
  { name: "Lose weight", code: "loseWeight", icon: "mng-lnc-weight-scale" },
412
421
  { name: "Maintaining", code: "maintaining", icon: "mng-lnc-move" },
413
422
  { name: "Gain muscle", code: "gainMuscle", icon: "mng-lnc-muscule" }
414
423
  ],
415
- onCalculate: v = () => {
424
+ onCalculate: p = () => {
416
425
  }
417
- } = s, x = Y({
426
+ } = s, d = Y({
418
427
  year: null,
419
428
  height: null,
420
429
  weight: null,
421
- gender: (C = o == null ? void 0 : o.at(0)) == null ? void 0 : C.value,
430
+ gender: (T = o == null ? void 0 : o.at(0)) == null ? void 0 : T.value,
422
431
  activityLevel: null,
423
432
  goal: null
424
433
  }), k = () => {
425
- v == null || v(x == null ? void 0 : x.current);
434
+ p == null || p(d == null ? void 0 : d.current);
426
435
  };
427
436
  return /* @__PURE__ */ i(U, { children: [
428
437
  /* @__PURE__ */ i(ee, { className: "calorie-calculating", children: [
429
- /* @__PURE__ */ t("div", { className: "grid-label", children: c }),
430
- /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
438
+ /* @__PURE__ */ a("div", { className: "grid-label", children: c }),
439
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
431
440
  I,
432
441
  {
433
442
  items: o,
434
- onChange: (u) => x.current.gender = u
443
+ onChange: (h) => d.current.gender = h
435
444
  }
436
445
  ) }),
437
- /* @__PURE__ */ t(
446
+ /* @__PURE__ */ a(
438
447
  re,
439
448
  {
440
- text: d,
441
- onChange: (u) => x.current.year = u
449
+ text: m,
450
+ onChange: (h) => d.current.year = h
442
451
  }
443
452
  ),
444
- /* @__PURE__ */ t(
453
+ /* @__PURE__ */ a(
445
454
  le,
446
455
  {
447
- text: a,
448
- onChange: (u) => x.current.height = u
456
+ text: t,
457
+ onChange: (h) => d.current.height = h
449
458
  }
450
459
  ),
451
- /* @__PURE__ */ t(
460
+ /* @__PURE__ */ a(
452
461
  ce,
453
462
  {
454
463
  text: l,
455
- onChange: (u) => x.current.weight = u
464
+ onChange: (h) => d.current.weight = h
456
465
  }
457
466
  ),
458
- /* @__PURE__ */ t(
467
+ /* @__PURE__ */ a(
459
468
  oe,
460
469
  {
461
- text: g,
462
- activityLevels: m,
463
- onChange: (u) => x.current.activityLevel = u
470
+ text: u,
471
+ activityLevels: g,
472
+ onChange: (h) => d.current.activityLevel = h
464
473
  }
465
474
  ),
466
- /* @__PURE__ */ t(
475
+ /* @__PURE__ */ a(
467
476
  se,
468
477
  {
469
- text: p,
470
- goals: h,
471
- onChange: (u) => x.current.goal = u
478
+ text: v,
479
+ goals: f,
480
+ onChange: (h) => d.current.goal = h
472
481
  }
473
482
  )
474
483
  ] }),
475
484
  /* @__PURE__ */ i("div", { className: "btns-footer", children: [
476
- /* @__PURE__ */ t(
485
+ /* @__PURE__ */ a(
477
486
  S,
478
487
  {
479
488
  type: "button",
@@ -485,7 +494,7 @@ const ie = w((s, f) => {
485
494
  children: n
486
495
  }
487
496
  ),
488
- /* @__PURE__ */ t(
497
+ /* @__PURE__ */ a(
489
498
  S,
490
499
  {
491
500
  type: "button",
@@ -498,14 +507,14 @@ const ie = w((s, f) => {
498
507
  )
499
508
  ] })
500
509
  ] });
501
- }), re = w((s, f) => {
502
- const { text: d = "Years", onChange: a = () => {
510
+ }), re = w((s, x) => {
511
+ const { text: m = "Years", onChange: t = () => {
503
512
  } } = s, [l, c] = N(1);
504
513
  return /* @__PURE__ */ i(z, { children: [
505
- /* @__PURE__ */ t("div", { className: "grid-label", children: d }),
514
+ /* @__PURE__ */ a("div", { className: "grid-label", children: m }),
506
515
  /* @__PURE__ */ i("div", { className: "caluclating-group", children: [
507
- /* @__PURE__ */ t(
508
- G,
516
+ /* @__PURE__ */ a(
517
+ A,
509
518
  {
510
519
  className: "range-input-lnc",
511
520
  max: 115,
@@ -516,39 +525,39 @@ const ie = w((s, f) => {
516
525
  defaultValue: 0,
517
526
  onChange: (n) => {
518
527
  var e, r;
519
- c((e = n == null ? void 0 : n.target) == null ? void 0 : e.value), a == null || a((r = n == null ? void 0 : n.target) == null ? void 0 : r.value);
528
+ c((e = n == null ? void 0 : n.target) == null ? void 0 : e.value), t == null || t((r = n == null ? void 0 : n.target) == null ? void 0 : r.value);
520
529
  }
521
530
  }
522
531
  ),
523
- /* @__PURE__ */ t(
532
+ /* @__PURE__ */ a(
524
533
  "input",
525
534
  {
526
535
  tabIndex: 2,
527
536
  type: "text",
528
537
  className: "calculating-input",
529
538
  onChange: (n) => {
530
- var e, r, o, m, g, p, h;
531
- !isNaN((e = n == null ? void 0 : n.target) == null ? void 0 : e.value) && +((r = n == null ? void 0 : n.target) == null ? void 0 : r.value) >= 0 && c(
532
- ((m = (o = n == null ? void 0 : n.target) == null ? void 0 : o.value) == null ? void 0 : m.length) > 1 ? (p = (g = n == null ? void 0 : n.target) == null ? void 0 : g.value) == null ? void 0 : p.replace(/^0+/, "") : (h = n == null ? void 0 : n.target) == null ? void 0 : h.value
533
- );
539
+ var e, r, o, g, u, v, f, p;
540
+ !isNaN((e = n == null ? void 0 : n.target) == null ? void 0 : e.value) && +((r = n == null ? void 0 : n.target) == null ? void 0 : r.value) >= 0 && (c(
541
+ ((g = (o = n == null ? void 0 : n.target) == null ? void 0 : o.value) == null ? void 0 : g.length) > 1 ? (v = (u = n == null ? void 0 : n.target) == null ? void 0 : u.value) == null ? void 0 : v.replace(/^0+/, "") : (f = n == null ? void 0 : n.target) == null ? void 0 : f.value
542
+ ), t == null || t((p = n == null ? void 0 : n.target) == null ? void 0 : p.value));
534
543
  },
535
544
  value: l == null ? void 0 : l.toString()
536
545
  }
537
546
  )
538
547
  ] })
539
548
  ] });
540
- }), le = w((s, f) => {
541
- const { text: d = "Height", unitText: a = "cm", onChange: l = () => {
549
+ }), le = w((s, x) => {
550
+ const { text: m = "Height", unitText: t = "cm", onChange: l = () => {
542
551
  } } = s, [c, n] = N(1);
543
552
  return /* @__PURE__ */ i(z, { children: [
544
553
  /* @__PURE__ */ i("div", { className: "grid-label", children: [
545
- d,
554
+ m,
546
555
  " ",
547
- /* @__PURE__ */ t("span", { className: "unit", children: `(${a})` })
556
+ /* @__PURE__ */ a("span", { className: "unit", children: `(${t})` })
548
557
  ] }),
549
558
  /* @__PURE__ */ i("div", { className: "caluclating-group", children: [
550
- /* @__PURE__ */ t(
551
- G,
559
+ /* @__PURE__ */ a(
560
+ A,
552
561
  {
553
562
  className: "range-input-lnc",
554
563
  max: 273,
@@ -563,35 +572,35 @@ const ie = w((s, f) => {
563
572
  }
564
573
  }
565
574
  ),
566
- /* @__PURE__ */ t(
575
+ /* @__PURE__ */ a(
567
576
  "input",
568
577
  {
569
578
  type: "text",
570
579
  tabIndex: 2,
571
580
  className: "calculating-input",
572
581
  onChange: (e) => {
573
- var r, o, m, g, p, h, v;
574
- !isNaN((r = e == null ? void 0 : e.target) == null ? void 0 : r.value) && +((o = e == null ? void 0 : e.target) == null ? void 0 : o.value) >= 0 && n(
575
- ((g = (m = e == null ? void 0 : e.target) == null ? void 0 : m.value) == null ? void 0 : g.length) > 1 ? (h = (p = e == null ? void 0 : e.target) == null ? void 0 : p.value) == null ? void 0 : h.replace(/^0+/, "") : (v = e == null ? void 0 : e.target) == null ? void 0 : v.value
576
- );
582
+ var r, o, g, u, v, f, p, d;
583
+ !isNaN((r = e == null ? void 0 : e.target) == null ? void 0 : r.value) && +((o = e == null ? void 0 : e.target) == null ? void 0 : o.value) >= 0 && (n(
584
+ ((u = (g = e == null ? void 0 : e.target) == null ? void 0 : g.value) == null ? void 0 : u.length) > 1 ? (f = (v = e == null ? void 0 : e.target) == null ? void 0 : v.value) == null ? void 0 : f.replace(/^0+/, "") : (p = e == null ? void 0 : e.target) == null ? void 0 : p.value
585
+ ), l == null || l((d = e == null ? void 0 : e.target) == null ? void 0 : d.value));
577
586
  },
578
587
  value: c == null ? void 0 : c.toString()
579
588
  }
580
589
  )
581
590
  ] })
582
591
  ] });
583
- }), ce = w((s, f) => {
584
- const { text: d = "Weight", unitText: a = "cm", onChange: l = () => {
592
+ }), ce = w((s, x) => {
593
+ const { text: m = "Weight", unitText: t = "cm", onChange: l = () => {
585
594
  } } = s, [c, n] = N(1);
586
595
  return /* @__PURE__ */ i(z, { children: [
587
596
  /* @__PURE__ */ i("div", { className: "grid-label", children: [
588
- d,
597
+ m,
589
598
  " ",
590
- /* @__PURE__ */ t("span", { className: "unit", children: `(${a})` })
599
+ /* @__PURE__ */ a("span", { className: "unit", children: `(${t})` })
591
600
  ] }),
592
601
  /* @__PURE__ */ i("div", { className: "caluclating-group", children: [
593
- /* @__PURE__ */ t(
594
- G,
602
+ /* @__PURE__ */ a(
603
+ A,
595
604
  {
596
605
  className: "range-input-lnc",
597
606
  max: 400,
@@ -606,33 +615,33 @@ const ie = w((s, f) => {
606
615
  }
607
616
  }
608
617
  ),
609
- /* @__PURE__ */ t(
618
+ /* @__PURE__ */ a(
610
619
  "input",
611
620
  {
612
621
  tabIndex: 2,
613
622
  type: "text",
614
623
  className: "calculating-input",
615
624
  onChange: (e) => {
616
- var r, o, m, g, p, h, v;
617
- !isNaN((r = e == null ? void 0 : e.target) == null ? void 0 : r.value) && +((o = e == null ? void 0 : e.target) == null ? void 0 : o.value) >= 0 && n(
618
- ((g = (m = e == null ? void 0 : e.target) == null ? void 0 : m.value) == null ? void 0 : g.length) > 1 ? (h = (p = e == null ? void 0 : e.target) == null ? void 0 : p.value) == null ? void 0 : h.replace(/^0+/, "") : (v = e == null ? void 0 : e.target) == null ? void 0 : v.value
619
- );
625
+ var r, o, g, u, v, f, p, d;
626
+ !isNaN((r = e == null ? void 0 : e.target) == null ? void 0 : r.value) && +((o = e == null ? void 0 : e.target) == null ? void 0 : o.value) >= 0 && (n(
627
+ ((u = (g = e == null ? void 0 : e.target) == null ? void 0 : g.value) == null ? void 0 : u.length) > 1 ? (f = (v = e == null ? void 0 : e.target) == null ? void 0 : v.value) == null ? void 0 : f.replace(/^0+/, "") : (p = e == null ? void 0 : e.target) == null ? void 0 : p.value
628
+ ), l == null || l((d = e == null ? void 0 : e.target) == null ? void 0 : d.value));
620
629
  },
621
630
  value: c == null ? void 0 : c.toString()
622
631
  }
623
632
  )
624
633
  ] })
625
634
  ] });
626
- }), oe = w((s, f) => {
635
+ }), oe = w((s, x) => {
627
636
  const {
628
- text: d = "Activity level",
629
- activityLevels: a,
637
+ text: m = "Activity level",
638
+ activityLevels: t,
630
639
  onChange: l = () => {
631
640
  }
632
641
  } = s, [c, n] = N(null);
633
642
  return /* @__PURE__ */ i(z, { children: [
634
- /* @__PURE__ */ t("div", { className: "grid-label", children: d }),
635
- /* @__PURE__ */ t("div", { className: "caluclating-group", children: a == null ? void 0 : a.map((e, r) => /* @__PURE__ */ t(
643
+ /* @__PURE__ */ a("div", { className: "grid-label", children: m }),
644
+ /* @__PURE__ */ a("div", { className: "caluclating-group", children: t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ a(
636
645
  S,
637
646
  {
638
647
  type: "button",
@@ -647,12 +656,12 @@ const ie = w((s, f) => {
647
656
  r
648
657
  )) })
649
658
  ] });
650
- }), se = w((s, f) => {
651
- const { text: d = "Goal", goals: a, onChange: l = () => {
659
+ }), se = w((s, x) => {
660
+ const { text: m = "Goal", goals: t, onChange: l = () => {
652
661
  } } = s, [c, n] = N(null);
653
662
  return /* @__PURE__ */ i(z, { children: [
654
- /* @__PURE__ */ t("div", { className: "grid-label", children: d }),
655
- /* @__PURE__ */ t("div", { className: "caluclating-group group-activity", children: a == null ? void 0 : a.map((e, r) => /* @__PURE__ */ t(
663
+ /* @__PURE__ */ a("div", { className: "grid-label", children: m }),
664
+ /* @__PURE__ */ a("div", { className: "caluclating-group group-activity", children: t == null ? void 0 : t.map((e, r) => /* @__PURE__ */ a(
656
665
  S,
657
666
  {
658
667
  type: "button",
@@ -663,77 +672,77 @@ const ie = w((s, f) => {
663
672
  n(e == null ? void 0 : e.code), l(e == null ? void 0 : e.code);
664
673
  },
665
674
  children: /* @__PURE__ */ i("div", { className: "btn-cnt", children: [
666
- /* @__PURE__ */ t("i", { className: e == null ? void 0 : e.icon }),
667
- /* @__PURE__ */ t("span", { children: e == null ? void 0 : e.name })
675
+ /* @__PURE__ */ a("i", { className: e == null ? void 0 : e.icon }),
676
+ /* @__PURE__ */ a("span", { children: e == null ? void 0 : e.name })
668
677
  ] })
669
678
  },
670
679
  r
671
680
  )) })
672
681
  ] });
673
- }), de = w((s, f) => {
682
+ }), de = w((s, x) => {
674
683
  const {
675
- caloriesText: d = "Calories",
676
- carbsText: a = "Carbs",
684
+ caloriesText: m = "Calories",
685
+ carbsText: t = "Carbs",
677
686
  proteinText: l = "Protein",
678
687
  fatsText: c = "Fats",
679
688
  calculateAgainText: n = "Calculate again",
680
689
  calories: e,
681
690
  carbs: r,
682
691
  protein: o,
683
- fats: m,
684
- onGoBack: g = () => {
692
+ fats: g,
693
+ onGoBack: u = () => {
685
694
  }
686
695
  } = s;
687
696
  return /* @__PURE__ */ i(te, { children: [
688
697
  /* @__PURE__ */ i(ae, { children: [
689
698
  /* @__PURE__ */ i(R, { color: "var(--warning-600)", children: [
690
- /* @__PURE__ */ t("i", { className: "mng-lnc-fire" }),
699
+ /* @__PURE__ */ a("i", { className: "mng-lnc-fire" }),
691
700
  /* @__PURE__ */ i("div", { className: "subgroup", children: [
692
701
  /* @__PURE__ */ i("div", { children: [
693
702
  e,
694
703
  " kcal"
695
704
  ] }),
696
- /* @__PURE__ */ t("div", { className: "subtext", children: d })
705
+ /* @__PURE__ */ a("div", { className: "subtext", children: m })
697
706
  ] })
698
707
  ] }),
699
708
  /* @__PURE__ */ i(R, { color: "var(--secondary-400)", children: [
700
- /* @__PURE__ */ t("i", { className: "mng-lnc-leaf" }),
709
+ /* @__PURE__ */ a("i", { className: "mng-lnc-leaf" }),
701
710
  /* @__PURE__ */ i("div", { className: "subgroup", children: [
702
711
  /* @__PURE__ */ i("div", { children: [
703
712
  r,
704
713
  "g"
705
714
  ] }),
706
- /* @__PURE__ */ t("div", { className: "subtext", children: a })
715
+ /* @__PURE__ */ a("div", { className: "subtext", children: t })
707
716
  ] })
708
717
  ] }),
709
718
  /* @__PURE__ */ i(R, { color: "var(--info-500)", children: [
710
- /* @__PURE__ */ t("i", { className: "mng-lnc-meat" }),
719
+ /* @__PURE__ */ a("i", { className: "mng-lnc-meat" }),
711
720
  /* @__PURE__ */ i("div", { className: "subgroup", children: [
712
721
  /* @__PURE__ */ i("div", { children: [
713
722
  o,
714
723
  "g"
715
724
  ] }),
716
- /* @__PURE__ */ t("div", { className: "subtext", children: l })
725
+ /* @__PURE__ */ a("div", { className: "subtext", children: l })
717
726
  ] })
718
727
  ] }),
719
728
  /* @__PURE__ */ i(R, { color: "var(--warning-300)", children: [
720
- /* @__PURE__ */ t("i", { className: "mng-lnc-meat" }),
729
+ /* @__PURE__ */ a("i", { className: "mng-lnc-meat" }),
721
730
  /* @__PURE__ */ i("div", { className: "subgroup", children: [
722
731
  /* @__PURE__ */ i("div", { children: [
723
- m,
732
+ g,
724
733
  "g"
725
734
  ] }),
726
- /* @__PURE__ */ t("div", { className: "subtext", children: c })
735
+ /* @__PURE__ */ a("div", { className: "subtext", children: c })
727
736
  ] })
728
737
  ] })
729
738
  ] }),
730
739
  /* @__PURE__ */ i("div", { className: "dropdown-group", children: [
731
- /* @__PURE__ */ t("div", { className: "vertical-line" }),
732
- /* @__PURE__ */ t(
740
+ /* @__PURE__ */ a("div", { className: "vertical-line" }),
741
+ /* @__PURE__ */ a(
733
742
  K,
734
743
  {
735
744
  color: "neutral",
736
- control: /* @__PURE__ */ t(
745
+ control: /* @__PURE__ */ a(
737
746
  X,
738
747
  {
739
748
  borderRadius: "curved",
@@ -746,68 +755,68 @@ const ie = w((s, f) => {
746
755
  ),
747
756
  offsetValue: -10,
748
757
  placement: "bottom-end",
749
- children: /* @__PURE__ */ t(_, { icon: "star", onClick: g, children: n })
758
+ children: /* @__PURE__ */ a(_, { icon: "star", onClick: u, children: n })
750
759
  }
751
760
  )
752
761
  ] })
753
762
  ] });
754
- }), me = w((s, f) => {
763
+ }), me = w((s, x) => {
755
764
  const {
756
- caloriesText: d,
757
- carbsText: a,
765
+ caloriesText: m,
766
+ carbsText: t,
758
767
  proteinText: l,
759
768
  fatsText: c,
760
769
  calculateAgainText: n,
761
770
  yearsText: e,
762
771
  heightText: r,
763
772
  weightText: o,
764
- genderText: m,
765
- calculateText: g,
766
- closeText: p,
767
- genders: h,
768
- activityLevels: v,
769
- activityLevelText: x,
773
+ genderText: g,
774
+ calculateText: u,
775
+ closeText: v,
776
+ genders: f,
777
+ activityLevels: p,
778
+ activityLevelText: d,
770
779
  goalText: k,
771
- goals: C,
772
- title: u = "Daily calorie calculator",
773
- subtitle: L = "Lorem ipsum dolor sit amet",
774
- list: j = [
780
+ goals: T,
781
+ title: h = "Daily calorie calculator",
782
+ subtitle: j = "Lorem ipsum dolor sit amet",
783
+ list: L = [
775
784
  "Ovdje može pisati zašto je bitno da znamo kolika nam je dnevna kalorijska potreba.",
776
785
  "Ovdje može pisati zašto je bitno da znamo kolikanam je dnevna kalorijska potreba.",
777
786
  "From certified dealers from all over Europe"
778
787
  ],
779
788
  buttonText: M = "Calculate calorie needs"
780
789
  } = s, [W, $] = N(1), [b, B] = N(0);
781
- return /* @__PURE__ */ i(J, { ref: f, children: [
790
+ return /* @__PURE__ */ i(J, { ref: x, children: [
782
791
  /* @__PURE__ */ i(Q, { children: [
783
- /* @__PURE__ */ t("div", { className: "header-title", children: u }),
784
- /* @__PURE__ */ t("div", { className: "header-subtitle", children: L })
792
+ /* @__PURE__ */ a("div", { className: "header-title", children: h }),
793
+ /* @__PURE__ */ a("div", { className: "header-subtitle", children: j })
785
794
  ] }),
786
- W === 1 && /* @__PURE__ */ t(
795
+ W === 1 && /* @__PURE__ */ a(
787
796
  Z,
788
797
  {
789
798
  buttonText: M,
790
799
  onButtonAction: () => {
791
800
  $(2);
792
801
  },
793
- list: j
802
+ list: L
794
803
  }
795
804
  ),
796
- W === 2 && /* @__PURE__ */ t(
805
+ W === 2 && /* @__PURE__ */ a(
797
806
  ie,
798
807
  {
799
808
  yearsText: e,
800
809
  heightText: r,
801
810
  weightText: o,
802
- genderText: m,
803
- calculateText: g,
804
- closeText: p,
811
+ genderText: g,
812
+ calculateText: u,
813
+ closeText: v,
805
814
  onClose: () => $(1),
806
- genders: h,
807
- activityLevels: v,
808
- activityLevelText: x,
815
+ genders: f,
816
+ activityLevels: p,
817
+ activityLevelText: d,
809
818
  goalText: k,
810
- goals: C,
819
+ goals: T,
811
820
  onCalculate: ({
812
821
  gender: V,
813
822
  year: E,
@@ -828,11 +837,11 @@ const ie = w((s, f) => {
828
837
  }
829
838
  }
830
839
  ),
831
- W === 3 && /* @__PURE__ */ t(
840
+ W === 3 && /* @__PURE__ */ a(
832
841
  de,
833
842
  {
834
- caloriesText: d,
835
- carbsText: a,
843
+ caloriesText: m,
844
+ carbsText: t,
836
845
  proteinText: l,
837
846
  fatsText: c,
838
847
  calculateAgainText: n,
@@ -844,7 +853,7 @@ const ie = w((s, f) => {
844
853
  }
845
854
  )
846
855
  ] });
847
- }), ke = w((s, f) => /* @__PURE__ */ t(me, { ref: f, ...s }));
856
+ }), ke = w((s, x) => /* @__PURE__ */ a(me, { ref: x, ...s }));
848
857
  export {
849
858
  ke as default
850
859
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.73",
3
+ "version": "4.0.74",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [