md-components-mdigial-azamat 0.0.358 → 0.0.359

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.
@@ -2,21 +2,21 @@ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import { B as h } from "../index-bc1dbecd.js";
3
3
  import { B as g, a as p } from "../const-fc1a8d96.js";
4
4
  import { c as u } from "../cn-6a4bf187.js";
5
- const N = ({ item: s }) => {
5
+ const N = ({ item: x }) => {
6
6
  const {
7
7
  name: a,
8
- description: x,
9
- image: r,
10
- cta_text: c,
11
- cta_link: m,
12
- detail_text: o = "Подробнее",
8
+ description: m,
9
+ image: c,
10
+ cta_text: i,
11
+ cta_link: o,
12
+ detail_text: n,
13
13
  detail_link: v
14
- } = s, n = (s.params ?? []).filter(
14
+ } = x, r = (x.params ?? []).filter(
15
15
  (t) => {
16
- var i, f;
17
- return ((i = t == null ? void 0 : t.label) == null ? void 0 : i.trim()) || ((f = t == null ? void 0 : t.value) == null ? void 0 : f.trim());
16
+ var s, f;
17
+ return ((s = t == null ? void 0 : t.label) == null ? void 0 : s.trim()) || ((f = t == null ? void 0 : t.value) == null ? void 0 : f.trim());
18
18
  }
19
- ), d = !!c, b = !!o;
19
+ ), d = !!(i != null && i.trim()), b = !!(n != null && n.trim());
20
20
  return a ? /* @__PURE__ */ e("div", { className: "h-full [container-type:inline-size]", children: /* @__PURE__ */ l(
21
21
  "div",
22
22
  {
@@ -29,15 +29,15 @@ const N = ({ item: s }) => {
29
29
  /* @__PURE__ */ e(
30
30
  "a",
31
31
  {
32
- href: m || "#",
32
+ href: o || "#",
33
33
  "aria-label": a,
34
34
  className: "absolute inset-0 z-[1] hidden max-tablet:block"
35
35
  }
36
36
  ),
37
- r && /* @__PURE__ */ e("div", { className: "order-none h-full min-h-[350px] overflow-hidden max-tablet:order-2 max-tablet:h-[170px] max-tablet:min-h-0", children: /* @__PURE__ */ e(
37
+ c && /* @__PURE__ */ e("div", { className: "order-none h-full min-h-[350px] overflow-hidden max-tablet:order-2 max-tablet:h-[170px] max-tablet:min-h-0", children: /* @__PURE__ */ e(
38
38
  "img",
39
39
  {
40
- src: r,
40
+ src: c,
41
41
  alt: a,
42
42
  className: "h-full w-full min-h-0 object-contain object-bottom"
43
43
  }
@@ -46,16 +46,16 @@ const N = ({ item: s }) => {
46
46
  /* @__PURE__ */ l("div", { className: "flex flex-col gap-12 max-tablet:gap-6", children: [
47
47
  /* @__PURE__ */ l("div", { children: [
48
48
  /* @__PURE__ */ e("h3", { className: "mb-2 text-left text-[28px] font-bold leading-[32px] max-tablet:text-center max-tablet:text-[20px] max-tablet:leading-[28px]", children: a }),
49
- x && /* @__PURE__ */ e("p", { className: "text-[18px] leading-[26px] text-graySoft text-left max-tablet:text-center max-tablet:text-[15px] max-tablet:leading-[24px]", children: x })
49
+ m && /* @__PURE__ */ e("p", { className: "text-[18px] leading-[26px] text-graySoft text-left max-tablet:text-center max-tablet:text-[15px] max-tablet:leading-[24px]", children: m })
50
50
  ] }),
51
- n.length > 0 && /* @__PURE__ */ e(
51
+ r.length > 0 && /* @__PURE__ */ e(
52
52
  "div",
53
53
  {
54
54
  className: u(
55
55
  "grid grid-cols-2 gap-x-6 gap-y-4 max-tablet:hidden cq-lg:flex cq-lg:grid-cols-none cq-lg:items-start cq-lg:gap-6",
56
- n.length <= 2 ? "cq-lg:justify-start" : "cq-lg:justify-between"
56
+ r.length <= 2 ? "cq-lg:justify-start" : "cq-lg:justify-between"
57
57
  ),
58
- children: n.map((t, i) => /* @__PURE__ */ l(
58
+ children: r.map((t, s) => /* @__PURE__ */ l(
59
59
  "div",
60
60
  {
61
61
  className: "flex min-w-0 flex-col gap-1 cq-lg:max-w-[225px]",
@@ -64,7 +64,7 @@ const N = ({ item: s }) => {
64
64
  t.value && /* @__PURE__ */ e("span", { className: "text-[20px] font-semibold leading-[26px] text-blackBG", children: t.value })
65
65
  ]
66
66
  },
67
- t.id ?? i
67
+ t.id ?? s
68
68
  ))
69
69
  }
70
70
  )
@@ -73,11 +73,11 @@ const N = ({ item: s }) => {
73
73
  d && /* @__PURE__ */ e(
74
74
  h,
75
75
  {
76
- link: m || "#",
76
+ link: o || "#",
77
77
  variant: g.Primary,
78
78
  size: p.XL,
79
79
  className: "w-auto justify-center",
80
- children: c
80
+ children: i
81
81
  }
82
82
  ),
83
83
  b && /* @__PURE__ */ e(
@@ -87,7 +87,7 @@ const N = ({ item: s }) => {
87
87
  variant: g.SecondaryBlue,
88
88
  size: p.XL,
89
89
  className: "w-auto justify-center max-tablet:hidden",
90
- children: o
90
+ children: n
91
91
  }
92
92
  )
93
93
  ] })
@@ -1,27 +1,27 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import { useMemo as v } from "react";
3
3
  import { B as p } from "../index-bc1dbecd.js";
4
4
  import { B as g, a as h } from "../const-fc1a8d96.js";
5
5
  import { c as q } from "../cn-6a4bf187.js";
6
- const N = ({ item: c }) => {
6
+ const N = ({ item: a }) => {
7
7
  const {
8
- name: d,
9
- description: n,
10
- image: s,
11
- cta_text: r,
8
+ name: n,
9
+ description: r,
10
+ image: m,
11
+ cta_text: c,
12
12
  cta_link: u,
13
- detail_text: m = "Подробнее",
13
+ detail_text: t,
14
14
  detail_link: w
15
- } = c, a = v(
16
- () => (c.params ?? []).filter(
15
+ } = a, s = v(
16
+ () => (a.params ?? []).filter(
17
17
  (l) => {
18
- var i, f;
19
- return ((i = l == null ? void 0 : l.label) == null ? void 0 : i.trim()) || ((f = l == null ? void 0 : l.value) == null ? void 0 : f.trim());
18
+ var d, f;
19
+ return ((d = l == null ? void 0 : l.label) == null ? void 0 : d.trim()) || ((f = l == null ? void 0 : l.value) == null ? void 0 : f.trim());
20
20
  }
21
21
  ),
22
- [c.params]
23
- ), o = !!r, x = !!m;
24
- return d ? /* @__PURE__ */ e("div", { className: "h-full [container-type:inline-size]", children: /* @__PURE__ */ t(
22
+ [a.params]
23
+ ), o = !!(c != null && c.trim()), x = !!(t != null && t.trim());
24
+ return n ? /* @__PURE__ */ e("div", { className: "h-full [container-type:inline-size]", children: /* @__PURE__ */ i(
25
25
  "div",
26
26
  {
27
27
  className: q(
@@ -29,28 +29,28 @@ const N = ({ item: c }) => {
29
29
  "min-h-[140px] cq-md:grid-cols-[200px_minmax(0,1fr)] cq-md:min-h-[160px]"
30
30
  ),
31
31
  children: [
32
- s && /* @__PURE__ */ e("div", { className: "order-2 h-[164px] shrink-0 overflow-hidden cq-md:order-none cq-md:h-full cq-md:min-h-[160px]", children: /* @__PURE__ */ e(
32
+ m && /* @__PURE__ */ e("div", { className: "order-2 h-[164px] shrink-0 overflow-hidden cq-md:order-none cq-md:h-full cq-md:min-h-[160px]", children: /* @__PURE__ */ e(
33
33
  "img",
34
34
  {
35
- src: s,
36
- alt: d,
35
+ src: m,
36
+ alt: n,
37
37
  className: "h-full w-full min-h-0 object-contain object-bottom"
38
38
  }
39
39
  ) }),
40
- /* @__PURE__ */ t("div", { className: "flex h-full w-full flex-col p-5 cq-md:px-10 cq-md:py-8", children: [
41
- /* @__PURE__ */ t("div", { className: "flex flex-col gap-5 cq-md:gap-8", children: [
42
- /* @__PURE__ */ t("div", { children: [
43
- /* @__PURE__ */ e("h3", { className: "mb-2 text-[20px] font-bold leading-[26px] cq-md:text-[20px] cq-md:leading-[28px]", children: d }),
44
- n && /* @__PURE__ */ e("p", { className: "text-[14px] leading-[20px] text-graySoft cq-md:text-[16px] cq-md:leading-[24px]", children: n })
40
+ /* @__PURE__ */ i("div", { className: "flex h-full w-full flex-col p-5 cq-md:px-10 cq-md:py-8", children: [
41
+ /* @__PURE__ */ i("div", { className: "flex flex-col gap-5 cq-md:gap-8", children: [
42
+ /* @__PURE__ */ i("div", { children: [
43
+ /* @__PURE__ */ e("h3", { className: "mb-2 text-[20px] font-bold leading-[26px] cq-md:text-[20px] cq-md:leading-[28px]", children: n }),
44
+ r && /* @__PURE__ */ e("p", { className: "text-[14px] leading-[20px] text-graySoft cq-md:text-[16px] cq-md:leading-[24px]", children: r })
45
45
  ] }),
46
- a.length > 0 && /* @__PURE__ */ e(
46
+ s.length > 0 && /* @__PURE__ */ e(
47
47
  "div",
48
48
  {
49
49
  className: q(
50
50
  "grid grid-cols-1 gap-3 cq-md:grid-cols-2 cq-md:gap-x-6 cq-md:gap-y-4 cq-lg:flex cq-lg:grid-cols-none cq-lg:items-start cq-lg:gap-6",
51
- a.length <= 2 ? "cq-lg:justify-start" : "cq-lg:justify-between"
51
+ s.length <= 2 ? "cq-lg:justify-start" : "cq-lg:justify-between"
52
52
  ),
53
- children: a.map((l, i) => /* @__PURE__ */ t(
53
+ children: s.map((l, d) => /* @__PURE__ */ i(
54
54
  "div",
55
55
  {
56
56
  className: "flex min-w-0 flex-col gap-1 cq-lg:max-w-[225px]",
@@ -59,12 +59,12 @@ const N = ({ item: c }) => {
59
59
  l.value && /* @__PURE__ */ e("span", { className: "text-[15px] font-semibold text-blackBG cq-md:text-[20px] cq-md:leading-[26px]", children: l.value })
60
60
  ]
61
61
  },
62
- l.id ?? i
62
+ l.id ?? d
63
63
  ))
64
64
  }
65
65
  )
66
66
  ] }),
67
- (o || x) && /* @__PURE__ */ t("div", { className: "mt-auto flex w-full flex-col gap-3 pt-5 cq-md:w-fit cq-md:flex-row cq-md:pt-6", children: [
67
+ (o || x) && /* @__PURE__ */ i("div", { className: "mt-auto flex w-full flex-col gap-3 pt-5 cq-md:w-fit cq-md:flex-row cq-md:pt-6", children: [
68
68
  o && /* @__PURE__ */ e(
69
69
  p,
70
70
  {
@@ -72,7 +72,7 @@ const N = ({ item: c }) => {
72
72
  variant: g.Primary,
73
73
  size: h.XL,
74
74
  className: "w-full justify-center cq-md:w-auto",
75
- children: r
75
+ children: c
76
76
  }
77
77
  ),
78
78
  x && /* @__PURE__ */ e(
@@ -82,7 +82,7 @@ const N = ({ item: c }) => {
82
82
  variant: g.SecondaryBlue,
83
83
  size: h.XL,
84
84
  className: "w-full justify-center cq-md:w-auto",
85
- children: m
85
+ children: t
86
86
  }
87
87
  )
88
88
  ] })
@@ -15,7 +15,7 @@ const r = {
15
15
  ],
16
16
  cta_text: "",
17
17
  cta_link: "",
18
- detail_text: "Подробнее",
18
+ detail_text: "",
19
19
  detail_link: ""
20
20
  }, p = [
21
21
  {
@@ -1,37 +1,37 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { C as a } from "../ComponentContainer-aefde3e0.js";
3
- import { c as d } from "../cn-6a4bf187.js";
4
- import { SolutionCard as c } from "./SolutionCard.js";
5
- import { propsToEdit as p } from "./schema.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { C as d } from "../ComponentContainer-aefde3e0.js";
3
+ import { c as p } from "../cn-6a4bf187.js";
4
+ import { SolutionCard as g } from "./SolutionCard.js";
5
+ import { propsToEdit as u } from "./schema.js";
6
6
  const C = {
7
7
  2: "grid-cols-2",
8
8
  3: "grid-cols-3"
9
9
  }, f = ({
10
- cards: s = [],
11
- columns: l = 3,
12
- gap: n = 24
10
+ cards: n = [],
11
+ columns: e = 3,
12
+ gap: i = 24
13
13
  }) => {
14
- const r = s.filter(Boolean), i = l === 2 ? 2 : 3, e = i === 2 ? "large" : "small";
15
- return r.length ? /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(
14
+ const t = n.filter(Boolean), s = e === 2 ? 2 : 3, m = s === 2 ? "large" : "small", o = Number(i), a = String(i ?? "").trim() !== "" && Number.isFinite(o) && o >= 0 ? o : 24;
15
+ return t.length ? /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r(
16
16
  "div",
17
17
  {
18
- className: d(
18
+ className: p(
19
19
  "grid w-full items-stretch max-tablet:grid-cols-1",
20
- C[i]
20
+ C[s]
21
21
  ),
22
- style: { gap: n },
23
- children: r.map((t, m) => /* @__PURE__ */ o(
24
- c,
22
+ style: { gap: a },
23
+ children: t.map((l, c) => /* @__PURE__ */ r(
24
+ g,
25
25
  {
26
- card: t,
27
- imageSize: e
26
+ card: l,
27
+ imageSize: m
28
28
  },
29
- t.id ?? m
29
+ l.id ?? c
30
30
  ))
31
31
  }
32
32
  ) }) : null;
33
33
  };
34
- f.propsToEdit = p;
34
+ f.propsToEdit = u;
35
35
  export {
36
36
  f as SolutionCards
37
37
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "md-components-mdigial-azamat",
3
3
  "author": "Azamat Raimbekov",
4
4
  "private": false,
5
- "version": "0.0.358",
5
+ "version": "0.0.359",
6
6
  "type": "module",
7
7
  "main": "dist/main.js",
8
8
  "types": "dist/main.d.ts",