framework7 8.3.4 → 9.0.0

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 (345) hide show
  1. package/components/accordion/accordion-rtl.css +1 -1
  2. package/components/accordion/accordion.css +1 -1
  3. package/components/actions/actions-ios.less +22 -15
  4. package/components/actions/actions-rtl.css +1 -1
  5. package/components/actions/actions-vars.less +4 -7
  6. package/components/actions/actions.css +1 -1
  7. package/components/actions/actions.js +2 -8
  8. package/components/actions/actions.less +0 -3
  9. package/components/app/app-class.d.ts +2 -0
  10. package/components/app/app-class.js +19 -15
  11. package/components/app/app-vars.less +41 -6
  12. package/components/app/app.less +1 -1
  13. package/components/area-chart/area-chart-class.js +18 -31
  14. package/components/area-chart/area-chart-rtl.css +1 -1
  15. package/components/area-chart/area-chart.css +1 -1
  16. package/components/autocomplete/autocomplete-class.js +13 -14
  17. package/components/autocomplete/autocomplete-ios.less +16 -0
  18. package/components/autocomplete/autocomplete-rtl.css +1 -1
  19. package/components/autocomplete/autocomplete.css +1 -1
  20. package/components/autocomplete/autocomplete.d.ts +3 -3
  21. package/components/autocomplete/autocomplete.js +3 -3
  22. package/components/autocomplete/autocomplete.less +7 -1
  23. package/components/block/block-vars.less +6 -6
  24. package/components/breadcrumbs/breadcrumbs-rtl.css +1 -1
  25. package/components/breadcrumbs/breadcrumbs.css +1 -1
  26. package/components/button/button-vars.less +13 -12
  27. package/components/button/button.less +2 -1
  28. package/components/calendar/calendar-class.js +20 -17
  29. package/components/calendar/calendar-ios.less +43 -0
  30. package/components/calendar/calendar-md.less +3 -0
  31. package/components/calendar/calendar-rtl.css +1 -1
  32. package/components/calendar/calendar-vars.less +24 -19
  33. package/components/calendar/calendar.css +1 -1
  34. package/components/calendar/calendar.d.ts +1 -1
  35. package/components/calendar/calendar.js +5 -8
  36. package/components/calendar/calendar.less +4 -2
  37. package/components/card/card-rtl.css +1 -1
  38. package/components/card/card-vars.less +5 -5
  39. package/components/card/card.css +1 -1
  40. package/components/card/card.js +3 -18
  41. package/components/card/card.less +1 -1
  42. package/components/checkbox/checkbox-rtl.css +1 -1
  43. package/components/checkbox/checkbox.css +1 -1
  44. package/components/chip/chip-rtl.css +1 -1
  45. package/components/chip/chip.css +1 -1
  46. package/components/color-picker/color-picker-class.js +11 -23
  47. package/components/color-picker/color-picker-ios.less +9 -0
  48. package/components/color-picker/color-picker-md.less +15 -0
  49. package/components/color-picker/color-picker-rtl.css +1 -1
  50. package/components/color-picker/color-picker-vars.less +9 -3
  51. package/components/color-picker/color-picker.css +1 -1
  52. package/components/color-picker/color-picker.d.ts +1 -2
  53. package/components/color-picker/color-picker.js +3 -7
  54. package/components/color-picker/color-picker.less +5 -25
  55. package/components/color-picker/modules/alpha-slider.js +2 -0
  56. package/components/color-picker/modules/brightness-slider.js +2 -0
  57. package/components/color-picker/modules/hs-spectrum.js +1 -2
  58. package/components/color-picker/modules/hsb-sliders.js +6 -0
  59. package/components/color-picker/modules/hue-slider.js +2 -0
  60. package/components/color-picker/modules/rgb-bars.js +6 -0
  61. package/components/color-picker/modules/rgb-sliders.js +6 -0
  62. package/components/color-picker/modules/sb-spectrum.js +1 -2
  63. package/components/color-picker/modules/wheel.js +1 -2
  64. package/components/contacts-list/contacts-list-rtl.css +1 -1
  65. package/components/contacts-list/contacts-list.css +1 -1
  66. package/components/data-table/data-table-class.js +1 -4
  67. package/components/data-table/data-table-ios.less +1 -1
  68. package/components/data-table/data-table-md.less +4 -2
  69. package/components/data-table/data-table-rtl.css +1 -1
  70. package/components/data-table/data-table.css +1 -1
  71. package/components/data-table/data-table.less +4 -4
  72. package/components/dialog/dialog-class.js +6 -3
  73. package/components/dialog/dialog-ios.less +10 -34
  74. package/components/dialog/dialog-md.less +2 -22
  75. package/components/dialog/dialog-rtl.css +1 -1
  76. package/components/dialog/dialog-vars.less +8 -10
  77. package/components/dialog/dialog.css +1 -1
  78. package/components/dialog/dialog.js +9 -27
  79. package/components/dialog/dialog.less +6 -25
  80. package/components/fab/fab-ios.less +2 -0
  81. package/components/fab/fab-rtl.css +1 -1
  82. package/components/fab/fab-vars.less +30 -6
  83. package/components/fab/fab.css +1 -1
  84. package/components/fab/fab.js +3 -12
  85. package/components/gauge/gauge-class.js +2 -8
  86. package/components/gauge/gauge-rtl.css +1 -1
  87. package/components/gauge/gauge.css +1 -1
  88. package/components/icon/icon-ios.less +10 -0
  89. package/components/icon/icon-md.less +9 -0
  90. package/components/icon/icon.less +2 -1
  91. package/components/infinite-scroll/infinite-scroll-rtl.css +1 -1
  92. package/components/infinite-scroll/infinite-scroll.css +1 -1
  93. package/components/input/input-ios.less +3 -2
  94. package/components/input/input-rtl.css +1 -1
  95. package/components/input/input.css +1 -1
  96. package/components/input/input.js +2 -5
  97. package/components/list/list-vars.less +7 -5
  98. package/components/list/list.less +1 -1
  99. package/components/list-index/list-index-class.js +3 -7
  100. package/components/list-index/list-index-rtl.css +1 -1
  101. package/components/list-index/list-index.css +1 -1
  102. package/components/login-screen/login-screen-rtl.css +1 -1
  103. package/components/login-screen/login-screen.css +1 -1
  104. package/components/login-screen/login-screen.js +2 -8
  105. package/components/login-screen/login-screen.less +1 -0
  106. package/components/messagebar/messagebar-class.js +5 -20
  107. package/components/messagebar/messagebar-ios.less +19 -14
  108. package/components/messagebar/messagebar-md.less +3 -0
  109. package/components/messagebar/messagebar-rtl.css +1 -1
  110. package/components/messagebar/messagebar-vars.less +12 -15
  111. package/components/messagebar/messagebar.css +1 -1
  112. package/components/messagebar/messagebar.less +4 -5
  113. package/components/messages/messages-class.js +25 -52
  114. package/components/messages/messages-ios.less +6 -2
  115. package/components/messages/messages-rtl.css +1 -1
  116. package/components/messages/messages-vars.less +1 -1
  117. package/components/messages/messages.css +1 -1
  118. package/components/navbar/navbar-ios.less +52 -672
  119. package/components/navbar/navbar-md.less +41 -1
  120. package/components/navbar/navbar-vars.less +4 -3
  121. package/components/navbar/navbar.js +28 -185
  122. package/components/navbar/navbar.less +8 -66
  123. package/components/notification/notification-class.js +6 -6
  124. package/components/notification/notification-ios.less +3 -8
  125. package/components/notification/notification-md.less +1 -20
  126. package/components/notification/notification-rtl.css +1 -1
  127. package/components/notification/notification-vars.less +13 -16
  128. package/components/notification/notification.css +1 -1
  129. package/components/notification/notification.less +8 -1
  130. package/components/page/page-ios.less +1 -8
  131. package/components/page/page-md.less +12 -11
  132. package/components/page/page.less +14 -12
  133. package/components/panel/panel-class.js +7 -28
  134. package/components/panel/panel-ios.less +4 -0
  135. package/components/panel/panel-rtl.css +1 -3
  136. package/components/panel/panel-vars.less +8 -5
  137. package/components/panel/panel.css +1 -3
  138. package/components/panel/panel.js +8 -32
  139. package/components/panel/panel.less +9 -9
  140. package/components/panel/resizable-panel.js +2 -4
  141. package/components/photo-browser/photo-browser-class.js +12 -47
  142. package/components/photo-browser/photo-browser-rtl.css +1 -1
  143. package/components/photo-browser/photo-browser-vars.less +8 -10
  144. package/components/photo-browser/photo-browser.css +1 -1
  145. package/components/photo-browser/photo-browser.d.ts +2 -4
  146. package/components/photo-browser/photo-browser.js +1 -3
  147. package/components/photo-browser/photo-browser.less +15 -71
  148. package/components/picker/picker-class.js +4 -5
  149. package/components/picker/picker-ios.less +6 -1
  150. package/components/picker/picker-md.less +9 -0
  151. package/components/picker/picker-rtl.css +1 -1
  152. package/components/picker/picker-vars.less +1 -1
  153. package/components/picker/picker.css +1 -1
  154. package/components/picker/picker.d.ts +1 -1
  155. package/components/picker/picker.js +2 -5
  156. package/components/picker/picker.less +0 -4
  157. package/components/pie-chart/pie-chart-class.js +7 -14
  158. package/components/pie-chart/pie-chart-rtl.css +1 -1
  159. package/components/pie-chart/pie-chart.css +1 -1
  160. package/components/popover/popover-class.js +22 -62
  161. package/components/popover/popover-ios.less +66 -2
  162. package/components/popover/popover-md.less +2 -27
  163. package/components/popover/popover-rtl.css +1 -1
  164. package/components/popover/popover-vars.less +2 -3
  165. package/components/popover/popover.css +1 -1
  166. package/components/popover/popover.d.ts +0 -2
  167. package/components/popover/popover.js +2 -9
  168. package/components/popover/popover.less +28 -50
  169. package/components/popup/popup-class.js +15 -9
  170. package/components/popup/popup-rtl.css +1 -1
  171. package/components/popup/popup-vars.less +2 -2
  172. package/components/popup/popup.css +1 -1
  173. package/components/popup/popup.js +2 -8
  174. package/components/popup/popup.less +6 -6
  175. package/components/preloader/preloader-rtl.css +1 -1
  176. package/components/preloader/preloader.css +1 -1
  177. package/components/preloader/preloader.js +2 -8
  178. package/components/progressbar/progressbar-md.less +12 -0
  179. package/components/progressbar/progressbar-rtl.css +1 -1
  180. package/components/progressbar/progressbar-vars.less +6 -5
  181. package/components/progressbar/progressbar.css +1 -1
  182. package/components/progressbar/progressbar.js +3 -12
  183. package/components/progressbar/progressbar.less +6 -0
  184. package/components/pull-to-refresh/pull-to-refresh-class.js +5 -12
  185. package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -1
  186. package/components/pull-to-refresh/pull-to-refresh.css +1 -1
  187. package/components/radio/radio-rtl.css +1 -1
  188. package/components/radio/radio.css +1 -1
  189. package/components/range/range-class.js +34 -27
  190. package/components/range/range-ios.less +60 -0
  191. package/components/range/range-md.less +67 -4
  192. package/components/range/range-rtl.css +1 -1
  193. package/components/range/range-vars.less +18 -13
  194. package/components/range/range.css +1 -1
  195. package/components/range/range.d.ts +3 -1
  196. package/components/range/range.js +2 -8
  197. package/components/range/range.less +11 -24
  198. package/components/searchbar/searchbar-class.js +7 -8
  199. package/components/searchbar/searchbar-ios.less +37 -13
  200. package/components/searchbar/searchbar-md.less +5 -0
  201. package/components/searchbar/searchbar-rtl.css +1 -1
  202. package/components/searchbar/searchbar-vars.less +13 -16
  203. package/components/searchbar/searchbar.css +1 -1
  204. package/components/searchbar/searchbar.js +4 -32
  205. package/components/searchbar/searchbar.less +4 -5
  206. package/components/sheet/sheet-class.js +21 -17
  207. package/components/sheet/sheet-ios.less +10 -0
  208. package/components/sheet/sheet-md.less +14 -0
  209. package/components/sheet/sheet-rtl.css +1 -1
  210. package/components/sheet/sheet-vars.less +5 -9
  211. package/components/sheet/sheet.css +1 -1
  212. package/components/sheet/sheet.js +2 -8
  213. package/components/sheet/sheet.less +5 -17
  214. package/components/skeleton/skeleton-rtl.css +1 -1
  215. package/components/skeleton/skeleton.css +1 -1
  216. package/components/smart-select/smart-select-class.js +15 -20
  217. package/components/smart-select/smart-select-rtl.css +1 -1
  218. package/components/smart-select/smart-select.css +1 -1
  219. package/components/smart-select/smart-select.d.ts +5 -7
  220. package/components/smart-select/smart-select.js +4 -4
  221. package/components/sortable/sortable-rtl.css +1 -1
  222. package/components/sortable/sortable.css +1 -1
  223. package/components/sortable/sortable.js +8 -27
  224. package/components/statusbar/statusbar.js +2 -5
  225. package/components/stepper/stepper-rtl.css +1 -1
  226. package/components/stepper/stepper-vars.less +3 -3
  227. package/components/stepper/stepper.css +1 -1
  228. package/components/stepper/stepper.js +2 -8
  229. package/components/subnavbar/subnavbar-ios.less +16 -1
  230. package/components/subnavbar/subnavbar-md.less +5 -5
  231. package/components/subnavbar/subnavbar-vars.less +12 -6
  232. package/components/subnavbar/subnavbar.less +5 -6
  233. package/components/swipeout/swipeout-ios.less +37 -0
  234. package/components/swipeout/swipeout-md.less +56 -0
  235. package/components/swipeout/swipeout-rtl.css +1 -1
  236. package/components/swipeout/swipeout-vars.less +13 -2
  237. package/components/swipeout/swipeout.css +1 -1
  238. package/components/swipeout/swipeout.js +102 -35
  239. package/components/swipeout/swipeout.less +20 -44
  240. package/components/swiper/swiper-rtl.css +1 -1
  241. package/components/swiper/swiper.css +1 -1
  242. package/components/tabs/tabs-rtl.css +1 -1
  243. package/components/tabs/tabs.css +1 -1
  244. package/components/tabs/tabs.js +3 -9
  245. package/components/text-editor/text-editor-class.js +1 -1
  246. package/components/text-editor/text-editor-rtl.css +1 -1
  247. package/components/text-editor/text-editor.css +1 -1
  248. package/components/timeline/timeline-ios.less +0 -5
  249. package/components/timeline/timeline-md.less +0 -5
  250. package/components/timeline/timeline-rtl.css +1 -1
  251. package/components/timeline/timeline-vars.less +1 -17
  252. package/components/timeline/timeline.css +1 -1
  253. package/components/timeline/timeline.less +0 -196
  254. package/components/toast/toast-class.js +2 -2
  255. package/components/toast/toast-ios.less +2 -0
  256. package/components/toast/toast-rtl.css +1 -1
  257. package/components/toast/toast-vars.less +2 -4
  258. package/components/toast/toast.css +1 -1
  259. package/components/toast/toast.less +1 -1
  260. package/components/toggle/toggle-class.js +5 -12
  261. package/components/toggle/toggle-ios.less +68 -50
  262. package/components/toggle/toggle-rtl.css +1 -1
  263. package/components/toggle/toggle-vars.less +2 -2
  264. package/components/toggle/toggle.css +1 -1
  265. package/components/toolbar/tabbar-highlight.js +134 -0
  266. package/components/toolbar/toolbar-ios.less +160 -14
  267. package/components/toolbar/toolbar-md.less +77 -3
  268. package/components/toolbar/toolbar-vars.less +14 -10
  269. package/components/toolbar/toolbar.js +32 -13
  270. package/components/toolbar/toolbar.less +8 -56
  271. package/components/tooltip/tooltip-class.js +13 -16
  272. package/components/tooltip/tooltip-rtl.css +1 -1
  273. package/components/tooltip/tooltip.css +1 -1
  274. package/components/tooltip/tooltip.js +0 -16
  275. package/components/touch-highlight/touch-highlight-ios.less +17 -0
  276. package/components/touch-highlight/touch-highlight-md.less +2 -0
  277. package/components/touch-highlight/touch-highlight-vars.less +8 -0
  278. package/components/touch-highlight/touch-highlight.d.ts +25 -0
  279. package/components/touch-highlight/touch-highlight.js +123 -0
  280. package/components/touch-highlight/touch-highlight.less +9 -0
  281. package/components/touch-ripple/touch-ripple.js +1 -4
  282. package/components/treeview/treeview-rtl.css +1 -1
  283. package/components/treeview/treeview.css +1 -1
  284. package/components/typography/typography-rtl.css +1 -1
  285. package/components/typography/typography.css +1 -1
  286. package/components/view/resizable-view.js +2 -4
  287. package/components/view/view-class.js +1 -15
  288. package/components/view/view.d.ts +0 -4
  289. package/components/view/view.js +1 -5
  290. package/components/virtual-list/virtual-list-class.js +2 -8
  291. package/framework7-bundle-rtl.css +2284 -3019
  292. package/framework7-bundle-rtl.min.css +4 -10
  293. package/framework7-bundle.css +2245 -2978
  294. package/framework7-bundle.esm.js +5 -4
  295. package/framework7-bundle.js +7180 -6477
  296. package/framework7-bundle.js.map +1 -1
  297. package/framework7-bundle.less +4 -3
  298. package/framework7-bundle.min.css +4 -10
  299. package/framework7-bundle.min.js +4 -4
  300. package/framework7-bundle.min.js.map +1 -1
  301. package/framework7-lite-bundle.esm.js +5 -4
  302. package/framework7-lite.esm.js +5 -4
  303. package/framework7-rtl.css +509 -844
  304. package/framework7-rtl.min.css +4 -8
  305. package/framework7-types.d.ts +5 -1
  306. package/framework7.css +509 -843
  307. package/framework7.d.ts +4 -0
  308. package/framework7.esm.js +5 -4
  309. package/framework7.less +4 -3
  310. package/framework7.min.css +4 -8
  311. package/less/mixins.less +10 -12
  312. package/modules/component/$h.js +1 -4
  313. package/modules/component/$jsx.js +1 -4
  314. package/modules/component/component-class.js +49 -114
  315. package/modules/component/component.js +6 -7
  316. package/modules/component/eventslisteners.js +1 -4
  317. package/modules/component/snabbdom/modules/hero.js +0 -1
  318. package/modules/component/snabbdom/modules/style.js +1 -1
  319. package/modules/component/vdom.js +17 -29
  320. package/modules/router/back.js +22 -96
  321. package/modules/router/clear-previous-history.js +1 -7
  322. package/modules/router/component-loader.js +23 -32
  323. package/modules/router/modal.js +1 -4
  324. package/modules/router/navigate.js +28 -167
  325. package/modules/router/redirect.js +1 -5
  326. package/modules/router/router-class.js +28 -293
  327. package/modules/router/router.d.ts +2 -0
  328. package/modules/router/swipe-back.js +10 -318
  329. package/modules/router/tab.js +1 -4
  330. package/modules/service-worker/service-worker.js +1 -1
  331. package/modules/store/create-store.js +2 -8
  332. package/modules/touch/touch.d.ts +5 -3
  333. package/modules/touch/touch.js +23 -37
  334. package/package.json +4 -4
  335. package/shared/$jsx.js +1 -4
  336. package/shared/class.js +5 -26
  337. package/shared/constructor-methods.js +4 -19
  338. package/shared/events-class.js +3 -12
  339. package/shared/get-device.js +4 -11
  340. package/shared/get-support.d.ts +0 -6
  341. package/shared/get-support.js +1 -20
  342. package/shared/material-color-utils.js +2102 -693
  343. package/shared/material-colors.js +94 -23
  344. package/shared/modal-methods.js +2 -8
  345. package/shared/utils.js +23 -45
