@redneckz/wildless-cms-uni-blocks 0.14.533 → 0.14.535
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/bin/migration-scripts/0.14.530.js +38 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +85 -47
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Carousel/CarouselContent.d.ts +2 -0
- package/bundle/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/bundle/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/bundle/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/bundle/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/bundle/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/bundle/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/dist/components/Carousel/Carousel.js +8 -3
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +2 -0
- package/dist/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/dist/components/Carousel/renderCarouselCards.js +3 -1
- package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/dist/components/StepsBlock/renderStepMobile.js +6 -19
- package/dist/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/dist/ui-kit/LinkButton/ButtonInner.js +2 -2
- package/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/dist/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
- package/dist/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/dist/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
- package/dist/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
- package/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/dist/ui-kit/SwipeListControl/renderDotButton.js +13 -0
- package/dist/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/dist/ui-kit/SwipeListControl/renderNavButton.js +17 -0
- package/dist/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +1 -0
- package/lib/components/Carousel/Carousel.js +8 -3
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +2 -0
- package/lib/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/lib/components/Carousel/renderCarouselCards.js +3 -1
- package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/lib/components/StepsBlock/renderStepMobile.js +6 -19
- package/lib/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/lib/ui-kit/LinkButton/ButtonInner.js +2 -2
- package/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/lib/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
- package/lib/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/lib/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
- package/lib/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
- package/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/renderDotButton.d.ts +2 -0
- package/lib/ui-kit/SwipeListControl/renderDotButton.js +10 -0
- package/lib/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/renderNavButton.d.ts +2 -0
- package/lib/ui-kit/SwipeListControl/renderNavButton.js +14 -0
- package/lib/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +91 -66
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +2 -0
- package/mobile/bundle/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/mobile/bundle/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/mobile/bundle/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/mobile/bundle/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/mobile/dist/components/Carousel/Carousel.js +8 -3
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +2 -0
- package/mobile/dist/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/mobile/dist/components/Carousel/renderCarouselCards.js +3 -1
- package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderStepMobile.js +6 -19
- package/mobile/dist/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/mobile/dist/ui-kit/LinkButton/ButtonInner.js +2 -2
- package/mobile/dist/ui-kit/LinkButton/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
- package/mobile/dist/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.js +13 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.js +17 -0
- package/mobile/dist/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +8 -3
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +2 -0
- package/mobile/lib/components/Carousel/renderCarouselCards.d.ts +2 -1
- package/mobile/lib/components/Carousel/renderCarouselCards.js +3 -1
- package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +1 -2
- package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStepMobile.js +6 -19
- package/mobile/lib/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/mobile/lib/ui-kit/LinkButton/ButtonInner.js +2 -2
- package/mobile/lib/ui-kit/LinkButton/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.d.ts +9 -0
- package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.js +2 -0
- package/mobile/lib/ui-kit/SwipeListControl/NavButtonProp.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.d.ts +2 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.d.ts +8 -3
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.js +32 -16
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListDots.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.d.ts +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js +4 -3
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListScrollButtons.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.d.ts +3 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.js +10 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderDotButton.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.d.ts +3 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.js +14 -0
- package/mobile/lib/ui-kit/SwipeListControl/renderNavButton.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/src/components/Carousel/Carousel.tsx +28 -17
- package/mobile/src/components/Carousel/CarouselContent.ts +2 -0
- package/mobile/src/components/Carousel/renderCarouselCards.tsx +8 -1
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +7 -2
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -1
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +0 -2
- package/mobile/src/components/StepsBlock/renderStep.tsx +1 -2
- package/mobile/src/components/StepsBlock/renderStepMobile.tsx +16 -38
- package/mobile/src/ui-kit/LinkButton/ButtonInner.tsx +2 -2
- package/mobile/src/ui-kit/SwipeListControl/NavButtonProp.ts +11 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +7 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListDots.tsx +69 -46
- package/mobile/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +9 -5
- package/mobile/src/ui-kit/SwipeListControl/renderDotButton.tsx +29 -0
- package/mobile/src/ui-kit/SwipeListControl/renderNavButton.tsx +33 -0
- package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +1 -1
- package/package.json +2 -2
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +57 -0
- package/src/components/Carousel/Carousel.fixture.tsx +56 -0
- package/src/components/Carousel/Carousel.tsx +28 -17
- package/src/components/Carousel/CarouselContent.ts +2 -0
- package/src/components/Carousel/renderCarouselCards.tsx +8 -1
- package/src/components/ProductBlock/ProductBlock.tsx +7 -2
- package/src/components/ProductBlock/ProductBlockContent.ts +3 -1
- package/src/components/ProductGallery/ProductGallery.fixture.tsx +17 -84
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +0 -8
- package/src/components/StepsBlock/StepsBlockContent.ts +0 -2
- package/src/components/StepsBlock/renderStep.tsx +1 -2
- package/src/components/StepsBlock/renderStepMobile.tsx +16 -38
- package/src/ui-kit/LinkButton/ButtonInner.tsx +2 -2
- package/src/ui-kit/SwipeListControl/NavButtonProp.ts +11 -0
- package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +7 -1
- package/src/ui-kit/SwipeListControl/SwipeListDots.tsx +69 -46
- package/src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx +9 -5
- package/src/ui-kit/SwipeListControl/renderDotButton.tsx +29 -0
- package/src/ui-kit/SwipeListControl/renderNavButton.tsx +33 -0
- package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +1 -1
|
@@ -14,6 +14,8 @@ export declare type CarouselContent = UniBlockContent & {
|
|
|
14
14
|
arrowsPadded?: boolean;
|
|
15
15
|
/** @title Отступы между карточками */
|
|
16
16
|
isGap?: boolean;
|
|
17
|
+
/** @title Показывать кнопки навигации */
|
|
18
|
+
isNavButtons?: boolean;
|
|
17
19
|
/** @title Не показывать контур на карточках */
|
|
18
20
|
noCardBorder?: boolean;
|
|
19
21
|
cardSize?: CardSizeMode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
2
2
|
import { type CardSizeMode } from './CarouselContent';
|
|
3
|
-
export declare const renderCarouselCards: ({ noCardBorder, cardSize, ...rest }: UniBlockProps & {
|
|
3
|
+
export declare const renderCarouselCards: ({ noCardBorder, cardSize, isNavButtons, ...rest }: UniBlockProps & {
|
|
4
4
|
noCardBorder?: boolean | undefined;
|
|
5
5
|
cardSize?: CardSizeMode | undefined;
|
|
6
|
+
isNavButtons?: boolean | undefined;
|
|
6
7
|
}) => any[] | null;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type AdditionalDescriptionProps } from '../../model/HeadlineType';
|
|
1
2
|
import { type BaseProductTileContent } from '../../ui-kit/BaseProductTile/BaseProductTileContent';
|
|
2
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
3
4
|
/**
|
|
4
5
|
* @title Продуктовый блок
|
|
5
6
|
*/
|
|
6
|
-
export declare type ProductBlockContent = UniBlockContent & BaseProductTileContent & {
|
|
7
|
+
export declare type ProductBlockContent = UniBlockContent & BaseProductTileContent & AdditionalDescriptionProps & {
|
|
7
8
|
/** @title Отображать кнопку возврата */
|
|
8
9
|
backwardButton?: boolean;
|
|
9
10
|
};
|
|
@@ -2,7 +2,6 @@ import { type BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import { type BulletsProps } from '../../model/Bullets';
|
|
3
3
|
import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
|
|
4
4
|
import { type IconProps } from '../../model/Picture';
|
|
5
|
-
import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
5
|
import { type ButtonsSectionContent } from '../../ui-kit/LinkButton/ButtonsSectionContent';
|
|
7
6
|
import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
8
7
|
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
@@ -10,7 +9,7 @@ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
|
10
9
|
/**
|
|
11
10
|
* @title Шаг
|
|
12
11
|
*/
|
|
13
|
-
export declare type StepProps = DescriptionProps &
|
|
12
|
+
export declare type StepProps = DescriptionProps & LabelProps & RichTextProps & IconProps & BulletsProps & {
|
|
14
13
|
button?: LinkButtonContent;
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
2
|
+
import type { SwipeListControlType } from './SwipeListControlContent';
|
|
3
|
+
export interface DotProp {
|
|
4
|
+
activeIndex?: number;
|
|
5
|
+
onClick: (i: number) => void;
|
|
6
|
+
listType?: SwipeListControlType;
|
|
7
|
+
}
|
|
8
|
+
/** @title Кнопка под слайдом */
|
|
9
|
+
export declare type NavButtonProp = TitleProps & DescriptionProps;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import { type NavButtonProp } from './NavButtonProp';
|
|
2
3
|
import { type SnapAlign } from './SwipeListContainer';
|
|
3
4
|
import { type SwipeListControlContent } from './SwipeListControlContent';
|
|
4
5
|
interface SwipeListControlProps extends SwipeListControlContent {
|
|
@@ -9,6 +10,7 @@ interface SwipeListControlProps extends SwipeListControlContent {
|
|
|
9
10
|
snapAlign?: SnapAlign;
|
|
10
11
|
hasBlur?: boolean;
|
|
11
12
|
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
13
|
+
navButtons?: NavButtonProp[];
|
|
12
14
|
}
|
|
13
15
|
export declare const SwipeListControl: import("@redneckz/uni-jsx").UNIComponent<SwipeListControlProps, any, any>;
|
|
14
16
|
export {};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import { type NavButtonProp } from './NavButtonProp';
|
|
2
3
|
import { type SwipeListControlType } from './SwipeListControlContent';
|
|
4
|
+
import { type SwipeListScroll } from './useSwipeListScroll';
|
|
3
5
|
interface SwipeListDotsProps {
|
|
4
6
|
className?: string;
|
|
5
|
-
containerRef?: {
|
|
6
|
-
current: HTMLDivElement | null;
|
|
7
|
-
};
|
|
8
7
|
activeIndex?: number;
|
|
9
8
|
dotCount?: number;
|
|
10
9
|
listType?: SwipeListControlType;
|
|
11
10
|
version?: BlockVersion;
|
|
11
|
+
navButtons?: NavButtonProp[];
|
|
12
|
+
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
13
|
+
containerRef?: {
|
|
14
|
+
current: HTMLDivElement | null;
|
|
15
|
+
};
|
|
16
|
+
containerScroll?: SwipeListScroll;
|
|
12
17
|
}
|
|
13
18
|
export declare const SwipeListDots: import("@redneckz/uni-jsx").UNIComponent<SwipeListDotsProps, any, any>;
|
|
14
19
|
export {};
|
|
@@ -4,5 +4,6 @@ export interface SwipeListScrollButtonsProps extends SwipeListScrollButtonsConte
|
|
|
4
4
|
className?: string;
|
|
5
5
|
scroll: SwipeListScroll;
|
|
6
6
|
hasBlur?: boolean;
|
|
7
|
+
isBottom?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const SwipeListScrollButtons: import("@redneckz/uni-jsx").UNIComponent<SwipeListScrollButtonsProps, any, any>;
|
|
@@ -8,9 +8,7 @@ const style_1 = require("../../utils/style");
|
|
|
8
8
|
const itemsGap_1 = require("./itemsGap");
|
|
9
9
|
const renderCarouselCards_1 = require("./renderCarouselCards");
|
|
10
10
|
const visibleItemCount_1 = require("./visibleItemCount");
|
|
11
|
-
exports.Carousel = (0, UniBlock_1.UniBlock)(({ className, visibleItemCount = visibleItemCount_1.VISIBLE_ITEM_COUNT, noCardBorder, arrowsPadded = true, isGap = true, cardSize = 'normal', ...rest }) => {
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)(className), defaultPadding: "p-6xl", ...rest, children: (0, jsx_runtime_1.jsx)(SwipeListControl_1.SwipeListControl, { className: (0, style_1.style)('relative max-w-full'), visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? itemsGap_1.ITEMS_GAP : 0, padding: 0, arrowsPadded: arrowsPadded, hasBlur: true, children: (0, renderCarouselCards_1.renderCarouselCards)({ noCardBorder, cardSize, ...rest }) }) }));
|
|
13
|
-
}, {
|
|
11
|
+
exports.Carousel = (0, UniBlock_1.UniBlock)(({ className, visibleItemCount = visibleItemCount_1.VISIBLE_ITEM_COUNT, noCardBorder, arrowsPadded = true, isGap = true, cardSize = 'normal', isNavButtons = false, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)(className), defaultPadding: "p-6xl", ...rest, children: (0, jsx_runtime_1.jsx)(SwipeListControl_1.SwipeListControl, { className: (0, style_1.style)('relative max-w-full'), visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? itemsGap_1.ITEMS_GAP : 0, padding: 0, arrowsPadded: arrowsPadded, navButtons: isNavButtons ? getNavButton(rest?.block?.blocks) : [], hasBlur: true, children: (0, renderCarouselCards_1.renderCarouselCards)({ noCardBorder, cardSize, isNavButtons, ...rest }) }) })), {
|
|
14
12
|
childrenTypes: [
|
|
15
13
|
'CarouselCard',
|
|
16
14
|
'CarouselCatalogCard',
|
|
@@ -26,4 +24,11 @@ exports.Carousel = (0, UniBlock_1.UniBlock)(({ className, visibleItemCount = vis
|
|
|
26
24
|
},
|
|
27
25
|
}),
|
|
28
26
|
});
|
|
27
|
+
const getNavButton = (blocks) => blocks?.map((_) => {
|
|
28
|
+
const content = _?.content;
|
|
29
|
+
return {
|
|
30
|
+
title: content?.title,
|
|
31
|
+
description: content?.additionalDescription || content?.description,
|
|
32
|
+
};
|
|
33
|
+
}) ?? [];
|
|
29
34
|
//# sourceMappingURL=Carousel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":";;;AAAA,4DAAyD;AACzD,qFAAkF;AAClF,sDAAmD;AAEnD,6CAA0C;
|
|
1
|
+
{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.tsx"],"names":[],"mappings":";;;AAAA,4DAAyD;AACzD,qFAAkF;AAClF,sDAAmD;AAEnD,6CAA0C;AAG1C,yCAAuC;AACvC,+DAA4D;AAC5D,yDAAwD;AAI3C,QAAA,QAAQ,GAAG,IAAA,mBAAQ,EAC9B,CAAC,EACC,SAAS,EACT,gBAAgB,GAAG,qCAAkB,EACrC,YAAY,EACZ,YAAY,GAAG,IAAI,EACnB,KAAK,GAAG,IAAI,EACZ,QAAQ,GAAG,QAAQ,EACnB,YAAY,GAAG,KAAK,EACpB,GAAG,IAAI,EACR,EAAE,EAAE,CAAC,CACJ,uBAAC,2BAAY,IAAC,SAAS,EAAE,IAAA,aAAK,EAAC,SAAS,CAAC,EAAE,cAAc,EAAC,OAAO,KAAK,IAAI,YACxE,uBAAC,mCAAgB,IACf,SAAS,EAAE,IAAA,aAAK,EAAC,qBAAqB,CAAC,EACvC,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAC,YAAY,EACtB,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,oBAAS,CAAC,CAAC,CAAC,CAAC,EAC1B,OAAO,EAAE,CAAC,EACV,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EACjE,OAAO,kBAEN,IAAA,yCAAmB,EAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,CAAC,GACtD,GACN,CAChB,EACD;IACE,aAAa,EAAE;QACb,cAAc;QACd,qBAAqB;QACrB,4BAA4B;QAC5B,qBAAqB;QACrB,eAAe;QACf,cAAc;KACf;IACD,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC;QAClB,cAAc,EAAE;YACd,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE,SAAS;SAChB;KACF,CAAC;CACH,CACF,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,MAA4C,EAAE,EAAE,CACpE,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,MAAM,OAAO,GAAG,CAAC,EAAE,OAAO,CAAC;IAE3B,OAAO;QACL,KAAK,EAAE,OAAO,EAAE,KAAK;QACrB,WAAW,EAAE,OAAO,EAAE,qBAAqB,IAAI,OAAO,EAAE,WAAW;KACpE,CAAC;AACJ,CAAC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -14,6 +14,8 @@ export declare type CarouselContent = UniBlockContent & {
|
|
|
14
14
|
arrowsPadded?: boolean;
|
|
15
15
|
/** @title Отступы между карточками */
|
|
16
16
|
isGap?: boolean;
|
|
17
|
+
/** @title Показывать кнопки навигации */
|
|
18
|
+
isNavButtons?: boolean;
|
|
17
19
|
/** @title Не показывать контур на карточках */
|
|
18
20
|
noCardBorder?: boolean;
|
|
19
21
|
cardSize?: CardSizeMode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
2
2
|
import { type CardSizeMode } from './CarouselContent';
|
|
3
|
-
export declare const renderCarouselCards: ({ noCardBorder, cardSize, ...rest }: UniBlockProps & {
|
|
3
|
+
export declare const renderCarouselCards: ({ noCardBorder, cardSize, isNavButtons, ...rest }: UniBlockProps & {
|
|
4
4
|
noCardBorder?: boolean | undefined;
|
|
5
5
|
cardSize?: CardSizeMode | undefined;
|
|
6
|
+
isNavButtons?: boolean | undefined;
|
|
6
7
|
}) => any[] | null;
|
|
@@ -12,9 +12,10 @@ const CARD_SIZE_MAP = {
|
|
|
12
12
|
normal: 'lg:min-w-80 xl:min-w-96',
|
|
13
13
|
big: 'lg:min-w-[515px]',
|
|
14
14
|
};
|
|
15
|
-
const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', ...rest }) => {
|
|
15
|
+
const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', isNavButtons = false, ...rest }) => {
|
|
16
16
|
const { blocks: childBlocks } = rest.block || {};
|
|
17
17
|
const someCardsHighlighted = childBlocks?.some(isCardHighlighted);
|
|
18
|
+
const defaultPadding = isNavButtons ? { defaultPadding: 'p-6xl pb-m' } : {};
|
|
18
19
|
return (0, renderChildren_1.renderChildren)({
|
|
19
20
|
...rest,
|
|
20
21
|
renderProps: (block, options, blockIndex) => ((0, jsx_runtime_1.jsxs)("div", { className: cardWrapperStyle(block, { someCardsHighlighted }), children: [(0, renderBlock_1.renderBlock)(block, options, {
|
|
@@ -23,6 +24,7 @@ const renderCarouselCards = ({ noCardBorder, cardSize = 'normal', ...rest }) =>
|
|
|
23
24
|
showBorder: !noCardBorder,
|
|
24
25
|
cardSize,
|
|
25
26
|
}),
|
|
27
|
+
...defaultPadding,
|
|
26
28
|
blockIndex,
|
|
27
29
|
}), isCardHighlighted(block)
|
|
28
30
|
? (0, renderCardHighlight_1.renderCardHighlight)({ className: 'absolute top-0 -right-4 z-40' })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderCarouselCards.js","sourceRoot":"","sources":["../../../src/components/Carousel/renderCarouselCards.tsx"],"names":[],"mappings":";;;AACA,iEAA8D;AAC9D,uEAAoE;AAGpE,+DAA4D;AAC5D,6CAA0C;AAE1C,+DAA4D;AAE5D,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAExC,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,yBAAyB;IACjC,GAAG,EAAE,kBAAkB;CACxB,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,EAClC,YAAY,EACZ,QAAQ,GAAG,QAAQ,EACnB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"renderCarouselCards.js","sourceRoot":"","sources":["../../../src/components/Carousel/renderCarouselCards.tsx"],"names":[],"mappings":";;;AACA,iEAA8D;AAC9D,uEAAoE;AAGpE,+DAA4D;AAC5D,6CAA0C;AAE1C,+DAA4D;AAE5D,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAExC,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,yBAAyB;IACjC,GAAG,EAAE,kBAAkB;CACxB,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,EAClC,YAAY,EACZ,QAAQ,GAAG,QAAQ,EACnB,YAAY,GAAG,KAAK,EACpB,GAAG,IAAI,EAKR,EAAE,EAAE;IACH,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;IACjD,MAAM,oBAAoB,GAAG,WAAW,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAClE,MAAM,cAAc,GAAG,YAAY,CA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iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAC7E,IAAA,+BAAc,EAAC,UAAU,CAAC,EAC1B,UAAU,IAAI,QAAQ,CACvB,CAAC;AAEJ,MAAM,iBAAiB,GAAG,CAAC,CAAuB,EAAE,EAAE,CACpD,CAAC,EAAE,OAAO,IAAI,gBAAgB,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC"}
|
|
@@ -5,5 +5,5 @@ const BaseProductTile_1 = require("../../ui-kit/BaseProductTile/BaseProductTile"
|
|
|
5
5
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
6
|
const UniBlock_1 = require("../../UniBlock/UniBlock");
|
|
7
7
|
const style_1 = require("../../utils/style");
|
|
8
|
-
exports.ProductBlock = (0, UniBlock_1.UniBlock)(({ className, padding, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('overflow-hidden flex flex-col gap-3xl box-border', className), padding: "p-0", ...rest, children: (0, jsx_runtime_1.jsx)(BaseProductTile_1.BaseProductTile, { defaultPadding:
|
|
8
|
+
exports.ProductBlock = (0, UniBlock_1.UniBlock)(({ className, padding, defaultPadding, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('overflow-hidden flex flex-col gap-3xl box-border', className), padding: "p-0", ...rest, children: (0, jsx_runtime_1.jsx)(BaseProductTile_1.BaseProductTile, { defaultPadding: defaultPadding || 'p-6xl', padding: padding, className: "grow h-full", ...rest }) })), { childrenTypes: ['UnitBlock'] });
|
|
9
9
|
//# sourceMappingURL=ProductBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBlock.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlock.tsx"],"names":[],"mappings":";;;AAAA,kFAA+E;AAC/E,4DAAyD;AACzD,sDAAmD;AAEnD,6CAA0C;AAK7B,QAAA,YAAY,GAAG,IAAA,mBAAQ,EAClC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"ProductBlock.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlock.tsx"],"names":[],"mappings":";;;AAAA,kFAA+E;AAC/E,4DAAyD;AACzD,sDAAmD;AAEnD,6CAA0C;AAK7B,QAAA,YAAY,GAAG,IAAA,mBAAQ,EAClC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CACnD,uBAAC,2BAAY,IACX,SAAS,EAAE,IAAA,aAAK,EAAC,kDAAkD,EAAE,SAAS,CAAC,EAC/E,OAAO,EAAC,KAAK,KACT,IAAI,YAER,uBAAC,iCAAe,IACd,cAAc,EAAE,cAAc,IAAI,OAAO,EACzC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,aAAa,KACnB,IAAI,GACR,GACW,CAChB,EACD,EAAE,aAAa,EAAE,CAAC,WAAW,CAAC,EAAE,CACjC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type AdditionalDescriptionProps } from '../../model/HeadlineType';
|
|
1
2
|
import { type BaseProductTileContent } from '../../ui-kit/BaseProductTile/BaseProductTileContent';
|
|
2
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
3
4
|
/**
|
|
4
5
|
* @title Продуктовый блок
|
|
5
6
|
*/
|
|
6
|
-
export declare type ProductBlockContent = UniBlockContent & BaseProductTileContent & {
|
|
7
|
+
export declare type ProductBlockContent = UniBlockContent & BaseProductTileContent & AdditionalDescriptionProps & {
|
|
7
8
|
/** @title Отображать кнопку возврата */
|
|
8
9
|
backwardButton?: boolean;
|
|
9
10
|
};
|
|
@@ -2,7 +2,6 @@ import { type BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import { type BulletsProps } from '../../model/Bullets';
|
|
3
3
|
import { type DescriptionProps, type LabelProps, type TitleProps } from '../../model/HeadlineType';
|
|
4
4
|
import { type IconProps } from '../../model/Picture';
|
|
5
|
-
import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
5
|
import { type ButtonsSectionContent } from '../../ui-kit/LinkButton/ButtonsSectionContent';
|
|
7
6
|
import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
8
7
|
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
@@ -10,7 +9,7 @@ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
|
10
9
|
/**
|
|
11
10
|
* @title Шаг
|
|
12
11
|
*/
|
|
13
|
-
export declare type StepProps = DescriptionProps &
|
|
12
|
+
export declare type StepProps = DescriptionProps & LabelProps & RichTextProps & IconProps & BulletsProps & {
|
|
14
13
|
button?: LinkButtonContent;
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStep.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStep.tsx"],"names":[],"mappings":";;;AAEA,mEAAgE;AAChE,6DAA0D;AAC1D,iDAA8C;AAC9C,6CAA0C;AAI7B,QAAA,eAAe,GAAG,CAAC,CAAC;AAMjC,gDAAgD;AACzC,MAAM,UAAU,GACrB,CAAC,KAAsB,EAAE,EAAE,CAC3B,CAAC,IAAe,EAAE,CAAS,EAAE,GAAgB,EAAS,EAAE;IACtD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAEtD,OAAO,CACL,iCAEE,SAAS,EAAE,IAAA,aAAK,EACd,iHAAiH,EACjH,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,CAC9B,aAED,iCAAK,SAAS,EAAC,YAAY,aACxB,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,aAAa,YACrC,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,EACR,iCAAK,SAAS,EAAC,oCAAoC,aAChD,WAAW,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAE,QAAQ,CAAC,WAAW,YAAG,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,EAC/E,uBAAC,mBAAQ,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAC,QAAQ,EAAC,QAAQ,EAAE,QAAQ,GAAI,IACnE,IACF,EACL,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CACd,uBAAC,uBAAU,IACT,SAAS,EAAC,yCAAyC,EACnD,OAAO,EAAE,OAAO,KACZ,MAAM,YAET,MAAM,EAAE,IAAI,GACF,CACd,CAAC,CAAC,CAAC,IAAI,KAzBH,MAAM,CAAC,CAAC,CAAC,CA0BV,CACP,CAAC;AACJ,CAAC,CAAC;AApCS,QAAA,UAAU,cAoCnB;AAEJ,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAAC,MAAM,GAAG,uBAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -12,11 +12,10 @@ const getIconTextStyle_1 = require("./getIconTextStyle");
|
|
|
12
12
|
const StepsBlockStyleMaps_1 = require("./StepsBlockStyleMaps");
|
|
13
13
|
const styleMap = StepsBlockStyleMaps_1.STEPS_BLOCK_STYLE;
|
|
14
14
|
const renderStepMobile = (stepsSize, version, stepVersion) => (step, i) => {
|
|
15
|
-
const { button
|
|
16
|
-
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "contents", children: (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('flex items-center relative', image?.src ? 'flex-col' : 'flex-row'), children: [image?.src ? renderText(step) : null, (0, jsx_runtime_1.jsx)("div", { className: "overflow-hidden flex flex-shrink-0 items-center", children: renderIconArea(stepsSize, stepVersion)(step, i) }), (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('flex flex-col justify-center h-fit w-full', {
|
|
15
|
+
const { button } = step;
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "contents", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center relative flex-row", children: [(0, jsx_runtime_1.jsx)("div", { className: "overflow-hidden flex flex-shrink-0 items-center", children: renderIconArea(stepsSize, stepVersion)(step, i) }), (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('flex flex-col justify-center h-fit w-full', {
|
|
18
17
|
'min-h-6xl': stepsSize,
|
|
19
|
-
}), children: [
|
|
18
|
+
}), children: [renderText(step), button?.text ? ((0, jsx_runtime_1.jsx)(LinkButton_1.LinkButton, { className: "box-border py-s w-full max-w-60 mt-lg", version: version, ...button, children: button?.text })) : null] })] }) }, String(i)));
|
|
20
19
|
};
|
|
21
20
|
exports.renderStepMobile = renderStepMobile;
|
|
22
21
|
const renderIconArea = (stepsSize, stepVersion) => (step, i) => {
|
|
@@ -24,25 +23,13 @@ const renderIconArea = (stepsSize, stepVersion) => (step, i) => {
|
|
|
24
23
|
const isImg = Boolean(step?.icon?.src);
|
|
25
24
|
const iconAreaSize = getIconAreaSize(stepsSize, isImg);
|
|
26
25
|
const containerVersion = isImg ? stepVersion === 'transparent' : stepVersion;
|
|
27
|
-
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)({ 'w-32': Boolean(isImgSrc) }, 'z-10 mr-s flex justify-center content-center rounded-md', !isImgSrc && iconAreaSize), defaultPadding: "", version: containerVersion, children: (0, jsx_runtime_1.jsx)("div", { className: "flex max-w-full max-h-full items-center justify-center", children: renderIcon({ step, iconVersion, i, stepVersion }) }) }));
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('z-10 mr-s flex justify-center content-center rounded-md', iconAreaSize), defaultPadding: "", version: containerVersion, children: (0, jsx_runtime_1.jsx)("div", { className: "flex max-w-full max-h-full items-center justify-center", children: renderIcon({ step, iconVersion, i, stepVersion }) }) }));
|
|
29
27
|
};
|
|
30
28
|
const renderText = (step) => {
|
|
31
|
-
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)({
|
|
33
|
-
'mb-lg w-full': visibleStyle,
|
|
34
|
-
}), children: [step?.label ? ((0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: "text-l", align: "text-left", children: step.label })) : null, step?.description ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('text-s font-light text-left', styleMap.description), children: step.description })) : null, (0, jsx_runtime_1.jsx)(RichText_1.RichText, { __html: step.__html })] }));
|
|
29
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [step?.label ? ((0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: "text-l", align: "text-left", children: step.label })) : null, step?.description ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('text-s font-light text-left', styleMap.description), children: step.description })) : null, (0, jsx_runtime_1.jsx)(RichText_1.RichText, { __html: step.__html })] }));
|
|
35
30
|
};
|
|
36
31
|
const getIconAreaSize = (stepsSize, isImg) => {
|
|
37
32
|
return stepsSize && isImg ? 'h-14 w-14' : 'h-11 w-11';
|
|
38
33
|
};
|
|
39
|
-
const renderIcon = ({ step, iconVersion, i, stepVersion, }) => {
|
|
40
|
-
if ((0, isIcon_1.isIcon)(step?.icon)) {
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(Img_1.Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, imageClassName: "max-w-full max-h-full", width: "24", height: "24" }));
|
|
42
|
-
}
|
|
43
|
-
else if ((0, isIcon_1.isIcon)(step.image)) {
|
|
44
|
-
return (0, jsx_runtime_1.jsx)(Img_1.Img, { image: { ...step.image, size: { width: 120, height: 120 } } });
|
|
45
|
-
}
|
|
46
|
-
return ((0, jsx_runtime_1.jsx)("span", { className: (0, style_1.style)('text-h4', stepVersion === 'transparent' ? styleMap.iconText : (0, getIconTextStyle_1.getIconTextStyle)(stepVersion)), children: i + 1 }));
|
|
47
|
-
};
|
|
34
|
+
const renderIcon = ({ step, iconVersion, i, stepVersion, }) => (0, isIcon_1.isIcon)(step?.icon) ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, imageClassName: "max-w-full max-h-full", width: "24", height: "24" })) : ((0, jsx_runtime_1.jsx)("span", { className: (0, style_1.style)('text-h4', stepVersion === 'transparent' ? styleMap.iconText : (0, getIconTextStyle_1.getIconTextStyle)(stepVersion)), children: i + 1 }));
|
|
48
35
|
//# sourceMappingURL=renderStepMobile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderStepMobile.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStepMobile.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"renderStepMobile.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStepMobile.tsx"],"names":[],"mappings":";;;AAEA,4DAAyD;AACzD,8CAA2C;AAC3C,mEAAgE;AAChE,gEAA6D;AAC7D,6DAA0D;AAC1D,+CAA4C;AAC5C,6CAA0C;AAC1C,yDAAsD;AAEtD,+DAA0D;AAE1D,MAAM,QAAQ,GAAG,uCAAiB,CAAC;AAE5B,MAAM,gBAAgB,GAC3B,CAAC,SAAkB,EAAE,OAAqB,EAAE,WAAyB,EAAE,EAAE,CACzE,CAAC,IAAe,EAAE,CAAS,EAAE,EAAE;IAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAExB,OAAO,CACL,gCAAqB,SAAS,E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CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,mCAAgB,EAAC,WAAW,CAAC,CAClF,YAEA,CAAC,GAAG,CAAC,GACD,CACR,CAAC"}
|
|
@@ -8,9 +8,9 @@ const buttonClassNameConstants_1 = require("./buttonClassNameConstants");
|
|
|
8
8
|
exports.ButtonInner = (0, uni_jsx_1.JSX)((props) => {
|
|
9
9
|
const { text, aboveText, appendLeft, appendRight, version = 'primary' } = props;
|
|
10
10
|
const iconHideStyle = isWithText(props) ? 'hidden lg:block' : '';
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(buttonStyle(props), 'flex gap-xs'), children: [appendLeft ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(iconHideStyle, buttonClassNameConstants_1.iconStyleMap[version]), children: appendLeft })) : null, isWithText(props) ? ((0, jsx_runtime_1.jsxs)("div", { className: "whitespace-pre", children: [aboveText ? (0, jsx_runtime_1.jsx)("div", { className: "text-xs font-light text-left", children: aboveText }) : null, (0, jsx_runtime_1.jsx)("div", { className: `text-left ${aboveText ? 'text-s -mt-3xs' : 'text-l'}`, children: text })] })) : null, appendRight ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(iconHideStyle, buttonClassNameConstants_1.iconStyleMap[version]), children: appendRight })) : null] }));
|
|
12
12
|
});
|
|
13
|
-
const
|
|
13
|
+
const buttonStyle = (props) => {
|
|
14
14
|
const { version, aboveText, rounded } = props;
|
|
15
15
|
if (version === 'link') {
|
|
16
16
|
return '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonInner.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkButton/ButtonInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,yEAA0D;AAI1D,kBAAkB;AACL,QAAA,WAAW,GAAG,IAAA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AC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,QAAQ,EAAE,YAAG,IAAI,GAAO,IAChF,CACP,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,CACb,gCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,aAAa,EAAE,uCAAY,CAAC,OAAO,CAAC,CAAC,YAAG,WAAW,GAAO,CACjF,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,CAAC,KAAwB,EAAE,EAAE;IAC/C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE9C,IAAI,OAAO,KAAK,MAAM,EAAE;QACtB,OAAO,EAAE,CAAC;KACX;IAED,MAAM,aAAa,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAEnE,OAAO,IAAA,aAAK,EACV,uCAAuC,EACvC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,kBAAkB,EACtD;QACE,cAAc,EAAE,OAAO;KACxB,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAmB,EAAE,EAAE,CACtE,OAAO,CAAC,IAAI,IAAI,SAAS,IAAI,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
2
|
+
import type { SwipeListControlType } from './SwipeListControlContent';
|
|
3
|
+
export interface DotProp {
|
|
4
|
+
activeIndex?: number;
|
|
5
|
+
onClick: (i: number) => void;
|
|
6
|
+
listType?: SwipeListControlType;
|
|
7
|
+
}
|
|
8
|
+
/** @title Кнопка под слайдом */
|
|
9
|
+
export declare type NavButtonProp = TitleProps & DescriptionProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavButtonProp.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/NavButtonProp.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import { type NavButtonProp } from './NavButtonProp';
|
|
2
3
|
import { type SnapAlign } from './SwipeListContainer';
|
|
3
4
|
import { type SwipeListControlContent } from './SwipeListControlContent';
|
|
4
5
|
interface SwipeListControlProps extends SwipeListControlContent {
|
|
@@ -9,6 +10,7 @@ interface SwipeListControlProps extends SwipeListControlContent {
|
|
|
9
10
|
snapAlign?: SnapAlign;
|
|
10
11
|
hasBlur?: boolean;
|
|
11
12
|
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
13
|
+
navButtons?: NavButtonProp[];
|
|
12
14
|
}
|
|
13
15
|
export declare const SwipeListControl: import("@redneckz/uni-jsx").UNIComponent<SwipeListControlProps, any, any>;
|
|
14
16
|
export {};
|
|
@@ -14,13 +14,13 @@ const DEFAULT_GAP = 14;
|
|
|
14
14
|
and get rid of a clipping effect caused by overflow: hidden.
|
|
15
15
|
*/
|
|
16
16
|
const DEFAULT_PADDING = 16;
|
|
17
|
-
exports.SwipeListControl = (0, uni_jsx_1.JSX)(({ className, version, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, visibleItemCount = 1, listType = 'horizontal-list', snapAlign, minHeight, showArrows, hasBlur, arrowsPadded, showDots, children, onVisibleIndicesChange, }) => {
|
|
17
|
+
exports.SwipeListControl = (0, uni_jsx_1.JSX)(({ className, version, gap = DEFAULT_GAP, padding = DEFAULT_PADDING, visibleItemCount = 1, listType = 'horizontal-list', snapAlign, minHeight, showArrows, hasBlur, arrowsPadded, showDots, children, onVisibleIndicesChange, navButtons, }) => {
|
|
18
18
|
const itemCount = Array.isArray(children) ? children.length : 0;
|
|
19
19
|
const [containerRef, scroll] = (0, useSwipeListScroll_1.useSwipeListScroll)({
|
|
20
20
|
itemCount,
|
|
21
21
|
onVisibleIndicesChange,
|
|
22
22
|
});
|
|
23
23
|
const [activeIndex] = scroll.visibleIndicesRange;
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: visibleItemCount, gap: gap, padding: padding, listType: listType, snapAlign: snapAlign, minHeight: minHeight, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), (0, jsx_runtime_1.jsx)(SwipeListScrollButtons_1.SwipeListScrollButtons, { className: (0, style_1.style)(!showArrows && 'hidden lg:block'), scroll: scroll, hasBlur: hasBlur, arrowsPadded: arrowsPadded }), (0, jsx_runtime_1.jsx)(SwipeListDots_1.SwipeListDots, { className: (0, style_1.style)(!showDots && 'lg:hidden'),
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: visibleItemCount, gap: gap, padding: padding, listType: listType, snapAlign: snapAlign, minHeight: minHeight, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: children }), (0, jsx_runtime_1.jsx)(SwipeListScrollButtons_1.SwipeListScrollButtons, { className: (0, style_1.style)(!showArrows && 'hidden lg:block'), scroll: scroll, hasBlur: hasBlur, arrowsPadded: arrowsPadded, isBottom: Boolean(navButtons?.length) }), (0, jsx_runtime_1.jsx)(SwipeListDots_1.SwipeListDots, { className: (0, style_1.style)(!showDots && 'lg:hidden'), activeIndex: activeIndex, dotCount: itemCount, listType: listType, version: version, navButtons: navButtons, containerRef: containerRef, containerScroll: scroll })] }));
|
|
25
25
|
});
|
|
26
26
|
//# sourceMappingURL=SwipeListControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListControl.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,6CAA0C;
|
|
1
|
+
{"version":3,"file":"SwipeListControl.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,6CAA0C;AAE1C,6DAA0E;AAE1E,mDAAgD;AAChD,qEAAkE;AAClE,6DAA0D;AAE1D,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB;;;;GAIG;AACH,MAAM,eAAe,GAAG,EAAE,CAAC;AAad,QAAA,gBAAgB,GAAG,IAAA,aAAG,EACjC,CAAC,EACC,SAAS,EACT,OAAO,EACP,GAAG,GAAG,WAAW,EACjB,OAAO,GAAG,eAAe,EACzB,gBAAgB,GAAG,CAAC,EACpB,QAAQ,GAAG,iBAAiB,EAC5B,SAAS,EACT,SAAS,EACT,UAAU,EACV,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,sBAAsB,EACtB,UAAU,GACX,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,IAAA,uCAAkB,EAAiB;QAChE,SAAS;QACT,sBAAsB;KACvB,CAAC,CAAC;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAEjD,OAAO,CACL,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,SAAS,EAAE,QAAQ,KAAK,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,aACrF,uBAAC,uCAAkB,IACjB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,sBAAsB,EAAE,MAAM,CAAC,0BAA0B,YAExD,QAAQ,GACU,EACrB,uBAAC,+CAAsB,IACrB,SAAS,EAAE,IAAA,aAAK,EAAC,CAAC,UAAU,IAAI,iBAAiB,CAAC,EAClD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,GACrC,EACF,uBAAC,6BAAa,IACZ,SAAS,EAAE,IAAA,aAAK,EAAC,CAAC,QAAQ,IAAI,WAAW,CAAC,EAC1C,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,MAAM,GACvB,IACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { type BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import { type NavButtonProp } from './NavButtonProp';
|
|
2
3
|
import { type SwipeListControlType } from './SwipeListControlContent';
|
|
4
|
+
import { type SwipeListScroll } from './useSwipeListScroll';
|
|
3
5
|
interface SwipeListDotsProps {
|
|
4
6
|
className?: string;
|
|
5
|
-
containerRef?: {
|
|
6
|
-
current: HTMLDivElement | null;
|
|
7
|
-
};
|
|
8
7
|
activeIndex?: number;
|
|
9
8
|
dotCount?: number;
|
|
10
9
|
listType?: SwipeListControlType;
|
|
11
10
|
version?: BlockVersion;
|
|
11
|
+
navButtons?: NavButtonProp[];
|
|
12
|
+
onVisibleIndicesChange?: (indices: number[]) => void;
|
|
13
|
+
containerRef?: {
|
|
14
|
+
current: HTMLDivElement | null;
|
|
15
|
+
};
|
|
16
|
+
containerScroll?: SwipeListScroll;
|
|
12
17
|
}
|
|
13
18
|
export declare const SwipeListDots: import("@redneckz/uni-jsx").UNIComponent<SwipeListDotsProps, any, any>;
|
|
14
19
|
export {};
|
|
@@ -2,28 +2,44 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.SwipeListDots = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
+
const useMobileMode_1 = require("../../hooks/useMobileMode");
|
|
5
7
|
const style_1 = require("../../utils/style");
|
|
8
|
+
const renderDotButton_1 = require("./renderDotButton");
|
|
9
|
+
const renderNavButton_1 = require("./renderNavButton");
|
|
10
|
+
const SwipeListContainer_1 = require("./SwipeListContainer");
|
|
11
|
+
const useSwipeListScroll_1 = require("./useSwipeListScroll");
|
|
6
12
|
const containerStyles = {
|
|
7
13
|
'horizontal-list': 'mx-auto mt-lg w-fit',
|
|
8
14
|
'vertical-list': 'absolute flex-col justify-center h-full top-0 left-4',
|
|
9
15
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
exports.SwipeListDots = (0, uni_jsx_1.JSX)(({ className = '', activeIndex = 0, dotCount = 0, listType = 'horizontal-list', version, navButtons = [], containerRef, containerScroll, }) => {
|
|
17
|
+
const isMobileMode = (0, useMobileMode_1.useMobileMode)();
|
|
18
|
+
const [navRef, navScroll] = (0, useSwipeListScroll_1.useSwipeListScroll)({
|
|
19
|
+
itemCount: navButtons.length,
|
|
20
|
+
});
|
|
21
|
+
const scrollOption = getOptions(Boolean(navButtons?.length));
|
|
22
|
+
(0, hooks_1.useEffect)(() => {
|
|
23
|
+
if (navButtons?.length && activeIndex >= 0 && navRef?.current) {
|
|
24
|
+
navScroll.scrollTo(activeIndex, scrollOption);
|
|
25
|
+
}
|
|
26
|
+
}, [activeIndex]);
|
|
27
|
+
const onChangeActiveIndex = (0, hooks_1.useCallback)((idx) => {
|
|
18
28
|
if (idx !== activeIndex && containerRef?.current) {
|
|
19
|
-
|
|
20
|
-
behavior: 'smooth',
|
|
21
|
-
block: 'nearest',
|
|
22
|
-
});
|
|
29
|
+
containerScroll?.scrollTo(idx, scrollOption);
|
|
23
30
|
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
}, [containerRef?.current]);
|
|
32
|
+
if (navButtons?.length && !isMobileMode) {
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: navRef, snapAlign: "snap-start", itemClassName: "h-36 flex items-stretch w-screen", gap: 8, children: navButtons.map((0, renderNavButton_1.renderNavButton)({ activeIndex, onClick: onChangeActiveIndex })) }));
|
|
34
|
+
}
|
|
35
|
+
else if (dotCount) {
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('flex gap-xs', containerStyles[listType], version ? 'group' : '', className, { 'pb-xl': navButtons?.length && isMobileMode }), "data-ver": version, children: Array.from({ length: dotCount })
|
|
37
|
+
.fill(null)
|
|
38
|
+
.map((0, renderDotButton_1.renderDotButton)({ activeIndex, onClick: onChangeActiveIndex, listType })) }));
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
});
|
|
42
|
+
const getOptions = (isAuto = false) => ({
|
|
43
|
+
behavior: isAuto ? 'auto' : 'smooth',
|
|
28
44
|
});
|
|
29
45
|
//# sourceMappingURL=SwipeListDots.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListDots.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;
|
|
1
|
+
{"version":3,"file":"SwipeListDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListDots.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAqE;AACrE,6DAA0D;AAE1D,6CAA0C;AAE1C,uDAAoD;AACpD,uDAAoD;AACpD,6DAA0D;AAE1D,6DAAgF;AAEhF,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,qBAAqB;IACxC,eAAe,EAAE,sDAAsD;CACxE,CAAC;AAaW,QAAA,aAAa,GAAG,IAAA,aAAG,EAC9B,CAAC,EACC,SAAS,GAAG,EAAE,EACd,WAAW,GAAG,CAAC,EACf,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,iBAAiB,EAC5B,OAAO,EACP,UAAU,GAAG,EAAE,EACf,YAAY,EACZ,eAAe,GAChB,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,IAAA,6BAAa,GAAE,CAAC;IACrC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,uCAAkB,EAAiB;QAC7D,SAAS,EAAE,UAAU,CAAC,MAAM;KAC7B,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAE7D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,UAAU,EAAE,MAAM,IAAI,WAAW,IAAI,CAAC,IAAI,MAAM,EAAE,OAAO,EAAE;YAC7D,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;SAC/C;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,MAAM,mBAAmB,GAAG,IAAA,mBAAW,EACrC,CAAC,GAAW,EAAE,EAAE;QACd,IAAI,GAAG,KAAK,WAAW,IAAI,YAAY,EAAE,OAAO,EAA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: string;
|
|
5
5
|
scroll: SwipeListScroll;
|
|
6
6
|
hasBlur?: boolean;
|
|
7
|
+
isBottom?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const SwipeListScrollButtons: import("@redneckz/uni-jsx").UNIComponent<SwipeListScrollButtonsProps, any, any>;
|
|
@@ -4,11 +4,12 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const style_1 = require("../../utils/style");
|
|
6
6
|
const ArrowButton_1 = require("../LinkButton/ArrowButton");
|
|
7
|
-
const scrollButtonStyle = 'absolute top-[calc(50%-24px)] z-40';
|
|
8
7
|
const blurBaseStyle = 'absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none';
|
|
9
|
-
exports.SwipeListScrollButtons = (0, uni_jsx_1.JSX)(({ className, scroll, hasBlur, arrowsPadded }) => {
|
|
8
|
+
exports.SwipeListScrollButtons = (0, uni_jsx_1.JSX)(({ className, scroll, hasBlur, arrowsPadded, isBottom }) => {
|
|
10
9
|
const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
|
|
11
|
-
|
|
10
|
+
const isArrowPadded = arrowsPadded && !isBottom;
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: className, children: [hasBlur ? renderBlur(scroll) : null, canScrollLeft ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ScrollLeftButton, { className: (0, style_1.style)(buttonStyle(isBottom), isArrowPadded ? 'left-1' : 'left-0'), onClick: scrollLeft })) : null, canScrollRight ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ScrollRightButton, { className: (0, style_1.style)(buttonStyle(isBottom), isArrowPadded ? 'right-1' : 'right-0'), onClick: scrollRight })) : null] }));
|
|
12
12
|
});
|
|
13
13
|
const renderBlur = (scroll) => ((0, jsx_runtime_1.jsxs)("div", { children: [scroll.canScrollLeft ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(blurBaseStyle, 'left-0 bg-opacity-from-white group-data-secondary:bg-none') })) : null, scroll.canScrollRight ? ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(blurBaseStyle, 'right-0 bg-opacity-to-white group-data-secondary:bg-none') })) : null] }));
|
|
14
|
+
const buttonStyle = (isBottom = false) => (0, style_1.style)('absolute z-40', isBottom ? 'bottom-[56px]' : 'top-[calc(50%-24px)]');
|
|
14
15
|
//# sourceMappingURL=SwipeListScrollButtons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeListScrollButtons.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,2DAAgF;AAIhF,MAAM,
|
|
1
|
+
{"version":3,"file":"SwipeListScrollButtons.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListScrollButtons.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,2DAAgF;AAIhF,MAAM,aAAa,GAAG,wEAAwE,CAAC;AASlF,QAAA,sBAAsB,GAAG,IAAA,aAAG,EACvC,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzD,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IAC1E,MAAM,aAAa,GAAG,YAAY,IAAI,CAAC,QAAQ,CAAC;IAEhD,OAAO,CACL,iCAAK,SAAS,EAAE,SAAS,aACtB,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EACnC,aAAa,CAAC,CAAC,CAAC,CACf,uBAAC,8BAAgB,IACf,SAAS,EAAE,IAAA,aAAK,EAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAC5E,OAAO,EAAE,UAAU,GACnB,CACH,CAAC,CAAC,CAAC,IAAI,EACP,cAAc,CAAC,CAAC,CAAC,CAChB,uBAAC,+BAAiB,IAChB,SAAS,EAAE,IAAA,aAAK,EAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,EAC9E,OAAO,EAAE,WAAW,GACpB,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,MAAuB,EAAE,EAAE,CAAC,CAC9C,4CACG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CACtB,gCACE,SAAS,EAAE,IAAA,aAAK,EACd,aAAa,EACb,2DAA2D,CAC5D,GACD,CACH,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CACvB,gCACE,SAAS,EAAE,IAAA,aAAK,EAAC,aAAa,EAAE,0DAA0D,CAAC,GAC3F,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,QAAQ,GAAG,KAAK,EAAE,EAAE,CACvC,IAAA,aAAK,EAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.renderDotButton = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const style_1 = require("../../utils/style");
|
|
5
|
+
const activeDotStyles = {
|
|
6
|
+
'horizontal-list': 'w-6',
|
|
7
|
+
'vertical-list': 'h-6',
|
|
8
|
+
};
|
|
9
|
+
const dotStyle = 'cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white';
|
|
10
|
+
const inactiveDotStyle = 'w-2 h-2 opacity-30';
|
|
11
|
+
const renderDotButton = ({ activeIndex, onClick, listType = 'horizontal-list' }) => (_, idx) => ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)(dotStyle, idx === activeIndex ? activeDotStyles[listType] : inactiveDotStyle), role: "button", "aria-hidden": true, onClick: () => onClick(idx) }, String(idx)));
|
|
12
|
+
exports.renderDotButton = renderDotButton;
|
|
13
|
+
//# sourceMappingURL=renderDotButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderDotButton.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/renderDotButton.tsx"],"names":[],"mappings":";;;AAAA,6CAA0C;AAI1C,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,QAAQ,GACZ,yGAAyG,CAAC;AAE5G,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAEvC,MAAM,eAAe,GAC1B,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,GAAG,iBAAiB,EAAW,EAAE,EAAE,CACpE,CAAC,CAAM,EAAE,GAAW,EAAE,EAAE,CACtB,CACE,gCAEE,SAAS,EAAE,IAAA,aAAK,EACd,QAAQ,EACR,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAgB,CACnE,EACD,IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAPtB,MAAM,CAAC,GAAG,CAAC,CAQhB,CACH,CAAC;AAdO,QAAA,eAAe,mBActB"}
|