@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.
- package/bundle/bundle.umd.js +15 -16
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/bundle/components/CarouselLinks/ArrowIconStyles.mobile.d.ts +2 -0
- package/bundle/components/CarouselLinks/CarouselLinkButton.d.ts +2 -2
- package/dist/components/Carousel/CarouselScrollButtons.js +1 -1
- package/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/dist/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.js +5 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.mobile.d.ts +2 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.mobile.js +5 -0
- package/dist/components/CarouselLinks/ArrowIconStyles.mobile.js.map +1 -0
- package/dist/components/CarouselLinks/CarouselLinkButton.d.ts +2 -2
- package/dist/components/CarouselLinks/CarouselLinkButton.js +5 -4
- package/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +4 -7
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/components/SafeDepositRental/utils.js +1 -1
- package/dist/components/SafeDepositRental/utils.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Carousel/CarouselScrollButtons.js +1 -1
- package/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/lib/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.js +3 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.mobile.d.ts +2 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.mobile.js +3 -0
- package/lib/components/CarouselLinks/ArrowIconStyles.mobile.js.map +1 -0
- package/lib/components/CarouselLinks/CarouselLinkButton.d.ts +2 -2
- package/lib/components/CarouselLinks/CarouselLinkButton.js +5 -4
- package/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +4 -7
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/components/SafeDepositRental/utils.js +1 -1
- package/lib/components/SafeDepositRental/utils.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +35 -31
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js +1 -1
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/mobile/dist/components/CarouselLinks/ArrowIconStyles.js +5 -0
- package/mobile/dist/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js +5 -2
- package/mobile/dist/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +8 -11
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/utils.js +1 -1
- package/mobile/dist/components/SafeDepositRental/utils.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js +1 -1
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/ArrowIconStyles.d.ts +2 -0
- package/mobile/lib/components/CarouselLinks/ArrowIconStyles.js +3 -0
- package/mobile/lib/components/CarouselLinks/ArrowIconStyles.js.map +1 -0
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js +5 -2
- package/mobile/lib/components/CarouselLinks/CarouselLinkButton.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +8 -11
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/utils.js +1 -1
- package/mobile/lib/components/SafeDepositRental/utils.js.map +1 -1
- package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +3 -3
- package/mobile/src/components/CarouselLinks/ArrowIconStyles.ts +2 -0
- package/mobile/src/components/CarouselLinks/CarouselLinkButton.tsx +47 -19
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +45 -55
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/utils.ts +1 -1
- package/package.json +1 -1
- package/src/components/Carousel/CarouselScrollButtons.tsx +3 -3
- package/src/components/CarouselLinks/ArrowIconStyles.mobile.ts +2 -0
- package/src/components/CarouselLinks/ArrowIconStyles.ts +2 -0
- package/src/components/CarouselLinks/CarouselLinkButton.tsx +34 -18
- package/src/components/CarouselLinks/CarouselLinks.fixture.mobile.tsx +2 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +11 -14
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +1 -1
- package/src/components/SafeDepositRental/utils.ts +1 -1
- package/bundle/components/CarouselLinks/CarouselLinkButton.mobile.d.ts +0 -5
- package/bundle/components/CarouselLinks/CarouselLinks.mobile.d.ts +0 -5
- package/dist/components/CarouselLinks/CarouselLinkButton.mobile.d.ts +0 -5
- package/dist/components/CarouselLinks/CarouselLinkButton.mobile.js +0 -15
- package/dist/components/CarouselLinks/CarouselLinkButton.mobile.js.map +0 -1
- package/dist/components/CarouselLinks/CarouselLinks.mobile.d.ts +0 -5
- package/dist/components/CarouselLinks/CarouselLinks.mobile.js +0 -20
- package/dist/components/CarouselLinks/CarouselLinks.mobile.js.map +0 -1
- package/lib/components/CarouselLinks/CarouselLinkButton.mobile.d.ts +0 -5
- package/lib/components/CarouselLinks/CarouselLinkButton.mobile.js +0 -13
- package/lib/components/CarouselLinks/CarouselLinkButton.mobile.js.map +0 -1
- package/lib/components/CarouselLinks/CarouselLinks.mobile.d.ts +0 -5
- package/lib/components/CarouselLinks/CarouselLinks.mobile.js +0 -18
- package/lib/components/CarouselLinks/CarouselLinks.mobile.js.map +0 -1
- package/src/components/CarouselLinks/CarouselLinkButton.mobile.tsx +0 -40
- 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
|
-
);
|