@scbt-ecom/ui 0.22.5 → 0.22.6

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,12 +1,12 @@
1
- import { HTMLAttributes, ReactElement } from 'react';
1
+ import { HTMLAttributes } from 'react';
2
2
  interface IPhoneViewClasses {
3
3
  wrapper?: string;
4
4
  link?: string;
5
5
  text?: string;
6
6
  }
7
7
  export interface IPhoneViewProps extends HTMLAttributes<HTMLDivElement> {
8
- phone: string | ReactElement;
9
- text: string | ReactElement;
8
+ phone: string;
9
+ text: string;
10
10
  classes?: IPhoneViewClasses;
11
11
  }
12
12
  export declare const PhoneView: ({ phone, text, classes, ...props }: IPhoneViewProps) => import("react/jsx-runtime").JSX.Element;
package/dist/widget.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as t, B as g, H as a, c as j, R as k, b as T, P as W, I as u, C as w, S as R, a as V, L as D, d as y, A as E } from "./CustomLink-BHI03NwX.js";
1
+ import { j as t, B as g, H as k, c as j, R as a, b as R, P as W, I as u, C as w, S as T, a as V, L as D, d as y, A as E } from "./CustomLink-BHI03NwX.js";
2
2
  import { c as i } from "./cn-DIfn7EPB.js";
3
3
  import { s as O } from "./scrollToElement-B-reg4jF.js";
4
4
  import { u as b } from "./useDevice-L83kSsN7.js";
