@scbt-ecom/ui 0.153.7 → 0.153.9

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 (145) hide show
  1. package/dist/lib/exports/ui.js +1 -1
  2. package/dist/lib/exports/widget.js +1 -1
  3. package/dist/lib/shared/style.css +1 -1
  4. package/dist/lib/shared/ui/carousel/Carousel.js +2 -0
  5. package/dist/lib/shared/ui/carousel/Carousel.js.map +1 -0
  6. package/dist/lib/shared/ui/carousel/index.js +1 -1
  7. package/dist/lib/shared/ui/carousel/model/constant.js +2 -0
  8. package/dist/lib/shared/ui/carousel/model/constant.js.map +1 -0
  9. package/dist/lib/shared/ui/carousel/model/helpers.js +1 -1
  10. package/dist/lib/shared/ui/carousel/model/helpers.js.map +1 -1
  11. package/dist/lib/shared/ui/carousel/model/hooks/useArrowNavigation.js.map +1 -1
  12. package/dist/lib/shared/ui/carousel/model/hooks/useDotsNavigation.js.map +1 -1
  13. package/dist/lib/shared/ui/carousel/model/index.js +1 -1
  14. package/dist/lib/shared/ui/carousel/ui/ArrowNavigationButton.js.map +1 -1
  15. package/dist/lib/shared/ui/carousel/ui/DotsNavigations.js +1 -1
  16. package/dist/lib/shared/ui/carousel/ui/DotsNavigations.js.map +1 -1
  17. package/dist/lib/shared/ui/carousel/ui/RenderSlides.js +2 -0
  18. package/dist/lib/shared/ui/carousel/ui/RenderSlides.js.map +1 -0
  19. package/dist/lib/shared/ui/carousel/ui/index.js +1 -1
  20. package/dist/lib/shared/ui/carousel/ui/slideVariants/SlideFullScreen.js +1 -1
  21. package/dist/lib/shared/ui/carousel/ui/slideVariants/SlideFullScreen.js.map +1 -1
  22. package/dist/lib/shared/ui/carousel/ui/slideVariants/SlideProductCard.js +1 -1
  23. package/dist/lib/shared/ui/carousel/ui/slideVariants/SlideProductCard.js.map +1 -1
  24. package/dist/lib/shared/ui/carousel/ui/slideVariants/SlideStepsList.js +2 -0
  25. package/dist/lib/shared/ui/carousel/ui/slideVariants/SlideStepsList.js.map +1 -0
  26. package/dist/lib/shared/ui/carousel/ui/slideVariants/index.js +1 -1
  27. package/dist/lib/shared/ui/carousel/ui/slideVariants/slide.module.css +1 -0
  28. package/dist/lib/shared/ui/carousel/ui/slideVariants/slide.module.css.js +2 -0
  29. package/dist/lib/shared/ui/carousel/ui/slideVariants/slide.module.css.js.map +1 -0
  30. package/dist/lib/shared/ui/carousel/ui/stepsList/StepListItemType.js +2 -0
  31. package/dist/lib/shared/ui/carousel/ui/stepsList/StepListItemType.js.map +1 -0
  32. package/dist/lib/shared/ui/carousel/ui/stepsList/StepsList.js +2 -0
  33. package/dist/lib/shared/ui/carousel/ui/stepsList/StepsList.js.map +1 -0
  34. package/dist/lib/shared/ui/carousel/ui/stepsList/index.js +2 -0
  35. package/dist/lib/shared/ui/carousel/ui/stepsList/index.js.map +1 -0
  36. package/dist/lib/shared/ui/carouselBase/CarouselBase.js.map +1 -0
  37. package/dist/lib/shared/ui/carouselBase/CarouselNative.js.map +1 -0
  38. package/dist/lib/shared/ui/carouselBase/index.js +2 -0
  39. package/dist/lib/shared/ui/carouselBase/index.js.map +1 -0
  40. package/dist/lib/shared/ui/carouselBase/model/helpers.js +2 -0
  41. package/dist/lib/shared/ui/carouselBase/model/helpers.js.map +1 -0
  42. package/dist/lib/shared/ui/carouselBase/model/hooks/index.js +2 -0
  43. package/dist/lib/shared/ui/carouselBase/model/hooks/index.js.map +1 -0
  44. package/dist/lib/shared/ui/carouselBase/model/hooks/useArrowNavigation.js +2 -0
  45. package/dist/lib/shared/ui/carouselBase/model/hooks/useArrowNavigation.js.map +1 -0
  46. package/dist/lib/shared/ui/carouselBase/model/hooks/useCarousel.js +2 -0
  47. package/dist/lib/shared/ui/carouselBase/model/hooks/useCarousel.js.map +1 -0
  48. package/dist/lib/shared/ui/carouselBase/model/hooks/useDotsNavigation.js +2 -0
  49. package/dist/lib/shared/ui/carouselBase/model/hooks/useDotsNavigation.js.map +1 -0
  50. package/dist/lib/shared/ui/carouselBase/model/index.js +2 -0
  51. package/dist/lib/shared/ui/carouselBase/model/index.js.map +1 -0
  52. package/dist/lib/shared/ui/carouselBase/model/types.js +2 -0
  53. package/dist/lib/shared/ui/carouselBase/model/types.js.map +1 -0
  54. package/dist/lib/shared/ui/carouselBase/ui/ArrowNavigationButton.js +2 -0
  55. package/dist/lib/shared/ui/carouselBase/ui/ArrowNavigationButton.js.map +1 -0
  56. package/dist/lib/shared/ui/carouselBase/ui/CarouselContent.js.map +1 -0
  57. package/dist/lib/shared/ui/carouselBase/ui/CarouselSlide.js.map +1 -0
  58. package/dist/lib/shared/ui/carouselBase/ui/ContainerWithNavigation.js.map +1 -0
  59. package/dist/lib/shared/ui/carouselBase/ui/DotsNavigations.js +2 -0
  60. package/dist/lib/shared/ui/carouselBase/ui/DotsNavigations.js.map +1 -0
  61. package/dist/lib/shared/ui/carouselBase/ui/index.js +2 -0
  62. package/dist/lib/shared/ui/carouselBase/ui/index.js.map +1 -0
  63. package/dist/lib/shared/ui/carouselBase/ui/slideVariants/SlideFullScreen.js +2 -0
  64. package/dist/lib/shared/ui/carouselBase/ui/slideVariants/SlideFullScreen.js.map +1 -0
  65. package/dist/lib/shared/ui/carouselBase/ui/slideVariants/SlideOnlyImage.js.map +1 -0
  66. package/dist/lib/shared/ui/carouselBase/ui/slideVariants/SlideProductCard.js +2 -0
  67. package/dist/lib/shared/ui/carouselBase/ui/slideVariants/SlideProductCard.js.map +1 -0
  68. package/dist/lib/shared/ui/carouselBase/ui/slideVariants/index.js +2 -0
  69. package/dist/lib/shared/ui/carouselBase/ui/slideVariants/index.js.map +1 -0
  70. package/dist/lib/shared/ui/formElements/controlled/radio/RadioGroupCardControl.js +1 -1
  71. package/dist/lib/shared/ui/formElements/controlled/radio/RadioGroupCardControl.js.map +1 -1
  72. package/dist/lib/shared/ui/index.js +1 -1
  73. package/dist/lib/shared/ui/progressBar/ProgressBar.js +1 -1
  74. package/dist/lib/shared/ui/progressBar/ProgressBar.js.map +1 -1
  75. package/dist/lib/widgets/carouselBlock/CarouselBlock.js +2 -0
  76. package/dist/lib/widgets/carouselBlock/CarouselBlock.js.map +1 -0
  77. package/dist/lib/widgets/carouselBlock/index.js +2 -0
  78. package/dist/lib/widgets/carouselBlock/index.js.map +1 -0
  79. package/dist/lib/widgets/dynamicForm/DynamicForm.js +1 -1
  80. package/dist/lib/widgets/dynamicForm/DynamicForm.js.map +1 -1
  81. package/dist/lib/widgets/index.js +1 -1
  82. package/dist/lib/widgets/model/helpers.js +2 -2
  83. package/dist/lib/widgets/model/helpers.js.map +1 -1
  84. package/dist/lib/widgets/stepper/ui/StepperCarousel.js +1 -1
  85. package/dist/lib/widgets/stepper/ui/StepperCarousel.js.map +1 -1
  86. package/dist/stats.html +1 -1
  87. package/dist/types/lib/shared/ui/carousel/Carousel.d.ts +30 -0
  88. package/dist/types/lib/shared/ui/carousel/index.d.ts +1 -2
  89. package/dist/types/lib/shared/ui/carousel/model/constant.d.ts +11 -0
  90. package/dist/types/lib/shared/ui/carousel/model/helpers.d.ts +1 -9
  91. package/dist/types/lib/shared/ui/carousel/model/hooks/useArrowNavigation.d.ts +2 -2
  92. package/dist/types/lib/shared/ui/carousel/model/hooks/useDotsNavigation.d.ts +2 -1
  93. package/dist/types/lib/shared/ui/carousel/model/index.d.ts +2 -1
  94. package/dist/types/lib/shared/ui/carousel/model/types.d.ts +22 -23
  95. package/dist/types/lib/shared/ui/carousel/ui/ArrowNavigationButton.d.ts +3 -3
  96. package/dist/types/lib/shared/ui/carousel/ui/DotsNavigations.d.ts +2 -3
  97. package/dist/types/lib/shared/ui/carousel/ui/RenderSlides.d.ts +14 -0
  98. package/dist/types/lib/shared/ui/carousel/ui/index.d.ts +3 -3
  99. package/dist/types/lib/shared/ui/carousel/ui/slideVariants/SlideFullScreen.d.ts +10 -7
  100. package/dist/types/lib/shared/ui/carousel/ui/slideVariants/SlideProductCard.d.ts +9 -6
  101. package/dist/types/lib/shared/ui/carousel/ui/slideVariants/SlideStepsList.d.ts +16 -0
  102. package/dist/types/lib/shared/ui/carousel/ui/slideVariants/index.d.ts +1 -1
  103. package/dist/types/lib/shared/ui/carousel/ui/stepsList/StepListItemType.d.ts +18 -0
  104. package/dist/types/lib/shared/ui/carousel/ui/stepsList/StepsList.d.ts +13 -0
  105. package/dist/types/lib/shared/ui/carousel/ui/stepsList/index.d.ts +2 -0
  106. package/dist/types/lib/shared/ui/{carousel → carouselBase}/CarouselBase.d.ts +3 -0
  107. package/dist/types/lib/shared/ui/carouselBase/index.d.ts +3 -0
  108. package/dist/types/lib/shared/ui/carouselBase/model/helpers.d.ts +9 -0
  109. package/dist/types/lib/shared/ui/carouselBase/model/hooks/index.d.ts +3 -0
  110. package/dist/types/lib/shared/ui/carouselBase/model/hooks/useArrowNavigation.d.ts +12 -0
  111. package/dist/types/lib/shared/ui/carouselBase/model/hooks/useCarousel.d.ts +12 -0
  112. package/dist/types/lib/shared/ui/carouselBase/model/hooks/useDotsNavigation.d.ts +15 -0
  113. package/dist/types/lib/shared/ui/carouselBase/model/index.d.ts +3 -0
  114. package/dist/types/lib/shared/ui/carouselBase/model/types.d.ts +27 -0
  115. package/dist/types/lib/shared/ui/carouselBase/ui/ArrowNavigationButton.d.ts +13 -0
  116. package/dist/types/lib/shared/ui/carouselBase/ui/DotsNavigations.d.ts +13 -0
  117. package/dist/types/lib/shared/ui/carouselBase/ui/index.d.ts +5 -0
  118. package/dist/types/lib/shared/ui/carouselBase/ui/slideVariants/SlideFullScreen.d.ts +19 -0
  119. package/dist/types/lib/shared/ui/carouselBase/ui/slideVariants/SlideProductCard.d.ts +20 -0
  120. package/dist/types/lib/shared/ui/carouselBase/ui/slideVariants/index.d.ts +3 -0
  121. package/dist/types/lib/shared/ui/index.d.ts +2 -1
  122. package/dist/types/lib/shared/ui/progressBar/ProgressBar.d.ts +6 -3
  123. package/dist/types/lib/widgets/carouselBlock/CarouselBlock.d.ts +5 -0
  124. package/dist/types/lib/widgets/carouselBlock/index.d.ts +1 -0
  125. package/dist/types/lib/widgets/dynamicForm/model/types.d.ts +2 -1
  126. package/dist/types/lib/widgets/index.d.ts +1 -0
  127. package/dist/types/lib/widgets/model/helpers.d.ts +2 -1
  128. package/package.json +1 -1
  129. package/dist/lib/shared/ui/carousel/CarouselBase.js.map +0 -1
  130. package/dist/lib/shared/ui/carousel/CarouselNative.js.map +0 -1
  131. package/dist/lib/shared/ui/carousel/ui/CarouselContent.js.map +0 -1
  132. package/dist/lib/shared/ui/carousel/ui/CarouselSlide.js.map +0 -1
  133. package/dist/lib/shared/ui/carousel/ui/ContainerWithNavigation.js.map +0 -1
  134. package/dist/lib/shared/ui/carousel/ui/slideVariants/SlideOnlyImage.js.map +0 -1
  135. /package/dist/lib/shared/ui/{carousel → carouselBase}/CarouselBase.js +0 -0
  136. /package/dist/lib/shared/ui/{carousel → carouselBase}/CarouselNative.js +0 -0
  137. /package/dist/lib/shared/ui/{carousel → carouselBase}/ui/CarouselContent.js +0 -0
  138. /package/dist/lib/shared/ui/{carousel → carouselBase}/ui/CarouselSlide.js +0 -0
  139. /package/dist/lib/shared/ui/{carousel → carouselBase}/ui/ContainerWithNavigation.js +0 -0
  140. /package/dist/lib/shared/ui/{carousel → carouselBase}/ui/slideVariants/SlideOnlyImage.js +0 -0
  141. /package/dist/types/lib/shared/ui/{carousel → carouselBase}/CarouselNative.d.ts +0 -0
  142. /package/dist/types/lib/shared/ui/{carousel → carouselBase}/ui/CarouselContent.d.ts +0 -0
  143. /package/dist/types/lib/shared/ui/{carousel → carouselBase}/ui/CarouselSlide.d.ts +0 -0
  144. /package/dist/types/lib/shared/ui/{carousel → carouselBase}/ui/ContainerWithNavigation.d.ts +0 -0
  145. /package/dist/types/lib/shared/ui/{carousel → carouselBase}/ui/slideVariants/SlideOnlyImage.d.ts +0 -0
