@xenknight/framework7 0.0.5 → 0.0.6

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 (73) hide show
  1. package/components/block/block-vars.less +6 -6
  2. package/components/button/button-vars.less +11 -10
  3. package/components/dialog/dialog-class.js +6 -3
  4. package/components/dialog/dialog-ios.less +10 -34
  5. package/components/dialog/dialog-md.less +2 -22
  6. package/components/dialog/dialog-rtl.css +1 -1
  7. package/components/dialog/dialog-vars.less +8 -10
  8. package/components/dialog/dialog.css +1 -1
  9. package/components/dialog/dialog.js +3 -3
  10. package/components/dialog/dialog.less +6 -25
  11. package/components/list/list-vars.less +7 -5
  12. package/components/list/list.less +1 -1
  13. package/components/notification/notification-class.js +6 -6
  14. package/components/notification/notification-ios.less +3 -8
  15. package/components/notification/notification-md.less +1 -20
  16. package/components/notification/notification-rtl.css +1 -1
  17. package/components/notification/notification-vars.less +13 -16
  18. package/components/notification/notification.css +1 -1
  19. package/components/notification/notification.less +13 -1
  20. package/components/popover/popover-class.js +21 -58
  21. package/components/popover/popover-ios.less +66 -2
  22. package/components/popover/popover-md.less +2 -27
  23. package/components/popover/popover-rtl.css +1 -1
  24. package/components/popover/popover-vars.less +2 -3
  25. package/components/popover/popover.css +1 -1
  26. package/components/popover/popover.d.ts +0 -2
  27. package/components/popover/popover.js +0 -1
  28. package/components/popover/popover.less +28 -50
  29. package/components/range/range-class.js +34 -27
  30. package/components/range/range-ios.less +60 -0
  31. package/components/range/range-md.less +67 -4
  32. package/components/range/range-rtl.css +1 -1
  33. package/components/range/range-vars.less +18 -13
  34. package/components/range/range.css +1 -1
  35. package/components/range/range.d.ts +3 -1
  36. package/components/range/range.less +11 -24
  37. package/components/swipeout/swipeout-ios.less +37 -0
  38. package/components/swipeout/swipeout-md.less +56 -0
  39. package/components/swipeout/swipeout-rtl.css +1 -1
  40. package/components/swipeout/swipeout-vars.less +13 -2
  41. package/components/swipeout/swipeout.css +1 -1
  42. package/components/swipeout/swipeout.js +99 -23
  43. package/components/swipeout/swipeout.less +20 -44
  44. package/components/toast/toast-class.js +2 -2
  45. package/components/toast/toast-ios.less +2 -0
  46. package/components/toast/toast-rtl.css +1 -1
  47. package/components/toast/toast-vars.less +2 -4
  48. package/components/toast/toast.css +1 -1
  49. package/components/toast/toast.less +1 -1
  50. package/framework7-bundle-rtl.css +417 -368
  51. package/framework7-bundle-rtl.min.css +4 -4
  52. package/framework7-bundle.css +417 -368
  53. package/framework7-bundle.esm.js +2 -2
  54. package/framework7-bundle.js +2446 -849
  55. package/framework7-bundle.js.map +1 -1
  56. package/framework7-bundle.less +2 -2
  57. package/framework7-bundle.min.css +4 -4
  58. package/framework7-bundle.min.js +3 -3
  59. package/framework7-bundle.min.js.map +1 -1
  60. package/framework7-lite-bundle.esm.js +2 -2
  61. package/framework7-lite.esm.js +2 -2
  62. package/framework7-rtl.css +27 -25
  63. package/framework7-rtl.min.css +3 -3
  64. package/framework7.css +27 -25
  65. package/framework7.esm.js +2 -2
  66. package/framework7.less +2 -2
  67. package/framework7.min.css +3 -3
  68. package/package.json +1 -1
  69. package/shared/get-support.d.ts +0 -6
  70. package/shared/get-support.js +1 -20
  71. package/shared/material-color-utils.js +2153 -679
  72. package/shared/material-colors.js +97 -17
  73. package/shared/utils.js +18 -6