@@ -42,7 +42,7 @@ const G = j(
42
42
  children: [
43
43
  /* @__PURE__ */ t.jsxs("div", { className: i("flex flex-col items-start justify-between px-4 desktop:px-8 desktop:py-8", n == null ? void 0 : n.itemWrapper), children: [
44
44
  /* @__PURE__ */ t.jsxs("div", { className: i("flex flex-col gap-4", n == null ? void 0 : n.itemTextContainer), children: [
45
- /* @__PURE__ */ t.jsx(a, { as: "h4", className: i("desktop:desk-title-bold-s", n == null ? void 0 : n.headingBenefitItem), children: e }),
45
+ /* @__PURE__ */ t.jsx(k, { as: "h4", className: i("desktop:desk-title-bold-s", n == null ? void 0 : n.headingBenefitItem), children: e }),
46
46
  /* @__PURE__ */ t.jsx("p", { className: i("mob-body-regular-l text-icon-blue-grey-800 desktop:desk-body-regular-l", n == null ? void 0 : n.itemDescription), children: o })
47
47
  ] }),
48
48
  x && l && p
@@ -60,22 +60,21 @@ const G = j(
60
60
  fourCards: "grid-cols-1 mobile:grid-rows-[400px,1fr,1fr,400px] desktop:grid-cols-3"
61
61
  }
62
62
  }
63
- }), jt = ({ heading: o, cards: e, classes: d, intent: r }) => /* @__PURE__ */ t.jsx("section", { className: i("pb-20", d == null ? void 0 : d.section), children: /* @__PURE__ */ t.jsxs(k, { children: [
64
- /* @__PURE__ */ t.jsx(a, { className: "mb-8", as: "h2", children: o }),
63
+ }), jt = ({ heading: o, cards: e, classes: d, intent: r }) => /* @__PURE__ */ t.jsx("section", { className: i("pb-20", d == null ? void 0 : d.section), children: /* @__PURE__ */ t.jsxs(a, { children: [
64
+ /* @__PURE__ */ t.jsx(k, { className: "mb-8", as: "h2", children: o }),
65
65
  /* @__PURE__ */ t.jsx("ul", { className: i(S({ intent: r }), d == null ? void 0 : d.grid), children: e == null ? void 0 : e.map((n) => /* @__PURE__ */ t.jsx(Z, { intent: r, classes: d, ...n }, n.img)) })
66
66
  ] }) }), $ = (o) => {
67
67
  switch (o.variant) {
68
68
  case "withButton":
69
69
  return /* @__PURE__ */ t.jsx(g, { intent: "secondary", size: "sm", ...o.buttonProps, children: "Оформить заявку" });
70
70
  case "withPhone":
71
- const { phone: e, phoneText: d } = o;
72
- return /* @__PURE__ */ t.jsx(W, { phone: e, text: d, ...o.phoneProps });
71
+ return /* @__PURE__ */ t.jsx(W, { ...o.phoneProps });
73
72
  default:
74
73
  return null;
75
74
  }
76
75
  }, bt = (o) => {
77
76
  const { logoPath: e = "/", logoType: d = "main", classes: r } = o;
78
- return /* @__PURE__ */ t.jsx("header", { className: i("flex h-[72px] items-center justify-center bg-color-white", r == null ? void 0 : r.header), children: /* @__PURE__ */ t.jsx(k, { className: i(r == null ? void 0 : r.container), children: /* @__PURE__ */ t.jsxs("div", { className: i("flex items-center justify-between gap-5", r == null ? void 0 : r.wrapper), children: [
77
+ return /* @__PURE__ */ t.jsx("header", { className: i("flex h-[64px] items-center justify-center bg-color-white desktop:h-[72px]", r == null ? void 0 : r.header), children: /* @__PURE__ */ t.jsx(a, { className: i(r == null ? void 0 : r.container), children: /* @__PURE__ */ t.jsxs("div", { className: i("flex items-center justify-between gap-5", r == null ? void 0 : r.wrapper), children: [
79
78
  /* @__PURE__ */ t.jsx(
80
79
  "a",
81
80
  {
@@ -87,7 +86,7 @@ const G = j(
87
86
  "flex items-center justify-center [&_svg]:w-[132px] desktop:[&_svg]:h-[32px] desktop:[&_svg]:w-[192px]",
88
87
  r == null ? void 0 : r.logo
89
88
  ),
90
- children: T[d]
89
+ children: R[d]
91
90
  }
92
91
  ),
93
92
  $(o)
@@ -162,7 +161,7 @@ const G = j(
162
161
  ] })
163
162
  }
164
163
  ),
165
- /* @__PURE__ */ t.jsxs(k, { "data-id": "banner-container", className: i("h-full", n == null ? void 0 : n.container), children: [
164
+ /* @__PURE__ */ t.jsxs(a, { "data-id": "banner-container", className: i("h-full", n == null ? void 0 : n.container), children: [
166
165
  /* @__PURE__ */ t.jsx("div", { "data-id": "banner", className: i("flex h-full", n == null ? void 0 : n.wrapper), children: /* @__PURE__ */ t.jsxs(
167
166
  "div",
168
167
  {
@@ -170,7 +169,7 @@ const G = j(
170
169
  className: i("flex w-[328px] flex-col gap-10 pt-6 desktop:w-full desktop:pt-20", n == null ? void 0 : n.textBlock),
171
170
  children: [
172
171
  /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4", children: [
173
- /* @__PURE__ */ t.jsx(a, { "data-id": "banner-title", as: "h1", className: i("text-color-white", n == null ? void 0 : n.title), children: o }),
172
+ /* @__PURE__ */ t.jsx(k, { "data-id": "banner-title", as: "h1", className: i("text-color-white", n == null ? void 0 : n.title), children: o }),
174
173
  /* @__PURE__ */ t.jsx("p", { "data-id": "banner-subtitle", className: i("desk-body-regular-l text-color-white", n == null ? void 0 : n.subtitle), children: e })
175
174
  ] }),
176
175
  /* @__PURE__ */ t.jsx(
@@ -211,11 +210,11 @@ const G = j(
211
210
  }
212
211
  );
213
212
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
214
- /* @__PURE__ */ t.jsx("section", { "data-id": "banner-section", className: i("bg-banner-skyblue-300 desktop:h-[456px]", n == null ? void 0 : n.section), children: /* @__PURE__ */ t.jsxs(k, { "data-id": "banner-container", className: i("relative", n == null ? void 0 : n.container), children: [
213
+ /* @__PURE__ */ t.jsx("section", { "data-id": "banner-section", className: i("bg-banner-skyblue-300 desktop:h-[456px]", n == null ? void 0 : n.section), children: /* @__PURE__ */ t.jsxs(a, { "data-id": "banner-container", className: i("relative", n == null ? void 0 : n.container), children: [
215
214
  /* @__PURE__ */ t.jsxs("div", { "data-id": "banner", className: i("flex flex-col desktop:flex-row desktop:justify-between", n == null ? void 0 : n.wrapper), children: [
216
215
  /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col desktop:gap-10 desktop:pt-20", children: [
217
216
  /* @__PURE__ */ t.jsxs("div", { "data-id": "banner-text-block", className: i("flex flex-col gap-4 pt-6 desktop:pt-0", n == null ? void 0 : n.textBlock), children: [
218
- /* @__PURE__ */ t.jsx(a, { "data-id": "banner-title", as: "h1", className: i("text-color-dark", n == null ? void 0 : n.title), children: o }),
217
+ /* @__PURE__ */ t.jsx(k, { "data-id": "banner-title", as: "h1", className: i("text-color-dark", n == null ? void 0 : n.title), children: o }),
219
218
  /* @__PURE__ */ t.jsx("p", { "data-id": "banner-subtitle", className: i("desk-body-regular-l text-color-dark", n == null ? void 0 : n.subtitle), children: e })
220
219
  ] }),
221
220
  /* @__PURE__ */ t.jsx(M, { buttonsConfig: d, classes: n })
@@ -269,7 +268,7 @@ const G = j(
269
268
  e == null ? void 0 : e.advantageItem
270
269
  ),
271
270
  children: [
272
- /* @__PURE__ */ t.jsx(a, { as: "h4", className: i("text-color-dark", e == null ? void 0 : e.advantageTitle), children: d }),
271
+ /* @__PURE__ */ t.jsx(k, { as: "h4", className: i("text-color-dark", e == null ? void 0 : e.advantageTitle), children: d }),
273
272
  /* @__PURE__ */ t.jsx("p", { className: i("desk-body-regular-l text-color-secondary", e == null ? void 0 : e.advantageDescription), children: r })
274
273
  ]
275
274
  },
@@ -410,7 +409,7 @@ const G = j(
410
409
  )) })
411
410
  ] }, d))
412
411
  }
413
- ), c = ({ text: o, classes: e }) => /* @__PURE__ */ t.jsx("div", { className: i("desk-body-regular-m text-color-footer", e == null ? void 0 : e.copyRight), children: o }), A = ({ classes: o }) => /* @__PURE__ */ t.jsx(
412
+ ), A = ({ text: o, classes: e }) => /* @__PURE__ */ t.jsx("div", { className: i("desk-body-regular-m text-color-footer", e == null ? void 0 : e.copyRight), children: o }), c = ({ classes: o }) => /* @__PURE__ */ t.jsx(
414
413
  "a",
415
414
  {
416
415
  "aria-label": "logo",
@@ -440,7 +439,7 @@ const G = j(
440
439
  ligal: h,
441
440
  copyright: l = J,
442
441
  classes: p
443
- }) => /* @__PURE__ */ t.jsx("footer", { className: i("w-full bg-color-footer py-8 desktop:py-10", p == null ? void 0 : p.root), children: /* @__PURE__ */ t.jsx(k, { className: i(p == null ? void 0 : p.footerContainer), children: /* @__PURE__ */ t.jsxs("div", { className: i("mobile:pb-[176px]", p == null ? void 0 : p.footerWrapper), children: [
442
+ }) => /* @__PURE__ */ t.jsx("footer", { className: i("w-full bg-color-footer py-8 desktop:py-10", p == null ? void 0 : p.root), children: /* @__PURE__ */ t.jsx(a, { className: i(p == null ? void 0 : p.footerContainer), children: /* @__PURE__ */ t.jsxs("div", { className: i("mobile:pb-[176px]", p == null ? void 0 : p.footerWrapper), children: [
444
443
  /* @__PURE__ */ t.jsxs(
445
444
  "div",
446
445
  {
@@ -450,7 +449,7 @@ const G = j(
450
449
  ),
451
450
  children: [
452
451
  /* @__PURE__ */ t.jsxs("div", { className: i(p == null ? void 0 : p.footerSocialBlock), children: [
453
- /* @__PURE__ */ t.jsx(A, { classes: p == null ? void 0 : p.footerLogo }),
452
+ /* @__PURE__ */ t.jsx(c, { classes: p == null ? void 0 : p.footerLogo }),
454
453
  o && /* @__PURE__ */ t.jsx(Y, { socialsLinks: x, classes: p == null ? void 0 : p.socialLinks })
455
454
  ] }),
456
455
  e && /* @__PURE__ */ t.jsx(L, { phones: m, classes: p == null ? void 0 : p.phonesBlock })
@@ -467,7 +466,7 @@ const G = j(
467
466
  p == null ? void 0 : p.footerBottom
468
467
  ),
469
468
  children: [
470
- r && /* @__PURE__ */ t.jsx(c, { text: l, classes: p == null ? void 0 : p.copyright }),
469
+ r && /* @__PURE__ */ t.jsx(A, { text: l, classes: p == null ? void 0 : p.copyright }),
471
470
  n && /* @__PURE__ */ t.jsx(s, { classes: p == null ? void 0 : p.siteMap })
472
471
  ]
473
472
  }
@@ -491,13 +490,13 @@ const G = j(
491
490
  }
492
491
  ),
493
492
  /* @__PURE__ */ t.jsxs("div", { className: i("flex flex-col gap-4", r == null ? void 0 : r.textBlock), children: [
494
- /* @__PURE__ */ t.jsx(a, { as: "h4", className: i("text-color-dark", r == null ? void 0 : r.title), children: o }),
493
+ /* @__PURE__ */ t.jsx(k, { as: "h4", className: i("text-color-dark", r == null ? void 0 : r.title), children: o }),
495
494
  /* @__PURE__ */ t.jsx("p", { className: i("desk-body-regular-l text-color-tetriary", r == null ? void 0 : r.description), children: e })
496
495
  ] })
497
496
  ]
498
497
  }
499
- ), Nt = ({ heading: o, stepsList: e, classes: d }) => /* @__PURE__ */ t.jsx(R, { children: /* @__PURE__ */ t.jsx(k, { children: /* @__PURE__ */ t.jsxs("div", { className: i("flex flex-col gap-12 desktop:items-start", d == null ? void 0 : d.root), children: [
500
- /* @__PURE__ */ t.jsx(a, { as: "h2", className: i("text-color-dark", d == null ? void 0 : d.headline), children: o }),
498
+ ), Nt = ({ heading: o, stepsList: e, classes: d }) => /* @__PURE__ */ t.jsx(T, { className: d == null ? void 0 : d.root, children: /* @__PURE__ */ t.jsx(a, { className: d == null ? void 0 : d.container, children: /* @__PURE__ */ t.jsxs("div", { className: i("flex flex-col gap-12 desktop:items-start", d == null ? void 0 : d.wrapper), children: [
499
+ /* @__PURE__ */ t.jsx(k, { as: "h2", className: i("text-color-dark", d == null ? void 0 : d.headline), children: o }),
501
500
  /* @__PURE__ */ t.jsx(
502
501
  "div",
503
502
  {
@@ -610,7 +609,7 @@ const G = j(
610
609
  classes: x
611
610
  }) => {
612
611
  const m = !!e, f = d === "fourItems", h = d === "twoItems";
613
- return /* @__PURE__ */ t.jsx("section", { className: i(x == null ? void 0 : x.section), children: /* @__PURE__ */ t.jsxs(k, { className: i(x == null ? void 0 : x.mainContainer), children: [
612
+ return /* @__PURE__ */ t.jsx("section", { className: i(x == null ? void 0 : x.section), children: /* @__PURE__ */ t.jsxs(a, { className: i(x == null ? void 0 : x.mainContainer), children: [
614
613
  h && /* @__PURE__ */ t.jsx(N, { intent: d, title: o }),
615
614
  /* @__PURE__ */ t.jsxs(
616
615
  "div",
@@ -869,11 +868,11 @@ const G = j(
869
868
  }
870
869
  }), Ct = ({ data: o, mobileAccordionProps: e, rootAccordionProps: d, classes: r }) => {
871
870
  var n, x;
872
- return /* @__PURE__ */ t.jsx("section", { id: "inter-linking", className: i("min-w-full desktop:min-w-[1140px]", r == null ? void 0 : r.root), children: /* @__PURE__ */ t.jsx(k, { children: /* @__PURE__ */ t.jsx(
871
+ return /* @__PURE__ */ t.jsx("section", { id: "inter-linking", className: i("min-w-full desktop:min-w-[1140px]", r == null ? void 0 : r.root), children: /* @__PURE__ */ t.jsx(a, { children: /* @__PURE__ */ t.jsx(
873
872
  E,
874
873
  {
875
874
  defaultOpen: !0,
876
- label: /* @__PURE__ */ t.jsx(a, { as: "h4", className: i("text-left", r == null ? void 0 : r.heading), children: o == null ? void 0 : o.heading }),
875
+ label: /* @__PURE__ */ t.jsx(k, { as: "h4", className: i("text-left", r == null ? void 0 : r.heading), children: o == null ? void 0 : o.heading }),
877
876
  ...d,
878
877
  classes: {
879
878
  ...d == null ? void 0 : d.classes,