glasslikeui 0.2.2 → 1.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 (89) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +215 -1
  3. package/dist/actions/a11ySync.d.ts +9 -0
  4. package/dist/actions/a11ySync.js +49 -0
  5. package/dist/actions/deviceMotion.d.ts +31 -0
  6. package/dist/actions/deviceMotion.js +142 -0
  7. package/dist/actions/dragSnap.d.ts +47 -0
  8. package/dist/actions/dragSnap.js +222 -0
  9. package/dist/actions/index.d.ts +5 -0
  10. package/dist/actions/index.js +5 -0
  11. package/dist/actions/scrollEdge.d.ts +21 -0
  12. package/dist/actions/scrollEdge.js +61 -0
  13. package/dist/actions/viewTransition.d.ts +23 -0
  14. package/dist/actions/viewTransition.js +34 -0
  15. package/dist/components/glass/Glass.svelte +164 -0
  16. package/dist/components/glass/Glass.svelte.d.ts +19 -0
  17. package/dist/components/glass/GlassCard.svelte +71 -64
  18. package/dist/components/glass/GlassCard.svelte.d.ts +4 -2
  19. package/dist/components/glass/GlassDimLayer.svelte +37 -0
  20. package/dist/components/glass/GlassDimLayer.svelte.d.ts +8 -0
  21. package/dist/components/glass/GlassEffectContainer.svelte +58 -0
  22. package/dist/components/glass/GlassEffectContainer.svelte.d.ts +12 -0
  23. package/dist/components/glass/GlassMorph.svelte +42 -0
  24. package/dist/components/glass/GlassMorph.svelte.d.ts +10 -0
  25. package/dist/components/glass/GlassSection.svelte +82 -76
  26. package/dist/components/glass/GlassSection.svelte.d.ts +4 -2
  27. package/dist/components/glass/LensFilters.svelte +41 -0
  28. package/dist/components/glass/LensFilters.svelte.d.ts +18 -0
  29. package/dist/components/glass/Sheet.svelte +266 -236
  30. package/dist/components/glass/Sheet.svelte.d.ts +6 -2
  31. package/dist/components/glass/index.d.ts +5 -5
  32. package/dist/components/glass/index.js +5 -5
  33. package/dist/components/index.d.ts +1 -1
  34. package/dist/components/index.js +1 -1
  35. package/dist/components/interactive/Badge.svelte +52 -60
  36. package/dist/components/interactive/Badge.svelte.d.ts +2 -2
  37. package/dist/components/interactive/Button.svelte +168 -191
  38. package/dist/components/interactive/Button.svelte.d.ts +4 -4
  39. package/dist/components/interactive/IconButton.svelte +74 -85
  40. package/dist/components/interactive/IconButton.svelte.d.ts +4 -4
  41. package/dist/components/interactive/TabView.svelte +112 -22
  42. package/dist/components/interactive/TabView.svelte.d.ts +1 -1
  43. package/dist/components/layout/Divider.svelte +31 -31
  44. package/dist/components/layout/Divider.svelte.d.ts +1 -1
  45. package/dist/components/layout/Grid.svelte +52 -52
  46. package/dist/components/layout/Grid.svelte.d.ts +1 -1
  47. package/dist/components/layout/HStack.svelte +76 -76
  48. package/dist/components/layout/HStack.svelte.d.ts +1 -1
  49. package/dist/components/layout/ScrollView.svelte +83 -60
  50. package/dist/components/layout/ScrollView.svelte.d.ts +5 -1
  51. package/dist/components/layout/Spacer.svelte +18 -18
  52. package/dist/components/layout/Spacer.svelte.d.ts +1 -1
  53. package/dist/components/layout/VStack.svelte +56 -56
  54. package/dist/components/layout/VStack.svelte.d.ts +1 -1
  55. package/dist/components/layout/ZStack.svelte +51 -51
  56. package/dist/components/layout/ZStack.svelte.d.ts +1 -1
  57. package/dist/components/list/List.svelte +50 -50
  58. package/dist/components/list/List.svelte.d.ts +1 -1
  59. package/dist/components/list/ListRow.svelte +181 -181
  60. package/dist/components/list/ListRow.svelte.d.ts +1 -1
  61. package/dist/components/media/SymbolImage.svelte +46 -46
  62. package/dist/components/media/SymbolImage.svelte.d.ts +1 -1
  63. package/dist/components/navigation/NavigationBar.svelte +195 -106
  64. package/dist/components/navigation/NavigationBar.svelte.d.ts +2 -1
  65. package/dist/components/navigation/NavigationLink.svelte +45 -45
  66. package/dist/components/navigation/NavigationLink.svelte.d.ts +1 -1
  67. package/dist/components/typography/Text.svelte +98 -97
  68. package/dist/components/typography/Text.svelte.d.ts +2 -2
  69. package/dist/constants/colors.js +2 -2
  70. package/dist/constants/index.d.ts +1 -5
  71. package/dist/constants/index.js +1 -5
  72. package/dist/constants/sizes.js +4 -4
  73. package/dist/constants/variants.d.ts +23 -0
  74. package/dist/constants/variants.js +18 -0
  75. package/dist/icons/index.js +10 -7
  76. package/dist/index.d.ts +2 -4
  77. package/dist/index.js +2 -7
  78. package/dist/styles/glasslikeui.css +192 -0
  79. package/dist/styles/lens.css +93 -0
  80. package/dist/styles/squircle.css +17 -0
  81. package/dist/styles/typography.css +27 -0
  82. package/dist/test-setup.d.ts +1 -0
  83. package/dist/test-setup.js +6 -0
  84. package/package.json +50 -38
  85. package/dist/components/glass/LiquidGlass.svelte +0 -123
  86. package/dist/components/glass/LiquidGlass.svelte.d.ts +0 -17
  87. package/dist/constants/materials.d.ts +0 -13
  88. package/dist/constants/materials.js +0 -43
  89. package/dist/styles/liquidglass.css +0 -139
