@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.
- package/components/block/block-vars.less +6 -6
- package/components/button/button-vars.less +11 -10
- package/components/dialog/dialog-class.js +6 -3
- package/components/dialog/dialog-ios.less +10 -34
- package/components/dialog/dialog-md.less +2 -22
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog-vars.less +8 -10
- package/components/dialog/dialog.css +1 -1
- package/components/dialog/dialog.js +3 -3
- package/components/dialog/dialog.less +6 -25
- package/components/list/list-vars.less +7 -5
- package/components/list/list.less +1 -1
- package/components/notification/notification-class.js +6 -6
- package/components/notification/notification-ios.less +3 -8
- package/components/notification/notification-md.less +1 -20
- package/components/notification/notification-rtl.css +1 -1
- package/components/notification/notification-vars.less +13 -16
- package/components/notification/notification.css +1 -1
- package/components/notification/notification.less +13 -1
- package/components/popover/popover-class.js +21 -58
- package/components/popover/popover-ios.less +66 -2
- package/components/popover/popover-md.less +2 -27
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover-vars.less +2 -3
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.d.ts +0 -2
- package/components/popover/popover.js +0 -1
- package/components/popover/popover.less +28 -50
- package/components/range/range-class.js +34 -27
- package/components/range/range-ios.less +60 -0
- package/components/range/range-md.less +67 -4
- package/components/range/range-rtl.css +1 -1
- package/components/range/range-vars.less +18 -13
- package/components/range/range.css +1 -1
- package/components/range/range.d.ts +3 -1
- package/components/range/range.less +11 -24
- package/components/swipeout/swipeout-ios.less +37 -0
- package/components/swipeout/swipeout-md.less +56 -0
- package/components/swipeout/swipeout-rtl.css +1 -1
- package/components/swipeout/swipeout-vars.less +13 -2
- package/components/swipeout/swipeout.css +1 -1
- package/components/swipeout/swipeout.js +99 -23
- package/components/swipeout/swipeout.less +20 -44
- package/components/toast/toast-class.js +2 -2
- package/components/toast/toast-ios.less +2 -0
- package/components/toast/toast-rtl.css +1 -1
- package/components/toast/toast-vars.less +2 -4
- package/components/toast/toast.css +1 -1
- package/components/toast/toast.less +1 -1
- package/framework7-bundle-rtl.css +417 -368
- package/framework7-bundle-rtl.min.css +4 -4
- package/framework7-bundle.css +417 -368
- package/framework7-bundle.esm.js +2 -2
- package/framework7-bundle.js +2446 -849
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +2 -2
- package/framework7-bundle.min.css +4 -4
- package/framework7-bundle.min.js +3 -3
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +2 -2
- package/framework7-lite.esm.js +2 -2
- package/framework7-rtl.css +27 -25
- package/framework7-rtl.min.css +3 -3
- package/framework7.css +27 -25
- package/framework7.esm.js +2 -2
- package/framework7.less +2 -2
- package/framework7.min.css +3 -3
- package/package.json +1 -1
- package/shared/get-support.d.ts +0 -6
- package/shared/get-support.js +1 -20
- package/shared/material-color-utils.js +2153 -679
- package/shared/material-colors.js +97 -17
- package/shared/utils.js +18 -6
|
@@ -7,36 +7,33 @@
|
|
|
7
7
|
}
|
|
8
8
|
.ios-vars({
|
|
9
9
|
--f7-notification-margin: 8px;
|
|
10
|
-
--f7-notification-padding-horizontal:
|
|
11
|
-
--f7-notification-padding-vertical:
|
|
12
|
-
--f7-notification-border-radius:
|
|
13
|
-
--f7-notification-box-shadow:
|
|
14
|
-
--f7-notification-icon-size:
|
|
10
|
+
--f7-notification-padding-horizontal: 16px;
|
|
11
|
+
--f7-notification-padding-vertical: 16px;
|
|
12
|
+
--f7-notification-border-radius: 24px;
|
|
13
|
+
--f7-notification-box-shadow: var(--f7-glass-shadow);
|
|
14
|
+
--f7-notification-icon-size: 28px;
|
|
15
15
|
|
|
16
|
-
--f7-notification-title-font-size:
|
|
17
|
-
--f7-notification-title-text-transform:
|
|
16
|
+
--f7-notification-title-font-size: 14px;
|
|
17
|
+
--f7-notification-title-text-transform: none;
|
|
18
18
|
--f7-notification-title-line-height: 1.4;
|
|
19
|
-
--f7-notification-title-font-weight:
|
|
19
|
+
--f7-notification-title-font-weight: bold;
|
|
20
20
|
--f7-notification-title-letter-spacing: 0.02em;
|
|
21
21
|
|
|
22
|
-
--f7-notification-title-right-font-size:
|
|
22
|
+
--f7-notification-title-right-font-size: 14px;
|
|
23
23
|
|
|
24
|
-
--f7-notification-subtitle-font-size:
|
|
24
|
+
--f7-notification-subtitle-font-size: 14px;
|
|
25
25
|
--f7-notification-subtitle-font-weight: 600;
|
|
26
26
|
|
|
27
|
-
--f7-notification-text-font-size:
|
|
28
|
-
--f7-notification-text-line-height: 1.
|
|
27
|
+
--f7-notification-text-font-size: 14px;
|
|
28
|
+
--f7-notification-text-line-height: 1.4;
|
|
29
|
+
--f7-notification-bg-color: var(--f7-glass-bg-color);
|
|
29
30
|
.light-vars({
|
|
30
|
-
--f7-notification-bg-color: rgba(250,250,250,0.95);
|
|
31
|
-
--f7-notification-bg-color-rgb: 255, 255, 255;
|
|
32
31
|
--f7-notification-title-color: #000;
|
|
33
32
|
--f7-notification-title-right-color: rgba(0,0,0,0.45);
|
|
34
33
|
--f7-notification-subtitle-color: #000;
|
|
35
34
|
--f7-notification-text-color: #000;
|
|
36
35
|
});
|
|
37
36
|
.dark-vars({
|
|
38
|
-
--f7-notification-bg-color: rgba(30,30,30,0.95);
|
|
39
|
-
--f7-notification-bg-color-rgb: 30, 30, 30;
|
|
40
37
|
--f7-notification-title-color: #fff;
|
|
41
38
|
--f7-notification-text-color: #fff;
|
|
42
39
|
--f7-notification-subtitle-color: #fff;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--f7-notification-max-width:568px;--f7-notification-subtitle-text-transform:none;--f7-notification-subtitle-line-height:1.35;--f7-notification-text-text-transform:none;--f7-notification-text-font-weight:400}.ios{--f7-notification-margin:8px;--f7-notification-padding-horizontal:
|
|
1
|
+
:root{--f7-notification-max-width:568px;--f7-notification-subtitle-text-transform:none;--f7-notification-subtitle-line-height:1.35;--f7-notification-text-text-transform:none;--f7-notification-text-font-weight:400}.ios{--f7-notification-margin:8px;--f7-notification-padding-horizontal:16px;--f7-notification-padding-vertical:16px;--f7-notification-border-radius:24px;--f7-notification-box-shadow:var(--f7-glass-shadow);--f7-notification-icon-size:28px;--f7-notification-title-font-size:14px;--f7-notification-title-text-transform:none;--f7-notification-title-line-height:1.4;--f7-notification-title-font-weight:bold;--f7-notification-title-letter-spacing:0.02em;--f7-notification-title-right-font-size:14px;--f7-notification-subtitle-font-size:14px;--f7-notification-subtitle-font-weight:600;--f7-notification-text-font-size:14px;--f7-notification-text-line-height:1.4;--f7-notification-bg-color:var(--f7-glass-bg-color);--f7-notification-title-color:#000;--f7-notification-title-right-color:rgba(0, 0, 0, 0.45);--f7-notification-subtitle-color:#000;--f7-notification-text-color:#000}.ios .dark,.ios.dark{--f7-notification-title-color:#fff;--f7-notification-text-color:#fff;--f7-notification-subtitle-color:#fff;--f7-notification-title-right-color:rgba(255, 255, 255, 0.55)}.md{--f7-notification-margin:16px;--f7-notification-padding-vertical:20px;--f7-notification-padding-horizontal:16px;--f7-notification-border-radius:16px;--f7-notification-box-shadow:none;--f7-notification-icon-size:24px;--f7-notification-title-font-size:16px;--f7-notification-title-text-transform:none;--f7-notification-title-line-height:1.35;--f7-notification-title-font-weight:500;--f7-notification-title-right-font-size:12px;--f7-notification-subtitle-font-size:14px;--f7-notification-subtitle-font-weight:400;--f7-notification-text-font-size:14px;--f7-notification-text-line-height:1.35}.md,.md .dark,.md [class*=color-]{--f7-notification-title-color:var(--f7-md-on-surface);--f7-notification-bg-color:var(--f7-md-surface-5);--f7-notification-text-color:var(--f7-md-on-surface-variant);--f7-notification-title-right-color:var(--f7-md-on-surface-variant);--f7-notification-subtitle-color:var(--f7-md-on-surface)}.notification{position:absolute;left:var(--f7-notification-margin);top:var(--f7-notification-margin);width:calc(100% - var(--f7-notification-margin) * 2);z-index:20000;font-size:14px;margin:0;border:none;display:none;box-sizing:border-box;transition-property:transform;direction:ltr;max-width:var(--f7-notification-max-width);padding:var(--f7-notification-padding-vertical) var(--f7-notification-padding-horizontal);border-radius:var(--f7-notification-border-radius);box-shadow:var(--f7-notification-box-shadow);background:var(--f7-notification-bg-color);margin-top:var(--f7-safe-area-top);display:flex;gap:16px;-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px)}@media (min-width:568px){.notification{left:50%;width:var(--f7-notification-max-width);margin-left:calc(-1 * var(--f7-notification-max-width)/ 2)}}.notification-content{width:100%;flex-shrink:10}.notification-title{color:var(--f7-notification-title-color,var(--f7-theme-color));font-size:var(--f7-notification-title-font-size);text-transform:var(--f7-notification-title-text-transform);line-height:var(--f7-notification-title-line-height);font-weight:var(--f7-notification-title-font-weight);letter-spacing:var(--f7-notification-title-letter-spacing)}.notification-subtitle{color:var(--f7-notification-subtitle-color);font-size:var(--f7-notification-subtitle-font-size);text-transform:var(--f7-notification-subtitle-text-transform);line-height:var(--f7-notification-subtitle-line-height);font-weight:var(--f7-notification-subtitle-font-weight)}.notification-text{color:var(--f7-notification-text-color);font-size:var(--f7-notification-text-font-size);text-transform:var(--f7-notification-text-text-transform);line-height:var(--f7-notification-text-line-height);font-weight:var(--f7-notification-text-font-weight)}.notification-title-right-text{color:var(--f7-notification-title-right-color);font-size:var(--f7-notification-title-right-font-size)}.notification-icon{font-size:0;line-height:var(--f7-notification-icon-size);flex-shrink:0}.notification-icon,.notification-icon i{width:var(--f7-notification-icon-size)!important;height:var(--f7-notification-icon-size)!important}.notification-icon i{font-size:var(--f7-notification-icon-size)}.notification-icon img{height:var(--f7-notification-icon-size)}.notification-header{display:flex;justify-content:flex-start;align-items:center}.notification-close-button{margin-left:auto;cursor:pointer;position:relative}.notification-close-button:after{font-family:framework7-core-icons;font-weight:400;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:'liga';display:block;width:100%;height:100%;font-size:20px;position:absolute;left:50%;top:50%;text-align:center}.ios .notification{transition-duration:450ms;transform:translate3d(0%,-200%,0);align-items:center}.ios .notification.modal-in{transform:translate3d(0%,0%,0);opacity:1}.ios .notification.modal-out{transform:translate3d(0%,-200%,0)}.ios .notification-title-right-text{margin-left:auto}.ios .notification-title-right-text+.notification-close-button{margin-left:12px}.ios .notification-close-button{font-size:14px;width:20px;height:20px;opacity:.3;transition-duration:.3s}.ios .notification-close-button.active-state{transition-duration:0s;opacity:.1}.ios .notification-close-button:after{color:#000;content:'notification_close_ios';font-size:.65em;line-height:44px;width:44px;height:44px;margin-left:-22px;margin-top:-22px}.ios .dark .notification-close-button:after,.ios.dark .notification-close-button:after{color:#fff}.md .notification{transform:translate3d(0,-150%,0)}.md .notification.modal-in{transition-duration:.5s;transform:translate3d(0,0%,0);transition-timing-function:cubic-bezier(0,0.8,0.34,1)}.md .notification.modal-in.notification-transitioning{transition-duration:.2s}.md .notification.modal-out{animation:none;transition-duration:.2s;transition-timing-function:ease-in;transform:translate3d(0,-150%,0)}.md .notification-header+:is(.notification-subtitle,.notification-text){margin-top:8px}.md .notification-title-right-text{margin-left:4px}.md .notification-title-right-text:before{content:'';width:3px;height:3px;border-radius:50%;display:inline-block;vertical-align:middle;margin-right:4px;background:var(--f7-notification-title-right-color)}.md .notification-close-button{width:16px;height:16px;transition-duration:.3s}.md .notification-close-button:after,.md .notification-close-button:before{width:48px;height:48px;left:50%;top:50%;margin-left:-24px;margin-top:-24px}.md .notification-close-button:after{color:var(--f7-md-on-surface-variant);content:'delete_round_md';line-height:48px;font-size:24px}@keyframes notification-md-in{0%{transform:translate3d(0,-150%,0)}50%{transform:translate3d(0,10%,0)}100%{transform:translate3d(0,0%,0)}}
|
|
@@ -20,7 +20,18 @@
|
|
|
20
20
|
box-shadow: var(--f7-notification-box-shadow);
|
|
21
21
|
background: var(--f7-notification-bg-color);
|
|
22
22
|
margin-top: var(--f7-safe-area-top);
|
|
23
|
-
|
|
23
|
+
display: flex;
|
|
24
|
+
gap: 16px;
|
|
25
|
+
.ios-glass-backdrop();
|
|
26
|
+
@media (min-width: 568px) {
|
|
27
|
+
left: 50%;
|
|
28
|
+
width: var(--f7-notification-max-width);
|
|
29
|
+
margin-left: calc(-1 * var(--f7-notification-max-width) / 2);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
.notification-content {
|
|
33
|
+
width: 100%;
|
|
34
|
+
flex-shrink: 10;
|
|
24
35
|
}
|
|
25
36
|
.notification-title {
|
|
26
37
|
color: var(--f7-notification-title-color, var(--f7-theme-color));
|
|
@@ -51,6 +62,7 @@
|
|
|
51
62
|
.notification-icon {
|
|
52
63
|
font-size: 0;
|
|
53
64
|
line-height: var(--f7-notification-icon-size);
|
|
65
|
+
flex-shrink: 0;
|
|
54
66
|
i,
|
|
55
67
|
& {
|
|
56
68
|
width: var(--f7-notification-icon-size) !important;
|
|
@@ -53,15 +53,6 @@ class Popover extends Modal {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
// Find Arrow
|
|
57
|
-
let $arrowEl;
|
|
58
|
-
if ($el.find('.popover-arrow').length === 0 && popover.params.arrow) {
|
|
59
|
-
$arrowEl = $('<div class="popover-arrow"></div>');
|
|
60
|
-
$el.prepend($arrowEl);
|
|
61
|
-
} else {
|
|
62
|
-
$arrowEl = $el.find('.popover-arrow');
|
|
63
|
-
}
|
|
64
|
-
|
|
65
56
|
// Open
|
|
66
57
|
const originalOpen = popover.open;
|
|
67
58
|
extend(popover, {
|
|
@@ -70,8 +61,6 @@ class Popover extends Modal {
|
|
|
70
61
|
el: $el[0],
|
|
71
62
|
$targetEl,
|
|
72
63
|
targetEl: $targetEl[0],
|
|
73
|
-
$arrowEl,
|
|
74
|
-
arrowEl: $arrowEl[0],
|
|
75
64
|
$backdropEl,
|
|
76
65
|
backdropEl: $backdropEl && $backdropEl[0],
|
|
77
66
|
type: 'popover',
|
|
@@ -93,7 +82,15 @@ class Popover extends Modal {
|
|
|
93
82
|
popover.resize();
|
|
94
83
|
}
|
|
95
84
|
popover.on('popoverOpen', () => {
|
|
85
|
+
if (popover.app.theme === 'ios') {
|
|
86
|
+
$el.removeClass('modal-in');
|
|
87
|
+
}
|
|
96
88
|
popover.resize();
|
|
89
|
+
if (popover.app.theme === 'ios') {
|
|
90
|
+
requestAnimationFrame(() => {
|
|
91
|
+
$el.addClass('modal-in');
|
|
92
|
+
});
|
|
93
|
+
}
|
|
97
94
|
app.on('resize', handleResize);
|
|
98
95
|
$(window).on('keyboardDidShow keyboardDidHide', handleResize);
|
|
99
96
|
popover.on('popoverClose popoverBeforeDestroy', () => {
|
|
@@ -156,8 +153,7 @@ class Popover extends Modal {
|
|
|
156
153
|
const {
|
|
157
154
|
app,
|
|
158
155
|
$el,
|
|
159
|
-
$targetEl
|
|
160
|
-
$arrowEl
|
|
156
|
+
$targetEl
|
|
161
157
|
} = popover;
|
|
162
158
|
const {
|
|
163
159
|
targetX,
|
|
@@ -169,18 +165,6 @@ class Popover extends Modal {
|
|
|
169
165
|
top: ''
|
|
170
166
|
});
|
|
171
167
|
const [width, height] = [$el.width(), $el.height()];
|
|
172
|
-
let arrowSize = 0;
|
|
173
|
-
let arrowLeft;
|
|
174
|
-
let arrowTop;
|
|
175
|
-
const hasArrow = $arrowEl.length > 0;
|
|
176
|
-
const arrowMin = app.theme === 'ios' ? 13 : 24;
|
|
177
|
-
if (hasArrow) {
|
|
178
|
-
$arrowEl.removeClass('on-left on-right on-top on-bottom').css({
|
|
179
|
-
left: '',
|
|
180
|
-
top: ''
|
|
181
|
-
});
|
|
182
|
-
arrowSize = $arrowEl.width() / 2;
|
|
183
|
-
}
|
|
184
168
|
$el.removeClass('popover-on-left popover-on-right popover-on-top popover-on-bottom popover-on-middle').css({
|
|
185
169
|
left: '',
|
|
186
170
|
top: ''
|
|
@@ -211,30 +195,27 @@ class Popover extends Modal {
|
|
|
211
195
|
targetWidth = popover.params.targetWidth || 0;
|
|
212
196
|
targetHeight = popover.params.targetHeight || 0;
|
|
213
197
|
}
|
|
214
|
-
let [left, top
|
|
198
|
+
let [left, top] = [0, 0];
|
|
215
199
|
// Top Position
|
|
216
200
|
const forcedPosition = verticalPosition === 'auto' ? false : verticalPosition;
|
|
217
201
|
let position = forcedPosition || 'top';
|
|
218
|
-
if (forcedPosition === 'top' || !forcedPosition && height
|
|
202
|
+
if (forcedPosition === 'top' || !forcedPosition && height < targetOffsetTop - safeAreaTop) {
|
|
219
203
|
// On top
|
|
220
|
-
top = targetOffsetTop - height
|
|
221
|
-
} else if (forcedPosition === 'bottom' || !forcedPosition && height
|
|
204
|
+
top = targetOffsetTop - height;
|
|
205
|
+
} else if (forcedPosition === 'bottom' || !forcedPosition && height < app.height - targetOffsetTop - targetHeight) {
|
|
222
206
|
// On bottom
|
|
223
207
|
position = 'bottom';
|
|
224
|
-
top = targetOffsetTop + targetHeight
|
|
208
|
+
top = targetOffsetTop + targetHeight;
|
|
225
209
|
} else {
|
|
226
210
|
// On middle
|
|
227
211
|
position = 'middle';
|
|
228
212
|
top = targetHeight / 2 + targetOffsetTop - height / 2;
|
|
229
|
-
diff = top;
|
|
230
213
|
top = Math.max(5, Math.min(top, app.height - height - 5));
|
|
231
|
-
diff -= top;
|
|
232
214
|
}
|
|
233
215
|
|
|
234
216
|
// Horizontal Position
|
|
235
217
|
if (position === 'top' || position === 'bottom') {
|
|
236
218
|
left = targetWidth / 2 + targetOffsetLeft - width / 2;
|
|
237
|
-
diff = left;
|
|
238
219
|
left = Math.max(5, Math.min(left, app.width - width - 5));
|
|
239
220
|
if (safeAreaLeft) {
|
|
240
221
|
left = Math.max(left, safeAreaLeft);
|
|
@@ -242,35 +223,12 @@ class Popover extends Modal {
|
|
|
242
223
|
if (safeAreaRight && left + width > app.width - 5 - safeAreaRight) {
|
|
243
224
|
left = app.width - 5 - safeAreaRight - width;
|
|
244
225
|
}
|
|
245
|
-
diff -= left;
|
|
246
|
-
if (hasArrow) {
|
|
247
|
-
if (position === 'top') {
|
|
248
|
-
$arrowEl.addClass('on-bottom');
|
|
249
|
-
}
|
|
250
|
-
if (position === 'bottom') {
|
|
251
|
-
$arrowEl.addClass('on-top');
|
|
252
|
-
}
|
|
253
|
-
arrowLeft = width / 2 - arrowSize + diff;
|
|
254
|
-
arrowLeft = Math.max(Math.min(arrowLeft, width - arrowSize * 2 - arrowMin), arrowMin);
|
|
255
|
-
$arrowEl.css({
|
|
256
|
-
left: `${arrowLeft}px`
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
226
|
} else if (position === 'middle') {
|
|
260
|
-
left = targetOffsetLeft - width
|
|
261
|
-
if (hasArrow) $arrowEl.addClass('on-right');
|
|
227
|
+
left = targetOffsetLeft - width;
|
|
262
228
|
if (left < 5 || left + width + safeAreaRight > app.width || left < safeAreaLeft) {
|
|
263
|
-
if (left < 5) left = targetOffsetLeft + targetWidth
|
|
229
|
+
if (left < 5) left = targetOffsetLeft + targetWidth;
|
|
264
230
|
if (left + width + safeAreaRight > app.width) left = app.width - width - 5 - safeAreaRight;
|
|
265
231
|
if (left < safeAreaLeft) left = safeAreaLeft;
|
|
266
|
-
if (hasArrow) $arrowEl.removeClass('on-right').addClass('on-left');
|
|
267
|
-
}
|
|
268
|
-
if (hasArrow) {
|
|
269
|
-
arrowTop = height / 2 - arrowSize + diff;
|
|
270
|
-
arrowTop = Math.max(Math.min(arrowTop, height - arrowSize * 2 - arrowMin), arrowMin);
|
|
271
|
-
$arrowEl.css({
|
|
272
|
-
top: `${arrowTop}px`
|
|
273
|
-
});
|
|
274
232
|
}
|
|
275
233
|
}
|
|
276
234
|
|
|
@@ -288,6 +246,11 @@ class Popover extends Modal {
|
|
|
288
246
|
top: `${top}px`,
|
|
289
247
|
left: `${left}px`
|
|
290
248
|
});
|
|
249
|
+
if (app.theme === 'ios') {
|
|
250
|
+
$el.css({
|
|
251
|
+
transformOrigin: `${targetOffsetLeft + targetWidth / 2 - left}px ${targetOffsetTop + targetHeight / 2 - top}px`
|
|
252
|
+
});
|
|
253
|
+
}
|
|
291
254
|
}
|
|
292
255
|
}
|
|
293
256
|
export default Popover;
|
|
@@ -1,6 +1,70 @@
|
|
|
1
1
|
.ios {
|
|
2
|
+
.popover-on-top {
|
|
3
|
+
transform-origin: center bottom;
|
|
4
|
+
--f7-popover-inner-offset: translate3d(0%, 80px, 0);
|
|
5
|
+
}
|
|
6
|
+
.popover-on-top.popover-on-right {
|
|
7
|
+
transform-origin: left bottom;
|
|
8
|
+
--f7-popover-inner-offset: translate3d(50%, 80px, 0);
|
|
9
|
+
}
|
|
10
|
+
.popover-on-top.popover-on-left {
|
|
11
|
+
transform-origin: right bottom;
|
|
12
|
+
--f7-popover-inner-offset: translate3d(-50%, 80px, 0);
|
|
13
|
+
}
|
|
14
|
+
.popover-on-middle {
|
|
15
|
+
transform-origin: center center;
|
|
16
|
+
}
|
|
17
|
+
.popover-on-middle.popover-on-right {
|
|
18
|
+
transform-origin: left center;
|
|
19
|
+
--f7-popover-inner-offset: translate3d(50%, 0px, 0);
|
|
20
|
+
}
|
|
21
|
+
.popover-on-middle.popover-on-left {
|
|
22
|
+
transform-origin: right center;
|
|
23
|
+
--f7-popover-inner-offset: translate3d(-50%, 0px, 0);
|
|
24
|
+
}
|
|
25
|
+
.popover-on-bottom {
|
|
26
|
+
transform-origin: center top;
|
|
27
|
+
--f7-popover-inner-offset: translate3d(0%, -80px, 0);
|
|
28
|
+
}
|
|
29
|
+
.popover-on-bottom.popover-on-right {
|
|
30
|
+
transform-origin: left top;
|
|
31
|
+
--f7-popover-inner-offset: translate3d(50%, -80px, 0);
|
|
32
|
+
}
|
|
33
|
+
.popover-on-bottom.popover-on-left {
|
|
34
|
+
transform-origin: right top;
|
|
35
|
+
--f7-popover-inner-offset: translate3d(-50%, -80px, 0);
|
|
36
|
+
}
|
|
2
37
|
.popover {
|
|
3
|
-
transform:
|
|
4
|
-
transition-property: opacity;
|
|
38
|
+
transform: translate3d(0, 0, 0) scale(0);
|
|
39
|
+
transition-property: opacity, transform;
|
|
40
|
+
opacity: 1;
|
|
41
|
+
will-change: auto;
|
|
42
|
+
|
|
43
|
+
&.modal-in {
|
|
44
|
+
transform: translate3d(0, 0, 0) scale(1);
|
|
45
|
+
transition-timing-function: cubic-bezier(0, 1, 0.2, 1.05);
|
|
46
|
+
transition-duration: 400ms;
|
|
47
|
+
.popover-inner {
|
|
48
|
+
transition-duration: 600ms;
|
|
49
|
+
|
|
50
|
+
transition-timing-function: cubic-bezier(0, 1, 0.2, 1.05);
|
|
51
|
+
transform: translate3d(0, 0, 0) scale(1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
&.modal-out {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
transform: translate3d(0, 0, 0) scale(0);
|
|
57
|
+
transition-duration: 300ms;
|
|
58
|
+
.popover-inner {
|
|
59
|
+
transition-duration: 500ms;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
.popover-inner {
|
|
64
|
+
background: var(--f7-glass-bg-color);
|
|
65
|
+
box-shadow: var(--f7-glass-shadow);
|
|
66
|
+
border-radius: var(--f7-popover-border-radius);
|
|
67
|
+
transform: var(--f7-popover-inner-offset);
|
|
68
|
+
.ios-glass-backdrop();
|
|
5
69
|
}
|
|
6
70
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
.popover {
|
|
3
3
|
transform: scale(0.85, 0.6);
|
|
4
4
|
transition-property: opacity, transform;
|
|
5
|
+
transition-duration: 300ms;
|
|
6
|
+
|
|
5
7
|
&.modal-in {
|
|
6
8
|
opacity: 1;
|
|
7
9
|
transform: scale(1);
|
|
@@ -11,31 +13,4 @@
|
|
|
11
13
|
transform: scale(1);
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
|
-
.popover-on-top {
|
|
15
|
-
transform-origin: center bottom;
|
|
16
|
-
}
|
|
17
|
-
.popover-on-top.popover-on-right {
|
|
18
|
-
transform-origin: left bottom;
|
|
19
|
-
}
|
|
20
|
-
.popover-on-top.popover-on-left {
|
|
21
|
-
transform-origin: right bottom;
|
|
22
|
-
}
|
|
23
|
-
.popover-on-middle {
|
|
24
|
-
transform-origin: center center;
|
|
25
|
-
}
|
|
26
|
-
.popover-on-middle.popover-on-right {
|
|
27
|
-
transform-origin: left center;
|
|
28
|
-
}
|
|
29
|
-
.popover-on-middle.popover-on-left {
|
|
30
|
-
transform-origin: right center;
|
|
31
|
-
}
|
|
32
|
-
.popover-on-bottom {
|
|
33
|
-
transform-origin: center top;
|
|
34
|
-
}
|
|
35
|
-
.popover-on-bottom.popover-on-right {
|
|
36
|
-
transform-origin: left top;
|
|
37
|
-
}
|
|
38
|
-
.popover-on-bottom.popover-on-left {
|
|
39
|
-
transform-origin: right top;
|
|
40
|
-
}
|
|
41
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--f7-popover-width:260px}.ios{--f7-popover-border-radius:
|
|
1
|
+
:root{--f7-popover-width:260px}.ios{--f7-popover-border-radius:32px;--f7-popover-actions-icon-size:28px;--f7-popover-transition-timing-function:initial;--f7-popover-bg-color:transparent;--f7-popover-actions-label-text-color:rgba(0, 0, 0, 0.45)}.ios .dark,.ios.dark{--f7-popover-actions-label-text-color:rgba(255, 255, 255, 0.55)}.md{--f7-popover-transition-timing-function:cubic-bezier(0, 0.8, 0.34, 1);--f7-popover-border-radius:28px;--f7-popover-actions-icon-size:24px}.md,.md .dark,.md [class*=color-]{--f7-popover-bg-color:var(--f7-md-surface-3);--f7-popover-actions-label-text-color:var(--f7-md-on-surface-variant)}.popover-backdrop-unique{z-index:13500}.popover{width:var(--f7-popover-width);z-index:13500;margin:0;top:0;opacity:0;left:0;position:absolute;display:none;background-color:var(--f7-popover-bg-color);border-radius:var(--f7-popover-border-radius);will-change:transform,opacity;--f7-safe-area-top:0px;--f7-safe-area-left:0px;--f7-safe-area-right:0px;--f7-safe-area-bottom:0px}.popover .list{margin:0}.popover .list ul{background:0 0}.popover .list:first-child ul:before{display:none!important}.popover .list:last-child ul:after{display:none!important}.popover .list:first-child ul{border-radius:var(--f7-popover-border-radius) var(--f7-popover-border-radius) 0 0}.popover .list:first-child li:first-child,.popover .list:first-child li:first-child a,.popover .list:first-child li:first-child>label{border-radius:var(--f7-popover-border-radius) var(--f7-popover-border-radius) 0 0}.popover .list:last-child ul{border-radius:0 0 var(--f7-popover-border-radius) var(--f7-popover-border-radius)}.popover .list:last-child li:last-child,.popover .list:last-child li:last-child a,.popover .list:last-child li:last-child>label{border-radius:0 0 var(--f7-popover-border-radius) var(--f7-popover-border-radius)}.popover .list:first-child:last-child li:first-child:last-child,.popover .list:first-child:last-child li:first-child:last-child a,.popover .list:first-child:last-child li:first-child:last-child>label,.popover .list:first-child:last-child ul{border-radius:var(--f7-popover-border-radius)}.popover .list+.list{margin-top:var(--f7-list-margin-vertical)}.popover.modal-in{opacity:1}.popover.not-animated{transition-duration:0s}.popover,.popover-backdrop{transition-timing-function:var(--f7-popover-transition-timing-function)}.popover-inner{overflow:auto;-webkit-overflow-scrolling:touch}.popover-from-actions .item-link i.icon{width:var(--f7-popover-actions-icon-size);height:var(--f7-popover-actions-icon-size);font-size:var(--f7-popover-actions-icon-size)}.ios .popover-from-actions-strong{font-weight:600}.md .popover-from-actions-strong{font-weight:500}.popover-from-actions-label{line-height:1.3;position:relative;display:flex;align-items:center;padding:var(--f7-actions-label-padding);color:var(--f7-popover-actions-label-text-color);font-size:var(--f7-actions-label-font-size);justify-content:var(--f7-actions-label-justify-content)}.popover-from-actions-label:after{content:'';position:absolute;background-color:var(--f7-list-item-border-color);display:block;z-index:15;top:auto;right:auto;bottom:0;left:0;height:1px;width:100%;transform-origin:50% 100%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}.popover-from-actions-label:last-child:after{display:none!important}.md .popover-from-actions-label{justify-content:center}.popover-on-top{transform-origin:center bottom}.popover-on-top.popover-on-right{transform-origin:left bottom}.popover-on-top.popover-on-left{transform-origin:right bottom}.popover-on-middle{transform-origin:center center}.popover-on-middle.popover-on-right{transform-origin:left center}.popover-on-middle.popover-on-left{transform-origin:right center}.popover-on-bottom{transform-origin:center top}.popover-on-bottom.popover-on-right{transform-origin:left top}.popover-on-bottom.popover-on-left{transform-origin:right top}.ios .popover-on-top{transform-origin:center bottom;--f7-popover-inner-offset:translate3d(0%, 80px, 0)}.ios .popover-on-top.popover-on-right{transform-origin:left bottom;--f7-popover-inner-offset:translate3d(50%, 80px, 0)}.ios .popover-on-top.popover-on-left{transform-origin:right bottom;--f7-popover-inner-offset:translate3d(-50%, 80px, 0)}.ios .popover-on-middle{transform-origin:center center}.ios .popover-on-middle.popover-on-right{transform-origin:left center;--f7-popover-inner-offset:translate3d(50%, 0px, 0)}.ios .popover-on-middle.popover-on-left{transform-origin:right center;--f7-popover-inner-offset:translate3d(-50%, 0px, 0)}.ios .popover-on-bottom{transform-origin:center top;--f7-popover-inner-offset:translate3d(0%, -80px, 0)}.ios .popover-on-bottom.popover-on-right{transform-origin:left top;--f7-popover-inner-offset:translate3d(50%, -80px, 0)}.ios .popover-on-bottom.popover-on-left{transform-origin:right top;--f7-popover-inner-offset:translate3d(-50%, -80px, 0)}.ios .popover{transform:translate3d(0,0,0) scale(0);transition-property:opacity,transform;opacity:1;will-change:auto}.ios .popover.modal-in{transform:translate3d(0,0,0) scale(1);transition-timing-function:cubic-bezier(0,1,0.2,1.05);transition-duration:.4s}.ios .popover.modal-in .popover-inner{transition-duration:.6s;transition-timing-function:cubic-bezier(0,1,0.2,1.05);transform:translate3d(0,0,0) scale(1)}.ios .popover.modal-out{opacity:0;transform:translate3d(0,0,0) scale(0);transition-duration:.3s}.ios .popover.modal-out .popover-inner{transition-duration:.5s}.ios .popover-inner{background:var(--f7-glass-bg-color);box-shadow:var(--f7-glass-shadow);border-radius:var(--f7-popover-border-radius);transform:var(--f7-popover-inner-offset);-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px)}.md .popover{transform:scale(.85,.6);transition-property:opacity,transform;transition-duration:.3s}.md .popover.modal-in{opacity:1;transform:scale(1)}.md .popover.modal-out{opacity:0;transform:scale(1)}
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
--f7-popover-width: 260px;
|
|
3
3
|
}
|
|
4
4
|
.ios-vars({
|
|
5
|
-
--f7-popover-border-radius:
|
|
5
|
+
--f7-popover-border-radius: 32px;
|
|
6
6
|
--f7-popover-actions-icon-size: 28px;
|
|
7
7
|
--f7-popover-transition-timing-function: initial;
|
|
8
|
+
--f7-popover-bg-color: transparent;
|
|
8
9
|
.light-vars({
|
|
9
|
-
--f7-popover-bg-color: rgba(255,255,255,0.95);
|
|
10
10
|
--f7-popover-actions-label-text-color: rgba(0,0,0,0.45);
|
|
11
11
|
});
|
|
12
12
|
.dark-vars({
|
|
13
|
-
--f7-popover-bg-color: rgba(30,30,30,0.95);
|
|
14
13
|
--f7-popover-actions-label-text-color: rgba(255,255,255,0.55);
|
|
15
14
|
});
|
|
16
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--f7-popover-width:260px}.ios{--f7-popover-border-radius:
|
|
1
|
+
:root{--f7-popover-width:260px}.ios{--f7-popover-border-radius:32px;--f7-popover-actions-icon-size:28px;--f7-popover-transition-timing-function:initial;--f7-popover-bg-color:transparent;--f7-popover-actions-label-text-color:rgba(0, 0, 0, 0.45)}.ios .dark,.ios.dark{--f7-popover-actions-label-text-color:rgba(255, 255, 255, 0.55)}.md{--f7-popover-transition-timing-function:cubic-bezier(0, 0.8, 0.34, 1);--f7-popover-border-radius:28px;--f7-popover-actions-icon-size:24px}.md,.md .dark,.md [class*=color-]{--f7-popover-bg-color:var(--f7-md-surface-3);--f7-popover-actions-label-text-color:var(--f7-md-on-surface-variant)}.popover-backdrop-unique{z-index:13500}.popover{width:var(--f7-popover-width);z-index:13500;margin:0;top:0;opacity:0;left:0;position:absolute;display:none;background-color:var(--f7-popover-bg-color);border-radius:var(--f7-popover-border-radius);will-change:transform,opacity;--f7-safe-area-top:0px;--f7-safe-area-left:0px;--f7-safe-area-right:0px;--f7-safe-area-bottom:0px}.popover .list{margin:0}.popover .list ul{background:0 0}.popover .list:first-child ul:before{display:none!important}.popover .list:last-child ul:after{display:none!important}.popover .list:first-child ul{border-radius:var(--f7-popover-border-radius) var(--f7-popover-border-radius) 0 0}.popover .list:first-child li:first-child,.popover .list:first-child li:first-child a,.popover .list:first-child li:first-child>label{border-radius:var(--f7-popover-border-radius) var(--f7-popover-border-radius) 0 0}.popover .list:last-child ul{border-radius:0 0 var(--f7-popover-border-radius) var(--f7-popover-border-radius)}.popover .list:last-child li:last-child,.popover .list:last-child li:last-child a,.popover .list:last-child li:last-child>label{border-radius:0 0 var(--f7-popover-border-radius) var(--f7-popover-border-radius)}.popover .list:first-child:last-child li:first-child:last-child,.popover .list:first-child:last-child li:first-child:last-child a,.popover .list:first-child:last-child li:first-child:last-child>label,.popover .list:first-child:last-child ul{border-radius:var(--f7-popover-border-radius)}.popover .list+.list{margin-top:var(--f7-list-margin-vertical)}.popover.modal-in{opacity:1}.popover.not-animated{transition-duration:0s}.popover,.popover-backdrop{transition-timing-function:var(--f7-popover-transition-timing-function)}.popover-inner{overflow:auto;-webkit-overflow-scrolling:touch}.popover-from-actions .item-link i.icon{width:var(--f7-popover-actions-icon-size);height:var(--f7-popover-actions-icon-size);font-size:var(--f7-popover-actions-icon-size)}.ios .popover-from-actions-strong{font-weight:600}.md .popover-from-actions-strong{font-weight:500}.popover-from-actions-label{line-height:1.3;position:relative;display:flex;align-items:center;padding:var(--f7-actions-label-padding);color:var(--f7-popover-actions-label-text-color);font-size:var(--f7-actions-label-font-size);justify-content:var(--f7-actions-label-justify-content)}.popover-from-actions-label:after{content:'';position:absolute;background-color:var(--f7-list-item-border-color);display:block;z-index:15;top:auto;right:auto;bottom:0;left:0;height:1px;width:100%;transform-origin:50% 100%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}.popover-from-actions-label:last-child:after{display:none!important}.md .popover-from-actions-label{justify-content:center}.popover-on-top{transform-origin:center bottom}.popover-on-top.popover-on-right{transform-origin:left bottom}.popover-on-top.popover-on-left{transform-origin:right bottom}.popover-on-middle{transform-origin:center center}.popover-on-middle.popover-on-right{transform-origin:left center}.popover-on-middle.popover-on-left{transform-origin:right center}.popover-on-bottom{transform-origin:center top}.popover-on-bottom.popover-on-right{transform-origin:left top}.popover-on-bottom.popover-on-left{transform-origin:right top}.ios .popover-on-top{transform-origin:center bottom;--f7-popover-inner-offset:translate3d(0%, 80px, 0)}.ios .popover-on-top.popover-on-right{transform-origin:left bottom;--f7-popover-inner-offset:translate3d(50%, 80px, 0)}.ios .popover-on-top.popover-on-left{transform-origin:right bottom;--f7-popover-inner-offset:translate3d(-50%, 80px, 0)}.ios .popover-on-middle{transform-origin:center center}.ios .popover-on-middle.popover-on-right{transform-origin:left center;--f7-popover-inner-offset:translate3d(50%, 0px, 0)}.ios .popover-on-middle.popover-on-left{transform-origin:right center;--f7-popover-inner-offset:translate3d(-50%, 0px, 0)}.ios .popover-on-bottom{transform-origin:center top;--f7-popover-inner-offset:translate3d(0%, -80px, 0)}.ios .popover-on-bottom.popover-on-right{transform-origin:left top;--f7-popover-inner-offset:translate3d(50%, -80px, 0)}.ios .popover-on-bottom.popover-on-left{transform-origin:right top;--f7-popover-inner-offset:translate3d(-50%, -80px, 0)}.ios .popover{transform:translate3d(0,0,0) scale(0);transition-property:opacity,transform;opacity:1;will-change:auto}.ios .popover.modal-in{transform:translate3d(0,0,0) scale(1);transition-timing-function:cubic-bezier(0,1,0.2,1.05);transition-duration:.4s}.ios .popover.modal-in .popover-inner{transition-duration:.6s;transition-timing-function:cubic-bezier(0,1,0.2,1.05);transform:translate3d(0,0,0) scale(1)}.ios .popover.modal-out{opacity:0;transform:translate3d(0,0,0) scale(0);transition-duration:.3s}.ios .popover.modal-out .popover-inner{transition-duration:.5s}.ios .popover-inner{background:var(--f7-glass-bg-color);box-shadow:var(--f7-glass-shadow);border-radius:var(--f7-popover-border-radius);transform:var(--f7-popover-inner-offset);-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px)}.md .popover{transform:scale(.85,.6);transition-property:opacity,transform;transition-duration:.3s}.md .popover.modal-in{opacity:1;transform:scale(1)}.md .popover.modal-out{opacity:0;transform:scale(1)}
|
|
@@ -23,8 +23,6 @@ export namespace Popover {
|
|
|
23
23
|
el?: HTMLElement | CSSSelector;
|
|
24
24
|
/** Full Popover HTML layout string. Can be useful if you want to create Popover element dynamically. */
|
|
25
25
|
content?: string;
|
|
26
|
-
/** Enables Popover arrow/corner. (default true) */
|
|
27
|
-
arrow?: boolean;
|
|
28
26
|
/** Enables Popover backdrop (dark semi transparent layer behind). (default true) */
|
|
29
27
|
backdrop?: boolean;
|
|
30
28
|
/** Backdrop element to share across instances */
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
left: 0;
|
|
16
16
|
position: absolute;
|
|
17
17
|
display: none;
|
|
18
|
-
transition-duration: 300ms;
|
|
19
18
|
background-color: var(--f7-popover-bg-color);
|
|
20
19
|
border-radius: var(--f7-popover-border-radius);
|
|
21
20
|
will-change: transform, opacity;
|
|
@@ -110,56 +109,35 @@
|
|
|
110
109
|
justify-content: center;
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
top: 0;
|
|
129
|
-
border-radius: 3px;
|
|
130
|
-
transform: rotate(45deg);
|
|
131
|
-
}
|
|
132
|
-
&.on-left {
|
|
133
|
-
left: -26px;
|
|
134
|
-
&:after {
|
|
135
|
-
left: 19px;
|
|
136
|
-
top: 0;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
&.on-right {
|
|
140
|
-
left: 100%;
|
|
141
|
-
&:after {
|
|
142
|
-
left: -19px;
|
|
143
|
-
top: 0;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
&.on-top {
|
|
147
|
-
left: 0;
|
|
148
|
-
top: -26px;
|
|
149
|
-
&:after {
|
|
150
|
-
left: 0;
|
|
151
|
-
top: 19px;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
&.on-bottom {
|
|
155
|
-
left: 0;
|
|
156
|
-
top: 100%;
|
|
157
|
-
&:after {
|
|
158
|
-
left: 0;
|
|
159
|
-
top: -19px;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
112
|
+
|
|
113
|
+
.popover-on-top {
|
|
114
|
+
transform-origin: center bottom;
|
|
115
|
+
}
|
|
116
|
+
.popover-on-top.popover-on-right {
|
|
117
|
+
transform-origin: left bottom;
|
|
118
|
+
}
|
|
119
|
+
.popover-on-top.popover-on-left {
|
|
120
|
+
transform-origin: right bottom;
|
|
121
|
+
}
|
|
122
|
+
.popover-on-middle {
|
|
123
|
+
transform-origin: center center;
|
|
124
|
+
}
|
|
125
|
+
.popover-on-middle.popover-on-right {
|
|
126
|
+
transform-origin: left center;
|
|
162
127
|
}
|
|
128
|
+
.popover-on-middle.popover-on-left {
|
|
129
|
+
transform-origin: right center;
|
|
130
|
+
}
|
|
131
|
+
.popover-on-bottom {
|
|
132
|
+
transform-origin: center top;
|
|
133
|
+
}
|
|
134
|
+
.popover-on-bottom.popover-on-right {
|
|
135
|
+
transform-origin: left top;
|
|
136
|
+
}
|
|
137
|
+
.popover-on-bottom.popover-on-left {
|
|
138
|
+
transform-origin: right top;
|
|
139
|
+
}
|
|
140
|
+
|
|
163
141
|
.if-ios-theme({
|
|
164
142
|
@import './popover-ios.less';
|
|
165
143
|
});
|