@@ -0,0 +1,30 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { EmblaOptionsType } from 'embla-carousel';
3
+ import { AutoplayOptionsType } from 'embla-carousel-autoplay';
4
+ import { NavigationOptions, SlidesOptions, SlideVariant } from './model';
5
+ import { ArrowNavigationButtonClasses, RenderSlidesClasses, StepListClasses, StepListItemType } from './ui';
6
+ type CarouselClasses = {
7
+ overlay?: string;
8
+ arrowsWrapper?: string;
9
+ header?: string;
10
+ heading?: string;
11
+ dots?: string;
12
+ content?: string;
13
+ arrowNextClasses?: ArrowNavigationButtonClasses;
14
+ arrowPrevClasses?: ArrowNavigationButtonClasses;
15
+ stepsListClasses?: StepListClasses;
16
+ renderSlidesClasses?: RenderSlidesClasses;
17
+ };
18
+ export interface CarouselProps<V extends SlideVariant> {
19
+ setVisibleIndex: Dispatch<SetStateAction<number>>;
20
+ visibleIndex: number;
21
+ slidesOptions: SlidesOptions<V>;
22
+ heading?: string;
23
+ carouselOptions?: EmblaOptionsType;
24
+ autoPlayOptions?: AutoplayOptionsType;
25
+ navigationOptions?: NavigationOptions;
26
+ stepsList?: StepListItemType[];
27
+ classes?: CarouselClasses;
28
+ }
29
+ export declare const Carousel: <V extends SlideVariant>({ carouselOptions, navigationOptions, autoPlayOptions, slidesOptions, setVisibleIndex, visibleIndex, heading, stepsList, classes }: CarouselProps<V>) => import("react/jsx-runtime").JSX.Element;
30
+ export {};
@@ -1,3 +1,2 @@
1
- export * from './CarouselBase';
1
+ export * from './Carousel';
2
2
  export type * from './model/types';
