framework7 8.3.4 → 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.
Files changed (307) hide show
  1. package/components/actions/actions-ios.less +22 -15
  2. package/components/actions/actions-rtl.css +1 -1
  3. package/components/actions/actions-vars.less +4 -7
  4. package/components/actions/actions.css +1 -1
  5. package/components/actions/actions.js +2 -8
  6. package/components/actions/actions.less +0 -3
  7. package/components/app/app-class.d.ts +2 -0
  8. package/components/app/app-class.js +19 -15
  9. package/components/app/app-vars.less +41 -6
  10. package/components/app/app.less +1 -1
  11. package/components/area-chart/area-chart-class.js +18 -31
  12. package/components/area-chart/area-chart-rtl.css +1 -1
  13. package/components/area-chart/area-chart.css +1 -1
  14. package/components/autocomplete/autocomplete-class.js +13 -14
  15. package/components/autocomplete/autocomplete-ios.less +16 -0
  16. package/components/autocomplete/autocomplete-rtl.css +1 -1
  17. package/components/autocomplete/autocomplete.css +1 -1
  18. package/components/autocomplete/autocomplete.d.ts +3 -3
  19. package/components/autocomplete/autocomplete.js +3 -3
  20. package/components/autocomplete/autocomplete.less +7 -1
  21. package/components/block/block-vars.less +6 -6
  22. package/components/breadcrumbs/breadcrumbs-rtl.css +1 -1
  23. package/components/breadcrumbs/breadcrumbs.css +1 -1
  24. package/components/button/button-vars.less +13 -12
  25. package/components/button/button.less +2 -1
  26. package/components/calendar/calendar-class.js +20 -17
  27. package/components/calendar/calendar-ios.less +43 -0
  28. package/components/calendar/calendar-md.less +3 -0
  29. package/components/calendar/calendar-rtl.css +1 -1
  30. package/components/calendar/calendar-vars.less +24 -19
  31. package/components/calendar/calendar.css +1 -1
  32. package/components/calendar/calendar.d.ts +1 -1
  33. package/components/calendar/calendar.js +5 -8
  34. package/components/calendar/calendar.less +4 -2
  35. package/components/card/card-rtl.css +1 -1
  36. package/components/card/card-vars.less +5 -5
  37. package/components/card/card.css +1 -1
  38. package/components/card/card.js +3 -18
  39. package/components/card/card.less +1 -1
  40. package/components/color-picker/color-picker-class.js +11 -23
  41. package/components/color-picker/color-picker-ios.less +9 -0
  42. package/components/color-picker/color-picker-md.less +15 -0
  43. package/components/color-picker/color-picker-rtl.css +1 -1
  44. package/components/color-picker/color-picker-vars.less +9 -3
  45. package/components/color-picker/color-picker.css +1 -1
  46. package/components/color-picker/color-picker.d.ts +1 -2
  47. package/components/color-picker/color-picker.js +3 -7
  48. package/components/color-picker/color-picker.less +5 -25
  49. package/components/color-picker/modules/alpha-slider.js +2 -0
  50. package/components/color-picker/modules/brightness-slider.js +2 -0
  51. package/components/color-picker/modules/hs-spectrum.js +1 -2
  52. package/components/color-picker/modules/hsb-sliders.js +6 -0
  53. package/components/color-picker/modules/hue-slider.js +2 -0
  54. package/components/color-picker/modules/rgb-bars.js +6 -0
  55. package/components/color-picker/modules/rgb-sliders.js +6 -0
  56. package/components/color-picker/modules/sb-spectrum.js +1 -2
  57. package/components/color-picker/modules/wheel.js +1 -2
  58. package/components/data-table/data-table-class.js +1 -4
  59. package/components/data-table/data-table-ios.less +1 -1
  60. package/components/data-table/data-table-md.less +4 -2
  61. package/components/data-table/data-table-rtl.css +1 -1
  62. package/components/data-table/data-table.css +1 -1
  63. package/components/data-table/data-table.less +4 -4
  64. package/components/dialog/dialog-class.js +6 -3
  65. package/components/dialog/dialog-ios.less +10 -34
  66. package/components/dialog/dialog-md.less +2 -22
  67. package/components/dialog/dialog-rtl.css +1 -1
  68. package/components/dialog/dialog-vars.less +8 -10
  69. package/components/dialog/dialog.css +1 -1
  70. package/components/dialog/dialog.js +9 -27
  71. package/components/dialog/dialog.less +6 -25
  72. package/components/fab/fab-ios.less +2 -0
  73. package/components/fab/fab-rtl.css +1 -1
  74. package/components/fab/fab-vars.less +30 -6
  75. package/components/fab/fab.css +1 -1
  76. package/components/fab/fab.js +3 -12
  77. package/components/gauge/gauge-class.js +2 -8
  78. package/components/icon/icon-ios.less +10 -0
  79. package/components/icon/icon-md.less +9 -0
  80. package/components/icon/icon.less +2 -1
  81. package/components/input/input-ios.less +3 -2
  82. package/components/input/input-rtl.css +1 -1
  83. package/components/input/input.css +1 -1
  84. package/components/input/input.js +2 -5
  85. package/components/list/list-vars.less +7 -5
  86. package/components/list/list.less +1 -1
  87. package/components/list-index/list-index-class.js +3 -7
  88. package/components/login-screen/login-screen.js +2 -8
  89. package/components/login-screen/login-screen.less +1 -0
  90. package/components/messagebar/messagebar-class.js +5 -20
  91. package/components/messagebar/messagebar-ios.less +19 -14
  92. package/components/messagebar/messagebar-md.less +3 -0
  93. package/components/messagebar/messagebar-rtl.css +1 -1
  94. package/components/messagebar/messagebar-vars.less +12 -15
  95. package/components/messagebar/messagebar.css +1 -1
  96. package/components/messagebar/messagebar.less +4 -5
  97. package/components/messages/messages-class.js +25 -52
  98. package/components/messages/messages-ios.less +6 -2
  99. package/components/messages/messages-rtl.css +1 -1
  100. package/components/messages/messages-vars.less +1 -1
  101. package/components/messages/messages.css +1 -1
  102. package/components/navbar/navbar-ios.less +48 -672
  103. package/components/navbar/navbar-md.less +41 -1
  104. package/components/navbar/navbar-vars.less +4 -3
  105. package/components/navbar/navbar.js +28 -185
  106. package/components/navbar/navbar.less +8 -66
  107. package/components/notification/notification-class.js +6 -6
  108. package/components/notification/notification-ios.less +3 -8
  109. package/components/notification/notification-md.less +1 -20
  110. package/components/notification/notification-rtl.css +1 -1
  111. package/components/notification/notification-vars.less +13 -16
  112. package/components/notification/notification.css +1 -1
  113. package/components/notification/notification.less +8 -1
  114. package/components/page/page-ios.less +1 -8
  115. package/components/page/page-md.less +12 -11
  116. package/components/page/page.less +14 -12
  117. package/components/panel/panel-class.js +7 -28
  118. package/components/panel/panel-ios.less +4 -0
  119. package/components/panel/panel-rtl.css +2 -2
  120. package/components/panel/panel-vars.less +8 -5
  121. package/components/panel/panel.css +2 -2
  122. package/components/panel/panel.js +8 -32
  123. package/components/panel/panel.less +9 -9
  124. package/components/panel/resizable-panel.js +2 -4
  125. package/components/photo-browser/photo-browser-class.js +12 -47
  126. package/components/photo-browser/photo-browser-rtl.css +1 -1
  127. package/components/photo-browser/photo-browser-vars.less +8 -10
  128. package/components/photo-browser/photo-browser.css +1 -1
  129. package/components/photo-browser/photo-browser.d.ts +2 -4
  130. package/components/photo-browser/photo-browser.js +1 -3
  131. package/components/photo-browser/photo-browser.less +15 -71
  132. package/components/picker/picker-class.js +4 -5
  133. package/components/picker/picker-ios.less +6 -1
  134. package/components/picker/picker-md.less +9 -0
  135. package/components/picker/picker-rtl.css +1 -1
  136. package/components/picker/picker-vars.less +1 -1
  137. package/components/picker/picker.css +1 -1
  138. package/components/picker/picker.d.ts +1 -1
  139. package/components/picker/picker.js +2 -5
  140. package/components/picker/picker.less +0 -4
  141. package/components/pie-chart/pie-chart-class.js +7 -14
  142. package/components/popover/popover-class.js +22 -62
  143. package/components/popover/popover-ios.less +66 -2
  144. package/components/popover/popover-md.less +2 -27
  145. package/components/popover/popover-rtl.css +1 -1
  146. package/components/popover/popover-vars.less +2 -3
  147. package/components/popover/popover.css +1 -1
  148. package/components/popover/popover.d.ts +0 -2
  149. package/components/popover/popover.js +2 -9
  150. package/components/popover/popover.less +28 -50
  151. package/components/popup/popup-class.js +15 -9
  152. package/components/popup/popup-rtl.css +1 -1
  153. package/components/popup/popup-vars.less +2 -2
  154. package/components/popup/popup.css +1 -1
  155. package/components/popup/popup.js +2 -8
  156. package/components/popup/popup.less +6 -6
  157. package/components/preloader/preloader.js +2 -8
  158. package/components/progressbar/progressbar-md.less +12 -0
  159. package/components/progressbar/progressbar-rtl.css +1 -1
  160. package/components/progressbar/progressbar-vars.less +6 -5
  161. package/components/progressbar/progressbar.css +1 -1
  162. package/components/progressbar/progressbar.js +3 -12
  163. package/components/progressbar/progressbar.less +6 -0
  164. package/components/pull-to-refresh/pull-to-refresh-class.js +5 -12
  165. package/components/range/range-class.js +34 -27
  166. package/components/range/range-ios.less +60 -0
  167. package/components/range/range-md.less +67 -4
  168. package/components/range/range-rtl.css +1 -1
  169. package/components/range/range-vars.less +18 -13
  170. package/components/range/range.css +1 -1
  171. package/components/range/range.d.ts +3 -1
  172. package/components/range/range.js +2 -8
  173. package/components/range/range.less +11 -24
  174. package/components/searchbar/searchbar-class.js +7 -8
  175. package/components/searchbar/searchbar-ios.less +37 -13
  176. package/components/searchbar/searchbar-md.less +5 -0
  177. package/components/searchbar/searchbar-rtl.css +1 -1
  178. package/components/searchbar/searchbar-vars.less +13 -16
  179. package/components/searchbar/searchbar.css +1 -1
  180. package/components/searchbar/searchbar.js +4 -32
  181. package/components/searchbar/searchbar.less +4 -5
  182. package/components/sheet/sheet-class.js +21 -17
  183. package/components/sheet/sheet-ios.less +10 -0
  184. package/components/sheet/sheet-md.less +14 -0
  185. package/components/sheet/sheet-rtl.css +1 -1
  186. package/components/sheet/sheet-vars.less +5 -9
  187. package/components/sheet/sheet.css +1 -1
  188. package/components/sheet/sheet.js +2 -8
  189. package/components/sheet/sheet.less +5 -17
  190. package/components/skeleton/skeleton-rtl.css +1 -1
  191. package/components/skeleton/skeleton.css +1 -1
  192. package/components/smart-select/smart-select-class.js +15 -20
  193. package/components/smart-select/smart-select.d.ts +5 -7
  194. package/components/smart-select/smart-select.js +4 -4
  195. package/components/sortable/sortable.js +8 -27
  196. package/components/statusbar/statusbar.js +1 -4
  197. package/components/stepper/stepper-rtl.css +1 -1
  198. package/components/stepper/stepper-vars.less +3 -3
  199. package/components/stepper/stepper.css +1 -1
  200. package/components/stepper/stepper.js +2 -8
  201. package/components/subnavbar/subnavbar-ios.less +16 -1
  202. package/components/subnavbar/subnavbar-md.less +1 -1
  203. package/components/subnavbar/subnavbar-vars.less +12 -6
  204. package/components/subnavbar/subnavbar.less +5 -6
  205. package/components/swipeout/swipeout-ios.less +37 -0
  206. package/components/swipeout/swipeout-md.less +56 -0
  207. package/components/swipeout/swipeout-rtl.css +1 -1
  208. package/components/swipeout/swipeout-vars.less +13 -2
  209. package/components/swipeout/swipeout.css +1 -1
  210. package/components/swipeout/swipeout.js +102 -35
  211. package/components/swipeout/swipeout.less +20 -44
  212. package/components/swiper/swiper-rtl.css +1 -1
  213. package/components/swiper/swiper.css +1 -1
  214. package/components/tabs/tabs.js +3 -9
  215. package/components/text-editor/text-editor-class.js +1 -1
  216. package/components/text-editor/text-editor-rtl.css +1 -1
  217. package/components/text-editor/text-editor.css +1 -1
  218. package/components/timeline/timeline-ios.less +0 -5
  219. package/components/timeline/timeline-md.less +0 -5
  220. package/components/timeline/timeline-rtl.css +1 -1
  221. package/components/timeline/timeline-vars.less +1 -17
  222. package/components/timeline/timeline.css +1 -1
  223. package/components/timeline/timeline.less +0 -196
  224. package/components/toast/toast-class.js +2 -2
  225. package/components/toast/toast-ios.less +2 -0
  226. package/components/toast/toast-rtl.css +1 -1
  227. package/components/toast/toast-vars.less +2 -4
  228. package/components/toast/toast.css +1 -1
  229. package/components/toast/toast.less +1 -1
  230. package/components/toggle/toggle-class.js +5 -12
  231. package/components/toggle/toggle-ios.less +68 -50
  232. package/components/toggle/toggle-rtl.css +1 -1
  233. package/components/toggle/toggle-vars.less +2 -2
  234. package/components/toggle/toggle.css +1 -1
  235. package/components/toolbar/tabbar-highlight.js +134 -0
  236. package/components/toolbar/toolbar-ios.less +152 -14
  237. package/components/toolbar/toolbar-md.less +77 -3
  238. package/components/toolbar/toolbar-vars.less +14 -10
  239. package/components/toolbar/toolbar.js +32 -13
  240. package/components/toolbar/toolbar.less +8 -56
  241. package/components/tooltip/tooltip-class.js +13 -16
  242. package/components/tooltip/tooltip.js +0 -16
  243. package/components/touch-highlight/touch-highlight-ios.less +17 -0
  244. package/components/touch-highlight/touch-highlight-md.less +2 -0
  245. package/components/touch-highlight/touch-highlight-vars.less +8 -0
  246. package/components/touch-highlight/touch-highlight.d.ts +25 -0
  247. package/components/touch-highlight/touch-highlight.js +123 -0
  248. package/components/touch-highlight/touch-highlight.less +9 -0
  249. package/components/touch-ripple/touch-ripple.js +1 -4
  250. package/components/view/resizable-view.js +2 -4
  251. package/components/view/view-class.js +1 -15
  252. package/components/view/view.d.ts +0 -4
  253. package/components/view/view.js +1 -5
  254. package/components/virtual-list/virtual-list-class.js +2 -8
  255. package/framework7-bundle-rtl.css +2284 -3019
  256. package/framework7-bundle-rtl.min.css +9 -7
  257. package/framework7-bundle.css +2245 -2978
  258. package/framework7-bundle.esm.js +5 -4
  259. package/framework7-bundle.js +7170 -6469
  260. package/framework7-bundle.js.map +1 -1
  261. package/framework7-bundle.less +4 -3
  262. package/framework7-bundle.min.css +9 -7
  263. package/framework7-bundle.min.js +4 -4
  264. package/framework7-bundle.min.js.map +1 -1
  265. package/framework7-lite-bundle.esm.js +5 -4
  266. package/framework7-lite.esm.js +5 -4
  267. package/framework7-rtl.css +509 -844
  268. package/framework7-rtl.min.css +8 -6
  269. package/framework7-types.d.ts +5 -1
  270. package/framework7.css +509 -843
  271. package/framework7.d.ts +4 -0
  272. package/framework7.esm.js +5 -4
  273. package/framework7.less +4 -3
  274. package/framework7.min.css +8 -6
  275. package/less/mixins.less +10 -12
  276. package/modules/component/$h.js +1 -4
  277. package/modules/component/$jsx.js +1 -4
  278. package/modules/component/component-class.js +49 -114
  279. package/modules/component/component.js +6 -7
  280. package/modules/component/eventslisteners.js +1 -4
  281. package/modules/component/snabbdom/modules/hero.js +0 -1
  282. package/modules/component/snabbdom/modules/style.js +1 -1
  283. package/modules/component/vdom.js +17 -29
  284. package/modules/router/back.js +22 -96
  285. package/modules/router/clear-previous-history.js +1 -7
  286. package/modules/router/component-loader.js +23 -32
  287. package/modules/router/modal.js +1 -4
  288. package/modules/router/navigate.js +28 -167
  289. package/modules/router/redirect.js +1 -5
  290. package/modules/router/router-class.js +21 -288
  291. package/modules/router/swipe-back.js +10 -318
  292. package/modules/router/tab.js +1 -4
  293. package/modules/store/create-store.js +2 -8
  294. package/modules/touch/touch.d.ts +5 -3
  295. package/modules/touch/touch.js +22 -36
  296. package/package.json +4 -4
  297. package/shared/$jsx.js +1 -4
  298. package/shared/class.js +5 -26
  299. package/shared/constructor-methods.js +4 -19
  300. package/shared/events-class.js +3 -12
  301. package/shared/get-device.js +4 -11
  302. package/shared/get-support.d.ts +0 -6
  303. package/shared/get-support.js +1 -20
  304. package/shared/material-color-utils.js +2102 -693
  305. package/shared/material-colors.js +94 -23
  306. package/shared/modal-methods.js +2 -8
  307. package/shared/utils.js +23 -45
