@lanaco/lnc-react-ui 4.0.39 → 4.0.40

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.
Files changed (62) hide show
  1. package/dist/BannerSectionBasic.cjs +9 -9
  2. package/dist/BannerSectionBasic.js +20 -20
  3. package/dist/BannerSectionCarousel.cjs +13 -5
  4. package/dist/BannerSectionCarousel.js +29 -21
  5. package/dist/BannerSectionGrid.cjs +1 -1
  6. package/dist/BannerSectionGrid.js +6 -6
  7. package/dist/BannerSectionSimple.cjs +4 -4
  8. package/dist/BannerSectionSimple.js +41 -38
  9. package/dist/BannerSectionWithList.cjs +4 -4
  10. package/dist/BannerSectionWithList.js +17 -17
  11. package/dist/BannerSectionWithListImage.cjs +5 -5
  12. package/dist/BannerSectionWithListImage.js +41 -38
  13. package/dist/BlogsSectionDetailed.cjs +10 -10
  14. package/dist/BlogsSectionDetailed.js +32 -33
  15. package/dist/BlogsSectionLarge.cjs +2 -2
  16. package/dist/BlogsSectionLarge.js +2 -2
  17. package/dist/BlogsSectionSimple.cjs +2 -2
  18. package/dist/BlogsSectionSimple.js +20 -20
  19. package/dist/BlogsSectionSimpleCentered.cjs +6 -6
  20. package/dist/BlogsSectionSimpleCentered.js +9 -9
  21. package/dist/BlogsSectionWithFilters.cjs +10 -10
  22. package/dist/BlogsSectionWithFilters.js +65 -64
  23. package/dist/BrandHitsSection.cjs +12 -7
  24. package/dist/BrandHitsSection.js +10 -5
  25. package/dist/CalorieCalculatorSection.cjs +7 -8
  26. package/dist/CalorieCalculatorSection.js +31 -32
  27. package/dist/CustomLoanMapSection.cjs +2 -2
  28. package/dist/CustomLoanMapSection.js +13 -13
  29. package/dist/DetailedProductsSection.cjs +1 -1
  30. package/dist/DetailedProductsSection.js +1 -1
  31. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +8 -8
  32. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +9 -8
  33. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +14 -6
  34. package/dist/FieldOfInterestsWithTagsCardsSection.js +12 -4
  35. package/dist/GeneralWithTagsCardsSection.cjs +18 -6
  36. package/dist/GeneralWithTagsCardsSection.js +44 -31
  37. package/dist/GiftCardsSection.cjs +9 -5
  38. package/dist/GiftCardsSection.js +21 -17
  39. package/dist/LocationSearchSection.cjs +1 -1
  40. package/dist/LocationSearchSection.js +1 -1
  41. package/dist/MasonryGeneralCardsSection.cjs +21 -1
  42. package/dist/MasonryGeneralCardsSection.js +20 -0
  43. package/dist/OverlayGeneralCardsSection.cjs +52 -96
  44. package/dist/OverlayGeneralCardsSection.js +116 -165
  45. package/dist/ProductsWithBannerSection.cjs +5 -5
  46. package/dist/ProductsWithBannerSection.js +26 -26
  47. package/dist/SalesCampaignsSection.cjs +17 -17
  48. package/dist/SalesCampaignsSection.js +81 -81
  49. package/dist/ShopCardsSection.cjs +19 -9
  50. package/dist/ShopCardsSection.js +54 -40
  51. package/dist/SimpleCategoriesSection.cjs +1 -1
  52. package/dist/SimpleCategoriesSection.js +1 -1
  53. package/dist/SimpleProductsSection.cjs +1 -1
  54. package/dist/SimpleProductsSection.js +1 -1
  55. package/dist/{index-CT6_7UFb.js → index-5cttM4t7.js} +119 -124
  56. package/dist/{index-BN8qgFbe.js → index-BT55M3t6.js} +8 -7
  57. package/dist/{index-_Db92CJE.cjs → index-DHJmdMN8.cjs} +5 -4
  58. package/dist/index-Dn5tPLgP.cjs +95 -0
  59. package/dist/{style-6tSw9aqK.js → style-CiePxaJ_.js} +6 -6
  60. package/dist/{style-BR3tIhP1.cjs → style-DN1qT8BE.cjs} +6 -6
  61. package/package.json +1 -1
  62. package/dist/index-Q_i-aqsF.cjs +0 -95
