Skip to content

Commit 8104887

Browse files
committed
feat: ios highlights, remove obsolete support, single color photo browser
1 parent 72b7310 commit 8104887

38 files changed

Lines changed: 302 additions & 298 deletions

kitchen-sink/core/pages/photo-browser.html

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,7 @@
3232
<a class="button button-fill button-round" @click=${openPage}>Page</a>
3333
</div>
3434
</div>
35-
<div class="block block-strong inset">
36-
<p>Photo Browser supports 2 default themes - default Light (like in previous examples) and Dark theme. Here is a
37-
Dark theme examples:</p>
38-
<div class="grid grid-cols-3 grid-gap">
39-
<a class="button button-fill button-round" @click=${openStandaloneDark}>Standalone</a>
40-
<a class="button button-fill button-round" @click=${openPopupDark}>Popup</a>
41-
<a class="button button-fill button-round" @click=${openPageDark}>Page</a>
42-
</div>
43-
</div>
35+
4436
</div>
4537
</div>
4638
</template>
@@ -73,9 +65,6 @@
7365
let standalone;
7466
let popup;
7567
let page;
76-
let standaloneDark;
77-
let popupDark;
78-
let pageDark;
7968

8069
const openStandalone = () => {
8170
standalone.open();
@@ -86,15 +75,6 @@
8675
const openPage = () => {
8776
page.open();
8877
}
89-
const openStandaloneDark = () => {
90-
standaloneDark.open();
91-
}
92-
const openPopupDark = () => {
93-
popupDark.open();
94-
}
95-
const openPageDark = () => {
96-
pageDark.open();
97-
}
9878
$on('pageInit', () => {
9979
// Create PBs when page init
10080
standalone = $f7.photoBrowser.create({
@@ -112,33 +92,12 @@
11292
type: 'page',
11393
backLinkText: 'Back',
11494
});
115-
standaloneDark = $f7.photoBrowser.create({
116-
photos: photos,
117-
thumbs: thumbs,
118-
theme: 'dark',
119-
});
120-
popupDark = $f7.photoBrowser.create({
121-
photos: photos,
122-
thumbs: thumbs,
123-
type: 'popup',
124-
theme: 'dark',
125-
});
126-
pageDark = $f7.photoBrowser.create({
127-
photos: photos,
128-
thumbs: thumbs,
129-
type: 'page',
130-
backLinkText: 'Back',
131-
theme: 'dark',
132-
});
13395
});
13496
$on('pageBeforeRemove', () => {
13597
// Destroy PBs on page remove
13698
standalone.destroy();
13799
popup.destroy();
138100
page.destroy();
139-
standaloneDark.destroy();
140-
popupDark.destroy();
141-
pageDark.destroy();
142101
});
143102

144103
return $render;

src/core/components/autocomplete/autocomplete-ios.less

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,20 @@
66
margin-bottom: 12px;
77
}
88
}
9+
.searchbar-input-wrap .autocomplete-dropdown {
10+
.ios-glass();
11+
margin-top: 16px;
12+
border-radius: 22px;
13+
.autocomplete-dropdown-inner {
14+
padding-top: 0;
15+
}
16+
li:first-child {
17+
position: relative;
18+
overflow: hidden;
19+
border-radius: 22px 22px 0 0;
20+
}
21+
li:last-child {
22+
border-radius: 0 0 22px 22px;
23+
}
24+
}
925
}

src/core/components/calendar/calendar-class.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { extend, nextTick, deleteProps } from '../../shared/utils.js';
22
import Framework7Class from '../../shared/class.js';
33
import $ from '../../shared/dom7.js';
44
import { getDevice } from '../../shared/get-device.js';
5-
import { getSupport } from '../../shared/get-support.js';
65
/** @jsx $jsx */
76
import $jsx from '../../shared/$jsx.js';
87

@@ -330,9 +329,7 @@ class Calendar extends Framework7Class {
330329
}
331330

332331
const passiveListener =
333-
app.touchEvents.start === 'touchstart' && getSupport().passiveListener
334-
? { passive: true, capture: false }
335-
: false;
332+
app.touchEvents.start === 'touchstart' ? { passive: true, capture: false } : false;
336333
// Selectors clicks
337334
$el.find('.calendar-prev-month-button').on('click', onPrevMonthClick);
338335
$el.find('.calendar-next-month-button').on('click', onNextMonthClick);

src/core/components/calendar/calendar-ios.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
}
2828
}
2929
}
30+
.calendar-popover .toolbar {
31+
overflow: visible;
32+
}
3033
.calendar-modal {
3134
.ios-glass-backdrop();
3235
}

