m3-svelte 3.6.1 → 4.0.0-beta.0
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/package/buttons/Button.svelte +142 -78
- package/package/buttons/Button.svelte.d.ts +17 -34
- package/package/buttons/ConnectedButtons.svelte +26 -0
- package/package/buttons/ConnectedButtons.svelte.d.ts +8 -0
- package/package/buttons/FAB.svelte +30 -15
- package/package/buttons/FAB.svelte.d.ts +14 -25
- package/package/containers/BottomSheet.svelte +33 -27
- package/package/containers/BottomSheet.svelte.d.ts +7 -21
- package/package/containers/Card.svelte +45 -14
- package/package/containers/Card.svelte.d.ts +10 -30
- package/package/containers/Dialog.svelte +46 -32
- package/package/containers/Dialog.svelte.d.ts +9 -34
- package/package/containers/ListItem.svelte +78 -14
- package/package/containers/ListItem.svelte.d.ts +14 -25
- package/package/containers/Menu.svelte +6 -3
- package/package/containers/Menu.svelte.d.ts +6 -28
- package/package/containers/MenuItem.svelte +15 -5
- package/package/containers/MenuItem.svelte.d.ts +7 -29
- package/package/containers/Snackbar.svelte +35 -37
- package/package/containers/Snackbar.svelte.d.ts +7 -22
- package/package/containers/SnackbarItem.svelte +6 -6
- package/package/containers/SnackbarItem.svelte.d.ts +6 -29
- package/package/containers/StandardSideSheet.svelte +14 -8
- package/package/containers/StandardSideSheet.svelte.d.ts +7 -30
- package/package/forms/Checkbox.svelte +19 -4
- package/package/forms/Checkbox.svelte.d.ts +6 -29
- package/package/forms/Chip.svelte +41 -29
- package/package/forms/Chip.svelte.d.ts +18 -41
- package/package/forms/CircularProgress.svelte +4 -6
- package/package/forms/CircularProgress.svelte.d.ts +4 -20
- package/package/forms/CircularProgressIndeterminate.svelte +3 -4
- package/package/forms/CircularProgressIndeterminate.svelte.d.ts +2 -20
- package/package/forms/DatePickerDocked.svelte +52 -35
- package/package/forms/DatePickerDocked.svelte.d.ts +6 -22
- package/package/forms/LinearProgress.svelte +10 -5
- package/package/forms/LinearProgress.svelte.d.ts +4 -20
- package/package/forms/LinearProgressIndeterminate.svelte +4 -3
- package/package/forms/LinearProgressIndeterminate.svelte.d.ts +2 -20
- package/package/forms/RadioAnim1.svelte +10 -4
- package/package/forms/RadioAnim1.svelte.d.ts +6 -29
- package/package/forms/RadioAnim2.svelte +10 -4
- package/package/forms/RadioAnim2.svelte.d.ts +6 -29
- package/package/forms/RadioAnim3.svelte +10 -4
- package/package/forms/RadioAnim3.svelte.d.ts +6 -29
- package/package/forms/Slider.svelte +32 -26
- package/package/forms/Slider.svelte.d.ts +5 -21
- package/package/forms/SliderTicks.svelte +40 -33
- package/package/forms/SliderTicks.svelte.d.ts +5 -21
- package/package/forms/Switch.svelte +23 -21
- package/package/forms/Switch.svelte.d.ts +5 -22
- package/package/forms/TextField.svelte +36 -19
- package/package/forms/TextField.svelte.d.ts +14 -27
- package/package/forms/TextFieldMultiline.svelte +21 -21
- package/package/forms/TextFieldMultiline.svelte.d.ts +6 -23
- package/package/forms/TextFieldOutlined.svelte +36 -18
- package/package/forms/TextFieldOutlined.svelte.d.ts +14 -26
- package/package/forms/TextFieldOutlinedMultiline.svelte +21 -21
- package/package/forms/TextFieldOutlinedMultiline.svelte.d.ts +6 -23
- package/package/forms/_picker/Actions.svelte +16 -18
- package/package/forms/_picker/Actions.svelte.d.ts +7 -22
- package/package/forms/_picker/CalendarPicker.svelte +14 -4
- package/package/forms/_picker/CalendarPicker.svelte.d.ts +4 -18
- package/package/forms/_picker/FocusPicker.svelte +8 -9
- package/package/forms/_picker/FocusPicker.svelte.d.ts +5 -21
- package/package/forms/_picker/Header.svelte +20 -9
- package/package/forms/_picker/Header.svelte.d.ts +4 -18
- package/package/forms/_picker/Item.svelte +15 -6
- package/package/forms/_picker/Item.svelte.d.ts +8 -23
- package/package/index.d.ts +3 -9
- package/package/index.js +1 -8
- package/package/misc/Layer.svelte +7 -3
- package/package/misc/Layer.svelte.d.ts +5 -17
- package/package/misc/StyleFromScheme.svelte +6 -2
- package/package/misc/StyleFromScheme.svelte.d.ts +5 -19
- package/package/misc/_icon.svelte +12 -5
- package/package/misc/_icon.svelte.d.ts +5 -19
- package/package/misc/_ripple.svelte +11 -3
- package/package/misc/_ripple.svelte.d.ts +5 -17
- package/package/misc/_ripplesimple.svelte +4 -0
- package/package/misc/_ripplesimple.svelte.d.ts +5 -25
- package/package/misc/_styling.svelte +7 -3
- package/package/misc/_styling.svelte.d.ts +5 -19
- package/package/misc/animation.js +1 -5
- package/package/misc/easing.js +1 -28
- package/package/misc/styles.css +135 -107
- package/package/misc/utils.d.ts +1 -0
- package/package/misc/utils.js +5 -0
- package/package/nav/NavDrawer.svelte +9 -5
- package/package/nav/NavDrawer.svelte.d.ts +6 -30
- package/package/nav/NavDrawerButton.svelte +22 -12
- package/package/nav/NavDrawerButton.svelte.d.ts +8 -31
- package/package/nav/NavDrawerLink.svelte +21 -12
- package/package/nav/NavDrawerLink.svelte.d.ts +8 -30
- package/package/nav/NavList.svelte +13 -9
- package/package/nav/NavList.svelte.d.ts +7 -31
- package/package/nav/NavListButton.svelte +26 -22
- package/package/nav/NavListButton.svelte.d.ts +9 -33
- package/package/nav/NavListLink.svelte +26 -23
- package/package/nav/NavListLink.svelte.d.ts +9 -32
- package/package/nav/Tabs.svelte +20 -19
- package/package/nav/Tabs.svelte.d.ts +5 -22
- package/package/nav/TabsLink.svelte +22 -18
- package/package/nav/TabsLink.svelte.d.ts +5 -22
- package/package/nav/VariableTabs.svelte +25 -20
- package/package/nav/VariableTabs.svelte.d.ts +5 -22
- package/package/nav/VariableTabsLink.svelte +29 -22
- package/package/nav/VariableTabsLink.svelte.d.ts +5 -22
- package/package/utils/ChipChooser.svelte +10 -4
- package/package/utils/ChipChooser.svelte.d.ts +5 -19
- package/package/utils/DateField.svelte +24 -18
- package/package/utils/DateField.svelte.d.ts +4 -19
- package/package/utils/Divider.svelte +5 -1
- package/package/utils/Divider.svelte.d.ts +4 -18
- package/package.json +44 -43
- package/package/buttons/ButtonLink.svelte +0 -116
- package/package/buttons/ButtonLink.svelte.d.ts +0 -34
- package/package/buttons/SegmentedButtonContainer.svelte +0 -27
- package/package/buttons/SegmentedButtonContainer.svelte.d.ts +0 -31
- package/package/buttons/SegmentedButtonItem.svelte +0 -119
- package/package/buttons/SegmentedButtonItem.svelte.d.ts +0 -34
- package/package/containers/CardClickable.svelte +0 -78
- package/package/containers/CardClickable.svelte.d.ts +0 -34
- package/package/containers/ListItemButton.svelte +0 -86
- package/package/containers/ListItemButton.svelte.d.ts +0 -31
- package/package/containers/ListItemLabel.svelte +0 -82
- package/package/containers/ListItemLabel.svelte.d.ts +0 -29
- package/package/containers/SnackbarAnim.svelte +0 -127
- package/package/containers/SnackbarAnim.svelte.d.ts +0 -33
- package/package/forms/CheckboxAnim.svelte +0 -116
- package/package/forms/CheckboxAnim.svelte.d.ts +0 -31
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
4
|
+
import type { IconifyIcon } from "@iconify/types";
|
|
2
5
|
import Icon from "../misc/_icon.svelte";
|
|
3
6
|
import Layer from "../misc/Layer.svelte";
|
|
4
|
-
import type { IconifyIcon } from "@iconify/types";
|
|
5
|
-
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
let {
|
|
9
|
+
selected,
|
|
10
|
+
icon,
|
|
11
|
+
children,
|
|
12
|
+
click,
|
|
13
|
+
...extra
|
|
14
|
+
}: {
|
|
15
|
+
selected: boolean;
|
|
16
|
+
icon: IconifyIcon;
|
|
17
|
+
children: Snippet;
|
|
18
|
+
click: () => void;
|
|
19
|
+
} & HTMLButtonAttributes = $props();
|
|
10
20
|
</script>
|
|
11
21
|
|
|
12
|
-
<button class="destination" disabled={selected}
|
|
22
|
+
<button class="destination" disabled={selected} onclick={click} {...extra}>
|
|
13
23
|
<Layer />
|
|
14
24
|
<Icon {icon} />
|
|
15
|
-
<span class="m3-font-label-large"
|
|
25
|
+
<span class="m3-font-label-large">{@render children()}</span>
|
|
16
26
|
</button>
|
|
17
27
|
|
|
18
28
|
<style>
|
|
19
29
|
.destination {
|
|
20
|
-
height: 3.5rem;
|
|
21
|
-
border: none;
|
|
22
|
-
border-radius: 1.75rem;
|
|
23
|
-
padding: 0 1.5rem 0 1rem;
|
|
24
|
-
|
|
25
30
|
display: flex;
|
|
26
31
|
align-items: center;
|
|
27
32
|
gap: 0.75rem;
|
|
28
33
|
position: relative;
|
|
29
34
|
overflow: hidden;
|
|
30
35
|
|
|
36
|
+
height: 3.5rem;
|
|
37
|
+
border: none;
|
|
38
|
+
border-radius: 1.75rem;
|
|
39
|
+
padding: 0 1.5rem 0 1rem;
|
|
40
|
+
|
|
31
41
|
background-color: transparent;
|
|
32
42
|
color: rgb(var(--m3-scheme-on-surface-variant));
|
|
33
43
|
transition: all 300ms;
|
|
@@ -1,35 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
2
|
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
$$bindings?: Bindings;
|
|
6
|
-
} & Exports;
|
|
7
|
-
(internal: unknown, props: Props & {
|
|
8
|
-
$$events?: Events;
|
|
9
|
-
$$slots?: Slots;
|
|
10
|
-
}): Exports & {
|
|
11
|
-
$set?: any;
|
|
12
|
-
$on?: any;
|
|
13
|
-
};
|
|
14
|
-
z_$$bindings?: Bindings;
|
|
15
|
-
}
|
|
16
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
17
|
-
default: any;
|
|
18
|
-
} ? Props extends Record<string, never> ? any : {
|
|
19
|
-
children?: any;
|
|
20
|
-
} : {});
|
|
21
|
-
declare const NavDrawerButton: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
3
|
+
import type { IconifyIcon } from "@iconify/types";
|
|
4
|
+
type $$ComponentProps = {
|
|
22
5
|
selected: boolean;
|
|
23
|
-
extraOptions?: HTMLButtonAttributes;
|
|
24
6
|
icon: IconifyIcon;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
[evt: string]: CustomEvent<any>;
|
|
31
|
-
}, {
|
|
32
|
-
default: {};
|
|
33
|
-
}, {}, string>;
|
|
34
|
-
type NavDrawerButton = InstanceType<typeof NavDrawerButton>;
|
|
7
|
+
children: Snippet;
|
|
8
|
+
click: () => void;
|
|
9
|
+
} & HTMLButtonAttributes;
|
|
10
|
+
declare const NavDrawerButton: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
+
type NavDrawerButton = ReturnType<typeof NavDrawerButton>;
|
|
35
12
|
export default NavDrawerButton;
|
|
@@ -1,33 +1,42 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
4
|
+
import type { IconifyIcon } from "@iconify/types";
|
|
2
5
|
import Icon from "../misc/_icon.svelte";
|
|
3
6
|
import Layer from "../misc/Layer.svelte";
|
|
4
|
-
import type { IconifyIcon } from "@iconify/types";
|
|
5
|
-
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
let {
|
|
9
|
+
selected,
|
|
10
|
+
icon,
|
|
11
|
+
children,
|
|
12
|
+
href,
|
|
13
|
+
...extra
|
|
14
|
+
}: {
|
|
15
|
+
selected: boolean;
|
|
16
|
+
icon: IconifyIcon;
|
|
17
|
+
children: Snippet;
|
|
18
|
+
href: string;
|
|
19
|
+
} & HTMLAnchorAttributes = $props();
|
|
11
20
|
</script>
|
|
12
21
|
|
|
13
|
-
<a {href} class="destination" class:selected {...
|
|
22
|
+
<a {href} class="destination" class:selected {...extra}>
|
|
14
23
|
<Layer />
|
|
15
24
|
<Icon {icon} />
|
|
16
|
-
<span class="m3-font-label-large"
|
|
25
|
+
<span class="m3-font-label-large">{@render children?.()}</span>
|
|
17
26
|
</a>
|
|
18
27
|
|
|
19
28
|
<style>
|
|
20
29
|
.destination {
|
|
21
|
-
height: 3.5rem;
|
|
22
|
-
border-radius: 1.75rem;
|
|
23
|
-
padding: 0 1.5rem 0 1rem;
|
|
24
|
-
|
|
25
30
|
display: flex;
|
|
26
31
|
align-items: center;
|
|
27
32
|
gap: 0.75rem;
|
|
28
33
|
position: relative;
|
|
29
34
|
overflow: hidden;
|
|
30
35
|
|
|
36
|
+
height: 3.5rem;
|
|
37
|
+
border-radius: 1.75rem;
|
|
38
|
+
padding: 0 1.5rem 0 1rem;
|
|
39
|
+
|
|
31
40
|
background-color: transparent;
|
|
32
41
|
color: rgb(var(--m3-scheme-on-surface-variant));
|
|
33
42
|
transition: all 300ms;
|
|
@@ -1,34 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
2
|
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
$$bindings?: Bindings;
|
|
6
|
-
} & Exports;
|
|
7
|
-
(internal: unknown, props: Props & {
|
|
8
|
-
$$events?: Events;
|
|
9
|
-
$$slots?: Slots;
|
|
10
|
-
}): Exports & {
|
|
11
|
-
$set?: any;
|
|
12
|
-
$on?: any;
|
|
13
|
-
};
|
|
14
|
-
z_$$bindings?: Bindings;
|
|
15
|
-
}
|
|
16
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
17
|
-
default: any;
|
|
18
|
-
} ? Props extends Record<string, never> ? any : {
|
|
19
|
-
children?: any;
|
|
20
|
-
} : {});
|
|
21
|
-
declare const NavDrawerLink: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
22
|
-
href: string;
|
|
3
|
+
import type { IconifyIcon } from "@iconify/types";
|
|
4
|
+
type $$ComponentProps = {
|
|
23
5
|
selected: boolean;
|
|
24
|
-
extraOptions?: HTMLAnchorAttributes;
|
|
25
6
|
icon: IconifyIcon;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
default: {};
|
|
32
|
-
}, {}, string>;
|
|
33
|
-
type NavDrawerLink = InstanceType<typeof NavDrawerLink>;
|
|
7
|
+
children: Snippet;
|
|
8
|
+
href: string;
|
|
9
|
+
} & HTMLAnchorAttributes;
|
|
10
|
+
declare const NavDrawerLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
+
type NavDrawerLink = ReturnType<typeof NavDrawerLink>;
|
|
34
12
|
export default NavDrawerLink;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
let {
|
|
5
|
+
variant,
|
|
6
|
+
children,
|
|
7
|
+
}: {
|
|
8
|
+
variant: "rail" | "bar" | "auto";
|
|
9
|
+
children: Snippet;
|
|
10
|
+
} = $props();
|
|
8
11
|
</script>
|
|
9
12
|
|
|
10
|
-
<nav class="m3-container
|
|
11
|
-
|
|
13
|
+
<nav class="m3-container {variant}">
|
|
14
|
+
{@render children()}
|
|
12
15
|
</nav>
|
|
13
16
|
|
|
14
17
|
<style>
|
|
15
18
|
.m3-container {
|
|
19
|
+
display: flex;
|
|
16
20
|
position: relative;
|
|
17
21
|
flex-grow: 1;
|
|
18
22
|
background-color: rgb(var(--m3-scheme-surface-container));
|
|
@@ -21,7 +25,7 @@
|
|
|
21
25
|
gap: 0.5rem;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
|
-
.
|
|
28
|
+
.rail {
|
|
25
29
|
background-color: rgb(var(--m3-scheme-surface));
|
|
26
30
|
flex-direction: column;
|
|
27
31
|
width: 5rem;
|
|
@@ -30,7 +34,7 @@
|
|
|
30
34
|
gap: 0.75rem;
|
|
31
35
|
}
|
|
32
36
|
@media (min-width: 37.5rem) {
|
|
33
|
-
.
|
|
37
|
+
.auto {
|
|
34
38
|
background-color: rgb(var(--m3-scheme-surface));
|
|
35
39
|
flex-direction: column;
|
|
36
40
|
width: 5rem;
|
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
16
|
-
default: any;
|
|
17
|
-
} ? Props extends Record<string, never> ? any : {
|
|
18
|
-
children?: any;
|
|
19
|
-
} : {});
|
|
20
|
-
declare const NavList: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
21
|
-
display?: string;
|
|
22
|
-
extraOptions?: HTMLAttributes<HTMLElement>;
|
|
23
|
-
type: "rail" | "bar" | "auto";
|
|
24
|
-
}, {
|
|
25
|
-
default: {};
|
|
26
|
-
}>, {
|
|
27
|
-
[evt: string]: CustomEvent<any>;
|
|
28
|
-
}, {
|
|
29
|
-
default: {};
|
|
30
|
-
}, {}, string>;
|
|
31
|
-
type NavList = InstanceType<typeof NavList>;
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
variant: "rail" | "bar" | "auto";
|
|
4
|
+
children: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const NavList: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
+
type NavList = ReturnType<typeof NavList>;
|
|
32
8
|
export default NavList;
|
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import type { IconifyIcon } from "@iconify/types";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
4
3
|
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
4
|
+
import type { IconifyIcon } from "@iconify/types";
|
|
5
|
+
import Icon from "../misc/_icon.svelte";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
let {
|
|
8
|
+
variant,
|
|
9
|
+
selected,
|
|
10
|
+
icon,
|
|
11
|
+
children,
|
|
12
|
+
click,
|
|
13
|
+
...extra
|
|
14
|
+
}: {
|
|
15
|
+
variant: "rail" | "bar" | "auto";
|
|
16
|
+
selected: boolean;
|
|
17
|
+
icon: IconifyIcon;
|
|
18
|
+
children: Snippet;
|
|
19
|
+
click: () => void;
|
|
20
|
+
} & HTMLButtonAttributes = $props();
|
|
12
21
|
</script>
|
|
13
22
|
|
|
14
|
-
<button
|
|
15
|
-
on:click
|
|
16
|
-
class="m3-container type-{type}"
|
|
17
|
-
style="display: {display};"
|
|
18
|
-
class:selected
|
|
19
|
-
{...extraOptions}
|
|
20
|
-
>
|
|
23
|
+
<button class="m3-container {variant}" class:selected onclick={click} {...extra}>
|
|
21
24
|
<div class="icon-space">
|
|
22
25
|
<Icon {icon} />
|
|
23
26
|
</div>
|
|
24
|
-
<p class="m3-font-label-medium"
|
|
27
|
+
<p class="m3-font-label-medium">{@render children()}</p>
|
|
25
28
|
</button>
|
|
26
29
|
|
|
27
30
|
<style>
|
|
28
31
|
.m3-container {
|
|
32
|
+
display: flex;
|
|
29
33
|
flex-direction: column;
|
|
30
34
|
height: 3.25rem;
|
|
31
35
|
gap: 0.25rem;
|
|
@@ -79,17 +83,17 @@
|
|
|
79
83
|
transition: color 200ms;
|
|
80
84
|
}
|
|
81
85
|
|
|
82
|
-
.
|
|
86
|
+
.rail {
|
|
83
87
|
height: 3.5rem;
|
|
84
88
|
}
|
|
85
|
-
.
|
|
89
|
+
.rail > .icon-space {
|
|
86
90
|
width: 3.5rem;
|
|
87
91
|
}
|
|
88
92
|
@media (min-width: 37.5rem) {
|
|
89
|
-
.
|
|
93
|
+
.auto {
|
|
90
94
|
height: 3.5rem;
|
|
91
95
|
}
|
|
92
|
-
.
|
|
96
|
+
.auto > .icon-space {
|
|
93
97
|
width: 3.5rem;
|
|
94
98
|
}
|
|
95
99
|
}
|
|
@@ -102,8 +106,8 @@
|
|
|
102
106
|
inset: 0 0;
|
|
103
107
|
width: 100%;
|
|
104
108
|
transition:
|
|
105
|
-
width
|
|
106
|
-
inset
|
|
109
|
+
width var(--m3-util-easing-fast-spatial),
|
|
110
|
+
inset var(--m3-util-easing-fast-spatial);
|
|
107
111
|
}
|
|
108
112
|
.selected > .icon-space > :global(svg) {
|
|
109
113
|
color: rgb(var(--m3-scheme-on-secondary-container));
|
|
@@ -1,37 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
2
|
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} & Exports;
|
|
7
|
-
(internal: unknown, props: Props & {
|
|
8
|
-
$$events?: Events;
|
|
9
|
-
$$slots?: Slots;
|
|
10
|
-
}): Exports & {
|
|
11
|
-
$set?: any;
|
|
12
|
-
$on?: any;
|
|
13
|
-
};
|
|
14
|
-
z_$$bindings?: Bindings;
|
|
15
|
-
}
|
|
16
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
17
|
-
default: any;
|
|
18
|
-
} ? Props extends Record<string, never> ? any : {
|
|
19
|
-
children?: any;
|
|
20
|
-
} : {});
|
|
21
|
-
declare const NavListButton: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
22
|
-
display?: string;
|
|
23
|
-
extraOptions?: HTMLButtonAttributes;
|
|
24
|
-
type: "rail" | "bar" | "auto";
|
|
3
|
+
import type { IconifyIcon } from "@iconify/types";
|
|
4
|
+
type $$ComponentProps = {
|
|
5
|
+
variant: "rail" | "bar" | "auto";
|
|
25
6
|
selected: boolean;
|
|
26
7
|
icon: IconifyIcon;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
[evt: string]: CustomEvent<any>;
|
|
33
|
-
}, {
|
|
34
|
-
default: {};
|
|
35
|
-
}, {}, string>;
|
|
36
|
-
type NavListButton = InstanceType<typeof NavListButton>;
|
|
8
|
+
children: Snippet;
|
|
9
|
+
click: () => void;
|
|
10
|
+
} & HTMLButtonAttributes;
|
|
11
|
+
declare const NavListButton: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
12
|
+
type NavListButton = ReturnType<typeof NavListButton>;
|
|
37
13
|
export default NavListButton;
|
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import
|
|
3
|
-
import type { IconifyIcon } from "@iconify/types";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
4
3
|
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
4
|
+
import type { IconifyIcon } from "@iconify/types";
|
|
5
|
+
import Icon from "../misc/_icon.svelte";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
let {
|
|
8
|
+
variant,
|
|
9
|
+
selected,
|
|
10
|
+
icon,
|
|
11
|
+
children,
|
|
12
|
+
href,
|
|
13
|
+
...extra
|
|
14
|
+
}: {
|
|
15
|
+
variant: "rail" | "bar" | "auto";
|
|
16
|
+
selected: boolean;
|
|
17
|
+
icon: IconifyIcon;
|
|
18
|
+
children: Snippet;
|
|
19
|
+
href: string;
|
|
20
|
+
} & HTMLAnchorAttributes = $props();
|
|
13
21
|
</script>
|
|
14
22
|
|
|
15
|
-
<a
|
|
16
|
-
class="m3-container type-{type}"
|
|
17
|
-
style="display: {display};"
|
|
18
|
-
class:selected
|
|
19
|
-
{href}
|
|
20
|
-
{...extraOptions}
|
|
21
|
-
>
|
|
23
|
+
<a class="m3-container {variant}" class:selected {href} {...extra}>
|
|
22
24
|
<div class="icon-space">
|
|
23
25
|
<Icon {icon} />
|
|
24
26
|
</div>
|
|
25
|
-
<p class="m3-font-label-medium"
|
|
27
|
+
<p class="m3-font-label-medium">{@render children()}</p>
|
|
26
28
|
</a>
|
|
27
29
|
|
|
28
30
|
<style>
|
|
29
31
|
.m3-container {
|
|
32
|
+
display: flex;
|
|
30
33
|
flex-direction: column;
|
|
31
34
|
height: 3.25rem;
|
|
32
35
|
gap: 0.25rem;
|
|
@@ -78,17 +81,17 @@
|
|
|
78
81
|
transition: color 200ms;
|
|
79
82
|
}
|
|
80
83
|
|
|
81
|
-
.
|
|
84
|
+
.rail {
|
|
82
85
|
height: 3.5rem;
|
|
83
86
|
}
|
|
84
|
-
.
|
|
87
|
+
.rail > .icon-space {
|
|
85
88
|
width: 3.5rem;
|
|
86
89
|
}
|
|
87
90
|
@media (min-width: 37.5rem) {
|
|
88
|
-
.
|
|
91
|
+
.auto {
|
|
89
92
|
height: 3.5rem;
|
|
90
93
|
}
|
|
91
|
-
.
|
|
94
|
+
.auto > .icon-space {
|
|
92
95
|
width: 3.5rem;
|
|
93
96
|
}
|
|
94
97
|
}
|
|
@@ -101,8 +104,8 @@
|
|
|
101
104
|
inset: 0 0;
|
|
102
105
|
width: 100%;
|
|
103
106
|
transition:
|
|
104
|
-
width
|
|
105
|
-
inset
|
|
107
|
+
width var(--m3-util-easing-fast-spatial),
|
|
108
|
+
inset var(--m3-util-easing-fast-spatial);
|
|
106
109
|
}
|
|
107
110
|
.selected > .icon-space > :global(svg) {
|
|
108
111
|
color: rgb(var(--m3-scheme-on-secondary-container));
|
|
@@ -1,36 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
2
|
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} & Exports;
|
|
7
|
-
(internal: unknown, props: Props & {
|
|
8
|
-
$$events?: Events;
|
|
9
|
-
$$slots?: Slots;
|
|
10
|
-
}): Exports & {
|
|
11
|
-
$set?: any;
|
|
12
|
-
$on?: any;
|
|
13
|
-
};
|
|
14
|
-
z_$$bindings?: Bindings;
|
|
15
|
-
}
|
|
16
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
17
|
-
default: any;
|
|
18
|
-
} ? Props extends Record<string, never> ? any : {
|
|
19
|
-
children?: any;
|
|
20
|
-
} : {});
|
|
21
|
-
declare const NavListLink: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
22
|
-
display?: string;
|
|
23
|
-
extraOptions?: HTMLAnchorAttributes;
|
|
24
|
-
type: "rail" | "bar" | "auto";
|
|
25
|
-
href: string;
|
|
3
|
+
import type { IconifyIcon } from "@iconify/types";
|
|
4
|
+
type $$ComponentProps = {
|
|
5
|
+
variant: "rail" | "bar" | "auto";
|
|
26
6
|
selected: boolean;
|
|
27
7
|
icon: IconifyIcon;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
default: {};
|
|
34
|
-
}, {}, string>;
|
|
35
|
-
type NavListLink = InstanceType<typeof NavListLink>;
|
|
8
|
+
children: Snippet;
|
|
9
|
+
href: string;
|
|
10
|
+
} & HTMLAnchorAttributes;
|
|
11
|
+
declare const NavListLink: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
12
|
+
type NavListLink = ReturnType<typeof NavListLink>;
|
|
36
13
|
export default NavListLink;
|
package/package/nav/Tabs.svelte
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { IconifyIcon } from "@iconify/types";
|
|
3
|
-
import type {
|
|
3
|
+
import type { HTMLInputAttributes } from "svelte/elements";
|
|
4
4
|
import Icon from "../misc/_icon.svelte";
|
|
5
5
|
import Layer from "../misc/Layer.svelte";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
secondary = false,
|
|
9
|
+
tab = $bindable(),
|
|
10
|
+
items,
|
|
11
|
+
...extra
|
|
12
|
+
}: {
|
|
13
|
+
secondary?: boolean;
|
|
14
|
+
tab: string;
|
|
15
|
+
items: {
|
|
16
|
+
icon?: IconifyIcon;
|
|
17
|
+
name: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[];
|
|
20
|
+
} & HTMLInputAttributes = $props();
|
|
16
21
|
const name = crypto.randomUUID();
|
|
17
22
|
</script>
|
|
18
23
|
|
|
19
|
-
<div
|
|
20
|
-
class="m3-container"
|
|
21
|
-
class:primary={!secondary}
|
|
22
|
-
style="display: {display}; --items: {items.length};"
|
|
23
|
-
{...extraWrapperOptions}
|
|
24
|
-
>
|
|
24
|
+
<div class="m3-container" class:primary={!secondary} style:--items={items.length}>
|
|
25
25
|
<div class="divider"></div>
|
|
26
26
|
{#each items as item}
|
|
27
27
|
{@const id = name + item.value}
|
|
28
|
-
<input type="radio" {name} {id} value={item.value} bind:group={tab} {...
|
|
28
|
+
<input type="radio" {name} {id} value={item.value} bind:group={tab} {...extra} />
|
|
29
29
|
<label for={id} class:tall={item.icon}>
|
|
30
30
|
<Layer />
|
|
31
31
|
{#if item.icon}
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
<style>
|
|
41
41
|
.m3-container {
|
|
42
|
+
display: flex;
|
|
42
43
|
position: relative;
|
|
43
44
|
background-color: rgb(var(--m3-scheme-surface));
|
|
44
45
|
}
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
.divider {
|
|
51
52
|
position: absolute;
|
|
52
53
|
inset: auto 0 0 0;
|
|
53
|
-
height:
|
|
54
|
+
height: 1px;
|
|
54
55
|
background-color: rgb(var(--m3-scheme-surface-container-highest));
|
|
55
56
|
}
|
|
56
57
|
label {
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
import type { IconifyIcon } from "@iconify/types";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
5
|
-
$$bindings?: Bindings;
|
|
6
|
-
} & Exports;
|
|
7
|
-
(internal: unknown, props: Props & {
|
|
8
|
-
$$events?: Events;
|
|
9
|
-
$$slots?: Slots;
|
|
10
|
-
}): Exports & {
|
|
11
|
-
$set?: any;
|
|
12
|
-
$on?: any;
|
|
13
|
-
};
|
|
14
|
-
z_$$bindings?: Bindings;
|
|
15
|
-
}
|
|
16
|
-
declare const Tabs: $$__sveltets_2_IsomorphicComponent<{
|
|
17
|
-
display?: string;
|
|
18
|
-
extraWrapperOptions?: HTMLAttributes<HTMLDivElement>;
|
|
19
|
-
extraOptions?: HTMLInputAttributes;
|
|
2
|
+
import type { HTMLInputAttributes } from "svelte/elements";
|
|
3
|
+
type $$ComponentProps = {
|
|
20
4
|
secondary?: boolean;
|
|
21
5
|
tab: string;
|
|
22
6
|
items: {
|
|
@@ -24,8 +8,7 @@ declare const Tabs: $$__sveltets_2_IsomorphicComponent<{
|
|
|
24
8
|
name: string;
|
|
25
9
|
value: string;
|
|
26
10
|
}[];
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
type Tabs = InstanceType<typeof Tabs>;
|
|
11
|
+
} & HTMLInputAttributes;
|
|
12
|
+
declare const Tabs: import("svelte").Component<$$ComponentProps, {}, "tab">;
|
|
13
|
+
type Tabs = ReturnType<typeof Tabs>;
|
|
31
14
|
export default Tabs;
|