@asd20/ui-next 2.12.8 → 2.13.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
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# [2.13.0](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.12.8...ui-next-v2.13.0) (2026-07-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* migrate shared carousel to Swiper 12 ([9ba6f7b](https://github.com/academydistrict20/asd20-ui-next/commit/9ba6f7b2a6ec7f1ad72944a7279fefafcf273995))
|
|
9
|
+
|
|
3
10
|
## [2.12.8](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.12.7...ui-next-v2.12.8) (2026-06-22)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asd20/ui-next",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "ASD20 UI component library for Vue 3.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,10 +39,9 @@
|
|
|
39
39
|
"date-fns": "^2.30.0",
|
|
40
40
|
"date-fns-tz": "^1.1.7",
|
|
41
41
|
"focus-trap": "^6.9.4",
|
|
42
|
-
"js-cookie": "
|
|
42
|
+
"js-cookie": "3.0.8",
|
|
43
43
|
"lodash": "^4.17.23",
|
|
44
|
-
"swiper": "
|
|
45
|
-
"uuid": "^3.3.2"
|
|
44
|
+
"swiper": "12.2.0"
|
|
46
45
|
},
|
|
47
46
|
"peerDependencies": {
|
|
48
47
|
"vue": "^3.0.0"
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
>
|
|
6
6
|
<button
|
|
7
7
|
ref="prev"
|
|
8
|
+
type="button"
|
|
8
9
|
tabindex="-1"
|
|
9
10
|
title="Previous"
|
|
10
11
|
class="asd20-swiper__arrows__button-prev"
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
</button>
|
|
14
15
|
<div
|
|
15
16
|
ref="swiper"
|
|
16
|
-
class="swiper-container"
|
|
17
|
+
class="swiper swiper-container"
|
|
17
18
|
>
|
|
18
19
|
<div class="swiper-wrapper">
|
|
19
20
|
<slot name="before-wrapper" />
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
</div>
|
|
29
30
|
<button
|
|
30
31
|
ref="next"
|
|
32
|
+
type="button"
|
|
31
33
|
tabindex="-1"
|
|
32
34
|
title="Next"
|
|
33
35
|
class="asd20-swiper__arrows__button-next"
|
|
@@ -38,19 +40,27 @@
|
|
|
38
40
|
</template>
|
|
39
41
|
|
|
40
42
|
<script>
|
|
43
|
+
import Swiper from 'swiper'
|
|
41
44
|
import {
|
|
42
|
-
Swiper,
|
|
43
45
|
A11y,
|
|
46
|
+
Controller,
|
|
44
47
|
Keyboard,
|
|
45
48
|
Pagination,
|
|
46
49
|
Navigation,
|
|
47
50
|
Mousewheel,
|
|
48
|
-
} from 'swiper/
|
|
51
|
+
} from 'swiper/modules'
|
|
49
52
|
import merge from 'lodash/merge'
|
|
50
|
-
import 'swiper/css
|
|
53
|
+
import 'swiper/css'
|
|
54
|
+
import 'swiper/css/pagination'
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
const swiperModules = [
|
|
57
|
+
A11y,
|
|
58
|
+
Controller,
|
|
59
|
+
Keyboard,
|
|
60
|
+
Pagination,
|
|
61
|
+
Navigation,
|
|
62
|
+
Mousewheel,
|
|
63
|
+
]
|
|
54
64
|
|
|
55
65
|
export default {
|
|
56
66
|
name: 'Asd20Swiper',
|
|
@@ -109,41 +119,40 @@ export default {
|
|
|
109
119
|
recreateSwiper() {
|
|
110
120
|
this.destroySwiper()
|
|
111
121
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
onlyInViewport: true,
|
|
120
|
-
},
|
|
121
|
-
a11y: true,
|
|
122
|
+
const swiperOptions = merge(
|
|
123
|
+
{
|
|
124
|
+
modules: swiperModules,
|
|
125
|
+
preloadImages: false,
|
|
126
|
+
keyboard: {
|
|
127
|
+
enabled: false,
|
|
128
|
+
onlyInViewport: true,
|
|
122
129
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
)
|
|
130
|
+
a11y: true,
|
|
131
|
+
},
|
|
132
|
+
this.options,
|
|
133
|
+
{
|
|
134
|
+
mousewheel: {
|
|
135
|
+
releaseOnEdges: true,
|
|
136
|
+
sensitivity: 0.5,
|
|
137
|
+
forceToAxis: true,
|
|
138
|
+
},
|
|
139
|
+
controller: {},
|
|
140
|
+
pagination: {
|
|
141
|
+
el: this.$refs.pagination,
|
|
142
|
+
clickable: false,
|
|
143
|
+
},
|
|
144
|
+
navigation: {
|
|
145
|
+
prevEl: this.$refs.prev,
|
|
146
|
+
nextEl: this.$refs.next,
|
|
147
|
+
},
|
|
148
|
+
}
|
|
143
149
|
)
|
|
150
|
+
swiperOptions.controller.control = this.controlled
|
|
151
|
+
|
|
152
|
+
this.swiper = new Swiper(this.$refs.swiper, swiperOptions)
|
|
144
153
|
|
|
145
154
|
// Delay horizontal scrolling and prioritize vertical scrolling
|
|
146
|
-
this.swiper.on('touchMove', event => {
|
|
155
|
+
this.swiper.on('touchMove', (swiper, event) => {
|
|
147
156
|
const { deltaX, deltaY } = event // Track horizontal and vertical scroll movements
|
|
148
157
|
if (Math.abs(deltaY) > Math.abs(deltaX)) {
|
|
149
158
|
// If the vertical scroll is stronger, prevent horizontal scrolling
|
|
@@ -331,7 +340,7 @@ export default {
|
|
|
331
340
|
}
|
|
332
341
|
}
|
|
333
342
|
|
|
334
|
-
.swiper
|
|
343
|
+
.swiper {
|
|
335
344
|
overflow: visible;
|
|
336
345
|
--swiper-theme-color: var(--color__accent);
|
|
337
346
|
}
|