@lanaco/lnc-react-ui 4.0.73 → 4.0.75

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.
@@ -3,8 +3,8 @@
3
3
  border-radius: 0.75rem;
4
4
  background-color: ${e=>e.bgcolor||"transparent"};
5
5
  overflow: hidden;
6
- max-height: ${e=>e.height||"22.5rem"};
7
- min-height: ${e=>e.height||"22.5rem"};
6
+ max-height: ${e=>`${e.height}px`||"22.5rem"};
7
+ min-height: ${e=>`${e.height}px`||"22.5rem"};
8
8
  background-color: ${e=>e.bgcolor||"transparent"};
9
9
 
10
10
  & button {
@@ -13,10 +13,10 @@
13
13
 
14
14
  & img {
15
15
  object-fit: cover;
16
- max-width: ${e=>e.imgW||"22.5rem"};
17
- min-width: ${e=>e.imgW||"22.5rem"};
18
- max-height: ${e=>e.height||"22.5rem"};
19
- min-height: ${e=>e.height||"22.5rem"};
16
+ max-width: ${e=>`${e.imgW}px`||"22.5rem"};
17
+ min-width: ${e=>`${e.imgW}px`||"22.5rem"};
18
+ max-height: ${e=>`${e.height}px`||"22.5rem"};
19
+ min-height: ${e=>`${e.height}px`||"22.5rem"};
20
20
  }
21
21
 
22
22
  ${e=>e.hasBorder===!0&&`border: 1px solid var(--gray-95008, rgba(20, 22, 26, 0.08));
@@ -38,8 +38,8 @@
38
38
  & img {
39
39
  max-width: 100%;
40
40
  min-width: 100%;
41
- max-height: ${e=>e.imgHMob||"12.1rem"};
42
- min-height: ${e=>e.imgHMob||"12.1rem"};
41
+ max-height: ${e=>`${e.imgHMob}px`||"12.1rem"};
42
+ min-height: ${e=>`${e.imgHMob}px`||"12.1rem"};
43
43
  }
44
44
  }
45
45
  `,H=i.styled.div`
@@ -74,4 +74,4 @@
74
74
  @media (max-width: ${r.MOBILE_SIZE_PX+"px"}) {
75
75
  flex-direction: column;
76
76
  }
77
- `,_=j.forwardRef((e,m)=>{const{title:d,subtitle:l,buttonText:h,buttonLink:c,onButtonAction:g=()=>{},imageUrl:o,imagePosition:n="right",hideImageForMobile:s=!1,sectionHeight:u="12.65625rem",imageWidth:x,imageHeightMobile:b,smallPadding:p=!1,isHorizontalContent:f=!1,backgroundColor:w,hasBorder:$=!1}=e,a=M.useDetectMobile();return t.jsxs(v,{ref:m,bgcolor:w,height:u,imgW:x,imgHMob:b,hasBorder:$,children:[n!=="right"&&!(s===!0&&a===!0)&&t.jsx("img",{src:o}),t.jsxs(H,{isHorizontalContent:f,smallPadding:p,children:[t.jsxs(B,{children:[t.jsx("div",{className:"header-title",children:d}),t.jsx("div",{className:"header-subitle",children:l})]}),t.jsx(y,{size:"medium",color:"neutral",type:"button",onClick:()=>g(c),children:h})]}),n==="right"&&!(s===!0&&a===!0)&&t.jsx("img",{src:o})]})});module.exports=_;
77
+ `,_=j.forwardRef((e,m)=>{const{title:d,subtitle:l,buttonText:h,buttonLink:c,onButtonAction:g=()=>{},imageUrl:o,imagePosition:n="right",hideImageForMobile:s=!1,sectionHeight:x="12.65625rem",imageWidth:u,imageHeightMobile:p,smallPadding:b=!1,isHorizontalContent:$=!1,backgroundColor:f,hasBorder:w=!1}=e,a=M.useDetectMobile();return t.jsxs(v,{ref:m,bgcolor:f,height:x,imgW:u,imgHMob:p,hasBorder:w,children:[n!=="right"&&!(s===!0&&a===!0)&&t.jsx("img",{src:o}),t.jsxs(H,{isHorizontalContent:$,smallPadding:b,children:[t.jsxs(B,{children:[t.jsx("div",{className:"header-title",children:d}),t.jsx("div",{className:"header-subitle",children:l})]}),t.jsx(y,{size:"medium",color:"neutral",type:"button",onClick:()=>g(c),children:h})]}),n==="right"&&!(s===!0&&a===!0)&&t.jsx("img",{src:o})]})});module.exports=_;
@@ -9,8 +9,8 @@ const C = r.div`
9
9
  border-radius: 0.75rem;
10
10
  background-color: ${(e) => e.bgcolor || "transparent"};
11
11
  overflow: hidden;
12
- max-height: ${(e) => e.height || "22.5rem"};
13
- min-height: ${(e) => e.height || "22.5rem"};
12
+ max-height: ${(e) => `${e.height}px` || "22.5rem"};
13
+ min-height: ${(e) => `${e.height}px` || "22.5rem"};
14
14
  background-color: ${(e) => e.bgcolor || "transparent"};
15
15
 
16
16
  & button {
@@ -19,10 +19,10 @@ const C = r.div`
19
19
 
20
20
  & img {
21
21
  object-fit: cover;
22
- max-width: ${(e) => e.imgW || "22.5rem"};
23
- min-width: ${(e) => e.imgW || "22.5rem"};
24
- max-height: ${(e) => e.height || "22.5rem"};
25
- min-height: ${(e) => e.height || "22.5rem"};
22
+ max-width: ${(e) => `${e.imgW}px` || "22.5rem"};
23
+ min-width: ${(e) => `${e.imgW}px` || "22.5rem"};
24
+ max-height: ${(e) => `${e.height}px` || "22.5rem"};
25
+ min-height: ${(e) => `${e.height}px` || "22.5rem"};
26
26
  }
27
27
 
28
28
  ${(e) => e.hasBorder === !0 && `border: 1px solid var(--gray-95008, rgba(20, 22, 26, 0.08));
@@ -44,8 +44,8 @@ const C = r.div`
44
44
  & img {
45
45
  max-width: 100%;
46
46
  min-width: 100%;
47
- max-height: ${(e) => e.imgHMob || "12.1rem"};
48
- min-height: ${(e) => e.imgHMob || "12.1rem"};
47
+ max-height: ${(e) => `${e.imgHMob}px` || "12.1rem"};
48
+ min-height: ${(e) => `${e.imgHMob}px` || "12.1rem"};
49
49
  }
50
50
  }
51
51
  `, z = r.div`
@@ -86,13 +86,13 @@ const C = r.div`
86
86
  subtitle: s,
87
87
  buttonText: g,
88
88
  buttonLink: c,
89
- onButtonAction: u = () => {
89
+ onButtonAction: x = () => {
90
90
  },
91
91
  imageUrl: n,
92
92
  imagePosition: a = "right",
93
93
  hideImageForMobile: m = !1,
94
- sectionHeight: x = "12.65625rem",
95
- imageWidth: p,
94
+ sectionHeight: p = "12.65625rem",
95
+ imageWidth: u,
96
96
  imageHeightMobile: f,
97
97
  smallPadding: b = !1,
98
98
  isHorizontalContent: $ = !1,
@@ -104,8 +104,8 @@ const C = r.div`
104
104
  {
105
105
  ref: l,
106
106
  bgcolor: w,
107
- height: x,
108
- imgW: p,
107
+ height: p,
108
+ imgW: u,
109
109
  imgHMob: f,
110
110
  hasBorder: v,
111
111
  children: [
@@ -126,7 +126,7 @@ const C = r.div`
126
126
  size: "medium",
127
127
  color: "neutral",
128
128
  type: "button",
129
- onClick: () => u(c),
129
+ onClick: () => x(c),
130
130
  children: g
131
131
  }
132
132
  )
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),p=require("react"),c=require("./utils-BXPz9bck.cjs"),d=require("./emotion-styled.browser.esm-BtEseadx.cjs"),o=require("./consts-CtNoHdBj.cjs"),h=d.styled.div`
1
+ "use strict";const e=require("react/jsx-runtime"),p=require("react"),c=require("./utils-BXPz9bck.cjs"),d=require("./emotion-styled.browser.esm-BtEseadx.cjs"),o=require("./consts-CtNoHdBj.cjs"),h=d.styled.div`
2
2
  width: 7.5rem;
3
3
  height: auto;
4
4
  max-height: 7.5rem;
@@ -31,7 +31,7 @@
31
31
  width: 4.5rem;
32
32
  height: 4.5rem;
33
33
  }
