Skip to content

Commit

Permalink
#4852 Update outdated JS packages: flatpickr, flickity
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Trofimov committed Jan 5, 2025
1 parent 4678409 commit 111b5d1
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 24 deletions.
59 changes: 58 additions & 1 deletion package-lock.json

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

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"filepond-plugin-image-preview": "^4.6.12",
"filepond-plugin-image-resize": "^2.0.10",
"filepond-plugin-image-transform": "^3.8.7",
"flag-icons": "^7.2.3"
"flag-icons": "^7.2.3",
"flatpickr": "^4.6.13",
"flickity": "^3.0.0"
},
"scripts": {
"install-bower-components": "bower install",
Expand All @@ -24,6 +26,8 @@
"build:fancybox": "mkdir -p plugins_public/fancybox; cd node_modules/fancybox/dist; cp -r css/* ../../../plugins_public/fancybox; cp -r helpers ../../../plugins_public/fancybox; cp -r img/* ../../../plugins_public/fancybox; cp -r js/* ../../../plugins_public/fancybox",
"build:filepond": "mkdir -p plugins_public/filepond; cd node_modules/filepond; cp -r dist/filepond.min.* ../../plugins_public/filepond; cp -r locale ../../plugins_public/filepond; cd ../../plugins_public/filepond; cp ../../node_modules/filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size.min.js .; cp ../../node_modules/filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.min.js .; cp ../../node_modules/filepond-plugin-image-crop/dist/filepond-plugin-image-crop.min.js .; cp ../../node_modules/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.* .; cp ../../node_modules/filepond-plugin-image-resize/dist/filepond-plugin-image-resize.min.js .; cp ../../node_modules/filepond-plugin-image-transform/dist/filepond-plugin-image-transform.min.js .",
"build:flag-icons": "mkdir -p plugins_public/flag-icons; cd node_modules/flag-icons; cp -r css ../../plugins_public/flag-icons; cp -r flags ../../plugins_public/flag-icons",
"build:flatpickr": "mkdir -p plugins_public/flatpickr; cd node_modules/flatpickr; cp -r dist ../../plugins_public/flatpickr",
"build:flickity": "mkdir -p plugins_public/flickity; cd node_modules/flickity; cp -r dist/flickity.css ../../plugins_public/flickity; cp -r dist/flickity.pkgd.min.js ../../plugins_public/flickity",
"build": "npm run install-bower-components; npm-run-all --parallel build:*"
},
"devDependencies": {
Expand Down
63 changes: 45 additions & 18 deletions plugins_public/flickity/flickity.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Flickity v2.2.1
/*! Flickity v3.0.0
https://flickity.metafizzy.co
---------------------------------------------- */

Expand All @@ -12,40 +12,54 @@ https://flickity.metafizzy.co
overflow: hidden;
position: relative;
height: 100%;
touch-action: pan-y;
}

.flickity-slider {
position: absolute;
width: 100%;
height: 100%;
left: 0;
}

.flickity-rtl .flickity-slider {
left: unset;
right: 0;
}

/* draggable */

.flickity-enabled.is-draggable {
-webkit-tap-highlight-color: transparent;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
user-select: none;
}

.flickity-enabled.is-draggable .flickity-viewport {
cursor: move;
cursor: -webkit-grab;
cursor: grab;
}

.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down {
cursor: -webkit-grabbing;
cursor: grabbing;
}

/* ---- flickity-cell ---- */

.flickity-cell {
position: absolute;
left: 0;
}

.flickity-rtl .flickity-cell {
left: unset;
right: 0;
}

/* ---- flickity-button ---- */

.flickity-button {
position: absolute;
background: hsla(0, 0%, 100%, 0.75);
background: hsl(0 0% 100% / 75%);
border: none;
color: #333;
}
Expand Down Expand Up @@ -93,6 +107,7 @@ https://flickity.metafizzy.co
left: auto;
right: 10px;
}

.flickity-rtl .flickity-prev-next-button.next {
right: auto;
left: 10px;
Expand All @@ -112,26 +127,38 @@ https://flickity.metafizzy.co
position: absolute;
width: 100%;
bottom: -25px;
padding: 0;
margin: 0;
list-style: none;
text-align: center;
line-height: 1;
display: flex;
justify-content: center;
flex-wrap: wrap;
}

.flickity-rtl .flickity-page-dots { direction: rtl; }

.flickity-page-dots .dot {
display: inline-block;
.flickity-page-dot {
display: block;
width: 10px;
height: 10px;
padding: 0;
margin: 0 8px;
background: #333;
background: hsl(0 0% 20% / 25%);
border-radius: 50%;
opacity: 0.25;
cursor: pointer;
appearance: none;
border: none;
text-indent: -9999px;
overflow: hidden;
}

.flickity-rtl .flickity-page-dot {
text-indent: 9999px;
}

.flickity-page-dot:focus {
outline: none;
box-shadow: 0 0 0 5px #19F;
}

.flickity-page-dots .dot.is-selected {
opacity: 1;
.flickity-page-dot.is-selected {
background: hsl(0 0% 20% / 100%);
}
25 changes: 21 additions & 4 deletions plugins_public/flickity/flickity.pkgd.min.js

Large diffs are not rendered by default.

0 comments on commit 111b5d1

Please sign in to comment.