framework7 8.0.2 → 8.0.4

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.
Files changed (39) hide show
  1. package/components/area-chart/area-chart-rtl.css +1 -1
  2. package/components/area-chart/area-chart-vars.less +7 -1
  3. package/components/area-chart/area-chart.css +1 -1
  4. package/components/button/button-vars.less +2 -0
  5. package/components/calendar/calendar-class.js +4 -4
  6. package/components/card/card.js +4 -4
  7. package/components/chip/chip-ios.less +8 -0
  8. package/components/chip/chip-md.less +8 -0
  9. package/components/chip/chip-rtl.css +1 -1
  10. package/components/chip/chip.css +1 -1
  11. package/components/chip/chip.less +6 -10
  12. package/components/input/input-rtl.css +1 -1
  13. package/components/input/input.css +1 -1
  14. package/components/input/input.less +0 -3
  15. package/components/popup/popup-class.js +4 -3
  16. package/components/pull-to-refresh/pull-to-refresh-class.js +3 -1
  17. package/components/sheet/sheet-class.js +2 -2
  18. package/framework7-bundle-rtl.css +16 -7
  19. package/framework7-bundle-rtl.min.css +4 -4
  20. package/framework7-bundle.css +16 -7
  21. package/framework7-bundle.esm.js +2 -2
  22. package/framework7-bundle.js +28 -19
  23. package/framework7-bundle.js.map +1 -1
  24. package/framework7-bundle.less +2 -2
  25. package/framework7-bundle.min.css +4 -4
  26. package/framework7-bundle.min.js +3 -3
  27. package/framework7-bundle.min.js.map +1 -1
  28. package/framework7-lite-bundle.esm.js +2 -2
  29. package/framework7-lite.esm.js +2 -2
  30. package/framework7-rtl.css +4 -2
  31. package/framework7-rtl.min.css +3 -3
  32. package/framework7.css +4 -2
  33. package/framework7.esm.js +2 -2
  34. package/framework7.less +2 -2
  35. package/framework7.min.css +3 -3
  36. package/modules/router/swipe-back.js +4 -1
  37. package/modules/touch/touch.js +3 -0
  38. package/package.json +2 -2
  39. package/shared/utils.js +2 -2
@@ -289,6 +289,7 @@ function SwipeBack(r) {
289
289
  }
290
290
  }
291
291
  function handleTouchStart(e) {
292
+ if (!e.isTrusted) return;
292
293
  const swipeBackEnabled = params[`${app.theme}SwipeBack`];
293
294
  if (!allowViewTouchMove || !swipeBackEnabled || isTouched || app.swipeout && app.swipeout.el || !router.allowPageChange) return;
294
295
  if ($(e.target).closest('.range-slider, .calendar-months').length > 0) return;
@@ -302,6 +303,7 @@ function SwipeBack(r) {
302
303
  dynamicNavbar = router.dynamicNavbar;
303
304
  }
304
305
  function handleTouchMove(e) {
306
+ if (!e.isTrusted) return;
305
307
  if (!isTouched) return;
306
308
  const pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
307
309
  const pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
@@ -422,7 +424,8 @@ function SwipeBack(r) {
422
424
  progress: percentage
423
425
  });
424
426
  }
