framework7 8.3.3 → 9.0.0-beta.1
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/components/actions/actions-ios.less +22 -15
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions-vars.less +4 -7
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.js +2 -8
- package/components/actions/actions.less +0 -3
- package/components/app/app-class.d.ts +2 -0
- package/components/app/app-class.js +19 -15
- package/components/app/app-vars.less +41 -6
- package/components/app/app.less +1 -1
- package/components/area-chart/area-chart-class.js +18 -31
- package/components/area-chart/area-chart-rtl.css +1 -1
- package/components/area-chart/area-chart.css +1 -1
- package/components/autocomplete/autocomplete-class.js +13 -14
- package/components/autocomplete/autocomplete-ios.less +16 -0
- package/components/autocomplete/autocomplete-rtl.css +1 -1
- package/components/autocomplete/autocomplete.css +1 -1
- package/components/autocomplete/autocomplete.d.ts +3 -3
- package/components/autocomplete/autocomplete.js +3 -3
- package/components/autocomplete/autocomplete.less +7 -1
- package/components/block/block-vars.less +6 -6
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -1
- package/components/breadcrumbs/breadcrumbs.css +1 -1
- package/components/button/button-vars.less +13 -12
- package/components/button/button.less +2 -1
- package/components/calendar/calendar-class.js +20 -17
- package/components/calendar/calendar-ios.less +43 -0
- package/components/calendar/calendar-md.less +3 -0
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar-vars.less +24 -19
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.d.ts +1 -1
- package/components/calendar/calendar.js +5 -8
- package/components/calendar/calendar.less +4 -2
- package/components/card/card-rtl.css +1 -1
- package/components/card/card-vars.less +5 -5
- package/components/card/card.css +1 -1
- package/components/card/card.js +3 -18
- package/components/card/card.less +1 -1
- package/components/color-picker/color-picker-class.js +11 -23
- package/components/color-picker/color-picker-ios.less +9 -0
- package/components/color-picker/color-picker-md.less +15 -0
- package/components/color-picker/color-picker-rtl.css +1 -1
- package/components/color-picker/color-picker-vars.less +9 -3
- package/components/color-picker/color-picker.css +1 -1
- package/components/color-picker/color-picker.d.ts +1 -2
- package/components/color-picker/color-picker.js +3 -7
- package/components/color-picker/color-picker.less +5 -25
- package/components/color-picker/modules/alpha-slider.js +2 -0
- package/components/color-picker/modules/brightness-slider.js +2 -0
- package/components/color-picker/modules/hs-spectrum.js +1 -2
- package/components/color-picker/modules/hsb-sliders.js +6 -0
- package/components/color-picker/modules/hue-slider.js +2 -0
- package/components/color-picker/modules/rgb-bars.js +6 -0
- package/components/color-picker/modules/rgb-sliders.js +6 -0
- package/components/color-picker/modules/sb-spectrum.js +1 -2
- package/components/color-picker/modules/wheel.js +1 -2
- package/components/data-table/data-table-class.js +1 -4
- package/components/data-table/data-table-ios.less +1 -1
- package/components/data-table/data-table-md.less +4 -2
- package/components/data-table/data-table-rtl.css +1 -1
- package/components/data-table/data-table.css +1 -1
- package/components/data-table/data-table.less +4 -4
- package/components/dialog/dialog-class.js +6 -3
- package/components/dialog/dialog-ios.less +10 -34
- package/components/dialog/dialog-md.less +2 -22
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog-vars.less +8 -10
- package/components/dialog/dialog.css +1 -1
- package/components/dialog/dialog.js +9 -27
- package/components/dialog/dialog.less +6 -25
- package/components/fab/fab-ios.less +2 -0
- package/components/fab/fab-rtl.css +1 -1
- package/components/fab/fab-vars.less +30 -6
- package/components/fab/fab.css +1 -1
- package/components/fab/fab.js +3 -12
- package/components/gauge/gauge-class.js +2 -8
- package/components/icon/icon-ios.less +10 -0
- package/components/icon/icon-md.less +9 -0
- package/components/icon/icon.less +2 -1
- package/components/input/input-ios.less +3 -2
- package/components/input/input-rtl.css +1 -1
- package/components/input/input.css +1 -1
- package/components/input/input.js +2 -5
- package/components/list/list-vars.less +7 -5
- package/components/list/list.less +1 -1
- package/components/list-index/list-index-class.js +3 -7
- package/components/login-screen/login-screen.js +2 -8
- package/components/login-screen/login-screen.less +1 -0
- package/components/messagebar/messagebar-class.js +5 -20
- package/components/messagebar/messagebar-ios.less +19 -14
- package/components/messagebar/messagebar-md.less +3 -0
- package/components/messagebar/messagebar-rtl.css +1 -1
- package/components/messagebar/messagebar-vars.less +12 -15
- package/components/messagebar/messagebar.css +1 -1
- package/components/messagebar/messagebar.less +4 -5
- package/components/messages/messages-class.js +25 -52
- package/components/messages/messages-ios.less +6 -2
- package/components/messages/messages-rtl.css +1 -1
- package/components/messages/messages-vars.less +1 -1
- package/components/messages/messages.css +1 -1
- package/components/navbar/navbar-ios.less +48 -672
- package/components/navbar/navbar-md.less +41 -1
- package/components/navbar/navbar-vars.less +4 -3
- package/components/navbar/navbar.js +28 -185
- package/components/navbar/navbar.less +8 -66
- package/components/notification/notification-class.js +6 -6
- package/components/notification/notification-ios.less +3 -8
- package/components/notification/notification-md.less +1 -20
- package/components/notification/notification-rtl.css +1 -1
- package/components/notification/notification-vars.less +13 -16
- package/components/notification/notification.css +1 -1
- package/components/notification/notification.less +8 -1
- package/components/page/page-ios.less +1 -8
- package/components/page/page-md.less +12 -11
- package/components/page/page.less +14 -12
- package/components/panel/panel-class.js +7 -28
- package/components/panel/panel-ios.less +4 -0
- package/components/panel/panel-rtl.css +2 -2
- package/components/panel/panel-vars.less +8 -5
- package/components/panel/panel.css +2 -2
- package/components/panel/panel.js +8 -32
- package/components/panel/panel.less +9 -9
- package/components/panel/resizable-panel.js +2 -4
- package/components/photo-browser/photo-browser-class.js +12 -47
- package/components/photo-browser/photo-browser-rtl.css +1 -1
- package/components/photo-browser/photo-browser-vars.less +8 -10
- package/components/photo-browser/photo-browser.css +1 -1
- package/components/photo-browser/photo-browser.d.ts +2 -4
- package/components/photo-browser/photo-browser.js +1 -3
- package/components/photo-browser/photo-browser.less +15 -71
- package/components/picker/picker-class.js +4 -5
- package/components/picker/picker-ios.less +6 -1
- package/components/picker/picker-md.less +9 -0
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker-vars.less +1 -1
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.d.ts +1 -1
- package/components/picker/picker.js +2 -5
- package/components/picker/picker.less +0 -4
- package/components/pie-chart/pie-chart-class.js +7 -14
- package/components/popover/popover-class.js +22 -62
- package/components/popover/popover-ios.less +66 -2
- package/components/popover/popover-md.less +2 -27
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover-vars.less +2 -3
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.d.ts +0 -2
- package/components/popover/popover.js +2 -9
- package/components/popover/popover.less +28 -50
- package/components/popup/popup-class.js +15 -9
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup-vars.less +2 -2
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.js +2 -8
- package/components/popup/popup.less +6 -6
- package/components/preloader/preloader.js +2 -8
- package/components/progressbar/progressbar-md.less +12 -0
- package/components/progressbar/progressbar-rtl.css +1 -1
- package/components/progressbar/progressbar-vars.less +6 -5
- package/components/progressbar/progressbar.css +1 -1
- package/components/progressbar/progressbar.js +3 -12
- package/components/progressbar/progressbar.less +6 -0
- package/components/pull-to-refresh/pull-to-refresh-class.js +5 -12
- package/components/range/range-class.js +34 -27
- package/components/range/range-ios.less +60 -0
- package/components/range/range-md.less +67 -4
- package/components/range/range-rtl.css +1 -1
- package/components/range/range-vars.less +18 -13
- package/components/range/range.css +1 -1
- package/components/range/range.d.ts +3 -1
- package/components/range/range.js +2 -8
- package/components/range/range.less +11 -24
- package/components/searchbar/searchbar-class.js +7 -8
- package/components/searchbar/searchbar-ios.less +37 -13
- package/components/searchbar/searchbar-md.less +5 -0
- package/components/searchbar/searchbar-rtl.css +1 -1
- package/components/searchbar/searchbar-vars.less +13 -16
- package/components/searchbar/searchbar.css +1 -1
- package/components/searchbar/searchbar.js +4 -32
- package/components/searchbar/searchbar.less +4 -5
- package/components/sheet/sheet-class.js +21 -17
- package/components/sheet/sheet-ios.less +10 -0
- package/components/sheet/sheet-md.less +14 -0
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet-vars.less +5 -9
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.js +2 -8
- package/components/sheet/sheet.less +5 -17
- package/components/skeleton/skeleton-rtl.css +1 -1
- package/components/skeleton/skeleton.css +1 -1
- package/components/smart-select/smart-select-class.js +15 -20
- package/components/smart-select/smart-select.d.ts +5 -7
- package/components/smart-select/smart-select.js +4 -4
- package/components/sortable/sortable.js +8 -27
- package/components/statusbar/statusbar.js +1 -4
- package/components/stepper/stepper-rtl.css +1 -1
- package/components/stepper/stepper-vars.less +3 -3
- package/components/stepper/stepper.css +1 -1
- package/components/stepper/stepper.js +2 -8
- package/components/subnavbar/subnavbar-ios.less +16 -1
- package/components/subnavbar/subnavbar-md.less +1 -1
- package/components/subnavbar/subnavbar-vars.less +12 -6
- package/components/subnavbar/subnavbar.less +5 -6
- package/components/swipeout/swipeout-ios.less +37 -0
- package/components/swipeout/swipeout-md.less +56 -0
- package/components/swipeout/swipeout-rtl.css +1 -1
- package/components/swipeout/swipeout-vars.less +13 -2
- package/components/swipeout/swipeout.css +1 -1
- package/components/swipeout/swipeout.js +102 -35
- package/components/swipeout/swipeout.less +20 -44
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/tabs/tabs.js +3 -9
- package/components/text-editor/text-editor-class.js +1 -1
- package/components/text-editor/text-editor-rtl.css +1 -1
- package/components/text-editor/text-editor.css +1 -1
- package/components/timeline/timeline-ios.less +0 -5
- package/components/timeline/timeline-md.less +0 -5
- package/components/timeline/timeline-rtl.css +1 -1
- package/components/timeline/timeline-vars.less +1 -17
- package/components/timeline/timeline.css +1 -1
- package/components/timeline/timeline.less +0 -196
- package/components/toast/toast-class.js +2 -2
- package/components/toast/toast-ios.less +2 -0
- package/components/toast/toast-rtl.css +1 -1
- package/components/toast/toast-vars.less +2 -4
- package/components/toast/toast.css +1 -1
- package/components/toast/toast.less +1 -1
- package/components/toggle/toggle-class.js +5 -12
- package/components/toggle/toggle-ios.less +68 -50
- package/components/toggle/toggle-rtl.css +1 -1
- package/components/toggle/toggle-vars.less +2 -2
- package/components/toggle/toggle.css +1 -1
- package/components/toolbar/tabbar-highlight.js +134 -0
- package/components/toolbar/toolbar-ios.less +152 -14
- package/components/toolbar/toolbar-md.less +77 -3
- package/components/toolbar/toolbar-vars.less +14 -10
- package/components/toolbar/toolbar.js +32 -13
- package/components/toolbar/toolbar.less +8 -56
- package/components/tooltip/tooltip-class.js +13 -16
- package/components/tooltip/tooltip.js +0 -16
- package/components/touch-highlight/touch-highlight-ios.less +17 -0
- package/components/touch-highlight/touch-highlight-md.less +2 -0
- package/components/touch-highlight/touch-highlight-vars.less +8 -0
- package/components/touch-highlight/touch-highlight.d.ts +25 -0
- package/components/touch-highlight/touch-highlight.js +123 -0
- package/components/touch-highlight/touch-highlight.less +9 -0
- package/components/touch-ripple/touch-ripple.js +1 -4
- package/components/view/resizable-view.js +2 -4
- package/components/view/view-class.js +1 -15
- package/components/view/view.d.ts +0 -4
- package/components/view/view.js +1 -5
- package/components/virtual-list/virtual-list-class.js +2 -8
- package/framework7-bundle-rtl.css +2284 -3019
- package/framework7-bundle-rtl.min.css +9 -7
- package/framework7-bundle.css +2245 -2978
- package/framework7-bundle.esm.js +5 -4
- package/framework7-bundle.js +7170 -6469
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +4 -3
- package/framework7-bundle.min.css +9 -7
- package/framework7-bundle.min.js +4 -4
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +5 -4
- package/framework7-lite.esm.js +5 -4
- package/framework7-rtl.css +509 -844
- package/framework7-rtl.min.css +8 -6
- package/framework7-types.d.ts +5 -1
- package/framework7.css +509 -843
- package/framework7.d.ts +4 -0
- package/framework7.esm.js +5 -4
- package/framework7.less +4 -3
- package/framework7.min.css +8 -6
- package/less/mixins.less +10 -12
- package/modules/component/$h.js +1 -4
- package/modules/component/$jsx.js +1 -4
- package/modules/component/component-class.js +49 -114
- package/modules/component/component.js +6 -7
- package/modules/component/eventslisteners.js +1 -4
- package/modules/component/snabbdom/modules/hero.js +0 -1
- package/modules/component/snabbdom/modules/style.js +1 -1
- package/modules/component/vdom.js +17 -29
- package/modules/router/back.js +22 -96
- package/modules/router/clear-previous-history.js +1 -7
- package/modules/router/component-loader.js +23 -32
- package/modules/router/modal.js +1 -4
- package/modules/router/navigate.js +28 -167
- package/modules/router/redirect.js +1 -5
- package/modules/router/router-class.js +21 -288
- package/modules/router/swipe-back.js +10 -318
- package/modules/router/tab.js +1 -4
- package/modules/store/create-store.js +2 -8
- package/modules/touch/touch.d.ts +5 -3
- package/modules/touch/touch.js +22 -36
- package/package.json +4 -4
- package/shared/$jsx.js +1 -4
- package/shared/class.js +5 -26
- package/shared/constructor-methods.js +4 -19
- package/shared/events-class.js +3 -12
- package/shared/get-device.js +4 -11
- package/shared/get-support.d.ts +0 -6
- package/shared/get-support.js +1 -20
- package/shared/material-color-utils.js +2102 -693
- package/shared/material-colors.js +94 -23
- package/shared/modal-methods.js +2 -8
- package/shared/utils.js +23 -45
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import $ from '../../shared/dom7.js';
|
|
2
2
|
import History from '../../shared/history.js';
|
|
3
|
-
import { getSupport } from '../../shared/get-support.js';
|
|
4
3
|
import { getDevice } from '../../shared/get-device.js';
|
|
5
4
|
import { now } from '../../shared/utils.js';
|
|
6
5
|
function SwipeBack(r) {
|
|
7
6
|
const router = r;
|
|
8
7
|
const {
|
|
9
8
|
$el,
|
|
10
|
-
$navbarsEl,
|
|
11
9
|
app,
|
|
12
10
|
params
|
|
13
11
|
} = router;
|
|
14
|
-
const support = getSupport();
|
|
15
12
|
const device = getDevice();
|
|
16
13
|
let isTouched = false;
|
|
17
14
|
let isMoved = false;
|
|
@@ -23,271 +20,12 @@ function SwipeBack(r) {
|
|
|
23
20
|
let touchesDiff;
|
|
24
21
|
let allowViewTouchMove = true;
|
|
25
22
|
let touchStartTime;
|
|
26
|
-
let $currentNavbarEl = [];
|
|
27
|
-
let $previousNavbarEl = [];
|
|
28
|
-
let dynamicNavbar;
|
|
29
23
|
let $pageShadowEl;
|
|
30
24
|
let $pageOpacityEl;
|
|
31
|
-
let animatableNavEls;
|
|
32
25
|
const paramsSwipeBackAnimateShadow = params[`${app.theme}SwipeBackAnimateShadow`];
|
|
33
26
|
const paramsSwipeBackAnimateOpacity = params[`${app.theme}SwipeBackAnimateOpacity`];
|
|
34
27
|
const paramsSwipeBackActiveArea = params[`${app.theme}SwipeBackActiveArea`];
|
|
35
28
|
const paramsSwipeBackThreshold = params[`${app.theme}SwipeBackThreshold`];
|
|
36
|
-
const transformOrigin = app.rtl ? 'right center' : 'left center';
|
|
37
|
-
const transformOriginTitleLarge = app.rtl ? 'calc(100% - var(--f7-navbar-large-title-padding-left) - var(--f7-safe-area-left)) center' : 'calc(var(--f7-navbar-large-title-padding-left) + var(--f7-safe-area-left)) center';
|
|
38
|
-
function animatableNavElements() {
|
|
39
|
-
const els = [];
|
|
40
|
-
const inverter = app.rtl ? -1 : 1;
|
|
41
|
-
const currentNavIsTransparent = $currentNavbarEl.hasClass('navbar-transparent') && !$currentNavbarEl.hasClass('navbar-large') && !$currentNavbarEl.hasClass('navbar-transparent-visible');
|
|
42
|
-
const currentNavIsLarge = $currentNavbarEl.hasClass('navbar-large');
|
|
43
|
-
const currentNavIsCollapsed = $currentNavbarEl.hasClass('navbar-large-collapsed');
|
|
44
|
-
const currentNavIsLargeTransparent = $currentNavbarEl.hasClass('navbar-large-transparent') || $currentNavbarEl.hasClass('navbar-large') && $currentNavbarEl.hasClass('navbar-transparent');
|
|
45
|
-
const previousNavIsTransparent = $previousNavbarEl.hasClass('navbar-transparent') && !$previousNavbarEl.hasClass('navbar-large') && !$previousNavbarEl.hasClass('navbar-transparent-visible');
|
|
46
|
-
const previousNavIsLarge = $previousNavbarEl.hasClass('navbar-large');
|
|
47
|
-
const previousNavIsCollapsed = $previousNavbarEl.hasClass('navbar-large-collapsed');
|
|
48
|
-
const previousNavIsLargeTransparent = $previousNavbarEl.hasClass('navbar-large-transparent') || $previousNavbarEl.hasClass('navbar-large') && $previousNavbarEl.hasClass('navbar-transparent');
|
|
49
|
-
const fromLarge = currentNavIsLarge && !currentNavIsCollapsed;
|
|
50
|
-
const toLarge = previousNavIsLarge && !previousNavIsCollapsed;
|
|
51
|
-
const $currentNavElements = $currentNavbarEl.find('.left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg');
|
|
52
|
-
const $previousNavElements = $previousNavbarEl.find('.left, .title, .right, .subnavbar, .fading, .title-large, .navbar-bg');
|
|
53
|
-
let activeNavBackIconText;
|
|
54
|
-
let previousNavBackIconText;
|
|
55
|
-
if (params.iosAnimateNavbarBackIcon) {
|
|
56
|
-
if ($currentNavbarEl.hasClass('sliding') || $currentNavbarEl.find('.navbar-inner.sliding').length) {
|
|
57
|
-
activeNavBackIconText = $currentNavbarEl.find('.left').find('.back .icon + span').eq(0);
|
|
58
|
-
} else {
|
|
59
|
-
activeNavBackIconText = $currentNavbarEl.find('.left.sliding').find('.back .icon + span').eq(0);
|
|
60
|
-
}
|
|
61
|
-
if ($previousNavbarEl.hasClass('sliding') || $previousNavbarEl.find('.navbar-inner.sliding').length) {
|
|
62
|
-
previousNavBackIconText = $previousNavbarEl.find('.left').find('.back .icon + span').eq(0);
|
|
63
|
-
} else {
|
|
64
|
-
previousNavBackIconText = $previousNavbarEl.find('.left.sliding').find('.back .icon + span').eq(0);
|
|
65
|
-
}
|
|
66
|
-
if (activeNavBackIconText.length) {
|
|
67
|
-
$previousNavElements.each(el => {
|
|
68
|
-
if (!$(el).hasClass('title')) return;
|
|
69
|
-
el.f7NavbarLeftOffset += activeNavBackIconText.prev('.icon')[0].offsetWidth;
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
$currentNavElements.each(navEl => {
|
|
74
|
-
const $navEl = $(navEl);
|
|
75
|
-
const isSubnavbar = $navEl.hasClass('subnavbar');
|
|
76
|
-
const isLeft = $navEl.hasClass('left');
|
|
77
|
-
const isTitle = $navEl.hasClass('title');
|
|
78
|
-
const isBg = $navEl.hasClass('navbar-bg');
|
|
79
|
-
if ((isTitle || isBg) && currentNavIsTransparent) return;
|
|
80
|
-
if (!fromLarge && $navEl.hasClass('.title-large')) return;
|
|
81
|
-
const el = {
|
|
82
|
-
el: navEl
|
|
83
|
-
};
|
|
84
|
-
if (fromLarge) {
|
|
85
|
-
if (isTitle) return;
|
|
86
|
-
if ($navEl.hasClass('title-large')) {
|
|
87
|
-
if (els.indexOf(el) < 0) els.push(el);
|
|
88
|
-
el.overflow = 'visible';
|
|
89
|
-
$navEl.find('.title-large-text').each(subNavEl => {
|
|
90
|
-
els.push({
|
|
91
|
-
el: subNavEl,
|
|
92
|
-
transform: progress => `translateX(${progress * 100 * inverter}%)`
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (toLarge) {
|
|
99
|
-
if (!fromLarge) {
|
|
100
|
-
if ($navEl.hasClass('title-large')) {
|
|
101
|
-
if (els.indexOf(el) < 0) els.push(el);
|
|
102
|
-
el.opacity = 0;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if (isLeft) {
|
|
106
|
-
if (els.indexOf(el) < 0) els.push(el);
|
|
107
|
-
el.opacity = progress => 1 - progress ** 0.33;
|
|
108
|
-
$navEl.find('.back span').each(subNavEl => {
|
|
109
|
-
els.push({
|
|
110
|
-
el: subNavEl,
|
|
111
|
-
'transform-origin': transformOrigin,
|
|
112
|
-
transform: progress => `translateX(calc(${progress} * (var(--f7-navbarTitleLargeOffset) - var(--f7-navbarLeftTextOffset)))) translateY(calc(${progress} * (var(--f7-navbar-large-title-height) - var(--f7-navbar-large-title-padding-vertical) / 2))) scale(${1 + 1 * progress})`
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
if (isBg) {
|
|
119
|
-
if (els.indexOf(el) < 0) els.push(el);
|
|
120
|
-
if (!fromLarge && !toLarge) {
|
|
121
|
-
if (currentNavIsCollapsed) {
|
|
122
|
-
if (currentNavIsLargeTransparent) {
|
|
123
|
-
el.className = 'ios-swipeback-navbar-bg-large';
|
|
124
|
-
}
|
|
125
|
-
el.transform = progress => `translateX(${100 * progress * inverter}%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))`;
|
|
126
|
-
} else {
|
|
127
|
-
el.transform = progress => `translateX(${100 * progress * inverter}%)`;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (!fromLarge && toLarge) {
|
|
131
|
-
el.className = 'ios-swipeback-navbar-bg-large';
|
|
132
|
-
el.transform = progress => `translateX(${100 * progress * inverter}%) translateY(calc(-1 * ${1 - progress} * var(--f7-navbar-large-title-height)))`;
|
|
133
|
-
}
|
|
134
|
-
if (fromLarge && toLarge) {
|
|
135
|
-
el.transform = progress => `translateX(${100 * progress * inverter}%)`;
|
|
136
|
-
}
|
|
137
|
-
if (fromLarge && !toLarge) {
|
|
138
|
-
el.transform = progress => `translateX(${100 * progress * inverter}%) translateY(calc(-${progress} * var(--f7-navbar-large-title-height)))`;
|
|
139
|
-
}
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
if ($navEl.hasClass('title-large')) return;
|
|
143
|
-
const isSliding = $navEl.hasClass('sliding') || $navEl.parents('.navbar-inner.sliding').length;
|
|
144
|
-
if (els.indexOf(el) < 0) els.push(el);
|
|
145
|
-
if (!isSubnavbar || isSubnavbar && !isSliding) {
|
|
146
|
-
el.opacity = progress => 1 - progress ** 0.33;
|
|
147
|
-
}
|
|
148
|
-
if (isSliding) {
|
|
149
|
-
let transformTarget = el;
|
|
150
|
-
if (isLeft && activeNavBackIconText.length && params.iosAnimateNavbarBackIcon) {
|
|
151
|
-
const textEl = {
|
|
152
|
-
el: activeNavBackIconText[0]
|
|
153
|
-
};
|
|
154
|
-
transformTarget = textEl;
|
|
155
|
-
els.push(textEl);
|
|
156
|
-
}
|
|
157
|
-
transformTarget.transform = progress => {
|
|
158
|
-
let activeNavTranslate = progress * transformTarget.el.f7NavbarRightOffset;
|
|
159
|
-
if (device.pixelRatio === 1) activeNavTranslate = Math.round(activeNavTranslate);
|
|
160
|
-
if (isSubnavbar && currentNavIsLarge) {
|
|
161
|
-
return `translate3d(${activeNavTranslate}px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)`;
|
|
162
|
-
}
|
|
163
|
-
return `translate3d(${activeNavTranslate}px,0,0)`;
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
$previousNavElements.each(navEl => {
|
|
168
|
-
const $navEl = $(navEl);
|
|
169
|
-
const isSubnavbar = $navEl.hasClass('subnavbar');
|
|
170
|
-
const isLeft = $navEl.hasClass('left');
|
|
171
|
-
const isTitle = $navEl.hasClass('title');
|
|
172
|
-
const isBg = $navEl.hasClass('navbar-bg');
|
|
173
|
-
if ((isTitle || isBg) && previousNavIsTransparent) return;
|
|
174
|
-
const el = {
|
|
175
|
-
el: navEl
|
|
176
|
-
};
|
|
177
|
-
if (toLarge) {
|
|
178
|
-
if (isTitle) return;
|
|
179
|
-
if (els.indexOf(el) < 0) els.push(el);
|
|
180
|
-
if ($navEl.hasClass('title-large')) {
|
|
181
|
-
el.opacity = 1;
|
|
182
|
-
el.overflow = 'visible';
|
|
183
|
-
$navEl.find('.title-large-text').each(subNavEl => {
|
|
184
|
-
els.push({
|
|
185
|
-
el: subNavEl,
|
|
186
|
-
'transform-origin': transformOriginTitleLarge,
|
|
187
|
-
opacity: progress => progress ** 3,
|
|
188
|
-
transform: progress => `translateX(calc(${1 - progress} * (var(--f7-navbarLeftTextOffset) - var(--f7-navbarTitleLargeOffset)))) translateY(calc(${progress - 1} * var(--f7-navbar-large-title-height) + ${1 - progress} * var(--f7-navbar-large-title-padding-vertical))) scale(${0.5 + progress * 0.5})`
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
if (isBg) {
|
|
195
|
-
if (els.indexOf(el) < 0) els.push(el);
|
|
196
|
-
if (!fromLarge && !toLarge) {
|
|
197
|
-
if (previousNavIsCollapsed) {
|
|
198
|
-
if (previousNavIsLargeTransparent) {
|
|
199
|
-
el.className = 'ios-swipeback-navbar-bg-large';
|
|
200
|
-
}
|
|
201
|
-
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%) translateY(calc(-1 * var(--f7-navbar-large-title-height)))`;
|
|
202
|
-
} else {
|
|
203
|
-
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%)`;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
if (!fromLarge && toLarge) {
|
|
207
|
-
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%) translateY(calc(-1 * ${1 - progress} * var(--f7-navbar-large-title-height)))`;
|
|
208
|
-
}
|
|
209
|
-
if (fromLarge && !toLarge) {
|
|
210
|
-
el.className = 'ios-swipeback-navbar-bg-large';
|
|
211
|
-
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%) translateY(calc(-${progress} * var(--f7-navbar-large-title-height)))`;
|
|
212
|
-
}
|
|
213
|
-
if (fromLarge && toLarge) {
|
|
214
|
-
el.transform = progress => `translateX(${(-100 + 100 * progress) * inverter}%)`;
|
|
215
|
-
}
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
if ($navEl.hasClass('title-large')) return;
|
|
219
|
-
const isSliding = $navEl.hasClass('sliding') || $previousNavbarEl.children('.navbar-inner.sliding').length;
|
|
220
|
-
if (els.indexOf(el) < 0) els.push(el);
|
|
221
|
-
if (!isSubnavbar || isSubnavbar && !isSliding) {
|
|
222
|
-
el.opacity = progress => progress ** 3;
|
|
223
|
-
}
|
|
224
|
-
if (isSliding) {
|
|
225
|
-
let transformTarget = el;
|
|
226
|
-
if (isLeft && previousNavBackIconText.length && params.iosAnimateNavbarBackIcon) {
|
|
227
|
-
const textEl = {
|
|
228
|
-
el: previousNavBackIconText[0]
|
|
229
|
-
};
|
|
230
|
-
transformTarget = textEl;
|
|
231
|
-
els.push(textEl);
|
|
232
|
-
}
|
|
233
|
-
transformTarget.transform = progress => {
|
|
234
|
-
let previousNavTranslate = transformTarget.el.f7NavbarLeftOffset * (1 - progress);
|
|
235
|
-
if (device.pixelRatio === 1) previousNavTranslate = Math.round(previousNavTranslate);
|
|
236
|
-
if (isSubnavbar && previousNavIsLarge) {
|
|
237
|
-
return `translate3d(${previousNavTranslate}px, calc(-1 * var(--f7-navbar-large-collapse-progress) * var(--f7-navbar-large-title-height)), 0)`;
|
|
238
|
-
}
|
|
239
|
-
return `translate3d(${previousNavTranslate}px,0,0)`;
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
return els;
|
|
244
|
-
}
|
|
245
|
-
function setAnimatableNavElements(_temp) {
|
|
246
|
-
let {
|
|
247
|
-
progress,
|
|
248
|
-
reset,
|
|
249
|
-
transition,
|
|
250
|
-
reflow
|
|
251
|
-
} = _temp === void 0 ? {} : _temp;
|
|
252
|
-
const styles = ['overflow', 'transform', 'transform-origin', 'opacity'];
|
|
253
|
-
if (transition === true || transition === false) {
|
|
254
|
-
for (let i = 0; i < animatableNavEls.length; i += 1) {
|
|
255
|
-
const el = animatableNavEls[i];
|
|
256
|
-
if (el && el.el) {
|
|
257
|
-
if (transition === true) el.el.classList.add('navbar-page-transitioning');
|
|
258
|
-
if (transition === false) el.el.classList.remove('navbar-page-transitioning');
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if (reflow && animatableNavEls.length && animatableNavEls[0] && animatableNavEls[0].el) {
|
|
263
|
-
// eslint-disable-next-line
|
|
264
|
-
animatableNavEls[0].el._clientLeft = animatableNavEls[0].el.clientLeft;
|
|
265
|
-
}
|
|
266
|
-
for (let i = 0; i < animatableNavEls.length; i += 1) {
|
|
267
|
-
const el = animatableNavEls[i];
|
|
268
|
-
if (el && el.el) {
|
|
269
|
-
if (el.className && !el.classNameSet && !reset) {
|
|
270
|
-
el.el.classList.add(el.className);
|
|
271
|
-
el.classNameSet = true;
|
|
272
|
-
}
|
|
273
|
-
if (el.className && reset) {
|
|
274
|
-
el.el.classList.remove(el.className);
|
|
275
|
-
}
|
|
276
|
-
for (let j = 0; j < styles.length; j += 1) {
|
|
277
|
-
const styleProp = styles[j];
|
|
278
|
-
if (el[styleProp]) {
|
|
279
|
-
if (reset) {
|
|
280
|
-
el.el.style[styleProp] = '';
|
|
281
|
-
} else if (typeof el[styleProp] === 'function') {
|
|
282
|
-
el.el.style[styleProp] = el[styleProp](progress);
|
|
283
|
-
} else {
|
|
284
|
-
el.el.style[styleProp] = el[styleProp];
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
29
|
function handleTouchStart(e) {
|
|
292
30
|
if (!e.isTrusted) return;
|
|
293
31
|
const swipeBackEnabled = params[`${app.theme}SwipeBack`];
|
|
@@ -300,7 +38,6 @@ function SwipeBack(r) {
|
|
|
300
38
|
touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
|
301
39
|
touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
|
302
40
|
touchStartTime = now();
|
|
303
|
-
dynamicNavbar = router.dynamicNavbar;
|
|
304
41
|
}
|
|
305
42
|
function handleTouchMove(e) {
|
|
306
43
|
if (!e.isTrusted) return;
|
|
@@ -356,14 +93,6 @@ function SwipeBack(r) {
|
|
|
356
93
|
$previousPageEl.append($pageOpacityEl);
|
|
357
94
|
}
|
|
358
95
|
}
|
|
359
|
-
if (dynamicNavbar) {
|
|
360
|
-
$currentNavbarEl = $navbarsEl.find('.navbar-current');
|
|
361
|
-
$previousNavbarEl = $navbarsEl.find('.navbar-previous');
|
|
362
|
-
if ($previousNavbarEl.length > 1) {
|
|
363
|
-
$previousNavbarEl = $previousNavbarEl.eq($previousNavbarEl.length - 1);
|
|
364
|
-
}
|
|
365
|
-
animatableNavEls = animatableNavElements($previousNavbarEl, $currentNavbarEl);
|
|
366
|
-
}
|
|
367
96
|
|
|
368
97
|
// Close/Hide Any Picker
|
|
369
98
|
if ($('.sheet.modal-in').length > 0 && app.sheet) {
|
|
@@ -388,9 +117,7 @@ function SwipeBack(r) {
|
|
|
388
117
|
percentage,
|
|
389
118
|
progress: percentage,
|
|
390
119
|
currentPageEl: $currentPageEl[0],
|
|
391
|
-
previousPageEl: $previousPageEl[0]
|
|
392
|
-
currentNavbarEl: $currentNavbarEl[0],
|
|
393
|
-
previousNavbarEl: $previousNavbarEl[0]
|
|
120
|
+
previousPageEl: $previousPageEl[0]
|
|
394
121
|
};
|
|
395
122
|
$el.trigger('swipeback:move', callbackData);
|
|
396
123
|
router.emit('swipebackMove', callbackData);
|
|
@@ -413,16 +140,8 @@ function SwipeBack(r) {
|
|
|
413
140
|
$([$currentPageEl[0], $previousPageEl[0]]).addClass('page-swipeback-active');
|
|
414
141
|
$currentPageEl.transform(`translate3d(${currentPageTranslate}px,0,0)`);
|
|
415
142
|
if (paramsSwipeBackAnimateShadow) $pageShadowEl[0].style.opacity = 1 - 1 * percentage;
|
|
416
|
-
|
|
417
|
-
$previousPageEl.transform(`translate3d(${previousPageTranslate}px,0,0)`);
|
|
418
|
-
}
|
|
143
|
+
$previousPageEl.transform(`translate3d(${previousPageTranslate}px,0,0)`);
|
|
419
144
|
if (paramsSwipeBackAnimateOpacity) $pageOpacityEl[0].style.opacity = 1 - 1 * percentage;
|
|
420
|
-
|
|
421
|
-
// Dynamic Navbars Animation
|
|
422
|
-
if (!dynamicNavbar) return;
|
|
423
|
-
setAnimatableNavElements({
|
|
424
|
-
progress: percentage
|
|
425
|
-
});
|
|
426
145
|
}
|
|
427
146
|
function handleTouchEnd(e) {
|
|
428
147
|
if (!e.isTrusted) return;
|
|
@@ -441,11 +160,6 @@ function SwipeBack(r) {
|
|
|
441
160
|
$pages.transform('');
|
|
442
161
|
if ($pageShadowEl && $pageShadowEl.length > 0) $pageShadowEl.remove();
|
|
443
162
|
if ($pageOpacityEl && $pageOpacityEl.length > 0) $pageOpacityEl.remove();
|
|
444
|
-
if (dynamicNavbar) {
|
|
445
|
-
setAnimatableNavElements({
|
|
446
|
-
reset: true
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
163
|
return;
|
|
450
164
|
}
|
|
451
165
|
const timeDiff = now() - touchStartTime;
|
|
@@ -456,10 +170,6 @@ function SwipeBack(r) {
|
|
|
456
170
|
$previousPageEl.removeClass('page-previous').addClass('page-current').removeAttr('aria-hidden');
|
|
457
171
|
if ($pageShadowEl) $pageShadowEl[0].style.opacity = '';
|
|
458
172
|
if ($pageOpacityEl) $pageOpacityEl[0].style.opacity = '';
|
|
459
|
-
if (dynamicNavbar) {
|
|
460
|
-
router.setNavbarPosition($currentNavbarEl, 'next');
|
|
461
|
-
router.setNavbarPosition($previousNavbarEl, 'current', false);
|
|
462
|
-
}
|
|
463
173
|
pageChanged = true;
|
|
464
174
|
}
|
|
465
175
|
// Reset custom styles
|
|
@@ -470,22 +180,13 @@ function SwipeBack(r) {
|
|
|
470
180
|
$currentPageEl[0]._clientLeft = $currentPageEl[0].clientLeft;
|
|
471
181
|
}
|
|
472
182
|
$pages.transform('');
|
|
473
|
-
if (dynamicNavbar) {
|
|
474
|
-
setAnimatableNavElements({
|
|
475
|
-
progress: pageChanged ? 1 : 0,
|
|
476
|
-
transition: true,
|
|
477
|
-
reflow: !!device.ios
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
183
|
allowViewTouchMove = false;
|
|
481
184
|
router.allowPageChange = false;
|
|
482
185
|
|
|
483
186
|
// Swipe Back Callback
|
|
484
187
|
const callbackData = {
|
|
485
188
|
currentPageEl: $currentPageEl[0],
|
|
486
|
-
previousPageEl: $previousPageEl[0]
|
|
487
|
-
currentNavbarEl: $currentNavbarEl[0],
|
|
488
|
-
previousNavbarEl: $previousNavbarEl[0]
|
|
189
|
+
previousPageEl: $previousPageEl[0]
|
|
489
190
|
};
|
|
490
191
|
if (pageChanged) {
|
|
491
192
|
// Update Route
|
|
@@ -493,11 +194,11 @@ function SwipeBack(r) {
|
|
|
493
194
|
router.currentPage = $previousPageEl[0];
|
|
494
195
|
|
|
495
196
|
// Page before animation callback
|
|
496
|
-
router.pageCallback('beforeOut', $currentPageEl,
|
|
197
|
+
router.pageCallback('beforeOut', $currentPageEl, 'current', 'next', {
|
|
497
198
|
route: $currentPageEl[0].f7Page.route,
|
|
498
199
|
swipeBack: true
|
|
499
200
|
});
|
|
500
|
-
router.pageCallback('beforeIn', $previousPageEl,
|
|
201
|
+
router.pageCallback('beforeIn', $previousPageEl, 'previous', 'current', {
|
|
501
202
|
route: $previousPageEl[0].f7Page.route,
|
|
502
203
|
swipeBack: true
|
|
503
204
|
}, $currentPageEl[0]);
|
|
@@ -509,12 +210,6 @@ function SwipeBack(r) {
|
|
|
509
210
|
}
|
|
510
211
|
$currentPageEl.transitionEnd(() => {
|
|
511
212
|
$pages.removeClass('page-transitioning page-transitioning-swipeback');
|
|
512
|
-
if (dynamicNavbar) {
|
|
513
|
-
setAnimatableNavElements({
|
|
514
|
-
reset: true,
|
|
515
|
-
transition: false
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
213
|
allowViewTouchMove = true;
|
|
519
214
|
router.allowPageChange = true;
|
|
520
215
|
if (pageChanged) {
|
|
@@ -531,24 +226,21 @@ function SwipeBack(r) {
|
|
|
531
226
|
}
|
|
532
227
|
|
|
533
228
|
// Page after animation callback
|
|
534
|
-
router.pageCallback('afterOut', $currentPageEl,
|
|
229
|
+
router.pageCallback('afterOut', $currentPageEl, 'current', 'next', {
|
|
535
230
|
route: $currentPageEl[0].f7Page.route,
|
|
536
231
|
swipeBack: true
|
|
537
232
|
});
|
|
538
|
-
router.pageCallback('afterIn', $previousPageEl,
|
|
233
|
+
router.pageCallback('afterIn', $previousPageEl, 'previous', 'current', {
|
|
539
234
|
route: $previousPageEl[0].f7Page.route,
|
|
540
235
|
swipeBack: true
|
|
541
236
|
});
|
|
542
237
|
|
|
543
238
|
// Remove Old Page
|
|
544
239
|
|
|
545
|
-
router.pageCallback('beforeRemove', $currentPageEl,
|
|
240
|
+
router.pageCallback('beforeRemove', $currentPageEl, 'next', {
|
|
546
241
|
swipeBack: true
|
|
547
242
|
});
|
|
548
243
|
router.removePage($currentPageEl);
|
|
549
|
-
if (dynamicNavbar) {
|
|
550
|
-
router.removeNavbar($currentNavbarEl);
|
|
551
|
-
}
|
|
552
244
|
$el.trigger('swipeback:afterchange', callbackData);
|
|
553
245
|
router.emit('swipebackAfterChange', callbackData);
|
|
554
246
|
router.emit('routeChanged', router.currentRoute, router.previousRoute, router);
|
|
@@ -566,7 +258,7 @@ function SwipeBack(r) {
|
|
|
566
258
|
});
|
|
567
259
|
}
|
|
568
260
|
function attachEvents() {
|
|
569
|
-
const passiveListener = app.touchEvents.start === 'touchstart'
|
|
261
|
+
const passiveListener = app.touchEvents.start === 'touchstart' ? {
|
|
570
262
|
passive: true,
|
|
571
263
|
capture: false
|
|
572
264
|
} : false;
|
|
@@ -575,7 +267,7 @@ function SwipeBack(r) {
|
|
|
575
267
|
app.on('touchend:passive', handleTouchEnd);
|
|
576
268
|
}
|
|
577
269
|
function detachEvents() {
|
|
578
|
-
const passiveListener = app.touchEvents.start === 'touchstart'
|
|
270
|
+
const passiveListener = app.touchEvents.start === 'touchstart' ? {
|
|
579
271
|
passive: true,
|
|
580
272
|
capture: false
|
|
581
273
|
} : false;
|
package/modules/router/tab.js
CHANGED
|
@@ -2,10 +2,7 @@ import $ from '../../shared/dom7.js';
|
|
|
2
2
|
import { extend } from '../../shared/utils.js';
|
|
3
3
|
import History from '../../shared/history.js';
|
|
4
4
|
import asyncComponent from './async-component.js';
|
|
5
|
-
function tabLoad(tabRoute, loadOptions) {
|
|
6
|
-
if (loadOptions === void 0) {
|
|
7
|
-
loadOptions = {};
|
|
8
|
-
}
|
|
5
|
+
function tabLoad(tabRoute, loadOptions = {}) {
|
|
9
6
|
const router = this;
|
|
10
7
|
const options = extend({
|
|
11
8
|
animate: router.params.animate,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-underscore-dangle */
|
|
2
2
|
import { extend } from '../../shared/utils.js';
|
|
3
|
-
function createStore(storeParams) {
|
|
4
|
-
if (storeParams === void 0) {
|
|
5
|
-
storeParams = {};
|
|
6
|
-
}
|
|
3
|
+
function createStore(storeParams = {}) {
|
|
7
4
|
const store = {
|
|
8
5
|
__store: true
|
|
9
6
|
};
|
|
@@ -65,10 +62,7 @@ function createStore(storeParams) {
|
|
|
65
62
|
store.__removeCallback = callback => {
|
|
66
63
|
removeGetterCallback(callback);
|
|
67
64
|
};
|
|
68
|
-
const getterValue =
|
|
69
|
-
if (addCallback === void 0) {
|
|
70
|
-
addCallback = true;
|
|
71
|
-
}
|
|
65
|
+
const getterValue = (getterKey, addCallback = true) => {
|
|
72
66
|
if (getterKey === 'constructor') return undefined;
|
|
73
67
|
propsQueue = [];
|
|
74
68
|
const value = getGetterValue(getterKey);
|
package/modules/touch/touch.d.ts
CHANGED
|
@@ -27,13 +27,15 @@ export namespace Touch {
|
|
|
27
27
|
/** CSS selector of elements where enabled activeState will add appropriate active class. (default a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .link, .item-link) */
|
|
28
28
|
activeStateElements?: string;
|
|
29
29
|
/** Enables MD-theme specific touch ripple effect. (default true) */
|
|
30
|
-
|
|
31
|
-
/** Enables iOS-theme specific touch ripple effect. (default false) */
|
|
32
|
-
iosTouchRipple?: boolean;
|
|
30
|
+
touchRipple?: boolean;
|
|
33
31
|
/** CSS selector of elements to apply touch ripple effect on click. (default .ripple, .link, .item-link, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus) */
|
|
34
32
|
touchRippleElements?: string;
|
|
35
33
|
/** CSS selector of elements to with inset touch ripple effect. (default .ripple-inset, .icon-only, .searchbar-disable-button, .input-clear-button, .notification-close-button, .md .navbar .link.back) */
|
|
36
34
|
touchRippleInsetElements?: string;
|
|
35
|
+
/** Enables iOS touch highlight effect. (default true) */
|
|
36
|
+
touchHighlight?: boolean;
|
|
37
|
+
/** CSS selector of elements to apply touch highlight effect on click. (default .toolbar-pane, .navbar-left, .navbar-right, .popover, .actions-group, .searchbar input, .searchbar-disable-button, .subnavbar, .searchbar-input-wrap .autocomplete-dropdown, .messagebar-area, .notification, .toast) */
|
|
38
|
+
touchHighlightElements?: string;
|
|
37
39
|
}
|
|
38
40
|
| undefined;
|
|
39
41
|
}
|
package/modules/touch/touch.js
CHANGED
|
@@ -11,7 +11,7 @@ function initTouch() {
|
|
|
11
11
|
const window = getWindow();
|
|
12
12
|
const document = getDocument();
|
|
13
13
|
const params = app.params.touch;
|
|
14
|
-
const useRipple = params
|
|
14
|
+
const useRipple = params.touchRipple && app.theme === 'md';
|
|
15
15
|
if (device.ios && device.webView) {
|
|
16
16
|
// Strange hack required for iOS 8 webview to work on inputs
|
|
17
17
|
window.addEventListener('touchstart', () => {});
|
|
@@ -381,42 +381,27 @@ function initTouch() {
|
|
|
381
381
|
function appTouchEndPassive(e) {
|
|
382
382
|
emitAppTouchEvent('touchend:passive', e);
|
|
383
383
|
}
|
|
384
|
-
const passiveListener =
|
|
384
|
+
const passiveListener = {
|
|
385
385
|
passive: true
|
|
386
|
-
}
|
|
387
|
-
const passiveListenerCapture =
|
|
386
|
+
};
|
|
387
|
+
const passiveListenerCapture = {
|
|
388
388
|
passive: true,
|
|
389
389
|
capture: true
|
|
390
|
-
}
|
|
391
|
-
const activeListener =
|
|
390
|
+
};
|
|
391
|
+
const activeListener = {
|
|
392
392
|
passive: false
|
|
393
|
-
}
|
|
394
|
-
const activeListenerCapture =
|
|
393
|
+
};
|
|
394
|
+
const activeListenerCapture = {
|
|
395
395
|
passive: false,
|
|
396
396
|
capture: true
|
|
397
|
-
}
|
|
397
|
+
};
|
|
398
398
|
document.addEventListener('click', appClick, true);
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
document.addEventListener(app.touchEvents.end, appTouchEndPassive, passiveListener);
|
|
406
|
-
} else {
|
|
407
|
-
document.addEventListener(app.touchEvents.start, e => {
|
|
408
|
-
appTouchStartActive(e);
|
|
409
|
-
appTouchStartPassive(e);
|
|
410
|
-
}, true);
|
|
411
|
-
document.addEventListener(app.touchEvents.move, e => {
|
|
412
|
-
appTouchMoveActive(e);
|
|
413
|
-
appTouchMovePassive(e);
|
|
414
|
-
}, false);
|
|
415
|
-
document.addEventListener(app.touchEvents.end, e => {
|
|
416
|
-
appTouchEndActive(e);
|
|
417
|
-
appTouchEndPassive(e);
|
|
418
|
-
}, false);
|
|
419
|
-
}
|
|
399
|
+
document.addEventListener(app.touchEvents.start, appTouchStartActive, activeListenerCapture);
|
|
400
|
+
document.addEventListener(app.touchEvents.move, appTouchMoveActive, activeListener);
|
|
401
|
+
document.addEventListener(app.touchEvents.end, appTouchEndActive, activeListener);
|
|
402
|
+
document.addEventListener(app.touchEvents.start, appTouchStartPassive, passiveListenerCapture);
|
|
403
|
+
document.addEventListener(app.touchEvents.move, appTouchMovePassive, passiveListener);
|
|
404
|
+
document.addEventListener(app.touchEvents.end, appTouchEndPassive, passiveListener);
|
|
420
405
|
if (support.touch) {
|
|
421
406
|
app.on('click', handleClick);
|
|
422
407
|
app.on('touchstart', handleTouchStart);
|
|
@@ -459,10 +444,11 @@ export default {
|
|
|
459
444
|
activeState: true,
|
|
460
445
|
activeStateElements: 'a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .link, .item-link, .accordion-item-toggle',
|
|
461
446
|
activeStateOnMouseMove: false,
|
|
462
|
-
|
|
463
|
-
iosTouchRipple: false,
|
|
447
|
+
touchRipple: true,
|
|
464
448
|
touchRippleElements: '.ripple, .link, .item-link, .list label.item-content, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus, .list.accordion-list .accordion-item-toggle',
|
|
465
|
-
touchRippleInsetElements: '.ripple-inset, .icon-only, .searchbar-disable-button, .input-clear-button, .notification-close-button, .md .navbar .link.back'
|
|
449
|
+
touchRippleInsetElements: '.ripple-inset, .icon-only, .searchbar-disable-button, .input-clear-button, .notification-close-button, .md .navbar .link.back',
|
|
450
|
+
touchHighlight: true,
|
|
451
|
+
touchHighlightElements: '.toolbar-pane, .navbar .left, .navbar .right, .popover-inner, .actions-group:not(.actions-grid .actions-group), .searchbar-input-wrap, .searchbar-disable-button, .subnavbar, .searchbar-input-wrap .autocomplete-dropdown, .messagebar-area, .notification, .toast, .fab > a'
|
|
466
452
|
}
|
|
467
453
|
},
|
|
468
454
|
create() {
|
|
@@ -470,9 +456,9 @@ export default {
|
|
|
470
456
|
const support = getSupport();
|
|
471
457
|
extend(app, {
|
|
472
458
|
touchEvents: {
|
|
473
|
-
start: support.touch ? 'touchstart' :
|
|
474
|
-
move: support.touch ? 'touchmove' :
|
|
475
|
-
end: support.touch ? 'touchend' :
|
|
459
|
+
start: support.touch ? 'touchstart' : 'pointerdown',
|
|
460
|
+
move: support.touch ? 'touchmove' : 'pointermove',
|
|
461
|
+
end: support.touch ? 'touchend' : 'pointerup'
|
|
476
462
|
}
|
|
477
463
|
});
|
|
478
464
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framework7",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-beta.1",
|
|
4
4
|
"description": "Full featured mobile HTML framework for building iOS & Android apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -451,8 +451,8 @@
|
|
|
451
451
|
"htm": "^3.1.1",
|
|
452
452
|
"path-to-regexp": "^6.2.0",
|
|
453
453
|
"skeleton-elements": "^4.0.1",
|
|
454
|
-
"ssr-window": "^
|
|
455
|
-
"swiper": "^
|
|
454
|
+
"ssr-window": "^5.0.1",
|
|
455
|
+
"swiper": "^12.0.3"
|
|
456
456
|
},
|
|
457
|
-
"releaseDate": "
|
|
457
|
+
"releaseDate": "November 10, 2025"
|
|
458
458
|
}
|
package/shared/$jsx.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/* eslint-disable prefer-rest-params */
|
|
2
|
-
const $jsx =
|
|
2
|
+
const $jsx = (tag, props, ...args) => {
|
|
3
3
|
const attrs = props || {};
|
|
4
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
5
|
-
args[_key - 2] = arguments[_key];
|
|
6
|
-
}
|
|
7
4
|
const children = args || [];
|
|
8
5
|
const attrsString = Object.keys(attrs).map(attr => {
|
|
9
6
|
if (attr[0] === '_') {
|