@@ -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: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-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,0.3s,0.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{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{box-sizing:border-box;border-radius:var(--f7-swipeout-button-border-radius);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 .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{padding:0 10px;gap:10px;align-items:center}.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{transform:scale(0);padding:var(--f7-swipeout-button-padding-vertical) var(--f7-swipeout-button-padding-horizontal)}.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{content:'';position:absolute;top:0;width:600%;height:100%;background:inherit;z-index:-1;transform:translate3d(0,0,0);pointer-events:none}.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);
@@ -354,10 +414,14 @@ const Swipeout = {
354
414
  if ($buttons.length > 1) {
355
415
  $buttons.each((buttonEl, buttonIndex) => {
356
416
  const $buttonEl = $(buttonEl);
357
- if (side === 'right') {
358
- $buttonEl.transform(`translate3d(${-buttonEl.offsetLeft}px,0,0)`);
417
+ if (app.theme === 'ios') {
418
+ $buttonEl.transform(`scale(1)`);
359
419
  } else {
360
- $buttonEl.css('z-index', $buttons.length - buttonIndex).transform(`translate3d(${swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft}px,0,0)`);
420
+ if (side === 'right') {
421
+ $buttonEl.transform(`translate3d(${-buttonEl.offsetLeft}px,0,0)`);
422
+ } else {
423
+ $buttonEl.css('z-index', $buttons.length - buttonIndex).transform(`translate3d(${swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft}px,0,0)`);
424
+ }
361
425
  }
362
426
  });
363
427
  }
@@ -368,7 +432,11 @@ const Swipeout = {
368
432
  if (callback) callback.call($el[0]);
369
433
  });
370
434
  nextFrame(() => {
371
- $buttons.transform(`translate3d(${translate}px,0,0)`);
435
+ if (app.theme === 'ios') {
436
+ $buttons.transform(`scale(1)`);
437
+ } else {
438
+ $buttons.transform(`translate3d(${translate}px,0,0)`);
439
+ }
372
440
  $swipeoutContent.transform(`translate3d(${translate}px,0,0)`);
373
441
  });
374
442
  Swipeout.el = $el[0];
@@ -401,14 +469,22 @@ const Swipeout = {
401
469
  closeTimeout = setTimeout(onSwipeoutClose, 500);
402
470
  $buttons.each(buttonEl => {
403
471
  const $buttonEl = $(buttonEl);
404
- if (side === 'right') {
405
- $buttonEl.transform(`translate3d(${-buttonEl.offsetLeft}px,0,0)`);
472
+ if (app.theme === 'ios') {
473
+ $buttonEl.transform(`scale(0)`);
406
474
  } else {
407
- $buttonEl.transform(`translate3d(${swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft}px,0,0)`);
475
+ if (side === 'right') {
476
+ $buttonEl.transform(`translate3d(${-buttonEl.offsetLeft}px,0,0)`);
477
+ } else {
478
+ $buttonEl.transform(`translate3d(${swipeoutActionsWidth - buttonEl.offsetWidth - buttonEl.offsetLeft}px,0,0)`);
479
+ }
408
480
  }
481
+ const buttonWidth = $buttonEl[0].f7SwipeoutButtonWidth;
409
482
  $buttonEl.css({
410
- left: '0px'
483
+ left: '0px',
484
+ width: buttonWidth ? `${buttonWidth}px` : '',
485
+ marginLeft: '0px'
411
486
  }).removeClass('swipeout-overswipe-active');
487
+ delete $buttonEl[0].f7SwipeoutButtonWidth;
412
488
  });
413
489
  if (Swipeout.el && Swipeout.el === $el[0]) Swipeout.el = undefined;
414
490
  },
@@ -13,11 +13,26 @@
13
13
  }
14
14
  .swipeout-transitioning {
15
15
  .swipeout-content,
16
+ .swipeout-content .item-inner::after {
17
+ transition-duration: 300ms;
18
+ transition-property: transform, left, background-color, border-radius, opacity;
19
+ }
16
20
  .swipeout-actions-right a,
17
21
  .swipeout-actions-left a,
18
22
  .swipeout-overswipe {
19
23
  transition-duration: 300ms;
20
- transition-property: transform, left;
24
+ transition-property: transform, left, width, margin-left, margin-right;
25
+ }
26
+ &:not(.swipeout-opened) {
27
+ .swipeout-content {
28
+ transition-delay: 0ms, 0ms, 300ms, 300ms, 0ms;
29
+ }
30
+ }
31
+ }
32
+ .list li:has(+ li:is(.swipeout-opened, .swipeout-active)) {
33
+ .item-inner::after {
34
+ opacity: 0;
35
+ transition-duration: 300ms;
21
36
  }
22
37
  }
23
38
  .swipeout-content {
@@ -26,7 +41,6 @@
26
41
  }
27
42
  .swipeout-overswipe {
28
43
  transition-duration: 200ms;
29
- transition-property: left;
30
44
  }
31
45
  .swipeout-actions-left,
32
46
  .swipeout-actions-right {
@@ -39,6 +53,9 @@
39
53
  > button,
40
54
  > span,
41
55
  > div {
56
+ box-sizing: border-box;
57
+ border-radius: var(--f7-swipeout-button-border-radius);
58
+
42
59
  color: var(--f7-swipeout-button-text-color);
43
60
  background: var(--f7-swipeout-button-bg-color);
44
61
  padding: var(--f7-swipeout-button-padding-vertical) var(--f7-swipeout-button-padding-horizontal);
@@ -48,53 +65,12 @@
48
65
  left: 0;
49
66
  font-size: var(--f7-swipeout-button-font-size);
50
67
  font-weight: var(--f7-swipeout-button-font-weight);
51
- &:after {
52
- content: '';
53
- pointer-events: none;
54
- position: absolute;
55
- top: 0;
56
- width: 600%;
57
- height: 100%;
58
- background: inherit;
59
- z-index: -1;
60
- transform: translate3d(0, 0, 0);
61
- pointer-events: none;
62
- }
63
68
  }
64
69
  .swipeout-delete {
65
70
  background: var(--f7-swipeout-delete-button-bg-color);
66
71
  }
67
72
  }
68
- .swipeout-actions-right {
69
- right: 0%;
70
- transform: translateX(calc(100% + 1px));
71
- > a,
72
- > button,
73
- > span,
74
- > div {
75
- &:after {
76
- left: 100%;
77
- }
78
- &:last-child {
79
- padding-right: calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-right));
80
- }
81
- }
82
- }
83
- .swipeout-actions-left {
84
- left: 0%;
85
- transform: translateX(calc(-100% - 1px));
86
- > a,
87
- > button,
88
- > span,
89
- > div {
90
- &:after {
91
- right: 100%;
92
- }
93
- &:first-child {
94
- padding-left: calc(var(--f7-swipeout-button-padding-horizontal) + var(--f7-safe-area-left));
95
- }
96
- }
97
- }
73
+
98
74
  .swipeout-actions-left,
