@salutejs/plasma-new-hope 0.326.0-canary.2013.15538813402.0 → 0.326.0-canary.2015.15553048256.0
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/cjs/components/Carousel/Carousel.css +4 -0
- package/cjs/components/Carousel/{CarouselOld/Carousel.js → Carousel.js} +1 -1
- package/cjs/components/Carousel/Carousel.js.map +1 -0
- package/cjs/components/Carousel/{CarouselOld/Carousel.styles.js → Carousel.styles.js} +9 -9
- package/cjs/components/Carousel/Carousel.styles.js.map +1 -0
- package/cjs/components/Carousel/Carousel.styles_zmchjj.css +4 -0
- package/cjs/components/Carousel/{CarouselOld/CarouselItem.js → CarouselItem.js} +5 -5
- package/cjs/components/Carousel/CarouselItem.js.map +1 -0
- package/cjs/components/Carousel/CarouselItem_cqjszm.css +1 -0
- package/cjs/components/Carousel/useCarousel.js.map +1 -0
- package/cjs/components/Carousel/{CarouselOld/useDragScroll.js → useDragScroll.js} +1 -1
- package/cjs/components/Carousel/useDragScroll.js.map +1 -0
- package/cjs/index.css +4 -18
- package/cjs/index.js +3 -10
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Carousel/Carousel.styles.js +49 -0
- package/emotion/cjs/components/Carousel/{CarouselOld/CarouselItem.js → CarouselItem.js} +2 -2
- package/emotion/cjs/components/Carousel/index.js +3 -23
- package/emotion/cjs/examples/plasma_b2c/components/Carousel/Carousel.config.js +2 -14
- package/emotion/cjs/examples/plasma_b2c/components/Carousel/Carousel.js +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Carousel/Carousel.stories.tsx +30 -83
- package/emotion/cjs/hooks/index.js +0 -7
- package/emotion/es/components/Carousel/Carousel.styles.js +42 -0
- package/emotion/es/components/Carousel/{CarouselOld/CarouselItem.js → CarouselItem.js} +2 -2
- package/emotion/es/components/Carousel/index.js +3 -7
- package/emotion/es/examples/plasma_b2c/components/Carousel/Carousel.config.js +2 -14
- package/emotion/es/examples/plasma_b2c/components/Carousel/Carousel.js +2 -2
- package/emotion/es/examples/plasma_b2c/components/Carousel/Carousel.stories.tsx +30 -83
- package/emotion/es/hooks/index.js +0 -1
- package/es/components/Carousel/Carousel.css +4 -0
- package/es/components/Carousel/{CarouselOld/Carousel.js → Carousel.js} +1 -1
- package/es/components/Carousel/Carousel.js.map +1 -0
- package/es/components/Carousel/{CarouselOld/Carousel.styles.js → Carousel.styles.js} +9 -9
- package/es/components/Carousel/Carousel.styles.js.map +1 -0
- package/es/components/Carousel/Carousel.styles_zmchjj.css +4 -0
- package/es/components/Carousel/{CarouselOld/CarouselItem.js → CarouselItem.js} +5 -5
- package/es/components/Carousel/CarouselItem.js.map +1 -0
- package/es/components/Carousel/CarouselItem_cqjszm.css +1 -0
- package/es/components/Carousel/useCarousel.js.map +1 -0
- package/es/components/Carousel/{CarouselOld/useDragScroll.js → useDragScroll.js} +1 -1
- package/es/components/Carousel/useDragScroll.js.map +1 -0
- package/es/index.css +4 -18
- package/es/index.js +3 -6
- package/es/index.js.map +1 -1
- package/package.json +5 -5
- package/styled-components/cjs/components/Carousel/{CarouselOld/Carousel.styles.js → Carousel.styles.js} +3 -3
- package/styled-components/cjs/components/Carousel/{CarouselOld/CarouselItem.js → CarouselItem.js} +1 -1
- package/styled-components/cjs/components/Carousel/index.js +3 -23
- package/styled-components/cjs/examples/plasma_b2c/components/Carousel/Carousel.config.js +2 -14
- package/styled-components/cjs/examples/plasma_b2c/components/Carousel/Carousel.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Carousel/Carousel.stories.tsx +30 -83
- package/styled-components/cjs/hooks/index.js +0 -7
- package/styled-components/es/components/Carousel/{CarouselOld/Carousel.styles.js → Carousel.styles.js} +3 -3
- package/styled-components/es/components/Carousel/{CarouselOld/CarouselItem.js → CarouselItem.js} +1 -1
- package/styled-components/es/components/Carousel/index.js +3 -7
- package/styled-components/es/examples/plasma_b2c/components/Carousel/Carousel.config.js +2 -14
- package/styled-components/es/examples/plasma_b2c/components/Carousel/Carousel.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Carousel/Carousel.stories.tsx +30 -83
- package/styled-components/es/hooks/index.js +0 -1
- package/types/components/Carousel/{CarouselOld/Carousel.d.ts → Carousel.d.ts} +1 -1
- package/types/components/Carousel/Carousel.d.ts.map +1 -0
- package/types/components/Carousel/Carousel.styles.d.ts.map +1 -0
- package/types/components/Carousel/{CarouselOld/Carousel.types.d.ts → Carousel.types.d.ts} +1 -1
- package/types/components/Carousel/Carousel.types.d.ts.map +1 -0
- package/types/components/Carousel/CarouselItem.d.ts.map +1 -0
- package/types/components/Carousel/index.d.ts +4 -7
- package/types/components/Carousel/index.d.ts.map +1 -1
- package/types/components/Carousel/useCarousel.d.ts.map +1 -0
- package/types/components/Carousel/useDragScroll.d.ts.map +1 -0
- package/types/hooks/index.d.ts +0 -1
- package/types/hooks/index.d.ts.map +1 -1
- package/cjs/components/Carousel/CarouselNew/Carousel.css +0 -43
- package/cjs/components/Carousel/CarouselNew/Carousel.js +0 -113
- package/cjs/components/Carousel/CarouselNew/Carousel.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/Carousel.styles.js +0 -52
- package/cjs/components/Carousel/CarouselNew/Carousel.styles.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/Carousel.styles_1fs4wwn.css +0 -5
- package/cjs/components/Carousel/CarouselNew/Carousel.tokens.js +0 -24
- package/cjs/components/Carousel/CarouselNew/Carousel.tokens.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/hooks/useCarousel.js +0 -428
- package/cjs/components/Carousel/CarouselNew/hooks/useCarousel.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/hooks/useDragScroll.js +0 -62
- package/cjs/components/Carousel/CarouselNew/hooks/useDragScroll.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.css +0 -5
- package/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.js +0 -227
- package/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.styles.js +0 -39
- package/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.styles.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.styles_ea836d.css +0 -5
- package/cjs/components/Carousel/CarouselNew/ui/Dots/utils/index.js +0 -50
- package/cjs/components/Carousel/CarouselNew/ui/Dots/utils/index.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/variations/_size/base.js +0 -9
- package/cjs/components/Carousel/CarouselNew/variations/_size/base.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Carousel/CarouselNew/variations/_view/base.js +0 -9
- package/cjs/components/Carousel/CarouselNew/variations/_view/base.js.map +0 -1
- package/cjs/components/Carousel/CarouselNew/variations/_view/base_x642ct.css +0 -1
- package/cjs/components/Carousel/CarouselOld/Carousel.css +0 -4
- package/cjs/components/Carousel/CarouselOld/Carousel.js.map +0 -1
- package/cjs/components/Carousel/CarouselOld/Carousel.styles.js.map +0 -1
- package/cjs/components/Carousel/CarouselOld/Carousel.styles_12r304j.css +0 -4
- package/cjs/components/Carousel/CarouselOld/CarouselItem.js.map +0 -1
- package/cjs/components/Carousel/CarouselOld/CarouselItem_uvoxfy.css +0 -1
- package/cjs/components/Carousel/CarouselOld/useCarousel.js.map +0 -1
- package/cjs/components/Carousel/CarouselOld/useDragScroll.js.map +0 -1
- package/cjs/hooks/useDidMountLayoutEffect.js +0 -19
- package/cjs/hooks/useDidMountLayoutEffect.js.map +0 -1
- package/emotion/cjs/components/Carousel/CarouselNew/Carousel.js +0 -112
- package/emotion/cjs/components/Carousel/CarouselNew/Carousel.styles.js +0 -59
- package/emotion/cjs/components/Carousel/CarouselNew/Carousel.tokens.js +0 -22
- package/emotion/cjs/components/Carousel/CarouselNew/hooks/useCarousel.js +0 -419
- package/emotion/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.js +0 -229
- package/emotion/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.styles.js +0 -38
- package/emotion/cjs/components/Carousel/CarouselNew/ui/Dots/utils/index.js +0 -47
- package/emotion/cjs/components/Carousel/CarouselNew/ui/Item/Item.js +0 -38
- package/emotion/cjs/components/Carousel/CarouselNew/ui/index.js +0 -27
- package/emotion/cjs/components/Carousel/CarouselNew/variations/_size/base.js +0 -8
- package/emotion/cjs/components/Carousel/CarouselNew/variations/_size/tokens.json +0 -1
- package/emotion/cjs/components/Carousel/CarouselNew/variations/_view/base.js +0 -8
- package/emotion/cjs/components/Carousel/CarouselNew/variations/_view/tokens.json +0 -1
- package/emotion/cjs/components/Carousel/CarouselOld/Carousel.styles.js +0 -49
- package/emotion/cjs/components/Carousel/CarouselOld/index.js +0 -32
- package/emotion/cjs/hooks/useDidMountLayoutEffect.js +0 -17
- package/emotion/es/components/Carousel/CarouselNew/Carousel.js +0 -104
- package/emotion/es/components/Carousel/CarouselNew/Carousel.styles.js +0 -52
- package/emotion/es/components/Carousel/CarouselNew/Carousel.tokens.js +0 -16
- package/emotion/es/components/Carousel/CarouselNew/hooks/useCarousel.js +0 -409
- package/emotion/es/components/Carousel/CarouselNew/ui/Dots/Dots.js +0 -219
- package/emotion/es/components/Carousel/CarouselNew/ui/Dots/Dots.styles.js +0 -31
- package/emotion/es/components/Carousel/CarouselNew/ui/Dots/utils/index.js +0 -41
- package/emotion/es/components/Carousel/CarouselNew/ui/Item/Item.js +0 -31
- package/emotion/es/components/Carousel/CarouselNew/ui/index.js +0 -2
- package/emotion/es/components/Carousel/CarouselNew/variations/_size/base.js +0 -2
- package/emotion/es/components/Carousel/CarouselNew/variations/_size/tokens.json +0 -1
- package/emotion/es/components/Carousel/CarouselNew/variations/_view/base.js +0 -2
- package/emotion/es/components/Carousel/CarouselNew/variations/_view/tokens.json +0 -1
- package/emotion/es/components/Carousel/CarouselOld/Carousel.styles.js +0 -42
- package/emotion/es/components/Carousel/CarouselOld/index.js +0 -3
- package/emotion/es/hooks/useDidMountLayoutEffect.js +0 -11
- package/es/components/Carousel/CarouselNew/Carousel.css +0 -43
- package/es/components/Carousel/CarouselNew/Carousel.js +0 -104
- package/es/components/Carousel/CarouselNew/Carousel.js.map +0 -1
- package/es/components/Carousel/CarouselNew/Carousel.styles.js +0 -43
- package/es/components/Carousel/CarouselNew/Carousel.styles.js.map +0 -1
- package/es/components/Carousel/CarouselNew/Carousel.styles_1fs4wwn.css +0 -5
- package/es/components/Carousel/CarouselNew/Carousel.tokens.js +0 -19
- package/es/components/Carousel/CarouselNew/Carousel.tokens.js.map +0 -1
- package/es/components/Carousel/CarouselNew/hooks/useCarousel.js +0 -413
- package/es/components/Carousel/CarouselNew/hooks/useCarousel.js.map +0 -1
- package/es/components/Carousel/CarouselNew/hooks/useDragScroll.js +0 -58
- package/es/components/Carousel/CarouselNew/hooks/useDragScroll.js.map +0 -1
- package/es/components/Carousel/CarouselNew/ui/Dots/Dots.css +0 -5
- package/es/components/Carousel/CarouselNew/ui/Dots/Dots.js +0 -218
- package/es/components/Carousel/CarouselNew/ui/Dots/Dots.js.map +0 -1
- package/es/components/Carousel/CarouselNew/ui/Dots/Dots.styles.js +0 -31
- package/es/components/Carousel/CarouselNew/ui/Dots/Dots.styles.js.map +0 -1
- package/es/components/Carousel/CarouselNew/ui/Dots/Dots.styles_ea836d.css +0 -5
- package/es/components/Carousel/CarouselNew/ui/Dots/utils/index.js +0 -44
- package/es/components/Carousel/CarouselNew/ui/Dots/utils/index.js.map +0 -1
- package/es/components/Carousel/CarouselNew/variations/_size/base.js +0 -5
- package/es/components/Carousel/CarouselNew/variations/_size/base.js.map +0 -1
- package/es/components/Carousel/CarouselNew/variations/_size/base_x642ct.css +0 -1
- package/es/components/Carousel/CarouselNew/variations/_view/base.js +0 -5
- package/es/components/Carousel/CarouselNew/variations/_view/base.js.map +0 -1
- package/es/components/Carousel/CarouselNew/variations/_view/base_x642ct.css +0 -1
- package/es/components/Carousel/CarouselOld/Carousel.css +0 -4
- package/es/components/Carousel/CarouselOld/Carousel.js.map +0 -1
- package/es/components/Carousel/CarouselOld/Carousel.styles.js.map +0 -1
- package/es/components/Carousel/CarouselOld/Carousel.styles_12r304j.css +0 -4
- package/es/components/Carousel/CarouselOld/CarouselItem.js.map +0 -1
- package/es/components/Carousel/CarouselOld/CarouselItem_uvoxfy.css +0 -1
- package/es/components/Carousel/CarouselOld/useCarousel.js.map +0 -1
- package/es/components/Carousel/CarouselOld/useDragScroll.js.map +0 -1
- package/es/hooks/useDidMountLayoutEffect.js +0 -15
- package/es/hooks/useDidMountLayoutEffect.js.map +0 -1
- package/styled-components/cjs/components/Carousel/CarouselNew/Carousel.js +0 -112
- package/styled-components/cjs/components/Carousel/CarouselNew/Carousel.styles.js +0 -31
- package/styled-components/cjs/components/Carousel/CarouselNew/Carousel.tokens.js +0 -22
- package/styled-components/cjs/components/Carousel/CarouselNew/Carousel.types.js +0 -5
- package/styled-components/cjs/components/Carousel/CarouselNew/hooks/useCarousel.js +0 -419
- package/styled-components/cjs/components/Carousel/CarouselNew/hooks/useDragScroll.js +0 -65
- package/styled-components/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.js +0 -229
- package/styled-components/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.styles.js +0 -24
- package/styled-components/cjs/components/Carousel/CarouselNew/ui/Dots/utils/index.js +0 -47
- package/styled-components/cjs/components/Carousel/CarouselNew/ui/Item/Item.js +0 -37
- package/styled-components/cjs/components/Carousel/CarouselNew/ui/index.js +0 -27
- package/styled-components/cjs/components/Carousel/CarouselNew/variations/_size/base.js +0 -8
- package/styled-components/cjs/components/Carousel/CarouselNew/variations/_size/tokens.json +0 -1
- package/styled-components/cjs/components/Carousel/CarouselNew/variations/_view/base.js +0 -8
- package/styled-components/cjs/components/Carousel/CarouselNew/variations/_view/tokens.json +0 -1
- package/styled-components/cjs/components/Carousel/CarouselOld/Carousel.types.js +0 -5
- package/styled-components/cjs/components/Carousel/CarouselOld/index.js +0 -32
- package/styled-components/cjs/components/Carousel/CarouselOld/useDragScroll.js +0 -65
- package/styled-components/cjs/hooks/useDidMountLayoutEffect.js +0 -17
- package/styled-components/es/components/Carousel/CarouselNew/Carousel.js +0 -104
- package/styled-components/es/components/Carousel/CarouselNew/Carousel.styles.js +0 -23
- package/styled-components/es/components/Carousel/CarouselNew/Carousel.tokens.js +0 -16
- package/styled-components/es/components/Carousel/CarouselNew/Carousel.types.js +0 -1
- package/styled-components/es/components/Carousel/CarouselNew/hooks/useCarousel.js +0 -409
- package/styled-components/es/components/Carousel/CarouselNew/hooks/useDragScroll.js +0 -59
- package/styled-components/es/components/Carousel/CarouselNew/ui/Dots/Dots.js +0 -219
- package/styled-components/es/components/Carousel/CarouselNew/ui/Dots/Dots.styles.js +0 -17
- package/styled-components/es/components/Carousel/CarouselNew/ui/Dots/utils/index.js +0 -41
- package/styled-components/es/components/Carousel/CarouselNew/ui/Item/Item.js +0 -30
- package/styled-components/es/components/Carousel/CarouselNew/ui/index.js +0 -2
- package/styled-components/es/components/Carousel/CarouselNew/variations/_size/base.js +0 -2
- package/styled-components/es/components/Carousel/CarouselNew/variations/_size/tokens.json +0 -1
- package/styled-components/es/components/Carousel/CarouselNew/variations/_view/base.js +0 -2
- package/styled-components/es/components/Carousel/CarouselNew/variations/_view/tokens.json +0 -1
- package/styled-components/es/components/Carousel/CarouselOld/Carousel.types.js +0 -1
- package/styled-components/es/components/Carousel/CarouselOld/index.js +0 -3
- package/styled-components/es/components/Carousel/CarouselOld/useDragScroll.js +0 -59
- package/styled-components/es/hooks/useDidMountLayoutEffect.js +0 -11
- package/types/components/Carousel/CarouselNew/Carousel.d.ts +0 -26
- package/types/components/Carousel/CarouselNew/Carousel.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/Carousel.styles.d.ts +0 -94
- package/types/components/Carousel/CarouselNew/Carousel.styles.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/Carousel.tokens.d.ts +0 -17
- package/types/components/Carousel/CarouselNew/Carousel.tokens.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/Carousel.types.d.ts +0 -122
- package/types/components/Carousel/CarouselNew/Carousel.types.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/hooks/useCarousel.d.ts +0 -65
- package/types/components/Carousel/CarouselNew/hooks/useCarousel.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/hooks/useDragScroll.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/ui/Dots/Dots.d.ts +0 -4
- package/types/components/Carousel/CarouselNew/ui/Dots/Dots.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/ui/Dots/Dots.styles.d.ts +0 -6
- package/types/components/Carousel/CarouselNew/ui/Dots/Dots.styles.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/ui/Dots/utils/index.d.ts +0 -4
- package/types/components/Carousel/CarouselNew/ui/Dots/utils/index.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/ui/Item/Item.d.ts +0 -4
- package/types/components/Carousel/CarouselNew/ui/Item/Item.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/ui/index.d.ts +0 -3
- package/types/components/Carousel/CarouselNew/ui/index.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/variations/_size/base.d.ts +0 -2
- package/types/components/Carousel/CarouselNew/variations/_size/base.d.ts.map +0 -1
- package/types/components/Carousel/CarouselNew/variations/_view/base.d.ts +0 -2
- package/types/components/Carousel/CarouselNew/variations/_view/base.d.ts.map +0 -1
- package/types/components/Carousel/CarouselOld/Carousel.d.ts.map +0 -1
- package/types/components/Carousel/CarouselOld/Carousel.styles.d.ts.map +0 -1
- package/types/components/Carousel/CarouselOld/Carousel.types.d.ts.map +0 -1
- package/types/components/Carousel/CarouselOld/CarouselItem.d.ts.map +0 -1
- package/types/components/Carousel/CarouselOld/index.d.ts +0 -5
- package/types/components/Carousel/CarouselOld/index.d.ts.map +0 -1
- package/types/components/Carousel/CarouselOld/useCarousel.d.ts.map +0 -1
- package/types/components/Carousel/CarouselOld/useDragScroll.d.ts +0 -2
- package/types/components/Carousel/CarouselOld/useDragScroll.d.ts.map +0 -1
- package/types/hooks/useDidMountLayoutEffect.d.ts +0 -2
- package/types/hooks/useDidMountLayoutEffect.d.ts.map +0 -1
- /package/cjs/components/Carousel/{CarouselOld/useCarousel.js → useCarousel.js} +0 -0
- /package/emotion/cjs/components/Carousel/{CarouselOld/Carousel.js → Carousel.js} +0 -0
- /package/emotion/cjs/components/Carousel/{CarouselNew/Carousel.types.js → Carousel.types.js} +0 -0
- /package/emotion/cjs/components/Carousel/{CarouselOld/useCarousel.js → useCarousel.js} +0 -0
- /package/emotion/cjs/components/Carousel/{CarouselNew/hooks/useDragScroll.js → useDragScroll.js} +0 -0
- /package/emotion/es/components/Carousel/{CarouselOld/Carousel.js → Carousel.js} +0 -0
- /package/emotion/es/components/Carousel/{CarouselNew/Carousel.types.js → Carousel.types.js} +0 -0
- /package/emotion/es/components/Carousel/{CarouselOld/useCarousel.js → useCarousel.js} +0 -0
- /package/emotion/es/components/Carousel/{CarouselNew/hooks/useDragScroll.js → useDragScroll.js} +0 -0
- /package/es/components/Carousel/{CarouselOld/useCarousel.js → useCarousel.js} +0 -0
- /package/styled-components/cjs/components/Carousel/{CarouselOld/Carousel.js → Carousel.js} +0 -0
- /package/{emotion/cjs/components/Carousel/CarouselOld → styled-components/cjs/components/Carousel}/Carousel.types.js +0 -0
- /package/styled-components/cjs/components/Carousel/{CarouselOld/useCarousel.js → useCarousel.js} +0 -0
- /package/{emotion/cjs/components/Carousel/CarouselOld → styled-components/cjs/components/Carousel}/useDragScroll.js +0 -0
- /package/styled-components/es/components/Carousel/{CarouselOld/Carousel.js → Carousel.js} +0 -0
- /package/{emotion/es/components/Carousel/CarouselOld → styled-components/es/components/Carousel}/Carousel.types.js +0 -0
- /package/styled-components/es/components/Carousel/{CarouselOld/useCarousel.js → useCarousel.js} +0 -0
- /package/{emotion/es/components/Carousel/CarouselOld → styled-components/es/components/Carousel}/useDragScroll.js +0 -0
- /package/types/components/Carousel/{CarouselOld/Carousel.styles.d.ts → Carousel.styles.d.ts} +0 -0
- /package/types/components/Carousel/{CarouselOld/CarouselItem.d.ts → CarouselItem.d.ts} +0 -0
- /package/types/components/Carousel/{CarouselOld/useCarousel.d.ts → useCarousel.d.ts} +0 -0
- /package/types/components/Carousel/{CarouselNew/hooks/useDragScroll.d.ts → useDragScroll.d.ts} +0 -0
@@ -1,219 +0,0 @@
|
|
1
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
4
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
7
|
-
import React, { memo, useRef, useLayoutEffect } from 'react';
|
8
|
-
import cls from 'classnames';
|
9
|
-
import { useDidMountLayoutEffect } from "../../../../../hooks";
|
10
|
-
import { classes } from "../../Carousel.tokens";
|
11
|
-
import { getActiveIndex, getTargetIndex, getInitialData } from "./utils/index";
|
12
|
-
import { Wrapper, DotWrapper, RightAnimationWrapper, LeftAnimationWrapper, TransitionWrapper } from "./Dots.styles";
|
13
|
-
var SIZE = 16; // размер точки в px
|
14
|
-
var ANIMATION_DURATION = 0.3; // скорость анимации в секундах
|
15
|
-
|
16
|
-
export var Dots = /*#__PURE__*/memo(function (_ref) {
|
17
|
-
var _ref$index = _ref.index,
|
18
|
-
originalIndex = _ref$index === void 0 ? 0 : _ref$index,
|
19
|
-
onChange = _ref.onChange,
|
20
|
-
_ref$centered = _ref.centered,
|
21
|
-
centered = _ref$centered === void 0 ? false : _ref$centered,
|
22
|
-
_ref$count = _ref.count,
|
23
|
-
count = _ref$count === void 0 ? 0 : _ref$count,
|
24
|
-
_ref$visibleCount = _ref.visibleCount,
|
25
|
-
originalVisibleCount = _ref$visibleCount === void 0 ? 0 : _ref$visibleCount;
|
26
|
-
// Трансформируем входные параметры для корректной работы в дальнейшем
|
27
|
-
var _getInitialData = getInitialData(originalIndex, count, originalVisibleCount),
|
28
|
-
_getInitialData2 = _slicedToArray(_getInitialData, 2),
|
29
|
-
index = _getInitialData2[0],
|
30
|
-
visibleCount = _getInitialData2[1];
|
31
|
-
|
32
|
-
// Рефки на DOM-ноды
|
33
|
-
var transitionWrapperRef = useRef(null);
|
34
|
-
var dotWrapperRef = useRef(null);
|
35
|
-
var leftAnimationWrapperRef = useRef(null);
|
36
|
-
var rightAnimationWrapperRef = useRef(null);
|
37
|
-
|
38
|
-
// Консистентные переменные
|
39
|
-
var isAnimating = useRef(false);
|
40
|
-
var prevIndex = useRef(-Infinity);
|
41
|
-
var prevActiveIndex = useRef(Infinity);
|
42
|
-
var isRightDirection = index > prevIndex.current;
|
43
|
-
var diffDotsRange = Math.abs(index - prevIndex.current);
|
44
|
-
var activeIndex = getActiveIndex(index, isRightDirection, count, visibleCount);
|
45
|
-
var hiddenDotsLeft = activeIndex < index;
|
46
|
-
var hiddenDotsRight = index + (visibleCount - 1 - activeIndex) < count - 1;
|
47
|
-
var handleClick = function handleClick(i) {
|
48
|
-
if (isAnimating.current) return;
|
49
|
-
if (onChange) {
|
50
|
-
onChange(index + (i - activeIndex));
|
51
|
-
}
|
52
|
-
};
|
53
|
-
var handleTransitionEnd = function handleTransitionEnd() {
|
54
|
-
if (!dotWrapperRef || !dotWrapperRef.current || !transitionWrapperRef || !transitionWrapperRef.current || !rightAnimationWrapperRef || !rightAnimationWrapperRef.current || !leftAnimationWrapperRef || !leftAnimationWrapperRef.current) {
|
55
|
-
return;
|
56
|
-
}
|
57
|
-
dotWrapperRef.current.classList.remove(classes.animating);
|
58
|
-
transitionWrapperRef.current.classList.remove(classes.animating);
|
59
|
-
Array.from(dotWrapperRef.current.children).forEach(function (child) {
|
60
|
-
var _child$classList;
|
61
|
-
(_child$classList = child.classList).remove.apply(_child$classList, [classes.active, classes.animateOut, classes.temporaryNatural, classes.shrinking]);
|
62
|
-
});
|
63
|
-
dotWrapperRef.current.children[activeIndex].classList.add(classes.active);
|
64
|
-
if (centered) {
|
65
|
-
transitionWrapperRef.current.style.transform = "translateX(".concat(visibleCount * SIZE / 2 - SIZE / 2 - activeIndex * SIZE, "px)");
|
66
|
-
} else {
|
67
|
-
transitionWrapperRef.current.style.transform = 'translateX(0)';
|
68
|
-
}
|
69
|
-
setTimeout(function () {
|
70
|
-
if (transitionWrapperRef && transitionWrapperRef.current) {
|
71
|
-
isAnimating.current = false;
|
72
|
-
}
|
73
|
-
});
|
74
|
-
|
75
|
-
// Очищаем блоки с анимированными точками
|
76
|
-
leftAnimationWrapperRef.current.innerText = '';
|
77
|
-
rightAnimationWrapperRef.current.innerText = '';
|
78
|
-
prevIndex.current = index;
|
79
|
-
prevActiveIndex.current = activeIndex;
|
80
|
-
isAnimating.current = false;
|
81
|
-
};
|
82
|
-
useLayoutEffect(function () {
|
83
|
-
if (!dotWrapperRef || !dotWrapperRef.current || !transitionWrapperRef || !transitionWrapperRef.current) {
|
84
|
-
return;
|
85
|
-
}
|
86
|
-
|
87
|
-
// Вычисляем начальный сдвиг по горизонтали, чтобы точка стала по центру
|
88
|
-
if (centered) {
|
89
|
-
transitionWrapperRef.current.style.transform = "translateX(".concat(visibleCount * SIZE / 2 - SIZE / 2 - activeIndex * SIZE, "px)");
|
90
|
-
}
|
91
|
-
prevIndex.current = index;
|
92
|
-
prevActiveIndex.current = activeIndex;
|
93
|
-
}, []);
|
94
|
-
useDidMountLayoutEffect(function () {
|
95
|
-
var _dotWrapperRef$curren;
|
96
|
-
if (!dotWrapperRef || !dotWrapperRef.current || !transitionWrapperRef || !transitionWrapperRef.current || !leftAnimationWrapperRef || !leftAnimationWrapperRef.current || !rightAnimationWrapperRef || !rightAnimationWrapperRef.current || isAnimating.current) {
|
97
|
-
return;
|
98
|
-
}
|
99
|
-
isAnimating.current = true;
|
100
|
-
dotWrapperRef.current.classList.add(classes.animating);
|
101
|
-
transitionWrapperRef.current.classList.add(classes.animating);
|
102
|
-
var targetIndex = getTargetIndex(index, prevIndex.current, prevActiveIndex.current, diffDotsRange);
|
103
|
-
var dotsToAdd = Math.abs(targetIndex - activeIndex);
|
104
|
-
if (centered) {
|
105
|
-
transitionWrapperRef.current.style.transform = "translateX(".concat(visibleCount * SIZE / 2 - SIZE / 2 - targetIndex * SIZE, "px)");
|
106
|
-
} else if (dotsToAdd > 0) {
|
107
|
-
transitionWrapperRef.current.style.transform = "translateX(".concat(-SIZE * (targetIndex - activeIndex), "px)");
|
108
|
-
}
|
109
|
-
|
110
|
-
// Стираем все активные классы и устанавливаем активный класс на таргет.
|
111
|
-
// В конце анимации произойдет переопределение активного класса.
|
112
|
-
Array.from(dotWrapperRef.current.children).forEach(function (child) {
|
113
|
-
child.classList.remove(classes.active);
|
114
|
-
});
|
115
|
-
(_dotWrapperRef$curren = dotWrapperRef.current.children[targetIndex]) === null || _dotWrapperRef$curren === void 0 || _dotWrapperRef$curren.classList.add(classes.active);
|
116
|
-
if (index > prevIndex.current) {
|
117
|
-
// Двигаемся вправо
|
118
|
-
|
119
|
-
// Если мы добавляем 1 и более точек, то нужно начать
|
120
|
-
// приводить размер крайней правой точки (что будет в m размере?)
|
121
|
-
// к натуральному размеру
|
122
|
-
if (dotsToAdd >= 1) {
|
123
|
-
var _dotWrapperRef$curren2;
|
124
|
-
(_dotWrapperRef$curren2 = dotWrapperRef.current.children[visibleCount - 1]) === null || _dotWrapperRef$curren2 === void 0 || _dotWrapperRef$curren2.classList.add(classes.temporaryNatural);
|
125
|
-
}
|
126
|
-
|
127
|
-
// Т.к. мы двигаемся вправо, то нужно начать уменьшать размер крайней левой точки
|
128
|
-
// (опять же, что в m size?)
|
129
|
-
if (dotsToAdd >= 1) {
|
130
|
-
var _dotWrapperRef$curren3;
|
131
|
-
(_dotWrapperRef$curren3 = dotWrapperRef.current.children[dotsToAdd]) === null || _dotWrapperRef$curren3 === void 0 || _dotWrapperRef$curren3.classList.add(classes.shrinking);
|
132
|
-
}
|
133
|
-
if (dotsToAdd > 0) {
|
134
|
-
var _loop = function _loop() {
|
135
|
-
var _dotWrapperRef$curren4;
|
136
|
-
var node = document.createElement('div');
|
137
|
-
node.textContent = '';
|
138
|
-
node.classList.add(classes.dot);
|
139
|
-
node.style.opacity = '0';
|
140
|
-
var delay = i * (ANIMATION_DURATION / dotsToAdd);
|
141
|
-
node.style.animationDelay = "".concat(delay, "s");
|
142
|
-
rightAnimationWrapperRef.current.appendChild(node);
|
143
|
-
var duration = ANIMATION_DURATION / dotsToAdd;
|
144
|
-
requestAnimationFrame(function () {
|
145
|
-
node.classList.add(classes.animateIn);
|
146
|
-
node.style.animationDuration = "".concat(duration, "s");
|
147
|
-
});
|
148
|
-
var currentDomNode = (_dotWrapperRef$curren4 = dotWrapperRef.current.children) === null || _dotWrapperRef$curren4 === void 0 ? void 0 : _dotWrapperRef$curren4[i];
|
149
|
-
currentDomNode === null || currentDomNode === void 0 || currentDomNode.classList.add(classes.animateOut);
|
150
|
-
currentDomNode.style.animationDelay = "".concat(delay, "s");
|
151
|
-
currentDomNode.style.animationDuration = "".concat(duration, "s");
|
152
|
-
};
|
153
|
-
for (var i = 0; i < dotsToAdd; i++) {
|
154
|
-
_loop();
|
155
|
-
}
|
156
|
-
}
|
157
|
-
} else {
|
158
|
-
// Двигаемся влево
|
159
|
-
|
160
|
-
// Если мы добавляем 1 и более точек, то нужно начать
|
161
|
-
// приводить размер крайней левой точки (что будет в m размере?)
|
162
|
-
// к натуральному размеру.
|
163
|
-
if (dotsToAdd >= 1) {
|
164
|
-
var _dotWrapperRef$curren5;
|
165
|
-
(_dotWrapperRef$curren5 = dotWrapperRef.current.children[0]) === null || _dotWrapperRef$curren5 === void 0 || _dotWrapperRef$curren5.classList.add(classes.temporaryNatural);
|
166
|
-
}
|
167
|
-
|
168
|
-
// Т.к. мы двигаемся влево, то нужно начать уменьшать размер крайней правой точки
|
169
|
-
// (опять же, что в m size?)
|
170
|
-
if (dotsToAdd >= 1) {
|
171
|
-
var _dotWrapperRef$curren6;
|
172
|
-
(_dotWrapperRef$curren6 = dotWrapperRef.current.children[visibleCount - 1 - dotsToAdd]) === null || _dotWrapperRef$curren6 === void 0 || _dotWrapperRef$curren6.classList.add(classes.shrinking);
|
173
|
-
}
|
174
|
-
if (dotsToAdd > 0) {
|
175
|
-
var _loop2 = function _loop2() {
|
176
|
-
var _dotWrapperRef$curren7;
|
177
|
-
var node = document.createElement('div');
|
178
|
-
node.textContent = '';
|
179
|
-
node.classList.add(classes.dot);
|
180
|
-
node.style.opacity = '0';
|
181
|
-
var delay = (dotsToAdd - 1 - _i) * (ANIMATION_DURATION / dotsToAdd);
|
182
|
-
node.style.animationDelay = "".concat(delay, "s");
|
183
|
-
leftAnimationWrapperRef.current.prepend(node);
|
184
|
-
var duration = ANIMATION_DURATION / dotsToAdd;
|
185
|
-
requestAnimationFrame(function () {
|
186
|
-
node.classList.add(classes.animateIn);
|
187
|
-
node.style.animationDuration = "".concat(duration, "s");
|
188
|
-
});
|
189
|
-
var currentDomNode = (_dotWrapperRef$curren7 = dotWrapperRef.current.children) === null || _dotWrapperRef$curren7 === void 0 ? void 0 : _dotWrapperRef$curren7[dotWrapperRef.current.children.length - 1 - _i];
|
190
|
-
currentDomNode === null || currentDomNode === void 0 || currentDomNode.classList.add(classes.animateOut);
|
191
|
-
currentDomNode.style.animationDelay = "".concat(_i * (ANIMATION_DURATION / dotsToAdd), "s");
|
192
|
-
currentDomNode.style.animationDuration = "".concat(duration, "s");
|
193
|
-
};
|
194
|
-
for (var _i = dotsToAdd - 1; _i >= 0; _i--) {
|
195
|
-
_loop2();
|
196
|
-
}
|
197
|
-
}
|
198
|
-
}
|
199
|
-
}, [index]);
|
200
|
-
return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(TransitionWrapper, {
|
201
|
-
ref: transitionWrapperRef,
|
202
|
-
onTransitionEnd: handleTransitionEnd
|
203
|
-
}, /*#__PURE__*/React.createElement(LeftAnimationWrapper, {
|
204
|
-
ref: leftAnimationWrapperRef
|
205
|
-
}), /*#__PURE__*/React.createElement(DotWrapper, {
|
206
|
-
ref: dotWrapperRef,
|
207
|
-
className: cls(hiddenDotsLeft && classes.availableDotsLeft, hiddenDotsRight && classes.availableDotsRight)
|
208
|
-
}, Array(visibleCount).fill(0).map(function (_, i) {
|
209
|
-
return /*#__PURE__*/React.createElement("div", {
|
210
|
-
key: i,
|
211
|
-
className: cls(classes.dot, i === activeIndex && classes.active),
|
212
|
-
onClick: function onClick() {
|
213
|
-
return handleClick(i);
|
214
|
-
}
|
215
|
-
});
|
216
|
-
})), /*#__PURE__*/React.createElement(RightAnimationWrapper, {
|
217
|
-
ref: rightAnimationWrapperRef
|
218
|
-
})));
|
219
|
-
});
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import styled from 'styled-components';
|
2
|
-
import { classes, tokens } from "../../Carousel.tokens";
|
3
|
-
export var Wrapper = /*#__PURE__*/styled.div.withConfig({
|
4
|
-
componentId: "plasma-new-hope__sc-feybgn-0"
|
5
|
-
})(["display:flex;align-items:center;justify-content:center;margin-top:0.75rem;--duration:0.3s;--half-duration:0.15s;"]);
|
6
|
-
export var TransitionWrapper = /*#__PURE__*/styled.div.withConfig({
|
7
|
-
componentId: "plasma-new-hope__sc-feybgn-1"
|
8
|
-
})(["position:relative;display:flex;transition:transform 0s ease;&.", "{transition:transform var(--duration) ease;}& .", "{width:0.5rem;height:0.5rem;margin:0 0.25rem;cursor:pointer;background-color:var(", ");border-radius:100%;&.", "{background-color:var(", ");}@keyframes fadeOut{from{transform:scale(0.75);opacity:1;}to{transform:scale(0);opacity:0;}}&.", "{animation:fadeOut var(--half-duration) ease forwards;}@keyframes shrinking{from{transform:scale(1);}to{transform:scale(0.75);}}&.", "{animation:shrinking var(--half-duration) var(--half-duration) ease forwards;}}"], classes.animating, classes.dot, tokens.paginationDotBackground, classes.active, tokens.paginationDotActiveBackground, classes.animateOut, classes.shrinking);
|
9
|
-
export var DotWrapper = /*#__PURE__*/styled.div.withConfig({
|
10
|
-
componentId: "plasma-new-hope__sc-feybgn-2"
|
11
|
-
})(["display:flex;&.", "{.", ":not(.", "):first-child{transform:scale(0.75);}}&.", "{.", ":not(.", "):last-child{transform:scale(0.75);}}&.", " .", "{transition:background-color var(--duration) ease;}"], classes.availableDotsLeft, classes.dot, classes.temporaryNatural, classes.availableDotsRight, classes.dot, classes.temporaryNatural, classes.animating, classes.dot);
|
12
|
-
export var LeftAnimationWrapper = /*#__PURE__*/styled.div.withConfig({
|
13
|
-
componentId: "plasma-new-hope__sc-feybgn-3"
|
14
|
-
})(["position:absolute;top:0;right:100%;bottom:0;display:flex;& .", "{transition:transform var(--duration) ease;@keyframes fadeIn{from{transform:scale(0);opacity:0;}to{transform:scale(1);opacity:1;}}&.", "{animation:fadeIn var(--half-duration) ease forwards;}&:first-child{@keyframes fadeInFirst{from{transform:scale(0);opacity:0;}to{transform:scale(0.75);opacity:1;}}&.", "{animation:fadeInFirst var(--half-duration) ease forwards;}}}"], classes.dot, classes.animateIn, classes.animateIn);
|
15
|
-
export var RightAnimationWrapper = /*#__PURE__*/styled.div.withConfig({
|
16
|
-
componentId: "plasma-new-hope__sc-feybgn-4"
|
17
|
-
})(["position:absolute;top:0;left:100%;bottom:0;display:flex;& .", "{transition:transform var(--duration) ease;@keyframes fadeIn{from{transform:scale(0);opacity:0;}to{transform:scale(1);opacity:1;}}&.", "{animation:fadeIn var(--half-duration) ease forwards;}&:last-child{@keyframes fadeInLast{from{transform:scale(0);opacity:0;}to{transform:scale(0.75);opacity:1;}}&.", "{animation:fadeInLast var(--half-duration) ease forwards;}}}"], classes.dot, classes.animateIn, classes.animateIn);
|
@@ -1,41 +0,0 @@
|
|
1
|
-
export var getInitialData = function getInitialData(index, count, visibleCount) {
|
2
|
-
var newIndex = index;
|
3
|
-
var newVisibleCount = visibleCount;
|
4
|
-
|
5
|
-
// Ограничения на макс. и мин. значения индекса
|
6
|
-
if (index < 0) {
|
7
|
-
newIndex = 0;
|
8
|
-
} else if (index >= count) {
|
9
|
-
newIndex = count - 1;
|
10
|
-
}
|
11
|
-
|
12
|
-
// Ограничение на количество точек
|
13
|
-
if (visibleCount > count) {
|
14
|
-
newVisibleCount = count;
|
15
|
-
}
|
16
|
-
return [newIndex, newVisibleCount];
|
17
|
-
};
|
18
|
-
export var getActiveIndex = function getActiveIndex(index, isRightDirection, count, visibleCount) {
|
19
|
-
if (index < Math.trunc(visibleCount / 2)) {
|
20
|
-
return index;
|
21
|
-
}
|
22
|
-
if (count - 1 - index < Math.trunc(visibleCount / 2)) {
|
23
|
-
return visibleCount - 1 - (count - 1 - index);
|
24
|
-
}
|
25
|
-
if (visibleCount % 2) {
|
26
|
-
return Math.trunc(visibleCount / 2);
|
27
|
-
}
|
28
|
-
if (isRightDirection) {
|
29
|
-
return visibleCount / 2;
|
30
|
-
}
|
31
|
-
return visibleCount / 2 - 1;
|
32
|
-
};
|
33
|
-
export var getTargetIndex = function getTargetIndex(index, prevIndex, prevActiveIndex, diffDotsRange) {
|
34
|
-
var targetIndex = 0;
|
35
|
-
if (index > prevIndex) {
|
36
|
-
targetIndex = prevActiveIndex + diffDotsRange;
|
37
|
-
} else {
|
38
|
-
targetIndex = prevActiveIndex - diffDotsRange;
|
39
|
-
}
|
40
|
-
return targetIndex;
|
41
|
-
};
|
@@ -1,30 +0,0 @@
|
|
1
|
-
var _excluded = ["scrollSnapAlign", "scrollSnapStop", "children"];
|
2
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
3
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
4
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
5
|
-
import React from 'react';
|
6
|
-
import styled from 'styled-components';
|
7
|
-
var StyledItem = /*#__PURE__*/styled.div.withConfig({
|
8
|
-
componentId: "plasma-new-hope__sc-1j1qvbq-0"
|
9
|
-
})(["scroll-snap-align:", ";scroll-snap-stop:", ";"], function (_ref) {
|
10
|
-
var scrollSnapAlign = _ref.scrollSnapAlign;
|
11
|
-
return scrollSnapAlign || 'none';
|
12
|
-
}, function (_ref2) {
|
13
|
-
var scrollSnapAlign = _ref2.scrollSnapAlign,
|
14
|
-
scrollSnapStop = _ref2.scrollSnapStop;
|
15
|
-
return scrollSnapAlign ? scrollSnapStop : 'normal';
|
16
|
-
});
|
17
|
-
export var CarouselItem = function CarouselItem(_ref3) {
|
18
|
-
var _ref3$scrollSnapAlign = _ref3.scrollSnapAlign,
|
19
|
-
scrollSnapAlign = _ref3$scrollSnapAlign === void 0 ? 'center' : _ref3$scrollSnapAlign,
|
20
|
-
_ref3$scrollSnapStop = _ref3.scrollSnapStop,
|
21
|
-
scrollSnapStop = _ref3$scrollSnapStop === void 0 ? 'always' : _ref3$scrollSnapStop,
|
22
|
-
children = _ref3.children,
|
23
|
-
rest = _objectWithoutProperties(_ref3, _excluded);
|
24
|
-
return /*#__PURE__*/React.createElement(StyledItem, _extends({
|
25
|
-
scrollSnapAlign: scrollSnapAlign,
|
26
|
-
scrollSnapStop: scrollSnapStop,
|
27
|
-
role: "group",
|
28
|
-
"aria-roledescription": "slide"
|
29
|
-
}, rest), children);
|
30
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
[]
|
@@ -1 +0,0 @@
|
|
1
|
-
[]
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,59 +0,0 @@
|
|
1
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
3
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
4
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
6
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
7
|
-
import { useCallback, useEffect, useState } from 'react';
|
8
|
-
var SCROLL_SPEED = 2;
|
9
|
-
export var useDragScroll = function useDragScroll(scrollRef, isDragScrollDisabled) {
|
10
|
-
var _useState = useState(false),
|
11
|
-
_useState2 = _slicedToArray(_useState, 2),
|
12
|
-
isDragging = _useState2[0],
|
13
|
-
setDragging = _useState2[1];
|
14
|
-
var _useState3 = useState(0),
|
15
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
16
|
-
startX = _useState4[0],
|
17
|
-
setStartX = _useState4[1];
|
18
|
-
var _useState5 = useState(0),
|
19
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
20
|
-
scrollLeft = _useState6[0],
|
21
|
-
setScrollLeft = _useState6[1];
|
22
|
-
var handleMouseMove = useCallback(function (e) {
|
23
|
-
if (isDragging && scrollRef && scrollRef.current) {
|
24
|
-
var dx = (e.clientX - startX) * SCROLL_SPEED;
|
25
|
-
scrollRef.current.scrollLeft = scrollLeft - dx;
|
26
|
-
}
|
27
|
-
}, [scrollRef, scrollLeft, isDragging, startX]);
|
28
|
-
var handleMouseUp = useCallback(function () {
|
29
|
-
setDragging(false);
|
30
|
-
if (scrollRef && scrollRef.current) {
|
31
|
-
scrollRef.current.style.cursor = 'grab';
|
32
|
-
}
|
33
|
-
}, [scrollRef, setDragging]);
|
34
|
-
var handleMouseDown = useCallback(function (e) {
|
35
|
-
setDragging(true);
|
36
|
-
if (scrollRef && scrollRef.current) {
|
37
|
-
setStartX(e.clientX);
|
38
|
-
setScrollLeft(scrollRef.current.scrollLeft);
|
39
|
-
scrollRef.current.style.cursor = 'grabbing';
|
40
|
-
}
|
41
|
-
}, [scrollRef, setDragging, setStartX, setScrollLeft, handleMouseUp, handleMouseMove]);
|
42
|
-
useEffect(function () {
|
43
|
-
if (scrollRef && scrollRef.current && !isDragScrollDisabled) {
|
44
|
-
scrollRef.current.style.userSelect = 'none';
|
45
|
-
scrollRef.current.addEventListener('mousedown', handleMouseDown);
|
46
|
-
scrollRef.current.addEventListener('mouseup', handleMouseUp);
|
47
|
-
scrollRef.current.addEventListener('mouseleave', handleMouseUp);
|
48
|
-
scrollRef.current.addEventListener('mousemove', handleMouseMove);
|
49
|
-
}
|
50
|
-
return function () {
|
51
|
-
if (scrollRef && scrollRef.current && !isDragScrollDisabled) {
|
52
|
-
scrollRef.current.removeEventListener('mousedown', handleMouseDown);
|
53
|
-
scrollRef.current.removeEventListener('mouseup', handleMouseUp);
|
54
|
-
scrollRef.current.removeEventListener('mouseleave', handleMouseUp);
|
55
|
-
scrollRef.current.removeEventListener('mousemove', handleMouseMove);
|
56
|
-
}
|
57
|
-
};
|
58
|
-
}, [scrollRef, handleMouseDown, handleMouseUp, handleMouseMove, isDragScrollDisabled]);
|
59
|
-
};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { useLayoutEffect, useRef } from 'react';
|
2
|
-
export var useDidMountLayoutEffect = function useDidMountLayoutEffect(fn, inputs) {
|
3
|
-
var didMountRef = useRef(false);
|
4
|
-
useLayoutEffect(function () {
|
5
|
-
if (didMountRef.current) {
|
6
|
-
fn();
|
7
|
-
} else {
|
8
|
-
didMountRef.current = true;
|
9
|
-
}
|
10
|
-
}, inputs);
|
11
|
-
};
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import { RootProps } from '../../../../src/engines';
|
2
|
-
import React from 'react';
|
3
|
-
import { CarouselNewProps } from './Carousel.types';
|
4
|
-
/**
|
5
|
-
* Компонент для создания списков с прокруткой.
|
6
|
-
*/
|
7
|
-
export declare const carouselNewRoot: (Root: RootProps<HTMLDivElement, CarouselNewProps>) => React.ForwardRefExoticComponent<CarouselNewProps & React.RefAttributes<HTMLDivElement>>;
|
8
|
-
export declare const carouselNewConfig: {
|
9
|
-
name: string;
|
10
|
-
tag: string;
|
11
|
-
layout: (Root: RootProps<HTMLDivElement, CarouselNewProps>) => React.ForwardRefExoticComponent<CarouselNewProps & React.RefAttributes<HTMLDivElement>>;
|
12
|
-
base: import("@linaria/core").LinariaClassName;
|
13
|
-
variations: {
|
14
|
-
view: {
|
15
|
-
css: import("@linaria/core").LinariaClassName;
|
16
|
-
};
|
17
|
-
size: {
|
18
|
-
css: import("@linaria/core").LinariaClassName;
|
19
|
-
};
|
20
|
-
};
|
21
|
-
defaults: {
|
22
|
-
view: string;
|
23
|
-
size: string;
|
24
|
-
};
|
25
|
-
};
|
26
|
-
//# sourceMappingURL=Carousel.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../../src/components/Carousel/CarouselNew/Carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAKpD;;GAEG;AACH,eAAO,MAAM,eAAe,SAAU,SAAS,CAAC,cAAc,EAAE,gBAAgB,CAAC,4FA8E5E,CAAC;AAEN,eAAO,MAAM,iBAAiB;;;mBAhFQ,SAAS,CAAC,cAAc,EAAE,gBAAgB,CAAC;;;;;;;;;;;;;;CAiGhF,CAAC"}
|
@@ -1,94 +0,0 @@
|
|
1
|
-
import { CSSProperties } from 'react';
|
2
|
-
export declare const IconButtonComponent: import("react").FunctionComponent<import("../../../engines/types").PropsType<import("../../../engines/types").Variants> & ((Omit<import("react").ButtonHTMLAttributes<HTMLElement>, "value"> & Omit<import("react").AnchorHTMLAttributes<HTMLElement>, "type"> & import("../../..").AsProps & {
|
3
|
-
text?: string;
|
4
|
-
contentLeft?: import("react").ReactNode;
|
5
|
-
contentPlacing?: "default" | "relaxed";
|
6
|
-
isLoading?: boolean;
|
7
|
-
loader?: import("react").ReactNode;
|
8
|
-
stretch?: boolean;
|
9
|
-
stretching?: "fixed" | "auto" | "filled";
|
10
|
-
square?: boolean;
|
11
|
-
focused?: boolean;
|
12
|
-
disabled?: boolean;
|
13
|
-
pin?: import("../../../utils/roundness").Pin;
|
14
|
-
view?: string;
|
15
|
-
size?: string;
|
16
|
-
outlined?: boolean;
|
17
|
-
shiftLeft?: boolean;
|
18
|
-
shiftRight?: boolean;
|
19
|
-
blur?: import("../../..").Blur;
|
20
|
-
} & {
|
21
|
-
value?: string | number;
|
22
|
-
contentRight?: never;
|
23
|
-
} & import("react").RefAttributes<HTMLButtonElement>) | (Omit<import("react").ButtonHTMLAttributes<HTMLElement>, "value"> & Omit<import("react").AnchorHTMLAttributes<HTMLElement>, "type"> & import("../../..").AsProps & {
|
24
|
-
text?: string;
|
25
|
-
contentLeft?: import("react").ReactNode;
|
26
|
-
contentPlacing?: "default" | "relaxed";
|
27
|
-
isLoading?: boolean;
|
28
|
-
loader?: import("react").ReactNode;
|
29
|
-
stretch?: boolean;
|
30
|
-
stretching?: "fixed" | "auto" | "filled";
|
31
|
-
square?: boolean;
|
32
|
-
focused?: boolean;
|
33
|
-
disabled?: boolean;
|
34
|
-
pin?: import("../../../utils/roundness").Pin;
|
35
|
-
view?: string;
|
36
|
-
size?: string;
|
37
|
-
outlined?: boolean;
|
38
|
-
shiftLeft?: boolean;
|
39
|
-
shiftRight?: boolean;
|
40
|
-
blur?: import("../../..").Blur;
|
41
|
-
} & {
|
42
|
-
value?: never;
|
43
|
-
contentRight?: import("react").ReactNode;
|
44
|
-
} & import("react").RefAttributes<HTMLButtonElement>))>;
|
45
|
-
export declare const base: import("@linaria/core").LinariaClassName;
|
46
|
-
export declare const CarouselWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
47
|
-
export declare const CarouselTrack: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
48
|
-
gap?: CSSProperties["gap"];
|
49
|
-
}>;
|
50
|
-
export declare const IconButton: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("../../../engines/types").PropsType<import("../../../engines/types").Variants> & ((Omit<import("react").ButtonHTMLAttributes<HTMLElement>, "value"> & Omit<import("react").AnchorHTMLAttributes<HTMLElement>, "type"> & import("../../..").AsProps & {
|
51
|
-
text?: string;
|
52
|
-
contentLeft?: import("react").ReactNode;
|
53
|
-
contentPlacing?: "default" | "relaxed";
|
54
|
-
isLoading?: boolean;
|
55
|
-
loader?: import("react").ReactNode;
|
56
|
-
stretch?: boolean;
|
57
|
-
stretching?: "fixed" | "auto" | "filled";
|
58
|
-
square?: boolean;
|
59
|
-
focused?: boolean;
|
60
|
-
disabled?: boolean;
|
61
|
-
pin?: import("../../../utils/roundness").Pin;
|
62
|
-
view?: string;
|
63
|
-
size?: string;
|
64
|
-
outlined?: boolean;
|
65
|
-
shiftLeft?: boolean;
|
66
|
-
shiftRight?: boolean;
|
67
|
-
blur?: import("../../..").Blur;
|
68
|
-
} & {
|
69
|
-
value?: string | number;
|
70
|
-
contentRight?: never;
|
71
|
-
} & import("react").RefAttributes<HTMLButtonElement>) | (Omit<import("react").ButtonHTMLAttributes<HTMLElement>, "value"> & Omit<import("react").AnchorHTMLAttributes<HTMLElement>, "type"> & import("../../..").AsProps & {
|
72
|
-
text?: string;
|
73
|
-
contentLeft?: import("react").ReactNode;
|
74
|
-
contentPlacing?: "default" | "relaxed";
|
75
|
-
isLoading?: boolean;
|
76
|
-
loader?: import("react").ReactNode;
|
77
|
-
stretch?: boolean;
|
78
|
-
stretching?: "fixed" | "auto" | "filled";
|
79
|
-
square?: boolean;
|
80
|
-
focused?: boolean;
|
81
|
-
disabled?: boolean;
|
82
|
-
pin?: import("../../../utils/roundness").Pin;
|
83
|
-
view?: string;
|
84
|
-
size?: string;
|
85
|
-
outlined?: boolean;
|
86
|
-
shiftLeft?: boolean;
|
87
|
-
shiftRight?: boolean;
|
88
|
-
blur?: import("../../..").Blur;
|
89
|
-
} & {
|
90
|
-
value?: never;
|
91
|
-
contentRight?: import("react").ReactNode;
|
92
|
-
} & import("react").RefAttributes<HTMLButtonElement>))>;
|
93
|
-
export declare const ControlsWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
94
|
-
//# sourceMappingURL=Carousel.styles.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Carousel.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Carousel/CarouselNew/Carousel.styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAOtC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAA0B,CAAC;AAE3D,eAAO,MAAM,IAAI,0CAEhB,CAAC;AAEF,eAAO,MAAM,eAAe,qKAoB3B,CAAC;AAEF,eAAO,MAAM,aAAa;UAAsB,aAAa,CAAC,KAAK,CAAC;EAInE,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAsBtB,CAAC;AAEF,eAAO,MAAM,eAAe,qKAE3B,CAAC"}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
export declare const classes: {
|
2
|
-
dot: string;
|
3
|
-
active: string;
|
4
|
-
animating: string;
|
5
|
-
animateIn: string;
|
6
|
-
animateOut: string;
|
7
|
-
temporaryNatural: string;
|
8
|
-
shrinking: string;
|
9
|
-
availableDotsLeft: string;
|
10
|
-
availableDotsRight: string;
|
11
|
-
rightControlButton: string;
|
12
|
-
};
|
13
|
-
export declare const tokens: {
|
14
|
-
paginationDotBackground: string;
|
15
|
-
paginationDotActiveBackground: string;
|
16
|
-
};
|
17
|
-
//# sourceMappingURL=Carousel.tokens.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Carousel.tokens.d.ts","sourceRoot":"","sources":["../../../../src/components/Carousel/CarouselNew/Carousel.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;CAWnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
|