@noahbaumgartner/svelte-ui 0.0.6 → 0.0.8
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/dist/components/button/Button.svelte +0 -10
- package/dist/components/lightbox/Lightbox.svelte +136 -0
- package/dist/components/lightbox/Lightbox.svelte.d.ts +14 -0
- package/dist/components/media-preview/MediaPreview.svelte +110 -0
- package/dist/components/media-preview/MediaPreview.svelte.d.ts +11 -0
- package/dist/components/mesh-gradient/MeshGradient.svelte +19 -2
- package/dist/components/navbar/Navbar.svelte +14 -2
- package/dist/components/page-header/PageHeader.svelte +83 -0
- package/dist/components/page-header/PageHeader.svelte.d.ts +13 -0
- package/dist/components/section/Section.svelte +9 -5
- package/dist/components/section/Section.svelte.d.ts +6 -3
- package/dist/components/select/Select.svelte.d.ts +1 -1
- package/dist/components/table-of-contents/TableOfContents.svelte +296 -0
- package/dist/components/table-of-contents/TableOfContents.svelte.d.ts +7 -0
- package/dist/components/theme-toggle/ThemeToggle.svelte +40 -0
- package/dist/components/theme-toggle/ThemeToggle.svelte.d.ts +7 -0
- package/dist/components/timeline/Timeline.svelte +122 -0
- package/dist/components/timeline/Timeline.svelte.d.ts +21 -0
- package/dist/icon.d.ts +7 -7
- package/dist/icons/GithubIcon.svelte +25 -0
- package/dist/icons/GithubIcon.svelte.d.ts +4 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.js +7 -1
- package/dist/internal/icons/Monitor.svelte +15 -0
- package/dist/internal/icons/Monitor.svelte.d.ts +4 -0
- package/dist/internal/icons/Moon.svelte +18 -0
- package/dist/internal/icons/Moon.svelte.d.ts +4 -0
- package/dist/internal/icons/Pause.svelte +14 -0
- package/dist/internal/icons/Pause.svelte.d.ts +4 -0
- package/dist/internal/icons/Play.svelte +16 -0
- package/dist/internal/icons/Play.svelte.d.ts +4 -0
- package/dist/internal/icons/Sun.svelte +21 -0
- package/dist/internal/icons/Sun.svelte.d.ts +4 -0
- package/dist/styles/tokens.css +7 -0
- package/package.json +4 -2
- package/dist/components/entry/Entry.svelte +0 -94
- package/dist/components/entry/Entry.svelte.d.ts +0 -16
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
3
|
+
import Icon from './Icon.svelte';
|
|
4
|
+
|
|
5
|
+
let props: SVGAttributes<SVGSVGElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<Icon
|
|
9
|
+
{...props}
|
|
10
|
+
nodes={[
|
|
11
|
+
[
|
|
12
|
+
'path',
|
|
13
|
+
{
|
|
14
|
+
d: 'M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401'
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
]}
|
|
18
|
+
/>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
3
|
+
import Icon from './Icon.svelte';
|
|
4
|
+
|
|
5
|
+
let props: SVGAttributes<SVGSVGElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<Icon
|
|
9
|
+
{...props}
|
|
10
|
+
nodes={[
|
|
11
|
+
['rect', { x: 14, y: 3, width: 5, height: 18, rx: 1 }],
|
|
12
|
+
['rect', { x: 5, y: 3, width: 5, height: 18, rx: 1 }]
|
|
13
|
+
]}
|
|
14
|
+
/>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
3
|
+
import Icon from './Icon.svelte';
|
|
4
|
+
|
|
5
|
+
let props: SVGAttributes<SVGSVGElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<Icon
|
|
9
|
+
{...props}
|
|
10
|
+
nodes={[
|
|
11
|
+
[
|
|
12
|
+
'path',
|
|
13
|
+
{ d: 'M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z' }
|
|
14
|
+
]
|
|
15
|
+
]}
|
|
16
|
+
/>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { SVGAttributes } from 'svelte/elements';
|
|
3
|
+
import Icon from './Icon.svelte';
|
|
4
|
+
|
|
5
|
+
let props: SVGAttributes<SVGSVGElement> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<Icon
|
|
9
|
+
{...props}
|
|
10
|
+
nodes={[
|
|
11
|
+
['circle', { cx: 12, cy: 12, r: 4 }],
|
|
12
|
+
['path', { d: 'M12 2v2' }],
|
|
13
|
+
['path', { d: 'M12 20v2' }],
|
|
14
|
+
['path', { d: 'm4.93 4.93 1.41 1.41' }],
|
|
15
|
+
['path', { d: 'm17.66 17.66 1.41 1.41' }],
|
|
16
|
+
['path', { d: 'M2 12h2' }],
|
|
17
|
+
['path', { d: 'M20 12h2' }],
|
|
18
|
+
['path', { d: 'm6.34 17.66-1.41 1.41' }],
|
|
19
|
+
['path', { d: 'm19.07 4.93-1.41 1.41' }]
|
|
20
|
+
]}
|
|
21
|
+
/>
|
package/dist/styles/tokens.css
CHANGED
|
@@ -45,4 +45,11 @@
|
|
|
45
45
|
color-scheme: dark;
|
|
46
46
|
--color-destructive: #f87171;
|
|
47
47
|
}
|
|
48
|
+
|
|
49
|
+
/* Page-coloured track, light handle. Standard properties let macOS draw its
|
|
50
|
+
rounded overlay scrollbar, which only shows while scrolling. */
|
|
51
|
+
:root {
|
|
52
|
+
scrollbar-width: auto;
|
|
53
|
+
scrollbar-color: color-mix(in srgb, var(--ui-base), var(--ui-ink) 40%) var(--color-bg);
|
|
54
|
+
}
|
|
48
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noahbaumgartner/svelte-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Noah Baumgartner",
|
|
6
6
|
"repository": {
|
|
@@ -41,12 +41,14 @@
|
|
|
41
41
|
},
|
|
42
42
|
"./tokens.css": "./dist/styles/tokens.css"
|
|
43
43
|
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@lucide/svelte": "^1.47.0"
|
|
46
|
+
},
|
|
44
47
|
"peerDependencies": {
|
|
45
48
|
"svelte": "^5.0.0"
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
51
|
"@eslint/js": "^10.0.1",
|
|
49
|
-
"@lucide/svelte": "^1.47.0",
|
|
50
52
|
"@storybook/addon-a11y": "^10.6.0",
|
|
51
53
|
"@storybook/addon-docs": "^10.6.0",
|
|
52
54
|
"@storybook/addon-svelte-csf": "latest",
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
-
|
|
5
|
-
type Props = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'title'> & {
|
|
6
|
-
/** Rendered as an `<h3>`. */
|
|
7
|
-
title: string;
|
|
8
|
-
/** Muted text next to the title, e.g. a period like "2021 - 2025". */
|
|
9
|
-
meta?: string;
|
|
10
|
-
/** The description. */
|
|
11
|
-
children?: Snippet;
|
|
12
|
-
/** Below the description, e.g. a Link. */
|
|
13
|
-
footer?: Snippet;
|
|
14
|
-
ref?: HTMLDivElement | null;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
let {
|
|
18
|
-
title,
|
|
19
|
-
meta,
|
|
20
|
-
class: className,
|
|
21
|
-
children,
|
|
22
|
-
footer,
|
|
23
|
-
ref = $bindable(null),
|
|
24
|
-
...rest
|
|
25
|
-
}: Props = $props();
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<div {...rest} bind:this={ref} class={['entry', className]}>
|
|
29
|
-
<div class="entry-heading">
|
|
30
|
-
<h3 class="entry-title">{title}</h3>
|
|
31
|
-
{#if meta}
|
|
32
|
-
<span class="entry-meta">{meta}</span>
|
|
33
|
-
{/if}
|
|
34
|
-
</div>
|
|
35
|
-
{#if children}
|
|
36
|
-
<p class="entry-description">{@render children()}</p>
|
|
37
|
-
{/if}
|
|
38
|
-
{#if footer}
|
|
39
|
-
<div class="entry-footer">{@render footer()}</div>
|
|
40
|
-
{/if}
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<style>
|
|
44
|
-
@layer svelte-ui {
|
|
45
|
-
.entry {
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
align-items: flex-start;
|
|
49
|
-
gap: 10px;
|
|
50
|
-
box-sizing: border-box;
|
|
51
|
-
padding: 24px;
|
|
52
|
-
color: var(--color-text);
|
|
53
|
-
border: 1px solid var(--color-border-strong);
|
|
54
|
-
border-radius: 10px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.entry-heading {
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-wrap: wrap;
|
|
60
|
-
align-items: baseline;
|
|
61
|
-
column-gap: 8px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.entry-title {
|
|
65
|
-
margin: 0;
|
|
66
|
-
font-size: 20px;
|
|
67
|
-
font-weight: 500;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.entry-meta {
|
|
71
|
-
font-size: 14px;
|
|
72
|
-
color: var(--color-text-muted);
|
|
73
|
-
white-space: nowrap;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.entry-description {
|
|
77
|
-
margin: 0;
|
|
78
|
-
max-width: 640px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.entry-footer {
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-wrap: wrap;
|
|
84
|
-
align-items: center;
|
|
85
|
-
gap: 8px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@media (min-width: 768px) {
|
|
89
|
-
.entry {
|
|
90
|
-
padding: 32px;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
</style>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
-
type Props = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'title'> & {
|
|
4
|
-
/** Rendered as an `<h3>`. */
|
|
5
|
-
title: string;
|
|
6
|
-
/** Muted text next to the title, e.g. a period like "2021 - 2025". */
|
|
7
|
-
meta?: string;
|
|
8
|
-
/** The description. */
|
|
9
|
-
children?: Snippet;
|
|
10
|
-
/** Below the description, e.g. a Link. */
|
|
11
|
-
footer?: Snippet;
|
|
12
|
-
ref?: HTMLDivElement | null;
|
|
13
|
-
};
|
|
14
|
-
declare const Entry: import("svelte").Component<Props, {}, "ref">;
|
|
15
|
-
type Entry = ReturnType<typeof Entry>;
|
|
16
|
-
export default Entry;
|