glasslikeui 0.2.1 → 1.0.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/README.md +214 -0
- package/dist/actions/a11ySync.d.ts +9 -0
- package/dist/actions/a11ySync.js +49 -0
- package/dist/actions/deviceMotion.d.ts +31 -0
- package/dist/actions/deviceMotion.js +142 -0
- package/dist/actions/dragSnap.d.ts +47 -0
- package/dist/actions/dragSnap.js +222 -0
- package/dist/actions/index.d.ts +5 -0
- package/dist/actions/index.js +5 -0
- package/dist/actions/scrollEdge.d.ts +21 -0
- package/dist/actions/scrollEdge.js +61 -0
- package/dist/actions/viewTransition.d.ts +23 -0
- package/dist/actions/viewTransition.js +34 -0
- package/dist/components/glass/Glass.svelte +164 -0
- package/dist/components/glass/Glass.svelte.d.ts +19 -0
- package/dist/components/glass/GlassCard.svelte +12 -5
- package/dist/components/glass/GlassCard.svelte.d.ts +4 -2
- package/dist/components/glass/GlassDimLayer.svelte +37 -0
- package/dist/components/glass/GlassDimLayer.svelte.d.ts +8 -0
- package/dist/components/glass/GlassEffectContainer.svelte +58 -0
- package/dist/components/glass/GlassEffectContainer.svelte.d.ts +12 -0
- package/dist/components/glass/GlassMorph.svelte +42 -0
- package/dist/components/glass/GlassMorph.svelte.d.ts +10 -0
- package/dist/components/glass/GlassSection.svelte +11 -5
- package/dist/components/glass/GlassSection.svelte.d.ts +4 -2
- package/dist/components/glass/LensFilters.svelte +41 -0
- package/dist/components/glass/LensFilters.svelte.d.ts +18 -0
- package/dist/components/glass/Sheet.svelte +70 -40
- package/dist/components/glass/Sheet.svelte.d.ts +6 -2
- package/dist/components/glass/index.d.ts +5 -5
- package/dist/components/glass/index.js +5 -5
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/interactive/Badge.svelte +3 -11
- package/dist/components/interactive/Badge.svelte.d.ts +2 -2
- package/dist/components/interactive/Button.svelte +28 -33
- package/dist/components/interactive/Button.svelte.d.ts +4 -4
- package/dist/components/interactive/IconButton.svelte +3 -14
- package/dist/components/interactive/IconButton.svelte.d.ts +4 -4
- package/dist/components/interactive/TabView.svelte +5 -4
- package/dist/components/interactive/TabView.svelte.d.ts +1 -1
- package/dist/components/layout/Divider.svelte.d.ts +1 -1
- package/dist/components/layout/Grid.svelte.d.ts +1 -1
- package/dist/components/layout/HStack.svelte.d.ts +1 -1
- package/dist/components/layout/ScrollView.svelte +27 -4
- package/dist/components/layout/ScrollView.svelte.d.ts +5 -1
- package/dist/components/layout/Spacer.svelte.d.ts +1 -1
- package/dist/components/layout/VStack.svelte.d.ts +1 -1
- package/dist/components/layout/ZStack.svelte.d.ts +1 -1
- package/dist/components/list/List.svelte +3 -3
- package/dist/components/list/List.svelte.d.ts +1 -1
- package/dist/components/list/ListRow.svelte.d.ts +1 -1
- package/dist/components/media/SymbolImage.svelte.d.ts +1 -1
- package/dist/components/navigation/NavigationBar.svelte +113 -24
- package/dist/components/navigation/NavigationBar.svelte.d.ts +2 -1
- package/dist/components/navigation/NavigationLink.svelte.d.ts +1 -1
- package/dist/components/typography/Text.svelte +3 -2
- package/dist/components/typography/Text.svelte.d.ts +2 -2
- package/dist/constants/colors.js +2 -2
- package/dist/constants/index.d.ts +1 -5
- package/dist/constants/index.js +1 -5
- package/dist/constants/sizes.js +4 -4
- package/dist/constants/variants.d.ts +23 -0
- package/dist/constants/variants.js +18 -0
- package/dist/icons/index.js +10 -7
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -7
- package/dist/styles/glasslikeui.css +192 -0
- package/dist/styles/lens.css +93 -0
- package/dist/styles/squircle.css +17 -0
- package/dist/styles/typography.css +27 -0
- package/dist/test-setup.d.ts +1 -0
- package/dist/test-setup.js +6 -0
- package/package.json +19 -7
- package/dist/components/glass/LiquidGlass.svelte +0 -123
- package/dist/components/glass/LiquidGlass.svelte.d.ts +0 -17
- package/dist/constants/materials.d.ts +0 -13
- package/dist/constants/materials.js +0 -43
- package/dist/styles/liquidglass.css +0 -125
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
interface Props {
|
|
3
3
|
children: Snippet;
|
|
4
|
-
variant?: 'filled' | '
|
|
4
|
+
variant?: 'filled' | 'outlined' | 'plain' | 'tinted' | 'destructive';
|
|
5
5
|
size?: 'sm' | 'md' | 'lg';
|
|
6
6
|
fullWidth?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
-
href?: string;
|
|
9
|
-
onclick?: (e: MouseEvent) => void;
|
|
8
|
+
href?: string | undefined;
|
|
9
|
+
onclick?: ((e: MouseEvent) => void) | undefined;
|
|
10
10
|
class?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const Button: import("svelte").Component<Props, {},
|
|
12
|
+
declare const Button: import("svelte").Component<Props, {}, string>;
|
|
13
13
|
type Button = ReturnType<typeof Button>;
|
|
14
14
|
export default Button;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
children: Snippet;
|
|
6
|
-
variant?: 'plain' | '
|
|
6
|
+
variant?: 'plain' | 'filled';
|
|
7
7
|
size?: 'sm' | 'md' | 'lg';
|
|
8
|
-
label?: string;
|
|
9
|
-
onclick?: (e: MouseEvent) => void;
|
|
8
|
+
label?: string | undefined;
|
|
9
|
+
onclick?: ((e: MouseEvent) => void) | undefined;
|
|
10
10
|
class?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -63,17 +63,6 @@
|
|
|
63
63
|
background: var(--glass-hover-subtle);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.icon-button.variant-glass {
|
|
67
|
-
background: var(--glass-button-bg);
|
|
68
|
-
backdrop-filter: blur(12px);
|
|
69
|
-
-webkit-backdrop-filter: blur(12px);
|
|
70
|
-
border: 1px solid var(--glass-border);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.icon-button.variant-glass:hover {
|
|
74
|
-
background: var(--glass-button-hover);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
66
|
.icon-button.variant-filled {
|
|
78
67
|
background: var(--color-accent);
|
|
79
68
|
color: white;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
interface Props {
|
|
3
3
|
children: Snippet;
|
|
4
|
-
variant?: 'plain' | '
|
|
4
|
+
variant?: 'plain' | 'filled';
|
|
5
5
|
size?: 'sm' | 'md' | 'lg';
|
|
6
|
-
label?: string;
|
|
7
|
-
onclick?: (e: MouseEvent) => void;
|
|
6
|
+
label?: string | undefined;
|
|
7
|
+
onclick?: ((e: MouseEvent) => void) | undefined;
|
|
8
8
|
class?: string;
|
|
9
9
|
}
|
|
10
|
-
declare const IconButton: import("svelte").Component<Props, {},
|
|
10
|
+
declare const IconButton: import("svelte").Component<Props, {}, string>;
|
|
11
11
|
type IconButton = ReturnType<typeof IconButton>;
|
|
12
12
|
export default IconButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
-
import {
|
|
3
|
+
import { Glass } from '../glass';
|
|
4
4
|
import { HStack } from '../layout';
|
|
5
5
|
|
|
6
6
|
interface Tab {
|
|
@@ -46,8 +46,9 @@
|
|
|
46
46
|
</div>
|
|
47
47
|
{/if}
|
|
48
48
|
|
|
49
|
-
<
|
|
50
|
-
|
|
49
|
+
<Glass
|
|
50
|
+
variant="regular"
|
|
51
|
+
intensity="prominent"
|
|
51
52
|
cornerRadius="full"
|
|
52
53
|
padding="xs"
|
|
53
54
|
class={inline ? 'tab-bar-container-inline' : 'tab-bar-container'}
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
</button>
|
|
67
68
|
{/each}
|
|
68
69
|
</HStack>
|
|
69
|
-
</
|
|
70
|
+
</Glass>
|
|
70
71
|
</div>
|
|
71
72
|
|
|
72
73
|
<style>
|
|
@@ -13,6 +13,6 @@ interface Props {
|
|
|
13
13
|
onchange?: (id: string) => void;
|
|
14
14
|
class?: string;
|
|
15
15
|
}
|
|
16
|
-
declare const TabView: import("svelte").Component<Props, {},
|
|
16
|
+
declare const TabView: import("svelte").Component<Props, {}, string>;
|
|
17
17
|
type TabView = ReturnType<typeof TabView>;
|
|
18
18
|
export default TabView;
|
|
@@ -2,6 +2,6 @@ interface Props {
|
|
|
2
2
|
orientation?: 'horizontal' | 'vertical';
|
|
3
3
|
class?: string;
|
|
4
4
|
}
|
|
5
|
-
declare const Divider: import("svelte").Component<Props, {},
|
|
5
|
+
declare const Divider: import("svelte").Component<Props, {}, string>;
|
|
6
6
|
type Divider = ReturnType<typeof Divider>;
|
|
7
7
|
export default Divider;
|
|
@@ -6,6 +6,6 @@ interface Props {
|
|
|
6
6
|
spacing?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
7
7
|
class?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const Grid: import("svelte").Component<Props, {},
|
|
9
|
+
declare const Grid: import("svelte").Component<Props, {}, string>;
|
|
10
10
|
type Grid = ReturnType<typeof Grid>;
|
|
11
11
|
export default Grid;
|
|
@@ -8,6 +8,6 @@ interface Props {
|
|
|
8
8
|
padding?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
9
|
class?: string;
|
|
10
10
|
}
|
|
11
|
-
declare const HStack: import("svelte").Component<Props, {},
|
|
11
|
+
declare const HStack: import("svelte").Component<Props, {}, string>;
|
|
12
12
|
type HStack = ReturnType<typeof HStack>;
|
|
13
13
|
export default HStack;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import {
|
|
4
|
+
scrollEdge,
|
|
5
|
+
type ScrollEdgeEffect,
|
|
6
|
+
type ScrollEdgeWhich
|
|
7
|
+
} from '../../actions/scrollEdge';
|
|
3
8
|
|
|
4
9
|
interface Props {
|
|
5
10
|
children: Snippet;
|
|
6
11
|
axis?: 'vertical' | 'horizontal' | 'both';
|
|
7
12
|
showsIndicators?: boolean;
|
|
13
|
+
edgeEffect?: 'none' | ScrollEdgeEffect;
|
|
14
|
+
edges?: ScrollEdgeWhich;
|
|
15
|
+
edgeSize?: string;
|
|
8
16
|
class?: string;
|
|
9
17
|
}
|
|
10
18
|
|
|
@@ -12,15 +20,30 @@
|
|
|
12
20
|
children,
|
|
13
21
|
axis = 'vertical',
|
|
14
22
|
showsIndicators = true,
|
|
23
|
+
edgeEffect = 'none',
|
|
24
|
+
edges = 'bottom',
|
|
25
|
+
edgeSize,
|
|
15
26
|
class: className = ''
|
|
16
27
|
}: Props = $props();
|
|
17
28
|
</script>
|
|
18
29
|
|
|
19
|
-
|
|
20
|
-
<div class="scroll-
|
|
21
|
-
|
|
30
|
+
{#if edgeEffect === 'none'}
|
|
31
|
+
<div class="scroll-view axis-{axis} {className}" class:hide-indicators={!showsIndicators}>
|
|
32
|
+
<div class="scroll-content">
|
|
33
|
+
{@render children()}
|
|
34
|
+
</div>
|
|
22
35
|
</div>
|
|
23
|
-
|
|
36
|
+
{:else}
|
|
37
|
+
<div
|
|
38
|
+
class="scroll-view axis-{axis} {className}"
|
|
39
|
+
class:hide-indicators={!showsIndicators}
|
|
40
|
+
use:scrollEdge={{ edges, effect: edgeEffect, size: edgeSize }}
|
|
41
|
+
>
|
|
42
|
+
<div class="scroll-content">
|
|
43
|
+
{@render children()}
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
{/if}
|
|
24
47
|
|
|
25
48
|
<style>
|
|
26
49
|
.scroll-view {
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
+
import { type ScrollEdgeEffect, type ScrollEdgeWhich } from '../../actions/scrollEdge';
|
|
2
3
|
interface Props {
|
|
3
4
|
children: Snippet;
|
|
4
5
|
axis?: 'vertical' | 'horizontal' | 'both';
|
|
5
6
|
showsIndicators?: boolean;
|
|
7
|
+
edgeEffect?: 'none' | ScrollEdgeEffect;
|
|
8
|
+
edges?: ScrollEdgeWhich;
|
|
9
|
+
edgeSize?: string;
|
|
6
10
|
class?: string;
|
|
7
11
|
}
|
|
8
|
-
declare const ScrollView: import("svelte").Component<Props, {},
|
|
12
|
+
declare const ScrollView: import("svelte").Component<Props, {}, string>;
|
|
9
13
|
type ScrollView = ReturnType<typeof ScrollView>;
|
|
10
14
|
export default ScrollView;
|
|
@@ -6,6 +6,6 @@ interface Props {
|
|
|
6
6
|
padding?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
7
7
|
class?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const VStack: import("svelte").Component<Props, {},
|
|
9
|
+
declare const VStack: import("svelte").Component<Props, {}, string>;
|
|
10
10
|
type VStack = ReturnType<typeof VStack>;
|
|
11
11
|
export default VStack;
|
|
@@ -4,6 +4,6 @@ interface Props {
|
|
|
4
4
|
alignment?: 'topLeading' | 'top' | 'topTrailing' | 'leading' | 'center' | 'trailing' | 'bottomLeading' | 'bottom' | 'bottomTrailing';
|
|
5
5
|
class?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const ZStack: import("svelte").Component<Props, {},
|
|
7
|
+
declare const ZStack: import("svelte").Component<Props, {}, string>;
|
|
8
8
|
type ZStack = ReturnType<typeof ZStack>;
|
|
9
9
|
export default ZStack;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
-
import {
|
|
3
|
+
import { Glass } from '../glass';
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
6
|
children: Snippet;
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
{@render children()}
|
|
21
21
|
</div>
|
|
22
22
|
{:else}
|
|
23
|
-
<
|
|
23
|
+
<Glass variant="regular" intensity="standard" padding="none" cornerRadius="xl" class="list list-{listStyle} {className}">
|
|
24
24
|
{@render children()}
|
|
25
|
-
</
|
|
25
|
+
</Glass>
|
|
26
26
|
{/if}
|
|
27
27
|
|
|
28
28
|
<style>
|
|
@@ -4,6 +4,6 @@ interface Props {
|
|
|
4
4
|
style?: 'plain' | 'inset' | 'grouped' | 'insetGrouped';
|
|
5
5
|
class?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const List: import("svelte").Component<Props, {},
|
|
7
|
+
declare const List: import("svelte").Component<Props, {}, string>;
|
|
8
8
|
type List = ReturnType<typeof List>;
|
|
9
9
|
export default List;
|
|
@@ -10,6 +10,6 @@ interface Props {
|
|
|
10
10
|
onclick?: () => void;
|
|
11
11
|
class?: string;
|
|
12
12
|
}
|
|
13
|
-
declare const ListRow: import("svelte").Component<Props, {},
|
|
13
|
+
declare const ListRow: import("svelte").Component<Props, {}, string>;
|
|
14
14
|
type ListRow = ReturnType<typeof ListRow>;
|
|
15
15
|
export default ListRow;
|
|
@@ -5,6 +5,6 @@ interface Props {
|
|
|
5
5
|
color?: TextColor;
|
|
6
6
|
class?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const SymbolImage: import("svelte").Component<Props, {},
|
|
8
|
+
declare const SymbolImage: import("svelte").Component<Props, {}, string>;
|
|
9
9
|
type SymbolImage = ReturnType<typeof SymbolImage>;
|
|
10
10
|
export default SymbolImage;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
title?: string;
|
|
7
7
|
leading?: Snippet;
|
|
8
8
|
trailing?: Snippet;
|
|
9
|
+
largeTitle?: boolean;
|
|
9
10
|
transparent?: boolean;
|
|
10
11
|
scrolled?: boolean;
|
|
11
12
|
class?: string;
|
|
@@ -15,33 +16,83 @@
|
|
|
15
16
|
title = '',
|
|
16
17
|
leading,
|
|
17
18
|
trailing,
|
|
19
|
+
largeTitle = false,
|
|
18
20
|
transparent = false,
|
|
19
|
-
scrolled = false,
|
|
21
|
+
scrolled = $bindable(false),
|
|
20
22
|
class: className = ''
|
|
21
23
|
}: Props = $props();
|
|
24
|
+
|
|
25
|
+
let sentinelEl = $state<HTMLElement | undefined>();
|
|
26
|
+
let collapsed = $state(false);
|
|
27
|
+
|
|
28
|
+
$effect(() => {
|
|
29
|
+
if (!largeTitle || !sentinelEl || typeof IntersectionObserver === 'undefined') return;
|
|
30
|
+
|
|
31
|
+
const observer = new IntersectionObserver(
|
|
32
|
+
(entries) => {
|
|
33
|
+
for (const entry of entries) {
|
|
34
|
+
collapsed = !entry.isIntersecting;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{ threshold: 0.1, rootMargin: '0px 0px -40px 0px' }
|
|
38
|
+
);
|
|
39
|
+
observer.observe(sentinelEl);
|
|
40
|
+
return () => observer.disconnect();
|
|
41
|
+
});
|
|
22
42
|
</script>
|
|
23
43
|
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
{#if largeTitle}
|
|
45
|
+
<div class="nav-large {className}" class:is-collapsed={collapsed}>
|
|
46
|
+
<header class="navigation-bar large" class:transparent class:scrolled={collapsed || scrolled}>
|
|
47
|
+
<nav class="nav-content">
|
|
48
|
+
<HStack spacing="sm" alignment="center" justify="between">
|
|
49
|
+
<div class="nav-leading">
|
|
50
|
+
{#if leading}
|
|
51
|
+
{@render leading()}
|
|
52
|
+
{/if}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
{#if title}
|
|
56
|
+
<h1 class="nav-title-compact">{title}</h1>
|
|
57
|
+
{/if}
|
|
58
|
+
|
|
59
|
+
<div class="nav-trailing">
|
|
60
|
+
{#if trailing}
|
|
61
|
+
{@render trailing()}
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
</HStack>
|
|
65
|
+
</nav>
|
|
66
|
+
</header>
|
|
32
67
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{
|
|
68
|
+
<div class="nav-large-title-block">
|
|
69
|
+
<h1 class="nav-large-title">{title}</h1>
|
|
70
|
+
<div bind:this={sentinelEl} class="nav-title-sentinel" aria-hidden="true"></div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
{:else}
|
|
74
|
+
<header class="navigation-bar {className}" class:transparent class:scrolled>
|
|
75
|
+
<nav class="nav-content">
|
|
76
|
+
<HStack spacing="sm" alignment="center" justify="between">
|
|
77
|
+
<div class="nav-leading">
|
|
78
|
+
{#if leading}
|
|
79
|
+
{@render leading()}
|
|
80
|
+
{/if}
|
|
81
|
+
</div>
|
|
36
82
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{@render trailing()}
|
|
83
|
+
{#if title}
|
|
84
|
+
<h1 class="nav-title-compact">{title}</h1>
|
|
40
85
|
{/if}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
86
|
+
|
|
87
|
+
<div class="nav-trailing">
|
|
88
|
+
{#if trailing}
|
|
89
|
+
{@render trailing()}
|
|
90
|
+
{/if}
|
|
91
|
+
</div>
|
|
92
|
+
</HStack>
|
|
93
|
+
</nav>
|
|
94
|
+
</header>
|
|
95
|
+
{/if}
|
|
45
96
|
|
|
46
97
|
<style>
|
|
47
98
|
.navigation-bar {
|
|
@@ -54,10 +105,11 @@
|
|
|
54
105
|
display: flex;
|
|
55
106
|
align-items: center;
|
|
56
107
|
background: var(--glass-nav-bg);
|
|
57
|
-
backdrop-filter: blur(var(--glass-nav
|
|
58
|
-
-webkit-backdrop-filter: blur(var(--glass-nav
|
|
108
|
+
backdrop-filter: blur(var(--glass-blur-nav)) saturate(var(--glass-saturation));
|
|
109
|
+
-webkit-backdrop-filter: blur(var(--glass-blur-nav)) saturate(var(--glass-saturation));
|
|
59
110
|
border-bottom: 1px solid var(--glass-border);
|
|
60
111
|
transition: all var(--transition);
|
|
112
|
+
font-family: var(--font-system);
|
|
61
113
|
}
|
|
62
114
|
|
|
63
115
|
.navigation-bar.transparent {
|
|
@@ -69,8 +121,8 @@
|
|
|
69
121
|
|
|
70
122
|
.navigation-bar.transparent.scrolled {
|
|
71
123
|
background: var(--glass-nav-bg);
|
|
72
|
-
backdrop-filter: blur(var(--glass-nav
|
|
73
|
-
-webkit-backdrop-filter: blur(var(--glass-nav
|
|
124
|
+
backdrop-filter: blur(var(--glass-blur-nav)) saturate(var(--glass-saturation));
|
|
125
|
+
-webkit-backdrop-filter: blur(var(--glass-blur-nav)) saturate(var(--glass-saturation));
|
|
74
126
|
border-bottom-color: var(--glass-border);
|
|
75
127
|
}
|
|
76
128
|
|
|
@@ -93,7 +145,7 @@
|
|
|
93
145
|
justify-content: flex-end;
|
|
94
146
|
}
|
|
95
147
|
|
|
96
|
-
.nav-title {
|
|
148
|
+
.nav-title-compact {
|
|
97
149
|
font-size: 17px;
|
|
98
150
|
font-weight: 600;
|
|
99
151
|
color: var(--color-text);
|
|
@@ -102,5 +154,42 @@
|
|
|
102
154
|
white-space: nowrap;
|
|
103
155
|
overflow: hidden;
|
|
104
156
|
text-overflow: ellipsis;
|
|
157
|
+
margin: 0;
|
|
158
|
+
transition: opacity var(--transition);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.nav-large {
|
|
162
|
+
position: relative;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.navigation-bar.large .nav-title-compact {
|
|
166
|
+
opacity: 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.nav-large.is-collapsed .navigation-bar.large .nav-title-compact {
|
|
170
|
+
opacity: 1;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.nav-large-title-block {
|
|
174
|
+
padding: calc(56px + var(--spacing-sm)) var(--spacing-md) var(--spacing-md);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.nav-large-title {
|
|
178
|
+
font-size: clamp(1.75rem, 5vw, 2.25rem);
|
|
179
|
+
font-weight: 700;
|
|
180
|
+
color: var(--color-text);
|
|
181
|
+
letter-spacing: -0.02em;
|
|
182
|
+
margin: 0;
|
|
183
|
+
font-family: var(--font-system);
|
|
184
|
+
transition: opacity var(--transition);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.nav-large.is-collapsed .nav-large-title {
|
|
188
|
+
opacity: 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.nav-title-sentinel {
|
|
192
|
+
height: 1px;
|
|
193
|
+
width: 100%;
|
|
105
194
|
}
|
|
106
195
|
</style>
|
|
@@ -3,10 +3,11 @@ interface Props {
|
|
|
3
3
|
title?: string;
|
|
4
4
|
leading?: Snippet;
|
|
5
5
|
trailing?: Snippet;
|
|
6
|
+
largeTitle?: boolean;
|
|
6
7
|
transparent?: boolean;
|
|
7
8
|
scrolled?: boolean;
|
|
8
9
|
class?: string;
|
|
9
10
|
}
|
|
10
|
-
declare const NavigationBar: import("svelte").Component<Props, {},
|
|
11
|
+
declare const NavigationBar: import("svelte").Component<Props, {}, string>;
|
|
11
12
|
type NavigationBar = ReturnType<typeof NavigationBar>;
|
|
12
13
|
export default NavigationBar;
|
|
@@ -5,6 +5,6 @@ interface Props {
|
|
|
5
5
|
active?: boolean;
|
|
6
6
|
class?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const NavigationLink: import("svelte").Component<Props, {},
|
|
8
|
+
declare const NavigationLink: import("svelte").Component<Props, {}, string>;
|
|
9
9
|
type NavigationLink = ReturnType<typeof NavigationLink>;
|
|
10
10
|
export default NavigationLink;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
alignment?: 'leading' | 'center' | 'trailing';
|
|
10
10
|
gradient?: boolean;
|
|
11
11
|
class?: string;
|
|
12
|
-
id?: string;
|
|
12
|
+
id?: string | undefined;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
let {
|
|
@@ -80,7 +80,8 @@
|
|
|
80
80
|
<style>
|
|
81
81
|
.text {
|
|
82
82
|
display: block;
|
|
83
|
-
font-
|
|
83
|
+
font-family: var(--font-system);
|
|
84
|
+
font-size: calc(var(--text-size) * var(--dynamic-type-scale, 1));
|
|
84
85
|
line-height: var(--text-line-height);
|
|
85
86
|
font-weight: var(--text-weight);
|
|
86
87
|
color: var(--text-color);
|
|
@@ -7,8 +7,8 @@ interface Props {
|
|
|
7
7
|
alignment?: 'leading' | 'center' | 'trailing';
|
|
8
8
|
gradient?: boolean;
|
|
9
9
|
class?: string;
|
|
10
|
-
id?: string;
|
|
10
|
+
id?: string | undefined;
|
|
11
11
|
}
|
|
12
|
-
declare const Text: import("svelte").Component<Props, {},
|
|
12
|
+
declare const Text: import("svelte").Component<Props, {}, string>;
|
|
13
13
|
type Text = ReturnType<typeof Text>;
|
|
14
14
|
export default Text;
|
package/dist/constants/colors.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Centralized color constants for consistent theming
|
|
4
4
|
*/
|
|
5
5
|
/** Text color CSS values */
|
|
6
|
-
export
|
|
6
|
+
export var TEXT_COLORS = {
|
|
7
7
|
primary: 'var(--color-text)',
|
|
8
8
|
secondary: 'var(--color-text-secondary)',
|
|
9
9
|
tertiary: 'var(--color-text-tertiary)',
|
|
@@ -11,7 +11,7 @@ export const TEXT_COLORS = {
|
|
|
11
11
|
white: '#ffffff'
|
|
12
12
|
};
|
|
13
13
|
/** Background color variants */
|
|
14
|
-
export
|
|
14
|
+
export var BG_COLORS = {
|
|
15
15
|
primary: 'var(--color-bg)',
|
|
16
16
|
secondary: 'var(--color-bg-secondary)',
|
|
17
17
|
tertiary: 'var(--color-bg-tertiary)',
|
package/dist/constants/index.js
CHANGED
package/dist/constants/sizes.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Centralized constants for consistent sizing across components
|
|
4
4
|
*/
|
|
5
5
|
/** Icon/symbol pixel sizes */
|
|
6
|
-
export
|
|
6
|
+
export var ICON_SIZES = {
|
|
7
7
|
xs: 12,
|
|
8
8
|
sm: 16,
|
|
9
9
|
md: 20,
|
|
@@ -11,7 +11,7 @@ export const ICON_SIZES = {
|
|
|
11
11
|
xl: 32
|
|
12
12
|
};
|
|
13
13
|
/** Corner radius CSS values */
|
|
14
|
-
export
|
|
14
|
+
export var CORNER_RADIUS = {
|
|
15
15
|
none: '0',
|
|
16
16
|
sm: 'var(--glass-radius-sm)',
|
|
17
17
|
md: 'var(--glass-radius-md)',
|
|
@@ -20,7 +20,7 @@ export const CORNER_RADIUS = {
|
|
|
20
20
|
full: 'var(--glass-radius-full)'
|
|
21
21
|
};
|
|
22
22
|
/** Padding CSS values */
|
|
23
|
-
export
|
|
23
|
+
export var PADDING = {
|
|
24
24
|
none: '0',
|
|
25
25
|
xs: 'var(--spacing-xs)',
|
|
26
26
|
sm: 'var(--spacing-sm)',
|
|
@@ -29,7 +29,7 @@ export const PADDING = {
|
|
|
29
29
|
xl: 'var(--spacing-xl)'
|
|
30
30
|
};
|
|
31
31
|
/** Gap/spacing CSS values */
|
|
32
|
-
export
|
|
32
|
+
export var SPACING = {
|
|
33
33
|
none: '0',
|
|
34
34
|
xs: 'var(--spacing-xs)',
|
|
35
35
|
sm: 'var(--spacing-sm)',
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glass variant + intensity design tokens.
|
|
3
|
+
*
|
|
4
|
+
* Two-axis model:
|
|
5
|
+
* variant — regular or clear
|
|
6
|
+
* intensity — subtle, standard, or prominent (modulates blur/displacement/saturation)
|
|
7
|
+
*/
|
|
8
|
+
export type GlassVariant = 'regular' | 'clear';
|
|
9
|
+
export type GlassIntensity = 'subtle' | 'standard' | 'prominent';
|
|
10
|
+
export interface IntensityConfig {
|
|
11
|
+
blur: number;
|
|
12
|
+
displacementScale: number;
|
|
13
|
+
saturation: number;
|
|
14
|
+
}
|
|
15
|
+
export interface VariantConfig {
|
|
16
|
+
opacityDark: number;
|
|
17
|
+
opacityLight: number;
|
|
18
|
+
requiresDimLayer: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const INTENSITY_CONFIG: Record<GlassIntensity, IntensityConfig>;
|
|
21
|
+
export declare const VARIANT_CONFIG: Record<GlassVariant, VariantConfig>;
|
|
22
|
+
export declare const DEFAULT_VARIANT: GlassVariant;
|
|
23
|
+
export declare const DEFAULT_INTENSITY: GlassIntensity;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glass variant + intensity design tokens.
|
|
3
|
+
*
|
|
4
|
+
* Two-axis model:
|
|
5
|
+
* variant — regular or clear
|
|
6
|
+
* intensity — subtle, standard, or prominent (modulates blur/displacement/saturation)
|
|
7
|
+
*/
|
|
8
|
+
export var INTENSITY_CONFIG = {
|
|
9
|
+
subtle: { blur: 10, displacementScale: 4, saturation: 1.4 },
|
|
10
|
+
standard: { blur: 20, displacementScale: 8, saturation: 1.8 },
|
|
11
|
+
prominent: { blur: 32, displacementScale: 14, saturation: 2.2 }
|
|
12
|
+
};
|
|
13
|
+
export var VARIANT_CONFIG = {
|
|
14
|
+
regular: { opacityDark: 0.30, opacityLight: 0.22, requiresDimLayer: false },
|
|
15
|
+
clear: { opacityDark: 0.08, opacityLight: 0.06, requiresDimLayer: true }
|
|
16
|
+
};
|
|
17
|
+
export var DEFAULT_VARIANT = 'regular';
|
|
18
|
+
export var DEFAULT_INTENSITY = 'standard';
|