glasslikeui 0.1.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.
Files changed (74) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/components/glass/GlassCard.svelte +64 -0
  4. package/dist/components/glass/GlassCard.svelte.d.ts +13 -0
  5. package/dist/components/glass/GlassSection.svelte +76 -0
  6. package/dist/components/glass/GlassSection.svelte.d.ts +12 -0
  7. package/dist/components/glass/LiquidGlass.svelte +123 -0
  8. package/dist/components/glass/LiquidGlass.svelte.d.ts +17 -0
  9. package/dist/components/glass/Sheet.svelte +236 -0
  10. package/dist/components/glass/Sheet.svelte.d.ts +13 -0
  11. package/dist/components/glass/index.d.ts +8 -0
  12. package/dist/components/glass/index.js +8 -0
  13. package/dist/components/index.d.ts +11 -0
  14. package/dist/components/index.js +18 -0
  15. package/dist/components/interactive/Badge.svelte +60 -0
  16. package/dist/components/interactive/Badge.svelte.d.ts +9 -0
  17. package/dist/components/interactive/Button.svelte +156 -0
  18. package/dist/components/interactive/Button.svelte.d.ts +14 -0
  19. package/dist/components/interactive/IconButton.svelte +85 -0
  20. package/dist/components/interactive/IconButton.svelte.d.ts +12 -0
  21. package/dist/components/interactive/TabView.svelte +118 -0
  22. package/dist/components/interactive/TabView.svelte.d.ts +16 -0
  23. package/dist/components/interactive/index.d.ts +8 -0
  24. package/dist/components/interactive/index.js +8 -0
  25. package/dist/components/layout/Divider.svelte +31 -0
  26. package/dist/components/layout/Divider.svelte.d.ts +7 -0
  27. package/dist/components/layout/Grid.svelte +52 -0
  28. package/dist/components/layout/Grid.svelte.d.ts +11 -0
  29. package/dist/components/layout/HStack.svelte +76 -0
  30. package/dist/components/layout/HStack.svelte.d.ts +13 -0
  31. package/dist/components/layout/ScrollView.svelte +60 -0
  32. package/dist/components/layout/ScrollView.svelte.d.ts +10 -0
  33. package/dist/components/layout/Spacer.svelte +18 -0
  34. package/dist/components/layout/Spacer.svelte.d.ts +7 -0
  35. package/dist/components/layout/VStack.svelte +56 -0
  36. package/dist/components/layout/VStack.svelte.d.ts +11 -0
  37. package/dist/components/layout/ZStack.svelte +51 -0
  38. package/dist/components/layout/ZStack.svelte.d.ts +9 -0
  39. package/dist/components/layout/index.d.ts +11 -0
  40. package/dist/components/layout/index.js +11 -0
  41. package/dist/components/list/List.svelte +50 -0
  42. package/dist/components/list/List.svelte.d.ts +9 -0
  43. package/dist/components/list/ListRow.svelte +181 -0
  44. package/dist/components/list/ListRow.svelte.d.ts +15 -0
  45. package/dist/components/list/index.d.ts +6 -0
  46. package/dist/components/list/index.js +6 -0
  47. package/dist/components/media/SymbolImage.svelte +46 -0
  48. package/dist/components/media/SymbolImage.svelte.d.ts +10 -0
  49. package/dist/components/media/index.d.ts +5 -0
  50. package/dist/components/media/index.js +5 -0
  51. package/dist/components/navigation/NavigationBar.svelte +106 -0
  52. package/dist/components/navigation/NavigationBar.svelte.d.ts +12 -0
  53. package/dist/components/navigation/NavigationLink.svelte +45 -0
  54. package/dist/components/navigation/NavigationLink.svelte.d.ts +10 -0
  55. package/dist/components/navigation/index.d.ts +6 -0
  56. package/dist/components/navigation/index.js +6 -0
  57. package/dist/components/typography/Text.svelte +96 -0
  58. package/dist/components/typography/Text.svelte.d.ts +14 -0
  59. package/dist/components/typography/index.d.ts +5 -0
  60. package/dist/components/typography/index.js +5 -0
  61. package/dist/constants/colors.d.ts +22 -0
  62. package/dist/constants/colors.js +20 -0
  63. package/dist/constants/index.d.ts +7 -0
  64. package/dist/constants/index.js +7 -0
  65. package/dist/constants/materials.d.ts +13 -0
  66. package/dist/constants/materials.js +43 -0
  67. package/dist/constants/sizes.d.ts +44 -0
  68. package/dist/constants/sizes.js +40 -0
  69. package/dist/icons/index.d.ts +17 -0
  70. package/dist/icons/index.js +51 -0
  71. package/dist/index.d.ts +9 -0
  72. package/dist/index.js +12 -0
  73. package/dist/styles/liquidglass.css +125 -0
  74. package/package.json +38 -0
