ui-svelte 0.2.6 → 0.2.7

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.
@@ -16,6 +16,7 @@
16
16
  isBordered?: boolean;
17
17
  borderOnScrollOnly?: boolean;
18
18
  hideOnScroll?: boolean;
19
+ solidOnScroll?: boolean;
19
20
  isSticky?: boolean;
20
21
  isBoxed?: boolean;
21
22
  variant?:
@@ -45,7 +46,8 @@
45
46
  isSticky,
46
47
  isBoxed,
47
48
  variant = 'ghost',
48
- hideOnScroll
49
+ hideOnScroll,
50
+ solidOnScroll = false
49
51
  }: Props = $props();
50
52
 
51
53
  let headerElement = $state<HTMLElement | null>(null);
@@ -96,6 +98,7 @@
96
98
 
97
99
  const shouldBlur = $derived(isBlurred && scroll.isScrolled);
98
100
  const shouldShowBorder = $derived(isBordered && (!borderOnScrollOnly || scroll.isScrolled));
101
+ const isTransparent = $derived(solidOnScroll && !scroll.isScrolled);
99
102
  </script>
100
103
 
101
104
  <header
@@ -106,6 +109,7 @@
106
109
  shouldShowBorder && 'is-bordered',
107
110
  shouldBlur && 'is-blurred',
108
111
  isHidden && 'is-hidden',
112
+ isTransparent && 'is-transparent',
109
113
  isSticky && 'is-sticky',
110
114
  rootClass
111
115
  )}
@@ -12,6 +12,7 @@ type Props = {
12
12
  isBordered?: boolean;
13
13
  borderOnScrollOnly?: boolean;
14
14
  hideOnScroll?: boolean;
15
+ solidOnScroll?: boolean;
15
16
  isSticky?: boolean;
16
17
  isBoxed?: boolean;
17
18
  variant?: 'primary' | 'secondary' | 'muted' | 'success' | 'info' | 'warning' | 'danger' | 'surface' | 'ghost';
@@ -14,10 +14,15 @@
14
14
  @apply border-b border-muted;
15
15
  }
16
16
 
17
+
17
18
  &.is-hidden {
18
19
  @apply -translate-y-full;
19
20
  }
20
21
 
22
+ &.is-transparent {
23
+ @apply bg-transparent border-transparent shadow-none;
24
+ }
25
+
21
26
  .appbar-content {
22
27
  @apply flex flex-nowrap items-center justify-between relative;
23
28
  @apply w-full px-2 h-full min-h-12;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-svelte",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "author": {
5
5
  "name": "SappsDev",
6
6
  "email": "info@sappsdev.com"