99
75
  .swipeout-actions-right {
100
76
  [class*='color-'] {
@@ -97,8 +97,8 @@ class Toast extends Modal {
97
97
  class: "toast-icon"
98
98
  }, icon), $jsx("div", {
99
99
  class: "toast-text"
100
- }, text), closeButton && !icon && $jsx("a", {
101
- class: `toast-button button ${closeButtonColor ? `color-${closeButtonColor}` : ''}`
100
+ }, text), closeButton && !icon && $jsx("button", {
101
+ class: `toast-button button ${closeButtonColor ? `color-${closeButtonColor}` : ''}${toast.app.theme === 'ios' ? ' button-round' : ''}`
102
102
  }, closeButtonText)));
103
103
  }
104
104
  }
@@ -3,6 +3,8 @@
3
3
  transition-duration: 300ms;
4
4
  width: 100%;
5
5
  left: 0;
6
+ .ios-glass-backdrop();
7
+ box-shadow: var(--f7-glass-shadow);
6
8
  &.toast-top {
7
9
  top: 0;
8
10
  transform: translate3d(0, -100%, 0);
@@ -1 +1 @@
1
- :root{--f7-toast-font-size:14px;--f7-toast-icon-size:48px;--f7-toast-max-width:568px}.ios{--f7-toast-text-color:#fff;--f7-toast-bg-color:rgba(0, 0, 0, 0.75);--f7-toast-bg-color-rgb:0,0,0;--f7-toast-padding-horizontal:16px;--f7-toast-padding-vertical:12px;--f7-toast-border-radius:8px;--f7-toast-button-min-width:64px}.md{--f7-toast-padding-horizontal:24px;--f7-toast-padding-vertical:14px;--f7-toast-border-radius:16px;--f7-toast-button-min-width:64px}.md,.md .dark,.md [class*=color-]{--f7-toast-text-color:var(--f7-md-on-surface);--f7-toast-bg-color:var(--f7-md-surface-5)}.toast{transition-property:transform,opacity;position:absolute;max-width:var(--f7-toast-max-width);z-index:20000;color:var(--f7-toast-text-color);font-size:var(--f7-toast-font-size);box-sizing:border-box;background-color:var(--f7-toast-bg-color);opacity:0}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.ios-translucent-modals .toast{background-color:rgba(var(--f7-toast-bg-color-rgb),.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.toast.modal-in{opacity:1}.toast .toast-content{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:var(--f7-toast-padding-vertical) var(--f7-toast-padding-horizontal)}.toast .toast-text{line-height:20px;flex-shrink:1;min-width:0}.toast .toast-button{flex-shrink:0;min-width:var(--f7-toast-button-min-width);margin-top:-8px;margin-bottom:-8px}.toast.toast-with-icon .toast-content{display:block;text-align:center}.toast.toast-with-icon .toast-text{text-align:center}.toast.toast-with-icon .toast-icon .f7-icons,.toast.toast-with-icon .toast-icon .material-icons{font-size:var(--f7-toast-icon-size)}.toast.toast-center{top:50%}.toast.toast-top{margin-top:var(--f7-safe-area-top)}.ios .toast{transition-duration:.3s;width:100%;left:0}.ios .toast.toast-top{top:0;transform:translate3d(0,-100%,0)}.ios .toast.toast-top.modal-in{transform:translate3d(0,0%,0)}.ios .toast.toast-center{width:auto;left:50%;border-radius:var(--f7-toast-border-radius);transform:translate3d(-50%,-50%,0)}.ios .toast.toast-center.modal-in{transform:translate3d(-50%,-50%,0)}.ios .toast.toast-bottom{bottom:0;transform:translate3d(0,100%,0)}.ios .toast.toast-bottom.modal-in{transform:translate3d(0,0%,0)}@media (max-width:568px){.ios .toast.toast-top{margin-top:0}.ios .toast.toast-top .toast-content{padding-top:calc(var(--f7-toast-padding-vertical) + var(--f7-safe-area-top))}.ios .toast.toast-bottom .toast-content{padding-bottom:calc(var(--f7-toast-padding-vertical) + var(--f7-safe-area-bottom))}}@media (min-width:569px){.ios .toast{left:50%;margin-left:calc(-1 * var(--f7-toast-max-width)/ 2);border-radius:var(--f7-toast-border-radius)}.ios .toast.toast-top{top:16px}.ios .toast.toast-center{margin-left:0}.ios .toast.toast-bottom{margin-bottom:calc(16px + var(--f7-safe-area-bottom))}}@media (min-width:1024px){.ios .toast{margin-left:0;width:auto}.ios .toast.toast-horizontal-left{left:16px}.ios .toast.toast-horizontal-right{left:auto;right:16px}.ios .toast.toast-horizontal-center{left:50%;width:var(--f7-toast-max-width);margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}}.ios .toast-button{margin-right:16px;margin-left:calc(-1 * var(--f7-button-padding-horizontal))}.md .toast{transition-duration:.2s;border-radius:var(--f7-toast-border-radius);width:calc(100% - 16px);transform:scale(.9);left:8px}.md .toast.modal-in{transform:scale(1)}.md .toast.modal-out{transform:scale(1)}.md .toast.toast-top{top:8px}.md .toast.toast-center{left:50%;width:auto;transform:scale(.9) translate3d(-55%,-55%,0)}.md .toast.toast-center.modal-in{transform:scale(1) translate3d(-50%,-50%,0)}.md .toast.toast-center.modal-out{transform:scale(1) translate3d(-50%,-50%,0)}.md .toast.toast-bottom{bottom:calc(8px + var(--f7-safe-area-bottom))}@media (min-width:584px){.md .toast{left:50%;margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}.md .toast.toast-center{margin-left:0}}@media (min-width:1024px){.md .toast{margin-left:0;width:auto}.md .toast.toast-horizontal-left{left:24px}.md .toast.toast-horizontal-right{left:auto;right:24px}.md .toast.toast-horizontal-center{left:50%;width:var(--f7-toast-max-width);margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}.md .toast.toast-bottom{bottom:calc(24px + var(--f7-safe-area-bottom))}.md .toast.toast-top{top:24px}}.md .toast-button{margin-right:16px;margin-left:-8px}
1
+ :root{--f7-toast-font-size:14px;--f7-toast-icon-size:48px;--f7-toast-max-width:568px}.ios{--f7-toast-bg-color:var(--f7-glass-bg-color);--f7-toast-padding-horizontal:16px;--f7-toast-padding-vertical:12px;--f7-toast-border-radius:32px;--f7-toast-button-min-width:64px}.md{--f7-toast-padding-horizontal:24px;--f7-toast-padding-vertical:14px;--f7-toast-border-radius:16px;--f7-toast-button-min-width:64px}.md,.md .dark,.md [class*=color-]{--f7-toast-text-color:var(--f7-md-on-surface);--f7-toast-bg-color:var(--f7-md-surface-5)}.toast{transition-property:transform,opacity;position:absolute;max-width:var(--f7-toast-max-width);z-index:20000;color:var(--f7-toast-text-color);font-size:var(--f7-toast-font-size);box-sizing:border-box;background-color:var(--f7-toast-bg-color);opacity:0}.toast.modal-in{opacity:1}.toast .toast-content{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:var(--f7-toast-padding-vertical) var(--f7-toast-padding-horizontal)}.toast .toast-text{line-height:20px;flex-shrink:1;min-width:0}.toast .toast-button{flex-shrink:0;min-width:var(--f7-toast-button-min-width);margin-top:-8px;margin-bottom:-8px;width:auto}.toast.toast-with-icon .toast-content{display:block;text-align:center}.toast.toast-with-icon .toast-text{text-align:center}.toast.toast-with-icon .toast-icon .f7-icons,.toast.toast-with-icon .toast-icon .material-icons{font-size:var(--f7-toast-icon-size)}.toast.toast-center{top:50%}.toast.toast-top{margin-top:var(--f7-safe-area-top)}.ios .toast{transition-duration:.3s;width:100%;left:0;-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px);box-shadow:var(--f7-glass-shadow)}.ios .toast.toast-top{top:0;transform:translate3d(0,-100%,0)}.ios .toast.toast-top.modal-in{transform:translate3d(0,0%,0)}.ios .toast.toast-center{width:auto;left:50%;border-radius:var(--f7-toast-border-radius);transform:translate3d(-50%,-50%,0)}.ios .toast.toast-center.modal-in{transform:translate3d(-50%,-50%,0)}.ios .toast.toast-bottom{bottom:0;transform:translate3d(0,100%,0)}.ios .toast.toast-bottom.modal-in{transform:translate3d(0,0%,0)}@media (max-width:568px){.ios .toast.toast-top{margin-top:0}.ios .toast.toast-top .toast-content{padding-top:calc(var(--f7-toast-padding-vertical) + var(--f7-safe-area-top))}.ios .toast.toast-bottom .toast-content{padding-bottom:calc(var(--f7-toast-padding-vertical) + var(--f7-safe-area-bottom))}}@media (min-width:569px){.ios .toast{left:50%;margin-left:calc(-1 * var(--f7-toast-max-width)/ 2);border-radius:var(--f7-toast-border-radius)}.ios .toast.toast-top{top:16px}.ios .toast.toast-center{margin-left:0}.ios .toast.toast-bottom{margin-bottom:calc(16px + var(--f7-safe-area-bottom))}}@media (min-width:1024px){.ios .toast{margin-left:0;width:auto}.ios .toast.toast-horizontal-left{left:16px}.ios .toast.toast-horizontal-right{left:auto;right:16px}.ios .toast.toast-horizontal-center{left:50%;width:var(--f7-toast-max-width);margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}}.ios .toast-button{margin-right:16px;margin-left:calc(-1 * var(--f7-button-padding-horizontal))}.md .toast{transition-duration:.2s;border-radius:var(--f7-toast-border-radius);width:calc(100% - 16px);transform:scale(.9);left:8px}.md .toast.modal-in{transform:scale(1)}.md .toast.modal-out{transform:scale(1)}.md .toast.toast-top{top:8px}.md .toast.toast-center{left:50%;width:auto;transform:scale(.9) translate3d(-55%,-55%,0)}.md .toast.toast-center.modal-in{transform:scale(1) translate3d(-50%,-50%,0)}.md .toast.toast-center.modal-out{transform:scale(1) translate3d(-50%,-50%,0)}.md .toast.toast-bottom{bottom:calc(8px + var(--f7-safe-area-bottom))}@media (min-width:584px){.md .toast{left:50%;margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}.md .toast.toast-center{margin-left:0}}@media (min-width:1024px){.md .toast{margin-left:0;width:auto}.md .toast.toast-horizontal-left{left:24px}.md .toast.toast-horizontal-right{left:auto;right:24px}.md .toast.toast-horizontal-center{left:50%;width:var(--f7-toast-max-width);margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}.md .toast.toast-bottom{bottom:calc(24px + var(--f7-safe-area-bottom))}.md .toast.toast-top{top:24px}}.md .toast-button{margin-right:16px;margin-left:-8px}
@@ -4,12 +4,10 @@
4
4
  --f7-toast-max-width: 568px;
5
5
  }