34
- `,g=p.forwardRef(({imageComponent:t,image:n,onSelectCard:a},i)=>r.jsx(h,{children:c.isDefined(t)?t:r.jsx("img",{src:n,className:"wrapper__image",onSelectCard:a})})),m=p.forwardRef(({},t)=>r.jsx(_,{})),w=d.styled.div`
34
+ `,m=p.forwardRef(({imageComponent:t,image:i,onSelectCard:r},n)=>e.jsx(h,{children:c.isDefined(t)?t:e.jsx("img",{src:i,className:"wrapper__image",onSelectCard:r})})),g=p.forwardRef(({},t)=>e.jsx(_,{})),w=d.styled.div`
35
35
  display: flex;
36
36
  flex-direction: column;
37
37
  align-items: flex-start;
@@ -91,4 +91,4 @@
91
91
  }
92
92
  }
93
93
  }
94
- `,x=p.forwardRef(({title:t,subtitle:n,items:a=[],onSelectCard:i=()=>{}},f)=>{var l;return r.jsx(w,{children:r.jsxs("div",{className:"wrapper__heading",children:[t&&r.jsx("div",{className:"wrapper__title",children:t}),n&&r.jsx("div",{className:"wrapper__subtitle",children:n}),r.jsx("div",{className:"wrapper__content",children:a&&(a==null?void 0:a.length)>0?a==null?void 0:a.map((e,s)=>r.jsx(g,{image:e==null?void 0:e.image,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:()=>i==null?void 0:i(e==null?void 0:e.uuid),className:"wrapper__item"},`brand-hit-card__${s+1}`)):(l=Array.from("12345"))==null?void 0:l.map((e,s)=>r.jsx(m,{},`brand-hit-card-skeleton__${s+1}`))})]})})});module.exports=x;
94
+ `,x=p.forwardRef(({title:t,subtitle:i,items:r=[],onSelectCard:n=()=>{}},f)=>{var l;return e.jsx(w,{children:e.jsxs("div",{className:"wrapper__heading",children:[t&&e.jsx("div",{className:"wrapper__title",children:t}),i&&e.jsx("div",{className:"wrapper__subtitle",children:i}),e.jsx("div",{className:"wrapper__content",children:r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map((a,s)=>e.jsx(m,{image:a==null?void 0:a.image,imageComponent:a==null?void 0:a.imageComponent,onSelectCard:()=>n==null?void 0:n(a),className:"wrapper__item"},`brand-hit-card__${s+1}`)):(l=Array.from("12345"))==null?void 0:l.map((a,s)=>e.jsx(g,{},`brand-hit-card-skeleton__${s+1}`))})]})})});module.exports=x;
@@ -1,8 +1,8 @@
1
- import { jsx as a, jsxs as m } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
2
  import { forwardRef as o } from "react";