@@ -1,11 +1,13 @@
1
1
  import $ from '../../shared/dom7.js';
2
2
  import { nextFrame, bindMethods } from '../../shared/utils.js';
3
+ import { destroyTabbarHighlight, initTabbarHighlight } from './tabbar-highlight.js';
3
4
  const Toolbar = {
4
5
  setHighlight(tabbarEl) {
5
6
  const app = this;
6
7
  const $tabbarEl = $(tabbarEl);
7
- if (app.theme === 'ios' && !$tabbarEl.hasClass('tabbar-highlight')) return;
8
- if ($tabbarEl.length === 0 || !($tabbarEl.hasClass('tabbar') || $tabbarEl.hasClass('tabbar-icons'))) return;
8
+ if ($tabbarEl.length === 0 || !($tabbarEl.hasClass('tabbar') || $tabbarEl.hasClass('tabbar-icons'))) {
9
+ return;
10
+ }
9
11
  let $highlightEl = $tabbarEl.find('.tab-link-highlight');
10
12
  const tabLinksCount = $tabbarEl.find('.tab-link').length;
11
13
  if (tabLinksCount === 0) {
@@ -13,10 +15,18 @@ const Toolbar = {
13
15
  return;
14
16
  }
15
17
  if ($highlightEl.length === 0) {
16
- $tabbarEl.children('.toolbar-inner').append('<span class="tab-link-highlight"></span>');
18
+ if (app.theme === 'ios') {
19
+ $tabbarEl.children('.toolbar-inner').children('.toolbar-pane').append('<span class="tab-link-highlight"></span>');
20
+ } else {
21
+ $tabbarEl.children('.toolbar-inner').append('<span class="tab-link-highlight"></span>');
22
+ }
17
23
  $highlightEl = $tabbarEl.find('.tab-link-highlight');
18
- } else if ($highlightEl.next().length) {
19
- $tabbarEl.children('.toolbar-inner').append($highlightEl);
24
+ } else if ($highlightEl.next('a,button,.tab-link').length) {
25
+ if (app.theme === 'ios') {
26
+ $tabbarEl.children('.toolbar-inner').children('.toolbar-pane').append($highlightEl);
27
+ } else {
28
+ $tabbarEl.children('.toolbar-inner').append($highlightEl);
29
+ }
20
30
  }
21
31
  const $activeLink = $tabbarEl.find('.tab-link-active');
22
32
  let highlightWidth;
@@ -36,11 +46,15 @@ const Toolbar = {
36
46
  init(tabbarEl) {
37
47
  const app = this;
38
48
  app.toolbar.setHighlight(tabbarEl);
49
+ if (app.theme !== 'ios') return;
50
+ initTabbarHighlight(tabbarEl);
39
51
  },
40
- hide(el, animate) {
41
- if (animate === void 0) {
42
- animate = true;
43
- }
52
+ destroy(tabbarEl) {
53
+ const app = this;
54
+ if (app.theme !== 'ios') return;
55
+ destroyTabbarHighlight(tabbarEl);
56
+ },
57
+ hide(el, animate = true) {
44
58
  const app = this;
45
59
  const $el = $(el);
46
60
  if ($el.hasClass('toolbar-hidden')) return;
@@ -52,10 +66,7 @@ const Toolbar = {
52
66
  $el.trigger('toolbar:hide');
53
67
  app.emit('toolbarHide', $el[0]);
54
68
  },
55
- show(el, animate) {
56
- if (animate === void 0) {
57
- animate = true;
58
- }
69
+ show(el, animate = true) {
59
70
  const app = this;
60
71
  const $el = $(el);
61
72
  if (!$el.hasClass('toolbar-hidden')) return;
@@ -146,9 +157,13 @@ export default {
146
157
  },
147
158
  on: {
148
159
  pageBeforeRemove(page) {
160
+ const app = this;
149
161
  if (page.$el[0].f7ScrollToolbarHandler) {
150
162
  page.$el.off('scroll', '.page-content', page.$el[0].f7ScrollToolbarHandler, true);
151
163
  }
164
+ page.$el.find('.tabbar, .tabbar-icons').each(tabbarEl => {
165
+ app.toolbar.destroy(tabbarEl);
166
+ });
152
167
  },
153
168
  pageBeforeIn(page) {
154
169
  const app = this;
@@ -192,6 +207,10 @@ export default {
192
207
  insert(vnode) {
193
208
  const app = this;
194
209
  app.toolbar.init(vnode.elm);
210
+ },
211
+ destroy(vnode) {
212
+ const app = this;
213
+ app.toolbar.destroy(vnode.elm);
195
214
  }
196
215
  }
197
216
  }
@@ -11,10 +11,10 @@
11
11
  box-sizing: border-box;
12
12
  left: 0;
13
13
  height: var(--f7-toolbar-height);
14
- background-color: var(--f7-toolbar-bg-color, var(--f7-bars-bg-color));
14
+ flex-shrink: 0;
15
15
  color: var(--f7-toolbar-text-color, var(--f7-bars-text-color));
16
16
  font-size: var(--f7-toolbar-font-size);
17
- .ios-translucent-bars(var(--f7-toolbar-bg-color-rgb, var(--f7-bars-bg-color-rgb)));
17
+
18
18
  b {
19
19
  font-weight: 600;
20
20
  }
@@ -28,8 +28,7 @@
28
28
  }
29
29
  .link {
30
30
  display: flex;
31
- line-height: var(--f7-toolbar-link-line-height, var(--f7-toolbar-height));
32
- height: var(--f7-toolbar-link-height, var(--f7-toolbar-height));
31
+
33
32
  font-weight: var(--f7-toolbar-link-font-weight);
34
33
  }
35
34
  i.icon {
@@ -51,63 +50,31 @@
51
50
  .ios .toolbar-top-ios,
52
51
  .md .toolbar-top-md {
53
52
  top: 0;
54
- .tab-link-highlight {
55
- bottom: 0;
56
- }
57
- &.no-outline {
58
- &:after {
59
- display: none !important;
60
- }
61
- }
62
- &.toolbar-hidden {
63
- &:before {
64
- display: none !important;
65
- }
66
- }
67
- &:after,
68
- &:before {
69
- backface-visibility: hidden;
70
- }
71
- .hairline(bottom, var(--f7-toolbar-border-color, var(--f7-bars-border-color)));
72
53
  }
73
54
  .toolbar-bottom,
74
55
  .ios .toolbar-bottom-ios,
75
56
  .md .toolbar-bottom-md {
76
57
  bottom: 0;
77
58
  height: calc(var(--f7-toolbar-height) + var(--f7-safe-area-bottom));
78
- .tab-link-highlight {
79
- top: 0;
80
- }
81
59
  .toolbar-inner {
82
60
  height: auto;
83
61
  top: 0;
84
62
  bottom: var(--f7-safe-area-bottom);
85
63
  }
86
- &.no-outline {
87
- &:before {
88
- display: none !important;
89
- }
90
- }
91
- &.toolbar-hidden {
92
- &:after {
93
- display: none !important;
94
- }
95
- }
96
-
97
- .hairline(top, var(--f7-toolbar-border-color, var(--f7-bars-border-color)));
98
64
  }
99
65
  .toolbar-inner {
100
66
  position: absolute;
67
+ z-index: 1;
101
68
  left: 0;
102
69
  top: 0;
103
70
  width: 100%;
104
71
  height: 100%;
105
72
  display: flex;
106
- justify-content: space-between;
73
+
107
74
  box-sizing: border-box;
108
75
  align-items: center;
109
76
  align-content: center;
110
- overflow: hidden;
77
+
111
78
  padding: 0 calc(var(--f7-toolbar-inner-padding-right) + var(--f7-safe-area-right)) 0
112
79
  calc(var(--f7-toolbar-inner-padding-left) + var(--f7-safe-area-left));
113
80
  }
@@ -145,22 +112,6 @@
145
112
  height: var(--f7-tabbar-icon-size);
146
113
  line-height: var(--f7-tabbar-icon-size);
147
114
  }
148
- .md &.tabbar-icons .tab-link-highlight {
149
- display: none;
150
- }
151
- .md &:not(.tabbar-icons) .tab-link-highlight {
152
- position: absolute;
153
- left: 0;
154
- height: 2px;
155
- background: var(--f7-tabbar-link-active-border-color, var(--f7-theme-color));
156
- transition-duration: 300ms;
157
- .ltr({
158
- left: 0;
159
- });
160
- .rtl({
161
- right: 0;
162
- });
163
- }
164
115
  }
165
116
  .tabbar-icons {
166
117
  --f7-toolbar-height: var(--f7-tabbar-icons-height);
@@ -228,7 +179,8 @@
228
179
  }
229
180
  .toolbar-top,
230
181
  .ios .toolbar-top-ios,
231
- .md .toolbar-top-md {
182
+ .md .toolbar-top-md,
183
+ .sheet-modal-bottom > .toolbar:not(.toolbar-bottom) {
232
184
  ~ * {
233
185
  --f7-page-toolbar-top-offset: var(--f7-toolbar-height);
234
186
  }
@@ -4,10 +4,7 @@ import { extend, deleteProps } from '../../shared/utils.js';
4
4
  import { getSupport } from '../../shared/get-support.js';
5
5
  import Framework7Class from '../../shared/class.js';
6
6
  class Tooltip extends Framework7Class {
7
- constructor(app, params) {
8
- if (params === void 0) {
9
- params = {};
10
- }
7
+ constructor(app, params = {}) {
11
8
  super(params, [app]);
12
9
  const tooltip = this;
13
10
  const support = getSupport();
@@ -101,9 +98,9 @@ class Tooltip extends Framework7Class {
101
98
  }
102
99
  if (tooltip.params.trigger === 'manual') return;
103
100
  if (support.touch) {
104
- const passive = support.passiveListener ? {
101
+ const passive = {
105
102
  passive: true
106
- } : false;
103
+ };
107
104
  if (tooltip.params.delegated) {
108
105
  $(document).on(app.touchEvents.start, tooltip.params.targetEl, handleTouchStart, passive);
109
106
  } else {
@@ -114,11 +111,11 @@ class Tooltip extends Framework7Class {
114
111
  } else {
115
112
  // eslint-disable-next-line
116
113
  if (tooltip.params.delegated) {
117
- $(document).on(support.pointerEvents ? 'pointerenter' : 'mouseenter', tooltip.params.targetEl, handleMouseEnter, true);
118
- $(document).on(support.pointerEvents ? 'pointerleave' : 'mouseleave', tooltip.params.targetEl, handleMouseLeave, true);
114
+ $(document).on('pointerenter', tooltip.params.targetEl, handleMouseEnter, true);
115
+ $(document).on('pointerleave', tooltip.params.targetEl, handleMouseLeave, true);
119
116
  } else {
120
- tooltip.$targetEl.on(support.pointerEvents ? 'pointerenter' : 'mouseenter', handleMouseEnter);
121
- tooltip.$targetEl.on(support.pointerEvents ? 'pointerleave' : 'mouseleave', handleMouseLeave);
117
+ tooltip.$targetEl.on('pointerenter', handleMouseEnter);
118
+ tooltip.$targetEl.on('pointerleave', handleMouseLeave);
122
119
  }
123
120
  }
124
121
  };
@@ -135,9 +132,9 @@ class Tooltip extends Framework7Class {
135
132
  }
136
133
  if (tooltip.params.trigger === 'manual') return;
137
134
  if (support.touch) {
138
- const passive = support.passiveListener ? {
135
+ const passive = {
139
136
  passive: true
140
- } : false;
137
+ };
141
138
  if (tooltip.params.delegated) {
142
139
  $(document).off(app.touchEvents.start, tooltip.params.targetEl, handleTouchStart, passive);
143
140
  } else {
@@ -148,11 +145,11 @@ class Tooltip extends Framework7Class {
148
145
  } else {
149
146
  // eslint-disable-next-line
150
147
  if (tooltip.params.delegated) {
151
- $(document).off(support.pointerEvents ? 'pointerenter' : 'mouseenter', tooltip.params.targetEl, handleMouseEnter, true);
152
- $(document).off(support.pointerEvents ? 'pointerleave' : 'mouseleave', tooltip.params.targetEl, handleMouseLeave, true);
148
+ $(document).off('pointerenter', tooltip.params.targetEl, handleMouseEnter, true);
149
+ $(document).off('pointerleave', tooltip.params.targetEl, handleMouseLeave, true);
153
150
  } else {
154
- tooltip.$targetEl.off(support.pointerEvents ? 'pointerenter' : 'mouseenter', handleMouseEnter);
155
- tooltip.$targetEl.off(support.pointerEvents ? 'pointerleave' : 'mouseleave', handleMouseLeave);
151
+ tooltip.$targetEl.off('pointerenter', handleMouseEnter);
152
+ tooltip.$targetEl.off('pointerleave', handleMouseLeave);
156
153
  }
157
154
  }
158
155
  };
@@ -78,27 +78,11 @@ export default {
78
78
  text
79
79
  });
80
80
  });
81
- if (app.theme === 'ios' && page.view && page.view.router.dynamicNavbar && page.$navbarEl && page.$navbarEl.length > 0) {
82
- page.$navbarEl.find('.tooltip-init').each(el => {
83
- const text = $(el).attr('data-tooltip');
84
- if (!text) return;
85
- app.tooltip.create({
86
- targetEl: el,
87
- text
88
- });
89
- });
90
- }
91
81
  },
92
82
  pageBeforeRemove(page) {
93
- const app = this;
94
83
  page.$el.find('.tooltip-init').each(el => {
95
84
  if (el.f7Tooltip) el.f7Tooltip.destroy();
96
85
  });
97
- if (app.theme === 'ios' && page.view && page.view.router.dynamicNavbar && page.$navbarEl && page.$navbarEl.length > 0) {
98
- page.$navbarEl.find('.tooltip-init').each(el => {
99
- if (el.f7Tooltip) el.f7Tooltip.destroy();
100
- });
101
- }
102
86
  }
103
87
  },
104
88
  vnode: {
@@ -0,0 +1,17 @@
1
+ .ios {
2
+ .toolbar-pane,
3
+ .navbar .left,
4
+ .navbar .right,
5
+ .popover-inner,
6
+ .actions-group:not(.actions-grid .actions-group),
7
+ .searchbar-input-wrap,
8
+ .searchbar-disable-button,
9
+ .subnavbar,
10
+ .searchbar-input-wrap .autocomplete-dropdown,
11
+ .messagebar-area,
12
+ .notification,
13
+ .toast,
14
+ .fab > a {
15
+ touch-action: none;
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ .ios-vars({
2
+ .light-vars({
3
+ --f7-touch-highlight-bg-color: rgba(255, 255, 255, 0.5);
4
+ });
5
+ .dark-vars({
6
+ --f7-touch-highlight-bg-color: rgba(255, 255, 255, 0.3);
7
+ });
8
+ });
@@ -0,0 +1,25 @@
1
+ import { Dom7Array } from 'dom7';
2
+ import Framework7, {
3
+ CSSSelector,
4
+ Framework7EventsClass,
5
+ Framework7Plugin,
6
+ } from '../app/app-class.js';
7
+
8
+ export namespace TouchHighlight {
9
+ interface TouchHighlight {
10
+ $highlightEl: Dom7Array;
11
+ highlightTransform: string;
12
+ removing: boolean;
13
+ remove(): void;
14
+ }
15
+ interface AppMethods {
16
+ touchHighlight: {
17
+ create($el: Dom7Array, x: number, y: number): TouchHighlight;
18
+ };
19
+ }
20
+ interface AppParams {}
21
+ interface AppEvents {}
22
+ }
23
+
24
+ declare const TouchHighlightComponent: Framework7Plugin;
25
+ export default TouchHighlightComponent;
@@ -0,0 +1,123 @@
1
+ import { getDocument } from 'ssr-window';
2
+ const initTouchHighlight = app => {
3
+ const document = getDocument();
4
+ const isEnabled = app.params.touch.touchHighlight;
5
+ const elements = app.params.touch.touchHighlightElements;
6
+ const data = {};
7
+ const offset = 1;
8
+ const opacity = 1;
9
+ const zIndex = 500;
10
+ const removeHoverHighlight = () => {
11
+ const el = data.currentEl;
12
+ if (el && data.elScale) {
13
+ data.elScale = false;
14
+ el.style.scale = '';
15
+ const onTransitionEnd = () => {
16
+ el.style.transitionDuration = '';
17
+ el.style.transitionTimingFunction = '';
18
+ el.removeEventListener('transitionend', onTransitionEnd);
19
+ };
20
+ el.addEventListener('transitionend', onTransitionEnd);
21
+ }
22
+ if (data.lightElWrap) {
23
+ const lightElWrap = data.lightElWrap;
24
+ if (lightElWrap.style.opacity === '0') {
25
+ lightElWrap.remove();
26
+ } else {
27
+ lightElWrap.addEventListener('transitionend', () => {
28
+ lightElWrap.remove();
29
+ });
30
+ lightElWrap.style.opacity = 0;
31
+ }
32
+ }
33
+ data.currentEl = null;
34
+ data.lightElWrap = null;
35
+ data.lightEl = null;
36
+ };
37
+ const setLightPosition = e => {
38
+ if (data.lightEl) {
39
+ const {
40
+ x,
41
+ y
42
+ } = e;
43
+ const offsetX = x - data.rect.x;
44
+ const offsetY = y - data.rect.y;
45
+ data.lightEl.style.transform = `translate3d(${offsetX}px, ${offsetY}px, 0)`;
46
+ }
47
+ };
48
+ const onPointerMove = e => {
49
+ if (!isEnabled) return;
50
+ setLightPosition(e);
51
+ };
52
+ const onPointerLeave = () => {
53
+ if (!isEnabled) return;
54
+ removeHoverHighlight();
55
+ };
56
+ const onPointerDown = e => {
57
+ if (!isEnabled) return;
58
+ if (e.pointerType === 'mouse') return;
59
+ const d = data;
60
+ const el = e.target.closest(elements);
61
+ if (!el) return;
62
+ if (d.currentEl === el) return;
63
+ d.currentEl = el;
64
+ d.rect = el.getBoundingClientRect();
65
+ const lightElWrap = document.createElement('span');
66
+ lightElWrap.className = 'rounded-[inherit]';
67
+ lightElWrap.style = `left: ${offset}px; top: ${offset}px; right: ${offset}px; bottom: ${offset}px;transition-duration: 300ms; opacity: 0; position: absolute; overflow: hidden; pointer-events: none; border-radius: inherit;`;
68
+ const lightEl = document.createElement('span');
69
+ const {
70
+ width,
71
+ height
72
+ } = d.rect;
73
+ const radius = (width ** 2 + height ** 2) ** 0.5;
74
+ lightEl.style.position = `absolute`;
75
+ lightEl.style.zIndex = zIndex;
76
+ lightEl.style.width = `${radius * 2}px`;
77
+ lightEl.style.left = `${-radius}px`;
78
+ lightEl.style.height = `${radius * 2}px`;
79
+ lightEl.style.top = `${-radius}px`;
80
+ lightEl.style.borderRadius = `50%`;
81
+ const lightColor = 'var(--f7-touch-highlight-bg-color)';
82
+ lightEl.style.backgroundImage = `radial-gradient(circle at center, color-mix(in oklab, ${lightColor} ${opacity * 100}%, transparent), transparent 50%)`;
83
+ lightEl.style.pointerEvents = 'none';
84
+ d.lightEl = lightEl;
85
+ d.lightElWrap = lightElWrap;
86
+ setLightPosition(e);
87
+ lightElWrap.append(lightEl);
88
+ el.append(lightElWrap);
89
+ if (e.pointerType !== 'mouse') {
90
+ if (e.pointerType !== 'mouse') {
91
+ d.elScale = true;
92
+ let scale = 1.25;
93
+ if (d.rect.width > 60 || d.rect.height > 60) {
94
+ scale = 1.05;
95
+ }
96
+ el.style.scale = scale;
97
+ el.style.transitionDuration = '300ms';
98
+ el.style.transitionTimingFunction = 'ease-in-out';
99
+ }
100
+ }
101
+ requestAnimationFrame(() => {
102
+ lightElWrap.style.opacity = 1;
103
+ });
104
+ el.removeEventListener('pointermove', onPointerMove);
105
+ el.removeEventListener('pointerleave', onPointerLeave);
106
+ el.addEventListener('pointermove', onPointerMove);
107
+ el.addEventListener('pointerleave', onPointerLeave);
108
+ };
109
+ document.addEventListener('pointerdown', onPointerDown, {
110
+ capture: true
111
+ });
112
+ document.addEventListener('contextmenu', onPointerLeave, {
113
+ capture: true
114
+ });
115
+ };
116
+ export default {
117
+ name: 'touch-highlight',
118
+ on: {
119
+ init() {
120
+ initTouchHighlight(this);
121
+ }
122
+ }
123
+ };
@@ -0,0 +1,9 @@
1
+ /* === Touch Highlight === */
2
+ @import './touch-highlight-vars.less';
3
+
4
+ .if-ios-theme({
5
+ @import './touch-highlight-ios.less';
6
+ });
7
+ .if-md-theme({
8
+ @import './touch-highlight-md.less';
9
+ });
@@ -7,10 +7,7 @@ export default {
7
7
  create() {
8
8
  const app = this;
9
9
  app.touchRipple = {
10
- create() {
11
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
12
- args[_key] = arguments[_key];
13
- }
10
+ create(...args) {
14
11
  return new TouchRipple(...args);
15
12
  }
16
13
  };
@@ -1,9 +1,7 @@
1
1
  import $ from '../../shared/dom7.js';
2
2
  import { extend } from '../../shared/utils.js';
3
- import { getSupport } from '../../shared/get-support.js';
4
3
  function resizableView(view) {
5
4
  const app = view.app;
6
- const support = getSupport();
7
5
  if (view.resizableInitialized) return;
8
6
  extend(view, {
9
7
  resizable: true,
@@ -104,9 +102,9 @@ function resizableView(view) {
104
102
  $el.addClass('view-resizable');
105
103
 
106
104
  // Add Events
107
- const passive = support.passiveListener ? {
105
+ const passive = {
108
106
  passive: true
109
- } : false;
107
+ };
110
108
  view.$el.on(app.touchEvents.start, '.view-resize-handler', handleTouchStart, passive);
111
109
  app.on('touchmove:active', handleTouchMove);
112
110
  app.on('touchend:passive', handleTouchEnd);
@@ -4,10 +4,7 @@ import Router from '../../modules/router/router.js';
4
4
  import Framework7Class from '../../shared/class.js';
5
5
  import resizableView from './resizable-view.js';
6
6
  class View extends Framework7Class {
7
- constructor(app, el, viewParams) {
8
- if (viewParams === void 0) {
9
- viewParams = {};
10
- }
7
+ constructor(app, el, viewParams = {}) {
11
8
  super(viewParams, [app]);
12
9
  const view = this;
13
10
  const ssr = view.params.routerId;
@@ -154,21 +151,10 @@ class View extends Framework7Class {
154
151
  // Supposed to be HTMLElement or Dom7
155
152
  selector = ($el.attr('id') ? `#${$el.attr('id')}` : '') + ($el.attr('class') ? `.${$el.attr('class').replace(/ /g, '.').replace('.active', '')}` : '');
156
153
  }
157
-
158
- // DynamicNavbar
159
- let $navbarsEl;
160
- if (app.theme === 'ios' && view.params.iosDynamicNavbar) {
161
- $navbarsEl = $el.children('.navbars').eq(0);
162
- if ($navbarsEl.length === 0) {
163
- $navbarsEl = $('<div class="navbars"></div>');
164
- }
165
- }
166
154
  extend(view, {
167
155
  $el,
168
156
  el: $el[0],
169
157
  main: view.main || $el.hasClass('view-main'),
170
- $navbarsEl,
171
- navbarsEl: $navbarsEl ? $navbarsEl[0] : undefined,
172
158
  selector
173
159
  });
174
160
  if (view.main) {
@@ -110,10 +110,6 @@ export namespace View {
110
110
  componentCache?: boolean;
111
111
  /** When enabled, and there is no children pages inside of the View. It will load initial page that matches to initial URL (default true) */
112
112
  loadInitialPage?: boolean;
113
- /** Enables dynamic navbar for iOS theme */
114
- iosDynamicNavbar?: boolean;
115
- /** This option (when enabled) gives more native look for dynamic navbar left back-link icon animation. Useful only when you use dynamic navbar with default back-link icon on left side set as "sliding". */
116
- iosAnimateNavbarBackIcon?: boolean;
117
113
  /** Enable/disable ability to swipe back from left edge of screen to get to the previous page. For iOS theme */
118
114
  iosSwipeBack?: boolean;
119
115
  /** Value in px. Swipe back action will start if "touch distance" will be more than this value. For iOS theme */
@@ -73,7 +73,7 @@ export default {
73
73
  iosSwipeBackThreshold: 0,
74
74
  mdSwipeBack: false,
75
75
  mdSwipeBackAnimateShadow: true,
76
- mdSwipeBackAnimateOpacity: false,
76
+ mdSwipeBackAnimateOpacity: true,
77
77
  mdSwipeBackActiveArea: 30,
78
78
  mdSwipeBackThreshold: 0,
79
79
  // Push State
@@ -88,10 +88,6 @@ export default {
88
88
  browserHistoryTabs: 'replace',
89
89
  // Animate Pages
90
90
  animate: true,
91
- // iOS Dynamic Navbar
92
- iosDynamicNavbar: true,
93
- // Animate iOS Navbar Back Icon
94
- iosAnimateNavbarBackIcon: true,
95
91
  // Delays
96
92
  iosPageLoadDelay: 0,
97
93
  mdPageLoadDelay: 0,
@@ -4,10 +4,7 @@ import { extend, deleteProps } from '../../shared/utils.js';
4
4
  import Framework7Class from '../../shared/class.js';
5
5
  import { getDevice } from '../../shared/get-device.js';
6
6
  class VirtualList extends Framework7Class {
7
- constructor(app, params) {
8
- if (params === void 0) {
9
- params = {};
10
- }
7
+ constructor(app, params = {}) {
11
8
  super(params, [app]);
12
9
  const vl = this;
13
10
  const device = getDevice();
@@ -333,10 +330,7 @@ class VirtualList extends Framework7Class {
333
330
  }
334
331
 
335
332
  // Filter
336
- filterItems(indexes, resetScrollTop) {
337
- if (resetScrollTop === void 0) {
338
- resetScrollTop = true;
339
- }
333
+ filterItems(indexes, resetScrollTop = true) {
340
334
  const vl = this;
341
335
  vl.filteredItems = [];
342
336
  for (let i = 0; i < indexes.length; i += 1) {