3
- export * from './ui';
@@ -0,0 +1,11 @@
1
+ import { EmblaOptionsType } from 'embla-carousel';
2
+ import { AutoplayOptionsType } from 'embla-carousel-autoplay';
3
+ import { NavigationOptions } from './types';
4
+ export declare const SLIDE_VARIANT: {
5
+ readonly productCard: "productCard";
6
+ readonly fullScreen: "fullScreen";
7
+ readonly stepsList: "stepsList";
8
+ };
9
+ export declare const defaultCarouselOptions: EmblaOptionsType;
10
+ export declare const defaultNavigationOptions: NavigationOptions;
11
+ export declare const defaultAutoPlayOptions: AutoplayOptionsType;
@@ -1,9 +1 @@
1
- import { EmblaOptionsType } from 'embla-carousel';
2
- import { AutoplayOptionsType } from 'embla-carousel-autoplay';
3
- import { CarouselSlideVariant, DotsOptions, NavArrowOptions } from './types';
4
- import { DiscriminatedUnion } from '../../../types';
5
- export declare const defaultCarouselOptions: EmblaOptionsType;
6
- export declare const defaultDotsOptions: DotsOptions;
7
- export declare const defaultNavArrowOptions: NavArrowOptions;
8
- export declare const defaultAutoPlayOptions: AutoplayOptionsType;
9
- export declare const renderSlideVariant: (props: DiscriminatedUnion<"variant", CarouselSlideVariant>) => import("react/jsx-runtime").JSX.Element;
1
+ export declare const extractNumberFromString: (str: string) => number;
@@ -1,5 +1,5 @@
1
1
  import { EmblaCarouselType } from 'embla-carousel';
