@smg-automotive/components 25.11.0-dgajin-vsst-4352-migrate-carousel.2 → 25.11.0-dgajin-vsst-4352-migrate-carousel.3

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 (30) hide show
  1. package/dist/cjs/components/carousel/DotsPagination.d.ts +1 -1
  2. package/dist/cjs/components/carousel/DotsPagination.d.ts.map +1 -1
  3. package/dist/cjs/components/carousel/DotsPaginationIndicator.d.ts.map +1 -1
  4. package/dist/cjs/components/carousel/NumbersPaginationButton.d.ts.map +1 -1
  5. package/dist/cjs/index.js +26 -25
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/themes/shared/index.d.ts +1 -1
  8. package/dist/cjs/themes/shared/slotRecipes/carousel.d.ts +1 -1
  9. package/dist/cjs/themes/shared/slotRecipes/carousel.d.ts.map +1 -1
  10. package/dist/cjs/themes/shared/slotRecipes/index.d.ts +1 -1
  11. package/dist/esm/components/carousel/DotsPagination.d.ts +1 -1
  12. package/dist/esm/components/carousel/DotsPagination.d.ts.map +1 -1
  13. package/dist/esm/components/carousel/DotsPagination.js +2 -2
  14. package/dist/esm/components/carousel/DotsPagination.js.map +1 -1
  15. package/dist/esm/components/carousel/DotsPaginationIndicator.d.ts.map +1 -1
  16. package/dist/esm/components/carousel/DotsPaginationIndicator.js +1 -3
  17. package/dist/esm/components/carousel/DotsPaginationIndicator.js.map +1 -1
  18. package/dist/esm/components/carousel/NumbersPaginationButton.d.ts.map +1 -1
  19. package/dist/esm/components/carousel/NumbersPaginationButton.js +1 -3
  20. package/dist/esm/components/carousel/NumbersPaginationButton.js.map +1 -1
  21. package/dist/esm/components/carousel/index.js +2 -2
  22. package/dist/esm/components/carousel/index.js.map +1 -1
  23. package/dist/esm/themes/shared/index.d.ts +1 -1
  24. package/dist/esm/themes/shared/slotRecipes/carousel.d.ts +1 -1
  25. package/dist/esm/themes/shared/slotRecipes/carousel.d.ts.map +1 -1
  26. package/dist/esm/themes/shared/slotRecipes/carousel.js +22 -18
  27. package/dist/esm/themes/shared/slotRecipes/carousel.js.map +1 -1
  28. package/dist/esm/themes/shared/slotRecipes/index.d.ts +1 -1
  29. package/dist/index.d.ts +5 -5
  30. package/package.json +1 -1
@@ -3,6 +3,6 @@ interface Props {
3
3
  currentSlideIndex: number;
4
4
  numberOfSlides: number;
5
5
  }
6
- export declare const NumbersDotsPagination: FC<Props>;
6
+ export declare const DotsPagination: FC<Props>;
7
7
  export {};
8
8
  //# sourceMappingURL=DotsPagination.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DotsPagination.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/DotsPagination.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQlC,UAAU,KAAK;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,KAAK,CAoB3C,CAAC"}
