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
|
@@ -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 AccordionContentProps {
|
|
|
11
11
|
borderColor?: string;
|
|
12
12
|
rippleColor?: string;
|
|
13
13
|
dark?: boolean;
|
|
14
|
+
children?: Snippet;
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
interface AccordionContentProps {}
|
|
18
|
+
interface AccordionContentProps extends Props {}
|
|
19
|
+
|
|
20
|
+
interface AccordionContentEvents extends Record<'',{}>{}
|
|
21
|
+
|
|
16
22
|
|
|
17
23
|
|
|
18
24
|
declare class AccordionContent extends SvelteComponent<
|
|
19
|
-
AccordionContentProps
|
|
20
|
-
|
|
21
|
-
{
|
|
25
|
+
AccordionContentProps,
|
|
26
|
+
AccordionContentEvents,
|
|
27
|
+
{ }
|
|
22
28
|
> {}
|
|
23
29
|
|
|
24
30
|
export { AccordionContentProps };
|
|
@@ -1,14 +1,16 @@
|
|
|
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
|
|
7
|
-
|
|
5
|
+
let {
|
|
6
|
+
class: className,
|
|
7
|
+
children,
|
|
8
|
+
...restProps
|
|
9
|
+
} = $props();
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
const classes = $derived(classNames(className, 'accordion-item-content', colorClasses(restProps)));
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
|
-
<div class={classes} {...restProps
|
|
13
|
-
|
|
14
|
+
<div class={classes} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
14
16
|
</div>
|
|
@@ -1,16 +1,16 @@
|
|
|
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
|
opened?: boolean;
|
|
8
|
-
onAccordionBeforeOpen
|
|
9
|
-
onAccordionOpen
|
|
10
|
-
onAccordionOpened
|
|
11
|
-
onAccordionBeforeClose
|
|
12
|
-
onAccordionClose
|
|
13
|
-
onAccordionClosed
|
|
8
|
+
onAccordionBeforeOpen?: (prevent?: any) => void;
|
|
9
|
+
onAccordionOpen?: (...args: any[]) => void;
|
|
10
|
+
onAccordionOpened?: (...args: any[]) => void;
|
|
11
|
+
onAccordionBeforeClose?: (prevent?: any) => void;
|
|
12
|
+
onAccordionClose?: (...args: any[]) => void;
|
|
13
|
+
onAccordionClosed?: (...args: any[]) => void;
|
|
14
14
|
color?: string;
|
|
15
15
|
colorTheme?: string;
|
|
16
16
|
textColor?: string;
|
|
@@ -18,14 +18,26 @@ interface AccordionItemProps {
|
|
|
18
18
|
borderColor?: string;
|
|
19
19
|
rippleColor?: string;
|
|
20
20
|
dark?: boolean;
|
|
21
|
+
children?: Snippet;
|
|
22
|
+
onaccordionbeforeopen?: () => void;
|
|
23
|
+
onaccordionopen?: () => void;
|
|
24
|
+
onaccordionopened?: () => void;
|
|
25
|
+
onaccordionbeforeclose?: () => void;
|
|
26
|
+
onaccordionclose?: () => void;
|
|
27
|
+
onaccordionclosed?: () => void;
|
|
21
28
|
}
|
|
22
29
|
|
|
30
|
+
interface AccordionItemProps {}
|
|
31
|
+
interface AccordionItemProps extends Props {}
|
|
32
|
+
|
|
33
|
+
interface AccordionItemEvents extends Record<'',{}>{}
|
|
34
|
+
|
|
23
35
|
|
|
24
36
|
|
|
25
37
|
declare class AccordionItem extends SvelteComponent<
|
|
26
|
-
AccordionItemProps
|
|
27
|
-
|
|
28
|
-
{
|
|
38
|
+
AccordionItemProps,
|
|
39
|
+
AccordionItemEvents,
|
|
40
|
+
{ }
|
|
29
41
|
> {}
|
|
30
42
|
|
|
31
43
|
export { AccordionItemProps };
|
|
@@ -1,51 +1,53 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import {
|
|
2
|
+
import { onMount, onDestroy } from 'svelte';
|
|
3
3
|
import { colorClasses } from '../shared/mixins.js';
|
|
4
|
-
import { classNames
|
|
5
|
-
import { restProps } from '../shared/rest-props.js';
|
|
4
|
+
import { classNames } from '../shared/utils.js';
|
|
6
5
|
import { app, f7ready } from '../shared/f7.js';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
let { class: className, opened = false, children, ...restProps } = $props();
|
|
9
8
|
|
|
10
|
-
let
|
|
11
|
-
export { className as class };
|
|
9
|
+
let el = $state(null);
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
colorClasses($$props),
|
|
11
|
+
const classes = $derived(
|
|
12
|
+
classNames(
|
|
13
|
+
className,
|
|
14
|
+
'accordion-item',
|
|
15
|
+
{
|
|
16
|
+
'accordion-item-opened': opened,
|
|
17
|
+
},
|
|
18
|
+
colorClasses(restProps),
|
|
19
|
+
),
|
|
24
20
|
);
|
|
25
21
|
|
|
26
22
|
function onBeforeOpen(accEl, prevent) {
|
|
27
23
|
if (accEl !== el) return;
|
|
28
|
-
|
|
24
|
+
restProps.onaccordionbeforeopen?.(prevent);
|
|
25
|
+
restProps.onAccordionBeforeOpen?.(prevent);
|
|
29
26
|
}
|
|
30
27
|
function onOpen(accEl) {
|
|
31
28
|
if (accEl !== el) return;
|
|
32
|
-
|
|
29
|
+
restProps.onaccordionopen?.();
|
|
30
|
+
restProps.onAccordionOpen?.();
|
|
33
31
|
}
|
|
34
32
|
function onOpened(accEl) {
|
|
35
33
|
if (accEl !== el) return;
|
|
36
|
-
|
|
34
|
+
restProps.onaccordionopened?.();
|
|
35
|
+
restProps.onAccordionOpened?.();
|
|
37
36
|
}
|
|
38
37
|
function onBeforeClose(accEl, prevent) {
|
|
39
38
|
if (accEl !== el) return;
|
|
40
|
-
|
|
39
|
+
restProps.onaccordionbeforeclose?.(prevent);
|
|
40
|
+
restProps.onAccordionBeforeClose?.(prevent);
|
|
41
41
|
}
|
|
42
42
|
function onClose(accEl) {
|
|
43
43
|
if (accEl !== el) return;
|
|
44
|
-
|
|
44
|
+
restProps.onaccordionclose?.();
|
|
45
|
+
restProps.onAccordionClose?.();
|
|
45
46
|
}
|
|
46
47
|
function onClosed(accEl) {
|
|
47
48
|
if (accEl !== el) return;
|
|
48
|
-
|
|
49
|
+
restProps.onaccordionclosed?.();
|
|
50
|
+
restProps.onAccordionClosed?.();
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
onMount(() => {
|
|
@@ -70,6 +72,6 @@
|
|
|
70
72
|
});
|
|
71
73
|
</script>
|
|
72
74
|
|
|
73
|
-
<div bind:this={el} class={classes} {...restProps
|
|
74
|
-
|
|
75
|
+
<div bind:this={el} class={classes} {...restProps}>
|
|
76
|
+
{@render children?.()}
|
|
75
77
|
</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 AccordionToggleProps {
|
|
|
11
11
|
borderColor?: string;
|
|
12
12
|
rippleColor?: string;
|
|
13
13
|
dark?: boolean;
|
|
14
|
+
children?: Snippet;
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
interface AccordionToggleProps {}
|
|
18
|
+
interface AccordionToggleProps extends Props {}
|
|
19
|
+
|
|
20
|
+
interface AccordionToggleEvents extends Record<'',{}>{}
|
|
21
|
+
|
|
16
22
|
|
|
17
23
|
|
|
18
24
|
declare class AccordionToggle extends SvelteComponent<
|
|
19
|
-
AccordionToggleProps
|
|
20
|
-
|
|
21
|
-
{
|
|
25
|
+
AccordionToggleProps,
|
|
26
|
+
AccordionToggleEvents,
|
|
27
|
+
{ }
|
|
22
28
|
> {}
|
|
23
29
|
|
|
24
30
|
export { AccordionToggleProps };
|
|
@@ -1,14 +1,16 @@
|
|
|
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
|
|
7
|
-
|
|
5
|
+
let {
|
|
6
|
+
class: className,
|
|
7
|
+
children,
|
|
8
|
+
...restProps
|
|
9
|
+
} = $props();
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
const classes = $derived(classNames(className, 'accordion-item-toggle', colorClasses(restProps)));
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
|
-
<div class={classes} {...restProps
|
|
13
|
-
|
|
14
|
+
<div class={classes} {...restProps}>
|
|
15
|
+
{@render children?.()}
|
|
14
16
|
</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
|
accordionOpposite?: boolean;
|
|
8
8
|
color?: string;
|
|
9
9
|
colorTheme?: string;
|
|
@@ -12,14 +12,20 @@ interface AccordionProps {
|
|
|
12
12
|
borderColor?: string;
|
|
13
13
|
rippleColor?: string;
|
|
14
14
|
dark?: boolean;
|
|
15
|
+
children?: Snippet;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
interface AccordionProps {}
|
|
19
|
+
interface AccordionProps extends Props {}
|
|
20
|
+
|
|
21
|
+
interface AccordionEvents extends Record<'',{}>{}
|
|
22
|
+
|
|
17
23
|
|
|
18
24
|
|
|
19
25
|
declare class Accordion extends SvelteComponent<
|
|
20
|
-
AccordionProps
|
|
21
|
-
|
|
22
|
-
{
|
|
26
|
+
AccordionProps,
|
|
27
|
+
AccordionEvents,
|
|
28
|
+
{ }
|
|
23
29
|
> {}
|
|
24
30
|
|
|
25
31
|
export { AccordionProps };
|
|
@@ -1,21 +1,22 @@
|
|
|
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
|
|
7
|
-
|
|
5
|
+
let {
|
|
6
|
+
class: className,
|
|
7
|
+
accordionOpposite = false,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
} = $props();
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
$: classes = classNames(
|
|
12
|
+
const classes = $derived(classNames(
|
|
12
13
|
className,
|
|
13
14
|
'accordion-list',
|
|
14
15
|
accordionOpposite && 'accordion-opposite',
|
|
15
|
-
colorClasses(
|
|
16
|
-
);
|
|
16
|
+
colorClasses(restProps),
|
|
17
|
+
));
|
|
17
18
|
</script>
|
|
18
19
|
|
|
19
|
-
<div class={classes} {...restProps
|
|
20
|
-
|
|
20
|
+
<div class={classes} {...restProps}>
|
|
21
|
+
{@render children?.()}
|
|
21
22
|
</div>
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
strong?: boolean;
|
|
8
8
|
close?: boolean;
|
|
9
|
-
onClick
|
|
9
|
+
onClick?: (event?: any) => void;
|
|
10
10
|
color?: string;
|
|
11
11
|
colorTheme?: string;
|
|
12
12
|
textColor?: string;
|
|
@@ -14,14 +14,22 @@ interface ActionsButtonProps {
|
|
|
14
14
|
borderColor?: string;
|
|
15
15
|
rippleColor?: string;
|
|
16
16
|
dark?: boolean;
|
|
17
|
+
media?: Snippet;
|
|
18
|
+
children?: Snippet;
|
|
19
|
+
onclick?: () => void;
|
|
17
20
|
}
|
|
18
21
|
|
|
22
|
+
interface ActionsButtonProps {}
|
|
23
|
+
interface ActionsButtonProps extends Props {}
|
|
24
|
+
|
|
25
|
+
interface ActionsButtonEvents extends Record<'',{}>{}
|
|
26
|
+
|
|
19
27
|
|
|
20
28
|
|
|
21
29
|
declare class ActionsButton extends SvelteComponent<
|
|
22
|
-
ActionsButtonProps
|
|
23
|
-
|
|
24
|
-
{
|
|
30
|
+
ActionsButtonProps,
|
|
31
|
+
ActionsButtonEvents,
|
|
32
|
+
{ }
|
|
25
33
|
> {}
|
|
26
34
|
|
|
27
35
|
export { ActionsButtonProps };
|
|
@@ -1,49 +1,51 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { createEventDispatcher } from 'svelte';
|
|
3
2
|
|
|
4
3
|
import { colorClasses } from '../shared/mixins.js';
|
|
5
|
-
import { classNames
|
|
6
|
-
import { restProps } from '../shared/rest-props.js';
|
|
4
|
+
import { classNames } from '../shared/utils.js';
|
|
7
5
|
import { app } from '../shared/f7.js';
|
|
8
6
|
|
|
9
|
-
const emit = createEmitter(createEventDispatcher, $$props);
|
|
10
7
|
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
let {
|
|
9
|
+
class: className,
|
|
10
|
+
strong = false,
|
|
11
|
+
close = true,
|
|
12
|
+
children,
|
|
13
|
+
media,
|
|
14
|
+
...restProps
|
|
15
|
+
} = $props();
|
|
16
16
|
|
|
17
17
|
let el;
|
|
18
18
|
|
|
19
|
-
// eslint-disable-next-line
|
|
20
|
-
$: hasMediaSlots = $$slots.media;
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
const classes = $derived(classNames(
|
|
23
21
|
className,
|
|
24
22
|
{
|
|
25
23
|
'actions-button': true,
|
|
26
24
|
'actions-button-strong': strong,
|
|
27
25
|
},
|
|
28
|
-
colorClasses(
|
|
29
|
-
);
|
|
26
|
+
colorClasses(restProps),
|
|
27
|
+
));
|
|
30
28
|
|
|
31
29
|
function onClick() {
|
|
32
30
|
if (close && app.f7) {
|
|
33
31
|
const dom7 = app.f7.$;
|
|
34
32
|
app.f7.actions.close(dom7(el).parents('.actions-modal'));
|
|
35
33
|
}
|
|
36
|
-
|
|
34
|
+
restProps.onclick?.();
|
|
37
35
|
}
|
|
38
36
|
</script>
|
|
39
37
|
|
|
40
|
-
<div class={classes}
|
|
41
|
-
{#if
|
|
38
|
+
<div class={classes} onclick={onClick} bind:this={el} {...restProps}>
|
|
39
|
+
{#if typeof media !== 'undefined'}
|
|
42
40
|
<div class="actions-button-media">
|
|
43
|
-
|
|
41
|
+
{#if typeof media === 'function'}
|
|
42
|
+
{@render media?.()}
|
|
43
|
+
{:else}
|
|
44
|
+
{media}
|
|
45
|
+
{/if}
|
|
44
46
|
</div>
|
|
45
47
|
{/if}
|
|
46
48
|
<div class="actions-button-text">
|
|
47
|
-
|
|
49
|
+
{@render children?.()}
|
|
48
50
|
</div>
|
|
49
51
|
</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 ActionsGroupProps {
|
|
|
11
11
|
borderColor?: string;
|
|
12
12
|
rippleColor?: string;
|
|
13
13
|
dark?: boolean;
|
|
14
|
+
children?: Snippet;
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
interface ActionsGroupProps {}
|
|
18
|
+
interface ActionsGroupProps extends Props {}
|
|
19
|
+
|
|
20
|
+
interface ActionsGroupEvents extends Record<'',{}>{}
|
|
21
|
+
|
|
16
22
|
|
|
17
23
|
|
|
18
24
|
declare class ActionsGroup extends SvelteComponent<
|
|
19
|
-
ActionsGroupProps
|
|
20
|
-
|
|
21
|
-
{
|
|
25
|
+
ActionsGroupProps,
|
|
26
|
+
ActionsGroupEvents,
|
|
27
|
+
{ }
|
|
22
28
|
> {}
|
|
23
29
|
|
|
24
30
|
export { ActionsGroupProps };
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { colorClasses } from '../shared/mixins.js';
|
|
3
3
|
import { classNames } from '../shared/utils.js';
|
|
4
|
-
|
|
4
|
+
let { class: className, children, ...restProps } = $props();
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
export { className as class };
|
|
8
|
-
|
|
9
|
-
$: classes = classNames(className, 'actions-group', colorClasses($$props));
|
|
6
|
+
const classes = $derived(classNames(className, 'actions-group', colorClasses(restProps)));
|
|
10
7
|
</script>
|
|
11
8
|
|
|
12
|
-
<div class={classes} {...restProps
|
|
13
|
-
|
|
9
|
+
<div class={classes} {...restProps}>
|
|
10
|
+
{@render children?.()}
|
|
14
11
|
</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
|
strong?: boolean;
|
|
8
8
|
onClick?: (event?: any) => void;
|
|
9
9
|
color?: string;
|
|
@@ -13,14 +13,20 @@ interface ActionsLabelProps {
|
|
|
13
13
|
borderColor?: string;
|
|
14
14
|
rippleColor?: string;
|
|
15
15
|
dark?: boolean;
|
|
16
|
+
children?: Snippet;
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
interface ActionsLabelProps {}
|
|
20
|
+
interface ActionsLabelProps extends Props {}
|
|
21
|
+
|
|
22
|
+
interface ActionsLabelEvents extends Record<'',{}>{}
|
|
23
|
+
|
|
18
24
|
|
|
19
25
|
|
|
20
26
|
declare class ActionsLabel extends SvelteComponent<
|
|
21
|
-
ActionsLabelProps
|
|
22
|
-
|
|
23
|
-
{
|
|
27
|
+
ActionsLabelProps,
|
|
28
|
+
ActionsLabelEvents,
|
|
29
|
+
{ }
|
|
24
30
|
> {}
|
|
25
31
|
|
|
26
32
|
export { ActionsLabelProps };
|
|
@@ -1,31 +1,21 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { createEventDispatcher } from 'svelte';
|
|
3
|
-
|
|
4
2
|
import { colorClasses } from '../shared/mixins.js';
|
|
5
|
-
import { classNames
|
|
6
|
-
import { restProps } from '../shared/rest-props.js';
|
|
7
|
-
|
|
8
|
-
const emit = createEmitter(createEventDispatcher, $$props);
|
|
3
|
+
import { classNames } from '../shared/utils.js';
|
|
9
4
|
|
|
10
|
-
let className =
|
|
11
|
-
export { className as class };
|
|
5
|
+
let { class: className, strong = false, children, ...restProps } = $props();
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
const classes = $derived(
|
|
8
|
+
classNames(
|
|
9
|
+
className,
|
|
10
|
+
'actions-label',
|
|
11
|
+
{
|
|
12
|
+
'actions-button-strong': strong,
|
|
13
|
+
},
|
|
14
|
+
colorClasses(restProps),
|
|
15
|
+
),
|
|
22
16
|
);
|
|
23
|
-
|
|
24
|
-
function onClick() {
|
|
25
|
-
emit('click');
|
|
26
|
-
}
|
|
27
17
|
</script>
|
|
28
18
|
|
|
29
|
-
<div class={classes}
|
|
30
|
-
|
|
19
|
+
<div class={classes} {...restProps}>
|
|
20
|
+
{@render children?.()}
|
|
31
21
|
</div>
|
package/components/actions.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 { Actions } from 'framework7/types';
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
interface
|
|
9
|
-
opened
|
|
10
|
-
animate
|
|
11
|
-
grid
|
|
12
|
-
convertToPopover
|
|
13
|
-
forceToPopover
|
|
14
|
-
target
|
|
15
|
-
backdrop
|
|
16
|
-
backdropEl
|
|
17
|
-
closeByBackdropClick
|
|
18
|
-
closeByOutsideClick
|
|
19
|
-
closeOnEscape
|
|
20
|
-
onActionsOpen
|
|
21
|
-
onActionsOpened
|
|
22
|
-
onActionsClose
|
|
23
|
-
onActionsClosed
|
|
24
|
-
containerEl
|
|
8
|
+
interface Props {
|
|
9
|
+
opened?: boolean;
|
|
10
|
+
animate?: boolean;
|
|
11
|
+
grid?: boolean;
|
|
12
|
+
convertToPopover?: boolean;
|
|
13
|
+
forceToPopover?: boolean;
|
|
14
|
+
target?: string | object;
|
|
15
|
+
backdrop?: boolean;
|
|
16
|
+
backdropEl?: string | object;
|
|
17
|
+
closeByBackdropClick?: boolean;
|
|
18
|
+
closeByOutsideClick?: boolean;
|
|
19
|
+
closeOnEscape?: boolean;
|
|
20
|
+
onActionsOpen?: (instance?: Actions.Actions) => void;
|
|
21
|
+
onActionsOpened?: (instance?: Actions.Actions) => void;
|
|
22
|
+
onActionsClose?: (instance?: Actions.Actions) => void;
|
|
23
|
+
onActionsClosed?: (instance?: Actions.Actions) => void;
|
|
24
|
+
containerEl?: string | object;
|
|
25
25
|
color?: string;
|
|
26
26
|
colorTheme?: string;
|
|
27
27
|
textColor?: string;
|
|
@@ -29,14 +29,24 @@ interface ActionsProps {
|
|
|
29
29
|
borderColor?: string;
|
|
30
30
|
rippleColor?: string;
|
|
31
31
|
dark?: boolean;
|
|
32
|
+
children?: Snippet;
|
|
33
|
+
onactionsopen?: () => void;
|
|
34
|
+
onactionsopened?: () => void;
|
|
35
|
+
onactionsclose?: () => void;
|
|
36
|
+
onactionsclosed?: () => void;
|
|
32
37
|
}
|
|
33
38
|
|
|
39
|
+
interface ActionsProps {}
|
|
40
|
+
interface ActionsProps extends Props {}
|
|
41
|
+
|
|
42
|
+
interface ActionsEvents extends Record<'',{}>{}
|
|
43
|
+
|
|
34
44
|
|
|
35
45
|
|
|
36
46
|
declare class Actions extends SvelteComponent<
|
|
37
|
-
ActionsProps
|
|
38
|
-
|
|
39
|
-
{
|
|
47
|
+
ActionsProps,
|
|
48
|
+
ActionsEvents,
|
|
49
|
+
{ }
|
|
40
50
|
> {}
|
|
41
51
|
|
|
42
52
|
export { ActionsProps };
|