Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump swiper from 8.4.7 to 11.1.3 #443

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/html-storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@fancyapps/ui": "^4.0.26",
"@tailwindcss/forms": "^0.5.7",
"swiper": "^8.0.7"
"swiper": "^11.1.3"
},
"devDependencies": {
"@explorer-1/common-storybook": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion apps/vue-storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@fancyapps/ui": "^4.0.26",
"@tailwindcss/forms": "^0.5.7",
"swiper": "^8.0.7",
"swiper": "^11.1.3",
"vue": "^3.2.47"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/html/dist/assets/css/explorer-1.min.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/html/dist/assets/js/explorer-1.min.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions packages/html/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<head>
<meta charset="utf-8" />
<title>JPL Design System Assets</title>
<link
rel="stylesheet"
href="./assets/scss/styles.scss"
/>
</head>
<body>
<div class="bg-dark-blue py-5 px-4 3xl:px-0 mb-10">
Expand Down
4 changes: 0 additions & 4 deletions packages/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
<head>
<meta charset="utf-8" />
<title>JPL Design System Assets</title>
<link
rel="stylesheet"
href="./assets/scss/styles.scss"
/>
</head>
<body>
<div class="bg-dark-blue py-5 px-4 3xl:px-0 mb-10">
Expand Down
2 changes: 1 addition & 1 deletion packages/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"@fancyapps/ui": "^4.0.26",
"@tailwindcss/forms": "^0.5.7",
"swiper": "^8.0.7",
"swiper": "^11.1.3",
"tailwindcss": "^3.4.3"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/html/src/assets/js/vendors/_swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
* Configured to use any modules that are needed site-wide (SwiperCore.use([]))
* Custom options are defined in constants
*/

import Swiper, { Navigation, Pagination, Lazy, A11y } from 'swiper'
import Swiper from 'swiper'
import { A11y, Navigation, Pagination } from 'swiper/modules'
import swiperOptions from './_swiperOptions.js'

export function initMixinCarousel() {
return new Swiper('.MixinCarousel .swiper', {
modules: [Navigation, Lazy, A11y, Pagination],
modules: [A11y, Navigation, Pagination],
...swiperOptions.MixinCarousel
})
}).init()
}

export function initBlockImageCarousel() {
return new Swiper('.BlockImageCarousel .swiper', {
modules: [Navigation, Lazy, A11y, Pagination],
modules: [A11y, Navigation, Pagination],
...swiperOptions.BlockImageCarousel
})
}
5 changes: 3 additions & 2 deletions packages/html/src/assets/js/vendors/_swiperOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

const swiperOptions = {
MixinCarousel: {
init: false,
slidesPerView: 1.25,
speed: 500,
threshold: 20, // swipe threshold in px
Expand Down Expand Up @@ -38,8 +39,8 @@ const swiperOptions = {
},
on: {
init(swiper) {
swiper.$el.removeClass('opacity-0')
swiper.$el.addClass('opacity-100')
const classList = swiper.el.classList
classList.replace('opacity-0', 'opacity-100')
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import { BlockImageGalleryCoverTemplate } from '../BlockImageGalleryCover/BlockImageGalleryCover'
import { BlockImageStandardTemplate } from '../BlockImage/BlockImageStandard'
import { BaseButtonTemplate } from '../BaseButton/BaseButton'
// @ts-ignore
// import Swiper, { Navigation, Pagination, Lazy, A11y } from 'swiper'
// import swiperOptions from './../../assets/js/vendors/_swiperOptions.js'

// @ts-ignore
// import { initBlockImageCarousel } from './../../assets/js/vendors/_swiper.js'
// function initBlockImageCarousel() {
// return new Swiper('.BlockImageCarousel .swiper', {
// modules: [Navigation, Lazy, A11y, Pagination],
// ...swiperOptions.BlockImageCarousel
// })
// }
export const BlockImageCarouselTemplate = ({ images, galleryCoverImage, fancyboxGallery }) => {
let slides = ''
if (images.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@nuxtjs/tailwindcss": "^6.12.0",
"@fancyapps/ui": "^4.0.26",
"@tailwindcss/forms": "^0.5.7",
"swiper": "^8.0.7"
"swiper": "^11.1.3"
},
"devDependencies": {
"@explorer-1/common": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@fancyapps/ui": "^4.0.26",
"@tailwindcss/forms": "^0.5.7",
"swiper": "^8.0.7",
"swiper": "^11.1.3",
"tailwindcss": "^3.4.3",
"tailwindcss-themer": "^4.0.0",
"vue": "^3.4.21"
Expand Down
46 changes: 18 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.