@redneckz/wildless-cms-uni-blocks 0.3.73 → 0.3.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +8 -5
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  5. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  6. package/dist/components/Insurance/Insurance.js +7 -4
  7. package/dist/components/Insurance/Insurance.js.map +1 -1
  8. package/dist/components/Insurance/InsuranceContent.d.ts +3 -0
  9. package/lib/common.css +1 -1
  10. package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  11. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  12. package/lib/components/Insurance/Insurance.js +7 -4
  13. package/lib/components/Insurance/Insurance.js.map +1 -1
  14. package/lib/components/Insurance/InsuranceContent.d.ts +3 -0
  15. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
  16. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  17. package/mobile/dist/components/Insurance/Insurance.js +7 -4
  18. package/mobile/dist/components/Insurance/Insurance.js.map +1 -1
  19. package/mobile/dist/components/Insurance/InsuranceContent.d.ts +3 -0
  20. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
  21. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  22. package/mobile/lib/components/Insurance/Insurance.js +7 -4
  23. package/mobile/lib/components/Insurance/Insurance.js.map +1 -1
  24. package/mobile/lib/components/Insurance/InsuranceContent.d.ts +3 -0
  25. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -1
  26. package/mobile/src/components/Insurance/Insurance.example.json +9 -1
  27. package/mobile/src/components/Insurance/Insurance.tsx +20 -15
  28. package/mobile/src/components/Insurance/InsuranceContent.ts +3 -0
  29. package/package.json +1 -1
  30. package/src/components/BenefitsBlock/BenefitsBlock.tsx +3 -1
  31. package/src/components/Insurance/Insurance.example.json +9 -1
  32. package/src/components/Insurance/Insurance.tsx +20 -15
  33. package/src/components/Insurance/InsuranceContent.ts +3 -0
@@ -10,23 +10,17 @@ export interface InsuranceProps extends InsuranceContent, UniBlockProps {}
10
10
  export const Insurance = JSX<InsuranceProps>(
11
11
  ({ className = '', title, description, image, benefits, sum, monthLimit }) => {
12
12
  return (
13
- <section className={`px-[100px] py-[50px] bg-white text-primary-text ${className}`}>
13
+ <section className={`px-[100px] py-[50px] bg-white text-primary-text font-sans ${className}`}>
14
14
  {title ? <Heading headingType="h3" title={title} className="text-center" /> : null}
15
15
  {description ? <div className="text-center text-md mt-3">{description}</div> : null}
16
16
  <div>
17
- <div className="mt-5 mx-auto flex justify-center gap-[120px] mt-[30px]">
17
+ <div className="mt-5 mx-auto flex justify-center gap-[122px] mt-[30px]">
18
18
  {image?.src ? <Img image={image} /> : null}
19
19
  <div className="w-[558px] m-auto">
20
20
  {benefits ? (
21
21
  <div className="flex flex-col gap-4">{benefits.map(renderBenefit)}</div>
22
22
  ) : null}
23
-
24
- <div className="bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4">
25
- {sum ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null}
26
- {monthLimit
27
- ? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
28
- : null}
29
- </div>
23
+ {renderInsuranceSumMonth(sum, monthLimit)}
30
24
  </div>
31
25
  </div>
32
26
  </div>
@@ -37,26 +31,37 @@ export const Insurance = JSX<InsuranceProps>(
37
31
 
38
32
  function renderBenefit(benefit: InsuranceBenefit, i: number) {
39
33
  return (
40
- <div key={String(i)} className="flex items-center gap-5">
34
+ <div key={String(i)} className="flex items-center gap-4">
41
35
  {benefit?.icon ? (
42
36
  <Img
43
- className="w-[50px] h-[50px] min-w-[50px] p-3 rounded-full bg-secondary-light"
37
+ className="w-12 h-12 min-w-12 p-3 rounded-full bg-secondary-light"
44
38
  image={benefit.icon}
45
- width="24"
46
- height="24"
47
39
  asSVG
48
40
  />
49
41
  ) : null}
50
42
  <div>
51
- {benefit?.label ? <div className="text-title-2xs">{benefit.label}</div> : null}
43
+ {benefit?.label ? <div className="text-title-2xs font-normal">{benefit.label}</div> : null}
52
44
  {benefit?.description ? (
53
- <div className="mt-2 font-light text-secondary-text">{benefit.description}</div>
45
+ <div className="mt-0.5 font-light text-secondary-text font-light">
46
+ {benefit.description}
47
+ </div>
54
48
  ) : null}
55
49
  </div>
56
50
  </div>
57
51
  );
58
52
  }
59
53
 
54
+ function renderInsuranceSumMonth(sum, monthLimit) {
55
+ return sum || monthLimit ? (
56
+ <div className="bg-secondary-light h-15 flex mt-7 gap-6 px-5 py-4">
57
+ {Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null}
58
+ {Number.isFinite(monthLimit)
59
+ ? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
60
+ : null}
61
+ </div>
62
+ ) : null;
63
+ }
64
+
60
65
  function renderValueBlock(title, sum, isAnotherBlock) {
61
66
  const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
62
67
  return (
@@ -12,6 +12,9 @@ export interface InsuranceBenefit {
12
12
  icon?: Picture;
13
13
  }
14
14
 
15
+ /**
16
+ * @title Страховка
17
+ */
15
18
  export type InsuranceContent = InsuranceProps & {
16
19
  /** @title Заголовок */
17
20
  title?: string;