@@ -1,106 +1,195 @@
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>
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
+ largeTitle?: boolean;
10
+ transparent?: boolean;
11
+ scrolled?: boolean;
12
+ class?: string;
13
+ }
14
+
15
+ let {
16
+ title = '',
17
+ leading,
18
+ trailing,
19
+ largeTitle = false,
20
+ transparent = false,
21
+ scrolled = $bindable(false),
22
+ class: className = ''
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
+ });
42
+ </script>
43
+
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>
67
+
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>
82
+
83
+ {#if title}
84
+ <h1 class="nav-title-compact">{title}</h1>
85
+ {/if}
86
+
87
+ <div class="nav-trailing">
88
+ {#if trailing}
89
+ {@render trailing()}
90
+ {/if}
91
+ </div>
92
+ </HStack>
93
+ </nav>
94
+ </header>
95
+ {/if}
96
+
97
+ <style>
98
+ .navigation-bar {
99
+ position: fixed;
100
+ top: 0;
101
+ left: 0;
102
+ right: 0;
103
+ z-index: 100;
104
+ height: 56px;
105
+ display: flex;
106
+ align-items: center;
107
+ background: var(--glass-nav-bg);
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));
110
+ border-bottom: 1px solid var(--glass-border);
111
+ transition: all var(--transition);
112
+ font-family: var(--font-system);
113
+ }
114
+
115
+ .navigation-bar.transparent {
116
+ background: transparent;
117
+ backdrop-filter: none;
118
+ -webkit-backdrop-filter: none;
119
+ border-bottom-color: transparent;
120
+ }
121
+
122
+ .navigation-bar.transparent.scrolled {
123
+ background: var(--glass-nav-bg);
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));
126
+ border-bottom-color: var(--glass-border);
127
+ }
128
+
129
+ .nav-content {
130
+ width: 100%;
131
+ max-width: var(--max-width);
132
+ margin: 0 auto;
133
+ padding: 0 var(--spacing-md);
134
+ }
135
+
136
+ .nav-leading,
137
+ .nav-trailing {
138
+ display: flex;
139
+ align-items: center;
140
+ gap: var(--spacing-sm);
141
+ min-width: 80px;
142
+ }
143
+
144
+ .nav-trailing {
145
+ justify-content: flex-end;
146
+ }
147
+
148
+ .nav-title-compact {
149
+ font-size: 17px;
150
+ font-weight: 600;
151
+ color: var(--color-text);
152
+ text-align: center;
153
+ flex: 1;
154
+ white-space: nowrap;
155
+ overflow: hidden;
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%;
194
+ }
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;
@@ -1,45 +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>
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>
@@ -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;
@@ -1,97 +1,98 @@
1
- <script lang="ts">
2
- import type { Snippet } from 'svelte';
3
-
4
- interface Props {
5
- children: Snippet;
6
- size?: 'xs' | 'sm' | 'body' | 'callout' | 'headline' | 'title1' | 'title2' | 'title3' | 'largeTitle' | 'hero';
7
- weight?: 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy';
8
- color?: 'primary' | 'secondary' | 'tertiary' | 'accent' | 'white' | 'danger';
9
- alignment?: 'leading' | 'center' | 'trailing';
10
- gradient?: boolean;
11
- class?: string;
12
- id?: string;
13
- }
14
-
15
- let {
16
- children,
17
- size = 'body',
18
- weight = 'regular',
19
- color = 'primary',
20
- alignment = 'leading',
21
- gradient = false,
22
- class: className = '',
23
- id
24
- }: Props = $props();
25
-
26
- const sizeMap = {
27
- xs: { fontSize: '0.6875rem', lineHeight: '1.4' },
28
- sm: { fontSize: '0.8125rem', lineHeight: '1.4' },
29
- body: { fontSize: '1rem', lineHeight: '1.6' },
30
- callout: { fontSize: '1.0625rem', lineHeight: '1.5' },
31
- headline: { fontSize: '1.125rem', lineHeight: '1.4' },
32
- title3: { fontSize: '1.25rem', lineHeight: '1.3' },
33
- title2: { fontSize: '1.5rem', lineHeight: '1.25' },
34
- title1: { fontSize: 'clamp(1.75rem, 4vw, 2rem)', lineHeight: '1.2' },
35
- largeTitle: { fontSize: 'clamp(2rem, 5vw, 3rem)', lineHeight: '1.1' },
36
- hero: { fontSize: 'clamp(3rem, 12vw, 6rem)', lineHeight: '1' }
37
- };
38
-
39
- const weightMap = {
40
- regular: 400,
41
- medium: 500,
42
- semibold: 600,
43
- bold: 700,
44
- heavy: 800
45
- };
46
-
47
- const colorMap = {
48
- primary: 'var(--color-text)',
49
- secondary: 'var(--color-text-secondary)',
50
- tertiary: 'var(--color-text-tertiary)',
51
- accent: 'var(--color-accent)',
52
- white: '#ffffff',
53
- danger: 'var(--color-danger, #ef4444)'
54
- };
55
-
56
- const alignmentMap = {
57
- leading: 'left',
58
- center: 'center',
59
- trailing: 'right'
60
- };
61
-
62
- const styles = $derived(sizeMap[size]);
63
- </script>
64
-
65
- <span
66
- {id}
67
- class="text {className}"
68
- class:gradient
69
- style="
70
- --text-size: {styles.fontSize};
71
- --text-line-height: {styles.lineHeight};
72
- --text-weight: {weightMap[weight]};
73
- --text-color: {colorMap[color]};
74
- --text-align: {alignmentMap[alignment]};
75
- "
76
- >
77
- {@render children()}
78
- </span>
79
-
80
- <style>
81
- .text {
82
- display: block;
83
- font-size: var(--text-size);
84
- line-height: var(--text-line-height);
85
- font-weight: var(--text-weight);
86
- color: var(--text-color);
87
- text-align: var(--text-align);
88
- letter-spacing: -0.01em;
89
- }
90
-
91
- .text.gradient {
92
- background: var(--glass-text-gradient);
93
- -webkit-background-clip: text;
94
- -webkit-text-fill-color: transparent;
95
- background-clip: text;
96
- }
97
- </style>
1
+ <script lang="ts">
2
+ import type { Snippet } from 'svelte';
3
+
4
+ interface Props {
5
+ children: Snippet;
6
+ size?: 'xs' | 'sm' | 'body' | 'callout' | 'headline' | 'title1' | 'title2' | 'title3' | 'largeTitle' | 'hero';
7
+ weight?: 'regular' | 'medium' | 'semibold' | 'bold' | 'heavy';
8
+ color?: 'primary' | 'secondary' | 'tertiary' | 'accent' | 'white' | 'danger';
9
+ alignment?: 'leading' | 'center' | 'trailing';
10
+ gradient?: boolean;
11
+ class?: string;
12
+ id?: string | undefined;
13
+ }
14
+
15
+ let {
16
+ children,
17
+ size = 'body',
18
+ weight = 'regular',
19
+ color = 'primary',
20
+ alignment = 'leading',
21
+ gradient = false,
22
+ class: className = '',
23
+ id
24
+ }: Props = $props();
25
+
26
+ const sizeMap = {
27
+ xs: { fontSize: '0.6875rem', lineHeight: '1.4' },
28
+ sm: { fontSize: '0.8125rem', lineHeight: '1.4' },
29
+ body: { fontSize: '1rem', lineHeight: '1.6' },
30
+ callout: { fontSize: '1.0625rem', lineHeight: '1.5' },
31
+ headline: { fontSize: '1.125rem', lineHeight: '1.4' },
32
+ title3: { fontSize: '1.25rem', lineHeight: '1.3' },
33
+ title2: { fontSize: '1.5rem', lineHeight: '1.25' },
34
+ title1: { fontSize: 'clamp(1.75rem, 4vw, 2rem)', lineHeight: '1.2' },
35
+ largeTitle: { fontSize: 'clamp(2rem, 5vw, 3rem)', lineHeight: '1.1' },
36
+ hero: { fontSize: 'clamp(3rem, 12vw, 6rem)', lineHeight: '1' }
37
+ };
38
+
39
+ const weightMap = {
40
+ regular: 400,
41
+ medium: 500,
42
+ semibold: 600,
43
+ bold: 700,
44
+ heavy: 800
45
+ };
46
+
47
+ const colorMap = {
48
+ primary: 'var(--color-text)',
49
+ secondary: 'var(--color-text-secondary)',
50
+ tertiary: 'var(--color-text-tertiary)',
51
+ accent: 'var(--color-accent)',
52
+ white: '#ffffff',
53
+ danger: 'var(--color-danger, #ef4444)'
54
+ };
55
+
56
+ const alignmentMap = {
57
+ leading: 'left',
58
+ center: 'center',
59
+ trailing: 'right'
60
+ };
61
+
62
+ const styles = $derived(sizeMap[size]);
63
+ </script>
64
+
65
+ <span
66
+ {id}
67
+ class="text {className}"
68
+ class:gradient
69
+ style="
70
+ --text-size: {styles.fontSize};
71
+ --text-line-height: {styles.lineHeight};
72
+ --text-weight: {weightMap[weight]};
73
+ --text-color: {colorMap[color]};
74
+ --text-align: {alignmentMap[alignment]};
75
+ "
76
+ >
77
+ {@render children()}
78
+ </span>
79
+
80
+ <style>
81
+ .text {
82
+ display: block;
83
+ font-family: var(--font-system);
84
+ font-size: calc(var(--text-size) * var(--dynamic-type-scale, 1));
85
+ line-height: var(--text-line-height);
86
+ font-weight: var(--text-weight);
87
+ color: var(--text-color);
88
+ text-align: var(--text-align);
89
+ letter-spacing: -0.01em;
90
+ }
91
+
92
+ .text.gradient {
93
+ background: var(--glass-text-gradient);
94
+ -webkit-background-clip: text;
95
+ -webkit-text-fill-color: transparent;
96
+ background-clip: text;
97
+ }
98
+ </style>
@@ -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;
@@ -3,7 +3,7 @@
3
3
  * Centralized color constants for consistent theming
4
4
  */
5
5
  /** Text color CSS values */
6
- export const TEXT_COLORS = {
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 const BG_COLORS = {
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)',
@@ -1,7 +1,3 @@
1
- /**
2
- * Design Tokens
3
- * Centralized constants for the design system
4
- */
5
1
  export * from './sizes';
6
2
  export * from './colors';
7
- export * from './materials';
3
+ export * from './variants';
@@ -1,7 +1,3 @@
1
- /**
2
- * Design Tokens
3
- * Centralized constants for the design system
4
- */
5
1
  export * from './sizes';
6
2
  export * from './colors';
7
- export * from './materials';
3
+ export * from './variants';