6
6
  .ios-vars({
7
- --f7-toast-text-color: #fff;
8
- --f7-toast-bg-color: rgba(0,0,0,0.75);
9
- --f7-toast-bg-color-rgb: 0, 0, 0;
7
+ --f7-toast-bg-color: var(--f7-glass-bg-color);
10
8
  --f7-toast-padding-horizontal: 16px;
11
9
  --f7-toast-padding-vertical: 12px;
12
- --f7-toast-border-radius: 8px;
10
+ --f7-toast-border-radius: 32px;
13
11
  --f7-toast-button-min-width: 64px;
14
12
  });
15
13
  .md-vars({
@@ -1 +1 @@
1
- :root{--f7-toast-font-size:14px;--f7-toast-icon-size:48px;--f7-toast-max-width:568px}.ios{--f7-toast-text-color:#fff;--f7-toast-bg-color:rgba(0, 0, 0, 0.75);--f7-toast-bg-color-rgb:0,0,0;--f7-toast-padding-horizontal:16px;--f7-toast-padding-vertical:12px;--f7-toast-border-radius:8px;--f7-toast-button-min-width:64px}.md{--f7-toast-padding-horizontal:24px;--f7-toast-padding-vertical:14px;--f7-toast-border-radius:16px;--f7-toast-button-min-width:64px}.md,.md .dark,.md [class*=color-]{--f7-toast-text-color:var(--f7-md-on-surface);--f7-toast-bg-color:var(--f7-md-surface-5)}.toast{transition-property:transform,opacity;position:absolute;max-width:var(--f7-toast-max-width);z-index:20000;color:var(--f7-toast-text-color);font-size:var(--f7-toast-font-size);box-sizing:border-box;background-color:var(--f7-toast-bg-color);opacity:0}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.ios-translucent-modals .toast{background-color:rgba(var(--f7-toast-bg-color-rgb),.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.toast.modal-in{opacity:1}.toast .toast-content{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:var(--f7-toast-padding-vertical) var(--f7-toast-padding-horizontal)}.toast .toast-text{line-height:20px;flex-shrink:1;min-width:0}.toast .toast-button{flex-shrink:0;min-width:var(--f7-toast-button-min-width);margin-top:-8px;margin-bottom:-8px}.toast.toast-with-icon .toast-content{display:block;text-align:center}.toast.toast-with-icon .toast-text{text-align:center}.toast.toast-with-icon .toast-icon .f7-icons,.toast.toast-with-icon .toast-icon .material-icons{font-size:var(--f7-toast-icon-size)}.toast.toast-center{top:50%}.toast.toast-top{margin-top:var(--f7-safe-area-top)}.ios .toast{transition-duration:.3s;width:100%;left:0}.ios .toast.toast-top{top:0;transform:translate3d(0,-100%,0)}.ios .toast.toast-top.modal-in{transform:translate3d(0,0%,0)}.ios .toast.toast-center{width:auto;left:50%;border-radius:var(--f7-toast-border-radius);transform:translate3d(-50%,-50%,0)}.ios .toast.toast-center.modal-in{transform:translate3d(-50%,-50%,0)}.ios .toast.toast-bottom{bottom:0;transform:translate3d(0,100%,0)}.ios .toast.toast-bottom.modal-in{transform:translate3d(0,0%,0)}@media (max-width:568px){.ios .toast.toast-top{margin-top:0}.ios .toast.toast-top .toast-content{padding-top:calc(var(--f7-toast-padding-vertical) + var(--f7-safe-area-top))}.ios .toast.toast-bottom .toast-content{padding-bottom:calc(var(--f7-toast-padding-vertical) + var(--f7-safe-area-bottom))}}@media (min-width:569px){.ios .toast{left:50%;margin-left:calc(-1 * var(--f7-toast-max-width)/ 2);border-radius:var(--f7-toast-border-radius)}.ios .toast.toast-top{top:16px}.ios .toast.toast-center{margin-left:0}.ios .toast.toast-bottom{margin-bottom:calc(16px + var(--f7-safe-area-bottom))}}@media (min-width:1024px){.ios .toast{margin-left:0;width:auto}.ios .toast.toast-horizontal-left{left:16px}.ios .toast.toast-horizontal-right{left:auto;right:16px}.ios .toast.toast-horizontal-center{left:50%;width:var(--f7-toast-max-width);margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}}.ios .toast-button{margin-left:16px;margin-right:calc(-1 * var(--f7-button-padding-horizontal))}.md .toast{transition-duration:.2s;border-radius:var(--f7-toast-border-radius);width:calc(100% - 16px);transform:scale(.9);left:8px}.md .toast.modal-in{transform:scale(1)}.md .toast.modal-out{transform:scale(1)}.md .toast.toast-top{top:8px}.md .toast.toast-center{left:50%;width:auto;transform:scale(.9) translate3d(-55%,-55%,0)}.md .toast.toast-center.modal-in{transform:scale(1) translate3d(-50%,-50%,0)}.md .toast.toast-center.modal-out{transform:scale(1) translate3d(-50%,-50%,0)}.md .toast.toast-bottom{bottom:calc(8px + var(--f7-safe-area-bottom))}@media (min-width:584px){.md .toast{left:50%;margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}.md .toast.toast-center{margin-left:0}}@media (min-width:1024px){.md .toast{margin-left:0;width:auto}.md .toast.toast-horizontal-left{left:24px}.md .toast.toast-horizontal-right{left:auto;right:24px}.md .toast.toast-horizontal-center{left:50%;width:var(--f7-toast-max-width);margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}.md .toast.toast-bottom{bottom:calc(24px + var(--f7-safe-area-bottom))}.md .toast.toast-top{top:24px}}.md .toast-button{margin-left:16px;margin-right:-8px}
1
+ :root{--f7-toast-font-size:14px;--f7-toast-icon-size:48px;--f7-toast-max-width:568px}.ios{--f7-toast-bg-color:var(--f7-glass-bg-color);--f7-toast-padding-horizontal:16px;--f7-toast-padding-vertical:12px;--f7-toast-border-radius:32px;--f7-toast-button-min-width:64px}.md{--f7-toast-padding-horizontal:24px;--f7-toast-padding-vertical:14px;--f7-toast-border-radius:16px;--f7-toast-button-min-width:64px}.md,.md .dark,.md [class*=color-]{--f7-toast-text-color:var(--f7-md-on-surface);--f7-toast-bg-color:var(--f7-md-surface-5)}.toast{transition-property:transform,opacity;position:absolute;max-width:var(--f7-toast-max-width);z-index:20000;color:var(--f7-toast-text-color);font-size:var(--f7-toast-font-size);box-sizing:border-box;background-color:var(--f7-toast-bg-color);opacity:0}.toast.modal-in{opacity:1}.toast .toast-content{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;padding:var(--f7-toast-padding-vertical) var(--f7-toast-padding-horizontal)}.toast .toast-text{line-height:20px;flex-shrink:1;min-width:0}.toast .toast-button{flex-shrink:0;min-width:var(--f7-toast-button-min-width);margin-top:-8px;margin-bottom:-8px;width:auto}.toast.toast-with-icon .toast-content{display:block;text-align:center}.toast.toast-with-icon .toast-text{text-align:center}.toast.toast-with-icon .toast-icon .f7-icons,.toast.toast-with-icon .toast-icon .material-icons{font-size:var(--f7-toast-icon-size)}.toast.toast-center{top:50%}.toast.toast-top{margin-top:var(--f7-safe-area-top)}.ios .toast{transition-duration:.3s;width:100%;left:0;-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px);box-shadow:var(--f7-glass-shadow)}.ios .toast.toast-top{top:0;transform:translate3d(0,-100%,0)}.ios .toast.toast-top.modal-in{transform:translate3d(0,0%,0)}.ios .toast.toast-center{width:auto;left:50%;border-radius:var(--f7-toast-border-radius);transform:translate3d(-50%,-50%,0)}.ios .toast.toast-center.modal-in{transform:translate3d(-50%,-50%,0)}.ios .toast.toast-bottom{bottom:0;transform:translate3d(0,100%,0)}.ios .toast.toast-bottom.modal-in{transform:translate3d(0,0%,0)}@media (max-width:568px){.ios .toast.toast-top{margin-top:0}.ios .toast.toast-top .toast-content{padding-top:calc(var(--f7-toast-padding-vertical) + var(--f7-safe-area-top))}.ios .toast.toast-bottom .toast-content{padding-bottom:calc(var(--f7-toast-padding-vertical) + var(--f7-safe-area-bottom))}}@media (min-width:569px){.ios .toast{left:50%;margin-left:calc(-1 * var(--f7-toast-max-width)/ 2);border-radius:var(--f7-toast-border-radius)}.ios .toast.toast-top{top:16px}.ios .toast.toast-center{margin-left:0}.ios .toast.toast-bottom{margin-bottom:calc(16px + var(--f7-safe-area-bottom))}}@media (min-width:1024px){.ios .toast{margin-left:0;width:auto}.ios .toast.toast-horizontal-left{left:16px}.ios .toast.toast-horizontal-right{left:auto;right:16px}.ios .toast.toast-horizontal-center{left:50%;width:var(--f7-toast-max-width);margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}}.ios .toast-button{margin-left:16px;margin-right:calc(-1 * var(--f7-button-padding-horizontal))}.md .toast{transition-duration:.2s;border-radius:var(--f7-toast-border-radius);width:calc(100% - 16px);transform:scale(.9);left:8px}.md .toast.modal-in{transform:scale(1)}.md .toast.modal-out{transform:scale(1)}.md .toast.toast-top{top:8px}.md .toast.toast-center{left:50%;width:auto;transform:scale(.9) translate3d(-55%,-55%,0)}.md .toast.toast-center.modal-in{transform:scale(1) translate3d(-50%,-50%,0)}.md .toast.toast-center.modal-out{transform:scale(1) translate3d(-50%,-50%,0)}.md .toast.toast-bottom{bottom:calc(8px + var(--f7-safe-area-bottom))}@media (min-width:584px){.md .toast{left:50%;margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}.md .toast.toast-center{margin-left:0}}@media (min-width:1024px){.md .toast{margin-left:0;width:auto}.md .toast.toast-horizontal-left{left:24px}.md .toast.toast-horizontal-right{left:auto;right:24px}.md .toast.toast-horizontal-center{left:50%;width:var(--f7-toast-max-width);margin-left:calc(-1 * var(--f7-toast-max-width)/ 2)}.md .toast.toast-bottom{bottom:calc(24px + var(--f7-safe-area-bottom))}.md .toast.toast-top{top:24px}}.md .toast-button{margin-left:16px;margin-right:-8px}
@@ -11,7 +11,6 @@
11
11
  box-sizing: border-box;
12
12
  background-color: var(--f7-toast-bg-color);
13
13
  opacity: 0;
14
- .ios-translucent-modals(var(--f7-toast-bg-color-rgb));
15
14
  &.modal-in {
16
15
  opacity: 1;
17
16
  }
@@ -32,6 +31,7 @@
32
31
  min-width: var(--f7-toast-button-min-width);
33
32
  margin-top: -8px;
34
33
  margin-bottom: -8px;
34
+ width: auto;
35
35
  }
36
36
  &.toast-with-icon {
37
37
  .toast-content {