glasslikeui 1.1.0 → 1.2.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/LICENSE +21 -21
- package/README.md +215 -215
- package/dist/components/glass/Glass.svelte +164 -164
- package/dist/components/glass/GlassCard.svelte +71 -71
- package/dist/components/glass/GlassDimLayer.svelte +37 -37
- package/dist/components/glass/GlassEffectContainer.svelte +58 -58
- package/dist/components/glass/GlassMorph.svelte +42 -42
- package/dist/components/glass/GlassSection.svelte +82 -82
- package/dist/components/glass/LensFilters.svelte +41 -41
- package/dist/components/glass/Sheet.svelte +266 -266
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/interactive/Badge.svelte +52 -52
- package/dist/components/interactive/Button.svelte +168 -168
- package/dist/components/interactive/IconButton.svelte +74 -74
- package/dist/components/layout/Divider.svelte +31 -31
- package/dist/components/layout/Grid.svelte +52 -52
- package/dist/components/layout/HStack.svelte +76 -76
- package/dist/components/layout/ScrollView.svelte +83 -83
- package/dist/components/layout/Spacer.svelte +18 -18
- package/dist/components/layout/VStack.svelte +56 -56
- package/dist/components/layout/ZStack.svelte +51 -51
- package/dist/components/list/List.svelte +50 -50
- package/dist/components/list/ListRow.svelte +181 -181
- package/dist/components/media/SymbolImage.svelte +46 -46
- package/dist/components/menu/Menu.svelte +206 -0
- package/dist/components/menu/Menu.svelte.d.ts +10 -0
- package/dist/components/menu/MenuItem.svelte +114 -0
- package/dist/components/menu/MenuItem.svelte.d.ts +12 -0
- package/dist/components/menu/index.d.ts +6 -0
- package/dist/components/menu/index.js +6 -0
- package/dist/components/navigation/NavigationBar.svelte +195 -195
- package/dist/components/navigation/NavigationLink.svelte +45 -45
- package/dist/components/typography/Text.svelte +98 -98
- package/dist/icons/index.js +4 -1
- package/dist/styles/glasslikeui.css +192 -192
- package/dist/styles/lens.css +93 -93
- package/dist/styles/squircle.css +17 -17
- package/dist/styles/typography.css +27 -27
- package/package.json +50 -50
package/dist/styles/lens.css
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
/* Glass lens layer.
|
|
2
|
-
* Pseudo-element strategy: ::before captures backdrop via backdrop-filter,
|
|
3
|
-
* then an SVG filter displaces those pixels to produce edge refraction.
|
|
4
|
-
* Requires <LensFilters /> mounted once for the SVG defs.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
.glass-surface {
|
|
8
|
-
position: relative;
|
|
9
|
-
isolation: isolate;
|
|
10
|
-
background: var(--glass-surface-bg);
|
|
11
|
-
border-radius: var(--glass-radius, var(--glass-radius-lg));
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
color: inherit;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.glass-surface::before {
|
|
17
|
-
content: '';
|
|
18
|
-
position: absolute;
|
|
19
|
-
inset: 0;
|
|
20
|
-
z-index: 0;
|
|
21
|
-
border-radius: inherit;
|
|
22
|
-
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
|
|
23
|
-
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
|
|
24
|
-
pointer-events: none;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.glass-surface.has-lensing::before {
|
|
28
|
-
filter: url(#glass-lens-refract);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.glass-surface::after {
|
|
32
|
-
content: '';
|
|
33
|
-
position: absolute;
|
|
34
|
-
inset: 0;
|
|
35
|
-
z-index: 1;
|
|
36
|
-
border-radius: inherit;
|
|
37
|
-
pointer-events: none;
|
|
38
|
-
border: var(--glass-border-width) solid var(--glass-border);
|
|
39
|
-
box-shadow:
|
|
40
|
-
inset 0 1px 0 0 var(--glass-highlight),
|
|
41
|
-
inset 0 -1px 0 0 var(--glass-shadow-inner);
|
|
42
|
-
background: linear-gradient(
|
|
43
|
-
var(--glass-highlight-angle),
|
|
44
|
-
rgba(255, 255, 255, calc(0.08 * var(--glass-motion-enabled))) 0%,
|
|
45
|
-
transparent 40%,
|
|
46
|
-
transparent 60%,
|
|
47
|
-
rgba(0, 0, 0, calc(0.04 * var(--glass-motion-enabled))) 100%
|
|
48
|
-
);
|
|
49
|
-
mix-blend-mode: overlay;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.glass-content {
|
|
53
|
-
position: relative;
|
|
54
|
-
z-index: 2;
|
|
55
|
-
height: 100%;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.glass-content > :where(h1, h2, h3, h4, h5, h6, p, span, label, a, button) {
|
|
59
|
-
font-family: var(--font-system);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.glass-surface.has-shadow {
|
|
63
|
-
box-shadow:
|
|
64
|
-
0 8px 32px -8px var(--glass-shadow),
|
|
65
|
-
0 2px 8px -2px var(--glass-shadow);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.glass-surface.is-interactive {
|
|
69
|
-
cursor: pointer;
|
|
70
|
-
transition: transform var(--transition-fast), box-shadow var(--transition-fast);
|
|
71
|
-
}
|
|
72
|
-
.glass-surface.is-interactive:hover {
|
|
73
|
-
transform: scale(calc(1 + 0.01 * var(--glass-motion-enabled)));
|
|
74
|
-
box-shadow:
|
|
75
|
-
0 12px 40px -8px var(--glass-shadow),
|
|
76
|
-
0 4px 12px -2px var(--glass-shadow),
|
|
77
|
-
0 0 0 1px var(--glass-highlight);
|
|
78
|
-
}
|
|
79
|
-
.glass-surface.is-interactive:active {
|
|
80
|
-
transform: scale(calc(1 - 0.005 * var(--glass-motion-enabled)));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.glass-dim-layer {
|
|
84
|
-
position: absolute;
|
|
85
|
-
inset: 0;
|
|
86
|
-
background: linear-gradient(
|
|
87
|
-
to bottom,
|
|
88
|
-
rgba(0, 0, 0, 0.2) 0%,
|
|
89
|
-
rgba(0, 0, 0, 0.45) 100%
|
|
90
|
-
);
|
|
91
|
-
pointer-events: none;
|
|
92
|
-
z-index: -1;
|
|
93
|
-
}
|
|
1
|
+
/* Glass lens layer.
|
|
2
|
+
* Pseudo-element strategy: ::before captures backdrop via backdrop-filter,
|
|
3
|
+
* then an SVG filter displaces those pixels to produce edge refraction.
|
|
4
|
+
* Requires <LensFilters /> mounted once for the SVG defs.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.glass-surface {
|
|
8
|
+
position: relative;
|
|
9
|
+
isolation: isolate;
|
|
10
|
+
background: var(--glass-surface-bg);
|
|
11
|
+
border-radius: var(--glass-radius, var(--glass-radius-lg));
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
color: inherit;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.glass-surface::before {
|
|
17
|
+
content: '';
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset: 0;
|
|
20
|
+
z-index: 0;
|
|
21
|
+
border-radius: inherit;
|
|
22
|
+
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
|
|
23
|
+
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.glass-surface.has-lensing::before {
|
|
28
|
+
filter: url(#glass-lens-refract);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.glass-surface::after {
|
|
32
|
+
content: '';
|
|
33
|
+
position: absolute;
|
|
34
|
+
inset: 0;
|
|
35
|
+
z-index: 1;
|
|
36
|
+
border-radius: inherit;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
border: var(--glass-border-width) solid var(--glass-border);
|
|
39
|
+
box-shadow:
|
|
40
|
+
inset 0 1px 0 0 var(--glass-highlight),
|
|
41
|
+
inset 0 -1px 0 0 var(--glass-shadow-inner);
|
|
42
|
+
background: linear-gradient(
|
|
43
|
+
var(--glass-highlight-angle),
|
|
44
|
+
rgba(255, 255, 255, calc(0.08 * var(--glass-motion-enabled))) 0%,
|
|
45
|
+
transparent 40%,
|
|
46
|
+
transparent 60%,
|
|
47
|
+
rgba(0, 0, 0, calc(0.04 * var(--glass-motion-enabled))) 100%
|
|
48
|
+
);
|
|
49
|
+
mix-blend-mode: overlay;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.glass-content {
|
|
53
|
+
position: relative;
|
|
54
|
+
z-index: 2;
|
|
55
|
+
height: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.glass-content > :where(h1, h2, h3, h4, h5, h6, p, span, label, a, button) {
|
|
59
|
+
font-family: var(--font-system);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.glass-surface.has-shadow {
|
|
63
|
+
box-shadow:
|
|
64
|
+
0 8px 32px -8px var(--glass-shadow),
|
|
65
|
+
0 2px 8px -2px var(--glass-shadow);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.glass-surface.is-interactive {
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
transition: transform var(--transition-fast), box-shadow var(--transition-fast);
|
|
71
|
+
}
|
|
72
|
+
.glass-surface.is-interactive:hover {
|
|
73
|
+
transform: scale(calc(1 + 0.01 * var(--glass-motion-enabled)));
|
|
74
|
+
box-shadow:
|
|
75
|
+
0 12px 40px -8px var(--glass-shadow),
|
|
76
|
+
0 4px 12px -2px var(--glass-shadow),
|
|
77
|
+
0 0 0 1px var(--glass-highlight);
|
|
78
|
+
}
|
|
79
|
+
.glass-surface.is-interactive:active {
|
|
80
|
+
transform: scale(calc(1 - 0.005 * var(--glass-motion-enabled)));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.glass-dim-layer {
|
|
84
|
+
position: absolute;
|
|
85
|
+
inset: 0;
|
|
86
|
+
background: linear-gradient(
|
|
87
|
+
to bottom,
|
|
88
|
+
rgba(0, 0, 0, 0.2) 0%,
|
|
89
|
+
rgba(0, 0, 0, 0.45) 100%
|
|
90
|
+
);
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
z-index: -1;
|
|
93
|
+
}
|
package/dist/styles/squircle.css
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/* Squircle corner utility.
|
|
2
|
-
* Uses clip-path with a normalized (objectBoundingBox) path so the shape
|
|
3
|
-
* scales correctly with element dimensions. Apply .glass-squircle to any
|
|
4
|
-
* element that should have continuous-curve corners instead of circular.
|
|
5
|
-
* Falls back to CSS border-radius where the clip-path is unsupported.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
.glass-squircle {
|
|
9
|
-
clip-path: url(#glass-squircle-path);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@supports (corner-shape: superellipse(2)) {
|
|
13
|
-
.glass-squircle {
|
|
14
|
-
clip-path: none;
|
|
15
|
-
corner-shape: superellipse(2.5);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
/* Squircle corner utility.
|
|
2
|
+
* Uses clip-path with a normalized (objectBoundingBox) path so the shape
|
|
3
|
+
* scales correctly with element dimensions. Apply .glass-squircle to any
|
|
4
|
+
* element that should have continuous-curve corners instead of circular.
|
|
5
|
+
* Falls back to CSS border-radius where the clip-path is unsupported.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.glass-squircle {
|
|
9
|
+
clip-path: url(#glass-squircle-path);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@supports (corner-shape: superellipse(2)) {
|
|
13
|
+
.glass-squircle {
|
|
14
|
+
clip-path: none;
|
|
15
|
+
corner-shape: superellipse(2.5);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/* Typography tokens.
|
|
2
|
-
* SF Pro where available, then Segoe UI (Windows), Roboto (Linux/Android),
|
|
3
|
-
* Helvetica/Arial, and finally the system sans-serif fallback.
|
|
4
|
-
*
|
|
5
|
-
* Tokens are exposed as CSS custom properties but are NOT applied to :root
|
|
6
|
-
* so that they don't override the consumer's own body font. Library
|
|
7
|
-
* components opt in via `font-family: var(--font-system)`.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
:root {
|
|
11
|
-
--font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro',
|
|
12
|
-
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
13
|
-
--font-system-mono: ui-monospace, 'SF Mono', Menlo, 'Cascadia Mono',
|
|
14
|
-
'Roboto Mono', 'Courier New', monospace;
|
|
15
|
-
--dynamic-type-scale: 1;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* Consumer can opt in globally like this:
|
|
19
|
-
* body { font-family: var(--font-system); }
|
|
20
|
-
* or use these utility classes on specific elements:
|
|
21
|
-
*/
|
|
22
|
-
.font-system {
|
|
23
|
-
font-family: var(--font-system);
|
|
24
|
-
}
|
|
25
|
-
.font-system-mono {
|
|
26
|
-
font-family: var(--font-system-mono);
|
|
27
|
-
}
|
|
1
|
+
/* Typography tokens.
|
|
2
|
+
* SF Pro where available, then Segoe UI (Windows), Roboto (Linux/Android),
|
|
3
|
+
* Helvetica/Arial, and finally the system sans-serif fallback.
|
|
4
|
+
*
|
|
5
|
+
* Tokens are exposed as CSS custom properties but are NOT applied to :root
|
|
6
|
+
* so that they don't override the consumer's own body font. Library
|
|
7
|
+
* components opt in via `font-family: var(--font-system)`.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
--font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro',
|
|
12
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
13
|
+
--font-system-mono: ui-monospace, 'SF Mono', Menlo, 'Cascadia Mono',
|
|
14
|
+
'Roboto Mono', 'Courier New', monospace;
|
|
15
|
+
--dynamic-type-scale: 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Consumer can opt in globally like this:
|
|
19
|
+
* body { font-family: var(--font-system); }
|
|
20
|
+
* or use these utility classes on specific elements:
|
|
21
|
+
*/
|
|
22
|
+
.font-system {
|
|
23
|
+
font-family: var(--font-system);
|
|
24
|
+
}
|
|
25
|
+
.font-system-mono {
|
|
26
|
+
font-family: var(--font-system-mono);
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "glasslikeui",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Svelte component library with frosted glass materials",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"svelte": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"svelte": "./dist/index.js",
|
|
13
|
-
"default": "./dist/index.js"
|
|
14
|
-
},
|
|
15
|
-
"./glasslikeui.css": "./dist/styles/glasslikeui.css",
|
|
16
|
-
"./lens.css": "./dist/styles/lens.css",
|
|
17
|
-
"./squircle.css": "./dist/styles/squircle.css",
|
|
18
|
-
"./typography.css": "./dist/styles/typography.css"
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"dist"
|
|
22
|
-
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"package": "svelte-package",
|
|
25
|
-
"prepublishOnly": "npm run package",
|
|
26
|
-
"test": "vitest run",
|
|
27
|
-
"test:watch": "vitest",
|
|
28
|
-
"test:coverage": "vitest run --coverage"
|
|
29
|
-
},
|
|
30
|
-
"peerDependencies": {
|
|
31
|
-
"svelte": "^5.0.0"
|
|
32
|
-
},
|
|
33
|
-
"repository": {
|
|
34
|
-
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/DeveloperBeau/GlassLikeUI.git"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@sveltejs/package": "^2.5.7",
|
|
39
|
-
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
40
|
-
"@testing-library/jest-dom": "^6.9.1",
|
|
41
|
-
"@testing-library/svelte": "^5.3.1",
|
|
42
|
-
"@vitest/coverage-v8": "^4.1.5",
|
|
43
|
-
"jsdom": "^29.0.2",
|
|
44
|
-
"svelte": "^5.55.4",
|
|
45
|
-
"svelte-check": "^4.4.6",
|
|
46
|
-
"typescript": "^6.0.3",
|
|
47
|
-
"vite": "^8.0.10",
|
|
48
|
-
"vitest": "^4.1.5"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "glasslikeui",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Svelte component library with frosted glass materials",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"svelte": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"svelte": "./dist/index.js",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./glasslikeui.css": "./dist/styles/glasslikeui.css",
|
|
16
|
+
"./lens.css": "./dist/styles/lens.css",
|
|
17
|
+
"./squircle.css": "./dist/styles/squircle.css",
|
|
18
|
+
"./typography.css": "./dist/styles/typography.css"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"package": "svelte-package",
|
|
25
|
+
"prepublishOnly": "npm run package",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"test:coverage": "vitest run --coverage"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"svelte": "^5.0.0"
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/DeveloperBeau/GlassLikeUI.git"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@sveltejs/package": "^2.5.7",
|
|
39
|
+
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
40
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
41
|
+
"@testing-library/svelte": "^5.3.1",
|
|
42
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
43
|
+
"jsdom": "^29.0.2",
|
|
44
|
+
"svelte": "^5.55.4",
|
|
45
|
+
"svelte-check": "^4.4.6",
|
|
46
|
+
"typescript": "^6.0.3",
|
|
47
|
+
"vite": "^8.0.10",
|
|
48
|
+
"vitest": "^4.1.5"
|
|
49
|
+
}
|
|
50
|
+
}
|