@@ -0,0 +1,18 @@
1
+ <script lang="ts">
2
+ interface Props {
3
+ minLength?: number;
4
+ class?: string;
5
+ }
6
+
7
+ let { minLength = 0, class: className = '' }: Props = $props();
8
+ </script>
9
+
10
+ <div class="spacer {className}" style="--spacer-min: {minLength}px"></div>
11
+
12
+ <style>
13
+ .spacer {
14
+ flex: 1 1 auto;
15
+ min-width: var(--spacer-min);
16
+ min-height: var(--spacer-min);
17
+ }
18
+ </style>
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ minLength?: number;
3
+ class?: string;
4
+ }
5
+ declare const Spacer: import("svelte").Component<Props, {}, "">;
6
+ type Spacer = ReturnType<typeof Spacer>;
7
+ export default Spacer;
@@ -0,0 +1,56 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+
4
+ interface Props {
5
+ children: Snippet;
6
+ spacing?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ alignment?: 'leading' | 'center' | 'trailing' | 'stretch';
8
+ padding?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
9
+ class?: string;
10
+ }
11
+
12
+ let {
13
+ children,
14
+ spacing = 'md',
15
+ alignment = 'stretch',
16
+ padding = 'none',
17
+ class: className = ''
18
+ }: Props = $props();
19
+
20
+ const spacingMap = {
21
+ none: '0',
22
+ xs: 'var(--spacing-xs)',
23
+ sm: 'var(--spacing-sm)',
24
+ md: 'var(--spacing-md)',
25
+ lg: 'var(--spacing-lg)',
26
+ xl: 'var(--spacing-xl)'
27
+ };
28
+
29
+ const alignmentMap = {
30
+ leading: 'flex-start',
31
+ center: 'center',
32
+ trailing: 'flex-end',
33
+ stretch: 'stretch'
34
+ };
35
+ </script>
36
+
37
+ <div
38
+ class="vstack {className}"
39
+ style="
40
+ --vstack-spacing: {spacingMap[spacing]};
41
+ --vstack-alignment: {alignmentMap[alignment]};
42
+ --vstack-padding: {spacingMap[padding]};
43
+ "
44
+ >
45
+ {@render children()}
46
+ </div>
47
+
48
+ <style>
49
+ .vstack {
50
+ display: flex;
51
+ flex-direction: column;
52
+ gap: var(--vstack-spacing);
53
+ align-items: var(--vstack-alignment);
54
+ padding: var(--vstack-padding);
55
+ }
56
+ </style>
@@ -0,0 +1,11 @@
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ children: Snippet;
4
+ spacing?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
+ alignment?: 'leading' | 'center' | 'trailing' | 'stretch';
6
+ padding?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ class?: string;
8
+ }
9
+ declare const VStack: import("svelte").Component<Props, {}, "">;
10
+ type VStack = ReturnType<typeof VStack>;
11
+ export default VStack;
@@ -0,0 +1,51 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+
4
+ interface Props {
5
+ children: Snippet;
6
+ alignment?: 'topLeading' | 'top' | 'topTrailing' | 'leading' | 'center' | 'trailing' | 'bottomLeading' | 'bottom' | 'bottomTrailing';
7
+ class?: string;
8
+ }
9
+
10
+ let {
11
+ children,
12
+ alignment = 'center',
13
+ class: className = ''
14
+ }: Props = $props();
15
+
16
+ const alignmentStyles = {
17
+ topLeading: { justifyContent: 'flex-start', alignItems: 'flex-start' },
18
+ top: { justifyContent: 'center', alignItems: 'flex-start' },
19
+ topTrailing: { justifyContent: 'flex-end', alignItems: 'flex-start' },
20
+ leading: { justifyContent: 'flex-start', alignItems: 'center' },
21
+ center: { justifyContent: 'center', alignItems: 'center' },
22
+ trailing: { justifyContent: 'flex-end', alignItems: 'center' },
23
+ bottomLeading: { justifyContent: 'flex-start', alignItems: 'flex-end' },
24
+ bottom: { justifyContent: 'center', alignItems: 'flex-end' },
25
+ bottomTrailing: { justifyContent: 'flex-end', alignItems: 'flex-end' }
26
+ };
27
+
28
+ const style = $derived(alignmentStyles[alignment]);
29
+ </script>
30
+
31
+ <div
32
+ class="zstack {className}"
33
+ style="
34
+ --zstack-justify: {style.justifyContent};
35
+ --zstack-align: {style.alignItems};
36
+ "
37
+ >
38
+ {@render children()}
39
+ </div>
40
+
41
+ <style>
42
+ .zstack {
43
+ display: grid;
44
+ place-items: center;
45
+ position: relative;
46
+ }
47
+
48
+ .zstack > :global(*) {
49
+ grid-area: 1 / 1;
50
+ }
51
+ </style>
@@ -0,0 +1,9 @@
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ children: Snippet;
4
+ alignment?: 'topLeading' | 'top' | 'topTrailing' | 'leading' | 'center' | 'trailing' | 'bottomLeading' | 'bottom' | 'bottomTrailing';
5
+ class?: string;
6
+ }
7
+ declare const ZStack: import("svelte").Component<Props, {}, "">;
8
+ type ZStack = ReturnType<typeof ZStack>;
9
+ export default ZStack;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Layout Components
3
+ * Structural components for arranging content
4
+ */
5
+ export { default as VStack } from './VStack.svelte';
6
+ export { default as HStack } from './HStack.svelte';
7
+ export { default as ZStack } from './ZStack.svelte';
8
+ export { default as Grid } from './Grid.svelte';
9
+ export { default as Spacer } from './Spacer.svelte';
10
+ export { default as Divider } from './Divider.svelte';
11
+ export { default as ScrollView } from './ScrollView.svelte';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Layout Components
3
+ * Structural components for arranging content
4
+ */
5
+ export { default as VStack } from './VStack.svelte';
6
+ export { default as HStack } from './HStack.svelte';
7
+ export { default as ZStack } from './ZStack.svelte';
8
+ export { default as Grid } from './Grid.svelte';
9
+ export { default as Spacer } from './Spacer.svelte';
10
+ export { default as Divider } from './Divider.svelte';
11
+ export { default as ScrollView } from './ScrollView.svelte';
@@ -0,0 +1,50 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+ import { LiquidGlass } from '../glass';
4
+
5
+ interface Props {
6
+ children: Snippet;
7
+ style?: 'plain' | 'inset' | 'grouped' | 'insetGrouped';
8
+ class?: string;
9
+ }
10
+
11
+ let {
12
+ children,
13
+ style: listStyle = 'insetGrouped',
14
+ class: className = ''
15
+ }: Props = $props();
16
+ </script>
17
+
18
+ {#if listStyle === 'plain'}
19
+ <div class="list list-plain {className}">
20
+ {@render children()}
21
+ </div>
22
+ {:else}
23
+ <LiquidGlass material="regular" padding="none" cornerRadius="xl" class="list list-{listStyle} {className}">
24
+ {@render children()}
25
+ </LiquidGlass>
26
+ {/if}
27
+
28
+ <style>
29
+ :global(.list) {
30
+ display: flex;
31
+ flex-direction: column;
32
+ width: 100%;
33
+ }
34
+
35
+ :global(.list-plain) {
36
+ background: transparent;
37
+ }
38
+
39
+ :global(.list-inset) {
40
+ margin: 0 var(--spacing-md);
41
+ }
42
+
43
+ :global(.list-grouped) {
44
+ border-radius: 0;
45
+ }
46
+
47
+ :global(.list-insetGrouped) {
48
+ margin: 0;
49
+ }
50
+ </style>
@@ -0,0 +1,9 @@
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ children: Snippet;
4
+ style?: 'plain' | 'inset' | 'grouped' | 'insetGrouped';
5
+ class?: string;
6
+ }
7
+ declare const List: import("svelte").Component<Props, {}, "">;
8
+ type List = ReturnType<typeof List>;
9
+ export default List;
@@ -0,0 +1,181 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+ import { HStack } from '../layout';
4
+ import { VStack } from '../layout';
5
+ import { SymbolImage } from '../media';
6
+
7
+ interface Props {
8
+ children: Snippet;
9
+ leading?: Snippet;
10
+ trailing?: Snippet;
11
+ subtitle?: string;
12
+ showDivider?: boolean;
13
+ interactive?: boolean;
14
+ href?: string;
15
+ onclick?: () => void;
16
+ class?: string;
17
+ }
18
+
19
+ let {
20
+ children,
21
+ leading,
22
+ trailing,
23
+ subtitle = '',
24
+ showDivider = true,
25
+ interactive = false,
26
+ href,
27
+ onclick,
28
+ class: className = ''
29
+ }: Props = $props();
30
+
31
+ const isInteractive = $derived(interactive || !!href || !!onclick);
32
+ </script>
33
+
34
+ {#if href}
35
+ <a {href} class="list-row {className}" class:interactive={isInteractive} class:has-divider={showDivider}>
36
+ <HStack spacing="sm" alignment="center" class="row-content">
37
+ {#if leading}
38
+ <div class="row-leading">
39
+ {@render leading()}
40
+ </div>
41
+ {/if}
42
+
43
+ <VStack spacing="none" alignment="leading" class="row-main">
44
+ <div class="row-title">
45
+ {@render children()}
46
+ </div>
47
+ {#if subtitle}
48
+ <div class="row-subtitle">{subtitle}</div>
49
+ {/if}
50
+ </VStack>
51
+
52
+ {#if trailing}
53
+ <div class="row-trailing">
54
+ {@render trailing()}
55
+ </div>
56
+ {:else if isInteractive}
57
+ <SymbolImage name="chevron.right" size="sm" color="tertiary" />
58
+ {/if}
59
+ </HStack>
60
+ </a>
61
+ {:else if onclick}
62
+ <button class="list-row {className}" class:interactive={isInteractive} class:has-divider={showDivider} {onclick}>
63
+ <HStack spacing="sm" alignment="center" class="row-content">
64
+ {#if leading}
65
+ <div class="row-leading">
66
+ {@render leading()}
67
+ </div>
68
+ {/if}
69
+
70
+ <VStack spacing="none" alignment="leading" class="row-main">
71
+ <div class="row-title">
72
+ {@render children()}
73
+ </div>
74
+ {#if subtitle}
75
+ <div class="row-subtitle">{subtitle}</div>
76
+ {/if}
77
+ </VStack>
78
+
79
+ {#if trailing}
80
+ <div class="row-trailing">
81
+ {@render trailing()}
82
+ </div>
83
+ {:else if isInteractive}
84
+ <SymbolImage name="chevron.right" size="sm" color="tertiary" />
85
+ {/if}
86
+ </HStack>
87
+ </button>
88
+ {:else}
89
+ <div class="list-row {className}" class:has-divider={showDivider}>
90
+ <HStack spacing="sm" alignment="center" class="row-content">
91
+ {#if leading}
92
+ <div class="row-leading">
93
+ {@render leading()}
94
+ </div>
95
+ {/if}
96
+
97
+ <VStack spacing="none" alignment="leading" class="row-main">
98
+ <div class="row-title">
99
+ {@render children()}
100
+ </div>
101
+ {#if subtitle}
102
+ <div class="row-subtitle">{subtitle}</div>
103
+ {/if}
104
+ </VStack>
105
+
106
+ {#if trailing}
107
+ <div class="row-trailing">
108
+ {@render trailing()}
109
+ </div>
110
+ {/if}
111
+ </HStack>
112
+ </div>
113
+ {/if}
114
+
115
+ <style>
116
+ .list-row {
117
+ display: block;
118
+ width: 100%;
119
+ padding: 0;
120
+ background: transparent;
121
+ border: none;
122
+ text-decoration: none;
123
+ color: inherit;
124
+ text-align: left;
125
+ font-family: inherit;
126
+ cursor: default;
127
+ }
128
+
129
+ .list-row.interactive {
130
+ cursor: pointer;
131
+ }
132
+
133
+ .list-row.interactive:hover {
134
+ background: var(--glass-hover-subtle);
135
+ }
136
+
137
+ .list-row.interactive:active {
138
+ background: var(--glass-active-subtle);
139
+ }
140
+
141
+ :global(.row-content) {
142
+ padding: var(--spacing-sm) var(--spacing-md);
143
+ min-height: 44px;
144
+ }
145
+
146
+ .list-row.has-divider {
147
+ border-bottom: 1px solid var(--glass-divider);
148
+ }
149
+
150
+ .list-row:last-child {
151
+ border-bottom: none;
152
+ }
153
+
154
+ .row-leading {
155
+ display: flex;
156
+ align-items: center;
157
+ justify-content: center;
158
+ }
159
+
160
+ :global(.row-main) {
161
+ flex: 1;
162
+ min-width: 0;
163
+ }
164
+
165
+ .row-title {
166
+ font-size: 1rem;
167
+ color: var(--color-text);
168
+ }
169
+
170
+ .row-subtitle {
171
+ font-size: 0.8125rem;
172
+ color: var(--color-text-secondary);
173
+ margin-top: 2px;
174
+ }
175
+
176
+ .row-trailing {
177
+ display: flex;
178
+ align-items: center;
179
+ color: var(--color-text-tertiary);
180
+ }
181
+ </style>
@@ -0,0 +1,15 @@
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ children: Snippet;
4
+ leading?: Snippet;
5
+ trailing?: Snippet;
6
+ subtitle?: string;
7
+ showDivider?: boolean;
8
+ interactive?: boolean;
9
+ href?: string;
10
+ onclick?: () => void;
11
+ class?: string;
12
+ }
13
+ declare const ListRow: import("svelte").Component<Props, {}, "">;
14
+ type ListRow = ReturnType<typeof ListRow>;
15
+ export default ListRow;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * List Components
3
+ * List and list row components
4
+ */
5
+ export { default as List } from './List.svelte';
6
+ export { default as ListRow } from './ListRow.svelte';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * List Components
3
+ * List and list row components
4
+ */
5
+ export { default as List } from './List.svelte';
6
+ export { default as ListRow } from './ListRow.svelte';
@@ -0,0 +1,46 @@
1
+ <script lang="ts">
2
+ import { ICON_SIZES, TEXT_COLORS } from '../../constants';
3
+ import { getIconPath } from '../../icons';
4
+ import type { IconSize, TextColor } from '../../constants';
5
+
6
+ interface Props {
7
+ name: string;
8
+ size?: IconSize;
9
+ color?: TextColor;
10
+ class?: string;
11
+ }
12
+
13
+ let {
14
+ name,
15
+ size = 'md',
16
+ color = 'primary',
17
+ class: className = ''
18
+ }: Props = $props();
19
+
20
+ // Security Note: iconPath is always from hardcoded ICONS map, never user input
21
+ const iconPath = $derived(getIconPath(name));
22
+ const pixelSize = $derived(ICON_SIZES[size]);
23
+ const colorValue = $derived(TEXT_COLORS[color]);
24
+ </script>
25
+
26
+ <svg
27
+ class="symbol-image {className}"
28
+ xmlns="http://www.w3.org/2000/svg"
29
+ width={pixelSize}
30
+ height={pixelSize}
31
+ viewBox="0 0 24 24"
32
+ fill="none"
33
+ stroke={colorValue}
34
+ stroke-width="2"
35
+ stroke-linecap="round"
36
+ stroke-linejoin="round"
37
+ style="color: {colorValue}"
38
+ >
39
+ {@html iconPath}
40
+ </svg>
41
+
42
+ <style>
43
+ .symbol-image {
44
+ flex-shrink: 0;
45
+ }
46
+ </style>
@@ -0,0 +1,10 @@
1
+ import type { IconSize, TextColor } from '../../constants';
2
+ interface Props {
3
+ name: string;
4
+ size?: IconSize;
5
+ color?: TextColor;
6
+ class?: string;
7
+ }
8
+ declare const SymbolImage: import("svelte").Component<Props, {}, "">;
9
+ type SymbolImage = ReturnType<typeof SymbolImage>;
10
+ export default SymbolImage;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Media Components
3
+ * Icons, images, and media elements
4
+ */
5
+ export { default as SymbolImage } from './SymbolImage.svelte';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Media Components
3
+ * Icons, images, and media elements
4
+ */
5
+ export { default as SymbolImage } from './SymbolImage.svelte';
@@ -0,0 +1,106 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+ import { HStack } from '../layout';
4
+
5
+ interface Props {
6
+ title?: string;
7
+ leading?: Snippet;
8
+ trailing?: Snippet;
9
+ transparent?: boolean;
10
+ scrolled?: boolean;
11
+ class?: string;
12
+ }
13
+
14
+ let {
15
+ title = '',
16
+ leading,
17
+ trailing,
18
+ transparent = false,
19
+ scrolled = false,
20
+ class: className = ''
21
+ }: Props = $props();
22
+ </script>
23
+
24
+ <header class="navigation-bar {className}" class:transparent class:scrolled>
25
+ <nav class="nav-content">
26
+ <HStack spacing="sm" alignment="center" justify="between">
27
+ <div class="nav-leading">
28
+ {#if leading}
29
+ {@render leading()}
30
+ {/if}
31
+ </div>
32
+
33
+ {#if title}
34
+ <h1 class="nav-title">{title}</h1>
35
+ {/if}
36
+
37
+ <div class="nav-trailing">
38
+ {#if trailing}
39
+ {@render trailing()}
40
+ {/if}
41
+ </div>
42
+ </HStack>
43
+ </nav>
44
+ </header>
45
+
46
+ <style>
47
+ .navigation-bar {
48
+ position: fixed;
49
+ top: 0;
50
+ left: 0;
51
+ right: 0;
52
+ z-index: 100;
53
+ height: 56px;
54
+ display: flex;
55
+ align-items: center;
56
+ background: var(--glass-nav-bg);
57
+ backdrop-filter: blur(var(--glass-nav-blur)) saturate(1.8);
58
+ -webkit-backdrop-filter: blur(var(--glass-nav-blur)) saturate(1.8);
59
+ border-bottom: 1px solid var(--glass-border);
60
+ transition: all var(--transition);
61
+ }
62
+
63
+ .navigation-bar.transparent {
64
+ background: transparent;
65
+ backdrop-filter: none;
66
+ -webkit-backdrop-filter: none;
67
+ border-bottom-color: transparent;
68
+ }
69
+
70
+ .navigation-bar.transparent.scrolled {
71
+ background: var(--glass-nav-bg);
72
+ backdrop-filter: blur(var(--glass-nav-blur)) saturate(1.8);
73
+ -webkit-backdrop-filter: blur(var(--glass-nav-blur)) saturate(1.8);
74
+ border-bottom-color: var(--glass-border);
75
+ }
76
+
77
+ .nav-content {
78
+ width: 100%;
79
+ max-width: var(--max-width);
80
+ margin: 0 auto;
81
+ padding: 0 var(--spacing-md);
82
+ }
83
+
84
+ .nav-leading,
85
+ .nav-trailing {
86
+ display: flex;
87
+ align-items: center;
88
+ gap: var(--spacing-sm);
89
+ min-width: 80px;
90
+ }
91
+
92
+ .nav-trailing {
93
+ justify-content: flex-end;
94
+ }
95
+
96
+ .nav-title {
97
+ font-size: 17px;
98
+ font-weight: 600;
99
+ color: var(--color-text);
100
+ text-align: center;
101
+ flex: 1;
102
+ white-space: nowrap;
103
+ overflow: hidden;
104
+ text-overflow: ellipsis;
105
+ }
106
+ </style>
@@ -0,0 +1,12 @@
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ title?: string;
4
+ leading?: Snippet;
5
+ trailing?: Snippet;
6
+ transparent?: boolean;
7
+ scrolled?: boolean;
8
+ class?: string;
9
+ }
10
+ declare const NavigationBar: import("svelte").Component<Props, {}, "">;
11
+ type NavigationBar = ReturnType<typeof NavigationBar>;
12
+ export default NavigationBar;
@@ -0,0 +1,45 @@
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+
4
+ interface Props {
5
+ children: Snippet;
6
+ href: string;
7
+ active?: boolean;
8
+ class?: string;
9
+ }
10
+
11
+ let {
12
+ children,
13
+ href,
14
+ active = false,
15
+ class: className = ''
16
+ }: Props = $props();
17
+ </script>
18
+
19
+ <a {href} class="navigation-link {className}" class:active aria-current={active ? 'page' : undefined}>
20
+ {@render children()}
21
+ </a>
22
+
23
+ <style>
24
+ .navigation-link {
25
+ display: inline-flex;
26
+ align-items: center;
27
+ padding: 8px 16px;
28
+ font-size: 0.875rem;
29
+ font-weight: 500;
30
+ color: var(--color-text-secondary);
31
+ text-decoration: none;
32
+ border-radius: var(--glass-radius-full);
33
+ transition: color var(--transition-spring);
34
+ position: relative;
35
+ z-index: 1;
36
+ }
37
+
38
+ .navigation-link:hover {
39
+ color: var(--color-text);
40
+ }
41
+
42
+ .navigation-link.active {
43
+ color: white;
44
+ }
45
+ </style>