src/core/components/color-picker/modules/hs-spectrum.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import $ from '../../../shared/dom7.js';
22
import { colorHsbToHsl } from '../../../shared/utils.js';
3-
import { getSupport } from '../../../shared/get-support.js';
43
/** @jsx $jsx */
54
import $jsx from '../../../shared/$jsx.js';
65

@@ -92,9 +91,7 @@ export default {
9291
}
9392

9493
const passiveListener =
95-
app.touchEvents.start === 'touchstart' && getSupport().passiveListener
96-
? { passive: true, capture: false }
97-
: false;
94+
app.touchEvents.start === 'touchstart' ? { passive: true, capture: false } : false;
9895

9996
self.$el.on(app.touchEvents.start, handleTouchStart, passiveListener);
10097
app.on('touchmove:active', handleTouchMove);

src/core/components/color-picker/modules/sb-spectrum.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import $ from '../../../shared/dom7.js';
2-
import { getSupport } from '../../../shared/get-support.js';
32
/** @jsx $jsx */
43
import $jsx from '../../../shared/$jsx.js';
54

@@ -91,9 +90,7 @@ export default {
9190
}
9291

9392
const passiveListener =
94-
app.touchEvents.start === 'touchstart' && getSupport().passiveListener
95-
? { passive: true, capture: false }
96-
: false;
93+
app.touchEvents.start === 'touchstart' ? { passive: true, capture: false } : false;
9794

9895
self.$el.on(app.touchEvents.start, handleTouchStart, passiveListener);
9996
app.on('touchmove:active', handleTouchMove);

src/core/components/color-picker/modules/wheel.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import $ from '../../../shared/dom7.js';
2-
import { getSupport } from '../../../shared/get-support.js';
32
/** @jsx $jsx */
43
import $jsx from '../../../shared/$jsx.js';
54

@@ -139,9 +138,7 @@ export default {
139138
}
140139

141140
const passiveListener =
142-
app.touchEvents.start === 'touchstart' && getSupport().passiveListener
143-
? { passive: true, capture: false }
144-
: false;
141+
app.touchEvents.start === 'touchstart' ? { passive: true, capture: false } : false;
145142

146143
self.$el.on(app.touchEvents.start, handleTouchStart, passiveListener);
147144
app.on('touchmove:active', handleTouchMove);

src/core/components/list-index/list-index-class.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import $ from '../../shared/dom7.js';
22
import { extend, deleteProps } from '../../shared/utils.js';
33
import Framework7Class from '../../shared/class.js';
4-
import { getSupport } from '../../shared/get-support.js';
54

65
class ListIndex extends Framework7Class {
76
constructor(app, params = {}) {
@@ -184,7 +183,7 @@ class ListIndex extends Framework7Class {
184183
$labelEl = undefined;
185184
}
186185
}
187-
const passiveListener = getSupport().passiveListener ? { passive: true } : false;
186+
const passiveListener = { passive: true };
188187
index.attachEvents = function attachEvents() {
189188
$el.parents('.tab').on('tab:show', handleResize);
190189
$el.parents('.page').on('page:reinit', handleResize);

src/core/components/messagebar/messagebar-ios.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
border: 1px solid var(--f7-messagebar-attachments-border-color);
1818
border-bottom: none;
1919
}
20+
.messagebar-area {
21+
border-radius: var(--f7-messagebar-textarea-border-radius);
22+
}
2023
.messagebar-attachments-visible {
2124
.messagebar-area {
2225
background: var(--f7-messagebar-textarea-bg-color);

src/core/components/panel/resizable-panel.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import $ from '../../shared/dom7.js';
22
import { extend, nextFrame } from '../../shared/utils.js';
3-
import { getSupport } from '../../shared/get-support.js';
43

54
function resizablePanel(panel) {
65
const app = panel.app;
7-
const support = getSupport();
86
if (panel.resizableInitialized) return;
97
extend(panel, {
108
resizable: true,
@@ -159,7 +157,7 @@ function resizablePanel(panel) {
159157
$el.addClass('panel-resizable');
160158

161159
// Add Events
162-
const passive = support.passiveListener ? { passive: true } : false;
160+
const passive = { passive: true };
163161

164162
panel.$el.on(app.touchEvents.start, '.panel-resize-handler', handleTouchStart, passive);
165163
app.on('touchmove:active', handleTouchMove);

0 commit comments

Comments
 (0)