@@ -1,22 +1,22 @@
1
- import { jsxs as l, jsx as t, Fragment as p } from "react/jsx-runtime";
2
- import { forwardRef as h, Suspense as B, memo as M, useMemo as W } from "react";
3
- import { n as u } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
- import { M as w } from "./consts-C1uHV4xc.js";
5
- import { u as z } from "./useDetectMobile-BC6EGaBc.js";
6
- import { m as g, t as P, k as b } from "./utils-DtRLzzTZ.js";
7
- import { T as R } from "./style-6tSw9aqK.js";
8
- import j from "./Button.js";
9
- import A from "./Link.js";
10
- import { S as E } from "./index-CT6_7UFb.js";
11
- const F = u.div`
1
+ import { jsxs as l, jsx as t, Fragment as h } from "react/jsx-runtime";
2
+ import { forwardRef as u, Suspense as M, memo as W, useMemo as z } from "react";
3
+ import { n as f } from "./emotion-styled.browser.esm-CjCaF13H.js";
4
+ import { M as y } from "./consts-C1uHV4xc.js";
5
+ import { u as P } from "./useDetectMobile-BC6EGaBc.js";
6
+ import { m as p, t as R, k as v } from "./utils-DtRLzzTZ.js";
7
+ import { T as j } from "./style-CiePxaJ_.js";
8
+ import A from "./Button.js";
9
+ import E from "./Link.js";
10
+ import { S as F } from "./index-5cttM4t7.js";
11
+ const I = f.div`
12
12
  display: grid;
13
13
  grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
14
14
  gap: 1.25rem;
15
15
 
16
- @media (max-width: ${w + "px"}) {
16
+ @media (max-width: ${y + "px"}) {
17
17
  grid-template-columns: repeat(1, 1fr);
18
18
  }
19
- `, S = u.div`
19
+ `, C = f.div`
20
20
  display: flex;
21
21
  width: 100%;
22
22
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1),
@@ -45,16 +45,16 @@ const F = u.div`
45
45
  min-height: 3.3125rem;
46
46
  max-height: 3.3125rem;
47
47
  border-radius: 0.75rem;
48
- background-color: ${g("-90deg")};
48
+ background-color: ${p("-90deg")};
49
49
  }
50
50
 
51
51
  & a {
52
52
  margin-top: auto;
53
53
  }
54
54
 
55
- @media (max-width: ${w + "px"}) {
55
+ @media (max-width: ${y + "px"}) {
56
56
  }
57
- `, v = u.div`
57
+ `, N = f.div`
58
58
  display: flex;
59
59
  flex-direction: column;
60
60
  gap: 0.5rem;
@@ -68,142 +68,143 @@ const F = u.div`
68
68
  & .skeleton-title {
69
69
  height: 1.5rem;
70
70
  width: 80%;
71
- background-color: ${g("-90deg")};
71
+ background-color: ${p("-90deg")};
72
72
  }
73
73
 
74
74
  & .skeleton-action {
75
75
  height: 1.25rem;
76
76
  width: 20%;
77
- background-color: ${g("-90deg")};
77
+ background-color: ${p("-90deg")};
78
78
  }
79
79
 