3
3
  import { m as c, l as s } from "./utils-DCs-SbIv.js";
4
4
  import { s as d } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { M as l } from "./consts-C1uHV4xc.js";
5
+ import { M as m } from "./consts-C1uHV4xc.js";
6
6
  const g = d.div`
7
7
  width: 7.5rem;
8
8
  height: auto;
@@ -17,7 +17,7 @@ const g = d.div`
17
17
  height: auto;
18
18
  }
19
19
 
20
- @media (max-width: ${l + "px"}) {
20
+ @media (max-width: ${m + "px"}) {
21
21
  width: 4.5rem;
22
22
  height: auto;
23
23
  max-height: 4.5rem;
@@ -32,20 +32,20 @@ const g = d.div`
32
32
  height: 7.5rem;
33
33
  background: ${c("-90deg")};
34
34
 
35
- @media (max-width: ${l + "px"}) {
35
+ @media (max-width: ${m + "px"}) {
36
36
  width: 4.5rem;
37
37
  height: 4.5rem;
38
38
  }
39
39
  `, w = o(
40
- ({ imageComponent: t, image: i, onSelectCard: e }, n) => /* @__PURE__ */ a(g, { children: s(t) ? t : /* @__PURE__ */ a(
40
+ ({ imageComponent: t, image: i, onSelectCard: r }, n) => /* @__PURE__ */ e(g, { children: s(t) ? t : /* @__PURE__ */ e(
41
41
  "img",
42
42
  {
43
43
  src: i,
44
44
  className: "wrapper__image",
45
- onSelectCard: e
45
+ onSelectCard: r
46
46
  }
47
47
  ) })
48
- ), f = o(({}, t) => /* @__PURE__ */ a(_, {})), x = d.div`
48
+ ), f = o(({}, t) => /* @__PURE__ */ e(_, {})), x = d.div`
49
49
  display: flex;
50
50
  flex-direction: column;
51
51
  align-items: flex-start;
@@ -94,7 +94,7 @@ const g = d.div`
94
94
  }
95
95
  }
96
96
 
97
- @media (max-width: ${l + "px"}) {
97
+ @media (max-width: ${m + "px"}) {
98
98
  & .wrapper__content {
99
99
  align-content: center;
100
100
  gap: 1rem;
@@ -106,22 +106,22 @@ const g = d.div`
106
106
  }
107
107
  }
108
108
  `, k = o(
109
- ({ title: t, subtitle: i, items: e = [], onSelectCard: n = () => {
109
+ ({ title: t, subtitle: i, items: r = [], onSelectCard: n = () => {
110
110
  } }, u) => {
111
- var h;
112
- return /* @__PURE__ */ a(x, { children: /* @__PURE__ */ m("div", { className: "wrapper__heading", children: [
113
- t && /* @__PURE__ */ a("div", { className: "wrapper__title", children: t }),
114
- i && /* @__PURE__ */ a("div", { className: "wrapper__subtitle", children: i }),
115
- /* @__PURE__ */ a("div", { className: "wrapper__content", children: e && (e == null ? void 0 : e.length) > 0 ? e == null ? void 0 : e.map((r, p) => /* @__PURE__ */ a(
111
+ var l;
112
+ return /* @__PURE__ */ e(x, { children: /* @__PURE__ */ h("div", { className: "wrapper__heading", children: [
113
+ t && /* @__PURE__ */ e("div", { className: "wrapper__title", children: t }),
114
+ i && /* @__PURE__ */ e("div", { className: "wrapper__subtitle", children: i }),
115
+ /* @__PURE__ */ e("div", { className: "wrapper__content", children: r && (r == null ? void 0 : r.length) > 0 ? r == null ? void 0 : r.map((a, p) => /* @__PURE__ */ e(
116
116
  w,
117
117
  {
118
- image: r == null ? void 0 : r.image,
119
- imageComponent: r == null ? void 0 : r.imageComponent,
120
- onSelectCard: () => n == null ? void 0 : n(r == null ? void 0 : r.uuid),
118
+ image: a == null ? void 0 : a.image,
119
+ imageComponent: a == null ? void 0 : a.imageComponent,
120
+ onSelectCard: () => n == null ? void 0 : n(a),
121
121
  className: "wrapper__item"
122
122
  },
123
123
  `brand-hit-card__${p + 1}`
124
- )) : (h = Array.from("12345")) == null ? void 0 : h.map((r, p) => /* @__PURE__ */ a(
124
+ )) : (l = Array.from("12345")) == null ? void 0 : l.map((a, p) => /* @__PURE__ */ e(
125
125
  f,
126
126
  {},
127
127
  `brand-hit-card-skeleton__${p + 1}`
@@ -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;