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 CHANGED
@@ -1,6 +1,6 @@
1
1
  @layer base {
2
2
  body {
3
- @apply h-dvh flex flex-col;
3
+ @apply h-dvh flex flex-col relative;
4
4
  @apply bg-background text-on-background;
5
5
  }
6
6
 
@@ -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 && scroll.scrollY > headerHeight) {
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 if (hideOnScroll) {
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()}
@@ -12,6 +12,7 @@ type Props = {
12
12
  isBordered?: boolean;
13
13
  hideOnScroll?: boolean;
14
14
  isSticky?: boolean;
15
+ isBoxed?: boolean;
15
16
  };
16
17
  declare const AppBar: import("svelte").Component<Props, {}, "">;
17
18
  type AppBar = ReturnType<typeof AppBar>;
@@ -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()}
@@ -10,6 +10,7 @@ type Props = {
10
10
  endClass?: string;
11
11
  isBlurred?: boolean;
12
12
  isBordered?: boolean;
13
+ isBoxed?: boolean;
13
14
  hideOnScroll?: boolean;
14
15
  };
15
16
  declare const Footer: import("svelte").Component<Props, {}, "">;
@@ -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')}>
@@ -9,6 +9,7 @@ type Props = {
9
9
  mainClass?: string;
10
10
  startClass?: string;
11
11
  endClass?: string;
12
+ isBoxed?: boolean;
12
13
  };
13
14
  declare const Scaffold: import("svelte").Component<Props, {}, "">;
14
15
  type Scaffold = ReturnType<typeof Scaffold>;
@@ -3,7 +3,7 @@
3
3
  @apply w-full z-30;
4
4
 
5
5
  &.is-sticky {
6
- @apply sticky top-0;
6
+ @apply fixed top-0;
7
7
  }
8
8
 
9
9
  &.is-blurred {
@@ -79,7 +79,7 @@
79
79
 
80
80
  &.navmenu-primary {
81
81
  .navmenu-item.is-active {
82
- @apply bg-primary/10 text-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/10 text-secondary;
92
+ @apply bg-on-secondary text-secondary;
93
93
 
94
94
  .navmenu-icon {
95
95
  @apply text-secondary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-svelte",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "author": {
5
5
  "name": "SappsDev",
6
6
  "email": "info@sappsdev.com"