80
80
  & .text-wr {
81
81
  font-weight: 400;
82
82
  font-size: 0.875rem;
83
83
  color: var(--gray-700, #4e555f);
84
- ${P(3)}
84
+ ${R(3)}
85
85
  }
86
- `, I = h(({}, i) => /* @__PURE__ */ l(S, { className: "blog-card", children: [
87
- /* @__PURE__ */ l(v, { children: [
86
+ `, L = u(({}, i) => /* @__PURE__ */ l(C, { className: "blog-card", children: [
87
+ /* @__PURE__ */ l(N, { children: [
88
88
  /* @__PURE__ */ t("div", { className: "skeleton-title" }),
89
89
  /* @__PURE__ */ t("div", { className: "text-wr" }),
90
90
  /* @__PURE__ */ t("div", { className: "skeleton-action" })
91
91
  ] }),
92
92
  /* @__PURE__ */ t("div", { className: "skeleton-img" })
93
- ] })), O = h((i, m) => {
94
- const { title: o, image: a, text: r, buttonText: c, onCardClick: n } = i;
93
+ ] })), O = u((i, n) => {
94
+ const { title: o, image: m, text: r, buttonText: c, onCardClick: a } = i;
95
95
  return (
96
96
  // <SimpleBlogCardHorizontalSkeleton />
97
- /* @__PURE__ */ l(S, { className: "blog-card", onClick: n, children: [
98
- /* @__PURE__ */ l(v, { children: [
97
+ /* @__PURE__ */ l(C, { className: "blog-card", onClick: a, children: [
98
+ /* @__PURE__ */ l(N, { children: [
99
99
  /* @__PURE__ */ t("div", { className: "text-wr-title", children: o }),
100
100
  /* @__PURE__ */ t("div", { className: "text-wr", children: r }),
101
- /* @__PURE__ */ t(A, { color: "gray", onClick: n, children: c })
101
+ /* @__PURE__ */ t(E, { color: "gray", onClick: a, children: c })
102
102
  ] }),
103
- /* @__PURE__ */ t("img", { src: a })
103
+ /* @__PURE__ */ t("img", { src: m })
104
104
  ] })
105
105
  );
106
- }), _ = ({ limit: i = 3, isLoading: m = !1, keyPrefix: o }) => /* @__PURE__ */ t(p, { children: Array.from({ length: i }, (a, r) => /* @__PURE__ */ t(
107
- I,
106
+ }), _ = ({ limit: i = 3, isLoading: n = !1, keyPrefix: o }) => /* @__PURE__ */ t(h, { children: Array.from({ length: i }, (m, r) => /* @__PURE__ */ t(
107
+ L,
108
108
  {
109
- isLoading: m
109
+ isLoading: n
110
110
  },
111
111
  `${o}-skeleton-product-card-${r}`
112
112
  )) }), D = ({
113
113
  children: i,
114
- fallbackComponent: m = /* @__PURE__ */ t(p, {}),
114
+ fallbackComponent: n = /* @__PURE__ */ t(h, {}),
115
115
  isLoading: o = !1,
116
- limit: a,
116
+ limit: m,
117
117
  keyPrefix: r
118
- }) => /* @__PURE__ */ t(B, { fallbackComponent: m, children: o === !0 ? /* @__PURE__ */ t(
118
+ }) => /* @__PURE__ */ t(M, { fallbackComponent: n, children: o === !0 ? /* @__PURE__ */ t(
119
119
  _,
120
120
  {
121
121
  isLoading: o,
122
- limit: a,
122
+ limit: m,
123
123
  keyPrefix: r
124
124
  }
125
- ) : i }), k = M(O), V = h((i, m) => {
125
+ ) : i }), S = W(O), Y = u((i, n) => {
126
126
  const {
127
127
  icon: o,
128
- title: a,
128
+ title: m,
129
129
  items: r,
130
130
  buttonText: c,
131
- limit: n = 3,
131
+ limit: a = 3,
132
132
  options: d,
133
- onActionClick: y = () => {
133
+ onButtonAction: b = () => {
134
134
  },
135
- onSelectOption: f = () => {
135
+ buttonLink: T,
136
+ onSelectOption: k = () => {
136
137
  },
137
- isLoading: C = !1,
138
- onSectionClick: N = () => {
138
+ isLoading: $ = !1,
139
+ onSelectCard: s = () => {
139
140
  }
140
- } = i, T = z(), $ = W(() => /* @__PURE__ */ t(p, { children: T === !0 ? r == null ? void 0 : r.map((e, s) => /* @__PURE__ */ t(
141
- k,
141
+ } = i, w = P(), B = z(() => /* @__PURE__ */ t(h, { children: w === !0 ? r == null ? void 0 : r.map((e, g) => /* @__PURE__ */ t(
142
+ S,
142
143
  {
143
144
  title: e == null ? void 0 : e.title,
144
145
  image: e == null ? void 0 : e.image,
145
146
  text: e == null ? void 0 : e.text,
146
147
  titleSlug: e == null ? void 0 : e.titleSlug,
147
148
  buttonText: e == null ? void 0 : e.buttonText,
148
- onCardClick: () => onSelectCard(e == null ? void 0 : e.uuid)
149
+ onCardClick: () => s(e)
149
150
  },
150
- s
151
- )) : r == null ? void 0 : r.slice(0, n).map((e, s) => /* @__PURE__ */ t(
152
- k,
151
+ g
152
+ )) : r == null ? void 0 : r.slice(0, a).map((e, g) => /* @__PURE__ */ t(
153
+ S,
153
154
  {
154
155
  title: e == null ? void 0 : e.title,
155
156
  image: e == null ? void 0 : e.image,
156
157
  text: e == null ? void 0 : e.text,
157
158
  titleSlug: e == null ? void 0 : e.titleSlug,
158
159
  buttonText: e == null ? void 0 : e.buttonText,
159
- onCardClick: () => onSelectCard(e == null ? void 0 : e.uuid)
160
+ onCardClick: () => s(e)
160
161
  },
161
- s
162
- )) }), [r]);
163
- return /* @__PURE__ */ l(R, { children: [
162
+ g
163
+ )) }), [r, w, a, s]);
164
+ return /* @__PURE__ */ l(j, { ref: n, children: [
164
165
  /* @__PURE__ */ l("div", { className: "regular-title", children: [
165
166
  /* @__PURE__ */ l("div", { className: "regular-title-text", children: [
166
- b(o) && /* @__PURE__ */ t("i", { className: o }),
167
- /* @__PURE__ */ t("span", { children: a })
167
+ v(o) && /* @__PURE__ */ t("i", { className: o }),
168
+ /* @__PURE__ */ t("span", { children: m })
168
169
  ] }),
169
- b(N) && /* @__PURE__ */ t(
170
- j,
170
+ v(b) && /* @__PURE__ */ t(
171
+ A,
171
172
  {
172
173
  type: "button",
173
174
  btnType: "tinted",
174
175
  color: "gray",
175
- onClick: y,
176
+ onClick: () => b(T),
176
177
  borderRadius: "curved",
177
178
  children: c
178
179
  }
179
180
  )
180
181
  ] }),
181
182
  (d == null ? void 0 : d.length) > 0 && /* @__PURE__ */ t(
182
- E,
183
+ F,
183
184
  {
184
185
  items: d,
185
186
  onRemove: (e) => {
186
- f(e);
187
+ k(e);
187
188
  },
188
189
  onSelect: (e) => {
189
- f(e);
190
+ k(e);
190
191
  },
191
192
  labelKey: "name",
192
193
  valueKey: "code",
193
194
  noMargin: !0
194
195
  }
195
196
  ),
196
- /* @__PURE__ */ t(F, { limit: n, children: /* @__PURE__ */ t(
197
+ /* @__PURE__ */ t(I, { limit: a, children: /* @__PURE__ */ t(
197
198
  D,
198
199
  {
199
- isLoading: C,
200
- limit: n,
200
+ isLoading: $,
201
+ limit: a,
201
202
  keyPrefix: "explore-landing",
202
- children: $
203
+ children: B
203
204
  }
204
205
  ) })
205
206
  ] });
206
207
  });
207
208
  export {
208
- V as default
209
+ Y as default
209
210
  };
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("react/jsx-runtime"),s=require("react"),c=require("./utils-NZLCh-J5.cjs"),o=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),d=require("./consts-CtNoHdBj.cjs"),h=o.newStyled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),d=require("react"),c=require("./utils-NZLCh-J5.cjs"),s=require("./emotion-styled.browser.esm-Cle7tAM9.cjs"),o=require("./consts-CtNoHdBj.cjs"),h=s.newStyled.div`
2
2
  width: 7.5rem;
3
3
  height: auto;
4
4
  max-height: 7.5rem;
@@ -12,7 +12,7 @@
12
12
  height: auto;
13
13
  }
14
14
 
15
- @media (max-width: ${d.MOBILE_SIZE_PX+"px"}) {
15
+ @media (max-width: ${o.MOBILE_SIZE_PX+"px"}) {
16
16
  width: 4.5rem;
17
17
  height: auto;
18
18
  max-height: 4.5rem;
@@ -22,26 +22,31 @@
22
22
  height: auto;
23
23
  }
24
24
  }
25
- `,_=o.newStyled.div`
25
+ `,_=s.newStyled.div`
26
26
  width: 7.5rem;
27
27
  height: 7.5rem;
28
28
  background: ${c.linearGradientAnimation("-90deg")};
29
29
 
30
- @media (max-width: ${d.MOBILE_SIZE_PX+"px"}) {
30
+ @media (max-width: ${o.MOBILE_SIZE_PX+"px"}) {
31
31
  width: 4.5rem;
32
32
  height: 4.5rem;
33
33
  }
34
- `,g=s.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})})),w=s.forwardRef(({},t)=>r.jsx(_,{})),m=o.newStyled.div`
34
+ `,g=d.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=d.forwardRef(({},t)=>r.jsx(_,{})),w=s.newStyled.div`
35
35
  display: flex;
36
36
  flex-direction: column;
37
37
  align-items: flex-start;
38
38
  gap: 2rem;
39
39
 
40
+ & img {
41
+ border-radius: 0.75rem;
42
+ }
43
+
40
44
  & .wrapper__heading {
41
45
  display: flex;
42
46
  flex-direction: column;
43
47
  gap: 1rem;
44
48
  text-align: center;
49
+ width: 100%;
45
50
 
46
51
  & .wrapper__title {
47
52
  color: var(--gray-950, #14161a);
@@ -75,7 +80,7 @@
75
80
  }
76
81
  }
77
82
 
78
- @media (max-width: ${d.MOBILE_SIZE_PX+"px"}) {
83
+ @media (max-width: ${o.MOBILE_SIZE_PX+"px"}) {
79
84
  & .wrapper__content {
80
85
  align-content: center;
81
86
  gap: 1rem;
@@ -86,4 +91,4 @@
86
91
  }
87
92
  }
88
93
  }
89
- `,x=s.forwardRef(({title:t,subtitle:n,items:a=[],onSelectCard:i=()=>{}},f)=>{var l;return r.jsx(m,{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,p)=>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__${p+1}`)):(l=Array.from("12345"))==null?void 0:l.map((e,p)=>r.jsx(w,{},`brand-hit-card-skeleton__${p+1}`))})]})})});module.exports=x;
94
+ `,x=d.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,p)=>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__${p+1}`)):(l=Array.from("12345"))==null?void 0:l.map((e,p)=>r.jsx(m,{},`brand-hit-card-skeleton__${p+1}`))})]})})});module.exports=x;
@@ -37,10 +37,10 @@ const s = d.div`
37
37
  height: 4.5rem;
38
38
  }
39
39
  `, w = o(
40
- ({ imageComponent: t, image: n, onSelectCard: e }, i) => /* @__PURE__ */ a(s, { children: g(t) ? t : /* @__PURE__ */ a(
40
+ ({ imageComponent: t, image: i, onSelectCard: e }, n) => /* @__PURE__ */ a(s, { children: g(t) ? t : /* @__PURE__ */ a(
41
41
  "img",
42
42
  {
43
- src: n,
43
+ src: i,
44
44
  className: "wrapper__image",
45
45
  onSelectCard: e
46
46
  }
@@ -51,11 +51,16 @@ const s = d.div`
51
51
  align-items: flex-start;
52
52
  gap: 2rem;
53
53
 
54
+ & img {
55
+ border-radius: 0.75rem;
56
+ }
57
+
54
58
  & .wrapper__heading {
55
59
  display: flex;
56
60
  flex-direction: column;
57
61
  gap: 1rem;
58
62
  text-align: center;
63
+ width: 100%;
59
64
 
60
65
  & .wrapper__title {
61
66
  color: var(--gray-950, #14161a);
@@ -101,18 +106,18 @@ const s = d.div`
101
106
  }
102
107
  }
103
108
  `, k = o(
104
- ({ title: t, subtitle: n, items: e = [], onSelectCard: i = () => {
109
+ ({ title: t, subtitle: i, items: e = [], onSelectCard: n = () => {
105
110
  } }, u) => {
106
111
  var h;
107
112
  return /* @__PURE__ */ a(x, { children: /* @__PURE__ */ m("div", { className: "wrapper__heading", children: [
108
113
  t && /* @__PURE__ */ a("div", { className: "wrapper__title", children: t }),
109
- n && /* @__PURE__ */ a("div", { className: "wrapper__subtitle", children: n }),
114
+ i && /* @__PURE__ */ a("div", { className: "wrapper__subtitle", children: i }),
110
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
116
  w,
112
117
  {
113
118
  image: r == null ? void 0 : r.image,
114
119
  imageComponent: r == null ? void 0 : r.imageComponent,
115
- onSelectCard: () => i == null ? void 0 : i(r == null ? void 0 : r.uuid),
120
+ onSelectCard: () => n == null ? void 0 : n(r == null ? void 0 : r.uuid),
116
121
  className: "wrapper__item"
117
122
  },
118
123
  `brand-hit-card__${p + 1}`
@@ -210,7 +210,7 @@
210
210
  grid-template-columns: repeat(2, 1fr);
211
211
  gap: 0.75rem;
212
212
  }
213
- `,S=b.newStyled.div`
213
+ `,k=b.newStyled.div`
214
214
  display: flex;
215
215
  flex-direction: column;
216
216
  gap: 0.75rem;
@@ -260,9 +260,8 @@
260
260
  display: inline-flex;
261
261
  align-items: center;
262
262
  cursor: pointer;
263
- background: var(--white);
263
+ background: var(--white, #fff);
264
264
  border-radius: 30px;
265
- padding: 0.25em 0.5em;
266
265
  user-select: none;
267
266
  font-family: Arial, sans-serif;
268
267
  font-weight: bold;
@@ -291,7 +290,7 @@
291
290
  top: 0;
292
291
  bottom: 0;
293
292
  left: ${c=>c.checked?"3rem":"3px"};
294
- background: var(--success-600);
293
+ background: var(--success-600, #059669);
295
294
  border-radius: 30px;
296
295
  transition: left 0.3s;
297
296
  width: fit-content;
@@ -301,11 +300,11 @@
301
300
  pointer-events: none;
302
301
  font-weight: normal;
303
302
  font-size: 0.9rem;
304
- color: var(--white);
303
+ color: var(--white, #fff);
305
304
  padding: 0 0.75rem;
306
305
  min-height: 2.5rem;
307
306
  max-height: 2.5rem;
308
- border: 1px solid var(--success-600);
307
+ border: 1px solid var(--success-600, #059669);
309
308
  }
310
309
 
311
310
  .text {
@@ -315,7 +314,7 @@
315
314
  display: flex;
316
315
  gap: 0.5rem;
317
316
  padding: 0.75rem;
318
- border: 1px solid var(--gray-95012);
317
+ border: 1px solid var(--gray-95012, #14161a1f);
319
318
  border-radius: 30px;
320
319
  min-height: 2.5rem;
321
320
  max-height: 2.5rem;
@@ -330,4 +329,4 @@
330
329
  align-items: center;
331
330
  gap: 0.38rem;
332
331
  }
333
- `,E=o.forwardRef((c,j)=>{var g,m,x,p,h,v,N,w;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,{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:(v=a==null?void 0:a.at(0))==null?void 0:v.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:(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=o.forwardRef((c,j)=>{var w;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,v=o.useRef({year:null,height:null,weight:null,gender:(w=i==null?void 0:i.at(0))==null?void 0:w.value,activityLevel:null,goal:null}),N=()=>{h==null||h(v==null?void 0:v.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=>v.current.gender=u})}),e.jsx(ae,{text:d,onChange:u=>v.current.year=u}),e.jsx(ne,{text:a,onChange:u=>v.current.height=u}),e.jsx(re,{text:l,onChange:u=>v.current.weight=u}),e.jsx(ie,{text:m,activityLevels:g,onChange:u=>v.current.activityLevel=u}),e.jsx(le,{text:x,goals:p,onChange:u=>v.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,j)=>{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,j)=>{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,j)=>{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,j)=>{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,j)=>{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,j)=>{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,j)=>{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:v,goalText:N,goals:w,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),[f,B]=o.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),k(3)};return e.jsxs(D,{ref:j,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:_,onBannerClick:()=>{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:v,goalText:N,goals:w,onCalculate:M}),R===3&&e.jsx(se,{caloriesText:d,carbsText:a,proteinText:l,fatsText:s,calculateAgainText:n,onGoBack:()=>k(2),calories:f==null?void 0:f.calories,fats:f==null?void 0:f.fat,carbs:f==null?void 0:f.carbs,protein:f==null?void 0:f.protein})]})}),oe=o.forwardRef((c,j)=>e.jsx(ce,{ref:j,...c}));module.exports=oe;
332
+ `,E=o.forwardRef((c,v)=>{var g,m,x,p,h,f,N,w;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:(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=o.forwardRef((c,v)=>{var w;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:(w=i==null?void 0:i.at(0))==null?void 0:w.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(k,{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(k,{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(k,{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(k,{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:w,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,S]=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),S(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:()=>{S(2)},list:T}),R===2&&e.jsx(te,{yearsText:t,heightText:r,weightText:i,genderText:g,calculateText:m,closeText:x,onClose:()=>S(1),genders:p,activityLevels:h,activityLevelText:f,goalText:N,goals:w,onCalculate:M}),R===3&&e.jsx(se,{caloriesText:d,carbsText:a,proteinText:l,fatsText:s,calculateAgainText:n,onGoBack:()=>S(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;