2
- import { NavigationMode } from '../types';
2
+ import { NavigationModeType } from '../types';
3
3
  type UseArrowNavigationProps = {
4
4
  emblaApi: EmblaCarouselType | undefined;
5
5
  navigationHandler?: (emblaApi: EmblaCarouselType) => void;
@@ -7,6 +7,6 @@ type UseArrowNavigationProps = {
7
7
  export declare const useArrowNavigation: ({ emblaApi, navigationHandler }: UseArrowNavigationProps) => {
8
8
  prevBtnDisabled: boolean;
9
9
  nextBtnDisabled: boolean;
10
- onClickNavigationButton: (mode: NavigationMode) => void;
10
+ onClickNavigationButton: (mode: NavigationModeType) => void;
11
11
  };
12
12
  export {};
@@ -1,8 +1,9 @@
1
+ import { Dispatch, SetStateAction } from 'react';
1
2
  import { EmblaCarouselType } from 'embla-carousel';
2
3
  type UseDotsNavigationProps = {
3
4
  emblaApi: EmblaCarouselType | undefined;
4
5
  navigationHandler: (emblaApi: EmblaCarouselType) => void;
5
- setVisibleIndex: (index: number) => void;
6
+ setVisibleIndex: Dispatch<SetStateAction<number>>;
6
7
  };
7
8
  export type UseDotsNavigationReturn = {
8
9
  scrollSnaps: number[];
@@ -1,3 +1,4 @@
1
1
  export type * from './types';
2
- export * from './hooks';
2
+ export * from './constant';
3
3
  export * from './helpers';
4
+ export * from './hooks';
@@ -1,27 +1,26 @@
1
- import { CarouselSlideProps, SlideFullScreenProps, SlideOnlyImageProps, SlideProductCardProps } from '../ui';
2
- export type DotsOptions = {
3
- position?: 'bot-left' | 'center' | 'bot-right';
4
- deskVisible?: boolean;
5
- mobVisible?: boolean;
1
+ import { SlideFullScreenProps, SlideProductCardProps, SlideStepsListProps } from '../ui';
2
+ import { SLIDE_VARIANT } from './constant';
3
+ export type SlideVariant = keyof typeof SLIDE_VARIANT;
4
+ export type SlidesConfig = {
5
+ deskSlideWidth: string;
6
+ mobSlideWidth: string;
6
7
  };
7
- export type NavArrowOptions = {
8
- position?: 'center' | 'top-right';
9
- deskVisible?: boolean;
10
- mobVisible?: boolean;
8
+ type SlideVariantPropsMap = {
9
+ fullScreen: SlideFullScreenProps;
10
+ productCard: SlideProductCardProps;
11
+ stepsList: SlideStepsListProps;
11
12
  };
12
- export type NavigationMode = 'next' | 'prev';
13
- export type ImageProps = {
14
- src: string;
15
- alt: string;
13
+ export type SlidesVariantProps<T extends SlideVariant> = SlideVariantPropsMap[T];
14
+ export type SlidesOptions<V extends SlideVariant> = {
15
+ slides: SlidesVariantProps<V>[];
16
+ slideVariant: V;
17
+ slidesConfig: SlidesConfig;
18
+ };
19
+ export type NavigationModeType = 'next' | 'prev';
20
+ export type NavigationOptions = {
21
+ dotsOnDesk?: boolean;
22
+ dotsOnMob?: boolean;
23
+ arrowsOnDesk?: boolean;
24
+ arrowsOnMob?: boolean;
16
25
  };
17
- interface SlideFullScreen extends SlideFullScreenProps, CarouselSlideProps {
18
- variant: 'fullScreen';
19
- }
20
- interface SlideOnlyImage extends SlideOnlyImageProps, CarouselSlideProps {
21
- variant: 'onlyImage';
22
- }
23
- interface SlideProductCard extends SlideProductCardProps, CarouselSlideProps {
24
- variant: 'productCard';
25
- }
26
- export type CarouselSlideVariant = SlideFullScreen | SlideOnlyImage | SlideProductCard;
27
26
  export {};
@@ -1,12 +1,12 @@
1
1
  import { ComponentPropsWithRef } from 'react';
2
- import { NavigationMode } from '../model';
2
+ import { NavigationModeType } from '../model';
3
3
  export type ArrowNavigationButtonClasses = {
4
4
  button?: string;
5
5
  icon?: string;
6
6
  };
7
7
  interface ArrowNavigationButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'onClick'> {
8
- mode: NavigationMode;
9
- onClick: (mode: NavigationMode) => void;
8
+ mode: NavigationModeType;
9
+ onClick: (mode: NavigationModeType) => void;
10
10
  classes?: ArrowNavigationButtonClasses;
11
11
  }
12
12
  export declare const ArrowNavigationButton: ({ mode, onClick, children, classes, ...props }: ArrowNavigationButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,12 @@
1
- import { DotsOptions } from '../model';
2
1
  export type DotsNavigationsClasses = {
3
2
  dotsWrapper?: string;
4
3
  dot?: string;
5
4
  };
6
- interface DotsNavigationsProps extends Pick<DotsOptions, 'position'> {
5
+ interface DotsNavigationsProps {
7
6
  scrollSnaps: number[];
8
7
  onClickDot: (index: number) => void;
9
8
  visibleIndex: number;
10
9
  classes?: DotsNavigationsClasses;
11
10
  }
12
- export declare const DotsNavigations: ({ scrollSnaps, visibleIndex, onClickDot, position, classes, ...props }: DotsNavigationsProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const DotsNavigations: ({ scrollSnaps, visibleIndex, onClickDot, classes, ...props }: DotsNavigationsProps) => import("react/jsx-runtime").JSX.Element;
13
12
  export {};
@@ -0,0 +1,14 @@
1
+ import { CarouselProps } from '../Carousel';
2
+ import { SlideVariant } from '../model';
3
+ import { SlideFullScreenClasses, SlideProductCardClasses, SlideStepsListClasses } from './slideVariants';
4
+ export type RenderSlidesClasses = {
5
+ renderSlidesWrapper?: string;
6
+ slideProductCardClasses?: SlideProductCardClasses;
7
+ slideFullScreenClasses?: SlideFullScreenClasses;
8
+ slideStepsListClasses?: SlideStepsListClasses;
9
+ };
10
+ export interface RenderSlidesProps<V extends SlideVariant> {
11
+ slidesOptions: CarouselProps<V>['slidesOptions'];
12
+ classes?: RenderSlidesClasses;
13
+ }
14
+ export declare const RenderSlides: <V extends SlideVariant>({ slidesOptions, classes }: RenderSlidesProps<V>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
+ export * from './slideVariants';
2
+ export * from './RenderSlides';
1
3
  export * from './ArrowNavigationButton';
2
- export * from './CarouselSlide';
3
4
  export * from './DotsNavigations';
4
- export * from './slideVariants';
5
- export * from './CarouselContent';
5
+ export * from './stepsList';
@@ -1,5 +1,5 @@
1
- import { ImageProps } from '../../model';
2
- type SlideFullScreenClasses = {
1
+ import { SlidesConfig } from '../../model';
2
+ export type SlideFullScreenClasses = {
3
3
  root?: string;
4
4
  wrapper?: string;
5
5
  numeric?: string;
@@ -9,11 +9,14 @@ type SlideFullScreenClasses = {
9
9
  image?: string;
10
10
  };
11
11
  export interface SlideFullScreenProps {
12
- slideIndex: number;
12
+ slidesConfig: SlidesConfig;
13
+ slideIndex?: number;
13
14
  title?: string;
14
15
  description?: string;
15
- image?: ImageProps;
16
- slideClasses?: SlideFullScreenClasses;
16
+ imgProps?: {
17
+ src: string;
18
+ alt: string;
19
+ };
20
+ slideFullScreenClasses?: SlideFullScreenClasses;
17
21
  }
18
- export declare const SlideFullScreen: ({ slideIndex, title, image, description, slideClasses }: SlideFullScreenProps) => import("react/jsx-runtime").JSX.Element;
19
- export {};
22
+ export declare const SlideFullScreen: ({ slideIndex, title, imgProps, description, slideFullScreenClasses, slidesConfig }: SlideFullScreenProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ButtonProps } from '../../../button';
2
- import { ImageProps } from '../../model';
3
- type SlideProductCardClasses = {
2
+ import { SlidesConfig } from '../../model';
3
+ export type SlideProductCardClasses = {
4
4
  root?: string;
5
5
  wrapper?: string;
6
6
  textWrapper?: string;
@@ -10,11 +10,14 @@ type SlideProductCardClasses = {
10
10
  button?: string;
11
11
  };
12
12
  export interface SlideProductCardProps {
13
+ slidesConfig: SlidesConfig;
13
14
  title?: string;
14
15
  description?: string;
15
- imgProps?: ImageProps;
16
+ imgProps?: {
17
+ src: string;
18
+ alt: string;
19
+ };
16
20
  buttonProps?: ButtonProps;
17
- slideClasses?: SlideProductCardClasses;
21
+ slideProductCardClasses?: SlideProductCardClasses;
18
22
  }
19
- export declare const SlideProductCard: ({ title, imgProps, description, buttonProps, slideClasses }: SlideProductCardProps) => import("react/jsx-runtime").JSX.Element;
20
- export {};
23
+ export declare const SlideProductCard: ({ title, imgProps, description, buttonProps, slideProductCardClasses, slidesConfig }: SlideProductCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { SlidesConfig } from '../../model';
2
+ export type SlideStepsListClasses = {
3
+ wrapper?: string;
4
+ imageWrapper?: string;
5
+ image?: string;
6
+ };
7
+ export interface SlideStepsListProps {
8
+ slidesConfig: SlidesConfig;
9
+ slideIndex?: number;
10
+ imgProps?: {
11
+ src: string;
12
+ alt: string;
13
+ };
14
+ slideStepsListClasses?: SlideStepsListClasses;
15
+ }
16
+ export declare const SlideStepsList: ({ imgProps, slideStepsListClasses, slidesConfig }: SlideStepsListProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  export * from './SlideProductCard';
2
- export * from './SlideOnlyImage';
3
2
  export * from './SlideFullScreen';
3
+ export * from './SlideStepsList';
@@ -0,0 +1,18 @@
1
+ export type StepListItemClasses = {
2
+ root?: string;
3
+ stepIndex?: string;
4
+ textBlock?: string;
5
+ subtitle?: string;
6
+ description?: string;
7
+ };
8
+ export type StepListItemType = {
9
+ subtitle: string;
10
+ description?: string;
11
+ };
12
+ export interface StepListItemProps extends StepListItemType {
13
+ stepIndex: number;
14
+ visibleIndex: number;
15
+ onChangeStep: (stepIndex: number) => void;
16
+ classes?: StepListItemClasses;
17
+ }
18
+ export declare const StepListItem: ({ subtitle, description, stepIndex, visibleIndex, onChangeStep, classes }: StepListItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { StepListItemClasses, StepListItemType } from './StepListItemType';
2
+ export type StepListClasses = {
3
+ stepListItemClasses?: StepListItemClasses;
4
+ stepsWrapper?: string;
5
+ };
6
+ export interface StepsListProps {
7
+ stepsList: StepListItemType[];
8
+ visibleIndex: number;
9
+ onChangeStep: (stepIndex: number) => void;
10
+ heading?: string;
11
+ classes?: StepListClasses;
12
+ }
13
+ export declare const StepsList: ({ stepsList, visibleIndex, onChangeStep, classes }: StepsListProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './StepsList';
2
+ export type { StepListItemType } from './StepListItemType';
@@ -25,4 +25,7 @@ export interface CarouselBaseProps extends HTMLAttributes<HTMLDivElement> {
25
25
  visibleIndex: number;
26
26
  classes?: CarouselClasses;
27
27
  }
28
+ /**
29
+ * @deprecated dont use
30
+ */
28
31
  export declare const CarouselBase: ({ dotsOptions, navArrowOptions, carouselOptions, heading, autoPlayOptions, setVisibleIndex, visibleIndex, children, classes, ...props }: CarouselBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './CarouselBase';
2
+ export type * from './model/types';
3
+ export * from './ui';
@@ -0,0 +1,9 @@
1
+ import { EmblaOptionsType } from 'embla-carousel';
2
+ import { AutoplayOptionsType } from 'embla-carousel-autoplay';
3
+ import { CarouselSlideVariant, DotsOptions, NavArrowOptions } from './types';
4
+ import { DiscriminatedUnion } from '../../../types';
5
+ export declare const defaultCarouselOptions: EmblaOptionsType;
6
+ export declare const defaultDotsOptions: DotsOptions;
7
+ export declare const defaultNavArrowOptions: NavArrowOptions;
8
+ export declare const defaultAutoPlayOptions: AutoplayOptionsType;
9
+ export declare const renderSlideVariant: (props: DiscriminatedUnion<"variant", CarouselSlideVariant>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './useArrowNavigation';
2
+ export * from './useDotsNavigation';
3
+ export * from './useCarousel';
@@ -0,0 +1,12 @@
1
+ import { EmblaCarouselType } from 'embla-carousel';
2
+ import { NavigationMode } from '../types';
3
+ type UseArrowNavigationProps = {
4
+ emblaApi: EmblaCarouselType | undefined;
5
+ navigationHandler?: (emblaApi: EmblaCarouselType) => void;
6
+ };
7
+ export declare const useArrowNavigation: ({ emblaApi, navigationHandler }: UseArrowNavigationProps) => {
8
+ prevBtnDisabled: boolean;
9
+ nextBtnDisabled: boolean;
10
+ onClickNavigationButton: (mode: NavigationMode) => void;
11
+ };
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel';
2
+ import { AutoplayOptionsType } from 'embla-carousel-autoplay';
3
+ type UseCarouselProps = {
4
+ carouselOptions: EmblaOptionsType;
5
+ autoPlayOptions?: AutoplayOptionsType;
6
+ };
7
+ export declare const useCarousel: ({ carouselOptions, autoPlayOptions }: UseCarouselProps) => {
8
+ emblaRef: import('embla-carousel-react').EmblaViewportRefType;
9
+ emblaApi: EmblaCarouselType | undefined;
10
+ navigationHandler: (emblaApi: EmblaCarouselType) => void;
11
+ };
12
+ export {};
@@ -0,0 +1,15 @@
1
+ import { EmblaCarouselType } from 'embla-carousel';
2
+ type UseDotsNavigationProps = {
3
+ emblaApi: EmblaCarouselType | undefined;
4
+ navigationHandler: (emblaApi: EmblaCarouselType) => void;
5
+ setVisibleIndex: (index: number) => void;
6
+ };
7
+ export type UseDotsNavigationReturn = {
8
+ scrollSnaps: number[];
9
+ onClickDot: (index: number) => void;
10
+ };
11
+ export declare const useDotsNavigation: ({ emblaApi, navigationHandler, setVisibleIndex }: UseDotsNavigationProps) => {
12
+ scrollSnaps: number[];
13
+ onClickDot: (index: number) => void;
14
+ };
15
+ export {};
@@ -0,0 +1,3 @@
1
+ export type * from './types';
2
+ export * from './hooks';
3
+ export * from './helpers';
@@ -0,0 +1,27 @@
1
+ import { CarouselSlideProps, SlideFullScreenProps, SlideOnlyImageProps, SlideProductCardProps } from '../ui';
2
+ export type DotsOptions = {
3
+ position?: 'bot-left' | 'center' | 'bot-right';
4
+ deskVisible?: boolean;
5
+ mobVisible?: boolean;
6
+ };
7
+ export type NavArrowOptions = {
8
+ position?: 'center' | 'top-right';
9
+ deskVisible?: boolean;
10
+ mobVisible?: boolean;
11
+ };
12
+ export type NavigationMode = 'next' | 'prev';
13
+ export type ImageProps = {
14
+ src: string;
15
+ alt: string;
16
+ };
17
+ interface SlideFullScreen extends SlideFullScreenProps, CarouselSlideProps {
18
+ variant: 'fullScreen';
19
+ }
20
+ interface SlideOnlyImage extends SlideOnlyImageProps, CarouselSlideProps {
21
+ variant: 'onlyImage';
22
+ }
23
+ interface SlideProductCard extends SlideProductCardProps, CarouselSlideProps {
24
+ variant: 'productCard';
25
+ }
26
+ export type CarouselSlideVariant = SlideFullScreen | SlideOnlyImage | SlideProductCard;
27
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ import { NavigationMode } from '../model';
3
+ export type ArrowNavigationButtonClasses = {
4
+ button?: string;
5
+ icon?: string;
6
+ };
7
+ interface ArrowNavigationButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'onClick'> {
8
+ mode: NavigationMode;
9
+ onClick: (mode: NavigationMode) => void;
10
+ classes?: ArrowNavigationButtonClasses;
11
+ }
12
+ export declare const ArrowNavigationButton: ({ mode, onClick, children, classes, ...props }: ArrowNavigationButtonProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ import { DotsOptions } from '../model';
2
+ export type DotsNavigationsClasses = {
3
+ dotsWrapper?: string;
4
+ dot?: string;
5
+ };
6
+ interface DotsNavigationsProps extends Pick<DotsOptions, 'position'> {
7
+ scrollSnaps: number[];
8
+ onClickDot: (index: number) => void;
9
+ visibleIndex: number;
10
+ classes?: DotsNavigationsClasses;
11
+ }
12
+ export declare const DotsNavigations: ({ scrollSnaps, visibleIndex, onClickDot, position, classes, ...props }: DotsNavigationsProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './ArrowNavigationButton';
2
+ export * from './CarouselSlide';
3
+ export * from './DotsNavigations';
4
+ export * from './slideVariants';
5
+ export * from './CarouselContent';
@@ -0,0 +1,19 @@
1
+ import { ImageProps } from '../../model';
2
+ type SlideFullScreenClasses = {
3
+ root?: string;
4
+ wrapper?: string;
5
+ numeric?: string;
6
+ textWrapper?: string;
7
+ title?: string;
8
+ description?: string;
9
+ image?: string;
10
+ };
11
+ export interface SlideFullScreenProps {
12
+ slideIndex: number;
13
+ title?: string;
14
+ description?: string;
15
+ image?: ImageProps;
16
+ slideClasses?: SlideFullScreenClasses;
17
+ }
18
+ export declare const SlideFullScreen: ({ slideIndex, title, image, description, slideClasses }: SlideFullScreenProps) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,20 @@
1
+ import { ButtonProps } from '../../../button';
2
+ import { ImageProps } from '../../model';
3
+ type SlideProductCardClasses = {
4
+ root?: string;
5
+ wrapper?: string;
6
+ textWrapper?: string;
7
+ title?: string;
8
+ description?: string;
9
+ image?: string;
10
+ button?: string;
11
+ };
12
+ export interface SlideProductCardProps {
13
+ title?: string;
14
+ description?: string;
15
+ imgProps?: ImageProps;
16
+ buttonProps?: ButtonProps;
17
+ slideClasses?: SlideProductCardClasses;
18
+ }
19
+ export declare const SlideProductCard: ({ title, imgProps, description, buttonProps, slideClasses }: SlideProductCardProps) => import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './SlideProductCard';
2
+ export * from './SlideOnlyImage';
3
+ export * from './SlideFullScreen';
@@ -16,7 +16,7 @@ export * from './modal';
16
16
  export * from './notification';
17
17
  export * from './table';
18
18
  export * from './pagination';
19
- export * from './carousel';
19
+ export * from './carouselBase';
20
20
  export * from './dialog';
21
21
  export * from './providers';
22
22
  export * from './heading';
@@ -32,3 +32,4 @@ export * from './dropdownList';
32
32
  export * from './portal';
33
33
  export * from './divider';
34
34
  export * from './confirmable';
35
+ export * from './carousel';
@@ -2,17 +2,20 @@ import * as React from 'react';
2
2
  type ProgressBarClasses = {
3
3
  root?: string;
4
4
  topContent?: string;
5
- bottomContent?: string;
5
+ leftSubtitle?: React.ReactElement;
6
+ rightSubtitle?: React.ReactElement;
6
7
  progressBar?: string;
7
8
  progress?: string;
8
9
  loader?: string;
10
+ bottomContentClasses?: string;
9
11
  };
10
12
  export interface IProgressBarProps {
11
13
  topContent?: React.ReactElement;
12
- bottomContent?: React.ReactElement;
14
+ leftSubtitle?: React.ReactElement;
15
+ rightSubtitle?: React.ReactElement;
13
16
  progress: number;
14
17
  maxPercent?: number;
15
18
  classes?: ProgressBarClasses;
16
19
  }
17
- export declare const ProgressBar: ({ topContent, bottomContent, progress, maxPercent, classes }: IProgressBarProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const ProgressBar: ({ topContent, leftSubtitle, rightSubtitle, progress, maxPercent, classes }: IProgressBarProps) => import("react/jsx-runtime").JSX.Element;
18
21
  export {};
@@ -0,0 +1,5 @@
1
+ import { CarouselProps, SlideVariant } from '../../shared/ui';
2
+ export interface CarouselBlockProps<V extends SlideVariant> extends CarouselProps<V> {
3
+ }
4
+ export declare const CarouselBlock: <V extends SlideVariant>(props: CarouselBlockProps<V>) => import("react/jsx-runtime").JSX.Element;
5
+ export default CarouselBlock;
@@ -0,0 +1 @@
1
+ export * from './CarouselBlock';
@@ -29,7 +29,8 @@ type ProgressEnabled = {
29
29
  enabled: true;
30
30
  maxPercent: number;
31
31
  title: string;
32
- subtitle: string;
32
+ leftSubtitle: string;
33
+ rightSubtitle: string;
33
34
  };
34
35
  type ProgressDisabled = {
35
36
  enabled: false;
@@ -22,4 +22,5 @@ export * from './infoBlock';
22
22
  export * from './userFeedback';
23
23
  export * from './table';
24
24
  export * from './conditionBlock';
25
+ export * from './carouselBlock';
25
26
  export { queryClient } from './queryClientProvider';
@@ -16,7 +16,8 @@ export declare const WIDGET_LIST_MAP: {
16
16
  readonly userFeedback: import('react').LazyExoticComponent<(props: import('..').UserFeedbackProps) => import("react/jsx-runtime").JSX.Element>;
17
17
  readonly infoTable: import('react').LazyExoticComponent<(<Key extends string, TData extends Record<Key, unknown>>(props: import('..').TableProps<Key, TData>) => import("react/jsx-runtime").JSX.Element)>;
18
18
  readonly conditionBlock: import('react').LazyExoticComponent<(<WithImages extends boolean>({ headline, classes, conditions, conditionsWithCTA }: import('../conditionBlock/ConditionBlock').ConditionBlockClassesProps<WithImages>) => import("react/jsx-runtime").JSX.Element)>;
19
+ readonly carouselBlock: import('react').LazyExoticComponent<(<V extends import('../../shared/ui').SlideVariant>(props: import('..').CarouselBlockProps<V>) => import("react/jsx-runtime").JSX.Element)>;
19
20
  readonly errorPage: import('react').LazyExoticComponent<({ errorText, title, subtitle, buttonProps, links, images, backgroundColor }: import('..').ErrorPageProps) => import("react/jsx-runtime").JSX.Element>;
20
21
  };
21
22
  export declare const KEYS_OF_WIDGET_LIST: readonly AllowedWidgets[];
22
- export declare const widgetIds: Record<"footer" | "header" | "seoHeader" | "banner" | "calculator" | "form" | "formDialog" | "stepper" | "benefit" | "longBanner" | "usefulInfo" | "interLinking" | "infoBlock" | "userFeedback" | "infoTable" | "conditionBlock" | "errorPage", "footer" | "header" | "seoHeader" | "banner" | "calculator" | "form" | "formDialog" | "stepper" | "benefit" | "longBanner" | "usefulInfo" | "interLinking" | "infoBlock" | "userFeedback" | "infoTable" | "conditionBlock" | "errorPage">;
23
+ export declare const widgetIds: Record<"footer" | "header" | "seoHeader" | "banner" | "calculator" | "form" | "formDialog" | "stepper" | "benefit" | "longBanner" | "usefulInfo" | "interLinking" | "infoBlock" | "userFeedback" | "infoTable" | "conditionBlock" | "carouselBlock" | "errorPage", "footer" | "header" | "seoHeader" | "banner" | "calculator" | "form" | "formDialog" | "stepper" | "benefit" | "longBanner" | "usefulInfo" | "interLinking" | "infoBlock" | "userFeedback" | "infoTable" | "conditionBlock" | "carouselBlock" | "errorPage">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scbt-ecom/ui",
3
- "version": "0.153.7",
3
+ "version": "0.153.9",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {