framework7 8.0.0-beta.6 → 8.0.0-beta.7

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Framework7 8.0.0-beta.6
2
+ * Framework7 8.0.0-beta.7
3
3
  * Full featured mobile HTML framework for building iOS & Android apps
4
4
  * https://framework7.io/
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 24, 2023
10
+ * Released on: March 27, 2023
11
11
  */
12
12
 
13
13
  /*====================
@@ -17216,11 +17216,10 @@ swiper-container .swiper-notification {
17216
17216
  --f7-photobrowser-bars-bg-color: rgba(var(--f7-bars-bg-color-rgb), 0.95);
17217
17217
  --f7-photobrowser-bars-text-color: var(--f7-bars-text-color);
17218
17218
  --f7-photobrowser-bars-link-color: var(--f7-bars-link-color);
17219
- --f7-photobrowser-caption-font-size: 14px;
17219
+ --f7-photobrowser-caption-font-size: 13px;
17220
+ --f7-photobrowser-caption-font-weight: 500;
17220
17221
  --f7-photobrowser-caption-light-text-color: #000;
17221
- --f7-photobrowser-caption-light-bg-color: rgba(255, 255, 255, 0.8);
17222
17222
  --f7-photobrowser-caption-dark-text-color: #fff;
17223
- --f7-photobrowser-caption-dark-bg-color: rgba(0, 0, 0, 0.8);
17224
17223
  --f7-photobrowser-exposed-bg-color: #000;
17225
17224
  --f7-photobrowser-dark-bg-color: #000;
17226
17225
  --f7-photobrowser-dark-bars-bg-color: rgba(27, 27, 27, 0.8);
@@ -17249,7 +17248,6 @@ swiper-container .swiper-notification {
17249
17248
  }
17250
17249
  .photo-browser-standalone.photo-browser-transitioning {
17251
17250
  transition: 400ms;
17252
- transition-property: transform;
17253
17251
  animation: none !important;
17254
17252
  }
17255
17253
  .photo-browser-popup.modal-out.swipe-close-to-bottom,
@@ -17282,11 +17280,28 @@ swiper-container .swiper-notification {
17282
17280
  bottom: var(--f7-safe-area-bottom);
17283
17281
  z-index: 10;
17284
17282
  opacity: 1;
17285
- transition: 400ms;
17283
+ transition-duration: 400ms;
17286
17284
  }
17287
17285
  .photo-browser-captions.photo-browser-captions-exposed {
17288
17286
  opacity: 0;
17289
17287
  }
17288
+ .toolbar ~ .toolbar.photo-browser-thumbs {
17289
+ bottom: calc(var(--f7-toolbar-height) + var(--f7-safe-area-bottom));
17290
+ }
17291
+ .page ~ .photo-browser-page:not(.photo-browser-exposed) .toolbar ~ .toolbar.photo-browser-thumbs,
17292
+ .photo-browser-popup:not(.photo-browser-exposed) .toolbar ~ .toolbar.photo-browser-thumbs,
17293
+ .photo-browser-standalone:not(.photo-browser-exposed) .toolbar ~ .toolbar.photo-browser-thumbs {
17294
+ height: var(--f7-toolbar-height);
17295
+ }
17296
+ .photo-browser-exposed .toolbar ~ .toolbar.photo-browser-thumbs {
17297
+ transform: translate3d(0, calc(var(--f7-toolbar-height) + var(--f7-safe-area-bottom, 0)), 0);
17298
+ }
17299
+ .photo-browser-exposed .toolbar ~ .toolbar.photo-browser-thumbs .swiper {
17300
+ height: calc(100% - var(--f7-safe-area-bottom, 0));
17301
+ }
17302
+ .navbar + .toolbar.photo-browser-thumbs .swiper {
17303
+ height: calc(100% - var(--f7-safe-area-bottom, 0));
17304
+ }
17290
17305
  .toolbar ~ .photo-browser-captions {
17291
17306
  bottom: calc(var(--f7-toolbar-height) + var(--f7-safe-area-bottom));
17292
17307
  transform: translate3d(0, 0px, 0);
@@ -17294,9 +17309,45 @@ swiper-container .swiper-notification {
17294
17309
  .toolbar ~ .photo-browser-captions.photo-browser-captions-exposed {
17295
17310
  transform: translate3d(0, 0px, 0);
17296
17311
  }
17312
+ .toolbar ~ .toolbar ~ .photo-browser-captions {
17313
+ bottom: calc(var(--f7-toolbar-height) * 2 + var(--f7-safe-area-bottom));
17314
+ }
17315
+ .toolbar ~ .toolbar ~ .photo-browser-captions.photo-browser-captions-exposed {
17316
+ transform: translate3d(0, var(--f7-toolbar-height), 0);
17317
+ }
17318
+ .photo-browser-thumbs {
17319
+ transition-property: transform, background-color, color;
17320
+ }
17321
+ .photo-browser-thumbs .swiper {
17322
+ width: 100%;
17323
+ height: 100%;
17324
+ }
17325
+ .photo-browser-thumbs .swiper-slide {
17326
+ width: auto;
17327
+ display: flex;
17328
+ align-items: center;
17329
+ justify-content: center;
17330
+ }
17331
+ .photo-browser-thumbs img {
17332
+ width: auto;
17333
+ height: 75%;
17334
+ display: block;
17335
+ border-radius: 2px;
17336
+ min-width: 4px;
17337
+ }
17338
+ .photo-browser-thumbs .swiper-slide img {
17339
+ transform: translateX(-4px);
17340
+ transition-duration: 150ms;
17341
+ }
17342
+ .photo-browser-thumbs .swiper-slide-active img {
17343
+ transform: scale(1.2);
17344
+ }
17345
+ .photo-browser-thumbs .swiper-slide-active ~ .swiper-slide img {
17346
+ transform: translateX(4px);
17347
+ }
17297
17348
  .photo-browser-caption {
17298
17349
  box-sizing: border-box;
17299
- transition: 300ms;
17350
+ transition-duration: 400ms;
17300
17351
  position: absolute;
17301
17352
  bottom: 0;
17302
17353
  left: 0;
@@ -17305,6 +17356,13 @@ swiper-container .swiper-notification {
17305
17356
  width: 100%;
17306
17357
  text-align: center;
17307
17358
  font-size: var(--f7-photobrowser-caption-font-size);
17359
+ font-weight: var(--f7-photobrowser-caption-font-weight);
17360
+ }
17361
+ @supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
17362
+ .ios-translucent-bars .photo-browser-caption {
17363
+ -webkit-backdrop-filter: saturate(180%) blur(var(--f7-bars-translucent-blur));
17364
+ backdrop-filter: saturate(180%) blur(var(--f7-bars-translucent-blur));
17365
+ }
17308
17366
  }
17309
17367
  .photo-browser-caption:empty {
17310
17368
  display: none;
@@ -17314,11 +17372,10 @@ swiper-container .swiper-notification {
17314
17372
  }
17315
17373
  .photo-browser-captions-light .photo-browser-caption {
17316
17374
  color: var(--f7-photobrowser-caption-light-text-color);
17317
- background: var(--f7-photobrowser-caption-light-bg-color);
17318
17375
  }
17319
- .photo-browser-captions-dark .photo-browser-caption {
17376
+ .photo-browser-captions-dark .photo-browser-caption,
17377
+ .dark .photo-browser-caption {
17320
17378
  color: var(--f7-photobrowser-caption-dark-text-color);
17321
- background: var(--f7-photobrowser-caption-dark-bg-color);
17322
17379
  }
17323
17380
  .photo-browser-swiper-container {
17324
17381
  position: absolute;
@@ -17330,6 +17387,7 @@ swiper-container .swiper-notification {
17330
17387
  background: var(--f7-photobrowser-bg-color);
17331
17388
  transition: 400ms;
17332
17389
  transition-property: background-color;
17390
+ touch-action: pan-x pan-y;
17333
17391
  }
17334
17392
  .photo-browser-prev.swiper-button-disabled,
17335
17393
  .photo-browser-next.swiper-button-disabled {
@@ -17386,15 +17444,25 @@ swiper-container .swiper-notification {
17386
17444
  left: 50%;
17387
17445
  top: 50%;
17388
17446
  }
17447
+ .navbar-photo-browser .right .link svg,
17448
+ .navbar-photo-browser .right .link i {
17449
+ width: 24px;
17450
+ height: 24px;
17451
+ display: block;
17452
+ }
17389
17453
  .photo-browser-page .navbar-bg,
17390
17454
  .navbar-photo-browser .navbar-bg,
17391
- .photo-browser-page .toolbar {
17455
+ .photo-browser-page .toolbar,
17456
+ .photo-browser-caption {
17392
17457
  background-color: var(--f7-photobrowser-bars-bg-color, rgba(var(--f7-bars-bg-color-rgb), 0.95));
17393
17458
  }
17459
+ .photo-browser-page {
17460
+ touch-action: manipulation;
17461
+ }
17394
17462
  .photo-browser-page .navbar,
17395
17463
  .photo-browser-page .toolbar {
17396
17464
  transform: translate3d(0, 0, 0);
17397
- transition: 400ms;
17465
+ transition-duration: 400ms;
17398
17466
  color: var(--f7-photobrowser-bars-text-color, var(--f7-bars-text-color));
17399
17467
  }
17400
17468
  .photo-browser-page .navbar a,
@@ -17402,36 +17470,45 @@ swiper-container .swiper-notification {
17402
17470
  color: var(--f7-photobrowser-bars-link-color, var(--f7-bars-link-color, var(--f7-theme-color)));
17403
17471
  }
17404
17472
  .photo-browser-exposed .navbar,
17405
- .photo-browser-exposed .toolbar {
17473
+ .photo-browser-exposed .toolbar:not(.photo-browser-thumbs) {
17406
17474
  opacity: 0;
17407
17475
  visibility: hidden;
17408
17476
  pointer-events: none;
17409
17477
  }
17410
- .photo-browser-exposed .toolbar ~ .photo-browser-captions {
17478
+ .photo-browser-exposed .toolbar:not(.photo-browser-thumbs) ~ .photo-browser-captions,
17479
+ .photo-browser-exposed .toolbar ~ .toolbar.photo-browser-thumbs ~ .photo-browser-captions {
17411
17480
  transform: translate3d(0, var(--f7-toolbar-height), 0);
17412
17481
  }
17413
17482
  .photo-browser-exposed .photo-browser-swiper-container {
17414
17483
  background: var(--f7-photobrowser-exposed-bg-color);
17415
17484
  }
17416
- .photo-browser-exposed .photo-browser-caption {
17485
+ .photo-browser-exposed .photo-browser-thumbs,
17486
+ .photo-browser-dark .photo-browser-thumbs,
17487
+ .photo-browser-exposed .toolbar,
17488
+ .photo-browser-dark .toolbar {
17489
+ background-color: var(--f7-photobrowser-dark-bars-bg-color);
17490
+ }
17491
+ .photo-browser-exposed .photo-browser-caption,
17492
+ .photo-browser-dark .photo-browser-caption {
17417
17493
  color: var(--f7-photobrowser-caption-dark-text-color);
17418
- background: var(--f7-photobrowser-caption-dark-bg-color);
17494
+ background-color: var(--f7-photobrowser-dark-bars-bg-color);
17419
17495
  }
17420
17496
  .view.with-photo-browser-page-exposed .navbar {
17421
17497
  opacity: 0;
17422
17498
  pointer-events: none;
17423
17499
  }
17500
+ .photo-browser-page .toolbar:before,
17501
+ .photo-browser-page .toolbar:after {
17502
+ display: none !important;
17503
+ }
17424
17504
  .photo-browser-page-dark .navbar-bg,
17425
- .navbar-photo-browser-dark .navbar-bg,
17426
- .photo-browser-page-dark .toolbar {
17505
+ .navbar-photo-browser-dark .navbar-bg {
17427
17506
  background: var(--f7-photobrowser-dark-bars-bg-color);
17428
17507
  }
17429
17508
  .photo-browser-page-dark .navbar-bg:before,
17430
17509
  .navbar-photo-browser-dark .navbar-bg:before,
17431
- .photo-browser-page-dark .toolbar:before,
17432
17510
  .photo-browser-page-dark .navbar-bg:after,
17433
- .navbar-photo-browser-dark .navbar-bg:after,
17434
- .photo-browser-page-dark .toolbar:after {
17511
+ .navbar-photo-browser-dark .navbar-bg:after {
17435
17512
  display: none !important;
17436
17513
  }
17437
17514
  .navbar-photo-browser-dark,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Framework7 8.0.0-beta.6
2
+ * Framework7 8.0.0-beta.7
3
3
  * Full featured mobile HTML framework for building iOS & Android apps
4
4
  * https://framework7.io/
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 24, 2023
10
+ * Released on: March 27, 2023
11
11
  */
12
12
 
13
13
  import $ from './shared/dom7.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Framework7 8.0.0-beta.6
2
+ * Framework7 8.0.0-beta.7
3
3
  * Full featured mobile HTML framework for building iOS & Android apps
4
4
  * https://framework7.io/
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Released under the MIT License
9
9
  *
10
- * Released on: March 24, 2023
10
+ * Released on: March 27, 2023
11
11
  */
12
12
 
13
13
  (function (global, factory) {
@@ -39931,12 +39931,31 @@
39931
39931
  class: "photo-browser-of"
39932
39932
  }, pb.params.navbarOfText), $jsx$1("span", {
39933
39933
  class: "photo-browser-total"
39934
- })), isPopup && $jsx$1("div", {
39934
+ })), isPopup && (pb.params.popupCloseLinkText || pb.params.popupCloseLinkIcon) && $jsx$1("div", {
39935
39935
  class: "right"
39936
39936
  }, $jsx$1("a", {
39937
39937
  class: "link popup-close",
39938
39938
  "data-popup": ".photo-browser-popup"
39939
- }, $jsx$1("span", null, pb.params.popupCloseLinkText)))));
39939
+ }, pb.params.popupCloseLinkIcon && pb.app.theme === 'ios' && $jsx$1("i", null, $jsx$1("svg", {
39940
+ xmlns: "http://www.w3.org/2000/svg",
39941
+ width: "56",
39942
+ height: "56",
39943
+ viewBox: "0 0 56 56"
39944
+ }, $jsx$1("path", {
39945
+ fill: "currentColor",
39946
+ d: "M 10.0234 43.0234 C 9.2266 43.8203 9.2031 45.1797 10.0234 45.9766 C 10.8438 46.7734 12.1797 46.7734 13.0000 45.9766 L 28.0000 30.9766 L 43.0000 45.9766 C 43.7969 46.7734 45.1563 46.7969 45.9766 45.9766 C 46.7734 45.1562 46.7734 43.8203 45.9766 43.0234 L 30.9531 28.0000 L 45.9766 13.0000 C 46.7734 12.2031 46.7969 10.8437 45.9766 10.0469 C 45.1328 9.2266 43.7969 9.2266 43.0000 10.0469 L 28.0000 25.0469 L 13.0000 10.0469 C 12.1797 9.2266 10.8203 9.2031 10.0234 10.0469 C 9.2266 10.8672 9.2266 12.2031 10.0234 13.0000 L 25.0234 28.0000 Z"
39947
+ }))), pb.params.popupCloseLinkIcon && pb.app.theme === 'md' && $jsx$1("i", null, $jsx$1("svg", {
39948
+ xmlns: "http://www.w3.org/2000/svg",
39949
+ height: "24px",
39950
+ viewBox: "0 0 24 24",
39951
+ width: "24px",
39952
+ fill: "currentColor"
39953
+ }, $jsx$1("path", {
39954
+ d: "M0 0h24v24H0V0z",
39955
+ fill: "none"
39956
+ }), $jsx$1("path", {
39957
+ d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
39958
+ }))), pb.params.popupCloseLinkText && $jsx$1("span", null, pb.params.popupCloseLinkText)))));
39940
39959
  }
39941
39960
  renderToolbar() {
39942
39961
  const pb = this;
@@ -39956,6 +39975,16 @@
39956
39975
  class: `icon icon-forward ${iconsColor ? `color-${iconsColor}` : ''}`
39957
39976
  }))));
39958
39977
  }
39978
+ renderThumbs() {
39979
+ const pb = this;
39980
+ return $jsx$1("div", {
39981
+ class: "toolbar toolbar-bottom photo-browser-thumbs"
39982
+ }, $jsx$1("div", {
39983
+ class: "swiper"
39984
+ }, $jsx$1("div", {
39985
+ class: "swiper-wrapper"
39986
+ }, pb.params.thumbs.map((thumb, index) => pb.renderThumb(thumb, index)))));
39987
+ }
39959
39988
  renderCaption(caption, index) {
39960
39989
  const pb = this;
39961
39990
  if (pb.params.renderCaption) return pb.params.renderCaption.call(pb, caption, index);
@@ -39999,6 +40028,18 @@
39999
40028
  src: photo.url ? photo.url : photo
40000
40029
  })));
40001
40030
  }
40031
+ renderThumb(thumb, index) {
40032
+ const pb = this;
40033
+ const url = typeof thumb === 'string' ? thumb : thumb.url;
40034
+ if (pb.params.renderThumb) return pb.params.renderThumb.call(pb, thumb, index);
40035
+ return $jsx$1("div", {
40036
+ class: "photo-browser-thumbs-slide swiper-slide",
40037
+ "data-swiper-slide-index": index
40038
+ }, url && $jsx$1("img", {
40039
+ src: url,
40040
+ loading: "lazy"
40041
+ }));
40042
+ }
40002
40043
  render() {
40003
40044
  const pb = this;
40004
40045
  if (pb.params.render) return pb.params.render.call(pb, pb.params);
@@ -40009,7 +40050,7 @@
40009
40050
  }, $jsx$1("div", {
40010
40051
  class: `page photo-browser-page photo-browser-page-${pb.params.theme} no-toolbar ${!pb.params.navbar ? 'no-navbar' : ''}`,
40011
40052
  "data-name": "photo-browser-page"
40012
- }, pb.params.navbar && pb.renderNavbar(), pb.params.toolbar && pb.renderToolbar(), $jsx$1("div", {
40053
+ }, pb.params.navbar && pb.renderNavbar(), pb.params.toolbar && pb.renderToolbar(), pb.params.thumbs && pb.params.thumbs.length && pb.renderThumbs(), $jsx$1("div", {
40013
40054
  class: `photo-browser-captions photo-browser-captions-${pb.params.captionsTheme || pb.params.theme}`
40014
40055
  }, pb.params.photos.map((photo, index) => {
40015
40056
  if (photo.caption) return pb.renderCaption(photo.caption, index);
@@ -40062,11 +40103,15 @@
40062
40103
  pb.slides = pb.$el.find('.photo-browser-slide');
40063
40104
  pb.$captionsContainerEl = pb.$el.find('.photo-browser-captions');
40064
40105
  pb.captions = pb.$el.find('.photo-browser-caption');
40106
+ const hasThumbs = pb.params.thumbs && pb.params.thumbs.length > 0;
40065
40107
 
40066
40108
  // Init Swiper
40067
40109
  let clickTimeout;
40110
+ let preventThumbsSlide;
40111
+ let preventMainSlide;
40112
+ const initialSlide = pb.activeIndex;
40068
40113
  const swiperParams = extend$2({}, pb.params.swiper, {
40069
- initialSlide: pb.activeIndex,
40114
+ initialSlide,
40070
40115
  // cssMode:
40071
40116
  // typeof pb.params.swiper.cssMode === 'undefined' && (app.device.ios || app.device.android)
40072
40117
  // ? true
@@ -40089,6 +40134,13 @@
40089
40134
  },
40090
40135
  slideChange() {
40091
40136
  const swiper = this;
40137
+ if (hasThumbs && pb.thumbsSwiper && !preventMainSlide) {
40138
+ preventThumbsSlide = true;
40139
+ pb.thumbsSwiper.slideTo(pb.swiper.activeIndex);
40140
+ setTimeout(() => {
40141
+ preventThumbsSlide = false;
40142
+ });
40143
+ }
40092
40144
  pb.onSlideChange(swiper);
40093
40145
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
40094
40146
  args[_key] = arguments[_key];
@@ -40160,6 +40212,34 @@
40160
40212
  if (pb.activeIndex === 0 || pb.params.virtualSlides) {
40161
40213
  pb.onSlideChange(pb.swiper);
40162
40214
  }
40215
+ if (hasThumbs) {
40216
+ const thumbsSwiperParams = {
40217
+ el: pb.$el.find('.photo-browser-thumbs .swiper')[0],
40218
+ slidesPerView: 'auto',
40219
+ centeredSlides: true,
40220
+ spaceBetween: 4,
40221
+ watchSlidesProgress: true,
40222
+ initialSlide,
40223
+ on: {
40224
+ touchMove() {
40225
+ preventMainSlide = true;
40226
+ },
40227
+ touchEnd() {
40228
+ preventMainSlide = false;
40229
+ },
40230
+ slideChange(s) {
40231
+ if (preventThumbsSlide) return;
40232
+ pb.swiper.slideTo(s.activeIndex, 0);
40233
+ },
40234
+ click(s) {
40235
+ if (!s.clickedSlide) return;
40236
+ const index = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10);
40237
+ s.slideTo(index, 0);
40238
+ }
40239
+ }
40240
+ };
40241
+ pb.thumbsSwiper = app.swiper ? app.swiper.create(thumbsSwiperParams) : new window.Swiper(thumbsSwiperParams);
40242
+ }
40163
40243
  if (pb.$el) {
40164
40244
  pb.$el.trigger('photobrowser:open');
40165
40245
  }
@@ -40185,6 +40265,11 @@
40185
40265
  pb.swiper = null;
40186
40266
  delete pb.swiper;
40187
40267
  }
40268
+ if (pb.thumbsSwiper && pb.thumbsSwiper.destroy) {
40269
+ pb.thumbsSwiper.destroy(true, false);
40270
+ pb.thumbsSwiper = null;
40271
+ delete pb.thumbsSwiper;
40272
+ }
40188
40273
  if (pb.$el) {
40189
40274
  pb.$el.trigger('photobrowser:close');
40190
40275
  }
@@ -40398,6 +40483,7 @@
40398
40483
  params: {
40399
40484
  photoBrowser: {
40400
40485
  photos: [],
40486
+ thumbs: [],
40401
40487
  exposition: true,
40402
40488
  expositionHideCaptions: false,
40403
40489
  type: 'standalone',
@@ -40409,7 +40495,8 @@
40409
40495
  popupPush: false,
40410
40496
  swipeToClose: true,
40411
40497
  pageBackLinkText: 'Back',
40412
- popupCloseLinkText: 'Close',
40498
+ popupCloseLinkText: undefined,
40499
+ popupCloseLinkIcon: true,
40413
40500
  navbarOfText: 'of',
40414
40501
  navbarShowCount: undefined,
40415
40502
  view: undefined,
@@ -40424,6 +40511,7 @@
40424
40511
  renderObject: undefined,
40425
40512
  renderLazyPhoto: undefined,
40426
40513
  renderPhoto: undefined,
40514
+ renderThumb: undefined,
40427
40515
  renderPage: undefined,
40428
40516
  renderPopup: undefined,
40429
40517
  renderStandalone: undefined,