1
+ {"version":3,"file":"DotsPagination.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/DotsPagination.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQlC,UAAU,KAAK;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,KAAK,CAoBpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DotsPaginationIndicator.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/DotsPaginationIndicator.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,eAAe;IACvB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,eAAe,CAavD,CAAC"}
1
+ {"version":3,"file":"DotsPaginationIndicator.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/DotsPaginationIndicator.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,eAAe;IACvB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,eAAe,CAUvD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"NumbersPaginationButton.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/NumbersPaginationButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,KAAK,CAuB7C,CAAC"}
1
+ {"version":3,"file":"NumbersPaginationButton.d.ts","sourceRoot":"","sources":["../../../../src/components/carousel/NumbersPaginationButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,KAAK,CAmB7C,CAAC"}
package/dist/cjs/index.js CHANGED
@@ -2535,9 +2535,7 @@ var slots = [
2535
2535
  'paginationIconContainer',
2536
2536
  'dotsPaginationContainer',
2537
2537
  'dotsPaginationIndicator',
2538
- 'dotsPaginationIndicatorActive',
2539
2538
  'numbersPaginationButton',
2540
- 'numbersPaginationButtonActive',
2541
2539
  ];
2542
2540
  var baseContainer = react$1.defineStyle({
2543
2541
  height: 'full',
@@ -2608,10 +2606,14 @@ var numbersPaginationButton = react$1.defineStyle({
2608
2606
  _hover: {
2609
2607
  backgroundColor: 'gray.100',
2610
2608
  },
2611
- });
2612
- var numbersPaginationButtonActive = react$1.defineStyle(__assign(__assign({}, numbersPaginationButton), { color: 'white', backgroundColor: 'gray.900', _hover: {
2609
+ '&[aria-current="true"]': {
2610
+ color: 'white',
2613
2611
  backgroundColor: 'gray.900',
2614
- } }));
2612
+ _hover: {
2613
+ backgroundColor: 'gray.900',
2614
+ },
2615
+ },
2616
+ });
2615
2617
  var dotsPaginationIndicator = react$1.defineStyle({
2616
2618
  backgroundColor: 'transparent',
2617
2619
  touchAction: 'pan-x',
@@ -2639,23 +2641,28 @@ var dotsPaginationIndicator = react$1.defineStyle({
2639
2641
  height: 'var(--carousel-dot-size)',
2640
2642
  content: '""',
2641
2643
  },
2642
- });
2643
- var dotsPaginationIndicatorActive = react$1.defineStyle(__assign(__assign({}, dotsPaginationIndicator), { width: 'var(--carousel-dot-size-active)', height: 'var(--carousel-dot-size-active)', _last: {
2644
+ '&[aria-current="true"]': {
2644
2645
  width: 'var(--carousel-dot-size-active)',
2645
2646
  height: 'var(--carousel-dot-size-active)',
2647
+ _last: {
2648
+ width: 'var(--carousel-dot-size-active)',
2649
+ height: 'var(--carousel-dot-size-active)',
2650
+ _after: {
2651
+ width: 'full',
2652
+ height: 'var(--carousel-dot-size-active)',
2653
+ content: '""',
2654
+ },
2655
+ },
2646
2656
  _after: {
2657
+ backgroundColor: 'white',
2658
+ borderRadius: 'full',
2659
+ opacity: '100',
2647
2660
  width: 'full',
2648
2661
  height: 'var(--carousel-dot-size-active)',
2649
2662
  content: '""',
2650
2663
  },
2651
- }, _after: {
2652
- backgroundColor: 'white',
2653
- borderRadius: 'full',
2654
- opacity: '100',
2655
- width: 'full',
2656
- height: 'var(--carousel-dot-size-active)',
2657
- content: '""',
2658
- } }));
2664
+ },
2665
+ });
2659
2666
  var fullScreenVariant = {
2660
2667
  container: react$1.defineStyle({
2661
2668
  backgroundColor: 'black',
@@ -2727,7 +2734,6 @@ var carouselRecipe = react$1.defineSlotRecipe({
2727
2734
  button: baseButton,
2728
2735
  icon: baseIcon,
2729
2736
  numbersPaginationButton: numbersPaginationButton,
2730
- numbersPaginationButtonActive: numbersPaginationButtonActive,
2731
2737
  dotsPaginationContainer: react$1.defineStyle({
2732
2738
  position: 'absolute',
2733
2739
  width: 'full',
@@ -2737,7 +2743,6 @@ var carouselRecipe = react$1.defineSlotRecipe({
2737
2743
  alignItems: 'center',
2738
2744
  }),
2739
2745
  dotsPaginationIndicator: dotsPaginationIndicator,
2740
- dotsPaginationIndicatorActive: dotsPaginationIndicatorActive,
2741
2746
  },
2742
2747
  variants: {
2743
2748
  variant: {
@@ -11279,9 +11284,7 @@ var NumbersPaginationButton = function (_a) {
11279
11284
  var onClick = _a.onClick, isCurrent = _a.isCurrent, currentPageNumber = _a.currentPageNumber, totalNumbers = _a.totalNumbers;
11280
11285
  var recipe = react$1.useSlotRecipe({ key: 'carousel' });
11281
11286
  var styles = recipe();
11282
- return (React.createElement(react$1.chakra.button, { css: isCurrent
11283
- ? styles.numbersPaginationButtonActive
11284
- : styles.numbersPaginationButton, onClick: onClick, "aria-current": isCurrent, "aria-label": "numbers pagination ".concat(currentPageNumber, " of ").concat(totalNumbers) }, currentPageNumber));
11287
+ return (React.createElement(react$1.chakra.button, { css: styles.numbersPaginationButton, onClick: onClick, "aria-current": isCurrent, "aria-label": "numbers pagination ".concat(currentPageNumber, " of ").concat(totalNumbers) }, currentPageNumber));
11285
11288
  };
11286
11289
 
11287
11290
  var NumbersPagination = function (_a) {
@@ -11313,12 +11316,10 @@ var DotsPaginationIndicator = function (_a) {
11313
11316
  var isCurrent = _a.isCurrent;
11314
11317
  var recipe = react$1.useSlotRecipe({ key: 'carousel' });
11315
11318
  var styles = recipe();
11316
- return (React.createElement(react$1.chakra.span, { css: isCurrent
11317
- ? styles.dotsPaginationIndicatorActive
11318
- : styles.dotsPaginationIndicator }));
11319
+ return (React.createElement(react$1.chakra.span, { "aria-current": isCurrent, css: styles.dotsPaginationIndicator }));
11319
11320
  };
11320
11321
 
11321
- var NumbersDotsPagination = function (_a) {
11322
+ var DotsPagination = function (_a) {
11322
11323
  var currentSlideIndex = _a.currentSlideIndex, numberOfSlides = _a.numberOfSlides;
11323
11324
  var pagination = Array.from({ length: numberOfSlides }, function (_, i) { return i; });
11324
11325
  var recipe = react$1.useSlotRecipe({ key: 'carousel' });
@@ -11455,7 +11456,7 @@ var Carousel = function (props) {
11455
11456
  React.createElement(Flex, { css: styles.slideContainer, marginLeft: slidesPerView === 1 ? '0' : { base: '-md', md: '-2xl' } }, props.children.map(function (slide, index) { return (React.createElement(Slide, { key: "slide-".concat(index), slideIndex: index, onClick: function () { return onClick(index); }, totalSlides: numberOfSlides, isCurrent: index === selectedIndex, fullScreen: !!fullScreen, slidesPerView: slidesPerView }, isFullScreenSlide(slide) ? slide.slide : slide)); })),
11456
11457
  canScrollPrevious ? (React.createElement(NavigationButton, { onClick: scrollPrev, direction: "previous", fullScreen: !!fullScreen, isHovered: isHovered || (!!fullScreen && !isSmallLandscapeViewport) })) : null,
11457
11458
  canScrollNext ? (React.createElement(NavigationButton, { onClick: scrollNext, direction: "next", fullScreen: !!fullScreen, isHovered: isHovered || (!!fullScreen && !isSmallLandscapeViewport) })) : null,
11458
- paginationType === exports.PaginationType.Dot ? (React.createElement(NumbersDotsPagination, { currentSlideIndex: selectedIndex, numberOfSlides: props.children.length })) : null)),
11459
+ paginationType === exports.PaginationType.Dot ? (React.createElement(DotsPagination, { currentSlideIndex: selectedIndex, numberOfSlides: props.children.length })) : null)),
11459
11460
  hasThumbnailPagination ? (React.createElement(ThumbnailPagination, { currentSlideIndex: selectedIndex, thumbnails: props.children.map(function (slide) { return slide.thumbnail; }), mainCarousel: mainCarousel, paginationCarousel: paginationCarousel, paginationCarouselRef: paginationCarouselRef })) : null,
11460
11461
  paginationType === exports.PaginationType.Number ? (React.createElement(NumbersPagination, { mainCarousel: mainCarousel, currentSlideIndex: selectedIndex, numberOfSlides: props.children.length })) : null));
11461
11462
  };