425
- function handleTouchEnd() {
427
+ function handleTouchEnd(e) {
428
+ if (!e.isTrusted) return;
426
429
  app.preventSwipePanelBySwipeBack = false;
427
430
  if (!isTouched || !isMoved) {
428
431
  isTouched = false;
@@ -184,6 +184,7 @@ function initTouch() {
184
184
  let isTouchMoveActivable = false;
185
185
  let touchmoveActivableEl = null;
186
186
  function handleTouchStart(e) {
187
+ if (!e.isTrusted) return true;
187
188
  isMoved = false;
188
189
  tapHoldFired = false;
189
190
  preventClick = false;
@@ -228,6 +229,7 @@ function initTouch() {
228
229
  return true;
229
230
  }
230
231
  function handleTouchMove(e) {
232
+ if (!e.isTrusted) return;
231
233
  let touch;
232
234
  let distance;
233
235
  let shouldRemoveActive = true;
@@ -288,6 +290,7 @@ function initTouch() {
288
290
  }
289
291
  }
290
292
  function handleTouchEnd(e) {
293
+ if (!e.isTrusted) return true;
291
294
  isScrolling = undefined;
292
295
  isSegmentedStrong = false;
293
296
  segmentedStrongEl = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framework7",
3
- "version": "8.0.2",
3
+ "version": "8.0.4",
4
4
  "description": "Full featured mobile HTML framework for building iOS & Android apps",
5
5
  "type": "module",
6
6
  "exports": {
@@ -436,5 +436,5 @@
436
436
  "ssr-window": "^4.0.2",
437
437
  "swiper": "^9.2.0"
438
438
  },
439
- "releaseDate": "April 12, 2023"
439
+ "releaseDate": "May 3, 2023"
440
440
  }
package/shared/utils.js CHANGED
@@ -425,7 +425,7 @@ export function colorThemeCSSStyles(colors) {
425
425
  return res;
426
426
  };
427
427
  const colorVars = colorThemeCSSProperties(colors.primary);
428
- const primary = [`:root{`, stringifyObject(colorVars.light), `--swiper-theme-color:var(--f7-theme-color);`, ...Object.keys(colors).map(colorName => `--f7-color-${colorName}: ${colors[colorName]};`), `}`, `.dark{`, stringifyObject(colorVars.dark), `}`, `.ios{`, stringifyObject(colorVars.ios), '}', `.md{`, stringifyObject(colorVars.md), '}'].join('');
428
+ const primary = [`:root{`, stringifyObject(colorVars.light), `--swiper-theme-color:var(--f7-theme-color);`, ...Object.keys(colors).map(colorName => `--f7-color-${colorName}: ${colors[colorName]};`), `}`, `.dark{`, stringifyObject(colorVars.dark), `}`, `.ios, .ios .dark{`, stringifyObject(colorVars.ios), '}', `.md, .md .dark{`, stringifyObject(colorVars.md), '}'].join('');
429
429
  const restVars = {};
430
430
  Object.keys(colors).forEach(colorName => {
431
431
  const colorValue = colors[colorName];
@@ -521,7 +521,7 @@ export function colorThemeCSSStyles(colors) {
521
521
  const lightString = colorName === 'white' ? whiteColorVars : colorName === 'black' ? blackColorVars : stringifyObject(light);
522
522
  const darkString = colorName === 'white' ? whiteColorVars : colorName === 'black' ? blackColorVars : stringifyObject(dark);
523
523
  /* eslint-enable */
524
- rest += [`.color-${colorName} {`, lightString, `--swiper-theme-color: var(--f7-theme-color);`, `}`, `.color-${colorName}.dark, .color-${colorName} .dark, .dark .color-${colorName} {`, darkString, `--swiper-theme-color: var(--f7-theme-color);`, `}`, `.ios .color-${colorName}, .ios.color-${colorName} {`, stringifyObject(ios), `}`, `.md .color-${colorName}, .md.color-${colorName} {`, stringifyObject(md), `}`,
524
+ rest += [`.color-${colorName} {`, lightString, `--swiper-theme-color: var(--f7-theme-color);`, `}`, `.color-${colorName}.dark, .color-${colorName} .dark, .dark .color-${colorName} {`, darkString, `--swiper-theme-color: var(--f7-theme-color);`, `}`, `.ios .color-${colorName}, .ios.color-${colorName}, .ios .dark .color-${colorName}, .ios .dark.color-${colorName} {`, stringifyObject(ios), `}`, `.md .color-${colorName}, .md.color-${colorName}, .md .dark .color-${colorName}, .md .dark.color-${colorName} {`, stringifyObject(md), `}`,
525
525
  // text color
526
526
  `.text-color-${colorName} {`, `--f7-theme-color-text-color: ${colors[colorName]};`, `}`,
527
527
  // bg color