framework7-svelte 8.3.3 → 9.0.0-beta.1
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/accordion-content.d.ts +11 -5
- package/components/accordion-content.svelte +8 -6
- package/components/accordion-item.d.ts +23 -11
- package/components/accordion-item.svelte +27 -25
- package/components/accordion-toggle.d.ts +11 -5
- package/components/accordion-toggle.svelte +8 -6
- package/components/accordion.d.ts +11 -5
- package/components/accordion.svelte +11 -10
- package/components/actions-button.d.ts +14 -6
- package/components/actions-button.svelte +21 -19
- package/components/actions-group.d.ts +11 -5
- package/components/actions-group.svelte +4 -7
- package/components/actions-label.d.ts +11 -5
- package/components/actions-label.svelte +13 -23
- package/components/actions.d.ts +31 -21
- package/components/actions.svelte +50 -54
- package/components/app.d.ts +11 -5
- package/components/app.svelte +6 -7
- package/components/area-chart.d.ts +13 -6
- package/components/area-chart.svelte +42 -46
- package/components/badge.d.ts +11 -5
- package/components/badge.svelte +10 -9
- package/components/block-footer.d.ts +11 -5
- package/components/block-footer.svelte +8 -6
- package/components/block-header.d.ts +11 -5
- package/components/block-header.svelte +8 -6
- package/components/block-title.d.ts +11 -5
- package/components/block-title.svelte +12 -10
- package/components/block.d.ts +11 -5
- package/components/block.svelte +76 -76
- package/components/breadcrumbs-collapsed.d.ts +12 -6
- package/components/breadcrumbs-collapsed.svelte +10 -15
- package/components/breadcrumbs-item.d.ts +12 -6
- package/components/breadcrumbs-item.svelte +9 -8
- package/components/breadcrumbs-separator.d.ts +10 -5
- package/components/breadcrumbs-separator.svelte +9 -5
- package/components/breadcrumbs.d.ts +11 -6
- package/components/breadcrumbs.svelte +8 -6
- package/components/button.d.ts +44 -37
- package/components/button.svelte +107 -103
- package/components/card-content.d.ts +11 -5
- package/components/card-content.svelte +11 -10
- package/components/card-footer.d.ts +11 -5
- package/components/card-footer.svelte +8 -6
- package/components/card-header.d.ts +11 -5
- package/components/card-header.svelte +8 -6
- package/components/card.d.ts +43 -31
- package/components/card.svelte +78 -67
- package/components/checkbox.d.ts +20 -13
- package/components/checkbox.svelte +32 -30
- package/components/chip.d.ts +22 -15
- package/components/chip.svelte +54 -60
- package/components/fab-backdrop.d.ts +10 -5
- package/components/fab-backdrop.svelte +5 -7
- package/components/fab-button.d.ts +17 -11
- package/components/fab-button.svelte +20 -29
- package/components/fab-buttons.d.ts +11 -5
- package/components/fab-buttons.svelte +5 -12
- package/components/fab.d.ts +22 -13
- package/components/fab.svelte +55 -51
- package/components/gauge.d.ts +24 -19
- package/components/gauge.svelte +25 -25
- package/components/icon.d.ts +19 -13
- package/components/icon.svelte +65 -63
- package/components/input.d.ts +78 -61
- package/components/input.svelte +171 -154
- package/components/link.d.ts +28 -21
- package/components/link.svelte +67 -65
- package/components/list-button.d.ts +22 -15
- package/components/list-button.svelte +56 -44
- package/components/list-group.d.ts +16 -10
- package/components/list-group.svelte +38 -34
- package/components/list-index.d.ts +20 -13
- package/components/list-index.svelte +23 -24
- package/components/list-input.d.ts +91 -64
- package/components/list-input.svelte +254 -205
- package/components/list-item.d.ts +98 -63
- package/components/list-item.svelte +413 -440
- package/components/list.d.ts +72 -54
- package/components/list.svelte +151 -147
- package/components/login-screen-title.d.ts +11 -5
- package/components/login-screen-title.svelte +4 -6
- package/components/login-screen.d.ts +20 -10
- package/components/login-screen.svelte +39 -42
- package/components/message.d.ts +48 -29
- package/components/message.svelte +123 -88
- package/components/messagebar-attachment.d.ts +17 -9
- package/components/messagebar-attachment.svelte +16 -18
- package/components/messagebar-attachments.d.ts +11 -5
- package/components/messagebar-attachments.svelte +6 -6
- package/components/messagebar-sheet-image.d.ts +19 -10
- package/components/messagebar-sheet-image.svelte +30 -22
- package/components/messagebar-sheet-item.d.ts +11 -5
- package/components/messagebar-sheet-item.svelte +4 -6
- package/components/messagebar-sheet.d.ts +11 -5
- package/components/messagebar-sheet.svelte +4 -6
- package/components/messagebar.d.ts +53 -31
- package/components/messagebar.svelte +100 -77
- package/components/messages-title.d.ts +11 -5
- package/components/messages-title.svelte +4 -6
- package/components/messages.d.ts +26 -20
- package/components/messages.svelte +32 -32
- package/components/nav-left.d.ts +19 -12
- package/components/nav-left.svelte +23 -39
- package/components/nav-right.d.ts +11 -6
- package/components/nav-right.svelte +4 -15
- package/components/nav-title-large.d.ts +11 -5
- package/components/nav-title-large.svelte +4 -6
- package/components/nav-title.d.ts +13 -8
- package/components/nav-title.svelte +25 -20
- package/components/navbar.d.ts +47 -28
- package/components/navbar.svelte +100 -111
- package/components/page-content.d.ts +41 -29
- package/components/page-content.svelte +58 -50
- package/components/page.d.ts +71 -46
- package/components/page.svelte +102 -82
- package/components/panel.d.ts +51 -35
- package/components/panel.svelte +94 -99
- package/components/photo-browser.d.ts +50 -41
- package/components/photo-browser.svelte +48 -47
- package/components/pie-chart.d.ts +13 -6
- package/components/pie-chart.svelte +29 -27
- package/components/popover.d.ts +28 -19
- package/components/popover.svelte +45 -48
- package/components/popup.d.ts +37 -23
- package/components/popup.svelte +68 -57
- package/components/preloader.d.ts +10 -5
- package/components/preloader.svelte +30 -31
- package/components/progressbar.d.ts +11 -6
- package/components/progressbar.svelte +13 -17
- package/components/radio.d.ts +19 -12
- package/components/radio.svelte +19 -23
- package/components/range.d.ts +35 -27
- package/components/range.svelte +47 -44
- package/components/routable-modals.d.ts +9 -4
- package/components/routable-modals.svelte +9 -8
- package/components/router-context-provider.d.ts +11 -6
- package/components/router-context-provider.svelte +2 -4
- package/components/searchbar.d.ts +60 -43
- package/components/searchbar.svelte +115 -104
- package/components/segmented.d.ts +21 -15
- package/components/segmented.svelte +38 -35
- package/components/sheet.d.ts +47 -30
- package/components/sheet.svelte +94 -76
- package/components/snippet-render.d.ts +24 -0
- package/components/snippet-render.svelte +9 -0
- package/components/stepper.d.ts +53 -43
- package/components/stepper.svelte +83 -79
- package/components/subnavbar.d.ts +13 -8
- package/components/subnavbar.svelte +12 -20
- package/components/swipeout-actions.d.ts +14 -8
- package/components/swipeout-actions.svelte +14 -13
- package/components/swipeout-button.d.ts +20 -13
- package/components/swipeout-button.svelte +31 -31
- package/components/tab.d.ts +14 -8
- package/components/tab.svelte +20 -28
- package/components/tabs.d.ts +15 -9
- package/components/tabs.svelte +27 -26
- package/components/text-editor.d.ts +44 -24
- package/components/text-editor.svelte +56 -41
- package/components/toggle.d.ts +22 -15
- package/components/toggle.svelte +33 -37
- package/components/toolbar-pane.d.ts +24 -0
- package/components/toolbar-pane.svelte +14 -0
- package/components/toolbar.d.ts +30 -20
- package/components/toolbar.svelte +61 -53
- package/components/treeview-item.d.ts +36 -17
- package/components/treeview-item.svelte +101 -81
- package/components/treeview.d.ts +11 -5
- package/components/treeview.svelte +4 -6
- package/components/use-icon.d.ts +9 -4
- package/components/use-icon.svelte +1 -1
- package/components/view.d.ts +76 -65
- package/components/view.svelte +66 -48
- package/components/views.d.ts +11 -5
- package/components/views.svelte +12 -15
- package/framework7-svelte.d.ts +3 -1
- package/framework7-svelte.js +6 -4
- package/package.json +2 -2
- package/shared/components-router.js +28 -25
- package/shared/f7.js +1 -7
- package/shared/mixins.js +5 -5
- package/shared/modal-state-classes.js +4 -5
- package/shared/plugin.js +1 -4
- package/shared/rest-props.js +1 -4
- package/shared/use-icon.js +2 -5
- package/shared/use-store.js +9 -9
- package/shared/use-tab.js +3 -3
- package/shared/use-tooltip.js +3 -4
- package/shared/utils.js +2 -8
- package/shared/get-reactive-context.js +0 -16
- package/shared/list-context.js +0 -10
- package/shared/router-context.js +0 -8
- package/shared/set-reactive-context.js +0 -26
package/components/messages.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
|
|
2
|
-
import { SvelteComponent } from 'svelte';
|
|
2
|
+
import { SvelteComponent, Snippet } from 'svelte';
|
|
3
3
|
import { HTMLAttributes } from 'svelte/elements';
|
|
4
4
|
|
|
5
5
|
import { Messages } from 'framework7/types';
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
interface
|
|
9
|
-
autoLayout
|
|
10
|
-
messages
|
|
11
|
-
newMessagesFirst
|
|
12
|
-
scrollMessages
|
|
13
|
-
scrollMessagesOnEdge
|
|
8
|
+
interface Props {
|
|
9
|
+
autoLayout?: boolean;
|
|
10
|
+
messages?: Array<any>;
|
|
11
|
+
newMessagesFirst?: boolean;
|
|
12
|
+
scrollMessages?: boolean;
|
|
13
|
+
scrollMessagesOnEdge?: boolean;
|
|
14
14
|
typing?: boolean;
|
|
15
|
-
firstMessageRule
|
|
16
|
-
lastMessageRule
|
|
17
|
-
tailMessageRule
|
|
18
|
-
sameNameMessageRule
|
|
19
|
-
sameHeaderMessageRule
|
|
20
|
-
sameFooterMessageRule
|
|
21
|
-
sameAvatarMessageRule
|
|
22
|
-
customClassMessageRule
|
|
23
|
-
renderMessage
|
|
24
|
-
init
|
|
15
|
+
firstMessageRule?: Function;
|
|
16
|
+
lastMessageRule?: Function;
|
|
17
|
+
tailMessageRule?: Function;
|
|
18
|
+
sameNameMessageRule?: Function;
|
|
19
|
+
sameHeaderMessageRule?: Function;
|
|
20
|
+
sameFooterMessageRule?: Function;
|
|
21
|
+
sameAvatarMessageRule?: Function;
|
|
22
|
+
customClassMessageRule?: Function;
|
|
23
|
+
renderMessage?: Function;
|
|
24
|
+
init?: boolean;
|
|
25
25
|
color?: string;
|
|
26
26
|
colorTheme?: string;
|
|
27
27
|
textColor?: string;
|
|
@@ -29,14 +29,20 @@ interface MessagesProps {
|
|
|
29
29
|
borderColor?: string;
|
|
30
30
|
rippleColor?: string;
|
|
31
31
|
dark?: boolean;
|
|
32
|
+
children?: Snippet;
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
interface MessagesProps {}
|
|
36
|
+
interface MessagesProps extends Props {}
|
|
37
|
+
|
|
38
|
+
interface MessagesEvents extends Record<'',{}>{}
|
|
39
|
+
|
|
34
40
|
|
|
35
41
|
|
|
36
42
|
declare class Messages extends SvelteComponent<
|
|
37
|
-
MessagesProps
|
|
38
|
-
|
|
39
|
-
{
|
|
43
|
+
MessagesProps,
|
|
44
|
+
MessagesEvents,
|
|
45
|
+
{ }
|
|
40
46
|
> {}
|
|
41
47
|
|
|
42
48
|
export { MessagesProps };
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { onMount, onDestroy
|
|
2
|
+
import { onMount, onDestroy } from 'svelte';
|
|
3
3
|
import { colorClasses } from '../shared/mixins.js';
|
|
4
4
|
import { classNames, noUndefinedProps } from '../shared/utils.js';
|
|
5
|
-
import { restProps } from '../shared/rest-props.js';
|
|
6
5
|
import { app, f7ready } from '../shared/f7.js';
|
|
7
6
|
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let
|
|
31
|
-
let
|
|
7
|
+
let {
|
|
8
|
+
class: className,
|
|
9
|
+
autoLayout = false,
|
|
10
|
+
messages = [],
|
|
11
|
+
newMessagesFirst = false,
|
|
12
|
+
scrollMessages = true,
|
|
13
|
+
scrollMessagesOnEdge = true,
|
|
14
|
+
firstMessageRule = undefined,
|
|
15
|
+
lastMessageRule = undefined,
|
|
16
|
+
tailMessageRule = undefined,
|
|
17
|
+
sameNameMessageRule = undefined,
|
|
18
|
+
sameHeaderMessageRule = undefined,
|
|
19
|
+
sameFooterMessageRule = undefined,
|
|
20
|
+
sameAvatarMessageRule = undefined,
|
|
21
|
+
customClassMessageRule = undefined,
|
|
22
|
+
renderMessage = undefined,
|
|
23
|
+
typing = false,
|
|
24
|
+
init = true,
|
|
25
|
+
children,
|
|
26
|
+
...restProps
|
|
27
|
+
} = $props();
|
|
28
|
+
|
|
29
|
+
let el = $state(undefined);
|
|
30
|
+
let f7Messages = $state(undefined);
|
|
31
|
+
let childrenBeforeUpdated = $state(null);
|
|
32
32
|
|
|
33
33
|
export function instance() {
|
|
34
34
|
return f7Messages;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
const classes = $derived(classNames(className, 'messages', colorClasses(restProps)));
|
|
38
38
|
|
|
39
39
|
onMount(() => {
|
|
40
40
|
if (!init) return;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
$effect.pre(() => {
|
|
66
66
|
if (!init || !el) return;
|
|
67
67
|
const children = el.children;
|
|
68
68
|
if (!children) return;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
$effect(() => {
|
|
77
77
|
if (!init) return;
|
|
78
78
|
if (!el) return;
|
|
79
79
|
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
else f7Messages.hideTyping();
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
$effect(() => watchTyping(typing));
|
|
122
122
|
</script>
|
|
123
123
|
|
|
124
|
-
<div bind:this={el} class={classes} {...restProps
|
|
125
|
-
|
|
124
|
+
<div bind:this={el} class={classes} {...restProps}>
|
|
125
|
+
{@render children?.(f7Messages)}
|
|
126
126
|
</div>
|
package/components/nav-left.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import { SvelteComponent } from 'svelte';
|
|
2
|
+
import { SvelteComponent, Snippet } from 'svelte';
|
|
3
3
|
import { HTMLAttributes } from 'svelte/elements';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
interface
|
|
7
|
-
backLink
|
|
8
|
-
backLinkUrl
|
|
9
|
-
backLinkForce
|
|
10
|
-
backLinkShowText
|
|
11
|
-
sliding ?: boolean;
|
|
6
|
+
interface Props {
|
|
7
|
+
backLink?: boolean | string;
|
|
8
|
+
backLinkUrl?: string;
|
|
9
|
+
backLinkForce?: boolean;
|
|
10
|
+
backLinkShowText?: boolean;
|
|
12
11
|
color?: string;
|
|
13
12
|
colorTheme?: string;
|
|
14
13
|
textColor?: string;
|
|
@@ -16,16 +15,24 @@ interface NavLeftProps {
|
|
|
16
15
|
borderColor?: string;
|
|
17
16
|
rippleColor?: string;
|
|
18
17
|
dark?: boolean;
|
|
19
|
-
onBackClick
|
|
20
|
-
onClickBack
|
|
18
|
+
onBackClick?: (event?: any) => void;
|
|
19
|
+
onClickBack?: (event?: any) => void;
|
|
20
|
+
children?: Snippet;
|
|
21
|
+
onclickback?: () => void;
|
|
22
|
+
onbackclick?: () => void;
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
interface NavLeftProps {}
|
|
26
|
+
interface NavLeftProps extends Props {}
|
|
27
|
+
|
|
28
|
+
interface NavLeftEvents extends Record<'',{}>{}
|
|
29
|
+
|
|
23
30
|
|
|
24
31
|
|
|
25
32
|
declare class NavLeft extends SvelteComponent<
|
|
26
|
-
NavLeftProps
|
|
27
|
-
|
|
28
|
-
{
|
|
33
|
+
NavLeftProps,
|
|
34
|
+
NavLeftEvents,
|
|
35
|
+
{ }
|
|
29
36
|
> {}
|
|
30
37
|
|
|
31
38
|
export { NavLeftProps };
|
|
@@ -1,48 +1,32 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { createEventDispatcher } from 'svelte';
|
|
3
2
|
import { colorClasses } from '../shared/mixins.js';
|
|
4
|
-
import { classNames
|
|
5
|
-
import { restProps } from '../shared/rest-props.js';
|
|
6
|
-
import { useTheme } from '../shared/use-theme.js';
|
|
3
|
+
import { classNames } from '../shared/utils.js';
|
|
7
4
|
|
|
8
5
|
import Link from './link.svelte';
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
sliding,
|
|
30
|
-
},
|
|
31
|
-
colorClasses($$props),
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
$: needBackLinkText = backLinkShowText;
|
|
35
|
-
$: if (typeof needBackLinkText === 'undefined') needBackLinkText = theme && !theme.md;
|
|
36
|
-
|
|
37
|
-
$: backLinkText = backLink !== true && needBackLinkText ? backLink : undefined;
|
|
38
|
-
|
|
39
|
-
function onBackClick() {
|
|
40
|
-
emit('clickBack');
|
|
41
|
-
emit('backClick');
|
|
7
|
+
let {
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
backLink,
|
|
11
|
+
backLinkUrl,
|
|
12
|
+
backLinkForce,
|
|
13
|
+
backLinkShowText,
|
|
14
|
+
...restProps
|
|
15
|
+
} = $props();
|
|
16
|
+
|
|
17
|
+
const classes = $derived(classNames(className, 'left', {}, colorClasses(restProps)));
|
|
18
|
+
|
|
19
|
+
const backLinkText = $derived(backLink !== true && backLinkShowText ? backLink : undefined);
|
|
20
|
+
|
|
21
|
+
function onBackClick(event) {
|
|
22
|
+
restProps.onClickBack?.(event);
|
|
23
|
+
restProps.onclickback?.(event);
|
|
24
|
+
restProps.onBackClick?.(event);
|
|
25
|
+
restProps.onbackclick?.(event);
|
|
42
26
|
}
|
|
43
27
|
</script>
|
|
44
28
|
|
|
45
|
-
<div class={classes} {...restProps
|
|
29
|
+
<div class={classes} {...restProps}>
|
|
46
30
|
{#if backLink}
|
|
47
31
|
<Link
|
|
48
32
|
href={backLinkUrl || '#'}
|
|
@@ -51,8 +35,8 @@
|
|
|
51
35
|
force={backLinkForce || undefined}
|
|
52
36
|
class={!backLinkText ? 'icon-only' : undefined}
|
|
53
37
|
text={backLinkText}
|
|
54
|
-
|
|
38
|
+
onclick={onBackClick}
|
|
55
39
|
/>
|
|
56
40
|
{/if}
|
|
57
|
-
|
|
41
|
+
{@render children?.()}
|
|
58
42
|
</div>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { SvelteComponent } from 'svelte';
|
|
2
|
+
import { SvelteComponent, Snippet } from 'svelte';
|
|
3
3
|
import { HTMLAttributes } from 'svelte/elements';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
interface
|
|
7
|
-
sliding ?: boolean;
|
|
6
|
+
interface Props {
|
|
8
7
|
color?: string;
|
|
9
8
|
colorTheme?: string;
|
|
10
9
|
textColor?: string;
|
|
@@ -12,14 +11,20 @@ interface NavRightProps {
|
|
|
12
11
|
borderColor?: string;
|
|
13
12
|
rippleColor?: string;
|
|
14
13
|
dark?: boolean;
|
|
14
|
+
children?: Snippet;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
interface NavRightProps {}
|
|
18
|
+
interface NavRightProps extends Props {}
|
|
19
|
+
|
|
20
|
+
interface NavRightEvents extends Record<'',{}>{}
|
|
21
|
+
|
|
17
22
|
|
|
18
23
|
|
|
19
24
|
declare class NavRight extends SvelteComponent<
|
|
20
|
-
NavRightProps
|
|
21
|
-
|
|
22
|
-
{
|
|
25
|
+
NavRightProps,
|
|
26
|
+
NavRightEvents,
|
|
27
|
+
{ }
|
|
23
28
|
> {}
|
|
24
29
|
|
|
25
30
|
export { NavRightProps };
|
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { colorClasses } from '../shared/mixins.js';
|
|
3
3
|
import { classNames } from '../shared/utils.js';
|
|
4
|
-
import { restProps } from '../shared/rest-props.js';
|
|
5
4
|
|
|
6
|
-
let className =
|
|
7
|
-
export { className as class };
|
|
5
|
+
let { class: className, children, ...restProps } = $props();
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
$: classes = classNames(
|
|
12
|
-
className,
|
|
13
|
-
'right',
|
|
14
|
-
{
|
|
15
|
-
sliding,
|
|
16
|
-
},
|
|
17
|
-
colorClasses($$props),
|
|
18
|
-
);
|
|
7
|
+
const classes = $derived(classNames(className, 'right', {}, colorClasses(restProps)));
|
|
19
8
|
</script>
|
|
20
9
|
|
|
21
|
-
<div class={classes} {...restProps
|
|
22
|
-
|
|
10
|
+
<div class={classes} {...restProps}>
|
|
11
|
+
{@render children?.()}
|
|
23
12
|
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { SvelteComponent } from 'svelte';
|
|
2
|
+
import { SvelteComponent, Snippet } from 'svelte';
|
|
3
3
|
import { HTMLAttributes } from 'svelte/elements';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
interface
|
|
6
|
+
interface Props {
|
|
7
7
|
color?: string;
|
|
8
8
|
colorTheme?: string;
|
|
9
9
|
textColor?: string;
|
|
@@ -11,14 +11,20 @@ interface NavTitleLargeProps {
|
|
|
11
11
|
borderColor?: string;
|
|
12
12
|
rippleColor?: string;
|
|
13
13
|
dark?: boolean;
|
|
14
|
+
children?: Snippet;
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
interface NavTitleLargeProps {}
|
|
18
|
+
interface NavTitleLargeProps extends Props {}
|
|
19
|
+
|
|
20
|
+
interface NavTitleLargeEvents extends Record<'',{}>{}
|
|
21
|
+
|
|
16
22
|
|
|
17
23
|
|
|
18
24
|
declare class NavTitleLarge extends SvelteComponent<
|
|
19
|
-
NavTitleLargeProps
|
|
20
|
-
|
|
21
|
-
{
|
|
25
|
+
NavTitleLargeProps,
|
|
26
|
+
NavTitleLargeEvents,
|
|
27
|
+
{ }
|
|
22
28
|
> {}
|
|
23
29
|
|
|
24
30
|
export { NavTitleLargeProps };
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { colorClasses } from '../shared/mixins.js';
|
|
3
3
|
import { classNames } from '../shared/utils.js';
|
|
4
|
-
import { restProps } from '../shared/rest-props.js';
|
|
5
4
|
|
|
6
|
-
let className =
|
|
7
|
-
export { className as class };
|
|
5
|
+
let { class: className, children, ...restProps } = $props();
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
const classes = $derived(classNames(className, 'title-large', colorClasses(restProps)));
|
|
10
8
|
</script>
|
|
11
9
|
|
|
12
|
-
<div class={classes} {...restProps
|
|
10
|
+
<div class={classes} {...restProps}>
|
|
13
11
|
<div class="title-large-text">
|
|
14
|
-
|
|
12
|
+
{@render children?.()}
|
|
15
13
|
</div>
|
|
16
14
|
</div>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
import { SvelteComponent } from 'svelte';
|
|
2
|
+
import { SvelteComponent, Snippet } from 'svelte';
|
|
3
3
|
import { HTMLAttributes } from 'svelte/elements';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
interface
|
|
7
|
-
title
|
|
8
|
-
subtitle
|
|
9
|
-
sliding ?: boolean;
|
|
6
|
+
interface Props {
|
|
7
|
+
title?: string | Snippet;
|
|
8
|
+
subtitle?: string | Snippet;
|
|
10
9
|
color?: string;
|
|
11
10
|
colorTheme?: string;
|
|
12
11
|
textColor?: string;
|
|
@@ -14,14 +13,20 @@ interface NavTitleProps {
|
|
|
14
13
|
borderColor?: string;
|
|
15
14
|
rippleColor?: string;
|
|
16
15
|
dark?: boolean;
|
|
16
|
+
children?: Snippet;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
interface NavTitleProps {}
|
|
20
|
+
interface NavTitleProps extends Props {}
|
|
21
|
+
|
|
22
|
+
interface NavTitleEvents extends Record<'',{}>{}
|
|
23
|
+
|
|
19
24
|
|
|
20
25
|
|
|
21
26
|
declare class NavTitle extends SvelteComponent<
|
|
22
|
-
NavTitleProps
|
|
23
|
-
|
|
24
|
-
{
|
|
27
|
+
NavTitleProps,
|
|
28
|
+
NavTitleEvents,
|
|
29
|
+
{ }
|
|
25
30
|
> {}
|
|
26
31
|
|
|
27
32
|
export { NavTitleProps };
|
|
@@ -1,27 +1,32 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { colorClasses } from '../shared/mixins.js';
|
|
3
|
-
import { classNames
|
|
4
|
-
import { restProps } from '../shared/rest-props.js';
|
|
3
|
+
import { classNames } from '../shared/utils.js';
|
|
5
4
|
|
|
6
|
-
let
|
|
7
|
-
|
|
5
|
+
let {
|
|
6
|
+
class: className,
|
|
7
|
+
title = undefined,
|
|
8
|
+
subtitle = undefined,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
} = $props();
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
export let subtitle = undefined;
|
|
11
|
-
export let sliding = undefined;
|
|
12
|
-
|
|
13
|
-
$: classes = classNames(
|
|
14
|
-
className,
|
|
15
|
-
'title',
|
|
16
|
-
{
|
|
17
|
-
sliding,
|
|
18
|
-
},
|
|
19
|
-
colorClasses($$props),
|
|
20
|
-
);
|
|
13
|
+
const classes = $derived(classNames(className, 'title', {}, colorClasses(restProps)));
|
|
21
14
|
</script>
|
|
22
15
|
|
|
23
|
-
<div class={classes} {...restProps
|
|
24
|
-
{#if typeof title
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
<div class={classes} {...restProps}>
|
|
17
|
+
{#if typeof title === 'function'}
|
|
18
|
+
{@render title?.()}
|
|
19
|
+
{:else}
|
|
20
|
+
{title}
|
|
21
|
+
{/if}
|
|
22
|
+
{#if typeof subtitle !== 'undefined'}
|
|
23
|
+
<span class="subtitle">
|
|
24
|
+
{#if typeof subtitle === 'function'}
|
|
25
|
+
{@render subtitle?.()}
|
|
26
|
+
{:else}
|
|
27
|
+
{subtitle}
|
|
28
|
+
{/if}
|
|
29
|
+
</span>
|
|
30
|
+
{/if}
|
|
31
|
+
{@render children?.()}
|
|
27
32
|
</div>
|
package/components/navbar.d.ts
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
import { SvelteComponent } from 'svelte';
|
|
2
|
+
import { SvelteComponent, Snippet } from 'svelte';
|
|
3
3
|
import { HTMLAttributes } from 'svelte/elements';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
interface
|
|
7
|
-
backLink
|
|
8
|
-
backLinkUrl
|
|
9
|
-
backLinkForce
|
|
10
|
-
backLinkShowText
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
titleLarge ?: string;
|
|
6
|
+
interface Props {
|
|
7
|
+
backLink?: boolean | string;
|
|
8
|
+
backLinkUrl?: string;
|
|
9
|
+
backLinkForce?: boolean;
|
|
10
|
+
backLinkShowText?: boolean;
|
|
11
|
+
title?: string | Snippet;
|
|
12
|
+
subtitle?: string | Snippet;
|
|
13
|
+
hidden?: boolean;
|
|
14
|
+
outline?: boolean;
|
|
15
|
+
innerClass?: string;
|
|
16
|
+
innerClassName?: string;
|
|
17
|
+
large?: boolean;
|
|
18
|
+
largeTransparent?: boolean;
|
|
19
|
+
transparent?: boolean;
|
|
20
|
+
titleLarge?: string;
|
|
22
21
|
color?: string;
|
|
23
22
|
colorTheme?: string;
|
|
24
23
|
textColor?: string;
|
|
@@ -26,22 +25,42 @@ interface NavbarProps {
|
|
|
26
25
|
borderColor?: string;
|
|
27
26
|
rippleColor?: string;
|
|
28
27
|
dark?: boolean;
|
|
29
|
-
onNavbarHide
|
|
30
|
-
onNavbarShow
|
|
31
|
-
onNavbarExpand
|
|
32
|
-
onNavbarCollapse
|
|
33
|
-
onNavbarTransparentShow
|
|
34
|
-
onNavbarTransparentHide
|
|
35
|
-
onBackClick
|
|
36
|
-
onClickBack
|
|
28
|
+
onNavbarHide?: (...args: any[]) => void;
|
|
29
|
+
onNavbarShow?: (...args: any[]) => void;
|
|
30
|
+
onNavbarExpand?: (...args: any[]) => void;
|
|
31
|
+
onNavbarCollapse?: (...args: any[]) => void;
|
|
32
|
+
onNavbarTransparentShow?: (...args: any[]) => void;
|
|
33
|
+
onNavbarTransparentHide?: (...args: any[]) => void;
|
|
34
|
+
onBackClick?: (event?: any) => void;
|
|
35
|
+
onClickBack?: (event?: any) => void;
|
|
36
|
+
beforeInner?: Snippet;
|
|
37
|
+
navLeft?: Snippet;
|
|
38
|
+
left?: Snippet;
|
|
39
|
+
navRight?: Snippet;
|
|
40
|
+
right?: Snippet;
|
|
41
|
+
largeTitle?: Snippet;
|
|
42
|
+
children?: Snippet;
|
|
43
|
+
afterInner?: Snippet;
|
|
44
|
+
onnavbarhide?: () => void;
|
|
45
|
+
onnavbarshow?: () => void;
|
|
46
|
+
onnavbartransparentshow?: () => void;
|
|
47
|
+
onnavbartransparenthide?: () => void;
|
|
48
|
+
onnavbarexpand?: () => void;
|
|
49
|
+
onnavbarcollapse?: () => void;
|
|
50
|
+
onclickback?: () => void;
|
|
37
51
|
}
|
|
38
52
|
|
|
53
|
+
interface NavbarProps {}
|
|
54
|
+
interface NavbarProps extends Props {}
|
|
55
|
+
|
|
56
|
+
interface NavbarEvents extends Record<'',{}>{}
|
|
57
|
+
|
|
39
58
|
|
|
40
59
|
|
|
41
60
|
declare class Navbar extends SvelteComponent<
|
|
42
|
-
NavbarProps
|
|
43
|
-
|
|
44
|
-
{
|
|
61
|
+
NavbarProps,
|
|
62
|
+
NavbarEvents,
|
|
63
|
+
{ }
|
|
45
64
|
> {}
|
|
46
65
|
|
|
47
66
|
export { NavbarProps };
|