@@ -12,18 +12,12 @@ export default {
12
12
  app,
13
13
  domProp: 'f7Stepper'
14
14
  }), {
15
- getValue(el) {
16
- if (el === void 0) {
17
- el = '.stepper';
18
- }
15
+ getValue(el = '.stepper') {
19
16
  const stepper = app.stepper.get(el);
20
17
  if (stepper) return stepper.getValue();
21
18
  return undefined;
22
19
  },
23
- setValue(el, value) {
24
- if (el === void 0) {
25
- el = '.stepper';
26
- }
20
+ setValue(el = '.stepper', value) {
27
21
  const stepper = app.stepper.get(el);
28
22
  if (stepper) return stepper.setValue(value);
29
23
  return undefined;
@@ -3,6 +3,21 @@
3
3
  height: calc(var(--f7-subnavbar-height) + 1px);
4
4
  margin-top: -1px;
5
5
  padding-top: 1px;
6
+ border-radius: var(--f7-subnavbar-height);
7
+ box-shadow: var(--f7-glass-shadow);
8
+ .ios-glass-backdrop();
9
+ --f7-segmented-strong-bg-color: transparent;
10
+
11
+ &:has(> .searchbar) {
12
+ background: transparent;
13
+ backdrop-filter: none;
14
+ box-shadow: none;
15
+ }
16
+
17
+ .subnavbar-inner {
18
+ border-radius: inherit;
19
+ }
20
+
6
21
  .title {
7
22
  align-self: flex-start;
8
23
  flex-shrink: 10;
@@ -43,7 +58,7 @@
43
58
  a.link {
44
59
  justify-content: flex-start;
45
60
  }
46
- a.icon-only {
61
+ a:is(.icon-only, :has(i:only-child), :has(svg:only-child)) {
47
62
  justify-content: center;
48
63
  margin: 0;
49
64
  }
@@ -1,27 +1,27 @@
1
1
  .md {
2
2
  .subnavbar {
3
3
  height: var(--f7-subnavbar-height);
4
- .ltr ({
4
+ .ltr({
5
5
  .right {
6
6
  margin-left: auto;
7
7
  }
8
8
  .right:first-child {
9
9
  right: 16px;
10
10
  }
11
- });;
12
- .rtl ({
11
+ });
12
+ .rtl({
13
13
  .right {
14
14
  margin-right: auto;
15
15
  }
16
16
  .right:first-child {
17
17
  left: 16px;
18
18
  }
19
- });;
19
+ });
20
20
  a.link {
21
21
  justify-content: center;
22
22
  padding: 0 12px;
23
23
  }
24
- a.icon-only {
24
+ a:is(.icon-only, :has(i:only-child), :has(svg:only-child)) {
25
25
  flex-shrink: 0;
26
26
  padding: 0 12px;
27
27
  }
@@ -1,6 +1,6 @@
1
1
  :root {
2
2
  /*
3
- --f7-subnavbar-bg-color: var(--f7-bars-bg-color);
3
+
4
4
  --f7-subnavbar-bg-color-rgb: var(--f7-bars-bg-color-rgb);
5
5
  --f7-subnavbar-border-color: var(--f7-bars-border-color);
6
6
  --f7-subnavbar-link-color: var(--f7-bars-link-color);
@@ -10,12 +10,15 @@
10
10
  }
11
11
  .ios-vars({
12
12
  --f7-subnavbar-height: 44px;
13
- --f7-subnavbar-inner-padding-left: 8px;
14
- --f7-subnavbar-inner-padding-right: 8px;
15
- --f7-subnavbar-title-font-size: 34px;
13
+ --f7-subnavbar-offset-left: calc(16px + var(--f7-safe-area-left));
14
+ --f7-subnavbar-offset-right: calc(16px + var(--f7-safe-area-right));
15
+ --f7-subnavbar-inner-padding-left: 5px;
16
+ --f7-subnavbar-inner-padding-right: 5px;
17
+ --f7-subnavbar-title-font-size: 24px;
16
18
  --f7-subnavbar-title-font-weight: 700;
17
19
  --f7-subnavbar-title-letter-spacing: -0.03em;
18
20
  --f7-subnavbar-title-margin-left: 8px;
21
+ --f7-subnavbar-bg-color: var(--f7-glass-bg-color);
19
22
  /*
20
23
  --f7-subnavbar-link-height: var(--f7-subnavbar-height);
21
24
  --f7-subnavbar-link-line-height: var(--f7-subnavbar-height);
@@ -23,13 +26,16 @@
23
26
  });
24
27
  .md-vars({
25
28
  --f7-subnavbar-height: 64px;
26
- --f7-subnavbar-inner-padding-left: 16px;
27
- --f7-subnavbar-inner-padding-right: 16px;
29
+ --f7-subnavbar-offset-left: 0;
30
+ --f7-subnavbar-offset-right: 0;
31
+ --f7-subnavbar-inner-padding-left: calc(16px + var(--f7-safe-area-left));
32
+ --f7-subnavbar-inner-padding-right: calc(16px + var(--f7-safe-area-right));
28
33
  --f7-subnavbar-title-font-size: 22px;
29
34
  --f7-subnavbar-title-font-weight: 400;
30
35
  --f7-subnavbar-title-letter-spacing: 0;
31
36
  --f7-subnavbar-title-margin-left: 0px;
32
37
  /*
38
+ --f7-subnavbar-bg-color: var(--f7-bars-bg-color);
33
39
  --f7-subnavbar-link-height: var(--f7-subnavbar-height);
34
40
  --f7-subnavbar-link-line-height: var(--f7-subnavbar-height);
35
41
  */
@@ -1,9 +1,9 @@
1
1
  /* === Subnavbar === */
2
2
  @import './subnavbar-vars.less';
3
3
  .subnavbar {
4
- width: 100%;
5
4
  position: absolute;
6
- left: 0;
5
+ left: var(--f7-subnavbar-offset-left);
6
+ right: var(--f7-subnavbar-offset-right);
7
7
  top: 0;
8
8
  z-index: 600;
9
9
  box-sizing: border-box;
@@ -12,7 +12,7 @@
12
12
  align-items: center;
13
13
  background-color: var(--f7-subnavbar-bg-color, var(--f7-bars-bg-color));
14
14
  color: var(--f7-subnavbar-text-color, var(--f7-bars-text-color));
15
- .ios-translucent-bars(var(--f7-subnavbar-bg-color-rgb, var(--f7-bars-bg-color-rgb)));
15
+
16
16
  .subnavbar-title {
17
17
  position: relative;
18
18
  overflow: hidden;
@@ -49,7 +49,7 @@
49
49
  line-height: var(--f7-subnavbar-link-line-height, var(--f7-subnavbar-height));
50
50
  height: var(--f7-subnavbar-link-height, var(--f7-subnavbar-height));
51
51
  }
52
- a.icon-only {
52
+ a:is(.icon-only, :has(i:only-child), :has(svg:only-child)) {
53
53
  min-width: var(--f7-subnavbar-height);
54
54
  }
55
55
  &.no-outline {
@@ -76,8 +76,7 @@
76
76
  box-sizing: border-box;
77
77
  justify-content: space-between;
78
78
  overflow: hidden;
79
- padding: 0 calc(var(--f7-subnavbar-inner-padding-left) + var(--f7-safe-area-right)) 0
80
- calc(var(--f7-subnavbar-inner-padding-right) + var(--f7-safe-area-left));
79
+ padding: 0 var(--f7-subnavbar-inner-padding-left) 0 var(--f7-subnavbar-inner-padding-right);
81
80
  }
82
81
  .navbar .subnavbar {
83
82
  top: 100%;
@@ -1,2 +1,39 @@
1
1
  .ios {
2
+ .swipeout-actions-right {
3
+ right: 0%;
4
+ }
5
+ .swipeout-actions-left {
6
+ left: 0%;
7
+ }
8
+ .swipeout-actions-left,
9
+ .swipeout-actions-right {
10
+ padding: 0 10px;
11
+ gap: 10px;
12
+ align-items: center;
13
+ > a,
14
+ > button,
15
+ > span,
16
+ > div {
17
+ transform: scale(0);
18
+ padding: var(--f7-swipeout-button-padding-vertical)
19
+ var(--f7-swipeout-button-padding-horizontal);
20
+ }
21
+ }
22
+ .swipeout-opened,
23
+ .swipeout-active {
24
+ .swipeout-content {
25
+ background-color: var(--f7-swipeout-active-bg-color);
26
+ border-radius: var(--f7-swipeout-active-border-radius);
27
+ }
28
+ .item-content {
29
+ border-radius: var(--f7-swipeout-active-border-radius);
30
+ }
31
+ .swipeout-content .item-inner::after {
32
+ opacity: 0;
33
+ }
34
+ }
35
+ .swipeout-overswipe {
36
+ transition-duration: 200ms;
37
+ transition-property: transform, left, width, margin-left, margin-right;
38
+ }
2
39
  }
@@ -1,2 +1,58 @@
1
1
  .md {
2
+ .swipeout-actions-left,
3
+ .swipeout-actions-right {
4
+ > a,
5
+ > button,
6
+ > span,
7
+ > div {
8
+ &:after {
9
+ content: '';
10
+ pointer-events: none;
11
+ position: absolute;
12
+ top: 0;
13
+ width: 600%;
14
+ height: 100%;
15
+ background: inherit;
16
+ z-index: -1;
17
+ transform: translate3d(0, 0, 0);
18
+ pointer-events: none;
19
+ }
20
+ }
21
+ }
22
+ .swipeout-actions-right {
23
+ right: 0%;
24
+ transform: translateX(calc(100% + 1px));
25
+ > a,
26
+ > button,
27
+ > span,
28
+ > div {
29
+ &:after {
30
+ left: 100%;
31
+ }
32
+ &:last-child {
33
+ padding-right: calc(
34
+ var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-right)
35
+ );
36
+ }
37
+ }
38
+ }
39
+ .swipeout-actions-left {
40
+ left: 0%;
41
+ transform: translateX(calc(-100% - 1px));
42
+ > a,
43
+ > button,
44
+ > span,
45
+ > div {
46
+ &:after {
47
+ right: 100%;
48
+ }
49
+ &:first-child {
50
+ padding-left: calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-left));
51
+ }
52
+ }
53
+ }
54
+
55
+ .swipeout-overswipe {
56
+ transition-property: left;
57
+ }
2
58
  }
@@ -1 +1 @@
1
- :root{--f7-swipeout-delete-button-bg-color:#ff3b30;--f7-swipeout-button-text-color:#fff;--f7-swipeout-button-padding-vertical:0px;--f7-swipeout-button-bg-color:rgba(0, 0, 0, 0.22)}:root .dark,:root.dark{--f7-swipeout-button-bg-color:rgba(255, 255, 255, 0.55)}.ios{--f7-swipeout-button-padding-horizontal:30px;--f7-swipeout-button-font-size:inherit;--f7-swipeout-button-font-weight:inherit}.md{--f7-swipeout-button-padding-horizontal:24px;--f7-swipeout-button-font-size:14px;--f7-swipeout-button-font-weight:500}.md .dark,.md.dark{--f7-swipeout-button-text-color:#000}.swipeout{overflow:hidden;transform-style:preserve-3d}.swipeout-deleting{transition-duration:.3s}.swipeout-deleting .swipeout-content{transform:translateX(-100%)}.swipeout-transitioning .swipeout-actions-left a,.swipeout-transitioning .swipeout-actions-right a,.swipeout-transitioning .swipeout-content,.swipeout-transitioning .swipeout-overswipe{transition-duration:.3s;transition-property:transform,left}.swipeout-content{position:relative;z-index:10}.swipeout-overswipe{transition-duration:.2s;transition-property:left}.swipeout-actions-left,.swipeout-actions-right{position:absolute;top:0;height:100%;display:flex;direction:ltr}.swipeout-actions-left>a,.swipeout-actions-left>button,.swipeout-actions-left>div,.swipeout-actions-left>span,.swipeout-actions-right>a,.swipeout-actions-right>button,.swipeout-actions-right>div,.swipeout-actions-right>span{color:var(--f7-swipeout-button-text-color);background:var(--f7-swipeout-button-bg-color);padding:var(--f7-swipeout-button-padding-vertical) var(--f7-swipeout-button-padding-horizontal);display:flex;align-items:center;position:relative;left:0;font-size:var(--f7-swipeout-button-font-size);font-weight:var(--f7-swipeout-button-font-weight)}.swipeout-actions-left>a:after,.swipeout-actions-left>button:after,.swipeout-actions-left>div:after,.swipeout-actions-left>span:after,.swipeout-actions-right>a:after,.swipeout-actions-right>button:after,.swipeout-actions-right>div:after,.swipeout-actions-right>span:after{content:'';position:absolute;top:0;width:600%;height:100%;background:inherit;z-index:-1;transform:translate3d(0,0,0);pointer-events:none}.swipeout-actions-left .swipeout-delete,.swipeout-actions-right .swipeout-delete{background:var(--f7-swipeout-delete-button-bg-color)}.swipeout-actions-right{right:0%;transform:translateX(calc(100% + 1px))}.swipeout-actions-right>a:after,.swipeout-actions-right>button:after,.swipeout-actions-right>div:after,.swipeout-actions-right>span:after{left:100%}.swipeout-actions-right>a:last-child,.swipeout-actions-right>button:last-child,.swipeout-actions-right>div:last-child,.swipeout-actions-right>span:last-child{padding-right:calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-right))}.swipeout-actions-left{left:0%;transform:translateX(calc(-100% - 1px))}.swipeout-actions-left>a:after,.swipeout-actions-left>button:after,.swipeout-actions-left>div:after,.swipeout-actions-left>span:after{right:100%}.swipeout-actions-left>a:first-child,.swipeout-actions-left>button:first-child,.swipeout-actions-left>div:first-child,.swipeout-actions-left>span:first-child{padding-left:calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-left))}.swipeout-actions-left [class*=color-],.swipeout-actions-right [class*=color-]{--f7-swipeout-button-bg-color:var(--f7-theme-color)}
1
+ :root{--f7-swipeout-delete-button-bg-color:#ff3b30;--f7-swipeout-button-text-color:#fff;--f7-swipeout-button-bg-color:#00000038}:root .dark,:root.dark{--f7-swipeout-button-bg-color:#ffffff8c}.ios{--f7-swipeout-button-border-radius:48px;--f7-swipeout-button-padding-vertical:10px;--f7-swipeout-button-padding-horizontal:16px;--f7-swipeout-button-font-size:inherit;--f7-swipeout-button-font-weight:inherit;--f7-swipeout-active-border-radius:16px;--f7-swipeout-active-bg-color:#eee}.ios .dark,.ios.dark{--f7-swipeout-active-bg-color:#2c2c2e}.md{--f7-swipeout-button-border-radius:0px;--f7-swipeout-button-padding-vertical:0px;--f7-swipeout-button-padding-horizontal:24px;--f7-swipeout-button-font-size:14px;--f7-swipeout-button-font-weight:500}.md .dark,.md.dark{--f7-swipeout-button-text-color:#000}.swipeout{overflow:hidden;transform-style:preserve-3d}.swipeout-deleting{transition-duration:.3s}.swipeout-deleting .swipeout-content{transform:translateX(-100%)}.swipeout-transitioning .swipeout-content,.swipeout-transitioning .swipeout-content .item-inner:after{transition-duration:.3s;transition-property:transform,left,background-color,border-radius,opacity}.swipeout-transitioning .swipeout-actions-left a,.swipeout-transitioning .swipeout-actions-right a,.swipeout-transitioning .swipeout-overswipe{transition-duration:.3s;transition-property:transform,left,width,margin-left,margin-right}.swipeout-transitioning:not(.swipeout-opened) .swipeout-content{transition-delay:0s,0s,.3s,.3s,0s}.list li:has(+li:is(.swipeout-opened,.swipeout-active)) .item-inner:after{opacity:0;transition-duration:.3s}.swipeout-content{position:relative;z-index:10}.swipeout-overswipe{transition-duration:.2s}.swipeout-actions-left,.swipeout-actions-right{direction:ltr;display:flex;height:100%;position:absolute;top:0}.swipeout-actions-left>a,.swipeout-actions-left>button,.swipeout-actions-left>div,.swipeout-actions-left>span,.swipeout-actions-right>a,.swipeout-actions-right>button,.swipeout-actions-right>div,.swipeout-actions-right>span{align-items:center;background:var(--f7-swipeout-button-bg-color);border-radius:var(--f7-swipeout-button-border-radius);box-sizing:border-box;color:var(--f7-swipeout-button-text-color);display:flex;font-size:var(--f7-swipeout-button-font-size);font-weight:var(--f7-swipeout-button-font-weight);left:0;padding:var(--f7-swipeout-button-padding-vertical) var(--f7-swipeout-button-padding-horizontal);position:relative}.swipeout-actions-left .swipeout-delete,.swipeout-actions-right .swipeout-delete{background:var(--f7-swipeout-delete-button-bg-color)}.swipeout-actions-left [class*=color-],.swipeout-actions-right [class*=color-]{--f7-swipeout-button-bg-color:var(--f7-theme-color)}.ios .swipeout-actions-right{right:0}.ios .swipeout-actions-left{left:0}.ios .swipeout-actions-left,.ios .swipeout-actions-right{align-items:center;gap:10px;padding:0 10px}.ios .swipeout-actions-left>a,.ios .swipeout-actions-left>button,.ios .swipeout-actions-left>div,.ios .swipeout-actions-left>span,.ios .swipeout-actions-right>a,.ios .swipeout-actions-right>button,.ios .swipeout-actions-right>div,.ios .swipeout-actions-right>span{padding:var(--f7-swipeout-button-padding-vertical) var(--f7-swipeout-button-padding-horizontal);transform:scale(0)}.ios .swipeout-active .swipeout-content,.ios .swipeout-opened .swipeout-content{background-color:var(--f7-swipeout-active-bg-color);border-radius:var(--f7-swipeout-active-border-radius)}.ios .swipeout-active .item-content,.ios .swipeout-opened .item-content{border-radius:var(--f7-swipeout-active-border-radius)}.ios .swipeout-active .swipeout-content .item-inner:after,.ios .swipeout-opened .swipeout-content .item-inner:after{opacity:0}.ios .swipeout-overswipe{transition-duration:.2s;transition-property:transform,left,width,margin-left,margin-right}.md .swipeout-actions-left>a:after,.md .swipeout-actions-left>button:after,.md .swipeout-actions-left>div:after,.md .swipeout-actions-left>span:after,.md .swipeout-actions-right>a:after,.md .swipeout-actions-right>button:after,.md .swipeout-actions-right>div:after,.md .swipeout-actions-right>span:after{background:inherit;content:"";height:100%;pointer-events:none;position:absolute;top:0;transform:translateZ(0);width:600%;z-index:-1}.md .swipeout-actions-right{right:0;transform:translateX(calc(100% + 1px))}.md .swipeout-actions-right>a:after,.md .swipeout-actions-right>button:after,.md .swipeout-actions-right>div:after,.md .swipeout-actions-right>span:after{left:100%}.md .swipeout-actions-right>a:last-child,.md .swipeout-actions-right>button:last-child,.md .swipeout-actions-right>div:last-child,.md .swipeout-actions-right>span:last-child{padding-right:calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-right))}.md .swipeout-actions-left{left:0;transform:translateX(calc(-100% - 1px))}.md .swipeout-actions-left>a:after,.md .swipeout-actions-left>button:after,.md .swipeout-actions-left>div:after,.md .swipeout-actions-left>span:after{right:100%}.md .swipeout-actions-left>a:first-child,.md .swipeout-actions-left>button:first-child,.md .swipeout-actions-left>div:first-child,.md .swipeout-actions-left>span:first-child{padding-left:calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-left))}.md .swipeout-overswipe{transition-property:left}
@@ -1,7 +1,7 @@
1
1
  :root {
2
2
  --f7-swipeout-delete-button-bg-color: #ff3b30;
3
3
  --f7-swipeout-button-text-color: #fff;
4
- --f7-swipeout-button-padding-vertical: 0px;
4
+
5
5
  .light-vars({
6
6
  --f7-swipeout-button-bg-color: rgba(0,0,0,0.22);
7
7
  });
@@ -10,11 +10,22 @@
10
10
  });
11
11
  }
12
12
  .ios-vars({
13
- --f7-swipeout-button-padding-horizontal: 30px;
13
+ --f7-swipeout-button-border-radius: 48px;
14
+ --f7-swipeout-button-padding-vertical: 10px;
15
+ --f7-swipeout-button-padding-horizontal: 16px;
14
16
  --f7-swipeout-button-font-size: inherit;
15
17
  --f7-swipeout-button-font-weight: inherit;
18
+ --f7-swipeout-active-border-radius: 16px;
19
+ .light-vars({
20
+ --f7-swipeout-active-bg-color: #eee;
21
+ });
22
+ .dark-vars({
23
+ --f7-swipeout-active-bg-color: #2c2c2e;
24
+ });
16
25
  });
17
26
  .md-vars({
27
+ --f7-swipeout-button-border-radius: 0px;
28
+ --f7-swipeout-button-padding-vertical: 0px;
18
29
  --f7-swipeout-button-padding-horizontal: 24px;
19
30
  --f7-swipeout-button-font-size: 14px;
20
31
  --f7-swipeout-button-font-weight: 500;
@@ -1 +1 @@
1
- :root{--f7-swipeout-delete-button-bg-color:#ff3b30;--f7-swipeout-button-text-color:#fff;--f7-swipeout-button-padding-vertical:0px;--f7-swipeout-button-bg-color:rgba(0, 0, 0, 0.22)}:root .dark,:root.dark{--f7-swipeout-button-bg-color:rgba(255, 255, 255, 0.55)}.ios{--f7-swipeout-button-padding-horizontal:30px;--f7-swipeout-button-font-size:inherit;--f7-swipeout-button-font-weight:inherit}.md{--f7-swipeout-button-padding-horizontal:24px;--f7-swipeout-button-font-size:14px;--f7-swipeout-button-font-weight:500}.md .dark,.md.dark{--f7-swipeout-button-text-color:#000}.swipeout{overflow:hidden;transform-style:preserve-3d}.swipeout-deleting{transition-duration:.3s}.swipeout-deleting .swipeout-content{transform:translateX(-100%)}.swipeout-transitioning .swipeout-actions-left a,.swipeout-transitioning .swipeout-actions-right a,.swipeout-transitioning .swipeout-content,.swipeout-transitioning .swipeout-overswipe{transition-duration:.3s;transition-property:transform,left}.swipeout-content{position:relative;z-index:10}.swipeout-overswipe{transition-duration:.2s;transition-property:left}.swipeout-actions-left,.swipeout-actions-right{position:absolute;top:0;height:100%;display:flex;direction:ltr}.swipeout-actions-left>a,.swipeout-actions-left>button,.swipeout-actions-left>div,.swipeout-actions-left>span,.swipeout-actions-right>a,.swipeout-actions-right>button,.swipeout-actions-right>div,.swipeout-actions-right>span{color:var(--f7-swipeout-button-text-color);background:var(--f7-swipeout-button-bg-color);padding:var(--f7-swipeout-button-padding-vertical) var(--f7-swipeout-button-padding-horizontal);display:flex;align-items:center;position:relative;left:0;font-size:var(--f7-swipeout-button-font-size);font-weight:var(--f7-swipeout-button-font-weight)}.swipeout-actions-left>a:after,.swipeout-actions-left>button:after,.swipeout-actions-left>div:after,.swipeout-actions-left>span:after,.swipeout-actions-right>a:after,.swipeout-actions-right>button:after,.swipeout-actions-right>div:after,.swipeout-actions-right>span:after{content:'';position:absolute;top:0;width:600%;height:100%;background:inherit;z-index:-1;transform:translate3d(0,0,0);pointer-events:none}.swipeout-actions-left .swipeout-delete,.swipeout-actions-right .swipeout-delete{background:var(--f7-swipeout-delete-button-bg-color)}.swipeout-actions-right{right:0%;transform:translateX(calc(100% + 1px))}.swipeout-actions-right>a:after,.swipeout-actions-right>button:after,.swipeout-actions-right>div:after,.swipeout-actions-right>span:after{left:100%}.swipeout-actions-right>a:last-child,.swipeout-actions-right>button:last-child,.swipeout-actions-right>div:last-child,.swipeout-actions-right>span:last-child{padding-right:calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-right))}.swipeout-actions-left{left:0%;transform:translateX(calc(-100% - 1px))}.swipeout-actions-left>a:after,.swipeout-actions-left>button:after,.swipeout-actions-left>div:after,.swipeout-actions-left>span:after{right:100%}.swipeout-actions-left>a:first-child,.swipeout-actions-left>button:first-child,.swipeout-actions-left>div:first-child,.swipeout-actions-left>span:first-child{padding-left:calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-left))}.swipeout-actions-left [class*=color-],.swipeout-actions-right [class*=color-]{--f7-swipeout-button-bg-color:var(--f7-theme-color)}
1
+ :root{--f7-swipeout-delete-button-bg-color:#ff3b30;--f7-swipeout-button-text-color:#fff;--f7-swipeout-button-bg-color:#00000038}:root .dark,:root.dark{--f7-swipeout-button-bg-color:#ffffff8c}.ios{--f7-swipeout-button-border-radius:48px;--f7-swipeout-button-padding-vertical:10px;--f7-swipeout-button-padding-horizontal:16px;--f7-swipeout-button-font-size:inherit;--f7-swipeout-button-font-weight:inherit;--f7-swipeout-active-border-radius:16px;--f7-swipeout-active-bg-color:#eee}.ios .dark,.ios.dark{--f7-swipeout-active-bg-color:#2c2c2e}.md{--f7-swipeout-button-border-radius:0px;--f7-swipeout-button-padding-vertical:0px;--f7-swipeout-button-padding-horizontal:24px;--f7-swipeout-button-font-size:14px;--f7-swipeout-button-font-weight:500}.md .dark,.md.dark{--f7-swipeout-button-text-color:#000}.swipeout{overflow:hidden;transform-style:preserve-3d}.swipeout-deleting{transition-duration:.3s}.swipeout-deleting .swipeout-content{transform:translateX(-100%)}.swipeout-transitioning .swipeout-content,.swipeout-transitioning .swipeout-content .item-inner:after{transition-duration:.3s;transition-property:transform,left,background-color,border-radius,opacity}.swipeout-transitioning .swipeout-actions-left a,.swipeout-transitioning .swipeout-actions-right a,.swipeout-transitioning .swipeout-overswipe{transition-duration:.3s;transition-property:transform,left,width,margin-left,margin-right}.swipeout-transitioning:not(.swipeout-opened) .swipeout-content{transition-delay:0s,0s,.3s,.3s,0s}.list li:has(+li:is(.swipeout-opened,.swipeout-active)) .item-inner:after{opacity:0;transition-duration:.3s}.swipeout-content{position:relative;z-index:10}.swipeout-overswipe{transition-duration:.2s}.swipeout-actions-left,.swipeout-actions-right{direction:ltr;display:flex;height:100%;position:absolute;top:0}.swipeout-actions-left>a,.swipeout-actions-left>button,.swipeout-actions-left>div,.swipeout-actions-left>span,.swipeout-actions-right>a,.swipeout-actions-right>button,.swipeout-actions-right>div,.swipeout-actions-right>span{align-items:center;background:var(--f7-swipeout-button-bg-color);border-radius:var(--f7-swipeout-button-border-radius);box-sizing:border-box;color:var(--f7-swipeout-button-text-color);display:flex;font-size:var(--f7-swipeout-button-font-size);font-weight:var(--f7-swipeout-button-font-weight);left:0;padding:var(--f7-swipeout-button-padding-vertical) var(--f7-swipeout-button-padding-horizontal);position:relative}.swipeout-actions-left .swipeout-delete,.swipeout-actions-right .swipeout-delete{background:var(--f7-swipeout-delete-button-bg-color)}.swipeout-actions-left [class*=color-],.swipeout-actions-right [class*=color-]{--f7-swipeout-button-bg-color:var(--f7-theme-color)}.ios .swipeout-actions-right{right:0}.ios .swipeout-actions-left{left:0}.ios .swipeout-actions-left,.ios .swipeout-actions-right{align-items:center;gap:10px;padding:0 10px}.ios .swipeout-actions-left>a,.ios .swipeout-actions-left>button,.ios .swipeout-actions-left>div,.ios .swipeout-actions-left>span,.ios .swipeout-actions-right>a,.ios .swipeout-actions-right>button,.ios .swipeout-actions-right>div,.ios .swipeout-actions-right>span{padding:var(--f7-swipeout-button-padding-vertical) var(--f7-swipeout-button-padding-horizontal);transform:scale(0)}.ios .swipeout-active .swipeout-content,.ios .swipeout-opened .swipeout-content{background-color:var(--f7-swipeout-active-bg-color);border-radius:var(--f7-swipeout-active-border-radius)}.ios .swipeout-active .item-content,.ios .swipeout-opened .item-content{border-radius:var(--f7-swipeout-active-border-radius)}.ios .swipeout-active .swipeout-content .item-inner:after,.ios .swipeout-opened .swipeout-content .item-inner:after{opacity:0}.ios .swipeout-overswipe{transition-duration:.2s;transition-property:transform,left,width,margin-left,margin-right}.md .swipeout-actions-left>a:after,.md .swipeout-actions-left>button:after,.md .swipeout-actions-left>div:after,.md .swipeout-actions-left>span:after,.md .swipeout-actions-right>a:after,.md .swipeout-actions-right>button:after,.md .swipeout-actions-right>div:after,.md .swipeout-actions-right>span:after{background:inherit;content:"";height:100%;pointer-events:none;position:absolute;top:0;transform:translateZ(0);width:600%;z-index:-1}.md .swipeout-actions-right{right:0;transform:translateX(calc(100% + 1px))}.md .swipeout-actions-right>a:after,.md .swipeout-actions-right>button:after,.md .swipeout-actions-right>div:after,.md .swipeout-actions-right>span:after{left:100%}.md .swipeout-actions-right>a:last-child,.md .swipeout-actions-right>button:last-child,.md .swipeout-actions-right>div:last-child,.md .swipeout-actions-right>span:last-child{padding-right:calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-right))}.md .swipeout-actions-left{left:0;transform:translateX(calc(-100% - 1px))}.md .swipeout-actions-left>a:after,.md .swipeout-actions-left>button:after,.md .swipeout-actions-left>div:after,.md .swipeout-actions-left>span:after{right:100%}.md .swipeout-actions-left>a:first-child,.md .swipeout-actions-left>button:first-child,.md .swipeout-actions-left>div:first-child,.md .swipeout-actions-left>span:first-child{padding-left:calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-left))}.md .swipeout-overswipe{transition-property:left}
@@ -1,7 +1,6 @@
1
1
  import { getDocument } from 'ssr-window';
2
2
  import $ from '../../shared/dom7.js';
3
3
  import { nextFrame, bindMethods } from '../../shared/utils.js';
4
- import { getSupport } from '../../shared/get-support.js';
5
4
  const Swipeout = {
6
5
  init() {
7
6
  const app = this;
@@ -28,6 +27,7 @@ const Swipeout = {
28
27
  let $overswipeRightButton;
29
28
  let overswipeLeft;
30
29
  let overswipeRight;
30
+ const isIOS = app.theme === 'ios';
31
31
  function handleTouchStart(e) {
32
32
  if (!app.swipeout.allow) return;
33
33
  isMoved = false;
@@ -46,12 +46,16 @@ const Swipeout = {
46
46
  isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));
47
47
  }
48
48
  if (isScrolling) {
49
+ $swipeoutEl.removeClass('swipeout-active');
49
50
  isTouched = false;
50
51
  return;
51
52
  }
52
53
  if (!isMoved) {
53
54
  if ($('.list.sortable-opened').length > 0) return;
54
55
  $swipeoutContent = $swipeoutEl.find('.swipeout-content');
56
+ if (!app.params.swipeout.noFollow) {
57
+ $swipeoutEl.addClass('swipeout-active');
58
+ }
55
59
  $actionsRight = $swipeoutEl.find('.swipeout-actions-right');
56
60
  $actionsLeft = $swipeoutEl.find('.swipeout-actions-left');
57
61
  actionsLeftWidth = null;
@@ -91,6 +95,7 @@ const Swipeout = {
91
95
  }
92
96
  if (translate > 0 && $actionsLeft.length === 0 || translate < 0 && $actionsRight.length === 0) {
93
97
  if (!opened) {
98
+ $swipeoutEl.removeClass('swipeout-active');
94
99
  isTouched = false;
95
100
  isMoved = false;
96
101
  $swipeoutContent.transform('');
@@ -151,11 +156,24 @@ const Swipeout = {
151
156
  if (typeof buttonEl.f7SwipeoutButtonOffset === 'undefined') {
152
157
  $buttonEl[0].f7SwipeoutButtonOffset = buttonEl.offsetLeft;
153
158
  }
159
+ if (typeof buttonEl.f7SwipeoutButtonWidth === 'undefined') {
160
+ $buttonEl[0].f7SwipeoutButtonWidth = buttonEl.offsetWidth;
161
+ }
154
162
  buttonOffset = buttonEl.f7SwipeoutButtonOffset;
163
+ const buttonWidth = $buttonEl[0].f7SwipeoutButtonWidth;
155
164
  if ($overswipeRightButton.length > 0 && $buttonEl.hasClass('swipeout-overswipe') && direction === 'to-left') {
156
- $buttonEl.css({
157
- left: `${overswipeRight ? -buttonOffset : 0}px`
158
- });
165
+ if (isIOS) {
166
+ const newWidth = overswipeRight ? buttonWidth + buttonOffset - 8 : buttonWidth;
167
+ const diff = newWidth - buttonWidth;
168
+ $buttonEl.css({
169
+ width: `${newWidth}px`,
170
+ marginLeft: overswipeRight ? `${-diff}px` : '0px'
171
+ });
172
+ } else {
173
+ $buttonEl.css({
174
+ left: `${overswipeRight ? -buttonOffset : 0}px`
175
+ });
176
+ }
159
177
  if (overswipeRight) {
160
178
  if (!$buttonEl.hasClass('swipeout-overswipe-active')) {
161
179
  $swipeoutEl.trigger('swipeout:overswipeenter');
@@ -170,7 +188,15 @@ const Swipeout = {
170
188
  $buttonEl.removeClass('swipeout-overswipe-active');
171
189
  }
172
190
  }
173
- $buttonEl.transform(`translate3d(${buttonTranslate - buttonOffset * (1 + Math.max(progress, -1))}px,0,0)`);
191
+ if (isIOS) {
192
+ const buttonEndPos = actionsRightWidth - buttonOffset;
193
+ const buttonStartPos = actionsRightWidth - buttonOffset - buttonWidth;
194
+ let buttonProgress = (-buttonTranslate - buttonStartPos) / (buttonEndPos - buttonStartPos);
195
+ buttonProgress = Math.max(Math.min(buttonProgress, 1), 0);
196
+ $buttonEl.transform(`scale(${buttonProgress})`);
197
+ } else {
198
+ $buttonEl.transform(`translate3d(${buttonTranslate - buttonOffset * (1 + Math.max(progress, -1))}px,0,0)`);
199
+ }
174
200
  });
175
201
  }
176
202
  if ($actionsLeft.length > 0) {
@@ -191,14 +217,27 @@ const Swipeout = {
191
217
  }
192
218
  $leftButtons.each((buttonEl, index) => {
193
219
  const $buttonEl = $(buttonEl);
220
+ if (typeof buttonEl.f7SwipeoutButtonWidth === 'undefined') {
221
+ $buttonEl[0].f7SwipeoutButtonWidth = buttonEl.offsetWidth;
222
+ }
194
223
  if (typeof buttonEl.f7SwipeoutButtonOffset === 'undefined') {
195
- $buttonEl[0].f7SwipeoutButtonOffset = actionsLeftWidth - buttonEl.offsetLeft - buttonEl.offsetWidth;
224
+ $buttonEl[0].f7SwipeoutButtonOffset = isIOS ? buttonEl.offsetLeft : actionsLeftWidth - buttonEl.offsetLeft - buttonEl.offsetWidth;
196
225
  }
226
+ const buttonWidth = $buttonEl[0].f7SwipeoutButtonWidth;
197
227
  buttonOffset = buttonEl.f7SwipeoutButtonOffset;
198
228
  if ($overswipeLeftButton.length > 0 && $buttonEl.hasClass('swipeout-overswipe') && direction === 'to-right') {
199
- $buttonEl.css({
200
- left: `${overswipeLeft ? buttonOffset : 0}px`
201
- });
229
+ if (isIOS) {
230
+ const newWidth = overswipeLeft ? actionsLeftWidth - 16 : buttonWidth;
231
+ const diff = newWidth - buttonWidth;
232
+ $buttonEl.css({
233
+ width: `${newWidth}px`,
234
+ marginRight: overswipeLeft ? `${-diff}px` : '0px'
235
+ });
236
+ } else {
237
+ $buttonEl.css({
238
+ left: `${overswipeLeft ? buttonOffset : 0}px`
239
+ });
240
+ }
202
241
  if (overswipeLeft) {
203
242
  if (!$buttonEl.hasClass('swipeout-overswipe-active')) {
204
243
  $swipeoutEl.trigger('swipeout:overswipeenter');
@@ -216,7 +255,15 @@ const Swipeout = {
216
255
  if ($leftButtons.length > 1) {
217
256
  $buttonEl.css('z-index', $leftButtons.length - index);
218
257
  }
219
- $buttonEl.transform(`translate3d(${buttonTranslate + buttonOffset * (1 - Math.min(progress, 1))}px,0,0)`);
258
+ if (isIOS) {
259
+ const buttonStartPos = buttonOffset;
260
+ const buttonEndPos = buttonStartPos + buttonWidth;
261
+ let buttonProgress = (buttonTranslate - buttonStartPos) / (buttonEndPos - buttonStartPos);
262
+ buttonProgress = Math.max(Math.min(buttonProgress, 1), 0);
263
+ $buttonEl.transform(`scale(${buttonProgress})`);
264
+ } else {
265
+ $buttonEl.transform(`translate3d(${buttonTranslate + buttonOffset * (1 - Math.min(progress, 1))}px,0,0)`);
266
+ }
220
267
  });
221
268
  }
222
269
  $swipeoutEl.trigger('swipeout', progress);
@@ -229,6 +276,7 @@ const Swipeout = {
229
276
  isMoved = false;
230
277
  return;
231
278
  }
279
+ $swipeoutEl.removeClass('swipeout-active');
232
280
  isTouched = false;
233
281
  isMoved = false;
234
282
  const timeDiff = new Date().getTime() - touchStartTime;
@@ -257,7 +305,11 @@ const Swipeout = {
257
305
  $buttons = direction === 'to-left' ? $rightButtons : $leftButtons;
258
306
  if ($buttons) {
259
307
  for (i = 0; i < $buttons.length; i += 1) {
260
- $($buttons[i]).transform(`translate3d(${newTranslate}px,0,0)`);
308
+ if (isIOS) {
309
+ $($buttons[i]).transform(`scale(1)`);
310
+ } else {
311
+ $($buttons[i]).transform(`translate3d(${newTranslate}px,0,0)`);
312
+ }
261
313
  }
262
314
  }
263
315
  if (overswipeRight) {
@@ -282,7 +334,11 @@ const Swipeout = {
282
334
  if (typeof buttonOffset === 'undefined') {
283
335
  $buttonEl[0].f7SwipeoutButtonOffset = actionsLeftWidth - buttonEl.offsetLeft - buttonEl.offsetWidth;
284
336
  }
285
- $buttonEl.transform(`translate3d(${buttonOffset}px,0,0)`);
337
+ if (isIOS) {
338
+ $buttonEl.transform(`scale(0)`);
339
+ } else {
340
+ $buttonEl.transform(`translate3d(${buttonOffset}px,0,0)`);
341
+ }
286
342
  });
287
343
  }
288
344
  if ($rightButtons && $rightButtons.length > 0 && $rightButtons !== $buttons) {
@@ -292,7 +348,11 @@ const Swipeout = {
292
348
  if (typeof buttonOffset === 'undefined') {
293
349
  $buttonEl[0].f7SwipeoutButtonOffset = buttonEl.offsetLeft;
294
350
  }
295
- $buttonEl.transform(`translate3d(${-buttonOffset}px,0,0)`);
351
+ if (isIOS) {
352
+ $buttonEl.transform(`scale(0)`);
353
+ } else {
354
+ $buttonEl.transform(`translate3d(${-buttonOffset}px,0,0)`);
355
+ }
296
356
  });
297
357
  }
298
358
  $swipeoutContent.transitionEnd(() => {
@@ -310,9 +370,9 @@ const Swipeout = {
310
370
  }
311
371
  });
312
372
  }
313
- const passiveListener = getSupport().passiveListener ? {
373
+ const passiveListener = {
314
374
  passive: true
315
- } : false;
375
+ };
316
376
  app.on('touchstart', e => {
317
377
  if (Swipeout.el) {
318
378
  const $targetEl = $(e.target);
@@ -327,11 +387,8 @@ const Swipeout = {
327
387
  },
328
388
  allow: true,
329
389
  el: undefined,
330
- open() {
390
+ open(...args) {
331
391
  const app = this;
332
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
333
- args[_key] = arguments[_key];
334
- }
335
392
  let [el, side, callback] = args;
336
393
  if (typeof args[1] === 'function') {
337
394
  [el, callback, side] = args;
@@ -354,10 +411,14 @@ const Swipeout = {
354
411
  if ($buttons.length > 1) {
355
412
  $buttons.each((buttonEl, buttonIndex) => {
356
413
  const $buttonEl = $(buttonEl);
357
- if (side === 'right') {
358
- $buttonEl.transform(`translate3d(${-buttonEl.offsetLeft}px,0,0)`);
414
+ if (app.theme === 'ios') {
415
+ $buttonEl.transform(`scale(1)`);
359
416
  } else {
360
- $buttonEl.css('z-index', $buttons.length - buttonIndex).transform(`translate3d(${swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft}px,0,0)`);
417
+ if (side === 'right') {
418
+ $buttonEl.transform(`translate3d(${-buttonEl.offsetLeft}px,0,0)`);
419
+ } else {
420
+ $buttonEl.css('z-index', $buttons.length - buttonIndex).transform(`translate3d(${swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft}px,0,0)`);
421
+ }
361
422
  }
362
423
  });
363
424
  }
@@ -368,7 +429,11 @@ const Swipeout = {
368
429
  if (callback) callback.call($el[0]);
369
430
  });
370
431
  nextFrame(() => {
371
- $buttons.transform(`translate3d(${translate}px,0,0)`);
432
+ if (app.theme === 'ios') {
433
+ $buttons.transform(`scale(1)`);
434
+ } else {
435
+ $buttons.transform(`translate3d(${translate}px,0,0)`);
436
+ }
372
437
  $swipeoutContent.transform(`translate3d(${translate}px,0,0)`);
373
438
  });
374
439
  Swipeout.el = $el[0];
@@ -401,14 +466,22 @@ const Swipeout = {
401
466
  closeTimeout = setTimeout(onSwipeoutClose, 500);
402
467
  $buttons.each(buttonEl => {
403
468
  const $buttonEl = $(buttonEl);
404
- if (side === 'right') {
405
- $buttonEl.transform(`translate3d(${-buttonEl.offsetLeft}px,0,0)`);
469
+ if (app.theme === 'ios') {
470
+ $buttonEl.transform(`scale(0)`);
406
471
  } else {
407
- $buttonEl.transform(`translate3d(${swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft}px,0,0)`);
472
+ if (side === 'right') {
473
+ $buttonEl.transform(`translate3d(${-buttonEl.offsetLeft}px,0,0)`);
474
+ } else {
475
+ $buttonEl.transform(`translate3d(${swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft}px,0,0)`);
476
+ }
408
477
  }
478
+ const buttonWidth = $buttonEl[0].f7SwipeoutButtonWidth;
409
479
  $buttonEl.css({
410
- left: '0px'
480
+ left: '0px',
481
+ width: buttonWidth ? `${buttonWidth}px` : '',
482
+ marginLeft: '0px'
411
483
  }).removeClass('swipeout-overswipe-active');
484
+ delete $buttonEl[0].f7SwipeoutButtonWidth;
412
485
  });
413
486
  if (Swipeout.el && Swipeout.el === $el[0]) Swipeout.el = undefined;
414
487
  },
@@ -470,10 +543,7 @@ export default {
470
543
  });
471
544
  },
472
545
  clicks: {
473
- '.swipeout-open': function openSwipeout($clickedEl, data) {
474
- if (data === void 0) {
475
- data = {};
476
- }
546
+ '.swipeout-open': function openSwipeout($clickedEl, data = {}) {
477
547
  const app = this;
478
548
  app.swipeout.open(data.swipeout, data.side);
479
549
  },
@@ -483,10 +553,7 @@ export default {
483
553
  if ($swipeoutEl.length === 0) return;
484
554
  app.swipeout.close($swipeoutEl);
485
555
  },
486
- '.swipeout-delete': function deleteSwipeout($clickedEl, data) {
487
- if (data === void 0) {
488
- data = {};
489
- }
556
+ '.swipeout-delete': function deleteSwipeout($clickedEl, data = {}) {
490
557
  const app = this;
491
558
  const $swipeoutEl = $clickedEl.closest('.swipeout');
492
559
  if ($swipeoutEl.length === 0) return;