@asd20/ui-next 2.12.7 → 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,19 @@
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
+
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)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Increase bottom margin on wayfinding messages ([724b4f7](https://github.com/academydistrict20/asd20-ui-next/commit/724b4f7d3e55340f4987c73a34cf661e64cce920))
16
+
3
17
  ## [2.12.7](https://github.com/academydistrict20/asd20-ui-next/compare/ui-next-v2.12.6...ui-next-v2.12.7) (2026-06-15)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asd20/ui-next",
3
- "version": "2.12.7",
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": "^2.2.1",
42
+ "js-cookie": "3.0.8",
43
43
  "lodash": "^4.17.23",
44
- "swiper": "^5.4.5",
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/js/swiper.esm'
51
+ } from 'swiper/modules'
49
52
  import merge from 'lodash/merge'
50
- import 'swiper/css/swiper.css'
53
+ import 'swiper/css'
54
+ import 'swiper/css/pagination'
51
55
 
52
- // see http://idangero.us/swiper/api/#custom-build
53
- Swiper.use([A11y, Keyboard, Pagination, Navigation, Mousewheel])
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
- this.swiper = new Swiper(
113
- this.$refs.swiper,
114
- merge(
115
- {
116
- preloadImages: false,
117
- keyboard: {
118
- enabled: false,
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
- this.options,
124
- {
125
- mousewheel: {
126
- releaseOnEdges: true,
127
- sensitivity: 0.5,
128
- forceToAxis: true,
129
- },
130
- controller: {
131
- control: this.controlled,
132
- },
133
- pagination: {
134
- el: this.$refs.pagination,
135
- clickable: false,
136
- },
137
- navigation: {
138
- prevEl: this.$refs.prev,
139
- nextEl: this.$refs.next,
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-container {
343
+ .swiper {
335
344
  overflow: visible;
336
345
  --swiper-theme-color: var(--color__accent);
337
346
  }
@@ -215,7 +215,7 @@ export default {
215
215
  .secondary-messaging-section {
216
216
  padding: space(2) space(1) space(2) space(2);
217
217
  & > :deep(*) {
218
- margin: 0 space(1) !important;
218
+ margin: 0 space(1) space(1.5) space(1) !important;
219
219
  }
220
220
  }
221
221
  &--grid {