@redneckz/wildless-cms-uni-blocks 0.14.209 → 0.14.211

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 (101) hide show
  1. package/bundle/bundle.umd.js +15 -16
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
  4. package/bundle/components/CarouselLinks/ArrowIconStyles.mobile.d.ts +2 -0
  5. package/bundle/components/CarouselLinks/CarouselLinkButton.d.ts +2 -2
  6. package/dist/components/Carousel/CarouselScrollButtons.js +1 -1
  7. package/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
  8. package/dist/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
  9. package/dist/components/CarouselLinks/ArrowIconStyles.js +5 -0
  10. package/dist/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
  11. package/dist/components/CarouselLinks/ArrowIconStyles.mobile.d.ts +2 -0
  12. package/dist/components/CarouselLinks/ArrowIconStyles.mobile.js +5 -0
  13. package/dist/components/CarouselLinks/ArrowIconStyles.mobile.js.map +1 -0
  14. package/dist/components/CarouselLinks/CarouselLinkButton.d.ts +2 -2
  15. package/dist/components/CarouselLinks/CarouselLinkButton.js +5 -4
  16. package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  17. package/dist/components/CarouselLinks/CarouselLinks.js +4 -7
  18. package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  19. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  20. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  21. package/dist/components/SafeDepositRental/utils.js +1 -1
  22. package/dist/components/SafeDepositRental/utils.js.map +1 -1
  23. package/lib/common.css +1 -1
  24. package/lib/components/Carousel/CarouselScrollButtons.js +1 -1
  25. package/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
  26. package/lib/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
  27. package/lib/components/CarouselLinks/ArrowIconStyles.js +3 -0
  28. package/lib/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
  29. package/lib/components/CarouselLinks/ArrowIconStyles.mobile.d.ts +2 -0
  30. package/lib/components/CarouselLinks/ArrowIconStyles.mobile.js +3 -0
  31. package/lib/components/CarouselLinks/ArrowIconStyles.mobile.js.map +1 -0
  32. package/lib/components/CarouselLinks/CarouselLinkButton.d.ts +2 -2
  33. package/lib/components/CarouselLinks/CarouselLinkButton.js +5 -4
  34. package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  35. package/lib/components/CarouselLinks/CarouselLinks.js +4 -7
  36. package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  37. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  38. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  39. package/lib/components/SafeDepositRental/utils.js +1 -1
  40. package/lib/components/SafeDepositRental/utils.js.map +1 -1
  41. package/mobile/bundle/bundle.umd.js +35 -31
  42. package/mobile/bundle/bundle.umd.min.js +1 -1
  43. package/mobile/bundle/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
  44. package/mobile/dist/components/Carousel/CarouselScrollButtons.js +1 -1
  45. package/mobile/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
  46. package/mobile/dist/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
  47. package/mobile/dist/components/CarouselLinks/ArrowIconStyles.js +5 -0
  48. package/mobile/dist/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
  49. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +5 -2
  50. package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  51. package/mobile/dist/components/CarouselLinks/CarouselLinks.js +8 -11
  52. package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  53. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  54. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  55. package/mobile/dist/components/SafeDepositRental/utils.js +1 -1
  56. package/mobile/dist/components/SafeDepositRental/utils.js.map +1 -1
  57. package/mobile/lib/common.css +1 -1
  58. package/mobile/lib/components/Carousel/CarouselScrollButtons.js +1 -1
  59. package/mobile/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
  60. package/mobile/lib/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
  61. package/mobile/lib/components/CarouselLinks/ArrowIconStyles.js +3 -0
  62. package/mobile/lib/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
  63. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +5 -2
  64. package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
  65. package/mobile/lib/components/CarouselLinks/CarouselLinks.js +8 -11
  66. package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  67. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
  68. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  69. package/mobile/lib/components/SafeDepositRental/utils.js +1 -1
  70. package/mobile/lib/components/SafeDepositRental/utils.js.map +1 -1
  71. package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +3 -3
  72. package/mobile/src/components/CarouselLinks/ArrowIconStyles.ts +2 -0
  73. package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +47 -19
  74. package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +45 -55
  75. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
  76. package/mobile/src/components/SafeDepositRental/utils.ts +1 -1
  77. package/package.json +1 -1
  78. package/src/components/Carousel/CarouselScrollButtons.tsx +3 -3
  79. package/src/components/CarouselLinks/ArrowIconStyles.mobile.ts +2 -0
  80. package/src/components/CarouselLinks/ArrowIconStyles.ts +2 -0
  81. package/src/components/CarouselLinks/CarouselLinkButton.tsx +34 -18
  82. package/src/components/CarouselLinks/CarouselLinks.fixture.mobile.tsx +2 -2
  83. package/src/components/CarouselLinks/CarouselLinks.tsx +11 -14
  84. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
  85. package/src/components/SafeDepositRental/utils.ts +1 -1
  86. package/bundle/components/CarouselLinks/CarouselLinkButton.mobile.d.ts +0 -5
  87. package/bundle/components/CarouselLinks/CarouselLinks.mobile.d.ts +0 -5
  88. package/dist/components/CarouselLinks/CarouselLinkButton.mobile.d.ts +0 -5
  89. package/dist/components/CarouselLinks/CarouselLinkButton.mobile.js +0 -15
  90. package/dist/components/CarouselLinks/CarouselLinkButton.mobile.js.map +0 -1
  91. package/dist/components/CarouselLinks/CarouselLinks.mobile.d.ts +0 -5
  92. package/dist/components/CarouselLinks/CarouselLinks.mobile.js +0 -20
  93. package/dist/components/CarouselLinks/CarouselLinks.mobile.js.map +0 -1
  94. package/lib/components/CarouselLinks/CarouselLinkButton.mobile.d.ts +0 -5
  95. package/lib/components/CarouselLinks/CarouselLinkButton.mobile.js +0 -13
  96. package/lib/components/CarouselLinks/CarouselLinkButton.mobile.js.map +0 -1
  97. package/lib/components/CarouselLinks/CarouselLinks.mobile.d.ts +0 -5
  98. package/lib/components/CarouselLinks/CarouselLinks.mobile.js +0 -18
  99. package/lib/components/CarouselLinks/CarouselLinks.mobile.js.map +0 -1
  100. package/src/components/CarouselLinks/CarouselLinkButton.mobile.tsx +0 -40
  101. package/src/components/CarouselLinks/CarouselLinks.mobile.tsx +0 -75
