ui-svelte 0.2.0 → 0.2.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/dist/css/base.css +1 -1
- package/dist/layout/AppBar.svelte +9 -3
- package/dist/layout/AppBar.svelte.d.ts +1 -0
- package/dist/layout/Footer.svelte +3 -1
- package/dist/layout/Footer.svelte.d.ts +1 -0
- package/dist/layout/Scaffold.svelte +4 -2
- package/dist/layout/Scaffold.svelte.d.ts +1 -0
- package/dist/layout/css/app-bar.css +1 -1
- package/dist/navigation/css/nav-menu.css +2 -2
- package/package.json +1 -1
package/dist/css/base.css
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
isBordered?: boolean;
|
|
17
17
|
hideOnScroll?: boolean;
|
|
18
18
|
isSticky?: boolean;
|
|
19
|
+
isBoxed?: boolean;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
const {
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
isBordered,
|
|
31
32
|
isBlurred,
|
|
32
33
|
isSticky,
|
|
34
|
+
isBoxed,
|
|
33
35
|
hideOnScroll
|
|
34
36
|
}: Props = $props();
|
|
35
37
|
|
|
@@ -50,14 +52,18 @@
|
|
|
50
52
|
});
|
|
51
53
|
|
|
52
54
|
$effect(() => {
|
|
53
|
-
if (hideOnScroll
|
|
55
|
+
if (!hideOnScroll) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (scroll.scrollY > headerHeight) {
|
|
54
60
|
if (scroll.scrollY > lastScrollY) {
|
|
55
61
|
isHidden = true;
|
|
56
62
|
} else if (scroll.scrollY < lastScrollY) {
|
|
57
63
|
isHidden = false;
|
|
58
64
|
}
|
|
59
65
|
lastScrollY = scroll.scrollY;
|
|
60
|
-
} else
|
|
66
|
+
} else {
|
|
61
67
|
isHidden = false;
|
|
62
68
|
lastScrollY = scroll.scrollY;
|
|
63
69
|
}
|
|
@@ -77,7 +83,7 @@
|
|
|
77
83
|
className
|
|
78
84
|
)}
|
|
79
85
|
>
|
|
80
|
-
<div class={cn('appbar-content', contentClass)}>
|
|
86
|
+
<div class={cn('appbar-content', isBoxed && 'boxed', contentClass)}>
|
|
81
87
|
{#if start}
|
|
82
88
|
<div class={cn('appbar-start', startClass)}>
|
|
83
89
|
{@render start()}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
endClass?: string;
|
|
15
15
|
isBlurred?: boolean;
|
|
16
16
|
isBordered?: boolean;
|
|
17
|
+
isBoxed?: boolean;
|
|
17
18
|
hideOnScroll?: boolean;
|
|
18
19
|
};
|
|
19
20
|
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
endClass,
|
|
29
30
|
isBordered,
|
|
30
31
|
isBlurred,
|
|
32
|
+
isBoxed,
|
|
31
33
|
hideOnScroll
|
|
32
34
|
}: Props = $props();
|
|
33
35
|
|
|
@@ -74,7 +76,7 @@
|
|
|
74
76
|
className
|
|
75
77
|
)}
|
|
76
78
|
>
|
|
77
|
-
<div class={cn('footer-content', contentClass)}>
|
|
79
|
+
<div class={cn('footer-content', isBoxed && 'boxed', contentClass)}>
|
|
78
80
|
{#if start}
|
|
79
81
|
<div class={cn('footer-start', startClass)}>
|
|
80
82
|
{@render start()}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
mainClass?: string;
|
|
13
13
|
startClass?: string;
|
|
14
14
|
endClass?: string;
|
|
15
|
+
isBoxed?: boolean;
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
const {
|
|
@@ -23,12 +24,13 @@
|
|
|
23
24
|
bodyClass,
|
|
24
25
|
mainClass,
|
|
25
26
|
startClass,
|
|
26
|
-
endClass
|
|
27
|
+
endClass,
|
|
28
|
+
isBoxed
|
|
27
29
|
}: Props = $props();
|
|
28
30
|
</script>
|
|
29
31
|
|
|
30
32
|
{@render appBar?.()}
|
|
31
|
-
<div class={cn('scaffold-body', bodyClass)}>
|
|
33
|
+
<div class={cn('scaffold-body', isBoxed && 'boxed', bodyClass)}>
|
|
32
34
|
{#if start}
|
|
33
35
|
<aside class={cn('scaffold-start', startClass)}>
|
|
34
36
|
<div class={cn('scaffold-content')}>
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
|
|
80
80
|
&.navmenu-primary {
|
|
81
81
|
.navmenu-item.is-active {
|
|
82
|
-
@apply bg-primary
|
|
82
|
+
@apply bg-on-primary text-primary;
|
|
83
83
|
|
|
84
84
|
.navmenu-icon {
|
|
85
85
|
@apply text-primary;
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
|
|
90
90
|
&.navmenu-secondary {
|
|
91
91
|
.navmenu-item.is-active {
|
|
92
|
-
@apply bg-secondary
|
|
92
|
+
@apply bg-on-secondary text-secondary;
|
|
93
93
|
|
|
94
94
|
.navmenu-icon {
|
|
95
95
|
@apply text-secondary;
|