@via-profit/ui-kit 0.6.0 → 0.7.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/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  Все заметные изменения пакета `@via-profit/ui-kit`. Формат основан на [Keep a Changelog](https://keepachangelog.com/ru/1.1.0/), версии следуют [семантическому версионированию](https://semver.org/lang/ru/).
4
4
 
5
+ ## 0.7.0 — 2026-10-09
6
+
7
+ Swiper: дробный `slidesPerView` и `centered`, вертикальная прокрутка, затухание и бегущая лента.
8
+
9
+ ### Добавлено
10
+
11
+ - **Swiper**: дробный `slidesPerView` (например, `1.2` — слайд и часть соседнего) и `centered` — текущий слайд посередине, соседи видны по краям;
12
+ - **Swiper**: `direction="vertical"` — вертикальная прокрутка, стрелки ↑/↓;
13
+ - **Swiper**: `effect="fade"` — смена слайдов затуханием;
14
+ - **Swiper**: `speed` — длительность смены слайда;
15
+ - **Swiper**: `autoScroll` — бегущая лента с постоянной скоростью в пикселях в секунду. Останавливается при наведении и при включённом в системе уменьшении движения.
16
+
17
+ ### Исправлено
18
+
19
+ - **Swiper**: ширину слайда задаёт только `slidesPerView`. Раньше слайд с широким содержимым растягивался, и лента сдвигалась;
20
+ - **Swiper**: если слайдов меньше, чем нужно для бесконечной прокрутки, она выключается целиком. Раньше в консоль выводилась ошибка, но индексы считались с копиями слайдов, которых не было.
21
+
5
22
  ## 0.6.0 — 2026-10-07
6
23
 
7
24
  Поддержка React 19. Тема снова задаёт только токены. Оформление компонентов в теме убрано: оно делало внутренние части компонентов публичным контрактом и добавляло работы при каждой отрисовке.
@@ -20,6 +20,8 @@ export interface SwiperOverrides {
20
20
  readonly Wrapper?: React.ComponentType<SwiperWrapperProps & React.RefAttributes<HTMLDivElement>>;
21
21
  readonly Track?: React.ComponentType<SwiperTrackProps & React.RefAttributes<HTMLDivElement>>;
22
22
  }
23
+ export type SwiperDirection = 'horizontal' | 'vertical';
24
+ export type SwiperEffect = 'slide' | 'fade';
23
25
  export type SwiperProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {
24
26
  readonly dragThreshold?: number;
25
27
  readonly snap?: boolean;
@@ -32,7 +34,40 @@ export type SwiperProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>
32
34
  readonly pauseOnHover?: boolean;
33
35
  readonly threshold?: number;
34
36
  readonly resistance?: boolean;
37
+ /**
38
+ * How many slides are visible at once. A fractional value shows a part of the next slide,
39
+ * for example `1.2`\
40
+ * **Default:** `1`
41
+ */
35
42
  readonly slidesPerView?: number;
43
+ /**
44
+ * The current slide is in the middle of the view, the neighbours are partially visible on both sides.
45
+ * Makes sense with a fractional `slidesPerView`\
46
+ * **Default:** `false`
47
+ */
48
+ readonly centered?: boolean;
49
+ /**
50
+ * The direction of the scroll. The vertical swiper needs a height: set it on the swiper\
51
+ * **Default:** `'horizontal'`
52
+ */
53
+ readonly direction?: SwiperDirection;
54
+ /**
55
+ * `slide` moves the track, `fade` cross-fades the slides lying on top of each other.
56
+ * With `fade` the slides are always one per view\
57
+ * **Default:** `'slide'`
58
+ */
59
+ readonly effect?: SwiperEffect;
60
+ /**
61
+ * The duration of the slide change in milliseconds\
62
+ * **Default:** `300`
63
+ */
64
+ readonly speed?: number;
65
+ /**
66
+ * Continuous scroll (ticker) in pixels per second, for example the logos of the clients.
67
+ * The track moves without stops in the infinite loop, the drag and the keyboard are off.
68
+ * The scroll pauses with `pauseOnHover`, by the API and when the user asked the system to reduce motion
69
+ */
70
+ readonly autoScroll?: number;
36
71
  /**
37
72
  * Arrow keys switch the slides when the swiper is focused\
38
73
  * **Default:** `true`
@@ -61,7 +96,40 @@ export declare const Swiper: React.ForwardRefExoticComponent<Omit<React.HTMLAttr
61
96
  readonly pauseOnHover?: boolean;
62
97
  readonly threshold?: number;
63
98
  readonly resistance?: boolean;
99
+ /**
100
+ * How many slides are visible at once. A fractional value shows a part of the next slide,
101
+ * for example `1.2`\
102
+ * **Default:** `1`
103
+ */
64
104
  readonly slidesPerView?: number;
105
+ /**
106
+ * The current slide is in the middle of the view, the neighbours are partially visible on both sides.
107
+ * Makes sense with a fractional `slidesPerView`\
108
+ * **Default:** `false`
109
+ */
110
+ readonly centered?: boolean;
111
+ /**
112
+ * The direction of the scroll. The vertical swiper needs a height: set it on the swiper\
113
+ * **Default:** `'horizontal'`
114
+ */
115
+ readonly direction?: SwiperDirection;
116
+ /**
117
+ * `slide` moves the track, `fade` cross-fades the slides lying on top of each other.
118
+ * With `fade` the slides are always one per view\
119
+ * **Default:** `'slide'`
120
+ */
121
+ readonly effect?: SwiperEffect;
122
+ /**
123
+ * The duration of the slide change in milliseconds\
124
+ * **Default:** `300`
125
+ */
126
+ readonly speed?: number;
127
+ /**
128
+ * Continuous scroll (ticker) in pixels per second, for example the logos of the clients.
129
+ * The track moves without stops in the infinite loop, the drag and the keyboard are off.
130
+ * The scroll pauses with `pauseOnHover`, by the API and when the user asked the system to reduce motion
131
+ */
132
+ readonly autoScroll?: number;
65
133
  /**
66
134
  * Arrow keys switch the slides when the swiper is focused\
67
135
  * **Default:** `true`