framework7-svelte 8.0.0-beta.4 → 8.0.0-beta.5
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/actions-label.d.ts +1 -1
- package/components/popover.d.ts +1 -1
- package/components/popover.svelte +3 -3
- package/components/searchbar.d.ts +1 -1
- package/components/searchbar.svelte +2 -2
- package/components/tab.svelte +23 -6
- package/components/tabs.svelte +27 -8
- package/framework7-svelte.js +2 -2
- package/package.json +2 -2
package/components/popover.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface PopoverProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap['
|
|
|
8
8
|
opened ?: boolean;
|
|
9
9
|
animate ?: boolean;
|
|
10
10
|
targetEl ?: string | object;
|
|
11
|
-
|
|
11
|
+
arrow ?: boolean;
|
|
12
12
|
backdrop ?: boolean;
|
|
13
13
|
backdropEl ?: string | object;
|
|
14
14
|
closeByBackdropClick ?: boolean;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
export let opened = undefined;
|
|
16
16
|
export let animate = undefined;
|
|
17
17
|
export let targetEl = undefined;
|
|
18
|
-
export let
|
|
18
|
+
export let arrow = undefined;
|
|
19
19
|
export let backdrop = undefined;
|
|
20
20
|
export let backdropEl = undefined;
|
|
21
21
|
export let closeByBackdropClick = undefined;
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
if (typeof closeByOutsideClick !== 'undefined')
|
|
96
96
|
params.closeByOutsideClick = closeByOutsideClick;
|
|
97
97
|
if (typeof closeOnEscape !== 'undefined') params.closeOnEscape = closeOnEscape;
|
|
98
|
-
if (typeof
|
|
98
|
+
if (typeof arrow !== 'undefined') params.arrow = arrow;
|
|
99
99
|
if (typeof backdrop !== 'undefined') params.backdrop = backdrop;
|
|
100
100
|
if (typeof backdropEl !== 'undefined') params.backdropEl = backdropEl;
|
|
101
101
|
if (typeof containerEl !== 'undefined') params.containerEl = containerEl;
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</script>
|
|
117
117
|
|
|
118
118
|
<div class={classes} bind:this={el} {style} {...restProps($$restProps)}>
|
|
119
|
-
<div class="popover-
|
|
119
|
+
<div class="popover-arrow" />
|
|
120
120
|
<div class="popover-inner">
|
|
121
121
|
<slot popover={f7Popover} />
|
|
122
122
|
</div>
|
|
@@ -29,7 +29,7 @@ interface SearchbarProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap
|
|
|
29
29
|
ignore ?: string;
|
|
30
30
|
customSearch ?: boolean;
|
|
31
31
|
removeDiacritics ?: boolean;
|
|
32
|
-
|
|
32
|
+
hideGroupTitles ?: boolean;
|
|
33
33
|
hideGroups ?: boolean;
|
|
34
34
|
init ?: boolean;
|
|
35
35
|
color?: string;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
export let ignore = '.searchbar-ignore';
|
|
42
42
|
export let customSearch = false;
|
|
43
43
|
export let removeDiacritics = false;
|
|
44
|
-
export let
|
|
44
|
+
export let hideGroupTitles = true;
|
|
45
45
|
export let hideGroups = true;
|
|
46
46
|
export let init = true;
|
|
47
47
|
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
ignore,
|
|
136
136
|
customSearch,
|
|
137
137
|
removeDiacritics,
|
|
138
|
-
|
|
138
|
+
hideGroupTitles,
|
|
139
139
|
hideGroups,
|
|
140
140
|
expandable,
|
|
141
141
|
inline,
|
package/components/tab.svelte
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { classNames, createEmitter, getComponentId } from '../shared/utils.js';
|
|
7
7
|
import { f7ready, app } from '../shared/f7.js';
|
|
8
8
|
import { useTab } from '../shared/use-tab.js';
|
|
9
|
+
import { getReactiveContext } from '../shared/get-reactive-context.js';
|
|
9
10
|
|
|
10
11
|
const emit = createEmitter(createEventDispatcher, $$props);
|
|
11
12
|
|
|
@@ -16,10 +17,17 @@
|
|
|
16
17
|
|
|
17
18
|
const RouterContext = getContext('RouterContext') || {};
|
|
18
19
|
|
|
20
|
+
let TabsSwipeableContext =
|
|
21
|
+
getReactiveContext('TabsSwipeableContext', (newValue) => {
|
|
22
|
+
TabsSwipeableContext = newValue || false;
|
|
23
|
+
}) || {};
|
|
24
|
+
|
|
19
25
|
let el;
|
|
20
26
|
let routerData = null;
|
|
21
27
|
let initialTabContent = null;
|
|
22
28
|
|
|
29
|
+
$: isSwiper = TabsSwipeableContext;
|
|
30
|
+
|
|
23
31
|
if (
|
|
24
32
|
!routerData &&
|
|
25
33
|
RouterContext &&
|
|
@@ -83,9 +91,18 @@
|
|
|
83
91
|
});
|
|
84
92
|
</script>
|
|
85
93
|
|
|
86
|
-
|
|
87
|
-
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
{#if isSwiper || TabsSwipeableContext}
|
|
95
|
+
<swiper-slide {id} class={classes} bind:this={el} {...restProps($$restProps)}>
|
|
96
|
+
{#if tabContent}
|
|
97
|
+
<svelte:component this={tabContent.component} {...tabContent.props} />
|
|
98
|
+
{/if}
|
|
99
|
+
<slot />
|
|
100
|
+
</swiper-slide>
|
|
101
|
+
{:else}
|
|
102
|
+
<div {id} class={classes} bind:this={el} {...restProps($$restProps)}>
|
|
103
|
+
{#if tabContent}
|
|
104
|
+
<svelte:component this={tabContent.component} {...tabContent.props} />
|
|
105
|
+
{/if}
|
|
106
|
+
<slot />
|
|
107
|
+
</div>
|
|
108
|
+
{/if}
|
package/components/tabs.svelte
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { onMount } from 'svelte';
|
|
2
|
+
import { onMount, tick } from 'svelte';
|
|
3
3
|
|
|
4
4
|
import { restProps } from '../shared/rest-props.js';
|
|
5
5
|
import { colorClasses } from '../shared/mixins.js';
|
|
6
6
|
import { classNames } from '../shared/utils.js';
|
|
7
|
+
import { setReactiveContext } from '../shared/set-reactive-context.js';
|
|
7
8
|
|
|
8
9
|
let className = undefined;
|
|
9
10
|
export { className as class };
|
|
@@ -15,28 +16,46 @@
|
|
|
15
16
|
let wrapEl;
|
|
16
17
|
|
|
17
18
|
$: classes = classNames(className, colorClasses($$props));
|
|
18
|
-
|
|
19
|
-
'tabs-animated-wrap': animated,
|
|
20
|
-
'tabs-swipeable-wrap': swipeable,
|
|
21
|
-
});
|
|
19
|
+
|
|
22
20
|
$: tabsClasses = classNames({
|
|
23
21
|
tabs: true,
|
|
24
22
|
'tabs-routable': routable,
|
|
25
23
|
});
|
|
26
24
|
|
|
25
|
+
setReactiveContext('TabsSwipeableContext', () => true);
|
|
26
|
+
|
|
27
27
|
onMount(() => {
|
|
28
28
|
if (swipeable && swiperParams && wrapEl) {
|
|
29
|
-
wrapEl
|
|
29
|
+
Object.assign(wrapEl, swiperParams);
|
|
30
|
+
wrapEl.initialize();
|
|
30
31
|
}
|
|
32
|
+
tick().then(() => {
|
|
33
|
+
if (swipeable && wrapEl.swiper) {
|
|
34
|
+
wrapEl.swiper.update();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
31
37
|
});
|
|
32
38
|
</script>
|
|
33
39
|
|
|
34
|
-
{#if animated
|
|
35
|
-
<div
|
|
40
|
+
{#if animated}
|
|
41
|
+
<div
|
|
42
|
+
class={classNames('tabs-animated-wrap', classes)}
|
|
43
|
+
bind:this={wrapEl}
|
|
44
|
+
{...restProps($$restProps)}
|
|
45
|
+
>
|
|
36
46
|
<div class={tabsClasses}>
|
|
37
47
|
<slot />
|
|
38
48
|
</div>
|
|
39
49
|
</div>
|
|
50
|
+
{:else if swipeable}
|
|
51
|
+
<swiper-container
|
|
52
|
+
bind:this={wrapEl}
|
|
53
|
+
class={classNames(tabsClasses, classes)}
|
|
54
|
+
{...restProps($$restProps)}
|
|
55
|
+
init={swiperParams ? 'false' : 'true'}
|
|
56
|
+
>
|
|
57
|
+
<slot />
|
|
58
|
+
</swiper-container>
|
|
40
59
|
{:else}
|
|
41
60
|
<div class={classNames(tabsClasses, classes)} {...restProps($$restProps)}>
|
|
42
61
|
<slot />
|
package/framework7-svelte.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Framework7 Svelte 8.0.0-beta.
|
|
2
|
+
* Framework7 Svelte 8.0.0-beta.5
|
|
3
3
|
* Build full featured iOS & Android apps using Framework7 & Svelte
|
|
4
4
|
* https://framework7.io/svelte/
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Released under the MIT License
|
|
9
9
|
*
|
|
10
|
-
* Released on: March
|
|
10
|
+
* Released on: March 23, 2023
|
|
11
11
|
*/
|
|
12
12
|
import Framework7Svelte from './shared/plugin.js';
|
|
13
13
|
import { f7, f7ready, theme, app } from './shared/f7.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framework7-svelte",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.5",
|
|
4
4
|
"description": "Build full featured iOS & Android apps using Framework7 & Svelte",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"svelte": "./framework7-svelte.js",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"type": "patreon",
|
|
47
47
|
"url": "https://www.patreon.com/framework7"
|
|
48
48
|
},
|
|
49
|
-
"releaseDate": "March
|
|
49
|
+
"releaseDate": "March 23, 2023"
|
|
50
50
|
}
|