@@ -1,40 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { useLink } from '../../hooks/useLink';
3
- import { Icon } from '../../ui-kit/Icon/Icon';
4
- import { Img } from '../../ui-kit/Img/Img';
5
- import { Text } from '../../ui-kit/Text/Text';
6
- import { style } from '../../utils/style';
7
- import { type CarouselLinkProps } from './CarouselLinksContent';
8
-
9
- export type CarouselLinkButtonProps = CarouselLinkProps & {
10
- className?: string;
11
- };
12
-
13
- export const CarouselLinkButton = JSX<CarouselLinkButtonProps>(
14
- ({ className = '', icon, ...linkProps }) => {
15
- const link = useLink();
16
- const { text, href, target, onClick } = link(linkProps);
17
-
18
- return text ? (
19
- <div className={style('w-full pb-lg', className)}>
20
- <a
21
- className="bg-white flex justify-between rounded-md w-full p-lg whitespace-nowrap"
22
- role="link"
23
- href={href}
24
- target={target}
25
- onClick={onClick}
26
- >
27
- <div className="flex items-center space-x-lg">
28
- {icon ? (
29
- <Img imageClassName="text-green-dark" image={icon} width="20" height="20" />
30
- ) : null}
31
- <Text size="text-l" font="font-light" color="text-primary-text">
32
- {text}
33
- </Text>
34
- </div>
35
- <Icon className="text-green" name="ArrowRightIcon" width="20" height="20" />
36
- </a>
37
- </div>
38
- ) : null;
39
- },
40
- );
@@ -1,75 +0,0 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
- import { type LinkProps } from '../../model/LinkProps';
3
- import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
- import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
5
- import { Foldable } from '../../ui-kit/Foldable/Foldable';
6
- import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
7
- import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
8
- import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
9
- import { Headline } from '../Headline/Headline';
10
- import { CarouselLinkButton } from './CarouselLinkButton';
11
- import { type CarouselLinksContent } from './CarouselLinksContent';
12
-
13
- export interface CarouselLinksProps extends CarouselLinksContent, UniBlockProps {}
14
-
15
- export const CarouselLinks = JSX<CarouselLinksProps>(
16
- ({ className, additionalDescription, description, links = [], title, ...rest }) => (
17
- <BlockWrapper className={className} {...rest}>
18
- <div>
19
- <Headline
20
- isEmbedded={true}
21
- title={title}
22
- description={description}
23
- as="h1"
24
- align="text-left"
25
- />
26
- <Headline
27
- className="pt-m"
28
- description={additionalDescription}
29
- align="text-left"
30
- isEmbedded={true}
31
- />
32
- </div>
33
- {links?.length ? renderLinks(links) : null}
34
- </BlockWrapper>
35
- ),
36
- );
37
-
38
- const renderLinks = (links: LinkProps[], visibleLinksNum = 3) => {
39
- const carouselLinks = (links || []).map((link, index) => (
40
- <CarouselLinkButton key={String(index)} {...link} />
41
- ));
42
-
43
- const [visibleLinks, hiddenLinks] =
44
- visibleLinksNum > 0
45
- ? [carouselLinks.slice(0, visibleLinksNum), carouselLinks.slice(visibleLinksNum)]
46
- : [carouselLinks, []];
47
-
48
- return (
49
- <div className="mt-4xl">
50
- {hiddenLinks.length > 0 ? (
51
- <Foldable
52
- renderFoldableSection={({ isUnfolded }) => (
53
- <div>
54
- <div className="mb-1">{visibleLinks}</div>
55
- <FoldableSection isUnfolded={isUnfolded}>{hiddenLinks}</FoldableSection>
56
- </div>
57
- )}
58
- renderFoldButton={renderFoldButton}
59
- />
60
- ) : (
61
- <div>{visibleLinks}</div>
62
- )}
63
- </div>
64
- );
65
- };
66
-
67
- const renderFoldButton = ({ isUnfolded, onToggle }: FoldablePartProps) =>
68
- isUnfolded ? null : (
69
- <DefaultFoldButton
70
- className="border-t-main-divider/50"
71
- icon="PlusIcon"
72
- label="Показать еще"
73
- onClick={onToggle}
74
- />
75
- );